2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20210105.
5 # Copyright 2003-2020,2021 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
102 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
109 ac_unique_file="ncurses.c"
111 # Initialize some variables set by options.
113 ac_init_version=false
114 # The variables have the same names as the options, with
115 # dashes changed to underlines.
123 program_transform_name=s,x,x,
131 # Installation directory options.
132 # These are left unexpanded so users can "make install exec_prefix=/foo"
133 # and all the variables that are supposed to be based on exec_prefix
134 # by default will actually change.
135 # Use braces instead of parens because sh, perl, etc. also accept them.
136 bindir='${exec_prefix}/bin'
137 sbindir='${exec_prefix}/sbin'
138 libexecdir='${exec_prefix}/libexec'
139 datarootdir='${prefix}/share'
140 datadir='${datarootdir}'
141 sysconfdir='${prefix}/etc'
142 sharedstatedir='${prefix}/com'
143 localstatedir='${prefix}/var'
144 runstatedir='${localstatedir}/run'
145 libdir='${exec_prefix}/lib'
146 includedir='${prefix}/include'
147 oldincludedir='/usr/include'
148 infodir='${datarootdir}/info'
149 mandir='${datarootdir}/man'
151 # Identity of this package.
161 # If the previous option needs an argument, assign it.
162 if test -n "$ac_prev"; then
163 eval "$ac_prev=\$ac_option"
168 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
170 # Accept the important Cygnus configure options, so we can diagnose typos.
174 -bindir | --bindir | --bindi | --bind | --bin | --bi)
176 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
179 -build | --build | --buil | --bui | --bu)
180 ac_prev=build_alias ;;
181 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
182 build_alias=$ac_optarg ;;
184 -cache-file | --cache-file | --cache-fil | --cache-fi \
185 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
186 ac_prev=cache_file ;;
187 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
188 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
189 cache_file=$ac_optarg ;;
192 cache_file=config.cache ;;
194 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
196 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
198 datadir=$ac_optarg ;;
200 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
201 | --dataroo | --dataro | --datar)
202 ac_prev=datarootdir ;;
203 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
204 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
205 datarootdir=$ac_optarg ;;
207 -disable-* | --disable-*)
208 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
209 # Reject names that are not valid shell variable names.
210 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
211 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
212 { (exit 1); exit 1; }; }
213 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
214 eval "enable_$ac_feature=no" ;;
216 -enable-* | --enable-*)
217 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
218 # Reject names that are not valid shell variable names.
219 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
220 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
221 { (exit 1); exit 1; }; }
222 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
224 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
227 eval "enable_$ac_feature='$ac_optarg'" ;;
229 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
230 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
231 | --exec | --exe | --ex)
232 ac_prev=exec_prefix ;;
233 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
234 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
235 | --exec=* | --exe=* | --ex=*)
236 exec_prefix=$ac_optarg ;;
238 -gas | --gas | --ga | --g)
239 # Obsolete; use --with-gas.
242 -help | --help | --hel | --he | -h)
244 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
245 ac_init_help=recursive ;;
246 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
247 ac_init_help=short ;;
249 -host | --host | --hos | --ho)
250 ac_prev=host_alias ;;
251 -host=* | --host=* | --hos=* | --ho=*)
252 host_alias=$ac_optarg ;;
254 -includedir | --includedir | --includedi | --included | --include \
255 | --includ | --inclu | --incl | --inc)
256 ac_prev=includedir ;;
257 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
258 | --includ=* | --inclu=* | --incl=* | --inc=*)
259 includedir=$ac_optarg ;;
261 -infodir | --infodir | --infodi | --infod | --info | --inf)
263 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
264 infodir=$ac_optarg ;;
266 -libdir | --libdir | --libdi | --libd)
268 -libdir=* | --libdir=* | --libdi=* | --libd=*)
271 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
272 | --libexe | --libex | --libe)
273 ac_prev=libexecdir ;;
274 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
275 | --libexe=* | --libex=* | --libe=*)
276 libexecdir=$ac_optarg ;;
278 -localstatedir | --localstatedir | --localstatedi | --localstated \
279 | --localstate | --localstat | --localsta | --localst \
280 | --locals | --local | --loca | --loc | --lo)
281 ac_prev=localstatedir ;;
282 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
283 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
284 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
285 localstatedir=$ac_optarg ;;
287 -runstatedir | --runstatedir | --runstatedi | --runstated \
288 | --runstate | --runstat | --runsta | --runst \
289 | --runs | --run | --ru)
290 ac_prev=runstatedir ;;
291 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
292 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
293 | --runs=* | --run=* | --ru=*)
294 runstatedir=$ac_optarg ;;
296 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
298 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
302 # Obsolete; use --without-fp.
305 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
309 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
313 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
314 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
315 | --oldin | --oldi | --old | --ol | --o)
316 ac_prev=oldincludedir ;;
317 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
318 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
319 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
320 oldincludedir=$ac_optarg ;;
322 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
324 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
327 -program-prefix | --program-prefix | --program-prefi | --program-pref \
328 | --program-pre | --program-pr | --program-p)
329 ac_prev=program_prefix ;;
330 -program-prefix=* | --program-prefix=* | --program-prefi=* \
331 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
332 program_prefix=$ac_optarg ;;
334 -program-suffix | --program-suffix | --program-suffi | --program-suff \
335 | --program-suf | --program-su | --program-s)
336 ac_prev=program_suffix ;;
337 -program-suffix=* | --program-suffix=* | --program-suffi=* \
338 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
339 program_suffix=$ac_optarg ;;
341 -program-transform-name | --program-transform-name \
342 | --program-transform-nam | --program-transform-na \
343 | --program-transform-n | --program-transform- \
344 | --program-transform | --program-transfor \
345 | --program-transfo | --program-transf \
346 | --program-trans | --program-tran \
347 | --progr-tra | --program-tr | --program-t)
348 ac_prev=program_transform_name ;;
349 -program-transform-name=* | --program-transform-name=* \
350 | --program-transform-nam=* | --program-transform-na=* \
351 | --program-transform-n=* | --program-transform-=* \
352 | --program-transform=* | --program-transfor=* \
353 | --program-transfo=* | --program-transf=* \
354 | --program-trans=* | --program-tran=* \
355 | --progr-tra=* | --program-tr=* | --program-t=*)
356 program_transform_name=$ac_optarg ;;
358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359 | -silent | --silent | --silen | --sile | --sil)
362 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
364 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
366 sbindir=$ac_optarg ;;
368 -sharedstatedir | --sharedstatedir | --sharedstatedi \
369 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370 | --sharedst | --shareds | --shared | --share | --shar \
372 ac_prev=sharedstatedir ;;
373 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
377 sharedstatedir=$ac_optarg ;;
379 -site | --site | --sit)
381 -site=* | --site=* | --sit=*)
384 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
386 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
389 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
390 | --syscon | --sysco | --sysc | --sys | --sy)
391 ac_prev=sysconfdir ;;
392 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
393 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
394 sysconfdir=$ac_optarg ;;
396 -target | --target | --targe | --targ | --tar | --ta | --t)
397 ac_prev=target_alias ;;
398 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
399 target_alias=$ac_optarg ;;
401 -v | -verbose | --verbose | --verbos | --verbo | --verb)
404 -version | --version | --versio | --versi | --vers | -V)
408 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
409 # Reject names that are not valid shell variable names.
410 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411 { echo "$as_me: error: invalid package name: $ac_package" >&2
412 { (exit 1); exit 1; }; }
413 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
418 eval "with_$ac_package='$ac_optarg'" ;;
420 -without-* | --without-*)
421 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
422 # Reject names that are not valid shell variable names.
423 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
424 { echo "$as_me: error: invalid package name: $ac_package" >&2
425 { (exit 1); exit 1; }; }
426 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
427 eval "with_$ac_package=no" ;;
430 # Obsolete; use --with-x.
433 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
434 | --x-incl | --x-inc | --x-in | --x-i)
435 ac_prev=x_includes ;;
436 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
437 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
438 x_includes=$ac_optarg ;;
440 -x-libraries | --x-libraries | --x-librarie | --x-librari \
441 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
442 ac_prev=x_libraries ;;
443 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
444 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
445 x_libraries=$ac_optarg ;;
447 -*) { echo "$as_me: error: unrecognized option: $ac_option
448 Try \`$0 --help' for more information." >&2
449 { (exit 1); exit 1; }; }
453 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
454 # Reject names that are not valid shell variable names.
455 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
456 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
457 { (exit 1); exit 1; }; }
458 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
459 eval "$ac_envvar='$ac_optarg'"
460 export "$ac_envvar" ;;
463 # FIXME: should be removed in autoconf 3.0.
464 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
465 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
466 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
467 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
473 if test -n "$ac_prev"; then
474 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
475 { echo "$as_me: error: missing argument to $ac_option" >&2
476 { (exit 1); exit 1; }; }
479 # Be sure to have absolute paths.
480 for ac_var in exec_prefix prefix
482 eval ac_val=$`echo "$ac_var"`
484 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
485 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
486 { (exit 1); exit 1; }; };;
490 # Be sure to have absolute paths.
491 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
492 localstatedir libdir includedir oldincludedir infodir mandir
494 eval ac_val=$`echo "$ac_var"`
496 [\\/$]* | ?:[\\/]* ) ;;
497 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
498 { (exit 1); exit 1; }; };;
502 # There might be people who depend on the old broken behavior: `$host'
503 # used to hold the argument of --host etc.
508 # FIXME: should be removed in autoconf 3.0.
509 if test "x$host_alias" != x; then
510 if test "x$build_alias" = x; then
511 cross_compiling=maybe
512 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
513 If a cross compiler is detected then cross compile mode will be used." >&2
514 elif test "x$build_alias" != "x$host_alias"; then
520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
522 test "$silent" = yes && exec 6>/dev/null
524 # Find the source files, if location was not specified.
525 if test -z "$srcdir"; then
526 ac_srcdir_defaulted=yes
527 # Try the directory containing this script, then its parent.
529 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
530 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
532 if test ! -r "$srcdir/$ac_unique_file"; then
536 ac_srcdir_defaulted=no
538 if test ! -r "$srcdir/$ac_unique_file"; then
539 if test "$ac_srcdir_defaulted" = yes; then
540 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
541 { (exit 1); exit 1; }; }
543 { echo "$as_me: error: cannot find sources in $srcdir" >&2
544 { (exit 1); exit 1; }; }
547 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
548 ac_env_build_alias_set=${build_alias+set}
549 ac_env_build_alias_value=$build_alias
550 ac_cv_env_build_alias_set=${build_alias+set}
551 ac_cv_env_build_alias_value=$build_alias
552 ac_env_host_alias_set=${host_alias+set}
553 ac_env_host_alias_value=$host_alias
554 ac_cv_env_host_alias_set=${host_alias+set}
555 ac_cv_env_host_alias_value=$host_alias
556 ac_env_target_alias_set=${target_alias+set}
557 ac_env_target_alias_value=$target_alias
558 ac_cv_env_target_alias_set=${target_alias+set}
559 ac_cv_env_target_alias_value=$target_alias
560 ac_env_CC_set=${CC+set}
562 ac_cv_env_CC_set=${CC+set}
563 ac_cv_env_CC_value=$CC
564 ac_env_CFLAGS_set=${CFLAGS+set}
565 ac_env_CFLAGS_value=$CFLAGS
566 ac_cv_env_CFLAGS_set=${CFLAGS+set}
567 ac_cv_env_CFLAGS_value=$CFLAGS
568 ac_env_LDFLAGS_set=${LDFLAGS+set}
569 ac_env_LDFLAGS_value=$LDFLAGS
570 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
571 ac_cv_env_LDFLAGS_value=$LDFLAGS
572 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
573 ac_env_CPPFLAGS_value=$CPPFLAGS
574 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
575 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
576 ac_env_CPP_set=${CPP+set}
577 ac_env_CPP_value=$CPP
578 ac_cv_env_CPP_set=${CPP+set}
579 ac_cv_env_CPP_value=$CPP
582 # Report the --help message.
584 if test "$ac_init_help" = "long"; then
585 # Omit some internal or obsolete options to make the list less imposing.
586 # This message is too long to be a string in the A/UX 3.1 sh.
588 \`configure' configures this package to adapt to many kinds of systems.
590 Usage: $0 [OPTION]... [VAR=VALUE]...
592 To assign environment variables (e.g., CC, CFLAGS...), specify them as
593 VAR=VALUE. See below for descriptions of some of the useful variables.
595 Defaults for the options are specified in brackets.
598 -h, --help display this help and exit
599 --help=short display options specific to this package
600 --help=recursive display the short help of all the included packages
601 -V, --version display version information and exit
602 -q, --quiet, --silent do not print \`checking...' messages
603 --cache-file=FILE cache test results in FILE [disabled]
604 -C, --config-cache alias for \`--cache-file=config.cache'
605 -n, --no-create do not create output files
606 --srcdir=DIR find the sources in DIR [configure dir or \`..']
611 Installation directories:
612 --prefix=PREFIX install architecture-independent files in PREFIX
614 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
617 By default, \`make install' will install all the files in
618 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
619 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
620 for instance \`--prefix=\$HOME'.
622 For better control, use the options below.
624 Fine tuning of the installation directories:
625 --bindir=DIR user executables [EPREFIX/bin]
626 --sbindir=DIR system admin executables [EPREFIX/sbin]
627 --libexecdir=DIR program executables [EPREFIX/libexec]
628 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
629 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
630 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
631 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
632 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
633 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
634 --libdir=DIR object code libraries [EPREFIX/lib]
635 --includedir=DIR C header files [PREFIX/include]
636 --oldincludedir=DIR C header files for non-gcc [/usr/include]
637 --infodir=DIR info documentation [DATAROOTDIR/info]
638 --mandir=DIR man documentation [DATAROOTDIR/man]
644 --program-prefix=PREFIX prepend PREFIX to installed program names
645 --program-suffix=SUFFIX append SUFFIX to installed program names
646 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
649 --x-includes=DIR X include files are in DIR
650 --x-libraries=DIR X library files are in DIR
653 --build=BUILD configure for building on BUILD [guessed]
654 --host=HOST build programs to run on HOST [BUILD]
658 if test -n "$ac_init_help"; then
663 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
664 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
667 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
668 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
671 --disable-stripping do not strip (debug info) installed executables
672 --enable-string-hacks work around bogus compiler/loader warnings
673 --with-pkg-config{=path} enable/disable use of pkg-config
674 --disable-echo do not display "compiling" commands
675 Curses Version-dependent Options:
676 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
677 --disable-widec disable checks for wide-character functions
678 --with-curses-dir=DIR directory in which (n)curses is installed
679 --with-screen=XXX use specified curses-libraries
680 --with-ncursesw use wide ncurses-libraries
681 --with-ncurses use ncurses-libraries
682 --with-pdcurses compile/link with pdcurses X11 library
683 --with-curses-colr compile/link with HPUX 10.x color-curses
684 --with-curses-5lib compile/link with SunOS 5lib curses
685 --with-Xaw3d link with Xaw 3d library
686 --with-Xaw3dxft link with Xaw 3d xft library
687 --with-neXtaw link with neXT Athena library
688 --with-XawPlus link with Athena-Plus library
689 --with-x use the X Window System
690 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
691 --with-form-libname=XXX override form basename of library
692 --with-menu-libname=XXX override menu basename of library
693 --with-panel-libname=XXX override panel basename of library
694 --disable-panel disable checks for panel functions
695 --disable-menu disable checks for menu functions
696 --disable-form disable checks for form functions
697 Testing/development Options:
698 --enable-warnings test: turn on gcc compiler warnings
699 --with-dmalloc test: use Gray Watson's dmalloc library
700 --with-dbmalloc test: use Conor Cahill's dbmalloc library
701 --with-valgrind test: use valgrind
702 --disable-leaks test: free permanent memory, analyze leaks
703 --disable-rpath-hack don't add rpath options for additional libraries
705 Some influential environment variables:
706 CC C compiler command
707 CFLAGS C compiler flags
708 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
709 nonstandard directory <lib dir>
710 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
711 headers in a nonstandard directory <include dir>
714 Use these variables to override the choices made by `configure' or to help
715 it to find libraries and programs with nonstandard names/locations.
720 if test "$ac_init_help" = "recursive"; then
721 # If there are subdirs, report their specific --help.
723 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
725 # A "../" for each directory in /$ac_subdir.
726 ac_dots=`echo "$ac_subdir" |
727 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
730 .) # No --srcdir option. We are building in place.
731 ac_sub_srcdir="$srcdir" ;;
732 [\\/]* | ?:[\\/]* ) # Absolute path.
733 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
735 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
738 # Check for guested configure; otherwise get Cygnus style configure.
739 if test -f "$ac_sub_srcdir/configure.gnu"; then
741 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
742 elif test -f "$ac_sub_srcdir/configure"; then
744 $SHELL "$ac_sub_srcdir/configure" --help=recursive
745 elif test -f "$ac_sub_srcdir/configure.ac" ||
746 test -f "$ac_sub_srcdir/configure.in"; then
748 "$ac_configure" --help
750 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
756 test -n "$ac_init_help" && exit 0
757 if "$ac_init_version"; then
760 Copyright 2003-2020,2021 Thomas E. Dickey
761 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
762 Free Software Foundation, Inc.
763 This configure script is free software; the Free Software Foundation
764 gives unlimited permission to copy, distribute and modify it.
770 This file contains any messages produced by compilers while
771 running configure, to aid debugging if configure makes a mistake.
773 It was created by $as_me, which was
774 generated by GNU Autoconf 2.52.20210105. Invocation command line was
785 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
786 uname -m = `(uname -m) 2>/dev/null || echo unknown`
787 uname -r = `(uname -r) 2>/dev/null || echo unknown`
788 uname -s = `(uname -s) 2>/dev/null || echo unknown`
789 uname -v = `(uname -v) 2>/dev/null || echo unknown`
791 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
792 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
794 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
795 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
796 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
797 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
798 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
799 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
800 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
814 # Keep a trace of the command line.
815 # Strip out --no-create and --no-recursion so they do not pile up.
816 # Also quote any args containing shell meta-characters.
822 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
823 | --no-cr | --no-c) ;;
824 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
825 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
826 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
827 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
828 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
830 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
833 # Get rid of the leading space.
836 # When interrupted or exit'd, cleanup temporary files, and complete
837 # config.log. We remove comments because anyway the quotes in there
838 # would cause problems or look ugly.
840 # Save into config.log some information that might help in debugging.
842 echo "## ----------------- ##" >&5
843 echo "## Cache variables. ##" >&5
844 echo "## ----------------- ##" >&5
846 # The following way of writing the cache mishandles newlines in values,
849 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
852 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
853 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
857 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
861 sed "/^$/d" confdefs.h >conftest.log
862 if test -s conftest.log; then
864 echo "## ------------ ##" >&5
865 echo "## confdefs.h. ##" >&5
866 echo "## ------------ ##" >&5
871 test "$ac_signal" != 0 &&
872 echo "$as_me: caught signal $ac_signal" >&5
873 echo "$as_me: exit $exit_status" >&5
874 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
877 for ac_signal in 1 2 13 15; do
878 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
882 # confdefs.h avoids OS command line length limits that DEFS can exceed.
883 rm -rf conftest* confdefs.h
884 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
887 # Let the site file select an alternate cache file if it wants to.
888 # Prefer explicitly selected file to automatically selected ones.
889 if test -z "$CONFIG_SITE"; then
890 if test "x$prefix" != xNONE; then
891 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
893 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
896 for ac_site_file in $CONFIG_SITE; do
897 if test -r "$ac_site_file"; then
898 { echo "$as_me:898: loading site script $ac_site_file" >&5
899 echo "$as_me: loading site script $ac_site_file" >&6;}
900 cat "$ac_site_file" >&5
905 if test -r "$cache_file"; then
906 # Some versions of bash will fail to source /dev/null (special
907 # files actually), so we avoid doing that.
908 if test -f "$cache_file"; then
909 { echo "$as_me:909: loading cache $cache_file" >&5
910 echo "$as_me: loading cache $cache_file" >&6;}
912 [\\/]* | ?:[\\/]* ) . $cache_file;;
917 { echo "$as_me:917: creating cache $cache_file" >&5
918 echo "$as_me: creating cache $cache_file" >&6;}
922 # Check that the precious variables saved in the cache have kept the same
924 ac_cache_corrupted=false
925 for ac_var in `(set) 2>&1 |
926 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
927 eval ac_old_set=\$ac_cv_env_${ac_var}_set
928 eval ac_new_set=\$ac_env_${ac_var}_set
929 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
930 eval ac_new_val="\$ac_env_${ac_var}_value"
931 case "$ac_old_set,$ac_new_set" in
933 { echo "$as_me:933: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
934 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
935 ac_cache_corrupted=: ;;
937 { echo "$as_me:937: error: \`$ac_var' was not set in the previous run" >&5
938 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
939 ac_cache_corrupted=: ;;
942 if test "x$ac_old_val" != "x$ac_new_val"; then
943 { echo "$as_me:943: error: \`$ac_var' has changed since the previous run:" >&5
944 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
945 { echo "$as_me:945: former value: $ac_old_val" >&5
946 echo "$as_me: former value: $ac_old_val" >&2;}
947 { echo "$as_me:947: current value: $ac_new_val" >&5
948 echo "$as_me: current value: $ac_new_val" >&2;}
952 # Pass precious variables to config.status. It doesn't matter if
953 # we pass some twice (in addition to the command line arguments).
954 if test "$ac_new_set" = set; then
955 case "$ac_new_val" in
956 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
958 ac_configure_args="$ac_configure_args '$ac_arg'"
960 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
965 if "$ac_cache_corrupted"; then
966 { echo "$as_me:966: error: changes in the environment can compromise the build" >&5
967 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
968 { { echo "$as_me:968: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
969 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
970 { (exit 1); exit 1; }; }
974 ac_cpp='$CPP $CPPFLAGS'
975 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
976 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
978 ac_main_return="return"
980 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
982 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
994 echo "#! $SHELL" >conftest.sh
995 echo "exit 0" >>conftest.sh
997 if { (echo "$as_me:997: PATH=\".;.\"; conftest.sh") >&5
998 (PATH=".;."; conftest.sh) 2>&5
1000 echo "$as_me:1000: \$? = $ac_status" >&5
1001 (exit "$ac_status"); }; then
1002 ac_path_separator=';'
1006 PATH_SEPARATOR="$ac_path_separator"
1009 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1011 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1013 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1016 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1017 if test -f "$ac_dir/install-sh"; then
1019 ac_install_sh="$ac_aux_dir/install-sh -c"
1021 elif test -f "$ac_dir/install.sh"; then
1023 ac_install_sh="$ac_aux_dir/install.sh -c"
1025 elif test -f "$ac_dir/shtool"; then
1027 ac_install_sh="$ac_aux_dir/shtool install -c"
1031 if test -z "$ac_aux_dir"; then
1032 { { echo "$as_me:1032: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1033 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1034 { (exit 1); exit 1; }; }
1036 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1037 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1038 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1040 # Make sure we can run config.sub.
1041 $ac_config_sub sun4 >/dev/null 2>&1 ||
1042 { { echo "$as_me:1042: error: cannot run $ac_config_sub" >&5
1043 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1044 { (exit 1); exit 1; }; }
1046 echo "$as_me:1046: checking build system type" >&5
1047 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1048 if test "${ac_cv_build+set}" = set; then
1049 echo $ECHO_N "(cached) $ECHO_C" >&6
1051 ac_cv_build_alias=$build_alias
1052 test -z "$ac_cv_build_alias" &&
1053 ac_cv_build_alias=`$ac_config_guess`
1054 test -z "$ac_cv_build_alias" &&
1055 { { echo "$as_me:1055: error: cannot guess build type; you must specify one" >&5
1056 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1057 { (exit 1); exit 1; }; }
1058 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1059 { { echo "$as_me:1059: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1060 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1061 { (exit 1); exit 1; }; }
1064 echo "$as_me:1064: result: $ac_cv_build" >&5
1065 echo "${ECHO_T}$ac_cv_build" >&6
1067 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1068 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1069 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1071 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1072 echo "$as_me:1072: checking host system type" >&5
1073 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1074 if test "${ac_cv_host+set}" = set; then
1075 echo $ECHO_N "(cached) $ECHO_C" >&6
1077 ac_cv_host_alias=$host_alias
1078 test -z "$ac_cv_host_alias" &&
1079 ac_cv_host_alias=$ac_cv_build_alias
1080 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1081 { { echo "$as_me:1081: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1082 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1083 { (exit 1); exit 1; }; }
1086 echo "$as_me:1086: result: $ac_cv_host" >&5
1087 echo "${ECHO_T}$ac_cv_host" >&6
1089 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1090 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1091 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1093 system_name="$host_os"
1095 system_name="`(uname -s -r) 2>/dev/null`"
1096 if test -z "$system_name" ; then
1097 system_name="`(hostname) 2>/dev/null`"
1100 test -n "$system_name" &&
1101 cat >>confdefs.h <<EOF
1102 #define SYSTEM_NAME "$system_name"
1105 if test "${cf_cv_system_name+set}" = set; then
1106 echo $ECHO_N "(cached) $ECHO_C" >&6
1108 cf_cv_system_name="$system_name"
1111 test -z "$system_name" && system_name="$cf_cv_system_name"
1112 test -n "$cf_cv_system_name" && echo "$as_me:1112: result: Configuring for $cf_cv_system_name" >&5
1113 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1115 if test ".$system_name" != ".$cf_cv_system_name" ; then
1116 echo "$as_me:1116: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1117 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1118 { { echo "$as_me:1118: error: \"Please remove config.cache and try again.\"" >&5
1119 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1120 { (exit 1); exit 1; }; }
1123 test "$program_prefix" != NONE &&
1124 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1125 # Use a double $ so make ignores it.
1126 test "$program_suffix" != NONE &&
1127 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1128 # Double any \ or $. echo might interpret backslashes.
1129 # By default was `s,x,x', remove it if useless.
1130 cat <<\_ACEOF >conftest.sed
1131 s/[\\$]/&&/g;s/;s,x,x,$//
1133 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1136 echo "$as_me:1136: checking whether ${MAKE-make} sets \${MAKE}" >&5
1137 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1138 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1139 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1140 echo $ECHO_N "(cached) $ECHO_C" >&6
1142 cat >conftest.make <<\EOF
1144 @echo 'ac_maketemp="${MAKE}"'
1146 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1147 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1148 if test -n "$ac_maketemp"; then
1149 eval ac_cv_prog_make_${ac_make}_set=yes
1151 eval ac_cv_prog_make_${ac_make}_set=no
1155 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1156 echo "$as_me:1156: result: yes" >&5
1157 echo "${ECHO_T}yes" >&6
1160 echo "$as_me:1160: result: no" >&5
1161 echo "${ECHO_T}no" >&6
1162 SET_MAKE="MAKE=${MAKE-make}"
1166 ac_cpp='$CPP $CPPFLAGS'
1167 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1168 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1169 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1170 ac_main_return="return"
1171 if test -n "$ac_tool_prefix"; then
1172 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1173 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1174 echo "$as_me:1174: checking for $ac_word" >&5
1175 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1176 if test "${ac_cv_prog_CC+set}" = set; then
1177 echo $ECHO_N "(cached) $ECHO_C" >&6
1179 if test -n "$CC"; then
1180 ac_cv_prog_CC="$CC" # Let the user override the test.
1182 ac_save_IFS=$IFS; IFS=$ac_path_separator
1184 for ac_dir in $ac_dummy; do
1186 test -z "$ac_dir" && ac_dir=.
1187 $as_executable_p "$ac_dir/$ac_word" || continue
1188 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1189 echo "$as_me:1189: found $ac_dir/$ac_word" >&5
1196 if test -n "$CC"; then
1197 echo "$as_me:1197: result: $CC" >&5
1198 echo "${ECHO_T}$CC" >&6
1200 echo "$as_me:1200: result: no" >&5
1201 echo "${ECHO_T}no" >&6
1205 if test -z "$ac_cv_prog_CC"; then
1207 # Extract the first word of "gcc", so it can be a program name with args.
1208 set dummy gcc; ac_word=$2
1209 echo "$as_me:1209: checking for $ac_word" >&5
1210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1211 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1212 echo $ECHO_N "(cached) $ECHO_C" >&6
1214 if test -n "$ac_ct_CC"; then
1215 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1217 ac_save_IFS=$IFS; IFS=$ac_path_separator
1219 for ac_dir in $ac_dummy; do
1221 test -z "$ac_dir" && ac_dir=.
1222 $as_executable_p "$ac_dir/$ac_word" || continue
1223 ac_cv_prog_ac_ct_CC="gcc"
1224 echo "$as_me:1224: found $ac_dir/$ac_word" >&5
1230 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1231 if test -n "$ac_ct_CC"; then
1232 echo "$as_me:1232: result: $ac_ct_CC" >&5
1233 echo "${ECHO_T}$ac_ct_CC" >&6
1235 echo "$as_me:1235: result: no" >&5
1236 echo "${ECHO_T}no" >&6
1244 if test -z "$CC"; then
1245 if test -n "$ac_tool_prefix"; then
1246 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1247 set dummy ${ac_tool_prefix}cc; ac_word=$2
1248 echo "$as_me:1248: checking for $ac_word" >&5
1249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1250 if test "${ac_cv_prog_CC+set}" = set; then
1251 echo $ECHO_N "(cached) $ECHO_C" >&6
1253 if test -n "$CC"; then
1254 ac_cv_prog_CC="$CC" # Let the user override the test.
1256 ac_save_IFS=$IFS; IFS=$ac_path_separator
1258 for ac_dir in $ac_dummy; do
1260 test -z "$ac_dir" && ac_dir=.
1261 $as_executable_p "$ac_dir/$ac_word" || continue
1262 ac_cv_prog_CC="${ac_tool_prefix}cc"
1263 echo "$as_me:1263: found $ac_dir/$ac_word" >&5
1270 if test -n "$CC"; then
1271 echo "$as_me:1271: result: $CC" >&5
1272 echo "${ECHO_T}$CC" >&6
1274 echo "$as_me:1274: result: no" >&5
1275 echo "${ECHO_T}no" >&6
1279 if test -z "$ac_cv_prog_CC"; then
1281 # Extract the first word of "cc", so it can be a program name with args.
1282 set dummy cc; ac_word=$2
1283 echo "$as_me:1283: checking for $ac_word" >&5
1284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1285 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1286 echo $ECHO_N "(cached) $ECHO_C" >&6
1288 if test -n "$ac_ct_CC"; then
1289 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1291 ac_save_IFS=$IFS; IFS=$ac_path_separator
1293 for ac_dir in $ac_dummy; do
1295 test -z "$ac_dir" && ac_dir=.
1296 $as_executable_p "$ac_dir/$ac_word" || continue
1297 ac_cv_prog_ac_ct_CC="cc"
1298 echo "$as_me:1298: found $ac_dir/$ac_word" >&5
1304 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1305 if test -n "$ac_ct_CC"; then
1306 echo "$as_me:1306: result: $ac_ct_CC" >&5
1307 echo "${ECHO_T}$ac_ct_CC" >&6
1309 echo "$as_me:1309: result: no" >&5
1310 echo "${ECHO_T}no" >&6
1319 if test -z "$CC"; then
1320 # Extract the first word of "cc", so it can be a program name with args.
1321 set dummy cc; ac_word=$2
1322 echo "$as_me:1322: checking for $ac_word" >&5
1323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1324 if test "${ac_cv_prog_CC+set}" = set; then
1325 echo $ECHO_N "(cached) $ECHO_C" >&6
1327 if test -n "$CC"; then
1328 ac_cv_prog_CC="$CC" # Let the user override the test.
1331 ac_save_IFS=$IFS; IFS=$ac_path_separator
1333 for ac_dir in $ac_dummy; do
1335 test -z "$ac_dir" && ac_dir=.
1336 $as_executable_p "$ac_dir/$ac_word" || continue
1337 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1338 ac_prog_rejected=yes
1342 echo "$as_me:1342: found $ac_dir/$ac_word" >&5
1346 if test "$ac_prog_rejected" = yes; then
1347 # We found a bogon in the path, so make sure we never use it.
1348 set dummy $ac_cv_prog_CC
1350 if test $# != 0; then
1351 # We chose a different compiler from the bogus one.
1352 # However, it has the same basename, so the bogon will be chosen
1353 # first if we set CC to just the basename; use the full file name.
1355 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1363 if test -n "$CC"; then
1364 echo "$as_me:1364: result: $CC" >&5
1365 echo "${ECHO_T}$CC" >&6
1367 echo "$as_me:1367: result: no" >&5
1368 echo "${ECHO_T}no" >&6
1372 if test -z "$CC"; then
1373 if test -n "$ac_tool_prefix"; then
1376 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1377 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1378 echo "$as_me:1378: checking for $ac_word" >&5
1379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1380 if test "${ac_cv_prog_CC+set}" = set; then
1381 echo $ECHO_N "(cached) $ECHO_C" >&6
1383 if test -n "$CC"; then
1384 ac_cv_prog_CC="$CC" # Let the user override the test.
1386 ac_save_IFS=$IFS; IFS=$ac_path_separator
1388 for ac_dir in $ac_dummy; do
1390 test -z "$ac_dir" && ac_dir=.
1391 $as_executable_p "$ac_dir/$ac_word" || continue
1392 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1393 echo "$as_me:1393: found $ac_dir/$ac_word" >&5
1400 if test -n "$CC"; then
1401 echo "$as_me:1401: result: $CC" >&5
1402 echo "${ECHO_T}$CC" >&6
1404 echo "$as_me:1404: result: no" >&5
1405 echo "${ECHO_T}no" >&6
1408 test -n "$CC" && break
1411 if test -z "$CC"; then
1415 # Extract the first word of "$ac_prog", so it can be a program name with args.
1416 set dummy $ac_prog; ac_word=$2
1417 echo "$as_me:1417: checking for $ac_word" >&5
1418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1419 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1420 echo $ECHO_N "(cached) $ECHO_C" >&6
1422 if test -n "$ac_ct_CC"; then
1423 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1425 ac_save_IFS=$IFS; IFS=$ac_path_separator
1427 for ac_dir in $ac_dummy; do
1429 test -z "$ac_dir" && ac_dir=.
1430 $as_executable_p "$ac_dir/$ac_word" || continue
1431 ac_cv_prog_ac_ct_CC="$ac_prog"
1432 echo "$as_me:1432: found $ac_dir/$ac_word" >&5
1438 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1439 if test -n "$ac_ct_CC"; then
1440 echo "$as_me:1440: result: $ac_ct_CC" >&5
1441 echo "${ECHO_T}$ac_ct_CC" >&6
1443 echo "$as_me:1443: result: no" >&5
1444 echo "${ECHO_T}no" >&6
1447 test -n "$ac_ct_CC" && break
1455 test -z "$CC" && { { echo "$as_me:1455: error: no acceptable cc found in \$PATH" >&5
1456 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1457 { (exit 1); exit 1; }; }
1459 # Provide some information about the compiler.
1460 echo "$as_me:1460:" \
1461 "checking for C compiler version" >&5
1462 ac_compiler=`set X $ac_compile; echo "$2"`
1463 { (eval echo "$as_me:1463: \"$ac_compiler --version </dev/null >&5\"") >&5
1464 (eval $ac_compiler --version </dev/null >&5) 2>&5
1466 echo "$as_me:1466: \$? = $ac_status" >&5
1467 (exit "$ac_status"); }
1468 { (eval echo "$as_me:1468: \"$ac_compiler -v </dev/null >&5\"") >&5
1469 (eval $ac_compiler -v </dev/null >&5) 2>&5
1471 echo "$as_me:1471: \$? = $ac_status" >&5
1472 (exit "$ac_status"); }
1473 { (eval echo "$as_me:1473: \"$ac_compiler -V </dev/null >&5\"") >&5
1474 (eval $ac_compiler -V </dev/null >&5) 2>&5
1476 echo "$as_me:1476: \$? = $ac_status" >&5
1477 (exit "$ac_status"); }
1479 cat >"conftest.$ac_ext" <<_ACEOF
1480 #line 1480 "configure"
1481 #include "confdefs.h"
1491 ac_clean_files_save=$ac_clean_files
1492 ac_clean_files="$ac_clean_files a.out a.exe"
1493 # Try to create an executable without -o first, disregard a.out.
1494 # It will help us diagnose broken compilers, and finding out an intuition
1496 echo "$as_me:1496: checking for C compiler default output" >&5
1497 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1498 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1499 if { (eval echo "$as_me:1499: \"$ac_link_default\"") >&5
1500 (eval $ac_link_default) 2>&5
1502 echo "$as_me:1502: \$? = $ac_status" >&5
1503 (exit "$ac_status"); }; then
1504 # Find the output, starting from the most likely. This scheme is
1505 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1507 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1508 ls a.out conftest 2>/dev/null;
1509 ls a.* conftest.* 2>/dev/null`; do
1511 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1512 a.out ) # We found the default executable, but exeext='' is most
1515 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1516 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1523 echo "$as_me: failed program was:" >&5
1524 cat "conftest.$ac_ext" >&5
1525 { { echo "$as_me:1525: error: C compiler cannot create executables" >&5
1526 echo "$as_me: error: C compiler cannot create executables" >&2;}
1527 { (exit 77); exit 77; }; }
1530 ac_exeext=$ac_cv_exeext
1531 echo "$as_me:1531: result: $ac_file" >&5
1532 echo "${ECHO_T}$ac_file" >&6
1534 # Check the compiler produces executables we can run. If not, either
1535 # the compiler is broken, or we cross compile.
1536 echo "$as_me:1536: checking whether the C compiler works" >&5
1537 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1538 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1539 # If not cross compiling, check that we can run a simple program.
1540 if test "$cross_compiling" != yes; then
1541 if { ac_try='./$ac_file'
1542 { (eval echo "$as_me:1542: \"$ac_try\"") >&5
1545 echo "$as_me:1545: \$? = $ac_status" >&5
1546 (exit "$ac_status"); }; }; then
1549 if test "$cross_compiling" = maybe; then
1552 { { echo "$as_me:1552: error: cannot run C compiled programs.
1553 If you meant to cross compile, use \`--host'." >&5
1554 echo "$as_me: error: cannot run C compiled programs.
1555 If you meant to cross compile, use \`--host'." >&2;}
1556 { (exit 1); exit 1; }; }
1560 echo "$as_me:1560: result: yes" >&5
1561 echo "${ECHO_T}yes" >&6
1563 rm -f a.out a.exe "conftest$ac_cv_exeext"
1564 ac_clean_files=$ac_clean_files_save
1565 # Check the compiler produces executables we can run. If not, either
1566 # the compiler is broken, or we cross compile.
1567 echo "$as_me:1567: checking whether we are cross compiling" >&5
1568 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1569 echo "$as_me:1569: result: $cross_compiling" >&5
1570 echo "${ECHO_T}$cross_compiling" >&6
1572 echo "$as_me:1572: checking for executable suffix" >&5
1573 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1574 if { (eval echo "$as_me:1574: \"$ac_link\"") >&5
1575 (eval $ac_link) 2>&5
1577 echo "$as_me:1577: \$? = $ac_status" >&5
1578 (exit "$ac_status"); }; then
1579 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1580 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1581 # work properly (i.e., refer to `conftest.exe'), while it won't with
1583 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1585 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1586 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1593 { { echo "$as_me:1593: error: cannot compute EXEEXT: cannot compile and link" >&5
1594 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1595 { (exit 1); exit 1; }; }
1598 rm -f "conftest$ac_cv_exeext"
1599 echo "$as_me:1599: result: $ac_cv_exeext" >&5
1600 echo "${ECHO_T}$ac_cv_exeext" >&6
1602 rm -f "conftest.$ac_ext"
1603 EXEEXT=$ac_cv_exeext
1605 echo "$as_me:1605: checking for object suffix" >&5
1606 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1607 if test "${ac_cv_objext+set}" = set; then
1608 echo $ECHO_N "(cached) $ECHO_C" >&6
1610 cat >"conftest.$ac_ext" <<_ACEOF
1611 #line 1611 "configure"
1612 #include "confdefs.h"
1622 rm -f conftest.o conftest.obj
1623 if { (eval echo "$as_me:1623: \"$ac_compile\"") >&5
1624 (eval $ac_compile) 2>&5
1626 echo "$as_me:1626: \$? = $ac_status" >&5
1627 (exit "$ac_status"); }; then
1628 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1630 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1631 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1636 echo "$as_me: failed program was:" >&5
1637 cat "conftest.$ac_ext" >&5
1638 { { echo "$as_me:1638: error: cannot compute OBJEXT: cannot compile" >&5
1639 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1640 { (exit 1); exit 1; }; }
1643 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1645 echo "$as_me:1645: result: $ac_cv_objext" >&5
1646 echo "${ECHO_T}$ac_cv_objext" >&6
1647 OBJEXT=$ac_cv_objext
1649 echo "$as_me:1649: checking whether we are using the GNU C compiler" >&5
1650 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1651 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1652 echo $ECHO_N "(cached) $ECHO_C" >&6
1654 cat >"conftest.$ac_ext" <<_ACEOF
1655 #line 1655 "configure"
1656 #include "confdefs.h"
1669 rm -f "conftest.$ac_objext"
1670 if { (eval echo "$as_me:1670: \"$ac_compile\"") >&5
1671 (eval $ac_compile) 2>&5
1673 echo "$as_me:1673: \$? = $ac_status" >&5
1674 (exit "$ac_status"); } &&
1675 { ac_try='test -s "conftest.$ac_objext"'
1676 { (eval echo "$as_me:1676: \"$ac_try\"") >&5
1679 echo "$as_me:1679: \$? = $ac_status" >&5
1680 (exit "$ac_status"); }; }; then
1683 echo "$as_me: failed program was:" >&5
1684 cat "conftest.$ac_ext" >&5
1687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1688 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1691 echo "$as_me:1691: result: $ac_cv_c_compiler_gnu" >&5
1692 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1693 GCC=`test $ac_compiler_gnu = yes && echo yes`
1694 ac_test_CFLAGS=${CFLAGS+set}
1695 ac_save_CFLAGS=$CFLAGS
1697 echo "$as_me:1697: checking whether $CC accepts -g" >&5
1698 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1699 if test "${ac_cv_prog_cc_g+set}" = set; then
1700 echo $ECHO_N "(cached) $ECHO_C" >&6
1702 cat >"conftest.$ac_ext" <<_ACEOF
1703 #line 1703 "configure"
1704 #include "confdefs.h"
1714 rm -f "conftest.$ac_objext"
1715 if { (eval echo "$as_me:1715: \"$ac_compile\"") >&5
1716 (eval $ac_compile) 2>&5
1718 echo "$as_me:1718: \$? = $ac_status" >&5
1719 (exit "$ac_status"); } &&
1720 { ac_try='test -s "conftest.$ac_objext"'
1721 { (eval echo "$as_me:1721: \"$ac_try\"") >&5
1724 echo "$as_me:1724: \$? = $ac_status" >&5
1725 (exit "$ac_status"); }; }; then
1728 echo "$as_me: failed program was:" >&5
1729 cat "conftest.$ac_ext" >&5
1732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1734 echo "$as_me:1734: result: $ac_cv_prog_cc_g" >&5
1735 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1736 if test "$ac_test_CFLAGS" = set; then
1737 CFLAGS=$ac_save_CFLAGS
1738 elif test $ac_cv_prog_cc_g = yes; then
1739 if test "$GCC" = yes; then
1745 if test "$GCC" = yes; then
1751 # Some people use a C++ compiler to compile C. Since we use `exit',
1752 # in C++ we need to declare it. In case someone uses the same compiler
1753 # for both compiling C and C++ we need to have the C++ compiler decide
1754 # the declaration of exit, since it's the most demanding environment.
1755 cat >"conftest.$ac_ext" <<_ACEOF
1760 rm -f "conftest.$ac_objext"
1761 if { (eval echo "$as_me:1761: \"$ac_compile\"") >&5
1762 (eval $ac_compile) 2>&5
1764 echo "$as_me:1764: \$? = $ac_status" >&5
1765 (exit "$ac_status"); } &&
1766 { ac_try='test -s "conftest.$ac_objext"'
1767 { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1770 echo "$as_me:1770: \$? = $ac_status" >&5
1771 (exit "$ac_status"); }; }; then
1772 for ac_declaration in \
1774 '#include <stdlib.h>' \
1775 'extern "C" void std::exit (int) throw (); using std::exit;' \
1776 'extern "C" void std::exit (int); using std::exit;' \
1777 'extern "C" void exit (int) throw ();' \
1778 'extern "C" void exit (int);' \
1781 cat >"conftest.$ac_ext" <<_ACEOF
1782 #line 1782 "configure"
1783 #include "confdefs.h"
1794 rm -f "conftest.$ac_objext"
1795 if { (eval echo "$as_me:1795: \"$ac_compile\"") >&5
1796 (eval $ac_compile) 2>&5
1798 echo "$as_me:1798: \$? = $ac_status" >&5
1799 (exit "$ac_status"); } &&
1800 { ac_try='test -s "conftest.$ac_objext"'
1801 { (eval echo "$as_me:1801: \"$ac_try\"") >&5
1804 echo "$as_me:1804: \$? = $ac_status" >&5
1805 (exit "$ac_status"); }; }; then
1808 echo "$as_me: failed program was:" >&5
1809 cat "conftest.$ac_ext" >&5
1812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1813 cat >"conftest.$ac_ext" <<_ACEOF
1814 #line 1814 "configure"
1815 #include "confdefs.h"
1825 rm -f "conftest.$ac_objext"
1826 if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5
1827 (eval $ac_compile) 2>&5
1829 echo "$as_me:1829: \$? = $ac_status" >&5
1830 (exit "$ac_status"); } &&
1831 { ac_try='test -s "conftest.$ac_objext"'
1832 { (eval echo "$as_me:1832: \"$ac_try\"") >&5
1835 echo "$as_me:1835: \$? = $ac_status" >&5
1836 (exit "$ac_status"); }; }; then
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1845 if test -n "$ac_declaration"; then
1846 echo '#ifdef __cplusplus' >>confdefs.h
1847 echo "$ac_declaration" >>confdefs.h
1848 echo '#endif' >>confdefs.h
1852 echo "$as_me: failed program was:" >&5
1853 cat "conftest.$ac_ext" >&5
1855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1857 ac_cpp='$CPP $CPPFLAGS'
1858 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1859 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1860 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1861 ac_main_return="return"
1864 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking version of $CC" >&5
1866 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1867 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.].*//'`"
1868 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1869 echo "$as_me:1869: result: $GCC_VERSION" >&5
1870 echo "${ECHO_T}$GCC_VERSION" >&6
1875 if test "$GCC" = yes ; then
1878 echo "$as_me:1878: checking if this is really Intel C compiler" >&5
1879 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1880 cf_save_CFLAGS="$CFLAGS"
1881 CFLAGS="$CFLAGS -no-gcc"
1882 cat >"conftest.$ac_ext" <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1890 #ifdef __INTEL_COMPILER
1899 rm -f "conftest.$ac_objext"
1900 if { (eval echo "$as_me:1900: \"$ac_compile\"") >&5
1901 (eval $ac_compile) 2>&5
1903 echo "$as_me:1903: \$? = $ac_status" >&5
1904 (exit "$ac_status"); } &&
1905 { ac_try='test -s "conftest.$ac_objext"'
1906 { (eval echo "$as_me:1906: \"$ac_try\"") >&5
1909 echo "$as_me:1909: \$? = $ac_status" >&5
1910 (exit "$ac_status"); }; }; then
1912 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1915 echo "$as_me: failed program was:" >&5
1916 cat "conftest.$ac_ext" >&5
1918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1919 CFLAGS="$cf_save_CFLAGS"
1920 echo "$as_me:1920: result: $INTEL_COMPILER" >&5
1921 echo "${ECHO_T}$INTEL_COMPILER" >&6
1928 if test "$GCC" = yes ; then
1929 echo "$as_me:1929: checking if this is really Clang C compiler" >&5
1930 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1931 cf_save_CFLAGS="$CFLAGS"
1932 cat >"conftest.$ac_ext" <<_ACEOF
1933 #line 1933 "configure"
1934 #include "confdefs.h"
1949 rm -f "conftest.$ac_objext"
1950 if { (eval echo "$as_me:1950: \"$ac_compile\"") >&5
1951 (eval $ac_compile) 2>&5
1953 echo "$as_me:1953: \$? = $ac_status" >&5
1954 (exit "$ac_status"); } &&
1955 { ac_try='test -s "conftest.$ac_objext"'
1956 { (eval echo "$as_me:1956: \"$ac_try\"") >&5
1959 echo "$as_me:1959: \$? = $ac_status" >&5
1960 (exit "$ac_status"); }; }; then
1964 echo "$as_me: failed program was:" >&5
1965 cat "conftest.$ac_ext" >&5
1967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1968 CFLAGS="$cf_save_CFLAGS"
1969 echo "$as_me:1969: result: $CLANG_COMPILER" >&5
1970 echo "${ECHO_T}$CLANG_COMPILER" >&6
1975 if test "x$CLANG_COMPILER" = "xyes" ; then
1977 (c[1-9][0-9]|*/c[1-9][0-9])
1978 { echo "$as_me:1978: WARNING: replacing broken compiler alias $CC" >&5
1979 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1980 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1985 echo "$as_me:1985: checking version of $CC" >&5
1986 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1987 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.].*//'`"
1988 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1989 echo "$as_me:1989: result: $CLANG_VERSION" >&5
1990 echo "${ECHO_T}$CLANG_VERSION" >&6
1992 for cf_clang_opt in \
1993 -Qunused-arguments \
1994 -Wno-error=implicit-function-declaration
1996 echo "$as_me:1996: checking if option $cf_clang_opt works" >&5
1997 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1998 cf_save_CFLAGS="$CFLAGS"
1999 CFLAGS="$CFLAGS $cf_clang_opt"
2000 cat >"conftest.$ac_ext" <<_ACEOF
2001 #line 2001 "configure"
2002 #include "confdefs.h"
2009 printf("hello!\\n");
2014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2015 if { (eval echo "$as_me:2015: \"$ac_link\"") >&5
2016 (eval $ac_link) 2>&5
2018 echo "$as_me:2018: \$? = $ac_status" >&5
2019 (exit "$ac_status"); } &&
2020 { ac_try='test -s "conftest$ac_exeext"'
2021 { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2024 echo "$as_me:2024: \$? = $ac_status" >&5
2025 (exit "$ac_status"); }; }; then
2029 echo "$as_me: failed program was:" >&5
2030 cat "conftest.$ac_ext" >&5
2034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2035 echo "$as_me:2035: result: $cf_clang_optok" >&5
2036 echo "${ECHO_T}$cf_clang_optok" >&6
2037 CFLAGS="$cf_save_CFLAGS"
2038 if test "$cf_clang_optok" = yes; then
2039 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2041 echo "${as_me:-configure}:2041: testing adding option $cf_clang_opt ..." 1>&5
2043 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2044 CFLAGS="${CFLAGS}$cf_clang_opt"
2050 echo "$as_me:2050: checking for $CC option to accept ANSI C" >&5
2051 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2052 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2053 echo $ECHO_N "(cached) $ECHO_C" >&6
2055 ac_cv_prog_cc_stdc=no
2057 cat >"conftest.$ac_ext" <<_ACEOF
2058 #line 2058 "configure"
2059 #include "confdefs.h"
2062 #include <sys/types.h>
2063 #include <sys/stat.h>
2064 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2065 struct buf { int x; };
2066 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2067 static char *e (p, i)
2073 static char *f (char * (*g) (char **, int), char **p, ...)
2078 s = g (p, va_arg (v,int));
2082 int test (int i, double x);
2083 struct s1 {int (*f) (int a);};
2084 struct s2 {int (*f) (double a);};
2085 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2091 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2096 # Don't try gcc -ansi; that turns off useful extensions and
2097 # breaks some systems' header files.
2098 # AIX -qlanglvl=ansi
2099 # Ultrix and OSF/1 -std1
2100 # HP-UX 10.20 and later -Ae
2101 # HP-UX older versions -Aa -D_HPUX_SOURCE
2102 # SVR4 -Xc -D__EXTENSIONS__
2103 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2105 CC="$ac_save_CC $ac_arg"
2106 rm -f "conftest.$ac_objext"
2107 if { (eval echo "$as_me:2107: \"$ac_compile\"") >&5
2108 (eval $ac_compile) 2>&5
2110 echo "$as_me:2110: \$? = $ac_status" >&5
2111 (exit "$ac_status"); } &&
2112 { ac_try='test -s "conftest.$ac_objext"'
2113 { (eval echo "$as_me:2113: \"$ac_try\"") >&5
2116 echo "$as_me:2116: \$? = $ac_status" >&5
2117 (exit "$ac_status"); }; }; then
2118 ac_cv_prog_cc_stdc=$ac_arg
2121 echo "$as_me: failed program was:" >&5
2122 cat "conftest.$ac_ext" >&5
2124 rm -f "conftest.$ac_objext"
2126 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2131 case "x$ac_cv_prog_cc_stdc" in
2133 echo "$as_me:2133: result: none needed" >&5
2134 echo "${ECHO_T}none needed" >&6 ;;
2136 echo "$as_me:2136: result: $ac_cv_prog_cc_stdc" >&5
2137 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2138 CC="$CC $ac_cv_prog_cc_stdc" ;;
2141 # This should have been defined by AC_PROG_CC
2144 echo "$as_me:2144: checking \$CFLAGS variable" >&5
2145 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2148 echo "$as_me:2148: result: broken" >&5
2149 echo "${ECHO_T}broken" >&6
2150 { echo "$as_me:2150: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2151 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2154 for cf_arg in $cf_flags
2160 cf_new_extra_cppflags=
2162 for cf_add_cflags in $cf_arg
2164 case "$cf_fix_cppflags" in
2166 case "$cf_add_cflags" in
2167 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2168 case "$cf_add_cflags" in
2170 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2172 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2173 && test -z "${cf_tst_cflags}" \
2174 && cf_fix_cppflags=yes
2176 if test "$cf_fix_cppflags" = yes ; then
2178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 elif test "${cf_tst_cflags}" = "\"'" ; then
2184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2195 case "$cf_add_cflags" in
2197 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2199 CPPFLAGS=`echo "$CPPFLAGS" | \
2200 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2201 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2206 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2207 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2214 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2215 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2225 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2227 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2228 && test -z "${cf_tst_cflags}" \
2229 && cf_fix_cppflags=no
2234 if test -n "$cf_new_cflags" ; then
2236 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2237 CFLAGS="${CFLAGS}$cf_new_cflags"
2241 if test -n "$cf_new_cppflags" ; then
2243 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2244 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2248 if test -n "$cf_new_extra_cppflags" ; then
2250 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2251 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2258 echo "$as_me:2258: result: ok" >&5
2259 echo "${ECHO_T}ok" >&6
2263 echo "$as_me:2263: checking \$CC variable" >&5
2264 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2267 echo "$as_me:2267: result: broken" >&5
2268 echo "${ECHO_T}broken" >&6
2269 { echo "$as_me:2269: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2270 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2272 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2273 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2275 for cf_arg in $cf_flags
2283 cf_new_extra_cppflags=
2285 for cf_add_cflags in $cf_arg
2287 case "$cf_fix_cppflags" in
2289 case "$cf_add_cflags" in
2290 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2291 case "$cf_add_cflags" in
2293 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2295 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2296 && test -z "${cf_tst_cflags}" \
2297 && cf_fix_cppflags=yes
2299 if test "$cf_fix_cppflags" = yes ; then
2301 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2302 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 elif test "${cf_tst_cflags}" = "\"'" ; then
2307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2318 case "$cf_add_cflags" in
2320 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2322 CPPFLAGS=`echo "$CPPFLAGS" | \
2323 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2324 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2329 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2330 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2337 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2338 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2345 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2346 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2348 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2350 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2351 && test -z "${cf_tst_cflags}" \
2352 && cf_fix_cppflags=no
2357 if test -n "$cf_new_cflags" ; then
2359 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2360 CFLAGS="${CFLAGS}$cf_new_cflags"
2364 if test -n "$cf_new_cppflags" ; then
2366 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2367 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2371 if test -n "$cf_new_extra_cppflags" ; then
2373 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2374 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2384 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2386 echo "${as_me:-configure}:2386: testing resulting CC: '$CC' ..." 1>&5
2388 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2390 echo "${as_me:-configure}:2390: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2392 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2394 echo "${as_me:-configure}:2394: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2398 echo "$as_me:2398: result: ok" >&5
2399 echo "${ECHO_T}ok" >&6
2403 echo "$as_me:2403: checking for inline" >&5
2404 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2405 if test "${ac_cv_c_inline+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 for ac_kw in inline __inline__ __inline; do
2410 cat >"conftest.$ac_ext" <<_ACEOF
2411 #line 2411 "configure"
2412 #include "confdefs.h"
2414 static $ac_kw int static_foo () {return 0; }
2415 $ac_kw int foo () {return 0; }
2419 rm -f "conftest.$ac_objext"
2420 if { (eval echo "$as_me:2420: \"$ac_compile\"") >&5
2421 (eval $ac_compile) 2>&5
2423 echo "$as_me:2423: \$? = $ac_status" >&5
2424 (exit "$ac_status"); } &&
2425 { ac_try='test -s "conftest.$ac_objext"'
2426 { (eval echo "$as_me:2426: \"$ac_try\"") >&5
2429 echo "$as_me:2429: \$? = $ac_status" >&5
2430 (exit "$ac_status"); }; }; then
2431 ac_cv_c_inline=$ac_kw; break
2433 echo "$as_me: failed program was:" >&5
2434 cat "conftest.$ac_ext" >&5
2436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2440 echo "$as_me:2440: result: $ac_cv_c_inline" >&5
2441 echo "${ECHO_T}$ac_cv_c_inline" >&6
2442 case $ac_cv_c_inline in
2445 cat >>confdefs.h <<\EOF
2449 *) cat >>confdefs.h <<EOF
2450 #define inline $ac_cv_c_inline
2455 for ac_prog in ggrep grep
2457 # Extract the first word of "$ac_prog", so it can be a program name with args.
2458 set dummy $ac_prog; ac_word=$2
2459 echo "$as_me:2459: checking for $ac_word" >&5
2460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2461 if test "${ac_cv_prog_GREP+set}" = set; then
2462 echo $ECHO_N "(cached) $ECHO_C" >&6
2464 if test -n "$GREP"; then
2465 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2467 ac_save_IFS=$IFS; IFS=$ac_path_separator
2469 for ac_dir in $ac_dummy; do
2471 test -z "$ac_dir" && ac_dir=.
2472 $as_executable_p "$ac_dir/$ac_word" || continue
2473 ac_cv_prog_GREP="$ac_prog"
2474 echo "$as_me:2474: found $ac_dir/$ac_word" >&5
2480 GREP=$ac_cv_prog_GREP
2481 if test -n "$GREP"; then
2482 echo "$as_me:2482: result: $GREP" >&5
2483 echo "${ECHO_T}$GREP" >&6
2485 echo "$as_me:2485: result: no" >&5
2486 echo "${ECHO_T}no" >&6
2489 test -n "$GREP" && break
2491 test -n "$GREP" || GREP=": "
2493 echo "$as_me:2493: checking for egrep" >&5
2494 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2495 if test "${ac_cv_path_EGREP+set}" = set; then
2496 echo $ECHO_N "(cached) $ECHO_C" >&6
2498 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2499 then ac_cv_path_EGREP="$GREP -E"
2501 for ac_prog in gegrep egrep
2503 # Extract the first word of "$ac_prog", so it can be a program name with args.
2504 set dummy $ac_prog; ac_word=$2
2505 echo "$as_me:2505: checking for $ac_word" >&5
2506 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2507 if test "${ac_cv_path_EGREP+set}" = set; then
2508 echo $ECHO_N "(cached) $ECHO_C" >&6
2512 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2515 ac_save_IFS=$IFS; IFS=$ac_path_separator
2517 for ac_dir in $ac_dummy; do
2519 test -z "$ac_dir" && ac_dir=.
2520 if $as_executable_p "$ac_dir/$ac_word"; then
2521 ac_cv_path_EGREP="$ac_dir/$ac_word"
2522 echo "$as_me:2522: found $ac_dir/$ac_word" >&5
2530 EGREP=$ac_cv_path_EGREP
2532 if test -n "$EGREP"; then
2533 echo "$as_me:2533: result: $EGREP" >&5
2534 echo "${ECHO_T}$EGREP" >&6
2536 echo "$as_me:2536: result: no" >&5
2537 echo "${ECHO_T}no" >&6
2540 test -n "$EGREP" && break
2542 test -n "$EGREP" || EGREP=": "
2544 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2544: error: cannot find workable egrep" >&5
2545 echo "$as_me: error: cannot find workable egrep" >&2;}
2546 { (exit 1); exit 1; }; }
2549 echo "$as_me:2549: result: $ac_cv_path_EGREP" >&5
2550 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2551 EGREP="$ac_cv_path_EGREP"
2554 ac_cpp='$CPP $CPPFLAGS'
2555 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2556 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2558 ac_main_return="return"
2559 echo "$as_me:2559: checking how to run the C preprocessor" >&5
2560 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2561 # On Suns, sometimes $CPP names a directory.
2562 if test -n "$CPP" && test -d "$CPP"; then
2565 if test -z "$CPP"; then
2566 if test "${ac_cv_prog_CPP+set}" = set; then
2567 echo $ECHO_N "(cached) $ECHO_C" >&6
2569 # Double quotes because CPP needs to be expanded
2570 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2573 for ac_c_preproc_warn_flag in '' yes
2575 # Use a header file that comes with gcc, so configuring glibc
2576 # with a fresh cross-compiler works.
2577 # On the NeXT, cc -E runs the code through the compiler's parser,
2578 # not just through cpp. "Syntax error" is here to catch this case.
2579 cat >"conftest.$ac_ext" <<_ACEOF
2580 #line 2580 "configure"
2581 #include "confdefs.h"
2585 if { (eval echo "$as_me:2585: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2586 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2588 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2590 cat conftest.err >&5
2591 echo "$as_me:2591: \$? = $ac_status" >&5
2592 (exit "$ac_status"); } >/dev/null; then
2593 if test -s conftest.err; then
2594 ac_cpp_err=$ac_c_preproc_warn_flag
2601 if test -z "$ac_cpp_err"; then
2604 echo "$as_me: failed program was:" >&5
2605 cat "conftest.$ac_ext" >&5
2606 # Broken: fails on valid input.
2609 rm -f conftest.err "conftest.$ac_ext"
2611 # OK, works on sane cases. Now check whether non-existent headers
2612 # can be detected and how.
2613 cat >"conftest.$ac_ext" <<_ACEOF
2614 #line 2614 "configure"
2615 #include "confdefs.h"
2616 #include <ac_nonexistent.h>
2618 if { (eval echo "$as_me:2618: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2619 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2621 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2623 cat conftest.err >&5
2624 echo "$as_me:2624: \$? = $ac_status" >&5
2625 (exit "$ac_status"); } >/dev/null; then
2626 if test -s conftest.err; then
2627 ac_cpp_err=$ac_c_preproc_warn_flag
2634 if test -z "$ac_cpp_err"; then
2635 # Broken: success on invalid input.
2638 echo "$as_me: failed program was:" >&5
2639 cat "conftest.$ac_ext" >&5
2640 # Passes both tests.
2644 rm -f conftest.err "conftest.$ac_ext"
2647 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2648 rm -f conftest.err "conftest.$ac_ext"
2649 if $ac_preproc_ok; then
2661 echo "$as_me:2661: result: $CPP" >&5
2662 echo "${ECHO_T}$CPP" >&6
2664 for ac_c_preproc_warn_flag in '' yes
2666 # Use a header file that comes with gcc, so configuring glibc
2667 # with a fresh cross-compiler works.
2668 # On the NeXT, cc -E runs the code through the compiler's parser,
2669 # not just through cpp. "Syntax error" is here to catch this case.
2670 cat >"conftest.$ac_ext" <<_ACEOF
2671 #line 2671 "configure"
2672 #include "confdefs.h"
2676 if { (eval echo "$as_me:2676: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2677 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2679 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2681 cat conftest.err >&5
2682 echo "$as_me:2682: \$? = $ac_status" >&5
2683 (exit "$ac_status"); } >/dev/null; then
2684 if test -s conftest.err; then
2685 ac_cpp_err=$ac_c_preproc_warn_flag
2692 if test -z "$ac_cpp_err"; then
2695 echo "$as_me: failed program was:" >&5
2696 cat "conftest.$ac_ext" >&5
2697 # Broken: fails on valid input.
2700 rm -f conftest.err "conftest.$ac_ext"
2702 # OK, works on sane cases. Now check whether non-existent headers
2703 # can be detected and how.
2704 cat >"conftest.$ac_ext" <<_ACEOF
2705 #line 2705 "configure"
2706 #include "confdefs.h"
2707 #include <ac_nonexistent.h>
2709 if { (eval echo "$as_me:2709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2710 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2712 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2714 cat conftest.err >&5
2715 echo "$as_me:2715: \$? = $ac_status" >&5
2716 (exit "$ac_status"); } >/dev/null; then
2717 if test -s conftest.err; then
2718 ac_cpp_err=$ac_c_preproc_warn_flag
2725 if test -z "$ac_cpp_err"; then
2726 # Broken: success on invalid input.
2729 echo "$as_me: failed program was:" >&5
2730 cat "conftest.$ac_ext" >&5
2731 # Passes both tests.
2735 rm -f conftest.err "conftest.$ac_ext"
2738 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2739 rm -f conftest.err "conftest.$ac_ext"
2740 if $ac_preproc_ok; then
2743 { { echo "$as_me:2743: error: C preprocessor \"$CPP\" fails sanity check" >&5
2744 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2745 { (exit 1); exit 1; }; }
2749 ac_cpp='$CPP $CPPFLAGS'
2750 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2751 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2752 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2753 ac_main_return="return"
2755 for ac_prog in mawk gawk nawk awk
2757 # Extract the first word of "$ac_prog", so it can be a program name with args.
2758 set dummy $ac_prog; ac_word=$2
2759 echo "$as_me:2759: checking for $ac_word" >&5
2760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2761 if test "${ac_cv_prog_AWK+set}" = set; then
2762 echo $ECHO_N "(cached) $ECHO_C" >&6
2764 if test -n "$AWK"; then
2765 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2767 ac_save_IFS=$IFS; IFS=$ac_path_separator
2769 for ac_dir in $ac_dummy; do
2771 test -z "$ac_dir" && ac_dir=.
2772 $as_executable_p "$ac_dir/$ac_word" || continue
2773 ac_cv_prog_AWK="$ac_prog"
2774 echo "$as_me:2774: found $ac_dir/$ac_word" >&5
2781 if test -n "$AWK"; then
2782 echo "$as_me:2782: result: $AWK" >&5
2783 echo "${ECHO_T}$AWK" >&6
2785 echo "$as_me:2785: result: no" >&5
2786 echo "${ECHO_T}no" >&6
2789 test -n "$AWK" && break
2792 # Find a good install program. We prefer a C program (faster),
2793 # so one script is as good as another. But avoid the broken or
2794 # incompatible versions:
2795 # SysV /etc/install, /usr/sbin/install
2796 # SunOS /usr/etc/install
2797 # IRIX /sbin/install
2799 # AmigaOS /C/install, which installs bootblocks on floppy discs
2800 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2801 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2802 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2803 # ./install, which can be erroneously created by make from ./install.sh.
2804 echo "$as_me:2804: checking for a BSD compatible install" >&5
2805 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2806 if test -z "$INSTALL"; then
2807 if test "${ac_cv_path_install+set}" = set; then
2808 echo $ECHO_N "(cached) $ECHO_C" >&6
2810 ac_save_IFS=$IFS; IFS=$ac_path_separator
2811 for ac_dir in $PATH; do
2813 # Account for people who put trailing slashes in PATH elements.
2815 / | ./ | .// | /cC/* \
2816 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2819 # OSF1 and SCO ODT 3.0 have their own names for install.
2820 # Don't use installbsd from OSF since it installs stuff as root
2822 for ac_prog in ginstall scoinst install; do
2823 if $as_executable_p "$ac_dir/$ac_prog"; then
2824 if test $ac_prog = install &&
2825 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2826 # AIX install. It has an incompatible calling convention.
2828 elif test $ac_prog = install &&
2829 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2830 # program-specific install script used by HP pwplus--don't use.
2833 ac_cv_path_install="$ac_dir/$ac_prog -c"
2843 if test "${ac_cv_path_install+set}" = set; then
2844 INSTALL=$ac_cv_path_install
2846 # As a last resort, use the slow shell script. We don't cache a
2847 # path for INSTALL within a source directory, because that will
2848 # break other packages using the cache if that directory is
2849 # removed, or if the path is relative.
2850 INSTALL=$ac_install_sh
2853 echo "$as_me:2853: result: $INSTALL" >&5
2854 echo "${ECHO_T}$INSTALL" >&6
2856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2857 # It thinks the first close brace ends the variable substitution.
2858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2868 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2869 test -z "$cf_dir" && cf_dir=.
2870 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2874 echo "$as_me:2874: checking if you want to install stripped executables" >&5
2875 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2877 # Check whether --enable-stripping or --disable-stripping was given.
2878 if test "${enable_stripping+set}" = set; then
2879 enableval="$enable_stripping"
2880 test "$enableval" != no && enableval=yes
2881 if test "$enableval" != "yes" ; then
2884 enable_stripping=yes
2888 enable_stripping=yes
2891 echo "$as_me:2891: result: $enable_stripping" >&5
2892 echo "${ECHO_T}$enable_stripping" >&6
2894 if test "$enable_stripping" = yes
2901 : "${INSTALL:=install}"
2902 echo "$as_me:2902: checking if install accepts -p option" >&5
2903 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2904 if test "${cf_cv_install_p+set}" = set; then
2905 echo $ECHO_N "(cached) $ECHO_C" >&6
2912 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2914 if test -f conftest.out/conftest.in
2916 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2917 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2918 if test -s conftest.err
2933 echo "$as_me:2933: result: $cf_cv_install_p" >&5
2934 echo "${ECHO_T}$cf_cv_install_p" >&6
2936 echo "$as_me:2936: checking if install needs to be told about ownership" >&5
2937 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2938 case `$ac_config_guess` in
2947 echo "$as_me:2947: result: $with_install_o" >&5
2948 echo "${ECHO_T}$with_install_o" >&6
2949 if test "x$with_install_o" = xyes
2951 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'`"
2956 for ac_prog in lint cppcheck splint
2958 # Extract the first word of "$ac_prog", so it can be a program name with args.
2959 set dummy $ac_prog; ac_word=$2
2960 echo "$as_me:2960: checking for $ac_word" >&5
2961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2962 if test "${ac_cv_prog_LINT+set}" = set; then
2963 echo $ECHO_N "(cached) $ECHO_C" >&6
2965 if test -n "$LINT"; then
2966 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2968 ac_save_IFS=$IFS; IFS=$ac_path_separator
2970 for ac_dir in $ac_dummy; do
2972 test -z "$ac_dir" && ac_dir=.
2973 $as_executable_p "$ac_dir/$ac_word" || continue
2974 ac_cv_prog_LINT="$ac_prog"
2975 echo "$as_me:2975: found $ac_dir/$ac_word" >&5
2981 LINT=$ac_cv_prog_LINT
2982 if test -n "$LINT"; then
2983 echo "$as_me:2983: result: $LINT" >&5
2984 echo "${ECHO_T}$LINT" >&6
2986 echo "$as_me:2986: result: no" >&5
2987 echo "${ECHO_T}no" >&6
2990 test -n "$LINT" && break
2994 (xcppcheck|x*/cppcheck)
2995 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2999 echo "$as_me:2999: checking if filesystem supports mixed-case filenames" >&5
3000 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3001 if test "${cf_cv_mixedcase+set}" = set; then
3002 echo $ECHO_N "(cached) $ECHO_C" >&6
3005 if test "$cross_compiling" = yes ; then
3006 case "$target_alias" in
3007 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3015 rm -f conftest CONFTEST
3017 if test -f CONFTEST ; then
3022 rm -f conftest CONFTEST
3026 echo "$as_me:3026: result: $cf_cv_mixedcase" >&5
3027 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3028 test "$cf_cv_mixedcase" = yes &&
3029 cat >>confdefs.h <<\EOF
3030 #define MIXEDCASE_FILENAMES 1
3033 for ac_prog in exctags ctags
3035 # Extract the first word of "$ac_prog", so it can be a program name with args.
3036 set dummy $ac_prog; ac_word=$2
3037 echo "$as_me:3037: checking for $ac_word" >&5
3038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3039 if test "${ac_cv_prog_CTAGS+set}" = set; then
3040 echo $ECHO_N "(cached) $ECHO_C" >&6
3042 if test -n "$CTAGS"; then
3043 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3045 ac_save_IFS=$IFS; IFS=$ac_path_separator
3047 for ac_dir in $ac_dummy; do
3049 test -z "$ac_dir" && ac_dir=.
3050 $as_executable_p "$ac_dir/$ac_word" || continue
3051 ac_cv_prog_CTAGS="$ac_prog"
3052 echo "$as_me:3052: found $ac_dir/$ac_word" >&5
3058 CTAGS=$ac_cv_prog_CTAGS
3059 if test -n "$CTAGS"; then
3060 echo "$as_me:3060: result: $CTAGS" >&5
3061 echo "${ECHO_T}$CTAGS" >&6
3063 echo "$as_me:3063: result: no" >&5
3064 echo "${ECHO_T}no" >&6
3067 test -n "$CTAGS" && break
3070 for ac_prog in exetags etags
3072 # Extract the first word of "$ac_prog", so it can be a program name with args.
3073 set dummy $ac_prog; ac_word=$2
3074 echo "$as_me:3074: checking for $ac_word" >&5
3075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3076 if test "${ac_cv_prog_ETAGS+set}" = set; then
3077 echo $ECHO_N "(cached) $ECHO_C" >&6
3079 if test -n "$ETAGS"; then
3080 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3082 ac_save_IFS=$IFS; IFS=$ac_path_separator
3084 for ac_dir in $ac_dummy; do
3086 test -z "$ac_dir" && ac_dir=.
3087 $as_executable_p "$ac_dir/$ac_word" || continue
3088 ac_cv_prog_ETAGS="$ac_prog"
3089 echo "$as_me:3089: found $ac_dir/$ac_word" >&5
3095 ETAGS=$ac_cv_prog_ETAGS
3096 if test -n "$ETAGS"; then
3097 echo "$as_me:3097: result: $ETAGS" >&5
3098 echo "${ECHO_T}$ETAGS" >&6
3100 echo "$as_me:3100: result: no" >&5
3101 echo "${ECHO_T}no" >&6
3104 test -n "$ETAGS" && break
3107 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3108 set dummy ${CTAGS:-ctags}; ac_word=$2
3109 echo "$as_me:3109: checking for $ac_word" >&5
3110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3111 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3112 echo $ECHO_N "(cached) $ECHO_C" >&6
3114 if test -n "$MAKE_LOWER_TAGS"; then
3115 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3117 ac_save_IFS=$IFS; IFS=$ac_path_separator
3119 for ac_dir in $ac_dummy; do
3121 test -z "$ac_dir" && ac_dir=.
3122 $as_executable_p "$ac_dir/$ac_word" || continue
3123 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3124 echo "$as_me:3124: found $ac_dir/$ac_word" >&5
3128 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3131 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3132 if test -n "$MAKE_LOWER_TAGS"; then
3133 echo "$as_me:3133: result: $MAKE_LOWER_TAGS" >&5
3134 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3136 echo "$as_me:3136: result: no" >&5
3137 echo "${ECHO_T}no" >&6
3140 if test "$cf_cv_mixedcase" = yes ; then
3141 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3142 set dummy ${ETAGS:-etags}; ac_word=$2
3143 echo "$as_me:3143: checking for $ac_word" >&5
3144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3145 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3146 echo $ECHO_N "(cached) $ECHO_C" >&6
3148 if test -n "$MAKE_UPPER_TAGS"; then
3149 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3151 ac_save_IFS=$IFS; IFS=$ac_path_separator
3153 for ac_dir in $ac_dummy; do
3155 test -z "$ac_dir" && ac_dir=.
3156 $as_executable_p "$ac_dir/$ac_word" || continue
3157 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3158 echo "$as_me:3158: found $ac_dir/$ac_word" >&5
3162 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3165 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3166 if test -n "$MAKE_UPPER_TAGS"; then
3167 echo "$as_me:3167: result: $MAKE_UPPER_TAGS" >&5
3168 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3170 echo "$as_me:3170: result: no" >&5
3171 echo "${ECHO_T}no" >&6
3178 if test "$MAKE_UPPER_TAGS" = yes ; then
3184 if test "$MAKE_LOWER_TAGS" = yes ; then
3190 echo "$as_me:3190: checking if -lm needed for math functions" >&5
3191 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3192 if test "${cf_cv_need_libm+set}" = set; then
3193 echo $ECHO_N "(cached) $ECHO_C" >&6
3196 cat >"conftest.$ac_ext" <<_ACEOF
3197 #line 3197 "configure"
3198 #include "confdefs.h"
3207 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3213 if { (eval echo "$as_me:3213: \"$ac_link\"") >&5
3214 (eval $ac_link) 2>&5
3216 echo "$as_me:3216: \$? = $ac_status" >&5
3217 (exit "$ac_status"); } &&
3218 { ac_try='test -s "conftest$ac_exeext"'
3219 { (eval echo "$as_me:3219: \"$ac_try\"") >&5
3222 echo "$as_me:3222: \$? = $ac_status" >&5
3223 (exit "$ac_status"); }; }; then
3226 echo "$as_me: failed program was:" >&5
3227 cat "conftest.$ac_ext" >&5
3230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3232 echo "$as_me:3232: result: $cf_cv_need_libm" >&5
3233 echo "${ECHO_T}$cf_cv_need_libm" >&6
3234 if test "$cf_cv_need_libm" = yes
3242 CC_SHARED_OPTS=unknown
3243 CPPFLAGS="$CPPFLAGS"
3245 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3246 DFT_UPR_MODEL="NORMAL"
3259 PACKAGE="ncurses-examples"
3265 TINFO_LIBS='$(LIBS_CURSES)'
3266 cf_cv_abi_version=""
3267 cf_cv_rel_version=""
3273 echo "$as_me:3273: checking for fgrep" >&5
3274 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3275 if test "${ac_cv_path_FGREP+set}" = set; then
3276 echo $ECHO_N "(cached) $ECHO_C" >&6
3278 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3279 then ac_cv_path_FGREP="$GREP -F"
3281 for ac_prog in gfgrep fgrep
3283 # Extract the first word of "$ac_prog", so it can be a program name with args.
3284 set dummy $ac_prog; ac_word=$2
3285 echo "$as_me:3285: checking for $ac_word" >&5
3286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3287 if test "${ac_cv_path_FGREP+set}" = set; then
3288 echo $ECHO_N "(cached) $ECHO_C" >&6
3292 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3295 ac_save_IFS=$IFS; IFS=$ac_path_separator
3297 for ac_dir in $ac_dummy; do
3299 test -z "$ac_dir" && ac_dir=.
3300 if $as_executable_p "$ac_dir/$ac_word"; then
3301 ac_cv_path_FGREP="$ac_dir/$ac_word"
3302 echo "$as_me:3302: found $ac_dir/$ac_word" >&5
3310 FGREP=$ac_cv_path_FGREP
3312 if test -n "$FGREP"; then
3313 echo "$as_me:3313: result: $FGREP" >&5
3314 echo "${ECHO_T}$FGREP" >&6
3316 echo "$as_me:3316: result: no" >&5
3317 echo "${ECHO_T}no" >&6
3320 test -n "$FGREP" && break
3322 test -n "$FGREP" || FGREP=": "
3324 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3324: error: cannot find workable fgrep" >&5
3325 echo "$as_me: error: cannot find workable fgrep" >&2;}
3326 { (exit 1); exit 1; }; }
3329 echo "$as_me:3329: result: $ac_cv_path_FGREP" >&5
3330 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3331 FGREP="$ac_cv_path_FGREP"
3333 echo "$as_me:3333: checking for C11 _Noreturn feature" >&5
3334 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3335 if test "${cf_cv_c11_noreturn+set}" = set; then
3336 echo $ECHO_N "(cached) $ECHO_C" >&6
3338 cat >"conftest.$ac_ext" <<_ACEOF
3339 #line 3339 "configure"
3340 #include "confdefs.h"
3344 #include <stdnoreturn.h>
3345 static void giveup(void) { exit(0); }
3350 if (feof(stdin)) giveup()
3355 rm -f "conftest.$ac_objext"
3356 if { (eval echo "$as_me:3356: \"$ac_compile\"") >&5
3357 (eval $ac_compile) 2>&5
3359 echo "$as_me:3359: \$? = $ac_status" >&5
3360 (exit "$ac_status"); } &&
3361 { ac_try='test -s "conftest.$ac_objext"'
3362 { (eval echo "$as_me:3362: \"$ac_try\"") >&5
3365 echo "$as_me:3365: \$? = $ac_status" >&5
3366 (exit "$ac_status"); }; }; then
3367 cf_cv_c11_noreturn=yes
3369 echo "$as_me: failed program was:" >&5
3370 cat "conftest.$ac_ext" >&5
3371 cf_cv_c11_noreturn=no
3373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3376 echo "$as_me:3376: result: $cf_cv_c11_noreturn" >&5
3377 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3379 if test "$cf_cv_c11_noreturn" = yes; then
3380 cat >>confdefs.h <<\EOF
3381 #define HAVE_STDNORETURN_H 1
3384 cat >>confdefs.h <<EOF
3385 #define STDC_NORETURN _Noreturn
3388 HAVE_STDNORETURN_H=1
3390 HAVE_STDNORETURN_H=0
3393 if test "$GCC" = yes || test "$GXX" = yes
3395 cat > conftest.i <<EOF
3397 #define GCC_PRINTF 0
3402 #ifndef GCC_NORETURN
3403 #define GCC_NORETURN /* nothing */
3406 #define GCC_UNUSED /* nothing */
3409 if test "$GCC" = yes
3411 { echo "$as_me:3411: checking for $CC __attribute__ directives..." >&5
3412 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3413 cat > "conftest.$ac_ext" <<EOF
3414 #line 3414 "${as_me:-configure}"
3415 #include "confdefs.h"
3416 #include "conftest.h"
3417 #include "conftest.i"
3419 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3421 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3424 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3426 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3428 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3429 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3430 extern GCC_NORETURN void foo(void);
3431 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3433 cf_printf_attribute=no
3434 cf_scanf_attribute=no
3435 for cf_attribute in scanf printf unused noreturn
3438 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3440 cf_directive="__attribute__(($cf_attribute))"
3441 echo "checking for $CC $cf_directive" 1>&5
3443 case "$cf_attribute" in
3445 cf_printf_attribute=yes
3446 cat >conftest.h <<EOF
3447 #define GCC_$cf_ATTRIBUTE 1
3451 cf_scanf_attribute=yes
3452 cat >conftest.h <<EOF
3453 #define GCC_$cf_ATTRIBUTE 1
3457 cat >conftest.h <<EOF
3458 #define GCC_$cf_ATTRIBUTE $cf_directive
3463 if { (eval echo "$as_me:3463: \"$ac_compile\"") >&5
3464 (eval $ac_compile) 2>&5
3466 echo "$as_me:3466: \$? = $ac_status" >&5
3467 (exit "$ac_status"); }; then
3468 test -n "$verbose" && echo "$as_me:3468: result: ... $cf_attribute" >&5
3469 echo "${ECHO_T}... $cf_attribute" >&6
3470 cat conftest.h >>confdefs.h
3471 case "$cf_attribute" in
3474 cat >>confdefs.h <<EOF
3475 #define GCC_NORETURN $cf_directive
3480 cf_value='/* nothing */'
3481 if test "$cf_printf_attribute" != no ; then
3482 cf_value='__attribute__((format(printf,fmt,var)))'
3484 cat >>confdefs.h <<\EOF
3485 #define GCC_PRINTF 1
3490 cat >>confdefs.h <<EOF
3491 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3496 cf_value='/* nothing */'
3497 if test "$cf_scanf_attribute" != no ; then
3498 cf_value='__attribute__((format(scanf,fmt,var)))'
3500 cat >>confdefs.h <<\EOF
3506 cat >>confdefs.h <<EOF
3507 #define GCC_SCANFLIKE(fmt,var) $cf_value
3513 cat >>confdefs.h <<EOF
3514 #define GCC_UNUSED $cf_directive
3522 ${FGREP-fgrep} define conftest.i >>confdefs.h
3527 echo "$as_me:3527: checking if you want to work around bogus compiler/loader warnings" >&5
3528 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3530 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3531 if test "${enable_string_hacks+set}" = set; then
3532 enableval="$enable_string_hacks"
3533 enable_string_hacks=$enableval
3535 enable_string_hacks=no
3537 echo "$as_me:3537: result: $enable_string_hacks" >&5
3538 echo "${ECHO_T}$enable_string_hacks" >&6
3540 if test "x$enable_string_hacks" = "xyes"; then
3542 cat >>confdefs.h <<\EOF
3543 #define USE_STRING_HACKS 1
3546 { echo "$as_me:3546: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3547 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3548 echo "$as_me:3548: checking for strlcat" >&5
3549 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3550 if test "${ac_cv_func_strlcat+set}" = set; then
3551 echo $ECHO_N "(cached) $ECHO_C" >&6
3553 cat >"conftest.$ac_ext" <<_ACEOF
3554 #line 3554 "configure"
3555 #include "confdefs.h"
3556 #define strlcat autoconf_temporary
3557 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3564 /* We use char because int might match the return type of a gcc2
3565 builtin and then its argument prototype would still apply. */
3566 char strlcat (void);
3572 /* The GNU C library defines stubs for functions which it implements
3573 to always fail with ENOSYS. Some functions are actually named
3574 something starting with __ and the normal name is an alias. */
3575 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3576 #error found stub for strlcat
3584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3585 if { (eval echo "$as_me:3585: \"$ac_link\"") >&5
3586 (eval $ac_link) 2>&5
3588 echo "$as_me:3588: \$? = $ac_status" >&5
3589 (exit "$ac_status"); } &&
3590 { ac_try='test -s "conftest$ac_exeext"'
3591 { (eval echo "$as_me:3591: \"$ac_try\"") >&5
3594 echo "$as_me:3594: \$? = $ac_status" >&5
3595 (exit "$ac_status"); }; }; then
3596 ac_cv_func_strlcat=yes
3598 echo "$as_me: failed program was:" >&5
3599 cat "conftest.$ac_ext" >&5
3600 ac_cv_func_strlcat=no
3602 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3604 echo "$as_me:3604: result: $ac_cv_func_strlcat" >&5
3605 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3606 if test "$ac_cv_func_strlcat" = yes; then
3608 cat >>confdefs.h <<\EOF
3609 #define HAVE_STRLCAT 1
3614 echo "$as_me:3614: checking for strlcat in -lbsd" >&5
3615 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3616 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3617 echo $ECHO_N "(cached) $ECHO_C" >&6
3619 ac_check_lib_save_LIBS=$LIBS
3621 cat >"conftest.$ac_ext" <<_ACEOF
3622 #line 3622 "configure"
3623 #include "confdefs.h"
3625 /* Override any gcc2 internal prototype to avoid an error. */
3629 /* We use char because int might match the return type of a gcc2
3630 builtin and then its argument prototype would still apply. */
3640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3641 if { (eval echo "$as_me:3641: \"$ac_link\"") >&5
3642 (eval $ac_link) 2>&5
3644 echo "$as_me:3644: \$? = $ac_status" >&5
3645 (exit "$ac_status"); } &&
3646 { ac_try='test -s "conftest$ac_exeext"'
3647 { (eval echo "$as_me:3647: \"$ac_try\"") >&5
3650 echo "$as_me:3650: \$? = $ac_status" >&5
3651 (exit "$ac_status"); }; }; then
3652 ac_cv_lib_bsd_strlcat=yes
3654 echo "$as_me: failed program was:" >&5
3655 cat "conftest.$ac_ext" >&5
3656 ac_cv_lib_bsd_strlcat=no
3658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3659 LIBS=$ac_check_lib_save_LIBS
3661 echo "$as_me:3661: result: $ac_cv_lib_bsd_strlcat" >&5
3662 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3663 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3668 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3670 for cf_add_1lib in $cf_add_0lib; do
3671 for cf_add_2lib in $cf_add_libs; do
3672 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3677 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3681 for ac_header in bsd/string.h
3683 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3684 echo "$as_me:3684: checking for $ac_header" >&5
3685 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3686 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3687 echo $ECHO_N "(cached) $ECHO_C" >&6
3689 cat >"conftest.$ac_ext" <<_ACEOF
3690 #line 3690 "configure"
3691 #include "confdefs.h"
3692 #include <$ac_header>
3694 if { (eval echo "$as_me:3694: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3695 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3697 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3699 cat conftest.err >&5
3700 echo "$as_me:3700: \$? = $ac_status" >&5
3701 (exit "$ac_status"); } >/dev/null; then
3702 if test -s conftest.err; then
3703 ac_cpp_err=$ac_c_preproc_warn_flag
3710 if test -z "$ac_cpp_err"; then
3711 eval "$as_ac_Header=yes"
3713 echo "$as_me: failed program was:" >&5
3714 cat "conftest.$ac_ext" >&5
3715 eval "$as_ac_Header=no"
3717 rm -f conftest.err "conftest.$ac_ext"
3719 echo "$as_me:3719: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3720 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3721 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3722 cat >>confdefs.h <<EOF
3723 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3729 cat >>confdefs.h <<\EOF
3730 #define HAVE_STRLCAT 1
3737 for ac_func in strlcpy snprintf
3739 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3740 echo "$as_me:3740: checking for $ac_func" >&5
3741 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3742 if eval "test \"\${$as_ac_var+set}\" = set"; then
3743 echo $ECHO_N "(cached) $ECHO_C" >&6
3745 cat >"conftest.$ac_ext" <<_ACEOF
3746 #line 3746 "configure"
3747 #include "confdefs.h"
3748 #define $ac_func autoconf_temporary
3749 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3756 /* We use char because int might match the return type of a gcc2
3757 builtin and then its argument prototype would still apply. */
3758 char $ac_func (void);
3764 /* The GNU C library defines stubs for functions which it implements
3765 to always fail with ENOSYS. Some functions are actually named
3766 something starting with __ and the normal name is an alias. */
3767 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3768 #error found stub for $ac_func
3776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3777 if { (eval echo "$as_me:3777: \"$ac_link\"") >&5
3778 (eval $ac_link) 2>&5
3780 echo "$as_me:3780: \$? = $ac_status" >&5
3781 (exit "$ac_status"); } &&
3782 { ac_try='test -s "conftest$ac_exeext"'
3783 { (eval echo "$as_me:3783: \"$ac_try\"") >&5
3786 echo "$as_me:3786: \$? = $ac_status" >&5
3787 (exit "$ac_status"); }; }; then
3788 eval "$as_ac_var=yes"
3790 echo "$as_me: failed program was:" >&5
3791 cat "conftest.$ac_ext" >&5
3792 eval "$as_ac_var=no"
3794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3796 echo "$as_me:3796: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3797 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3798 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3799 cat >>confdefs.h <<EOF
3800 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3808 echo "$as_me:3808: checking if the POSIX test-macros are already defined" >&5
3809 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3810 if test "${cf_cv_posix_visible+set}" = set; then
3811 echo $ECHO_N "(cached) $ECHO_C" >&6
3814 cat >"conftest.$ac_ext" <<_ACEOF
3815 #line 3815 "configure"
3816 #include "confdefs.h"
3822 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3823 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3824 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3825 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3826 #error conflicting symbols found
3833 rm -f "conftest.$ac_objext"
3834 if { (eval echo "$as_me:3834: \"$ac_compile\"") >&5
3835 (eval $ac_compile) 2>&5
3837 echo "$as_me:3837: \$? = $ac_status" >&5
3838 (exit "$ac_status"); } &&
3839 { ac_try='test -s "conftest.$ac_objext"'
3840 { (eval echo "$as_me:3840: \"$ac_try\"") >&5
3843 echo "$as_me:3843: \$? = $ac_status" >&5
3844 (exit "$ac_status"); }; }; then
3845 cf_cv_posix_visible=no
3847 echo "$as_me: failed program was:" >&5
3848 cat "conftest.$ac_ext" >&5
3849 cf_cv_posix_visible=yes
3851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3854 echo "$as_me:3854: result: $cf_cv_posix_visible" >&5
3855 echo "${ECHO_T}$cf_cv_posix_visible" >&6
3857 if test "$cf_cv_posix_visible" = no; then
3860 cf_POSIX_C_SOURCE=199506L
3865 cf_xopen_source="-D_ALL_SOURCE"
3871 cf_xopen_source="-D_APPLE_C_SOURCE"
3874 cf_xopen_source="-D_DARWIN_C_SOURCE"
3877 (freebsd*|dragonfly*|midnightbsd*)
3878 # 5.x headers associate
3879 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3880 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3881 cf_POSIX_C_SOURCE=200112L
3883 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3886 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3889 cf_xopen_source="-D_HPUX_SOURCE"
3892 cf_xopen_source="-D_SGI_SOURCE"
3895 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3897 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3899 echo "$as_me:3899: checking if this is the GNU C library" >&5
3900 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3901 if test "${cf_cv_gnu_library+set}" = set; then
3902 echo $ECHO_N "(cached) $ECHO_C" >&6
3905 cat >"conftest.$ac_ext" <<_ACEOF
3906 #line 3906 "configure"
3907 #include "confdefs.h"
3908 #include <sys/types.h>
3913 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3915 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3918 # error not GNU C library
3924 rm -f "conftest.$ac_objext"
3925 if { (eval echo "$as_me:3925: \"$ac_compile\"") >&5
3926 (eval $ac_compile) 2>&5
3928 echo "$as_me:3928: \$? = $ac_status" >&5
3929 (exit "$ac_status"); } &&
3930 { ac_try='test -s "conftest.$ac_objext"'
3931 { (eval echo "$as_me:3931: \"$ac_try\"") >&5
3934 echo "$as_me:3934: \$? = $ac_status" >&5
3935 (exit "$ac_status"); }; }; then
3936 cf_cv_gnu_library=yes
3938 echo "$as_me: failed program was:" >&5
3939 cat "conftest.$ac_ext" >&5
3940 cf_cv_gnu_library=no
3942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3945 echo "$as_me:3945: result: $cf_cv_gnu_library" >&5
3946 echo "${ECHO_T}$cf_cv_gnu_library" >&6
3948 if test x$cf_cv_gnu_library = xyes; then
3950 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3951 # was changed to help a little. newlib incorporated the change about 4
3953 echo "$as_me:3953: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3954 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3955 if test "${cf_cv_gnu_library_219+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3961 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3962 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3964 cat >"conftest.$ac_ext" <<_ACEOF
3965 #line 3965 "configure"
3966 #include "confdefs.h"
3967 #include <sys/types.h>
3972 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3974 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3977 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3983 rm -f "conftest.$ac_objext"
3984 if { (eval echo "$as_me:3984: \"$ac_compile\"") >&5
3985 (eval $ac_compile) 2>&5
3987 echo "$as_me:3987: \$? = $ac_status" >&5
3988 (exit "$ac_status"); } &&
3989 { ac_try='test -s "conftest.$ac_objext"'
3990 { (eval echo "$as_me:3990: \"$ac_try\"") >&5
3993 echo "$as_me:3993: \$? = $ac_status" >&5
3994 (exit "$ac_status"); }; }; then
3995 cf_cv_gnu_library_219=yes
3997 echo "$as_me: failed program was:" >&5
3998 cat "conftest.$ac_ext" >&5
3999 cf_cv_gnu_library_219=no
4001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4005 echo "$as_me:4005: result: $cf_cv_gnu_library_219" >&5
4006 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4008 if test "x$cf_cv_gnu_library_219" = xyes; then
4010 echo "$as_me:4010: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4011 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4012 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4013 echo $ECHO_N "(cached) $ECHO_C" >&6
4019 cf_new_extra_cppflags=
4021 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4023 case "$cf_fix_cppflags" in
4025 case "$cf_add_cflags" in
4026 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4027 case "$cf_add_cflags" in
4029 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4031 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4032 && test -z "${cf_tst_cflags}" \
4033 && cf_fix_cppflags=yes
4035 if test "$cf_fix_cppflags" = yes ; then
4037 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4038 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4041 elif test "${cf_tst_cflags}" = "\"'" ; then
4043 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4044 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4054 case "$cf_add_cflags" in
4056 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4058 CPPFLAGS=`echo "$CPPFLAGS" | \
4059 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4060 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4065 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4066 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4073 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4074 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4081 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4082 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4084 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4086 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4087 && test -z "${cf_tst_cflags}" \
4088 && cf_fix_cppflags=no
4093 if test -n "$cf_new_cflags" ; then
4095 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4096 CFLAGS="${CFLAGS}$cf_new_cflags"
4100 if test -n "$cf_new_cppflags" ; then
4102 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4103 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4107 if test -n "$cf_new_extra_cppflags" ; then
4109 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4110 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4114 cat >"conftest.$ac_ext" <<_ACEOF
4115 #line 4115 "configure"
4116 #include "confdefs.h"
4119 #include <sys/types.h>
4125 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4128 # error GNU C library is too old
4134 rm -f "conftest.$ac_objext"
4135 if { (eval echo "$as_me:4135: \"$ac_compile\"") >&5
4136 (eval $ac_compile) 2>&5
4138 echo "$as_me:4138: \$? = $ac_status" >&5
4139 (exit "$ac_status"); } &&
4140 { ac_try='test -s "conftest.$ac_objext"'
4141 { (eval echo "$as_me:4141: \"$ac_try\"") >&5
4144 echo "$as_me:4144: \$? = $ac_status" >&5
4145 (exit "$ac_status"); }; }; then
4146 cf_cv_gnu_dftsrc_219=yes
4148 echo "$as_me: failed program was:" >&5
4149 cat "conftest.$ac_ext" >&5
4150 cf_cv_gnu_dftsrc_219=no
4152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4155 echo "$as_me:4155: result: $cf_cv_gnu_dftsrc_219" >&5
4156 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4157 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4159 cf_cv_gnu_dftsrc_219=maybe
4162 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4164 echo "$as_me:4164: checking if we must define _GNU_SOURCE" >&5
4165 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4166 if test "${cf_cv_gnu_source+set}" = set; then
4167 echo $ECHO_N "(cached) $ECHO_C" >&6
4170 cat >"conftest.$ac_ext" <<_ACEOF
4171 #line 4171 "configure"
4172 #include "confdefs.h"
4173 #include <sys/types.h>
4178 #ifndef _XOPEN_SOURCE
4179 #error expected _XOPEN_SOURCE to be defined
4185 rm -f "conftest.$ac_objext"
4186 if { (eval echo "$as_me:4186: \"$ac_compile\"") >&5
4187 (eval $ac_compile) 2>&5
4189 echo "$as_me:4189: \$? = $ac_status" >&5
4190 (exit "$ac_status"); } &&
4191 { ac_try='test -s "conftest.$ac_objext"'
4192 { (eval echo "$as_me:4192: \"$ac_try\"") >&5
4195 echo "$as_me:4195: \$? = $ac_status" >&5
4196 (exit "$ac_status"); }; }; then
4199 echo "$as_me: failed program was:" >&5
4200 cat "conftest.$ac_ext" >&5
4206 cf_new_extra_cppflags=
4208 for cf_add_cflags in -D_GNU_SOURCE
4210 case "$cf_fix_cppflags" in
4212 case "$cf_add_cflags" in
4213 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4214 case "$cf_add_cflags" in
4216 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4218 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4219 && test -z "${cf_tst_cflags}" \
4220 && cf_fix_cppflags=yes
4222 if test "$cf_fix_cppflags" = yes ; then
4224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4228 elif test "${cf_tst_cflags}" = "\"'" ; then
4230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4241 case "$cf_add_cflags" in
4243 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4245 CPPFLAGS=`echo "$CPPFLAGS" | \
4246 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4247 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4252 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4253 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4260 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4261 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4271 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4273 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4274 && test -z "${cf_tst_cflags}" \
4275 && cf_fix_cppflags=no
4280 if test -n "$cf_new_cflags" ; then
4282 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4283 CFLAGS="${CFLAGS}$cf_new_cflags"
4287 if test -n "$cf_new_cppflags" ; then
4289 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4290 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4294 if test -n "$cf_new_extra_cppflags" ; then
4296 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4297 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4301 cat >"conftest.$ac_ext" <<_ACEOF
4302 #line 4302 "configure"
4303 #include "confdefs.h"
4304 #include <sys/types.h>
4309 #ifdef _XOPEN_SOURCE
4310 #error expected _XOPEN_SOURCE to be undefined
4316 rm -f "conftest.$ac_objext"
4317 if { (eval echo "$as_me:4317: \"$ac_compile\"") >&5
4318 (eval $ac_compile) 2>&5
4320 echo "$as_me:4320: \$? = $ac_status" >&5
4321 (exit "$ac_status"); } &&
4322 { ac_try='test -s "conftest.$ac_objext"'
4323 { (eval echo "$as_me:4323: \"$ac_try\"") >&5
4326 echo "$as_me:4326: \$? = $ac_status" >&5
4327 (exit "$ac_status"); }; }; then
4330 echo "$as_me: failed program was:" >&5
4331 cat "conftest.$ac_ext" >&5
4332 cf_cv_gnu_source=yes
4334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4338 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4341 echo "$as_me:4341: result: $cf_cv_gnu_source" >&5
4342 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4344 if test "$cf_cv_gnu_source" = yes
4346 echo "$as_me:4346: checking if we should also define _DEFAULT_SOURCE" >&5
4347 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4348 if test "${cf_cv_default_source+set}" = set; then
4349 echo $ECHO_N "(cached) $ECHO_C" >&6
4352 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4353 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4355 cat >"conftest.$ac_ext" <<_ACEOF
4356 #line 4356 "configure"
4357 #include "confdefs.h"
4358 #include <sys/types.h>
4363 #ifdef _DEFAULT_SOURCE
4364 #error expected _DEFAULT_SOURCE to be undefined
4370 rm -f "conftest.$ac_objext"
4371 if { (eval echo "$as_me:4371: \"$ac_compile\"") >&5
4372 (eval $ac_compile) 2>&5
4374 echo "$as_me:4374: \$? = $ac_status" >&5
4375 (exit "$ac_status"); } &&
4376 { ac_try='test -s "conftest.$ac_objext"'
4377 { (eval echo "$as_me:4377: \"$ac_try\"") >&5
4380 echo "$as_me:4380: \$? = $ac_status" >&5
4381 (exit "$ac_status"); }; }; then
4382 cf_cv_default_source=no
4384 echo "$as_me: failed program was:" >&5
4385 cat "conftest.$ac_ext" >&5
4386 cf_cv_default_source=yes
4388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4391 echo "$as_me:4391: result: $cf_cv_default_source" >&5
4392 echo "${ECHO_T}$cf_cv_default_source" >&6
4393 if test "$cf_cv_default_source" = yes
4396 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4397 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4407 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4410 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4413 if test "$cf_cv_posix_visible" = no; then
4415 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4417 cf_save_CFLAGS="$CFLAGS"
4418 cf_save_CPPFLAGS="$CPPFLAGS"
4420 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4421 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4422 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4424 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4425 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4426 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4428 echo "$as_me:4428: checking if we should define _POSIX_C_SOURCE" >&5
4429 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4430 if test "${cf_cv_posix_c_source+set}" = set; then
4431 echo $ECHO_N "(cached) $ECHO_C" >&6
4434 echo "${as_me:-configure}:4434: testing if the symbol is already defined go no further ..." 1>&5
4436 cat >"conftest.$ac_ext" <<_ACEOF
4437 #line 4437 "configure"
4438 #include "confdefs.h"
4439 #include <sys/types.h>
4444 #ifndef _POSIX_C_SOURCE
4451 rm -f "conftest.$ac_objext"
4452 if { (eval echo "$as_me:4452: \"$ac_compile\"") >&5
4453 (eval $ac_compile) 2>&5
4455 echo "$as_me:4455: \$? = $ac_status" >&5
4456 (exit "$ac_status"); } &&
4457 { ac_try='test -s "conftest.$ac_objext"'
4458 { (eval echo "$as_me:4458: \"$ac_try\"") >&5
4461 echo "$as_me:4461: \$? = $ac_status" >&5
4462 (exit "$ac_status"); }; }; then
4463 cf_cv_posix_c_source=no
4465 echo "$as_me: failed program was:" >&5
4466 cat "conftest.$ac_ext" >&5
4467 cf_want_posix_source=no
4468 case .$cf_POSIX_C_SOURCE in
4470 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4473 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4474 cf_want_posix_source=yes
4477 cf_want_posix_source=yes
4480 if test "$cf_want_posix_source" = yes ; then
4481 cat >"conftest.$ac_ext" <<_ACEOF
4482 #line 4482 "configure"
4483 #include "confdefs.h"
4484 #include <sys/types.h>
4489 #ifdef _POSIX_SOURCE
4496 rm -f "conftest.$ac_objext"
4497 if { (eval echo "$as_me:4497: \"$ac_compile\"") >&5
4498 (eval $ac_compile) 2>&5
4500 echo "$as_me:4500: \$? = $ac_status" >&5
4501 (exit "$ac_status"); } &&
4502 { ac_try='test -s "conftest.$ac_objext"'
4503 { (eval echo "$as_me:4503: \"$ac_try\"") >&5
4506 echo "$as_me:4506: \$? = $ac_status" >&5
4507 (exit "$ac_status"); }; }; then
4510 echo "$as_me: failed program was:" >&5
4511 cat "conftest.$ac_ext" >&5
4512 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4517 echo "${as_me:-configure}:4517: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4519 CFLAGS="$cf_trim_CFLAGS"
4520 CPPFLAGS="$cf_trim_CPPFLAGS"
4522 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4523 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4525 echo "${as_me:-configure}:4525: testing if the second compile does not leave our definition intact error ..." 1>&5
4527 cat >"conftest.$ac_ext" <<_ACEOF
4528 #line 4528 "configure"
4529 #include "confdefs.h"
4530 #include <sys/types.h>
4535 #ifndef _POSIX_C_SOURCE
4542 rm -f "conftest.$ac_objext"
4543 if { (eval echo "$as_me:4543: \"$ac_compile\"") >&5
4544 (eval $ac_compile) 2>&5
4546 echo "$as_me:4546: \$? = $ac_status" >&5
4547 (exit "$ac_status"); } &&
4548 { ac_try='test -s "conftest.$ac_objext"'
4549 { (eval echo "$as_me:4549: \"$ac_try\"") >&5
4552 echo "$as_me:4552: \$? = $ac_status" >&5
4553 (exit "$ac_status"); }; }; then
4556 echo "$as_me: failed program was:" >&5
4557 cat "conftest.$ac_ext" >&5
4558 cf_cv_posix_c_source=no
4560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4561 CFLAGS="$cf_save_CFLAGS"
4562 CPPFLAGS="$cf_save_CPPFLAGS"
4565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4568 echo "$as_me:4568: result: $cf_cv_posix_c_source" >&5
4569 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4571 if test "$cf_cv_posix_c_source" != no ; then
4572 CFLAGS="$cf_trim_CFLAGS"
4573 CPPFLAGS="$cf_trim_CPPFLAGS"
4578 cf_new_extra_cppflags=
4580 for cf_add_cflags in $cf_cv_posix_c_source
4582 case "$cf_fix_cppflags" in
4584 case "$cf_add_cflags" in
4585 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4586 case "$cf_add_cflags" in
4588 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4591 && test -z "${cf_tst_cflags}" \
4592 && cf_fix_cppflags=yes
4594 if test "$cf_fix_cppflags" = yes ; then
4596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4600 elif test "${cf_tst_cflags}" = "\"'" ; then
4602 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4603 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4613 case "$cf_add_cflags" in
4615 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4617 CPPFLAGS=`echo "$CPPFLAGS" | \
4618 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4619 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4624 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4625 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4632 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4633 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4640 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4641 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4643 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4645 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4646 && test -z "${cf_tst_cflags}" \
4647 && cf_fix_cppflags=no
4652 if test -n "$cf_new_cflags" ; then
4654 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4655 CFLAGS="${CFLAGS}$cf_new_cflags"
4659 if test -n "$cf_new_cppflags" ; then
4661 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4662 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4666 if test -n "$cf_new_extra_cppflags" ; then
4668 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4669 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4675 fi # cf_cv_posix_visible
4679 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4682 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4683 cf_xopen_source="-D_BSD_SOURCE"
4687 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4690 cf_xopen_source="-D_OSF_SOURCE"
4693 cf_xopen_source="-D_QNX_SOURCE"
4696 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4699 cf_xopen_source="-D__EXTENSIONS__"
4700 cf_cv_xopen_source=broken
4702 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4708 echo "$as_me:4708: checking if we should define _XOPEN_SOURCE" >&5
4709 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4710 if test "${cf_cv_xopen_source+set}" = set; then
4711 echo $ECHO_N "(cached) $ECHO_C" >&6
4714 cat >"conftest.$ac_ext" <<_ACEOF
4715 #line 4715 "configure"
4716 #include "confdefs.h"
4720 #include <sys/types.h>
4726 #ifndef _XOPEN_SOURCE
4733 rm -f "conftest.$ac_objext"
4734 if { (eval echo "$as_me:4734: \"$ac_compile\"") >&5
4735 (eval $ac_compile) 2>&5
4737 echo "$as_me:4737: \$? = $ac_status" >&5
4738 (exit "$ac_status"); } &&
4739 { ac_try='test -s "conftest.$ac_objext"'
4740 { (eval echo "$as_me:4740: \"$ac_try\"") >&5
4743 echo "$as_me:4743: \$? = $ac_status" >&5
4744 (exit "$ac_status"); }; }; then
4745 cf_cv_xopen_source=no
4747 echo "$as_me: failed program was:" >&5
4748 cat "conftest.$ac_ext" >&5
4751 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4752 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4754 cat >"conftest.$ac_ext" <<_ACEOF
4755 #line 4755 "configure"
4756 #include "confdefs.h"
4760 #include <sys/types.h>
4766 #ifdef _XOPEN_SOURCE
4773 rm -f "conftest.$ac_objext"
4774 if { (eval echo "$as_me:4774: \"$ac_compile\"") >&5
4775 (eval $ac_compile) 2>&5
4777 echo "$as_me:4777: \$? = $ac_status" >&5
4778 (exit "$ac_status"); } &&
4779 { ac_try='test -s "conftest.$ac_objext"'
4780 { (eval echo "$as_me:4780: \"$ac_try\"") >&5
4783 echo "$as_me:4783: \$? = $ac_status" >&5
4784 (exit "$ac_status"); }; }; then
4785 cf_cv_xopen_source=no
4787 echo "$as_me: failed program was:" >&5
4788 cat "conftest.$ac_ext" >&5
4789 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4798 echo "$as_me:4798: result: $cf_cv_xopen_source" >&5
4799 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4801 if test "$cf_cv_xopen_source" != no ; then
4803 CFLAGS=`echo "$CFLAGS" | \
4804 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4805 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4807 CPPFLAGS=`echo "$CPPFLAGS" | \
4808 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4809 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4811 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4816 cf_new_extra_cppflags=
4818 for cf_add_cflags in $cf_temp_xopen_source
4820 case "$cf_fix_cppflags" in
4822 case "$cf_add_cflags" in
4823 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4824 case "$cf_add_cflags" in
4826 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4828 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4829 && test -z "${cf_tst_cflags}" \
4830 && cf_fix_cppflags=yes
4832 if test "$cf_fix_cppflags" = yes ; then
4834 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4835 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4838 elif test "${cf_tst_cflags}" = "\"'" ; then
4840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4851 case "$cf_add_cflags" in
4853 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4855 CPPFLAGS=`echo "$CPPFLAGS" | \
4856 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4857 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4862 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4863 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4870 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4871 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4881 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4883 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4884 && test -z "${cf_tst_cflags}" \
4885 && cf_fix_cppflags=no
4890 if test -n "$cf_new_cflags" ; then
4892 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4893 CFLAGS="${CFLAGS}$cf_new_cflags"
4897 if test -n "$cf_new_cppflags" ; then
4899 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4900 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4904 if test -n "$cf_new_extra_cppflags" ; then
4906 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4907 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4913 if test "$cf_cv_posix_visible" = no; then
4915 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4917 cf_save_CFLAGS="$CFLAGS"
4918 cf_save_CPPFLAGS="$CPPFLAGS"
4920 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4921 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4922 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4924 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4925 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4926 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4928 echo "$as_me:4928: checking if we should define _POSIX_C_SOURCE" >&5
4929 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4930 if test "${cf_cv_posix_c_source+set}" = set; then
4931 echo $ECHO_N "(cached) $ECHO_C" >&6
4934 echo "${as_me:-configure}:4934: testing if the symbol is already defined go no further ..." 1>&5
4936 cat >"conftest.$ac_ext" <<_ACEOF
4937 #line 4937 "configure"
4938 #include "confdefs.h"
4939 #include <sys/types.h>
4944 #ifndef _POSIX_C_SOURCE
4951 rm -f "conftest.$ac_objext"
4952 if { (eval echo "$as_me:4952: \"$ac_compile\"") >&5
4953 (eval $ac_compile) 2>&5
4955 echo "$as_me:4955: \$? = $ac_status" >&5
4956 (exit "$ac_status"); } &&
4957 { ac_try='test -s "conftest.$ac_objext"'
4958 { (eval echo "$as_me:4958: \"$ac_try\"") >&5
4961 echo "$as_me:4961: \$? = $ac_status" >&5
4962 (exit "$ac_status"); }; }; then
4963 cf_cv_posix_c_source=no
4965 echo "$as_me: failed program was:" >&5
4966 cat "conftest.$ac_ext" >&5
4967 cf_want_posix_source=no
4968 case .$cf_POSIX_C_SOURCE in
4970 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4973 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4974 cf_want_posix_source=yes
4977 cf_want_posix_source=yes
4980 if test "$cf_want_posix_source" = yes ; then
4981 cat >"conftest.$ac_ext" <<_ACEOF
4982 #line 4982 "configure"
4983 #include "confdefs.h"
4984 #include <sys/types.h>
4989 #ifdef _POSIX_SOURCE
4996 rm -f "conftest.$ac_objext"
4997 if { (eval echo "$as_me:4997: \"$ac_compile\"") >&5
4998 (eval $ac_compile) 2>&5
5000 echo "$as_me:5000: \$? = $ac_status" >&5
5001 (exit "$ac_status"); } &&
5002 { ac_try='test -s "conftest.$ac_objext"'
5003 { (eval echo "$as_me:5003: \"$ac_try\"") >&5
5006 echo "$as_me:5006: \$? = $ac_status" >&5
5007 (exit "$ac_status"); }; }; then
5010 echo "$as_me: failed program was:" >&5
5011 cat "conftest.$ac_ext" >&5
5012 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5017 echo "${as_me:-configure}:5017: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5019 CFLAGS="$cf_trim_CFLAGS"
5020 CPPFLAGS="$cf_trim_CPPFLAGS"
5022 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5023 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5025 echo "${as_me:-configure}:5025: testing if the second compile does not leave our definition intact error ..." 1>&5
5027 cat >"conftest.$ac_ext" <<_ACEOF
5028 #line 5028 "configure"
5029 #include "confdefs.h"
5030 #include <sys/types.h>
5035 #ifndef _POSIX_C_SOURCE
5042 rm -f "conftest.$ac_objext"
5043 if { (eval echo "$as_me:5043: \"$ac_compile\"") >&5
5044 (eval $ac_compile) 2>&5
5046 echo "$as_me:5046: \$? = $ac_status" >&5
5047 (exit "$ac_status"); } &&
5048 { ac_try='test -s "conftest.$ac_objext"'
5049 { (eval echo "$as_me:5049: \"$ac_try\"") >&5
5052 echo "$as_me:5052: \$? = $ac_status" >&5
5053 (exit "$ac_status"); }; }; then
5056 echo "$as_me: failed program was:" >&5
5057 cat "conftest.$ac_ext" >&5
5058 cf_cv_posix_c_source=no
5060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5061 CFLAGS="$cf_save_CFLAGS"
5062 CPPFLAGS="$cf_save_CPPFLAGS"
5065 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5068 echo "$as_me:5068: result: $cf_cv_posix_c_source" >&5
5069 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5071 if test "$cf_cv_posix_c_source" != no ; then
5072 CFLAGS="$cf_trim_CFLAGS"
5073 CPPFLAGS="$cf_trim_CPPFLAGS"
5078 cf_new_extra_cppflags=
5080 for cf_add_cflags in $cf_cv_posix_c_source
5082 case "$cf_fix_cppflags" in
5084 case "$cf_add_cflags" in
5085 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5086 case "$cf_add_cflags" in
5088 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5091 && test -z "${cf_tst_cflags}" \
5092 && cf_fix_cppflags=yes
5094 if test "$cf_fix_cppflags" = yes ; then
5096 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5097 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5100 elif test "${cf_tst_cflags}" = "\"'" ; then
5102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5113 case "$cf_add_cflags" in
5115 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5117 CPPFLAGS=`echo "$CPPFLAGS" | \
5118 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5119 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5124 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5125 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5132 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5133 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5140 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5141 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5143 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5146 && test -z "${cf_tst_cflags}" \
5147 && cf_fix_cppflags=no
5152 if test -n "$cf_new_cflags" ; then
5154 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5155 CFLAGS="${CFLAGS}$cf_new_cflags"
5159 if test -n "$cf_new_cppflags" ; then
5161 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5162 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5166 if test -n "$cf_new_extra_cppflags" ; then
5168 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5169 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5175 fi # cf_cv_posix_visible
5180 if test -n "$cf_xopen_source" ; then
5185 cf_new_extra_cppflags=
5187 for cf_add_cflags in $cf_xopen_source
5189 case "$cf_fix_cppflags" in
5191 case "$cf_add_cflags" in
5192 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5193 case "$cf_add_cflags" in
5195 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5197 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5198 && test -z "${cf_tst_cflags}" \
5199 && cf_fix_cppflags=yes
5201 if test "$cf_fix_cppflags" = yes ; then
5203 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5204 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5207 elif test "${cf_tst_cflags}" = "\"'" ; then
5209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5220 case "$cf_add_cflags" in
5222 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5224 CPPFLAGS=`echo "$CPPFLAGS" | \
5225 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5226 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5231 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5232 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5239 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5240 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5247 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5248 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5250 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5252 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5253 && test -z "${cf_tst_cflags}" \
5254 && cf_fix_cppflags=no
5259 if test -n "$cf_new_cflags" ; then
5260 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5262 echo "${as_me:-configure}:5262: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5264 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5265 CFLAGS="${CFLAGS}$cf_new_cflags"
5269 if test -n "$cf_new_cppflags" ; then
5270 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5272 echo "${as_me:-configure}:5272: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5274 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5275 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5279 if test -n "$cf_new_extra_cppflags" ; then
5280 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5282 echo "${as_me:-configure}:5282: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5284 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5285 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5291 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5292 echo "$as_me:5292: checking if _XOPEN_SOURCE really is set" >&5
5293 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5294 cat >"conftest.$ac_ext" <<_ACEOF
5295 #line 5295 "configure"
5296 #include "confdefs.h"
5302 #ifndef _XOPEN_SOURCE
5309 rm -f "conftest.$ac_objext"
5310 if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
5311 (eval $ac_compile) 2>&5
5313 echo "$as_me:5313: \$? = $ac_status" >&5
5314 (exit "$ac_status"); } &&
5315 { ac_try='test -s "conftest.$ac_objext"'
5316 { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5319 echo "$as_me:5319: \$? = $ac_status" >&5
5320 (exit "$ac_status"); }; }; then
5321 cf_XOPEN_SOURCE_set=yes
5323 echo "$as_me: failed program was:" >&5
5324 cat "conftest.$ac_ext" >&5
5325 cf_XOPEN_SOURCE_set=no
5327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5328 echo "$as_me:5328: result: $cf_XOPEN_SOURCE_set" >&5
5329 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5330 if test "$cf_XOPEN_SOURCE_set" = yes
5332 cat >"conftest.$ac_ext" <<_ACEOF
5333 #line 5333 "configure"
5334 #include "confdefs.h"
5340 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5347 rm -f "conftest.$ac_objext"
5348 if { (eval echo "$as_me:5348: \"$ac_compile\"") >&5
5349 (eval $ac_compile) 2>&5
5351 echo "$as_me:5351: \$? = $ac_status" >&5
5352 (exit "$ac_status"); } &&
5353 { ac_try='test -s "conftest.$ac_objext"'
5354 { (eval echo "$as_me:5354: \"$ac_try\"") >&5
5357 echo "$as_me:5357: \$? = $ac_status" >&5
5358 (exit "$ac_status"); }; }; then
5359 cf_XOPEN_SOURCE_set_ok=yes
5361 echo "$as_me: failed program was:" >&5
5362 cat "conftest.$ac_ext" >&5
5363 cf_XOPEN_SOURCE_set_ok=no
5365 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5366 if test "$cf_XOPEN_SOURCE_set_ok" = no
5368 { echo "$as_me:5368: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5369 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5373 echo "$as_me:5373: checking if we should define _XOPEN_SOURCE" >&5
5374 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5375 if test "${cf_cv_xopen_source+set}" = set; then
5376 echo $ECHO_N "(cached) $ECHO_C" >&6
5379 cat >"conftest.$ac_ext" <<_ACEOF
5380 #line 5380 "configure"
5381 #include "confdefs.h"
5385 #include <sys/types.h>
5391 #ifndef _XOPEN_SOURCE
5398 rm -f "conftest.$ac_objext"
5399 if { (eval echo "$as_me:5399: \"$ac_compile\"") >&5
5400 (eval $ac_compile) 2>&5
5402 echo "$as_me:5402: \$? = $ac_status" >&5
5403 (exit "$ac_status"); } &&
5404 { ac_try='test -s "conftest.$ac_objext"'
5405 { (eval echo "$as_me:5405: \"$ac_try\"") >&5
5408 echo "$as_me:5408: \$? = $ac_status" >&5
5409 (exit "$ac_status"); }; }; then
5410 cf_cv_xopen_source=no
5412 echo "$as_me: failed program was:" >&5
5413 cat "conftest.$ac_ext" >&5
5416 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5417 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5419 cat >"conftest.$ac_ext" <<_ACEOF
5420 #line 5420 "configure"
5421 #include "confdefs.h"
5425 #include <sys/types.h>
5431 #ifdef _XOPEN_SOURCE
5438 rm -f "conftest.$ac_objext"
5439 if { (eval echo "$as_me:5439: \"$ac_compile\"") >&5
5440 (eval $ac_compile) 2>&5
5442 echo "$as_me:5442: \$? = $ac_status" >&5
5443 (exit "$ac_status"); } &&
5444 { ac_try='test -s "conftest.$ac_objext"'
5445 { (eval echo "$as_me:5445: \"$ac_try\"") >&5
5448 echo "$as_me:5448: \$? = $ac_status" >&5
5449 (exit "$ac_status"); }; }; then
5450 cf_cv_xopen_source=no
5452 echo "$as_me: failed program was:" >&5
5453 cat "conftest.$ac_ext" >&5
5454 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5460 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5463 echo "$as_me:5463: result: $cf_cv_xopen_source" >&5
5464 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5466 if test "$cf_cv_xopen_source" != no ; then
5468 CFLAGS=`echo "$CFLAGS" | \
5469 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5470 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5472 CPPFLAGS=`echo "$CPPFLAGS" | \
5473 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5474 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5476 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5481 cf_new_extra_cppflags=
5483 for cf_add_cflags in $cf_temp_xopen_source
5485 case "$cf_fix_cppflags" in
5487 case "$cf_add_cflags" in
5488 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5489 case "$cf_add_cflags" in
5491 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5493 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5494 && test -z "${cf_tst_cflags}" \
5495 && cf_fix_cppflags=yes
5497 if test "$cf_fix_cppflags" = yes ; then
5499 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5500 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5503 elif test "${cf_tst_cflags}" = "\"'" ; then
5505 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5506 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5516 case "$cf_add_cflags" in
5518 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5520 CPPFLAGS=`echo "$CPPFLAGS" | \
5521 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5522 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5527 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5528 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5535 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5536 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5543 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5544 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5546 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5548 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5549 && test -z "${cf_tst_cflags}" \
5550 && cf_fix_cppflags=no
5555 if test -n "$cf_new_cflags" ; then
5557 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5558 CFLAGS="${CFLAGS}$cf_new_cflags"
5562 if test -n "$cf_new_cppflags" ; then
5564 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5565 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5569 if test -n "$cf_new_extra_cppflags" ; then
5571 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5572 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5580 fi # cf_cv_posix_visible
5582 echo "$as_me:5582: checking for signal global datatype" >&5
5583 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5584 if test "${cf_cv_sig_atomic_t+set}" = set; then
5585 echo $ECHO_N "(cached) $ECHO_C" >&6
5589 "volatile sig_atomic_t" \
5593 cat >"conftest.$ac_ext" <<_ACEOF
5594 #line 5594 "configure"
5595 #include "confdefs.h"
5597 #include <sys/types.h>
5603 static void handler(int sig)
5611 signal(SIGINT, handler);
5617 rm -f "conftest.$ac_objext"
5618 if { (eval echo "$as_me:5618: \"$ac_compile\"") >&5
5619 (eval $ac_compile) 2>&5
5621 echo "$as_me:5621: \$? = $ac_status" >&5
5622 (exit "$ac_status"); } &&
5623 { ac_try='test -s "conftest.$ac_objext"'
5624 { (eval echo "$as_me:5624: \"$ac_try\"") >&5
5627 echo "$as_me:5627: \$? = $ac_status" >&5
5628 (exit "$ac_status"); }; }; then
5629 cf_cv_sig_atomic_t=$cf_type
5631 echo "$as_me: failed program was:" >&5
5632 cat "conftest.$ac_ext" >&5
5633 cf_cv_sig_atomic_t=no
5635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5636 test "$cf_cv_sig_atomic_t" != no && break
5641 echo "$as_me:5641: result: $cf_cv_sig_atomic_t" >&5
5642 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5643 test "$cf_cv_sig_atomic_t" != no &&
5644 cat >>confdefs.h <<EOF
5645 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5648 # Work around breakage on OS X
5650 echo "$as_me:5650: checking if SIGWINCH is defined" >&5
5651 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
5652 if test "${cf_cv_define_sigwinch+set}" = set; then
5653 echo $ECHO_N "(cached) $ECHO_C" >&6
5656 cat >"conftest.$ac_ext" <<_ACEOF
5657 #line 5657 "configure"
5658 #include "confdefs.h"
5660 #include <sys/types.h>
5661 #include <sys/signal.h>
5666 int x = SIGWINCH; (void)x
5671 rm -f "conftest.$ac_objext"
5672 if { (eval echo "$as_me:5672: \"$ac_compile\"") >&5
5673 (eval $ac_compile) 2>&5
5675 echo "$as_me:5675: \$? = $ac_status" >&5
5676 (exit "$ac_status"); } &&
5677 { ac_try='test -s "conftest.$ac_objext"'
5678 { (eval echo "$as_me:5678: \"$ac_try\"") >&5
5681 echo "$as_me:5681: \$? = $ac_status" >&5
5682 (exit "$ac_status"); }; }; then
5683 cf_cv_define_sigwinch=yes
5685 echo "$as_me: failed program was:" >&5
5686 cat "conftest.$ac_ext" >&5
5687 cat >"conftest.$ac_ext" <<_ACEOF
5688 #line 5688 "configure"
5689 #include "confdefs.h"
5691 #undef _XOPEN_SOURCE
5692 #undef _POSIX_SOURCE
5693 #undef _POSIX_C_SOURCE
5694 #include <sys/types.h>
5695 #include <sys/signal.h>
5700 int x = SIGWINCH; (void)x
5705 rm -f "conftest.$ac_objext"
5706 if { (eval echo "$as_me:5706: \"$ac_compile\"") >&5
5707 (eval $ac_compile) 2>&5
5709 echo "$as_me:5709: \$? = $ac_status" >&5
5710 (exit "$ac_status"); } &&
5711 { ac_try='test -s "conftest.$ac_objext"'
5712 { (eval echo "$as_me:5712: \"$ac_try\"") >&5
5715 echo "$as_me:5715: \$? = $ac_status" >&5
5716 (exit "$ac_status"); }; }; then
5717 cf_cv_define_sigwinch=maybe
5719 echo "$as_me: failed program was:" >&5
5720 cat "conftest.$ac_ext" >&5
5721 cf_cv_define_sigwinch=no
5723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5726 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5729 echo "$as_me:5729: result: $cf_cv_define_sigwinch" >&5
5730 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
5732 if test "$cf_cv_define_sigwinch" = maybe ; then
5733 echo "$as_me:5733: checking for actual SIGWINCH definition" >&5
5734 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
5735 if test "${cf_cv_fixup_sigwinch+set}" = set; then
5736 echo $ECHO_N "(cached) $ECHO_C" >&6
5739 cf_cv_fixup_sigwinch=unknown
5741 while test "$cf_sigwinch" != 1
5743 cat >"conftest.$ac_ext" <<_ACEOF
5744 #line 5744 "configure"
5745 #include "confdefs.h"
5747 #undef _XOPEN_SOURCE
5748 #undef _POSIX_SOURCE
5749 #undef _POSIX_C_SOURCE
5750 #include <sys/types.h>
5751 #include <sys/signal.h>
5757 #if SIGWINCH != $cf_sigwinch
5760 int x = SIGWINCH; (void)x
5765 rm -f "conftest.$ac_objext"
5766 if { (eval echo "$as_me:5766: \"$ac_compile\"") >&5
5767 (eval $ac_compile) 2>&5
5769 echo "$as_me:5769: \$? = $ac_status" >&5
5770 (exit "$ac_status"); } &&
5771 { ac_try='test -s "conftest.$ac_objext"'
5772 { (eval echo "$as_me:5772: \"$ac_try\"") >&5
5775 echo "$as_me:5775: \$? = $ac_status" >&5
5776 (exit "$ac_status"); }; }; then
5777 cf_cv_fixup_sigwinch=$cf_sigwinch
5780 echo "$as_me: failed program was:" >&5
5781 cat "conftest.$ac_ext" >&5
5783 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5785 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
5789 echo "$as_me:5789: result: $cf_cv_fixup_sigwinch" >&5
5790 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
5792 if test "$cf_cv_fixup_sigwinch" != unknown ; then
5793 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
5797 # Checks for CODESET support.
5799 echo "$as_me:5799: checking for nl_langinfo and CODESET" >&5
5800 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5801 if test "${am_cv_langinfo_codeset+set}" = set; then
5802 echo $ECHO_N "(cached) $ECHO_C" >&6
5804 cat >"conftest.$ac_ext" <<_ACEOF
5805 #line 5805 "configure"
5806 #include "confdefs.h"
5807 #include <langinfo.h>
5811 char* cs = nl_langinfo(CODESET); (void)cs
5816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5817 if { (eval echo "$as_me:5817: \"$ac_link\"") >&5
5818 (eval $ac_link) 2>&5
5820 echo "$as_me:5820: \$? = $ac_status" >&5
5821 (exit "$ac_status"); } &&
5822 { ac_try='test -s "conftest$ac_exeext"'
5823 { (eval echo "$as_me:5823: \"$ac_try\"") >&5
5826 echo "$as_me:5826: \$? = $ac_status" >&5
5827 (exit "$ac_status"); }; }; then
5828 am_cv_langinfo_codeset=yes
5830 echo "$as_me: failed program was:" >&5
5831 cat "conftest.$ac_ext" >&5
5832 am_cv_langinfo_codeset=no
5834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5837 echo "$as_me:5837: result: $am_cv_langinfo_codeset" >&5
5838 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5839 if test "$am_cv_langinfo_codeset" = yes; then
5841 cat >>confdefs.h <<\EOF
5842 #define HAVE_LANGINFO_CODESET 1
5847 echo "$as_me:5847: checking if you want to use pkg-config" >&5
5848 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
5850 # Check whether --with-pkg-config or --without-pkg-config was given.
5851 if test "${with_pkg_config+set}" = set; then
5852 withval="$with_pkg_config"
5853 cf_pkg_config=$withval
5857 echo "$as_me:5857: result: $cf_pkg_config" >&5
5858 echo "${ECHO_T}$cf_pkg_config" >&6
5860 case "$cf_pkg_config" in
5866 if test -n "$ac_tool_prefix"; then
5867 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5868 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5869 echo "$as_me:5869: checking for $ac_word" >&5
5870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5871 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
5872 echo $ECHO_N "(cached) $ECHO_C" >&6
5876 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5879 ac_save_IFS=$IFS; IFS=$ac_path_separator
5881 for ac_dir in $ac_dummy; do
5883 test -z "$ac_dir" && ac_dir=.
5884 if $as_executable_p "$ac_dir/$ac_word"; then
5885 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
5886 echo "$as_me:5886: found $ac_dir/$ac_word" >&5
5894 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5896 if test -n "$PKG_CONFIG"; then
5897 echo "$as_me:5897: result: $PKG_CONFIG" >&5
5898 echo "${ECHO_T}$PKG_CONFIG" >&6
5900 echo "$as_me:5900: result: no" >&5
5901 echo "${ECHO_T}no" >&6
5905 if test -z "$ac_cv_path_PKG_CONFIG"; then
5906 ac_pt_PKG_CONFIG=$PKG_CONFIG
5907 # Extract the first word of "pkg-config", so it can be a program name with args.
5908 set dummy pkg-config; ac_word=$2
5909 echo "$as_me:5909: checking for $ac_word" >&5
5910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5911 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
5912 echo $ECHO_N "(cached) $ECHO_C" >&6
5914 case $ac_pt_PKG_CONFIG in
5916 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5919 ac_save_IFS=$IFS; IFS=$ac_path_separator
5921 for ac_dir in $ac_dummy; do
5923 test -z "$ac_dir" && ac_dir=.
5924 if $as_executable_p "$ac_dir/$ac_word"; then
5925 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
5926 echo "$as_me:5926: found $ac_dir/$ac_word" >&5
5931 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
5935 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5937 if test -n "$ac_pt_PKG_CONFIG"; then
5938 echo "$as_me:5938: result: $ac_pt_PKG_CONFIG" >&5
5939 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
5941 echo "$as_me:5941: result: no" >&5
5942 echo "${ECHO_T}no" >&6
5945 PKG_CONFIG=$ac_pt_PKG_CONFIG
5947 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5956 test -z "$PKG_CONFIG" && PKG_CONFIG=none
5957 if test "$PKG_CONFIG" != none ; then
5959 if test "x$prefix" != xNONE; then
5960 cf_path_syntax="$prefix"
5962 cf_path_syntax="$ac_default_prefix"
5965 case ".$PKG_CONFIG" in
5970 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5972 (.\$\{*prefix\}*|.\$\{*dir\}*)
5973 eval PKG_CONFIG="$PKG_CONFIG"
5974 case ".$PKG_CONFIG" in
5976 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
5981 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
5984 { { echo "$as_me:5984: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
5985 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
5986 { (exit 1); exit 1; }; }
5990 elif test "x$cf_pkg_config" != xno ; then
5991 { echo "$as_me:5991: WARNING: pkg-config is not installed" >&5
5992 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
5995 echo "$as_me:5995: checking if you want to see long compiling messages" >&5
5996 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
5998 # Check whether --enable-echo or --disable-echo was given.
5999 if test "${enable_echo+set}" = set; then
6000 enableval="$enable_echo"
6001 test "$enableval" != no && enableval=yes
6002 if test "$enableval" != "yes" ; then
6005 ECHO_LD='@echo linking $@;'
6006 RULE_CC='@echo compiling $<'
6007 SHOW_CC='@echo compiling $@'
6029 echo "$as_me:6029: result: $enableval" >&5
6030 echo "${ECHO_T}$enableval" >&6
6032 echo "$as_me:6032: checking for ncurses wrap-prefix" >&5
6033 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6035 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6036 if test "${with_ncurses_wrap_prefix+set}" = set; then
6037 withval="$with_ncurses_wrap_prefix"
6038 NCURSES_WRAP_PREFIX=$withval
6040 NCURSES_WRAP_PREFIX=_nc_
6042 echo "$as_me:6042: result: $NCURSES_WRAP_PREFIX" >&5
6043 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6045 echo "$as_me:6045: checking if you want to check for wide-character functions" >&5
6046 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6048 # Check whether --enable-widec or --disable-widec was given.
6049 if test "${enable_widec+set}" = set; then
6050 enableval="$enable_widec"
6051 test "$enableval" != no && enableval=yes
6052 if test "$enableval" != "yes" ; then
6062 echo "$as_me:6062: result: $cf_enable_widec" >&5
6063 echo "${ECHO_T}$cf_enable_widec" >&6
6065 echo "$as_me:6065: checking for specific curses-directory" >&5
6066 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6068 # Check whether --with-curses-dir or --without-curses-dir was given.
6069 if test "${with_curses_dir+set}" = set; then
6070 withval="$with_curses_dir"
6071 cf_cv_curses_dir=$withval
6075 echo "$as_me:6075: result: $cf_cv_curses_dir" >&5
6076 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6078 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6081 if test "x$prefix" != xNONE; then
6082 cf_path_syntax="$prefix"
6084 cf_path_syntax="$ac_default_prefix"
6092 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6094 (.\$\{*prefix\}*|.\$\{*dir\}*)
6095 eval withval="$withval"
6098 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6103 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6106 { { echo "$as_me:6106: error: expected a pathname, not \"$withval\"" >&5
6107 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6108 { (exit 1); exit 1; }; }
6112 if test -d "$cf_cv_curses_dir"
6115 if test -n "$cf_cv_curses_dir/include" ; then
6116 for cf_add_incdir in $cf_cv_curses_dir/include
6118 while test "$cf_add_incdir" != /usr/include
6120 if test -d "$cf_add_incdir"
6123 if test -n "$CFLAGS$CPPFLAGS" ; then
6124 # a loop is needed to ensure we can add subdirs of existing dirs
6125 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6126 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6127 cf_have_incdir=yes; break
6132 if test "$cf_have_incdir" = no ; then
6133 if test "$cf_add_incdir" = /usr/local/include ; then
6134 if test "$GCC" = yes
6136 cf_save_CPPFLAGS=$CPPFLAGS
6138 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6139 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6141 cat >"conftest.$ac_ext" <<_ACEOF
6142 #line 6142 "configure"
6143 #include "confdefs.h"
6153 rm -f "conftest.$ac_objext"
6154 if { (eval echo "$as_me:6154: \"$ac_compile\"") >&5
6155 (eval $ac_compile) 2>&5
6157 echo "$as_me:6157: \$? = $ac_status" >&5
6158 (exit "$ac_status"); } &&
6159 { ac_try='test -s "conftest.$ac_objext"'
6160 { (eval echo "$as_me:6160: \"$ac_try\"") >&5
6163 echo "$as_me:6163: \$? = $ac_status" >&5
6164 (exit "$ac_status"); }; }; then
6167 echo "$as_me: failed program was:" >&5
6168 cat "conftest.$ac_ext" >&5
6171 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6172 CPPFLAGS=$cf_save_CPPFLAGS
6177 if test "$cf_have_incdir" = no ; then
6178 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6180 echo "${as_me:-configure}:6180: testing adding $cf_add_incdir to include-path ..." 1>&5
6182 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6184 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6185 test "$cf_top_incdir" = "$cf_add_incdir" && break
6186 cf_add_incdir="$cf_top_incdir"
6197 if test -n "$cf_cv_curses_dir/lib" ; then
6198 for cf_add_libdir in $cf_cv_curses_dir/lib
6200 if test "$cf_add_libdir" = /usr/lib ; then
6202 elif test -d "$cf_add_libdir"
6205 if test -n "$LDFLAGS$LIBS" ; then
6206 # a loop is needed to ensure we can add subdirs of existing dirs
6207 for cf_test_libdir in $LDFLAGS $LIBS ; do
6208 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6209 cf_have_libdir=yes; break
6213 if test "$cf_have_libdir" = no ; then
6214 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6216 echo "${as_me:-configure}:6216: testing adding $cf_add_libdir to library-path ..." 1>&5
6218 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6229 echo "$as_me:6229: checking for specified curses library type" >&5
6230 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6232 # Check whether --with-screen or --without-screen was given.
6233 if test "${with_screen+set}" = set; then
6234 withval="$with_screen"
6235 cf_cv_screen=$withval
6238 # Check whether --with-ncursesw or --without-ncursesw was given.
6239 if test "${with_ncursesw+set}" = set; then
6240 withval="$with_ncursesw"
6241 cf_cv_screen=ncursesw
6244 # Check whether --with-ncurses or --without-ncurses was given.
6245 if test "${with_ncurses+set}" = set; then
6246 withval="$with_ncurses"
6247 cf_cv_screen=ncurses
6250 # Check whether --with-pdcurses or --without-pdcurses was given.
6251 if test "${with_pdcurses+set}" = set; then
6252 withval="$with_pdcurses"
6253 cf_cv_screen=pdcurses
6256 # Check whether --with-curses-colr or --without-curses-colr was given.
6257 if test "${with_curses_colr+set}" = set; then
6258 withval="$with_curses_colr"
6259 cf_cv_screen=curses_colr
6262 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6263 if test "${with_curses_5lib+set}" = set; then
6264 withval="$with_curses_5lib"
6265 cf_cv_screen=curses_5lib
6273 echo "$as_me:6273: result: $cf_cv_screen" >&5
6274 echo "${ECHO_T}$cf_cv_screen" >&6
6276 case $cf_cv_screen in
6279 echo "$as_me:6279: checking for extra include directories" >&5
6280 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6281 if test "${cf_cv_curses_incdir+set}" = set; then
6282 echo $ECHO_N "(cached) $ECHO_C" >&6
6285 cf_cv_curses_incdir=no
6288 if test "x$cf_cv_screen" = "xcurses_colr"
6290 test -d /usr/include/curses_colr && \
6291 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6295 if test "x$cf_cv_screen" = "xcurses_5lib"
6297 test -d /usr/5lib && \
6298 test -d /usr/5include && \
6299 cf_cv_curses_incdir="-I/usr/5include"
6305 echo "$as_me:6305: result: $cf_cv_curses_incdir" >&5
6306 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6307 if test "$cf_cv_curses_incdir" != no
6310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6311 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6315 echo "$as_me:6315: checking if we have identified curses headers" >&5
6316 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6317 if test "${cf_cv_ncurses_header+set}" = set; then
6318 echo $ECHO_N "(cached) $ECHO_C" >&6
6321 cf_cv_ncurses_header=none
6324 curses.h ncurses/ncurses.h ncurses/curses.h
6326 cat >"conftest.$ac_ext" <<_ACEOF
6327 #line 6327 "configure"
6328 #include "confdefs.h"
6329 #include <${cf_header}>
6333 initscr(); tgoto("?", 0,0)
6338 rm -f "conftest.$ac_objext"
6339 if { (eval echo "$as_me:6339: \"$ac_compile\"") >&5
6340 (eval $ac_compile) 2>&5
6342 echo "$as_me:6342: \$? = $ac_status" >&5
6343 (exit "$ac_status"); } &&
6344 { ac_try='test -s "conftest.$ac_objext"'
6345 { (eval echo "$as_me:6345: \"$ac_try\"") >&5
6348 echo "$as_me:6348: \$? = $ac_status" >&5
6349 (exit "$ac_status"); }; }; then
6350 cf_cv_ncurses_header=$cf_header; break
6352 echo "$as_me: failed program was:" >&5
6353 cat "conftest.$ac_ext" >&5
6355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6359 echo "$as_me:6359: result: $cf_cv_ncurses_header" >&5
6360 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6362 if test "$cf_cv_ncurses_header" = none ; then
6363 { { echo "$as_me:6363: error: No curses header-files found" >&5
6364 echo "$as_me: error: No curses header-files found" >&2;}
6365 { (exit 1); exit 1; }; }
6368 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6370 for ac_header in $cf_cv_ncurses_header
6372 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6373 echo "$as_me:6373: checking for $ac_header" >&5
6374 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6375 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6376 echo $ECHO_N "(cached) $ECHO_C" >&6
6378 cat >"conftest.$ac_ext" <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #include <$ac_header>
6383 if { (eval echo "$as_me:6383: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6384 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6386 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6388 cat conftest.err >&5
6389 echo "$as_me:6389: \$? = $ac_status" >&5
6390 (exit "$ac_status"); } >/dev/null; then
6391 if test -s conftest.err; then
6392 ac_cpp_err=$ac_c_preproc_warn_flag
6399 if test -z "$ac_cpp_err"; then
6400 eval "$as_ac_Header=yes"
6402 echo "$as_me: failed program was:" >&5
6403 cat "conftest.$ac_ext" >&5
6404 eval "$as_ac_Header=no"
6406 rm -f conftest.err "conftest.$ac_ext"
6408 echo "$as_me:6408: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6409 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6410 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6411 cat >>confdefs.h <<EOF
6412 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6418 echo "$as_me:6418: checking for terminfo header" >&5
6419 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6420 if test "${cf_cv_term_header+set}" = set; then
6421 echo $ECHO_N "(cached) $ECHO_C" >&6
6424 case "${cf_cv_ncurses_header}" in
6425 (*/ncurses.h|*/ncursesw.h)
6426 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6429 cf_term_header=term.h
6433 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6435 cat >"conftest.$ac_ext" <<_ACEOF
6436 #line 6436 "configure"
6437 #include "confdefs.h"
6439 #include <${cf_cv_ncurses_header:-curses.h}>
6445 int x = auto_left_margin; (void)x
6450 rm -f "conftest.$ac_objext"
6451 if { (eval echo "$as_me:6451: \"$ac_compile\"") >&5
6452 (eval $ac_compile) 2>&5
6454 echo "$as_me:6454: \$? = $ac_status" >&5
6455 (exit "$ac_status"); } &&
6456 { ac_try='test -s "conftest.$ac_objext"'
6457 { (eval echo "$as_me:6457: \"$ac_try\"") >&5
6460 echo "$as_me:6460: \$? = $ac_status" >&5
6461 (exit "$ac_status"); }; }; then
6463 cf_cv_term_header="$cf_test"
6465 echo "$as_me: failed program was:" >&5
6466 cat "conftest.$ac_ext" >&5
6468 cf_cv_term_header=unknown
6471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6472 test "$cf_cv_term_header" != unknown && break
6476 echo "$as_me:6476: result: $cf_cv_term_header" >&5
6477 echo "${ECHO_T}$cf_cv_term_header" >&6
6479 # Set definitions to allow ifdef'ing to accommodate subdirectories
6481 case "$cf_cv_term_header" in
6484 cat >>confdefs.h <<\EOF
6485 #define HAVE_TERM_H 1
6491 case "$cf_cv_term_header" in
6494 cat >>confdefs.h <<\EOF
6495 #define HAVE_NCURSES_TERM_H 1
6501 cat >>confdefs.h <<\EOF
6502 #define HAVE_NCURSESW_TERM_H 1
6508 echo "$as_me:6508: checking for ncurses version" >&5
6509 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6510 if test "${cf_cv_ncurses_version+set}" = set; then
6511 echo $ECHO_N "(cached) $ECHO_C" >&6
6514 cf_cv_ncurses_version=no
6516 rm -f "$cf_tempfile"
6517 if test "$cross_compiling" = yes; then
6519 # This will not work if the preprocessor splits the line after the
6520 # Autoconf token. The 'unproto' program does that.
6521 cat > "conftest.$ac_ext" <<EOF
6522 #include <${cf_cv_ncurses_header:-curses.h}>
6524 #ifdef NCURSES_VERSION
6525 Autoconf NCURSES_VERSION
6533 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6534 { (eval echo "$as_me:6534: \"$cf_try\"") >&5
6537 echo "$as_me:6537: \$? = $ac_status" >&5
6538 (exit "$ac_status"); }
6539 if test -f conftest.out ; then
6540 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6541 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6546 cat >"conftest.$ac_ext" <<_ACEOF
6547 #line 6547 "configure"
6548 #include "confdefs.h"
6550 #include <${cf_cv_ncurses_header:-curses.h}>
6554 FILE *fp = fopen("$cf_tempfile", "w");
6555 #ifdef NCURSES_VERSION
6556 # ifdef NCURSES_VERSION_PATCH
6557 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6559 fprintf(fp, "%s\\n", NCURSES_VERSION);
6563 fprintf(fp, "old\\n");
6568 ${cf_cv_main_return:-return}(0);
6571 rm -f "conftest$ac_exeext"
6572 if { (eval echo "$as_me:6572: \"$ac_link\"") >&5
6573 (eval $ac_link) 2>&5
6575 echo "$as_me:6575: \$? = $ac_status" >&5
6576 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6577 { (eval echo "$as_me:6577: \"$ac_try\"") >&5
6580 echo "$as_me:6580: \$? = $ac_status" >&5
6581 (exit "$ac_status"); }; }; then
6583 cf_cv_ncurses_version=`cat $cf_tempfile`
6585 echo "$as_me: program exited with status $ac_status" >&5
6586 echo "$as_me: failed program was:" >&5
6587 cat "conftest.$ac_ext" >&5
6589 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6591 rm -f "$cf_tempfile"
6594 echo "$as_me:6594: result: $cf_cv_ncurses_version" >&5
6595 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6596 test "$cf_cv_ncurses_version" = no ||
6597 cat >>confdefs.h <<\EOF
6601 echo "$as_me:6601: checking if we have identified curses libraries" >&5
6602 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
6603 cat >"conftest.$ac_ext" <<_ACEOF
6604 #line 6604 "configure"
6605 #include "confdefs.h"
6606 #include <${cf_cv_ncurses_header:-curses.h}>
6610 initscr(); tgoto("?", 0,0)
6615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6616 if { (eval echo "$as_me:6616: \"$ac_link\"") >&5
6617 (eval $ac_link) 2>&5
6619 echo "$as_me:6619: \$? = $ac_status" >&5
6620 (exit "$ac_status"); } &&
6621 { ac_try='test -s "conftest$ac_exeext"'
6622 { (eval echo "$as_me:6622: \"$ac_try\"") >&5
6625 echo "$as_me:6625: \$? = $ac_status" >&5
6626 (exit "$ac_status"); }; }; then
6629 echo "$as_me: failed program was:" >&5
6630 cat "conftest.$ac_ext" >&5
6633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6634 echo "$as_me:6634: result: $cf_result" >&5
6635 echo "${ECHO_T}$cf_result" >&6
6637 if test "$cf_result" = no ; then
6640 echo "$as_me:6640: checking for tgoto in -lmytinfo" >&5
6641 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6642 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6643 echo $ECHO_N "(cached) $ECHO_C" >&6
6645 ac_check_lib_save_LIBS=$LIBS
6646 LIBS="-lmytinfo $LIBS"
6647 cat >"conftest.$ac_ext" <<_ACEOF
6648 #line 6648 "configure"
6649 #include "confdefs.h"
6651 /* Override any gcc2 internal prototype to avoid an error. */
6655 /* We use char because int might match the return type of a gcc2
6656 builtin and then its argument prototype would still apply. */
6666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6667 if { (eval echo "$as_me:6667: \"$ac_link\"") >&5
6668 (eval $ac_link) 2>&5
6670 echo "$as_me:6670: \$? = $ac_status" >&5
6671 (exit "$ac_status"); } &&
6672 { ac_try='test -s "conftest$ac_exeext"'
6673 { (eval echo "$as_me:6673: \"$ac_try\"") >&5
6676 echo "$as_me:6676: \$? = $ac_status" >&5
6677 (exit "$ac_status"); }; }; then
6678 ac_cv_lib_mytinfo_tgoto=yes
6680 echo "$as_me: failed program was:" >&5
6681 cat "conftest.$ac_ext" >&5
6682 ac_cv_lib_mytinfo_tgoto=no
6684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6685 LIBS=$ac_check_lib_save_LIBS
6687 echo "$as_me:6687: result: $ac_cv_lib_mytinfo_tgoto" >&5
6688 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6689 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6694 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6696 for cf_add_1lib in $cf_add_0lib; do
6697 for cf_add_2lib in $cf_add_libs; do
6698 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6703 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6711 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
6712 # next (1998), and xcurses "newer" (2000). There is no header file for
6713 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
6714 # term.h) for cur_colr
6715 if test "x$cf_cv_screen" = "xcurses_colr"
6717 echo "$as_me:6717: checking for initscr in -lcur_colr" >&5
6718 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
6719 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
6720 echo $ECHO_N "(cached) $ECHO_C" >&6
6722 ac_check_lib_save_LIBS=$LIBS
6723 LIBS="-lcur_colr $LIBS"
6724 cat >"conftest.$ac_ext" <<_ACEOF
6725 #line 6725 "configure"
6726 #include "confdefs.h"
6728 /* Override any gcc2 internal prototype to avoid an error. */
6732 /* We use char because int might match the return type of a gcc2
6733 builtin and then its argument prototype would still apply. */
6743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6744 if { (eval echo "$as_me:6744: \"$ac_link\"") >&5
6745 (eval $ac_link) 2>&5
6747 echo "$as_me:6747: \$? = $ac_status" >&5
6748 (exit "$ac_status"); } &&
6749 { ac_try='test -s "conftest$ac_exeext"'
6750 { (eval echo "$as_me:6750: \"$ac_try\"") >&5
6753 echo "$as_me:6753: \$? = $ac_status" >&5
6754 (exit "$ac_status"); }; }; then
6755 ac_cv_lib_cur_colr_initscr=yes
6757 echo "$as_me: failed program was:" >&5
6758 cat "conftest.$ac_ext" >&5
6759 ac_cv_lib_cur_colr_initscr=no
6761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6762 LIBS=$ac_check_lib_save_LIBS
6764 echo "$as_me:6764: result: $ac_cv_lib_cur_colr_initscr" >&5
6765 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
6766 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
6771 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6773 for cf_add_1lib in $cf_add_0lib; do
6774 for cf_add_2lib in $cf_add_libs; do
6775 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6780 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6784 ac_cv_func_initscr=yes
6788 echo "$as_me:6788: checking for initscr in -lHcurses" >&5
6789 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
6790 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
6791 echo $ECHO_N "(cached) $ECHO_C" >&6
6793 ac_check_lib_save_LIBS=$LIBS
6794 LIBS="-lHcurses $LIBS"
6795 cat >"conftest.$ac_ext" <<_ACEOF
6796 #line 6796 "configure"
6797 #include "confdefs.h"
6799 /* Override any gcc2 internal prototype to avoid an error. */
6803 /* We use char because int might match the return type of a gcc2
6804 builtin and then its argument prototype would still apply. */
6814 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6815 if { (eval echo "$as_me:6815: \"$ac_link\"") >&5
6816 (eval $ac_link) 2>&5
6818 echo "$as_me:6818: \$? = $ac_status" >&5
6819 (exit "$ac_status"); } &&
6820 { ac_try='test -s "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
6826 ac_cv_lib_Hcurses_initscr=yes
6828 echo "$as_me: failed program was:" >&5
6829 cat "conftest.$ac_ext" >&5
6830 ac_cv_lib_Hcurses_initscr=no
6832 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6833 LIBS=$ac_check_lib_save_LIBS
6835 echo "$as_me:6835: result: $ac_cv_lib_Hcurses_initscr" >&5
6836 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6837 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
6839 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6844 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6846 for cf_add_1lib in $cf_add_0lib; do
6847 for cf_add_2lib in $cf_add_libs; do
6848 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6853 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6857 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6858 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
6860 ac_cv_func_initscr=yes
6869 case `arch 2>/dev/null` in
6874 if test -n "/lib64" ; then
6875 for cf_add_libdir in /lib64
6877 if test "$cf_add_libdir" = /usr/lib ; then
6879 elif test -d "$cf_add_libdir"
6882 if test -n "$LDFLAGS$LIBS" ; then
6883 # a loop is needed to ensure we can add subdirs of existing dirs
6884 for cf_test_libdir in $LDFLAGS $LIBS ; do
6885 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6886 cf_have_libdir=yes; break
6890 if test "$cf_have_libdir" = no ; then
6891 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6893 echo "${as_me:-configure}:6893: testing adding $cf_add_libdir to library-path ..." 1>&5
6895 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6903 if test -n "/lib" ; then
6904 for cf_add_libdir in /lib
6906 if test "$cf_add_libdir" = /usr/lib ; then
6908 elif test -d "$cf_add_libdir"
6911 if test -n "$LDFLAGS$LIBS" ; then
6912 # a loop is needed to ensure we can add subdirs of existing dirs
6913 for cf_test_libdir in $LDFLAGS $LIBS ; do
6914 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6915 cf_have_libdir=yes; break
6919 if test "$cf_have_libdir" = no ; then
6920 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6922 echo "${as_me:-configure}:6922: testing adding $cf_add_libdir to library-path ..." 1>&5
6924 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6934 if test -n "/lib" ; then
6935 for cf_add_libdir in /lib
6937 if test "$cf_add_libdir" = /usr/lib ; then
6939 elif test -d "$cf_add_libdir"
6942 if test -n "$LDFLAGS$LIBS" ; then
6943 # a loop is needed to ensure we can add subdirs of existing dirs
6944 for cf_test_libdir in $LDFLAGS $LIBS ; do
6945 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6946 cf_have_libdir=yes; break
6950 if test "$cf_have_libdir" = no ; then
6951 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6953 echo "${as_me:-configure}:6953: testing adding $cf_add_libdir to library-path ..." 1>&5
6955 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6965 if test "x$cf_cv_screen" = "xcurses_5lib"
6967 if test -d /usr/5lib ; then
6969 if test -n "/usr/5lib" ; then
6970 for cf_add_libdir in /usr/5lib
6972 if test "$cf_add_libdir" = /usr/lib ; then
6974 elif test -d "$cf_add_libdir"
6977 if test -n "$LDFLAGS$LIBS" ; then
6978 # a loop is needed to ensure we can add subdirs of existing dirs
6979 for cf_test_libdir in $LDFLAGS $LIBS ; do
6980 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6981 cf_have_libdir=yes; break
6985 if test "$cf_have_libdir" = no ; then
6986 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6988 echo "${as_me:-configure}:6988: testing adding $cf_add_libdir to library-path ..." 1>&5
6990 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6999 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7001 for cf_add_1lib in $cf_add_0lib; do
7002 for cf_add_2lib in $cf_add_libs; do
7003 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7008 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7014 ac_cv_func_initscr=yes
7018 if test ".$ac_cv_func_initscr" != .yes ; then
7019 cf_save_LIBS="$LIBS"
7021 if test ".${cf_cv_ncurses_version:-no}" != .no
7023 cf_check_list="ncurses curses cursesX"
7025 cf_check_list="cursesX curses ncurses"
7028 # Check for library containing tgoto. Do this before curses library
7029 # because it may be needed to link the test-case for initscr.
7030 if test "x$cf_term_lib" = x
7032 echo "$as_me:7032: checking for tgoto" >&5
7033 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7034 if test "${ac_cv_func_tgoto+set}" = set; then
7035 echo $ECHO_N "(cached) $ECHO_C" >&6
7037 cat >"conftest.$ac_ext" <<_ACEOF
7038 #line 7038 "configure"
7039 #include "confdefs.h"
7040 #define tgoto autoconf_temporary
7041 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7048 /* We use char because int might match the return type of a gcc2
7049 builtin and then its argument prototype would still apply. */
7056 /* The GNU C library defines stubs for functions which it implements
7057 to always fail with ENOSYS. Some functions are actually named
7058 something starting with __ and the normal name is an alias. */
7059 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7060 #error found stub for tgoto
7068 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7069 if { (eval echo "$as_me:7069: \"$ac_link\"") >&5
7070 (eval $ac_link) 2>&5
7072 echo "$as_me:7072: \$? = $ac_status" >&5
7073 (exit "$ac_status"); } &&
7074 { ac_try='test -s "conftest$ac_exeext"'
7075 { (eval echo "$as_me:7075: \"$ac_try\"") >&5
7078 echo "$as_me:7078: \$? = $ac_status" >&5
7079 (exit "$ac_status"); }; }; then
7080 ac_cv_func_tgoto=yes
7082 echo "$as_me: failed program was:" >&5
7083 cat "conftest.$ac_ext" >&5
7086 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7088 echo "$as_me:7088: result: $ac_cv_func_tgoto" >&5
7089 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7090 if test "$ac_cv_func_tgoto" = yes; then
7091 cf_term_lib=predefined
7094 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7096 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7097 echo "$as_me:7097: checking for tgoto in -l$cf_term_lib" >&5
7098 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7099 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7100 echo $ECHO_N "(cached) $ECHO_C" >&6
7102 ac_check_lib_save_LIBS=$LIBS
7103 LIBS="-l$cf_term_lib $LIBS"
7104 cat >"conftest.$ac_ext" <<_ACEOF
7105 #line 7105 "configure"
7106 #include "confdefs.h"
7108 /* Override any gcc2 internal prototype to avoid an error. */
7112 /* We use char because int might match the return type of a gcc2
7113 builtin and then its argument prototype would still apply. */
7123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7124 if { (eval echo "$as_me:7124: \"$ac_link\"") >&5
7125 (eval $ac_link) 2>&5
7127 echo "$as_me:7127: \$? = $ac_status" >&5
7128 (exit "$ac_status"); } &&
7129 { ac_try='test -s "conftest$ac_exeext"'
7130 { (eval echo "$as_me:7130: \"$ac_try\"") >&5
7133 echo "$as_me:7133: \$? = $ac_status" >&5
7134 (exit "$ac_status"); }; }; then
7135 eval "$as_ac_Lib=yes"
7137 echo "$as_me: failed program was:" >&5
7138 cat "conftest.$ac_ext" >&5
7139 eval "$as_ac_Lib=no"
7141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7142 LIBS=$ac_check_lib_save_LIBS
7144 echo "$as_me:7144: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7145 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7146 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7148 : "${cf_nculib_root:=$cf_term_lib}"
7159 # Check for library containing initscr
7160 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7161 if test "x$cf_curs_lib" = x
7163 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7165 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7166 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7167 echo "$as_me:7167: checking if we can link with $cf_curs_lib library" >&5
7168 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7169 cat >"conftest.$ac_ext" <<_ACEOF
7170 #line 7170 "configure"
7171 #include "confdefs.h"
7172 #include <${cf_cv_ncurses_header:-curses.h}>
7181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7182 if { (eval echo "$as_me:7182: \"$ac_link\"") >&5
7183 (eval $ac_link) 2>&5
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit "$ac_status"); } &&
7187 { ac_try='test -s "conftest$ac_exeext"'
7188 { (eval echo "$as_me:7188: \"$ac_try\"") >&5
7191 echo "$as_me:7191: \$? = $ac_status" >&5
7192 (exit "$ac_status"); }; }; then
7195 echo "$as_me: failed program was:" >&5
7196 cat "conftest.$ac_ext" >&5
7199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7200 echo "$as_me:7200: result: $cf_result" >&5
7201 echo "${ECHO_T}$cf_result" >&6
7202 test "$cf_result" = yes && break
7203 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7205 elif test "$cf_term_lib" != predefined ; then
7206 echo "$as_me:7206: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7207 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7208 cat >"conftest.$ac_ext" <<_ACEOF
7209 #line 7209 "configure"
7210 #include "confdefs.h"
7211 #include <${cf_cv_ncurses_header:-curses.h}>
7215 initscr(); tgoto((char *)0, 0, 0);
7220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7221 if { (eval echo "$as_me:7221: \"$ac_link\"") >&5
7222 (eval $ac_link) 2>&5
7224 echo "$as_me:7224: \$? = $ac_status" >&5
7225 (exit "$ac_status"); } &&
7226 { ac_try='test -s "conftest$ac_exeext"'
7227 { (eval echo "$as_me:7227: \"$ac_try\"") >&5
7230 echo "$as_me:7230: \$? = $ac_status" >&5
7231 (exit "$ac_status"); }; }; then
7234 echo "$as_me: failed program was:" >&5
7235 cat "conftest.$ac_ext" >&5
7237 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7238 cat >"conftest.$ac_ext" <<_ACEOF
7239 #line 7239 "configure"
7240 #include "confdefs.h"
7241 #include <${cf_cv_ncurses_header:-curses.h}>
7250 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7251 if { (eval echo "$as_me:7251: \"$ac_link\"") >&5
7252 (eval $ac_link) 2>&5
7254 echo "$as_me:7254: \$? = $ac_status" >&5
7255 (exit "$ac_status"); } &&
7256 { ac_try='test -s "conftest$ac_exeext"'
7257 { (eval echo "$as_me:7257: \"$ac_try\"") >&5
7260 echo "$as_me:7260: \$? = $ac_status" >&5
7261 (exit "$ac_status"); }; }; then
7264 echo "$as_me: failed program was:" >&5
7265 cat "conftest.$ac_ext" >&5
7268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7272 echo "$as_me:7272: result: $cf_result" >&5
7273 echo "${ECHO_T}$cf_result" >&6
7274 test "$cf_result" != error && break
7278 test "$cf_curs_lib" = unknown && { { echo "$as_me:7278: error: no curses library found" >&5
7279 echo "$as_me: error: no curses library found" >&2;}
7280 { (exit 1); exit 1; }; }
7287 echo "$as_me:7287: checking for multibyte character support" >&5
7288 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7289 if test "${cf_cv_utf8_lib+set}" = set; then
7290 echo $ECHO_N "(cached) $ECHO_C" >&6
7293 cf_save_LIBS="$LIBS"
7294 cat >"conftest.$ac_ext" <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7307 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7308 if { (eval echo "$as_me:7308: \"$ac_link\"") >&5
7309 (eval $ac_link) 2>&5
7311 echo "$as_me:7311: \$? = $ac_status" >&5
7312 (exit "$ac_status"); } &&
7313 { ac_try='test -s "conftest$ac_exeext"'
7314 { (eval echo "$as_me:7314: \"$ac_try\"") >&5
7317 echo "$as_me:7317: \$? = $ac_status" >&5
7318 (exit "$ac_status"); }; }; then
7321 echo "$as_me: failed program was:" >&5
7322 cat "conftest.$ac_ext" >&5
7324 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7325 # will be set on completion of the AC_TRY_LINK below.
7326 cf_cv_header_path_utf8=
7327 cf_cv_library_path_utf8=
7329 echo "${as_me:-configure}:7329: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7331 cf_save_LIBS="$LIBS"
7333 cat >"conftest.$ac_ext" <<_ACEOF
7334 #line 7334 "configure"
7335 #include "confdefs.h"
7337 #include <libutf8.h>
7346 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7347 if { (eval echo "$as_me:7347: \"$ac_link\"") >&5
7348 (eval $ac_link) 2>&5
7350 echo "$as_me:7350: \$? = $ac_status" >&5
7351 (exit "$ac_status"); } &&
7352 { ac_try='test -s "conftest$ac_exeext"'
7353 { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7356 echo "$as_me:7356: \$? = $ac_status" >&5
7357 (exit "$ac_status"); }; }; then
7359 cf_cv_find_linkage_utf8=yes
7360 cf_cv_header_path_utf8=/usr/include
7361 cf_cv_library_path_utf8=/usr/lib
7364 echo "$as_me: failed program was:" >&5
7365 cat "conftest.$ac_ext" >&5
7367 LIBS="-lutf8 $cf_save_LIBS"
7369 cat >"conftest.$ac_ext" <<_ACEOF
7370 #line 7370 "configure"
7371 #include "confdefs.h"
7373 #include <libutf8.h>
7382 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7383 if { (eval echo "$as_me:7383: \"$ac_link\"") >&5
7384 (eval $ac_link) 2>&5
7386 echo "$as_me:7386: \$? = $ac_status" >&5
7387 (exit "$ac_status"); } &&
7388 { ac_try='test -s "conftest$ac_exeext"'
7389 { (eval echo "$as_me:7389: \"$ac_try\"") >&5
7392 echo "$as_me:7392: \$? = $ac_status" >&5
7393 (exit "$ac_status"); }; }; then
7395 cf_cv_find_linkage_utf8=yes
7396 cf_cv_header_path_utf8=/usr/include
7397 cf_cv_library_path_utf8=/usr/lib
7398 cf_cv_library_file_utf8="-lutf8"
7401 echo "$as_me: failed program was:" >&5
7402 cat "conftest.$ac_ext" >&5
7404 cf_cv_find_linkage_utf8=no
7405 LIBS="$cf_save_LIBS"
7407 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7409 echo "${as_me:-configure}:7409: testing find linkage for utf8 library ..." 1>&5
7411 echo "${as_me:-configure}:7411: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7413 cf_save_CPPFLAGS="$CPPFLAGS"
7414 cf_test_CPPFLAGS="$CPPFLAGS"
7418 # collect the current set of include-directories from compiler flags
7419 cf_header_path_list=""
7420 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7421 for cf_header_path in $CPPFLAGS $CFLAGS
7423 case "$cf_header_path" in
7425 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7427 test "x$cf_header_path" != "xNONE" && \
7428 test -d "$cf_header_path" && \
7430 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7431 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
7432 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
7433 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
7434 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
7435 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7438 cf_header_path_list="$cf_header_path_list $cf_search"
7444 # add the variations for the package we are looking for
7448 test "x$prefix" != "xNONE" && \
7449 test -d "$prefix" && \
7451 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7452 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
7453 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
7454 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
7455 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
7456 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
7459 for cf_subdir_prefix in \
7468 test "x$cf_subdir_prefix" != "x$prefix" && \
7469 test -d "$cf_subdir_prefix" && \
7470 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7471 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7472 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
7473 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
7474 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
7475 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
7476 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
7481 test "$includedir" != NONE && \
7482 test "$includedir" != "/usr/include" && \
7483 test -d "$includedir" && {
7484 test -d "$includedir" && cf_search="$cf_search $includedir"
7485 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
7488 test "$oldincludedir" != NONE && \
7489 test "$oldincludedir" != "/usr/include" && \
7490 test -d "$oldincludedir" && {
7491 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
7492 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
7495 cf_search="$cf_search $cf_header_path_list"
7497 for cf_cv_header_path_utf8 in $cf_search
7499 if test -d "$cf_cv_header_path_utf8" ; then
7500 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7502 echo "${as_me:-configure}:7502: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7504 CPPFLAGS="$cf_save_CPPFLAGS"
7506 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7507 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7509 cat >"conftest.$ac_ext" <<_ACEOF
7510 #line 7510 "configure"
7511 #include "confdefs.h"
7513 #include <libutf8.h>
7522 rm -f "conftest.$ac_objext"
7523 if { (eval echo "$as_me:7523: \"$ac_compile\"") >&5
7524 (eval $ac_compile) 2>&5
7526 echo "$as_me:7526: \$? = $ac_status" >&5
7527 (exit "$ac_status"); } &&
7528 { ac_try='test -s "conftest.$ac_objext"'
7529 { (eval echo "$as_me:7529: \"$ac_try\"") >&5
7532 echo "$as_me:7532: \$? = $ac_status" >&5
7533 (exit "$ac_status"); }; }; then
7535 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7537 echo "${as_me:-configure}:7537: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7539 cf_cv_find_linkage_utf8=maybe
7540 cf_test_CPPFLAGS="$CPPFLAGS"
7543 echo "$as_me: failed program was:" >&5
7544 cat "conftest.$ac_ext" >&5
7546 CPPFLAGS="$cf_save_CPPFLAGS"
7549 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7553 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7555 echo "${as_me:-configure}:7555: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7557 cf_save_LIBS="$LIBS"
7558 cf_save_LDFLAGS="$LDFLAGS"
7560 if test "$cf_cv_find_linkage_utf8" != yes ; then
7563 cf_library_path_list=""
7564 if test -n "${LDFLAGS}${LIBS}" ; then
7565 for cf_library_path in $LDFLAGS $LIBS
7567 case "$cf_library_path" in
7569 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7571 test "x$cf_library_path" != "xNONE" && \
7572 test -d "$cf_library_path" && \
7574 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7575 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7576 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7577 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7578 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7579 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7582 cf_library_path_list="$cf_library_path_list $cf_search"
7590 test "x$prefix" != "xNONE" && \
7591 test -d "$prefix" && \
7593 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7594 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7595 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7596 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7597 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7598 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7601 for cf_subdir_prefix in \
7610 test "x$cf_subdir_prefix" != "x$prefix" && \
7611 test -d "$cf_subdir_prefix" && \
7612 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7613 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7614 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7615 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7616 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7617 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7618 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7623 cf_search="$cf_library_path_list $cf_search"
7625 for cf_cv_library_path_utf8 in $cf_search
7627 if test -d "$cf_cv_library_path_utf8" ; then
7628 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7630 echo "${as_me:-configure}:7630: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7632 CPPFLAGS="$cf_test_CPPFLAGS"
7633 LIBS="-lutf8 $cf_save_LIBS"
7634 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7635 cat >"conftest.$ac_ext" <<_ACEOF
7636 #line 7636 "configure"
7637 #include "confdefs.h"
7639 #include <libutf8.h>
7648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7649 if { (eval echo "$as_me:7649: \"$ac_link\"") >&5
7650 (eval $ac_link) 2>&5
7652 echo "$as_me:7652: \$? = $ac_status" >&5
7653 (exit "$ac_status"); } &&
7654 { ac_try='test -s "conftest$ac_exeext"'
7655 { (eval echo "$as_me:7655: \"$ac_try\"") >&5
7658 echo "$as_me:7658: \$? = $ac_status" >&5
7659 (exit "$ac_status"); }; }; then
7661 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7663 echo "${as_me:-configure}:7663: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7665 cf_cv_find_linkage_utf8=yes
7666 cf_cv_library_file_utf8="-lutf8"
7669 echo "$as_me: failed program was:" >&5
7670 cat "conftest.$ac_ext" >&5
7672 CPPFLAGS="$cf_save_CPPFLAGS"
7673 LIBS="$cf_save_LIBS"
7674 LDFLAGS="$cf_save_LDFLAGS"
7677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7680 CPPFLAGS="$cf_save_CPPFLAGS"
7681 LDFLAGS="$cf_save_LDFLAGS"
7685 cf_cv_find_linkage_utf8=no
7689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7692 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7694 LIBS="$cf_save_LIBS"
7696 if test "$cf_cv_find_linkage_utf8" = yes ; then
7697 cf_cv_utf8_lib=add-on
7703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7705 echo "$as_me:7705: result: $cf_cv_utf8_lib" >&5
7706 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7708 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7710 if test "$cf_cv_utf8_lib" = "add-on" ; then
7712 cat >>confdefs.h <<\EOF
7713 #define HAVE_LIBUTF8_H 1
7716 if test -n "$cf_cv_header_path_utf8" ; then
7717 for cf_add_incdir in $cf_cv_header_path_utf8
7719 while test "$cf_add_incdir" != /usr/include
7721 if test -d "$cf_add_incdir"
7724 if test -n "$CFLAGS$CPPFLAGS" ; then
7725 # a loop is needed to ensure we can add subdirs of existing dirs
7726 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7727 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7728 cf_have_incdir=yes; break
7733 if test "$cf_have_incdir" = no ; then
7734 if test "$cf_add_incdir" = /usr/local/include ; then
7735 if test "$GCC" = yes
7737 cf_save_CPPFLAGS=$CPPFLAGS
7739 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7740 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7742 cat >"conftest.$ac_ext" <<_ACEOF
7743 #line 7743 "configure"
7744 #include "confdefs.h"
7754 rm -f "conftest.$ac_objext"
7755 if { (eval echo "$as_me:7755: \"$ac_compile\"") >&5
7756 (eval $ac_compile) 2>&5
7758 echo "$as_me:7758: \$? = $ac_status" >&5
7759 (exit "$ac_status"); } &&
7760 { ac_try='test -s "conftest.$ac_objext"'
7761 { (eval echo "$as_me:7761: \"$ac_try\"") >&5
7764 echo "$as_me:7764: \$? = $ac_status" >&5
7765 (exit "$ac_status"); }; }; then
7768 echo "$as_me: failed program was:" >&5
7769 cat "conftest.$ac_ext" >&5
7772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7773 CPPFLAGS=$cf_save_CPPFLAGS
7778 if test "$cf_have_incdir" = no ; then
7779 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7781 echo "${as_me:-configure}:7781: testing adding $cf_add_incdir to include-path ..." 1>&5
7783 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7785 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7786 test "$cf_top_incdir" = "$cf_add_incdir" && break
7787 cf_add_incdir="$cf_top_incdir"
7798 if test -n "$cf_cv_library_path_utf8" ; then
7799 for cf_add_libdir in $cf_cv_library_path_utf8
7801 if test "$cf_add_libdir" = /usr/lib ; then
7803 elif test -d "$cf_add_libdir"
7806 if test -n "$LDFLAGS$LIBS" ; then
7807 # a loop is needed to ensure we can add subdirs of existing dirs
7808 for cf_test_libdir in $LDFLAGS $LIBS ; do
7809 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7810 cf_have_libdir=yes; break
7814 if test "$cf_have_libdir" = no ; then
7815 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7817 echo "${as_me:-configure}:7817: testing adding $cf_add_libdir to library-path ..." 1>&5
7819 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7828 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7830 for cf_add_1lib in $cf_add_0lib; do
7831 for cf_add_2lib in $cf_add_libs; do
7832 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7837 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7843 cf_ncuconfig_root=$cf_cv_screen
7844 cf_have_ncuconfig=no
7846 if test "x${PKG_CONFIG:=none}" != xnone; then
7847 echo "$as_me:7847: checking pkg-config for $cf_ncuconfig_root" >&5
7848 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7849 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7850 echo "$as_me:7850: result: yes" >&5
7851 echo "${ECHO_T}yes" >&6
7853 echo "$as_me:7853: checking if the $cf_ncuconfig_root package files work" >&5
7854 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7855 cf_have_ncuconfig=unknown
7857 cf_save_CFLAGS="$CFLAGS"
7858 cf_save_CPPFLAGS="$CPPFLAGS"
7859 cf_save_LIBS="$LIBS"
7861 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7862 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7864 # while -W for passing linker flags is prevalent, it is not "standard".
7865 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7866 # incompatible _and_ non-standard -W option which gives an error. Work
7867 # around that pitfall.
7868 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7874 cf_new_extra_cppflags=
7876 for cf_add_cflags in $cf_pkg_cflags
7878 case "$cf_fix_cppflags" in
7880 case "$cf_add_cflags" in
7881 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7882 case "$cf_add_cflags" in
7884 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7886 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7887 && test -z "${cf_tst_cflags}" \
7888 && cf_fix_cppflags=yes
7890 if test "$cf_fix_cppflags" = yes ; then
7892 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7893 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7896 elif test "${cf_tst_cflags}" = "\"'" ; then
7898 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7899 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7909 case "$cf_add_cflags" in
7911 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7913 CPPFLAGS=`echo "$CPPFLAGS" | \
7914 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7915 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7920 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7921 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7928 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7929 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7939 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7941 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7942 && test -z "${cf_tst_cflags}" \
7943 && cf_fix_cppflags=no
7948 if test -n "$cf_new_cflags" ; then
7950 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7951 CFLAGS="${CFLAGS}$cf_new_cflags"
7955 if test -n "$cf_new_cppflags" ; then
7957 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7958 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7962 if test -n "$cf_new_extra_cppflags" ; then
7964 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7965 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7972 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7974 for cf_add_1lib in $cf_add_0lib; do
7975 for cf_add_2lib in $cf_add_libs; do
7976 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7981 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7985 cat >"conftest.$ac_ext" <<_ACEOF
7986 #line 7986 "configure"
7987 #include "confdefs.h"
7988 #include <${cf_cv_ncurses_header:-curses.h}>
7992 initscr(); mousemask(0,0); tigetstr((char *)0);
7997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7998 if { (eval echo "$as_me:7998: \"$ac_link\"") >&5
7999 (eval $ac_link) 2>&5
8001 echo "$as_me:8001: \$? = $ac_status" >&5
8002 (exit "$ac_status"); } &&
8003 { ac_try='test -s "conftest$ac_exeext"'
8004 { (eval echo "$as_me:8004: \"$ac_try\"") >&5
8007 echo "$as_me:8007: \$? = $ac_status" >&5
8008 (exit "$ac_status"); }; }; then
8009 if test "$cross_compiling" = yes; then
8010 cf_test_ncuconfig=maybe
8012 cat >"conftest.$ac_ext" <<_ACEOF
8013 #line 8013 "configure"
8014 #include "confdefs.h"
8015 #include <${cf_cv_ncurses_header:-curses.h}>
8017 { char *xx = curses_version(); return (xx == 0); }
8019 rm -f "conftest$ac_exeext"
8020 if { (eval echo "$as_me:8020: \"$ac_link\"") >&5
8021 (eval $ac_link) 2>&5
8023 echo "$as_me:8023: \$? = $ac_status" >&5
8024 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8025 { (eval echo "$as_me:8025: \"$ac_try\"") >&5
8028 echo "$as_me:8028: \$? = $ac_status" >&5
8029 (exit "$ac_status"); }; }; then
8030 cf_test_ncuconfig=yes
8032 echo "$as_me: program exited with status $ac_status" >&5
8033 echo "$as_me: failed program was:" >&5
8034 cat "conftest.$ac_ext" >&5
8035 cf_test_ncuconfig=no
8037 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8040 echo "$as_me: failed program was:" >&5
8041 cat "conftest.$ac_ext" >&5
8042 cf_test_ncuconfig=no
8044 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8046 CFLAGS="$cf_save_CFLAGS"
8047 CPPFLAGS="$cf_save_CPPFLAGS"
8048 LIBS="$cf_save_LIBS"
8050 if test "x$cf_test_ncuconfig" != xyes; then
8051 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8052 cf_pkg_cflags="$cf_temp"
8053 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8054 cf_pkg_libs="$cf_temp"
8062 cf_new_extra_cppflags=
8064 for cf_add_cflags in $cf_pkg_cflags
8066 case "$cf_fix_cppflags" in
8068 case "$cf_add_cflags" in
8069 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8070 case "$cf_add_cflags" in
8072 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8074 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8075 && test -z "${cf_tst_cflags}" \
8076 && cf_fix_cppflags=yes
8078 if test "$cf_fix_cppflags" = yes ; then
8080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8084 elif test "${cf_tst_cflags}" = "\"'" ; then
8086 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8087 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8097 case "$cf_add_cflags" in
8099 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8101 CPPFLAGS=`echo "$CPPFLAGS" | \
8102 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8103 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8108 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8109 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8116 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8117 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8124 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8125 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8127 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8129 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8130 && test -z "${cf_tst_cflags}" \
8131 && cf_fix_cppflags=no
8136 if test -n "$cf_new_cflags" ; then
8138 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8139 CFLAGS="${CFLAGS}$cf_new_cflags"
8143 if test -n "$cf_new_cppflags" ; then
8145 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8146 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8150 if test -n "$cf_new_extra_cppflags" ; then
8152 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8153 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8160 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8162 for cf_add_1lib in $cf_add_0lib; do
8163 for cf_add_2lib in $cf_add_libs; do
8164 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8169 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8173 cat >"conftest.$ac_ext" <<_ACEOF
8174 #line 8174 "configure"
8175 #include "confdefs.h"
8176 #include <${cf_cv_ncurses_header:-curses.h}>
8180 initscr(); mousemask(0,0); tigetstr((char *)0);
8185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8186 if { (eval echo "$as_me:8186: \"$ac_link\"") >&5
8187 (eval $ac_link) 2>&5
8189 echo "$as_me:8189: \$? = $ac_status" >&5
8190 (exit "$ac_status"); } &&
8191 { ac_try='test -s "conftest$ac_exeext"'
8192 { (eval echo "$as_me:8192: \"$ac_try\"") >&5
8195 echo "$as_me:8195: \$? = $ac_status" >&5
8196 (exit "$ac_status"); }; }; then
8197 if test "$cross_compiling" = yes; then
8198 cf_have_ncuconfig=maybe
8200 cat >"conftest.$ac_ext" <<_ACEOF
8201 #line 8201 "configure"
8202 #include "confdefs.h"
8203 #include <${cf_cv_ncurses_header:-curses.h}>
8205 { char *xx = curses_version(); return (xx == 0); }
8207 rm -f "conftest$ac_exeext"
8208 if { (eval echo "$as_me:8208: \"$ac_link\"") >&5
8209 (eval $ac_link) 2>&5
8211 echo "$as_me:8211: \$? = $ac_status" >&5
8212 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8213 { (eval echo "$as_me:8213: \"$ac_try\"") >&5
8216 echo "$as_me:8216: \$? = $ac_status" >&5
8217 (exit "$ac_status"); }; }; then
8218 cf_have_ncuconfig=yes
8220 echo "$as_me: program exited with status $ac_status" >&5
8221 echo "$as_me: failed program was:" >&5
8222 cat "conftest.$ac_ext" >&5
8223 cf_have_ncuconfig=no
8225 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8228 echo "$as_me: failed program was:" >&5
8229 cat "conftest.$ac_ext" >&5
8230 cf_have_ncuconfig=no
8232 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8233 echo "$as_me:8233: result: $cf_have_ncuconfig" >&5
8234 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8235 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8236 if test "$cf_have_ncuconfig" != "yes"
8238 CPPFLAGS="$cf_save_CPPFLAGS"
8239 LIBS="$cf_save_LIBS"
8240 NCURSES_CONFIG_PKG=none
8243 cat >>confdefs.h <<\EOF
8247 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8249 echo "$as_me:8249: checking for terminfo header" >&5
8250 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8251 if test "${cf_cv_term_header+set}" = set; then
8252 echo $ECHO_N "(cached) $ECHO_C" >&6
8255 case "${cf_cv_ncurses_header}" in
8256 (*/ncurses.h|*/ncursesw.h)
8257 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8260 cf_term_header=term.h
8264 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8266 cat >"conftest.$ac_ext" <<_ACEOF
8267 #line 8267 "configure"
8268 #include "confdefs.h"
8270 #include <${cf_cv_ncurses_header:-curses.h}>
8276 int x = auto_left_margin; (void)x
8281 rm -f "conftest.$ac_objext"
8282 if { (eval echo "$as_me:8282: \"$ac_compile\"") >&5
8283 (eval $ac_compile) 2>&5
8285 echo "$as_me:8285: \$? = $ac_status" >&5
8286 (exit "$ac_status"); } &&
8287 { ac_try='test -s "conftest.$ac_objext"'
8288 { (eval echo "$as_me:8288: \"$ac_try\"") >&5
8291 echo "$as_me:8291: \$? = $ac_status" >&5
8292 (exit "$ac_status"); }; }; then
8294 cf_cv_term_header="$cf_test"
8296 echo "$as_me: failed program was:" >&5
8297 cat "conftest.$ac_ext" >&5
8299 cf_cv_term_header=unknown
8302 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8303 test "$cf_cv_term_header" != unknown && break
8307 echo "$as_me:8307: result: $cf_cv_term_header" >&5
8308 echo "${ECHO_T}$cf_cv_term_header" >&6
8310 # Set definitions to allow ifdef'ing to accommodate subdirectories
8312 case "$cf_cv_term_header" in
8315 cat >>confdefs.h <<\EOF
8316 #define HAVE_TERM_H 1
8322 case "$cf_cv_term_header" in
8325 cat >>confdefs.h <<\EOF
8326 #define HAVE_NCURSES_TERM_H 1
8332 cat >>confdefs.h <<\EOF
8333 #define HAVE_NCURSESW_TERM_H 1
8342 echo "$as_me:8342: result: no" >&5
8343 echo "${ECHO_T}no" >&6
8344 NCURSES_CONFIG_PKG=none
8347 NCURSES_CONFIG_PKG=none
8350 if test "x$cf_have_ncuconfig" = "xno"; then
8351 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8353 if test -n "$ac_tool_prefix"; then
8354 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8356 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8357 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8358 echo "$as_me:8358: checking for $ac_word" >&5
8359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8360 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8361 echo $ECHO_N "(cached) $ECHO_C" >&6
8363 if test -n "$NCURSES_CONFIG"; then
8364 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8366 ac_save_IFS=$IFS; IFS=$ac_path_separator
8368 for ac_dir in $ac_dummy; do
8370 test -z "$ac_dir" && ac_dir=.
8371 $as_executable_p "$ac_dir/$ac_word" || continue
8372 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8373 echo "$as_me:8373: found $ac_dir/$ac_word" >&5
8379 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8380 if test -n "$NCURSES_CONFIG"; then
8381 echo "$as_me:8381: result: $NCURSES_CONFIG" >&5
8382 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8384 echo "$as_me:8384: result: no" >&5
8385 echo "${ECHO_T}no" >&6
8388 test -n "$NCURSES_CONFIG" && break
8391 if test -z "$NCURSES_CONFIG"; then
8392 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8393 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8395 # Extract the first word of "$ac_prog", so it can be a program name with args.
8396 set dummy $ac_prog; ac_word=$2
8397 echo "$as_me:8397: checking for $ac_word" >&5
8398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8399 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8400 echo $ECHO_N "(cached) $ECHO_C" >&6
8402 if test -n "$ac_ct_NCURSES_CONFIG"; then
8403 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8405 ac_save_IFS=$IFS; IFS=$ac_path_separator
8407 for ac_dir in $ac_dummy; do
8409 test -z "$ac_dir" && ac_dir=.
8410 $as_executable_p "$ac_dir/$ac_word" || continue
8411 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8412 echo "$as_me:8412: found $ac_dir/$ac_word" >&5
8418 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8419 if test -n "$ac_ct_NCURSES_CONFIG"; then
8420 echo "$as_me:8420: result: $ac_ct_NCURSES_CONFIG" >&5
8421 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8423 echo "$as_me:8423: result: no" >&5
8424 echo "${ECHO_T}no" >&6
8427 test -n "$ac_ct_NCURSES_CONFIG" && break
8429 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8431 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8434 if test "$NCURSES_CONFIG" != none ; then
8439 cf_new_extra_cppflags=
8441 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8443 case "$cf_fix_cppflags" in
8445 case "$cf_add_cflags" in
8446 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8447 case "$cf_add_cflags" in
8449 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8451 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8452 && test -z "${cf_tst_cflags}" \
8453 && cf_fix_cppflags=yes
8455 if test "$cf_fix_cppflags" = yes ; then
8457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8461 elif test "${cf_tst_cflags}" = "\"'" ; then
8463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8474 case "$cf_add_cflags" in
8476 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8478 CPPFLAGS=`echo "$CPPFLAGS" | \
8479 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8480 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8485 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8486 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8493 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8494 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8504 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8506 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8507 && test -z "${cf_tst_cflags}" \
8508 && cf_fix_cppflags=no
8513 if test -n "$cf_new_cflags" ; then
8515 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8516 CFLAGS="${CFLAGS}$cf_new_cflags"
8520 if test -n "$cf_new_cppflags" ; then
8522 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8523 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8527 if test -n "$cf_new_extra_cppflags" ; then
8529 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8530 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8537 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8539 for cf_add_1lib in $cf_add_0lib; do
8540 for cf_add_2lib in $cf_add_libs; do
8541 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8546 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8550 # even with config script, some packages use no-override for curses.h
8552 echo "$as_me:8552: checking if we have identified curses headers" >&5
8553 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8554 if test "${cf_cv_ncurses_header+set}" = set; then
8555 echo $ECHO_N "(cached) $ECHO_C" >&6
8558 cf_cv_ncurses_header=none
8560 ncurses.h $cf_cv_screen/ncurses.h \
8561 curses.h $cf_cv_screen/curses.h
8563 cat >"conftest.$ac_ext" <<_ACEOF
8564 #line 8564 "configure"
8565 #include "confdefs.h"
8566 #include <${cf_header}>
8570 initscr(); tgoto("?", 0,0)
8575 rm -f "conftest.$ac_objext"
8576 if { (eval echo "$as_me:8576: \"$ac_compile\"") >&5
8577 (eval $ac_compile) 2>&5
8579 echo "$as_me:8579: \$? = $ac_status" >&5
8580 (exit "$ac_status"); } &&
8581 { ac_try='test -s "conftest.$ac_objext"'
8582 { (eval echo "$as_me:8582: \"$ac_try\"") >&5
8585 echo "$as_me:8585: \$? = $ac_status" >&5
8586 (exit "$ac_status"); }; }; then
8587 cf_cv_ncurses_header=$cf_header; break
8589 echo "$as_me: failed program was:" >&5
8590 cat "conftest.$ac_ext" >&5
8592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8596 echo "$as_me:8596: result: $cf_cv_ncurses_header" >&5
8597 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8599 if test "$cf_cv_ncurses_header" = none ; then
8600 { { echo "$as_me:8600: error: No curses header-files found" >&5
8601 echo "$as_me: error: No curses header-files found" >&2;}
8602 { (exit 1); exit 1; }; }
8605 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8607 for ac_header in $cf_cv_ncurses_header
8609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8610 echo "$as_me:8610: checking for $ac_header" >&5
8611 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8613 echo $ECHO_N "(cached) $ECHO_C" >&6
8615 cat >"conftest.$ac_ext" <<_ACEOF
8616 #line 8616 "configure"
8617 #include "confdefs.h"
8618 #include <$ac_header>
8620 if { (eval echo "$as_me:8620: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8621 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8623 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8625 cat conftest.err >&5
8626 echo "$as_me:8626: \$? = $ac_status" >&5
8627 (exit "$ac_status"); } >/dev/null; then
8628 if test -s conftest.err; then
8629 ac_cpp_err=$ac_c_preproc_warn_flag
8636 if test -z "$ac_cpp_err"; then
8637 eval "$as_ac_Header=yes"
8639 echo "$as_me: failed program was:" >&5
8640 cat "conftest.$ac_ext" >&5
8641 eval "$as_ac_Header=no"
8643 rm -f conftest.err "conftest.$ac_ext"
8645 echo "$as_me:8645: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8646 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8647 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8648 cat >>confdefs.h <<EOF
8649 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8655 cat >>confdefs.h <<\EOF
8659 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8661 cat >>confdefs.h <<EOF
8662 #define $cf_nculib_ROOT 1
8665 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8669 cf_ncuhdr_root=$cf_cv_screen
8671 test -n "$cf_cv_curses_dir" && \
8672 test "$cf_cv_curses_dir" != "no" && { \
8674 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8675 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8677 while test "$cf_add_incdir" != /usr/include
8679 if test -d "$cf_add_incdir"
8682 if test -n "$CFLAGS$CPPFLAGS" ; then
8683 # a loop is needed to ensure we can add subdirs of existing dirs
8684 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8685 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8686 cf_have_incdir=yes; break
8691 if test "$cf_have_incdir" = no ; then
8692 if test "$cf_add_incdir" = /usr/local/include ; then
8693 if test "$GCC" = yes
8695 cf_save_CPPFLAGS=$CPPFLAGS
8697 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8698 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8700 cat >"conftest.$ac_ext" <<_ACEOF
8701 #line 8701 "configure"
8702 #include "confdefs.h"
8712 rm -f "conftest.$ac_objext"
8713 if { (eval echo "$as_me:8713: \"$ac_compile\"") >&5
8714 (eval $ac_compile) 2>&5
8716 echo "$as_me:8716: \$? = $ac_status" >&5
8717 (exit "$ac_status"); } &&
8718 { ac_try='test -s "conftest.$ac_objext"'
8719 { (eval echo "$as_me:8719: \"$ac_try\"") >&5
8722 echo "$as_me:8722: \$? = $ac_status" >&5
8723 (exit "$ac_status"); }; }; then
8726 echo "$as_me: failed program was:" >&5
8727 cat "conftest.$ac_ext" >&5
8730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8731 CPPFLAGS=$cf_save_CPPFLAGS
8736 if test "$cf_have_incdir" = no ; then
8737 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8739 echo "${as_me:-configure}:8739: testing adding $cf_add_incdir to include-path ..." 1>&5
8741 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8743 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8744 test "$cf_top_incdir" = "$cf_add_incdir" && break
8745 cf_add_incdir="$cf_top_incdir"
8758 echo "$as_me:8758: checking for $cf_ncuhdr_root header in include-path" >&5
8759 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8760 if test "${cf_cv_ncurses_h+set}" = set; then
8761 echo $ECHO_N "(cached) $ECHO_C" >&6
8764 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8765 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8766 for cf_header in $cf_header_list
8769 cat >"conftest.$ac_ext" <<_ACEOF
8770 #line 8770 "configure"
8771 #include "confdefs.h"
8773 #include <$cf_header>
8778 #ifdef NCURSES_VERSION
8780 printf("%s\\n", NCURSES_VERSION);
8793 rm -f "conftest.$ac_objext"
8794 if { (eval echo "$as_me:8794: \"$ac_compile\"") >&5
8795 (eval $ac_compile) 2>&5
8797 echo "$as_me:8797: \$? = $ac_status" >&5
8798 (exit "$ac_status"); } &&
8799 { ac_try='test -s "conftest.$ac_objext"'
8800 { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8803 echo "$as_me:8803: \$? = $ac_status" >&5
8804 (exit "$ac_status"); }; }; then
8805 cf_cv_ncurses_h=$cf_header
8808 echo "$as_me: failed program was:" >&5
8809 cat "conftest.$ac_ext" >&5
8812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8814 test "$cf_cv_ncurses_h" != no && break
8818 echo "$as_me:8818: result: $cf_cv_ncurses_h" >&5
8819 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8821 if test "$cf_cv_ncurses_h" != no ; then
8822 cf_cv_ncurses_header=$cf_cv_ncurses_h
8825 echo "$as_me:8825: checking for $cf_ncuhdr_root include-path" >&5
8826 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8827 if test "${cf_cv_ncurses_h2+set}" = set; then
8828 echo $ECHO_N "(cached) $ECHO_C" >&6
8831 test -n "$verbose" && echo
8835 # collect the current set of include-directories from compiler flags
8836 cf_header_path_list=""
8837 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8838 for cf_header_path in $CPPFLAGS $CFLAGS
8840 case "$cf_header_path" in
8842 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8844 test "x$cf_header_path" != "xNONE" && \
8845 test -d "$cf_header_path" && \
8847 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8848 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8849 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8850 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8851 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8852 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"
8855 cf_header_path_list="$cf_header_path_list $cf_search"
8861 # add the variations for the package we are looking for
8865 test "x$prefix" != "xNONE" && \
8866 test -d "$prefix" && \
8868 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8869 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8870 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8871 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8872 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8873 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8876 for cf_subdir_prefix in \
8885 test "x$cf_subdir_prefix" != "x$prefix" && \
8886 test -d "$cf_subdir_prefix" && \
8887 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8888 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8889 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8890 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8891 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8892 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8893 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"
8898 test "$includedir" != NONE && \
8899 test "$includedir" != "/usr/include" && \
8900 test -d "$includedir" && {
8901 test -d "$includedir" && cf_search="$cf_search $includedir"
8902 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8905 test "$oldincludedir" != NONE && \
8906 test "$oldincludedir" != "/usr/include" && \
8907 test -d "$oldincludedir" && {
8908 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8909 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8912 cf_search="$cf_search $cf_header_path_list"
8914 test -n "$verbose" && echo "search path $cf_search"
8915 cf_save2_CPPFLAGS="$CPPFLAGS"
8916 for cf_incdir in $cf_search
8919 if test -n "$cf_incdir" ; then
8920 for cf_add_incdir in $cf_incdir
8922 while test "$cf_add_incdir" != /usr/include
8924 if test -d "$cf_add_incdir"
8927 if test -n "$CFLAGS$CPPFLAGS" ; then
8928 # a loop is needed to ensure we can add subdirs of existing dirs
8929 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8930 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8931 cf_have_incdir=yes; break
8936 if test "$cf_have_incdir" = no ; then
8937 if test "$cf_add_incdir" = /usr/local/include ; then
8938 if test "$GCC" = yes
8940 cf_save_CPPFLAGS=$CPPFLAGS
8942 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8943 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8945 cat >"conftest.$ac_ext" <<_ACEOF
8946 #line 8946 "configure"
8947 #include "confdefs.h"
8957 rm -f "conftest.$ac_objext"
8958 if { (eval echo "$as_me:8958: \"$ac_compile\"") >&5
8959 (eval $ac_compile) 2>&5
8961 echo "$as_me:8961: \$? = $ac_status" >&5
8962 (exit "$ac_status"); } &&
8963 { ac_try='test -s "conftest.$ac_objext"'
8964 { (eval echo "$as_me:8964: \"$ac_try\"") >&5
8967 echo "$as_me:8967: \$? = $ac_status" >&5
8968 (exit "$ac_status"); }; }; then
8971 echo "$as_me: failed program was:" >&5
8972 cat "conftest.$ac_ext" >&5
8975 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8976 CPPFLAGS=$cf_save_CPPFLAGS
8981 if test "$cf_have_incdir" = no ; then
8982 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8984 echo "${as_me:-configure}:8984: testing adding $cf_add_incdir to include-path ..." 1>&5
8986 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8988 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8989 test "$cf_top_incdir" = "$cf_add_incdir" && break
8990 cf_add_incdir="$cf_top_incdir"
9006 cat >"conftest.$ac_ext" <<_ACEOF
9007 #line 9007 "configure"
9008 #include "confdefs.h"
9010 #include <$cf_header>
9015 #ifdef NCURSES_VERSION
9017 printf("%s\\n", NCURSES_VERSION);
9030 rm -f "conftest.$ac_objext"
9031 if { (eval echo "$as_me:9031: \"$ac_compile\"") >&5
9032 (eval $ac_compile) 2>&5
9034 echo "$as_me:9034: \$? = $ac_status" >&5
9035 (exit "$ac_status"); } &&
9036 { ac_try='test -s "conftest.$ac_objext"'
9037 { (eval echo "$as_me:9037: \"$ac_try\"") >&5
9040 echo "$as_me:9040: \$? = $ac_status" >&5
9041 (exit "$ac_status"); }; }; then
9042 cf_cv_ncurses_h2=$cf_header
9045 echo "$as_me: failed program was:" >&5
9046 cat "conftest.$ac_ext" >&5
9049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9051 if test "$cf_cv_ncurses_h2" != no ; then
9052 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9053 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9056 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9058 CPPFLAGS="$cf_save2_CPPFLAGS"
9059 test "$cf_cv_ncurses_h2" != no && break
9061 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9061: error: not found" >&5
9062 echo "$as_me: error: not found" >&2;}
9063 { (exit 1); exit 1; }; }
9066 echo "$as_me:9066: result: $cf_cv_ncurses_h2" >&5
9067 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9069 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9070 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9071 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9072 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9075 if test -n "$cf_1st_incdir" ; then
9076 for cf_add_incdir in $cf_1st_incdir
9078 while test "$cf_add_incdir" != /usr/include
9080 if test -d "$cf_add_incdir"
9083 if test -n "$CFLAGS$CPPFLAGS" ; then
9084 # a loop is needed to ensure we can add subdirs of existing dirs
9085 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9086 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9087 cf_have_incdir=yes; break
9092 if test "$cf_have_incdir" = no ; then
9093 if test "$cf_add_incdir" = /usr/local/include ; then
9094 if test "$GCC" = yes
9096 cf_save_CPPFLAGS=$CPPFLAGS
9098 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9099 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9101 cat >"conftest.$ac_ext" <<_ACEOF
9102 #line 9102 "configure"
9103 #include "confdefs.h"
9113 rm -f "conftest.$ac_objext"
9114 if { (eval echo "$as_me:9114: \"$ac_compile\"") >&5
9115 (eval $ac_compile) 2>&5
9117 echo "$as_me:9117: \$? = $ac_status" >&5
9118 (exit "$ac_status"); } &&
9119 { ac_try='test -s "conftest.$ac_objext"'
9120 { (eval echo "$as_me:9120: \"$ac_try\"") >&5
9123 echo "$as_me:9123: \$? = $ac_status" >&5
9124 (exit "$ac_status"); }; }; then
9127 echo "$as_me: failed program was:" >&5
9128 cat "conftest.$ac_ext" >&5
9131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9132 CPPFLAGS=$cf_save_CPPFLAGS
9137 if test "$cf_have_incdir" = no ; then
9138 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9140 echo "${as_me:-configure}:9140: testing adding $cf_add_incdir to include-path ..." 1>&5
9142 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9144 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9145 test "$cf_top_incdir" = "$cf_add_incdir" && break
9146 cf_add_incdir="$cf_top_incdir"
9159 # Set definitions to allow ifdef'ing for ncurses.h
9161 case "$cf_cv_ncurses_header" in
9164 cat >>confdefs.h <<\EOF
9165 #define HAVE_NCURSES_H 1
9171 case "$cf_cv_ncurses_header" in
9172 (ncurses/curses.h|ncurses/ncurses.h)
9174 cat >>confdefs.h <<\EOF
9175 #define HAVE_NCURSES_NCURSES_H 1
9179 (ncursesw/curses.h|ncursesw/ncurses.h)
9181 cat >>confdefs.h <<\EOF
9182 #define HAVE_NCURSESW_NCURSES_H 1
9188 echo "$as_me:9188: checking for terminfo header" >&5
9189 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9190 if test "${cf_cv_term_header+set}" = set; then
9191 echo $ECHO_N "(cached) $ECHO_C" >&6
9194 case "${cf_cv_ncurses_header}" in
9195 (*/ncurses.h|*/ncursesw.h)
9196 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9199 cf_term_header=term.h
9203 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9205 cat >"conftest.$ac_ext" <<_ACEOF
9206 #line 9206 "configure"
9207 #include "confdefs.h"
9209 #include <${cf_cv_ncurses_header:-curses.h}>
9215 int x = auto_left_margin; (void)x
9220 rm -f "conftest.$ac_objext"
9221 if { (eval echo "$as_me:9221: \"$ac_compile\"") >&5
9222 (eval $ac_compile) 2>&5
9224 echo "$as_me:9224: \$? = $ac_status" >&5
9225 (exit "$ac_status"); } &&
9226 { ac_try='test -s "conftest.$ac_objext"'
9227 { (eval echo "$as_me:9227: \"$ac_try\"") >&5
9230 echo "$as_me:9230: \$? = $ac_status" >&5
9231 (exit "$ac_status"); }; }; then
9233 cf_cv_term_header="$cf_test"
9235 echo "$as_me: failed program was:" >&5
9236 cat "conftest.$ac_ext" >&5
9238 cf_cv_term_header=unknown
9241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9242 test "$cf_cv_term_header" != unknown && break
9246 echo "$as_me:9246: result: $cf_cv_term_header" >&5
9247 echo "${ECHO_T}$cf_cv_term_header" >&6
9249 # Set definitions to allow ifdef'ing to accommodate subdirectories
9251 case "$cf_cv_term_header" in
9254 cat >>confdefs.h <<\EOF
9255 #define HAVE_TERM_H 1
9261 case "$cf_cv_term_header" in
9264 cat >>confdefs.h <<\EOF
9265 #define HAVE_NCURSES_TERM_H 1
9271 cat >>confdefs.h <<\EOF
9272 #define HAVE_NCURSESW_TERM_H 1
9278 # some applications need this, but should check for NCURSES_VERSION
9280 cat >>confdefs.h <<\EOF
9284 echo "$as_me:9284: checking for ncurses version" >&5
9285 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9286 if test "${cf_cv_ncurses_version+set}" = set; then
9287 echo $ECHO_N "(cached) $ECHO_C" >&6
9290 cf_cv_ncurses_version=no
9292 rm -f "$cf_tempfile"
9293 if test "$cross_compiling" = yes; then
9295 # This will not work if the preprocessor splits the line after the
9296 # Autoconf token. The 'unproto' program does that.
9297 cat > "conftest.$ac_ext" <<EOF
9298 #include <${cf_cv_ncurses_header:-curses.h}>
9300 #ifdef NCURSES_VERSION
9301 Autoconf NCURSES_VERSION
9309 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9310 { (eval echo "$as_me:9310: \"$cf_try\"") >&5
9313 echo "$as_me:9313: \$? = $ac_status" >&5
9314 (exit "$ac_status"); }
9315 if test -f conftest.out ; then
9316 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9317 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9322 cat >"conftest.$ac_ext" <<_ACEOF
9323 #line 9323 "configure"
9324 #include "confdefs.h"
9326 #include <${cf_cv_ncurses_header:-curses.h}>
9330 FILE *fp = fopen("$cf_tempfile", "w");
9331 #ifdef NCURSES_VERSION
9332 # ifdef NCURSES_VERSION_PATCH
9333 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9335 fprintf(fp, "%s\\n", NCURSES_VERSION);
9339 fprintf(fp, "old\\n");
9344 ${cf_cv_main_return:-return}(0);
9347 rm -f "conftest$ac_exeext"
9348 if { (eval echo "$as_me:9348: \"$ac_link\"") >&5
9349 (eval $ac_link) 2>&5
9351 echo "$as_me:9351: \$? = $ac_status" >&5
9352 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9353 { (eval echo "$as_me:9353: \"$ac_try\"") >&5
9356 echo "$as_me:9356: \$? = $ac_status" >&5
9357 (exit "$ac_status"); }; }; then
9359 cf_cv_ncurses_version=`cat $cf_tempfile`
9361 echo "$as_me: program exited with status $ac_status" >&5
9362 echo "$as_me: failed program was:" >&5
9363 cat "conftest.$ac_ext" >&5
9365 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9367 rm -f "$cf_tempfile"
9370 echo "$as_me:9370: result: $cf_cv_ncurses_version" >&5
9371 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9372 test "$cf_cv_ncurses_version" = no ||
9373 cat >>confdefs.h <<\EOF
9377 cf_nculib_root=$cf_cv_screen
9378 # This works, except for the special case where we find gpm, but
9379 # ncurses is in a nonstandard location via $LIBS, and we really want
9382 cf_ncurses_SAVE="$LIBS"
9383 echo "$as_me:9383: checking for Gpm_Open in -lgpm" >&5
9384 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9385 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9386 echo $ECHO_N "(cached) $ECHO_C" >&6
9388 ac_check_lib_save_LIBS=$LIBS
9390 cat >"conftest.$ac_ext" <<_ACEOF
9391 #line 9391 "configure"
9392 #include "confdefs.h"
9394 /* Override any gcc2 internal prototype to avoid an error. */
9398 /* We use char because int might match the return type of a gcc2
9399 builtin and then its argument prototype would still apply. */
9409 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9410 if { (eval echo "$as_me:9410: \"$ac_link\"") >&5
9411 (eval $ac_link) 2>&5
9413 echo "$as_me:9413: \$? = $ac_status" >&5
9414 (exit "$ac_status"); } &&
9415 { ac_try='test -s "conftest$ac_exeext"'
9416 { (eval echo "$as_me:9416: \"$ac_try\"") >&5
9419 echo "$as_me:9419: \$? = $ac_status" >&5
9420 (exit "$ac_status"); }; }; then
9421 ac_cv_lib_gpm_Gpm_Open=yes
9423 echo "$as_me: failed program was:" >&5
9424 cat "conftest.$ac_ext" >&5
9425 ac_cv_lib_gpm_Gpm_Open=no
9427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9428 LIBS=$ac_check_lib_save_LIBS
9430 echo "$as_me:9430: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9431 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9432 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
9433 echo "$as_me:9433: checking for initscr in -lgpm" >&5
9434 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9435 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9436 echo $ECHO_N "(cached) $ECHO_C" >&6
9438 ac_check_lib_save_LIBS=$LIBS
9440 cat >"conftest.$ac_ext" <<_ACEOF
9441 #line 9441 "configure"
9442 #include "confdefs.h"
9444 /* Override any gcc2 internal prototype to avoid an error. */
9448 /* We use char because int might match the return type of a gcc2
9449 builtin and then its argument prototype would still apply. */
9459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9460 if { (eval echo "$as_me:9460: \"$ac_link\"") >&5
9461 (eval $ac_link) 2>&5
9463 echo "$as_me:9463: \$? = $ac_status" >&5
9464 (exit "$ac_status"); } &&
9465 { ac_try='test -s "conftest$ac_exeext"'
9466 { (eval echo "$as_me:9466: \"$ac_try\"") >&5
9469 echo "$as_me:9469: \$? = $ac_status" >&5
9470 (exit "$ac_status"); }; }; then
9471 ac_cv_lib_gpm_initscr=yes
9473 echo "$as_me: failed program was:" >&5
9474 cat "conftest.$ac_ext" >&5
9475 ac_cv_lib_gpm_initscr=no
9477 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9478 LIBS=$ac_check_lib_save_LIBS
9480 echo "$as_me:9480: result: $ac_cv_lib_gpm_initscr" >&5
9481 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9482 if test "$ac_cv_lib_gpm_initscr" = yes; then
9483 LIBS="$cf_ncurses_SAVE"
9485 cf_ncurses_LIBS="-lgpm"
9492 # This is only necessary if you are linking against an obsolete
9493 # version of ncurses (but it should do no harm, since it's static).
9494 if test "$cf_nculib_root" = ncurses ; then
9495 echo "$as_me:9495: checking for tgoto in -lmytinfo" >&5
9496 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9497 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9498 echo $ECHO_N "(cached) $ECHO_C" >&6
9500 ac_check_lib_save_LIBS=$LIBS
9501 LIBS="-lmytinfo $LIBS"
9502 cat >"conftest.$ac_ext" <<_ACEOF
9503 #line 9503 "configure"
9504 #include "confdefs.h"
9506 /* Override any gcc2 internal prototype to avoid an error. */
9510 /* We use char because int might match the return type of a gcc2
9511 builtin and then its argument prototype would still apply. */
9521 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9522 if { (eval echo "$as_me:9522: \"$ac_link\"") >&5
9523 (eval $ac_link) 2>&5
9525 echo "$as_me:9525: \$? = $ac_status" >&5
9526 (exit "$ac_status"); } &&
9527 { ac_try='test -s "conftest$ac_exeext"'
9528 { (eval echo "$as_me:9528: \"$ac_try\"") >&5
9531 echo "$as_me:9531: \$? = $ac_status" >&5
9532 (exit "$ac_status"); }; }; then
9533 ac_cv_lib_mytinfo_tgoto=yes
9535 echo "$as_me: failed program was:" >&5
9536 cat "conftest.$ac_ext" >&5
9537 ac_cv_lib_mytinfo_tgoto=no
9539 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9540 LIBS=$ac_check_lib_save_LIBS
9542 echo "$as_me:9542: result: $ac_cv_lib_mytinfo_tgoto" >&5
9543 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9544 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9545 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9555 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9557 for cf_add_1lib in $cf_add_0lib; do
9558 for cf_add_2lib in $cf_add_libs; do
9559 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9564 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9568 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9574 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9576 for cf_add_1lib in $cf_add_0lib; do
9577 for cf_add_2lib in $cf_add_libs; do
9578 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9583 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9589 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9591 echo "$as_me:9591: checking for initscr" >&5
9592 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9593 if test "${ac_cv_func_initscr+set}" = set; then
9594 echo $ECHO_N "(cached) $ECHO_C" >&6
9596 cat >"conftest.$ac_ext" <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9599 #define initscr autoconf_temporary
9600 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9607 /* We use char because int might match the return type of a gcc2
9608 builtin and then its argument prototype would still apply. */
9609 char initscr (void);
9615 /* The GNU C library defines stubs for functions which it implements
9616 to always fail with ENOSYS. Some functions are actually named
9617 something starting with __ and the normal name is an alias. */
9618 #if defined (__stub_initscr) || defined (__stub___initscr)
9619 #error found stub for initscr
9627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9628 if { (eval echo "$as_me:9628: \"$ac_link\"") >&5
9629 (eval $ac_link) 2>&5
9631 echo "$as_me:9631: \$? = $ac_status" >&5
9632 (exit "$ac_status"); } &&
9633 { ac_try='test -s "conftest$ac_exeext"'
9634 { (eval echo "$as_me:9634: \"$ac_try\"") >&5
9637 echo "$as_me:9637: \$? = $ac_status" >&5
9638 (exit "$ac_status"); }; }; then
9639 ac_cv_func_initscr=yes
9641 echo "$as_me: failed program was:" >&5
9642 cat "conftest.$ac_ext" >&5
9643 ac_cv_func_initscr=no
9645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9647 echo "$as_me:9647: result: $ac_cv_func_initscr" >&5
9648 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9649 if test "$ac_cv_func_initscr" = yes; then
9650 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9653 cf_save_LIBS="$LIBS"
9654 echo "$as_me:9654: checking for initscr in -l$cf_nculib_root" >&5
9655 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9656 LIBS="-l$cf_nculib_root $LIBS"
9657 cat >"conftest.$ac_ext" <<_ACEOF
9658 #line 9658 "configure"
9659 #include "confdefs.h"
9660 #include <${cf_cv_ncurses_header:-curses.h}>
9669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9670 if { (eval echo "$as_me:9670: \"$ac_link\"") >&5
9671 (eval $ac_link) 2>&5
9673 echo "$as_me:9673: \$? = $ac_status" >&5
9674 (exit "$ac_status"); } &&
9675 { ac_try='test -s "conftest$ac_exeext"'
9676 { (eval echo "$as_me:9676: \"$ac_try\"") >&5
9679 echo "$as_me:9679: \$? = $ac_status" >&5
9680 (exit "$ac_status"); }; }; then
9681 echo "$as_me:9681: result: yes" >&5
9682 echo "${ECHO_T}yes" >&6
9683 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9686 echo "$as_me: failed program was:" >&5
9687 cat "conftest.$ac_ext" >&5
9688 echo "$as_me:9688: result: no" >&5
9689 echo "${ECHO_T}no" >&6
9692 cf_library_path_list=""
9693 if test -n "${LDFLAGS}${LIBS}" ; then
9694 for cf_library_path in $LDFLAGS $LIBS
9696 case "$cf_library_path" in
9698 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9700 test "x$cf_library_path" != "xNONE" && \
9701 test -d "$cf_library_path" && \
9703 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9704 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9705 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9706 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9707 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9708 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"
9711 cf_library_path_list="$cf_library_path_list $cf_search"
9719 test "x$prefix" != "xNONE" && \
9720 test -d "$prefix" && \
9722 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9723 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9724 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9725 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9726 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9727 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9730 for cf_subdir_prefix in \
9739 test "x$cf_subdir_prefix" != "x$prefix" && \
9740 test -d "$cf_subdir_prefix" && \
9741 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9742 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9743 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9744 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9745 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9746 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9747 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"
9752 cf_search="$cf_library_path_list $cf_search"
9754 for cf_libdir in $cf_search
9756 echo "$as_me:9756: checking for -l$cf_nculib_root in $cf_libdir" >&5
9757 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9758 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9759 cat >"conftest.$ac_ext" <<_ACEOF
9760 #line 9760 "configure"
9761 #include "confdefs.h"
9762 #include <${cf_cv_ncurses_header:-curses.h}>
9771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9772 if { (eval echo "$as_me:9772: \"$ac_link\"") >&5
9773 (eval $ac_link) 2>&5
9775 echo "$as_me:9775: \$? = $ac_status" >&5
9776 (exit "$ac_status"); } &&
9777 { ac_try='test -s "conftest$ac_exeext"'
9778 { (eval echo "$as_me:9778: \"$ac_try\"") >&5
9781 echo "$as_me:9781: \$? = $ac_status" >&5
9782 (exit "$ac_status"); }; }; then
9783 echo "$as_me:9783: result: yes" >&5
9784 echo "${ECHO_T}yes" >&6
9785 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9788 echo "$as_me: failed program was:" >&5
9789 cat "conftest.$ac_ext" >&5
9790 echo "$as_me:9790: result: no" >&5
9791 echo "${ECHO_T}no" >&6
9792 LIBS="$cf_save_LIBS"
9794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9798 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9802 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9804 if test "$cf_found_library" = no ; then
9805 { { echo "$as_me:9805: error: Cannot link $cf_nculib_root library" >&5
9806 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9807 { (exit 1); exit 1; }; }
9812 if test -n "$cf_ncurses_LIBS" ; then
9813 echo "$as_me:9813: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9814 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9815 cf_ncurses_SAVE="$LIBS"
9816 for p in $cf_ncurses_LIBS ; do
9817 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9818 if test "$q" != "$LIBS" ; then
9822 cat >"conftest.$ac_ext" <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 #include <${cf_cv_ncurses_header:-curses.h}>
9829 initscr(); mousemask(0,0); tigetstr((char *)0);
9834 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9835 if { (eval echo "$as_me:9835: \"$ac_link\"") >&5
9836 (eval $ac_link) 2>&5
9838 echo "$as_me:9838: \$? = $ac_status" >&5
9839 (exit "$ac_status"); } &&
9840 { ac_try='test -s "conftest$ac_exeext"'
9841 { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9844 echo "$as_me:9844: \$? = $ac_status" >&5
9845 (exit "$ac_status"); }; }; then
9846 echo "$as_me:9846: result: yes" >&5
9847 echo "${ECHO_T}yes" >&6
9849 echo "$as_me: failed program was:" >&5
9850 cat "conftest.$ac_ext" >&5
9851 echo "$as_me:9851: result: no" >&5
9852 echo "${ECHO_T}no" >&6
9853 LIBS="$cf_ncurses_SAVE"
9855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9858 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9860 cat >>confdefs.h <<EOF
9861 #define $cf_nculib_ROOT 1
9872 cf_ncuconfig_root=$cf_cv_screen
9873 cf_have_ncuconfig=no
9875 if test "x${PKG_CONFIG:=none}" != xnone; then
9876 echo "$as_me:9876: checking pkg-config for $cf_ncuconfig_root" >&5
9877 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9878 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9879 echo "$as_me:9879: result: yes" >&5
9880 echo "${ECHO_T}yes" >&6
9882 echo "$as_me:9882: checking if the $cf_ncuconfig_root package files work" >&5
9883 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9884 cf_have_ncuconfig=unknown
9886 cf_save_CFLAGS="$CFLAGS"
9887 cf_save_CPPFLAGS="$CPPFLAGS"
9888 cf_save_LIBS="$LIBS"
9890 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9891 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9893 # while -W for passing linker flags is prevalent, it is not "standard".
9894 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9895 # incompatible _and_ non-standard -W option which gives an error. Work
9896 # around that pitfall.
9897 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9903 cf_new_extra_cppflags=
9905 for cf_add_cflags in $cf_pkg_cflags
9907 case "$cf_fix_cppflags" in
9909 case "$cf_add_cflags" in
9910 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9911 case "$cf_add_cflags" in
9913 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9915 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9916 && test -z "${cf_tst_cflags}" \
9917 && cf_fix_cppflags=yes
9919 if test "$cf_fix_cppflags" = yes ; then
9921 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9922 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9925 elif test "${cf_tst_cflags}" = "\"'" ; then
9927 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9928 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9938 case "$cf_add_cflags" in
9940 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9942 CPPFLAGS=`echo "$CPPFLAGS" | \
9943 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9944 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9949 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9950 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9957 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9958 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9965 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9966 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9968 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9970 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9971 && test -z "${cf_tst_cflags}" \
9972 && cf_fix_cppflags=no
9977 if test -n "$cf_new_cflags" ; then
9979 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9980 CFLAGS="${CFLAGS}$cf_new_cflags"
9984 if test -n "$cf_new_cppflags" ; then
9986 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9987 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9991 if test -n "$cf_new_extra_cppflags" ; then
9993 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9994 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10001 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10002 # filter duplicates
10003 for cf_add_1lib in $cf_add_0lib; do
10004 for cf_add_2lib in $cf_add_libs; do
10005 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10010 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10012 LIBS="$cf_add_libs"
10014 cat >"conftest.$ac_ext" <<_ACEOF
10015 #line 10015 "configure"
10016 #include "confdefs.h"
10017 #include <${cf_cv_ncurses_header:-curses.h}>
10021 initscr(); mousemask(0,0); tigetstr((char *)0);
10026 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10027 if { (eval echo "$as_me:10027: \"$ac_link\"") >&5
10028 (eval $ac_link) 2>&5
10030 echo "$as_me:10030: \$? = $ac_status" >&5
10031 (exit "$ac_status"); } &&
10032 { ac_try='test -s "conftest$ac_exeext"'
10033 { (eval echo "$as_me:10033: \"$ac_try\"") >&5
10034 (eval $ac_try) 2>&5
10036 echo "$as_me:10036: \$? = $ac_status" >&5
10037 (exit "$ac_status"); }; }; then
10038 if test "$cross_compiling" = yes; then
10039 cf_test_ncuconfig=maybe
10041 cat >"conftest.$ac_ext" <<_ACEOF
10042 #line 10042 "configure"
10043 #include "confdefs.h"
10044 #include <${cf_cv_ncurses_header:-curses.h}>
10046 { char *xx = curses_version(); return (xx == 0); }
10048 rm -f "conftest$ac_exeext"
10049 if { (eval echo "$as_me:10049: \"$ac_link\"") >&5
10050 (eval $ac_link) 2>&5
10052 echo "$as_me:10052: \$? = $ac_status" >&5
10053 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10054 { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055 (eval $ac_try) 2>&5
10057 echo "$as_me:10057: \$? = $ac_status" >&5
10058 (exit "$ac_status"); }; }; then
10059 cf_test_ncuconfig=yes
10061 echo "$as_me: program exited with status $ac_status" >&5
10062 echo "$as_me: failed program was:" >&5
10063 cat "conftest.$ac_ext" >&5
10064 cf_test_ncuconfig=no
10066 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10069 echo "$as_me: failed program was:" >&5
10070 cat "conftest.$ac_ext" >&5
10071 cf_test_ncuconfig=no
10073 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10075 CFLAGS="$cf_save_CFLAGS"
10076 CPPFLAGS="$cf_save_CPPFLAGS"
10077 LIBS="$cf_save_LIBS"
10079 if test "x$cf_test_ncuconfig" != xyes; then
10080 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10081 cf_pkg_cflags="$cf_temp"
10082 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10083 cf_pkg_libs="$cf_temp"
10091 cf_new_extra_cppflags=
10093 for cf_add_cflags in $cf_pkg_cflags
10095 case "$cf_fix_cppflags" in
10097 case "$cf_add_cflags" in
10098 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10099 case "$cf_add_cflags" in
10101 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10103 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10104 && test -z "${cf_tst_cflags}" \
10105 && cf_fix_cppflags=yes
10107 if test "$cf_fix_cppflags" = yes ; then
10109 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10110 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10113 elif test "${cf_tst_cflags}" = "\"'" ; then
10115 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10116 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10122 case "$CPPFLAGS" in
10126 case "$cf_add_cflags" in
10128 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10130 CPPFLAGS=`echo "$CPPFLAGS" | \
10131 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10132 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10137 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10138 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10145 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10146 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10153 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10154 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10156 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10158 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10159 && test -z "${cf_tst_cflags}" \
10160 && cf_fix_cppflags=no
10165 if test -n "$cf_new_cflags" ; then
10167 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10168 CFLAGS="${CFLAGS}$cf_new_cflags"
10172 if test -n "$cf_new_cppflags" ; then
10174 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10175 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10179 if test -n "$cf_new_extra_cppflags" ; then
10181 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10182 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10186 cf_add_libs="$LIBS"
10189 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10190 # filter duplicates
10191 for cf_add_1lib in $cf_add_0lib; do
10192 for cf_add_2lib in $cf_add_libs; do
10193 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10198 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10200 LIBS="$cf_add_libs"
10202 cat >"conftest.$ac_ext" <<_ACEOF
10203 #line 10203 "configure"
10204 #include "confdefs.h"
10205 #include <${cf_cv_ncurses_header:-curses.h}>
10209 initscr(); mousemask(0,0); tigetstr((char *)0);
10214 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10215 if { (eval echo "$as_me:10215: \"$ac_link\"") >&5
10216 (eval $ac_link) 2>&5
10218 echo "$as_me:10218: \$? = $ac_status" >&5
10219 (exit "$ac_status"); } &&
10220 { ac_try='test -s "conftest$ac_exeext"'
10221 { (eval echo "$as_me:10221: \"$ac_try\"") >&5
10222 (eval $ac_try) 2>&5
10224 echo "$as_me:10224: \$? = $ac_status" >&5
10225 (exit "$ac_status"); }; }; then
10226 if test "$cross_compiling" = yes; then
10227 cf_have_ncuconfig=maybe
10229 cat >"conftest.$ac_ext" <<_ACEOF
10230 #line 10230 "configure"
10231 #include "confdefs.h"
10232 #include <${cf_cv_ncurses_header:-curses.h}>
10234 { char *xx = curses_version(); return (xx == 0); }
10236 rm -f "conftest$ac_exeext"
10237 if { (eval echo "$as_me:10237: \"$ac_link\"") >&5
10238 (eval $ac_link) 2>&5
10240 echo "$as_me:10240: \$? = $ac_status" >&5
10241 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10242 { (eval echo "$as_me:10242: \"$ac_try\"") >&5
10243 (eval $ac_try) 2>&5
10245 echo "$as_me:10245: \$? = $ac_status" >&5
10246 (exit "$ac_status"); }; }; then
10247 cf_have_ncuconfig=yes
10249 echo "$as_me: program exited with status $ac_status" >&5
10250 echo "$as_me: failed program was:" >&5
10251 cat "conftest.$ac_ext" >&5
10252 cf_have_ncuconfig=no
10254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10257 echo "$as_me: failed program was:" >&5
10258 cat "conftest.$ac_ext" >&5
10259 cf_have_ncuconfig=no
10261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10262 echo "$as_me:10262: result: $cf_have_ncuconfig" >&5
10263 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10264 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10265 if test "$cf_have_ncuconfig" != "yes"
10267 CPPFLAGS="$cf_save_CPPFLAGS"
10268 LIBS="$cf_save_LIBS"
10269 NCURSES_CONFIG_PKG=none
10272 cat >>confdefs.h <<\EOF
10276 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10278 echo "$as_me:10278: checking for terminfo header" >&5
10279 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10280 if test "${cf_cv_term_header+set}" = set; then
10281 echo $ECHO_N "(cached) $ECHO_C" >&6
10284 case "${cf_cv_ncurses_header}" in
10285 (*/ncurses.h|*/ncursesw.h)
10286 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10289 cf_term_header=term.h
10293 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10295 cat >"conftest.$ac_ext" <<_ACEOF
10296 #line 10296 "configure"
10297 #include "confdefs.h"
10299 #include <${cf_cv_ncurses_header:-curses.h}>
10300 #include <$cf_test>
10305 int x = auto_left_margin; (void)x
10310 rm -f "conftest.$ac_objext"
10311 if { (eval echo "$as_me:10311: \"$ac_compile\"") >&5
10312 (eval $ac_compile) 2>&5
10314 echo "$as_me:10314: \$? = $ac_status" >&5
10315 (exit "$ac_status"); } &&
10316 { ac_try='test -s "conftest.$ac_objext"'
10317 { (eval echo "$as_me:10317: \"$ac_try\"") >&5
10318 (eval $ac_try) 2>&5
10320 echo "$as_me:10320: \$? = $ac_status" >&5
10321 (exit "$ac_status"); }; }; then
10323 cf_cv_term_header="$cf_test"
10325 echo "$as_me: failed program was:" >&5
10326 cat "conftest.$ac_ext" >&5
10328 cf_cv_term_header=unknown
10331 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10332 test "$cf_cv_term_header" != unknown && break
10336 echo "$as_me:10336: result: $cf_cv_term_header" >&5
10337 echo "${ECHO_T}$cf_cv_term_header" >&6
10339 # Set definitions to allow ifdef'ing to accommodate subdirectories
10341 case "$cf_cv_term_header" in
10344 cat >>confdefs.h <<\EOF
10345 #define HAVE_TERM_H 1
10351 case "$cf_cv_term_header" in
10354 cat >>confdefs.h <<\EOF
10355 #define HAVE_NCURSES_TERM_H 1
10361 cat >>confdefs.h <<\EOF
10362 #define HAVE_NCURSESW_TERM_H 1
10371 echo "$as_me:10371: result: no" >&5
10372 echo "${ECHO_T}no" >&6
10373 NCURSES_CONFIG_PKG=none
10376 NCURSES_CONFIG_PKG=none
10379 if test "x$cf_have_ncuconfig" = "xno"; then
10380 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
10382 if test -n "$ac_tool_prefix"; then
10383 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10385 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
10386 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
10387 echo "$as_me:10387: checking for $ac_word" >&5
10388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10389 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
10390 echo $ECHO_N "(cached) $ECHO_C" >&6
10392 if test -n "$NCURSES_CONFIG"; then
10393 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
10395 ac_save_IFS=$IFS; IFS=$ac_path_separator
10397 for ac_dir in $ac_dummy; do
10399 test -z "$ac_dir" && ac_dir=.
10400 $as_executable_p "$ac_dir/$ac_word" || continue
10401 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
10402 echo "$as_me:10402: found $ac_dir/$ac_word" >&5
10408 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
10409 if test -n "$NCURSES_CONFIG"; then
10410 echo "$as_me:10410: result: $NCURSES_CONFIG" >&5
10411 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10413 echo "$as_me:10413: result: no" >&5
10414 echo "${ECHO_T}no" >&6
10417 test -n "$NCURSES_CONFIG" && break
10420 if test -z "$NCURSES_CONFIG"; then
10421 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10422 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10424 # Extract the first word of "$ac_prog", so it can be a program name with args.
10425 set dummy $ac_prog; ac_word=$2
10426 echo "$as_me:10426: checking for $ac_word" >&5
10427 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10428 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10429 echo $ECHO_N "(cached) $ECHO_C" >&6
10431 if test -n "$ac_ct_NCURSES_CONFIG"; then
10432 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10434 ac_save_IFS=$IFS; IFS=$ac_path_separator
10436 for ac_dir in $ac_dummy; do
10438 test -z "$ac_dir" && ac_dir=.
10439 $as_executable_p "$ac_dir/$ac_word" || continue
10440 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10441 echo "$as_me:10441: found $ac_dir/$ac_word" >&5
10447 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10448 if test -n "$ac_ct_NCURSES_CONFIG"; then
10449 echo "$as_me:10449: result: $ac_ct_NCURSES_CONFIG" >&5
10450 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10452 echo "$as_me:10452: result: no" >&5
10453 echo "${ECHO_T}no" >&6
10456 test -n "$ac_ct_NCURSES_CONFIG" && break
10458 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10460 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10463 if test "$NCURSES_CONFIG" != none ; then
10468 cf_new_extra_cppflags=
10470 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10472 case "$cf_fix_cppflags" in
10474 case "$cf_add_cflags" in
10475 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10476 case "$cf_add_cflags" in
10478 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10480 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10481 && test -z "${cf_tst_cflags}" \
10482 && cf_fix_cppflags=yes
10484 if test "$cf_fix_cppflags" = yes ; then
10486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10490 elif test "${cf_tst_cflags}" = "\"'" ; then
10492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10499 case "$CPPFLAGS" in
10503 case "$cf_add_cflags" in
10505 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10507 CPPFLAGS=`echo "$CPPFLAGS" | \
10508 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10509 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10514 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10515 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10522 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10523 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10530 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10531 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10533 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10535 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10536 && test -z "${cf_tst_cflags}" \
10537 && cf_fix_cppflags=no
10542 if test -n "$cf_new_cflags" ; then
10544 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10545 CFLAGS="${CFLAGS}$cf_new_cflags"
10549 if test -n "$cf_new_cppflags" ; then
10551 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10552 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10556 if test -n "$cf_new_extra_cppflags" ; then
10558 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10559 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10563 cf_add_libs="$LIBS"
10566 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10567 # filter duplicates
10568 for cf_add_1lib in $cf_add_0lib; do
10569 for cf_add_2lib in $cf_add_libs; do
10570 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10575 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10577 LIBS="$cf_add_libs"
10579 # even with config script, some packages use no-override for curses.h
10581 echo "$as_me:10581: checking if we have identified curses headers" >&5
10582 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10583 if test "${cf_cv_ncurses_header+set}" = set; then
10584 echo $ECHO_N "(cached) $ECHO_C" >&6
10587 cf_cv_ncurses_header=none
10589 ncurses.h $cf_cv_screen/ncurses.h \
10590 curses.h $cf_cv_screen/curses.h
10592 cat >"conftest.$ac_ext" <<_ACEOF
10593 #line 10593 "configure"
10594 #include "confdefs.h"
10595 #include <${cf_header}>
10599 initscr(); tgoto("?", 0,0)
10604 rm -f "conftest.$ac_objext"
10605 if { (eval echo "$as_me:10605: \"$ac_compile\"") >&5
10606 (eval $ac_compile) 2>&5
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit "$ac_status"); } &&
10610 { ac_try='test -s "conftest.$ac_objext"'
10611 { (eval echo "$as_me:10611: \"$ac_try\"") >&5
10612 (eval $ac_try) 2>&5
10614 echo "$as_me:10614: \$? = $ac_status" >&5
10615 (exit "$ac_status"); }; }; then
10616 cf_cv_ncurses_header=$cf_header; break
10618 echo "$as_me: failed program was:" >&5
10619 cat "conftest.$ac_ext" >&5
10621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10625 echo "$as_me:10625: result: $cf_cv_ncurses_header" >&5
10626 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10628 if test "$cf_cv_ncurses_header" = none ; then
10629 { { echo "$as_me:10629: error: No curses header-files found" >&5
10630 echo "$as_me: error: No curses header-files found" >&2;}
10631 { (exit 1); exit 1; }; }
10634 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10636 for ac_header in $cf_cv_ncurses_header
10638 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10639 echo "$as_me:10639: checking for $ac_header" >&5
10640 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10641 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10642 echo $ECHO_N "(cached) $ECHO_C" >&6
10644 cat >"conftest.$ac_ext" <<_ACEOF
10645 #line 10645 "configure"
10646 #include "confdefs.h"
10647 #include <$ac_header>
10649 if { (eval echo "$as_me:10649: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10650 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10652 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10654 cat conftest.err >&5
10655 echo "$as_me:10655: \$? = $ac_status" >&5
10656 (exit "$ac_status"); } >/dev/null; then
10657 if test -s conftest.err; then
10658 ac_cpp_err=$ac_c_preproc_warn_flag
10665 if test -z "$ac_cpp_err"; then
10666 eval "$as_ac_Header=yes"
10668 echo "$as_me: failed program was:" >&5
10669 cat "conftest.$ac_ext" >&5
10670 eval "$as_ac_Header=no"
10672 rm -f conftest.err "conftest.$ac_ext"
10674 echo "$as_me:10674: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10675 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10676 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10677 cat >>confdefs.h <<EOF
10678 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10684 cat >>confdefs.h <<\EOF
10688 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10690 cat >>confdefs.h <<EOF
10691 #define $cf_nculib_ROOT 1
10694 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10698 cf_ncuhdr_root=$cf_cv_screen
10700 test -n "$cf_cv_curses_dir" && \
10701 test "$cf_cv_curses_dir" != "no" && { \
10703 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10704 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10706 while test "$cf_add_incdir" != /usr/include
10708 if test -d "$cf_add_incdir"
10711 if test -n "$CFLAGS$CPPFLAGS" ; then
10712 # a loop is needed to ensure we can add subdirs of existing dirs
10713 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10714 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10715 cf_have_incdir=yes; break
10720 if test "$cf_have_incdir" = no ; then
10721 if test "$cf_add_incdir" = /usr/local/include ; then
10722 if test "$GCC" = yes
10724 cf_save_CPPFLAGS=$CPPFLAGS
10726 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10727 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10729 cat >"conftest.$ac_ext" <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10741 rm -f "conftest.$ac_objext"
10742 if { (eval echo "$as_me:10742: \"$ac_compile\"") >&5
10743 (eval $ac_compile) 2>&5
10745 echo "$as_me:10745: \$? = $ac_status" >&5
10746 (exit "$ac_status"); } &&
10747 { ac_try='test -s "conftest.$ac_objext"'
10748 { (eval echo "$as_me:10748: \"$ac_try\"") >&5
10749 (eval $ac_try) 2>&5
10751 echo "$as_me:10751: \$? = $ac_status" >&5
10752 (exit "$ac_status"); }; }; then
10755 echo "$as_me: failed program was:" >&5
10756 cat "conftest.$ac_ext" >&5
10759 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10760 CPPFLAGS=$cf_save_CPPFLAGS
10765 if test "$cf_have_incdir" = no ; then
10766 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10768 echo "${as_me:-configure}:10768: testing adding $cf_add_incdir to include-path ..." 1>&5
10770 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10772 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10773 test "$cf_top_incdir" = "$cf_add_incdir" && break
10774 cf_add_incdir="$cf_top_incdir"
10787 echo "$as_me:10787: checking for $cf_ncuhdr_root header in include-path" >&5
10788 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10789 if test "${cf_cv_ncurses_h+set}" = set; then
10790 echo $ECHO_N "(cached) $ECHO_C" >&6
10793 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10794 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10795 for cf_header in $cf_header_list
10798 cat >"conftest.$ac_ext" <<_ACEOF
10799 #line 10799 "configure"
10800 #include "confdefs.h"
10802 #include <$cf_header>
10807 #ifdef NCURSES_VERSION
10809 printf("%s\\n", NCURSES_VERSION);
10822 rm -f "conftest.$ac_objext"
10823 if { (eval echo "$as_me:10823: \"$ac_compile\"") >&5
10824 (eval $ac_compile) 2>&5
10826 echo "$as_me:10826: \$? = $ac_status" >&5
10827 (exit "$ac_status"); } &&
10828 { ac_try='test -s "conftest.$ac_objext"'
10829 { (eval echo "$as_me:10829: \"$ac_try\"") >&5
10830 (eval $ac_try) 2>&5
10832 echo "$as_me:10832: \$? = $ac_status" >&5
10833 (exit "$ac_status"); }; }; then
10834 cf_cv_ncurses_h=$cf_header
10837 echo "$as_me: failed program was:" >&5
10838 cat "conftest.$ac_ext" >&5
10841 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10843 test "$cf_cv_ncurses_h" != no && break
10847 echo "$as_me:10847: result: $cf_cv_ncurses_h" >&5
10848 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10850 if test "$cf_cv_ncurses_h" != no ; then
10851 cf_cv_ncurses_header=$cf_cv_ncurses_h
10854 echo "$as_me:10854: checking for $cf_ncuhdr_root include-path" >&5
10855 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10856 if test "${cf_cv_ncurses_h2+set}" = set; then
10857 echo $ECHO_N "(cached) $ECHO_C" >&6
10860 test -n "$verbose" && echo
10864 # collect the current set of include-directories from compiler flags
10865 cf_header_path_list=""
10866 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10867 for cf_header_path in $CPPFLAGS $CFLAGS
10869 case "$cf_header_path" in
10871 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10873 test "x$cf_header_path" != "xNONE" && \
10874 test -d "$cf_header_path" && \
10876 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10877 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10878 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10879 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10880 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10881 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"
10884 cf_header_path_list="$cf_header_path_list $cf_search"
10890 # add the variations for the package we are looking for
10894 test "x$prefix" != "xNONE" && \
10895 test -d "$prefix" && \
10897 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10898 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10899 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10900 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10901 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10902 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10905 for cf_subdir_prefix in \
10914 test "x$cf_subdir_prefix" != "x$prefix" && \
10915 test -d "$cf_subdir_prefix" && \
10916 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10917 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10918 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10919 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10920 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10921 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10922 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"
10927 test "$includedir" != NONE && \
10928 test "$includedir" != "/usr/include" && \
10929 test -d "$includedir" && {
10930 test -d "$includedir" && cf_search="$cf_search $includedir"
10931 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10934 test "$oldincludedir" != NONE && \
10935 test "$oldincludedir" != "/usr/include" && \
10936 test -d "$oldincludedir" && {
10937 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10938 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10941 cf_search="$cf_search $cf_header_path_list"
10943 test -n "$verbose" && echo "search path $cf_search"
10944 cf_save2_CPPFLAGS="$CPPFLAGS"
10945 for cf_incdir in $cf_search
10948 if test -n "$cf_incdir" ; then
10949 for cf_add_incdir in $cf_incdir
10951 while test "$cf_add_incdir" != /usr/include
10953 if test -d "$cf_add_incdir"
10956 if test -n "$CFLAGS$CPPFLAGS" ; then
10957 # a loop is needed to ensure we can add subdirs of existing dirs
10958 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10959 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10960 cf_have_incdir=yes; break
10965 if test "$cf_have_incdir" = no ; then
10966 if test "$cf_add_incdir" = /usr/local/include ; then
10967 if test "$GCC" = yes
10969 cf_save_CPPFLAGS=$CPPFLAGS
10971 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10972 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10974 cat >"conftest.$ac_ext" <<_ACEOF
10975 #line 10975 "configure"
10976 #include "confdefs.h"
10986 rm -f "conftest.$ac_objext"
10987 if { (eval echo "$as_me:10987: \"$ac_compile\"") >&5
10988 (eval $ac_compile) 2>&5
10990 echo "$as_me:10990: \$? = $ac_status" >&5
10991 (exit "$ac_status"); } &&
10992 { ac_try='test -s "conftest.$ac_objext"'
10993 { (eval echo "$as_me:10993: \"$ac_try\"") >&5
10994 (eval $ac_try) 2>&5
10996 echo "$as_me:10996: \$? = $ac_status" >&5
10997 (exit "$ac_status"); }; }; then
11000 echo "$as_me: failed program was:" >&5
11001 cat "conftest.$ac_ext" >&5
11004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11005 CPPFLAGS=$cf_save_CPPFLAGS
11010 if test "$cf_have_incdir" = no ; then
11011 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11013 echo "${as_me:-configure}:11013: testing adding $cf_add_incdir to include-path ..." 1>&5
11015 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11017 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11018 test "$cf_top_incdir" = "$cf_add_incdir" && break
11019 cf_add_incdir="$cf_top_incdir"
11035 cat >"conftest.$ac_ext" <<_ACEOF
11036 #line 11036 "configure"
11037 #include "confdefs.h"
11039 #include <$cf_header>
11044 #ifdef NCURSES_VERSION
11046 printf("%s\\n", NCURSES_VERSION);
11059 rm -f "conftest.$ac_objext"
11060 if { (eval echo "$as_me:11060: \"$ac_compile\"") >&5
11061 (eval $ac_compile) 2>&5
11063 echo "$as_me:11063: \$? = $ac_status" >&5
11064 (exit "$ac_status"); } &&
11065 { ac_try='test -s "conftest.$ac_objext"'
11066 { (eval echo "$as_me:11066: \"$ac_try\"") >&5
11067 (eval $ac_try) 2>&5
11069 echo "$as_me:11069: \$? = $ac_status" >&5
11070 (exit "$ac_status"); }; }; then
11071 cf_cv_ncurses_h2=$cf_header
11074 echo "$as_me: failed program was:" >&5
11075 cat "conftest.$ac_ext" >&5
11076 cf_cv_ncurses_h2=no
11078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11080 if test "$cf_cv_ncurses_h2" != no ; then
11081 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11082 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11085 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11087 CPPFLAGS="$cf_save2_CPPFLAGS"
11088 test "$cf_cv_ncurses_h2" != no && break
11090 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11090: error: not found" >&5
11091 echo "$as_me: error: not found" >&2;}
11092 { (exit 1); exit 1; }; }
11095 echo "$as_me:11095: result: $cf_cv_ncurses_h2" >&5
11096 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11098 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11099 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11100 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11101 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11104 if test -n "$cf_1st_incdir" ; then
11105 for cf_add_incdir in $cf_1st_incdir
11107 while test "$cf_add_incdir" != /usr/include
11109 if test -d "$cf_add_incdir"
11112 if test -n "$CFLAGS$CPPFLAGS" ; then
11113 # a loop is needed to ensure we can add subdirs of existing dirs
11114 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11115 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11116 cf_have_incdir=yes; break
11121 if test "$cf_have_incdir" = no ; then
11122 if test "$cf_add_incdir" = /usr/local/include ; then
11123 if test "$GCC" = yes
11125 cf_save_CPPFLAGS=$CPPFLAGS
11127 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11128 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11130 cat >"conftest.$ac_ext" <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11142 rm -f "conftest.$ac_objext"
11143 if { (eval echo "$as_me:11143: \"$ac_compile\"") >&5
11144 (eval $ac_compile) 2>&5
11146 echo "$as_me:11146: \$? = $ac_status" >&5
11147 (exit "$ac_status"); } &&
11148 { ac_try='test -s "conftest.$ac_objext"'
11149 { (eval echo "$as_me:11149: \"$ac_try\"") >&5
11150 (eval $ac_try) 2>&5
11152 echo "$as_me:11152: \$? = $ac_status" >&5
11153 (exit "$ac_status"); }; }; then
11156 echo "$as_me: failed program was:" >&5
11157 cat "conftest.$ac_ext" >&5
11160 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11161 CPPFLAGS=$cf_save_CPPFLAGS
11166 if test "$cf_have_incdir" = no ; then
11167 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11169 echo "${as_me:-configure}:11169: testing adding $cf_add_incdir to include-path ..." 1>&5
11171 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11173 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11174 test "$cf_top_incdir" = "$cf_add_incdir" && break
11175 cf_add_incdir="$cf_top_incdir"
11188 # Set definitions to allow ifdef'ing for ncurses.h
11190 case "$cf_cv_ncurses_header" in
11193 cat >>confdefs.h <<\EOF
11194 #define HAVE_NCURSES_H 1
11200 case "$cf_cv_ncurses_header" in
11201 (ncurses/curses.h|ncurses/ncurses.h)
11203 cat >>confdefs.h <<\EOF
11204 #define HAVE_NCURSES_NCURSES_H 1
11208 (ncursesw/curses.h|ncursesw/ncurses.h)
11210 cat >>confdefs.h <<\EOF
11211 #define HAVE_NCURSESW_NCURSES_H 1
11217 echo "$as_me:11217: checking for terminfo header" >&5
11218 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11219 if test "${cf_cv_term_header+set}" = set; then
11220 echo $ECHO_N "(cached) $ECHO_C" >&6
11223 case "${cf_cv_ncurses_header}" in
11224 (*/ncurses.h|*/ncursesw.h)
11225 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11228 cf_term_header=term.h
11232 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11234 cat >"conftest.$ac_ext" <<_ACEOF
11235 #line 11235 "configure"
11236 #include "confdefs.h"
11238 #include <${cf_cv_ncurses_header:-curses.h}>
11239 #include <$cf_test>
11244 int x = auto_left_margin; (void)x
11249 rm -f "conftest.$ac_objext"
11250 if { (eval echo "$as_me:11250: \"$ac_compile\"") >&5
11251 (eval $ac_compile) 2>&5
11253 echo "$as_me:11253: \$? = $ac_status" >&5
11254 (exit "$ac_status"); } &&
11255 { ac_try='test -s "conftest.$ac_objext"'
11256 { (eval echo "$as_me:11256: \"$ac_try\"") >&5
11257 (eval $ac_try) 2>&5
11259 echo "$as_me:11259: \$? = $ac_status" >&5
11260 (exit "$ac_status"); }; }; then
11262 cf_cv_term_header="$cf_test"
11264 echo "$as_me: failed program was:" >&5
11265 cat "conftest.$ac_ext" >&5
11267 cf_cv_term_header=unknown
11270 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11271 test "$cf_cv_term_header" != unknown && break
11275 echo "$as_me:11275: result: $cf_cv_term_header" >&5
11276 echo "${ECHO_T}$cf_cv_term_header" >&6
11278 # Set definitions to allow ifdef'ing to accommodate subdirectories
11280 case "$cf_cv_term_header" in
11283 cat >>confdefs.h <<\EOF
11284 #define HAVE_TERM_H 1
11290 case "$cf_cv_term_header" in
11293 cat >>confdefs.h <<\EOF
11294 #define HAVE_NCURSES_TERM_H 1
11300 cat >>confdefs.h <<\EOF
11301 #define HAVE_NCURSESW_TERM_H 1
11307 # some applications need this, but should check for NCURSES_VERSION
11309 cat >>confdefs.h <<\EOF
11313 echo "$as_me:11313: checking for ncurses version" >&5
11314 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
11315 if test "${cf_cv_ncurses_version+set}" = set; then
11316 echo $ECHO_N "(cached) $ECHO_C" >&6
11319 cf_cv_ncurses_version=no
11321 rm -f "$cf_tempfile"
11322 if test "$cross_compiling" = yes; then
11324 # This will not work if the preprocessor splits the line after the
11325 # Autoconf token. The 'unproto' program does that.
11326 cat > "conftest.$ac_ext" <<EOF
11327 #include <${cf_cv_ncurses_header:-curses.h}>
11329 #ifdef NCURSES_VERSION
11330 Autoconf NCURSES_VERSION
11338 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
11339 { (eval echo "$as_me:11339: \"$cf_try\"") >&5
11340 (eval $cf_try) 2>&5
11342 echo "$as_me:11342: \$? = $ac_status" >&5
11343 (exit "$ac_status"); }
11344 if test -f conftest.out ; then
11345 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
11346 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
11351 cat >"conftest.$ac_ext" <<_ACEOF
11352 #line 11352 "configure"
11353 #include "confdefs.h"
11355 #include <${cf_cv_ncurses_header:-curses.h}>
11359 FILE *fp = fopen("$cf_tempfile", "w");
11360 #ifdef NCURSES_VERSION
11361 # ifdef NCURSES_VERSION_PATCH
11362 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
11364 fprintf(fp, "%s\\n", NCURSES_VERSION);
11367 # ifdef __NCURSES_H
11368 fprintf(fp, "old\\n");
11373 ${cf_cv_main_return:-return}(0);
11376 rm -f "conftest$ac_exeext"
11377 if { (eval echo "$as_me:11377: \"$ac_link\"") >&5
11378 (eval $ac_link) 2>&5
11380 echo "$as_me:11380: \$? = $ac_status" >&5
11381 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11382 { (eval echo "$as_me:11382: \"$ac_try\"") >&5
11383 (eval $ac_try) 2>&5
11385 echo "$as_me:11385: \$? = $ac_status" >&5
11386 (exit "$ac_status"); }; }; then
11388 cf_cv_ncurses_version=`cat $cf_tempfile`
11390 echo "$as_me: program exited with status $ac_status" >&5
11391 echo "$as_me: failed program was:" >&5
11392 cat "conftest.$ac_ext" >&5
11394 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11396 rm -f "$cf_tempfile"
11399 echo "$as_me:11399: result: $cf_cv_ncurses_version" >&5
11400 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11401 test "$cf_cv_ncurses_version" = no ||
11402 cat >>confdefs.h <<\EOF
11406 cf_nculib_root=$cf_cv_screen
11407 # This works, except for the special case where we find gpm, but
11408 # ncurses is in a nonstandard location via $LIBS, and we really want
11411 cf_ncurses_SAVE="$LIBS"
11412 echo "$as_me:11412: checking for Gpm_Open in -lgpm" >&5
11413 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11414 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11415 echo $ECHO_N "(cached) $ECHO_C" >&6
11417 ac_check_lib_save_LIBS=$LIBS
11419 cat >"conftest.$ac_ext" <<_ACEOF
11420 #line 11420 "configure"
11421 #include "confdefs.h"
11423 /* Override any gcc2 internal prototype to avoid an error. */
11427 /* We use char because int might match the return type of a gcc2
11428 builtin and then its argument prototype would still apply. */
11438 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11439 if { (eval echo "$as_me:11439: \"$ac_link\"") >&5
11440 (eval $ac_link) 2>&5
11442 echo "$as_me:11442: \$? = $ac_status" >&5
11443 (exit "$ac_status"); } &&
11444 { ac_try='test -s "conftest$ac_exeext"'
11445 { (eval echo "$as_me:11445: \"$ac_try\"") >&5
11446 (eval $ac_try) 2>&5
11448 echo "$as_me:11448: \$? = $ac_status" >&5
11449 (exit "$ac_status"); }; }; then
11450 ac_cv_lib_gpm_Gpm_Open=yes
11452 echo "$as_me: failed program was:" >&5
11453 cat "conftest.$ac_ext" >&5
11454 ac_cv_lib_gpm_Gpm_Open=no
11456 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11457 LIBS=$ac_check_lib_save_LIBS
11459 echo "$as_me:11459: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11460 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11461 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11462 echo "$as_me:11462: checking for initscr in -lgpm" >&5
11463 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11464 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11465 echo $ECHO_N "(cached) $ECHO_C" >&6
11467 ac_check_lib_save_LIBS=$LIBS
11469 cat >"conftest.$ac_ext" <<_ACEOF
11470 #line 11470 "configure"
11471 #include "confdefs.h"
11473 /* Override any gcc2 internal prototype to avoid an error. */
11477 /* We use char because int might match the return type of a gcc2
11478 builtin and then its argument prototype would still apply. */
11488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11489 if { (eval echo "$as_me:11489: \"$ac_link\"") >&5
11490 (eval $ac_link) 2>&5
11492 echo "$as_me:11492: \$? = $ac_status" >&5
11493 (exit "$ac_status"); } &&
11494 { ac_try='test -s "conftest$ac_exeext"'
11495 { (eval echo "$as_me:11495: \"$ac_try\"") >&5
11496 (eval $ac_try) 2>&5
11498 echo "$as_me:11498: \$? = $ac_status" >&5
11499 (exit "$ac_status"); }; }; then
11500 ac_cv_lib_gpm_initscr=yes
11502 echo "$as_me: failed program was:" >&5
11503 cat "conftest.$ac_ext" >&5
11504 ac_cv_lib_gpm_initscr=no
11506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11507 LIBS=$ac_check_lib_save_LIBS
11509 echo "$as_me:11509: result: $ac_cv_lib_gpm_initscr" >&5
11510 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11511 if test "$ac_cv_lib_gpm_initscr" = yes; then
11512 LIBS="$cf_ncurses_SAVE"
11514 cf_ncurses_LIBS="-lgpm"
11521 # This is only necessary if you are linking against an obsolete
11522 # version of ncurses (but it should do no harm, since it's static).
11523 if test "$cf_nculib_root" = ncurses ; then
11524 echo "$as_me:11524: checking for tgoto in -lmytinfo" >&5
11525 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11526 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11527 echo $ECHO_N "(cached) $ECHO_C" >&6
11529 ac_check_lib_save_LIBS=$LIBS
11530 LIBS="-lmytinfo $LIBS"
11531 cat >"conftest.$ac_ext" <<_ACEOF
11532 #line 11532 "configure"
11533 #include "confdefs.h"
11535 /* Override any gcc2 internal prototype to avoid an error. */
11539 /* We use char because int might match the return type of a gcc2
11540 builtin and then its argument prototype would still apply. */
11550 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11551 if { (eval echo "$as_me:11551: \"$ac_link\"") >&5
11552 (eval $ac_link) 2>&5
11554 echo "$as_me:11554: \$? = $ac_status" >&5
11555 (exit "$ac_status"); } &&
11556 { ac_try='test -s "conftest$ac_exeext"'
11557 { (eval echo "$as_me:11557: \"$ac_try\"") >&5
11558 (eval $ac_try) 2>&5
11560 echo "$as_me:11560: \$? = $ac_status" >&5
11561 (exit "$ac_status"); }; }; then
11562 ac_cv_lib_mytinfo_tgoto=yes
11564 echo "$as_me: failed program was:" >&5
11565 cat "conftest.$ac_ext" >&5
11566 ac_cv_lib_mytinfo_tgoto=no
11568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11569 LIBS=$ac_check_lib_save_LIBS
11571 echo "$as_me:11571: result: $ac_cv_lib_mytinfo_tgoto" >&5
11572 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11573 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11574 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11581 cf_add_libs="$LIBS"
11584 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11585 # filter duplicates
11586 for cf_add_1lib in $cf_add_0lib; do
11587 for cf_add_2lib in $cf_add_libs; do
11588 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11593 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11595 LIBS="$cf_add_libs"
11597 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11600 cf_add_libs="$LIBS"
11603 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11604 # filter duplicates
11605 for cf_add_1lib in $cf_add_0lib; do
11606 for cf_add_2lib in $cf_add_libs; do
11607 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11612 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11614 LIBS="$cf_add_libs"
11618 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11620 echo "$as_me:11620: checking for initscr" >&5
11621 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11622 if test "${ac_cv_func_initscr+set}" = set; then
11623 echo $ECHO_N "(cached) $ECHO_C" >&6
11625 cat >"conftest.$ac_ext" <<_ACEOF
11626 #line 11626 "configure"
11627 #include "confdefs.h"
11628 #define initscr autoconf_temporary
11629 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11636 /* We use char because int might match the return type of a gcc2
11637 builtin and then its argument prototype would still apply. */
11638 char initscr (void);
11644 /* The GNU C library defines stubs for functions which it implements
11645 to always fail with ENOSYS. Some functions are actually named
11646 something starting with __ and the normal name is an alias. */
11647 #if defined (__stub_initscr) || defined (__stub___initscr)
11648 #error found stub for initscr
11656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11657 if { (eval echo "$as_me:11657: \"$ac_link\"") >&5
11658 (eval $ac_link) 2>&5
11660 echo "$as_me:11660: \$? = $ac_status" >&5
11661 (exit "$ac_status"); } &&
11662 { ac_try='test -s "conftest$ac_exeext"'
11663 { (eval echo "$as_me:11663: \"$ac_try\"") >&5
11664 (eval $ac_try) 2>&5
11666 echo "$as_me:11666: \$? = $ac_status" >&5
11667 (exit "$ac_status"); }; }; then
11668 ac_cv_func_initscr=yes
11670 echo "$as_me: failed program was:" >&5
11671 cat "conftest.$ac_ext" >&5
11672 ac_cv_func_initscr=no
11674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11676 echo "$as_me:11676: result: $ac_cv_func_initscr" >&5
11677 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11678 if test "$ac_cv_func_initscr" = yes; then
11679 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11682 cf_save_LIBS="$LIBS"
11683 echo "$as_me:11683: checking for initscr in -l$cf_nculib_root" >&5
11684 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11685 LIBS="-l$cf_nculib_root $LIBS"
11686 cat >"conftest.$ac_ext" <<_ACEOF
11687 #line 11687 "configure"
11688 #include "confdefs.h"
11689 #include <${cf_cv_ncurses_header:-curses.h}>
11698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11699 if { (eval echo "$as_me:11699: \"$ac_link\"") >&5
11700 (eval $ac_link) 2>&5
11702 echo "$as_me:11702: \$? = $ac_status" >&5
11703 (exit "$ac_status"); } &&
11704 { ac_try='test -s "conftest$ac_exeext"'
11705 { (eval echo "$as_me:11705: \"$ac_try\"") >&5
11706 (eval $ac_try) 2>&5
11708 echo "$as_me:11708: \$? = $ac_status" >&5
11709 (exit "$ac_status"); }; }; then
11710 echo "$as_me:11710: result: yes" >&5
11711 echo "${ECHO_T}yes" >&6
11712 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11715 echo "$as_me: failed program was:" >&5
11716 cat "conftest.$ac_ext" >&5
11717 echo "$as_me:11717: result: no" >&5
11718 echo "${ECHO_T}no" >&6
11721 cf_library_path_list=""
11722 if test -n "${LDFLAGS}${LIBS}" ; then
11723 for cf_library_path in $LDFLAGS $LIBS
11725 case "$cf_library_path" in
11727 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11729 test "x$cf_library_path" != "xNONE" && \
11730 test -d "$cf_library_path" && \
11732 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11733 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11734 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11735 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11736 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11737 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"
11740 cf_library_path_list="$cf_library_path_list $cf_search"
11748 test "x$prefix" != "xNONE" && \
11749 test -d "$prefix" && \
11751 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11752 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11753 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11754 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11755 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11756 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11759 for cf_subdir_prefix in \
11768 test "x$cf_subdir_prefix" != "x$prefix" && \
11769 test -d "$cf_subdir_prefix" && \
11770 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11771 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11772 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11773 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11774 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11775 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11776 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"
11781 cf_search="$cf_library_path_list $cf_search"
11783 for cf_libdir in $cf_search
11785 echo "$as_me:11785: checking for -l$cf_nculib_root in $cf_libdir" >&5
11786 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11787 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11788 cat >"conftest.$ac_ext" <<_ACEOF
11789 #line 11789 "configure"
11790 #include "confdefs.h"
11791 #include <${cf_cv_ncurses_header:-curses.h}>
11800 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11801 if { (eval echo "$as_me:11801: \"$ac_link\"") >&5
11802 (eval $ac_link) 2>&5
11804 echo "$as_me:11804: \$? = $ac_status" >&5
11805 (exit "$ac_status"); } &&
11806 { ac_try='test -s "conftest$ac_exeext"'
11807 { (eval echo "$as_me:11807: \"$ac_try\"") >&5
11808 (eval $ac_try) 2>&5
11810 echo "$as_me:11810: \$? = $ac_status" >&5
11811 (exit "$ac_status"); }; }; then
11812 echo "$as_me:11812: result: yes" >&5
11813 echo "${ECHO_T}yes" >&6
11814 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11817 echo "$as_me: failed program was:" >&5
11818 cat "conftest.$ac_ext" >&5
11819 echo "$as_me:11819: result: no" >&5
11820 echo "${ECHO_T}no" >&6
11821 LIBS="$cf_save_LIBS"
11823 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11827 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11831 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11833 if test "$cf_found_library" = no ; then
11834 { { echo "$as_me:11834: error: Cannot link $cf_nculib_root library" >&5
11835 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11836 { (exit 1); exit 1; }; }
11841 if test -n "$cf_ncurses_LIBS" ; then
11842 echo "$as_me:11842: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11843 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11844 cf_ncurses_SAVE="$LIBS"
11845 for p in $cf_ncurses_LIBS ; do
11846 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11847 if test "$q" != "$LIBS" ; then
11851 cat >"conftest.$ac_ext" <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 #include <${cf_cv_ncurses_header:-curses.h}>
11858 initscr(); mousemask(0,0); tigetstr((char *)0);
11863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11864 if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
11865 (eval $ac_link) 2>&5
11867 echo "$as_me:11867: \$? = $ac_status" >&5
11868 (exit "$ac_status"); } &&
11869 { ac_try='test -s "conftest$ac_exeext"'
11870 { (eval echo "$as_me:11870: \"$ac_try\"") >&5
11871 (eval $ac_try) 2>&5
11873 echo "$as_me:11873: \$? = $ac_status" >&5
11874 (exit "$ac_status"); }; }; then
11875 echo "$as_me:11875: result: yes" >&5
11876 echo "${ECHO_T}yes" >&6
11878 echo "$as_me: failed program was:" >&5
11879 cat "conftest.$ac_ext" >&5
11880 echo "$as_me:11880: result: no" >&5
11881 echo "${ECHO_T}no" >&6
11882 LIBS="$cf_ncurses_SAVE"
11884 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11887 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11889 cat >>confdefs.h <<EOF
11890 #define $cf_nculib_ROOT 1
11895 NCURSES_CONFIG=none
11900 echo "$as_me:11900: checking for X" >&5
11901 echo $ECHO_N "checking for X... $ECHO_C" >&6
11903 # Check whether --with-x or --without-x was given.
11904 if test "${with_x+set}" = set; then
11908 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
11909 if test "x$with_x" = xno; then
11910 # The user explicitly disabled X.
11913 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
11914 # Both variables are already set.
11917 if test "${ac_cv_have_x+set}" = set; then
11918 echo $ECHO_N "(cached) $ECHO_C" >&6
11920 # One or both of the vars are not set, and there is no cached value.
11921 ac_x_includes=no ac_x_libraries=no
11922 rm -fr conftest.dir
11923 if mkdir conftest.dir; then
11925 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
11926 cat >Imakefile <<'EOF'
11928 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
11930 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11931 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
11932 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
11933 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
11934 for ac_extension in a so sl dylib dll; do
11935 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
11936 test -f "$ac_im_libdir/libX11.$ac_extension"; then
11937 ac_im_usrlibdir=$ac_im_libdir; break
11940 # Screen out bogus values from the imake configuration. They are
11941 # bogus both because they are the default anyway, and because
11942 # using them would break gcc on systems where it needs fixed includes.
11943 case $ac_im_incroot in
11945 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
11947 case $ac_im_usrlibdir in
11948 /usr/lib | /lib) ;;
11949 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
11953 rm -fr conftest.dir
11956 # Standard set of common directories for X headers.
11957 # Check X11 before X11Rn because it is often a symlink to the current release.
11974 /usr/local/X11/include
11975 /usr/local/X11R7/include
11976 /usr/local/X11R6/include
11977 /usr/local/X11R5/include
11978 /usr/local/X11R4/include
11980 /usr/local/include/X11
11981 /usr/local/include/X11R7
11982 /usr/local/include/X11R6
11983 /usr/local/include/X11R5
11984 /usr/local/include/X11R4
11988 /usr/XFree86/include/X11
11992 /usr/unsupported/include
11993 /usr/athena/include
11994 /usr/local/x11r5/include
11995 /usr/lpp/Xamples/include
11997 /usr/openwin/include
11998 /usr/openwin/share/include'
12000 if test "$ac_x_includes" = no; then
12001 # Guess where to find include files, by looking for Intrinsic.h.
12002 # First, try using that file with no special directory specified.
12003 cat >"conftest.$ac_ext" <<_ACEOF
12004 #line 12004 "configure"
12005 #include "confdefs.h"
12006 #include <X11/Intrinsic.h>
12008 if { (eval echo "$as_me:12008: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12009 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12011 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12013 cat conftest.err >&5
12014 echo "$as_me:12014: \$? = $ac_status" >&5
12015 (exit "$ac_status"); } >/dev/null; then
12016 if test -s conftest.err; then
12017 ac_cpp_err=$ac_c_preproc_warn_flag
12024 if test -z "$ac_cpp_err"; then
12025 # We can compile using X headers with no special include directory.
12028 echo "$as_me: failed program was:" >&5
12029 cat "conftest.$ac_ext" >&5
12030 for ac_dir in $ac_x_header_dirs; do
12031 if test -r "$ac_dir/X11/Intrinsic.h"; then
12032 ac_x_includes=$ac_dir
12037 rm -f conftest.err "conftest.$ac_ext"
12038 fi # $ac_x_includes = no
12040 if test "$ac_x_libraries" = no; then
12041 # Check for the libraries.
12042 # See if we find them without any special options.
12043 # Don't add to $LIBS permanently.
12046 cat >"conftest.$ac_ext" <<_ACEOF
12047 #line 12047 "configure"
12048 #include "confdefs.h"
12049 #include <X11/Intrinsic.h>
12058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12059 if { (eval echo "$as_me:12059: \"$ac_link\"") >&5
12060 (eval $ac_link) 2>&5
12062 echo "$as_me:12062: \$? = $ac_status" >&5
12063 (exit "$ac_status"); } &&
12064 { ac_try='test -s "conftest$ac_exeext"'
12065 { (eval echo "$as_me:12065: \"$ac_try\"") >&5
12066 (eval $ac_try) 2>&5
12068 echo "$as_me:12068: \$? = $ac_status" >&5
12069 (exit "$ac_status"); }; }; then
12071 # We can link X programs with no special library path.
12074 echo "$as_me: failed program was:" >&5
12075 cat "conftest.$ac_ext" >&5
12077 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12079 # Don't even attempt the hair of trying to link an X program!
12080 for ac_extension in a so sl dylib dll; do
12081 if test -r "$ac_dir/libXt.$ac_extension"; then
12082 ac_x_libraries=$ac_dir
12088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12089 fi # $ac_x_libraries = no
12091 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12092 # Didn't find X anywhere. Cache the known absence of X.
12093 ac_cv_have_x="have_x=no"
12095 # Record where we found X for the cache.
12096 ac_cv_have_x="have_x=yes \
12097 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12102 eval "$ac_cv_have_x"
12105 if test "$have_x" != yes; then
12106 echo "$as_me:12106: result: $have_x" >&5
12107 echo "${ECHO_T}$have_x" >&6
12110 # If each of the values was on the command line, it overrides each guess.
12111 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12112 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12113 # Update the cache value to reflect the command line values.
12114 ac_cv_have_x="have_x=yes \
12115 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12116 echo "$as_me:12116: result: libraries $x_libraries, headers $x_includes" >&5
12117 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12120 if test "$no_x" = yes; then
12121 # Not all programs may use this symbol, but it does not hurt to define it.
12123 cat >>confdefs.h <<\EOF
12124 #define X_DISPLAY_MISSING 1
12132 if test -n "$x_includes"; then
12133 X_CFLAGS="$X_CFLAGS -I$x_includes"
12136 # It would also be nice to do this for all -L options, not just this one.
12137 if test -n "$x_libraries"; then
12138 X_LIBS="$X_LIBS -L$x_libraries"
12139 # For Solaris; some versions of Sun CC require a space after -R and
12140 # others require no space. Words are not sufficient . . . .
12141 case `(uname -sr) 2>/dev/null` in
12143 echo "$as_me:12143: checking whether -R must be followed by a space" >&5
12144 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12145 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12146 cat >"conftest.$ac_ext" <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12159 if { (eval echo "$as_me:12159: \"$ac_link\"") >&5
12160 (eval $ac_link) 2>&5
12162 echo "$as_me:12162: \$? = $ac_status" >&5
12163 (exit "$ac_status"); } &&
12164 { ac_try='test -s "conftest$ac_exeext"'
12165 { (eval echo "$as_me:12165: \"$ac_try\"") >&5
12166 (eval $ac_try) 2>&5
12168 echo "$as_me:12168: \$? = $ac_status" >&5
12169 (exit "$ac_status"); }; }; then
12172 echo "$as_me: failed program was:" >&5
12173 cat "conftest.$ac_ext" >&5
12176 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12177 if test $ac_R_nospace = yes; then
12178 echo "$as_me:12178: result: no" >&5
12179 echo "${ECHO_T}no" >&6
12180 X_LIBS="$X_LIBS -R$x_libraries"
12182 LIBS="$ac_xsave_LIBS -R $x_libraries"
12183 cat >"conftest.$ac_ext" <<_ACEOF
12184 #line 12184 "configure"
12185 #include "confdefs.h"
12195 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12196 if { (eval echo "$as_me:12196: \"$ac_link\"") >&5
12197 (eval $ac_link) 2>&5
12199 echo "$as_me:12199: \$? = $ac_status" >&5
12200 (exit "$ac_status"); } &&
12201 { ac_try='test -s "conftest$ac_exeext"'
12202 { (eval echo "$as_me:12202: \"$ac_try\"") >&5
12203 (eval $ac_try) 2>&5
12205 echo "$as_me:12205: \$? = $ac_status" >&5
12206 (exit "$ac_status"); }; }; then
12209 echo "$as_me: failed program was:" >&5
12210 cat "conftest.$ac_ext" >&5
12213 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12214 if test $ac_R_space = yes; then
12215 echo "$as_me:12215: result: yes" >&5
12216 echo "${ECHO_T}yes" >&6
12217 X_LIBS="$X_LIBS -R $x_libraries"
12219 echo "$as_me:12219: result: neither works" >&5
12220 echo "${ECHO_T}neither works" >&6
12223 LIBS=$ac_xsave_LIBS
12227 # Check for system-dependent libraries X programs must link with.
12228 # Do this before checking for the system-independent R6 libraries
12229 # (-lICE), since we may need -lsocket or whatever for X linking.
12231 if test "$ISC" = yes; then
12232 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12234 # Martyn Johnson says this is needed for Ultrix, if the X
12235 # libraries were built with DECnet support. And Karl Berry says
12236 # the Alpha needs dnet_stub (dnet does not exist).
12237 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12238 cat >"conftest.$ac_ext" <<_ACEOF
12239 #line 12239 "configure"
12240 #include "confdefs.h"
12242 /* Override any gcc2 internal prototype to avoid an error. */
12246 /* We use char because int might match the return type of a gcc2
12247 builtin and then its argument prototype would still apply. */
12248 char XOpenDisplay ();
12257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12258 if { (eval echo "$as_me:12258: \"$ac_link\"") >&5
12259 (eval $ac_link) 2>&5
12261 echo "$as_me:12261: \$? = $ac_status" >&5
12262 (exit "$ac_status"); } &&
12263 { ac_try='test -s "conftest$ac_exeext"'
12264 { (eval echo "$as_me:12264: \"$ac_try\"") >&5
12265 (eval $ac_try) 2>&5
12267 echo "$as_me:12267: \$? = $ac_status" >&5
12268 (exit "$ac_status"); }; }; then
12271 echo "$as_me: failed program was:" >&5
12272 cat "conftest.$ac_ext" >&5
12273 echo "$as_me:12273: checking for dnet_ntoa in -ldnet" >&5
12274 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
12275 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
12276 echo $ECHO_N "(cached) $ECHO_C" >&6
12278 ac_check_lib_save_LIBS=$LIBS
12279 LIBS="-ldnet $LIBS"
12280 cat >"conftest.$ac_ext" <<_ACEOF
12281 #line 12281 "configure"
12282 #include "confdefs.h"
12284 /* Override any gcc2 internal prototype to avoid an error. */
12288 /* We use char because int might match the return type of a gcc2
12289 builtin and then its argument prototype would still apply. */
12299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12300 if { (eval echo "$as_me:12300: \"$ac_link\"") >&5
12301 (eval $ac_link) 2>&5
12303 echo "$as_me:12303: \$? = $ac_status" >&5
12304 (exit "$ac_status"); } &&
12305 { ac_try='test -s "conftest$ac_exeext"'
12306 { (eval echo "$as_me:12306: \"$ac_try\"") >&5
12307 (eval $ac_try) 2>&5
12309 echo "$as_me:12309: \$? = $ac_status" >&5
12310 (exit "$ac_status"); }; }; then
12311 ac_cv_lib_dnet_dnet_ntoa=yes
12313 echo "$as_me: failed program was:" >&5
12314 cat "conftest.$ac_ext" >&5
12315 ac_cv_lib_dnet_dnet_ntoa=no
12317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12318 LIBS=$ac_check_lib_save_LIBS
12320 echo "$as_me:12320: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
12321 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
12322 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
12323 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
12326 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
12327 echo "$as_me:12327: checking for dnet_ntoa in -ldnet_stub" >&5
12328 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
12329 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
12330 echo $ECHO_N "(cached) $ECHO_C" >&6
12332 ac_check_lib_save_LIBS=$LIBS
12333 LIBS="-ldnet_stub $LIBS"
12334 cat >"conftest.$ac_ext" <<_ACEOF
12335 #line 12335 "configure"
12336 #include "confdefs.h"
12338 /* Override any gcc2 internal prototype to avoid an error. */
12342 /* We use char because int might match the return type of a gcc2
12343 builtin and then its argument prototype would still apply. */
12353 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12354 if { (eval echo "$as_me:12354: \"$ac_link\"") >&5
12355 (eval $ac_link) 2>&5
12357 echo "$as_me:12357: \$? = $ac_status" >&5
12358 (exit "$ac_status"); } &&
12359 { ac_try='test -s "conftest$ac_exeext"'
12360 { (eval echo "$as_me:12360: \"$ac_try\"") >&5
12361 (eval $ac_try) 2>&5
12363 echo "$as_me:12363: \$? = $ac_status" >&5
12364 (exit "$ac_status"); }; }; then
12365 ac_cv_lib_dnet_stub_dnet_ntoa=yes
12367 echo "$as_me: failed program was:" >&5
12368 cat "conftest.$ac_ext" >&5
12369 ac_cv_lib_dnet_stub_dnet_ntoa=no
12371 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12372 LIBS=$ac_check_lib_save_LIBS
12374 echo "$as_me:12374: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
12375 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
12376 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
12377 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
12382 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12383 LIBS="$ac_xsave_LIBS"
12385 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
12386 # to get the SysV transport functions.
12387 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
12389 # The nsl library prevents programs from opening the X display
12390 # on Irix 5.2, according to T.E. Dickey.
12391 # The functions gethostbyname, getservbyname, and inet_addr are
12392 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
12393 echo "$as_me:12393: checking for gethostbyname" >&5
12394 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
12395 if test "${ac_cv_func_gethostbyname+set}" = set; then
12396 echo $ECHO_N "(cached) $ECHO_C" >&6
12398 cat >"conftest.$ac_ext" <<_ACEOF
12399 #line 12399 "configure"
12400 #include "confdefs.h"
12401 #define gethostbyname autoconf_temporary
12402 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12403 #undef gethostbyname
12409 /* We use char because int might match the return type of a gcc2
12410 builtin and then its argument prototype would still apply. */
12411 char gethostbyname (void);
12417 /* The GNU C library defines stubs for functions which it implements
12418 to always fail with ENOSYS. Some functions are actually named
12419 something starting with __ and the normal name is an alias. */
12420 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
12421 #error found stub for gethostbyname
12424 return gethostbyname ();
12429 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12430 if { (eval echo "$as_me:12430: \"$ac_link\"") >&5
12431 (eval $ac_link) 2>&5
12433 echo "$as_me:12433: \$? = $ac_status" >&5
12434 (exit "$ac_status"); } &&
12435 { ac_try='test -s "conftest$ac_exeext"'
12436 { (eval echo "$as_me:12436: \"$ac_try\"") >&5
12437 (eval $ac_try) 2>&5
12439 echo "$as_me:12439: \$? = $ac_status" >&5
12440 (exit "$ac_status"); }; }; then
12441 ac_cv_func_gethostbyname=yes
12443 echo "$as_me: failed program was:" >&5
12444 cat "conftest.$ac_ext" >&5
12445 ac_cv_func_gethostbyname=no
12447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12449 echo "$as_me:12449: result: $ac_cv_func_gethostbyname" >&5
12450 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
12452 if test $ac_cv_func_gethostbyname = no; then
12453 echo "$as_me:12453: checking for gethostbyname in -lnsl" >&5
12454 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
12455 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
12456 echo $ECHO_N "(cached) $ECHO_C" >&6
12458 ac_check_lib_save_LIBS=$LIBS
12460 cat >"conftest.$ac_ext" <<_ACEOF
12461 #line 12461 "configure"
12462 #include "confdefs.h"
12464 /* Override any gcc2 internal prototype to avoid an error. */
12468 /* We use char because int might match the return type of a gcc2
12469 builtin and then its argument prototype would still apply. */
12470 char gethostbyname ();
12479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12480 if { (eval echo "$as_me:12480: \"$ac_link\"") >&5
12481 (eval $ac_link) 2>&5
12483 echo "$as_me:12483: \$? = $ac_status" >&5
12484 (exit "$ac_status"); } &&
12485 { ac_try='test -s "conftest$ac_exeext"'
12486 { (eval echo "$as_me:12486: \"$ac_try\"") >&5
12487 (eval $ac_try) 2>&5
12489 echo "$as_me:12489: \$? = $ac_status" >&5
12490 (exit "$ac_status"); }; }; then
12491 ac_cv_lib_nsl_gethostbyname=yes
12493 echo "$as_me: failed program was:" >&5
12494 cat "conftest.$ac_ext" >&5
12495 ac_cv_lib_nsl_gethostbyname=no
12497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12498 LIBS=$ac_check_lib_save_LIBS
12500 echo "$as_me:12500: result: $ac_cv_lib_nsl_gethostbyname" >&5
12501 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
12502 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
12503 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
12506 if test $ac_cv_lib_nsl_gethostbyname = no; then
12507 echo "$as_me:12507: checking for gethostbyname in -lbsd" >&5
12508 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
12509 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
12510 echo $ECHO_N "(cached) $ECHO_C" >&6
12512 ac_check_lib_save_LIBS=$LIBS
12514 cat >"conftest.$ac_ext" <<_ACEOF
12515 #line 12515 "configure"
12516 #include "confdefs.h"
12518 /* Override any gcc2 internal prototype to avoid an error. */
12522 /* We use char because int might match the return type of a gcc2
12523 builtin and then its argument prototype would still apply. */
12524 char gethostbyname ();
12533 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12534 if { (eval echo "$as_me:12534: \"$ac_link\"") >&5
12535 (eval $ac_link) 2>&5
12537 echo "$as_me:12537: \$? = $ac_status" >&5
12538 (exit "$ac_status"); } &&
12539 { ac_try='test -s "conftest$ac_exeext"'
12540 { (eval echo "$as_me:12540: \"$ac_try\"") >&5
12541 (eval $ac_try) 2>&5
12543 echo "$as_me:12543: \$? = $ac_status" >&5
12544 (exit "$ac_status"); }; }; then
12545 ac_cv_lib_bsd_gethostbyname=yes
12547 echo "$as_me: failed program was:" >&5
12548 cat "conftest.$ac_ext" >&5
12549 ac_cv_lib_bsd_gethostbyname=no
12551 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12552 LIBS=$ac_check_lib_save_LIBS
12554 echo "$as_me:12554: result: $ac_cv_lib_bsd_gethostbyname" >&5
12555 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
12556 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
12557 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
12563 # lieder@skyler.mavd.honeywell.com says without -lsocket,
12564 # socket/setsockopt and other routines are undefined under SCO ODT
12565 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
12566 # on later versions), says Simon Leinen: it contains gethostby*
12567 # variants that don't use the nameserver (or something). -lsocket
12568 # must be given before -lnsl if both are needed. We assume that
12569 # if connect needs -lnsl, so does gethostbyname.
12570 echo "$as_me:12570: checking for connect" >&5
12571 echo $ECHO_N "checking for connect... $ECHO_C" >&6
12572 if test "${ac_cv_func_connect+set}" = set; then
12573 echo $ECHO_N "(cached) $ECHO_C" >&6
12575 cat >"conftest.$ac_ext" <<_ACEOF
12576 #line 12576 "configure"
12577 #include "confdefs.h"
12578 #define connect autoconf_temporary
12579 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12586 /* We use char because int might match the return type of a gcc2
12587 builtin and then its argument prototype would still apply. */
12588 char connect (void);
12594 /* The GNU C library defines stubs for functions which it implements
12595 to always fail with ENOSYS. Some functions are actually named
12596 something starting with __ and the normal name is an alias. */
12597 #if defined (__stub_connect) || defined (__stub___connect)
12598 #error found stub for connect
12606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12607 if { (eval echo "$as_me:12607: \"$ac_link\"") >&5
12608 (eval $ac_link) 2>&5
12610 echo "$as_me:12610: \$? = $ac_status" >&5
12611 (exit "$ac_status"); } &&
12612 { ac_try='test -s "conftest$ac_exeext"'
12613 { (eval echo "$as_me:12613: \"$ac_try\"") >&5
12614 (eval $ac_try) 2>&5
12616 echo "$as_me:12616: \$? = $ac_status" >&5
12617 (exit "$ac_status"); }; }; then
12618 ac_cv_func_connect=yes
12620 echo "$as_me: failed program was:" >&5
12621 cat "conftest.$ac_ext" >&5
12622 ac_cv_func_connect=no
12624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12626 echo "$as_me:12626: result: $ac_cv_func_connect" >&5
12627 echo "${ECHO_T}$ac_cv_func_connect" >&6
12629 if test $ac_cv_func_connect = no; then
12630 echo "$as_me:12630: checking for connect in -lsocket" >&5
12631 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
12632 if test "${ac_cv_lib_socket_connect+set}" = set; then
12633 echo $ECHO_N "(cached) $ECHO_C" >&6
12635 ac_check_lib_save_LIBS=$LIBS
12636 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
12637 cat >"conftest.$ac_ext" <<_ACEOF
12638 #line 12638 "configure"
12639 #include "confdefs.h"
12641 /* Override any gcc2 internal prototype to avoid an error. */
12645 /* We use char because int might match the return type of a gcc2
12646 builtin and then its argument prototype would still apply. */
12656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12657 if { (eval echo "$as_me:12657: \"$ac_link\"") >&5
12658 (eval $ac_link) 2>&5
12660 echo "$as_me:12660: \$? = $ac_status" >&5
12661 (exit "$ac_status"); } &&
12662 { ac_try='test -s "conftest$ac_exeext"'
12663 { (eval echo "$as_me:12663: \"$ac_try\"") >&5
12664 (eval $ac_try) 2>&5
12666 echo "$as_me:12666: \$? = $ac_status" >&5
12667 (exit "$ac_status"); }; }; then
12668 ac_cv_lib_socket_connect=yes
12670 echo "$as_me: failed program was:" >&5
12671 cat "conftest.$ac_ext" >&5
12672 ac_cv_lib_socket_connect=no
12674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12675 LIBS=$ac_check_lib_save_LIBS
12677 echo "$as_me:12677: result: $ac_cv_lib_socket_connect" >&5
12678 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
12679 if test "$ac_cv_lib_socket_connect" = yes; then
12680 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
12685 # Guillermo Gomez says -lposix is necessary on A/UX.
12686 echo "$as_me:12686: checking for remove" >&5
12687 echo $ECHO_N "checking for remove... $ECHO_C" >&6
12688 if test "${ac_cv_func_remove+set}" = set; then
12689 echo $ECHO_N "(cached) $ECHO_C" >&6
12691 cat >"conftest.$ac_ext" <<_ACEOF
12692 #line 12692 "configure"
12693 #include "confdefs.h"
12694 #define remove autoconf_temporary
12695 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12702 /* We use char because int might match the return type of a gcc2
12703 builtin and then its argument prototype would still apply. */
12704 char remove (void);
12710 /* The GNU C library defines stubs for functions which it implements
12711 to always fail with ENOSYS. Some functions are actually named
12712 something starting with __ and the normal name is an alias. */
12713 #if defined (__stub_remove) || defined (__stub___remove)
12714 #error found stub for remove
12722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12723 if { (eval echo "$as_me:12723: \"$ac_link\"") >&5
12724 (eval $ac_link) 2>&5
12726 echo "$as_me:12726: \$? = $ac_status" >&5
12727 (exit "$ac_status"); } &&
12728 { ac_try='test -s "conftest$ac_exeext"'
12729 { (eval echo "$as_me:12729: \"$ac_try\"") >&5
12730 (eval $ac_try) 2>&5
12732 echo "$as_me:12732: \$? = $ac_status" >&5
12733 (exit "$ac_status"); }; }; then
12734 ac_cv_func_remove=yes
12736 echo "$as_me: failed program was:" >&5
12737 cat "conftest.$ac_ext" >&5
12738 ac_cv_func_remove=no
12740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12742 echo "$as_me:12742: result: $ac_cv_func_remove" >&5
12743 echo "${ECHO_T}$ac_cv_func_remove" >&6
12745 if test $ac_cv_func_remove = no; then
12746 echo "$as_me:12746: checking for remove in -lposix" >&5
12747 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
12748 if test "${ac_cv_lib_posix_remove+set}" = set; then
12749 echo $ECHO_N "(cached) $ECHO_C" >&6
12751 ac_check_lib_save_LIBS=$LIBS
12752 LIBS="-lposix $LIBS"
12753 cat >"conftest.$ac_ext" <<_ACEOF
12754 #line 12754 "configure"
12755 #include "confdefs.h"
12757 /* Override any gcc2 internal prototype to avoid an error. */
12761 /* We use char because int might match the return type of a gcc2
12762 builtin and then its argument prototype would still apply. */
12772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12773 if { (eval echo "$as_me:12773: \"$ac_link\"") >&5
12774 (eval $ac_link) 2>&5
12776 echo "$as_me:12776: \$? = $ac_status" >&5
12777 (exit "$ac_status"); } &&
12778 { ac_try='test -s "conftest$ac_exeext"'
12779 { (eval echo "$as_me:12779: \"$ac_try\"") >&5
12780 (eval $ac_try) 2>&5
12782 echo "$as_me:12782: \$? = $ac_status" >&5
12783 (exit "$ac_status"); }; }; then
12784 ac_cv_lib_posix_remove=yes
12786 echo "$as_me: failed program was:" >&5
12787 cat "conftest.$ac_ext" >&5
12788 ac_cv_lib_posix_remove=no
12790 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12791 LIBS=$ac_check_lib_save_LIBS
12793 echo "$as_me:12793: result: $ac_cv_lib_posix_remove" >&5
12794 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
12795 if test "$ac_cv_lib_posix_remove" = yes; then
12796 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
12801 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
12802 echo "$as_me:12802: checking for shmat" >&5
12803 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
12804 if test "${ac_cv_func_shmat+set}" = set; then
12805 echo $ECHO_N "(cached) $ECHO_C" >&6
12807 cat >"conftest.$ac_ext" <<_ACEOF
12808 #line 12808 "configure"
12809 #include "confdefs.h"
12810 #define shmat autoconf_temporary
12811 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12818 /* We use char because int might match the return type of a gcc2
12819 builtin and then its argument prototype would still apply. */
12826 /* The GNU C library defines stubs for functions which it implements
12827 to always fail with ENOSYS. Some functions are actually named
12828 something starting with __ and the normal name is an alias. */
12829 #if defined (__stub_shmat) || defined (__stub___shmat)
12830 #error found stub for shmat
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_func_shmat=yes
12852 echo "$as_me: failed program was:" >&5
12853 cat "conftest.$ac_ext" >&5
12854 ac_cv_func_shmat=no
12856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12858 echo "$as_me:12858: result: $ac_cv_func_shmat" >&5
12859 echo "${ECHO_T}$ac_cv_func_shmat" >&6
12861 if test $ac_cv_func_shmat = no; then
12862 echo "$as_me:12862: checking for shmat in -lipc" >&5
12863 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
12864 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
12865 echo $ECHO_N "(cached) $ECHO_C" >&6
12867 ac_check_lib_save_LIBS=$LIBS
12869 cat >"conftest.$ac_ext" <<_ACEOF
12870 #line 12870 "configure"
12871 #include "confdefs.h"
12873 /* Override any gcc2 internal prototype to avoid an error. */
12877 /* We use char because int might match the return type of a gcc2
12878 builtin and then its argument prototype would still apply. */
12888 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12889 if { (eval echo "$as_me:12889: \"$ac_link\"") >&5
12890 (eval $ac_link) 2>&5
12892 echo "$as_me:12892: \$? = $ac_status" >&5
12893 (exit "$ac_status"); } &&
12894 { ac_try='test -s "conftest$ac_exeext"'
12895 { (eval echo "$as_me:12895: \"$ac_try\"") >&5
12896 (eval $ac_try) 2>&5
12898 echo "$as_me:12898: \$? = $ac_status" >&5
12899 (exit "$ac_status"); }; }; then
12900 ac_cv_lib_ipc_shmat=yes
12902 echo "$as_me: failed program was:" >&5
12903 cat "conftest.$ac_ext" >&5
12904 ac_cv_lib_ipc_shmat=no
12906 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12907 LIBS=$ac_check_lib_save_LIBS
12909 echo "$as_me:12909: result: $ac_cv_lib_ipc_shmat" >&5
12910 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
12911 if test "$ac_cv_lib_ipc_shmat" = yes; then
12912 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
12918 # Check for libraries that X11R6 Xt/Xaw programs need.
12919 ac_save_LDFLAGS=$LDFLAGS
12920 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
12921 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
12922 # check for ICE first), but we must link in the order -lSM -lICE or
12923 # we get undefined symbols. So assume we have SM if we have ICE.
12924 # These have to be linked with before -lX11, unlike the other
12925 # libraries we check for below, so use a different variable.
12926 # John Interrante, Karl Berry
12927 echo "$as_me:12927: checking for IceConnectionNumber in -lICE" >&5
12928 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
12929 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
12930 echo $ECHO_N "(cached) $ECHO_C" >&6
12932 ac_check_lib_save_LIBS=$LIBS
12933 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
12934 cat >"conftest.$ac_ext" <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12938 /* Override any gcc2 internal prototype to avoid an error. */
12942 /* We use char because int might match the return type of a gcc2
12943 builtin and then its argument prototype would still apply. */
12944 char IceConnectionNumber ();
12948 IceConnectionNumber ();
12953 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12954 if { (eval echo "$as_me:12954: \"$ac_link\"") >&5
12955 (eval $ac_link) 2>&5
12957 echo "$as_me:12957: \$? = $ac_status" >&5
12958 (exit "$ac_status"); } &&
12959 { ac_try='test -s "conftest$ac_exeext"'
12960 { (eval echo "$as_me:12960: \"$ac_try\"") >&5
12961 (eval $ac_try) 2>&5
12963 echo "$as_me:12963: \$? = $ac_status" >&5
12964 (exit "$ac_status"); }; }; then
12965 ac_cv_lib_ICE_IceConnectionNumber=yes
12967 echo "$as_me: failed program was:" >&5
12968 cat "conftest.$ac_ext" >&5
12969 ac_cv_lib_ICE_IceConnectionNumber=no
12971 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12972 LIBS=$ac_check_lib_save_LIBS
12974 echo "$as_me:12974: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
12975 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
12976 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
12977 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
12980 LDFLAGS=$ac_save_LDFLAGS
12984 cf_x_athena=${cf_x_athena:-Xaw}
12986 echo "$as_me:12986: checking if you want to link with Xaw 3d library" >&5
12987 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12990 # Check whether --with-Xaw3d or --without-Xaw3d was given.
12991 if test "${with_Xaw3d+set}" = set; then
12992 withval="$with_Xaw3d"
12995 if test "$withval" = yes ; then
12997 echo "$as_me:12997: result: yes" >&5
12998 echo "${ECHO_T}yes" >&6
13000 echo "$as_me:13000: result: no" >&5
13001 echo "${ECHO_T}no" >&6
13004 echo "$as_me:13004: checking if you want to link with Xaw 3d xft library" >&5
13005 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13008 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13009 if test "${with_Xaw3dxft+set}" = set; then
13010 withval="$with_Xaw3dxft"
13013 if test "$withval" = yes ; then
13014 cf_x_athena=Xaw3dxft
13015 echo "$as_me:13015: result: yes" >&5
13016 echo "${ECHO_T}yes" >&6
13018 echo "$as_me:13018: result: no" >&5
13019 echo "${ECHO_T}no" >&6
13022 echo "$as_me:13022: checking if you want to link with neXT Athena library" >&5
13023 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13026 # Check whether --with-neXtaw or --without-neXtaw was given.
13027 if test "${with_neXtaw+set}" = set; then
13028 withval="$with_neXtaw"
13031 if test "$withval" = yes ; then
13033 echo "$as_me:13033: result: yes" >&5
13034 echo "${ECHO_T}yes" >&6
13036 echo "$as_me:13036: result: no" >&5
13037 echo "${ECHO_T}no" >&6
13040 echo "$as_me:13040: checking if you want to link with Athena-Plus library" >&5
13041 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13044 # Check whether --with-XawPlus or --without-XawPlus was given.
13045 if test "${with_XawPlus+set}" = set; then
13046 withval="$with_XawPlus"
13049 if test "$withval" = yes ; then
13050 cf_x_athena=XawPlus
13051 echo "$as_me:13051: result: yes" >&5
13052 echo "${ECHO_T}yes" >&6
13054 echo "$as_me:13054: result: no" >&5
13055 echo "${ECHO_T}no" >&6
13060 if test "$PKG_CONFIG" != none ; then
13062 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13063 for cf_athena_pkg in \
13066 ${cf_x_athena}-devel \
13067 lib${cf_x_athena} \
13068 lib${cf_x_athena}-devel
13071 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13072 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13074 echo "${as_me:-configure}:13074: testing found package $cf_athena_pkg ..." 1>&5
13076 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13077 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13078 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13080 echo "${as_me:-configure}:13080: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13082 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13084 echo "${as_me:-configure}:13084: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13089 cf_new_extra_cppflags=
13091 for cf_add_cflags in $cf_pkgconfig_incs
13093 case "$cf_fix_cppflags" in
13095 case "$cf_add_cflags" in
13096 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13097 case "$cf_add_cflags" in
13099 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13101 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13102 && test -z "${cf_tst_cflags}" \
13103 && cf_fix_cppflags=yes
13105 if test "$cf_fix_cppflags" = yes ; then
13107 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13108 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13111 elif test "${cf_tst_cflags}" = "\"'" ; then
13113 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13114 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13120 case "$CPPFLAGS" in
13124 case "$cf_add_cflags" in
13126 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13128 CPPFLAGS=`echo "$CPPFLAGS" | \
13129 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13130 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13135 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13136 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13143 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13144 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13151 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13152 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13154 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13156 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13157 && test -z "${cf_tst_cflags}" \
13158 && cf_fix_cppflags=no
13163 if test -n "$cf_new_cflags" ; then
13165 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13166 CFLAGS="${CFLAGS}$cf_new_cflags"
13170 if test -n "$cf_new_cppflags" ; then
13172 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13173 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13177 if test -n "$cf_new_extra_cppflags" ; then
13179 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13180 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13184 cf_add_libs="$LIBS"
13187 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13188 # filter duplicates
13189 for cf_add_1lib in $cf_add_0lib; do
13190 for cf_add_2lib in $cf_add_libs; do
13191 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13196 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13198 LIBS="$cf_add_libs"
13200 cf_x_athena_lib="$cf_pkgconfig_libs"
13202 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13204 cat >>confdefs.h <<EOF
13205 #define $cf_x_athena_LIBS 1
13208 for cf_trim_lib in Xmu Xt X11
13211 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13212 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13213 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13215 echo "${as_me:-configure}:13215: testing ..trimmed $LIBS ..." 1>&5
13221 echo "$as_me:13221: checking for usable $cf_x_athena/Xmu package" >&5
13222 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13223 if test "${cf_cv_xaw_compat+set}" = set; then
13224 echo $ECHO_N "(cached) $ECHO_C" >&6
13227 cat >"conftest.$ac_ext" <<_ACEOF
13228 #line 13228 "configure"
13229 #include "confdefs.h"
13231 #include <X11/Xmu/CharSet.h>
13237 int check = XmuCompareISOLatin1("big", "small");
13244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13245 if { (eval echo "$as_me:13245: \"$ac_link\"") >&5
13246 (eval $ac_link) 2>&5
13248 echo "$as_me:13248: \$? = $ac_status" >&5
13249 (exit "$ac_status"); } &&
13250 { ac_try='test -s "conftest$ac_exeext"'
13251 { (eval echo "$as_me:13251: \"$ac_try\"") >&5
13252 (eval $ac_try) 2>&5
13254 echo "$as_me:13254: \$? = $ac_status" >&5
13255 (exit "$ac_status"); }; }; then
13256 cf_cv_xaw_compat=yes
13258 echo "$as_me: failed program was:" >&5
13259 cat "conftest.$ac_ext" >&5
13260 cf_cv_xaw_compat=no
13262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13264 echo "$as_me:13264: result: $cf_cv_xaw_compat" >&5
13265 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13267 if test "$cf_cv_xaw_compat" = no
13269 # workaround for broken ".pc" files...
13270 case "$cf_x_athena_lib" in
13274 test -n "$verbose" && echo " work around broken package" 1>&6
13276 echo "${as_me:-configure}:13276: testing work around broken package ..." 1>&5
13278 cf_save_xmu="$LIBS"
13279 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
13281 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
13282 test -n "$verbose" && echo " found package xmu" 1>&6
13284 echo "${as_me:-configure}:13284: testing found package xmu ..." 1>&5
13286 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
13287 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
13288 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
13290 echo "${as_me:-configure}:13290: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13292 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
13294 echo "${as_me:-configure}:13294: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
13299 cf_new_extra_cppflags=
13301 for cf_add_cflags in $cf_pkgconfig_incs
13303 case "$cf_fix_cppflags" in
13305 case "$cf_add_cflags" in
13306 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13307 case "$cf_add_cflags" in
13309 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13311 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13312 && test -z "${cf_tst_cflags}" \
13313 && cf_fix_cppflags=yes
13315 if test "$cf_fix_cppflags" = yes ; then
13317 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13318 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13321 elif test "${cf_tst_cflags}" = "\"'" ; then
13323 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13324 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13330 case "$CPPFLAGS" in
13334 case "$cf_add_cflags" in
13336 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13338 CPPFLAGS=`echo "$CPPFLAGS" | \
13339 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13340 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13345 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13346 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13353 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13354 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13361 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13362 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13364 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13366 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13367 && test -z "${cf_tst_cflags}" \
13368 && cf_fix_cppflags=no
13373 if test -n "$cf_new_cflags" ; then
13375 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13376 CFLAGS="${CFLAGS}$cf_new_cflags"
13380 if test -n "$cf_new_cppflags" ; then
13382 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13383 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13387 if test -n "$cf_new_extra_cppflags" ; then
13389 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13390 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13394 cf_add_libs="$LIBS"
13397 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13398 # filter duplicates
13399 for cf_add_1lib in $cf_add_0lib; do
13400 for cf_add_2lib in $cf_add_libs; do
13401 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13406 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13408 LIBS="$cf_add_libs"
13410 LIBS="$cf_save_xmu"
13412 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13414 echo "${as_me:-configure}:13414: testing ...before $LIBS ..." 1>&5
13416 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
13417 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13419 echo "${as_me:-configure}:13419: testing ...after $LIBS ..." 1>&5
13425 test -n "$verbose" && echo " ...before $LIBS" 1>&6
13427 echo "${as_me:-configure}:13427: testing ...before $LIBS ..." 1>&5
13429 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
13430 test -n "$verbose" && echo " ...after $LIBS" 1>&6
13432 echo "${as_me:-configure}:13432: testing ...after $LIBS ..." 1>&5
13436 for cf_trim_lib in Xmu Xt X11
13439 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13440 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13441 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13443 echo "${as_me:-configure}:13443: testing ..trimmed $LIBS ..." 1>&5
13463 if test -z "$cf_x_athena_lib" ; then
13465 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
13466 test -n "$verbose" && echo " found package Xext" 1>&6
13468 echo "${as_me:-configure}:13468: testing found package Xext ..." 1>&5
13470 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
13471 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
13472 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13474 echo "${as_me:-configure}:13474: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13476 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13478 echo "${as_me:-configure}:13478: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13483 cf_new_extra_cppflags=
13485 for cf_add_cflags in $cf_pkgconfig_incs
13487 case "$cf_fix_cppflags" in
13489 case "$cf_add_cflags" in
13490 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13491 case "$cf_add_cflags" in
13493 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13495 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13496 && test -z "${cf_tst_cflags}" \
13497 && cf_fix_cppflags=yes
13499 if test "$cf_fix_cppflags" = yes ; then
13501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13505 elif test "${cf_tst_cflags}" = "\"'" ; then
13507 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13508 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13514 case "$CPPFLAGS" in
13518 case "$cf_add_cflags" in
13520 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13522 CPPFLAGS=`echo "$CPPFLAGS" | \
13523 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13524 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13529 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13530 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13537 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13538 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13545 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13546 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13548 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13550 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13551 && test -z "${cf_tst_cflags}" \
13552 && cf_fix_cppflags=no
13557 if test -n "$cf_new_cflags" ; then
13559 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13560 CFLAGS="${CFLAGS}$cf_new_cflags"
13564 if test -n "$cf_new_cppflags" ; then
13566 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13567 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13571 if test -n "$cf_new_extra_cppflags" ; then
13573 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13574 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13578 cf_add_libs="$LIBS"
13581 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13582 # filter duplicates
13583 for cf_add_1lib in $cf_add_0lib; do
13584 for cf_add_2lib in $cf_add_libs; do
13585 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13590 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13592 LIBS="$cf_add_libs"
13599 echo "$as_me:13599: checking for XextCreateExtension in -lXext" >&5
13600 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13601 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13602 echo $ECHO_N "(cached) $ECHO_C" >&6
13604 ac_check_lib_save_LIBS=$LIBS
13605 LIBS="-lXext $LIBS"
13606 cat >"conftest.$ac_ext" <<_ACEOF
13607 #line 13607 "configure"
13608 #include "confdefs.h"
13610 /* Override any gcc2 internal prototype to avoid an error. */
13614 /* We use char because int might match the return type of a gcc2
13615 builtin and then its argument prototype would still apply. */
13616 char XextCreateExtension ();
13620 XextCreateExtension ();
13625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13626 if { (eval echo "$as_me:13626: \"$ac_link\"") >&5
13627 (eval $ac_link) 2>&5
13629 echo "$as_me:13629: \$? = $ac_status" >&5
13630 (exit "$ac_status"); } &&
13631 { ac_try='test -s "conftest$ac_exeext"'
13632 { (eval echo "$as_me:13632: \"$ac_try\"") >&5
13633 (eval $ac_try) 2>&5
13635 echo "$as_me:13635: \$? = $ac_status" >&5
13636 (exit "$ac_status"); }; }; then
13637 ac_cv_lib_Xext_XextCreateExtension=yes
13639 echo "$as_me: failed program was:" >&5
13640 cat "conftest.$ac_ext" >&5
13641 ac_cv_lib_Xext_XextCreateExtension=no
13643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13644 LIBS=$ac_check_lib_save_LIBS
13646 echo "$as_me:13646: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13647 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13648 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13650 cf_add_libs="$LIBS"
13653 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13654 # filter duplicates
13655 for cf_add_1lib in $cf_add_0lib; do
13656 for cf_add_2lib in $cf_add_libs; do
13657 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13662 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13664 LIBS="$cf_add_libs"
13670 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13671 # in some cases has installed dummy files in the former, other cases replaced
13672 # it with a link to the new location). This complicates the configure script.
13673 # Check for that pitfall, and recover using pkg-config
13675 # If none of these are set, the configuration is almost certainly broken.
13676 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13679 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13680 test -n "$verbose" && echo " found package x11" 1>&6
13682 echo "${as_me:-configure}:13682: testing found package x11 ..." 1>&5
13684 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13685 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
13686 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13688 echo "${as_me:-configure}:13688: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13690 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13692 echo "${as_me:-configure}:13692: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13697 cf_new_extra_cppflags=
13699 for cf_add_cflags in $cf_pkgconfig_incs
13701 case "$cf_fix_cppflags" in
13703 case "$cf_add_cflags" in
13704 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13705 case "$cf_add_cflags" in
13707 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13709 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13710 && test -z "${cf_tst_cflags}" \
13711 && cf_fix_cppflags=yes
13713 if test "$cf_fix_cppflags" = yes ; then
13715 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13716 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13719 elif test "${cf_tst_cflags}" = "\"'" ; then
13721 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13722 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13728 case "$CPPFLAGS" in
13732 case "$cf_add_cflags" in
13734 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13736 CPPFLAGS=`echo "$CPPFLAGS" | \
13737 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13738 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13743 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13744 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13751 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13752 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13759 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13760 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13762 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13764 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13765 && test -z "${cf_tst_cflags}" \
13766 && cf_fix_cppflags=no
13771 if test -n "$cf_new_cflags" ; then
13773 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13774 CFLAGS="${CFLAGS}$cf_new_cflags"
13778 if test -n "$cf_new_cppflags" ; then
13780 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13781 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13785 if test -n "$cf_new_extra_cppflags" ; then
13787 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13788 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13792 cf_add_libs="$LIBS"
13795 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13796 # filter duplicates
13797 for cf_add_1lib in $cf_add_0lib; do
13798 for cf_add_2lib in $cf_add_libs; do
13799 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13804 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13806 LIBS="$cf_add_libs"
13812 { echo "$as_me:13812: WARNING: unable to find X11 library" >&5
13813 echo "$as_me: WARNING: unable to find X11 library" >&2;}
13816 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13817 test -n "$verbose" && echo " found package ice" 1>&6
13819 echo "${as_me:-configure}:13819: testing found package ice ..." 1>&5
13821 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13822 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
13823 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13825 echo "${as_me:-configure}:13825: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13827 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
13829 echo "${as_me:-configure}:13829: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13834 cf_new_extra_cppflags=
13836 for cf_add_cflags in $cf_pkgconfig_incs
13838 case "$cf_fix_cppflags" in
13840 case "$cf_add_cflags" in
13841 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13842 case "$cf_add_cflags" in
13844 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13847 && test -z "${cf_tst_cflags}" \
13848 && cf_fix_cppflags=yes
13850 if test "$cf_fix_cppflags" = yes ; then
13852 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13853 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13856 elif test "${cf_tst_cflags}" = "\"'" ; then
13858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13859 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13865 case "$CPPFLAGS" in
13869 case "$cf_add_cflags" in
13871 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13873 CPPFLAGS=`echo "$CPPFLAGS" | \
13874 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13875 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13880 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13881 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13888 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13889 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13899 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13901 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13902 && test -z "${cf_tst_cflags}" \
13903 && cf_fix_cppflags=no
13908 if test -n "$cf_new_cflags" ; then
13910 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13911 CFLAGS="${CFLAGS}$cf_new_cflags"
13915 if test -n "$cf_new_cppflags" ; then
13917 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13918 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13922 if test -n "$cf_new_extra_cppflags" ; then
13924 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13925 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13929 cf_add_libs="$LIBS"
13932 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13933 # filter duplicates
13934 for cf_add_1lib in $cf_add_0lib; do
13935 for cf_add_2lib in $cf_add_libs; do
13936 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13941 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13943 LIBS="$cf_add_libs"
13949 { echo "$as_me:13949: WARNING: unable to find ICE library" >&5
13950 echo "$as_me: WARNING: unable to find ICE library" >&2;}
13953 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13954 test -n "$verbose" && echo " found package sm" 1>&6
13956 echo "${as_me:-configure}:13956: testing found package sm ..." 1>&5
13958 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13959 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
13960 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13962 echo "${as_me:-configure}:13962: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13964 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
13966 echo "${as_me:-configure}:13966: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13971 cf_new_extra_cppflags=
13973 for cf_add_cflags in $cf_pkgconfig_incs
13975 case "$cf_fix_cppflags" in
13977 case "$cf_add_cflags" in
13978 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13979 case "$cf_add_cflags" in
13981 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13984 && test -z "${cf_tst_cflags}" \
13985 && cf_fix_cppflags=yes
13987 if test "$cf_fix_cppflags" = yes ; then
13989 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13990 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13993 elif test "${cf_tst_cflags}" = "\"'" ; then
13995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14002 case "$CPPFLAGS" in
14006 case "$cf_add_cflags" in
14008 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14010 CPPFLAGS=`echo "$CPPFLAGS" | \
14011 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14012 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14017 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14018 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14025 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14026 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14033 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14034 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14036 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14038 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14039 && test -z "${cf_tst_cflags}" \
14040 && cf_fix_cppflags=no
14045 if test -n "$cf_new_cflags" ; then
14047 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14048 CFLAGS="${CFLAGS}$cf_new_cflags"
14052 if test -n "$cf_new_cppflags" ; then
14054 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14055 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14059 if test -n "$cf_new_extra_cppflags" ; then
14061 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14062 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14066 cf_add_libs="$LIBS"
14069 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14070 # filter duplicates
14071 for cf_add_1lib in $cf_add_0lib; do
14072 for cf_add_2lib in $cf_add_libs; do
14073 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14078 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14080 LIBS="$cf_add_libs"
14086 { echo "$as_me:14086: WARNING: unable to find SM library" >&5
14087 echo "$as_me: WARNING: unable to find SM library" >&2;}
14090 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14091 test -n "$verbose" && echo " found package xt" 1>&6
14093 echo "${as_me:-configure}:14093: testing found package xt ..." 1>&5
14095 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14096 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14097 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14099 echo "${as_me:-configure}:14099: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14101 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14103 echo "${as_me:-configure}:14103: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14108 cf_new_extra_cppflags=
14110 for cf_add_cflags in $cf_pkgconfig_incs
14112 case "$cf_fix_cppflags" in
14114 case "$cf_add_cflags" in
14115 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14116 case "$cf_add_cflags" in
14118 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14120 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14121 && test -z "${cf_tst_cflags}" \
14122 && cf_fix_cppflags=yes
14124 if test "$cf_fix_cppflags" = yes ; then
14126 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14127 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14130 elif test "${cf_tst_cflags}" = "\"'" ; then
14132 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14133 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14139 case "$CPPFLAGS" in
14143 case "$cf_add_cflags" in
14145 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14147 CPPFLAGS=`echo "$CPPFLAGS" | \
14148 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14149 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14154 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14155 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14162 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14163 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14170 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14171 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14173 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14175 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14176 && test -z "${cf_tst_cflags}" \
14177 && cf_fix_cppflags=no
14182 if test -n "$cf_new_cflags" ; then
14184 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14185 CFLAGS="${CFLAGS}$cf_new_cflags"
14189 if test -n "$cf_new_cppflags" ; then
14191 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14192 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14196 if test -n "$cf_new_extra_cppflags" ; then
14198 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14199 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14203 cf_add_libs="$LIBS"
14206 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14207 # filter duplicates
14208 for cf_add_1lib in $cf_add_0lib; do
14209 for cf_add_2lib in $cf_add_libs; do
14210 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14215 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14217 LIBS="$cf_add_libs"
14223 { echo "$as_me:14223: WARNING: unable to find Xt library" >&5
14224 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14228 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14233 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14234 test -n "$verbose" && echo " found package xt" 1>&6
14236 echo "${as_me:-configure}:14236: testing found package xt ..." 1>&5
14238 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14239 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14240 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14242 echo "${as_me:-configure}:14242: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14244 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14246 echo "${as_me:-configure}:14246: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14251 cf_new_extra_cppflags=
14253 for cf_add_cflags in $cf_pkgconfig_incs
14255 case "$cf_fix_cppflags" in
14257 case "$cf_add_cflags" in
14258 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14259 case "$cf_add_cflags" in
14261 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14263 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14264 && test -z "${cf_tst_cflags}" \
14265 && cf_fix_cppflags=yes
14267 if test "$cf_fix_cppflags" = yes ; then
14269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14273 elif test "${cf_tst_cflags}" = "\"'" ; then
14275 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14276 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14282 case "$CPPFLAGS" in
14286 case "$cf_add_cflags" in
14288 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14290 CPPFLAGS=`echo "$CPPFLAGS" | \
14291 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14292 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14297 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14298 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14305 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14306 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14313 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14314 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14316 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14318 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14319 && test -z "${cf_tst_cflags}" \
14320 && cf_fix_cppflags=no
14325 if test -n "$cf_new_cflags" ; then
14327 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14328 CFLAGS="${CFLAGS}$cf_new_cflags"
14332 if test -n "$cf_new_cppflags" ; then
14334 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14335 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14339 if test -n "$cf_new_extra_cppflags" ; then
14341 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14342 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14346 cf_add_libs="$LIBS"
14349 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14350 # filter duplicates
14351 for cf_add_1lib in $cf_add_0lib; do
14352 for cf_add_2lib in $cf_add_libs; do
14353 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14358 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14360 LIBS="$cf_add_libs"
14366 # we have an "xt" package, but it may omit Xt's dependency on X11
14367 echo "$as_me:14367: checking for usable X dependency" >&5
14368 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
14369 if test "${cf_cv_xt_x11_compat+set}" = set; then
14370 echo $ECHO_N "(cached) $ECHO_C" >&6
14373 cat >"conftest.$ac_ext" <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14377 #include <X11/Xlib.h>
14383 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
14384 int rc2 = XClearWindow((Display*) 0, (Window) 0);
14385 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
14386 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
14392 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14393 if { (eval echo "$as_me:14393: \"$ac_link\"") >&5
14394 (eval $ac_link) 2>&5
14396 echo "$as_me:14396: \$? = $ac_status" >&5
14397 (exit "$ac_status"); } &&
14398 { ac_try='test -s "conftest$ac_exeext"'
14399 { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400 (eval $ac_try) 2>&5
14402 echo "$as_me:14402: \$? = $ac_status" >&5
14403 (exit "$ac_status"); }; }; then
14404 cf_cv_xt_x11_compat=yes
14406 echo "$as_me: failed program was:" >&5
14407 cat "conftest.$ac_ext" >&5
14408 cf_cv_xt_x11_compat=no
14410 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14412 echo "$as_me:14412: result: $cf_cv_xt_x11_compat" >&5
14413 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
14414 if test "$cf_cv_xt_x11_compat" = no
14416 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
14418 echo "${as_me:-configure}:14418: testing work around broken X11 dependency ..." 1>&5
14420 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
14422 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14423 test -n "$verbose" && echo " found package x11" 1>&6
14425 echo "${as_me:-configure}:14425: testing found package x11 ..." 1>&5
14427 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14428 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14429 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14431 echo "${as_me:-configure}:14431: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14433 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14435 echo "${as_me:-configure}:14435: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14440 cf_new_extra_cppflags=
14442 for cf_add_cflags in $cf_pkgconfig_incs
14444 case "$cf_fix_cppflags" in
14446 case "$cf_add_cflags" in
14447 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14448 case "$cf_add_cflags" in
14450 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14452 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14453 && test -z "${cf_tst_cflags}" \
14454 && cf_fix_cppflags=yes
14456 if test "$cf_fix_cppflags" = yes ; then
14458 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14459 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14462 elif test "${cf_tst_cflags}" = "\"'" ; then
14464 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14465 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14471 case "$CPPFLAGS" in
14475 case "$cf_add_cflags" in
14477 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14479 CPPFLAGS=`echo "$CPPFLAGS" | \
14480 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14481 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14486 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14487 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14494 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14495 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14502 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14503 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14505 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14507 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14508 && test -z "${cf_tst_cflags}" \
14509 && cf_fix_cppflags=no
14514 if test -n "$cf_new_cflags" ; then
14516 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14517 CFLAGS="${CFLAGS}$cf_new_cflags"
14521 if test -n "$cf_new_cppflags" ; then
14523 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14524 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14528 if test -n "$cf_new_extra_cppflags" ; then
14530 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14531 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14535 cf_add_libs="$LIBS"
14538 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14539 # filter duplicates
14540 for cf_add_1lib in $cf_add_0lib; do
14541 for cf_add_2lib in $cf_add_libs; do
14542 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14547 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14549 LIBS="$cf_add_libs"
14556 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14558 echo "${as_me:-configure}:14558: testing ...before $LIBS ..." 1>&5
14560 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
14561 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14563 echo "${as_me:-configure}:14563: testing ...after $LIBS ..." 1>&5
14571 echo "$as_me:14571: checking for usable X Toolkit package" >&5
14572 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14573 if test "${cf_cv_xt_ice_compat+set}" = set; then
14574 echo $ECHO_N "(cached) $ECHO_C" >&6
14577 cat >"conftest.$ac_ext" <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14581 #include <X11/Shell.h>
14586 int num = IceConnectionNumber(0); (void) num
14592 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14593 if { (eval echo "$as_me:14593: \"$ac_link\"") >&5
14594 (eval $ac_link) 2>&5
14596 echo "$as_me:14596: \$? = $ac_status" >&5
14597 (exit "$ac_status"); } &&
14598 { ac_try='test -s "conftest$ac_exeext"'
14599 { (eval echo "$as_me:14599: \"$ac_try\"") >&5
14600 (eval $ac_try) 2>&5
14602 echo "$as_me:14602: \$? = $ac_status" >&5
14603 (exit "$ac_status"); }; }; then
14604 cf_cv_xt_ice_compat=yes
14606 echo "$as_me: failed program was:" >&5
14607 cat "conftest.$ac_ext" >&5
14608 cf_cv_xt_ice_compat=no
14610 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14612 echo "$as_me:14612: result: $cf_cv_xt_ice_compat" >&5
14613 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14615 if test "$cf_cv_xt_ice_compat" = no
14617 # workaround for broken ".pc" files used for X Toolkit.
14618 case "x$X_PRE_LIBS" in
14624 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
14626 echo "${as_me:-configure}:14626: testing work around broken ICE dependency ..." 1>&5
14628 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14629 test -n "$verbose" && echo " found package ice" 1>&6
14631 echo "${as_me:-configure}:14631: testing found package ice ..." 1>&5
14633 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14634 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14635 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14637 echo "${as_me:-configure}:14637: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14639 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14641 echo "${as_me:-configure}:14641: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14646 cf_new_extra_cppflags=
14648 for cf_add_cflags in $cf_pkgconfig_incs
14650 case "$cf_fix_cppflags" in
14652 case "$cf_add_cflags" in
14653 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14654 case "$cf_add_cflags" in
14656 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14658 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14659 && test -z "${cf_tst_cflags}" \
14660 && cf_fix_cppflags=yes
14662 if test "$cf_fix_cppflags" = yes ; then
14664 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14665 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14668 elif test "${cf_tst_cflags}" = "\"'" ; then
14670 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14671 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14677 case "$CPPFLAGS" in
14681 case "$cf_add_cflags" in
14683 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14685 CPPFLAGS=`echo "$CPPFLAGS" | \
14686 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14687 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14692 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14693 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14700 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14701 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14708 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14709 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14711 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14713 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14714 && test -z "${cf_tst_cflags}" \
14715 && cf_fix_cppflags=no
14720 if test -n "$cf_new_cflags" ; then
14722 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14723 CFLAGS="${CFLAGS}$cf_new_cflags"
14727 if test -n "$cf_new_cppflags" ; then
14729 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14730 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14734 if test -n "$cf_new_extra_cppflags" ; then
14736 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14737 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14741 cf_add_libs="$LIBS"
14744 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14745 # filter duplicates
14746 for cf_add_1lib in $cf_add_0lib; do
14747 for cf_add_2lib in $cf_add_libs; do
14748 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14753 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14755 LIBS="$cf_add_libs"
14757 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14758 test -n "$verbose" && echo " found package sm" 1>&6
14760 echo "${as_me:-configure}:14760: testing found package sm ..." 1>&5
14762 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14763 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14764 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14766 echo "${as_me:-configure}:14766: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14768 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14770 echo "${as_me:-configure}:14770: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14775 cf_new_extra_cppflags=
14777 for cf_add_cflags in $cf_pkgconfig_incs
14779 case "$cf_fix_cppflags" in
14781 case "$cf_add_cflags" in
14782 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14783 case "$cf_add_cflags" in
14785 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14787 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14788 && test -z "${cf_tst_cflags}" \
14789 && cf_fix_cppflags=yes
14791 if test "$cf_fix_cppflags" = yes ; then
14793 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14794 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14797 elif test "${cf_tst_cflags}" = "\"'" ; then
14799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14806 case "$CPPFLAGS" in
14810 case "$cf_add_cflags" in
14812 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14814 CPPFLAGS=`echo "$CPPFLAGS" | \
14815 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14816 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14821 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14822 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14829 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14830 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14840 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14842 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14843 && test -z "${cf_tst_cflags}" \
14844 && cf_fix_cppflags=no
14849 if test -n "$cf_new_cflags" ; then
14851 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14852 CFLAGS="${CFLAGS}$cf_new_cflags"
14856 if test -n "$cf_new_cppflags" ; then
14858 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14859 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14863 if test -n "$cf_new_extra_cppflags" ; then
14865 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14866 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14870 cf_add_libs="$LIBS"
14873 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14874 # filter duplicates
14875 for cf_add_1lib in $cf_add_0lib; do
14876 for cf_add_2lib in $cf_add_libs; do
14877 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14882 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14884 LIBS="$cf_add_libs"
14897 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14899 echo "${as_me:-configure}:14899: testing ...before $LIBS ..." 1>&5
14901 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
14902 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14904 echo "${as_me:-configure}:14904: testing ...after $LIBS ..." 1>&5
14920 LDFLAGS="$X_LIBS $LDFLAGS"
14922 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
14924 echo "${as_me:-configure}:14924: testing checking additions to CFLAGS ..." 1>&5
14926 cf_check_cflags="$CFLAGS"
14927 cf_check_cppflags="$CPPFLAGS"
14932 cf_new_extra_cppflags=
14934 for cf_add_cflags in $X_CFLAGS
14936 case "$cf_fix_cppflags" in
14938 case "$cf_add_cflags" in
14939 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14940 case "$cf_add_cflags" in
14942 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14944 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14945 && test -z "${cf_tst_cflags}" \
14946 && cf_fix_cppflags=yes
14948 if test "$cf_fix_cppflags" = yes ; then
14950 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14951 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14954 elif test "${cf_tst_cflags}" = "\"'" ; then
14956 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14957 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14963 case "$CPPFLAGS" in
14967 case "$cf_add_cflags" in
14969 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14971 CPPFLAGS=`echo "$CPPFLAGS" | \
14972 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14973 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14978 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14979 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14986 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14987 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14994 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14995 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14997 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14999 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15000 && test -z "${cf_tst_cflags}" \
15001 && cf_fix_cppflags=no
15006 if test -n "$cf_new_cflags" ; then
15007 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15009 echo "${as_me:-configure}:15009: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15011 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15012 CFLAGS="${CFLAGS}$cf_new_cflags"
15016 if test -n "$cf_new_cppflags" ; then
15017 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15019 echo "${as_me:-configure}:15019: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15021 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15022 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15026 if test -n "$cf_new_extra_cppflags" ; then
15027 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15029 echo "${as_me:-configure}:15029: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15031 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15032 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15036 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15037 cat >"conftest.$ac_ext" <<_ACEOF
15038 #line 15038 "configure"
15039 #include "confdefs.h"
15044 printf("Hello world");
15049 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15050 if { (eval echo "$as_me:15050: \"$ac_link\"") >&5
15051 (eval $ac_link) 2>&5
15053 echo "$as_me:15053: \$? = $ac_status" >&5
15054 (exit "$ac_status"); } &&
15055 { ac_try='test -s "conftest$ac_exeext"'
15056 { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057 (eval $ac_try) 2>&5
15059 echo "$as_me:15059: \$? = $ac_status" >&5
15060 (exit "$ac_status"); }; }; then
15063 echo "$as_me: failed program was:" >&5
15064 cat "conftest.$ac_ext" >&5
15065 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15067 echo "${as_me:-configure}:15067: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15069 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15070 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15072 echo "${as_me:-configure}:15072: testing but keeping change to \$CPPFLAGS ..." 1>&5
15075 CFLAGS="$cf_check_cflags"
15077 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15080 echo "$as_me:15080: checking for XOpenDisplay" >&5
15081 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15082 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15083 echo $ECHO_N "(cached) $ECHO_C" >&6
15085 cat >"conftest.$ac_ext" <<_ACEOF
15086 #line 15086 "configure"
15087 #include "confdefs.h"
15088 #define XOpenDisplay autoconf_temporary
15089 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15090 #undef XOpenDisplay
15096 /* We use char because int might match the return type of a gcc2
15097 builtin and then its argument prototype would still apply. */
15098 char XOpenDisplay (void);
15104 /* The GNU C library defines stubs for functions which it implements
15105 to always fail with ENOSYS. Some functions are actually named
15106 something starting with __ and the normal name is an alias. */
15107 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15108 #error found stub for XOpenDisplay
15111 return XOpenDisplay ();
15116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15117 if { (eval echo "$as_me:15117: \"$ac_link\"") >&5
15118 (eval $ac_link) 2>&5
15120 echo "$as_me:15120: \$? = $ac_status" >&5
15121 (exit "$ac_status"); } &&
15122 { ac_try='test -s "conftest$ac_exeext"'
15123 { (eval echo "$as_me:15123: \"$ac_try\"") >&5
15124 (eval $ac_try) 2>&5
15126 echo "$as_me:15126: \$? = $ac_status" >&5
15127 (exit "$ac_status"); }; }; then
15128 ac_cv_func_XOpenDisplay=yes
15130 echo "$as_me: failed program was:" >&5
15131 cat "conftest.$ac_ext" >&5
15132 ac_cv_func_XOpenDisplay=no
15134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15136 echo "$as_me:15136: result: $ac_cv_func_XOpenDisplay" >&5
15137 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15138 if test "$ac_cv_func_XOpenDisplay" = yes; then
15142 echo "$as_me:15142: checking for XOpenDisplay in -lX11" >&5
15143 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15144 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15145 echo $ECHO_N "(cached) $ECHO_C" >&6
15147 ac_check_lib_save_LIBS=$LIBS
15149 cat >"conftest.$ac_ext" <<_ACEOF
15150 #line 15150 "configure"
15151 #include "confdefs.h"
15153 /* Override any gcc2 internal prototype to avoid an error. */
15157 /* We use char because int might match the return type of a gcc2
15158 builtin and then its argument prototype would still apply. */
15159 char XOpenDisplay ();
15168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15169 if { (eval echo "$as_me:15169: \"$ac_link\"") >&5
15170 (eval $ac_link) 2>&5
15172 echo "$as_me:15172: \$? = $ac_status" >&5
15173 (exit "$ac_status"); } &&
15174 { ac_try='test -s "conftest$ac_exeext"'
15175 { (eval echo "$as_me:15175: \"$ac_try\"") >&5
15176 (eval $ac_try) 2>&5
15178 echo "$as_me:15178: \$? = $ac_status" >&5
15179 (exit "$ac_status"); }; }; then
15180 ac_cv_lib_X11_XOpenDisplay=yes
15182 echo "$as_me: failed program was:" >&5
15183 cat "conftest.$ac_ext" >&5
15184 ac_cv_lib_X11_XOpenDisplay=no
15186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15187 LIBS=$ac_check_lib_save_LIBS
15189 echo "$as_me:15189: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15190 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15191 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15193 cf_add_libs="$LIBS"
15196 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15197 # filter duplicates
15198 for cf_add_1lib in $cf_add_0lib; do
15199 for cf_add_2lib in $cf_add_libs; do
15200 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15205 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15207 LIBS="$cf_add_libs"
15213 echo "$as_me:15213: checking for XtAppInitialize" >&5
15214 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15215 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15216 echo $ECHO_N "(cached) $ECHO_C" >&6
15218 cat >"conftest.$ac_ext" <<_ACEOF
15219 #line 15219 "configure"
15220 #include "confdefs.h"
15221 #define XtAppInitialize autoconf_temporary
15222 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15223 #undef XtAppInitialize
15229 /* We use char because int might match the return type of a gcc2
15230 builtin and then its argument prototype would still apply. */
15231 char XtAppInitialize (void);
15237 /* The GNU C library defines stubs for functions which it implements
15238 to always fail with ENOSYS. Some functions are actually named
15239 something starting with __ and the normal name is an alias. */
15240 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15241 #error found stub for XtAppInitialize
15244 return XtAppInitialize ();
15249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15250 if { (eval echo "$as_me:15250: \"$ac_link\"") >&5
15251 (eval $ac_link) 2>&5
15253 echo "$as_me:15253: \$? = $ac_status" >&5
15254 (exit "$ac_status"); } &&
15255 { ac_try='test -s "conftest$ac_exeext"'
15256 { (eval echo "$as_me:15256: \"$ac_try\"") >&5
15257 (eval $ac_try) 2>&5
15259 echo "$as_me:15259: \$? = $ac_status" >&5
15260 (exit "$ac_status"); }; }; then
15261 ac_cv_func_XtAppInitialize=yes
15263 echo "$as_me: failed program was:" >&5
15264 cat "conftest.$ac_ext" >&5
15265 ac_cv_func_XtAppInitialize=no
15267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15269 echo "$as_me:15269: result: $ac_cv_func_XtAppInitialize" >&5
15270 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
15271 if test "$ac_cv_func_XtAppInitialize" = yes; then
15275 echo "$as_me:15275: checking for XtAppInitialize in -lXt" >&5
15276 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
15277 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
15278 echo $ECHO_N "(cached) $ECHO_C" >&6
15280 ac_check_lib_save_LIBS=$LIBS
15282 cat >"conftest.$ac_ext" <<_ACEOF
15283 #line 15283 "configure"
15284 #include "confdefs.h"
15286 /* Override any gcc2 internal prototype to avoid an error. */
15290 /* We use char because int might match the return type of a gcc2
15291 builtin and then its argument prototype would still apply. */
15292 char XtAppInitialize ();
15296 XtAppInitialize ();
15301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15302 if { (eval echo "$as_me:15302: \"$ac_link\"") >&5
15303 (eval $ac_link) 2>&5
15305 echo "$as_me:15305: \$? = $ac_status" >&5
15306 (exit "$ac_status"); } &&
15307 { ac_try='test -s "conftest$ac_exeext"'
15308 { (eval echo "$as_me:15308: \"$ac_try\"") >&5
15309 (eval $ac_try) 2>&5
15311 echo "$as_me:15311: \$? = $ac_status" >&5
15312 (exit "$ac_status"); }; }; then
15313 ac_cv_lib_Xt_XtAppInitialize=yes
15315 echo "$as_me: failed program was:" >&5
15316 cat "conftest.$ac_ext" >&5
15317 ac_cv_lib_Xt_XtAppInitialize=no
15319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15320 LIBS=$ac_check_lib_save_LIBS
15322 echo "$as_me:15322: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
15323 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
15324 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
15326 cat >>confdefs.h <<\EOF
15327 #define HAVE_LIBXT 1
15338 if test "$cf_have_X_LIBS" = no ; then
15339 { echo "$as_me:15339: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15340 test program. You will have to check and add the proper libraries by hand
15342 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
15343 test program. You will have to check and add the proper libraries by hand
15344 to makefile." >&2;}
15347 cf_x_athena_root=$cf_x_athena
15350 for cf_path in default \
15351 /usr/contrib/X11R6 \
15352 /usr/contrib/X11R5 \
15356 if test -z "$cf_x_athena_inc" ; then
15358 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
15359 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
15360 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
15361 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15362 for cf_X_CFLAGS in $X_CFLAGS
15364 case "x$cf_X_CFLAGS" in
15366 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15369 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15374 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
15375 if test "$cf_path" != default ; then
15377 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15378 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
15380 echo "$as_me:15380: checking for $cf_test in $cf_path" >&5
15381 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
15383 echo "$as_me:15383: checking for $cf_test" >&5
15384 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
15386 cat >"conftest.$ac_ext" <<_ACEOF
15387 #line 15387 "configure"
15388 #include "confdefs.h"
15390 #include <X11/Intrinsic.h>
15391 #include <$cf_test>
15400 rm -f "conftest.$ac_objext"
15401 if { (eval echo "$as_me:15401: \"$ac_compile\"") >&5
15402 (eval $ac_compile) 2>&5
15404 echo "$as_me:15404: \$? = $ac_status" >&5
15405 (exit "$ac_status"); } &&
15406 { ac_try='test -s "conftest.$ac_objext"'
15407 { (eval echo "$as_me:15407: \"$ac_try\"") >&5
15408 (eval $ac_try) 2>&5
15410 echo "$as_me:15410: \$? = $ac_status" >&5
15411 (exit "$ac_status"); }; }; then
15414 echo "$as_me: failed program was:" >&5
15415 cat "conftest.$ac_ext" >&5
15418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15419 echo "$as_me:15419: result: $cf_result" >&5
15420 echo "${ECHO_T}$cf_result" >&6
15422 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
15423 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
15424 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
15426 if test "$cf_result" = yes ; then
15427 test "$cf_path" = default && cf_x_athena_inc=default
15428 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
15434 if test -z "$cf_x_athena_inc" ; then
15435 { echo "$as_me:15435: WARNING: Unable to find Athena header files" >&5
15436 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
15437 elif test "$cf_x_athena_inc" != default ; then
15439 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15440 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
15444 cf_x_athena_root=$cf_x_athena
15447 for cf_path in default \
15448 /usr/contrib/X11R6 \
15449 /usr/contrib/X11R5 \
15454 ${cf_x_athena_root} \
15455 ${cf_x_athena_root}7 \
15456 ${cf_x_athena_root}6
15459 "-l$cf_lib -lXmu" \
15460 "-l$cf_lib -lXpm -lXmu" \
15461 "-l${cf_lib}_s -lXmu_s"
15463 test -n "$cf_x_athena_lib" && break
15465 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
15466 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
15467 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
15468 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15469 for cf_X_CFLAGS in $X_CFLAGS
15471 case "x$cf_X_CFLAGS" in
15473 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15476 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15481 cf_test=XawSimpleMenuAddGlobalActions
15482 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15484 cf_add_libs="$LIBS"
15487 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15488 # filter duplicates
15489 for cf_add_1lib in $cf_add_0lib; do
15490 for cf_add_2lib in $cf_add_libs; do
15491 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15496 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15498 LIBS="$cf_add_libs"
15500 echo "$as_me:15500: checking for $cf_test in $cf_libs" >&5
15501 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15502 cat >"conftest.$ac_ext" <<_ACEOF
15503 #line 15503 "configure"
15504 #include "confdefs.h"
15506 #include <X11/Intrinsic.h>
15507 #include <X11/$cf_x_athena_root/SimpleMenu.h>
15513 $cf_test((XtAppContext) 0)
15518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15519 if { (eval echo "$as_me:15519: \"$ac_link\"") >&5
15520 (eval $ac_link) 2>&5
15522 echo "$as_me:15522: \$? = $ac_status" >&5
15523 (exit "$ac_status"); } &&
15524 { ac_try='test -s "conftest$ac_exeext"'
15525 { (eval echo "$as_me:15525: \"$ac_try\"") >&5
15526 (eval $ac_try) 2>&5
15528 echo "$as_me:15528: \$? = $ac_status" >&5
15529 (exit "$ac_status"); }; }; then
15532 echo "$as_me: failed program was:" >&5
15533 cat "conftest.$ac_ext" >&5
15536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15537 echo "$as_me:15537: result: $cf_result" >&5
15538 echo "${ECHO_T}$cf_result" >&6
15540 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15541 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15542 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15544 if test "$cf_result" = yes ; then
15545 cf_x_athena_lib="$cf_libs"
15549 test -n "$cf_x_athena_lib" && break
15553 if test -z "$cf_x_athena_lib" ; then
15554 { { echo "$as_me:15554: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15555 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15556 { (exit 1); exit 1; }; }
15559 cf_add_libs="$LIBS"
15562 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15563 # filter duplicates
15564 for cf_add_1lib in $cf_add_0lib; do
15565 for cf_add_2lib in $cf_add_libs; do
15566 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15571 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15573 LIBS="$cf_add_libs"
15575 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15577 cat >>confdefs.h <<EOF
15578 #define $cf_x_athena_LIBS 1
15583 if test -n "$ac_tool_prefix"; then
15584 for ac_prog in xcurses-config
15586 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15587 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15588 echo "$as_me:15588: checking for $ac_word" >&5
15589 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15590 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
15591 echo $ECHO_N "(cached) $ECHO_C" >&6
15593 if test -n "$XCURSES_CONFIG"; then
15594 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
15596 ac_save_IFS=$IFS; IFS=$ac_path_separator
15598 for ac_dir in $ac_dummy; do
15600 test -z "$ac_dir" && ac_dir=.
15601 $as_executable_p "$ac_dir/$ac_word" || continue
15602 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
15603 echo "$as_me:15603: found $ac_dir/$ac_word" >&5
15609 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
15610 if test -n "$XCURSES_CONFIG"; then
15611 echo "$as_me:15611: result: $XCURSES_CONFIG" >&5
15612 echo "${ECHO_T}$XCURSES_CONFIG" >&6
15614 echo "$as_me:15614: result: no" >&5
15615 echo "${ECHO_T}no" >&6
15618 test -n "$XCURSES_CONFIG" && break
15621 if test -z "$XCURSES_CONFIG"; then
15622 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
15623 for ac_prog in xcurses-config
15625 # Extract the first word of "$ac_prog", so it can be a program name with args.
15626 set dummy $ac_prog; ac_word=$2
15627 echo "$as_me:15627: checking for $ac_word" >&5
15628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15629 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
15630 echo $ECHO_N "(cached) $ECHO_C" >&6
15632 if test -n "$ac_ct_XCURSES_CONFIG"; then
15633 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
15635 ac_save_IFS=$IFS; IFS=$ac_path_separator
15637 for ac_dir in $ac_dummy; do
15639 test -z "$ac_dir" && ac_dir=.
15640 $as_executable_p "$ac_dir/$ac_word" || continue
15641 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
15642 echo "$as_me:15642: found $ac_dir/$ac_word" >&5
15648 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
15649 if test -n "$ac_ct_XCURSES_CONFIG"; then
15650 echo "$as_me:15650: result: $ac_ct_XCURSES_CONFIG" >&5
15651 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
15653 echo "$as_me:15653: result: no" >&5
15654 echo "${ECHO_T}no" >&6
15657 test -n "$ac_ct_XCURSES_CONFIG" && break
15659 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
15661 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
15664 if test "$XCURSES_CONFIG" != none ; then
15669 cf_new_extra_cppflags=
15671 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
15673 case "$cf_fix_cppflags" in
15675 case "$cf_add_cflags" in
15676 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15677 case "$cf_add_cflags" in
15679 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15681 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15682 && test -z "${cf_tst_cflags}" \
15683 && cf_fix_cppflags=yes
15685 if test "$cf_fix_cppflags" = yes ; then
15687 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15688 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15691 elif test "${cf_tst_cflags}" = "\"'" ; then
15693 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15694 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15700 case "$CPPFLAGS" in
15704 case "$cf_add_cflags" in
15706 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15708 CPPFLAGS=`echo "$CPPFLAGS" | \
15709 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15710 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15715 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15716 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15723 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15724 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15731 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15732 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15734 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15736 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15737 && test -z "${cf_tst_cflags}" \
15738 && cf_fix_cppflags=no
15743 if test -n "$cf_new_cflags" ; then
15745 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15746 CFLAGS="${CFLAGS}$cf_new_cflags"
15750 if test -n "$cf_new_cppflags" ; then
15752 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15753 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15757 if test -n "$cf_new_extra_cppflags" ; then
15759 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15760 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15764 cf_add_libs="$LIBS"
15767 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15768 # filter duplicates
15769 for cf_add_1lib in $cf_add_0lib; do
15770 for cf_add_2lib in $cf_add_libs; do
15771 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15776 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15778 LIBS="$cf_add_libs"
15780 cf_cv_lib_XCurses=yes
15784 LDFLAGS="$LDFLAGS $X_LIBS"
15786 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15788 echo "${as_me:-configure}:15788: testing checking additions to CFLAGS ..." 1>&5
15790 cf_check_cflags="$CFLAGS"
15791 cf_check_cppflags="$CPPFLAGS"
15796 cf_new_extra_cppflags=
15798 for cf_add_cflags in $X_CFLAGS
15800 case "$cf_fix_cppflags" in
15802 case "$cf_add_cflags" in
15803 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15804 case "$cf_add_cflags" in
15806 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15808 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15809 && test -z "${cf_tst_cflags}" \
15810 && cf_fix_cppflags=yes
15812 if test "$cf_fix_cppflags" = yes ; then
15814 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15815 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15818 elif test "${cf_tst_cflags}" = "\"'" ; then
15820 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15821 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15827 case "$CPPFLAGS" in
15831 case "$cf_add_cflags" in
15833 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15835 CPPFLAGS=`echo "$CPPFLAGS" | \
15836 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15837 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15842 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15843 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15850 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15851 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15859 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15861 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15864 && test -z "${cf_tst_cflags}" \
15865 && cf_fix_cppflags=no
15870 if test -n "$cf_new_cflags" ; then
15871 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15873 echo "${as_me:-configure}:15873: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15875 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15876 CFLAGS="${CFLAGS}$cf_new_cflags"
15880 if test -n "$cf_new_cppflags" ; then
15881 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15883 echo "${as_me:-configure}:15883: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15885 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15886 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15890 if test -n "$cf_new_extra_cppflags" ; then
15891 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15893 echo "${as_me:-configure}:15893: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15895 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15896 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15900 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15901 cat >"conftest.$ac_ext" <<_ACEOF
15902 #line 15902 "configure"
15903 #include "confdefs.h"
15908 printf("Hello world");
15913 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15914 if { (eval echo "$as_me:15914: \"$ac_link\"") >&5
15915 (eval $ac_link) 2>&5
15917 echo "$as_me:15917: \$? = $ac_status" >&5
15918 (exit "$ac_status"); } &&
15919 { ac_try='test -s "conftest$ac_exeext"'
15920 { (eval echo "$as_me:15920: \"$ac_try\"") >&5
15921 (eval $ac_try) 2>&5
15923 echo "$as_me:15923: \$? = $ac_status" >&5
15924 (exit "$ac_status"); }; }; then
15927 echo "$as_me: failed program was:" >&5
15928 cat "conftest.$ac_ext" >&5
15929 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15931 echo "${as_me:-configure}:15931: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15933 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15934 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15936 echo "${as_me:-configure}:15936: testing but keeping change to \$CPPFLAGS ..." 1>&5
15939 CFLAGS="$cf_check_cflags"
15941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15944 echo "$as_me:15944: checking for XOpenDisplay in -lX11" >&5
15945 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15946 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15947 echo $ECHO_N "(cached) $ECHO_C" >&6
15949 ac_check_lib_save_LIBS=$LIBS
15950 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
15951 cat >"conftest.$ac_ext" <<_ACEOF
15952 #line 15952 "configure"
15953 #include "confdefs.h"
15955 /* Override any gcc2 internal prototype to avoid an error. */
15959 /* We use char because int might match the return type of a gcc2
15960 builtin and then its argument prototype would still apply. */
15961 char XOpenDisplay ();
15970 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15971 if { (eval echo "$as_me:15971: \"$ac_link\"") >&5
15972 (eval $ac_link) 2>&5
15974 echo "$as_me:15974: \$? = $ac_status" >&5
15975 (exit "$ac_status"); } &&
15976 { ac_try='test -s "conftest$ac_exeext"'
15977 { (eval echo "$as_me:15977: \"$ac_try\"") >&5
15978 (eval $ac_try) 2>&5
15980 echo "$as_me:15980: \$? = $ac_status" >&5
15981 (exit "$ac_status"); }; }; then
15982 ac_cv_lib_X11_XOpenDisplay=yes
15984 echo "$as_me: failed program was:" >&5
15985 cat "conftest.$ac_ext" >&5
15986 ac_cv_lib_X11_XOpenDisplay=no
15988 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15989 LIBS=$ac_check_lib_save_LIBS
15991 echo "$as_me:15991: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15992 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15993 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15995 cf_add_libs="$LIBS"
15998 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15999 # filter duplicates
16000 for cf_add_1lib in $cf_add_0lib; do
16001 for cf_add_2lib in $cf_add_libs; do
16002 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16007 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16009 LIBS="$cf_add_libs"
16013 echo "$as_me:16013: checking for XCurses library" >&5
16014 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16015 if test "${cf_cv_lib_XCurses+set}" = set; then
16016 echo $ECHO_N "(cached) $ECHO_C" >&6
16019 cf_add_libs="$LIBS"
16022 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16023 # filter duplicates
16024 for cf_add_1lib in $cf_add_0lib; do
16025 for cf_add_2lib in $cf_add_libs; do
16026 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16031 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16033 LIBS="$cf_add_libs"
16035 cat >"conftest.$ac_ext" <<_ACEOF
16036 #line 16036 "configure"
16037 #include "confdefs.h"
16039 #include <xcurses.h>
16040 char *XCursesProgramName = "test";
16050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16051 if { (eval echo "$as_me:16051: \"$ac_link\"") >&5
16052 (eval $ac_link) 2>&5
16054 echo "$as_me:16054: \$? = $ac_status" >&5
16055 (exit "$ac_status"); } &&
16056 { ac_try='test -s "conftest$ac_exeext"'
16057 { (eval echo "$as_me:16057: \"$ac_try\"") >&5
16058 (eval $ac_try) 2>&5
16060 echo "$as_me:16060: \$? = $ac_status" >&5
16061 (exit "$ac_status"); }; }; then
16062 cf_cv_lib_XCurses=yes
16064 echo "$as_me: failed program was:" >&5
16065 cat "conftest.$ac_ext" >&5
16066 cf_cv_lib_XCurses=no
16068 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16071 echo "$as_me:16071: result: $cf_cv_lib_XCurses" >&5
16072 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16076 if test "$cf_cv_lib_XCurses" = yes ; then
16078 cat >>confdefs.h <<\EOF
16082 cat >>confdefs.h <<\EOF
16086 echo "$as_me:16086: checking for xcurses.h" >&5
16087 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16088 if test "${ac_cv_header_xcurses_h+set}" = set; then
16089 echo $ECHO_N "(cached) $ECHO_C" >&6
16091 cat >"conftest.$ac_ext" <<_ACEOF
16092 #line 16092 "configure"
16093 #include "confdefs.h"
16094 #include <xcurses.h>
16096 if { (eval echo "$as_me:16096: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16097 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16099 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16101 cat conftest.err >&5
16102 echo "$as_me:16102: \$? = $ac_status" >&5
16103 (exit "$ac_status"); } >/dev/null; then
16104 if test -s conftest.err; then
16105 ac_cpp_err=$ac_c_preproc_warn_flag
16112 if test -z "$ac_cpp_err"; then
16113 ac_cv_header_xcurses_h=yes
16115 echo "$as_me: failed program was:" >&5
16116 cat "conftest.$ac_ext" >&5
16117 ac_cv_header_xcurses_h=no
16119 rm -f conftest.err "conftest.$ac_ext"
16121 echo "$as_me:16121: result: $ac_cv_header_xcurses_h" >&5
16122 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16123 if test "$ac_cv_header_xcurses_h" = yes; then
16125 cat >>confdefs.h <<\EOF
16126 #define HAVE_XCURSES 1
16132 { { echo "$as_me:16132: error: Cannot link with XCurses" >&5
16133 echo "$as_me: error: Cannot link with XCurses" >&2;}
16134 { (exit 1); exit 1; }; }
16139 { { echo "$as_me:16139: error: unexpected screen-value: $cf_cv_screen" >&5
16140 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16141 { (exit 1); exit 1; }; }
16145 : ${cf_nculib_root:=$cf_cv_screen}
16146 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16147 echo "$as_me:16147: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16148 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16149 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16150 echo $ECHO_N "(cached) $ECHO_C" >&6
16152 ac_check_lib_save_LIBS=$LIBS
16153 LIBS="-l$cf_nculib_root $LIBS"
16154 cat >"conftest.$ac_ext" <<_ACEOF
16155 #line 16155 "configure"
16156 #include "confdefs.h"
16158 /* Override any gcc2 internal prototype to avoid an error. */
16162 /* We use char because int might match the return type of a gcc2
16163 builtin and then its argument prototype would still apply. */
16164 char _nc_init_pthreads ();
16168 _nc_init_pthreads ();
16173 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16174 if { (eval echo "$as_me:16174: \"$ac_link\"") >&5
16175 (eval $ac_link) 2>&5
16177 echo "$as_me:16177: \$? = $ac_status" >&5
16178 (exit "$ac_status"); } &&
16179 { ac_try='test -s "conftest$ac_exeext"'
16180 { (eval echo "$as_me:16180: \"$ac_try\"") >&5
16181 (eval $ac_try) 2>&5
16183 echo "$as_me:16183: \$? = $ac_status" >&5
16184 (exit "$ac_status"); }; }; then
16185 eval "$as_ac_Lib=yes"
16187 echo "$as_me: failed program was:" >&5
16188 cat "conftest.$ac_ext" >&5
16189 eval "$as_ac_Lib=no"
16191 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16192 LIBS=$ac_check_lib_save_LIBS
16194 echo "$as_me:16194: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16195 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16196 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16197 cf_cv_ncurses_pthreads=yes
16199 cf_cv_ncurses_pthreads=no
16202 if test "$cf_cv_ncurses_pthreads" = yes
16205 cf_add_libs="$LIBS"
16208 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16209 # filter duplicates
16210 for cf_add_1lib in $cf_add_0lib; do
16211 for cf_add_2lib in $cf_add_libs; do
16212 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16217 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16219 LIBS="$cf_add_libs"
16223 case $cf_cv_screen in
16225 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16229 echo "$as_me:16229: checking for X11 rgb file" >&5
16230 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16232 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16233 if test "${with_x11_rgb+set}" = set; then
16234 withval="$with_x11_rgb"
16240 if test "x$RGB_PATH" = xauto
16242 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16244 /opt/local/share/X11/rgb.txt \
16245 /opt/X11/share/X11/rgb.txt \
16246 /usr/share/X11/rgb.txt \
16247 /usr/X11/share/X11/rgb.txt \
16248 /usr/X11/lib/X11/rgb.txt \
16249 /usr/lib/X11/rgb.txt \
16251 /usr/pkg/lib/X11/rgb.txt \
16252 /usr/X11R7/lib/X11/rgb.txt \
16253 /usr/X11R6/lib/X11/rgb.txt \
16254 /usr/X11R5/lib/X11/rgb.txt \
16255 /usr/X11R4/lib/X11/rgb.txt \
16256 /usr/local/lib/X11/rgb.txt \
16257 /usr/local/share/X11/rgb.txt \
16258 /usr/lib64/X11/rgb.txt
16260 if test -f "$cf_path" ; then
16261 RGB_PATH="$cf_path"
16268 if test "x$prefix" != xNONE; then
16269 cf_path_syntax="$prefix"
16271 cf_path_syntax="$ac_default_prefix"
16274 case ".$cf_path" in
16275 (.\$\(*\)*|.\'*\'*)
16279 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16281 (.\$\{*prefix\}*|.\$\{*dir\}*)
16282 eval cf_path="$cf_path"
16283 case ".$cf_path" in
16285 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16290 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
16293 { { echo "$as_me:16293: error: expected a pathname, not \"$cf_path\"" >&5
16294 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
16295 { (exit 1); exit 1; }; }
16301 echo "$as_me:16301: result: $RGB_PATH" >&5
16302 echo "${ECHO_T}$RGB_PATH" >&6
16304 cat >>confdefs.h <<EOF
16305 #define RGB_PATH "$cf_path"
16309 if test "$RGB_PATH" = no
16316 case $cf_cv_screen in
16318 cf_default_panel=no
16321 cf_default_tinfo=no
16323 (xcurses|bsdcurses)
16324 cf_default_panel=no
16327 cf_default_tinfo=yes
16330 cf_default_panel=yes
16331 cf_default_form=yes
16332 cf_default_menu=yes
16333 cf_default_tinfo=yes
16334 case $cf_cv_screen in
16336 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
16342 echo "$as_me:16342: checking for desired basename for form library" >&5
16343 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
16345 # Check whether --with-form-libname or --without-form-libname was given.
16346 if test "${with_form_libname+set}" = set; then
16347 withval="$with_form_libname"
16348 with_lib_basename=$withval
16350 with_lib_basename=form
16352 FORM_NAME="$with_lib_basename"
16354 case "x$FORM_NAME" in
16362 echo "$as_me:16362: result: $FORM_NAME" >&5
16363 echo "${ECHO_T}$FORM_NAME" >&6
16365 echo "$as_me:16365: checking for desired basename for menu library" >&5
16366 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
16368 # Check whether --with-menu-libname or --without-menu-libname was given.
16369 if test "${with_menu_libname+set}" = set; then
16370 withval="$with_menu_libname"
16371 with_lib_basename=$withval
16373 with_lib_basename=menu
16375 MENU_NAME="$with_lib_basename"
16377 case "x$MENU_NAME" in
16385 echo "$as_me:16385: result: $MENU_NAME" >&5
16386 echo "${ECHO_T}$MENU_NAME" >&6
16388 echo "$as_me:16388: checking for desired basename for panel library" >&5
16389 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
16391 # Check whether --with-panel-libname or --without-panel-libname was given.
16392 if test "${with_panel_libname+set}" = set; then
16393 withval="$with_panel_libname"
16394 with_lib_basename=$withval
16396 with_lib_basename=panel
16398 PANEL_NAME="$with_lib_basename"
16400 case "x$PANEL_NAME" in
16408 echo "$as_me:16408: result: $PANEL_NAME" >&5
16409 echo "${ECHO_T}$PANEL_NAME" >&6
16411 echo "$as_me:16411: checking if you want to check for panel functions" >&5
16412 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
16414 # Check whether --enable-panel or --disable-panel was given.
16415 if test "${enable_panel+set}" = set; then
16416 enableval="$enable_panel"
16417 test "$enableval" != no && enableval=yes
16418 if test "$enableval" != "yes" ; then
16421 cf_enable_panel=$cf_default_panel
16425 cf_enable_panel=$cf_default_panel
16428 echo "$as_me:16428: result: $cf_enable_panel" >&5
16429 echo "${ECHO_T}$cf_enable_panel" >&6
16430 if test $cf_enable_panel = yes
16433 cf_have_curses_lib=no
16435 : ${NCURSES_CONFIG_PKG:=none}
16436 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16438 elif test "x${PKG_CONFIG:=none}" != xnone; then
16439 echo "$as_me:16439: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
16440 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16441 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
16442 echo "$as_me:16442: result: yes" >&5
16443 echo "${ECHO_T}yes" >&6
16445 echo "$as_me:16445: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
16446 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16448 cf_save_CPPFLAGS="$CPPFLAGS"
16449 cf_save_LIBS="$LIBS"
16454 cf_new_extra_cppflags=
16456 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
16458 case "$cf_fix_cppflags" in
16460 case "$cf_add_cflags" in
16461 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16462 case "$cf_add_cflags" in
16464 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16466 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16467 && test -z "${cf_tst_cflags}" \
16468 && cf_fix_cppflags=yes
16470 if test "$cf_fix_cppflags" = yes ; then
16472 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16473 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16476 elif test "${cf_tst_cflags}" = "\"'" ; then
16478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16485 case "$CPPFLAGS" in
16489 case "$cf_add_cflags" in
16491 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16493 CPPFLAGS=`echo "$CPPFLAGS" | \
16494 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16495 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16500 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16501 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16508 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16509 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16516 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16517 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16519 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16522 && test -z "${cf_tst_cflags}" \
16523 && cf_fix_cppflags=no
16528 if test -n "$cf_new_cflags" ; then
16530 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16531 CFLAGS="${CFLAGS}$cf_new_cflags"
16535 if test -n "$cf_new_cppflags" ; then
16537 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16538 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16542 if test -n "$cf_new_extra_cppflags" ; then
16544 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16545 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16549 cf_add_libs="$LIBS"
16552 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16553 # filter duplicates
16554 for cf_add_1lib in $cf_add_0lib; do
16555 for cf_add_2lib in $cf_add_libs; do
16556 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16561 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16563 LIBS="$cf_add_libs"
16565 cat >"conftest.$ac_ext" <<_ACEOF
16566 #line 16566 "configure"
16567 #include "confdefs.h"
16568 #include <$PANEL_NAME.h>
16572 (void) new_panel ( 0 );
16577 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16578 if { (eval echo "$as_me:16578: \"$ac_link\"") >&5
16579 (eval $ac_link) 2>&5
16581 echo "$as_me:16581: \$? = $ac_status" >&5
16582 (exit "$ac_status"); } &&
16583 { ac_try='test -s "conftest$ac_exeext"'
16584 { (eval echo "$as_me:16584: \"$ac_try\"") >&5
16585 (eval $ac_try) 2>&5
16587 echo "$as_me:16587: \$? = $ac_status" >&5
16588 (exit "$ac_status"); }; }; then
16589 if test "$cross_compiling" = yes; then
16590 cf_have_curses_lib=maybe
16592 cat >"conftest.$ac_ext" <<_ACEOF
16593 #line 16593 "configure"
16594 #include "confdefs.h"
16595 #include <$PANEL_NAME.h>
16597 { (void) new_panel ( 0 ); return 0; }
16599 rm -f "conftest$ac_exeext"
16600 if { (eval echo "$as_me:16600: \"$ac_link\"") >&5
16601 (eval $ac_link) 2>&5
16603 echo "$as_me:16603: \$? = $ac_status" >&5
16604 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16605 { (eval echo "$as_me:16605: \"$ac_try\"") >&5
16606 (eval $ac_try) 2>&5
16608 echo "$as_me:16608: \$? = $ac_status" >&5
16609 (exit "$ac_status"); }; }; then
16610 cf_have_curses_lib=yes
16612 echo "$as_me: program exited with status $ac_status" >&5
16613 echo "$as_me: failed program was:" >&5
16614 cat "conftest.$ac_ext" >&5
16615 cf_have_curses_lib=no
16617 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16620 echo "$as_me: failed program was:" >&5
16621 cat "conftest.$ac_ext" >&5
16622 cf_have_curses_lib=no
16624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16625 echo "$as_me:16625: result: $cf_have_curses_lib" >&5
16626 echo "${ECHO_T}$cf_have_curses_lib" >&6
16627 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
16628 if test "$cf_have_curses_lib" != "yes"
16630 CPPFLAGS="$cf_save_CPPFLAGS"
16631 LIBS="$cf_save_LIBS"
16634 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16636 cat >>confdefs.h <<EOF
16637 #define $cf_upper 1
16643 if test "$cf_have_curses_lib" = no; then
16644 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
16645 echo "$as_me:16645: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
16646 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
16647 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16648 echo $ECHO_N "(cached) $ECHO_C" >&6
16650 ac_check_lib_save_LIBS=$LIBS
16651 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
16652 cat >"conftest.$ac_ext" <<_ACEOF
16653 #line 16653 "configure"
16654 #include "confdefs.h"
16656 /* Override any gcc2 internal prototype to avoid an error. */
16660 /* We use char because int might match the return type of a gcc2
16661 builtin and then its argument prototype would still apply. */
16671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16672 if { (eval echo "$as_me:16672: \"$ac_link\"") >&5
16673 (eval $ac_link) 2>&5
16675 echo "$as_me:16675: \$? = $ac_status" >&5
16676 (exit "$ac_status"); } &&
16677 { ac_try='test -s "conftest$ac_exeext"'
16678 { (eval echo "$as_me:16678: \"$ac_try\"") >&5
16679 (eval $ac_try) 2>&5
16681 echo "$as_me:16681: \$? = $ac_status" >&5
16682 (exit "$ac_status"); }; }; then
16683 eval "$as_ac_Lib=yes"
16685 echo "$as_me: failed program was:" >&5
16686 cat "conftest.$ac_ext" >&5
16687 eval "$as_ac_Lib=no"
16689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16690 LIBS=$ac_check_lib_save_LIBS
16692 echo "$as_me:16692: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16693 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16694 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16696 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16698 cf_add_libs="$LIBS"
16701 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16702 # filter duplicates
16703 for cf_add_1lib in $cf_add_0lib; do
16704 for cf_add_2lib in $cf_add_libs; do
16705 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16710 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16712 LIBS="$cf_add_libs"
16714 cat >>confdefs.h <<EOF
16715 #define $cf_upper 1
16722 cf_curses_headers="$cf_curses_headers panel.h"
16725 echo "$as_me:16725: checking if you want to check for menu functions" >&5
16726 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
16728 # Check whether --enable-menu or --disable-menu was given.
16729 if test "${enable_menu+set}" = set; then
16730 enableval="$enable_menu"
16731 test "$enableval" != no && enableval=yes
16732 if test "$enableval" != "yes" ; then
16735 cf_enable_menu=$cf_default_menu
16739 cf_enable_menu=$cf_default_menu
16742 echo "$as_me:16742: result: $cf_enable_menu" >&5
16743 echo "${ECHO_T}$cf_enable_menu" >&6
16744 if test $cf_enable_menu = yes
16746 case $cf_cv_screen in
16751 echo "$as_me:16751: checking for NetBSD menu.h" >&5
16752 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
16753 if test "${cf_cv_netbsd_menu_h+set}" = set; then
16754 echo $ECHO_N "(cached) $ECHO_C" >&6
16757 cat >"conftest.$ac_ext" <<_ACEOF
16758 #line 16758 "configure"
16759 #include "confdefs.h"
16761 #include <${cf_cv_ncurses_header:-curses.h}>
16769 int y = menu->max_item_width;
16775 rm -f "conftest.$ac_objext"
16776 if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5
16777 (eval $ac_compile) 2>&5
16779 echo "$as_me:16779: \$? = $ac_status" >&5
16780 (exit "$ac_status"); } &&
16781 { ac_try='test -s "conftest.$ac_objext"'
16782 { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783 (eval $ac_try) 2>&5
16785 echo "$as_me:16785: \$? = $ac_status" >&5
16786 (exit "$ac_status"); }; }; then
16787 cf_cv_netbsd_menu_h=yes
16790 echo "$as_me: failed program was:" >&5
16791 cat "conftest.$ac_ext" >&5
16792 cf_cv_netbsd_menu_h=no
16794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16797 echo "$as_me:16797: result: $cf_cv_netbsd_menu_h" >&5
16798 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
16800 test "$cf_cv_netbsd_menu_h" = yes &&
16801 cat >>confdefs.h <<\EOF
16802 #define HAVE_NETBSD_MENU_H 1
16808 cf_have_curses_lib=no
16810 : ${NCURSES_CONFIG_PKG:=none}
16811 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
16813 elif test "x${PKG_CONFIG:=none}" != xnone; then
16814 echo "$as_me:16814: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
16815 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
16816 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
16817 echo "$as_me:16817: result: yes" >&5
16818 echo "${ECHO_T}yes" >&6
16820 echo "$as_me:16820: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
16821 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
16823 cf_save_CPPFLAGS="$CPPFLAGS"
16824 cf_save_LIBS="$LIBS"
16829 cf_new_extra_cppflags=
16831 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
16833 case "$cf_fix_cppflags" in
16835 case "$cf_add_cflags" in
16836 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16837 case "$cf_add_cflags" in
16839 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16841 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16842 && test -z "${cf_tst_cflags}" \
16843 && cf_fix_cppflags=yes
16845 if test "$cf_fix_cppflags" = yes ; then
16847 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16848 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16851 elif test "${cf_tst_cflags}" = "\"'" ; then
16853 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16854 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16860 case "$CPPFLAGS" in
16864 case "$cf_add_cflags" in
16866 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16868 CPPFLAGS=`echo "$CPPFLAGS" | \
16869 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16870 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16875 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16876 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16883 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16884 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16891 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16892 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16894 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16896 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16897 && test -z "${cf_tst_cflags}" \
16898 && cf_fix_cppflags=no
16903 if test -n "$cf_new_cflags" ; then
16905 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16906 CFLAGS="${CFLAGS}$cf_new_cflags"
16910 if test -n "$cf_new_cppflags" ; then
16912 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16913 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16917 if test -n "$cf_new_extra_cppflags" ; then
16919 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16920 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16924 cf_add_libs="$LIBS"
16927 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16928 # filter duplicates
16929 for cf_add_1lib in $cf_add_0lib; do
16930 for cf_add_2lib in $cf_add_libs; do
16931 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16936 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16938 LIBS="$cf_add_libs"
16940 cat >"conftest.$ac_ext" <<_ACEOF
16941 #line 16941 "configure"
16942 #include "confdefs.h"
16943 #include <$MENU_NAME.h>
16947 (void) menu_driver ( 0,0 );
16952 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16953 if { (eval echo "$as_me:16953: \"$ac_link\"") >&5
16954 (eval $ac_link) 2>&5
16956 echo "$as_me:16956: \$? = $ac_status" >&5
16957 (exit "$ac_status"); } &&
16958 { ac_try='test -s "conftest$ac_exeext"'
16959 { (eval echo "$as_me:16959: \"$ac_try\"") >&5
16960 (eval $ac_try) 2>&5
16962 echo "$as_me:16962: \$? = $ac_status" >&5
16963 (exit "$ac_status"); }; }; then
16964 if test "$cross_compiling" = yes; then
16965 cf_have_curses_lib=maybe
16967 cat >"conftest.$ac_ext" <<_ACEOF
16968 #line 16968 "configure"
16969 #include "confdefs.h"
16970 #include <$MENU_NAME.h>
16972 { (void) menu_driver ( 0,0 ); return 0; }
16974 rm -f "conftest$ac_exeext"
16975 if { (eval echo "$as_me:16975: \"$ac_link\"") >&5
16976 (eval $ac_link) 2>&5
16978 echo "$as_me:16978: \$? = $ac_status" >&5
16979 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16980 { (eval echo "$as_me:16980: \"$ac_try\"") >&5
16981 (eval $ac_try) 2>&5
16983 echo "$as_me:16983: \$? = $ac_status" >&5
16984 (exit "$ac_status"); }; }; then
16985 cf_have_curses_lib=yes
16987 echo "$as_me: program exited with status $ac_status" >&5
16988 echo "$as_me: failed program was:" >&5
16989 cat "conftest.$ac_ext" >&5
16990 cf_have_curses_lib=no
16992 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16995 echo "$as_me: failed program was:" >&5
16996 cat "conftest.$ac_ext" >&5
16997 cf_have_curses_lib=no
16999 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17000 echo "$as_me:17000: result: $cf_have_curses_lib" >&5
17001 echo "${ECHO_T}$cf_have_curses_lib" >&6
17002 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17003 if test "$cf_have_curses_lib" != "yes"
17005 CPPFLAGS="$cf_save_CPPFLAGS"
17006 LIBS="$cf_save_LIBS"
17009 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17011 cat >>confdefs.h <<EOF
17012 #define $cf_upper 1
17018 if test "$cf_have_curses_lib" = no; then
17019 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17020 echo "$as_me:17020: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17021 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17022 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17023 echo $ECHO_N "(cached) $ECHO_C" >&6
17025 ac_check_lib_save_LIBS=$LIBS
17026 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17027 cat >"conftest.$ac_ext" <<_ACEOF
17028 #line 17028 "configure"
17029 #include "confdefs.h"
17031 /* Override any gcc2 internal prototype to avoid an error. */
17035 /* We use char because int might match the return type of a gcc2
17036 builtin and then its argument prototype would still apply. */
17037 char menu_driver ();
17046 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17047 if { (eval echo "$as_me:17047: \"$ac_link\"") >&5
17048 (eval $ac_link) 2>&5
17050 echo "$as_me:17050: \$? = $ac_status" >&5
17051 (exit "$ac_status"); } &&
17052 { ac_try='test -s "conftest$ac_exeext"'
17053 { (eval echo "$as_me:17053: \"$ac_try\"") >&5
17054 (eval $ac_try) 2>&5
17056 echo "$as_me:17056: \$? = $ac_status" >&5
17057 (exit "$ac_status"); }; }; then
17058 eval "$as_ac_Lib=yes"
17060 echo "$as_me: failed program was:" >&5
17061 cat "conftest.$ac_ext" >&5
17062 eval "$as_ac_Lib=no"
17064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17065 LIBS=$ac_check_lib_save_LIBS
17067 echo "$as_me:17067: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17068 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17069 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17071 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17073 cf_add_libs="$LIBS"
17076 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17077 # filter duplicates
17078 for cf_add_1lib in $cf_add_0lib; do
17079 for cf_add_2lib in $cf_add_libs; do
17080 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17085 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17087 LIBS="$cf_add_libs"
17089 cat >>confdefs.h <<EOF
17090 #define $cf_upper 1
17097 cf_curses_headers="$cf_curses_headers menu.h"
17100 echo "$as_me:17100: checking if you want to check for form functions" >&5
17101 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17103 # Check whether --enable-form or --disable-form was given.
17104 if test "${enable_form+set}" = set; then
17105 enableval="$enable_form"
17106 test "$enableval" != no && enableval=yes
17107 if test "$enableval" != "yes" ; then
17110 cf_enable_form=$cf_default_form
17114 cf_enable_form=$cf_default_form
17117 echo "$as_me:17117: result: $cf_enable_form" >&5
17118 echo "${ECHO_T}$cf_enable_form" >&6
17119 if test $cf_enable_form = yes
17121 case $cf_cv_screen in
17126 echo "$as_me:17126: checking for NetBSD form.h" >&5
17127 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17128 if test "${cf_cv_netbsd_form_h+set}" = set; then
17129 echo $ECHO_N "(cached) $ECHO_C" >&6
17132 cat >"conftest.$ac_ext" <<_ACEOF
17133 #line 17133 "configure"
17134 #include "confdefs.h"
17136 #include <${cf_cv_ncurses_header:-curses.h}>
17144 int y = current_field(form)->cursor_ypos;
17145 int x = current_field(form)->cursor_xpos;
17151 rm -f "conftest.$ac_objext"
17152 if { (eval echo "$as_me:17152: \"$ac_compile\"") >&5
17153 (eval $ac_compile) 2>&5
17155 echo "$as_me:17155: \$? = $ac_status" >&5
17156 (exit "$ac_status"); } &&
17157 { ac_try='test -s "conftest.$ac_objext"'
17158 { (eval echo "$as_me:17158: \"$ac_try\"") >&5
17159 (eval $ac_try) 2>&5
17161 echo "$as_me:17161: \$? = $ac_status" >&5
17162 (exit "$ac_status"); }; }; then
17163 cf_cv_netbsd_form_h=yes
17166 echo "$as_me: failed program was:" >&5
17167 cat "conftest.$ac_ext" >&5
17168 cf_cv_netbsd_form_h=no
17170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17173 echo "$as_me:17173: result: $cf_cv_netbsd_form_h" >&5
17174 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17176 test "$cf_cv_netbsd_form_h" = yes &&
17177 cat >>confdefs.h <<\EOF
17178 #define HAVE_NETBSD_FORM_H 1
17184 cf_have_curses_lib=no
17186 : ${NCURSES_CONFIG_PKG:=none}
17187 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17189 elif test "x${PKG_CONFIG:=none}" != xnone; then
17190 echo "$as_me:17190: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17191 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17192 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17193 echo "$as_me:17193: result: yes" >&5
17194 echo "${ECHO_T}yes" >&6
17196 echo "$as_me:17196: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17197 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17199 cf_save_CPPFLAGS="$CPPFLAGS"
17200 cf_save_LIBS="$LIBS"
17205 cf_new_extra_cppflags=
17207 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17209 case "$cf_fix_cppflags" in
17211 case "$cf_add_cflags" in
17212 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17213 case "$cf_add_cflags" in
17215 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17217 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17218 && test -z "${cf_tst_cflags}" \
17219 && cf_fix_cppflags=yes
17221 if test "$cf_fix_cppflags" = yes ; then
17223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17227 elif test "${cf_tst_cflags}" = "\"'" ; then
17229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17236 case "$CPPFLAGS" in
17240 case "$cf_add_cflags" in
17242 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17244 CPPFLAGS=`echo "$CPPFLAGS" | \
17245 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17246 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17251 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17252 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17259 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17260 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17267 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17268 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17270 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17272 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17273 && test -z "${cf_tst_cflags}" \
17274 && cf_fix_cppflags=no
17279 if test -n "$cf_new_cflags" ; then
17281 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17282 CFLAGS="${CFLAGS}$cf_new_cflags"
17286 if test -n "$cf_new_cppflags" ; then
17288 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17289 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17293 if test -n "$cf_new_extra_cppflags" ; then
17295 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17296 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17300 cf_add_libs="$LIBS"
17303 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17304 # filter duplicates
17305 for cf_add_1lib in $cf_add_0lib; do
17306 for cf_add_2lib in $cf_add_libs; do
17307 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17312 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17314 LIBS="$cf_add_libs"
17316 cat >"conftest.$ac_ext" <<_ACEOF
17317 #line 17317 "configure"
17318 #include "confdefs.h"
17319 #include <$FORM_NAME.h>
17323 (void) form_driver ( 0,0 );
17328 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17329 if { (eval echo "$as_me:17329: \"$ac_link\"") >&5
17330 (eval $ac_link) 2>&5
17332 echo "$as_me:17332: \$? = $ac_status" >&5
17333 (exit "$ac_status"); } &&
17334 { ac_try='test -s "conftest$ac_exeext"'
17335 { (eval echo "$as_me:17335: \"$ac_try\"") >&5
17336 (eval $ac_try) 2>&5
17338 echo "$as_me:17338: \$? = $ac_status" >&5
17339 (exit "$ac_status"); }; }; then
17340 if test "$cross_compiling" = yes; then
17341 cf_have_curses_lib=maybe
17343 cat >"conftest.$ac_ext" <<_ACEOF
17344 #line 17344 "configure"
17345 #include "confdefs.h"
17346 #include <$FORM_NAME.h>
17348 { (void) form_driver ( 0,0 ); return 0; }
17350 rm -f "conftest$ac_exeext"
17351 if { (eval echo "$as_me:17351: \"$ac_link\"") >&5
17352 (eval $ac_link) 2>&5
17354 echo "$as_me:17354: \$? = $ac_status" >&5
17355 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17356 { (eval echo "$as_me:17356: \"$ac_try\"") >&5
17357 (eval $ac_try) 2>&5
17359 echo "$as_me:17359: \$? = $ac_status" >&5
17360 (exit "$ac_status"); }; }; then
17361 cf_have_curses_lib=yes
17363 echo "$as_me: program exited with status $ac_status" >&5
17364 echo "$as_me: failed program was:" >&5
17365 cat "conftest.$ac_ext" >&5
17366 cf_have_curses_lib=no
17368 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17371 echo "$as_me: failed program was:" >&5
17372 cat "conftest.$ac_ext" >&5
17373 cf_have_curses_lib=no
17375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17376 echo "$as_me:17376: result: $cf_have_curses_lib" >&5
17377 echo "${ECHO_T}$cf_have_curses_lib" >&6
17378 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17379 if test "$cf_have_curses_lib" != "yes"
17381 CPPFLAGS="$cf_save_CPPFLAGS"
17382 LIBS="$cf_save_LIBS"
17385 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17387 cat >>confdefs.h <<EOF
17388 #define $cf_upper 1
17394 if test "$cf_have_curses_lib" = no; then
17395 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
17396 echo "$as_me:17396: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
17397 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17398 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17399 echo $ECHO_N "(cached) $ECHO_C" >&6
17401 ac_check_lib_save_LIBS=$LIBS
17402 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
17403 cat >"conftest.$ac_ext" <<_ACEOF
17404 #line 17404 "configure"
17405 #include "confdefs.h"
17407 /* Override any gcc2 internal prototype to avoid an error. */
17411 /* We use char because int might match the return type of a gcc2
17412 builtin and then its argument prototype would still apply. */
17413 char form_driver ();
17422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17423 if { (eval echo "$as_me:17423: \"$ac_link\"") >&5
17424 (eval $ac_link) 2>&5
17426 echo "$as_me:17426: \$? = $ac_status" >&5
17427 (exit "$ac_status"); } &&
17428 { ac_try='test -s "conftest$ac_exeext"'
17429 { (eval echo "$as_me:17429: \"$ac_try\"") >&5
17430 (eval $ac_try) 2>&5
17432 echo "$as_me:17432: \$? = $ac_status" >&5
17433 (exit "$ac_status"); }; }; then
17434 eval "$as_ac_Lib=yes"
17436 echo "$as_me: failed program was:" >&5
17437 cat "conftest.$ac_ext" >&5
17438 eval "$as_ac_Lib=no"
17440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17441 LIBS=$ac_check_lib_save_LIBS
17443 echo "$as_me:17443: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17444 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17445 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17447 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17449 cf_add_libs="$LIBS"
17452 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17453 # filter duplicates
17454 for cf_add_1lib in $cf_add_0lib; do
17455 for cf_add_2lib in $cf_add_libs; do
17456 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17461 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17463 LIBS="$cf_add_libs"
17465 cat >>confdefs.h <<EOF
17466 #define $cf_upper 1
17473 cf_curses_headers="$cf_curses_headers form.h"
17476 # look for curses-related headers
17478 for ac_header in $cf_curses_headers
17480 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17481 echo "$as_me:17481: checking for $ac_header" >&5
17482 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17483 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17484 echo $ECHO_N "(cached) $ECHO_C" >&6
17486 cat >"conftest.$ac_ext" <<_ACEOF
17487 #line 17487 "configure"
17488 #include "confdefs.h"
17489 #include <$ac_header>
17491 if { (eval echo "$as_me:17491: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17492 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17494 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17496 cat conftest.err >&5
17497 echo "$as_me:17497: \$? = $ac_status" >&5
17498 (exit "$ac_status"); } >/dev/null; then
17499 if test -s conftest.err; then
17500 ac_cpp_err=$ac_c_preproc_warn_flag
17507 if test -z "$ac_cpp_err"; then
17508 eval "$as_ac_Header=yes"
17510 echo "$as_me: failed program was:" >&5
17511 cat "conftest.$ac_ext" >&5
17512 eval "$as_ac_Header=no"
17514 rm -f conftest.err "conftest.$ac_ext"
17516 echo "$as_me:17516: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17517 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17518 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17519 cat >>confdefs.h <<EOF
17520 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17526 echo "$as_me:17526: checking for ANSI C header files" >&5
17527 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17528 if test "${ac_cv_header_stdc+set}" = set; then
17529 echo $ECHO_N "(cached) $ECHO_C" >&6
17531 cat >"conftest.$ac_ext" <<_ACEOF
17532 #line 17532 "configure"
17533 #include "confdefs.h"
17534 #include <stdlib.h>
17535 #include <stdarg.h>
17536 #include <string.h>
17540 if { (eval echo "$as_me:17540: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17541 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17543 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17545 cat conftest.err >&5
17546 echo "$as_me:17546: \$? = $ac_status" >&5
17547 (exit "$ac_status"); } >/dev/null; then
17548 if test -s conftest.err; then
17549 ac_cpp_err=$ac_c_preproc_warn_flag
17556 if test -z "$ac_cpp_err"; then
17557 ac_cv_header_stdc=yes
17559 echo "$as_me: failed program was:" >&5
17560 cat "conftest.$ac_ext" >&5
17561 ac_cv_header_stdc=no
17563 rm -f conftest.err "conftest.$ac_ext"
17565 if test $ac_cv_header_stdc = yes; then
17566 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17567 cat >"conftest.$ac_ext" <<_ACEOF
17568 #line 17568 "configure"
17569 #include "confdefs.h"
17570 #include <string.h>
17573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17574 $EGREP "memchr" >/dev/null 2>&1; then
17577 ac_cv_header_stdc=no
17583 if test $ac_cv_header_stdc = yes; then
17584 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17585 cat >"conftest.$ac_ext" <<_ACEOF
17586 #line 17586 "configure"
17587 #include "confdefs.h"
17588 #include <stdlib.h>
17591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17592 $EGREP "free" >/dev/null 2>&1; then
17595 ac_cv_header_stdc=no
17601 if test $ac_cv_header_stdc = yes; then
17602 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17603 if test "$cross_compiling" = yes; then
17606 cat >"conftest.$ac_ext" <<_ACEOF
17607 #line 17607 "configure"
17608 #include "confdefs.h"
17610 #if ((' ' & 0x0FF) == 0x020)
17611 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17612 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17614 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17615 || ('j' <= (c) && (c) <= 'r') \
17616 || ('s' <= (c) && (c) <= 'z'))
17617 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17620 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17625 for (i = 0; i < 256; i++)
17626 if (XOR (islower (i), ISLOWER (i))
17627 || toupper (i) != TOUPPER (i))
17628 $ac_main_return(2);
17629 $ac_main_return (0);
17632 rm -f "conftest$ac_exeext"
17633 if { (eval echo "$as_me:17633: \"$ac_link\"") >&5
17634 (eval $ac_link) 2>&5
17636 echo "$as_me:17636: \$? = $ac_status" >&5
17637 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17638 { (eval echo "$as_me:17638: \"$ac_try\"") >&5
17639 (eval $ac_try) 2>&5
17641 echo "$as_me:17641: \$? = $ac_status" >&5
17642 (exit "$ac_status"); }; }; then
17645 echo "$as_me: program exited with status $ac_status" >&5
17646 echo "$as_me: failed program was:" >&5
17647 cat "conftest.$ac_ext" >&5
17648 ac_cv_header_stdc=no
17650 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17654 echo "$as_me:17654: result: $ac_cv_header_stdc" >&5
17655 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17656 if test $ac_cv_header_stdc = yes; then
17658 cat >>confdefs.h <<\EOF
17659 #define STDC_HEADERS 1
17664 echo "$as_me:17664: checking whether time.h and sys/time.h may both be included" >&5
17665 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17666 if test "${ac_cv_header_time+set}" = set; then
17667 echo $ECHO_N "(cached) $ECHO_C" >&6
17669 cat >"conftest.$ac_ext" <<_ACEOF
17670 #line 17670 "configure"
17671 #include "confdefs.h"
17672 #include <sys/types.h>
17673 #include <sys/time.h>
17679 if ((struct tm *) 0)
17685 rm -f "conftest.$ac_objext"
17686 if { (eval echo "$as_me:17686: \"$ac_compile\"") >&5
17687 (eval $ac_compile) 2>&5
17689 echo "$as_me:17689: \$? = $ac_status" >&5
17690 (exit "$ac_status"); } &&
17691 { ac_try='test -s "conftest.$ac_objext"'
17692 { (eval echo "$as_me:17692: \"$ac_try\"") >&5
17693 (eval $ac_try) 2>&5
17695 echo "$as_me:17695: \$? = $ac_status" >&5
17696 (exit "$ac_status"); }; }; then
17697 ac_cv_header_time=yes
17699 echo "$as_me: failed program was:" >&5
17700 cat "conftest.$ac_ext" >&5
17701 ac_cv_header_time=no
17703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17705 echo "$as_me:17705: result: $ac_cv_header_time" >&5
17706 echo "${ECHO_T}$ac_cv_header_time" >&6
17707 if test $ac_cv_header_time = yes; then
17709 cat >>confdefs.h <<\EOF
17710 #define TIME_WITH_SYS_TIME 1
17728 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17729 echo "$as_me:17729: checking for $ac_header" >&5
17730 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17731 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17732 echo $ECHO_N "(cached) $ECHO_C" >&6
17734 cat >"conftest.$ac_ext" <<_ACEOF
17735 #line 17735 "configure"
17736 #include "confdefs.h"
17737 #include <$ac_header>
17739 if { (eval echo "$as_me:17739: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17740 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17742 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17744 cat conftest.err >&5
17745 echo "$as_me:17745: \$? = $ac_status" >&5
17746 (exit "$ac_status"); } >/dev/null; then
17747 if test -s conftest.err; then
17748 ac_cpp_err=$ac_c_preproc_warn_flag
17755 if test -z "$ac_cpp_err"; then
17756 eval "$as_ac_Header=yes"
17758 echo "$as_me: failed program was:" >&5
17759 cat "conftest.$ac_ext" >&5
17760 eval "$as_ac_Header=no"
17762 rm -f conftest.err "conftest.$ac_ext"
17764 echo "$as_me:17764: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17765 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17766 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17767 cat >>confdefs.h <<EOF
17768 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17774 for ac_header in unistd.h getopt.h
17776 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17777 echo "$as_me:17777: checking for $ac_header" >&5
17778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17779 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17780 echo $ECHO_N "(cached) $ECHO_C" >&6
17782 cat >"conftest.$ac_ext" <<_ACEOF
17783 #line 17783 "configure"
17784 #include "confdefs.h"
17785 #include <$ac_header>
17787 if { (eval echo "$as_me:17787: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17788 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17790 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17792 cat conftest.err >&5
17793 echo "$as_me:17793: \$? = $ac_status" >&5
17794 (exit "$ac_status"); } >/dev/null; then
17795 if test -s conftest.err; then
17796 ac_cpp_err=$ac_c_preproc_warn_flag
17803 if test -z "$ac_cpp_err"; then
17804 eval "$as_ac_Header=yes"
17806 echo "$as_me: failed program was:" >&5
17807 cat "conftest.$ac_ext" >&5
17808 eval "$as_ac_Header=no"
17810 rm -f conftest.err "conftest.$ac_ext"
17812 echo "$as_me:17812: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17813 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17814 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17815 cat >>confdefs.h <<EOF
17816 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17822 echo "$as_me:17822: checking for header declaring getopt variables" >&5
17823 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17824 if test "${cf_cv_getopt_header+set}" = set; then
17825 echo $ECHO_N "(cached) $ECHO_C" >&6
17828 cf_cv_getopt_header=none
17829 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17831 cat >"conftest.$ac_ext" <<_ACEOF
17832 #line 17832 "configure"
17833 #include "confdefs.h"
17835 #include <$cf_header>
17839 int x = optind; char *y = optarg
17844 rm -f "conftest.$ac_objext"
17845 if { (eval echo "$as_me:17845: \"$ac_compile\"") >&5
17846 (eval $ac_compile) 2>&5
17848 echo "$as_me:17848: \$? = $ac_status" >&5
17849 (exit "$ac_status"); } &&
17850 { ac_try='test -s "conftest.$ac_objext"'
17851 { (eval echo "$as_me:17851: \"$ac_try\"") >&5
17852 (eval $ac_try) 2>&5
17854 echo "$as_me:17854: \$? = $ac_status" >&5
17855 (exit "$ac_status"); }; }; then
17856 cf_cv_getopt_header=$cf_header
17859 echo "$as_me: failed program was:" >&5
17860 cat "conftest.$ac_ext" >&5
17862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17866 echo "$as_me:17866: result: $cf_cv_getopt_header" >&5
17867 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17868 if test "$cf_cv_getopt_header" != none ; then
17870 cat >>confdefs.h <<\EOF
17871 #define HAVE_GETOPT_HEADER 1
17875 if test "$cf_cv_getopt_header" = getopt.h ; then
17877 cat >>confdefs.h <<\EOF
17878 #define NEED_GETOPT_H 1
17892 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17893 echo "$as_me:17893: checking for $ac_func" >&5
17894 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17895 if eval "test \"\${$as_ac_var+set}\" = set"; then
17896 echo $ECHO_N "(cached) $ECHO_C" >&6
17898 cat >"conftest.$ac_ext" <<_ACEOF
17899 #line 17899 "configure"
17900 #include "confdefs.h"
17901 #define $ac_func autoconf_temporary
17902 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17909 /* We use char because int might match the return type of a gcc2
17910 builtin and then its argument prototype would still apply. */
17911 char $ac_func (void);
17917 /* The GNU C library defines stubs for functions which it implements
17918 to always fail with ENOSYS. Some functions are actually named
17919 something starting with __ and the normal name is an alias. */
17920 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17921 #error found stub for $ac_func
17924 return $ac_func ();
17929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17930 if { (eval echo "$as_me:17930: \"$ac_link\"") >&5
17931 (eval $ac_link) 2>&5
17933 echo "$as_me:17933: \$? = $ac_status" >&5
17934 (exit "$ac_status"); } &&
17935 { ac_try='test -s "conftest$ac_exeext"'
17936 { (eval echo "$as_me:17936: \"$ac_try\"") >&5
17937 (eval $ac_try) 2>&5
17939 echo "$as_me:17939: \$? = $ac_status" >&5
17940 (exit "$ac_status"); }; }; then
17941 eval "$as_ac_var=yes"
17943 echo "$as_me: failed program was:" >&5
17944 cat "conftest.$ac_ext" >&5
17945 eval "$as_ac_var=no"
17947 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17949 echo "$as_me:17949: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17950 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17951 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17952 cat >>confdefs.h <<EOF
17953 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17959 # use a compile-check to work with ncurses*-config and subdirectory includes
17960 echo "$as_me:17960: checking if we can use termcap.h" >&5
17961 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
17962 if test "${cf_cv_have_termcap_h+set}" = set; then
17963 echo $ECHO_N "(cached) $ECHO_C" >&6
17966 cat >"conftest.$ac_ext" <<_ACEOF
17967 #line 17967 "configure"
17968 #include "confdefs.h"
17970 #include <curses.h>
17971 #ifdef NCURSES_VERSION
17972 #undef NCURSES_VERSION
17974 #include <termcap.h>
17975 #ifndef NCURSES_VERSION
17976 #error wrong header
17987 rm -f "conftest.$ac_objext"
17988 if { (eval echo "$as_me:17988: \"$ac_compile\"") >&5
17989 (eval $ac_compile) 2>&5
17991 echo "$as_me:17991: \$? = $ac_status" >&5
17992 (exit "$ac_status"); } &&
17993 { ac_try='test -s "conftest.$ac_objext"'
17994 { (eval echo "$as_me:17994: \"$ac_try\"") >&5
17995 (eval $ac_try) 2>&5
17997 echo "$as_me:17997: \$? = $ac_status" >&5
17998 (exit "$ac_status"); }; }; then
17999 cf_cv_have_termcap_h=yes
18001 echo "$as_me: failed program was:" >&5
18002 cat "conftest.$ac_ext" >&5
18003 cf_cv_have_termcap_h=no
18005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18007 echo "$as_me:18007: result: $cf_cv_have_termcap_h" >&5
18008 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18009 if test "x$cf_cv_have_termcap_h" = xyes
18012 cat >>confdefs.h <<\EOF
18013 #define HAVE_TERMCAP_H 1
18017 echo "$as_me:18017: checking if we can use ncurses/termcap.h" >&5
18018 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18019 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18020 echo $ECHO_N "(cached) $ECHO_C" >&6
18023 cat >"conftest.$ac_ext" <<_ACEOF
18024 #line 18024 "configure"
18025 #include "confdefs.h"
18027 #include <ncurses/curses.h>
18028 #ifdef NCURSES_VERSION
18029 #undef NCURSES_VERSION
18031 #include <ncurses/termcap.h>
18032 #ifndef NCURSES_VERSION
18033 #error wrong header
18044 rm -f "conftest.$ac_objext"
18045 if { (eval echo "$as_me:18045: \"$ac_compile\"") >&5
18046 (eval $ac_compile) 2>&5
18048 echo "$as_me:18048: \$? = $ac_status" >&5
18049 (exit "$ac_status"); } &&
18050 { ac_try='test -s "conftest.$ac_objext"'
18051 { (eval echo "$as_me:18051: \"$ac_try\"") >&5
18052 (eval $ac_try) 2>&5
18054 echo "$as_me:18054: \$? = $ac_status" >&5
18055 (exit "$ac_status"); }; }; then
18056 cf_cv_have_ncurses_termcap_h=yes
18058 echo "$as_me: failed program was:" >&5
18059 cat "conftest.$ac_ext" >&5
18060 cf_cv_have_ncurses_termcap_h=no
18062 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18064 echo "$as_me:18064: result: $cf_cv_have_ncurses_termcap_h" >&5
18065 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18066 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18067 cat >>confdefs.h <<\EOF
18068 #define HAVE_NCURSES_TERMCAP_H 1
18073 if test "x$ac_cv_func_getopt" = xno; then
18074 { { echo "$as_me:18074: error: getopt is required for building programs" >&5
18075 echo "$as_me: error: getopt is required for building programs" >&2;}
18076 { (exit 1); exit 1; }; }
18079 if test "$cf_enable_widec" = yes; then
18092 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18093 echo "$as_me:18093: checking for $ac_func" >&5
18094 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18095 if eval "test \"\${$as_ac_var+set}\" = set"; then
18096 echo $ECHO_N "(cached) $ECHO_C" >&6
18098 cat >"conftest.$ac_ext" <<_ACEOF
18099 #line 18099 "configure"
18100 #include "confdefs.h"
18101 #define $ac_func autoconf_temporary
18102 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18109 /* We use char because int might match the return type of a gcc2
18110 builtin and then its argument prototype would still apply. */
18111 char $ac_func (void);
18117 /* The GNU C library defines stubs for functions which it implements
18118 to always fail with ENOSYS. Some functions are actually named
18119 something starting with __ and the normal name is an alias. */
18120 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18121 #error found stub for $ac_func
18124 return $ac_func ();
18129 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18130 if { (eval echo "$as_me:18130: \"$ac_link\"") >&5
18131 (eval $ac_link) 2>&5
18133 echo "$as_me:18133: \$? = $ac_status" >&5
18134 (exit "$ac_status"); } &&
18135 { ac_try='test -s "conftest$ac_exeext"'
18136 { (eval echo "$as_me:18136: \"$ac_try\"") >&5
18137 (eval $ac_try) 2>&5
18139 echo "$as_me:18139: \$? = $ac_status" >&5
18140 (exit "$ac_status"); }; }; then
18141 eval "$as_ac_var=yes"
18143 echo "$as_me: failed program was:" >&5
18144 cat "conftest.$ac_ext" >&5
18145 eval "$as_ac_var=no"
18147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18149 echo "$as_me:18149: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18150 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18151 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18152 cat >>confdefs.h <<EOF
18153 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18161 echo "$as_me:18161: checking definition to turn on extended curses functions" >&5
18162 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18163 if test "${cf_cv_need_xopen_extension+set}" = set; then
18164 echo $ECHO_N "(cached) $ECHO_C" >&6
18167 cf_cv_need_xopen_extension=unknown
18168 cat >"conftest.$ac_ext" <<_ACEOF
18169 #line 18169 "configure"
18170 #include "confdefs.h"
18172 #include <stdlib.h>
18173 #include <${cf_cv_ncurses_header:-curses.h}>
18178 #if defined(NCURSES_VERSION_PATCH)
18179 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
18183 #ifdef NCURSES_VERSION
18185 int check2 = curs_set((int)sizeof(check));
18187 long x = winnstr(stdscr, "", 0);
18189 #ifdef NCURSES_VERSION
18192 getbegyx(stdscr, y1, x1);
18201 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18202 if { (eval echo "$as_me:18202: \"$ac_link\"") >&5
18203 (eval $ac_link) 2>&5
18205 echo "$as_me:18205: \$? = $ac_status" >&5
18206 (exit "$ac_status"); } &&
18207 { ac_try='test -s "conftest$ac_exeext"'
18208 { (eval echo "$as_me:18208: \"$ac_try\"") >&5
18209 (eval $ac_try) 2>&5
18211 echo "$as_me:18211: \$? = $ac_status" >&5
18212 (exit "$ac_status"); }; }; then
18213 cf_cv_need_xopen_extension=none
18215 echo "$as_me: failed program was:" >&5
18216 cat "conftest.$ac_ext" >&5
18218 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
18220 cat >"conftest.$ac_ext" <<_ACEOF
18221 #line 18221 "configure"
18222 #include "confdefs.h"
18224 #define $cf_try_xopen_extension 1
18225 #include <stdlib.h>
18226 #include <${cf_cv_ncurses_header:-curses.h}>
18231 #ifdef NCURSES_VERSION
18233 int check2 = curs_set((int)sizeof(check));
18235 long x = winnstr(stdscr, "", 0);
18237 getbegyx(stdscr, y1, x1);
18238 #ifdef NCURSES_VERSION
18249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18250 if { (eval echo "$as_me:18250: \"$ac_link\"") >&5
18251 (eval $ac_link) 2>&5
18253 echo "$as_me:18253: \$? = $ac_status" >&5
18254 (exit "$ac_status"); } &&
18255 { ac_try='test -s "conftest$ac_exeext"'
18256 { (eval echo "$as_me:18256: \"$ac_try\"") >&5
18257 (eval $ac_try) 2>&5
18259 echo "$as_me:18259: \$? = $ac_status" >&5
18260 (exit "$ac_status"); }; }; then
18261 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
18263 echo "$as_me: failed program was:" >&5
18264 cat "conftest.$ac_ext" >&5
18266 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18273 echo "$as_me:18273: result: $cf_cv_need_xopen_extension" >&5
18274 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
18276 case "$cf_cv_need_xopen_extension" in
18279 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18280 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
18285 echo "$as_me:18285: checking for term.h" >&5
18286 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
18287 if test "${cf_cv_term_header+set}" = set; then
18288 echo $ECHO_N "(cached) $ECHO_C" >&6
18291 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
18292 # for <term.h> if we do not find the variant.
18294 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
18296 case "${cf_cv_ncurses_header:-curses.h}" in
18298 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
18299 cf_header_list="$cf_header_item $cf_header_list"
18303 for cf_header in $cf_header_list
18305 cat >"conftest.$ac_ext" <<_ACEOF
18306 #line 18306 "configure"
18307 #include "confdefs.h"
18309 #include <${cf_cv_ncurses_header:-curses.h}>
18310 #include <${cf_header}>
18319 rm -f "conftest.$ac_objext"
18320 if { (eval echo "$as_me:18320: \"$ac_compile\"") >&5
18321 (eval $ac_compile) 2>&5
18323 echo "$as_me:18323: \$? = $ac_status" >&5
18324 (exit "$ac_status"); } &&
18325 { ac_try='test -s "conftest.$ac_objext"'
18326 { (eval echo "$as_me:18326: \"$ac_try\"") >&5
18327 (eval $ac_try) 2>&5
18329 echo "$as_me:18329: \$? = $ac_status" >&5
18330 (exit "$ac_status"); }; }; then
18331 cf_cv_term_header=$cf_header
18334 echo "$as_me: failed program was:" >&5
18335 cat "conftest.$ac_ext" >&5
18336 cf_cv_term_header=no
18338 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18341 case "$cf_cv_term_header" in
18343 # If curses is ncurses, some packagers still mess it up by trying to make
18344 # us use GNU termcap. This handles the most common case.
18345 for cf_header in ncurses/term.h ncursesw/term.h
18347 cat >"conftest.$ac_ext" <<_ACEOF
18348 #line 18348 "configure"
18349 #include "confdefs.h"
18351 #include <${cf_cv_ncurses_header:-curses.h}>
18352 #ifdef NCURSES_VERSION
18353 #include <${cf_header}>
18365 rm -f "conftest.$ac_objext"
18366 if { (eval echo "$as_me:18366: \"$ac_compile\"") >&5
18367 (eval $ac_compile) 2>&5
18369 echo "$as_me:18369: \$? = $ac_status" >&5
18370 (exit "$ac_status"); } &&
18371 { ac_try='test -s "conftest.$ac_objext"'
18372 { (eval echo "$as_me:18372: \"$ac_try\"") >&5
18373 (eval $ac_try) 2>&5
18375 echo "$as_me:18375: \$? = $ac_status" >&5
18376 (exit "$ac_status"); }; }; then
18377 cf_cv_term_header=$cf_header
18380 echo "$as_me: failed program was:" >&5
18381 cat "conftest.$ac_ext" >&5
18382 cf_cv_term_header=no
18384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18390 echo "$as_me:18390: result: $cf_cv_term_header" >&5
18391 echo "${ECHO_T}$cf_cv_term_header" >&6
18393 case "$cf_cv_term_header" in
18396 cat >>confdefs.h <<\EOF
18397 #define HAVE_TERM_H 1
18403 cat >>confdefs.h <<\EOF
18404 #define HAVE_NCURSES_TERM_H 1
18410 cat >>confdefs.h <<\EOF
18411 #define HAVE_NCURSESW_TERM_H 1
18417 echo "$as_me:18417: checking for unctrl.h" >&5
18418 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
18419 if test "${cf_cv_unctrl_header+set}" = set; then
18420 echo $ECHO_N "(cached) $ECHO_C" >&6
18423 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
18424 # for <unctrl.h> if we do not find the variant.
18426 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
18428 case "${cf_cv_ncurses_header:-curses.h}" in
18430 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
18431 cf_header_list="$cf_header_item $cf_header_list"
18435 for cf_header in $cf_header_list
18437 cat >"conftest.$ac_ext" <<_ACEOF
18438 #line 18438 "configure"
18439 #include "confdefs.h"
18441 #include <${cf_cv_ncurses_header:-curses.h}>
18442 #include <${cf_header}>
18451 rm -f "conftest.$ac_objext"
18452 if { (eval echo "$as_me:18452: \"$ac_compile\"") >&5
18453 (eval $ac_compile) 2>&5
18455 echo "$as_me:18455: \$? = $ac_status" >&5
18456 (exit "$ac_status"); } &&
18457 { ac_try='test -s "conftest.$ac_objext"'
18458 { (eval echo "$as_me:18458: \"$ac_try\"") >&5
18459 (eval $ac_try) 2>&5
18461 echo "$as_me:18461: \$? = $ac_status" >&5
18462 (exit "$ac_status"); }; }; then
18463 cf_cv_unctrl_header=$cf_header
18466 echo "$as_me: failed program was:" >&5
18467 cat "conftest.$ac_ext" >&5
18468 cf_cv_unctrl_header=no
18470 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18474 echo "$as_me:18474: result: $cf_cv_unctrl_header" >&5
18475 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
18477 case "$cf_cv_unctrl_header" in
18479 { echo "$as_me:18479: WARNING: unctrl.h header not found" >&5
18480 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
18484 case "$cf_cv_unctrl_header" in
18487 cat >>confdefs.h <<\EOF
18488 #define HAVE_UNCTRL_H 1
18494 cat >>confdefs.h <<\EOF
18495 #define HAVE_NCURSES_UNCTRL_H 1
18499 (ncursesw/unctrl.h)
18501 cat >>confdefs.h <<\EOF
18502 #define HAVE_NCURSESW_UNCTRL_H 1
18510 assume_default_colors \
18527 init_extended_color \
18535 reset_color_pairs \
18551 use_default_colors \
18553 use_extended_names \
18569 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18571 echo "$as_me:18571: checking for ${cf_func}" >&5
18572 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18574 echo "${as_me:-configure}:18574: testing ${cf_func} ..." 1>&5
18576 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18577 echo $ECHO_N "(cached) $ECHO_C" >&6
18580 eval cf_result='$ac_cv_func_'$cf_func
18581 if test ".$cf_result" != ".no"; then
18582 cat >"conftest.$ac_ext" <<_ACEOF
18583 #line 18583 "configure"
18584 #include "confdefs.h"
18586 #ifdef HAVE_XCURSES
18587 #include <xcurses.h>
18588 char * XCursesProgramName = "test";
18590 #include <${cf_cv_ncurses_header:-curses.h}>
18591 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18592 #include <ncursesw/term.h>
18593 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18594 #include <ncurses/term.h>
18595 #elif defined(HAVE_TERM_H)
18605 long foo = (long)(&${cf_func});
18606 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18607 if (foo + 1234L > 5678L)
18608 ${cf_cv_main_return:-return}(foo != 0);
18615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18616 if { (eval echo "$as_me:18616: \"$ac_link\"") >&5
18617 (eval $ac_link) 2>&5
18619 echo "$as_me:18619: \$? = $ac_status" >&5
18620 (exit "$ac_status"); } &&
18621 { ac_try='test -s "conftest$ac_exeext"'
18622 { (eval echo "$as_me:18622: \"$ac_try\"") >&5
18623 (eval $ac_try) 2>&5
18625 echo "$as_me:18625: \$? = $ac_status" >&5
18626 (exit "$ac_status"); }; }; then
18629 echo "$as_me: failed program was:" >&5
18630 cat "conftest.$ac_ext" >&5
18633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18635 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18639 # use the computed/retrieved cache-value:
18640 eval 'cf_result=$cf_cv_func_'$cf_func
18641 echo "$as_me:18641: result: $cf_result" >&5
18642 echo "${ECHO_T}$cf_result" >&6
18643 if test "$cf_result" != no; then
18644 cat >>confdefs.h <<EOF
18645 #define HAVE_${cf_tr_func} 1
18651 for cf_func in tputs
18654 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18656 echo "$as_me:18656: checking for ${cf_func}" >&5
18657 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
18659 echo "${as_me:-configure}:18659: testing ${cf_func} ..." 1>&5
18661 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
18662 echo $ECHO_N "(cached) $ECHO_C" >&6
18665 eval cf_result='$ac_cv_func_'$cf_func
18666 if test ".$cf_result" != ".no"; then
18667 cat >"conftest.$ac_ext" <<_ACEOF
18668 #line 18668 "configure"
18669 #include "confdefs.h"
18671 #ifdef HAVE_XCURSES
18672 #include <xcurses.h>
18673 char * XCursesProgramName = "test";
18675 #include <${cf_cv_ncurses_header:-curses.h}>
18676 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
18677 #include <ncursesw/term.h>
18678 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
18679 #include <ncurses/term.h>
18680 #elif defined(HAVE_TERM_H)
18690 long foo = (long)(&${cf_func});
18691 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
18692 if (foo + 1234L > 5678L)
18693 ${cf_cv_main_return:-return}(foo != 0);
18700 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18701 if { (eval echo "$as_me:18701: \"$ac_link\"") >&5
18702 (eval $ac_link) 2>&5
18704 echo "$as_me:18704: \$? = $ac_status" >&5
18705 (exit "$ac_status"); } &&
18706 { ac_try='test -s "conftest$ac_exeext"'
18707 { (eval echo "$as_me:18707: \"$ac_try\"") >&5
18708 (eval $ac_try) 2>&5
18710 echo "$as_me:18710: \$? = $ac_status" >&5
18711 (exit "$ac_status"); }; }; then
18714 echo "$as_me: failed program was:" >&5
18715 cat "conftest.$ac_ext" >&5
18718 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18720 eval 'cf_cv_func_'$cf_func'="$cf_result"'
18724 # use the computed/retrieved cache-value:
18725 eval 'cf_result=$cf_cv_func_'$cf_func
18726 echo "$as_me:18726: result: $cf_result" >&5
18727 echo "${ECHO_T}$cf_result" >&6
18728 if test "$cf_result" != no; then
18729 cat >>confdefs.h <<EOF
18730 #define HAVE_${cf_tr_func} 1
18736 if test "x$cf_cv_func_tputs" = xyes
18739 for cf_arg in int char
18741 for cf_ret in int void
18743 if test "$cf_ret" = void
18745 cf_return="/* nothing */"
18747 cf_return="return value"
18749 cat >"conftest.$ac_ext" <<_ACEOF
18750 #line 18750 "configure"
18751 #include "confdefs.h"
18753 #include <${cf_cv_ncurses_header:-curses.h}>
18754 #include <$cf_cv_term_header>
18756 static $cf_ret outc($cf_arg value) { $cf_return; }
18762 tputs("hello", 0, outc);
18763 ${cf_cv_main_return:-return}(0);
18769 rm -f "conftest.$ac_objext"
18770 if { (eval echo "$as_me:18770: \"$ac_compile\"") >&5
18771 (eval $ac_compile) 2>&5
18773 echo "$as_me:18773: \$? = $ac_status" >&5
18774 (exit "$ac_status"); } &&
18775 { ac_try='test -s "conftest.$ac_objext"'
18776 { (eval echo "$as_me:18776: \"$ac_try\"") >&5
18777 (eval $ac_try) 2>&5
18779 echo "$as_me:18779: \$? = $ac_status" >&5
18780 (exit "$ac_status"); }; }; then
18782 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
18784 echo "${as_me:-configure}:18784: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
18786 cat >>confdefs.h <<EOF
18787 #define TPUTS_ARG $cf_arg
18788 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
18789 #define TPUTS_RETURN(value) $cf_return
18795 echo "$as_me: failed program was:" >&5
18796 cat "conftest.$ac_ext" >&5
18798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18800 test "$cf_done" = yes && break
18804 echo "$as_me:18804: checking for ncurses extended functions" >&5
18805 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
18806 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
18807 echo $ECHO_N "(cached) $ECHO_C" >&6
18810 cat >"conftest.$ac_ext" <<_ACEOF
18811 #line 18811 "configure"
18812 #include "confdefs.h"
18814 #include <${cf_cv_ncurses_header:-curses.h}>
18819 int x = NCURSES_EXT_FUNCS
18825 rm -f "conftest.$ac_objext"
18826 if { (eval echo "$as_me:18826: \"$ac_compile\"") >&5
18827 (eval $ac_compile) 2>&5
18829 echo "$as_me:18829: \$? = $ac_status" >&5
18830 (exit "$ac_status"); } &&
18831 { ac_try='test -s "conftest.$ac_objext"'
18832 { (eval echo "$as_me:18832: \"$ac_try\"") >&5
18833 (eval $ac_try) 2>&5
18835 echo "$as_me:18835: \$? = $ac_status" >&5
18836 (exit "$ac_status"); }; }; then
18837 cf_cv_ncurses_ext_funcs=defined
18839 echo "$as_me: failed program was:" >&5
18840 cat "conftest.$ac_ext" >&5
18842 cat >"conftest.$ac_ext" <<_ACEOF
18843 #line 18843 "configure"
18844 #include "confdefs.h"
18846 #include <${cf_cv_ncurses_header:-curses.h}>
18851 (void) assume_default_colors (0, 0);
18852 (void) curses_version ();
18853 (void) define_key (0, 0);
18854 (void) is_term_resized (0, 0);
18855 (void) key_defined (0);
18856 (void) keybound (0, 0);
18857 (void) keyok (0, 0);
18858 (void) resize_term (0, 0);
18859 (void) resizeterm (0, 0);
18860 (void) use_default_colors ();
18861 (void) use_extended_names (0);
18862 (void) wresize (0, 0, 0);
18867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18868 if { (eval echo "$as_me:18868: \"$ac_link\"") >&5
18869 (eval $ac_link) 2>&5
18871 echo "$as_me:18871: \$? = $ac_status" >&5
18872 (exit "$ac_status"); } &&
18873 { ac_try='test -s "conftest$ac_exeext"'
18874 { (eval echo "$as_me:18874: \"$ac_try\"") >&5
18875 (eval $ac_try) 2>&5
18877 echo "$as_me:18877: \$? = $ac_status" >&5
18878 (exit "$ac_status"); }; }; then
18879 cf_cv_ncurses_ext_funcs=yes
18881 echo "$as_me: failed program was:" >&5
18882 cat "conftest.$ac_ext" >&5
18883 cf_cv_ncurses_ext_funcs=no
18885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18891 echo "$as_me:18891: result: $cf_cv_ncurses_ext_funcs" >&5
18892 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
18893 test "$cf_cv_ncurses_ext_funcs" = yes &&
18894 cat >>confdefs.h <<\EOF
18895 #define NCURSES_EXT_FUNCS 1
18898 if test "$cf_enable_widec" = yes
18900 # workaround for systems with ncurses before 20111029, due to change of
18901 # feature test macro from _XPG5 to _XOPEN_SOURCE
18902 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
18905 echo "$as_me:18905: checking if _XPG5 should be defined to enable wide-characters" >&5
18906 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
18908 cat >"conftest.$ac_ext" <<_ACEOF
18909 #line 18909 "configure"
18910 #include "confdefs.h"
18912 #include <${cf_cv_ncurses_header:-curses.h}>
18921 rm -f "conftest.$ac_objext"
18922 if { (eval echo "$as_me:18922: \"$ac_compile\"") >&5
18923 (eval $ac_compile) 2>&5
18925 echo "$as_me:18925: \$? = $ac_status" >&5
18926 (exit "$ac_status"); } &&
18927 { ac_try='test -s "conftest.$ac_objext"'
18928 { (eval echo "$as_me:18928: \"$ac_try\"") >&5
18929 (eval $ac_try) 2>&5
18931 echo "$as_me:18931: \$? = $ac_status" >&5
18932 (exit "$ac_status"); }; }; then
18935 echo "$as_me: failed program was:" >&5
18936 cat "conftest.$ac_ext" >&5
18937 cf_save_cppflags="$CPPFLAGS"
18938 CPPFLAGS="$CPPFLAGS -D_XPG5"
18939 cat >"conftest.$ac_ext" <<_ACEOF
18940 #line 18940 "configure"
18941 #include "confdefs.h"
18943 #include <${cf_cv_ncurses_header:-curses.h}>
18952 rm -f "conftest.$ac_objext"
18953 if { (eval echo "$as_me:18953: \"$ac_compile\"") >&5
18954 (eval $ac_compile) 2>&5
18956 echo "$as_me:18956: \$? = $ac_status" >&5
18957 (exit "$ac_status"); } &&
18958 { ac_try='test -s "conftest.$ac_objext"'
18959 { (eval echo "$as_me:18959: \"$ac_try\"") >&5
18960 (eval $ac_try) 2>&5
18962 echo "$as_me:18962: \$? = $ac_status" >&5
18963 (exit "$ac_status"); }; }; then
18966 echo "$as_me: failed program was:" >&5
18967 cat "conftest.$ac_ext" >&5
18969 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18970 CPPFLAGS="$cf_save_cppflags"
18972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18973 echo "$as_me:18973: result: $cf_define_xpg5" >&5
18974 echo "${ECHO_T}$cf_define_xpg5" >&6
18976 if test "$cf_define_xpg5" = yes
18978 CPPFLAGS="$CPPFLAGS -D_XPG5"
18982 echo "$as_me:18982: checking for wide-character functions" >&5
18983 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
18984 if test "${cf_cv_widechar_funcs+set}" = set; then
18985 echo $ECHO_N "(cached) $ECHO_C" >&6
18988 cat >"conftest.$ac_ext" <<_ACEOF
18989 #line 18989 "configure"
18990 #include "confdefs.h"
18992 #include <${cf_cv_ncurses_header:-curses.h}>
18997 static wchar_t src_wchar[2];
18998 static cchar_t dst_cchar;
18999 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19006 if { (eval echo "$as_me:19006: \"$ac_link\"") >&5
19007 (eval $ac_link) 2>&5
19009 echo "$as_me:19009: \$? = $ac_status" >&5
19010 (exit "$ac_status"); } &&
19011 { ac_try='test -s "conftest$ac_exeext"'
19012 { (eval echo "$as_me:19012: \"$ac_try\"") >&5
19013 (eval $ac_try) 2>&5
19015 echo "$as_me:19015: \$? = $ac_status" >&5
19016 (exit "$ac_status"); }; }; then
19017 cf_cv_widechar_funcs=yes
19019 echo "$as_me: failed program was:" >&5
19020 cat "conftest.$ac_ext" >&5
19021 cf_cv_widechar_funcs=no
19023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19026 echo "$as_me:19026: result: $cf_cv_widechar_funcs" >&5
19027 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19028 if test "$cf_cv_widechar_funcs" != no ; then
19030 cat >>confdefs.h <<\EOF
19031 #define USE_WIDEC_SUPPORT 1
19035 cat >>confdefs.h <<\EOF
19036 #define USE_WIDEC_SUPPORT 0
19041 cat >>confdefs.h <<\EOF
19042 #define USE_WIDEC_SUPPORT 0
19047 echo "$as_me:19047: checking if $cf_cv_screen library uses pthreads" >&5
19048 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19049 if test "${cf_cv_use_pthreads+set}" = set; then
19050 echo $ECHO_N "(cached) $ECHO_C" >&6
19053 cat >"conftest.$ac_ext" <<_ACEOF
19054 #line 19054 "configure"
19055 #include "confdefs.h"
19057 #include <${cf_cv_ncurses_header:-curses.h}>
19058 extern void _nc_init_pthreads(void);
19065 _nc_init_pthreads();
19071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19072 if { (eval echo "$as_me:19072: \"$ac_link\"") >&5
19073 (eval $ac_link) 2>&5
19075 echo "$as_me:19075: \$? = $ac_status" >&5
19076 (exit "$ac_status"); } &&
19077 { ac_try='test -s "conftest$ac_exeext"'
19078 { (eval echo "$as_me:19078: \"$ac_try\"") >&5
19079 (eval $ac_try) 2>&5
19081 echo "$as_me:19081: \$? = $ac_status" >&5
19082 (exit "$ac_status"); }; }; then
19083 cf_cv_use_pthreads=yes
19085 echo "$as_me: failed program was:" >&5
19086 cat "conftest.$ac_ext" >&5
19087 cf_cv_use_pthreads=no
19089 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19092 echo "$as_me:19092: result: $cf_cv_use_pthreads" >&5
19093 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19094 test $cf_cv_use_pthreads = yes &&
19095 cat >>confdefs.h <<\EOF
19096 #define USE_PTHREADS 1
19099 echo "$as_me:19099: checking if sys/time.h works with sys/select.h" >&5
19100 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19101 if test "${cf_cv_sys_time_select+set}" = set; then
19102 echo $ECHO_N "(cached) $ECHO_C" >&6
19105 cat >"conftest.$ac_ext" <<_ACEOF
19106 #line 19106 "configure"
19107 #include "confdefs.h"
19109 #include <sys/types.h>
19110 #ifdef HAVE_SYS_TIME_H
19111 #include <sys/time.h>
19113 #ifdef HAVE_SYS_SELECT_H
19114 #include <sys/select.h>
19125 rm -f "conftest.$ac_objext"
19126 if { (eval echo "$as_me:19126: \"$ac_compile\"") >&5
19127 (eval $ac_compile) 2>&5
19129 echo "$as_me:19129: \$? = $ac_status" >&5
19130 (exit "$ac_status"); } &&
19131 { ac_try='test -s "conftest.$ac_objext"'
19132 { (eval echo "$as_me:19132: \"$ac_try\"") >&5
19133 (eval $ac_try) 2>&5
19135 echo "$as_me:19135: \$? = $ac_status" >&5
19136 (exit "$ac_status"); }; }; then
19137 cf_cv_sys_time_select=yes
19139 echo "$as_me: failed program was:" >&5
19140 cat "conftest.$ac_ext" >&5
19141 cf_cv_sys_time_select=no
19143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19147 echo "$as_me:19147: result: $cf_cv_sys_time_select" >&5
19148 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19149 test "$cf_cv_sys_time_select" = yes &&
19150 cat >>confdefs.h <<\EOF
19151 #define HAVE_SYS_TIME_SELECT 1
19154 # special check for test/ditto.c
19156 echo "$as_me:19156: checking for openpty in -lutil" >&5
19157 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19158 if test "${ac_cv_lib_util_openpty+set}" = set; then
19159 echo $ECHO_N "(cached) $ECHO_C" >&6
19161 ac_check_lib_save_LIBS=$LIBS
19162 LIBS="-lutil $LIBS"
19163 cat >"conftest.$ac_ext" <<_ACEOF
19164 #line 19164 "configure"
19165 #include "confdefs.h"
19167 /* Override any gcc2 internal prototype to avoid an error. */
19171 /* We use char because int might match the return type of a gcc2
19172 builtin and then its argument prototype would still apply. */
19182 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19183 if { (eval echo "$as_me:19183: \"$ac_link\"") >&5
19184 (eval $ac_link) 2>&5
19186 echo "$as_me:19186: \$? = $ac_status" >&5
19187 (exit "$ac_status"); } &&
19188 { ac_try='test -s "conftest$ac_exeext"'
19189 { (eval echo "$as_me:19189: \"$ac_try\"") >&5
19190 (eval $ac_try) 2>&5
19192 echo "$as_me:19192: \$? = $ac_status" >&5
19193 (exit "$ac_status"); }; }; then
19194 ac_cv_lib_util_openpty=yes
19196 echo "$as_me: failed program was:" >&5
19197 cat "conftest.$ac_ext" >&5
19198 ac_cv_lib_util_openpty=no
19200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19201 LIBS=$ac_check_lib_save_LIBS
19203 echo "$as_me:19203: result: $ac_cv_lib_util_openpty" >&5
19204 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19205 if test "$ac_cv_lib_util_openpty" = yes; then
19211 echo "$as_me:19211: checking for openpty header" >&5
19212 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19213 if test "${cf_cv_func_openpty+set}" = set; then
19214 echo $ECHO_N "(cached) $ECHO_C" >&6
19217 cf_save_LIBS="$LIBS"
19218 test "$cf_cv_lib_util" = yes && {
19219 cf_add_libs="$LIBS"
19222 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19223 # filter duplicates
19224 for cf_add_1lib in $cf_add_0lib; do
19225 for cf_add_2lib in $cf_add_libs; do
19226 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19231 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19233 LIBS="$cf_add_libs"
19235 for cf_header in pty.h libutil.h util.h
19237 cat >"conftest.$ac_ext" <<_ACEOF
19238 #line 19238 "configure"
19239 #include "confdefs.h"
19241 #include <$cf_header>
19247 int x = openpty((int *)0, (int *)0, (char *)0,
19248 (struct termios *)0, (struct winsize *)0);
19254 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19255 if { (eval echo "$as_me:19255: \"$ac_link\"") >&5
19256 (eval $ac_link) 2>&5
19258 echo "$as_me:19258: \$? = $ac_status" >&5
19259 (exit "$ac_status"); } &&
19260 { ac_try='test -s "conftest$ac_exeext"'
19261 { (eval echo "$as_me:19261: \"$ac_try\"") >&5
19262 (eval $ac_try) 2>&5
19264 echo "$as_me:19264: \$? = $ac_status" >&5
19265 (exit "$ac_status"); }; }; then
19267 cf_cv_func_openpty=$cf_header
19271 echo "$as_me: failed program was:" >&5
19272 cat "conftest.$ac_ext" >&5
19274 cf_cv_func_openpty=no
19277 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19279 LIBS="$cf_save_LIBS"
19282 echo "$as_me:19282: result: $cf_cv_func_openpty" >&5
19283 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19285 if test "$cf_cv_func_openpty" != no ; then
19287 cat >>confdefs.h <<EOF
19288 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19291 cat >>confdefs.h <<\EOF
19292 #define USE_XTERM_PTY 1
19295 if test "x$cf_cv_lib_util" = xyes ; then
19297 cf_add_libs="$TEST_LIBS"
19300 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19301 # filter duplicates
19302 for cf_add_1lib in $cf_add_0lib; do
19303 for cf_add_2lib in $cf_add_libs; do
19304 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19309 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19311 TEST_LIBS="$cf_add_libs"
19316 echo "$as_me:19316: checking for function curses_version" >&5
19317 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
19318 if test "${cf_cv_func_curses_version+set}" = set; then
19319 echo $ECHO_N "(cached) $ECHO_C" >&6
19322 if test "$cross_compiling" = yes; then
19323 cf_cv_func_curses_version=unknown
19325 cat >"conftest.$ac_ext" <<_ACEOF
19326 #line 19326 "configure"
19327 #include "confdefs.h"
19329 #include <${cf_cv_ncurses_header:-curses.h}>
19333 sprintf(temp, "%s\\n", curses_version());
19334 ${cf_cv_main_return:-return}(0);
19338 rm -f "conftest$ac_exeext"
19339 if { (eval echo "$as_me:19339: \"$ac_link\"") >&5
19340 (eval $ac_link) 2>&5
19342 echo "$as_me:19342: \$? = $ac_status" >&5
19343 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19344 { (eval echo "$as_me:19344: \"$ac_try\"") >&5
19345 (eval $ac_try) 2>&5
19347 echo "$as_me:19347: \$? = $ac_status" >&5
19348 (exit "$ac_status"); }; }; then
19349 cf_cv_func_curses_version=yes
19352 echo "$as_me: program exited with status $ac_status" >&5
19353 echo "$as_me: failed program was:" >&5
19354 cat "conftest.$ac_ext" >&5
19355 cf_cv_func_curses_version=no
19358 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19362 echo "$as_me:19362: result: $cf_cv_func_curses_version" >&5
19363 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
19364 test "$cf_cv_func_curses_version" = yes &&
19365 cat >>confdefs.h <<\EOF
19366 #define HAVE_CURSES_VERSION 1
19369 echo "$as_me:19369: checking for alternate character set array" >&5
19370 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
19371 if test "${cf_cv_curses_acs_map+set}" = set; then
19372 echo $ECHO_N "(cached) $ECHO_C" >&6
19375 cf_cv_curses_acs_map=unknown
19376 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
19378 cat >"conftest.$ac_ext" <<_ACEOF
19379 #line 19379 "configure"
19380 #include "confdefs.h"
19382 #include <${cf_cv_ncurses_header:-curses.h}>
19388 ${name}['k'] = ACS_PLUS
19394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19395 if { (eval echo "$as_me:19395: \"$ac_link\"") >&5
19396 (eval $ac_link) 2>&5
19398 echo "$as_me:19398: \$? = $ac_status" >&5
19399 (exit "$ac_status"); } &&
19400 { ac_try='test -s "conftest$ac_exeext"'
19401 { (eval echo "$as_me:19401: \"$ac_try\"") >&5
19402 (eval $ac_try) 2>&5
19404 echo "$as_me:19404: \$? = $ac_status" >&5
19405 (exit "$ac_status"); }; }; then
19406 cf_cv_curses_acs_map=$name; break
19408 echo "$as_me: failed program was:" >&5
19409 cat "conftest.$ac_ext" >&5
19411 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19415 echo "$as_me:19415: result: $cf_cv_curses_acs_map" >&5
19416 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
19418 test "$cf_cv_curses_acs_map" != unknown &&
19419 cat >>confdefs.h <<EOF
19420 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
19423 if test "$cf_enable_widec" = yes; then
19425 echo "$as_me:19425: checking for wide alternate character set array" >&5
19426 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
19427 if test "${cf_cv_curses_wacs_map+set}" = set; then
19428 echo $ECHO_N "(cached) $ECHO_C" >&6
19431 cf_cv_curses_wacs_map=unknown
19432 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
19434 cat >"conftest.$ac_ext" <<_ACEOF
19435 #line 19435 "configure"
19436 #include "confdefs.h"
19438 #ifndef _XOPEN_SOURCE_EXTENDED
19439 #define _XOPEN_SOURCE_EXTENDED
19441 #include <${cf_cv_ncurses_header:-curses.h}>
19445 void *foo = &(${name}['k']); (void)foo
19450 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19451 if { (eval echo "$as_me:19451: \"$ac_link\"") >&5
19452 (eval $ac_link) 2>&5
19454 echo "$as_me:19454: \$? = $ac_status" >&5
19455 (exit "$ac_status"); } &&
19456 { ac_try='test -s "conftest$ac_exeext"'
19457 { (eval echo "$as_me:19457: \"$ac_try\"") >&5
19458 (eval $ac_try) 2>&5
19460 echo "$as_me:19460: \$? = $ac_status" >&5
19461 (exit "$ac_status"); }; }; then
19462 cf_cv_curses_wacs_map=$name
19465 echo "$as_me: failed program was:" >&5
19466 cat "conftest.$ac_ext" >&5
19468 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19471 echo "$as_me:19471: result: $cf_cv_curses_wacs_map" >&5
19472 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
19474 test "$cf_cv_curses_wacs_map" != unknown &&
19475 cat >>confdefs.h <<EOF
19476 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
19479 echo "$as_me:19479: checking for wide alternate character constants" >&5
19480 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
19481 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
19482 echo $ECHO_N "(cached) $ECHO_C" >&6
19485 cf_cv_curses_wacs_symbols=no
19486 if test "$cf_cv_curses_wacs_map" != unknown
19488 cat >"conftest.$ac_ext" <<_ACEOF
19489 #line 19489 "configure"
19490 #include "confdefs.h"
19492 #ifndef _XOPEN_SOURCE_EXTENDED
19493 #define _XOPEN_SOURCE_EXTENDED
19495 #include <${cf_cv_ncurses_header:-curses.h}>
19499 cchar_t *foo = WACS_PLUS;
19500 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
19505 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19506 if { (eval echo "$as_me:19506: \"$ac_link\"") >&5
19507 (eval $ac_link) 2>&5
19509 echo "$as_me:19509: \$? = $ac_status" >&5
19510 (exit "$ac_status"); } &&
19511 { ac_try='test -s "conftest$ac_exeext"'
19512 { (eval echo "$as_me:19512: \"$ac_try\"") >&5
19513 (eval $ac_try) 2>&5
19515 echo "$as_me:19515: \$? = $ac_status" >&5
19516 (exit "$ac_status"); }; }; then
19517 cf_cv_curses_wacs_symbols=yes
19519 echo "$as_me: failed program was:" >&5
19520 cat "conftest.$ac_ext" >&5
19522 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19524 cat >"conftest.$ac_ext" <<_ACEOF
19525 #line 19525 "configure"
19526 #include "confdefs.h"
19528 #ifndef _XOPEN_SOURCE_EXTENDED
19529 #define _XOPEN_SOURCE_EXTENDED
19531 #include <${cf_cv_ncurses_header:-curses.h}>
19535 cchar_t *foo = WACS_PLUS; (void)foo
19540 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19541 if { (eval echo "$as_me:19541: \"$ac_link\"") >&5
19542 (eval $ac_link) 2>&5
19544 echo "$as_me:19544: \$? = $ac_status" >&5
19545 (exit "$ac_status"); } &&
19546 { ac_try='test -s "conftest$ac_exeext"'
19547 { (eval echo "$as_me:19547: \"$ac_try\"") >&5
19548 (eval $ac_try) 2>&5
19550 echo "$as_me:19550: \$? = $ac_status" >&5
19551 (exit "$ac_status"); }; }; then
19552 cf_cv_curses_wacs_symbols=yes
19554 echo "$as_me: failed program was:" >&5
19555 cat "conftest.$ac_ext" >&5
19557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19561 echo "$as_me:19561: result: $cf_cv_curses_wacs_symbols" >&5
19562 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
19564 test "$cf_cv_curses_wacs_symbols" != no &&
19565 cat >>confdefs.h <<\EOF
19566 #define CURSES_WACS_SYMBOLS 1
19571 echo "$as_me:19571: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19572 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19573 cat >"conftest.$ac_ext" <<_ACEOF
19574 #line 19574 "configure"
19575 #include "confdefs.h"
19577 #ifndef _XOPEN_SOURCE_EXTENDED
19578 #define _XOPEN_SOURCE_EXTENDED
19580 #include <${cf_cv_ncurses_header:-curses.h}>
19591 rm -f "conftest.$ac_objext"
19592 if { (eval echo "$as_me:19592: \"$ac_compile\"") >&5
19593 (eval $ac_compile) 2>&5
19595 echo "$as_me:19595: \$? = $ac_status" >&5
19596 (exit "$ac_status"); } &&
19597 { ac_try='test -s "conftest.$ac_objext"'
19598 { (eval echo "$as_me:19598: \"$ac_try\"") >&5
19599 (eval $ac_try) 2>&5
19601 echo "$as_me:19601: \$? = $ac_status" >&5
19602 (exit "$ac_status"); }; }; then
19605 echo "$as_me: failed program was:" >&5
19606 cat "conftest.$ac_ext" >&5
19609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19610 echo "$as_me:19610: result: $cf_result" >&5
19611 echo "${ECHO_T}$cf_result" >&6
19612 if test "$cf_result" = yes ; then
19614 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19616 cat >>confdefs.h <<EOF
19617 #define $cf_result 1
19622 cat >>confdefs.h <<EOF
19623 #define attr_t long
19628 if test "$cf_enable_widec" = yes; then
19630 # This is needed on Tru64 5.0 to declare mbstate_t
19631 echo "$as_me:19631: checking if we must include wchar.h to declare mbstate_t" >&5
19632 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
19633 if test "${cf_cv_mbstate_t+set}" = set; then
19634 echo $ECHO_N "(cached) $ECHO_C" >&6
19637 cat >"conftest.$ac_ext" <<_ACEOF
19638 #line 19638 "configure"
19639 #include "confdefs.h"
19641 #include <stdlib.h>
19642 #include <stdarg.h>
19644 #ifdef HAVE_LIBUTF8_H
19645 #include <libutf8.h>
19655 rm -f "conftest.$ac_objext"
19656 if { (eval echo "$as_me:19656: \"$ac_compile\"") >&5
19657 (eval $ac_compile) 2>&5
19659 echo "$as_me:19659: \$? = $ac_status" >&5
19660 (exit "$ac_status"); } &&
19661 { ac_try='test -s "conftest.$ac_objext"'
19662 { (eval echo "$as_me:19662: \"$ac_try\"") >&5
19663 (eval $ac_try) 2>&5
19665 echo "$as_me:19665: \$? = $ac_status" >&5
19666 (exit "$ac_status"); }; }; then
19669 echo "$as_me: failed program was:" >&5
19670 cat "conftest.$ac_ext" >&5
19671 cat >"conftest.$ac_ext" <<_ACEOF
19672 #line 19672 "configure"
19673 #include "confdefs.h"
19675 #include <stdlib.h>
19676 #include <stdarg.h>
19679 #ifdef HAVE_LIBUTF8_H
19680 #include <libutf8.h>
19690 rm -f "conftest.$ac_objext"
19691 if { (eval echo "$as_me:19691: \"$ac_compile\"") >&5
19692 (eval $ac_compile) 2>&5
19694 echo "$as_me:19694: \$? = $ac_status" >&5
19695 (exit "$ac_status"); } &&
19696 { ac_try='test -s "conftest.$ac_objext"'
19697 { (eval echo "$as_me:19697: \"$ac_try\"") >&5
19698 (eval $ac_try) 2>&5
19700 echo "$as_me:19700: \$? = $ac_status" >&5
19701 (exit "$ac_status"); }; }; then
19702 cf_cv_mbstate_t=yes
19704 echo "$as_me: failed program was:" >&5
19705 cat "conftest.$ac_ext" >&5
19706 cf_cv_mbstate_t=unknown
19708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19710 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19712 echo "$as_me:19712: result: $cf_cv_mbstate_t" >&5
19713 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
19715 if test "$cf_cv_mbstate_t" = yes ; then
19717 cat >>confdefs.h <<\EOF
19718 #define NEED_WCHAR_H 1
19724 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
19725 if test "$cf_cv_mbstate_t" = unknown ; then
19726 NCURSES_MBSTATE_T=1
19729 # if we find mbstate_t in either place, use substitution to provide a fallback.
19730 if test "$cf_cv_mbstate_t" != unknown ; then
19731 NCURSES_OK_MBSTATE_T=1
19734 # This is needed on Tru64 5.0 to declare wchar_t
19735 echo "$as_me:19735: checking if we must include wchar.h to declare wchar_t" >&5
19736 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
19737 if test "${cf_cv_wchar_t+set}" = set; then
19738 echo $ECHO_N "(cached) $ECHO_C" >&6
19741 cat >"conftest.$ac_ext" <<_ACEOF
19742 #line 19742 "configure"
19743 #include "confdefs.h"
19745 #include <stdlib.h>
19746 #include <stdarg.h>
19748 #ifdef HAVE_LIBUTF8_H
19749 #include <libutf8.h>
19759 rm -f "conftest.$ac_objext"
19760 if { (eval echo "$as_me:19760: \"$ac_compile\"") >&5
19761 (eval $ac_compile) 2>&5
19763 echo "$as_me:19763: \$? = $ac_status" >&5
19764 (exit "$ac_status"); } &&
19765 { ac_try='test -s "conftest.$ac_objext"'
19766 { (eval echo "$as_me:19766: \"$ac_try\"") >&5
19767 (eval $ac_try) 2>&5
19769 echo "$as_me:19769: \$? = $ac_status" >&5
19770 (exit "$ac_status"); }; }; then
19773 echo "$as_me: failed program was:" >&5
19774 cat "conftest.$ac_ext" >&5
19775 cat >"conftest.$ac_ext" <<_ACEOF
19776 #line 19776 "configure"
19777 #include "confdefs.h"
19779 #include <stdlib.h>
19780 #include <stdarg.h>
19783 #ifdef HAVE_LIBUTF8_H
19784 #include <libutf8.h>
19794 rm -f "conftest.$ac_objext"
19795 if { (eval echo "$as_me:19795: \"$ac_compile\"") >&5
19796 (eval $ac_compile) 2>&5
19798 echo "$as_me:19798: \$? = $ac_status" >&5
19799 (exit "$ac_status"); } &&
19800 { ac_try='test -s "conftest.$ac_objext"'
19801 { (eval echo "$as_me:19801: \"$ac_try\"") >&5
19802 (eval $ac_try) 2>&5
19804 echo "$as_me:19804: \$? = $ac_status" >&5
19805 (exit "$ac_status"); }; }; then
19808 echo "$as_me: failed program was:" >&5
19809 cat "conftest.$ac_ext" >&5
19810 cf_cv_wchar_t=unknown
19812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19814 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19816 echo "$as_me:19816: result: $cf_cv_wchar_t" >&5
19817 echo "${ECHO_T}$cf_cv_wchar_t" >&6
19819 if test "$cf_cv_wchar_t" = yes ; then
19821 cat >>confdefs.h <<\EOF
19822 #define NEED_WCHAR_H 1
19828 # if we do not find wchar_t in either place, use substitution to provide a fallback.
19829 if test "$cf_cv_wchar_t" = unknown ; then
19833 # if we find wchar_t in either place, use substitution to provide a fallback.
19834 if test "$cf_cv_wchar_t" != unknown ; then
19835 NCURSES_OK_WCHAR_T=1
19838 # This is needed on Tru64 5.0 to declare wint_t
19839 echo "$as_me:19839: checking if we must include wchar.h to declare wint_t" >&5
19840 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
19841 if test "${cf_cv_wint_t+set}" = set; then
19842 echo $ECHO_N "(cached) $ECHO_C" >&6
19845 cat >"conftest.$ac_ext" <<_ACEOF
19846 #line 19846 "configure"
19847 #include "confdefs.h"
19849 #include <stdlib.h>
19850 #include <stdarg.h>
19852 #ifdef HAVE_LIBUTF8_H
19853 #include <libutf8.h>
19863 rm -f "conftest.$ac_objext"
19864 if { (eval echo "$as_me:19864: \"$ac_compile\"") >&5
19865 (eval $ac_compile) 2>&5
19867 echo "$as_me:19867: \$? = $ac_status" >&5
19868 (exit "$ac_status"); } &&
19869 { ac_try='test -s "conftest.$ac_objext"'
19870 { (eval echo "$as_me:19870: \"$ac_try\"") >&5
19871 (eval $ac_try) 2>&5
19873 echo "$as_me:19873: \$? = $ac_status" >&5
19874 (exit "$ac_status"); }; }; then
19877 echo "$as_me: failed program was:" >&5
19878 cat "conftest.$ac_ext" >&5
19879 cat >"conftest.$ac_ext" <<_ACEOF
19880 #line 19880 "configure"
19881 #include "confdefs.h"
19883 #include <stdlib.h>
19884 #include <stdarg.h>
19887 #ifdef HAVE_LIBUTF8_H
19888 #include <libutf8.h>
19898 rm -f "conftest.$ac_objext"
19899 if { (eval echo "$as_me:19899: \"$ac_compile\"") >&5
19900 (eval $ac_compile) 2>&5
19902 echo "$as_me:19902: \$? = $ac_status" >&5
19903 (exit "$ac_status"); } &&
19904 { ac_try='test -s "conftest.$ac_objext"'
19905 { (eval echo "$as_me:19905: \"$ac_try\"") >&5
19906 (eval $ac_try) 2>&5
19908 echo "$as_me:19908: \$? = $ac_status" >&5
19909 (exit "$ac_status"); }; }; then
19912 echo "$as_me: failed program was:" >&5
19913 cat "conftest.$ac_ext" >&5
19914 cf_cv_wint_t=unknown
19916 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19920 echo "$as_me:19920: result: $cf_cv_wint_t" >&5
19921 echo "${ECHO_T}$cf_cv_wint_t" >&6
19923 if test "$cf_cv_wint_t" = yes ; then
19925 cat >>confdefs.h <<\EOF
19926 #define NEED_WCHAR_H 1
19932 # if we do not find wint_t in either place, use substitution to provide a fallback.
19933 if test "$cf_cv_wint_t" = unknown ; then
19937 # if we find wint_t in either place, use substitution to provide a fallback.
19938 if test "$cf_cv_wint_t" != unknown ; then
19939 NCURSES_OK_WINT_T=1
19942 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
19944 echo "$as_me:19944: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
19945 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
19946 cat >"conftest.$ac_ext" <<_ACEOF
19947 #line 19947 "configure"
19948 #include "confdefs.h"
19950 #ifndef _XOPEN_SOURCE_EXTENDED
19951 #define _XOPEN_SOURCE_EXTENDED
19953 #include <${cf_cv_ncurses_header:-curses.h}>
19964 rm -f "conftest.$ac_objext"
19965 if { (eval echo "$as_me:19965: \"$ac_compile\"") >&5
19966 (eval $ac_compile) 2>&5
19968 echo "$as_me:19968: \$? = $ac_status" >&5
19969 (exit "$ac_status"); } &&
19970 { ac_try='test -s "conftest.$ac_objext"'
19971 { (eval echo "$as_me:19971: \"$ac_try\"") >&5
19972 (eval $ac_try) 2>&5
19974 echo "$as_me:19974: \$? = $ac_status" >&5
19975 (exit "$ac_status"); }; }; then
19978 echo "$as_me: failed program was:" >&5
19979 cat "conftest.$ac_ext" >&5
19982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19983 echo "$as_me:19983: result: $cf_result" >&5
19984 echo "${ECHO_T}$cf_result" >&6
19985 if test "$cf_result" = yes ; then
19987 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19989 cat >>confdefs.h <<EOF
19990 #define $cf_result 1
19995 cat >>confdefs.h <<EOF
19996 #define mbstate_t long
20003 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20005 echo "$as_me:20005: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20006 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20007 cat >"conftest.$ac_ext" <<_ACEOF
20008 #line 20008 "configure"
20009 #include "confdefs.h"
20011 #ifndef _XOPEN_SOURCE_EXTENDED
20012 #define _XOPEN_SOURCE_EXTENDED
20014 #include <${cf_cv_ncurses_header:-curses.h}>
20025 rm -f "conftest.$ac_objext"
20026 if { (eval echo "$as_me:20026: \"$ac_compile\"") >&5
20027 (eval $ac_compile) 2>&5
20029 echo "$as_me:20029: \$? = $ac_status" >&5
20030 (exit "$ac_status"); } &&
20031 { ac_try='test -s "conftest.$ac_objext"'
20032 { (eval echo "$as_me:20032: \"$ac_try\"") >&5
20033 (eval $ac_try) 2>&5
20035 echo "$as_me:20035: \$? = $ac_status" >&5
20036 (exit "$ac_status"); }; }; then
20039 echo "$as_me: failed program was:" >&5
20040 cat "conftest.$ac_ext" >&5
20043 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20044 echo "$as_me:20044: result: $cf_result" >&5
20045 echo "${ECHO_T}$cf_result" >&6
20046 if test "$cf_result" = yes ; then
20048 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20050 cat >>confdefs.h <<EOF
20051 #define $cf_result 1
20056 cat >>confdefs.h <<EOF
20057 #define wchar_t long
20064 if test "$NCURSES_OK_WINT_T" = 0 ; then
20066 echo "$as_me:20066: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20067 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20068 cat >"conftest.$ac_ext" <<_ACEOF
20069 #line 20069 "configure"
20070 #include "confdefs.h"
20072 #ifndef _XOPEN_SOURCE_EXTENDED
20073 #define _XOPEN_SOURCE_EXTENDED
20075 #include <${cf_cv_ncurses_header:-curses.h}>
20086 rm -f "conftest.$ac_objext"
20087 if { (eval echo "$as_me:20087: \"$ac_compile\"") >&5
20088 (eval $ac_compile) 2>&5
20090 echo "$as_me:20090: \$? = $ac_status" >&5
20091 (exit "$ac_status"); } &&
20092 { ac_try='test -s "conftest.$ac_objext"'
20093 { (eval echo "$as_me:20093: \"$ac_try\"") >&5
20094 (eval $ac_try) 2>&5
20096 echo "$as_me:20096: \$? = $ac_status" >&5
20097 (exit "$ac_status"); }; }; then
20100 echo "$as_me: failed program was:" >&5
20101 cat "conftest.$ac_ext" >&5
20104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20105 echo "$as_me:20105: result: $cf_result" >&5
20106 echo "${ECHO_T}$cf_result" >&6
20107 if test "$cf_result" = yes ; then
20109 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20111 cat >>confdefs.h <<EOF
20112 #define $cf_result 1
20117 cat >>confdefs.h <<EOF
20118 #define wint_t long
20134 echo "$as_me:20134: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20135 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20137 cat >"conftest.$ac_ext" <<_ACEOF
20138 #line 20138 "configure"
20139 #include "confdefs.h"
20141 #ifdef HAVE_XCURSES
20142 #include <xcurses.h>
20143 char * XCursesProgramName = "test";
20145 #include <${cf_cv_ncurses_header:-curses.h}>
20146 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20147 #include <ncursesw/term.h>
20148 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20149 #include <ncurses/term.h>
20150 #elif defined(HAVE_TERM_H)
20159 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20160 const void *foo = (const void *)($cf_data);
20162 const void *foo = &($cf_data);
20164 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
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
20185 echo "$as_me: failed program was:" >&5
20186 cat "conftest.$ac_ext" >&5
20189 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20190 echo "$as_me:20190: result: $cf_result" >&5
20191 echo "${ECHO_T}$cf_result" >&6
20193 if test "$cf_result" = yes ; then
20195 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20197 cat >>confdefs.h <<EOF
20198 #define $cf_result 1
20202 echo "$as_me:20202: checking for data $cf_data in library" >&5
20203 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
20204 # BSD linkers insist on making weak linkage, but resolve at runtime.
20205 if test "$cross_compiling" = yes; then
20208 cat >"conftest.$ac_ext" <<_ACEOF
20209 #line 20209 "configure"
20210 #include "confdefs.h"
20212 #ifdef HAVE_XCURSES
20213 #include <xcurses.h>
20214 char * XCursesProgramName = "test";
20216 #include <${cf_cv_ncurses_header:-curses.h}>
20217 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20218 #include <ncursesw/term.h>
20219 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20220 #include <ncurses/term.h>
20221 #elif defined(HAVE_TERM_H)
20226 extern char $cf_data;
20233 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20234 const void *foo = (const void *)($cf_data);
20236 const void *foo = &($cf_data);
20238 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20240 ${cf_cv_main_return:-return}(foo == 0);
20247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20248 if { (eval echo "$as_me:20248: \"$ac_link\"") >&5
20249 (eval $ac_link) 2>&5
20251 echo "$as_me:20251: \$? = $ac_status" >&5
20252 (exit "$ac_status"); } &&
20253 { ac_try='test -s "conftest$ac_exeext"'
20254 { (eval echo "$as_me:20254: \"$ac_try\"") >&5
20255 (eval $ac_try) 2>&5
20257 echo "$as_me:20257: \$? = $ac_status" >&5
20258 (exit "$ac_status"); }; }; then
20261 echo "$as_me: failed program was:" >&5
20262 cat "conftest.$ac_ext" >&5
20265 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20268 cat >"conftest.$ac_ext" <<_ACEOF
20269 #line 20269 "configure"
20270 #include "confdefs.h"
20272 #ifdef HAVE_XCURSES
20273 #include <xcurses.h>
20274 char * XCursesProgramName = "test";
20276 #include <${cf_cv_ncurses_header:-curses.h}>
20277 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20278 #include <ncursesw/term.h>
20279 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20280 #include <ncurses/term.h>
20281 #elif defined(HAVE_TERM_H)
20286 extern char $cf_data;
20290 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20291 const void *foo = (const void *)($cf_data);
20293 const void *foo = &($cf_data);
20295 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20297 ${cf_cv_main_return:-return}(foo == 0);
20300 rm -f "conftest$ac_exeext"
20301 if { (eval echo "$as_me:20301: \"$ac_link\"") >&5
20302 (eval $ac_link) 2>&5
20304 echo "$as_me:20304: \$? = $ac_status" >&5
20305 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20306 { (eval echo "$as_me:20306: \"$ac_try\"") >&5
20307 (eval $ac_try) 2>&5
20309 echo "$as_me:20309: \$? = $ac_status" >&5
20310 (exit "$ac_status"); }; }; then
20314 echo "$as_me: program exited with status $ac_status" >&5
20315 echo "$as_me: failed program was:" >&5
20316 cat "conftest.$ac_ext" >&5
20319 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20321 echo "$as_me:20321: result: $cf_result" >&5
20322 echo "${ECHO_T}$cf_result" >&6
20323 if test "$cf_result" = yes ; then
20325 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20327 cat >>confdefs.h <<EOF
20328 #define $cf_result 1
20331 # do not exit loop here, since we prefer system's declarations
20336 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
20338 echo "$as_me:20338: checking for X" >&5
20339 echo $ECHO_N "checking for X... $ECHO_C" >&6
20341 # Check whether --with-x or --without-x was given.
20342 if test "${with_x+set}" = set; then
20346 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
20347 if test "x$with_x" = xno; then
20348 # The user explicitly disabled X.
20351 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
20352 # Both variables are already set.
20355 if test "${ac_cv_have_x+set}" = set; then
20356 echo $ECHO_N "(cached) $ECHO_C" >&6
20358 # One or both of the vars are not set, and there is no cached value.
20359 ac_x_includes=no ac_x_libraries=no
20360 rm -fr conftest.dir
20361 if mkdir conftest.dir; then
20363 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
20364 cat >Imakefile <<'EOF'
20366 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
20368 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
20369 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
20370 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
20371 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
20372 for ac_extension in a so sl dylib dll; do
20373 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
20374 test -f "$ac_im_libdir/libX11.$ac_extension"; then
20375 ac_im_usrlibdir=$ac_im_libdir; break
20378 # Screen out bogus values from the imake configuration. They are
20379 # bogus both because they are the default anyway, and because
20380 # using them would break gcc on systems where it needs fixed includes.
20381 case $ac_im_incroot in
20383 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
20385 case $ac_im_usrlibdir in
20386 /usr/lib | /lib) ;;
20387 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
20391 rm -fr conftest.dir
20394 # Standard set of common directories for X headers.
20395 # Check X11 before X11Rn because it is often a symlink to the current release.
20412 /usr/local/X11/include
20413 /usr/local/X11R7/include
20414 /usr/local/X11R6/include
20415 /usr/local/X11R5/include
20416 /usr/local/X11R4/include
20418 /usr/local/include/X11
20419 /usr/local/include/X11R7
20420 /usr/local/include/X11R6
20421 /usr/local/include/X11R5
20422 /usr/local/include/X11R4
20426 /usr/XFree86/include/X11
20430 /usr/unsupported/include
20431 /usr/athena/include
20432 /usr/local/x11r5/include
20433 /usr/lpp/Xamples/include
20435 /usr/openwin/include
20436 /usr/openwin/share/include'
20438 if test "$ac_x_includes" = no; then
20439 # Guess where to find include files, by looking for Intrinsic.h.
20440 # First, try using that file with no special directory specified.
20441 cat >"conftest.$ac_ext" <<_ACEOF
20442 #line 20442 "configure"
20443 #include "confdefs.h"
20444 #include <X11/Intrinsic.h>
20446 if { (eval echo "$as_me:20446: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20447 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20449 $EGREP -v '^ *\+' conftest.er1 >conftest.err
20451 cat conftest.err >&5
20452 echo "$as_me:20452: \$? = $ac_status" >&5
20453 (exit "$ac_status"); } >/dev/null; then
20454 if test -s conftest.err; then
20455 ac_cpp_err=$ac_c_preproc_warn_flag
20462 if test -z "$ac_cpp_err"; then
20463 # We can compile using X headers with no special include directory.
20466 echo "$as_me: failed program was:" >&5
20467 cat "conftest.$ac_ext" >&5
20468 for ac_dir in $ac_x_header_dirs; do
20469 if test -r "$ac_dir/X11/Intrinsic.h"; then
20470 ac_x_includes=$ac_dir
20475 rm -f conftest.err "conftest.$ac_ext"
20476 fi # $ac_x_includes = no
20478 if test "$ac_x_libraries" = no; then
20479 # Check for the libraries.
20480 # See if we find them without any special options.
20481 # Don't add to $LIBS permanently.
20484 cat >"conftest.$ac_ext" <<_ACEOF
20485 #line 20485 "configure"
20486 #include "confdefs.h"
20487 #include <X11/Intrinsic.h>
20496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20497 if { (eval echo "$as_me:20497: \"$ac_link\"") >&5
20498 (eval $ac_link) 2>&5
20500 echo "$as_me:20500: \$? = $ac_status" >&5
20501 (exit "$ac_status"); } &&
20502 { ac_try='test -s "conftest$ac_exeext"'
20503 { (eval echo "$as_me:20503: \"$ac_try\"") >&5
20504 (eval $ac_try) 2>&5
20506 echo "$as_me:20506: \$? = $ac_status" >&5
20507 (exit "$ac_status"); }; }; then
20509 # We can link X programs with no special library path.
20512 echo "$as_me: failed program was:" >&5
20513 cat "conftest.$ac_ext" >&5
20515 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
20517 # Don't even attempt the hair of trying to link an X program!
20518 for ac_extension in a so sl dylib dll; do
20519 if test -r "$ac_dir/libXt.$ac_extension"; then
20520 ac_x_libraries=$ac_dir
20526 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20527 fi # $ac_x_libraries = no
20529 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
20530 # Didn't find X anywhere. Cache the known absence of X.
20531 ac_cv_have_x="have_x=no"
20533 # Record where we found X for the cache.
20534 ac_cv_have_x="have_x=yes \
20535 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
20540 eval "$ac_cv_have_x"
20543 if test "$have_x" != yes; then
20544 echo "$as_me:20544: result: $have_x" >&5
20545 echo "${ECHO_T}$have_x" >&6
20548 # If each of the values was on the command line, it overrides each guess.
20549 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
20550 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
20551 # Update the cache value to reflect the command line values.
20552 ac_cv_have_x="have_x=yes \
20553 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
20554 echo "$as_me:20554: result: libraries $x_libraries, headers $x_includes" >&5
20555 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
20558 if test "$no_x" = yes; then
20559 # Not all programs may use this symbol, but it does not hurt to define it.
20561 cat >>confdefs.h <<\EOF
20562 #define X_DISPLAY_MISSING 1
20570 if test -n "$x_includes"; then
20571 X_CFLAGS="$X_CFLAGS -I$x_includes"
20574 # It would also be nice to do this for all -L options, not just this one.
20575 if test -n "$x_libraries"; then
20576 X_LIBS="$X_LIBS -L$x_libraries"
20577 # For Solaris; some versions of Sun CC require a space after -R and
20578 # others require no space. Words are not sufficient . . . .
20579 case `(uname -sr) 2>/dev/null` in
20581 echo "$as_me:20581: checking whether -R must be followed by a space" >&5
20582 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
20583 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
20584 cat >"conftest.$ac_ext" <<_ACEOF
20585 #line 20585 "configure"
20586 #include "confdefs.h"
20596 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20597 if { (eval echo "$as_me:20597: \"$ac_link\"") >&5
20598 (eval $ac_link) 2>&5
20600 echo "$as_me:20600: \$? = $ac_status" >&5
20601 (exit "$ac_status"); } &&
20602 { ac_try='test -s "conftest$ac_exeext"'
20603 { (eval echo "$as_me:20603: \"$ac_try\"") >&5
20604 (eval $ac_try) 2>&5
20606 echo "$as_me:20606: \$? = $ac_status" >&5
20607 (exit "$ac_status"); }; }; then
20610 echo "$as_me: failed program was:" >&5
20611 cat "conftest.$ac_ext" >&5
20614 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20615 if test $ac_R_nospace = yes; then
20616 echo "$as_me:20616: result: no" >&5
20617 echo "${ECHO_T}no" >&6
20618 X_LIBS="$X_LIBS -R$x_libraries"
20620 LIBS="$ac_xsave_LIBS -R $x_libraries"
20621 cat >"conftest.$ac_ext" <<_ACEOF
20622 #line 20622 "configure"
20623 #include "confdefs.h"
20633 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20634 if { (eval echo "$as_me:20634: \"$ac_link\"") >&5
20635 (eval $ac_link) 2>&5
20637 echo "$as_me:20637: \$? = $ac_status" >&5
20638 (exit "$ac_status"); } &&
20639 { ac_try='test -s "conftest$ac_exeext"'
20640 { (eval echo "$as_me:20640: \"$ac_try\"") >&5
20641 (eval $ac_try) 2>&5
20643 echo "$as_me:20643: \$? = $ac_status" >&5
20644 (exit "$ac_status"); }; }; then
20647 echo "$as_me: failed program was:" >&5
20648 cat "conftest.$ac_ext" >&5
20651 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20652 if test $ac_R_space = yes; then
20653 echo "$as_me:20653: result: yes" >&5
20654 echo "${ECHO_T}yes" >&6
20655 X_LIBS="$X_LIBS -R $x_libraries"
20657 echo "$as_me:20657: result: neither works" >&5
20658 echo "${ECHO_T}neither works" >&6
20661 LIBS=$ac_xsave_LIBS
20665 # Check for system-dependent libraries X programs must link with.
20666 # Do this before checking for the system-independent R6 libraries
20667 # (-lICE), since we may need -lsocket or whatever for X linking.
20669 if test "$ISC" = yes; then
20670 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
20672 # Martyn Johnson says this is needed for Ultrix, if the X
20673 # libraries were built with DECnet support. And Karl Berry says
20674 # the Alpha needs dnet_stub (dnet does not exist).
20675 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
20676 cat >"conftest.$ac_ext" <<_ACEOF
20677 #line 20677 "configure"
20678 #include "confdefs.h"
20680 /* Override any gcc2 internal prototype to avoid an error. */
20684 /* We use char because int might match the return type of a gcc2
20685 builtin and then its argument prototype would still apply. */
20686 char XOpenDisplay ();
20695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20696 if { (eval echo "$as_me:20696: \"$ac_link\"") >&5
20697 (eval $ac_link) 2>&5
20699 echo "$as_me:20699: \$? = $ac_status" >&5
20700 (exit "$ac_status"); } &&
20701 { ac_try='test -s "conftest$ac_exeext"'
20702 { (eval echo "$as_me:20702: \"$ac_try\"") >&5
20703 (eval $ac_try) 2>&5
20705 echo "$as_me:20705: \$? = $ac_status" >&5
20706 (exit "$ac_status"); }; }; then
20709 echo "$as_me: failed program was:" >&5
20710 cat "conftest.$ac_ext" >&5
20711 echo "$as_me:20711: checking for dnet_ntoa in -ldnet" >&5
20712 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
20713 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
20714 echo $ECHO_N "(cached) $ECHO_C" >&6
20716 ac_check_lib_save_LIBS=$LIBS
20717 LIBS="-ldnet $LIBS"
20718 cat >"conftest.$ac_ext" <<_ACEOF
20719 #line 20719 "configure"
20720 #include "confdefs.h"
20722 /* Override any gcc2 internal prototype to avoid an error. */
20726 /* We use char because int might match the return type of a gcc2
20727 builtin and then its argument prototype would still apply. */
20737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20738 if { (eval echo "$as_me:20738: \"$ac_link\"") >&5
20739 (eval $ac_link) 2>&5
20741 echo "$as_me:20741: \$? = $ac_status" >&5
20742 (exit "$ac_status"); } &&
20743 { ac_try='test -s "conftest$ac_exeext"'
20744 { (eval echo "$as_me:20744: \"$ac_try\"") >&5
20745 (eval $ac_try) 2>&5
20747 echo "$as_me:20747: \$? = $ac_status" >&5
20748 (exit "$ac_status"); }; }; then
20749 ac_cv_lib_dnet_dnet_ntoa=yes
20751 echo "$as_me: failed program was:" >&5
20752 cat "conftest.$ac_ext" >&5
20753 ac_cv_lib_dnet_dnet_ntoa=no
20755 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20756 LIBS=$ac_check_lib_save_LIBS
20758 echo "$as_me:20758: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
20759 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
20760 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
20761 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
20764 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
20765 echo "$as_me:20765: checking for dnet_ntoa in -ldnet_stub" >&5
20766 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
20767 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
20768 echo $ECHO_N "(cached) $ECHO_C" >&6
20770 ac_check_lib_save_LIBS=$LIBS
20771 LIBS="-ldnet_stub $LIBS"
20772 cat >"conftest.$ac_ext" <<_ACEOF
20773 #line 20773 "configure"
20774 #include "confdefs.h"
20776 /* Override any gcc2 internal prototype to avoid an error. */
20780 /* We use char because int might match the return type of a gcc2
20781 builtin and then its argument prototype would still apply. */
20791 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20792 if { (eval echo "$as_me:20792: \"$ac_link\"") >&5
20793 (eval $ac_link) 2>&5
20795 echo "$as_me:20795: \$? = $ac_status" >&5
20796 (exit "$ac_status"); } &&
20797 { ac_try='test -s "conftest$ac_exeext"'
20798 { (eval echo "$as_me:20798: \"$ac_try\"") >&5
20799 (eval $ac_try) 2>&5
20801 echo "$as_me:20801: \$? = $ac_status" >&5
20802 (exit "$ac_status"); }; }; then
20803 ac_cv_lib_dnet_stub_dnet_ntoa=yes
20805 echo "$as_me: failed program was:" >&5
20806 cat "conftest.$ac_ext" >&5
20807 ac_cv_lib_dnet_stub_dnet_ntoa=no
20809 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20810 LIBS=$ac_check_lib_save_LIBS
20812 echo "$as_me:20812: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
20813 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
20814 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
20815 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
20820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20821 LIBS="$ac_xsave_LIBS"
20823 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
20824 # to get the SysV transport functions.
20825 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
20827 # The nsl library prevents programs from opening the X display
20828 # on Irix 5.2, according to T.E. Dickey.
20829 # The functions gethostbyname, getservbyname, and inet_addr are
20830 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
20831 echo "$as_me:20831: checking for gethostbyname" >&5
20832 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
20833 if test "${ac_cv_func_gethostbyname+set}" = set; then
20834 echo $ECHO_N "(cached) $ECHO_C" >&6
20836 cat >"conftest.$ac_ext" <<_ACEOF
20837 #line 20837 "configure"
20838 #include "confdefs.h"
20839 #define gethostbyname autoconf_temporary
20840 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
20841 #undef gethostbyname
20847 /* We use char because int might match the return type of a gcc2
20848 builtin and then its argument prototype would still apply. */
20849 char gethostbyname (void);
20855 /* The GNU C library defines stubs for functions which it implements
20856 to always fail with ENOSYS. Some functions are actually named
20857 something starting with __ and the normal name is an alias. */
20858 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
20859 #error found stub for gethostbyname
20862 return gethostbyname ();
20867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20868 if { (eval echo "$as_me:20868: \"$ac_link\"") >&5
20869 (eval $ac_link) 2>&5
20871 echo "$as_me:20871: \$? = $ac_status" >&5
20872 (exit "$ac_status"); } &&
20873 { ac_try='test -s "conftest$ac_exeext"'
20874 { (eval echo "$as_me:20874: \"$ac_try\"") >&5
20875 (eval $ac_try) 2>&5
20877 echo "$as_me:20877: \$? = $ac_status" >&5
20878 (exit "$ac_status"); }; }; then
20879 ac_cv_func_gethostbyname=yes
20881 echo "$as_me: failed program was:" >&5
20882 cat "conftest.$ac_ext" >&5
20883 ac_cv_func_gethostbyname=no
20885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20887 echo "$as_me:20887: result: $ac_cv_func_gethostbyname" >&5
20888 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
20890 if test $ac_cv_func_gethostbyname = no; then
20891 echo "$as_me:20891: checking for gethostbyname in -lnsl" >&5
20892 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
20893 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
20894 echo $ECHO_N "(cached) $ECHO_C" >&6
20896 ac_check_lib_save_LIBS=$LIBS
20898 cat >"conftest.$ac_ext" <<_ACEOF
20899 #line 20899 "configure"
20900 #include "confdefs.h"
20902 /* Override any gcc2 internal prototype to avoid an error. */
20906 /* We use char because int might match the return type of a gcc2
20907 builtin and then its argument prototype would still apply. */
20908 char gethostbyname ();
20917 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20918 if { (eval echo "$as_me:20918: \"$ac_link\"") >&5
20919 (eval $ac_link) 2>&5
20921 echo "$as_me:20921: \$? = $ac_status" >&5
20922 (exit "$ac_status"); } &&
20923 { ac_try='test -s "conftest$ac_exeext"'
20924 { (eval echo "$as_me:20924: \"$ac_try\"") >&5
20925 (eval $ac_try) 2>&5
20927 echo "$as_me:20927: \$? = $ac_status" >&5
20928 (exit "$ac_status"); }; }; then
20929 ac_cv_lib_nsl_gethostbyname=yes
20931 echo "$as_me: failed program was:" >&5
20932 cat "conftest.$ac_ext" >&5
20933 ac_cv_lib_nsl_gethostbyname=no
20935 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20936 LIBS=$ac_check_lib_save_LIBS
20938 echo "$as_me:20938: result: $ac_cv_lib_nsl_gethostbyname" >&5
20939 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
20940 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
20941 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
20944 if test $ac_cv_lib_nsl_gethostbyname = no; then
20945 echo "$as_me:20945: checking for gethostbyname in -lbsd" >&5
20946 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
20947 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
20948 echo $ECHO_N "(cached) $ECHO_C" >&6
20950 ac_check_lib_save_LIBS=$LIBS
20952 cat >"conftest.$ac_ext" <<_ACEOF
20953 #line 20953 "configure"
20954 #include "confdefs.h"
20956 /* Override any gcc2 internal prototype to avoid an error. */
20960 /* We use char because int might match the return type of a gcc2
20961 builtin and then its argument prototype would still apply. */
20962 char gethostbyname ();
20971 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20972 if { (eval echo "$as_me:20972: \"$ac_link\"") >&5
20973 (eval $ac_link) 2>&5
20975 echo "$as_me:20975: \$? = $ac_status" >&5
20976 (exit "$ac_status"); } &&
20977 { ac_try='test -s "conftest$ac_exeext"'
20978 { (eval echo "$as_me:20978: \"$ac_try\"") >&5
20979 (eval $ac_try) 2>&5
20981 echo "$as_me:20981: \$? = $ac_status" >&5
20982 (exit "$ac_status"); }; }; then
20983 ac_cv_lib_bsd_gethostbyname=yes
20985 echo "$as_me: failed program was:" >&5
20986 cat "conftest.$ac_ext" >&5
20987 ac_cv_lib_bsd_gethostbyname=no
20989 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20990 LIBS=$ac_check_lib_save_LIBS
20992 echo "$as_me:20992: result: $ac_cv_lib_bsd_gethostbyname" >&5
20993 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
20994 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
20995 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21001 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21002 # socket/setsockopt and other routines are undefined under SCO ODT
21003 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21004 # on later versions), says Simon Leinen: it contains gethostby*
21005 # variants that don't use the nameserver (or something). -lsocket
21006 # must be given before -lnsl if both are needed. We assume that
21007 # if connect needs -lnsl, so does gethostbyname.
21008 echo "$as_me:21008: checking for connect" >&5
21009 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21010 if test "${ac_cv_func_connect+set}" = set; then
21011 echo $ECHO_N "(cached) $ECHO_C" >&6
21013 cat >"conftest.$ac_ext" <<_ACEOF
21014 #line 21014 "configure"
21015 #include "confdefs.h"
21016 #define connect autoconf_temporary
21017 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21024 /* We use char because int might match the return type of a gcc2
21025 builtin and then its argument prototype would still apply. */
21026 char connect (void);
21032 /* The GNU C library defines stubs for functions which it implements
21033 to always fail with ENOSYS. Some functions are actually named
21034 something starting with __ and the normal name is an alias. */
21035 #if defined (__stub_connect) || defined (__stub___connect)
21036 #error found stub for connect
21044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21045 if { (eval echo "$as_me:21045: \"$ac_link\"") >&5
21046 (eval $ac_link) 2>&5
21048 echo "$as_me:21048: \$? = $ac_status" >&5
21049 (exit "$ac_status"); } &&
21050 { ac_try='test -s "conftest$ac_exeext"'
21051 { (eval echo "$as_me:21051: \"$ac_try\"") >&5
21052 (eval $ac_try) 2>&5
21054 echo "$as_me:21054: \$? = $ac_status" >&5
21055 (exit "$ac_status"); }; }; then
21056 ac_cv_func_connect=yes
21058 echo "$as_me: failed program was:" >&5
21059 cat "conftest.$ac_ext" >&5
21060 ac_cv_func_connect=no
21062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21064 echo "$as_me:21064: result: $ac_cv_func_connect" >&5
21065 echo "${ECHO_T}$ac_cv_func_connect" >&6
21067 if test $ac_cv_func_connect = no; then
21068 echo "$as_me:21068: checking for connect in -lsocket" >&5
21069 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21070 if test "${ac_cv_lib_socket_connect+set}" = set; then
21071 echo $ECHO_N "(cached) $ECHO_C" >&6
21073 ac_check_lib_save_LIBS=$LIBS
21074 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21075 cat >"conftest.$ac_ext" <<_ACEOF
21076 #line 21076 "configure"
21077 #include "confdefs.h"
21079 /* Override any gcc2 internal prototype to avoid an error. */
21083 /* We use char because int might match the return type of a gcc2
21084 builtin and then its argument prototype would still apply. */
21094 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21095 if { (eval echo "$as_me:21095: \"$ac_link\"") >&5
21096 (eval $ac_link) 2>&5
21098 echo "$as_me:21098: \$? = $ac_status" >&5
21099 (exit "$ac_status"); } &&
21100 { ac_try='test -s "conftest$ac_exeext"'
21101 { (eval echo "$as_me:21101: \"$ac_try\"") >&5
21102 (eval $ac_try) 2>&5
21104 echo "$as_me:21104: \$? = $ac_status" >&5
21105 (exit "$ac_status"); }; }; then
21106 ac_cv_lib_socket_connect=yes
21108 echo "$as_me: failed program was:" >&5
21109 cat "conftest.$ac_ext" >&5
21110 ac_cv_lib_socket_connect=no
21112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21113 LIBS=$ac_check_lib_save_LIBS
21115 echo "$as_me:21115: result: $ac_cv_lib_socket_connect" >&5
21116 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21117 if test "$ac_cv_lib_socket_connect" = yes; then
21118 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21123 # Guillermo Gomez says -lposix is necessary on A/UX.
21124 echo "$as_me:21124: checking for remove" >&5
21125 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21126 if test "${ac_cv_func_remove+set}" = set; then
21127 echo $ECHO_N "(cached) $ECHO_C" >&6
21129 cat >"conftest.$ac_ext" <<_ACEOF
21130 #line 21130 "configure"
21131 #include "confdefs.h"
21132 #define remove autoconf_temporary
21133 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21140 /* We use char because int might match the return type of a gcc2
21141 builtin and then its argument prototype would still apply. */
21142 char remove (void);
21148 /* The GNU C library defines stubs for functions which it implements
21149 to always fail with ENOSYS. Some functions are actually named
21150 something starting with __ and the normal name is an alias. */
21151 #if defined (__stub_remove) || defined (__stub___remove)
21152 #error found stub for remove
21160 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21161 if { (eval echo "$as_me:21161: \"$ac_link\"") >&5
21162 (eval $ac_link) 2>&5
21164 echo "$as_me:21164: \$? = $ac_status" >&5
21165 (exit "$ac_status"); } &&
21166 { ac_try='test -s "conftest$ac_exeext"'
21167 { (eval echo "$as_me:21167: \"$ac_try\"") >&5
21168 (eval $ac_try) 2>&5
21170 echo "$as_me:21170: \$? = $ac_status" >&5
21171 (exit "$ac_status"); }; }; then
21172 ac_cv_func_remove=yes
21174 echo "$as_me: failed program was:" >&5
21175 cat "conftest.$ac_ext" >&5
21176 ac_cv_func_remove=no
21178 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21180 echo "$as_me:21180: result: $ac_cv_func_remove" >&5
21181 echo "${ECHO_T}$ac_cv_func_remove" >&6
21183 if test $ac_cv_func_remove = no; then
21184 echo "$as_me:21184: checking for remove in -lposix" >&5
21185 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
21186 if test "${ac_cv_lib_posix_remove+set}" = set; then
21187 echo $ECHO_N "(cached) $ECHO_C" >&6
21189 ac_check_lib_save_LIBS=$LIBS
21190 LIBS="-lposix $LIBS"
21191 cat >"conftest.$ac_ext" <<_ACEOF
21192 #line 21192 "configure"
21193 #include "confdefs.h"
21195 /* Override any gcc2 internal prototype to avoid an error. */
21199 /* We use char because int might match the return type of a gcc2
21200 builtin and then its argument prototype would still apply. */
21210 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21211 if { (eval echo "$as_me:21211: \"$ac_link\"") >&5
21212 (eval $ac_link) 2>&5
21214 echo "$as_me:21214: \$? = $ac_status" >&5
21215 (exit "$ac_status"); } &&
21216 { ac_try='test -s "conftest$ac_exeext"'
21217 { (eval echo "$as_me:21217: \"$ac_try\"") >&5
21218 (eval $ac_try) 2>&5
21220 echo "$as_me:21220: \$? = $ac_status" >&5
21221 (exit "$ac_status"); }; }; then
21222 ac_cv_lib_posix_remove=yes
21224 echo "$as_me: failed program was:" >&5
21225 cat "conftest.$ac_ext" >&5
21226 ac_cv_lib_posix_remove=no
21228 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21229 LIBS=$ac_check_lib_save_LIBS
21231 echo "$as_me:21231: result: $ac_cv_lib_posix_remove" >&5
21232 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
21233 if test "$ac_cv_lib_posix_remove" = yes; then
21234 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
21239 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
21240 echo "$as_me:21240: checking for shmat" >&5
21241 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
21242 if test "${ac_cv_func_shmat+set}" = set; then
21243 echo $ECHO_N "(cached) $ECHO_C" >&6
21245 cat >"conftest.$ac_ext" <<_ACEOF
21246 #line 21246 "configure"
21247 #include "confdefs.h"
21248 #define shmat autoconf_temporary
21249 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21256 /* We use char because int might match the return type of a gcc2
21257 builtin and then its argument prototype would still apply. */
21264 /* The GNU C library defines stubs for functions which it implements
21265 to always fail with ENOSYS. Some functions are actually named
21266 something starting with __ and the normal name is an alias. */
21267 #if defined (__stub_shmat) || defined (__stub___shmat)
21268 #error found stub for shmat
21276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21277 if { (eval echo "$as_me:21277: \"$ac_link\"") >&5
21278 (eval $ac_link) 2>&5
21280 echo "$as_me:21280: \$? = $ac_status" >&5
21281 (exit "$ac_status"); } &&
21282 { ac_try='test -s "conftest$ac_exeext"'
21283 { (eval echo "$as_me:21283: \"$ac_try\"") >&5
21284 (eval $ac_try) 2>&5
21286 echo "$as_me:21286: \$? = $ac_status" >&5
21287 (exit "$ac_status"); }; }; then
21288 ac_cv_func_shmat=yes
21290 echo "$as_me: failed program was:" >&5
21291 cat "conftest.$ac_ext" >&5
21292 ac_cv_func_shmat=no
21294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21296 echo "$as_me:21296: result: $ac_cv_func_shmat" >&5
21297 echo "${ECHO_T}$ac_cv_func_shmat" >&6
21299 if test $ac_cv_func_shmat = no; then
21300 echo "$as_me:21300: checking for shmat in -lipc" >&5
21301 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
21302 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
21303 echo $ECHO_N "(cached) $ECHO_C" >&6
21305 ac_check_lib_save_LIBS=$LIBS
21307 cat >"conftest.$ac_ext" <<_ACEOF
21308 #line 21308 "configure"
21309 #include "confdefs.h"
21311 /* Override any gcc2 internal prototype to avoid an error. */
21315 /* We use char because int might match the return type of a gcc2
21316 builtin and then its argument prototype would still apply. */
21326 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21327 if { (eval echo "$as_me:21327: \"$ac_link\"") >&5
21328 (eval $ac_link) 2>&5
21330 echo "$as_me:21330: \$? = $ac_status" >&5
21331 (exit "$ac_status"); } &&
21332 { ac_try='test -s "conftest$ac_exeext"'
21333 { (eval echo "$as_me:21333: \"$ac_try\"") >&5
21334 (eval $ac_try) 2>&5
21336 echo "$as_me:21336: \$? = $ac_status" >&5
21337 (exit "$ac_status"); }; }; then
21338 ac_cv_lib_ipc_shmat=yes
21340 echo "$as_me: failed program was:" >&5
21341 cat "conftest.$ac_ext" >&5
21342 ac_cv_lib_ipc_shmat=no
21344 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21345 LIBS=$ac_check_lib_save_LIBS
21347 echo "$as_me:21347: result: $ac_cv_lib_ipc_shmat" >&5
21348 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
21349 if test "$ac_cv_lib_ipc_shmat" = yes; then
21350 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
21356 # Check for libraries that X11R6 Xt/Xaw programs need.
21357 ac_save_LDFLAGS=$LDFLAGS
21358 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
21359 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
21360 # check for ICE first), but we must link in the order -lSM -lICE or
21361 # we get undefined symbols. So assume we have SM if we have ICE.
21362 # These have to be linked with before -lX11, unlike the other
21363 # libraries we check for below, so use a different variable.
21364 # John Interrante, Karl Berry
21365 echo "$as_me:21365: checking for IceConnectionNumber in -lICE" >&5
21366 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
21367 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
21368 echo $ECHO_N "(cached) $ECHO_C" >&6
21370 ac_check_lib_save_LIBS=$LIBS
21371 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
21372 cat >"conftest.$ac_ext" <<_ACEOF
21373 #line 21373 "configure"
21374 #include "confdefs.h"
21376 /* Override any gcc2 internal prototype to avoid an error. */
21380 /* We use char because int might match the return type of a gcc2
21381 builtin and then its argument prototype would still apply. */
21382 char IceConnectionNumber ();
21386 IceConnectionNumber ();
21391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21392 if { (eval echo "$as_me:21392: \"$ac_link\"") >&5
21393 (eval $ac_link) 2>&5
21395 echo "$as_me:21395: \$? = $ac_status" >&5
21396 (exit "$ac_status"); } &&
21397 { ac_try='test -s "conftest$ac_exeext"'
21398 { (eval echo "$as_me:21398: \"$ac_try\"") >&5
21399 (eval $ac_try) 2>&5
21401 echo "$as_me:21401: \$? = $ac_status" >&5
21402 (exit "$ac_status"); }; }; then
21403 ac_cv_lib_ICE_IceConnectionNumber=yes
21405 echo "$as_me: failed program was:" >&5
21406 cat "conftest.$ac_ext" >&5
21407 ac_cv_lib_ICE_IceConnectionNumber=no
21409 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21410 LIBS=$ac_check_lib_save_LIBS
21412 echo "$as_me:21412: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
21413 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
21414 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
21415 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
21418 LDFLAGS=$ac_save_LDFLAGS
21424 if test "$GCC" = yes || test "$GXX" = yes
21427 if test "$GCC" = yes || test "$GXX" = yes
21431 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
21433 echo "${as_me:-configure}:21433: testing repairing CFLAGS: $CFLAGS ..." 1>&5
21436 for cf_temp_scan in $CFLAGS
21438 case "x$cf_temp_scan" in
21441 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21442 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21447 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21448 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21453 CFLAGS="$cf_temp_flags"
21454 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
21456 echo "${as_me:-configure}:21456: testing ... fixed $CFLAGS ..." 1>&5
21458 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21460 echo "${as_me:-configure}:21460: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21466 if test "$GCC" = yes || test "$GXX" = yes
21470 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
21472 echo "${as_me:-configure}:21472: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
21475 for cf_temp_scan in $CPPFLAGS
21477 case "x$cf_temp_scan" in
21480 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21481 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21486 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21487 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21492 CPPFLAGS="$cf_temp_flags"
21493 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
21495 echo "${as_me:-configure}:21495: testing ... fixed $CPPFLAGS ..." 1>&5
21497 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21499 echo "${as_me:-configure}:21499: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21505 if test "$GCC" = yes || test "$GXX" = yes
21509 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
21511 echo "${as_me:-configure}:21511: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
21514 for cf_temp_scan in $LDFLAGS
21516 case "x$cf_temp_scan" in
21519 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
21520 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
21525 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
21526 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
21531 LDFLAGS="$cf_temp_flags"
21532 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
21534 echo "${as_me:-configure}:21534: testing ... fixed $LDFLAGS ..." 1>&5
21536 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
21538 echo "${as_me:-configure}:21538: testing ... extra $EXTRA_CFLAGS ..." 1>&5
21544 echo "$as_me:21544: checking if you want to turn on gcc warnings" >&5
21545 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21547 # Check whether --enable-warnings or --disable-warnings was given.
21548 if test "${enable_warnings+set}" = set; then
21549 enableval="$enable_warnings"
21550 test "$enableval" != yes && enableval=no
21551 if test "$enableval" != "no" ; then
21552 enable_warnings=yes
21561 echo "$as_me:21561: result: $enable_warnings" >&5
21562 echo "${ECHO_T}$enable_warnings" >&6
21563 if test "$enable_warnings" = "yes"
21566 if test "$GCC" = yes || test "$GXX" = yes
21568 cat > conftest.i <<EOF
21570 #define GCC_PRINTF 0
21573 #define GCC_SCANF 0
21575 #ifndef GCC_NORETURN
21576 #define GCC_NORETURN /* nothing */
21579 #define GCC_UNUSED /* nothing */
21582 if test "$GCC" = yes
21584 { echo "$as_me:21584: checking for $CC __attribute__ directives..." >&5
21585 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21586 cat > "conftest.$ac_ext" <<EOF
21587 #line 21587 "${as_me:-configure}"
21588 #include "confdefs.h"
21589 #include "conftest.h"
21590 #include "conftest.i"
21592 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21594 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21597 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
21599 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
21601 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21602 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
21603 extern GCC_NORETURN void foo(void);
21604 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
21606 cf_printf_attribute=no
21607 cf_scanf_attribute=no
21608 for cf_attribute in scanf printf unused noreturn
21611 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21613 cf_directive="__attribute__(($cf_attribute))"
21614 echo "checking for $CC $cf_directive" 1>&5
21616 case "$cf_attribute" in
21618 cf_printf_attribute=yes
21619 cat >conftest.h <<EOF
21620 #define GCC_$cf_ATTRIBUTE 1
21624 cf_scanf_attribute=yes
21625 cat >conftest.h <<EOF
21626 #define GCC_$cf_ATTRIBUTE 1
21630 cat >conftest.h <<EOF
21631 #define GCC_$cf_ATTRIBUTE $cf_directive
21636 if { (eval echo "$as_me:21636: \"$ac_compile\"") >&5
21637 (eval $ac_compile) 2>&5
21639 echo "$as_me:21639: \$? = $ac_status" >&5
21640 (exit "$ac_status"); }; then
21641 test -n "$verbose" && echo "$as_me:21641: result: ... $cf_attribute" >&5
21642 echo "${ECHO_T}... $cf_attribute" >&6
21643 cat conftest.h >>confdefs.h
21644 case "$cf_attribute" in
21647 cat >>confdefs.h <<EOF
21648 #define GCC_NORETURN $cf_directive
21653 cf_value='/* nothing */'
21654 if test "$cf_printf_attribute" != no ; then
21655 cf_value='__attribute__((format(printf,fmt,var)))'
21657 cat >>confdefs.h <<\EOF
21658 #define GCC_PRINTF 1
21663 cat >>confdefs.h <<EOF
21664 #define GCC_PRINTFLIKE(fmt,var) $cf_value
21669 cf_value='/* nothing */'
21670 if test "$cf_scanf_attribute" != no ; then
21671 cf_value='__attribute__((format(scanf,fmt,var)))'
21673 cat >>confdefs.h <<\EOF
21674 #define GCC_SCANF 1
21679 cat >>confdefs.h <<EOF
21680 #define GCC_SCANFLIKE(fmt,var) $cf_value
21686 cat >>confdefs.h <<EOF
21687 #define GCC_UNUSED $cf_directive
21695 ${FGREP-fgrep} define conftest.i >>confdefs.h
21700 if test "x$have_x" = xyes; then
21702 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
21703 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
21704 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
21705 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
21706 for cf_X_CFLAGS in $X_CFLAGS
21708 case "x$cf_X_CFLAGS" in
21710 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
21713 CFLAGS="$CFLAGS $cf_X_CFLAGS"
21718 cat >"conftest.$ac_ext" <<_ACEOF
21719 #line 21719 "configure"
21720 #include "confdefs.h"
21722 #include <stdlib.h>
21723 #include <X11/Intrinsic.h>
21728 String foo = malloc(1); (void)foo
21733 rm -f "conftest.$ac_objext"
21734 if { (eval echo "$as_me:21734: \"$ac_compile\"") >&5
21735 (eval $ac_compile) 2>&5
21737 echo "$as_me:21737: \$? = $ac_status" >&5
21738 (exit "$ac_status"); } &&
21739 { ac_try='test -s "conftest.$ac_objext"'
21740 { (eval echo "$as_me:21740: \"$ac_try\"") >&5
21741 (eval $ac_try) 2>&5
21743 echo "$as_me:21743: \$? = $ac_status" >&5
21744 (exit "$ac_status"); }; }; then
21746 echo "$as_me:21746: checking for X11/Xt const-feature" >&5
21747 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
21748 if test "${cf_cv_const_x_string+set}" = set; then
21749 echo $ECHO_N "(cached) $ECHO_C" >&6
21752 cat >"conftest.$ac_ext" <<_ACEOF
21753 #line 21753 "configure"
21754 #include "confdefs.h"
21756 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
21757 #undef XTSTRINGDEFINES /* X11R5 and later */
21758 #include <stdlib.h>
21759 #include <X11/Intrinsic.h>
21764 String foo = malloc(1); *foo = 0
21769 rm -f "conftest.$ac_objext"
21770 if { (eval echo "$as_me:21770: \"$ac_compile\"") >&5
21771 (eval $ac_compile) 2>&5
21773 echo "$as_me:21773: \$? = $ac_status" >&5
21774 (exit "$ac_status"); } &&
21775 { ac_try='test -s "conftest.$ac_objext"'
21776 { (eval echo "$as_me:21776: \"$ac_try\"") >&5
21777 (eval $ac_try) 2>&5
21779 echo "$as_me:21779: \$? = $ac_status" >&5
21780 (exit "$ac_status"); }; }; then
21782 cf_cv_const_x_string=no
21785 echo "$as_me: failed program was:" >&5
21786 cat "conftest.$ac_ext" >&5
21788 cf_cv_const_x_string=yes
21791 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21794 echo "$as_me:21794: result: $cf_cv_const_x_string" >&5
21795 echo "${ECHO_T}$cf_cv_const_x_string" >&6
21797 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
21798 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
21799 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
21801 case "$cf_cv_const_x_string" in
21804 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21805 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
21810 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21811 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
21817 echo "$as_me: failed program was:" >&5
21818 cat "conftest.$ac_ext" >&5
21820 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21822 cat > "conftest.$ac_ext" <<EOF
21823 #line 21823 "${as_me:-configure}"
21824 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21826 if test "$INTEL_COMPILER" = yes
21828 # The "-wdXXX" options suppress warnings:
21829 # remark #1419: external declaration in primary source file
21830 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21831 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21832 # remark #193: zero used for undefined preprocessing identifier
21833 # remark #593: variable "curs_sb_left_arrow" was set but never used
21834 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21835 # remark #869: parameter "tw" was never referenced
21836 # remark #981: operands are evaluated in unspecified order
21837 # warning #279: controlling expression is constant
21839 { echo "$as_me:21839: checking for $CC warning options..." >&5
21840 echo "$as_me: checking for $CC warning options..." >&6;}
21841 cf_save_CFLAGS="$CFLAGS"
21842 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
21854 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21855 if { (eval echo "$as_me:21855: \"$ac_compile\"") >&5
21856 (eval $ac_compile) 2>&5
21858 echo "$as_me:21858: \$? = $ac_status" >&5
21859 (exit "$ac_status"); }; then
21860 test -n "$verbose" && echo "$as_me:21860: result: ... -$cf_opt" >&5
21861 echo "${ECHO_T}... -$cf_opt" >&6
21862 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21865 CFLAGS="$cf_save_CFLAGS"
21866 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
21868 { echo "$as_me:21868: checking for $CC warning options..." >&5
21869 echo "$as_me: checking for $CC warning options..." >&6;}
21870 cf_save_CFLAGS="$CFLAGS"
21872 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21873 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21874 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21875 for cf_opt in W Wall \
21876 Wbad-function-cast \
21879 Wdeclaration-after-statement \
21882 Wmissing-declarations \
21883 Wmissing-prototypes \
21887 Wstrict-prototypes \
21888 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
21890 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21891 if { (eval echo "$as_me:21891: \"$ac_compile\"") >&5
21892 (eval $ac_compile) 2>&5
21894 echo "$as_me:21894: \$? = $ac_status" >&5
21895 (exit "$ac_status"); }; then
21896 test -n "$verbose" && echo "$as_me:21896: result: ... -$cf_opt" >&5
21897 echo "${ECHO_T}... -$cf_opt" >&6
21900 case "$GCC_VERSION" in
21902 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21904 echo "${as_me:-configure}:21904: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21910 case "$GCC_VERSION" in
21912 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
21914 echo "${as_me:-configure}:21914: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21920 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21923 CFLAGS="$cf_save_CFLAGS"
21931 echo "$as_me:21931: checking if you want to use dmalloc for testing" >&5
21932 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
21934 # Check whether --with-dmalloc or --without-dmalloc was given.
21935 if test "${with_dmalloc+set}" = set; then
21936 withval="$with_dmalloc"
21938 cat >>confdefs.h <<EOF
21939 #define USE_DMALLOC 1
21942 : "${with_cflags:=-g}"
21943 : "${enable_leaks:=no}"
21948 echo "$as_me:21948: result: ${with_dmalloc:-no}" >&5
21949 echo "${ECHO_T}${with_dmalloc:-no}" >&6
21951 case ".$with_cflags" in
21961 cf_new_extra_cppflags=
21963 for cf_add_cflags in -g
21965 case "$cf_fix_cppflags" in
21967 case "$cf_add_cflags" in
21968 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21969 case "$cf_add_cflags" in
21971 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21973 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21974 && test -z "${cf_tst_cflags}" \
21975 && cf_fix_cppflags=yes
21977 if test "$cf_fix_cppflags" = yes ; then
21979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21983 elif test "${cf_tst_cflags}" = "\"'" ; then
21985 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21986 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21992 case "$CPPFLAGS" in
21996 case "$cf_add_cflags" in
21998 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22000 CPPFLAGS=`echo "$CPPFLAGS" | \
22001 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22002 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22007 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22008 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22015 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22016 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22023 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22024 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22026 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22028 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22029 && test -z "${cf_tst_cflags}" \
22030 && cf_fix_cppflags=no
22035 if test -n "$cf_new_cflags" ; then
22037 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22038 CFLAGS="${CFLAGS}$cf_new_cflags"
22042 if test -n "$cf_new_cppflags" ; then
22044 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22045 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22049 if test -n "$cf_new_extra_cppflags" ; then
22051 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22052 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22061 if test "$with_dmalloc" = yes ; then
22062 echo "$as_me:22062: checking for dmalloc.h" >&5
22063 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22064 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22065 echo $ECHO_N "(cached) $ECHO_C" >&6
22067 cat >"conftest.$ac_ext" <<_ACEOF
22068 #line 22068 "configure"
22069 #include "confdefs.h"
22070 #include <dmalloc.h>
22072 if { (eval echo "$as_me:22072: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22073 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22075 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22077 cat conftest.err >&5
22078 echo "$as_me:22078: \$? = $ac_status" >&5
22079 (exit "$ac_status"); } >/dev/null; then
22080 if test -s conftest.err; then
22081 ac_cpp_err=$ac_c_preproc_warn_flag
22088 if test -z "$ac_cpp_err"; then
22089 ac_cv_header_dmalloc_h=yes
22091 echo "$as_me: failed program was:" >&5
22092 cat "conftest.$ac_ext" >&5
22093 ac_cv_header_dmalloc_h=no
22095 rm -f conftest.err "conftest.$ac_ext"
22097 echo "$as_me:22097: result: $ac_cv_header_dmalloc_h" >&5
22098 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22099 if test "$ac_cv_header_dmalloc_h" = yes; then
22101 echo "$as_me:22101: checking for dmalloc_debug in -ldmalloc" >&5
22102 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22103 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22104 echo $ECHO_N "(cached) $ECHO_C" >&6
22106 ac_check_lib_save_LIBS=$LIBS
22107 LIBS="-ldmalloc $LIBS"
22108 cat >"conftest.$ac_ext" <<_ACEOF
22109 #line 22109 "configure"
22110 #include "confdefs.h"
22112 /* Override any gcc2 internal prototype to avoid an error. */
22116 /* We use char because int might match the return type of a gcc2
22117 builtin and then its argument prototype would still apply. */
22118 char dmalloc_debug ();
22127 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22128 if { (eval echo "$as_me:22128: \"$ac_link\"") >&5
22129 (eval $ac_link) 2>&5
22131 echo "$as_me:22131: \$? = $ac_status" >&5
22132 (exit "$ac_status"); } &&
22133 { ac_try='test -s "conftest$ac_exeext"'
22134 { (eval echo "$as_me:22134: \"$ac_try\"") >&5
22135 (eval $ac_try) 2>&5
22137 echo "$as_me:22137: \$? = $ac_status" >&5
22138 (exit "$ac_status"); }; }; then
22139 ac_cv_lib_dmalloc_dmalloc_debug=yes
22141 echo "$as_me: failed program was:" >&5
22142 cat "conftest.$ac_ext" >&5
22143 ac_cv_lib_dmalloc_dmalloc_debug=no
22145 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22146 LIBS=$ac_check_lib_save_LIBS
22148 echo "$as_me:22148: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22149 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22150 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22151 cat >>confdefs.h <<EOF
22152 #define HAVE_LIBDMALLOC 1
22155 LIBS="-ldmalloc $LIBS"
22163 echo "$as_me:22163: checking if you want to use dbmalloc for testing" >&5
22164 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22166 # Check whether --with-dbmalloc or --without-dbmalloc was given.
22167 if test "${with_dbmalloc+set}" = set; then
22168 withval="$with_dbmalloc"
22170 cat >>confdefs.h <<EOF
22171 #define USE_DBMALLOC 1
22174 : "${with_cflags:=-g}"
22175 : "${enable_leaks:=no}"
22180 echo "$as_me:22180: result: ${with_dbmalloc:-no}" >&5
22181 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22183 case ".$with_cflags" in
22193 cf_new_extra_cppflags=
22195 for cf_add_cflags in -g
22197 case "$cf_fix_cppflags" in
22199 case "$cf_add_cflags" in
22200 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22201 case "$cf_add_cflags" in
22203 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22205 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22206 && test -z "${cf_tst_cflags}" \
22207 && cf_fix_cppflags=yes
22209 if test "$cf_fix_cppflags" = yes ; then
22211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22215 elif test "${cf_tst_cflags}" = "\"'" ; then
22217 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22218 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22224 case "$CPPFLAGS" in
22228 case "$cf_add_cflags" in
22230 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22232 CPPFLAGS=`echo "$CPPFLAGS" | \
22233 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22234 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22239 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22240 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22247 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22248 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22255 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22256 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22258 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22260 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22261 && test -z "${cf_tst_cflags}" \
22262 && cf_fix_cppflags=no
22267 if test -n "$cf_new_cflags" ; then
22269 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22270 CFLAGS="${CFLAGS}$cf_new_cflags"
22274 if test -n "$cf_new_cppflags" ; then
22276 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22277 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22281 if test -n "$cf_new_extra_cppflags" ; then
22283 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22284 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22293 if test "$with_dbmalloc" = yes ; then
22294 echo "$as_me:22294: checking for dbmalloc.h" >&5
22295 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
22296 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
22297 echo $ECHO_N "(cached) $ECHO_C" >&6
22299 cat >"conftest.$ac_ext" <<_ACEOF
22300 #line 22300 "configure"
22301 #include "confdefs.h"
22302 #include <dbmalloc.h>
22304 if { (eval echo "$as_me:22304: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22305 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22307 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22309 cat conftest.err >&5
22310 echo "$as_me:22310: \$? = $ac_status" >&5
22311 (exit "$ac_status"); } >/dev/null; then
22312 if test -s conftest.err; then
22313 ac_cpp_err=$ac_c_preproc_warn_flag
22320 if test -z "$ac_cpp_err"; then
22321 ac_cv_header_dbmalloc_h=yes
22323 echo "$as_me: failed program was:" >&5
22324 cat "conftest.$ac_ext" >&5
22325 ac_cv_header_dbmalloc_h=no
22327 rm -f conftest.err "conftest.$ac_ext"
22329 echo "$as_me:22329: result: $ac_cv_header_dbmalloc_h" >&5
22330 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
22331 if test "$ac_cv_header_dbmalloc_h" = yes; then
22333 echo "$as_me:22333: checking for debug_malloc in -ldbmalloc" >&5
22334 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
22335 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
22336 echo $ECHO_N "(cached) $ECHO_C" >&6
22338 ac_check_lib_save_LIBS=$LIBS
22339 LIBS="-ldbmalloc $LIBS"
22340 cat >"conftest.$ac_ext" <<_ACEOF
22341 #line 22341 "configure"
22342 #include "confdefs.h"
22344 /* Override any gcc2 internal prototype to avoid an error. */
22348 /* We use char because int might match the return type of a gcc2
22349 builtin and then its argument prototype would still apply. */
22350 char debug_malloc ();
22359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22360 if { (eval echo "$as_me:22360: \"$ac_link\"") >&5
22361 (eval $ac_link) 2>&5
22363 echo "$as_me:22363: \$? = $ac_status" >&5
22364 (exit "$ac_status"); } &&
22365 { ac_try='test -s "conftest$ac_exeext"'
22366 { (eval echo "$as_me:22366: \"$ac_try\"") >&5
22367 (eval $ac_try) 2>&5
22369 echo "$as_me:22369: \$? = $ac_status" >&5
22370 (exit "$ac_status"); }; }; then
22371 ac_cv_lib_dbmalloc_debug_malloc=yes
22373 echo "$as_me: failed program was:" >&5
22374 cat "conftest.$ac_ext" >&5
22375 ac_cv_lib_dbmalloc_debug_malloc=no
22377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22378 LIBS=$ac_check_lib_save_LIBS
22380 echo "$as_me:22380: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
22381 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
22382 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
22383 cat >>confdefs.h <<EOF
22384 #define HAVE_LIBDBMALLOC 1
22387 LIBS="-ldbmalloc $LIBS"
22395 echo "$as_me:22395: checking if you want to use valgrind for testing" >&5
22396 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
22398 # Check whether --with-valgrind or --without-valgrind was given.
22399 if test "${with_valgrind+set}" = set; then
22400 withval="$with_valgrind"
22402 cat >>confdefs.h <<EOF
22403 #define USE_VALGRIND 1
22406 : "${with_cflags:=-g}"
22407 : "${enable_leaks:=no}"
22412 echo "$as_me:22412: result: ${with_valgrind:-no}" >&5
22413 echo "${ECHO_T}${with_valgrind:-no}" >&6
22415 case ".$with_cflags" in
22425 cf_new_extra_cppflags=
22427 for cf_add_cflags in -g
22429 case "$cf_fix_cppflags" in
22431 case "$cf_add_cflags" in
22432 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22433 case "$cf_add_cflags" in
22435 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22437 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22438 && test -z "${cf_tst_cflags}" \
22439 && cf_fix_cppflags=yes
22441 if test "$cf_fix_cppflags" = yes ; then
22443 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22444 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22447 elif test "${cf_tst_cflags}" = "\"'" ; then
22449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22456 case "$CPPFLAGS" in
22460 case "$cf_add_cflags" in
22462 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22464 CPPFLAGS=`echo "$CPPFLAGS" | \
22465 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22466 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22471 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22472 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22479 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22480 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22487 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22488 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22490 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22492 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22493 && test -z "${cf_tst_cflags}" \
22494 && cf_fix_cppflags=no
22499 if test -n "$cf_new_cflags" ; then
22501 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22502 CFLAGS="${CFLAGS}$cf_new_cflags"
22506 if test -n "$cf_new_cppflags" ; then
22508 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22509 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22513 if test -n "$cf_new_extra_cppflags" ; then
22515 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22516 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22525 echo "$as_me:22525: checking if you want to perform memory-leak testing" >&5
22526 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
22528 # Check whether --enable-leaks or --disable-leaks was given.
22529 if test "${enable_leaks+set}" = set; then
22530 enableval="$enable_leaks"
22535 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
22536 echo "$as_me:22536: result: $with_no_leaks" >&5
22537 echo "${ECHO_T}$with_no_leaks" >&6
22539 if test "$enable_leaks" = no ; then
22541 cat >>confdefs.h <<\EOF
22545 cat >>confdefs.h <<\EOF
22546 #define YY_NO_LEAKS 1
22552 if test "x$cf_cv_enable_rpath" != xno
22554 echo "$as_me:22554: checking for an rpath option" >&5
22555 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
22556 case "$cf_cv_system_name" in
22558 if test "$GCC" = yes; then
22559 LD_RPATH_OPT="-Wl,-rpath,"
22561 LD_RPATH_OPT="-rpath "
22564 (linux*|gnu*|k*bsd*-gnu|freebsd*)
22565 LD_RPATH_OPT="-Wl,-rpath,"
22567 (openbsd[2-9].*|mirbsd*)
22568 LD_RPATH_OPT="-Wl,-rpath,"
22571 LD_RPATH_OPT="-rpath "
22574 LD_RPATH_OPT="-Wl,-rpath,"
22577 LD_RPATH_OPT="-rpath "
22585 echo "$as_me:22585: result: $LD_RPATH_OPT" >&5
22586 echo "${ECHO_T}$LD_RPATH_OPT" >&6
22588 case "x$LD_RPATH_OPT" in
22590 echo "$as_me:22590: checking if we need a space after rpath option" >&5
22591 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
22592 cf_save_LIBS="$LIBS"
22594 cf_add_libs="$LIBS"
22597 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22598 # filter duplicates
22599 for cf_add_1lib in $cf_add_0lib; do
22600 for cf_add_2lib in $cf_add_libs; do
22601 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22606 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22608 LIBS="$cf_add_libs"
22610 cat >"conftest.$ac_ext" <<_ACEOF
22611 #line 22611 "configure"
22612 #include "confdefs.h"
22622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22623 if { (eval echo "$as_me:22623: \"$ac_link\"") >&5
22624 (eval $ac_link) 2>&5
22626 echo "$as_me:22626: \$? = $ac_status" >&5
22627 (exit "$ac_status"); } &&
22628 { ac_try='test -s "conftest$ac_exeext"'
22629 { (eval echo "$as_me:22629: \"$ac_try\"") >&5
22630 (eval $ac_try) 2>&5
22632 echo "$as_me:22632: \$? = $ac_status" >&5
22633 (exit "$ac_status"); }; }; then
22636 echo "$as_me: failed program was:" >&5
22637 cat "conftest.$ac_ext" >&5
22640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22641 LIBS="$cf_save_LIBS"
22642 echo "$as_me:22642: result: $cf_rpath_space" >&5
22643 echo "${ECHO_T}$cf_rpath_space" >&6
22644 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
22649 echo "$as_me:22649: checking if rpath-hack should be disabled" >&5
22650 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
22652 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
22653 if test "${enable_rpath_hack+set}" = set; then
22654 enableval="$enable_rpath_hack"
22655 test "$enableval" != no && enableval=yes
22656 if test "$enableval" != "yes" ; then
22657 enable_rpath_hack=no
22659 enable_rpath_hack=yes
22663 enable_rpath_hack=yes
22666 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
22667 echo "$as_me:22667: result: $cf_disable_rpath_hack" >&5
22668 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
22670 if test "$enable_rpath_hack" = yes ; then
22672 echo "$as_me:22672: checking for updated LDFLAGS" >&5
22673 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
22674 if test -n "$LD_RPATH_OPT" ; then
22675 echo "$as_me:22675: result: maybe" >&5
22676 echo "${ECHO_T}maybe" >&6
22680 # Extract the first word of "$ac_prog", so it can be a program name with args.
22681 set dummy $ac_prog; ac_word=$2
22682 echo "$as_me:22682: checking for $ac_word" >&5
22683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22684 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
22685 echo $ECHO_N "(cached) $ECHO_C" >&6
22687 if test -n "$cf_ldd_prog"; then
22688 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
22690 ac_save_IFS=$IFS; IFS=$ac_path_separator
22692 for ac_dir in $ac_dummy; do
22694 test -z "$ac_dir" && ac_dir=.
22695 $as_executable_p "$ac_dir/$ac_word" || continue
22696 ac_cv_prog_cf_ldd_prog="$ac_prog"
22697 echo "$as_me:22697: found $ac_dir/$ac_word" >&5
22703 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
22704 if test -n "$cf_ldd_prog"; then
22705 echo "$as_me:22705: result: $cf_ldd_prog" >&5
22706 echo "${ECHO_T}$cf_ldd_prog" >&6
22708 echo "$as_me:22708: result: no" >&5
22709 echo "${ECHO_T}no" >&6
22712 test -n "$cf_ldd_prog" && break
22714 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
22716 cf_rpath_list="/usr/lib /lib"
22717 if test "$cf_ldd_prog" != no
22721 cat >"conftest.$ac_ext" <<_ACEOF
22722 #line 22722 "configure"
22723 #include "confdefs.h"
22733 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22734 if { (eval echo "$as_me:22734: \"$ac_link\"") >&5
22735 (eval $ac_link) 2>&5
22737 echo "$as_me:22737: \$? = $ac_status" >&5
22738 (exit "$ac_status"); } &&
22739 { ac_try='test -s "conftest$ac_exeext"'
22740 { (eval echo "$as_me:22740: \"$ac_try\"") >&5
22741 (eval $ac_try) 2>&5
22743 echo "$as_me:22743: \$? = $ac_status" >&5
22744 (exit "$ac_status"); }; }; then
22745 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
22746 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
22748 echo "$as_me: failed program was:" >&5
22749 cat "conftest.$ac_ext" >&5
22751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22753 # If we passed the link-test, but get a "not found" on a given library,
22754 # this could be due to inept reconfiguration of gcc to make it only
22755 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
22756 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
22757 # /usr/local libraries.
22758 if test -n "$cf_rpath_oops"
22760 for cf_rpath_src in $cf_rpath_oops
22762 for cf_rpath_dir in \
22767 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
22769 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
22771 echo "${as_me:-configure}:22771: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
22773 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
22781 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22783 echo "${as_me:-configure}:22783: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22785 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
22787 echo "${as_me:-configure}:22787: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
22790 for cf_rpath_src in $LDFLAGS
22792 case "$cf_rpath_src" in
22795 # check if this refers to a directory which we will ignore
22797 if test -n "$cf_rpath_list"
22799 for cf_rpath_item in $cf_rpath_list
22801 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22809 if test "$cf_rpath_skip" = no
22811 # transform the option
22812 if test "$LD_RPATH_OPT" = "-R " ; then
22813 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22815 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22818 # if we have not already added this, add it now
22819 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22820 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22822 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22824 echo "${as_me:-configure}:22824: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22826 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22831 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22833 LDFLAGS=$cf_rpath_dst
22835 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
22837 echo "${as_me:-configure}:22837: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
22839 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
22841 echo "${as_me:-configure}:22841: testing ...checking LIBS $LIBS ..." 1>&5
22844 for cf_rpath_src in $LIBS
22846 case "$cf_rpath_src" in
22849 # check if this refers to a directory which we will ignore
22851 if test -n "$cf_rpath_list"
22853 for cf_rpath_item in $cf_rpath_list
22855 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
22863 if test "$cf_rpath_skip" = no
22865 # transform the option
22866 if test "$LD_RPATH_OPT" = "-R " ; then
22867 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
22869 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
22872 # if we have not already added this, add it now
22873 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
22874 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
22876 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
22878 echo "${as_me:-configure}:22878: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
22880 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
22885 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
22889 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
22891 echo "${as_me:-configure}:22891: testing ...checked LIBS $LIBS ..." 1>&5
22893 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
22895 echo "${as_me:-configure}:22895: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
22898 echo "$as_me:22898: result: no" >&5
22899 echo "${ECHO_T}no" >&6
22907 ac_config_files="$ac_config_files Makefile"
22908 ac_config_commands="$ac_config_commands default"
22909 cat >confcache <<\_ACEOF
22910 # This file is a shell script that caches the results of configure
22911 # tests run on this system so they can be shared between configure
22912 # scripts and configure runs, see configure's option --config-cache.
22913 # It is not useful on other systems. If it contains results you don't
22914 # want to keep, you may remove or edit it.
22916 # config.status only pays attention to the cache file if you give it
22917 # the --recheck option to rerun configure.
22919 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22920 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22921 # following values.
22925 # The following way of writing the cache mishandles newlines in values,
22926 # but we know of no workaround that is simple, portable, and efficient.
22927 # So, don't put newlines in cache variables' values.
22928 # Ultrix sh set writes to stderr and can't be redirected directly,
22929 # and sets the high bit in the cache file unless we assign to the vars.
22932 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22934 # `set' does not quote correctly, so add quotes (double-quote
22935 # substitution turns \\\\ into \\, and sed turns \\ into \).
22938 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22941 # `set' quotes correctly as required by POSIX, so do not add quotes.
22943 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22950 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22952 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22954 if cmp -s $cache_file confcache; then :; else
22955 if test -w $cache_file; then
22956 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22957 cat confcache >$cache_file
22959 echo "not updating unwritable cache $cache_file"
22964 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22965 # Let make expand exec_prefix.
22966 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22968 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22969 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22970 # trailing colons and then remove the whole line if VPATH becomes empty
22971 # (actually we leave an empty line to preserve line numbers).
22972 if test "x$srcdir" = x.; then
22973 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22974 s/:*\$(srcdir):*/:/;
22975 s/:*\${srcdir}:*/:/;
22977 s/^\([^=]*=[ ]*\):*/\1/;
22983 DEFS=-DHAVE_CONFIG_H
22985 : "${CONFIG_STATUS=./config.status}"
22986 ac_clean_files_save=$ac_clean_files
22987 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22988 { echo "$as_me:22988: creating $CONFIG_STATUS" >&5
22989 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22990 cat >"$CONFIG_STATUS" <<_ACEOF
22992 # Generated automatically by configure.
22993 # Run this file to recreate the current configuration.
22994 # Compiler output produced by configure, useful for debugging
22995 # configure, is in config.log if it exists.
22998 SHELL=\${CONFIG_SHELL-$SHELL}
22999 ac_cs_invocation="\$0 \$@"
23001 CLICOLOR_FORCE= GREP_OPTIONS=
23002 unset CLICOLOR_FORCE GREP_OPTIONS
23005 cat >>"$CONFIG_STATUS" <<\_ACEOF
23006 # Be Bourne compatible
23007 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23010 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23014 # Name of the executable.
23015 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23017 if expr a : '\(a\)' >/dev/null 2>&1; then
23023 rm -f conf$$ conf$$.exe conf$$.file
23025 if ln -s conf$$.file conf$$ 2>/dev/null; then
23026 # We could just check for DJGPP; but this test a) works b) is more generic
23027 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23028 if test -f conf$$.exe; then
23029 # Don't use ln at all; we don't have any links
23034 elif ln conf$$.file conf$$ 2>/dev/null; then
23039 rm -f conf$$ conf$$.exe conf$$.file
23041 as_executable_p="test -f"
23043 # Support unset when possible.
23044 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23051 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23052 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23053 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23054 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23055 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23056 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23057 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23058 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23061 # We need space, tab and new line, in precisely that order.
23067 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23073 # Files that config.status was made for.
23074 if test -n "$ac_config_files"; then
23075 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23078 if test -n "$ac_config_headers"; then
23079 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23082 if test -n "$ac_config_links"; then
23083 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23086 if test -n "$ac_config_commands"; then
23087 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23090 cat >>"$CONFIG_STATUS" <<\EOF
23093 \`$as_me' instantiates files from templates according to the
23094 current configuration.
23096 Usage: $0 [OPTIONS] [FILE]...
23098 -h, --help print this help, then exit
23099 -V, --version print version number, then exit
23100 -d, --debug don't remove temporary files
23101 --recheck update $as_me by reconfiguring in the same conditions
23102 --file=FILE[:TEMPLATE]
23103 instantiate the configuration file FILE
23104 --header=FILE[:TEMPLATE]
23105 instantiate the configuration header FILE
23107 Configuration files:
23110 Configuration headers:
23113 Configuration commands:
23116 Report bugs to <dickey@invisible-island.net>."
23119 cat >>"$CONFIG_STATUS" <<EOF
23122 configured by $0, generated by GNU Autoconf 2.52.20210105,
23123 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23125 Copyright 2003-2020,2021 Thomas E. Dickey
23126 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23127 Free Software Foundation, Inc.
23128 This config.status script is free software; the Free Software Foundation
23129 gives unlimited permission to copy, distribute and modify it."
23134 cat >>"$CONFIG_STATUS" <<\EOF
23135 # If no file are specified by the user, then we need to provide default
23136 # value. By we need to know if files were specified by the user.
23142 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23143 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23145 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23149 *) # This is not an option, so the user has probably given explicit
23151 ac_need_defaults=false;;
23155 # Handling of the options.
23157 cat >>"$CONFIG_STATUS" <<EOF
23158 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23159 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23160 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23162 cat >>"$CONFIG_STATUS" <<\EOF
23163 --version | --vers* | -V )
23164 echo "$ac_cs_version"; exit 0 ;;
23166 # Conflict between --help and --header
23167 { { echo "$as_me:23167: error: ambiguous option: $1
23168 Try \`$0 --help' for more information." >&5
23169 echo "$as_me: error: ambiguous option: $1
23170 Try \`$0 --help' for more information." >&2;}
23171 { (exit 1); exit 1; }; };;
23172 --help | --hel | -h )
23173 echo "$ac_cs_usage"; exit 0 ;;
23174 --debug | --d* | -d )
23176 --file | --fil | --fi | --f )
23178 CONFIG_FILES="$CONFIG_FILES $1"
23179 ac_need_defaults=false;;
23180 --header | --heade | --head | --hea )
23182 CONFIG_HEADERS="$CONFIG_HEADERS $1"
23183 ac_need_defaults=false;;
23185 # This is an error.
23186 -*) { { echo "$as_me:23186: error: unrecognized option: $1
23187 Try \`$0 --help' for more information." >&5
23188 echo "$as_me: error: unrecognized option: $1
23189 Try \`$0 --help' for more information." >&2;}
23190 { (exit 1); exit 1; }; } ;;
23192 *) ac_config_targets="$ac_config_targets $1" ;;
23201 ## ----------------------- ##
23202 ## Running config.status. ##
23203 ## ----------------------- ##
23205 This file was extended by $as_me 2.52.20210105, executed with
23206 CONFIG_FILES = $CONFIG_FILES
23207 CONFIG_HEADERS = $CONFIG_HEADERS
23208 CONFIG_LINKS = $CONFIG_LINKS
23209 CONFIG_COMMANDS = $CONFIG_COMMANDS
23210 > "$ac_cs_invocation"
23211 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23216 cat >>"$CONFIG_STATUS" <<EOF
23218 # INIT-COMMANDS section.
23228 cat >>"$CONFIG_STATUS" <<\EOF
23229 for ac_config_target in $ac_config_targets
23231 case "$ac_config_target" in
23232 # Handling of arguments.
23233 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23234 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23235 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
23236 *) { { echo "$as_me:23236: error: invalid argument: $ac_config_target" >&5
23237 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23238 { (exit 1); exit 1; }; };;
23242 # If the user did not use the arguments to specify the items to instantiate,
23243 # then the envvar interface is used. Set only those that are not.
23244 # We use the long form for the default assignment because of an extremely
23245 # bizarre bug on SunOS 4.1.3.
23246 if "$ac_need_defaults"; then
23247 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23248 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23249 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23252 # Create a temporary directory, and hook for its removal unless debugging.
23255 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23256 trap '{ (exit 1); exit 1; }' 1 2 13 15
23259 # Create a (secure) tmp directory for tmp files.
23262 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23263 test -n "$tmp" && test -d "$tmp"
23266 tmp=$TMPDIR/cs$$-$RANDOM
23267 (umask 077 && mkdir $tmp)
23270 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23271 { (exit 1); exit 1; }
23276 cat >>"$CONFIG_STATUS" <<EOF
23279 # CONFIG_FILES section.
23282 # No need to generate the scripts if there are no CONFIG_FILES.
23283 # This happens for instance when ./config.status config.h
23284 if test -n "\$CONFIG_FILES"; then
23285 # Protect against being on the right side of a sed subst in config.status.
23286 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23287 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23288 s,@SHELL@,$SHELL,;t t
23289 s,@exec_prefix@,$exec_prefix,;t t
23290 s,@prefix@,$prefix,;t t
23291 s,@program_transform_name@,$program_transform_name,;t t
23292 s,@bindir@,$bindir,;t t
23293 s,@sbindir@,$sbindir,;t t
23294 s,@libexecdir@,$libexecdir,;t t
23295 s,@datarootdir@,$datarootdir,;t t
23296 s,@datadir@,$datadir,;t t
23297 s,@sysconfdir@,$sysconfdir,;t t
23298 s,@sharedstatedir@,$sharedstatedir,;t t
23299 s,@localstatedir@,$localstatedir,;t t
23300 s,@runstatedir@,$runstatedir,;t t
23301 s,@libdir@,$libdir,;t t
23302 s,@includedir@,$includedir,;t t
23303 s,@oldincludedir@,$oldincludedir,;t t
23304 s,@infodir@,$infodir,;t t
23305 s,@mandir@,$mandir,;t t
23306 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23307 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23308 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23309 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23310 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23311 s,@build_alias@,$build_alias,;t t
23312 s,@host_alias@,$host_alias,;t t
23313 s,@target_alias@,$target_alias,;t t
23314 s,@ECHO_C@,$ECHO_C,;t t
23315 s,@ECHO_N@,$ECHO_N,;t t
23316 s,@ECHO_T@,$ECHO_T,;t t
23317 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23318 s,@DEFS@,$DEFS,;t t
23319 s,@LIBS@,$LIBS,;t t
23320 s,@build@,$build,;t t
23321 s,@build_cpu@,$build_cpu,;t t
23322 s,@build_vendor@,$build_vendor,;t t
23323 s,@build_os@,$build_os,;t t
23324 s,@host@,$host,;t t
23325 s,@host_cpu@,$host_cpu,;t t
23326 s,@host_vendor@,$host_vendor,;t t
23327 s,@host_os@,$host_os,;t t
23328 s,@SET_MAKE@,$SET_MAKE,;t t
23330 s,@CFLAGS@,$CFLAGS,;t t
23331 s,@LDFLAGS@,$LDFLAGS,;t t
23332 s,@CPPFLAGS@,$CPPFLAGS,;t t
23333 s,@ac_ct_CC@,$ac_ct_CC,;t t
23334 s,@EXEEXT@,$EXEEXT,;t t
23335 s,@OBJEXT@,$OBJEXT,;t t
23336 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23338 s,@GREP@,$GREP,;t t
23339 s,@EGREP@,$EGREP,;t t
23341 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23342 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23343 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23344 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
23345 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
23346 s,@LINT@,$LINT,;t t
23347 s,@LINT_OPTS@,$LINT_OPTS,;t t
23348 s,@CTAGS@,$CTAGS,;t t
23349 s,@ETAGS@,$ETAGS,;t t
23350 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23351 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23352 s,@MATH_LIB@,$MATH_LIB,;t t
23353 s,@top_builddir@,$top_builddir,;t t
23354 s,@CC_G_OPT@,$CC_G_OPT,;t t
23355 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23356 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23357 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23358 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23360 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23361 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23362 s,@LD_MODEL@,$LD_MODEL,;t t
23363 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23364 s,@LIBTOOL@,$LIBTOOL,;t t
23365 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23366 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23367 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23368 s,@LIB_LINK@,$LIB_LINK,;t t
23369 s,@LINK_TESTS@,$LINK_TESTS,;t t
23370 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23371 s,@PACKAGE@,$PACKAGE,;t t
23372 s,@PTHREAD@,$PTHREAD,;t t
23373 s,@TEST_ARGS@,$TEST_ARGS,;t t
23374 s,@TEST_DEPS@,$TEST_DEPS,;t t
23375 s,@TEST_LIBS@,$TEST_LIBS,;t t
23376 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23377 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23378 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23379 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23380 s,@includesubdir@,$includesubdir,;t t
23381 s,@FGREP@,$FGREP,;t t
23382 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
23383 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23384 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23385 s,@ECHO_LT@,$ECHO_LT,;t t
23386 s,@ECHO_LD@,$ECHO_LD,;t t
23387 s,@RULE_CC@,$RULE_CC,;t t
23388 s,@SHOW_CC@,$SHOW_CC,;t t
23389 s,@ECHO_CC@,$ECHO_CC,;t t
23390 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23391 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
23392 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
23393 s,@X_CFLAGS@,$X_CFLAGS,;t t
23394 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
23395 s,@X_LIBS@,$X_LIBS,;t t
23396 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
23397 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
23398 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
23399 s,@RGB_PATH@,$RGB_PATH,;t t
23400 s,@no_x11_rgb@,$no_x11_rgb,;t t
23401 s,@FORM_NAME@,$FORM_NAME,;t t
23402 s,@MENU_NAME@,$MENU_NAME,;t t
23403 s,@PANEL_NAME@,$PANEL_NAME,;t t
23404 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23405 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23406 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23411 cat >>"$CONFIG_STATUS" <<\EOF
23412 # Split the substitutions into bite-sized pieces for seds with
23413 # small command number limits, like on Digital OSF/1 and HP-UX.
23414 ac_max_sed_lines=48
23415 ac_sed_frag=1 # Number of current file.
23416 ac_beg=1 # First line for current file.
23417 ac_end=$ac_max_sed_lines # Line after last line for current file.
23420 while "$ac_more_lines"; do
23421 if test "$ac_beg" -gt 1; then
23422 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23424 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23426 if test ! -s $tmp/subs.frag; then
23427 ac_more_lines=false
23429 # The purpose of the label and of the branching condition is to
23430 # speed up the sed processing (if there are no `@' at all, there
23431 # is no need to browse any of the substitutions).
23432 # These are the two extra sed commands mentioned above.
23434 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23435 # It is possible to make a multiline substitution using escaped newlines.
23436 # Ensure that we do not split the substitution between script fragments.
23438 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
23439 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23440 if test -s $tmp/subs.next; then
23441 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23442 if test ! -s $tmp/subs.edit; then
23443 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23444 if test ! -s $tmp/subs.edit; then
23445 if test "$ac_beg" -gt 1; then
23446 ac_end=`expr "$ac_end" - 1`
23453 if test -z "$ac_sed_cmds"; then
23454 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23456 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23458 ac_sed_frag=`expr "$ac_sed_frag" + 1`
23460 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
23463 if test -z "$ac_sed_cmds"; then
23466 fi # test -n "$CONFIG_FILES"
23469 cat >>"$CONFIG_STATUS" <<\EOF
23470 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23471 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23473 - | *:- | *:-:* ) # input from stdin
23475 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23476 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23477 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23478 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23479 * ) ac_file_in=$ac_file.in ;;
23482 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23483 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23484 X"$ac_file" : 'X\(//\)[^/]' \| \
23485 X"$ac_file" : 'X\(//\)$' \| \
23486 X"$ac_file" : 'X\(/\)' \| \
23487 . : '\(.\)' 2>/dev/null ||
23489 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23490 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23491 /^X\(\/\/\)$/{ s//\1/; q; }
23492 /^X\(\/\).*/{ s//\1/; q; }
23494 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23495 { case "$ac_dir" in
23496 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23500 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23501 case $as_mkdir_dir in
23502 # Skip DOS drivespec
23503 ?:) as_incr_dir=$as_mkdir_dir ;;
23505 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23506 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23511 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23512 # A "../" for each directory in $ac_dir_suffix.
23513 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23515 ac_dir_suffix= ac_dots=
23520 if test -z "$ac_dots"; then
23523 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
23525 [\\/]* | ?:[\\/]* )
23526 ac_srcdir="$srcdir$ac_dir_suffix";
23527 ac_top_srcdir="$srcdir" ;;
23528 *) # Relative path.
23529 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
23530 ac_top_srcdir="$ac_dots$srcdir" ;;
23534 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23535 *) ac_INSTALL=$ac_dots$INSTALL ;;
23538 if test x"$ac_file" != x-; then
23539 { echo "$as_me:23539: creating $ac_file" >&5
23540 echo "$as_me: creating $ac_file" >&6;}
23543 # Let's still pretend it is `configure' which instantiates (i.e., don't
23544 # use $as_me), people would be surprised to read:
23545 # /* config.h. Generated automatically by config.status. */
23546 configure_input="Generated automatically from `echo $ac_file_in |
23547 sed 's,.*/,,'` by configure."
23549 # First look for the input files in the build tree, otherwise in the
23551 ac_file_inputs=`IFS=:
23552 for f in $ac_file_in; do
23554 -) echo $tmp/stdin ;;
23556 # Absolute (can't be DOS-style, as IFS=:)
23557 test -f "$f" || { { echo "$as_me:23557: error: cannot find input file: $f" >&5
23558 echo "$as_me: error: cannot find input file: $f" >&2;}
23559 { (exit 1); exit 1; }; }
23562 if test -f "$f"; then
23565 elif test -f "$srcdir/$f"; then
23570 { { echo "$as_me:23570: error: cannot find input file: $f" >&5
23571 echo "$as_me: error: cannot find input file: $f" >&2;}
23572 { (exit 1); exit 1; }; }
23575 done` || { (exit 1); exit 1; }
23577 cat >>"$CONFIG_STATUS" <<\EOF
23578 ac_warn_datarootdir=no
23579 if test x"$ac_file" != x-; then
23580 for ac_item in $ac_file_inputs
23582 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
23583 if test -n "$ac_seen"; then
23584 ac_used=`grep '@datarootdir@' "$ac_item"`
23585 if test -z "$ac_used"; then
23586 { echo "$as_me:23586: WARNING: datarootdir was used implicitly but not set:
23588 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23590 ac_warn_datarootdir=yes
23593 ac_seen=`grep '${datarootdir}' "$ac_item"`
23594 if test -n "$ac_seen"; then
23595 { echo "$as_me:23595: WARNING: datarootdir was used explicitly but not set:
23597 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23599 ac_warn_datarootdir=yes
23604 if test "x$ac_warn_datarootdir" = xyes; then
23605 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23609 cat >>"$CONFIG_STATUS" <<EOF
23613 cat >>"$CONFIG_STATUS" <<\EOF
23615 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23616 s,@configure_input@,$configure_input,;t t
23617 s,@srcdir@,$ac_srcdir,;t t
23618 s,@top_srcdir@,$ac_top_srcdir,;t t
23619 s,@INSTALL@,$ac_INSTALL,;t t
23620 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23622 if test x"$ac_file" != x-; then
23623 cp "$tmp/out" "$ac_file"
23625 for ac_name in prefix exec_prefix datarootdir
23627 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
23628 if test -n "$ac_seen"; then
23629 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
23630 if test -z "$ac_init"; then
23631 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23632 { echo "$as_me:23632: WARNING: Variable $ac_name is used but was not set:
23634 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23639 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
23640 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
23641 if test -s $tmp/out; then
23642 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23643 { echo "$as_me:23643: WARNING: Some variables may not be substituted:
23645 echo "$as_me: WARNING: Some variables may not be substituted:
23655 cat >>"$CONFIG_STATUS" <<\EOF
23658 # CONFIG_HEADER section.
23661 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23662 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23664 # ac_d sets the value in "#define NAME VALUE" lines.
23665 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23666 ac_dB='[ ].*$,\1#\2'
23669 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23670 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23671 ac_iB='\([ ]\),\1#\2define\3'
23674 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23675 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23676 ac_uB='$,\1#\2define\3'
23680 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23681 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23683 - | *:- | *:-:* ) # input from stdin
23685 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23686 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23687 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23688 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23689 * ) ac_file_in=$ac_file.in ;;
23692 test x"$ac_file" != x- && { echo "$as_me:23692: creating $ac_file" >&5
23693 echo "$as_me: creating $ac_file" >&6;}
23695 # First look for the input files in the build tree, otherwise in the
23697 ac_file_inputs=`IFS=:
23698 for f in $ac_file_in; do
23700 -) echo $tmp/stdin ;;
23702 # Absolute (can't be DOS-style, as IFS=:)
23703 test -f "$f" || { { echo "$as_me:23703: error: cannot find input file: $f" >&5
23704 echo "$as_me: error: cannot find input file: $f" >&2;}
23705 { (exit 1); exit 1; }; }
23708 if test -f "$f"; then
23711 elif test -f "$srcdir/$f"; then
23716 { { echo "$as_me:23716: error: cannot find input file: $f" >&5
23717 echo "$as_me: error: cannot find input file: $f" >&2;}
23718 { (exit 1); exit 1; }; }
23721 done` || { (exit 1); exit 1; }
23722 # Remove the trailing spaces.
23723 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23727 # Transform confdefs.h into a list of #define's. We won't use it as a sed
23728 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
23729 # be either 'cat' or 'sort'.
23730 cat confdefs.h | uniq >conftest.vals
23732 # Break up conftest.vals because some shells have a limit on
23733 # the size of here documents, and old seds have small limits too.
23735 rm -f conftest.tail
23736 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
23737 while grep . conftest.vals >/dev/null
23739 # Write chunks of a limited-size here document to conftest.frag.
23740 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
23741 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
23742 echo 'CEOF' >> "$CONFIG_STATUS"
23743 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
23744 rm -f conftest.vals
23745 mv conftest.tail conftest.vals
23747 rm -f conftest.vals
23749 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23751 echo ' cat >> conftest.edit <<CEOF
23752 /@DEFS@/r conftest.frag
23755 sed -f conftest.edit $tmp/in > $tmp/out
23757 mv $tmp/out $tmp/in
23758 rm -f conftest.edit conftest.frag
23759 ' >> "$CONFIG_STATUS"
23761 cat >>"$CONFIG_STATUS" <<\EOF
23762 # Let's still pretend it is `configure' which instantiates (i.e., don't
23763 # use $as_me), people would be surprised to read:
23764 # /* config.h. Generated automatically by config.status. */
23765 if test x"$ac_file" = x-; then
23766 echo "/* Generated automatically by configure. */" >$tmp/config.h
23768 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
23770 cat $tmp/in >>$tmp/config.h
23772 if test x"$ac_file" != x-; then
23773 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
23774 { echo "$as_me:23774: $ac_file is unchanged" >&5
23775 echo "$as_me: $ac_file is unchanged" >&6;}
23777 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23778 X"$ac_file" : 'X\(//\)[^/]' \| \
23779 X"$ac_file" : 'X\(//\)$' \| \
23780 X"$ac_file" : 'X\(/\)' \| \
23781 . : '\(.\)' 2>/dev/null ||
23783 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23784 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23785 /^X\(\/\/\)$/{ s//\1/; q; }
23786 /^X\(\/\).*/{ s//\1/; q; }
23788 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23789 { case "$ac_dir" in
23790 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23794 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23795 case $as_mkdir_dir in
23796 # Skip DOS drivespec
23797 ?:) as_incr_dir=$as_mkdir_dir ;;
23799 as_incr_dir=$as_incr_dir/$as_mkdir_dir
23800 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23807 mv "$tmp/config.h" "$ac_file"
23811 rm -f $tmp/config.h
23815 cat >>"$CONFIG_STATUS" <<\EOF
23817 # CONFIG_COMMANDS section.
23819 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23820 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23821 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23828 if test ! -d "$srcdir/$cf_dir" ; then
23830 elif test -f "$srcdir/$cf_dir/programs" ; then
23831 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
23835 cat >>Makefile <<TEST_EOF
23837 # These rules are generated so we do not rely on suffix rules, which do not
23838 # work consistently for different make-programs (the '\$(MODEL)/' confuses
23839 # some, and the '\$x' confuses others).
23842 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
23845 cat >>Makefile <<TEST_EOF
23847 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
23848 \$(srcdir)/test.priv.h \\
23851 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
23855 if test -f ../config.guess && test -f ../config.sub
23857 cat >>Makefile <<TEST_EOF
23859 # if we used CF_INHERIT for getting these files, we can remove them
23861 rm -f config.guess config.sub
23869 cat >>"$CONFIG_STATUS" <<\EOF
23871 { (exit 0); exit 0; }
23873 chmod +x "$CONFIG_STATUS"
23874 ac_clean_files=$ac_clean_files_save
23876 # configure is writing to config.log, and then calls config.status.
23877 # config.status does its own redirection, appending to config.log.
23878 # Unfortunately, on DOS this fails, as config.log is still kept open
23879 # by configure, so config.status won't be able to write to it; its
23880 # output is simply discarded. So we exec the FD to /dev/null,
23881 # effectively closing config.log, so it can be properly (re)opened and
23882 # appended to by config.status. When coming back to configure, we
23883 # need to make the FD available again.
23884 if test "$no_create" != yes; then
23887 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
23889 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23890 # would make configure fail if this is the last instruction.
23891 "$ac_cs_success" || { (exit 1); exit 1; }