2 # From configure.in Revision: 1.68 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
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
101 SHELL=${CONFIG_SHELL-/bin/sh}
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete. It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
108 ac_unique_file="gen/gen.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
113 # include <sys/types.h>
116 # include <sys/stat.h>
127 # if !STDC_HEADERS && HAVE_MEMORY_H
133 # include <strings.h>
136 # include <inttypes.h>
146 # Initialize some variables set by options.
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
158 program_transform_name=s,x,x,
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
186 # Identity of this package.
196 # If the previous option needs an argument, assign it.
197 if test -n "$ac_prev"; then
198 eval "$ac_prev=\$ac_option"
203 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205 # Accept the important Cygnus configure options, so we can diagnose typos.
209 -bindir | --bindir | --bindi | --bind | --bin | --bi)
211 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214 -build | --build | --buil | --bui | --bu)
215 ac_prev=build_alias ;;
216 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217 build_alias=$ac_optarg ;;
219 -cache-file | --cache-file | --cache-fil | --cache-fi \
220 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221 ac_prev=cache_file ;;
222 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224 cache_file=$ac_optarg ;;
227 cache_file=config.cache ;;
229 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233 datadir=$ac_optarg ;;
235 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236 | --dataroo | --dataro | --datar)
237 ac_prev=datarootdir ;;
238 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240 datarootdir=$ac_optarg ;;
242 -disable-* | --disable-*)
243 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244 # Reject names that are not valid shell variable names.
245 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247 { (exit 1); exit 1; }; }
248 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249 eval "enable_$ac_feature=no" ;;
251 -enable-* | --enable-*)
252 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253 # Reject names that are not valid shell variable names.
254 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256 { (exit 1); exit 1; }; }
257 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
259 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262 eval "enable_$ac_feature='$ac_optarg'" ;;
264 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266 | --exec | --exe | --ex)
267 ac_prev=exec_prefix ;;
268 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270 | --exec=* | --exe=* | --ex=*)
271 exec_prefix=$ac_optarg ;;
273 -gas | --gas | --ga | --g)
274 # Obsolete; use --with-gas.
277 -help | --help | --hel | --he | -h)
279 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280 ac_init_help=recursive ;;
281 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282 ac_init_help=short ;;
284 -host | --host | --hos | --ho)
285 ac_prev=host_alias ;;
286 -host=* | --host=* | --hos=* | --ho=*)
287 host_alias=$ac_optarg ;;
289 -includedir | --includedir | --includedi | --included | --include \
290 | --includ | --inclu | --incl | --inc)
291 ac_prev=includedir ;;
292 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293 | --includ=* | --inclu=* | --incl=* | --inc=*)
294 includedir=$ac_optarg ;;
296 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299 infodir=$ac_optarg ;;
301 -libdir | --libdir | --libdi | --libd)
303 -libdir=* | --libdir=* | --libdi=* | --libd=*)
306 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307 | --libexe | --libex | --libe)
308 ac_prev=libexecdir ;;
309 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310 | --libexe=* | --libex=* | --libe=*)
311 libexecdir=$ac_optarg ;;
313 -localstatedir | --localstatedir | --localstatedi | --localstated \
314 | --localstate | --localstat | --localsta | --localst \
315 | --locals | --local | --loca | --loc | --lo)
316 ac_prev=localstatedir ;;
317 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320 localstatedir=$ac_optarg ;;
322 -runstatedir | --runstatedir | --runstatedi | --runstated \
323 | --runstate | --runstat | --runsta | --runst \
324 | --runs | --run | --ru)
325 ac_prev=runstatedir ;;
326 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328 | --runs=* | --run=* | --ru=*)
329 runstatedir=$ac_optarg ;;
331 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337 # Obsolete; use --without-fp.
340 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350 | --oldin | --oldi | --old | --ol | --o)
351 ac_prev=oldincludedir ;;
352 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355 oldincludedir=$ac_optarg ;;
357 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362 -program-prefix | --program-prefix | --program-prefi | --program-pref \
363 | --program-pre | --program-pr | --program-p)
364 ac_prev=program_prefix ;;
365 -program-prefix=* | --program-prefix=* | --program-prefi=* \
366 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367 program_prefix=$ac_optarg ;;
369 -program-suffix | --program-suffix | --program-suffi | --program-suff \
370 | --program-suf | --program-su | --program-s)
371 ac_prev=program_suffix ;;
372 -program-suffix=* | --program-suffix=* | --program-suffi=* \
373 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374 program_suffix=$ac_optarg ;;
376 -program-transform-name | --program-transform-name \
377 | --program-transform-nam | --program-transform-na \
378 | --program-transform-n | --program-transform- \
379 | --program-transform | --program-transfor \
380 | --program-transfo | --program-transf \
381 | --program-trans | --program-tran \
382 | --progr-tra | --program-tr | --program-t)
383 ac_prev=program_transform_name ;;
384 -program-transform-name=* | --program-transform-name=* \
385 | --program-transform-nam=* | --program-transform-na=* \
386 | --program-transform-n=* | --program-transform-=* \
387 | --program-transform=* | --program-transfor=* \
388 | --program-transfo=* | --program-transf=* \
389 | --program-trans=* | --program-tran=* \
390 | --progr-tra=* | --program-tr=* | --program-t=*)
391 program_transform_name=$ac_optarg ;;
393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394 | -silent | --silent | --silen | --sile | --sil)
397 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 sbindir=$ac_optarg ;;
403 -sharedstatedir | --sharedstatedir | --sharedstatedi \
404 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405 | --sharedst | --shareds | --shared | --share | --shar \
407 ac_prev=sharedstatedir ;;
408 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 sharedstatedir=$ac_optarg ;;
414 -site | --site | --sit)
416 -site=* | --site=* | --sit=*)
419 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425 | --syscon | --sysco | --sysc | --sys | --sy)
426 ac_prev=sysconfdir ;;
427 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429 sysconfdir=$ac_optarg ;;
431 -target | --target | --targe | --targ | --tar | --ta | --t)
432 ac_prev=target_alias ;;
433 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434 target_alias=$ac_optarg ;;
436 -v | -verbose | --verbose | --verbos | --verbo | --verb)
439 -version | --version | --versio | --versi | --vers | -V)
443 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444 # Reject names that are not valid shell variable names.
445 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446 { echo "$as_me: error: invalid package name: $ac_package" >&2
447 { (exit 1); exit 1; }; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
450 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453 eval "with_$ac_package='$ac_optarg'" ;;
455 -without-* | --without-*)
456 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457 # Reject names that are not valid shell variable names.
458 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459 { echo "$as_me: error: invalid package name: $ac_package" >&2
460 { (exit 1); exit 1; }; }
461 ac_package=`echo $ac_package | sed 's/-/_/g'`
462 eval "with_$ac_package=no" ;;
465 # Obsolete; use --with-x.
468 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469 | --x-incl | --x-inc | --x-in | --x-i)
470 ac_prev=x_includes ;;
471 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473 x_includes=$ac_optarg ;;
475 -x-libraries | --x-libraries | --x-librarie | --x-librari \
476 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477 ac_prev=x_libraries ;;
478 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480 x_libraries=$ac_optarg ;;
482 -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484 { (exit 1); exit 1; }; }
488 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489 # Reject names that are not valid shell variable names.
490 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492 { (exit 1); exit 1; }; }
493 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494 eval "$ac_envvar='$ac_optarg'"
498 # FIXME: should be removed in autoconf 3.0.
499 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
508 if test -n "$ac_prev"; then
509 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510 { echo "$as_me: error: missing argument to $ac_option" >&2
511 { (exit 1); exit 1; }; }
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
517 eval ac_val=$`echo $ac_var`
519 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521 { (exit 1); exit 1; }; };;
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527 localstatedir libdir includedir oldincludedir infodir mandir
529 eval ac_val=$`echo $ac_var`
531 [\\/$]* | ?:[\\/]* ) ;;
532 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533 { (exit 1); exit 1; }; };;
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545 if test "x$build_alias" = x; then
546 cross_compiling=maybe
547 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548 If a cross compiler is detected then cross compile mode will be used." >&2
549 elif test "x$build_alias" != "x$host_alias"; then
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
557 test "$silent" = yes && exec 6>/dev/null
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561 ac_srcdir_defaulted=yes
562 # Try the directory containing this script, then its parent.
564 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567 if test ! -r $srcdir/$ac_unique_file; then
571 ac_srcdir_defaulted=no
573 if test ! -r $srcdir/$ac_unique_file; then
574 if test "$ac_srcdir_defaulted" = yes; then
575 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576 { (exit 1); exit 1; }; }
578 { echo "$as_me: error: cannot find sources in $srcdir" >&2
579 { (exit 1); exit 1; }; }
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
617 # Report the --help message.
619 if test "$ac_init_help" = "long"; then
620 # Omit some internal or obsolete options to make the list less imposing.
621 # This message is too long to be a string in the A/UX 3.1 sh.
623 \`configure' configures this package to adapt to many kinds of systems.
625 Usage: $0 [OPTION]... [VAR=VALUE]...
627 To assign environment variables (e.g., CC, CFLAGS...), specify them as
628 VAR=VALUE. See below for descriptions of some of the useful variables.
630 Defaults for the options are specified in brackets.
633 -h, --help display this help and exit
634 --help=short display options specific to this package
635 --help=recursive display the short help of all the included packages
636 -V, --version display version information and exit
637 -q, --quiet, --silent do not print \`checking...' messages
638 --cache-file=FILE cache test results in FILE [disabled]
639 -C, --config-cache alias for \`--cache-file=config.cache'
640 -n, --no-create do not create output files
641 --srcdir=DIR find the sources in DIR [configure dir or \`..']
646 Installation directories:
647 --prefix=PREFIX install architecture-independent files in PREFIX
649 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
652 By default, \`make install' will install all the files in
653 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
654 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
655 for instance \`--prefix=\$HOME'.
657 For better control, use the options below.
659 Fine tuning of the installation directories:
660 --bindir=DIR user executables [EPREFIX/bin]
661 --sbindir=DIR system admin executables [EPREFIX/sbin]
662 --libexecdir=DIR program executables [EPREFIX/libexec]
663 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
664 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
665 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
666 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
667 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
668 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
669 --libdir=DIR object code libraries [EPREFIX/lib]
670 --includedir=DIR C header files [PREFIX/include]
671 --oldincludedir=DIR C header files for non-gcc [/usr/include]
672 --infodir=DIR info documentation [DATAROOTDIR/info]
673 --mandir=DIR man documentation [DATAROOTDIR/man]
679 --program-prefix=PREFIX prepend PREFIX to installed program names
680 --program-suffix=SUFFIX append SUFFIX to installed program names
681 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
684 --build=BUILD configure for building on BUILD [guessed]
685 --host=HOST build programs to run on HOST [BUILD]
686 --target=TARGET configure for building compilers for TARGET [HOST]
690 if test -n "$ac_init_help"; then
695 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
696 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
699 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
700 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
703 --with-system-type=XXX test: override derived host system-type
704 --disable-stripping do not strip (debug info) installed executables
705 --with-pkg-config{=path} enable/disable use of pkg-config
706 --with-pkg-config-libdir=XXX use given directory for installing pc-files
707 --without-tests suppress build with test-programs
708 --enable-mixed-case tic should assume mixed-case filenames
709 --with-install-prefix prefixes actual install-location ($DESTDIR)
710 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
711 --with-build-cc=XXX the build C compiler ($BUILD_CC)
712 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
713 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
714 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
715 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
716 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
717 Options to Specify the Libraries Built/Used:
718 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
719 --with-curses-dir=DIR directory in which (n)curses is installed
720 --enable-widec compile with wide-char/UTF-8 code
721 --with-lib-prefix override library-prefix
722 --with-shlib-version=X Specify rel or abi version for shared libs
723 --enable-rpath-link link sample programs with rpath option
724 Fine-Tuning Your Configuration:
725 --enable-broken_linker compile with broken-linker support code
726 --disable-largefile omit support for large files
727 --with-rcs-ids compile-in RCS identifiers
729 --disable-ext-funcs disable function-extensions
730 --enable-const compile with extra/non-standard const
732 --without-develop disable development options
734 --with-pthread use POSIX thread library
735 --enable-weak-symbols enable weak-symbols for pthreads
736 --enable-reentrant compile with experimental reentrant code
737 --with-wrap-prefix=XXX override prefix used for public variables
738 Testing/development Options:
739 --disable-echo do not display "compiling" commands
740 --enable-warnings build: turn on GCC compiler warnings
741 --enable-assertions test: turn on generation of assertion code
742 --enable-expanded test: generate functions for certain macros
743 --disable-macros test: use functions rather than macros
744 --with-trace test: add trace() function to all models of ncurses
745 --disable-gnat-projects test: disable GNAT projects even if usable
746 Ada95 Binding Options:
747 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
748 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
749 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
750 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
752 Some influential environment variables:
753 CC C compiler command
754 CFLAGS C compiler flags
755 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
756 nonstandard directory <lib dir>
757 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
758 headers in a nonstandard directory <include dir>
761 Use these variables to override the choices made by `configure' or to help
762 it to find libraries and programs with nonstandard names/locations.
767 if test "$ac_init_help" = "recursive"; then
768 # If there are subdirs, report their specific --help.
770 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
772 # A "../" for each directory in /$ac_subdir.
773 ac_dots=`echo $ac_subdir |
774 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
777 .) # No --srcdir option. We are building in place.
778 ac_sub_srcdir=$srcdir ;;
779 [\\/]* | ?:[\\/]* ) # Absolute path.
780 ac_sub_srcdir=$srcdir/$ac_subdir ;;
782 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
785 # Check for guested configure; otherwise get Cygnus style configure.
786 if test -f $ac_sub_srcdir/configure.gnu; then
788 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
789 elif test -f $ac_sub_srcdir/configure; then
791 $SHELL $ac_sub_srcdir/configure --help=recursive
792 elif test -f $ac_sub_srcdir/configure.ac ||
793 test -f $ac_sub_srcdir/configure.in; then
797 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
803 test -n "$ac_init_help" && exit 0
804 if $ac_init_version; then
807 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
808 Free Software Foundation, Inc.
809 This configure script is free software; the Free Software Foundation
810 gives unlimited permission to copy, distribute and modify it.
816 This file contains any messages produced by compilers while
817 running configure, to aid debugging if configure makes a mistake.
819 It was created by $as_me, which was
820 generated by GNU Autoconf 2.52.20181006. Invocation command line was
831 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
832 uname -m = `(uname -m) 2>/dev/null || echo unknown`
833 uname -r = `(uname -r) 2>/dev/null || echo unknown`
834 uname -s = `(uname -s) 2>/dev/null || echo unknown`
835 uname -v = `(uname -v) 2>/dev/null || echo unknown`
837 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
838 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
840 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
841 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
842 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
843 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
844 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
845 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
846 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
860 # Keep a trace of the command line.
861 # Strip out --no-create and --no-recursion so they do not pile up.
862 # Also quote any args containing shell meta-characters.
868 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
869 | --no-cr | --no-c) ;;
870 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
871 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
872 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
873 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
874 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
876 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
879 # Get rid of the leading space.
882 # When interrupted or exit'd, cleanup temporary files, and complete
883 # config.log. We remove comments because anyway the quotes in there
884 # would cause problems or look ugly.
886 # Save into config.log some information that might help in debugging.
888 echo "## ----------------- ##" >&5
889 echo "## Cache variables. ##" >&5
890 echo "## ----------------- ##" >&5
892 # The following way of writing the cache mishandles newlines in values,
895 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
898 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
899 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
903 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
907 sed "/^$/d" confdefs.h >conftest.log
908 if test -s conftest.log; then
910 echo "## ------------ ##" >&5
911 echo "## confdefs.h. ##" >&5
912 echo "## ------------ ##" >&5
917 test "$ac_signal" != 0 &&
918 echo "$as_me: caught signal $ac_signal" >&5
919 echo "$as_me: exit $exit_status" >&5
920 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
923 for ac_signal in 1 2 13 15; do
924 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
928 # confdefs.h avoids OS command line length limits that DEFS can exceed.
929 rm -rf conftest* confdefs.h
930 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
933 # Let the site file select an alternate cache file if it wants to.
934 # Prefer explicitly selected file to automatically selected ones.
935 if test -z "$CONFIG_SITE"; then
936 if test "x$prefix" != xNONE; then
937 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
939 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
942 for ac_site_file in $CONFIG_SITE; do
943 if test -r "$ac_site_file"; then
944 { echo "$as_me:944: loading site script $ac_site_file" >&5
945 echo "$as_me: loading site script $ac_site_file" >&6;}
946 cat "$ac_site_file" >&5
951 if test -r "$cache_file"; then
952 # Some versions of bash will fail to source /dev/null (special
953 # files actually), so we avoid doing that.
954 if test -f "$cache_file"; then
955 { echo "$as_me:955: loading cache $cache_file" >&5
956 echo "$as_me: loading cache $cache_file" >&6;}
958 [\\/]* | ?:[\\/]* ) . $cache_file;;
963 { echo "$as_me:963: creating cache $cache_file" >&5
964 echo "$as_me: creating cache $cache_file" >&6;}
968 # Check that the precious variables saved in the cache have kept the same
970 ac_cache_corrupted=false
971 for ac_var in `(set) 2>&1 |
972 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
973 eval ac_old_set=\$ac_cv_env_${ac_var}_set
974 eval ac_new_set=\$ac_env_${ac_var}_set
975 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
976 eval ac_new_val="\$ac_env_${ac_var}_value"
977 case $ac_old_set,$ac_new_set in
979 { echo "$as_me:979: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
980 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
981 ac_cache_corrupted=: ;;
983 { echo "$as_me:983: error: \`$ac_var' was not set in the previous run" >&5
984 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
985 ac_cache_corrupted=: ;;
988 if test "x$ac_old_val" != "x$ac_new_val"; then
989 { echo "$as_me:989: error: \`$ac_var' has changed since the previous run:" >&5
990 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
991 { echo "$as_me:991: former value: $ac_old_val" >&5
992 echo "$as_me: former value: $ac_old_val" >&2;}
993 { echo "$as_me:993: current value: $ac_new_val" >&5
994 echo "$as_me: current value: $ac_new_val" >&2;}
998 # Pass precious variables to config.status. It doesn't matter if
999 # we pass some twice (in addition to the command line arguments).
1000 if test "$ac_new_set" = set; then
1002 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1003 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1004 ac_configure_args="$ac_configure_args '$ac_arg'"
1006 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1011 if $ac_cache_corrupted; then
1012 { echo "$as_me:1012: error: changes in the environment can compromise the build" >&5
1013 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1014 { { echo "$as_me:1014: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1015 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1016 { (exit 1); exit 1; }; }
1020 ac_cpp='$CPP $CPPFLAGS'
1021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1024 ac_main_return=return
1026 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1027 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1029 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1030 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1032 echo "#! $SHELL" >conftest.sh
1033 echo "exit 0" >>conftest.sh
1034 chmod +x conftest.sh
1035 if { (echo "$as_me:1035: PATH=\".;.\"; conftest.sh") >&5
1036 (PATH=".;."; conftest.sh) 2>&5
1038 echo "$as_me:1038: \$? = $ac_status" >&5
1039 (exit $ac_status); }; then
1040 ac_path_separator=';'
1044 PATH_SEPARATOR="$ac_path_separator"
1047 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1052 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1053 if test -f $ac_dir/install-sh; then
1055 ac_install_sh="$ac_aux_dir/install-sh -c"
1057 elif test -f $ac_dir/install.sh; then
1059 ac_install_sh="$ac_aux_dir/install.sh -c"
1061 elif test -f $ac_dir/shtool; then
1063 ac_install_sh="$ac_aux_dir/shtool install -c"
1067 if test -z "$ac_aux_dir"; then
1068 { { echo "$as_me:1068: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1069 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1070 { (exit 1); exit 1; }; }
1072 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1073 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1074 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1076 # Make sure we can run config.sub.
1077 $ac_config_sub sun4 >/dev/null 2>&1 ||
1078 { { echo "$as_me:1078: error: cannot run $ac_config_sub" >&5
1079 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1080 { (exit 1); exit 1; }; }
1082 echo "$as_me:1082: checking build system type" >&5
1083 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1084 if test "${ac_cv_build+set}" = set; then
1085 echo $ECHO_N "(cached) $ECHO_C" >&6
1087 ac_cv_build_alias=$build_alias
1088 test -z "$ac_cv_build_alias" &&
1089 ac_cv_build_alias=`$ac_config_guess`
1090 test -z "$ac_cv_build_alias" &&
1091 { { echo "$as_me:1091: error: cannot guess build type; you must specify one" >&5
1092 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1093 { (exit 1); exit 1; }; }
1094 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1095 { { echo "$as_me:1095: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1096 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1097 { (exit 1); exit 1; }; }
1100 echo "$as_me:1100: result: $ac_cv_build" >&5
1101 echo "${ECHO_T}$ac_cv_build" >&6
1103 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1104 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1105 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1107 echo "$as_me:1107: checking host system type" >&5
1108 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1109 if test "${ac_cv_host+set}" = set; then
1110 echo $ECHO_N "(cached) $ECHO_C" >&6
1112 ac_cv_host_alias=$host_alias
1113 test -z "$ac_cv_host_alias" &&
1114 ac_cv_host_alias=$ac_cv_build_alias
1115 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1116 { { echo "$as_me:1116: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1117 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1118 { (exit 1); exit 1; }; }
1121 echo "$as_me:1121: result: $ac_cv_host" >&5
1122 echo "${ECHO_T}$ac_cv_host" >&6
1124 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1125 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1126 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1129 echo "$as_me:1129: checking target system type" >&5
1130 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1131 if test "${ac_cv_target+set}" = set; then
1132 echo $ECHO_N "(cached) $ECHO_C" >&6
1134 ac_cv_target_alias=$target_alias
1135 test "x$ac_cv_target_alias" = "x" &&
1136 ac_cv_target_alias=$ac_cv_host_alias
1137 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1138 { { echo "$as_me:1138: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1139 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1140 { (exit 1); exit 1; }; }
1143 echo "$as_me:1143: result: $ac_cv_target" >&5
1144 echo "${ECHO_T}$ac_cv_target" >&6
1145 target=$ac_cv_target
1146 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1147 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1148 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1150 # The aliases save the names the user supplied, while $host etc.
1151 # will get canonicalized.
1152 test -n "$target_alias" &&
1153 test "$program_prefix$program_suffix$program_transform_name" = \
1155 program_prefix=${target_alias}-
1156 system_name="$host_os"
1158 system_name="`(uname -s -r) 2>/dev/null`"
1159 if test -z "$system_name" ; then
1160 system_name="`(hostname) 2>/dev/null`"
1163 test -n "$system_name" &&
1164 cat >>confdefs.h <<EOF
1165 #define SYSTEM_NAME "$system_name"
1168 if test "${cf_cv_system_name+set}" = set; then
1169 echo $ECHO_N "(cached) $ECHO_C" >&6
1171 cf_cv_system_name="$system_name"
1174 test -z "$system_name" && system_name="$cf_cv_system_name"
1175 test -n "$cf_cv_system_name" && echo "$as_me:1175: result: Configuring for $cf_cv_system_name" >&5
1176 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1178 if test ".$system_name" != ".$cf_cv_system_name" ; then
1179 echo "$as_me:1179: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1180 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1181 { { echo "$as_me:1181: error: \"Please remove config.cache and try again.\"" >&5
1182 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1183 { (exit 1); exit 1; }; }
1186 # Check whether --with-system-type or --without-system-type was given.
1187 if test "${with_system_type+set}" = set; then
1188 withval="$with_system_type"
1189 { echo "$as_me:1189: WARNING: overriding system type to $withval" >&5
1190 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1191 cf_cv_system_name=$withval
1196 ### Save the given $CFLAGS to allow user-override.
1197 cf_user_CFLAGS="$CFLAGS"
1199 ### Default install-location
1201 echo "$as_me:1201: checking for prefix" >&5
1202 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1203 if test "x$prefix" = "xNONE" ; then
1204 case "$cf_cv_system_name" in
1205 # non-vendor systems don't have a conflict
1206 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1209 (*) prefix=$ac_default_prefix
1213 echo "$as_me:1213: result: $prefix" >&5
1214 echo "${ECHO_T}$prefix" >&6
1216 if test "x$prefix" = "xNONE" ; then
1217 echo "$as_me:1217: checking for default include-directory" >&5
1218 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1219 test -n "$verbose" && echo 1>&6
1222 $includedir/ncurses \
1224 $prefix/include/ncurses \
1225 /usr/local/include \
1226 /usr/local/include/ncurses \
1228 /usr/include/ncurses
1230 cf_dir=`eval echo $cf_symbol`
1231 if test -f $cf_dir/curses.h ; then
1232 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1233 includedir="$cf_symbol"
1234 test -n "$verbose" && echo $ac_n " found " 1>&6
1238 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1240 echo "$as_me:1240: result: $includedir" >&5
1241 echo "${ECHO_T}$includedir" >&6
1244 ### Checks for programs.
1247 ac_cpp='$CPP $CPPFLAGS'
1248 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1249 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1250 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1251 ac_main_return=return
1252 if test -n "$ac_tool_prefix"; then
1253 for ac_prog in gnatgcc gcc cc
1255 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1256 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1257 echo "$as_me:1257: checking for $ac_word" >&5
1258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1259 if test "${ac_cv_prog_CC+set}" = set; then
1260 echo $ECHO_N "(cached) $ECHO_C" >&6
1262 if test -n "$CC"; then
1263 ac_cv_prog_CC="$CC" # Let the user override the test.
1265 ac_save_IFS=$IFS; IFS=$ac_path_separator
1267 for ac_dir in $ac_dummy; do
1269 test -z "$ac_dir" && ac_dir=.
1270 $as_executable_p "$ac_dir/$ac_word" || continue
1271 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1272 echo "$as_me:1272: found $ac_dir/$ac_word" >&5
1279 if test -n "$CC"; then
1280 echo "$as_me:1280: result: $CC" >&5
1281 echo "${ECHO_T}$CC" >&6
1283 echo "$as_me:1283: result: no" >&5
1284 echo "${ECHO_T}no" >&6
1287 test -n "$CC" && break
1290 if test -z "$CC"; then
1292 for ac_prog in gnatgcc gcc cc
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo "$as_me:1296: checking for $ac_word" >&5
1297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1298 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1299 echo $ECHO_N "(cached) $ECHO_C" >&6
1301 if test -n "$ac_ct_CC"; then
1302 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1304 ac_save_IFS=$IFS; IFS=$ac_path_separator
1306 for ac_dir in $ac_dummy; do
1308 test -z "$ac_dir" && ac_dir=.
1309 $as_executable_p "$ac_dir/$ac_word" || continue
1310 ac_cv_prog_ac_ct_CC="$ac_prog"
1311 echo "$as_me:1311: found $ac_dir/$ac_word" >&5
1317 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1318 if test -n "$ac_ct_CC"; then
1319 echo "$as_me:1319: result: $ac_ct_CC" >&5
1320 echo "${ECHO_T}$ac_ct_CC" >&6
1322 echo "$as_me:1322: result: no" >&5
1323 echo "${ECHO_T}no" >&6
1326 test -n "$ac_ct_CC" && break
1332 test -z "$CC" && { { echo "$as_me:1332: error: no acceptable cc found in \$PATH" >&5
1333 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1334 { (exit 1); exit 1; }; }
1336 # Provide some information about the compiler.
1337 echo "$as_me:1337:" \
1338 "checking for C compiler version" >&5
1339 ac_compiler=`set X $ac_compile; echo $2`
1340 { (eval echo "$as_me:1340: \"$ac_compiler --version </dev/null >&5\"") >&5
1341 (eval $ac_compiler --version </dev/null >&5) 2>&5
1343 echo "$as_me:1343: \$? = $ac_status" >&5
1344 (exit $ac_status); }
1345 { (eval echo "$as_me:1345: \"$ac_compiler -v </dev/null >&5\"") >&5
1346 (eval $ac_compiler -v </dev/null >&5) 2>&5
1348 echo "$as_me:1348: \$? = $ac_status" >&5
1349 (exit $ac_status); }
1350 { (eval echo "$as_me:1350: \"$ac_compiler -V </dev/null >&5\"") >&5
1351 (eval $ac_compiler -V </dev/null >&5) 2>&5
1353 echo "$as_me:1353: \$? = $ac_status" >&5
1354 (exit $ac_status); }
1356 cat >conftest.$ac_ext <<_ACEOF
1357 #line 1357 "configure"
1358 #include "confdefs.h"
1368 ac_clean_files_save=$ac_clean_files
1369 ac_clean_files="$ac_clean_files a.out a.exe"
1370 # Try to create an executable without -o first, disregard a.out.
1371 # It will help us diagnose broken compilers, and finding out an intuition
1373 echo "$as_me:1373: checking for C compiler default output" >&5
1374 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1375 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1376 if { (eval echo "$as_me:1376: \"$ac_link_default\"") >&5
1377 (eval $ac_link_default) 2>&5
1379 echo "$as_me:1379: \$? = $ac_status" >&5
1380 (exit $ac_status); }; then
1381 # Find the output, starting from the most likely. This scheme is
1382 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1384 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1385 ls a.out conftest 2>/dev/null;
1386 ls a.* conftest.* 2>/dev/null`; do
1388 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1389 a.out ) # We found the default executable, but exeext='' is most
1392 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1393 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1400 echo "$as_me: failed program was:" >&5
1401 cat conftest.$ac_ext >&5
1402 { { echo "$as_me:1402: error: C compiler cannot create executables" >&5
1403 echo "$as_me: error: C compiler cannot create executables" >&2;}
1404 { (exit 77); exit 77; }; }
1407 ac_exeext=$ac_cv_exeext
1408 echo "$as_me:1408: result: $ac_file" >&5
1409 echo "${ECHO_T}$ac_file" >&6
1411 # Check the compiler produces executables we can run. If not, either
1412 # the compiler is broken, or we cross compile.
1413 echo "$as_me:1413: checking whether the C compiler works" >&5
1414 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1415 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1416 # If not cross compiling, check that we can run a simple program.
1417 if test "$cross_compiling" != yes; then
1418 if { ac_try='./$ac_file'
1419 { (eval echo "$as_me:1419: \"$ac_try\"") >&5
1422 echo "$as_me:1422: \$? = $ac_status" >&5
1423 (exit $ac_status); }; }; then
1426 if test "$cross_compiling" = maybe; then
1429 { { echo "$as_me:1429: error: cannot run C compiled programs.
1430 If you meant to cross compile, use \`--host'." >&5
1431 echo "$as_me: error: cannot run C compiled programs.
1432 If you meant to cross compile, use \`--host'." >&2;}
1433 { (exit 1); exit 1; }; }
1437 echo "$as_me:1437: result: yes" >&5
1438 echo "${ECHO_T}yes" >&6
1440 rm -f a.out a.exe conftest$ac_cv_exeext
1441 ac_clean_files=$ac_clean_files_save
1442 # Check the compiler produces executables we can run. If not, either
1443 # the compiler is broken, or we cross compile.
1444 echo "$as_me:1444: checking whether we are cross compiling" >&5
1445 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1446 echo "$as_me:1446: result: $cross_compiling" >&5
1447 echo "${ECHO_T}$cross_compiling" >&6
1449 echo "$as_me:1449: checking for executable suffix" >&5
1450 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1451 if { (eval echo "$as_me:1451: \"$ac_link\"") >&5
1452 (eval $ac_link) 2>&5
1454 echo "$as_me:1454: \$? = $ac_status" >&5
1455 (exit $ac_status); }; then
1456 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1457 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1458 # work properly (i.e., refer to `conftest.exe'), while it won't with
1460 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1462 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1463 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1470 { { echo "$as_me:1470: error: cannot compute EXEEXT: cannot compile and link" >&5
1471 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1472 { (exit 1); exit 1; }; }
1475 rm -f conftest$ac_cv_exeext
1476 echo "$as_me:1476: result: $ac_cv_exeext" >&5
1477 echo "${ECHO_T}$ac_cv_exeext" >&6
1479 rm -f conftest.$ac_ext
1480 EXEEXT=$ac_cv_exeext
1482 echo "$as_me:1482: checking for object suffix" >&5
1483 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1484 if test "${ac_cv_objext+set}" = set; then
1485 echo $ECHO_N "(cached) $ECHO_C" >&6
1487 cat >conftest.$ac_ext <<_ACEOF
1488 #line 1488 "configure"
1489 #include "confdefs.h"
1499 rm -f conftest.o conftest.obj
1500 if { (eval echo "$as_me:1500: \"$ac_compile\"") >&5
1501 (eval $ac_compile) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit $ac_status); }; then
1505 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1507 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1508 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1513 echo "$as_me: failed program was:" >&5
1514 cat conftest.$ac_ext >&5
1515 { { echo "$as_me:1515: error: cannot compute OBJEXT: cannot compile" >&5
1516 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1517 { (exit 1); exit 1; }; }
1520 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1522 echo "$as_me:1522: result: $ac_cv_objext" >&5
1523 echo "${ECHO_T}$ac_cv_objext" >&6
1524 OBJEXT=$ac_cv_objext
1526 echo "$as_me:1526: checking whether we are using the GNU C compiler" >&5
1527 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1528 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1529 echo $ECHO_N "(cached) $ECHO_C" >&6
1531 cat >conftest.$ac_ext <<_ACEOF
1532 #line 1532 "configure"
1533 #include "confdefs.h"
1546 rm -f conftest.$ac_objext
1547 if { (eval echo "$as_me:1547: \"$ac_compile\"") >&5
1548 (eval $ac_compile) 2>&5
1550 echo "$as_me:1550: \$? = $ac_status" >&5
1551 (exit $ac_status); } &&
1552 { ac_try='test -s conftest.$ac_objext'
1553 { (eval echo "$as_me:1553: \"$ac_try\"") >&5
1556 echo "$as_me:1556: \$? = $ac_status" >&5
1557 (exit $ac_status); }; }; then
1560 echo "$as_me: failed program was:" >&5
1561 cat conftest.$ac_ext >&5
1564 rm -f conftest.$ac_objext conftest.$ac_ext
1565 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1568 echo "$as_me:1568: result: $ac_cv_c_compiler_gnu" >&5
1569 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1570 GCC=`test $ac_compiler_gnu = yes && echo yes`
1571 ac_test_CFLAGS=${CFLAGS+set}
1572 ac_save_CFLAGS=$CFLAGS
1574 echo "$as_me:1574: checking whether $CC accepts -g" >&5
1575 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1576 if test "${ac_cv_prog_cc_g+set}" = set; then
1577 echo $ECHO_N "(cached) $ECHO_C" >&6
1579 cat >conftest.$ac_ext <<_ACEOF
1580 #line 1580 "configure"
1581 #include "confdefs.h"
1591 rm -f conftest.$ac_objext
1592 if { (eval echo "$as_me:1592: \"$ac_compile\"") >&5
1593 (eval $ac_compile) 2>&5
1595 echo "$as_me:1595: \$? = $ac_status" >&5
1596 (exit $ac_status); } &&
1597 { ac_try='test -s conftest.$ac_objext'
1598 { (eval echo "$as_me:1598: \"$ac_try\"") >&5
1601 echo "$as_me:1601: \$? = $ac_status" >&5
1602 (exit $ac_status); }; }; then
1605 echo "$as_me: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
1609 rm -f conftest.$ac_objext conftest.$ac_ext
1611 echo "$as_me:1611: result: $ac_cv_prog_cc_g" >&5
1612 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1613 if test "$ac_test_CFLAGS" = set; then
1614 CFLAGS=$ac_save_CFLAGS
1615 elif test $ac_cv_prog_cc_g = yes; then
1616 if test "$GCC" = yes; then
1622 if test "$GCC" = yes; then
1628 # Some people use a C++ compiler to compile C. Since we use `exit',
1629 # in C++ we need to declare it. In case someone uses the same compiler
1630 # for both compiling C and C++ we need to have the C++ compiler decide
1631 # the declaration of exit, since it's the most demanding environment.
1632 cat >conftest.$ac_ext <<_ACEOF
1637 rm -f conftest.$ac_objext
1638 if { (eval echo "$as_me:1638: \"$ac_compile\"") >&5
1639 (eval $ac_compile) 2>&5
1641 echo "$as_me:1641: \$? = $ac_status" >&5
1642 (exit $ac_status); } &&
1643 { ac_try='test -s conftest.$ac_objext'
1644 { (eval echo "$as_me:1644: \"$ac_try\"") >&5
1647 echo "$as_me:1647: \$? = $ac_status" >&5
1648 (exit $ac_status); }; }; then
1649 for ac_declaration in \
1651 '#include <stdlib.h>' \
1652 'extern "C" void std::exit (int) throw (); using std::exit;' \
1653 'extern "C" void std::exit (int); using std::exit;' \
1654 'extern "C" void exit (int) throw ();' \
1655 'extern "C" void exit (int);' \
1658 cat >conftest.$ac_ext <<_ACEOF
1659 #line 1659 "configure"
1660 #include "confdefs.h"
1671 rm -f conftest.$ac_objext
1672 if { (eval echo "$as_me:1672: \"$ac_compile\"") >&5
1673 (eval $ac_compile) 2>&5
1675 echo "$as_me:1675: \$? = $ac_status" >&5
1676 (exit $ac_status); } &&
1677 { ac_try='test -s conftest.$ac_objext'
1678 { (eval echo "$as_me:1678: \"$ac_try\"") >&5
1681 echo "$as_me:1681: \$? = $ac_status" >&5
1682 (exit $ac_status); }; }; then
1685 echo "$as_me: failed program was:" >&5
1686 cat conftest.$ac_ext >&5
1689 rm -f conftest.$ac_objext conftest.$ac_ext
1690 cat >conftest.$ac_ext <<_ACEOF
1691 #line 1691 "configure"
1692 #include "confdefs.h"
1702 rm -f conftest.$ac_objext
1703 if { (eval echo "$as_me:1703: \"$ac_compile\"") >&5
1704 (eval $ac_compile) 2>&5
1706 echo "$as_me:1706: \$? = $ac_status" >&5
1707 (exit $ac_status); } &&
1708 { ac_try='test -s conftest.$ac_objext'
1709 { (eval echo "$as_me:1709: \"$ac_try\"") >&5
1712 echo "$as_me:1712: \$? = $ac_status" >&5
1713 (exit $ac_status); }; }; then
1716 echo "$as_me: failed program was:" >&5
1717 cat conftest.$ac_ext >&5
1719 rm -f conftest.$ac_objext conftest.$ac_ext
1722 if test -n "$ac_declaration"; then
1723 echo '#ifdef __cplusplus' >>confdefs.h
1724 echo $ac_declaration >>confdefs.h
1725 echo '#endif' >>confdefs.h
1729 echo "$as_me: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1732 rm -f conftest.$ac_objext conftest.$ac_ext
1734 ac_cpp='$CPP $CPPFLAGS'
1735 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1736 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1737 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1738 ac_main_return=return
1741 if test "$GCC" = yes ; then
1742 echo "$as_me:1742: checking version of $CC" >&5
1743 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1744 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.].*//'`"
1745 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1746 echo "$as_me:1746: result: $GCC_VERSION" >&5
1747 echo "${ECHO_T}$GCC_VERSION" >&6
1750 echo "$as_me:1750: checking for $CC option to accept ANSI C" >&5
1751 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1752 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1753 echo $ECHO_N "(cached) $ECHO_C" >&6
1755 ac_cv_prog_cc_stdc=no
1757 cat >conftest.$ac_ext <<_ACEOF
1758 #line 1758 "configure"
1759 #include "confdefs.h"
1762 #include <sys/types.h>
1763 #include <sys/stat.h>
1764 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1765 struct buf { int x; };
1766 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1767 static char *e (p, i)
1773 static char *f (char * (*g) (char **, int), char **p, ...)
1778 s = g (p, va_arg (v,int));
1782 int test (int i, double x);
1783 struct s1 {int (*f) (int a);};
1784 struct s2 {int (*f) (double a);};
1785 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1791 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1796 # Don't try gcc -ansi; that turns off useful extensions and
1797 # breaks some systems' header files.
1798 # AIX -qlanglvl=ansi
1799 # Ultrix and OSF/1 -std1
1800 # HP-UX 10.20 and later -Ae
1801 # HP-UX older versions -Aa -D_HPUX_SOURCE
1802 # SVR4 -Xc -D__EXTENSIONS__
1803 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1805 CC="$ac_save_CC $ac_arg"
1806 rm -f conftest.$ac_objext
1807 if { (eval echo "$as_me:1807: \"$ac_compile\"") >&5
1808 (eval $ac_compile) 2>&5
1810 echo "$as_me:1810: \$? = $ac_status" >&5
1811 (exit $ac_status); } &&
1812 { ac_try='test -s conftest.$ac_objext'
1813 { (eval echo "$as_me:1813: \"$ac_try\"") >&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit $ac_status); }; }; then
1818 ac_cv_prog_cc_stdc=$ac_arg
1821 echo "$as_me: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1824 rm -f conftest.$ac_objext
1826 rm -f conftest.$ac_ext conftest.$ac_objext
1831 case "x$ac_cv_prog_cc_stdc" in
1833 echo "$as_me:1833: result: none needed" >&5
1834 echo "${ECHO_T}none needed" >&6 ;;
1836 echo "$as_me:1836: result: $ac_cv_prog_cc_stdc" >&5
1837 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1838 CC="$CC $ac_cv_prog_cc_stdc" ;;
1841 # This should have been defined by AC_PROG_CC
1844 echo "$as_me:1844: checking \$CFLAGS variable" >&5
1845 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
1848 echo "$as_me:1848: result: broken" >&5
1849 echo "${ECHO_T}broken" >&6
1850 { echo "$as_me:1850: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
1851 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1854 for cf_arg in $cf_flags
1860 cf_new_extra_cppflags=
1862 for cf_add_cflags in $cf_arg
1864 case $cf_fix_cppflags in
1866 case $cf_add_cflags in
1867 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1868 case $cf_add_cflags in
1870 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1872 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1873 && test -z "${cf_tst_cflags}" \
1874 && cf_fix_cppflags=yes
1876 if test $cf_fix_cppflags = yes ; then
1878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1882 elif test "${cf_tst_cflags}" = "\"'" ; then
1884 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1885 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1895 case $cf_add_cflags in
1897 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1899 CPPFLAGS=`echo "$CPPFLAGS" | \
1900 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1901 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1906 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1907 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1914 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1915 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1925 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1927 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1928 && test -z "${cf_tst_cflags}" \
1929 && cf_fix_cppflags=no
1934 if test -n "$cf_new_cflags" ; then
1936 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1937 CFLAGS="${CFLAGS}$cf_new_cflags"
1941 if test -n "$cf_new_cppflags" ; then
1943 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1944 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1948 if test -n "$cf_new_extra_cppflags" ; then
1950 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1951 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1958 echo "$as_me:1958: result: ok" >&5
1959 echo "${ECHO_T}ok" >&6
1963 echo "$as_me:1963: checking \$CC variable" >&5
1964 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1967 echo "$as_me:1967: result: broken" >&5
1968 echo "${ECHO_T}broken" >&6
1969 { echo "$as_me:1969: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1970 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1972 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1973 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1975 for cf_arg in $cf_flags
1983 cf_new_extra_cppflags=
1985 for cf_add_cflags in $cf_arg
1987 case $cf_fix_cppflags in
1989 case $cf_add_cflags in
1990 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1991 case $cf_add_cflags in
1993 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1995 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1996 && test -z "${cf_tst_cflags}" \
1997 && cf_fix_cppflags=yes
1999 if test $cf_fix_cppflags = yes ; then
2001 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2002 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2005 elif test "${cf_tst_cflags}" = "\"'" ; then
2007 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2008 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2018 case $cf_add_cflags in
2020 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2022 CPPFLAGS=`echo "$CPPFLAGS" | \
2023 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2024 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2029 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2030 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2037 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2038 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2048 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2050 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2051 && test -z "${cf_tst_cflags}" \
2052 && cf_fix_cppflags=no
2057 if test -n "$cf_new_cflags" ; then
2059 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2060 CFLAGS="${CFLAGS}$cf_new_cflags"
2064 if test -n "$cf_new_cppflags" ; then
2066 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2067 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2071 if test -n "$cf_new_extra_cppflags" ; then
2073 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2074 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2084 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2086 echo "${as_me:-configure}:2086: testing resulting CC: '$CC' ..." 1>&5
2088 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2090 echo "${as_me:-configure}:2090: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2092 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2094 echo "${as_me:-configure}:2094: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2098 echo "$as_me:2098: result: ok" >&5
2099 echo "${ECHO_T}ok" >&6
2104 ac_cpp='$CPP $CPPFLAGS'
2105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2108 ac_main_return=return
2109 echo "$as_me:2109: checking how to run the C preprocessor" >&5
2110 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2111 # On Suns, sometimes $CPP names a directory.
2112 if test -n "$CPP" && test -d "$CPP"; then
2115 if test -z "$CPP"; then
2116 if test "${ac_cv_prog_CPP+set}" = set; then
2117 echo $ECHO_N "(cached) $ECHO_C" >&6
2119 # Double quotes because CPP needs to be expanded
2120 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2123 for ac_c_preproc_warn_flag in '' yes
2125 # Use a header file that comes with gcc, so configuring glibc
2126 # with a fresh cross-compiler works.
2127 # On the NeXT, cc -E runs the code through the compiler's parser,
2128 # not just through cpp. "Syntax error" is here to catch this case.
2129 cat >conftest.$ac_ext <<_ACEOF
2130 #line 2130 "configure"
2131 #include "confdefs.h"
2135 if { (eval echo "$as_me:2135: \"$ac_cpp conftest.$ac_ext\"") >&5
2136 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2138 egrep -v '^ *\+' conftest.er1 >conftest.err
2140 cat conftest.err >&5
2141 echo "$as_me:2141: \$? = $ac_status" >&5
2142 (exit $ac_status); } >/dev/null; then
2143 if test -s conftest.err; then
2144 ac_cpp_err=$ac_c_preproc_warn_flag
2151 if test -z "$ac_cpp_err"; then
2154 echo "$as_me: failed program was:" >&5
2155 cat conftest.$ac_ext >&5
2156 # Broken: fails on valid input.
2159 rm -f conftest.err conftest.$ac_ext
2161 # OK, works on sane cases. Now check whether non-existent headers
2162 # can be detected and how.
2163 cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <ac_nonexistent.h>
2168 if { (eval echo "$as_me:2168: \"$ac_cpp conftest.$ac_ext\"") >&5
2169 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171 egrep -v '^ *\+' conftest.er1 >conftest.err
2173 cat conftest.err >&5
2174 echo "$as_me:2174: \$? = $ac_status" >&5
2175 (exit $ac_status); } >/dev/null; then
2176 if test -s conftest.err; then
2177 ac_cpp_err=$ac_c_preproc_warn_flag
2184 if test -z "$ac_cpp_err"; then
2185 # Broken: success on invalid input.
2188 echo "$as_me: failed program was:" >&5
2189 cat conftest.$ac_ext >&5
2190 # Passes both tests.
2194 rm -f conftest.err conftest.$ac_ext
2197 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2198 rm -f conftest.err conftest.$ac_ext
2199 if $ac_preproc_ok; then
2211 echo "$as_me:2211: result: $CPP" >&5
2212 echo "${ECHO_T}$CPP" >&6
2214 for ac_c_preproc_warn_flag in '' yes
2216 # Use a header file that comes with gcc, so configuring glibc
2217 # with a fresh cross-compiler works.
2218 # On the NeXT, cc -E runs the code through the compiler's parser,
2219 # not just through cpp. "Syntax error" is here to catch this case.
2220 cat >conftest.$ac_ext <<_ACEOF
2221 #line 2221 "configure"
2222 #include "confdefs.h"
2226 if { (eval echo "$as_me:2226: \"$ac_cpp conftest.$ac_ext\"") >&5
2227 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2229 egrep -v '^ *\+' conftest.er1 >conftest.err
2231 cat conftest.err >&5
2232 echo "$as_me:2232: \$? = $ac_status" >&5
2233 (exit $ac_status); } >/dev/null; then
2234 if test -s conftest.err; then
2235 ac_cpp_err=$ac_c_preproc_warn_flag
2242 if test -z "$ac_cpp_err"; then
2245 echo "$as_me: failed program was:" >&5
2246 cat conftest.$ac_ext >&5
2247 # Broken: fails on valid input.
2250 rm -f conftest.err conftest.$ac_ext
2252 # OK, works on sane cases. Now check whether non-existent headers
2253 # can be detected and how.
2254 cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <ac_nonexistent.h>
2259 if { (eval echo "$as_me:2259: \"$ac_cpp conftest.$ac_ext\"") >&5
2260 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262 egrep -v '^ *\+' conftest.er1 >conftest.err
2264 cat conftest.err >&5
2265 echo "$as_me:2265: \$? = $ac_status" >&5
2266 (exit $ac_status); } >/dev/null; then
2267 if test -s conftest.err; then
2268 ac_cpp_err=$ac_c_preproc_warn_flag
2275 if test -z "$ac_cpp_err"; then
2276 # Broken: success on invalid input.
2279 echo "$as_me: failed program was:" >&5
2280 cat conftest.$ac_ext >&5
2281 # Passes both tests.
2285 rm -f conftest.err conftest.$ac_ext
2288 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2289 rm -f conftest.err conftest.$ac_ext
2290 if $ac_preproc_ok; then
2293 { { echo "$as_me:2293: error: C preprocessor \"$CPP\" fails sanity check" >&5
2294 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2295 { (exit 1); exit 1; }; }
2299 ac_cpp='$CPP $CPPFLAGS'
2300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2303 ac_main_return=return
2305 if test $ac_cv_c_compiler_gnu = yes; then
2306 echo "$as_me:2306: checking whether $CC needs -traditional" >&5
2307 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2308 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2309 echo $ECHO_N "(cached) $ECHO_C" >&6
2311 ac_pattern="Autoconf.*'x'"
2312 cat >conftest.$ac_ext <<_ACEOF
2313 #line 2313 "configure"
2314 #include "confdefs.h"
2316 int Autoconf = TIOCGETP;
2318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2319 egrep "$ac_pattern" >/dev/null 2>&1; then
2320 ac_cv_prog_gcc_traditional=yes
2322 ac_cv_prog_gcc_traditional=no
2326 if test $ac_cv_prog_gcc_traditional = no; then
2327 cat >conftest.$ac_ext <<_ACEOF
2328 #line 2328 "configure"
2329 #include "confdefs.h"
2331 int Autoconf = TCGETA;
2333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2334 egrep "$ac_pattern" >/dev/null 2>&1; then
2335 ac_cv_prog_gcc_traditional=yes
2341 echo "$as_me:2341: result: $ac_cv_prog_gcc_traditional" >&5
2342 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2343 if test $ac_cv_prog_gcc_traditional = yes; then
2344 CC="$CC -traditional"
2348 echo "$as_me:2348: checking whether $CC understands -c and -o together" >&5
2349 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2350 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2351 echo $ECHO_N "(cached) $ECHO_C" >&6
2354 cat > conftest.$ac_ext <<CF_EOF
2357 ${cf_cv_main_return:-return}(0);
2360 # We do the test twice because some compilers refuse to overwrite an
2361 # existing .o file with -o, though they will create one.
2362 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2363 if { (eval echo "$as_me:2363: \"$ac_try\"") >&5
2366 echo "$as_me:2366: \$? = $ac_status" >&5
2367 (exit $ac_status); } &&
2368 test -f conftest2.$ac_objext && { (eval echo "$as_me:2368: \"$ac_try\"") >&5
2371 echo "$as_me:2371: \$? = $ac_status" >&5
2372 (exit $ac_status); };
2374 eval cf_cv_prog_CC_c_o=yes
2376 eval cf_cv_prog_CC_c_o=no
2381 if test $cf_cv_prog_CC_c_o = yes; then
2382 echo "$as_me:2382: result: yes" >&5
2383 echo "${ECHO_T}yes" >&6
2385 echo "$as_me:2385: result: no" >&5
2386 echo "${ECHO_T}no" >&6
2389 test "$program_prefix" != NONE &&
2390 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2391 # Use a double $ so make ignores it.
2392 test "$program_suffix" != NONE &&
2393 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2394 # Double any \ or $. echo might interpret backslashes.
2395 # By default was `s,x,x', remove it if useless.
2396 cat <<\_ACEOF >conftest.sed
2397 s/[\\$]/&&/g;s/;s,x,x,$//
2399 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2402 for ac_prog in mawk gawk nawk awk
2404 # Extract the first word of "$ac_prog", so it can be a program name with args.
2405 set dummy $ac_prog; ac_word=$2
2406 echo "$as_me:2406: checking for $ac_word" >&5
2407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2408 if test "${ac_cv_prog_AWK+set}" = set; then
2409 echo $ECHO_N "(cached) $ECHO_C" >&6
2411 if test -n "$AWK"; then
2412 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2414 ac_save_IFS=$IFS; IFS=$ac_path_separator
2416 for ac_dir in $ac_dummy; do
2418 test -z "$ac_dir" && ac_dir=.
2419 $as_executable_p "$ac_dir/$ac_word" || continue
2420 ac_cv_prog_AWK="$ac_prog"
2421 echo "$as_me:2421: found $ac_dir/$ac_word" >&5
2428 if test -n "$AWK"; then
2429 echo "$as_me:2429: result: $AWK" >&5
2430 echo "${ECHO_T}$AWK" >&6
2432 echo "$as_me:2432: result: no" >&5
2433 echo "${ECHO_T}no" >&6
2436 test -n "$AWK" && break
2439 test -z "$AWK" && { { echo "$as_me:2439: error: No awk program found" >&5
2440 echo "$as_me: error: No awk program found" >&2;}
2441 { (exit 1); exit 1; }; }
2443 echo "$as_me:2443: checking for egrep" >&5
2444 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2445 if test "${ac_cv_prog_egrep+set}" = set; then
2446 echo $ECHO_N "(cached) $ECHO_C" >&6
2448 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2449 then ac_cv_prog_egrep='grep -E'
2450 else ac_cv_prog_egrep='egrep'
2453 echo "$as_me:2453: result: $ac_cv_prog_egrep" >&5
2454 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2455 EGREP=$ac_cv_prog_egrep
2457 test -z "$EGREP" && { { echo "$as_me:2457: error: No egrep program found" >&5
2458 echo "$as_me: error: No egrep program found" >&2;}
2459 { (exit 1); exit 1; }; }
2461 # Find a good install program. We prefer a C program (faster),
2462 # so one script is as good as another. But avoid the broken or
2463 # incompatible versions:
2464 # SysV /etc/install, /usr/sbin/install
2465 # SunOS /usr/etc/install
2466 # IRIX /sbin/install
2468 # AmigaOS /C/install, which installs bootblocks on floppy discs
2469 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2470 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2471 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2472 # ./install, which can be erroneously created by make from ./install.sh.
2473 echo "$as_me:2473: checking for a BSD compatible install" >&5
2474 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2475 if test -z "$INSTALL"; then
2476 if test "${ac_cv_path_install+set}" = set; then
2477 echo $ECHO_N "(cached) $ECHO_C" >&6
2479 ac_save_IFS=$IFS; IFS=$ac_path_separator
2480 for ac_dir in $PATH; do
2482 # Account for people who put trailing slashes in PATH elements.
2484 / | ./ | .// | /cC/* \
2485 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2488 # OSF1 and SCO ODT 3.0 have their own names for install.
2489 # Don't use installbsd from OSF since it installs stuff as root
2491 for ac_prog in ginstall scoinst install; do
2492 if $as_executable_p "$ac_dir/$ac_prog"; then
2493 if test $ac_prog = install &&
2494 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2495 # AIX install. It has an incompatible calling convention.
2497 elif test $ac_prog = install &&
2498 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2499 # program-specific install script used by HP pwplus--don't use.
2502 ac_cv_path_install="$ac_dir/$ac_prog -c"
2512 if test "${ac_cv_path_install+set}" = set; then
2513 INSTALL=$ac_cv_path_install
2515 # As a last resort, use the slow shell script. We don't cache a
2516 # path for INSTALL within a source directory, because that will
2517 # break other packages using the cache if that directory is
2518 # removed, or if the path is relative.
2519 INSTALL=$ac_install_sh
2522 echo "$as_me:2522: result: $INSTALL" >&5
2523 echo "${ECHO_T}$INSTALL" >&6
2525 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2526 # It thinks the first close brace ends the variable substitution.
2527 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2529 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2531 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2533 echo "$as_me:2533: checking whether ln -s works" >&5
2534 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2536 if test "$LN_S" = "ln -s"; then
2537 echo "$as_me:2537: result: yes" >&5
2538 echo "${ECHO_T}yes" >&6
2540 echo "$as_me:2540: result: no, using $LN_S" >&5
2541 echo "${ECHO_T}no, using $LN_S" >&6
2544 echo "$as_me:2544: checking if $LN_S -f options work" >&5
2545 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2547 rm -f conf$$.src conf$$dst
2549 echo first >conf$$.src
2550 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2555 rm -f conf$$.dst conf$$src
2556 echo "$as_me:2556: result: $cf_prog_ln_sf" >&5
2557 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2559 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2561 # Find a good install program. We prefer a C program (faster),
2562 # so one script is as good as another. But avoid the broken or
2563 # incompatible versions:
2564 # SysV /etc/install, /usr/sbin/install
2565 # SunOS /usr/etc/install
2566 # IRIX /sbin/install
2568 # AmigaOS /C/install, which installs bootblocks on floppy discs
2569 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2570 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2571 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2572 # ./install, which can be erroneously created by make from ./install.sh.
2573 echo "$as_me:2573: checking for a BSD compatible install" >&5
2574 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2575 if test -z "$INSTALL"; then
2576 if test "${ac_cv_path_install+set}" = set; then
2577 echo $ECHO_N "(cached) $ECHO_C" >&6
2579 ac_save_IFS=$IFS; IFS=$ac_path_separator
2580 for ac_dir in $PATH; do
2582 # Account for people who put trailing slashes in PATH elements.
2584 / | ./ | .// | /cC/* \
2585 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2588 # OSF1 and SCO ODT 3.0 have their own names for install.
2589 # Don't use installbsd from OSF since it installs stuff as root
2591 for ac_prog in ginstall scoinst install; do
2592 if $as_executable_p "$ac_dir/$ac_prog"; then
2593 if test $ac_prog = install &&
2594 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2595 # AIX install. It has an incompatible calling convention.
2597 elif test $ac_prog = install &&
2598 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2599 # program-specific install script used by HP pwplus--don't use.
2602 ac_cv_path_install="$ac_dir/$ac_prog -c"
2612 if test "${ac_cv_path_install+set}" = set; then
2613 INSTALL=$ac_cv_path_install
2615 # As a last resort, use the slow shell script. We don't cache a
2616 # path for INSTALL within a source directory, because that will
2617 # break other packages using the cache if that directory is
2618 # removed, or if the path is relative.
2619 INSTALL=$ac_install_sh
2622 echo "$as_me:2622: result: $INSTALL" >&5
2623 echo "${ECHO_T}$INSTALL" >&6
2625 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2626 # It thinks the first close brace ends the variable substitution.
2627 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2629 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2631 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2637 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2638 test -z "$cf_dir" && cf_dir=.
2639 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2643 echo "$as_me:2643: checking if you want to install stripped executables" >&5
2644 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2646 # Check whether --enable-stripping or --disable-stripping was given.
2647 if test "${enable_stripping+set}" = set; then
2648 enableval="$enable_stripping"
2649 test "$enableval" != no && enableval=yes
2650 if test "$enableval" != "yes" ; then
2660 echo "$as_me:2660: result: $with_stripping" >&5
2661 echo "${ECHO_T}$with_stripping" >&6
2663 if test "$with_stripping" = yes
2670 : ${INSTALL:=install}
2671 echo "$as_me:2671: checking if install accepts -p option" >&5
2672 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2673 if test "${cf_cv_install_p+set}" = set; then
2674 echo $ECHO_N "(cached) $ECHO_C" >&6
2681 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2683 if test -f conftest.out/conftest.in
2685 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2686 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2687 if test -s conftest.err
2702 echo "$as_me:2702: result: $cf_cv_install_p" >&5
2703 echo "${ECHO_T}$cf_cv_install_p" >&6
2705 echo "$as_me:2705: checking if install needs to be told about ownership" >&5
2706 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2707 case `$ac_config_guess` in
2716 echo "$as_me:2716: result: $with_install_o" >&5
2717 echo "${ECHO_T}$with_install_o" >&6
2718 if test "x$with_install_o" = xyes
2720 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'`
2725 echo "$as_me:2725: checking for long file names" >&5
2726 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2727 if test "${ac_cv_sys_long_file_names+set}" = set; then
2728 echo $ECHO_N "(cached) $ECHO_C" >&6
2730 ac_cv_sys_long_file_names=yes
2731 # Test for long file names in all the places we know might matter:
2732 # . the current directory, where building will happen
2733 # $prefix/lib where we will be installing things
2734 # $exec_prefix/lib likewise
2735 # eval it to expand exec_prefix.
2736 # $TMPDIR if set, where it might want to write temporary files
2737 # if $TMPDIR is not set:
2738 # /tmp where it might want to write temporary files
2741 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2744 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2746 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2747 test -d $ac_dir || continue
2748 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2749 ac_xdir=$ac_dir/cf$$
2750 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2751 ac_tf1=$ac_xdir/conftest9012345
2752 ac_tf2=$ac_xdir/conftest9012346
2753 (echo 1 >$ac_tf1) 2>/dev/null
2754 (echo 2 >$ac_tf2) 2>/dev/null
2755 ac_val=`cat $ac_tf1 2>/dev/null`
2756 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2757 ac_cv_sys_long_file_names=no
2758 rm -rf $ac_xdir 2>/dev/null
2761 rm -rf $ac_xdir 2>/dev/null
2764 echo "$as_me:2764: result: $ac_cv_sys_long_file_names" >&5
2765 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2766 if test $ac_cv_sys_long_file_names = yes; then
2768 cat >>confdefs.h <<\EOF
2769 #define HAVE_LONG_FILE_NAMES 1
2774 # if we find pkg-config, check if we should install the ".pc" files.
2776 echo "$as_me:2776: checking if you want to use pkg-config" >&5
2777 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2779 # Check whether --with-pkg-config or --without-pkg-config was given.
2780 if test "${with_pkg_config+set}" = set; then
2781 withval="$with_pkg_config"
2782 cf_pkg_config=$withval
2786 echo "$as_me:2786: result: $cf_pkg_config" >&5
2787 echo "${ECHO_T}$cf_pkg_config" >&6
2789 case $cf_pkg_config in
2795 if test -n "$ac_tool_prefix"; then
2796 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2797 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2798 echo "$as_me:2798: checking for $ac_word" >&5
2799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2800 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2801 echo $ECHO_N "(cached) $ECHO_C" >&6
2805 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2808 ac_save_IFS=$IFS; IFS=$ac_path_separator
2810 for ac_dir in $ac_dummy; do
2812 test -z "$ac_dir" && ac_dir=.
2813 if $as_executable_p "$ac_dir/$ac_word"; then
2814 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2815 echo "$as_me:2815: found $ac_dir/$ac_word" >&5
2823 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2825 if test -n "$PKG_CONFIG"; then
2826 echo "$as_me:2826: result: $PKG_CONFIG" >&5
2827 echo "${ECHO_T}$PKG_CONFIG" >&6
2829 echo "$as_me:2829: result: no" >&5
2830 echo "${ECHO_T}no" >&6
2834 if test -z "$ac_cv_path_PKG_CONFIG"; then
2835 ac_pt_PKG_CONFIG=$PKG_CONFIG
2836 # Extract the first word of "pkg-config", so it can be a program name with args.
2837 set dummy pkg-config; ac_word=$2
2838 echo "$as_me:2838: checking for $ac_word" >&5
2839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2840 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2841 echo $ECHO_N "(cached) $ECHO_C" >&6
2843 case $ac_pt_PKG_CONFIG in
2845 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2848 ac_save_IFS=$IFS; IFS=$ac_path_separator
2850 for ac_dir in $ac_dummy; do
2852 test -z "$ac_dir" && ac_dir=.
2853 if $as_executable_p "$ac_dir/$ac_word"; then
2854 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2855 echo "$as_me:2855: found $ac_dir/$ac_word" >&5
2860 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2864 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2866 if test -n "$ac_pt_PKG_CONFIG"; then
2867 echo "$as_me:2867: result: $ac_pt_PKG_CONFIG" >&5
2868 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2870 echo "$as_me:2870: result: no" >&5
2871 echo "${ECHO_T}no" >&6
2874 PKG_CONFIG=$ac_pt_PKG_CONFIG
2876 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2885 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2886 if test "$PKG_CONFIG" != none ; then
2888 if test "x$prefix" != xNONE; then
2889 cf_path_syntax="$prefix"
2891 cf_path_syntax="$ac_default_prefix"
2894 case ".$PKG_CONFIG" in
2899 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2901 (.\${*prefix}*|.\${*dir}*)
2902 eval PKG_CONFIG="$PKG_CONFIG"
2903 case ".$PKG_CONFIG" in
2905 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2910 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2913 { { echo "$as_me:2913: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2914 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2915 { (exit 1); exit 1; }; }
2919 elif test "x$cf_pkg_config" != xno ; then
2920 { echo "$as_me:2920: WARNING: pkg-config is not installed" >&5
2921 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2926 echo "$as_me:2926: checking for pkg-config library directory" >&5
2927 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2930 echo "$as_me:2930: checking for $PKG_CONFIG library directory" >&5
2931 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2935 PKG_CONFIG_LIBDIR=no
2937 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2938 if test "${with_pkg_config_libdir+set}" = set; then
2939 withval="$with_pkg_config_libdir"
2940 PKG_CONFIG_LIBDIR=$withval
2942 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2945 case x$PKG_CONFIG_LIBDIR in
2949 # Look for the library directory using the same prefix as the executable
2950 if test "x$PKG_CONFIG" = xnone
2954 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2957 # If you don't like using the default architecture, you have to specify the
2958 # intended library directory and corresponding compiler/linker options.
2960 # This case allows for Debian's 2014-flavor of multiarch, along with the
2961 # most common variations before that point. Some other variants spell the
2962 # directory differently, e.g., "pkg-config", and put it in unusual places.
2963 # pkg-config has always been poorly standardized, which is ironic...
2964 case x`(arch) 2>/dev/null` in
2967 $cf_path/lib/*64-linux-gnu \
2975 $cf_path/lib/*-linux-gnu \
2983 test -n "$verbose" && echo " list..." 1>&6
2985 echo "${as_me:-configure}:2985: testing list... ..." 1>&5
2987 for cf_config in $cf_search_path
2989 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2991 echo "${as_me:-configure}:2991: testing checking $cf_config/pkgconfig ..." 1>&5
2993 if test -d $cf_config/pkgconfig
2995 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2996 echo "$as_me:2996: checking done" >&5
2997 echo $ECHO_N "checking done... $ECHO_C" >&6
3006 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3007 echo "$as_me:3007: result: $PKG_CONFIG_LIBDIR" >&5
3008 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3011 echo "$as_me:3011: checking if you want to build test-programs" >&5
3012 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3014 # Check whether --with-tests or --without-tests was given.
3015 if test "${with_tests+set}" = set; then
3016 withval="$with_tests"
3017 cf_with_tests=$withval
3021 echo "$as_me:3021: result: $cf_with_tests" >&5
3022 echo "${ECHO_T}$cf_with_tests" >&6
3024 echo "$as_me:3024: checking if we should assume mixed-case filenames" >&5
3025 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3027 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3028 if test "${enable_mixed_case+set}" = set; then
3029 enableval="$enable_mixed_case"
3030 enable_mixedcase=$enableval
3032 enable_mixedcase=auto
3034 echo "$as_me:3034: result: $enable_mixedcase" >&5
3035 echo "${ECHO_T}$enable_mixedcase" >&6
3036 if test "$enable_mixedcase" = "auto" ; then
3038 echo "$as_me:3038: checking if filesystem supports mixed-case filenames" >&5
3039 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3040 if test "${cf_cv_mixedcase+set}" = set; then
3041 echo $ECHO_N "(cached) $ECHO_C" >&6
3044 if test "$cross_compiling" = yes ; then
3045 case $target_alias in
3046 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3054 rm -f conftest CONFTEST
3056 if test -f CONFTEST ; then
3061 rm -f conftest CONFTEST
3065 echo "$as_me:3065: result: $cf_cv_mixedcase" >&5
3066 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3067 test "$cf_cv_mixedcase" = yes &&
3068 cat >>confdefs.h <<\EOF
3069 #define MIXEDCASE_FILENAMES 1
3073 cf_cv_mixedcase=$enable_mixedcase
3074 if test "$enable_mixedcase" = "yes" ; then
3075 cat >>confdefs.h <<\EOF
3076 #define MIXEDCASE_FILENAMES 1
3082 # do this after mixed-case option (tags/TAGS is not as important as tic).
3083 echo "$as_me:3083: checking whether ${MAKE-make} sets \${MAKE}" >&5
3084 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3085 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3086 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3087 echo $ECHO_N "(cached) $ECHO_C" >&6
3089 cat >conftest.make <<\EOF
3091 @echo 'ac_maketemp="${MAKE}"'
3093 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3094 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3095 if test -n "$ac_maketemp"; then
3096 eval ac_cv_prog_make_${ac_make}_set=yes
3098 eval ac_cv_prog_make_${ac_make}_set=no
3102 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3103 echo "$as_me:3103: result: yes" >&5
3104 echo "${ECHO_T}yes" >&6
3107 echo "$as_me:3107: result: no" >&5
3108 echo "${ECHO_T}no" >&6
3109 SET_MAKE="MAKE=${MAKE-make}"
3112 for ac_prog in exctags ctags
3114 # Extract the first word of "$ac_prog", so it can be a program name with args.
3115 set dummy $ac_prog; ac_word=$2
3116 echo "$as_me:3116: checking for $ac_word" >&5
3117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3118 if test "${ac_cv_prog_CTAGS+set}" = set; then
3119 echo $ECHO_N "(cached) $ECHO_C" >&6
3121 if test -n "$CTAGS"; then
3122 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3124 ac_save_IFS=$IFS; IFS=$ac_path_separator
3126 for ac_dir in $ac_dummy; do
3128 test -z "$ac_dir" && ac_dir=.
3129 $as_executable_p "$ac_dir/$ac_word" || continue
3130 ac_cv_prog_CTAGS="$ac_prog"
3131 echo "$as_me:3131: found $ac_dir/$ac_word" >&5
3137 CTAGS=$ac_cv_prog_CTAGS
3138 if test -n "$CTAGS"; then
3139 echo "$as_me:3139: result: $CTAGS" >&5
3140 echo "${ECHO_T}$CTAGS" >&6
3142 echo "$as_me:3142: result: no" >&5
3143 echo "${ECHO_T}no" >&6
3146 test -n "$CTAGS" && break
3149 for ac_prog in exetags etags
3151 # Extract the first word of "$ac_prog", so it can be a program name with args.
3152 set dummy $ac_prog; ac_word=$2
3153 echo "$as_me:3153: checking for $ac_word" >&5
3154 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3155 if test "${ac_cv_prog_ETAGS+set}" = set; then
3156 echo $ECHO_N "(cached) $ECHO_C" >&6
3158 if test -n "$ETAGS"; then
3159 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3161 ac_save_IFS=$IFS; IFS=$ac_path_separator
3163 for ac_dir in $ac_dummy; do
3165 test -z "$ac_dir" && ac_dir=.
3166 $as_executable_p "$ac_dir/$ac_word" || continue
3167 ac_cv_prog_ETAGS="$ac_prog"
3168 echo "$as_me:3168: found $ac_dir/$ac_word" >&5
3174 ETAGS=$ac_cv_prog_ETAGS
3175 if test -n "$ETAGS"; then
3176 echo "$as_me:3176: result: $ETAGS" >&5
3177 echo "${ECHO_T}$ETAGS" >&6
3179 echo "$as_me:3179: result: no" >&5
3180 echo "${ECHO_T}no" >&6
3183 test -n "$ETAGS" && break
3186 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3187 set dummy ${CTAGS:-ctags}; ac_word=$2
3188 echo "$as_me:3188: checking for $ac_word" >&5
3189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3190 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3191 echo $ECHO_N "(cached) $ECHO_C" >&6
3193 if test -n "$MAKE_LOWER_TAGS"; then
3194 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3196 ac_save_IFS=$IFS; IFS=$ac_path_separator
3198 for ac_dir in $ac_dummy; do
3200 test -z "$ac_dir" && ac_dir=.
3201 $as_executable_p "$ac_dir/$ac_word" || continue
3202 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3203 echo "$as_me:3203: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3210 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3211 if test -n "$MAKE_LOWER_TAGS"; then
3212 echo "$as_me:3212: result: $MAKE_LOWER_TAGS" >&5
3213 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3215 echo "$as_me:3215: result: no" >&5
3216 echo "${ECHO_T}no" >&6
3219 if test "$cf_cv_mixedcase" = yes ; then
3220 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3221 set dummy ${ETAGS:-etags}; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3225 echo $ECHO_N "(cached) $ECHO_C" >&6
3227 if test -n "$MAKE_UPPER_TAGS"; then
3228 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3230 ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 for ac_dir in $ac_dummy; do
3234 test -z "$ac_dir" && ac_dir=.
3235 $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3241 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3244 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3245 if test -n "$MAKE_UPPER_TAGS"; then
3246 echo "$as_me:3246: result: $MAKE_UPPER_TAGS" >&5
3247 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3249 echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3257 if test "$MAKE_UPPER_TAGS" = yes ; then
3263 if test "$MAKE_LOWER_TAGS" = yes ; then
3269 echo "$as_me:3269: checking for makeflags variable" >&5
3270 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3271 if test "${cf_cv_makeflags+set}" = set; then
3272 echo $ECHO_N "(cached) $ECHO_C" >&6
3276 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3278 cat >cf_makeflags.tmp <<CF_EOF
3281 @ echo '.$cf_option'
3283 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3284 case "$cf_result" in
3286 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3287 case "$cf_result" in
3288 (.*CC=*) cf_cv_makeflags=
3290 (*) cf_cv_makeflags=$cf_option
3299 echo "${as_me:-configure}:3299: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3304 rm -f cf_makeflags.tmp
3307 echo "$as_me:3307: result: $cf_cv_makeflags" >&5
3308 echo "${ECHO_T}$cf_cv_makeflags" >&6
3310 if test -n "$ac_tool_prefix"; then
3311 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3312 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3313 echo "$as_me:3313: checking for $ac_word" >&5
3314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3315 if test "${ac_cv_prog_RANLIB+set}" = set; then
3316 echo $ECHO_N "(cached) $ECHO_C" >&6
3318 if test -n "$RANLIB"; then
3319 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3321 ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 for ac_dir in $ac_dummy; do
3325 test -z "$ac_dir" && ac_dir=.
3326 $as_executable_p "$ac_dir/$ac_word" || continue
3327 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3328 echo "$as_me:3328: found $ac_dir/$ac_word" >&5
3334 RANLIB=$ac_cv_prog_RANLIB
3335 if test -n "$RANLIB"; then
3336 echo "$as_me:3336: result: $RANLIB" >&5
3337 echo "${ECHO_T}$RANLIB" >&6
3339 echo "$as_me:3339: result: no" >&5
3340 echo "${ECHO_T}no" >&6
3344 if test -z "$ac_cv_prog_RANLIB"; then
3345 ac_ct_RANLIB=$RANLIB
3346 # Extract the first word of "ranlib", so it can be a program name with args.
3347 set dummy ranlib; ac_word=$2
3348 echo "$as_me:3348: checking for $ac_word" >&5
3349 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3350 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3351 echo $ECHO_N "(cached) $ECHO_C" >&6
3353 if test -n "$ac_ct_RANLIB"; then
3354 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3356 ac_save_IFS=$IFS; IFS=$ac_path_separator
3358 for ac_dir in $ac_dummy; do
3360 test -z "$ac_dir" && ac_dir=.
3361 $as_executable_p "$ac_dir/$ac_word" || continue
3362 ac_cv_prog_ac_ct_RANLIB="ranlib"
3363 echo "$as_me:3363: found $ac_dir/$ac_word" >&5
3367 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3370 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3371 if test -n "$ac_ct_RANLIB"; then
3372 echo "$as_me:3372: result: $ac_ct_RANLIB" >&5
3373 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3375 echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3379 RANLIB=$ac_ct_RANLIB
3381 RANLIB="$ac_cv_prog_RANLIB"
3384 if test -n "$ac_tool_prefix"; then
3385 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3386 set dummy ${ac_tool_prefix}ld; ac_word=$2
3387 echo "$as_me:3387: checking for $ac_word" >&5
3388 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3389 if test "${ac_cv_prog_LD+set}" = set; then
3390 echo $ECHO_N "(cached) $ECHO_C" >&6
3392 if test -n "$LD"; then
3393 ac_cv_prog_LD="$LD" # Let the user override the test.
3395 ac_save_IFS=$IFS; IFS=$ac_path_separator
3397 for ac_dir in $ac_dummy; do
3399 test -z "$ac_dir" && ac_dir=.
3400 $as_executable_p "$ac_dir/$ac_word" || continue
3401 ac_cv_prog_LD="${ac_tool_prefix}ld"
3402 echo "$as_me:3402: found $ac_dir/$ac_word" >&5
3409 if test -n "$LD"; then
3410 echo "$as_me:3410: result: $LD" >&5
3411 echo "${ECHO_T}$LD" >&6
3413 echo "$as_me:3413: result: no" >&5
3414 echo "${ECHO_T}no" >&6
3418 if test -z "$ac_cv_prog_LD"; then
3420 # Extract the first word of "ld", so it can be a program name with args.
3421 set dummy ld; ac_word=$2
3422 echo "$as_me:3422: checking for $ac_word" >&5
3423 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3424 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3425 echo $ECHO_N "(cached) $ECHO_C" >&6
3427 if test -n "$ac_ct_LD"; then
3428 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3430 ac_save_IFS=$IFS; IFS=$ac_path_separator
3432 for ac_dir in $ac_dummy; do
3434 test -z "$ac_dir" && ac_dir=.
3435 $as_executable_p "$ac_dir/$ac_word" || continue
3436 ac_cv_prog_ac_ct_LD="ld"
3437 echo "$as_me:3437: found $ac_dir/$ac_word" >&5
3441 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3444 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3445 if test -n "$ac_ct_LD"; then
3446 echo "$as_me:3446: result: $ac_ct_LD" >&5
3447 echo "${ECHO_T}$ac_ct_LD" >&6
3449 echo "$as_me:3449: result: no" >&5
3450 echo "${ECHO_T}no" >&6
3458 if test -n "$ac_tool_prefix"; then
3459 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3460 set dummy ${ac_tool_prefix}ar; ac_word=$2
3461 echo "$as_me:3461: checking for $ac_word" >&5
3462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3463 if test "${ac_cv_prog_AR+set}" = set; then
3464 echo $ECHO_N "(cached) $ECHO_C" >&6
3466 if test -n "$AR"; then
3467 ac_cv_prog_AR="$AR" # Let the user override the test.
3469 ac_save_IFS=$IFS; IFS=$ac_path_separator
3471 for ac_dir in $ac_dummy; do
3473 test -z "$ac_dir" && ac_dir=.
3474 $as_executable_p "$ac_dir/$ac_word" || continue
3475 ac_cv_prog_AR="${ac_tool_prefix}ar"
3476 echo "$as_me:3476: found $ac_dir/$ac_word" >&5
3483 if test -n "$AR"; then
3484 echo "$as_me:3484: result: $AR" >&5
3485 echo "${ECHO_T}$AR" >&6
3487 echo "$as_me:3487: result: no" >&5
3488 echo "${ECHO_T}no" >&6
3492 if test -z "$ac_cv_prog_AR"; then
3494 # Extract the first word of "ar", so it can be a program name with args.
3495 set dummy ar; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3499 echo $ECHO_N "(cached) $ECHO_C" >&6
3501 if test -n "$ac_ct_AR"; then
3502 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3504 ac_save_IFS=$IFS; IFS=$ac_path_separator
3506 for ac_dir in $ac_dummy; do
3508 test -z "$ac_dir" && ac_dir=.
3509 $as_executable_p "$ac_dir/$ac_word" || continue
3510 ac_cv_prog_ac_ct_AR="ar"
3511 echo "$as_me:3511: found $ac_dir/$ac_word" >&5
3515 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3518 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3519 if test -n "$ac_ct_AR"; then
3520 echo "$as_me:3520: result: $ac_ct_AR" >&5
3521 echo "${ECHO_T}$ac_ct_AR" >&6
3523 echo "$as_me:3523: result: no" >&5
3524 echo "${ECHO_T}no" >&6
3532 if test -n "$ac_tool_prefix"; then
3533 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3534 set dummy ${ac_tool_prefix}ar; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_AR+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3540 if test -n "$AR"; then
3541 ac_cv_prog_AR="$AR" # Let the user override the test.
3543 ac_save_IFS=$IFS; IFS=$ac_path_separator
3545 for ac_dir in $ac_dummy; do
3547 test -z "$ac_dir" && ac_dir=.
3548 $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_AR="${ac_tool_prefix}ar"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3557 if test -n "$AR"; then
3558 echo "$as_me:3558: result: $AR" >&5
3559 echo "${ECHO_T}$AR" >&6
3561 echo "$as_me:3561: result: no" >&5
3562 echo "${ECHO_T}no" >&6
3566 if test -z "$ac_cv_prog_AR"; then
3568 # Extract the first word of "ar", so it can be a program name with args.
3569 set dummy ar; ac_word=$2
3570 echo "$as_me:3570: checking for $ac_word" >&5
3571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3572 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3573 echo $ECHO_N "(cached) $ECHO_C" >&6
3575 if test -n "$ac_ct_AR"; then
3576 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3578 ac_save_IFS=$IFS; IFS=$ac_path_separator
3580 for ac_dir in $ac_dummy; do
3582 test -z "$ac_dir" && ac_dir=.
3583 $as_executable_p "$ac_dir/$ac_word" || continue
3584 ac_cv_prog_ac_ct_AR="ar"
3585 echo "$as_me:3585: found $ac_dir/$ac_word" >&5
3589 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3592 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3593 if test -n "$ac_ct_AR"; then
3594 echo "$as_me:3594: result: $ac_ct_AR" >&5
3595 echo "${ECHO_T}$ac_ct_AR" >&6
3597 echo "$as_me:3597: result: no" >&5
3598 echo "${ECHO_T}no" >&6
3606 echo "$as_me:3606: checking for options to update archives" >&5
3607 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3608 if test "${cf_cv_ar_flags+set}" = set; then
3609 echo $ECHO_N "(cached) $ECHO_C" >&6
3612 cf_cv_ar_flags=unknown
3613 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3616 # check if $ARFLAGS already contains this choice
3617 if test "x$ARFLAGS" != "x" ; then
3618 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3619 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3625 rm -f conftest.$ac_cv_objext
3628 cat >conftest.$ac_ext <<EOF
3629 #line 3629 "configure"
3630 int testdata[3] = { 123, 456, 789 };
3632 if { (eval echo "$as_me:3632: \"$ac_compile\"") >&5
3633 (eval $ac_compile) 2>&5
3635 echo "$as_me:3635: \$? = $ac_status" >&5
3636 (exit $ac_status); } ; then
3637 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3638 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3639 if test -f conftest.a ; then
3640 cf_cv_ar_flags=$cf_ar_flags
3644 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3646 echo "${as_me:-configure}:3646: testing cannot compile test-program ..." 1>&5
3651 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3654 echo "$as_me:3654: result: $cf_cv_ar_flags" >&5
3655 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3657 if test -n "$ARFLAGS" ; then
3658 if test -n "$cf_cv_ar_flags" ; then
3659 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3662 ARFLAGS=$cf_cv_ar_flags
3665 echo "$as_me:3665: checking for PATH separator" >&5
3666 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3667 case $cf_cv_system_name in
3668 (os2*) PATH_SEPARATOR=';' ;;
3669 (*) ${PATH_SEPARATOR:=':'} ;;
3672 echo "$as_me:3672: result: $PATH_SEPARATOR" >&5
3673 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3675 echo "$as_me:3675: checking if you have specified an install-prefix" >&5
3676 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3678 # Check whether --with-install-prefix or --without-install-prefix was given.
3679 if test "${with_install_prefix+set}" = set; then
3680 withval="$with_install_prefix"
3684 (*) DESTDIR="$withval"
3688 echo "$as_me:3688: result: $DESTDIR" >&5
3689 echo "${ECHO_T}$DESTDIR" >&6
3691 ###############################################################################
3693 # If we're cross-compiling, allow the user to override the tools and their
3694 # options. The configure script is oriented toward identifying the host
3695 # compiler, etc., but we need a build compiler to generate parts of the source.
3697 if test "$cross_compiling" = yes ; then
3699 # defaults that we might want to override
3700 : ${BUILD_CFLAGS:=''}
3701 : ${BUILD_CPPFLAGS:=''}
3702 : ${BUILD_LDFLAGS:=''}
3704 : ${BUILD_EXEEXT:='$x'}
3705 : ${BUILD_OBJEXT:='o'}
3707 # Check whether --with-build-cc or --without-build-cc was given.
3708 if test "${with_build_cc+set}" = set; then
3709 withval="$with_build_cc"
3712 for ac_prog in gcc clang c99 c89 cc cl
3714 # Extract the first word of "$ac_prog", so it can be a program name with args.
3715 set dummy $ac_prog; ac_word=$2
3716 echo "$as_me:3716: checking for $ac_word" >&5
3717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3718 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3719 echo $ECHO_N "(cached) $ECHO_C" >&6
3721 if test -n "$BUILD_CC"; then
3722 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3724 ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 for ac_dir in $ac_dummy; do
3728 test -z "$ac_dir" && ac_dir=.
3729 $as_executable_p "$ac_dir/$ac_word" || continue
3730 ac_cv_prog_BUILD_CC="$ac_prog"
3731 echo "$as_me:3731: found $ac_dir/$ac_word" >&5
3737 BUILD_CC=$ac_cv_prog_BUILD_CC
3738 if test -n "$BUILD_CC"; then
3739 echo "$as_me:3739: result: $BUILD_CC" >&5
3740 echo "${ECHO_T}$BUILD_CC" >&6
3742 echo "$as_me:3742: result: no" >&5
3743 echo "${ECHO_T}no" >&6
3746 test -n "$BUILD_CC" && break
3748 test -n "$BUILD_CC" || BUILD_CC="none"
3751 echo "$as_me:3751: checking for native build C compiler" >&5
3752 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3753 echo "$as_me:3753: result: $BUILD_CC" >&5
3754 echo "${ECHO_T}$BUILD_CC" >&6
3756 echo "$as_me:3756: checking for native build C preprocessor" >&5
3757 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3759 # Check whether --with-build-cpp or --without-build-cpp was given.
3760 if test "${with_build_cpp+set}" = set; then
3761 withval="$with_build_cpp"
3762 BUILD_CPP="$withval"
3764 BUILD_CPP='${BUILD_CC} -E'
3766 echo "$as_me:3766: result: $BUILD_CPP" >&5
3767 echo "${ECHO_T}$BUILD_CPP" >&6
3769 echo "$as_me:3769: checking for native build C flags" >&5
3770 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3772 # Check whether --with-build-cflags or --without-build-cflags was given.
3773 if test "${with_build_cflags+set}" = set; then
3774 withval="$with_build_cflags"
3775 BUILD_CFLAGS="$withval"
3777 echo "$as_me:3777: result: $BUILD_CFLAGS" >&5
3778 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3780 echo "$as_me:3780: checking for native build C preprocessor-flags" >&5
3781 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3783 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3784 if test "${with_build_cppflags+set}" = set; then
3785 withval="$with_build_cppflags"
3786 BUILD_CPPFLAGS="$withval"
3788 echo "$as_me:3788: result: $BUILD_CPPFLAGS" >&5
3789 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3791 echo "$as_me:3791: checking for native build linker-flags" >&5
3792 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3794 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3795 if test "${with_build_ldflags+set}" = set; then
3796 withval="$with_build_ldflags"
3797 BUILD_LDFLAGS="$withval"
3799 echo "$as_me:3799: result: $BUILD_LDFLAGS" >&5
3800 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3802 echo "$as_me:3802: checking for native build linker-libraries" >&5
3803 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3805 # Check whether --with-build-libs or --without-build-libs was given.
3806 if test "${with_build_libs+set}" = set; then
3807 withval="$with_build_libs"
3808 BUILD_LIBS="$withval"
3810 echo "$as_me:3810: result: $BUILD_LIBS" >&5
3811 echo "${ECHO_T}$BUILD_LIBS" >&6
3813 # this assumes we're on Unix.
3817 : ${BUILD_CC:='${CC}'}
3819 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3820 { { echo "$as_me:3820: error: Cross-build requires two compilers.
3821 Use --with-build-cc to specify the native compiler." >&5
3822 echo "$as_me: error: Cross-build requires two compilers.
3823 Use --with-build-cc to specify the native compiler." >&2;}
3824 { (exit 1); exit 1; }; }
3828 : ${BUILD_CC:='${CC}'}
3829 : ${BUILD_CPP:='${CPP}'}
3830 : ${BUILD_CFLAGS:='${CFLAGS}'}
3831 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3832 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3833 : ${BUILD_LIBS:='${LIBS}'}
3834 : ${BUILD_EXEEXT:='$x'}
3835 : ${BUILD_OBJEXT:='o'}
3838 ###############################################################################
3840 ### Options to allow the user to specify the set of libraries which are used.
3841 ### Use "--without-normal --with-shared" to allow the default model to be
3842 ### shared, for example.
3845 echo "$as_me:3845: checking if you want to build shared C-objects" >&5
3846 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3848 # Check whether --with-shared or --without-shared was given.
3849 if test "${with_shared+set}" = set; then
3850 withval="$with_shared"
3851 with_shared=$withval
3855 echo "$as_me:3855: result: $with_shared" >&5
3856 echo "${ECHO_T}$with_shared" >&6
3857 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3859 echo "$as_me:3859: checking for specified models" >&5
3860 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3861 test -z "$cf_list_models" && cf_list_models=normal
3862 echo "$as_me:3862: result: $cf_list_models" >&5
3863 echo "${ECHO_T}$cf_list_models" >&6
3865 ### Use the first model as the default, and save its suffix for use in building
3866 ### up test-applications.
3867 echo "$as_me:3867: checking for default model" >&5
3868 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3869 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3870 echo "$as_me:3870: result: $DFT_LWR_MODEL" >&5
3871 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3873 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3875 echo "$as_me:3875: checking for specific curses-directory" >&5
3876 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3878 # Check whether --with-curses-dir or --without-curses-dir was given.
3879 if test "${with_curses_dir+set}" = set; then
3880 withval="$with_curses_dir"
3881 cf_cv_curses_dir=$withval
3885 echo "$as_me:3885: result: $cf_cv_curses_dir" >&5
3886 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3888 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3891 if test "x$prefix" != xNONE; then
3892 cf_path_syntax="$prefix"
3894 cf_path_syntax="$ac_default_prefix"
3902 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3904 (.\${*prefix}*|.\${*dir}*)
3905 eval withval="$withval"
3908 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3913 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3916 { { echo "$as_me:3916: error: expected a pathname, not \"$withval\"" >&5
3917 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3918 { (exit 1); exit 1; }; }
3922 if test -d "$cf_cv_curses_dir"
3925 if test -n "$cf_cv_curses_dir/include" ; then
3926 for cf_add_incdir in $cf_cv_curses_dir/include
3928 while test $cf_add_incdir != /usr/include
3930 if test -d $cf_add_incdir
3933 if test -n "$CFLAGS$CPPFLAGS" ; then
3934 # a loop is needed to ensure we can add subdirs of existing dirs
3935 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3936 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3937 cf_have_incdir=yes; break
3942 if test "$cf_have_incdir" = no ; then
3943 if test "$cf_add_incdir" = /usr/local/include ; then
3944 if test "$GCC" = yes
3946 cf_save_CPPFLAGS=$CPPFLAGS
3948 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3949 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
3951 cat >conftest.$ac_ext <<_ACEOF
3952 #line 3952 "configure"
3953 #include "confdefs.h"
3963 rm -f conftest.$ac_objext
3964 if { (eval echo "$as_me:3964: \"$ac_compile\"") >&5
3965 (eval $ac_compile) 2>&5
3967 echo "$as_me:3967: \$? = $ac_status" >&5
3968 (exit $ac_status); } &&
3969 { ac_try='test -s conftest.$ac_objext'
3970 { (eval echo "$as_me:3970: \"$ac_try\"") >&5
3973 echo "$as_me:3973: \$? = $ac_status" >&5
3974 (exit $ac_status); }; }; then
3977 echo "$as_me: failed program was:" >&5
3978 cat conftest.$ac_ext >&5
3981 rm -f conftest.$ac_objext conftest.$ac_ext
3982 CPPFLAGS=$cf_save_CPPFLAGS
3987 if test "$cf_have_incdir" = no ; then
3988 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3990 echo "${as_me:-configure}:3990: testing adding $cf_add_incdir to include-path ..." 1>&5
3992 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3994 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3995 test "$cf_top_incdir" = "$cf_add_incdir" && break
3996 cf_add_incdir="$cf_top_incdir"
4007 if test -n "$cf_cv_curses_dir/lib" ; then
4008 for cf_add_libdir in $cf_cv_curses_dir/lib
4010 if test $cf_add_libdir = /usr/lib ; then
4012 elif test -d $cf_add_libdir
4015 if test -n "$LDFLAGS$LIBS" ; then
4016 # a loop is needed to ensure we can add subdirs of existing dirs
4017 for cf_test_libdir in $LDFLAGS $LIBS ; do
4018 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4019 cf_have_libdir=yes; break
4023 if test "$cf_have_libdir" = no ; then
4024 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4026 echo "${as_me:-configure}:4026: testing adding $cf_add_libdir to library-path ..." 1>&5
4028 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4037 cf_ncuconfig_root=ncurses
4038 cf_have_ncuconfig=no
4040 if test "x${PKG_CONFIG:=none}" != xnone; then
4041 echo "$as_me:4041: checking pkg-config for $cf_ncuconfig_root" >&5
4042 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4043 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4044 echo "$as_me:4044: result: yes" >&5
4045 echo "${ECHO_T}yes" >&6
4047 echo "$as_me:4047: checking if the $cf_ncuconfig_root package files work" >&5
4048 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4049 cf_have_ncuconfig=unknown
4051 cf_save_CPPFLAGS="$CPPFLAGS"
4052 cf_save_LIBS="$LIBS"
4057 cf_new_extra_cppflags=
4059 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
4061 case $cf_fix_cppflags in
4063 case $cf_add_cflags in
4064 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4065 case $cf_add_cflags in
4067 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4069 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4070 && test -z "${cf_tst_cflags}" \
4071 && cf_fix_cppflags=yes
4073 if test $cf_fix_cppflags = yes ; then
4075 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4076 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4079 elif test "${cf_tst_cflags}" = "\"'" ; then
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"
4092 case $cf_add_cflags in
4094 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4096 CPPFLAGS=`echo "$CPPFLAGS" | \
4097 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4098 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4103 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4104 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4111 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4112 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4119 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4120 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4122 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4124 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4125 && test -z "${cf_tst_cflags}" \
4126 && cf_fix_cppflags=no
4131 if test -n "$cf_new_cflags" ; then
4133 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4134 CFLAGS="${CFLAGS}$cf_new_cflags"
4138 if test -n "$cf_new_cppflags" ; then
4140 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4141 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4145 if test -n "$cf_new_extra_cppflags" ; then
4147 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4148 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4152 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4153 # Filter out duplicates - this happens with badly-designed ".pc" files...
4154 for cf_add_1lib in $LIBS
4156 for cf_add_2lib in $cf_add_libs
4158 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4164 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4168 cat >conftest.$ac_ext <<_ACEOF
4169 #line 4169 "configure"
4170 #include "confdefs.h"
4171 #include <${cf_cv_ncurses_header:-curses.h}>
4175 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4180 rm -f conftest.$ac_objext conftest$ac_exeext
4181 if { (eval echo "$as_me:4181: \"$ac_link\"") >&5
4182 (eval $ac_link) 2>&5
4184 echo "$as_me:4184: \$? = $ac_status" >&5
4185 (exit $ac_status); } &&
4186 { ac_try='test -s conftest$ac_exeext'
4187 { (eval echo "$as_me:4187: \"$ac_try\"") >&5
4190 echo "$as_me:4190: \$? = $ac_status" >&5
4191 (exit $ac_status); }; }; then
4192 if test "$cross_compiling" = yes; then
4193 cf_have_ncuconfig=maybe
4195 cat >conftest.$ac_ext <<_ACEOF
4196 #line 4196 "configure"
4197 #include "confdefs.h"
4198 #include <${cf_cv_ncurses_header:-curses.h}>
4200 { char *xx = curses_version(); return (xx == 0); }
4202 rm -f conftest$ac_exeext
4203 if { (eval echo "$as_me:4203: \"$ac_link\"") >&5
4204 (eval $ac_link) 2>&5
4206 echo "$as_me:4206: \$? = $ac_status" >&5
4207 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4208 { (eval echo "$as_me:4208: \"$ac_try\"") >&5
4211 echo "$as_me:4211: \$? = $ac_status" >&5
4212 (exit $ac_status); }; }; then
4213 cf_have_ncuconfig=yes
4215 echo "$as_me: program exited with status $ac_status" >&5
4216 echo "$as_me: failed program was:" >&5
4217 cat conftest.$ac_ext >&5
4218 cf_have_ncuconfig=no
4220 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4223 echo "$as_me: failed program was:" >&5
4224 cat conftest.$ac_ext >&5
4225 cf_have_ncuconfig=no
4227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4228 echo "$as_me:4228: result: $cf_have_ncuconfig" >&5
4229 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4230 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4231 if test "$cf_have_ncuconfig" != "yes"
4233 CPPFLAGS="$cf_save_CPPFLAGS"
4234 LIBS="$cf_save_LIBS"
4235 NCURSES_CONFIG_PKG=none
4238 cat >>confdefs.h <<\EOF
4242 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4244 echo "$as_me:4244: checking for terminfo header" >&5
4245 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4246 if test "${cf_cv_term_header+set}" = set; then
4247 echo $ECHO_N "(cached) $ECHO_C" >&6
4250 case ${cf_cv_ncurses_header} in
4251 (*/ncurses.h|*/ncursesw.h)
4252 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4255 cf_term_header=term.h
4259 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4261 cat >conftest.$ac_ext <<_ACEOF
4262 #line 4262 "configure"
4263 #include "confdefs.h"
4265 #include <${cf_cv_ncurses_header:-curses.h}>
4271 int x = auto_left_margin
4276 rm -f conftest.$ac_objext
4277 if { (eval echo "$as_me:4277: \"$ac_compile\"") >&5
4278 (eval $ac_compile) 2>&5
4280 echo "$as_me:4280: \$? = $ac_status" >&5
4281 (exit $ac_status); } &&
4282 { ac_try='test -s conftest.$ac_objext'
4283 { (eval echo "$as_me:4283: \"$ac_try\"") >&5
4286 echo "$as_me:4286: \$? = $ac_status" >&5
4287 (exit $ac_status); }; }; then
4289 cf_cv_term_header="$cf_test"
4291 echo "$as_me: failed program was:" >&5
4292 cat conftest.$ac_ext >&5
4294 cf_cv_term_header=unknown
4297 rm -f conftest.$ac_objext conftest.$ac_ext
4298 test "$cf_cv_term_header" != unknown && break
4302 echo "$as_me:4302: result: $cf_cv_term_header" >&5
4303 echo "${ECHO_T}$cf_cv_term_header" >&6
4305 # Set definitions to allow ifdef'ing to accommodate subdirectories
4307 case $cf_cv_term_header in
4310 cat >>confdefs.h <<\EOF
4311 #define HAVE_TERM_H 1
4317 case $cf_cv_term_header in
4320 cat >>confdefs.h <<\EOF
4321 #define HAVE_NCURSES_TERM_H 1
4327 cat >>confdefs.h <<\EOF
4328 #define HAVE_NCURSESW_TERM_H 1
4337 echo "$as_me:4337: result: no" >&5
4338 echo "${ECHO_T}no" >&6
4339 NCURSES_CONFIG_PKG=none
4342 NCURSES_CONFIG_PKG=none
4345 if test "x$cf_have_ncuconfig" = "xno"; then
4346 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4348 if test -n "$ac_tool_prefix"; then
4349 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4351 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4352 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4353 echo "$as_me:4353: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4356 echo $ECHO_N "(cached) $ECHO_C" >&6
4358 if test -n "$NCURSES_CONFIG"; then
4359 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4361 ac_save_IFS=$IFS; IFS=$ac_path_separator
4363 for ac_dir in $ac_dummy; do
4365 test -z "$ac_dir" && ac_dir=.
4366 $as_executable_p "$ac_dir/$ac_word" || continue
4367 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4368 echo "$as_me:4368: found $ac_dir/$ac_word" >&5
4374 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4375 if test -n "$NCURSES_CONFIG"; then
4376 echo "$as_me:4376: result: $NCURSES_CONFIG" >&5
4377 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4379 echo "$as_me:4379: result: no" >&5
4380 echo "${ECHO_T}no" >&6
4383 test -n "$NCURSES_CONFIG" && break
4386 if test -z "$NCURSES_CONFIG"; then
4387 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4388 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4390 # Extract the first word of "$ac_prog", so it can be a program name with args.
4391 set dummy $ac_prog; ac_word=$2
4392 echo "$as_me:4392: checking for $ac_word" >&5
4393 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4394 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4395 echo $ECHO_N "(cached) $ECHO_C" >&6
4397 if test -n "$ac_ct_NCURSES_CONFIG"; then
4398 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4400 ac_save_IFS=$IFS; IFS=$ac_path_separator
4402 for ac_dir in $ac_dummy; do
4404 test -z "$ac_dir" && ac_dir=.
4405 $as_executable_p "$ac_dir/$ac_word" || continue
4406 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4407 echo "$as_me:4407: found $ac_dir/$ac_word" >&5
4413 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4414 if test -n "$ac_ct_NCURSES_CONFIG"; then
4415 echo "$as_me:4415: result: $ac_ct_NCURSES_CONFIG" >&5
4416 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4418 echo "$as_me:4418: result: no" >&5
4419 echo "${ECHO_T}no" >&6
4422 test -n "$ac_ct_NCURSES_CONFIG" && break
4424 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4426 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4429 if test "$NCURSES_CONFIG" != none ; then
4434 cf_new_extra_cppflags=
4436 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4438 case $cf_fix_cppflags in
4440 case $cf_add_cflags in
4441 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4442 case $cf_add_cflags in
4444 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4446 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4447 && test -z "${cf_tst_cflags}" \
4448 && cf_fix_cppflags=yes
4450 if test $cf_fix_cppflags = yes ; then
4452 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4453 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4456 elif test "${cf_tst_cflags}" = "\"'" ; then
4458 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4459 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4469 case $cf_add_cflags in
4471 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4473 CPPFLAGS=`echo "$CPPFLAGS" | \
4474 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4475 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4480 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4481 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4488 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4489 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4496 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4497 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4499 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4501 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4502 && test -z "${cf_tst_cflags}" \
4503 && cf_fix_cppflags=no
4508 if test -n "$cf_new_cflags" ; then
4510 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4511 CFLAGS="${CFLAGS}$cf_new_cflags"
4515 if test -n "$cf_new_cppflags" ; then
4517 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4518 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4522 if test -n "$cf_new_extra_cppflags" ; then
4524 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4525 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4529 cf_add_libs="`$NCURSES_CONFIG --libs`"
4530 # Filter out duplicates - this happens with badly-designed ".pc" files...
4531 for cf_add_1lib in $LIBS
4533 for cf_add_2lib in $cf_add_libs
4535 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4541 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4545 # even with config script, some packages use no-override for curses.h
4547 echo "$as_me:4547: checking if we have identified curses headers" >&5
4548 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4549 if test "${cf_cv_ncurses_header+set}" = set; then
4550 echo $ECHO_N "(cached) $ECHO_C" >&6
4553 cf_cv_ncurses_header=none
4555 ncurses.h ncurses/ncurses.h \
4556 curses.h ncurses/curses.h
4558 cat >conftest.$ac_ext <<_ACEOF
4559 #line 4559 "configure"
4560 #include "confdefs.h"
4561 #include <${cf_header}>
4565 initscr(); tgoto("?", 0,0)
4570 rm -f conftest.$ac_objext
4571 if { (eval echo "$as_me:4571: \"$ac_compile\"") >&5
4572 (eval $ac_compile) 2>&5
4574 echo "$as_me:4574: \$? = $ac_status" >&5
4575 (exit $ac_status); } &&
4576 { ac_try='test -s conftest.$ac_objext'
4577 { (eval echo "$as_me:4577: \"$ac_try\"") >&5
4580 echo "$as_me:4580: \$? = $ac_status" >&5
4581 (exit $ac_status); }; }; then
4582 cf_cv_ncurses_header=$cf_header; break
4584 echo "$as_me: failed program was:" >&5
4585 cat conftest.$ac_ext >&5
4587 rm -f conftest.$ac_objext conftest.$ac_ext
4591 echo "$as_me:4591: result: $cf_cv_ncurses_header" >&5
4592 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4594 if test "$cf_cv_ncurses_header" = none ; then
4595 { { echo "$as_me:4595: error: No curses header-files found" >&5
4596 echo "$as_me: error: No curses header-files found" >&2;}
4597 { (exit 1); exit 1; }; }
4600 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4602 for ac_header in $cf_cv_ncurses_header
4604 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4605 echo "$as_me:4605: checking for $ac_header" >&5
4606 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4607 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4608 echo $ECHO_N "(cached) $ECHO_C" >&6
4610 cat >conftest.$ac_ext <<_ACEOF
4611 #line 4611 "configure"
4612 #include "confdefs.h"
4613 #include <$ac_header>
4615 if { (eval echo "$as_me:4615: \"$ac_cpp conftest.$ac_ext\"") >&5
4616 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4618 egrep -v '^ *\+' conftest.er1 >conftest.err
4620 cat conftest.err >&5
4621 echo "$as_me:4621: \$? = $ac_status" >&5
4622 (exit $ac_status); } >/dev/null; then
4623 if test -s conftest.err; then
4624 ac_cpp_err=$ac_c_preproc_warn_flag
4631 if test -z "$ac_cpp_err"; then
4632 eval "$as_ac_Header=yes"
4634 echo "$as_me: failed program was:" >&5
4635 cat conftest.$ac_ext >&5
4636 eval "$as_ac_Header=no"
4638 rm -f conftest.err conftest.$ac_ext
4640 echo "$as_me:4640: result: `eval echo '${'$as_ac_Header'}'`" >&5
4641 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4642 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4643 cat >>confdefs.h <<EOF
4644 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4650 cat >>confdefs.h <<\EOF
4654 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4656 cat >>confdefs.h <<EOF
4657 #define $cf_nculib_ROOT 1
4660 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4664 cf_ncuhdr_root=ncurses
4666 test -n "$cf_cv_curses_dir" && \
4667 test "$cf_cv_curses_dir" != "no" && { \
4669 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4670 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4672 while test $cf_add_incdir != /usr/include
4674 if test -d $cf_add_incdir
4677 if test -n "$CFLAGS$CPPFLAGS" ; then
4678 # a loop is needed to ensure we can add subdirs of existing dirs
4679 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4680 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4681 cf_have_incdir=yes; break
4686 if test "$cf_have_incdir" = no ; then
4687 if test "$cf_add_incdir" = /usr/local/include ; then
4688 if test "$GCC" = yes
4690 cf_save_CPPFLAGS=$CPPFLAGS
4692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4693 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4695 cat >conftest.$ac_ext <<_ACEOF
4696 #line 4696 "configure"
4697 #include "confdefs.h"
4707 rm -f conftest.$ac_objext
4708 if { (eval echo "$as_me:4708: \"$ac_compile\"") >&5
4709 (eval $ac_compile) 2>&5
4711 echo "$as_me:4711: \$? = $ac_status" >&5
4712 (exit $ac_status); } &&
4713 { ac_try='test -s conftest.$ac_objext'
4714 { (eval echo "$as_me:4714: \"$ac_try\"") >&5
4717 echo "$as_me:4717: \$? = $ac_status" >&5
4718 (exit $ac_status); }; }; then
4721 echo "$as_me: failed program was:" >&5
4722 cat conftest.$ac_ext >&5
4725 rm -f conftest.$ac_objext conftest.$ac_ext
4726 CPPFLAGS=$cf_save_CPPFLAGS
4731 if test "$cf_have_incdir" = no ; then
4732 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4734 echo "${as_me:-configure}:4734: testing adding $cf_add_incdir to include-path ..." 1>&5
4736 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4738 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4739 test "$cf_top_incdir" = "$cf_add_incdir" && break
4740 cf_add_incdir="$cf_top_incdir"
4753 echo "$as_me:4753: checking for $cf_ncuhdr_root header in include-path" >&5
4754 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4755 if test "${cf_cv_ncurses_h+set}" = set; then
4756 echo $ECHO_N "(cached) $ECHO_C" >&6
4759 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4760 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4761 for cf_header in $cf_header_list
4764 cat >conftest.$ac_ext <<_ACEOF
4765 #line 4765 "configure"
4766 #include "confdefs.h"
4768 #include <$cf_header>
4773 #ifdef NCURSES_VERSION
4775 printf("%s\n", NCURSES_VERSION);
4788 rm -f conftest.$ac_objext
4789 if { (eval echo "$as_me:4789: \"$ac_compile\"") >&5
4790 (eval $ac_compile) 2>&5
4792 echo "$as_me:4792: \$? = $ac_status" >&5
4793 (exit $ac_status); } &&
4794 { ac_try='test -s conftest.$ac_objext'
4795 { (eval echo "$as_me:4795: \"$ac_try\"") >&5
4798 echo "$as_me:4798: \$? = $ac_status" >&5
4799 (exit $ac_status); }; }; then
4800 cf_cv_ncurses_h=$cf_header
4803 echo "$as_me: failed program was:" >&5
4804 cat conftest.$ac_ext >&5
4807 rm -f conftest.$ac_objext conftest.$ac_ext
4809 test "$cf_cv_ncurses_h" != no && break
4813 echo "$as_me:4813: result: $cf_cv_ncurses_h" >&5
4814 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4816 if test "$cf_cv_ncurses_h" != no ; then
4817 cf_cv_ncurses_header=$cf_cv_ncurses_h
4820 echo "$as_me:4820: checking for $cf_ncuhdr_root include-path" >&5
4821 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4822 if test "${cf_cv_ncurses_h2+set}" = set; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
4826 test -n "$verbose" && echo
4830 # collect the current set of include-directories from compiler flags
4831 cf_header_path_list=""
4832 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4833 for cf_header_path in $CPPFLAGS $CFLAGS
4835 case $cf_header_path in
4837 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4839 test "x$cf_header_path" != "xNONE" && \
4840 test -d "$cf_header_path" && \
4842 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4843 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4844 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4845 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4846 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4847 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"
4850 cf_header_path_list="$cf_header_path_list $cf_search"
4856 # add the variations for the package we are looking for
4860 test "x$prefix" != "xNONE" && \
4861 test -d "$prefix" && \
4863 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4864 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4865 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4866 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4867 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4868 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4871 for cf_subdir_prefix in \
4880 test "x$cf_subdir_prefix" != "x$prefix" && \
4881 test -d "$cf_subdir_prefix" && \
4882 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4883 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4884 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4885 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4886 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4887 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4888 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"
4893 test "$includedir" != NONE && \
4894 test "$includedir" != "/usr/include" && \
4895 test -d "$includedir" && {
4896 test -d $includedir && cf_search="$cf_search $includedir"
4897 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4900 test "$oldincludedir" != NONE && \
4901 test "$oldincludedir" != "/usr/include" && \
4902 test -d "$oldincludedir" && {
4903 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4904 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4907 cf_search="$cf_search $cf_header_path_list"
4909 test -n "$verbose" && echo search path $cf_search
4910 cf_save2_CPPFLAGS="$CPPFLAGS"
4911 for cf_incdir in $cf_search
4914 if test -n "$cf_incdir" ; then
4915 for cf_add_incdir in $cf_incdir
4917 while test $cf_add_incdir != /usr/include
4919 if test -d $cf_add_incdir
4922 if test -n "$CFLAGS$CPPFLAGS" ; then
4923 # a loop is needed to ensure we can add subdirs of existing dirs
4924 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4925 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4926 cf_have_incdir=yes; break
4931 if test "$cf_have_incdir" = no ; then
4932 if test "$cf_add_incdir" = /usr/local/include ; then
4933 if test "$GCC" = yes
4935 cf_save_CPPFLAGS=$CPPFLAGS
4937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4938 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4940 cat >conftest.$ac_ext <<_ACEOF
4941 #line 4941 "configure"
4942 #include "confdefs.h"
4952 rm -f conftest.$ac_objext
4953 if { (eval echo "$as_me:4953: \"$ac_compile\"") >&5
4954 (eval $ac_compile) 2>&5
4956 echo "$as_me:4956: \$? = $ac_status" >&5
4957 (exit $ac_status); } &&
4958 { ac_try='test -s conftest.$ac_objext'
4959 { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4962 echo "$as_me:4962: \$? = $ac_status" >&5
4963 (exit $ac_status); }; }; then
4966 echo "$as_me: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4970 rm -f conftest.$ac_objext conftest.$ac_ext
4971 CPPFLAGS=$cf_save_CPPFLAGS
4976 if test "$cf_have_incdir" = no ; then
4977 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4979 echo "${as_me:-configure}:4979: testing adding $cf_add_incdir to include-path ..." 1>&5
4981 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4983 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4984 test "$cf_top_incdir" = "$cf_add_incdir" && break
4985 cf_add_incdir="$cf_top_incdir"
5001 cat >conftest.$ac_ext <<_ACEOF
5002 #line 5002 "configure"
5003 #include "confdefs.h"
5005 #include <$cf_header>
5010 #ifdef NCURSES_VERSION
5012 printf("%s\n", NCURSES_VERSION);
5025 rm -f conftest.$ac_objext
5026 if { (eval echo "$as_me:5026: \"$ac_compile\"") >&5
5027 (eval $ac_compile) 2>&5
5029 echo "$as_me:5029: \$? = $ac_status" >&5
5030 (exit $ac_status); } &&
5031 { ac_try='test -s conftest.$ac_objext'
5032 { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit $ac_status); }; }; then
5037 cf_cv_ncurses_h2=$cf_header
5040 echo "$as_me: failed program was:" >&5
5041 cat conftest.$ac_ext >&5
5044 rm -f conftest.$ac_objext conftest.$ac_ext
5046 if test "$cf_cv_ncurses_h2" != no ; then
5047 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5048 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5051 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5053 CPPFLAGS="$cf_save2_CPPFLAGS"
5054 test "$cf_cv_ncurses_h2" != no && break
5056 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5056: error: not found" >&5
5057 echo "$as_me: error: not found" >&2;}
5058 { (exit 1); exit 1; }; }
5061 echo "$as_me:5061: result: $cf_cv_ncurses_h2" >&5
5062 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5064 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5065 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5066 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5067 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5070 if test -n "$cf_1st_incdir" ; then
5071 for cf_add_incdir in $cf_1st_incdir
5073 while test $cf_add_incdir != /usr/include
5075 if test -d $cf_add_incdir
5078 if test -n "$CFLAGS$CPPFLAGS" ; then
5079 # a loop is needed to ensure we can add subdirs of existing dirs
5080 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5081 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5082 cf_have_incdir=yes; break
5087 if test "$cf_have_incdir" = no ; then
5088 if test "$cf_add_incdir" = /usr/local/include ; then
5089 if test "$GCC" = yes
5091 cf_save_CPPFLAGS=$CPPFLAGS
5093 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5094 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5096 cat >conftest.$ac_ext <<_ACEOF
5097 #line 5097 "configure"
5098 #include "confdefs.h"
5108 rm -f conftest.$ac_objext
5109 if { (eval echo "$as_me:5109: \"$ac_compile\"") >&5
5110 (eval $ac_compile) 2>&5
5112 echo "$as_me:5112: \$? = $ac_status" >&5
5113 (exit $ac_status); } &&
5114 { ac_try='test -s conftest.$ac_objext'
5115 { (eval echo "$as_me:5115: \"$ac_try\"") >&5
5118 echo "$as_me:5118: \$? = $ac_status" >&5
5119 (exit $ac_status); }; }; then
5122 echo "$as_me: failed program was:" >&5
5123 cat conftest.$ac_ext >&5
5126 rm -f conftest.$ac_objext conftest.$ac_ext
5127 CPPFLAGS=$cf_save_CPPFLAGS
5132 if test "$cf_have_incdir" = no ; then
5133 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5135 echo "${as_me:-configure}:5135: testing adding $cf_add_incdir to include-path ..." 1>&5
5137 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5139 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5140 test "$cf_top_incdir" = "$cf_add_incdir" && break
5141 cf_add_incdir="$cf_top_incdir"
5154 # Set definitions to allow ifdef'ing for ncurses.h
5156 case $cf_cv_ncurses_header in
5159 cat >>confdefs.h <<\EOF
5160 #define HAVE_NCURSES_H 1
5166 case $cf_cv_ncurses_header in
5167 (ncurses/curses.h|ncurses/ncurses.h)
5169 cat >>confdefs.h <<\EOF
5170 #define HAVE_NCURSES_NCURSES_H 1
5174 (ncursesw/curses.h|ncursesw/ncurses.h)
5176 cat >>confdefs.h <<\EOF
5177 #define HAVE_NCURSESW_NCURSES_H 1
5183 echo "$as_me:5183: checking for terminfo header" >&5
5184 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5185 if test "${cf_cv_term_header+set}" = set; then
5186 echo $ECHO_N "(cached) $ECHO_C" >&6
5189 case ${cf_cv_ncurses_header} in
5190 (*/ncurses.h|*/ncursesw.h)
5191 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5194 cf_term_header=term.h
5198 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5200 cat >conftest.$ac_ext <<_ACEOF
5201 #line 5201 "configure"
5202 #include "confdefs.h"
5204 #include <${cf_cv_ncurses_header:-curses.h}>
5210 int x = auto_left_margin
5215 rm -f conftest.$ac_objext
5216 if { (eval echo "$as_me:5216: \"$ac_compile\"") >&5
5217 (eval $ac_compile) 2>&5
5219 echo "$as_me:5219: \$? = $ac_status" >&5
5220 (exit $ac_status); } &&
5221 { ac_try='test -s conftest.$ac_objext'
5222 { (eval echo "$as_me:5222: \"$ac_try\"") >&5
5225 echo "$as_me:5225: \$? = $ac_status" >&5
5226 (exit $ac_status); }; }; then
5228 cf_cv_term_header="$cf_test"
5230 echo "$as_me: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5233 cf_cv_term_header=unknown
5236 rm -f conftest.$ac_objext conftest.$ac_ext
5237 test "$cf_cv_term_header" != unknown && break
5241 echo "$as_me:5241: result: $cf_cv_term_header" >&5
5242 echo "${ECHO_T}$cf_cv_term_header" >&6
5244 # Set definitions to allow ifdef'ing to accommodate subdirectories
5246 case $cf_cv_term_header in
5249 cat >>confdefs.h <<\EOF
5250 #define HAVE_TERM_H 1
5256 case $cf_cv_term_header in
5259 cat >>confdefs.h <<\EOF
5260 #define HAVE_NCURSES_TERM_H 1
5266 cat >>confdefs.h <<\EOF
5267 #define HAVE_NCURSESW_TERM_H 1
5273 # some applications need this, but should check for NCURSES_VERSION
5275 cat >>confdefs.h <<\EOF
5279 echo "$as_me:5279: checking for ncurses version" >&5
5280 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5281 if test "${cf_cv_ncurses_version+set}" = set; then
5282 echo $ECHO_N "(cached) $ECHO_C" >&6
5285 cf_cv_ncurses_version=no
5288 if test "$cross_compiling" = yes; then
5290 # This will not work if the preprocessor splits the line after the
5291 # Autoconf token. The 'unproto' program does that.
5292 cat > conftest.$ac_ext <<EOF
5293 #include <${cf_cv_ncurses_header:-curses.h}>
5295 #ifdef NCURSES_VERSION
5296 Autoconf NCURSES_VERSION
5304 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5305 { (eval echo "$as_me:5305: \"$cf_try\"") >&5
5308 echo "$as_me:5308: \$? = $ac_status" >&5
5309 (exit $ac_status); }
5310 if test -f conftest.out ; then
5311 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5312 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5317 cat >conftest.$ac_ext <<_ACEOF
5318 #line 5318 "configure"
5319 #include "confdefs.h"
5321 #include <${cf_cv_ncurses_header:-curses.h}>
5325 FILE *fp = fopen("$cf_tempfile", "w");
5326 #ifdef NCURSES_VERSION
5327 # ifdef NCURSES_VERSION_PATCH
5328 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5330 fprintf(fp, "%s\n", NCURSES_VERSION);
5334 fprintf(fp, "old\n");
5339 ${cf_cv_main_return:-return}(0);
5342 rm -f conftest$ac_exeext
5343 if { (eval echo "$as_me:5343: \"$ac_link\"") >&5
5344 (eval $ac_link) 2>&5
5346 echo "$as_me:5346: \$? = $ac_status" >&5
5347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5348 { (eval echo "$as_me:5348: \"$ac_try\"") >&5
5351 echo "$as_me:5351: \$? = $ac_status" >&5
5352 (exit $ac_status); }; }; then
5354 cf_cv_ncurses_version=`cat $cf_tempfile`
5356 echo "$as_me: program exited with status $ac_status" >&5
5357 echo "$as_me: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5360 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5365 echo "$as_me:5365: result: $cf_cv_ncurses_version" >&5
5366 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5367 test "$cf_cv_ncurses_version" = no ||
5368 cat >>confdefs.h <<\EOF
5372 cf_nculib_root=ncurses
5373 # This works, except for the special case where we find gpm, but
5374 # ncurses is in a nonstandard location via $LIBS, and we really want
5377 cf_ncurses_SAVE="$LIBS"
5378 echo "$as_me:5378: checking for Gpm_Open in -lgpm" >&5
5379 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5380 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5381 echo $ECHO_N "(cached) $ECHO_C" >&6
5383 ac_check_lib_save_LIBS=$LIBS
5385 cat >conftest.$ac_ext <<_ACEOF
5386 #line 5386 "configure"
5387 #include "confdefs.h"
5389 /* Override any gcc2 internal prototype to avoid an error. */
5393 /* We use char because int might match the return type of a gcc2
5394 builtin and then its argument prototype would still apply. */
5404 rm -f conftest.$ac_objext conftest$ac_exeext
5405 if { (eval echo "$as_me:5405: \"$ac_link\"") >&5
5406 (eval $ac_link) 2>&5
5408 echo "$as_me:5408: \$? = $ac_status" >&5
5409 (exit $ac_status); } &&
5410 { ac_try='test -s conftest$ac_exeext'
5411 { (eval echo "$as_me:5411: \"$ac_try\"") >&5
5414 echo "$as_me:5414: \$? = $ac_status" >&5
5415 (exit $ac_status); }; }; then
5416 ac_cv_lib_gpm_Gpm_Open=yes
5418 echo "$as_me: failed program was:" >&5
5419 cat conftest.$ac_ext >&5
5420 ac_cv_lib_gpm_Gpm_Open=no
5422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5423 LIBS=$ac_check_lib_save_LIBS
5425 echo "$as_me:5425: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5426 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5427 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5428 echo "$as_me:5428: checking for initscr in -lgpm" >&5
5429 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5430 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5431 echo $ECHO_N "(cached) $ECHO_C" >&6
5433 ac_check_lib_save_LIBS=$LIBS
5435 cat >conftest.$ac_ext <<_ACEOF
5436 #line 5436 "configure"
5437 #include "confdefs.h"
5439 /* Override any gcc2 internal prototype to avoid an error. */
5443 /* We use char because int might match the return type of a gcc2
5444 builtin and then its argument prototype would still apply. */
5454 rm -f conftest.$ac_objext conftest$ac_exeext
5455 if { (eval echo "$as_me:5455: \"$ac_link\"") >&5
5456 (eval $ac_link) 2>&5
5458 echo "$as_me:5458: \$? = $ac_status" >&5
5459 (exit $ac_status); } &&
5460 { ac_try='test -s conftest$ac_exeext'
5461 { (eval echo "$as_me:5461: \"$ac_try\"") >&5
5464 echo "$as_me:5464: \$? = $ac_status" >&5
5465 (exit $ac_status); }; }; then
5466 ac_cv_lib_gpm_initscr=yes
5468 echo "$as_me: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 ac_cv_lib_gpm_initscr=no
5472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5473 LIBS=$ac_check_lib_save_LIBS
5475 echo "$as_me:5475: result: $ac_cv_lib_gpm_initscr" >&5
5476 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5477 if test $ac_cv_lib_gpm_initscr = yes; then
5478 LIBS="$cf_ncurses_SAVE"
5480 cf_ncurses_LIBS="-lgpm"
5487 # This is only necessary if you are linking against an obsolete
5488 # version of ncurses (but it should do no harm, since it's static).
5489 if test "$cf_nculib_root" = ncurses ; then
5490 echo "$as_me:5490: checking for tgoto in -lmytinfo" >&5
5491 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5492 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5493 echo $ECHO_N "(cached) $ECHO_C" >&6
5495 ac_check_lib_save_LIBS=$LIBS
5496 LIBS="-lmytinfo $LIBS"
5497 cat >conftest.$ac_ext <<_ACEOF
5498 #line 5498 "configure"
5499 #include "confdefs.h"
5501 /* Override any gcc2 internal prototype to avoid an error. */
5505 /* We use char because int might match the return type of a gcc2
5506 builtin and then its argument prototype would still apply. */
5516 rm -f conftest.$ac_objext conftest$ac_exeext
5517 if { (eval echo "$as_me:5517: \"$ac_link\"") >&5
5518 (eval $ac_link) 2>&5
5520 echo "$as_me:5520: \$? = $ac_status" >&5
5521 (exit $ac_status); } &&
5522 { ac_try='test -s conftest$ac_exeext'
5523 { (eval echo "$as_me:5523: \"$ac_try\"") >&5
5526 echo "$as_me:5526: \$? = $ac_status" >&5
5527 (exit $ac_status); }; }; then
5528 ac_cv_lib_mytinfo_tgoto=yes
5530 echo "$as_me: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 ac_cv_lib_mytinfo_tgoto=no
5534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5535 LIBS=$ac_check_lib_save_LIBS
5537 echo "$as_me:5537: result: $ac_cv_lib_mytinfo_tgoto" >&5
5538 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5539 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5540 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5547 cf_add_libs="$cf_ncurses_LIBS"
5548 # Filter out duplicates - this happens with badly-designed ".pc" files...
5549 for cf_add_1lib in $LIBS
5551 for cf_add_2lib in $cf_add_libs
5553 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5559 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5563 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5566 cf_add_libs="-l$cf_nculib_root"
5567 # Filter out duplicates - this happens with badly-designed ".pc" files...
5568 for cf_add_1lib in $LIBS
5570 for cf_add_2lib in $cf_add_libs
5572 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5578 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5584 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5586 echo "$as_me:5586: checking for initscr" >&5
5587 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5588 if test "${ac_cv_func_initscr+set}" = set; then
5589 echo $ECHO_N "(cached) $ECHO_C" >&6
5591 cat >conftest.$ac_ext <<_ACEOF
5592 #line 5592 "configure"
5593 #include "confdefs.h"
5594 #define initscr autoconf_temporary
5595 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5602 /* We use char because int might match the return type of a gcc2
5603 builtin and then its argument prototype would still apply. */
5604 char initscr (void);
5610 /* The GNU C library defines stubs for functions which it implements
5611 to always fail with ENOSYS. Some functions are actually named
5612 something starting with __ and the normal name is an alias. */
5613 #if defined (__stub_initscr) || defined (__stub___initscr)
5614 #error found stub for initscr
5622 rm -f conftest.$ac_objext conftest$ac_exeext
5623 if { (eval echo "$as_me:5623: \"$ac_link\"") >&5
5624 (eval $ac_link) 2>&5
5626 echo "$as_me:5626: \$? = $ac_status" >&5
5627 (exit $ac_status); } &&
5628 { ac_try='test -s conftest$ac_exeext'
5629 { (eval echo "$as_me:5629: \"$ac_try\"") >&5
5632 echo "$as_me:5632: \$? = $ac_status" >&5
5633 (exit $ac_status); }; }; then
5634 ac_cv_func_initscr=yes
5636 echo "$as_me: failed program was:" >&5
5637 cat conftest.$ac_ext >&5
5638 ac_cv_func_initscr=no
5640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5642 echo "$as_me:5642: result: $ac_cv_func_initscr" >&5
5643 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5644 if test $ac_cv_func_initscr = yes; then
5645 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5648 cf_save_LIBS="$LIBS"
5649 echo "$as_me:5649: checking for initscr in -l$cf_nculib_root" >&5
5650 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5651 LIBS="-l$cf_nculib_root $LIBS"
5652 cat >conftest.$ac_ext <<_ACEOF
5653 #line 5653 "configure"
5654 #include "confdefs.h"
5655 #include <${cf_cv_ncurses_header:-curses.h}>
5664 rm -f conftest.$ac_objext conftest$ac_exeext
5665 if { (eval echo "$as_me:5665: \"$ac_link\"") >&5
5666 (eval $ac_link) 2>&5
5668 echo "$as_me:5668: \$? = $ac_status" >&5
5669 (exit $ac_status); } &&
5670 { ac_try='test -s conftest$ac_exeext'
5671 { (eval echo "$as_me:5671: \"$ac_try\"") >&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit $ac_status); }; }; then
5676 echo "$as_me:5676: result: yes" >&5
5677 echo "${ECHO_T}yes" >&6
5678 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5681 echo "$as_me: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5683 echo "$as_me:5683: result: no" >&5
5684 echo "${ECHO_T}no" >&6
5687 cf_library_path_list=""
5688 if test -n "${LDFLAGS}${LIBS}" ; then
5689 for cf_library_path in $LDFLAGS $LIBS
5691 case $cf_library_path in
5693 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5695 test "x$cf_library_path" != "xNONE" && \
5696 test -d "$cf_library_path" && \
5698 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5699 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5700 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5701 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5702 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5703 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"
5706 cf_library_path_list="$cf_library_path_list $cf_search"
5714 test "x$prefix" != "xNONE" && \
5715 test -d "$prefix" && \
5717 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5718 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5719 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5720 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5721 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5722 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5725 for cf_subdir_prefix in \
5734 test "x$cf_subdir_prefix" != "x$prefix" && \
5735 test -d "$cf_subdir_prefix" && \
5736 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5737 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5738 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5739 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5740 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5741 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5742 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"
5747 cf_search="$cf_library_path_list $cf_search"
5749 for cf_libdir in $cf_search
5751 echo "$as_me:5751: checking for -l$cf_nculib_root in $cf_libdir" >&5
5752 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5753 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5754 cat >conftest.$ac_ext <<_ACEOF
5755 #line 5755 "configure"
5756 #include "confdefs.h"
5757 #include <${cf_cv_ncurses_header:-curses.h}>
5766 rm -f conftest.$ac_objext conftest$ac_exeext
5767 if { (eval echo "$as_me:5767: \"$ac_link\"") >&5
5768 (eval $ac_link) 2>&5
5770 echo "$as_me:5770: \$? = $ac_status" >&5
5771 (exit $ac_status); } &&
5772 { ac_try='test -s conftest$ac_exeext'
5773 { (eval echo "$as_me:5773: \"$ac_try\"") >&5
5776 echo "$as_me:5776: \$? = $ac_status" >&5
5777 (exit $ac_status); }; }; then
5778 echo "$as_me:5778: result: yes" >&5
5779 echo "${ECHO_T}yes" >&6
5780 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5783 echo "$as_me: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5785 echo "$as_me:5785: result: no" >&5
5786 echo "${ECHO_T}no" >&6
5787 LIBS="$cf_save_LIBS"
5789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5797 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5799 if test $cf_found_library = no ; then
5800 { { echo "$as_me:5800: error: Cannot link $cf_nculib_root library" >&5
5801 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5802 { (exit 1); exit 1; }; }
5807 if test -n "$cf_ncurses_LIBS" ; then
5808 echo "$as_me:5808: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5809 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5810 cf_ncurses_SAVE="$LIBS"
5811 for p in $cf_ncurses_LIBS ; do
5812 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5813 if test "$q" != "$LIBS" ; then
5817 cat >conftest.$ac_ext <<_ACEOF
5818 #line 5818 "configure"
5819 #include "confdefs.h"
5820 #include <${cf_cv_ncurses_header:-curses.h}>
5824 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5829 rm -f conftest.$ac_objext conftest$ac_exeext
5830 if { (eval echo "$as_me:5830: \"$ac_link\"") >&5
5831 (eval $ac_link) 2>&5
5833 echo "$as_me:5833: \$? = $ac_status" >&5
5834 (exit $ac_status); } &&
5835 { ac_try='test -s conftest$ac_exeext'
5836 { (eval echo "$as_me:5836: \"$ac_try\"") >&5
5839 echo "$as_me:5839: \$? = $ac_status" >&5
5840 (exit $ac_status); }; }; then
5841 echo "$as_me:5841: result: yes" >&5
5842 echo "${ECHO_T}yes" >&6
5844 echo "$as_me: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 echo "$as_me:5846: result: no" >&5
5847 echo "${ECHO_T}no" >&6
5848 LIBS="$cf_ncurses_SAVE"
5850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5853 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5855 cat >>confdefs.h <<EOF
5856 #define $cf_nculib_ROOT 1
5864 echo "$as_me:5864: checking if you want wide-character code" >&5
5865 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5867 # Check whether --enable-widec or --disable-widec was given.
5868 if test "${enable_widec+set}" = set; then
5869 enableval="$enable_widec"
5870 with_widec=$enableval
5874 echo "$as_me:5874: result: $with_widec" >&5
5875 echo "${ECHO_T}$with_widec" >&6
5876 if test "$with_widec" = yes ; then
5878 echo "$as_me:5878: checking for multibyte character support" >&5
5879 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5880 if test "${cf_cv_utf8_lib+set}" = set; then
5881 echo $ECHO_N "(cached) $ECHO_C" >&6
5884 cf_save_LIBS="$LIBS"
5885 cat >conftest.$ac_ext <<_ACEOF
5886 #line 5886 "configure"
5887 #include "confdefs.h"
5898 rm -f conftest.$ac_objext conftest$ac_exeext
5899 if { (eval echo "$as_me:5899: \"$ac_link\"") >&5
5900 (eval $ac_link) 2>&5
5902 echo "$as_me:5902: \$? = $ac_status" >&5
5903 (exit $ac_status); } &&
5904 { ac_try='test -s conftest$ac_exeext'
5905 { (eval echo "$as_me:5905: \"$ac_try\"") >&5
5908 echo "$as_me:5908: \$? = $ac_status" >&5
5909 (exit $ac_status); }; }; then
5912 echo "$as_me: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5915 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5916 # will be set on completion of the AC_TRY_LINK below.
5917 cf_cv_header_path_utf8=
5918 cf_cv_library_path_utf8=
5920 echo "${as_me:-configure}:5920: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5922 cf_save_LIBS="$LIBS"
5924 cat >conftest.$ac_ext <<_ACEOF
5925 #line 5925 "configure"
5926 #include "confdefs.h"
5928 #include <libutf8.h>
5937 rm -f conftest.$ac_objext conftest$ac_exeext
5938 if { (eval echo "$as_me:5938: \"$ac_link\"") >&5
5939 (eval $ac_link) 2>&5
5941 echo "$as_me:5941: \$? = $ac_status" >&5
5942 (exit $ac_status); } &&
5943 { ac_try='test -s conftest$ac_exeext'
5944 { (eval echo "$as_me:5944: \"$ac_try\"") >&5
5947 echo "$as_me:5947: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
5950 cf_cv_find_linkage_utf8=yes
5951 cf_cv_header_path_utf8=/usr/include
5952 cf_cv_library_path_utf8=/usr/lib
5955 echo "$as_me: failed program was:" >&5
5956 cat conftest.$ac_ext >&5
5958 LIBS="-lutf8 $cf_save_LIBS"
5960 cat >conftest.$ac_ext <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5964 #include <libutf8.h>
5973 rm -f conftest.$ac_objext conftest$ac_exeext
5974 if { (eval echo "$as_me:5974: \"$ac_link\"") >&5
5975 (eval $ac_link) 2>&5
5977 echo "$as_me:5977: \$? = $ac_status" >&5
5978 (exit $ac_status); } &&
5979 { ac_try='test -s conftest$ac_exeext'
5980 { (eval echo "$as_me:5980: \"$ac_try\"") >&5
5983 echo "$as_me:5983: \$? = $ac_status" >&5
5984 (exit $ac_status); }; }; then
5986 cf_cv_find_linkage_utf8=yes
5987 cf_cv_header_path_utf8=/usr/include
5988 cf_cv_library_path_utf8=/usr/lib
5989 cf_cv_library_file_utf8="-lutf8"
5992 echo "$as_me: failed program was:" >&5
5993 cat conftest.$ac_ext >&5
5995 cf_cv_find_linkage_utf8=no
5996 LIBS="$cf_save_LIBS"
5998 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6000 echo "${as_me:-configure}:6000: testing find linkage for utf8 library ..." 1>&5
6002 echo "${as_me:-configure}:6002: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6004 cf_save_CPPFLAGS="$CPPFLAGS"
6005 cf_test_CPPFLAGS="$CPPFLAGS"
6009 # collect the current set of include-directories from compiler flags
6010 cf_header_path_list=""
6011 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6012 for cf_header_path in $CPPFLAGS $CFLAGS
6014 case $cf_header_path in
6016 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6018 test "x$cf_header_path" != "xNONE" && \
6019 test -d "$cf_header_path" && \
6021 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6022 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6023 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6024 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6025 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6026 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6029 cf_header_path_list="$cf_header_path_list $cf_search"
6035 # add the variations for the package we are looking for
6039 test "x$prefix" != "xNONE" && \
6040 test -d "$prefix" && \
6042 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6043 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6044 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6045 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6046 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6047 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6050 for cf_subdir_prefix in \
6059 test "x$cf_subdir_prefix" != "x$prefix" && \
6060 test -d "$cf_subdir_prefix" && \
6061 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6062 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6063 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6064 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6065 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6066 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6067 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6072 test "$includedir" != NONE && \
6073 test "$includedir" != "/usr/include" && \
6074 test -d "$includedir" && {
6075 test -d $includedir && cf_search="$cf_search $includedir"
6076 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6079 test "$oldincludedir" != NONE && \
6080 test "$oldincludedir" != "/usr/include" && \
6081 test -d "$oldincludedir" && {
6082 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6083 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6086 cf_search="$cf_search $cf_header_path_list"
6088 for cf_cv_header_path_utf8 in $cf_search
6090 if test -d $cf_cv_header_path_utf8 ; then
6091 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6093 echo "${as_me:-configure}:6093: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6095 CPPFLAGS="$cf_save_CPPFLAGS"
6097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6098 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6100 cat >conftest.$ac_ext <<_ACEOF
6101 #line 6101 "configure"
6102 #include "confdefs.h"
6104 #include <libutf8.h>
6113 rm -f conftest.$ac_objext
6114 if { (eval echo "$as_me:6114: \"$ac_compile\"") >&5
6115 (eval $ac_compile) 2>&5
6117 echo "$as_me:6117: \$? = $ac_status" >&5
6118 (exit $ac_status); } &&
6119 { ac_try='test -s conftest.$ac_objext'
6120 { (eval echo "$as_me:6120: \"$ac_try\"") >&5
6123 echo "$as_me:6123: \$? = $ac_status" >&5
6124 (exit $ac_status); }; }; then
6126 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6128 echo "${as_me:-configure}:6128: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6130 cf_cv_find_linkage_utf8=maybe
6131 cf_test_CPPFLAGS="$CPPFLAGS"
6134 echo "$as_me: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6137 CPPFLAGS="$cf_save_CPPFLAGS"
6140 rm -f conftest.$ac_objext conftest.$ac_ext
6144 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6146 echo "${as_me:-configure}:6146: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6148 cf_save_LIBS="$LIBS"
6149 cf_save_LDFLAGS="$LDFLAGS"
6151 if test "$cf_cv_find_linkage_utf8" != yes ; then
6154 cf_library_path_list=""
6155 if test -n "${LDFLAGS}${LIBS}" ; then
6156 for cf_library_path in $LDFLAGS $LIBS
6158 case $cf_library_path in
6160 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6162 test "x$cf_library_path" != "xNONE" && \
6163 test -d "$cf_library_path" && \
6165 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6166 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6167 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6168 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6169 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6170 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6173 cf_library_path_list="$cf_library_path_list $cf_search"
6181 test "x$prefix" != "xNONE" && \
6182 test -d "$prefix" && \
6184 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6185 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6186 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6187 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6188 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6189 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6192 for cf_subdir_prefix in \
6201 test "x$cf_subdir_prefix" != "x$prefix" && \
6202 test -d "$cf_subdir_prefix" && \
6203 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6204 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6205 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6206 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6207 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6208 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6209 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6214 cf_search="$cf_library_path_list $cf_search"
6216 for cf_cv_library_path_utf8 in $cf_search
6218 if test -d $cf_cv_library_path_utf8 ; then
6219 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6221 echo "${as_me:-configure}:6221: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6223 CPPFLAGS="$cf_test_CPPFLAGS"
6224 LIBS="-lutf8 $cf_save_LIBS"
6225 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6226 cat >conftest.$ac_ext <<_ACEOF
6227 #line 6227 "configure"
6228 #include "confdefs.h"
6230 #include <libutf8.h>
6239 rm -f conftest.$ac_objext conftest$ac_exeext
6240 if { (eval echo "$as_me:6240: \"$ac_link\"") >&5
6241 (eval $ac_link) 2>&5
6243 echo "$as_me:6243: \$? = $ac_status" >&5
6244 (exit $ac_status); } &&
6245 { ac_try='test -s conftest$ac_exeext'
6246 { (eval echo "$as_me:6246: \"$ac_try\"") >&5
6249 echo "$as_me:6249: \$? = $ac_status" >&5
6250 (exit $ac_status); }; }; then
6252 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6254 echo "${as_me:-configure}:6254: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6256 cf_cv_find_linkage_utf8=yes
6257 cf_cv_library_file_utf8="-lutf8"
6260 echo "$as_me: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6263 CPPFLAGS="$cf_save_CPPFLAGS"
6264 LIBS="$cf_save_LIBS"
6265 LDFLAGS="$cf_save_LDFLAGS"
6268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6271 CPPFLAGS="$cf_save_CPPFLAGS"
6272 LDFLAGS="$cf_save_LDFLAGS"
6276 cf_cv_find_linkage_utf8=no
6280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6285 LIBS="$cf_save_LIBS"
6287 if test "$cf_cv_find_linkage_utf8" = yes ; then
6288 cf_cv_utf8_lib=add-on
6294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6296 echo "$as_me:6296: result: $cf_cv_utf8_lib" >&5
6297 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6299 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6301 if test "$cf_cv_utf8_lib" = "add-on" ; then
6303 cat >>confdefs.h <<\EOF
6304 #define HAVE_LIBUTF8_H 1
6307 if test -n "$cf_cv_header_path_utf8" ; then
6308 for cf_add_incdir in $cf_cv_header_path_utf8
6310 while test $cf_add_incdir != /usr/include
6312 if test -d $cf_add_incdir
6315 if test -n "$CFLAGS$CPPFLAGS" ; then
6316 # a loop is needed to ensure we can add subdirs of existing dirs
6317 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6318 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6319 cf_have_incdir=yes; break
6324 if test "$cf_have_incdir" = no ; then
6325 if test "$cf_add_incdir" = /usr/local/include ; then
6326 if test "$GCC" = yes
6328 cf_save_CPPFLAGS=$CPPFLAGS
6330 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6331 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6333 cat >conftest.$ac_ext <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6345 rm -f conftest.$ac_objext
6346 if { (eval echo "$as_me:6346: \"$ac_compile\"") >&5
6347 (eval $ac_compile) 2>&5
6349 echo "$as_me:6349: \$? = $ac_status" >&5
6350 (exit $ac_status); } &&
6351 { ac_try='test -s conftest.$ac_objext'
6352 { (eval echo "$as_me:6352: \"$ac_try\"") >&5
6355 echo "$as_me:6355: \$? = $ac_status" >&5
6356 (exit $ac_status); }; }; then
6359 echo "$as_me: failed program was:" >&5
6360 cat conftest.$ac_ext >&5
6363 rm -f conftest.$ac_objext conftest.$ac_ext
6364 CPPFLAGS=$cf_save_CPPFLAGS
6369 if test "$cf_have_incdir" = no ; then
6370 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6372 echo "${as_me:-configure}:6372: testing adding $cf_add_incdir to include-path ..." 1>&5
6374 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6376 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6377 test "$cf_top_incdir" = "$cf_add_incdir" && break
6378 cf_add_incdir="$cf_top_incdir"
6389 if test -n "$cf_cv_library_path_utf8" ; then
6390 for cf_add_libdir in $cf_cv_library_path_utf8
6392 if test $cf_add_libdir = /usr/lib ; then
6394 elif test -d $cf_add_libdir
6397 if test -n "$LDFLAGS$LIBS" ; then
6398 # a loop is needed to ensure we can add subdirs of existing dirs
6399 for cf_test_libdir in $LDFLAGS $LIBS ; do
6400 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6401 cf_have_libdir=yes; break
6405 if test "$cf_have_libdir" = no ; then
6406 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6408 echo "${as_me:-configure}:6408: testing adding $cf_add_libdir to library-path ..." 1>&5
6410 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6416 cf_add_libs="$cf_cv_library_file_utf8"
6417 # Filter out duplicates - this happens with badly-designed ".pc" files...
6418 for cf_add_1lib in $LIBS
6420 for cf_add_2lib in $cf_add_libs
6422 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6428 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6434 cf_ncuconfig_root=ncursesw
6435 cf_have_ncuconfig=no
6437 if test "x${PKG_CONFIG:=none}" != xnone; then
6438 echo "$as_me:6438: checking pkg-config for $cf_ncuconfig_root" >&5
6439 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6440 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6441 echo "$as_me:6441: result: yes" >&5
6442 echo "${ECHO_T}yes" >&6
6444 echo "$as_me:6444: checking if the $cf_ncuconfig_root package files work" >&5
6445 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6446 cf_have_ncuconfig=unknown
6448 cf_save_CPPFLAGS="$CPPFLAGS"
6449 cf_save_LIBS="$LIBS"
6454 cf_new_extra_cppflags=
6456 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
6458 case $cf_fix_cppflags in
6460 case $cf_add_cflags in
6461 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6462 case $cf_add_cflags in
6464 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6466 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6467 && test -z "${cf_tst_cflags}" \
6468 && cf_fix_cppflags=yes
6470 if test $cf_fix_cppflags = yes ; then
6472 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6473 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6476 elif test "${cf_tst_cflags}" = "\"'" ; then
6478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6489 case $cf_add_cflags in
6491 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6493 CPPFLAGS=`echo "$CPPFLAGS" | \
6494 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6495 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6500 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6501 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6508 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6509 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6516 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6517 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6519 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6522 && test -z "${cf_tst_cflags}" \
6523 && cf_fix_cppflags=no
6528 if test -n "$cf_new_cflags" ; then
6530 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6531 CFLAGS="${CFLAGS}$cf_new_cflags"
6535 if test -n "$cf_new_cppflags" ; then
6537 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6538 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6542 if test -n "$cf_new_extra_cppflags" ; then
6544 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6545 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6549 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6550 # Filter out duplicates - this happens with badly-designed ".pc" files...
6551 for cf_add_1lib in $LIBS
6553 for cf_add_2lib in $cf_add_libs
6555 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6561 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6565 cat >conftest.$ac_ext <<_ACEOF
6566 #line 6566 "configure"
6567 #include "confdefs.h"
6568 #include <${cf_cv_ncurses_header:-curses.h}>
6572 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6577 rm -f conftest.$ac_objext conftest$ac_exeext
6578 if { (eval echo "$as_me:6578: \"$ac_link\"") >&5
6579 (eval $ac_link) 2>&5
6581 echo "$as_me:6581: \$? = $ac_status" >&5
6582 (exit $ac_status); } &&
6583 { ac_try='test -s conftest$ac_exeext'
6584 { (eval echo "$as_me:6584: \"$ac_try\"") >&5
6587 echo "$as_me:6587: \$? = $ac_status" >&5
6588 (exit $ac_status); }; }; then
6589 if test "$cross_compiling" = yes; then
6590 cf_have_ncuconfig=maybe
6592 cat >conftest.$ac_ext <<_ACEOF
6593 #line 6593 "configure"
6594 #include "confdefs.h"
6595 #include <${cf_cv_ncurses_header:-curses.h}>
6597 { char *xx = curses_version(); return (xx == 0); }
6599 rm -f conftest$ac_exeext
6600 if { (eval echo "$as_me:6600: \"$ac_link\"") >&5
6601 (eval $ac_link) 2>&5
6603 echo "$as_me:6603: \$? = $ac_status" >&5
6604 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6605 { (eval echo "$as_me:6605: \"$ac_try\"") >&5
6608 echo "$as_me:6608: \$? = $ac_status" >&5
6609 (exit $ac_status); }; }; then
6610 cf_have_ncuconfig=yes
6612 echo "$as_me: program exited with status $ac_status" >&5
6613 echo "$as_me: failed program was:" >&5
6614 cat conftest.$ac_ext >&5
6615 cf_have_ncuconfig=no
6617 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6620 echo "$as_me: failed program was:" >&5
6621 cat conftest.$ac_ext >&5
6622 cf_have_ncuconfig=no
6624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6625 echo "$as_me:6625: result: $cf_have_ncuconfig" >&5
6626 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6627 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6628 if test "$cf_have_ncuconfig" != "yes"
6630 CPPFLAGS="$cf_save_CPPFLAGS"
6631 LIBS="$cf_save_LIBS"
6632 NCURSES_CONFIG_PKG=none
6635 cat >>confdefs.h <<\EOF
6639 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6641 echo "$as_me:6641: checking for terminfo header" >&5
6642 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6643 if test "${cf_cv_term_header+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
6647 case ${cf_cv_ncurses_header} in
6648 (*/ncurses.h|*/ncursesw.h)
6649 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6652 cf_term_header=term.h
6656 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6658 cat >conftest.$ac_ext <<_ACEOF
6659 #line 6659 "configure"
6660 #include "confdefs.h"
6662 #include <${cf_cv_ncurses_header:-curses.h}>
6668 int x = auto_left_margin
6673 rm -f conftest.$ac_objext
6674 if { (eval echo "$as_me:6674: \"$ac_compile\"") >&5
6675 (eval $ac_compile) 2>&5
6677 echo "$as_me:6677: \$? = $ac_status" >&5
6678 (exit $ac_status); } &&
6679 { ac_try='test -s conftest.$ac_objext'
6680 { (eval echo "$as_me:6680: \"$ac_try\"") >&5
6683 echo "$as_me:6683: \$? = $ac_status" >&5
6684 (exit $ac_status); }; }; then
6686 cf_cv_term_header="$cf_test"
6688 echo "$as_me: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6691 cf_cv_term_header=unknown
6694 rm -f conftest.$ac_objext conftest.$ac_ext
6695 test "$cf_cv_term_header" != unknown && break
6699 echo "$as_me:6699: result: $cf_cv_term_header" >&5
6700 echo "${ECHO_T}$cf_cv_term_header" >&6
6702 # Set definitions to allow ifdef'ing to accommodate subdirectories
6704 case $cf_cv_term_header in
6707 cat >>confdefs.h <<\EOF
6708 #define HAVE_TERM_H 1
6714 case $cf_cv_term_header in
6717 cat >>confdefs.h <<\EOF
6718 #define HAVE_NCURSES_TERM_H 1
6724 cat >>confdefs.h <<\EOF
6725 #define HAVE_NCURSESW_TERM_H 1
6734 echo "$as_me:6734: result: no" >&5
6735 echo "${ECHO_T}no" >&6
6736 NCURSES_CONFIG_PKG=none
6739 NCURSES_CONFIG_PKG=none
6742 if test "x$cf_have_ncuconfig" = "xno"; then
6743 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6745 if test -n "$ac_tool_prefix"; then
6746 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6748 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6749 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6750 echo "$as_me:6750: checking for $ac_word" >&5
6751 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6752 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6753 echo $ECHO_N "(cached) $ECHO_C" >&6
6755 if test -n "$NCURSES_CONFIG"; then
6756 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6758 ac_save_IFS=$IFS; IFS=$ac_path_separator
6760 for ac_dir in $ac_dummy; do
6762 test -z "$ac_dir" && ac_dir=.
6763 $as_executable_p "$ac_dir/$ac_word" || continue
6764 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6765 echo "$as_me:6765: found $ac_dir/$ac_word" >&5
6771 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6772 if test -n "$NCURSES_CONFIG"; then
6773 echo "$as_me:6773: result: $NCURSES_CONFIG" >&5
6774 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6776 echo "$as_me:6776: result: no" >&5
6777 echo "${ECHO_T}no" >&6
6780 test -n "$NCURSES_CONFIG" && break
6783 if test -z "$NCURSES_CONFIG"; then
6784 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6785 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6787 # Extract the first word of "$ac_prog", so it can be a program name with args.
6788 set dummy $ac_prog; ac_word=$2
6789 echo "$as_me:6789: checking for $ac_word" >&5
6790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6791 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6792 echo $ECHO_N "(cached) $ECHO_C" >&6
6794 if test -n "$ac_ct_NCURSES_CONFIG"; then
6795 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6797 ac_save_IFS=$IFS; IFS=$ac_path_separator
6799 for ac_dir in $ac_dummy; do
6801 test -z "$ac_dir" && ac_dir=.
6802 $as_executable_p "$ac_dir/$ac_word" || continue
6803 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6804 echo "$as_me:6804: found $ac_dir/$ac_word" >&5
6810 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6811 if test -n "$ac_ct_NCURSES_CONFIG"; then
6812 echo "$as_me:6812: result: $ac_ct_NCURSES_CONFIG" >&5
6813 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6815 echo "$as_me:6815: result: no" >&5
6816 echo "${ECHO_T}no" >&6
6819 test -n "$ac_ct_NCURSES_CONFIG" && break
6821 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6823 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6826 if test "$NCURSES_CONFIG" != none ; then
6831 cf_new_extra_cppflags=
6833 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
6835 case $cf_fix_cppflags in
6837 case $cf_add_cflags in
6838 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6839 case $cf_add_cflags in
6841 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6843 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6844 && test -z "${cf_tst_cflags}" \
6845 && cf_fix_cppflags=yes
6847 if test $cf_fix_cppflags = yes ; then
6849 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6850 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6853 elif test "${cf_tst_cflags}" = "\"'" ; then
6855 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6856 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6866 case $cf_add_cflags in
6868 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6870 CPPFLAGS=`echo "$CPPFLAGS" | \
6871 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6872 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6877 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6878 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6885 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6886 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6893 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6894 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6896 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6898 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6899 && test -z "${cf_tst_cflags}" \
6900 && cf_fix_cppflags=no
6905 if test -n "$cf_new_cflags" ; then
6907 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6908 CFLAGS="${CFLAGS}$cf_new_cflags"
6912 if test -n "$cf_new_cppflags" ; then
6914 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6915 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6919 if test -n "$cf_new_extra_cppflags" ; then
6921 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6922 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6926 cf_add_libs="`$NCURSES_CONFIG --libs`"
6927 # Filter out duplicates - this happens with badly-designed ".pc" files...
6928 for cf_add_1lib in $LIBS
6930 for cf_add_2lib in $cf_add_libs
6932 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6938 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6942 # even with config script, some packages use no-override for curses.h
6944 echo "$as_me:6944: checking if we have identified curses headers" >&5
6945 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6946 if test "${cf_cv_ncurses_header+set}" = set; then
6947 echo $ECHO_N "(cached) $ECHO_C" >&6
6950 cf_cv_ncurses_header=none
6952 ncurses.h ncursesw/ncurses.h \
6953 curses.h ncursesw/curses.h
6955 cat >conftest.$ac_ext <<_ACEOF
6956 #line 6956 "configure"
6957 #include "confdefs.h"
6958 #include <${cf_header}>
6962 initscr(); tgoto("?", 0,0)
6967 rm -f conftest.$ac_objext
6968 if { (eval echo "$as_me:6968: \"$ac_compile\"") >&5
6969 (eval $ac_compile) 2>&5
6971 echo "$as_me:6971: \$? = $ac_status" >&5
6972 (exit $ac_status); } &&
6973 { ac_try='test -s conftest.$ac_objext'
6974 { (eval echo "$as_me:6974: \"$ac_try\"") >&5
6977 echo "$as_me:6977: \$? = $ac_status" >&5
6978 (exit $ac_status); }; }; then
6979 cf_cv_ncurses_header=$cf_header; break
6981 echo "$as_me: failed program was:" >&5
6982 cat conftest.$ac_ext >&5
6984 rm -f conftest.$ac_objext conftest.$ac_ext
6988 echo "$as_me:6988: result: $cf_cv_ncurses_header" >&5
6989 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6991 if test "$cf_cv_ncurses_header" = none ; then
6992 { { echo "$as_me:6992: error: No curses header-files found" >&5
6993 echo "$as_me: error: No curses header-files found" >&2;}
6994 { (exit 1); exit 1; }; }
6997 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6999 for ac_header in $cf_cv_ncurses_header
7001 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7002 echo "$as_me:7002: checking for $ac_header" >&5
7003 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7004 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7005 echo $ECHO_N "(cached) $ECHO_C" >&6
7007 cat >conftest.$ac_ext <<_ACEOF
7008 #line 7008 "configure"
7009 #include "confdefs.h"
7010 #include <$ac_header>
7012 if { (eval echo "$as_me:7012: \"$ac_cpp conftest.$ac_ext\"") >&5
7013 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7015 egrep -v '^ *\+' conftest.er1 >conftest.err
7017 cat conftest.err >&5
7018 echo "$as_me:7018: \$? = $ac_status" >&5
7019 (exit $ac_status); } >/dev/null; then
7020 if test -s conftest.err; then
7021 ac_cpp_err=$ac_c_preproc_warn_flag
7028 if test -z "$ac_cpp_err"; then
7029 eval "$as_ac_Header=yes"
7031 echo "$as_me: failed program was:" >&5
7032 cat conftest.$ac_ext >&5
7033 eval "$as_ac_Header=no"
7035 rm -f conftest.err conftest.$ac_ext
7037 echo "$as_me:7037: result: `eval echo '${'$as_ac_Header'}'`" >&5
7038 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7039 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7040 cat >>confdefs.h <<EOF
7041 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7047 cat >>confdefs.h <<\EOF
7051 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7053 cat >>confdefs.h <<EOF
7054 #define $cf_nculib_ROOT 1
7057 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7061 cf_ncuhdr_root=ncursesw
7063 test -n "$cf_cv_curses_dir" && \
7064 test "$cf_cv_curses_dir" != "no" && { \
7066 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7067 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7069 while test $cf_add_incdir != /usr/include
7071 if test -d $cf_add_incdir
7074 if test -n "$CFLAGS$CPPFLAGS" ; then
7075 # a loop is needed to ensure we can add subdirs of existing dirs
7076 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7077 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7078 cf_have_incdir=yes; break
7083 if test "$cf_have_incdir" = no ; then
7084 if test "$cf_add_incdir" = /usr/local/include ; then
7085 if test "$GCC" = yes
7087 cf_save_CPPFLAGS=$CPPFLAGS
7089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7090 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7092 cat >conftest.$ac_ext <<_ACEOF
7093 #line 7093 "configure"
7094 #include "confdefs.h"
7104 rm -f conftest.$ac_objext
7105 if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5
7106 (eval $ac_compile) 2>&5
7108 echo "$as_me:7108: \$? = $ac_status" >&5
7109 (exit $ac_status); } &&
7110 { ac_try='test -s conftest.$ac_objext'
7111 { (eval echo "$as_me:7111: \"$ac_try\"") >&5
7114 echo "$as_me:7114: \$? = $ac_status" >&5
7115 (exit $ac_status); }; }; then
7118 echo "$as_me: failed program was:" >&5
7119 cat conftest.$ac_ext >&5
7122 rm -f conftest.$ac_objext conftest.$ac_ext
7123 CPPFLAGS=$cf_save_CPPFLAGS
7128 if test "$cf_have_incdir" = no ; then
7129 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7131 echo "${as_me:-configure}:7131: testing adding $cf_add_incdir to include-path ..." 1>&5
7133 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7135 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7136 test "$cf_top_incdir" = "$cf_add_incdir" && break
7137 cf_add_incdir="$cf_top_incdir"
7150 echo "$as_me:7150: checking for $cf_ncuhdr_root header in include-path" >&5
7151 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7152 if test "${cf_cv_ncurses_h+set}" = set; then
7153 echo $ECHO_N "(cached) $ECHO_C" >&6
7156 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7157 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7158 for cf_header in $cf_header_list
7161 cat >conftest.$ac_ext <<_ACEOF
7162 #line 7162 "configure"
7163 #include "confdefs.h"
7165 #define _XOPEN_SOURCE_EXTENDED
7166 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7167 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7169 #include <$cf_header>
7174 #ifdef NCURSES_VERSION
7180 printf("%s\n", NCURSES_VERSION);
7193 rm -f conftest.$ac_objext
7194 if { (eval echo "$as_me:7194: \"$ac_compile\"") >&5
7195 (eval $ac_compile) 2>&5
7197 echo "$as_me:7197: \$? = $ac_status" >&5
7198 (exit $ac_status); } &&
7199 { ac_try='test -s conftest.$ac_objext'
7200 { (eval echo "$as_me:7200: \"$ac_try\"") >&5
7203 echo "$as_me:7203: \$? = $ac_status" >&5
7204 (exit $ac_status); }; }; then
7205 cf_cv_ncurses_h=$cf_header
7208 echo "$as_me: failed program was:" >&5
7209 cat conftest.$ac_ext >&5
7212 rm -f conftest.$ac_objext conftest.$ac_ext
7214 test "$cf_cv_ncurses_h" != no && break
7218 echo "$as_me:7218: result: $cf_cv_ncurses_h" >&5
7219 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7221 if test "$cf_cv_ncurses_h" != no ; then
7222 cf_cv_ncurses_header=$cf_cv_ncurses_h
7225 echo "$as_me:7225: checking for $cf_ncuhdr_root include-path" >&5
7226 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7227 if test "${cf_cv_ncurses_h2+set}" = set; then
7228 echo $ECHO_N "(cached) $ECHO_C" >&6
7231 test -n "$verbose" && echo
7235 # collect the current set of include-directories from compiler flags
7236 cf_header_path_list=""
7237 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7238 for cf_header_path in $CPPFLAGS $CFLAGS
7240 case $cf_header_path in
7242 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7244 test "x$cf_header_path" != "xNONE" && \
7245 test -d "$cf_header_path" && \
7247 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7248 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7249 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7250 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7251 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7252 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"
7255 cf_header_path_list="$cf_header_path_list $cf_search"
7261 # add the variations for the package we are looking for
7265 test "x$prefix" != "xNONE" && \
7266 test -d "$prefix" && \
7268 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7269 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7270 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7271 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7272 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7273 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7276 for cf_subdir_prefix in \
7285 test "x$cf_subdir_prefix" != "x$prefix" && \
7286 test -d "$cf_subdir_prefix" && \
7287 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7288 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7289 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7290 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7291 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7292 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7293 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"
7298 test "$includedir" != NONE && \
7299 test "$includedir" != "/usr/include" && \
7300 test -d "$includedir" && {
7301 test -d $includedir && cf_search="$cf_search $includedir"
7302 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7305 test "$oldincludedir" != NONE && \
7306 test "$oldincludedir" != "/usr/include" && \
7307 test -d "$oldincludedir" && {
7308 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7309 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7312 cf_search="$cf_search $cf_header_path_list"
7314 test -n "$verbose" && echo search path $cf_search
7315 cf_save2_CPPFLAGS="$CPPFLAGS"
7316 for cf_incdir in $cf_search
7319 if test -n "$cf_incdir" ; then
7320 for cf_add_incdir in $cf_incdir
7322 while test $cf_add_incdir != /usr/include
7324 if test -d $cf_add_incdir
7327 if test -n "$CFLAGS$CPPFLAGS" ; then
7328 # a loop is needed to ensure we can add subdirs of existing dirs
7329 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7330 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7331 cf_have_incdir=yes; break
7336 if test "$cf_have_incdir" = no ; then
7337 if test "$cf_add_incdir" = /usr/local/include ; then
7338 if test "$GCC" = yes
7340 cf_save_CPPFLAGS=$CPPFLAGS
7342 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7343 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7345 cat >conftest.$ac_ext <<_ACEOF
7346 #line 7346 "configure"
7347 #include "confdefs.h"
7357 rm -f conftest.$ac_objext
7358 if { (eval echo "$as_me:7358: \"$ac_compile\"") >&5
7359 (eval $ac_compile) 2>&5
7361 echo "$as_me:7361: \$? = $ac_status" >&5
7362 (exit $ac_status); } &&
7363 { ac_try='test -s conftest.$ac_objext'
7364 { (eval echo "$as_me:7364: \"$ac_try\"") >&5
7367 echo "$as_me:7367: \$? = $ac_status" >&5
7368 (exit $ac_status); }; }; then
7371 echo "$as_me: failed program was:" >&5
7372 cat conftest.$ac_ext >&5
7375 rm -f conftest.$ac_objext conftest.$ac_ext
7376 CPPFLAGS=$cf_save_CPPFLAGS
7381 if test "$cf_have_incdir" = no ; then
7382 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7384 echo "${as_me:-configure}:7384: testing adding $cf_add_incdir to include-path ..." 1>&5
7386 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7388 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7389 test "$cf_top_incdir" = "$cf_add_incdir" && break
7390 cf_add_incdir="$cf_top_incdir"
7406 cat >conftest.$ac_ext <<_ACEOF
7407 #line 7407 "configure"
7408 #include "confdefs.h"
7410 #include <$cf_header>
7415 #ifdef NCURSES_VERSION
7417 printf("%s\n", NCURSES_VERSION);
7430 rm -f conftest.$ac_objext
7431 if { (eval echo "$as_me:7431: \"$ac_compile\"") >&5
7432 (eval $ac_compile) 2>&5
7434 echo "$as_me:7434: \$? = $ac_status" >&5
7435 (exit $ac_status); } &&
7436 { ac_try='test -s conftest.$ac_objext'
7437 { (eval echo "$as_me:7437: \"$ac_try\"") >&5
7440 echo "$as_me:7440: \$? = $ac_status" >&5
7441 (exit $ac_status); }; }; then
7442 cf_cv_ncurses_h2=$cf_header
7445 echo "$as_me: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7449 rm -f conftest.$ac_objext conftest.$ac_ext
7451 if test "$cf_cv_ncurses_h2" != no ; then
7452 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7453 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7456 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7458 CPPFLAGS="$cf_save2_CPPFLAGS"
7459 test "$cf_cv_ncurses_h2" != no && break
7461 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7461: error: not found" >&5
7462 echo "$as_me: error: not found" >&2;}
7463 { (exit 1); exit 1; }; }
7466 echo "$as_me:7466: result: $cf_cv_ncurses_h2" >&5
7467 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7469 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7470 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7471 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7472 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7475 if test -n "$cf_1st_incdir" ; then
7476 for cf_add_incdir in $cf_1st_incdir
7478 while test $cf_add_incdir != /usr/include
7480 if test -d $cf_add_incdir
7483 if test -n "$CFLAGS$CPPFLAGS" ; then
7484 # a loop is needed to ensure we can add subdirs of existing dirs
7485 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7486 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7487 cf_have_incdir=yes; break
7492 if test "$cf_have_incdir" = no ; then
7493 if test "$cf_add_incdir" = /usr/local/include ; then
7494 if test "$GCC" = yes
7496 cf_save_CPPFLAGS=$CPPFLAGS
7498 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7499 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7501 cat >conftest.$ac_ext <<_ACEOF
7502 #line 7502 "configure"
7503 #include "confdefs.h"
7513 rm -f conftest.$ac_objext
7514 if { (eval echo "$as_me:7514: \"$ac_compile\"") >&5
7515 (eval $ac_compile) 2>&5
7517 echo "$as_me:7517: \$? = $ac_status" >&5
7518 (exit $ac_status); } &&
7519 { ac_try='test -s conftest.$ac_objext'
7520 { (eval echo "$as_me:7520: \"$ac_try\"") >&5
7523 echo "$as_me:7523: \$? = $ac_status" >&5
7524 (exit $ac_status); }; }; then
7527 echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7531 rm -f conftest.$ac_objext conftest.$ac_ext
7532 CPPFLAGS=$cf_save_CPPFLAGS
7537 if test "$cf_have_incdir" = no ; then
7538 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7540 echo "${as_me:-configure}:7540: testing adding $cf_add_incdir to include-path ..." 1>&5
7542 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7544 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7545 test "$cf_top_incdir" = "$cf_add_incdir" && break
7546 cf_add_incdir="$cf_top_incdir"
7559 # Set definitions to allow ifdef'ing for ncurses.h
7561 case $cf_cv_ncurses_header in
7564 cat >>confdefs.h <<\EOF
7565 #define HAVE_NCURSES_H 1
7571 case $cf_cv_ncurses_header in
7572 (ncurses/curses.h|ncurses/ncurses.h)
7574 cat >>confdefs.h <<\EOF
7575 #define HAVE_NCURSES_NCURSES_H 1
7579 (ncursesw/curses.h|ncursesw/ncurses.h)
7581 cat >>confdefs.h <<\EOF
7582 #define HAVE_NCURSESW_NCURSES_H 1
7588 echo "$as_me:7588: checking for terminfo header" >&5
7589 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7590 if test "${cf_cv_term_header+set}" = set; then
7591 echo $ECHO_N "(cached) $ECHO_C" >&6
7594 case ${cf_cv_ncurses_header} in
7595 (*/ncurses.h|*/ncursesw.h)
7596 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7599 cf_term_header=term.h
7603 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7605 cat >conftest.$ac_ext <<_ACEOF
7606 #line 7606 "configure"
7607 #include "confdefs.h"
7609 #include <${cf_cv_ncurses_header:-curses.h}>
7615 int x = auto_left_margin
7620 rm -f conftest.$ac_objext
7621 if { (eval echo "$as_me:7621: \"$ac_compile\"") >&5
7622 (eval $ac_compile) 2>&5
7624 echo "$as_me:7624: \$? = $ac_status" >&5
7625 (exit $ac_status); } &&
7626 { ac_try='test -s conftest.$ac_objext'
7627 { (eval echo "$as_me:7627: \"$ac_try\"") >&5
7630 echo "$as_me:7630: \$? = $ac_status" >&5
7631 (exit $ac_status); }; }; then
7633 cf_cv_term_header="$cf_test"
7635 echo "$as_me: failed program was:" >&5
7636 cat conftest.$ac_ext >&5
7638 cf_cv_term_header=unknown
7641 rm -f conftest.$ac_objext conftest.$ac_ext
7642 test "$cf_cv_term_header" != unknown && break
7646 echo "$as_me:7646: result: $cf_cv_term_header" >&5
7647 echo "${ECHO_T}$cf_cv_term_header" >&6
7649 # Set definitions to allow ifdef'ing to accommodate subdirectories
7651 case $cf_cv_term_header in
7654 cat >>confdefs.h <<\EOF
7655 #define HAVE_TERM_H 1
7661 case $cf_cv_term_header in
7664 cat >>confdefs.h <<\EOF
7665 #define HAVE_NCURSES_TERM_H 1
7671 cat >>confdefs.h <<\EOF
7672 #define HAVE_NCURSESW_TERM_H 1
7678 # some applications need this, but should check for NCURSES_VERSION
7680 cat >>confdefs.h <<\EOF
7684 echo "$as_me:7684: checking for ncurses version" >&5
7685 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7686 if test "${cf_cv_ncurses_version+set}" = set; then
7687 echo $ECHO_N "(cached) $ECHO_C" >&6
7690 cf_cv_ncurses_version=no
7693 if test "$cross_compiling" = yes; then
7695 # This will not work if the preprocessor splits the line after the
7696 # Autoconf token. The 'unproto' program does that.
7697 cat > conftest.$ac_ext <<EOF
7698 #include <${cf_cv_ncurses_header:-curses.h}>
7700 #ifdef NCURSES_VERSION
7701 Autoconf NCURSES_VERSION
7709 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7710 { (eval echo "$as_me:7710: \"$cf_try\"") >&5
7713 echo "$as_me:7713: \$? = $ac_status" >&5
7714 (exit $ac_status); }
7715 if test -f conftest.out ; then
7716 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7717 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7722 cat >conftest.$ac_ext <<_ACEOF
7723 #line 7723 "configure"
7724 #include "confdefs.h"
7726 #include <${cf_cv_ncurses_header:-curses.h}>
7730 FILE *fp = fopen("$cf_tempfile", "w");
7731 #ifdef NCURSES_VERSION
7732 # ifdef NCURSES_VERSION_PATCH
7733 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7735 fprintf(fp, "%s\n", NCURSES_VERSION);
7739 fprintf(fp, "old\n");
7744 ${cf_cv_main_return:-return}(0);
7747 rm -f conftest$ac_exeext
7748 if { (eval echo "$as_me:7748: \"$ac_link\"") >&5
7749 (eval $ac_link) 2>&5
7751 echo "$as_me:7751: \$? = $ac_status" >&5
7752 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7753 { (eval echo "$as_me:7753: \"$ac_try\"") >&5
7756 echo "$as_me:7756: \$? = $ac_status" >&5
7757 (exit $ac_status); }; }; then
7759 cf_cv_ncurses_version=`cat $cf_tempfile`
7761 echo "$as_me: program exited with status $ac_status" >&5
7762 echo "$as_me: failed program was:" >&5
7763 cat conftest.$ac_ext >&5
7765 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7770 echo "$as_me:7770: result: $cf_cv_ncurses_version" >&5
7771 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7772 test "$cf_cv_ncurses_version" = no ||
7773 cat >>confdefs.h <<\EOF
7777 cf_nculib_root=ncursesw
7778 # This works, except for the special case where we find gpm, but
7779 # ncurses is in a nonstandard location via $LIBS, and we really want
7782 cf_ncurses_SAVE="$LIBS"
7783 echo "$as_me:7783: checking for Gpm_Open in -lgpm" >&5
7784 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7785 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7786 echo $ECHO_N "(cached) $ECHO_C" >&6
7788 ac_check_lib_save_LIBS=$LIBS
7790 cat >conftest.$ac_ext <<_ACEOF
7791 #line 7791 "configure"
7792 #include "confdefs.h"
7794 /* Override any gcc2 internal prototype to avoid an error. */
7798 /* We use char because int might match the return type of a gcc2
7799 builtin and then its argument prototype would still apply. */
7809 rm -f conftest.$ac_objext conftest$ac_exeext
7810 if { (eval echo "$as_me:7810: \"$ac_link\"") >&5
7811 (eval $ac_link) 2>&5
7813 echo "$as_me:7813: \$? = $ac_status" >&5
7814 (exit $ac_status); } &&
7815 { ac_try='test -s conftest$ac_exeext'
7816 { (eval echo "$as_me:7816: \"$ac_try\"") >&5
7819 echo "$as_me:7819: \$? = $ac_status" >&5
7820 (exit $ac_status); }; }; then
7821 ac_cv_lib_gpm_Gpm_Open=yes
7823 echo "$as_me: failed program was:" >&5
7824 cat conftest.$ac_ext >&5
7825 ac_cv_lib_gpm_Gpm_Open=no
7827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7828 LIBS=$ac_check_lib_save_LIBS
7830 echo "$as_me:7830: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7831 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7832 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7833 echo "$as_me:7833: checking for initscr in -lgpm" >&5
7834 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7835 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7836 echo $ECHO_N "(cached) $ECHO_C" >&6
7838 ac_check_lib_save_LIBS=$LIBS
7840 cat >conftest.$ac_ext <<_ACEOF
7841 #line 7841 "configure"
7842 #include "confdefs.h"
7844 /* Override any gcc2 internal prototype to avoid an error. */
7848 /* We use char because int might match the return type of a gcc2
7849 builtin and then its argument prototype would still apply. */
7859 rm -f conftest.$ac_objext conftest$ac_exeext
7860 if { (eval echo "$as_me:7860: \"$ac_link\"") >&5
7861 (eval $ac_link) 2>&5
7863 echo "$as_me:7863: \$? = $ac_status" >&5
7864 (exit $ac_status); } &&
7865 { ac_try='test -s conftest$ac_exeext'
7866 { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7869 echo "$as_me:7869: \$? = $ac_status" >&5
7870 (exit $ac_status); }; }; then
7871 ac_cv_lib_gpm_initscr=yes
7873 echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 ac_cv_lib_gpm_initscr=no
7877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7878 LIBS=$ac_check_lib_save_LIBS
7880 echo "$as_me:7880: result: $ac_cv_lib_gpm_initscr" >&5
7881 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7882 if test $ac_cv_lib_gpm_initscr = yes; then
7883 LIBS="$cf_ncurses_SAVE"
7885 cf_ncurses_LIBS="-lgpm"
7892 # This is only necessary if you are linking against an obsolete
7893 # version of ncurses (but it should do no harm, since it's static).
7894 if test "$cf_nculib_root" = ncurses ; then
7895 echo "$as_me:7895: checking for tgoto in -lmytinfo" >&5
7896 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7897 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7898 echo $ECHO_N "(cached) $ECHO_C" >&6
7900 ac_check_lib_save_LIBS=$LIBS
7901 LIBS="-lmytinfo $LIBS"
7902 cat >conftest.$ac_ext <<_ACEOF
7903 #line 7903 "configure"
7904 #include "confdefs.h"
7906 /* Override any gcc2 internal prototype to avoid an error. */
7910 /* We use char because int might match the return type of a gcc2
7911 builtin and then its argument prototype would still apply. */
7921 rm -f conftest.$ac_objext conftest$ac_exeext
7922 if { (eval echo "$as_me:7922: \"$ac_link\"") >&5
7923 (eval $ac_link) 2>&5
7925 echo "$as_me:7925: \$? = $ac_status" >&5
7926 (exit $ac_status); } &&
7927 { ac_try='test -s conftest$ac_exeext'
7928 { (eval echo "$as_me:7928: \"$ac_try\"") >&5
7931 echo "$as_me:7931: \$? = $ac_status" >&5
7932 (exit $ac_status); }; }; then
7933 ac_cv_lib_mytinfo_tgoto=yes
7935 echo "$as_me: failed program was:" >&5
7936 cat conftest.$ac_ext >&5
7937 ac_cv_lib_mytinfo_tgoto=no
7939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7940 LIBS=$ac_check_lib_save_LIBS
7942 echo "$as_me:7942: result: $ac_cv_lib_mytinfo_tgoto" >&5
7943 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7944 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7945 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7952 cf_add_libs="$cf_ncurses_LIBS"
7953 # Filter out duplicates - this happens with badly-designed ".pc" files...
7954 for cf_add_1lib in $LIBS
7956 for cf_add_2lib in $cf_add_libs
7958 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7964 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7968 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7971 cf_add_libs="-l$cf_nculib_root"
7972 # Filter out duplicates - this happens with badly-designed ".pc" files...
7973 for cf_add_1lib in $LIBS
7975 for cf_add_2lib in $cf_add_libs
7977 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7983 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7989 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7991 echo "$as_me:7991: checking for initscr" >&5
7992 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7993 if test "${ac_cv_func_initscr+set}" = set; then
7994 echo $ECHO_N "(cached) $ECHO_C" >&6
7996 cat >conftest.$ac_ext <<_ACEOF
7997 #line 7997 "configure"
7998 #include "confdefs.h"
7999 #define initscr autoconf_temporary
8000 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8007 /* We use char because int might match the return type of a gcc2
8008 builtin and then its argument prototype would still apply. */
8009 char initscr (void);
8015 /* The GNU C library defines stubs for functions which it implements
8016 to always fail with ENOSYS. Some functions are actually named
8017 something starting with __ and the normal name is an alias. */
8018 #if defined (__stub_initscr) || defined (__stub___initscr)
8019 #error found stub for initscr
8027 rm -f conftest.$ac_objext conftest$ac_exeext
8028 if { (eval echo "$as_me:8028: \"$ac_link\"") >&5
8029 (eval $ac_link) 2>&5
8031 echo "$as_me:8031: \$? = $ac_status" >&5
8032 (exit $ac_status); } &&
8033 { ac_try='test -s conftest$ac_exeext'
8034 { (eval echo "$as_me:8034: \"$ac_try\"") >&5
8037 echo "$as_me:8037: \$? = $ac_status" >&5
8038 (exit $ac_status); }; }; then
8039 ac_cv_func_initscr=yes
8041 echo "$as_me: failed program was:" >&5
8042 cat conftest.$ac_ext >&5
8043 ac_cv_func_initscr=no
8045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8047 echo "$as_me:8047: result: $ac_cv_func_initscr" >&5
8048 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8049 if test $ac_cv_func_initscr = yes; then
8050 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8053 cf_save_LIBS="$LIBS"
8054 echo "$as_me:8054: checking for initscr in -l$cf_nculib_root" >&5
8055 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8056 LIBS="-l$cf_nculib_root $LIBS"
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line 8058 "configure"
8059 #include "confdefs.h"
8060 #include <${cf_cv_ncurses_header:-curses.h}>
8069 rm -f conftest.$ac_objext conftest$ac_exeext
8070 if { (eval echo "$as_me:8070: \"$ac_link\"") >&5
8071 (eval $ac_link) 2>&5
8073 echo "$as_me:8073: \$? = $ac_status" >&5
8074 (exit $ac_status); } &&
8075 { ac_try='test -s conftest$ac_exeext'
8076 { (eval echo "$as_me:8076: \"$ac_try\"") >&5
8079 echo "$as_me:8079: \$? = $ac_status" >&5
8080 (exit $ac_status); }; }; then
8081 echo "$as_me:8081: result: yes" >&5
8082 echo "${ECHO_T}yes" >&6
8083 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8086 echo "$as_me: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 echo "$as_me:8088: result: no" >&5
8089 echo "${ECHO_T}no" >&6
8092 cf_library_path_list=""
8093 if test -n "${LDFLAGS}${LIBS}" ; then
8094 for cf_library_path in $LDFLAGS $LIBS
8096 case $cf_library_path in
8098 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8100 test "x$cf_library_path" != "xNONE" && \
8101 test -d "$cf_library_path" && \
8103 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8104 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8105 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8106 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8107 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8108 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"
8111 cf_library_path_list="$cf_library_path_list $cf_search"
8119 test "x$prefix" != "xNONE" && \
8120 test -d "$prefix" && \
8122 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8123 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8124 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8125 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8126 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8127 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8130 for cf_subdir_prefix in \
8139 test "x$cf_subdir_prefix" != "x$prefix" && \
8140 test -d "$cf_subdir_prefix" && \
8141 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8142 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8143 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8144 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8145 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8146 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8147 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"
8152 cf_search="$cf_library_path_list $cf_search"
8154 for cf_libdir in $cf_search
8156 echo "$as_me:8156: checking for -l$cf_nculib_root in $cf_libdir" >&5
8157 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8158 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8159 cat >conftest.$ac_ext <<_ACEOF
8160 #line 8160 "configure"
8161 #include "confdefs.h"
8162 #include <${cf_cv_ncurses_header:-curses.h}>
8171 rm -f conftest.$ac_objext conftest$ac_exeext
8172 if { (eval echo "$as_me:8172: \"$ac_link\"") >&5
8173 (eval $ac_link) 2>&5
8175 echo "$as_me:8175: \$? = $ac_status" >&5
8176 (exit $ac_status); } &&
8177 { ac_try='test -s conftest$ac_exeext'
8178 { (eval echo "$as_me:8178: \"$ac_try\"") >&5
8181 echo "$as_me:8181: \$? = $ac_status" >&5
8182 (exit $ac_status); }; }; then
8183 echo "$as_me:8183: result: yes" >&5
8184 echo "${ECHO_T}yes" >&6
8185 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8188 echo "$as_me: failed program was:" >&5
8189 cat conftest.$ac_ext >&5
8190 echo "$as_me:8190: result: no" >&5
8191 echo "${ECHO_T}no" >&6
8192 LIBS="$cf_save_LIBS"
8194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8202 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8204 if test $cf_found_library = no ; then
8205 { { echo "$as_me:8205: error: Cannot link $cf_nculib_root library" >&5
8206 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8207 { (exit 1); exit 1; }; }
8212 if test -n "$cf_ncurses_LIBS" ; then
8213 echo "$as_me:8213: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8214 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8215 cf_ncurses_SAVE="$LIBS"
8216 for p in $cf_ncurses_LIBS ; do
8217 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8218 if test "$q" != "$LIBS" ; then
8222 cat >conftest.$ac_ext <<_ACEOF
8223 #line 8223 "configure"
8224 #include "confdefs.h"
8225 #include <${cf_cv_ncurses_header:-curses.h}>
8229 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8234 rm -f conftest.$ac_objext conftest$ac_exeext
8235 if { (eval echo "$as_me:8235: \"$ac_link\"") >&5
8236 (eval $ac_link) 2>&5
8238 echo "$as_me:8238: \$? = $ac_status" >&5
8239 (exit $ac_status); } &&
8240 { ac_try='test -s conftest$ac_exeext'
8241 { (eval echo "$as_me:8241: \"$ac_try\"") >&5
8244 echo "$as_me:8244: \$? = $ac_status" >&5
8245 (exit $ac_status); }; }; then
8246 echo "$as_me:8246: result: yes" >&5
8247 echo "${ECHO_T}yes" >&6
8249 echo "$as_me: failed program was:" >&5
8250 cat conftest.$ac_ext >&5
8251 echo "$as_me:8251: result: no" >&5
8252 echo "${ECHO_T}no" >&6
8253 LIBS="$cf_ncurses_SAVE"
8255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8258 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8260 cat >>confdefs.h <<EOF
8261 #define $cf_nculib_ROOT 1
8271 cf_ncuconfig_root=ncurses
8272 cf_have_ncuconfig=no
8274 if test "x${PKG_CONFIG:=none}" != xnone; then
8275 echo "$as_me:8275: checking pkg-config for $cf_ncuconfig_root" >&5
8276 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8277 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8278 echo "$as_me:8278: result: yes" >&5
8279 echo "${ECHO_T}yes" >&6
8281 echo "$as_me:8281: checking if the $cf_ncuconfig_root package files work" >&5
8282 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8283 cf_have_ncuconfig=unknown
8285 cf_save_CPPFLAGS="$CPPFLAGS"
8286 cf_save_LIBS="$LIBS"
8291 cf_new_extra_cppflags=
8293 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
8295 case $cf_fix_cppflags in
8297 case $cf_add_cflags in
8298 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8299 case $cf_add_cflags in
8301 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8303 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8304 && test -z "${cf_tst_cflags}" \
8305 && cf_fix_cppflags=yes
8307 if test $cf_fix_cppflags = yes ; then
8309 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8310 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8313 elif test "${cf_tst_cflags}" = "\"'" ; then
8315 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8316 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8326 case $cf_add_cflags in
8328 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8330 CPPFLAGS=`echo "$CPPFLAGS" | \
8331 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8332 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8337 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8338 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8345 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8346 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8353 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8354 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8356 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8358 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8359 && test -z "${cf_tst_cflags}" \
8360 && cf_fix_cppflags=no
8365 if test -n "$cf_new_cflags" ; then
8367 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8368 CFLAGS="${CFLAGS}$cf_new_cflags"
8372 if test -n "$cf_new_cppflags" ; then
8374 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8375 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8379 if test -n "$cf_new_extra_cppflags" ; then
8381 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8382 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8386 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8387 # Filter out duplicates - this happens with badly-designed ".pc" files...
8388 for cf_add_1lib in $LIBS
8390 for cf_add_2lib in $cf_add_libs
8392 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8398 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8402 cat >conftest.$ac_ext <<_ACEOF
8403 #line 8403 "configure"
8404 #include "confdefs.h"
8405 #include <${cf_cv_ncurses_header:-curses.h}>
8409 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8414 rm -f conftest.$ac_objext conftest$ac_exeext
8415 if { (eval echo "$as_me:8415: \"$ac_link\"") >&5
8416 (eval $ac_link) 2>&5
8418 echo "$as_me:8418: \$? = $ac_status" >&5
8419 (exit $ac_status); } &&
8420 { ac_try='test -s conftest$ac_exeext'
8421 { (eval echo "$as_me:8421: \"$ac_try\"") >&5
8424 echo "$as_me:8424: \$? = $ac_status" >&5
8425 (exit $ac_status); }; }; then
8426 if test "$cross_compiling" = yes; then
8427 cf_have_ncuconfig=maybe
8429 cat >conftest.$ac_ext <<_ACEOF
8430 #line 8430 "configure"
8431 #include "confdefs.h"
8432 #include <${cf_cv_ncurses_header:-curses.h}>
8434 { char *xx = curses_version(); return (xx == 0); }
8436 rm -f conftest$ac_exeext
8437 if { (eval echo "$as_me:8437: \"$ac_link\"") >&5
8438 (eval $ac_link) 2>&5
8440 echo "$as_me:8440: \$? = $ac_status" >&5
8441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8442 { (eval echo "$as_me:8442: \"$ac_try\"") >&5
8445 echo "$as_me:8445: \$? = $ac_status" >&5
8446 (exit $ac_status); }; }; then
8447 cf_have_ncuconfig=yes
8449 echo "$as_me: program exited with status $ac_status" >&5
8450 echo "$as_me: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 cf_have_ncuconfig=no
8454 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8457 echo "$as_me: failed program was:" >&5
8458 cat conftest.$ac_ext >&5
8459 cf_have_ncuconfig=no
8461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8462 echo "$as_me:8462: result: $cf_have_ncuconfig" >&5
8463 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8464 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8465 if test "$cf_have_ncuconfig" != "yes"
8467 CPPFLAGS="$cf_save_CPPFLAGS"
8468 LIBS="$cf_save_LIBS"
8469 NCURSES_CONFIG_PKG=none
8472 cat >>confdefs.h <<\EOF
8476 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8478 echo "$as_me:8478: checking for terminfo header" >&5
8479 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8480 if test "${cf_cv_term_header+set}" = set; then
8481 echo $ECHO_N "(cached) $ECHO_C" >&6
8484 case ${cf_cv_ncurses_header} in
8485 (*/ncurses.h|*/ncursesw.h)
8486 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8489 cf_term_header=term.h
8493 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8495 cat >conftest.$ac_ext <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8499 #include <${cf_cv_ncurses_header:-curses.h}>
8505 int x = auto_left_margin
8510 rm -f conftest.$ac_objext
8511 if { (eval echo "$as_me:8511: \"$ac_compile\"") >&5
8512 (eval $ac_compile) 2>&5
8514 echo "$as_me:8514: \$? = $ac_status" >&5
8515 (exit $ac_status); } &&
8516 { ac_try='test -s conftest.$ac_objext'
8517 { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8520 echo "$as_me:8520: \$? = $ac_status" >&5
8521 (exit $ac_status); }; }; then
8523 cf_cv_term_header="$cf_test"
8525 echo "$as_me: failed program was:" >&5
8526 cat conftest.$ac_ext >&5
8528 cf_cv_term_header=unknown
8531 rm -f conftest.$ac_objext conftest.$ac_ext
8532 test "$cf_cv_term_header" != unknown && break
8536 echo "$as_me:8536: result: $cf_cv_term_header" >&5
8537 echo "${ECHO_T}$cf_cv_term_header" >&6
8539 # Set definitions to allow ifdef'ing to accommodate subdirectories
8541 case $cf_cv_term_header in
8544 cat >>confdefs.h <<\EOF
8545 #define HAVE_TERM_H 1
8551 case $cf_cv_term_header in
8554 cat >>confdefs.h <<\EOF
8555 #define HAVE_NCURSES_TERM_H 1
8561 cat >>confdefs.h <<\EOF
8562 #define HAVE_NCURSESW_TERM_H 1
8571 echo "$as_me:8571: result: no" >&5
8572 echo "${ECHO_T}no" >&6
8573 NCURSES_CONFIG_PKG=none
8576 NCURSES_CONFIG_PKG=none
8579 if test "x$cf_have_ncuconfig" = "xno"; then
8580 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8582 if test -n "$ac_tool_prefix"; then
8583 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8585 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8586 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8587 echo "$as_me:8587: checking for $ac_word" >&5
8588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8589 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8590 echo $ECHO_N "(cached) $ECHO_C" >&6
8592 if test -n "$NCURSES_CONFIG"; then
8593 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8595 ac_save_IFS=$IFS; IFS=$ac_path_separator
8597 for ac_dir in $ac_dummy; do
8599 test -z "$ac_dir" && ac_dir=.
8600 $as_executable_p "$ac_dir/$ac_word" || continue
8601 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8602 echo "$as_me:8602: found $ac_dir/$ac_word" >&5
8608 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8609 if test -n "$NCURSES_CONFIG"; then
8610 echo "$as_me:8610: result: $NCURSES_CONFIG" >&5
8611 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8613 echo "$as_me:8613: result: no" >&5
8614 echo "${ECHO_T}no" >&6
8617 test -n "$NCURSES_CONFIG" && break
8620 if test -z "$NCURSES_CONFIG"; then
8621 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8622 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8624 # Extract the first word of "$ac_prog", so it can be a program name with args.
8625 set dummy $ac_prog; ac_word=$2
8626 echo "$as_me:8626: checking for $ac_word" >&5
8627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8628 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8629 echo $ECHO_N "(cached) $ECHO_C" >&6
8631 if test -n "$ac_ct_NCURSES_CONFIG"; then
8632 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8634 ac_save_IFS=$IFS; IFS=$ac_path_separator
8636 for ac_dir in $ac_dummy; do
8638 test -z "$ac_dir" && ac_dir=.
8639 $as_executable_p "$ac_dir/$ac_word" || continue
8640 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8641 echo "$as_me:8641: found $ac_dir/$ac_word" >&5
8647 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8648 if test -n "$ac_ct_NCURSES_CONFIG"; then
8649 echo "$as_me:8649: result: $ac_ct_NCURSES_CONFIG" >&5
8650 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8652 echo "$as_me:8652: result: no" >&5
8653 echo "${ECHO_T}no" >&6
8656 test -n "$ac_ct_NCURSES_CONFIG" && break
8658 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8660 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8663 if test "$NCURSES_CONFIG" != none ; then
8668 cf_new_extra_cppflags=
8670 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8672 case $cf_fix_cppflags in
8674 case $cf_add_cflags in
8675 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8676 case $cf_add_cflags in
8678 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8680 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8681 && test -z "${cf_tst_cflags}" \
8682 && cf_fix_cppflags=yes
8684 if test $cf_fix_cppflags = yes ; then
8686 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8687 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8690 elif test "${cf_tst_cflags}" = "\"'" ; then
8692 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8693 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8703 case $cf_add_cflags in
8705 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8707 CPPFLAGS=`echo "$CPPFLAGS" | \
8708 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8709 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8714 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8715 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8722 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8723 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8730 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8731 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8733 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8735 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8736 && test -z "${cf_tst_cflags}" \
8737 && cf_fix_cppflags=no
8742 if test -n "$cf_new_cflags" ; then
8744 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8745 CFLAGS="${CFLAGS}$cf_new_cflags"
8749 if test -n "$cf_new_cppflags" ; then
8751 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8752 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8756 if test -n "$cf_new_extra_cppflags" ; then
8758 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8759 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8763 cf_add_libs="`$NCURSES_CONFIG --libs`"
8764 # Filter out duplicates - this happens with badly-designed ".pc" files...
8765 for cf_add_1lib in $LIBS
8767 for cf_add_2lib in $cf_add_libs
8769 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8775 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8779 # even with config script, some packages use no-override for curses.h
8781 echo "$as_me:8781: checking if we have identified curses headers" >&5
8782 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8783 if test "${cf_cv_ncurses_header+set}" = set; then
8784 echo $ECHO_N "(cached) $ECHO_C" >&6
8787 cf_cv_ncurses_header=none
8789 ncurses.h ncurses/ncurses.h \
8790 curses.h ncurses/curses.h
8792 cat >conftest.$ac_ext <<_ACEOF
8793 #line 8793 "configure"
8794 #include "confdefs.h"
8795 #include <${cf_header}>
8799 initscr(); tgoto("?", 0,0)
8804 rm -f conftest.$ac_objext
8805 if { (eval echo "$as_me:8805: \"$ac_compile\"") >&5
8806 (eval $ac_compile) 2>&5
8808 echo "$as_me:8808: \$? = $ac_status" >&5
8809 (exit $ac_status); } &&
8810 { ac_try='test -s conftest.$ac_objext'
8811 { (eval echo "$as_me:8811: \"$ac_try\"") >&5
8814 echo "$as_me:8814: \$? = $ac_status" >&5
8815 (exit $ac_status); }; }; then
8816 cf_cv_ncurses_header=$cf_header; break
8818 echo "$as_me: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8821 rm -f conftest.$ac_objext conftest.$ac_ext
8825 echo "$as_me:8825: result: $cf_cv_ncurses_header" >&5
8826 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8828 if test "$cf_cv_ncurses_header" = none ; then
8829 { { echo "$as_me:8829: error: No curses header-files found" >&5
8830 echo "$as_me: error: No curses header-files found" >&2;}
8831 { (exit 1); exit 1; }; }
8834 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8836 for ac_header in $cf_cv_ncurses_header
8838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8839 echo "$as_me:8839: checking for $ac_header" >&5
8840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8842 echo $ECHO_N "(cached) $ECHO_C" >&6
8844 cat >conftest.$ac_ext <<_ACEOF
8845 #line 8845 "configure"
8846 #include "confdefs.h"
8847 #include <$ac_header>
8849 if { (eval echo "$as_me:8849: \"$ac_cpp conftest.$ac_ext\"") >&5
8850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8852 egrep -v '^ *\+' conftest.er1 >conftest.err
8854 cat conftest.err >&5
8855 echo "$as_me:8855: \$? = $ac_status" >&5
8856 (exit $ac_status); } >/dev/null; then
8857 if test -s conftest.err; then
8858 ac_cpp_err=$ac_c_preproc_warn_flag
8865 if test -z "$ac_cpp_err"; then
8866 eval "$as_ac_Header=yes"
8868 echo "$as_me: failed program was:" >&5
8869 cat conftest.$ac_ext >&5
8870 eval "$as_ac_Header=no"
8872 rm -f conftest.err conftest.$ac_ext
8874 echo "$as_me:8874: result: `eval echo '${'$as_ac_Header'}'`" >&5
8875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8876 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8877 cat >>confdefs.h <<EOF
8878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8884 cat >>confdefs.h <<\EOF
8888 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8890 cat >>confdefs.h <<EOF
8891 #define $cf_nculib_ROOT 1
8894 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8898 cf_ncuhdr_root=ncurses
8900 test -n "$cf_cv_curses_dir" && \
8901 test "$cf_cv_curses_dir" != "no" && { \
8903 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8904 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8906 while test $cf_add_incdir != /usr/include
8908 if test -d $cf_add_incdir
8911 if test -n "$CFLAGS$CPPFLAGS" ; then
8912 # a loop is needed to ensure we can add subdirs of existing dirs
8913 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8914 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8915 cf_have_incdir=yes; break
8920 if test "$cf_have_incdir" = no ; then
8921 if test "$cf_add_incdir" = /usr/local/include ; then
8922 if test "$GCC" = yes
8924 cf_save_CPPFLAGS=$CPPFLAGS
8926 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8927 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8941 rm -f conftest.$ac_objext
8942 if { (eval echo "$as_me:8942: \"$ac_compile\"") >&5
8943 (eval $ac_compile) 2>&5
8945 echo "$as_me:8945: \$? = $ac_status" >&5
8946 (exit $ac_status); } &&
8947 { ac_try='test -s conftest.$ac_objext'
8948 { (eval echo "$as_me:8948: \"$ac_try\"") >&5
8951 echo "$as_me:8951: \$? = $ac_status" >&5
8952 (exit $ac_status); }; }; then
8955 echo "$as_me: failed program was:" >&5
8956 cat conftest.$ac_ext >&5
8959 rm -f conftest.$ac_objext conftest.$ac_ext
8960 CPPFLAGS=$cf_save_CPPFLAGS
8965 if test "$cf_have_incdir" = no ; then
8966 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8968 echo "${as_me:-configure}:8968: testing adding $cf_add_incdir to include-path ..." 1>&5
8970 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8972 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8973 test "$cf_top_incdir" = "$cf_add_incdir" && break
8974 cf_add_incdir="$cf_top_incdir"
8987 echo "$as_me:8987: checking for $cf_ncuhdr_root header in include-path" >&5
8988 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8989 if test "${cf_cv_ncurses_h+set}" = set; then
8990 echo $ECHO_N "(cached) $ECHO_C" >&6
8993 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8994 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8995 for cf_header in $cf_header_list
8998 cat >conftest.$ac_ext <<_ACEOF
8999 #line 8999 "configure"
9000 #include "confdefs.h"
9002 #include <$cf_header>
9007 #ifdef NCURSES_VERSION
9009 printf("%s\n", NCURSES_VERSION);
9022 rm -f conftest.$ac_objext
9023 if { (eval echo "$as_me:9023: \"$ac_compile\"") >&5
9024 (eval $ac_compile) 2>&5
9026 echo "$as_me:9026: \$? = $ac_status" >&5
9027 (exit $ac_status); } &&
9028 { ac_try='test -s conftest.$ac_objext'
9029 { (eval echo "$as_me:9029: \"$ac_try\"") >&5
9032 echo "$as_me:9032: \$? = $ac_status" >&5
9033 (exit $ac_status); }; }; then
9034 cf_cv_ncurses_h=$cf_header
9037 echo "$as_me: failed program was:" >&5
9038 cat conftest.$ac_ext >&5
9041 rm -f conftest.$ac_objext conftest.$ac_ext
9043 test "$cf_cv_ncurses_h" != no && break
9047 echo "$as_me:9047: result: $cf_cv_ncurses_h" >&5
9048 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9050 if test "$cf_cv_ncurses_h" != no ; then
9051 cf_cv_ncurses_header=$cf_cv_ncurses_h
9054 echo "$as_me:9054: checking for $cf_ncuhdr_root include-path" >&5
9055 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9056 if test "${cf_cv_ncurses_h2+set}" = set; then
9057 echo $ECHO_N "(cached) $ECHO_C" >&6
9060 test -n "$verbose" && echo
9064 # collect the current set of include-directories from compiler flags
9065 cf_header_path_list=""
9066 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9067 for cf_header_path in $CPPFLAGS $CFLAGS
9069 case $cf_header_path in
9071 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9073 test "x$cf_header_path" != "xNONE" && \
9074 test -d "$cf_header_path" && \
9076 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9077 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9078 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9079 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9080 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9081 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"
9084 cf_header_path_list="$cf_header_path_list $cf_search"
9090 # add the variations for the package we are looking for
9094 test "x$prefix" != "xNONE" && \
9095 test -d "$prefix" && \
9097 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9098 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9099 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9100 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9101 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9102 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9105 for cf_subdir_prefix in \
9114 test "x$cf_subdir_prefix" != "x$prefix" && \
9115 test -d "$cf_subdir_prefix" && \
9116 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9117 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9118 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9119 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9120 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9121 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9122 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"
9127 test "$includedir" != NONE && \
9128 test "$includedir" != "/usr/include" && \
9129 test -d "$includedir" && {
9130 test -d $includedir && cf_search="$cf_search $includedir"
9131 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9134 test "$oldincludedir" != NONE && \
9135 test "$oldincludedir" != "/usr/include" && \
9136 test -d "$oldincludedir" && {
9137 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9138 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9141 cf_search="$cf_search $cf_header_path_list"
9143 test -n "$verbose" && echo search path $cf_search
9144 cf_save2_CPPFLAGS="$CPPFLAGS"
9145 for cf_incdir in $cf_search
9148 if test -n "$cf_incdir" ; then
9149 for cf_add_incdir in $cf_incdir
9151 while test $cf_add_incdir != /usr/include
9153 if test -d $cf_add_incdir
9156 if test -n "$CFLAGS$CPPFLAGS" ; then
9157 # a loop is needed to ensure we can add subdirs of existing dirs
9158 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9159 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9160 cf_have_incdir=yes; break
9165 if test "$cf_have_incdir" = no ; then
9166 if test "$cf_add_incdir" = /usr/local/include ; then
9167 if test "$GCC" = yes
9169 cf_save_CPPFLAGS=$CPPFLAGS
9171 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9172 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9174 cat >conftest.$ac_ext <<_ACEOF
9175 #line 9175 "configure"
9176 #include "confdefs.h"
9186 rm -f conftest.$ac_objext
9187 if { (eval echo "$as_me:9187: \"$ac_compile\"") >&5
9188 (eval $ac_compile) 2>&5
9190 echo "$as_me:9190: \$? = $ac_status" >&5
9191 (exit $ac_status); } &&
9192 { ac_try='test -s conftest.$ac_objext'
9193 { (eval echo "$as_me:9193: \"$ac_try\"") >&5
9196 echo "$as_me:9196: \$? = $ac_status" >&5
9197 (exit $ac_status); }; }; then
9200 echo "$as_me: failed program was:" >&5
9201 cat conftest.$ac_ext >&5
9204 rm -f conftest.$ac_objext conftest.$ac_ext
9205 CPPFLAGS=$cf_save_CPPFLAGS
9210 if test "$cf_have_incdir" = no ; then
9211 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9213 echo "${as_me:-configure}:9213: testing adding $cf_add_incdir to include-path ..." 1>&5
9215 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9217 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9218 test "$cf_top_incdir" = "$cf_add_incdir" && break
9219 cf_add_incdir="$cf_top_incdir"
9235 cat >conftest.$ac_ext <<_ACEOF
9236 #line 9236 "configure"
9237 #include "confdefs.h"
9239 #include <$cf_header>
9244 #ifdef NCURSES_VERSION
9246 printf("%s\n", NCURSES_VERSION);
9259 rm -f conftest.$ac_objext
9260 if { (eval echo "$as_me:9260: \"$ac_compile\"") >&5
9261 (eval $ac_compile) 2>&5
9263 echo "$as_me:9263: \$? = $ac_status" >&5
9264 (exit $ac_status); } &&
9265 { ac_try='test -s conftest.$ac_objext'
9266 { (eval echo "$as_me:9266: \"$ac_try\"") >&5
9269 echo "$as_me:9269: \$? = $ac_status" >&5
9270 (exit $ac_status); }; }; then
9271 cf_cv_ncurses_h2=$cf_header
9274 echo "$as_me: failed program was:" >&5
9275 cat conftest.$ac_ext >&5
9278 rm -f conftest.$ac_objext conftest.$ac_ext
9280 if test "$cf_cv_ncurses_h2" != no ; then
9281 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9282 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9285 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9287 CPPFLAGS="$cf_save2_CPPFLAGS"
9288 test "$cf_cv_ncurses_h2" != no && break
9290 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9290: error: not found" >&5
9291 echo "$as_me: error: not found" >&2;}
9292 { (exit 1); exit 1; }; }
9295 echo "$as_me:9295: result: $cf_cv_ncurses_h2" >&5
9296 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9298 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9299 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9300 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9301 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9304 if test -n "$cf_1st_incdir" ; then
9305 for cf_add_incdir in $cf_1st_incdir
9307 while test $cf_add_incdir != /usr/include
9309 if test -d $cf_add_incdir
9312 if test -n "$CFLAGS$CPPFLAGS" ; then
9313 # a loop is needed to ensure we can add subdirs of existing dirs
9314 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9315 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9316 cf_have_incdir=yes; break
9321 if test "$cf_have_incdir" = no ; then
9322 if test "$cf_add_incdir" = /usr/local/include ; then
9323 if test "$GCC" = yes
9325 cf_save_CPPFLAGS=$CPPFLAGS
9327 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9328 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9330 cat >conftest.$ac_ext <<_ACEOF
9331 #line 9331 "configure"
9332 #include "confdefs.h"
9342 rm -f conftest.$ac_objext
9343 if { (eval echo "$as_me:9343: \"$ac_compile\"") >&5
9344 (eval $ac_compile) 2>&5
9346 echo "$as_me:9346: \$? = $ac_status" >&5
9347 (exit $ac_status); } &&
9348 { ac_try='test -s conftest.$ac_objext'
9349 { (eval echo "$as_me:9349: \"$ac_try\"") >&5
9352 echo "$as_me:9352: \$? = $ac_status" >&5
9353 (exit $ac_status); }; }; then
9356 echo "$as_me: failed program was:" >&5
9357 cat conftest.$ac_ext >&5
9360 rm -f conftest.$ac_objext conftest.$ac_ext
9361 CPPFLAGS=$cf_save_CPPFLAGS
9366 if test "$cf_have_incdir" = no ; then
9367 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9369 echo "${as_me:-configure}:9369: testing adding $cf_add_incdir to include-path ..." 1>&5
9371 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9373 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9374 test "$cf_top_incdir" = "$cf_add_incdir" && break
9375 cf_add_incdir="$cf_top_incdir"
9388 # Set definitions to allow ifdef'ing for ncurses.h
9390 case $cf_cv_ncurses_header in
9393 cat >>confdefs.h <<\EOF
9394 #define HAVE_NCURSES_H 1
9400 case $cf_cv_ncurses_header in
9401 (ncurses/curses.h|ncurses/ncurses.h)
9403 cat >>confdefs.h <<\EOF
9404 #define HAVE_NCURSES_NCURSES_H 1
9408 (ncursesw/curses.h|ncursesw/ncurses.h)
9410 cat >>confdefs.h <<\EOF
9411 #define HAVE_NCURSESW_NCURSES_H 1
9417 echo "$as_me:9417: checking for terminfo header" >&5
9418 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9419 if test "${cf_cv_term_header+set}" = set; then
9420 echo $ECHO_N "(cached) $ECHO_C" >&6
9423 case ${cf_cv_ncurses_header} in
9424 (*/ncurses.h|*/ncursesw.h)
9425 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9428 cf_term_header=term.h
9432 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9434 cat >conftest.$ac_ext <<_ACEOF
9435 #line 9435 "configure"
9436 #include "confdefs.h"
9438 #include <${cf_cv_ncurses_header:-curses.h}>
9444 int x = auto_left_margin
9449 rm -f conftest.$ac_objext
9450 if { (eval echo "$as_me:9450: \"$ac_compile\"") >&5
9451 (eval $ac_compile) 2>&5
9453 echo "$as_me:9453: \$? = $ac_status" >&5
9454 (exit $ac_status); } &&
9455 { ac_try='test -s conftest.$ac_objext'
9456 { (eval echo "$as_me:9456: \"$ac_try\"") >&5
9459 echo "$as_me:9459: \$? = $ac_status" >&5
9460 (exit $ac_status); }; }; then
9462 cf_cv_term_header="$cf_test"
9464 echo "$as_me: failed program was:" >&5
9465 cat conftest.$ac_ext >&5
9467 cf_cv_term_header=unknown
9470 rm -f conftest.$ac_objext conftest.$ac_ext
9471 test "$cf_cv_term_header" != unknown && break
9475 echo "$as_me:9475: result: $cf_cv_term_header" >&5
9476 echo "${ECHO_T}$cf_cv_term_header" >&6
9478 # Set definitions to allow ifdef'ing to accommodate subdirectories
9480 case $cf_cv_term_header in
9483 cat >>confdefs.h <<\EOF
9484 #define HAVE_TERM_H 1
9490 case $cf_cv_term_header in
9493 cat >>confdefs.h <<\EOF
9494 #define HAVE_NCURSES_TERM_H 1
9500 cat >>confdefs.h <<\EOF
9501 #define HAVE_NCURSESW_TERM_H 1
9507 # some applications need this, but should check for NCURSES_VERSION
9509 cat >>confdefs.h <<\EOF
9513 echo "$as_me:9513: checking for ncurses version" >&5
9514 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9515 if test "${cf_cv_ncurses_version+set}" = set; then
9516 echo $ECHO_N "(cached) $ECHO_C" >&6
9519 cf_cv_ncurses_version=no
9522 if test "$cross_compiling" = yes; then
9524 # This will not work if the preprocessor splits the line after the
9525 # Autoconf token. The 'unproto' program does that.
9526 cat > conftest.$ac_ext <<EOF
9527 #include <${cf_cv_ncurses_header:-curses.h}>
9529 #ifdef NCURSES_VERSION
9530 Autoconf NCURSES_VERSION
9538 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9539 { (eval echo "$as_me:9539: \"$cf_try\"") >&5
9542 echo "$as_me:9542: \$? = $ac_status" >&5
9543 (exit $ac_status); }
9544 if test -f conftest.out ; then
9545 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9546 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9551 cat >conftest.$ac_ext <<_ACEOF
9552 #line 9552 "configure"
9553 #include "confdefs.h"
9555 #include <${cf_cv_ncurses_header:-curses.h}>
9559 FILE *fp = fopen("$cf_tempfile", "w");
9560 #ifdef NCURSES_VERSION
9561 # ifdef NCURSES_VERSION_PATCH
9562 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9564 fprintf(fp, "%s\n", NCURSES_VERSION);
9568 fprintf(fp, "old\n");
9573 ${cf_cv_main_return:-return}(0);
9576 rm -f conftest$ac_exeext
9577 if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
9578 (eval $ac_link) 2>&5
9580 echo "$as_me:9580: \$? = $ac_status" >&5
9581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9582 { (eval echo "$as_me:9582: \"$ac_try\"") >&5
9585 echo "$as_me:9585: \$? = $ac_status" >&5
9586 (exit $ac_status); }; }; then
9588 cf_cv_ncurses_version=`cat $cf_tempfile`
9590 echo "$as_me: program exited with status $ac_status" >&5
9591 echo "$as_me: failed program was:" >&5
9592 cat conftest.$ac_ext >&5
9594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9599 echo "$as_me:9599: result: $cf_cv_ncurses_version" >&5
9600 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9601 test "$cf_cv_ncurses_version" = no ||
9602 cat >>confdefs.h <<\EOF
9606 cf_nculib_root=ncurses
9607 # This works, except for the special case where we find gpm, but
9608 # ncurses is in a nonstandard location via $LIBS, and we really want
9611 cf_ncurses_SAVE="$LIBS"
9612 echo "$as_me:9612: checking for Gpm_Open in -lgpm" >&5
9613 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9614 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9615 echo $ECHO_N "(cached) $ECHO_C" >&6
9617 ac_check_lib_save_LIBS=$LIBS
9619 cat >conftest.$ac_ext <<_ACEOF
9620 #line 9620 "configure"
9621 #include "confdefs.h"
9623 /* Override any gcc2 internal prototype to avoid an error. */
9627 /* We use char because int might match the return type of a gcc2
9628 builtin and then its argument prototype would still apply. */
9638 rm -f conftest.$ac_objext conftest$ac_exeext
9639 if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
9640 (eval $ac_link) 2>&5
9642 echo "$as_me:9642: \$? = $ac_status" >&5
9643 (exit $ac_status); } &&
9644 { ac_try='test -s conftest$ac_exeext'
9645 { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9648 echo "$as_me:9648: \$? = $ac_status" >&5
9649 (exit $ac_status); }; }; then
9650 ac_cv_lib_gpm_Gpm_Open=yes
9652 echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654 ac_cv_lib_gpm_Gpm_Open=no
9656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657 LIBS=$ac_check_lib_save_LIBS
9659 echo "$as_me:9659: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9660 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9661 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9662 echo "$as_me:9662: checking for initscr in -lgpm" >&5
9663 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9664 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9665 echo $ECHO_N "(cached) $ECHO_C" >&6
9667 ac_check_lib_save_LIBS=$LIBS
9669 cat >conftest.$ac_ext <<_ACEOF
9670 #line 9670 "configure"
9671 #include "confdefs.h"
9673 /* Override any gcc2 internal prototype to avoid an error. */
9677 /* We use char because int might match the return type of a gcc2
9678 builtin and then its argument prototype would still apply. */
9688 rm -f conftest.$ac_objext conftest$ac_exeext
9689 if { (eval echo "$as_me:9689: \"$ac_link\"") >&5
9690 (eval $ac_link) 2>&5
9692 echo "$as_me:9692: \$? = $ac_status" >&5
9693 (exit $ac_status); } &&
9694 { ac_try='test -s conftest$ac_exeext'
9695 { (eval echo "$as_me:9695: \"$ac_try\"") >&5
9698 echo "$as_me:9698: \$? = $ac_status" >&5
9699 (exit $ac_status); }; }; then
9700 ac_cv_lib_gpm_initscr=yes
9702 echo "$as_me: failed program was:" >&5
9703 cat conftest.$ac_ext >&5
9704 ac_cv_lib_gpm_initscr=no
9706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9707 LIBS=$ac_check_lib_save_LIBS
9709 echo "$as_me:9709: result: $ac_cv_lib_gpm_initscr" >&5
9710 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9711 if test $ac_cv_lib_gpm_initscr = yes; then
9712 LIBS="$cf_ncurses_SAVE"
9714 cf_ncurses_LIBS="-lgpm"
9721 # This is only necessary if you are linking against an obsolete
9722 # version of ncurses (but it should do no harm, since it's static).
9723 if test "$cf_nculib_root" = ncurses ; then
9724 echo "$as_me:9724: checking for tgoto in -lmytinfo" >&5
9725 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9726 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9727 echo $ECHO_N "(cached) $ECHO_C" >&6
9729 ac_check_lib_save_LIBS=$LIBS
9730 LIBS="-lmytinfo $LIBS"
9731 cat >conftest.$ac_ext <<_ACEOF
9732 #line 9732 "configure"
9733 #include "confdefs.h"
9735 /* Override any gcc2 internal prototype to avoid an error. */
9739 /* We use char because int might match the return type of a gcc2
9740 builtin and then its argument prototype would still apply. */
9750 rm -f conftest.$ac_objext conftest$ac_exeext
9751 if { (eval echo "$as_me:9751: \"$ac_link\"") >&5
9752 (eval $ac_link) 2>&5
9754 echo "$as_me:9754: \$? = $ac_status" >&5
9755 (exit $ac_status); } &&
9756 { ac_try='test -s conftest$ac_exeext'
9757 { (eval echo "$as_me:9757: \"$ac_try\"") >&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit $ac_status); }; }; then
9762 ac_cv_lib_mytinfo_tgoto=yes
9764 echo "$as_me: failed program was:" >&5
9765 cat conftest.$ac_ext >&5
9766 ac_cv_lib_mytinfo_tgoto=no
9768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9769 LIBS=$ac_check_lib_save_LIBS
9771 echo "$as_me:9771: result: $ac_cv_lib_mytinfo_tgoto" >&5
9772 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9773 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9774 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9781 cf_add_libs="$cf_ncurses_LIBS"
9782 # Filter out duplicates - this happens with badly-designed ".pc" files...
9783 for cf_add_1lib in $LIBS
9785 for cf_add_2lib in $cf_add_libs
9787 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9793 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9797 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9800 cf_add_libs="-l$cf_nculib_root"
9801 # Filter out duplicates - this happens with badly-designed ".pc" files...
9802 for cf_add_1lib in $LIBS
9804 for cf_add_2lib in $cf_add_libs
9806 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9812 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9818 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9820 echo "$as_me:9820: checking for initscr" >&5
9821 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9822 if test "${ac_cv_func_initscr+set}" = set; then
9823 echo $ECHO_N "(cached) $ECHO_C" >&6
9825 cat >conftest.$ac_ext <<_ACEOF
9826 #line 9826 "configure"
9827 #include "confdefs.h"
9828 #define initscr autoconf_temporary
9829 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9836 /* We use char because int might match the return type of a gcc2
9837 builtin and then its argument prototype would still apply. */
9838 char initscr (void);
9844 /* The GNU C library defines stubs for functions which it implements
9845 to always fail with ENOSYS. Some functions are actually named
9846 something starting with __ and the normal name is an alias. */
9847 #if defined (__stub_initscr) || defined (__stub___initscr)
9848 #error found stub for initscr
9856 rm -f conftest.$ac_objext conftest$ac_exeext
9857 if { (eval echo "$as_me:9857: \"$ac_link\"") >&5
9858 (eval $ac_link) 2>&5
9860 echo "$as_me:9860: \$? = $ac_status" >&5
9861 (exit $ac_status); } &&
9862 { ac_try='test -s conftest$ac_exeext'
9863 { (eval echo "$as_me:9863: \"$ac_try\"") >&5
9866 echo "$as_me:9866: \$? = $ac_status" >&5
9867 (exit $ac_status); }; }; then
9868 ac_cv_func_initscr=yes
9870 echo "$as_me: failed program was:" >&5
9871 cat conftest.$ac_ext >&5
9872 ac_cv_func_initscr=no
9874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9876 echo "$as_me:9876: result: $ac_cv_func_initscr" >&5
9877 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9878 if test $ac_cv_func_initscr = yes; then
9879 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9882 cf_save_LIBS="$LIBS"
9883 echo "$as_me:9883: checking for initscr in -l$cf_nculib_root" >&5
9884 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9885 LIBS="-l$cf_nculib_root $LIBS"
9886 cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889 #include <${cf_cv_ncurses_header:-curses.h}>
9898 rm -f conftest.$ac_objext conftest$ac_exeext
9899 if { (eval echo "$as_me:9899: \"$ac_link\"") >&5
9900 (eval $ac_link) 2>&5
9902 echo "$as_me:9902: \$? = $ac_status" >&5
9903 (exit $ac_status); } &&
9904 { ac_try='test -s conftest$ac_exeext'
9905 { (eval echo "$as_me:9905: \"$ac_try\"") >&5
9908 echo "$as_me:9908: \$? = $ac_status" >&5
9909 (exit $ac_status); }; }; then
9910 echo "$as_me:9910: result: yes" >&5
9911 echo "${ECHO_T}yes" >&6
9912 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9915 echo "$as_me: failed program was:" >&5
9916 cat conftest.$ac_ext >&5
9917 echo "$as_me:9917: result: no" >&5
9918 echo "${ECHO_T}no" >&6
9921 cf_library_path_list=""
9922 if test -n "${LDFLAGS}${LIBS}" ; then
9923 for cf_library_path in $LDFLAGS $LIBS
9925 case $cf_library_path in
9927 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9929 test "x$cf_library_path" != "xNONE" && \
9930 test -d "$cf_library_path" && \
9932 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9933 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9934 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9935 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9936 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9937 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"
9940 cf_library_path_list="$cf_library_path_list $cf_search"
9948 test "x$prefix" != "xNONE" && \
9949 test -d "$prefix" && \
9951 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9952 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9953 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9954 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9955 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9956 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9959 for cf_subdir_prefix in \
9968 test "x$cf_subdir_prefix" != "x$prefix" && \
9969 test -d "$cf_subdir_prefix" && \
9970 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9971 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9972 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9973 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9974 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9975 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9976 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"
9981 cf_search="$cf_library_path_list $cf_search"
9983 for cf_libdir in $cf_search
9985 echo "$as_me:9985: checking for -l$cf_nculib_root in $cf_libdir" >&5
9986 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9987 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9988 cat >conftest.$ac_ext <<_ACEOF
9989 #line 9989 "configure"
9990 #include "confdefs.h"
9991 #include <${cf_cv_ncurses_header:-curses.h}>
10000 rm -f conftest.$ac_objext conftest$ac_exeext
10001 if { (eval echo "$as_me:10001: \"$ac_link\"") >&5
10002 (eval $ac_link) 2>&5
10004 echo "$as_me:10004: \$? = $ac_status" >&5
10005 (exit $ac_status); } &&
10006 { ac_try='test -s conftest$ac_exeext'
10007 { (eval echo "$as_me:10007: \"$ac_try\"") >&5
10008 (eval $ac_try) 2>&5
10010 echo "$as_me:10010: \$? = $ac_status" >&5
10011 (exit $ac_status); }; }; then
10012 echo "$as_me:10012: result: yes" >&5
10013 echo "${ECHO_T}yes" >&6
10014 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10017 echo "$as_me: failed program was:" >&5
10018 cat conftest.$ac_ext >&5
10019 echo "$as_me:10019: result: no" >&5
10020 echo "${ECHO_T}no" >&6
10021 LIBS="$cf_save_LIBS"
10023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10031 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10033 if test $cf_found_library = no ; then
10034 { { echo "$as_me:10034: error: Cannot link $cf_nculib_root library" >&5
10035 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10036 { (exit 1); exit 1; }; }
10041 if test -n "$cf_ncurses_LIBS" ; then
10042 echo "$as_me:10042: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10043 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10044 cf_ncurses_SAVE="$LIBS"
10045 for p in $cf_ncurses_LIBS ; do
10046 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10047 if test "$q" != "$LIBS" ; then
10051 cat >conftest.$ac_ext <<_ACEOF
10052 #line 10052 "configure"
10053 #include "confdefs.h"
10054 #include <${cf_cv_ncurses_header:-curses.h}>
10058 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10063 rm -f conftest.$ac_objext conftest$ac_exeext
10064 if { (eval echo "$as_me:10064: \"$ac_link\"") >&5
10065 (eval $ac_link) 2>&5
10067 echo "$as_me:10067: \$? = $ac_status" >&5
10068 (exit $ac_status); } &&
10069 { ac_try='test -s conftest$ac_exeext'
10070 { (eval echo "$as_me:10070: \"$ac_try\"") >&5
10071 (eval $ac_try) 2>&5
10073 echo "$as_me:10073: \$? = $ac_status" >&5
10074 (exit $ac_status); }; }; then
10075 echo "$as_me:10075: result: yes" >&5
10076 echo "${ECHO_T}yes" >&6
10078 echo "$as_me: failed program was:" >&5
10079 cat conftest.$ac_ext >&5
10080 echo "$as_me:10080: result: no" >&5
10081 echo "${ECHO_T}no" >&6
10082 LIBS="$cf_ncurses_SAVE"
10084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10087 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10089 cat >>confdefs.h <<EOF
10090 #define $cf_nculib_ROOT 1
10095 NCURSES_CONFIG=none
10100 if test "$NCURSES_CONFIG_PKG" != none ; then
10101 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10103 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10104 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10105 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10107 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10108 if test -z "$cf_cv_abi_version"
10110 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10113 elif test "$NCURSES_CONFIG" != none ; then
10115 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10117 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10118 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10119 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10121 # ABI version is not available from headers
10122 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10126 for cf_name in MAJOR MINOR PATCH
10128 cat >conftest.$ac_ext <<CF_EOF
10129 #include <${cf_cv_ncurses_header:-curses.h}>
10130 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10132 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10133 { (eval echo "$as_me:10133: \"$cf_try\"") >&5
10134 (eval $cf_try) 2>&5
10136 echo "$as_me:10136: \$? = $ac_status" >&5
10137 (exit $ac_status); }
10138 if test -f conftest.out ; then
10139 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10140 eval NCURSES_$cf_name=\"$cf_result\"
10141 # cat conftest.$ac_ext
10146 cf_cv_abi_version=${NCURSES_MAJOR}
10150 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10152 cf_cv_timestamp=`date`
10154 echo "$as_me:10154: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10155 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10157 echo "$as_me:10157: checking if you want to have a library-prefix" >&5
10158 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10160 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10161 if test "${with_lib_prefix+set}" = set; then
10162 withval="$with_lib_prefix"
10163 with_lib_prefix=$withval
10165 with_lib_prefix=auto
10167 echo "$as_me:10167: result: $with_lib_prefix" >&5
10168 echo "${ECHO_T}$with_lib_prefix" >&6
10170 if test $with_lib_prefix = auto
10173 case $cf_cv_system_name in
10175 if test "$DFT_LWR_MODEL" = libtool; then
10181 (*) LIB_PREFIX='lib'
10184 cf_prefix=$LIB_PREFIX
10186 elif test $with_lib_prefix = no
10190 LIB_PREFIX=$with_lib_prefix
10195 ###############################################################################
10197 if test X"$CC_G_OPT" = X"" ; then
10199 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10202 echo "$as_me:10202: checking for default loader flags" >&5
10203 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10204 case $DFT_LWR_MODEL in
10205 (normal) LD_MODEL='' ;;
10206 (debug) LD_MODEL=$CC_G_OPT ;;
10207 (profile) LD_MODEL='-pg';;
10208 (shared) LD_MODEL='' ;;
10210 echo "$as_me:10210: result: $LD_MODEL" >&5
10211 echo "${ECHO_T}$LD_MODEL" >&6
10214 if test "x$cf_cv_enable_rpath" != xno
10216 echo "$as_me:10216: checking for an rpath option" >&5
10217 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10218 case $cf_cv_system_name in
10220 if test "$GCC" = yes; then
10221 LD_RPATH_OPT="-Wl,-rpath,"
10223 LD_RPATH_OPT="-rpath "
10226 (linux*|gnu*|k*bsd*-gnu|freebsd*)
10227 LD_RPATH_OPT="-Wl,-rpath,"
10229 (openbsd[2-9].*|mirbsd*)
10230 LD_RPATH_OPT="-Wl,-rpath,"
10233 LD_RPATH_OPT="-rpath "
10236 LD_RPATH_OPT="-Wl,-rpath,"
10239 LD_RPATH_OPT="-rpath "
10247 echo "$as_me:10247: result: $LD_RPATH_OPT" >&5
10248 echo "${ECHO_T}$LD_RPATH_OPT" >&6
10250 case "x$LD_RPATH_OPT" in
10252 echo "$as_me:10252: checking if we need a space after rpath option" >&5
10253 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10254 cf_save_LIBS="$LIBS"
10256 cf_add_libs="${LD_RPATH_OPT}$libdir"
10257 # Filter out duplicates - this happens with badly-designed ".pc" files...
10258 for cf_add_1lib in $LIBS
10260 for cf_add_2lib in $cf_add_libs
10262 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10268 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10270 LIBS="$cf_add_libs"
10272 cat >conftest.$ac_ext <<_ACEOF
10273 #line 10273 "configure"
10274 #include "confdefs.h"
10284 rm -f conftest.$ac_objext conftest$ac_exeext
10285 if { (eval echo "$as_me:10285: \"$ac_link\"") >&5
10286 (eval $ac_link) 2>&5
10288 echo "$as_me:10288: \$? = $ac_status" >&5
10289 (exit $ac_status); } &&
10290 { ac_try='test -s conftest$ac_exeext'
10291 { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292 (eval $ac_try) 2>&5
10294 echo "$as_me:10294: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10298 echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10303 LIBS="$cf_save_LIBS"
10304 echo "$as_me:10304: result: $cf_rpath_space" >&5
10305 echo "${ECHO_T}$cf_rpath_space" >&6
10306 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10315 INSTALL_LIB="-m 644"
10316 : ${rel_builddir:=.}
10322 cf_cv_do_symlinks=no
10324 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
10326 echo "$as_me:10326: checking if release/abi version should be used for shared libs" >&5
10327 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
10329 # Check whether --with-shlib-version or --without-shlib-version was given.
10330 if test "${with_shlib_version+set}" = set; then
10331 withval="$with_shlib_version"
10332 test -z "$withval" && withval=auto
10335 cf_cv_shlib_version=auto
10338 cf_cv_shlib_version=$withval
10341 echo "$as_me:10341: result: $withval" >&5
10342 echo "${ECHO_T}$withval" >&6
10343 { { echo "$as_me:10343: error: option value must be one of: rel, abi, or auto" >&5
10344 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
10345 { (exit 1); exit 1; }; }
10350 cf_cv_shlib_version=auto
10352 echo "$as_me:10352: result: $cf_cv_shlib_version" >&5
10353 echo "${ECHO_T}$cf_cv_shlib_version" >&6
10355 cf_cv_rm_so_locs=no
10358 # Some less-capable ports of gcc support only -fpic
10362 if test "$GCC" = yes
10366 case $cf_cv_system_name in
10367 (*linux*) # e.g., PGI compiler
10373 if test "$cf_try_fPIC" = yes
10375 echo "$as_me:10375: checking which $CC option to use" >&5
10376 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
10377 cf_save_CFLAGS="$CFLAGS"
10378 for CC_SHARED_OPTS in -fPIC -fpic ''
10380 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
10381 cat >conftest.$ac_ext <<_ACEOF
10382 #line 10382 "configure"
10383 #include "confdefs.h"
10393 rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395 (eval $ac_compile) 2>&5
10397 echo "$as_me:10397: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
10399 { ac_try='test -s conftest.$ac_objext'
10400 { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10403 echo "$as_me:10403: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10407 echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10410 rm -f conftest.$ac_objext conftest.$ac_ext
10412 echo "$as_me:10412: result: $CC_SHARED_OPTS" >&5
10413 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
10414 CFLAGS="$cf_save_CFLAGS"
10417 cf_cv_shlib_version_infix=no
10419 case $cf_cv_system_name in
10420 (aix4.3-9*|aix[5-7]*)
10421 if test "$GCC" = yes; then
10422 CC_SHARED_OPTS='-Wl,-brtl'
10423 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10425 CC_SHARED_OPTS='-brtl'
10426 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
10427 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10431 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
10435 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10436 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10437 cf_cv_shlib_version=cygdll
10438 cf_cv_shlib_version_infix=cygdll
10441 cat >mk_shared_lib.sh <<-CF_EOF
10444 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10447 Linking shared library
10448 ** SHARED_LIB \$SHARED_LIB
10449 ** IMPORT_LIB \$IMPORT_LIB
10451 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10453 chmod +x mk_shared_lib.sh
10457 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10458 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10459 cf_cv_shlib_version=msysdll
10460 cf_cv_shlib_version_infix=msysdll
10463 cat >mk_shared_lib.sh <<-CF_EOF
10466 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10469 Linking shared library
10470 ** SHARED_LIB \$SHARED_LIB
10471 ** IMPORT_LIB \$IMPORT_LIB
10473 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10475 chmod +x mk_shared_lib.sh
10478 cf_try_cflags="no-cpp-precomp"
10479 CC_SHARED_OPTS="-dynamic"
10480 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
10481 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
10482 cf_cv_shlib_version_infix=yes
10483 echo "$as_me:10483: checking if ld -search_paths_first works" >&5
10484 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
10485 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
10486 echo $ECHO_N "(cached) $ECHO_C" >&6
10489 cf_save_LDFLAGS=$LDFLAGS
10490 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10491 cat >conftest.$ac_ext <<_ACEOF
10492 #line 10492 "configure"
10493 #include "confdefs.h"
10503 rm -f conftest.$ac_objext conftest$ac_exeext
10504 if { (eval echo "$as_me:10504: \"$ac_link\"") >&5
10505 (eval $ac_link) 2>&5
10507 echo "$as_me:10507: \$? = $ac_status" >&5
10508 (exit $ac_status); } &&
10509 { ac_try='test -s conftest$ac_exeext'
10510 { (eval echo "$as_me:10510: \"$ac_try\"") >&5
10511 (eval $ac_try) 2>&5
10513 echo "$as_me:10513: \$? = $ac_status" >&5
10514 (exit $ac_status); }; }; then
10515 cf_cv_ldflags_search_paths_first=yes
10517 echo "$as_me: failed program was:" >&5
10518 cat conftest.$ac_ext >&5
10519 cf_cv_ldflags_search_paths_first=no
10521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10522 LDFLAGS=$cf_save_LDFLAGS
10524 echo "$as_me:10524: result: $cf_cv_ldflags_search_paths_first" >&5
10525 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
10526 if test $cf_cv_ldflags_search_paths_first = yes; then
10527 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10531 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
10532 if test "$GCC" != yes; then
10533 CC_SHARED_OPTS='+Z'
10535 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
10536 INSTALL_LIB="-m 555"
10539 # (tested with gcc 2.7.2 -- I don't have c89)
10540 if test "$GCC" = yes; then
10541 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
10543 CC_SHARED_OPTS='+Z'
10544 LD_SHARED_OPTS='-Wl,+b,${libdir}'
10546 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
10547 # HP-UX shared libraries must be executable, and should be
10548 # readonly to exploit a quirk in the memory manager.
10549 INSTALL_LIB="-m 555"
10552 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10553 if test "$cf_cv_shlib_version" = rel; then
10554 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10556 cf_shared_soname='`basename $@`'
10559 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
10562 if test "$cf_cv_enable_rpath" = yes ; then
10563 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10565 # tested with IRIX 5.2 and 'cc'.
10566 if test "$GCC" != yes; then
10567 CC_SHARED_OPTS='-KPIC'
10568 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
10570 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
10572 cf_cv_rm_so_locs=yes
10574 (linux*|gnu*|k*bsd*-gnu)
10575 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10576 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10577 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10579 if test "$cf_cv_enable_rpath" = yes ; then
10580 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10583 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10584 if test "$cf_cv_shlib_version" = rel; then
10585 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10587 cf_cv_shared_soname='`basename $@`'
10590 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10593 cf_cv_shlib_version=mingw
10594 cf_cv_shlib_version_infix=mingw
10597 if test "$DFT_LWR_MODEL" = "shared" ; then
10598 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
10599 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10600 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
10603 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10604 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10605 cat >mk_shared_lib.sh <<-CF_EOF
10608 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
10611 Linking shared library
10612 ** SHARED_LIB \$SHARED_LIB
10613 ** IMPORT_LIB \$IMPORT_LIB
10615 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10617 chmod +x mk_shared_lib.sh
10619 (openbsd[2-9].*|mirbsd*)
10620 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10621 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10622 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10624 if test "$cf_cv_enable_rpath" = yes ; then
10625 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10627 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10629 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10630 if test "$cf_cv_shlib_version" = rel; then
10631 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10633 cf_cv_shared_soname='`basename $@`'
10636 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10638 (nto-qnx*|openbsd*|freebsd[12].*)
10639 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10640 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
10641 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10643 (dragonfly*|freebsd*)
10644 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10645 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10646 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10647 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
10648 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10651 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10652 if test "$cf_cv_shlib_version" = rel; then
10653 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10655 cf_cv_shared_soname='`basename $@`'
10658 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10661 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10662 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10663 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10664 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10665 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10666 if test "$cf_cv_shlib_version" = auto; then
10667 if test -f /usr/libexec/ld.elf_so; then
10668 cf_cv_shlib_version=abi
10670 cf_cv_shlib_version=rel
10674 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10675 if test "$cf_cv_shlib_version" = rel; then
10676 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10678 cf_cv_shared_soname='`basename $@`'
10681 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
10683 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
10687 # tested with OSF/1 V3.2 and 'cc'
10688 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
10689 # link with shared libs).
10690 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
10693 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
10696 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
10697 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10698 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10699 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10701 cf_cv_rm_so_locs=yes
10703 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
10704 # tested with osr5.0.5
10705 if test "$GCC" != yes; then
10706 CC_SHARED_OPTS='-belf -KPIC'
10708 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
10709 if test "$cf_cv_enable_rpath" = yes ; then
10710 # only way is to set LD_RUN_PATH but no switch for it
10713 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10714 LINK_PROGS='LD_RUN_PATH=${libdir}'
10715 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
10718 # tested with SunOS 4.1.1 and gcc 2.7.0
10719 if test "$GCC" != yes; then
10720 CC_SHARED_OPTS='-KPIC'
10722 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
10723 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10726 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
10727 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
10728 if test "$DFT_LWR_MODEL" = "shared" ; then
10729 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
10730 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10732 if test "$cf_cv_enable_rpath" = yes ; then
10733 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
10736 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10737 if test "$cf_cv_shlib_version" = rel; then
10738 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10740 cf_cv_shared_soname='`basename $@`'
10743 if test "$GCC" != yes; then
10744 cf_save_CFLAGS="$CFLAGS"
10745 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
10747 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
10748 cat >conftest.$ac_ext <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10760 rm -f conftest.$ac_objext
10761 if { (eval echo "$as_me:10761: \"$ac_compile\"") >&5
10762 (eval $ac_compile) 2>&5
10764 echo "$as_me:10764: \$? = $ac_status" >&5
10765 (exit $ac_status); } &&
10766 { ac_try='test -s conftest.$ac_objext'
10767 { (eval echo "$as_me:10767: \"$ac_try\"") >&5
10768 (eval $ac_try) 2>&5
10770 echo "$as_me:10770: \$? = $ac_status" >&5
10771 (exit $ac_status); }; }; then
10774 echo "$as_me: failed program was:" >&5
10775 cat conftest.$ac_ext >&5
10777 rm -f conftest.$ac_objext conftest.$ac_ext
10779 CFLAGS="$cf_save_CFLAGS"
10780 CC_SHARED_OPTS=$cf_shared_opts
10781 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
10783 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10786 (sysv5uw7*|unix_sv*)
10787 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10788 if test "$GCC" != yes; then
10789 CC_SHARED_OPTS='-KPIC'
10791 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
10794 CC_SHARED_OPTS='unknown'
10795 MK_SHARED_LIB='echo unknown'
10799 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10800 case "$cf_cv_shlib_version" in
10802 case "$MK_SHARED_LIB" in
10804 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10807 { echo "$as_me:10807: WARNING: ignored --with-shlib-version" >&5
10808 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10814 if test -n "$cf_try_cflags"
10816 cat > conftest.$ac_ext <<EOF
10817 #line 10817 "${as_me:-configure}"
10819 int main(int argc, char *argv[])
10822 return (argv[argc-1] == 0) ;
10825 cf_save_CFLAGS="$CFLAGS"
10826 for cf_opt in $cf_try_cflags
10828 CFLAGS="$cf_save_CFLAGS -$cf_opt"
10829 echo "$as_me:10829: checking if CFLAGS option -$cf_opt works" >&5
10830 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10831 if { (eval echo "$as_me:10831: \"$ac_compile\"") >&5
10832 (eval $ac_compile) 2>&5
10834 echo "$as_me:10834: \$? = $ac_status" >&5
10835 (exit $ac_status); }; then
10836 echo "$as_me:10836: result: yes" >&5
10837 echo "${ECHO_T}yes" >&6
10838 cf_save_CFLAGS="$CFLAGS"
10840 echo "$as_me:10840: result: no" >&5
10841 echo "${ECHO_T}no" >&6
10844 CFLAGS="$cf_save_CFLAGS"
10847 # RPATH_LIST is a colon-separated list of directories
10848 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10849 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10851 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10853 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10855 echo "${as_me:-configure}:10855: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10857 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
10859 echo "${as_me:-configure}:10859: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
10861 # The test/sample programs in the original tree link using rpath option.
10862 # Make it optional for packagers.
10863 if test -n "$LOCAL_LDFLAGS"
10865 echo "$as_me:10865: checking if you want to link sample programs with rpath option" >&5
10866 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
10868 # Check whether --enable-rpath-link or --disable-rpath-link was given.
10869 if test "${enable_rpath_link+set}" = set; then
10870 enableval="$enable_rpath_link"
10871 with_rpath_link=$enableval
10873 with_rpath_link=yes
10875 echo "$as_me:10875: result: $with_rpath_link" >&5
10876 echo "${ECHO_T}$with_rpath_link" >&6
10877 if test "$with_rpath_link" = no
10884 ###############################################################################
10886 ### use option --enable-broken-linker to force on use of broken-linker support
10887 echo "$as_me:10887: checking if you want broken-linker support code" >&5
10888 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10890 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10891 if test "${enable_broken_linker+set}" = set; then
10892 enableval="$enable_broken_linker"
10893 with_broken_linker=$enableval
10895 with_broken_linker=${BROKEN_LINKER:-no}
10897 echo "$as_me:10897: result: $with_broken_linker" >&5
10898 echo "${ECHO_T}$with_broken_linker" >&6
10901 if test "$with_broken_linker" = yes ; then
10902 cat >>confdefs.h <<\EOF
10903 #define BROKEN_LINKER 1
10907 elif test "$DFT_LWR_MODEL" = shared ; then
10908 case $cf_cv_system_name in
10910 cat >>confdefs.h <<\EOF
10911 #define BROKEN_LINKER 1
10915 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
10917 echo "${as_me:-configure}:10917: testing cygwin linker is broken anyway ..." 1>&5
10923 # Check to define _XOPEN_SOURCE "automatically"
10925 echo "$as_me:10925: checking if the POSIX test-macros are already defined" >&5
10926 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10927 if test "${cf_cv_posix_visible+set}" = set; then
10928 echo $ECHO_N "(cached) $ECHO_C" >&6
10931 cat >conftest.$ac_ext <<_ACEOF
10932 #line 10932 "configure"
10933 #include "confdefs.h"
10939 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10940 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10941 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10942 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10943 #error conflicting symbols found
10950 rm -f conftest.$ac_objext
10951 if { (eval echo "$as_me:10951: \"$ac_compile\"") >&5
10952 (eval $ac_compile) 2>&5
10954 echo "$as_me:10954: \$? = $ac_status" >&5
10955 (exit $ac_status); } &&
10956 { ac_try='test -s conftest.$ac_objext'
10957 { (eval echo "$as_me:10957: \"$ac_try\"") >&5
10958 (eval $ac_try) 2>&5
10960 echo "$as_me:10960: \$? = $ac_status" >&5
10961 (exit $ac_status); }; }; then
10962 cf_cv_posix_visible=no
10964 echo "$as_me: failed program was:" >&5
10965 cat conftest.$ac_ext >&5
10966 cf_cv_posix_visible=yes
10968 rm -f conftest.$ac_objext conftest.$ac_ext
10971 echo "$as_me:10971: result: $cf_cv_posix_visible" >&5
10972 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10974 if test "$cf_cv_posix_visible" = no; then
10976 cf_XOPEN_SOURCE=600
10977 cf_POSIX_C_SOURCE=199506L
10982 cf_xopen_source="-D_ALL_SOURCE"
10985 cf_XOPEN_SOURCE=600
10988 cf_xopen_source="-D_APPLE_C_SOURCE"
10991 cf_xopen_source="-D_DARWIN_C_SOURCE"
10994 (freebsd*|dragonfly*|midnightbsd*)
10995 # 5.x headers associate
10996 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10997 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10998 cf_POSIX_C_SOURCE=200112L
10999 cf_XOPEN_SOURCE=600
11000 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11003 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
11006 cf_xopen_source="-D_HPUX_SOURCE"
11009 cf_xopen_source="-D_SGI_SOURCE"
11012 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
11014 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
11016 echo "$as_me:11016: checking if this is the GNU C library" >&5
11017 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
11018 if test "${cf_cv_gnu_library+set}" = set; then
11019 echo $ECHO_N "(cached) $ECHO_C" >&6
11022 cat >conftest.$ac_ext <<_ACEOF
11023 #line 11023 "configure"
11024 #include "confdefs.h"
11025 #include <sys/types.h>
11030 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
11032 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
11035 # error not GNU C library
11041 rm -f conftest.$ac_objext
11042 if { (eval echo "$as_me:11042: \"$ac_compile\"") >&5
11043 (eval $ac_compile) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit $ac_status); } &&
11047 { ac_try='test -s conftest.$ac_objext'
11048 { (eval echo "$as_me:11048: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11051 echo "$as_me:11051: \$? = $ac_status" >&5
11052 (exit $ac_status); }; }; then
11053 cf_cv_gnu_library=yes
11055 echo "$as_me: failed program was:" >&5
11056 cat conftest.$ac_ext >&5
11057 cf_cv_gnu_library=no
11059 rm -f conftest.$ac_objext conftest.$ac_ext
11062 echo "$as_me:11062: result: $cf_cv_gnu_library" >&5
11063 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11065 if test x$cf_cv_gnu_library = xyes; then
11067 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11068 # was changed to help a little. newlib incorporated the change about 4
11070 echo "$as_me:11070: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11071 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11072 if test "${cf_cv_gnu_library_219+set}" = set; then
11073 echo $ECHO_N "(cached) $ECHO_C" >&6
11076 cf_save="$CPPFLAGS"
11078 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11079 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11081 cat >conftest.$ac_ext <<_ACEOF
11082 #line 11082 "configure"
11083 #include "confdefs.h"
11084 #include <sys/types.h>
11089 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11091 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11094 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11100 rm -f conftest.$ac_objext
11101 if { (eval echo "$as_me:11101: \"$ac_compile\"") >&5
11102 (eval $ac_compile) 2>&5
11104 echo "$as_me:11104: \$? = $ac_status" >&5
11105 (exit $ac_status); } &&
11106 { ac_try='test -s conftest.$ac_objext'
11107 { (eval echo "$as_me:11107: \"$ac_try\"") >&5
11108 (eval $ac_try) 2>&5
11110 echo "$as_me:11110: \$? = $ac_status" >&5
11111 (exit $ac_status); }; }; then
11112 cf_cv_gnu_library_219=yes
11114 echo "$as_me: failed program was:" >&5
11115 cat conftest.$ac_ext >&5
11116 cf_cv_gnu_library_219=no
11118 rm -f conftest.$ac_objext conftest.$ac_ext
11119 CPPFLAGS="$cf_save"
11122 echo "$as_me:11122: result: $cf_cv_gnu_library_219" >&5
11123 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
11125 if test "x$cf_cv_gnu_library_219" = xyes; then
11126 cf_save="$CPPFLAGS"
11127 echo "$as_me:11127: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
11128 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
11129 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
11130 echo $ECHO_N "(cached) $ECHO_C" >&6
11136 cf_new_extra_cppflags=
11138 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
11140 case $cf_fix_cppflags in
11142 case $cf_add_cflags in
11143 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11144 case $cf_add_cflags in
11146 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11148 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11149 && test -z "${cf_tst_cflags}" \
11150 && cf_fix_cppflags=yes
11152 if test $cf_fix_cppflags = yes ; then
11154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11158 elif test "${cf_tst_cflags}" = "\"'" ; then
11160 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11161 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11167 case "$CPPFLAGS" in
11171 case $cf_add_cflags in
11173 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11175 CPPFLAGS=`echo "$CPPFLAGS" | \
11176 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11177 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11182 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11183 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11190 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11191 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11198 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11199 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11201 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11203 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11204 && test -z "${cf_tst_cflags}" \
11205 && cf_fix_cppflags=no
11210 if test -n "$cf_new_cflags" ; then
11212 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11213 CFLAGS="${CFLAGS}$cf_new_cflags"
11217 if test -n "$cf_new_cppflags" ; then
11219 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11220 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11224 if test -n "$cf_new_extra_cppflags" ; then
11226 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11227 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11231 cat >conftest.$ac_ext <<_ACEOF
11232 #line 11232 "configure"
11233 #include "confdefs.h"
11235 #include <limits.h>
11236 #include <sys/types.h>
11242 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11245 # error GNU C library is too old
11251 rm -f conftest.$ac_objext
11252 if { (eval echo "$as_me:11252: \"$ac_compile\"") >&5
11253 (eval $ac_compile) 2>&5
11255 echo "$as_me:11255: \$? = $ac_status" >&5
11256 (exit $ac_status); } &&
11257 { ac_try='test -s conftest.$ac_objext'
11258 { (eval echo "$as_me:11258: \"$ac_try\"") >&5
11259 (eval $ac_try) 2>&5
11261 echo "$as_me:11261: \$? = $ac_status" >&5
11262 (exit $ac_status); }; }; then
11263 cf_cv_gnu_dftsrc_219=yes
11265 echo "$as_me: failed program was:" >&5
11266 cat conftest.$ac_ext >&5
11267 cf_cv_gnu_dftsrc_219=no
11269 rm -f conftest.$ac_objext conftest.$ac_ext
11272 echo "$as_me:11272: result: $cf_cv_gnu_dftsrc_219" >&5
11273 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11274 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11276 cf_cv_gnu_dftsrc_219=maybe
11279 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11281 echo "$as_me:11281: checking if we must define _GNU_SOURCE" >&5
11282 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11283 if test "${cf_cv_gnu_source+set}" = set; then
11284 echo $ECHO_N "(cached) $ECHO_C" >&6
11287 cat >conftest.$ac_ext <<_ACEOF
11288 #line 11288 "configure"
11289 #include "confdefs.h"
11290 #include <sys/types.h>
11295 #ifndef _XOPEN_SOURCE
11296 #error expected _XOPEN_SOURCE to be defined
11302 rm -f conftest.$ac_objext
11303 if { (eval echo "$as_me:11303: \"$ac_compile\"") >&5
11304 (eval $ac_compile) 2>&5
11306 echo "$as_me:11306: \$? = $ac_status" >&5
11307 (exit $ac_status); } &&
11308 { ac_try='test -s conftest.$ac_objext'
11309 { (eval echo "$as_me:11309: \"$ac_try\"") >&5
11310 (eval $ac_try) 2>&5
11312 echo "$as_me:11312: \$? = $ac_status" >&5
11313 (exit $ac_status); }; }; then
11314 cf_cv_gnu_source=no
11316 echo "$as_me: failed program was:" >&5
11317 cat conftest.$ac_ext >&5
11318 cf_save="$CPPFLAGS"
11323 cf_new_extra_cppflags=
11325 for cf_add_cflags in -D_GNU_SOURCE
11327 case $cf_fix_cppflags in
11329 case $cf_add_cflags in
11330 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11331 case $cf_add_cflags in
11333 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11335 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11336 && test -z "${cf_tst_cflags}" \
11337 && cf_fix_cppflags=yes
11339 if test $cf_fix_cppflags = yes ; then
11341 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11342 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11345 elif test "${cf_tst_cflags}" = "\"'" ; then
11347 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11348 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11354 case "$CPPFLAGS" in
11358 case $cf_add_cflags in
11360 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11362 CPPFLAGS=`echo "$CPPFLAGS" | \
11363 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11364 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11369 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11370 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11377 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11378 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11385 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11386 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11388 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11390 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11391 && test -z "${cf_tst_cflags}" \
11392 && cf_fix_cppflags=no
11397 if test -n "$cf_new_cflags" ; then
11399 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11400 CFLAGS="${CFLAGS}$cf_new_cflags"
11404 if test -n "$cf_new_cppflags" ; then
11406 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11407 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11411 if test -n "$cf_new_extra_cppflags" ; then
11413 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11414 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11418 cat >conftest.$ac_ext <<_ACEOF
11419 #line 11419 "configure"
11420 #include "confdefs.h"
11421 #include <sys/types.h>
11426 #ifdef _XOPEN_SOURCE
11427 #error expected _XOPEN_SOURCE to be undefined
11433 rm -f conftest.$ac_objext
11434 if { (eval echo "$as_me:11434: \"$ac_compile\"") >&5
11435 (eval $ac_compile) 2>&5
11437 echo "$as_me:11437: \$? = $ac_status" >&5
11438 (exit $ac_status); } &&
11439 { ac_try='test -s conftest.$ac_objext'
11440 { (eval echo "$as_me:11440: \"$ac_try\"") >&5
11441 (eval $ac_try) 2>&5
11443 echo "$as_me:11443: \$? = $ac_status" >&5
11444 (exit $ac_status); }; }; then
11445 cf_cv_gnu_source=no
11447 echo "$as_me: failed program was:" >&5
11448 cat conftest.$ac_ext >&5
11449 cf_cv_gnu_source=yes
11451 rm -f conftest.$ac_objext conftest.$ac_ext
11452 CPPFLAGS="$cf_save"
11455 rm -f conftest.$ac_objext conftest.$ac_ext
11458 echo "$as_me:11458: result: $cf_cv_gnu_source" >&5
11459 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11461 if test "$cf_cv_gnu_source" = yes
11463 echo "$as_me:11463: checking if we should also define _DEFAULT_SOURCE" >&5
11464 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11465 if test "${cf_cv_default_source+set}" = set; then
11466 echo $ECHO_N "(cached) $ECHO_C" >&6
11469 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11470 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11472 cat >conftest.$ac_ext <<_ACEOF
11473 #line 11473 "configure"
11474 #include "confdefs.h"
11475 #include <sys/types.h>
11480 #ifdef _DEFAULT_SOURCE
11481 #error expected _DEFAULT_SOURCE to be undefined
11487 rm -f conftest.$ac_objext
11488 if { (eval echo "$as_me:11488: \"$ac_compile\"") >&5
11489 (eval $ac_compile) 2>&5
11491 echo "$as_me:11491: \$? = $ac_status" >&5
11492 (exit $ac_status); } &&
11493 { ac_try='test -s conftest.$ac_objext'
11494 { (eval echo "$as_me:11494: \"$ac_try\"") >&5
11495 (eval $ac_try) 2>&5
11497 echo "$as_me:11497: \$? = $ac_status" >&5
11498 (exit $ac_status); }; }; then
11499 cf_cv_default_source=no
11501 echo "$as_me: failed program was:" >&5
11502 cat conftest.$ac_ext >&5
11503 cf_cv_default_source=yes
11505 rm -f conftest.$ac_objext conftest.$ac_ext
11508 echo "$as_me:11508: result: $cf_cv_default_source" >&5
11509 echo "${ECHO_T}$cf_cv_default_source" >&6
11510 if test "$cf_cv_default_source" = yes
11513 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11514 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11524 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11527 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11530 if test "$cf_cv_posix_visible" = no; then
11532 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11534 cf_save_CFLAGS="$CFLAGS"
11535 cf_save_CPPFLAGS="$CPPFLAGS"
11537 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11538 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11539 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11541 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11542 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11543 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11545 echo "$as_me:11545: checking if we should define _POSIX_C_SOURCE" >&5
11546 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11547 if test "${cf_cv_posix_c_source+set}" = set; then
11548 echo $ECHO_N "(cached) $ECHO_C" >&6
11551 echo "${as_me:-configure}:11551: testing if the symbol is already defined go no further ..." 1>&5
11553 cat >conftest.$ac_ext <<_ACEOF
11554 #line 11554 "configure"
11555 #include "confdefs.h"
11556 #include <sys/types.h>
11561 #ifndef _POSIX_C_SOURCE
11568 rm -f conftest.$ac_objext
11569 if { (eval echo "$as_me:11569: \"$ac_compile\"") >&5
11570 (eval $ac_compile) 2>&5
11572 echo "$as_me:11572: \$? = $ac_status" >&5
11573 (exit $ac_status); } &&
11574 { ac_try='test -s conftest.$ac_objext'
11575 { (eval echo "$as_me:11575: \"$ac_try\"") >&5
11576 (eval $ac_try) 2>&5
11578 echo "$as_me:11578: \$? = $ac_status" >&5
11579 (exit $ac_status); }; }; then
11580 cf_cv_posix_c_source=no
11582 echo "$as_me: failed program was:" >&5
11583 cat conftest.$ac_ext >&5
11584 cf_want_posix_source=no
11585 case .$cf_POSIX_C_SOURCE in
11587 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11590 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11591 cf_want_posix_source=yes
11594 cf_want_posix_source=yes
11597 if test "$cf_want_posix_source" = yes ; then
11598 cat >conftest.$ac_ext <<_ACEOF
11599 #line 11599 "configure"
11600 #include "confdefs.h"
11601 #include <sys/types.h>
11606 #ifdef _POSIX_SOURCE
11613 rm -f conftest.$ac_objext
11614 if { (eval echo "$as_me:11614: \"$ac_compile\"") >&5
11615 (eval $ac_compile) 2>&5
11617 echo "$as_me:11617: \$? = $ac_status" >&5
11618 (exit $ac_status); } &&
11619 { ac_try='test -s conftest.$ac_objext'
11620 { (eval echo "$as_me:11620: \"$ac_try\"") >&5
11621 (eval $ac_try) 2>&5
11623 echo "$as_me:11623: \$? = $ac_status" >&5
11624 (exit $ac_status); }; }; then
11627 echo "$as_me: failed program was:" >&5
11628 cat conftest.$ac_ext >&5
11629 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11631 rm -f conftest.$ac_objext conftest.$ac_ext
11634 echo "${as_me:-configure}:11634: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11636 CFLAGS="$cf_trim_CFLAGS"
11637 CPPFLAGS="$cf_trim_CPPFLAGS"
11639 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11640 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11642 echo "${as_me:-configure}:11642: testing if the second compile does not leave our definition intact error ..." 1>&5
11644 cat >conftest.$ac_ext <<_ACEOF
11645 #line 11645 "configure"
11646 #include "confdefs.h"
11647 #include <sys/types.h>
11652 #ifndef _POSIX_C_SOURCE
11659 rm -f conftest.$ac_objext
11660 if { (eval echo "$as_me:11660: \"$ac_compile\"") >&5
11661 (eval $ac_compile) 2>&5
11663 echo "$as_me:11663: \$? = $ac_status" >&5
11664 (exit $ac_status); } &&
11665 { ac_try='test -s conftest.$ac_objext'
11666 { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667 (eval $ac_try) 2>&5
11669 echo "$as_me:11669: \$? = $ac_status" >&5
11670 (exit $ac_status); }; }; then
11673 echo "$as_me: failed program was:" >&5
11674 cat conftest.$ac_ext >&5
11675 cf_cv_posix_c_source=no
11677 rm -f conftest.$ac_objext conftest.$ac_ext
11678 CFLAGS="$cf_save_CFLAGS"
11679 CPPFLAGS="$cf_save_CPPFLAGS"
11682 rm -f conftest.$ac_objext conftest.$ac_ext
11685 echo "$as_me:11685: result: $cf_cv_posix_c_source" >&5
11686 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11688 if test "$cf_cv_posix_c_source" != no ; then
11689 CFLAGS="$cf_trim_CFLAGS"
11690 CPPFLAGS="$cf_trim_CPPFLAGS"
11695 cf_new_extra_cppflags=
11697 for cf_add_cflags in $cf_cv_posix_c_source
11699 case $cf_fix_cppflags in
11701 case $cf_add_cflags in
11702 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11703 case $cf_add_cflags in
11705 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11707 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11708 && test -z "${cf_tst_cflags}" \
11709 && cf_fix_cppflags=yes
11711 if test $cf_fix_cppflags = yes ; then
11713 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11714 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11717 elif test "${cf_tst_cflags}" = "\"'" ; then
11719 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11720 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11726 case "$CPPFLAGS" in
11730 case $cf_add_cflags in
11732 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11734 CPPFLAGS=`echo "$CPPFLAGS" | \
11735 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11736 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11741 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11742 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11749 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11750 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11757 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11758 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11760 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11762 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11763 && test -z "${cf_tst_cflags}" \
11764 && cf_fix_cppflags=no
11769 if test -n "$cf_new_cflags" ; then
11771 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11772 CFLAGS="${CFLAGS}$cf_new_cflags"
11776 if test -n "$cf_new_cppflags" ; then
11778 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11779 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11783 if test -n "$cf_new_extra_cppflags" ; then
11785 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11786 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11792 fi # cf_cv_posix_visible
11796 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11799 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11800 cf_xopen_source="-D_BSD_SOURCE"
11801 cf_XOPEN_SOURCE=600
11804 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11807 cf_xopen_source="-D_OSF_SOURCE"
11810 cf_xopen_source="-D_QNX_SOURCE"
11813 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11816 cf_xopen_source="-D__EXTENSIONS__"
11817 cf_cv_xopen_source=broken
11819 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11825 echo "$as_me:11825: checking if we should define _XOPEN_SOURCE" >&5
11826 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11827 if test "${cf_cv_xopen_source+set}" = set; then
11828 echo $ECHO_N "(cached) $ECHO_C" >&6
11831 cat >conftest.$ac_ext <<_ACEOF
11832 #line 11832 "configure"
11833 #include "confdefs.h"
11835 #include <stdlib.h>
11836 #include <string.h>
11837 #include <sys/types.h>
11843 #ifndef _XOPEN_SOURCE
11850 rm -f conftest.$ac_objext
11851 if { (eval echo "$as_me:11851: \"$ac_compile\"") >&5
11852 (eval $ac_compile) 2>&5
11854 echo "$as_me:11854: \$? = $ac_status" >&5
11855 (exit $ac_status); } &&
11856 { ac_try='test -s conftest.$ac_objext'
11857 { (eval echo "$as_me:11857: \"$ac_try\"") >&5
11858 (eval $ac_try) 2>&5
11860 echo "$as_me:11860: \$? = $ac_status" >&5
11861 (exit $ac_status); }; }; then
11862 cf_cv_xopen_source=no
11864 echo "$as_me: failed program was:" >&5
11865 cat conftest.$ac_ext >&5
11866 cf_save="$CPPFLAGS"
11868 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11869 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11871 cat >conftest.$ac_ext <<_ACEOF
11872 #line 11872 "configure"
11873 #include "confdefs.h"
11875 #include <stdlib.h>
11876 #include <string.h>
11877 #include <sys/types.h>
11883 #ifdef _XOPEN_SOURCE
11890 rm -f conftest.$ac_objext
11891 if { (eval echo "$as_me:11891: \"$ac_compile\"") >&5
11892 (eval $ac_compile) 2>&5
11894 echo "$as_me:11894: \$? = $ac_status" >&5
11895 (exit $ac_status); } &&
11896 { ac_try='test -s conftest.$ac_objext'
11897 { (eval echo "$as_me:11897: \"$ac_try\"") >&5
11898 (eval $ac_try) 2>&5
11900 echo "$as_me:11900: \$? = $ac_status" >&5
11901 (exit $ac_status); }; }; then
11902 cf_cv_xopen_source=no
11904 echo "$as_me: failed program was:" >&5
11905 cat conftest.$ac_ext >&5
11906 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11908 rm -f conftest.$ac_objext conftest.$ac_ext
11909 CPPFLAGS="$cf_save"
11912 rm -f conftest.$ac_objext conftest.$ac_ext
11915 echo "$as_me:11915: result: $cf_cv_xopen_source" >&5
11916 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11918 if test "$cf_cv_xopen_source" != no ; then
11920 CFLAGS=`echo "$CFLAGS" | \
11921 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11922 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11924 CPPFLAGS=`echo "$CPPFLAGS" | \
11925 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11926 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11928 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11933 cf_new_extra_cppflags=
11935 for cf_add_cflags in $cf_temp_xopen_source
11937 case $cf_fix_cppflags in
11939 case $cf_add_cflags in
11940 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11941 case $cf_add_cflags in
11943 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11946 && test -z "${cf_tst_cflags}" \
11947 && cf_fix_cppflags=yes
11949 if test $cf_fix_cppflags = yes ; then
11951 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11952 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11955 elif test "${cf_tst_cflags}" = "\"'" ; then
11957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11964 case "$CPPFLAGS" in
11968 case $cf_add_cflags in
11970 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11972 CPPFLAGS=`echo "$CPPFLAGS" | \
11973 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11974 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11979 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11980 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11987 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11988 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11995 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11996 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11998 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12000 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12001 && test -z "${cf_tst_cflags}" \
12002 && cf_fix_cppflags=no
12007 if test -n "$cf_new_cflags" ; then
12009 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12010 CFLAGS="${CFLAGS}$cf_new_cflags"
12014 if test -n "$cf_new_cppflags" ; then
12016 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12017 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12021 if test -n "$cf_new_extra_cppflags" ; then
12023 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12024 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12030 if test "$cf_cv_posix_visible" = no; then
12032 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12034 cf_save_CFLAGS="$CFLAGS"
12035 cf_save_CPPFLAGS="$CPPFLAGS"
12037 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12038 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12039 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12041 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12042 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12043 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12045 echo "$as_me:12045: checking if we should define _POSIX_C_SOURCE" >&5
12046 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12047 if test "${cf_cv_posix_c_source+set}" = set; then
12048 echo $ECHO_N "(cached) $ECHO_C" >&6
12051 echo "${as_me:-configure}:12051: testing if the symbol is already defined go no further ..." 1>&5
12053 cat >conftest.$ac_ext <<_ACEOF
12054 #line 12054 "configure"
12055 #include "confdefs.h"
12056 #include <sys/types.h>
12061 #ifndef _POSIX_C_SOURCE
12068 rm -f conftest.$ac_objext
12069 if { (eval echo "$as_me:12069: \"$ac_compile\"") >&5
12070 (eval $ac_compile) 2>&5
12072 echo "$as_me:12072: \$? = $ac_status" >&5
12073 (exit $ac_status); } &&
12074 { ac_try='test -s conftest.$ac_objext'
12075 { (eval echo "$as_me:12075: \"$ac_try\"") >&5
12076 (eval $ac_try) 2>&5
12078 echo "$as_me:12078: \$? = $ac_status" >&5
12079 (exit $ac_status); }; }; then
12080 cf_cv_posix_c_source=no
12082 echo "$as_me: failed program was:" >&5
12083 cat conftest.$ac_ext >&5
12084 cf_want_posix_source=no
12085 case .$cf_POSIX_C_SOURCE in
12087 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12090 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12091 cf_want_posix_source=yes
12094 cf_want_posix_source=yes
12097 if test "$cf_want_posix_source" = yes ; then
12098 cat >conftest.$ac_ext <<_ACEOF
12099 #line 12099 "configure"
12100 #include "confdefs.h"
12101 #include <sys/types.h>
12106 #ifdef _POSIX_SOURCE
12113 rm -f conftest.$ac_objext
12114 if { (eval echo "$as_me:12114: \"$ac_compile\"") >&5
12115 (eval $ac_compile) 2>&5
12117 echo "$as_me:12117: \$? = $ac_status" >&5
12118 (exit $ac_status); } &&
12119 { ac_try='test -s conftest.$ac_objext'
12120 { (eval echo "$as_me:12120: \"$ac_try\"") >&5
12121 (eval $ac_try) 2>&5
12123 echo "$as_me:12123: \$? = $ac_status" >&5
12124 (exit $ac_status); }; }; then
12127 echo "$as_me: failed program was:" >&5
12128 cat conftest.$ac_ext >&5
12129 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12131 rm -f conftest.$ac_objext conftest.$ac_ext
12134 echo "${as_me:-configure}:12134: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12136 CFLAGS="$cf_trim_CFLAGS"
12137 CPPFLAGS="$cf_trim_CPPFLAGS"
12139 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12140 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12142 echo "${as_me:-configure}:12142: testing if the second compile does not leave our definition intact error ..." 1>&5
12144 cat >conftest.$ac_ext <<_ACEOF
12145 #line 12145 "configure"
12146 #include "confdefs.h"
12147 #include <sys/types.h>
12152 #ifndef _POSIX_C_SOURCE
12159 rm -f conftest.$ac_objext
12160 if { (eval echo "$as_me:12160: \"$ac_compile\"") >&5
12161 (eval $ac_compile) 2>&5
12163 echo "$as_me:12163: \$? = $ac_status" >&5
12164 (exit $ac_status); } &&
12165 { ac_try='test -s conftest.$ac_objext'
12166 { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167 (eval $ac_try) 2>&5
12169 echo "$as_me:12169: \$? = $ac_status" >&5
12170 (exit $ac_status); }; }; then
12173 echo "$as_me: failed program was:" >&5
12174 cat conftest.$ac_ext >&5
12175 cf_cv_posix_c_source=no
12177 rm -f conftest.$ac_objext conftest.$ac_ext
12178 CFLAGS="$cf_save_CFLAGS"
12179 CPPFLAGS="$cf_save_CPPFLAGS"
12182 rm -f conftest.$ac_objext conftest.$ac_ext
12185 echo "$as_me:12185: result: $cf_cv_posix_c_source" >&5
12186 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12188 if test "$cf_cv_posix_c_source" != no ; then
12189 CFLAGS="$cf_trim_CFLAGS"
12190 CPPFLAGS="$cf_trim_CPPFLAGS"
12195 cf_new_extra_cppflags=
12197 for cf_add_cflags in $cf_cv_posix_c_source
12199 case $cf_fix_cppflags in
12201 case $cf_add_cflags in
12202 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12203 case $cf_add_cflags in
12205 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12207 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12208 && test -z "${cf_tst_cflags}" \
12209 && cf_fix_cppflags=yes
12211 if test $cf_fix_cppflags = yes ; then
12213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12217 elif test "${cf_tst_cflags}" = "\"'" ; then
12219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12226 case "$CPPFLAGS" in
12230 case $cf_add_cflags in
12232 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12234 CPPFLAGS=`echo "$CPPFLAGS" | \
12235 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12236 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12241 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12242 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12249 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12250 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12257 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12258 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12260 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12262 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12263 && test -z "${cf_tst_cflags}" \
12264 && cf_fix_cppflags=no
12269 if test -n "$cf_new_cflags" ; then
12271 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12272 CFLAGS="${CFLAGS}$cf_new_cflags"
12276 if test -n "$cf_new_cppflags" ; then
12278 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12279 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12283 if test -n "$cf_new_extra_cppflags" ; then
12285 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12286 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12292 fi # cf_cv_posix_visible
12297 if test -n "$cf_xopen_source" ; then
12302 cf_new_extra_cppflags=
12304 for cf_add_cflags in $cf_xopen_source
12306 case $cf_fix_cppflags in
12308 case $cf_add_cflags in
12309 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12310 case $cf_add_cflags in
12312 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12314 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12315 && test -z "${cf_tst_cflags}" \
12316 && cf_fix_cppflags=yes
12318 if test $cf_fix_cppflags = yes ; then
12320 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12321 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12324 elif test "${cf_tst_cflags}" = "\"'" ; then
12326 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12327 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12333 case "$CPPFLAGS" in
12337 case $cf_add_cflags in
12339 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12341 CPPFLAGS=`echo "$CPPFLAGS" | \
12342 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12343 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12348 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12349 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12356 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12357 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12364 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12365 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12367 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12369 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12370 && test -z "${cf_tst_cflags}" \
12371 && cf_fix_cppflags=no
12376 if test -n "$cf_new_cflags" ; then
12377 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12379 echo "${as_me:-configure}:12379: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12381 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12382 CFLAGS="${CFLAGS}$cf_new_cflags"
12386 if test -n "$cf_new_cppflags" ; then
12387 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12389 echo "${as_me:-configure}:12389: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12391 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12392 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12396 if test -n "$cf_new_extra_cppflags" ; then
12397 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12399 echo "${as_me:-configure}:12399: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12401 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12402 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12408 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12409 echo "$as_me:12409: checking if _XOPEN_SOURCE really is set" >&5
12410 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12411 cat >conftest.$ac_ext <<_ACEOF
12412 #line 12412 "configure"
12413 #include "confdefs.h"
12414 #include <stdlib.h>
12419 #ifndef _XOPEN_SOURCE
12426 rm -f conftest.$ac_objext
12427 if { (eval echo "$as_me:12427: \"$ac_compile\"") >&5
12428 (eval $ac_compile) 2>&5
12430 echo "$as_me:12430: \$? = $ac_status" >&5
12431 (exit $ac_status); } &&
12432 { ac_try='test -s conftest.$ac_objext'
12433 { (eval echo "$as_me:12433: \"$ac_try\"") >&5
12434 (eval $ac_try) 2>&5
12436 echo "$as_me:12436: \$? = $ac_status" >&5
12437 (exit $ac_status); }; }; then
12438 cf_XOPEN_SOURCE_set=yes
12440 echo "$as_me: failed program was:" >&5
12441 cat conftest.$ac_ext >&5
12442 cf_XOPEN_SOURCE_set=no
12444 rm -f conftest.$ac_objext conftest.$ac_ext
12445 echo "$as_me:12445: result: $cf_XOPEN_SOURCE_set" >&5
12446 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12447 if test $cf_XOPEN_SOURCE_set = yes
12449 cat >conftest.$ac_ext <<_ACEOF
12450 #line 12450 "configure"
12451 #include "confdefs.h"
12452 #include <stdlib.h>
12457 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12464 rm -f conftest.$ac_objext
12465 if { (eval echo "$as_me:12465: \"$ac_compile\"") >&5
12466 (eval $ac_compile) 2>&5
12468 echo "$as_me:12468: \$? = $ac_status" >&5
12469 (exit $ac_status); } &&
12470 { ac_try='test -s conftest.$ac_objext'
12471 { (eval echo "$as_me:12471: \"$ac_try\"") >&5
12472 (eval $ac_try) 2>&5
12474 echo "$as_me:12474: \$? = $ac_status" >&5
12475 (exit $ac_status); }; }; then
12476 cf_XOPEN_SOURCE_set_ok=yes
12478 echo "$as_me: failed program was:" >&5
12479 cat conftest.$ac_ext >&5
12480 cf_XOPEN_SOURCE_set_ok=no
12482 rm -f conftest.$ac_objext conftest.$ac_ext
12483 if test $cf_XOPEN_SOURCE_set_ok = no
12485 { echo "$as_me:12485: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12486 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12490 echo "$as_me:12490: checking if we should define _XOPEN_SOURCE" >&5
12491 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12492 if test "${cf_cv_xopen_source+set}" = set; then
12493 echo $ECHO_N "(cached) $ECHO_C" >&6
12496 cat >conftest.$ac_ext <<_ACEOF
12497 #line 12497 "configure"
12498 #include "confdefs.h"
12500 #include <stdlib.h>
12501 #include <string.h>
12502 #include <sys/types.h>
12508 #ifndef _XOPEN_SOURCE
12515 rm -f conftest.$ac_objext
12516 if { (eval echo "$as_me:12516: \"$ac_compile\"") >&5
12517 (eval $ac_compile) 2>&5
12519 echo "$as_me:12519: \$? = $ac_status" >&5
12520 (exit $ac_status); } &&
12521 { ac_try='test -s conftest.$ac_objext'
12522 { (eval echo "$as_me:12522: \"$ac_try\"") >&5
12523 (eval $ac_try) 2>&5
12525 echo "$as_me:12525: \$? = $ac_status" >&5
12526 (exit $ac_status); }; }; then
12527 cf_cv_xopen_source=no
12529 echo "$as_me: failed program was:" >&5
12530 cat conftest.$ac_ext >&5
12531 cf_save="$CPPFLAGS"
12533 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12534 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12536 cat >conftest.$ac_ext <<_ACEOF
12537 #line 12537 "configure"
12538 #include "confdefs.h"
12540 #include <stdlib.h>
12541 #include <string.h>
12542 #include <sys/types.h>
12548 #ifdef _XOPEN_SOURCE
12555 rm -f conftest.$ac_objext
12556 if { (eval echo "$as_me:12556: \"$ac_compile\"") >&5
12557 (eval $ac_compile) 2>&5
12559 echo "$as_me:12559: \$? = $ac_status" >&5
12560 (exit $ac_status); } &&
12561 { ac_try='test -s conftest.$ac_objext'
12562 { (eval echo "$as_me:12562: \"$ac_try\"") >&5
12563 (eval $ac_try) 2>&5
12565 echo "$as_me:12565: \$? = $ac_status" >&5
12566 (exit $ac_status); }; }; then
12567 cf_cv_xopen_source=no
12569 echo "$as_me: failed program was:" >&5
12570 cat conftest.$ac_ext >&5
12571 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12573 rm -f conftest.$ac_objext conftest.$ac_ext
12574 CPPFLAGS="$cf_save"
12577 rm -f conftest.$ac_objext conftest.$ac_ext
12580 echo "$as_me:12580: result: $cf_cv_xopen_source" >&5
12581 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12583 if test "$cf_cv_xopen_source" != no ; then
12585 CFLAGS=`echo "$CFLAGS" | \
12586 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12587 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12589 CPPFLAGS=`echo "$CPPFLAGS" | \
12590 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12591 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12593 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12598 cf_new_extra_cppflags=
12600 for cf_add_cflags in $cf_temp_xopen_source
12602 case $cf_fix_cppflags in
12604 case $cf_add_cflags in
12605 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12606 case $cf_add_cflags in
12608 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12611 && test -z "${cf_tst_cflags}" \
12612 && cf_fix_cppflags=yes
12614 if test $cf_fix_cppflags = yes ; then
12616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12620 elif test "${cf_tst_cflags}" = "\"'" ; then
12622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12629 case "$CPPFLAGS" in
12633 case $cf_add_cflags in
12635 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12637 CPPFLAGS=`echo "$CPPFLAGS" | \
12638 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12639 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12644 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12645 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12652 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12653 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12663 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12666 && test -z "${cf_tst_cflags}" \
12667 && cf_fix_cppflags=no
12672 if test -n "$cf_new_cflags" ; then
12674 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12675 CFLAGS="${CFLAGS}$cf_new_cflags"
12679 if test -n "$cf_new_cppflags" ; then
12681 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12682 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12686 if test -n "$cf_new_extra_cppflags" ; then
12688 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12689 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12697 fi # cf_cv_posix_visible
12699 # Check whether --enable-largefile or --disable-largefile was given.
12700 if test "${enable_largefile+set}" = set; then
12701 enableval="$enable_largefile"
12704 if test "$enable_largefile" != no; then
12706 echo "$as_me:12706: checking for special C compiler options needed for large files" >&5
12707 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12708 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12709 echo $ECHO_N "(cached) $ECHO_C" >&6
12711 ac_cv_sys_largefile_CC=no
12712 if test "$GCC" != yes; then
12715 # IRIX 6.2 and later do not support large files by default,
12716 # so use the C compiler's -n32 option if that helps.
12717 cat >conftest.$ac_ext <<_ACEOF
12718 #line 12718 "configure"
12719 #include "confdefs.h"
12720 #include <sys/types.h>
12721 /* Check that off_t can represent 2**63 - 1 correctly.
12722 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12723 since some C++ compilers masquerading as C compilers
12724 incorrectly reject 9223372036854775807. */
12725 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12726 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12727 && LARGE_OFF_T % 2147483647 == 1)
12737 rm -f conftest.$ac_objext
12738 if { (eval echo "$as_me:12738: \"$ac_compile\"") >&5
12739 (eval $ac_compile) 2>&5
12741 echo "$as_me:12741: \$? = $ac_status" >&5
12742 (exit $ac_status); } &&
12743 { ac_try='test -s conftest.$ac_objext'
12744 { (eval echo "$as_me:12744: \"$ac_try\"") >&5
12745 (eval $ac_try) 2>&5
12747 echo "$as_me:12747: \$? = $ac_status" >&5
12748 (exit $ac_status); }; }; then
12751 echo "$as_me: failed program was:" >&5
12752 cat conftest.$ac_ext >&5
12754 rm -f conftest.$ac_objext
12756 rm -f conftest.$ac_objext
12757 if { (eval echo "$as_me:12757: \"$ac_compile\"") >&5
12758 (eval $ac_compile) 2>&5
12760 echo "$as_me:12760: \$? = $ac_status" >&5
12761 (exit $ac_status); } &&
12762 { ac_try='test -s conftest.$ac_objext'
12763 { (eval echo "$as_me:12763: \"$ac_try\"") >&5
12764 (eval $ac_try) 2>&5
12766 echo "$as_me:12766: \$? = $ac_status" >&5
12767 (exit $ac_status); }; }; then
12768 ac_cv_sys_largefile_CC=' -n32'; break
12770 echo "$as_me: failed program was:" >&5
12771 cat conftest.$ac_ext >&5
12773 rm -f conftest.$ac_objext
12777 rm -f conftest.$ac_ext
12780 echo "$as_me:12780: result: $ac_cv_sys_largefile_CC" >&5
12781 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12782 if test "$ac_cv_sys_largefile_CC" != no; then
12783 CC=$CC$ac_cv_sys_largefile_CC
12786 echo "$as_me:12786: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12787 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12788 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12789 echo $ECHO_N "(cached) $ECHO_C" >&6
12792 ac_cv_sys_file_offset_bits=no
12793 cat >conftest.$ac_ext <<_ACEOF
12794 #line 12794 "configure"
12795 #include "confdefs.h"
12796 #include <sys/types.h>
12797 /* Check that off_t can represent 2**63 - 1 correctly.
12798 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12799 since some C++ compilers masquerading as C compilers
12800 incorrectly reject 9223372036854775807. */
12801 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12802 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12803 && LARGE_OFF_T % 2147483647 == 1)
12813 rm -f conftest.$ac_objext
12814 if { (eval echo "$as_me:12814: \"$ac_compile\"") >&5
12815 (eval $ac_compile) 2>&5
12817 echo "$as_me:12817: \$? = $ac_status" >&5
12818 (exit $ac_status); } &&
12819 { ac_try='test -s conftest.$ac_objext'
12820 { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821 (eval $ac_try) 2>&5
12823 echo "$as_me:12823: \$? = $ac_status" >&5
12824 (exit $ac_status); }; }; then
12827 echo "$as_me: failed program was:" >&5
12828 cat conftest.$ac_ext >&5
12830 rm -f conftest.$ac_objext conftest.$ac_ext
12831 cat >conftest.$ac_ext <<_ACEOF
12832 #line 12832 "configure"
12833 #include "confdefs.h"
12834 #define _FILE_OFFSET_BITS 64
12835 #include <sys/types.h>
12836 /* Check that off_t can represent 2**63 - 1 correctly.
12837 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12838 since some C++ compilers masquerading as C compilers
12839 incorrectly reject 9223372036854775807. */
12840 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12841 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12842 && LARGE_OFF_T % 2147483647 == 1)
12852 rm -f conftest.$ac_objext
12853 if { (eval echo "$as_me:12853: \"$ac_compile\"") >&5
12854 (eval $ac_compile) 2>&5
12856 echo "$as_me:12856: \$? = $ac_status" >&5
12857 (exit $ac_status); } &&
12858 { ac_try='test -s conftest.$ac_objext'
12859 { (eval echo "$as_me:12859: \"$ac_try\"") >&5
12860 (eval $ac_try) 2>&5
12862 echo "$as_me:12862: \$? = $ac_status" >&5
12863 (exit $ac_status); }; }; then
12864 ac_cv_sys_file_offset_bits=64; break
12866 echo "$as_me: failed program was:" >&5
12867 cat conftest.$ac_ext >&5
12869 rm -f conftest.$ac_objext conftest.$ac_ext
12873 echo "$as_me:12873: result: $ac_cv_sys_file_offset_bits" >&5
12874 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12875 if test "$ac_cv_sys_file_offset_bits" != no; then
12877 cat >>confdefs.h <<EOF
12878 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12883 echo "$as_me:12883: checking for _LARGE_FILES value needed for large files" >&5
12884 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12885 if test "${ac_cv_sys_large_files+set}" = set; then
12886 echo $ECHO_N "(cached) $ECHO_C" >&6
12889 ac_cv_sys_large_files=no
12890 cat >conftest.$ac_ext <<_ACEOF
12891 #line 12891 "configure"
12892 #include "confdefs.h"
12893 #include <sys/types.h>
12894 /* Check that off_t can represent 2**63 - 1 correctly.
12895 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12896 since some C++ compilers masquerading as C compilers
12897 incorrectly reject 9223372036854775807. */
12898 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12899 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12900 && LARGE_OFF_T % 2147483647 == 1)
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912 (eval $ac_compile) 2>&5
12914 echo "$as_me:12914: \$? = $ac_status" >&5
12915 (exit $ac_status); } &&
12916 { ac_try='test -s conftest.$ac_objext'
12917 { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918 (eval $ac_try) 2>&5
12920 echo "$as_me:12920: \$? = $ac_status" >&5
12921 (exit $ac_status); }; }; then
12924 echo "$as_me: failed program was:" >&5
12925 cat conftest.$ac_ext >&5
12927 rm -f conftest.$ac_objext conftest.$ac_ext
12928 cat >conftest.$ac_ext <<_ACEOF
12929 #line 12929 "configure"
12930 #include "confdefs.h"
12931 #define _LARGE_FILES 1
12932 #include <sys/types.h>
12933 /* Check that off_t can represent 2**63 - 1 correctly.
12934 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12935 since some C++ compilers masquerading as C compilers
12936 incorrectly reject 9223372036854775807. */
12937 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12938 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12939 && LARGE_OFF_T % 2147483647 == 1)
12949 rm -f conftest.$ac_objext
12950 if { (eval echo "$as_me:12950: \"$ac_compile\"") >&5
12951 (eval $ac_compile) 2>&5
12953 echo "$as_me:12953: \$? = $ac_status" >&5
12954 (exit $ac_status); } &&
12955 { ac_try='test -s conftest.$ac_objext'
12956 { (eval echo "$as_me:12956: \"$ac_try\"") >&5
12957 (eval $ac_try) 2>&5
12959 echo "$as_me:12959: \$? = $ac_status" >&5
12960 (exit $ac_status); }; }; then
12961 ac_cv_sys_large_files=1; break
12963 echo "$as_me: failed program was:" >&5
12964 cat conftest.$ac_ext >&5
12966 rm -f conftest.$ac_objext conftest.$ac_ext
12970 echo "$as_me:12970: result: $ac_cv_sys_large_files" >&5
12971 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12972 if test "$ac_cv_sys_large_files" != no; then
12974 cat >>confdefs.h <<EOF
12975 #define _LARGE_FILES $ac_cv_sys_large_files
12982 if test "$enable_largefile" != no ; then
12983 echo "$as_me:12983: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12984 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12985 if test "${ac_cv_sys_largefile_source+set}" = set; then
12986 echo $ECHO_N "(cached) $ECHO_C" >&6
12989 ac_cv_sys_largefile_source=no
12990 cat >conftest.$ac_ext <<_ACEOF
12991 #line 12991 "configure"
12992 #include "confdefs.h"
13002 rm -f conftest.$ac_objext
13003 if { (eval echo "$as_me:13003: \"$ac_compile\"") >&5
13004 (eval $ac_compile) 2>&5
13006 echo "$as_me:13006: \$? = $ac_status" >&5
13007 (exit $ac_status); } &&
13008 { ac_try='test -s conftest.$ac_objext'
13009 { (eval echo "$as_me:13009: \"$ac_try\"") >&5
13010 (eval $ac_try) 2>&5
13012 echo "$as_me:13012: \$? = $ac_status" >&5
13013 (exit $ac_status); }; }; then
13016 echo "$as_me: failed program was:" >&5
13017 cat conftest.$ac_ext >&5
13019 rm -f conftest.$ac_objext conftest.$ac_ext
13020 cat >conftest.$ac_ext <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023 #define _LARGEFILE_SOURCE 1
13033 rm -f conftest.$ac_objext
13034 if { (eval echo "$as_me:13034: \"$ac_compile\"") >&5
13035 (eval $ac_compile) 2>&5
13037 echo "$as_me:13037: \$? = $ac_status" >&5
13038 (exit $ac_status); } &&
13039 { ac_try='test -s conftest.$ac_objext'
13040 { (eval echo "$as_me:13040: \"$ac_try\"") >&5
13041 (eval $ac_try) 2>&5
13043 echo "$as_me:13043: \$? = $ac_status" >&5
13044 (exit $ac_status); }; }; then
13045 ac_cv_sys_largefile_source=1; break
13047 echo "$as_me: failed program was:" >&5
13048 cat conftest.$ac_ext >&5
13050 rm -f conftest.$ac_objext conftest.$ac_ext
13054 echo "$as_me:13054: result: $ac_cv_sys_largefile_source" >&5
13055 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13056 if test "$ac_cv_sys_largefile_source" != no; then
13058 cat >>confdefs.h <<EOF
13059 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13065 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13066 # in glibc 2.1.3, but that breaks too many other things.
13067 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13068 echo "$as_me:13068: checking for fseeko" >&5
13069 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13070 if test "${ac_cv_func_fseeko+set}" = set; then
13071 echo $ECHO_N "(cached) $ECHO_C" >&6
13073 cat >conftest.$ac_ext <<_ACEOF
13074 #line 13074 "configure"
13075 #include "confdefs.h"
13080 return fseeko && fseeko (stdin, 0, 0);
13085 rm -f conftest.$ac_objext conftest$ac_exeext
13086 if { (eval echo "$as_me:13086: \"$ac_link\"") >&5
13087 (eval $ac_link) 2>&5
13089 echo "$as_me:13089: \$? = $ac_status" >&5
13090 (exit $ac_status); } &&
13091 { ac_try='test -s conftest$ac_exeext'
13092 { (eval echo "$as_me:13092: \"$ac_try\"") >&5
13093 (eval $ac_try) 2>&5
13095 echo "$as_me:13095: \$? = $ac_status" >&5
13096 (exit $ac_status); }; }; then
13097 ac_cv_func_fseeko=yes
13099 echo "$as_me: failed program was:" >&5
13100 cat conftest.$ac_ext >&5
13101 ac_cv_func_fseeko=no
13103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13105 echo "$as_me:13105: result: $ac_cv_func_fseeko" >&5
13106 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13107 if test $ac_cv_func_fseeko = yes; then
13109 cat >>confdefs.h <<\EOF
13110 #define HAVE_FSEEKO 1
13115 # Normally we would collect these definitions in the config.h,
13116 # but (like _XOPEN_SOURCE), some environments rely on having these
13117 # defined before any of the system headers are included. Another
13118 # case comes up with C++, e.g., on AIX the compiler compiles the
13119 # header files by themselves before looking at the body files it is
13120 # told to compile. For ncurses, those header files do not include
13122 if test "$ac_cv_sys_large_files" != no
13125 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13126 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13129 if test "$ac_cv_sys_largefile_source" != no
13132 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13133 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13136 if test "$ac_cv_sys_file_offset_bits" != no
13139 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13140 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13144 echo "$as_me:13144: checking whether to use struct dirent64" >&5
13145 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13146 if test "${cf_cv_struct_dirent64+set}" = set; then
13147 echo $ECHO_N "(cached) $ECHO_C" >&6
13150 cat >conftest.$ac_ext <<_ACEOF
13151 #line 13151 "configure"
13152 #include "confdefs.h"
13154 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13155 #include <sys/types.h>
13156 #include <dirent.h>
13162 /* if transitional largefile support is setup, this is true */
13163 extern struct dirent64 * readdir(DIR *);
13164 struct dirent64 *x = readdir((DIR *)0);
13165 struct dirent *y = readdir((DIR *)0);
13172 rm -f conftest.$ac_objext
13173 if { (eval echo "$as_me:13173: \"$ac_compile\"") >&5
13174 (eval $ac_compile) 2>&5
13176 echo "$as_me:13176: \$? = $ac_status" >&5
13177 (exit $ac_status); } &&
13178 { ac_try='test -s conftest.$ac_objext'
13179 { (eval echo "$as_me:13179: \"$ac_try\"") >&5
13180 (eval $ac_try) 2>&5
13182 echo "$as_me:13182: \$? = $ac_status" >&5
13183 (exit $ac_status); }; }; then
13184 cf_cv_struct_dirent64=yes
13186 echo "$as_me: failed program was:" >&5
13187 cat conftest.$ac_ext >&5
13188 cf_cv_struct_dirent64=no
13190 rm -f conftest.$ac_objext conftest.$ac_ext
13193 echo "$as_me:13193: result: $cf_cv_struct_dirent64" >&5
13194 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13195 test "$cf_cv_struct_dirent64" = yes &&
13196 cat >>confdefs.h <<\EOF
13197 #define HAVE_STRUCT_DIRENT64 1
13202 ### Enable compiling-in rcs id's
13203 echo "$as_me:13203: checking if RCS identifiers should be compiled-in" >&5
13204 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13206 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13207 if test "${with_rcs_ids+set}" = set; then
13208 withval="$with_rcs_ids"
13209 with_rcs_ids=$withval
13213 echo "$as_me:13213: result: $with_rcs_ids" >&5
13214 echo "${ECHO_T}$with_rcs_ids" >&6
13215 test "$with_rcs_ids" = yes &&
13216 cat >>confdefs.h <<\EOF
13217 #define USE_RCS_IDS 1
13220 ###############################################################################
13222 ### Note that some functions (such as const) are normally disabled anyway.
13223 echo "$as_me:13223: checking if you want to build with function extensions" >&5
13224 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13226 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13227 if test "${enable_ext_funcs+set}" = set; then
13228 enableval="$enable_ext_funcs"
13229 with_ext_funcs=$enableval
13233 echo "$as_me:13233: result: $with_ext_funcs" >&5
13234 echo "${ECHO_T}$with_ext_funcs" >&6
13235 if test "$with_ext_funcs" = yes ; then
13236 NCURSES_EXT_FUNCS=1
13238 cat >>confdefs.h <<\EOF
13239 #define HAVE_USE_DEFAULT_COLORS 1
13242 cat >>confdefs.h <<\EOF
13243 #define NCURSES_EXT_FUNCS 1
13247 NCURSES_EXT_FUNCS=0
13250 ### use option --enable-const to turn on use of const beyond that in XSI.
13251 echo "$as_me:13251: checking for extended use of const keyword" >&5
13252 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13254 # Check whether --enable-const or --disable-const was given.
13255 if test "${enable_const+set}" = set; then
13256 enableval="$enable_const"
13257 with_ext_const=$enableval
13261 echo "$as_me:13261: result: $with_ext_const" >&5
13262 echo "${ECHO_T}$with_ext_const" >&6
13263 NCURSES_CONST='/*nothing*/'
13264 if test "$with_ext_const" = yes ; then
13265 NCURSES_CONST=const
13268 ###############################################################################
13269 # These options are relatively safe to experiment with.
13271 echo "$as_me:13271: checking if you want all development code" >&5
13272 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13274 # Check whether --with-develop or --without-develop was given.
13275 if test "${with_develop+set}" = set; then
13276 withval="$with_develop"
13277 with_develop=$withval
13281 echo "$as_me:13281: result: $with_develop" >&5
13282 echo "${ECHO_T}$with_develop" >&6
13284 ###############################################################################
13285 # These are just experimental, probably should not be in a package:
13287 # This is still experimental (20080329), but should ultimately be moved to
13288 # the script-block --with-normal, etc.
13290 echo "$as_me:13290: checking if you want to link with the pthread library" >&5
13291 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13293 # Check whether --with-pthread or --without-pthread was given.
13294 if test "${with_pthread+set}" = set; then
13295 withval="$with_pthread"
13296 with_pthread=$withval
13300 echo "$as_me:13300: result: $with_pthread" >&5
13301 echo "${ECHO_T}$with_pthread" >&6
13303 if test "$with_pthread" != no ; then
13304 echo "$as_me:13304: checking for pthread.h" >&5
13305 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13306 if test "${ac_cv_header_pthread_h+set}" = set; then
13307 echo $ECHO_N "(cached) $ECHO_C" >&6
13309 cat >conftest.$ac_ext <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312 #include <pthread.h>
13314 if { (eval echo "$as_me:13314: \"$ac_cpp conftest.$ac_ext\"") >&5
13315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13317 egrep -v '^ *\+' conftest.er1 >conftest.err
13319 cat conftest.err >&5
13320 echo "$as_me:13320: \$? = $ac_status" >&5
13321 (exit $ac_status); } >/dev/null; then
13322 if test -s conftest.err; then
13323 ac_cpp_err=$ac_c_preproc_warn_flag
13330 if test -z "$ac_cpp_err"; then
13331 ac_cv_header_pthread_h=yes
13333 echo "$as_me: failed program was:" >&5
13334 cat conftest.$ac_ext >&5
13335 ac_cv_header_pthread_h=no
13337 rm -f conftest.err conftest.$ac_ext
13339 echo "$as_me:13339: result: $ac_cv_header_pthread_h" >&5
13340 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13341 if test $ac_cv_header_pthread_h = yes; then
13343 cat >>confdefs.h <<\EOF
13344 #define HAVE_PTHREADS_H 1
13347 for cf_lib_pthread in pthread c_r
13349 echo "$as_me:13349: checking if we can link with the $cf_lib_pthread library" >&5
13350 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13351 cf_save_LIBS="$LIBS"
13353 cf_add_libs="-l$cf_lib_pthread"
13354 # Filter out duplicates - this happens with badly-designed ".pc" files...
13355 for cf_add_1lib in $LIBS
13357 for cf_add_2lib in $cf_add_libs
13359 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13365 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13367 LIBS="$cf_add_libs"
13369 cat >conftest.$ac_ext <<_ACEOF
13370 #line 13370 "configure"
13371 #include "confdefs.h"
13373 #include <pthread.h>
13379 int rc = pthread_create(0,0,0,0);
13380 int r2 = pthread_mutexattr_settype(0, 0);
13386 rm -f conftest.$ac_objext conftest$ac_exeext
13387 if { (eval echo "$as_me:13387: \"$ac_link\"") >&5
13388 (eval $ac_link) 2>&5
13390 echo "$as_me:13390: \$? = $ac_status" >&5
13391 (exit $ac_status); } &&
13392 { ac_try='test -s conftest$ac_exeext'
13393 { (eval echo "$as_me:13393: \"$ac_try\"") >&5
13394 (eval $ac_try) 2>&5
13396 echo "$as_me:13396: \$? = $ac_status" >&5
13397 (exit $ac_status); }; }; then
13400 echo "$as_me: failed program was:" >&5
13401 cat conftest.$ac_ext >&5
13404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13405 LIBS="$cf_save_LIBS"
13406 echo "$as_me:13406: result: $with_pthread" >&5
13407 echo "${ECHO_T}$with_pthread" >&6
13408 test "$with_pthread" = yes && break
13411 if test "$with_pthread" = yes ; then
13413 cf_add_libs="-l$cf_lib_pthread"
13414 # Filter out duplicates - this happens with badly-designed ".pc" files...
13415 for cf_add_1lib in $LIBS
13417 for cf_add_2lib in $cf_add_libs
13419 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13425 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13427 LIBS="$cf_add_libs"
13429 cat >>confdefs.h <<\EOF
13430 #define HAVE_LIBPTHREADS 1
13434 { { echo "$as_me:13434: error: Cannot link with pthread library" >&5
13435 echo "$as_me: error: Cannot link with pthread library" >&2;}
13436 { (exit 1); exit 1; }; }
13443 echo "$as_me:13443: checking if you want to use weak-symbols for pthreads" >&5
13444 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13446 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13447 if test "${enable_weak_symbols+set}" = set; then
13448 enableval="$enable_weak_symbols"
13449 use_weak_symbols=$withval
13451 use_weak_symbols=no
13453 echo "$as_me:13453: result: $use_weak_symbols" >&5
13454 echo "${ECHO_T}$use_weak_symbols" >&6
13455 if test "$use_weak_symbols" = yes ; then
13457 echo "$as_me:13457: checking if $CC supports weak symbols" >&5
13458 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13459 if test "${cf_cv_weak_symbols+set}" = set; then
13460 echo $ECHO_N "(cached) $ECHO_C" >&6
13463 cat >conftest.$ac_ext <<_ACEOF
13464 #line 13464 "configure"
13465 #include "confdefs.h"
13472 #if defined(__GNUC__)
13473 # if defined __USE_ISOC99
13474 # define _cat_pragma(exp) _Pragma(#exp)
13475 # define _weak_pragma(exp) _cat_pragma(weak name)
13477 # define _weak_pragma(exp)
13479 # define _declare(name) __extension__ extern __typeof__(name) name
13480 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
13483 weak_symbol(fopen);
13489 rm -f conftest.$ac_objext
13490 if { (eval echo "$as_me:13490: \"$ac_compile\"") >&5
13491 (eval $ac_compile) 2>&5
13493 echo "$as_me:13493: \$? = $ac_status" >&5
13494 (exit $ac_status); } &&
13495 { ac_try='test -s conftest.$ac_objext'
13496 { (eval echo "$as_me:13496: \"$ac_try\"") >&5
13497 (eval $ac_try) 2>&5
13499 echo "$as_me:13499: \$? = $ac_status" >&5
13500 (exit $ac_status); }; }; then
13501 cf_cv_weak_symbols=yes
13503 echo "$as_me: failed program was:" >&5
13504 cat conftest.$ac_ext >&5
13505 cf_cv_weak_symbols=no
13507 rm -f conftest.$ac_objext conftest.$ac_ext
13510 echo "$as_me:13510: result: $cf_cv_weak_symbols" >&5
13511 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13514 cf_cv_weak_symbols=no
13517 if test $cf_cv_weak_symbols = yes ; then
13519 cat >>confdefs.h <<\EOF
13520 #define USE_WEAK_SYMBOLS 1
13526 if test "$with_pthread" = "yes" ; then
13528 cat >>confdefs.h <<\EOF
13529 #define USE_PTHREADS 1
13532 enable_reentrant=yes
13533 if test $cf_cv_weak_symbols = yes ; then
13538 # OpenSUSE is installing ncurses6, using reentrant option.
13539 echo "$as_me:13539: checking for _nc_TABSIZE" >&5
13540 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
13541 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
13542 echo $ECHO_N "(cached) $ECHO_C" >&6
13544 cat >conftest.$ac_ext <<_ACEOF
13545 #line 13545 "configure"
13546 #include "confdefs.h"
13547 #define _nc_TABSIZE autoconf_temporary
13548 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13555 /* We use char because int might match the return type of a gcc2
13556 builtin and then its argument prototype would still apply. */
13557 char _nc_TABSIZE (void);
13563 /* The GNU C library defines stubs for functions which it implements
13564 to always fail with ENOSYS. Some functions are actually named
13565 something starting with __ and the normal name is an alias. */
13566 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
13567 #error found stub for _nc_TABSIZE
13570 return _nc_TABSIZE ();
13575 rm -f conftest.$ac_objext conftest$ac_exeext
13576 if { (eval echo "$as_me:13576: \"$ac_link\"") >&5
13577 (eval $ac_link) 2>&5
13579 echo "$as_me:13579: \$? = $ac_status" >&5
13580 (exit $ac_status); } &&
13581 { ac_try='test -s conftest$ac_exeext'
13582 { (eval echo "$as_me:13582: \"$ac_try\"") >&5
13583 (eval $ac_try) 2>&5
13585 echo "$as_me:13585: \$? = $ac_status" >&5
13586 (exit $ac_status); }; }; then
13587 ac_cv_func__nc_TABSIZE=yes
13589 echo "$as_me: failed program was:" >&5
13590 cat conftest.$ac_ext >&5
13591 ac_cv_func__nc_TABSIZE=no
13593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13595 echo "$as_me:13595: result: $ac_cv_func__nc_TABSIZE" >&5
13596 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
13597 if test $ac_cv_func__nc_TABSIZE = yes; then
13598 assume_reentrant=yes
13600 assume_reentrant=no
13603 # Reentrant code has to be opaque; there's little advantage to making ncurses
13604 # opaque outside of that, so there is no --enable-opaque option. We can use
13605 # this option without --with-pthreads, but this will be always set for
13607 echo "$as_me:13607: checking if you want experimental reentrant code" >&5
13608 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
13610 # Check whether --enable-reentrant or --disable-reentrant was given.
13611 if test "${enable_reentrant+set}" = set; then
13612 enableval="$enable_reentrant"
13613 with_reentrant=$enableval
13615 with_reentrant=$assume_reentrant
13617 echo "$as_me:13617: result: $with_reentrant" >&5
13618 echo "${ECHO_T}$with_reentrant" >&6
13619 if test "$with_reentrant" = yes ; then
13620 cf_cv_enable_reentrant=1
13621 if test $cf_cv_weak_symbols = yes ; then
13623 # remove pthread library from $LIBS
13624 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
13626 elif test "$assume_reentrant" = no ; then
13627 LIB_SUFFIX="t${LIB_SUFFIX}"
13630 cat >>confdefs.h <<\EOF
13631 #define USE_REENTRANT 1
13635 cf_cv_enable_reentrant=0
13638 ### Allow using a different wrap-prefix
13639 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13640 echo "$as_me:13640: checking for prefix used to wrap public variables" >&5
13641 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13643 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13644 if test "${with_wrap_prefix+set}" = set; then
13645 withval="$with_wrap_prefix"
13646 NCURSES_WRAP_PREFIX=$withval
13648 NCURSES_WRAP_PREFIX=_nc_
13650 echo "$as_me:13650: result: $NCURSES_WRAP_PREFIX" >&5
13651 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13653 NCURSES_WRAP_PREFIX=_nc_
13656 cat >>confdefs.h <<EOF
13657 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13660 ###############################################################################
13662 ### use option --disable-echo to suppress full display compiling commands
13664 echo "$as_me:13664: checking if you want to see long compiling messages" >&5
13665 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13667 # Check whether --enable-echo or --disable-echo was given.
13668 if test "${enable_echo+set}" = set; then
13669 enableval="$enable_echo"
13670 test "$enableval" != no && enableval=yes
13671 if test "$enableval" != "yes" ; then
13674 ECHO_LD='@echo linking $@;'
13675 RULE_CC='@echo compiling $<'
13676 SHOW_CC='@echo compiling $@'
13698 echo "$as_me:13698: result: $enableval" >&5
13699 echo "${ECHO_T}$enableval" >&6
13701 ### use option --enable-warnings to turn on all gcc warnings
13702 echo "$as_me:13702: checking if you want to see compiler warnings" >&5
13703 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13705 # Check whether --enable-warnings or --disable-warnings was given.
13706 if test "${enable_warnings+set}" = set; then
13707 enableval="$enable_warnings"
13708 with_warnings=$enableval
13710 echo "$as_me:13710: result: $with_warnings" >&5
13711 echo "${ECHO_T}$with_warnings" >&6
13713 if test "x$with_warnings" = "xyes"; then
13715 ADAFLAGS="$ADAFLAGS -gnatg"
13719 if test "$GCC" = yes ; then
13722 echo "$as_me:13722: checking if this is really Intel C compiler" >&5
13723 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13724 cf_save_CFLAGS="$CFLAGS"
13725 CFLAGS="$CFLAGS -no-gcc"
13726 cat >conftest.$ac_ext <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13734 #ifdef __INTEL_COMPILER
13743 rm -f conftest.$ac_objext
13744 if { (eval echo "$as_me:13744: \"$ac_compile\"") >&5
13745 (eval $ac_compile) 2>&5
13747 echo "$as_me:13747: \$? = $ac_status" >&5
13748 (exit $ac_status); } &&
13749 { ac_try='test -s conftest.$ac_objext'
13750 { (eval echo "$as_me:13750: \"$ac_try\"") >&5
13751 (eval $ac_try) 2>&5
13753 echo "$as_me:13753: \$? = $ac_status" >&5
13754 (exit $ac_status); }; }; then
13756 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13759 echo "$as_me: failed program was:" >&5
13760 cat conftest.$ac_ext >&5
13762 rm -f conftest.$ac_objext conftest.$ac_ext
13763 CFLAGS="$cf_save_CFLAGS"
13764 echo "$as_me:13764: result: $INTEL_COMPILER" >&5
13765 echo "${ECHO_T}$INTEL_COMPILER" >&6
13772 if test "$GCC" = yes ; then
13773 echo "$as_me:13773: checking if this is really Clang C compiler" >&5
13774 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13775 cf_save_CFLAGS="$CFLAGS"
13776 CFLAGS="$CFLAGS -Qunused-arguments"
13777 cat >conftest.$ac_ext <<_ACEOF
13778 #line 13778 "configure"
13779 #include "confdefs.h"
13794 rm -f conftest.$ac_objext
13795 if { (eval echo "$as_me:13795: \"$ac_compile\"") >&5
13796 (eval $ac_compile) 2>&5
13798 echo "$as_me:13798: \$? = $ac_status" >&5
13799 (exit $ac_status); } &&
13800 { ac_try='test -s conftest.$ac_objext'
13801 { (eval echo "$as_me:13801: \"$ac_try\"") >&5
13802 (eval $ac_try) 2>&5
13804 echo "$as_me:13804: \$? = $ac_status" >&5
13805 (exit $ac_status); }; }; then
13807 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13810 echo "$as_me: failed program was:" >&5
13811 cat conftest.$ac_ext >&5
13813 rm -f conftest.$ac_objext conftest.$ac_ext
13814 CFLAGS="$cf_save_CFLAGS"
13815 echo "$as_me:13815: result: $CLANG_COMPILER" >&5
13816 echo "${ECHO_T}$CLANG_COMPILER" >&6
13819 cat > conftest.$ac_ext <<EOF
13820 #line 13820 "${as_me:-configure}"
13821 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13824 if test "$INTEL_COMPILER" = yes
13826 # The "-wdXXX" options suppress warnings:
13827 # remark #1419: external declaration in primary source file
13828 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13829 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13830 # remark #193: zero used for undefined preprocessing identifier
13831 # remark #593: variable "curs_sb_left_arrow" was set but never used
13832 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13833 # remark #869: parameter "tw" was never referenced
13834 # remark #981: operands are evaluated in unspecified order
13835 # warning #279: controlling expression is constant
13837 { echo "$as_me:13837: checking for $CC warning options..." >&5
13838 echo "$as_me: checking for $CC warning options..." >&6;}
13839 cf_save_CFLAGS="$CFLAGS"
13840 EXTRA_CFLAGS="-Wall"
13852 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13853 if { (eval echo "$as_me:13853: \"$ac_compile\"") >&5
13854 (eval $ac_compile) 2>&5
13856 echo "$as_me:13856: \$? = $ac_status" >&5
13857 (exit $ac_status); }; then
13858 test -n "$verbose" && echo "$as_me:13858: result: ... -$cf_opt" >&5
13859 echo "${ECHO_T}... -$cf_opt" >&6
13860 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13863 CFLAGS="$cf_save_CFLAGS"
13865 elif test "$GCC" = yes
13867 { echo "$as_me:13867: checking for $CC warning options..." >&5
13868 echo "$as_me: checking for $CC warning options..." >&6;}
13869 cf_save_CFLAGS="$CFLAGS"
13872 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13873 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13874 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13875 for cf_opt in W Wall \
13876 Wbad-function-cast \
13879 Wdeclaration-after-statement \
13882 Wmissing-declarations \
13883 Wmissing-prototypes \
13887 Wstrict-prototypes \
13888 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13890 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13891 if { (eval echo "$as_me:13891: \"$ac_compile\"") >&5
13892 (eval $ac_compile) 2>&5
13894 echo "$as_me:13894: \$? = $ac_status" >&5
13895 (exit $ac_status); }; then
13896 test -n "$verbose" && echo "$as_me:13896: result: ... -$cf_opt" >&5
13897 echo "${ECHO_T}... -$cf_opt" >&6
13901 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13902 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
13906 case $GCC_VERSION in
13908 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13910 echo "${as_me:-configure}:13910: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13916 case $GCC_VERSION in
13918 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13920 echo "${as_me:-configure}:13920: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13926 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13929 CFLAGS="$cf_save_CFLAGS"
13935 if test "$GCC" = yes
13937 cat > conftest.i <<EOF
13939 #define GCC_PRINTF 0
13942 #define GCC_SCANF 0
13944 #ifndef GCC_NORETURN
13945 #define GCC_NORETURN /* nothing */
13948 #define GCC_UNUSED /* nothing */
13951 if test "$GCC" = yes
13953 { echo "$as_me:13953: checking for $CC __attribute__ directives..." >&5
13954 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13955 cat > conftest.$ac_ext <<EOF
13956 #line 13956 "${as_me:-configure}"
13957 #include "confdefs.h"
13958 #include "conftest.h"
13959 #include "conftest.i"
13961 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13963 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13966 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
13968 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
13970 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13971 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13972 extern void foo(void) GCC_NORETURN;
13973 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13975 cf_printf_attribute=no
13976 cf_scanf_attribute=no
13977 for cf_attribute in scanf printf unused noreturn
13980 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13982 cf_directive="__attribute__(($cf_attribute))"
13983 echo "checking for $CC $cf_directive" 1>&5
13985 case $cf_attribute in
13987 cf_printf_attribute=yes
13988 cat >conftest.h <<EOF
13989 #define GCC_$cf_ATTRIBUTE 1
13993 cf_scanf_attribute=yes
13994 cat >conftest.h <<EOF
13995 #define GCC_$cf_ATTRIBUTE 1
13999 cat >conftest.h <<EOF
14000 #define GCC_$cf_ATTRIBUTE $cf_directive
14005 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006 (eval $ac_compile) 2>&5
14008 echo "$as_me:14008: \$? = $ac_status" >&5
14009 (exit $ac_status); }; then
14010 test -n "$verbose" && echo "$as_me:14010: result: ... $cf_attribute" >&5
14011 echo "${ECHO_T}... $cf_attribute" >&6
14012 cat conftest.h >>confdefs.h
14013 case $cf_attribute in
14016 cat >>confdefs.h <<EOF
14017 #define GCC_NORETURN $cf_directive
14022 cf_value='/* nothing */'
14023 if test "$cf_printf_attribute" != no ; then
14024 cf_value='__attribute__((format(printf,fmt,var)))'
14026 cat >>confdefs.h <<\EOF
14027 #define GCC_PRINTF 1
14032 cat >>confdefs.h <<EOF
14033 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14038 cf_value='/* nothing */'
14039 if test "$cf_scanf_attribute" != no ; then
14040 cf_value='__attribute__((format(scanf,fmt,var)))'
14042 cat >>confdefs.h <<\EOF
14043 #define GCC_SCANF 1
14048 cat >>confdefs.h <<EOF
14049 #define GCC_SCANFLIKE(fmt,var) $cf_value
14055 cat >>confdefs.h <<EOF
14056 #define GCC_UNUSED $cf_directive
14064 fgrep define conftest.i >>confdefs.h
14069 ### use option --enable-assertions to turn on generation of assertion code
14070 echo "$as_me:14070: checking if you want to enable runtime assertions" >&5
14071 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14073 # Check whether --enable-assertions or --disable-assertions was given.
14074 if test "${enable_assertions+set}" = set; then
14075 enableval="$enable_assertions"
14076 with_assertions=$enableval
14080 echo "$as_me:14080: result: $with_assertions" >&5
14081 echo "${ECHO_T}$with_assertions" >&6
14084 if test "$with_assertions" = no
14086 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14089 ADAFLAGS="$ADAFLAGS -gnata"
14094 ### use option --disable-leaks to suppress "permanent" leaks, for testing
14096 cat >>confdefs.h <<\EOF
14097 #define HAVE_NC_ALLOC_H 1
14100 ### use option --enable-expanded to generate certain macros as functions
14102 # Check whether --enable-expanded or --disable-expanded was given.
14103 if test "${enable_expanded+set}" = set; then
14104 enableval="$enable_expanded"
14105 test "$enableval" = yes &&
14106 cat >>confdefs.h <<\EOF
14107 #define NCURSES_EXPANDED 1
14112 ### use option --disable-macros to suppress macros in favor of functions
14114 # Check whether --enable-macros or --disable-macros was given.
14115 if test "${enable_macros+set}" = set; then
14116 enableval="$enable_macros"
14117 test "$enableval" = no &&
14118 cat >>confdefs.h <<\EOF
14119 #define NCURSES_NOMACROS 1
14124 # Normally we only add trace() to the debug-library. Allow this to be
14125 # extended to all models of the ncurses library:
14127 case "$CFLAGS $CPPFLAGS" in
14133 echo "$as_me:14133: checking whether to add trace feature to all models" >&5
14134 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14136 # Check whether --with-trace or --without-trace was given.
14137 if test "${with_trace+set}" = set; then
14138 withval="$with_trace"
14139 cf_with_trace=$withval
14141 cf_with_trace=$cf_all_traces
14143 echo "$as_me:14143: result: $cf_with_trace" >&5
14144 echo "${ECHO_T}$cf_with_trace" >&6
14146 if test "$cf_with_trace" = yes ; then
14152 cf_new_extra_cppflags=
14154 for cf_add_cflags in -DTRACE
14156 case $cf_fix_cppflags in
14158 case $cf_add_cflags in
14159 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14160 case $cf_add_cflags in
14162 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14164 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14165 && test -z "${cf_tst_cflags}" \
14166 && cf_fix_cppflags=yes
14168 if test $cf_fix_cppflags = yes ; then
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"
14174 elif test "${cf_tst_cflags}" = "\"'" ; then
14176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14183 case "$CPPFLAGS" in
14187 case $cf_add_cflags in
14189 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14191 CPPFLAGS=`echo "$CPPFLAGS" | \
14192 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14193 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14198 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14199 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14206 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14207 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14214 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14215 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14217 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14219 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14220 && test -z "${cf_tst_cflags}" \
14221 && cf_fix_cppflags=no
14226 if test -n "$cf_new_cflags" ; then
14228 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14229 CFLAGS="${CFLAGS}$cf_new_cflags"
14233 if test -n "$cf_new_cppflags" ; then
14235 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14236 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14240 if test -n "$cf_new_extra_cppflags" ; then
14242 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14243 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14251 echo "$as_me:14251: checking if we want to use GNAT projects" >&5
14252 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14254 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14255 if test "${enable_gnat_projects+set}" = set; then
14256 enableval="$enable_gnat_projects"
14257 test "$enableval" != no && enableval=yes
14258 if test "$enableval" != "yes" ; then
14259 enable_gnat_projects=no
14261 enable_gnat_projects=yes
14265 enable_gnat_projects=yes
14268 echo "$as_me:14268: result: $enable_gnat_projects" >&5
14269 echo "${ECHO_T}$enable_gnat_projects" >&6
14271 ### Checks for libraries.
14272 case $cf_cv_system_name in
14276 echo "$as_me:14276: checking for gettimeofday" >&5
14277 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14278 if test "${ac_cv_func_gettimeofday+set}" = set; then
14279 echo $ECHO_N "(cached) $ECHO_C" >&6
14281 cat >conftest.$ac_ext <<_ACEOF
14282 #line 14282 "configure"
14283 #include "confdefs.h"
14284 #define gettimeofday autoconf_temporary
14285 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14286 #undef gettimeofday
14292 /* We use char because int might match the return type of a gcc2
14293 builtin and then its argument prototype would still apply. */
14294 char gettimeofday (void);
14300 /* The GNU C library defines stubs for functions which it implements
14301 to always fail with ENOSYS. Some functions are actually named
14302 something starting with __ and the normal name is an alias. */
14303 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14304 #error found stub for gettimeofday
14307 return gettimeofday ();
14312 rm -f conftest.$ac_objext conftest$ac_exeext
14313 if { (eval echo "$as_me:14313: \"$ac_link\"") >&5
14314 (eval $ac_link) 2>&5
14316 echo "$as_me:14316: \$? = $ac_status" >&5
14317 (exit $ac_status); } &&
14318 { ac_try='test -s conftest$ac_exeext'
14319 { (eval echo "$as_me:14319: \"$ac_try\"") >&5
14320 (eval $ac_try) 2>&5
14322 echo "$as_me:14322: \$? = $ac_status" >&5
14323 (exit $ac_status); }; }; then
14324 ac_cv_func_gettimeofday=yes
14326 echo "$as_me: failed program was:" >&5
14327 cat conftest.$ac_ext >&5
14328 ac_cv_func_gettimeofday=no
14330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14332 echo "$as_me:14332: result: $ac_cv_func_gettimeofday" >&5
14333 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14334 if test $ac_cv_func_gettimeofday = yes; then
14335 cat >>confdefs.h <<\EOF
14336 #define HAVE_GETTIMEOFDAY 1
14341 echo "$as_me:14341: checking for gettimeofday in -lbsd" >&5
14342 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14343 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14344 echo $ECHO_N "(cached) $ECHO_C" >&6
14346 ac_check_lib_save_LIBS=$LIBS
14348 cat >conftest.$ac_ext <<_ACEOF
14349 #line 14349 "configure"
14350 #include "confdefs.h"
14352 /* Override any gcc2 internal prototype to avoid an error. */
14356 /* We use char because int might match the return type of a gcc2
14357 builtin and then its argument prototype would still apply. */
14358 char gettimeofday ();
14367 rm -f conftest.$ac_objext conftest$ac_exeext
14368 if { (eval echo "$as_me:14368: \"$ac_link\"") >&5
14369 (eval $ac_link) 2>&5
14371 echo "$as_me:14371: \$? = $ac_status" >&5
14372 (exit $ac_status); } &&
14373 { ac_try='test -s conftest$ac_exeext'
14374 { (eval echo "$as_me:14374: \"$ac_try\"") >&5
14375 (eval $ac_try) 2>&5
14377 echo "$as_me:14377: \$? = $ac_status" >&5
14378 (exit $ac_status); }; }; then
14379 ac_cv_lib_bsd_gettimeofday=yes
14381 echo "$as_me: failed program was:" >&5
14382 cat conftest.$ac_ext >&5
14383 ac_cv_lib_bsd_gettimeofday=no
14385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14386 LIBS=$ac_check_lib_save_LIBS
14388 echo "$as_me:14388: result: $ac_cv_lib_bsd_gettimeofday" >&5
14389 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14390 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14392 cat >>confdefs.h <<\EOF
14393 #define HAVE_GETTIMEOFDAY 1
14403 ### Checks for header files.
14404 echo "$as_me:14404: checking for ANSI C header files" >&5
14405 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14406 if test "${ac_cv_header_stdc+set}" = set; then
14407 echo $ECHO_N "(cached) $ECHO_C" >&6
14409 cat >conftest.$ac_ext <<_ACEOF
14410 #line 14410 "configure"
14411 #include "confdefs.h"
14412 #include <stdlib.h>
14413 #include <stdarg.h>
14414 #include <string.h>
14418 if { (eval echo "$as_me:14418: \"$ac_cpp conftest.$ac_ext\"") >&5
14419 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14421 egrep -v '^ *\+' conftest.er1 >conftest.err
14423 cat conftest.err >&5
14424 echo "$as_me:14424: \$? = $ac_status" >&5
14425 (exit $ac_status); } >/dev/null; then
14426 if test -s conftest.err; then
14427 ac_cpp_err=$ac_c_preproc_warn_flag
14434 if test -z "$ac_cpp_err"; then
14435 ac_cv_header_stdc=yes
14437 echo "$as_me: failed program was:" >&5
14438 cat conftest.$ac_ext >&5
14439 ac_cv_header_stdc=no
14441 rm -f conftest.err conftest.$ac_ext
14443 if test $ac_cv_header_stdc = yes; then
14444 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14445 cat >conftest.$ac_ext <<_ACEOF
14446 #line 14446 "configure"
14447 #include "confdefs.h"
14448 #include <string.h>
14451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14452 egrep "memchr" >/dev/null 2>&1; then
14455 ac_cv_header_stdc=no
14461 if test $ac_cv_header_stdc = yes; then
14462 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14463 cat >conftest.$ac_ext <<_ACEOF
14464 #line 14464 "configure"
14465 #include "confdefs.h"
14466 #include <stdlib.h>
14469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14470 egrep "free" >/dev/null 2>&1; then
14473 ac_cv_header_stdc=no
14479 if test $ac_cv_header_stdc = yes; then
14480 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14481 if test "$cross_compiling" = yes; then
14484 cat >conftest.$ac_ext <<_ACEOF
14485 #line 14485 "configure"
14486 #include "confdefs.h"
14488 #if ((' ' & 0x0FF) == 0x020)
14489 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14490 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14492 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14493 || ('j' <= (c) && (c) <= 'r') \
14494 || ('s' <= (c) && (c) <= 'z'))
14495 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14498 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14503 for (i = 0; i < 256; i++)
14504 if (XOR (islower (i), ISLOWER (i))
14505 || toupper (i) != TOUPPER (i))
14506 $ac_main_return(2);
14507 $ac_main_return (0);
14510 rm -f conftest$ac_exeext
14511 if { (eval echo "$as_me:14511: \"$ac_link\"") >&5
14512 (eval $ac_link) 2>&5
14514 echo "$as_me:14514: \$? = $ac_status" >&5
14515 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14516 { (eval echo "$as_me:14516: \"$ac_try\"") >&5
14517 (eval $ac_try) 2>&5
14519 echo "$as_me:14519: \$? = $ac_status" >&5
14520 (exit $ac_status); }; }; then
14523 echo "$as_me: program exited with status $ac_status" >&5
14524 echo "$as_me: failed program was:" >&5
14525 cat conftest.$ac_ext >&5
14526 ac_cv_header_stdc=no
14528 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14532 echo "$as_me:14532: result: $ac_cv_header_stdc" >&5
14533 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14534 if test $ac_cv_header_stdc = yes; then
14536 cat >>confdefs.h <<\EOF
14537 #define STDC_HEADERS 1
14542 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14544 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14545 inttypes.h stdint.h unistd.h
14547 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14548 echo "$as_me:14548: checking for $ac_header" >&5
14549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14551 echo $ECHO_N "(cached) $ECHO_C" >&6
14553 cat >conftest.$ac_ext <<_ACEOF
14554 #line 14554 "configure"
14555 #include "confdefs.h"
14556 $ac_includes_default
14557 #include <$ac_header>
14559 rm -f conftest.$ac_objext
14560 if { (eval echo "$as_me:14560: \"$ac_compile\"") >&5
14561 (eval $ac_compile) 2>&5
14563 echo "$as_me:14563: \$? = $ac_status" >&5
14564 (exit $ac_status); } &&
14565 { ac_try='test -s conftest.$ac_objext'
14566 { (eval echo "$as_me:14566: \"$ac_try\"") >&5
14567 (eval $ac_try) 2>&5
14569 echo "$as_me:14569: \$? = $ac_status" >&5
14570 (exit $ac_status); }; }; then
14571 eval "$as_ac_Header=yes"
14573 echo "$as_me: failed program was:" >&5
14574 cat conftest.$ac_ext >&5
14575 eval "$as_ac_Header=no"
14577 rm -f conftest.$ac_objext conftest.$ac_ext
14579 echo "$as_me:14579: result: `eval echo '${'$as_ac_Header'}'`" >&5
14580 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14582 cat >>confdefs.h <<EOF
14583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14589 echo "$as_me:14589: checking for signed char" >&5
14590 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14591 if test "${ac_cv_type_signed_char+set}" = set; then
14592 echo $ECHO_N "(cached) $ECHO_C" >&6
14594 cat >conftest.$ac_ext <<_ACEOF
14595 #line 14595 "configure"
14596 #include "confdefs.h"
14597 $ac_includes_default
14601 if ((signed char *) 0)
14603 if (sizeof (signed char))
14609 rm -f conftest.$ac_objext
14610 if { (eval echo "$as_me:14610: \"$ac_compile\"") >&5
14611 (eval $ac_compile) 2>&5
14613 echo "$as_me:14613: \$? = $ac_status" >&5
14614 (exit $ac_status); } &&
14615 { ac_try='test -s conftest.$ac_objext'
14616 { (eval echo "$as_me:14616: \"$ac_try\"") >&5
14617 (eval $ac_try) 2>&5
14619 echo "$as_me:14619: \$? = $ac_status" >&5
14620 (exit $ac_status); }; }; then
14621 ac_cv_type_signed_char=yes
14623 echo "$as_me: failed program was:" >&5
14624 cat conftest.$ac_ext >&5
14625 ac_cv_type_signed_char=no
14627 rm -f conftest.$ac_objext conftest.$ac_ext
14629 echo "$as_me:14629: result: $ac_cv_type_signed_char" >&5
14630 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14632 echo "$as_me:14632: checking size of signed char" >&5
14633 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14634 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14635 echo $ECHO_N "(cached) $ECHO_C" >&6
14637 if test "$ac_cv_type_signed_char" = yes; then
14638 if test "$cross_compiling" = yes; then
14639 # Depending upon the size, compute the lo and hi bounds.
14640 cat >conftest.$ac_ext <<_ACEOF
14641 #line 14641 "configure"
14642 #include "confdefs.h"
14643 $ac_includes_default
14647 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14652 rm -f conftest.$ac_objext
14653 if { (eval echo "$as_me:14653: \"$ac_compile\"") >&5
14654 (eval $ac_compile) 2>&5
14656 echo "$as_me:14656: \$? = $ac_status" >&5
14657 (exit $ac_status); } &&
14658 { ac_try='test -s conftest.$ac_objext'
14659 { (eval echo "$as_me:14659: \"$ac_try\"") >&5
14660 (eval $ac_try) 2>&5
14662 echo "$as_me:14662: \$? = $ac_status" >&5
14663 (exit $ac_status); }; }; then
14666 cat >conftest.$ac_ext <<_ACEOF
14667 #line 14667 "configure"
14668 #include "confdefs.h"
14669 $ac_includes_default
14673 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14678 rm -f conftest.$ac_objext
14679 if { (eval echo "$as_me:14679: \"$ac_compile\"") >&5
14680 (eval $ac_compile) 2>&5
14682 echo "$as_me:14682: \$? = $ac_status" >&5
14683 (exit $ac_status); } &&
14684 { ac_try='test -s conftest.$ac_objext'
14685 { (eval echo "$as_me:14685: \"$ac_try\"") >&5
14686 (eval $ac_try) 2>&5
14688 echo "$as_me:14688: \$? = $ac_status" >&5
14689 (exit $ac_status); }; }; then
14690 ac_hi=$ac_mid; break
14692 echo "$as_me: failed program was:" >&5
14693 cat conftest.$ac_ext >&5
14694 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
14696 rm -f conftest.$ac_objext conftest.$ac_ext
14699 echo "$as_me: failed program was:" >&5
14700 cat conftest.$ac_ext >&5
14703 cat >conftest.$ac_ext <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706 $ac_includes_default
14710 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14715 rm -f conftest.$ac_objext
14716 if { (eval echo "$as_me:14716: \"$ac_compile\"") >&5
14717 (eval $ac_compile) 2>&5
14719 echo "$as_me:14719: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
14721 { ac_try='test -s conftest.$ac_objext'
14722 { (eval echo "$as_me:14722: \"$ac_try\"") >&5
14723 (eval $ac_try) 2>&5
14725 echo "$as_me:14725: \$? = $ac_status" >&5
14726 (exit $ac_status); }; }; then
14727 ac_lo=$ac_mid; break
14729 echo "$as_me: failed program was:" >&5
14730 cat conftest.$ac_ext >&5
14731 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
14733 rm -f conftest.$ac_objext conftest.$ac_ext
14736 rm -f conftest.$ac_objext conftest.$ac_ext
14737 # Binary search between lo and hi bounds.
14738 while test "x$ac_lo" != "x$ac_hi"; do
14739 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14740 cat >conftest.$ac_ext <<_ACEOF
14741 #line 14741 "configure"
14742 #include "confdefs.h"
14743 $ac_includes_default
14747 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14752 rm -f conftest.$ac_objext
14753 if { (eval echo "$as_me:14753: \"$ac_compile\"") >&5
14754 (eval $ac_compile) 2>&5
14756 echo "$as_me:14756: \$? = $ac_status" >&5
14757 (exit $ac_status); } &&
14758 { ac_try='test -s conftest.$ac_objext'
14759 { (eval echo "$as_me:14759: \"$ac_try\"") >&5
14760 (eval $ac_try) 2>&5
14762 echo "$as_me:14762: \$? = $ac_status" >&5
14763 (exit $ac_status); }; }; then
14766 echo "$as_me: failed program was:" >&5
14767 cat conftest.$ac_ext >&5
14768 ac_lo=`expr $ac_mid + 1`
14770 rm -f conftest.$ac_objext conftest.$ac_ext
14772 ac_cv_sizeof_signed_char=$ac_lo
14774 if test "$cross_compiling" = yes; then
14775 { { echo "$as_me:14775: error: cannot run test program while cross compiling" >&5
14776 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14777 { (exit 1); exit 1; }; }
14779 cat >conftest.$ac_ext <<_ACEOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14782 $ac_includes_default
14786 FILE *f = fopen ("conftest.val", "w");
14788 $ac_main_return (1);
14789 fprintf (f, "%d", (sizeof (signed char)));
14795 rm -f conftest$ac_exeext
14796 if { (eval echo "$as_me:14796: \"$ac_link\"") >&5
14797 (eval $ac_link) 2>&5
14799 echo "$as_me:14799: \$? = $ac_status" >&5
14800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14801 { (eval echo "$as_me:14801: \"$ac_try\"") >&5
14802 (eval $ac_try) 2>&5
14804 echo "$as_me:14804: \$? = $ac_status" >&5
14805 (exit $ac_status); }; }; then
14806 ac_cv_sizeof_signed_char=`cat conftest.val`
14808 echo "$as_me: program exited with status $ac_status" >&5
14809 echo "$as_me: failed program was:" >&5
14810 cat conftest.$ac_ext >&5
14812 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14817 ac_cv_sizeof_signed_char=0
14820 echo "$as_me:14820: result: $ac_cv_sizeof_signed_char" >&5
14821 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14822 cat >>confdefs.h <<EOF
14823 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14826 echo "$as_me:14826: checking for ANSI C header files" >&5
14827 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14828 if test "${ac_cv_header_stdc+set}" = set; then
14829 echo $ECHO_N "(cached) $ECHO_C" >&6
14831 cat >conftest.$ac_ext <<_ACEOF
14832 #line 14832 "configure"
14833 #include "confdefs.h"
14834 #include <stdlib.h>
14835 #include <stdarg.h>
14836 #include <string.h>
14840 if { (eval echo "$as_me:14840: \"$ac_cpp conftest.$ac_ext\"") >&5
14841 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14843 egrep -v '^ *\+' conftest.er1 >conftest.err
14845 cat conftest.err >&5
14846 echo "$as_me:14846: \$? = $ac_status" >&5
14847 (exit $ac_status); } >/dev/null; then
14848 if test -s conftest.err; then
14849 ac_cpp_err=$ac_c_preproc_warn_flag
14856 if test -z "$ac_cpp_err"; then
14857 ac_cv_header_stdc=yes
14859 echo "$as_me: failed program was:" >&5
14860 cat conftest.$ac_ext >&5
14861 ac_cv_header_stdc=no
14863 rm -f conftest.err conftest.$ac_ext
14865 if test $ac_cv_header_stdc = yes; then
14866 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14867 cat >conftest.$ac_ext <<_ACEOF
14868 #line 14868 "configure"
14869 #include "confdefs.h"
14870 #include <string.h>
14873 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14874 egrep "memchr" >/dev/null 2>&1; then
14877 ac_cv_header_stdc=no
14883 if test $ac_cv_header_stdc = yes; then
14884 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14885 cat >conftest.$ac_ext <<_ACEOF
14886 #line 14886 "configure"
14887 #include "confdefs.h"
14888 #include <stdlib.h>
14891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14892 egrep "free" >/dev/null 2>&1; then
14895 ac_cv_header_stdc=no
14901 if test $ac_cv_header_stdc = yes; then
14902 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14903 if test "$cross_compiling" = yes; then
14906 cat >conftest.$ac_ext <<_ACEOF
14907 #line 14907 "configure"
14908 #include "confdefs.h"
14910 #if ((' ' & 0x0FF) == 0x020)
14911 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14912 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14914 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14915 || ('j' <= (c) && (c) <= 'r') \
14916 || ('s' <= (c) && (c) <= 'z'))
14917 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14920 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14925 for (i = 0; i < 256; i++)
14926 if (XOR (islower (i), ISLOWER (i))
14927 || toupper (i) != TOUPPER (i))
14928 $ac_main_return(2);
14929 $ac_main_return (0);
14932 rm -f conftest$ac_exeext
14933 if { (eval echo "$as_me:14933: \"$ac_link\"") >&5
14934 (eval $ac_link) 2>&5
14936 echo "$as_me:14936: \$? = $ac_status" >&5
14937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14938 { (eval echo "$as_me:14938: \"$ac_try\"") >&5
14939 (eval $ac_try) 2>&5
14941 echo "$as_me:14941: \$? = $ac_status" >&5
14942 (exit $ac_status); }; }; then
14945 echo "$as_me: program exited with status $ac_status" >&5
14946 echo "$as_me: failed program was:" >&5
14947 cat conftest.$ac_ext >&5
14948 ac_cv_header_stdc=no
14950 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14954 echo "$as_me:14954: result: $ac_cv_header_stdc" >&5
14955 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14956 if test $ac_cv_header_stdc = yes; then
14958 cat >>confdefs.h <<\EOF
14959 #define STDC_HEADERS 1
14964 ac_header_dirent=no
14965 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14966 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14967 echo "$as_me:14967: checking for $ac_hdr that defines DIR" >&5
14968 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14969 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14970 echo $ECHO_N "(cached) $ECHO_C" >&6
14972 cat >conftest.$ac_ext <<_ACEOF
14973 #line 14973 "configure"
14974 #include "confdefs.h"
14975 #include <sys/types.h>
14987 rm -f conftest.$ac_objext
14988 if { (eval echo "$as_me:14988: \"$ac_compile\"") >&5
14989 (eval $ac_compile) 2>&5
14991 echo "$as_me:14991: \$? = $ac_status" >&5
14992 (exit $ac_status); } &&
14993 { ac_try='test -s conftest.$ac_objext'
14994 { (eval echo "$as_me:14994: \"$ac_try\"") >&5
14995 (eval $ac_try) 2>&5
14997 echo "$as_me:14997: \$? = $ac_status" >&5
14998 (exit $ac_status); }; }; then
14999 eval "$as_ac_Header=yes"
15001 echo "$as_me: failed program was:" >&5
15002 cat conftest.$ac_ext >&5
15003 eval "$as_ac_Header=no"
15005 rm -f conftest.$ac_objext conftest.$ac_ext
15007 echo "$as_me:15007: result: `eval echo '${'$as_ac_Header'}'`" >&5
15008 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15009 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15010 cat >>confdefs.h <<EOF
15011 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15014 ac_header_dirent=$ac_hdr; break
15018 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15019 if test $ac_header_dirent = dirent.h; then
15020 echo "$as_me:15020: checking for opendir in -ldir" >&5
15021 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15022 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15023 echo $ECHO_N "(cached) $ECHO_C" >&6
15025 ac_check_lib_save_LIBS=$LIBS
15027 cat >conftest.$ac_ext <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15031 /* Override any gcc2 internal prototype to avoid an error. */
15035 /* We use char because int might match the return type of a gcc2
15036 builtin and then its argument prototype would still apply. */
15046 rm -f conftest.$ac_objext conftest$ac_exeext
15047 if { (eval echo "$as_me:15047: \"$ac_link\"") >&5
15048 (eval $ac_link) 2>&5
15050 echo "$as_me:15050: \$? = $ac_status" >&5
15051 (exit $ac_status); } &&
15052 { ac_try='test -s conftest$ac_exeext'
15053 { (eval echo "$as_me:15053: \"$ac_try\"") >&5
15054 (eval $ac_try) 2>&5
15056 echo "$as_me:15056: \$? = $ac_status" >&5
15057 (exit $ac_status); }; }; then
15058 ac_cv_lib_dir_opendir=yes
15060 echo "$as_me: failed program was:" >&5
15061 cat conftest.$ac_ext >&5
15062 ac_cv_lib_dir_opendir=no
15064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15065 LIBS=$ac_check_lib_save_LIBS
15067 echo "$as_me:15067: result: $ac_cv_lib_dir_opendir" >&5
15068 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15069 if test $ac_cv_lib_dir_opendir = yes; then
15074 echo "$as_me:15074: checking for opendir in -lx" >&5
15075 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15076 if test "${ac_cv_lib_x_opendir+set}" = set; then
15077 echo $ECHO_N "(cached) $ECHO_C" >&6
15079 ac_check_lib_save_LIBS=$LIBS
15081 cat >conftest.$ac_ext <<_ACEOF
15082 #line 15082 "configure"
15083 #include "confdefs.h"
15085 /* Override any gcc2 internal prototype to avoid an error. */
15089 /* We use char because int might match the return type of a gcc2
15090 builtin and then its argument prototype would still apply. */
15100 rm -f conftest.$ac_objext conftest$ac_exeext
15101 if { (eval echo "$as_me:15101: \"$ac_link\"") >&5
15102 (eval $ac_link) 2>&5
15104 echo "$as_me:15104: \$? = $ac_status" >&5
15105 (exit $ac_status); } &&
15106 { ac_try='test -s conftest$ac_exeext'
15107 { (eval echo "$as_me:15107: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15110 echo "$as_me:15110: \$? = $ac_status" >&5
15111 (exit $ac_status); }; }; then
15112 ac_cv_lib_x_opendir=yes
15114 echo "$as_me: failed program was:" >&5
15115 cat conftest.$ac_ext >&5
15116 ac_cv_lib_x_opendir=no
15118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15119 LIBS=$ac_check_lib_save_LIBS
15121 echo "$as_me:15121: result: $ac_cv_lib_x_opendir" >&5
15122 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15123 if test $ac_cv_lib_x_opendir = yes; then
15129 echo "$as_me:15129: checking whether time.h and sys/time.h may both be included" >&5
15130 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15131 if test "${ac_cv_header_time+set}" = set; then
15132 echo $ECHO_N "(cached) $ECHO_C" >&6
15134 cat >conftest.$ac_ext <<_ACEOF
15135 #line 15135 "configure"
15136 #include "confdefs.h"
15137 #include <sys/types.h>
15138 #include <sys/time.h>
15144 if ((struct tm *) 0)
15150 rm -f conftest.$ac_objext
15151 if { (eval echo "$as_me:15151: \"$ac_compile\"") >&5
15152 (eval $ac_compile) 2>&5
15154 echo "$as_me:15154: \$? = $ac_status" >&5
15155 (exit $ac_status); } &&
15156 { ac_try='test -s conftest.$ac_objext'
15157 { (eval echo "$as_me:15157: \"$ac_try\"") >&5
15158 (eval $ac_try) 2>&5
15160 echo "$as_me:15160: \$? = $ac_status" >&5
15161 (exit $ac_status); }; }; then
15162 ac_cv_header_time=yes
15164 echo "$as_me: failed program was:" >&5
15165 cat conftest.$ac_ext >&5
15166 ac_cv_header_time=no
15168 rm -f conftest.$ac_objext conftest.$ac_ext
15170 echo "$as_me:15170: result: $ac_cv_header_time" >&5
15171 echo "${ECHO_T}$ac_cv_header_time" >&6
15172 if test $ac_cv_header_time = yes; then
15174 cat >>confdefs.h <<\EOF
15175 #define TIME_WITH_SYS_TIME 1
15180 ### checks for compiler characteristics
15182 ac_cpp='$CPP $CPPFLAGS'
15183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15186 ac_main_return=return
15188 echo "$as_me:15188: checking for an ANSI C-conforming const" >&5
15189 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15190 if test "${ac_cv_c_const+set}" = set; then
15191 echo $ECHO_N "(cached) $ECHO_C" >&6
15193 cat >conftest.$ac_ext <<_ACEOF
15194 #line 15194 "configure"
15195 #include "confdefs.h"
15200 /* FIXME: Include the comments suggested by Paul. */
15201 #ifndef __cplusplus
15202 /* Ultrix mips cc rejects this. */
15203 typedef int charset[2];
15205 /* SunOS 4.1.1 cc rejects this. */
15206 char const *const *ccp;
15208 /* NEC SVR4.0.2 mips cc rejects this. */
15209 struct point {int x, y;};
15210 static struct point const zero = {0,0};
15211 /* AIX XL C 1.02.0.0 rejects this.
15212 It does not let you subtract one const X* pointer from another in
15213 an arm of an if-expression whose if-part is not a constant
15215 const char *g = "string";
15216 ccp = &g + (g ? g-g : 0);
15217 /* HPUX 7.0 cc rejects these. */
15220 ccp = (char const *const *) p;
15221 { /* SCO 3.2v4 cc rejects this. */
15223 char const *s = 0 ? (char *) 0 : (char const *) 0;
15227 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15228 int x[] = {25, 17};
15229 const int *foo = &x[0];
15232 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15233 typedef const int *iptr;
15237 { /* AIX XL C 1.02.0.0 rejects this saying
15238 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15239 struct s { int j; const int *ap[3]; };
15240 struct s *b; b->j = 5;
15242 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15243 const int foo = 10;
15251 rm -f conftest.$ac_objext
15252 if { (eval echo "$as_me:15252: \"$ac_compile\"") >&5
15253 (eval $ac_compile) 2>&5
15255 echo "$as_me:15255: \$? = $ac_status" >&5
15256 (exit $ac_status); } &&
15257 { ac_try='test -s conftest.$ac_objext'
15258 { (eval echo "$as_me:15258: \"$ac_try\"") >&5
15259 (eval $ac_try) 2>&5
15261 echo "$as_me:15261: \$? = $ac_status" >&5
15262 (exit $ac_status); }; }; then
15265 echo "$as_me: failed program was:" >&5
15266 cat conftest.$ac_ext >&5
15269 rm -f conftest.$ac_objext conftest.$ac_ext
15271 echo "$as_me:15271: result: $ac_cv_c_const" >&5
15272 echo "${ECHO_T}$ac_cv_c_const" >&6
15273 if test $ac_cv_c_const = no; then
15275 cat >>confdefs.h <<\EOF
15281 ### Checks for external-data
15283 echo "$as_me:15283: checking if data-only library module links" >&5
15284 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15285 if test "${cf_cv_link_dataonly+set}" = set; then
15286 echo $ECHO_N "(cached) $ECHO_C" >&6
15290 cat >conftest.$ac_ext <<EOF
15291 #line 15291 "configure"
15292 int testdata[3] = { 123, 456, 789 };
15294 if { (eval echo "$as_me:15294: \"$ac_compile\"") >&5
15295 (eval $ac_compile) 2>&5
15297 echo "$as_me:15297: \$? = $ac_status" >&5
15298 (exit $ac_status); } ; then
15299 mv conftest.o data.o && \
15300 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15302 rm -f conftest.$ac_ext data.o
15303 cat >conftest.$ac_ext <<EOF
15304 #line 15304 "configure"
15308 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
15310 extern int testdata[3];
15311 return testdata[0] == 123
15312 && testdata[1] == 456
15313 && testdata[2] == 789;
15317 if { (eval echo "$as_me:15317: \"$ac_compile\"") >&5
15318 (eval $ac_compile) 2>&5
15320 echo "$as_me:15320: \$? = $ac_status" >&5
15321 (exit $ac_status); }; then
15322 mv conftest.o func.o && \
15323 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15325 rm -f conftest.$ac_ext func.o
15326 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15327 cf_saveLIBS="$LIBS"
15328 LIBS="conftest.a $LIBS"
15329 if test "$cross_compiling" = yes; then
15330 cf_cv_link_dataonly=unknown
15332 cat >conftest.$ac_ext <<_ACEOF
15333 #line 15333 "configure"
15334 #include "confdefs.h"
15338 extern int testfunc();
15339 ${cf_cv_main_return:-return} (!testfunc());
15343 rm -f conftest$ac_exeext
15344 if { (eval echo "$as_me:15344: \"$ac_link\"") >&5
15345 (eval $ac_link) 2>&5
15347 echo "$as_me:15347: \$? = $ac_status" >&5
15348 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15349 { (eval echo "$as_me:15349: \"$ac_try\"") >&5
15350 (eval $ac_try) 2>&5
15352 echo "$as_me:15352: \$? = $ac_status" >&5
15353 (exit $ac_status); }; }; then
15354 cf_cv_link_dataonly=yes
15356 echo "$as_me: program exited with status $ac_status" >&5
15357 echo "$as_me: failed program was:" >&5
15358 cat conftest.$ac_ext >&5
15359 cf_cv_link_dataonly=no
15361 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15363 LIBS="$cf_saveLIBS"
15367 echo "$as_me:15367: result: $cf_cv_link_dataonly" >&5
15368 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15370 if test "$cf_cv_link_dataonly" = no ; then
15372 cat >>confdefs.h <<\EOF
15373 #define BROKEN_LINKER 1
15379 ### Checks for library functions.
15385 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15386 echo "$as_me:15386: checking for $ac_header" >&5
15387 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15389 echo $ECHO_N "(cached) $ECHO_C" >&6
15391 cat >conftest.$ac_ext <<_ACEOF
15392 #line 15392 "configure"
15393 #include "confdefs.h"
15394 #include <$ac_header>
15396 if { (eval echo "$as_me:15396: \"$ac_cpp conftest.$ac_ext\"") >&5
15397 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15399 egrep -v '^ *\+' conftest.er1 >conftest.err
15401 cat conftest.err >&5
15402 echo "$as_me:15402: \$? = $ac_status" >&5
15403 (exit $ac_status); } >/dev/null; then
15404 if test -s conftest.err; then
15405 ac_cpp_err=$ac_c_preproc_warn_flag
15412 if test -z "$ac_cpp_err"; then
15413 eval "$as_ac_Header=yes"
15415 echo "$as_me: failed program was:" >&5
15416 cat conftest.$ac_ext >&5
15417 eval "$as_ac_Header=no"
15419 rm -f conftest.err conftest.$ac_ext
15421 echo "$as_me:15421: result: `eval echo '${'$as_ac_Header'}'`" >&5
15422 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15423 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15424 cat >>confdefs.h <<EOF
15425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15431 echo "$as_me:15431: checking for working mkstemp" >&5
15432 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15433 if test "${cf_cv_func_mkstemp+set}" = set; then
15434 echo $ECHO_N "(cached) $ECHO_C" >&6
15438 if test "$cross_compiling" = yes; then
15439 cf_cv_func_mkstemp=maybe
15441 cat >conftest.$ac_ext <<_ACEOF
15442 #line 15442 "configure"
15443 #include "confdefs.h"
15445 #include <sys/types.h>
15446 #ifdef HAVE_UNISTD_H
15447 #include <unistd.h>
15449 #include <stdlib.h>
15451 #include <string.h>
15452 #include <sys/stat.h>
15455 char *tmpl = "conftestXXXXXX";
15463 for (n = 0; n < 2; ++n) {
15464 strcpy(name[n], tmpl);
15465 if ((fd = mkstemp(name[n])) >= 0) {
15466 if (!strcmp(name[n], tmpl)
15467 || stat(name[n], &sb) != 0
15468 || (sb.st_mode & S_IFMT) != S_IFREG
15469 || (sb.st_mode & 077) != 0) {
15476 && !strcmp(name[0], name[1]))
15478 ${cf_cv_main_return:-return}(result);
15482 rm -f conftest$ac_exeext
15483 if { (eval echo "$as_me:15483: \"$ac_link\"") >&5
15484 (eval $ac_link) 2>&5
15486 echo "$as_me:15486: \$? = $ac_status" >&5
15487 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15488 { (eval echo "$as_me:15488: \"$ac_try\"") >&5
15489 (eval $ac_try) 2>&5
15491 echo "$as_me:15491: \$? = $ac_status" >&5
15492 (exit $ac_status); }; }; then
15493 cf_cv_func_mkstemp=yes
15496 echo "$as_me: program exited with status $ac_status" >&5
15497 echo "$as_me: failed program was:" >&5
15498 cat conftest.$ac_ext >&5
15499 cf_cv_func_mkstemp=no
15502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15506 echo "$as_me:15506: result: $cf_cv_func_mkstemp" >&5
15507 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15508 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
15509 echo "$as_me:15509: checking for mkstemp" >&5
15510 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15511 if test "${ac_cv_func_mkstemp+set}" = set; then
15512 echo $ECHO_N "(cached) $ECHO_C" >&6
15514 cat >conftest.$ac_ext <<_ACEOF
15515 #line 15515 "configure"
15516 #include "confdefs.h"
15517 #define mkstemp autoconf_temporary
15518 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15525 /* We use char because int might match the return type of a gcc2
15526 builtin and then its argument prototype would still apply. */
15527 char mkstemp (void);
15533 /* The GNU C library defines stubs for functions which it implements
15534 to always fail with ENOSYS. Some functions are actually named
15535 something starting with __ and the normal name is an alias. */
15536 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15537 #error found stub for mkstemp
15545 rm -f conftest.$ac_objext conftest$ac_exeext
15546 if { (eval echo "$as_me:15546: \"$ac_link\"") >&5
15547 (eval $ac_link) 2>&5
15549 echo "$as_me:15549: \$? = $ac_status" >&5
15550 (exit $ac_status); } &&
15551 { ac_try='test -s conftest$ac_exeext'
15552 { (eval echo "$as_me:15552: \"$ac_try\"") >&5
15553 (eval $ac_try) 2>&5
15555 echo "$as_me:15555: \$? = $ac_status" >&5
15556 (exit $ac_status); }; }; then
15557 ac_cv_func_mkstemp=yes
15559 echo "$as_me: failed program was:" >&5
15560 cat conftest.$ac_ext >&5
15561 ac_cv_func_mkstemp=no
15563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15565 echo "$as_me:15565: result: $ac_cv_func_mkstemp" >&5
15566 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15569 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15571 cat >>confdefs.h <<\EOF
15572 #define HAVE_MKSTEMP 1
15577 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15578 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15579 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15583 if test "$cf_with_ada" != "no" ; then
15585 cf_ada_make=gnatmake
15587 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15588 set dummy $cf_ada_make; ac_word=$2
15589 echo "$as_me:15589: checking for $ac_word" >&5
15590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15591 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
15592 echo $ECHO_N "(cached) $ECHO_C" >&6
15594 if test -n "$gnatmake_exists"; then
15595 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
15597 ac_save_IFS=$IFS; IFS=$ac_path_separator
15599 for ac_dir in $ac_dummy; do
15601 test -z "$ac_dir" && ac_dir=.
15602 $as_executable_p "$ac_dir/$ac_word" || continue
15603 ac_cv_prog_gnatmake_exists="yes"
15604 echo "$as_me:15604: found $ac_dir/$ac_word" >&5
15608 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
15611 gnatmake_exists=$ac_cv_prog_gnatmake_exists
15612 if test -n "$gnatmake_exists"; then
15613 echo "$as_me:15613: result: $gnatmake_exists" >&5
15614 echo "${ECHO_T}$gnatmake_exists" >&6
15616 echo "$as_me:15616: result: no" >&5
15617 echo "${ECHO_T}no" >&6
15620 if test "$ac_cv_prog_gnatmake_exists" = no; then
15622 cf_cv_prog_gnat_correct=no
15624 # Extract the first word of "gprconfig", so it can be a program name with args.
15625 set dummy gprconfig; ac_word=$2
15626 echo "$as_me:15626: checking for $ac_word" >&5
15627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15628 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
15629 echo $ECHO_N "(cached) $ECHO_C" >&6
15631 if test -n "$gprconfig_exists"; then
15632 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
15634 ac_save_IFS=$IFS; IFS=$ac_path_separator
15636 for ac_dir in $ac_dummy; do
15638 test -z "$ac_dir" && ac_dir=.
15639 $as_executable_p "$ac_dir/$ac_word" || continue
15640 ac_cv_prog_gprconfig_exists="yes"
15641 echo "$as_me:15641: found $ac_dir/$ac_word" >&5
15645 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
15648 gprconfig_exists=$ac_cv_prog_gprconfig_exists
15649 if test -n "$gprconfig_exists"; then
15650 echo "$as_me:15650: result: $gprconfig_exists" >&5
15651 echo "${ECHO_T}$gprconfig_exists" >&6
15653 echo "$as_me:15653: result: no" >&5
15654 echo "${ECHO_T}no" >&6
15657 if test "$ac_cv_prog_gprconfig_exists" = yes
15659 rm -rf conftest* *~conftest*
15660 if mkdir conftest.src
15664 for cf_gprconfig in Ada C
15666 echo "$as_me:15666: checking for gprconfig name for $cf_gprconfig" >&5
15667 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
15668 if test $cf_gprconfig = C
15670 for cf_gprconfig_param in \
15671 $cf_gprconfig,,,,GNATGCC \
15672 $cf_gprconfig,,,,GCC \
15675 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15676 test -n "$cf_gprconfig_value" && break
15679 cf_gprconfig_param=$cf_gprconfig
15680 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15682 if test -n "$cf_gprconfig_value"
15684 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
15685 echo "$as_me:15685: result: $cf_gprconfig_value" >&5
15686 echo "${ECHO_T}$cf_gprconfig_value" >&6
15688 echo "$as_me:15688: result: missing" >&5
15689 echo "${ECHO_T}missing" >&6
15695 rm -rf conftest* *~conftest*
15698 # gprconfig is newer than gnatmake; we can continue...
15701 if test "x$cf_ada_config" != "x#"
15704 echo "$as_me:15704: checking for gnat version" >&5
15705 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15706 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
15707 grep '[0-9].[0-9][0-9]*' |\
15708 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15709 echo "$as_me:15709: result: $cf_gnat_version" >&5
15710 echo "${ECHO_T}$cf_gnat_version" >&6
15712 case $cf_gnat_version in
15713 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
15714 cf_cv_prog_gnat_correct=yes
15717 { echo "$as_me:15717: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
15718 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
15719 cf_cv_prog_gnat_correct=no
15723 # Extract the first word of "m4", so it can be a program name with args.
15724 set dummy m4; ac_word=$2
15725 echo "$as_me:15725: checking for $ac_word" >&5
15726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15727 if test "${ac_cv_prog_M4_exists+set}" = set; then
15728 echo $ECHO_N "(cached) $ECHO_C" >&6
15730 if test -n "$M4_exists"; then
15731 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15733 ac_save_IFS=$IFS; IFS=$ac_path_separator
15735 for ac_dir in $ac_dummy; do
15737 test -z "$ac_dir" && ac_dir=.
15738 $as_executable_p "$ac_dir/$ac_word" || continue
15739 ac_cv_prog_M4_exists="yes"
15740 echo "$as_me:15740: found $ac_dir/$ac_word" >&5
15744 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15747 M4_exists=$ac_cv_prog_M4_exists
15748 if test -n "$M4_exists"; then
15749 echo "$as_me:15749: result: $M4_exists" >&5
15750 echo "${ECHO_T}$M4_exists" >&6
15752 echo "$as_me:15752: result: no" >&5
15753 echo "${ECHO_T}no" >&6
15756 if test "$ac_cv_prog_M4_exists" = no; then
15757 cf_cv_prog_gnat_correct=no
15758 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15760 if test "$cf_cv_prog_gnat_correct" = yes; then
15761 echo "$as_me:15761: checking if GNAT works" >&5
15762 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15764 rm -rf conftest* *~conftest*
15765 cat >>conftest.ads <<CF_EOF
15766 procedure conftest;
15768 cat >>conftest.adb <<CF_EOF
15771 procedure conftest is
15773 Text_IO.Put ("Hello World");
15775 GNAT.OS_Lib.OS_Exit (0);
15778 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15779 if ( ./conftest 1>&5 2>&1 ) ; then
15780 cf_cv_prog_gnat_correct=yes
15782 cf_cv_prog_gnat_correct=no
15785 cf_cv_prog_gnat_correct=no
15787 rm -rf conftest* *~conftest*
15789 echo "$as_me:15789: result: $cf_cv_prog_gnat_correct" >&5
15790 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15793 cf_cv_prog_gnat_correct=no
15797 if test "$cf_cv_prog_gnat_correct" = yes; then
15799 echo "$as_me:15799: checking optimization options for ADAFLAGS" >&5
15800 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
15804 ADAFLAGS="$ADAFLAGS -g"
15810 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
15812 ADAFLAGS="$ADAFLAGS $cf_O_flag"
15816 echo "$as_me:15816: result: $ADAFLAGS" >&5
15817 echo "${ECHO_T}$ADAFLAGS" >&6
15819 echo "$as_me:15819: checking if GNATPREP supports -T option" >&5
15820 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
15821 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
15822 echo $ECHO_N "(cached) $ECHO_C" >&6
15825 cf_cv_gnatprep_opt_t=no
15826 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
15829 echo "$as_me:15829: result: $cf_cv_gnatprep_opt_t" >&5
15830 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
15831 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
15833 echo "$as_me:15833: checking if GNAT supports generics" >&5
15834 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
15835 case $cf_gnat_version in
15837 cf_gnat_generics=yes
15840 cf_gnat_generics=no
15843 echo "$as_me:15843: result: $cf_gnat_generics" >&5
15844 echo "${ECHO_T}$cf_gnat_generics" >&6
15846 if test "$cf_gnat_generics" = yes
15848 cf_compile_generics=generics
15849 cf_generic_objects="\${GENOBJS}"
15851 cf_compile_generics=
15852 cf_generic_objects=
15855 echo "$as_me:15855: checking if GNAT supports SIGINT" >&5
15856 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
15857 if test "${cf_cv_gnat_sigint+set}" = set; then
15858 echo $ECHO_N "(cached) $ECHO_C" >&6
15861 rm -rf conftest* *~conftest*
15862 cat >>conftest.ads <<CF_EOF
15863 with Ada.Interrupts.Names;
15865 package ConfTest is
15867 pragma Warnings (Off); -- the next pragma exists since 3.11p
15868 pragma Unreserve_All_Interrupts;
15869 pragma Warnings (On);
15871 protected Process is
15873 function Continue return Boolean;
15874 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
15876 Done : Boolean := False;
15881 cat >>conftest.adb <<CF_EOF
15882 package body ConfTest is
15883 protected body Process is
15888 function Continue return Boolean is
15895 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15896 cf_cv_gnat_sigint=yes
15898 cf_cv_gnat_sigint=no
15900 rm -rf conftest* *~conftest*
15903 echo "$as_me:15903: result: $cf_cv_gnat_sigint" >&5
15904 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
15906 if test $cf_cv_gnat_sigint = yes ; then
15909 USE_GNAT_SIGINT="#"
15912 cf_gnat_libraries=no
15913 cf_gnat_projects=no
15915 if test "$enable_gnat_projects" != no ; then
15916 echo "$as_me:15916: checking if GNAT supports project files" >&5
15917 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
15918 case $cf_gnat_version in
15922 case $cf_cv_system_name in
15926 rm -rf conftest* *~conftest*
15927 if mkdir conftest.src conftest.bin conftest.lib
15930 rm -rf conftest* *~conftest*
15931 cat >>library.gpr <<CF_EOF
15933 Kind := External ("LIB_KIND");
15934 for Library_Name use "ConfTest";
15935 for Object_Dir use ".";
15936 for Library_ALI_Dir use External("LIBRARY_DIR");
15937 for Library_Version use External ("SONAME");
15938 for Library_Kind use Kind;
15939 for Library_Dir use External("BUILD_DIR");
15940 Source_Dir := External ("SOURCE_DIR");
15941 for Source_Dirs use (Source_Dir);
15944 cat >>confpackage.ads <<CF_EOF
15945 package ConfPackage is
15946 procedure conftest;
15949 cat >>confpackage.adb <<CF_EOF
15951 package body ConfPackage is
15952 procedure conftest is
15954 Text_IO.Put ("Hello World");
15959 if ( $cf_ada_make $ADAFLAGS \
15961 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
15962 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
15963 -XSOURCE_DIR=`pwd` \
15964 -XSONAME=libConfTest.so.1 \
15965 -XLIB_KIND=static 1>&5 2>&1 ) ; then
15966 cf_gnat_projects=yes
15970 if test -f conftest.lib/confpackage.ali
15972 cf_gnat_libraries=yes
15974 rm -rf conftest* *~conftest*
15979 echo "$as_me:15979: result: $cf_gnat_projects" >&5
15980 echo "${ECHO_T}$cf_gnat_projects" >&6
15981 fi # enable_gnat_projects
15983 if test $cf_gnat_projects = yes
15985 echo "$as_me:15985: checking if GNAT supports libraries" >&5
15986 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
15987 echo "$as_me:15987: result: $cf_gnat_libraries" >&5
15988 echo "${ECHO_T}$cf_gnat_libraries" >&6
15991 if test "$cf_gnat_projects" = yes
15993 USE_OLD_MAKERULES="#"
15994 USE_GNAT_PROJECTS=""
15996 USE_OLD_MAKERULES=""
15997 USE_GNAT_PROJECTS="#"
16000 if test "$cf_gnat_libraries" = yes
16002 USE_GNAT_LIBRARIES=""
16004 USE_GNAT_LIBRARIES="#"
16007 echo "$as_me:16007: checking for ada-compiler" >&5
16008 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
16010 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16011 if test "${with_ada_compiler+set}" = set; then
16012 withval="$with_ada_compiler"
16013 cf_ada_compiler=$withval
16015 cf_ada_compiler=gnatmake
16018 echo "$as_me:16018: result: $cf_ada_compiler" >&5
16019 echo "${ECHO_T}$cf_ada_compiler" >&6
16021 cf_ada_package=terminal_interface
16023 echo "$as_me:16023: checking for ada-include" >&5
16024 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
16026 # Check whether --with-ada-include or --without-ada-include was given.
16027 if test "${with_ada_include+set}" = set; then
16028 withval="$with_ada_include"
16031 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
16032 fi; if test -n "$prefix/share/ada/adainclude" ; then
16034 if test "x$prefix" != xNONE; then
16035 cf_path_syntax="$prefix"
16037 cf_path_syntax="$ac_default_prefix"
16040 case ".$withval" in
16041 (.\$\(*\)*|.\'*\'*)
16045 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16047 (.\${*prefix}*|.\${*dir}*)
16048 eval withval="$withval"
16049 case ".$withval" in
16051 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16056 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16059 { { echo "$as_me:16059: error: expected a pathname, not \"$withval\"" >&5
16060 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16061 { (exit 1); exit 1; }; }
16066 eval ADA_INCLUDE="$withval"
16068 echo "$as_me:16068: result: $ADA_INCLUDE" >&5
16069 echo "${ECHO_T}$ADA_INCLUDE" >&6
16071 echo "$as_me:16071: checking for ada-objects" >&5
16072 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
16074 # Check whether --with-ada-objects or --without-ada-objects was given.
16075 if test "${with_ada_objects+set}" = set; then
16076 withval="$with_ada_objects"
16079 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
16080 fi; if test -n "$prefix/lib/ada/adalib" ; then
16082 if test "x$prefix" != xNONE; then
16083 cf_path_syntax="$prefix"
16085 cf_path_syntax="$ac_default_prefix"
16088 case ".$withval" in
16089 (.\$\(*\)*|.\'*\'*)
16093 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16095 (.\${*prefix}*|.\${*dir}*)
16096 eval withval="$withval"
16097 case ".$withval" in
16099 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16104 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16107 { { echo "$as_me:16107: error: expected a pathname, not \"$withval\"" >&5
16108 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16109 { (exit 1); exit 1; }; }
16114 eval ADA_OBJECTS="$withval"
16116 echo "$as_me:16116: result: $ADA_OBJECTS" >&5
16117 echo "${ECHO_T}$ADA_OBJECTS" >&6
16119 echo "$as_me:16119: checking if an Ada95 shared-library should be built" >&5
16120 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
16122 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
16123 if test "${with_ada_sharedlib+set}" = set; then
16124 withval="$with_ada_sharedlib"
16125 with_ada_sharedlib=$withval
16127 with_ada_sharedlib=no
16129 echo "$as_me:16129: result: $with_ada_sharedlib" >&5
16130 echo "${ECHO_T}$with_ada_sharedlib" >&6
16132 if test "x$with_ada_sharedlib" != xno
16134 if test "x$cf_gnat_projects" != xyes
16136 { echo "$as_me:16136: WARNING: disabling shared-library since GNAT projects are not supported" >&5
16137 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
16138 with_ada_sharedlib=no
16142 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
16143 MAKE_ADA_SHAREDLIB="#"
16145 if test "x$with_ada_sharedlib" != xno
16147 MAKE_ADA_SHAREDLIB=
16148 if test "x$with_ada_sharedlib" != xyes
16150 ADA_SHAREDLIB="$with_ada_sharedlib"
16155 { { echo "$as_me:16155: error: No usable Ada compiler found" >&5
16156 echo "$as_me: error: No usable Ada compiler found" >&2;}
16157 { (exit 1); exit 1; }; }
16160 { { echo "$as_me:16160: error: The Ada compiler is needed for this package" >&5
16161 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
16162 { (exit 1); exit 1; }; }
16165 ################################################################################
16172 ### Construct the list of include-directories to be generated
16174 if test "$srcdir" != "."; then
16175 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16177 CPPFLAGS="-I../include $CPPFLAGS"
16178 if test "$srcdir" != "."; then
16179 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
16181 CPPFLAGS="-I. $CPPFLAGS"
16183 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
16184 if test "$srcdir" != "."; then
16185 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16187 if test "$GCC" != yes; then
16188 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16189 elif test "$includedir" != "/usr/include"; then
16190 if test "$includedir" = '${prefix}/include' ; then
16191 if test x$prefix != x/usr ; then
16192 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16195 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16199 ### Build up pieces for makefile rules
16200 echo "$as_me:16200: checking default library suffix" >&5
16201 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16203 case $DFT_LWR_MODEL in
16204 (libtool) DFT_ARG_SUFFIX='' ;;
16205 (normal) DFT_ARG_SUFFIX='' ;;
16206 (debug) DFT_ARG_SUFFIX='_g' ;;
16207 (profile) DFT_ARG_SUFFIX='_p' ;;
16208 (shared) DFT_ARG_SUFFIX='' ;;
16210 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16211 echo "$as_me:16211: result: $DFT_ARG_SUFFIX" >&5
16212 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16214 echo "$as_me:16214: checking default library-dependency suffix" >&5
16215 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16217 case X$DFT_LWR_MODEL in
16219 DFT_LIB_SUFFIX='.la'
16220 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16223 DFT_LIB_SUFFIX='_g.a'
16224 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16227 DFT_LIB_SUFFIX='_p.a'
16228 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16231 case $cf_cv_system_name in
16233 DFT_LIB_SUFFIX='.so'
16234 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16236 (cygwin*|msys*|mingw*)
16237 DFT_LIB_SUFFIX='.dll'
16238 DFT_DEP_SUFFIX='.dll.a'
16241 DFT_LIB_SUFFIX='.dylib'
16242 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16247 DFT_LIB_SUFFIX='.so'
16248 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16251 DFT_LIB_SUFFIX='.sl'
16252 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16257 DFT_LIB_SUFFIX='.so'
16258 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16263 DFT_LIB_SUFFIX='.a'
16264 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16267 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
16269 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
16270 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
16272 echo "$as_me:16272: result: $DFT_DEP_SUFFIX" >&5
16273 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16275 echo "$as_me:16275: checking default object directory" >&5
16276 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16278 case $DFT_LWR_MODEL in
16279 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
16280 (normal) DFT_OBJ_SUBDIR='objects' ;;
16281 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
16282 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
16284 case $cf_cv_system_name in
16286 DFT_OBJ_SUBDIR='objects' ;;
16288 DFT_OBJ_SUBDIR='obj_s' ;;
16291 echo "$as_me:16291: result: $DFT_OBJ_SUBDIR" >&5
16292 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16294 ### Set up low-level terminfo dependencies for makefiles.
16296 if test "$DFT_LWR_MODEL" = shared ; then
16297 case $cf_cv_system_name in
16299 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16302 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
16307 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
16309 ### Construct the list of subdirectories for which we'll customize makefiles
16310 ### with the appropriate compile-rules.
16312 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
16314 cat >>confdefs.h <<EOF
16315 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
16318 ### Now that we're done running tests, add the compiler-warnings, if any
16323 cf_new_extra_cppflags=
16325 for cf_add_cflags in $EXTRA_CFLAGS
16327 case $cf_fix_cppflags in
16329 case $cf_add_cflags in
16330 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16331 case $cf_add_cflags in
16333 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16335 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16336 && test -z "${cf_tst_cflags}" \
16337 && cf_fix_cppflags=yes
16339 if test $cf_fix_cppflags = yes ; then
16341 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16342 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16345 elif test "${cf_tst_cflags}" = "\"'" ; then
16347 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16348 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16354 case "$CPPFLAGS" in
16358 case $cf_add_cflags in
16360 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16362 CPPFLAGS=`echo "$CPPFLAGS" | \
16363 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16364 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16369 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16370 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16377 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16378 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16385 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16386 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16388 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16390 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16391 && test -z "${cf_tst_cflags}" \
16392 && cf_fix_cppflags=no
16397 if test -n "$cf_new_cflags" ; then
16399 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16400 CFLAGS="${CFLAGS}$cf_new_cflags"
16404 if test -n "$cf_new_cppflags" ; then
16406 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16407 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16411 if test -n "$cf_new_extra_cppflags" ; then
16413 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16414 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16418 ################################################################################
16424 NCURSES_SHLIB2="sh -c"
16426 ADA_SUBDIRS="include gen src doc"
16427 if test "x$cf_with_tests" != "xno" ; then
16428 ADA_SUBDIRS="$ADA_SUBDIRS samples"
16430 for cf_dir in $ADA_SUBDIRS
16432 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16439 # match layout used by make-tar.sh
16440 ADAHTML_DIR=../doc/ada
16442 if test "x$cross_compiling" = xyes ; then
16443 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
16445 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
16448 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
16449 ac_config_commands="$ac_config_commands default"
16450 cat >confcache <<\_ACEOF
16451 # This file is a shell script that caches the results of configure
16452 # tests run on this system so they can be shared between configure
16453 # scripts and configure runs, see configure's option --config-cache.
16454 # It is not useful on other systems. If it contains results you don't
16455 # want to keep, you may remove or edit it.
16457 # config.status only pays attention to the cache file if you give it
16458 # the --recheck option to rerun configure.
16460 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16461 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16462 # following values.
16466 # The following way of writing the cache mishandles newlines in values,
16467 # but we know of no workaround that is simple, portable, and efficient.
16468 # So, don't put newlines in cache variables' values.
16469 # Ultrix sh set writes to stderr and can't be redirected directly,
16470 # and sets the high bit in the cache file unless we assign to the vars.
16473 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16475 # `set' does not quote correctly, so add quotes (double-quote
16476 # substitution turns \\\\ into \\, and sed turns \\ into \).
16479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16482 # `set' quotes correctly as required by POSIX, so do not add quotes.
16484 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16491 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16493 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16495 if cmp -s $cache_file confcache; then :; else
16496 if test -w $cache_file; then
16497 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16498 cat confcache >$cache_file
16500 echo "not updating unwritable cache $cache_file"
16505 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16506 # Let make expand exec_prefix.
16507 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16509 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16510 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16511 # trailing colons and then remove the whole line if VPATH becomes empty
16512 # (actually we leave an empty line to preserve line numbers).
16513 if test "x$srcdir" = x.; then
16514 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16515 s/:*\$(srcdir):*/:/;
16516 s/:*\${srcdir}:*/:/;
16518 s/^\([^=]*=[ ]*\):*/\1/;
16524 DEFS=-DHAVE_CONFIG_H
16526 : ${CONFIG_STATUS=./config.status}
16527 ac_clean_files_save=$ac_clean_files
16528 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16529 { echo "$as_me:16529: creating $CONFIG_STATUS" >&5
16530 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16531 cat >$CONFIG_STATUS <<_ACEOF
16533 # Generated automatically by configure.
16534 # Run this file to recreate the current configuration.
16535 # Compiler output produced by configure, useful for debugging
16536 # configure, is in config.log if it exists.
16539 SHELL=\${CONFIG_SHELL-$SHELL}
16540 ac_cs_invocation="\$0 \$@"
16544 cat >>$CONFIG_STATUS <<\_ACEOF
16545 # Be Bourne compatible
16546 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16549 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16553 # Name of the executable.
16554 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16556 if expr a : '\(a\)' >/dev/null 2>&1; then
16562 rm -f conf$$ conf$$.exe conf$$.file
16564 if ln -s conf$$.file conf$$ 2>/dev/null; then
16565 # We could just check for DJGPP; but this test a) works b) is more generic
16566 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16567 if test -f conf$$.exe; then
16568 # Don't use ln at all; we don't have any links
16573 elif ln conf$$.file conf$$ 2>/dev/null; then
16578 rm -f conf$$ conf$$.exe conf$$.file
16580 as_executable_p="test -f"
16582 # Support unset when possible.
16583 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16590 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16591 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16592 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16593 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16594 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16595 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16596 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16597 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16600 # We need space, tab and new line, in precisely that order.
16606 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16612 # Files that config.status was made for.
16613 if test -n "$ac_config_files"; then
16614 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16617 if test -n "$ac_config_headers"; then
16618 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16621 if test -n "$ac_config_links"; then
16622 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16625 if test -n "$ac_config_commands"; then
16626 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16629 cat >>$CONFIG_STATUS <<\EOF
16632 \`$as_me' instantiates files from templates according to the
16633 current configuration.
16635 Usage: $0 [OPTIONS] [FILE]...
16637 -h, --help print this help, then exit
16638 -V, --version print version number, then exit
16639 -d, --debug don't remove temporary files
16640 --recheck update $as_me by reconfiguring in the same conditions
16641 --file=FILE[:TEMPLATE]
16642 instantiate the configuration file FILE
16643 --header=FILE[:TEMPLATE]
16644 instantiate the configuration header FILE
16646 Configuration files:
16649 Configuration headers:
16652 Configuration commands:
16655 Report bugs to <dickey@invisible-island.net>."
16658 cat >>$CONFIG_STATUS <<EOF
16661 configured by $0, generated by GNU Autoconf 2.52.20181006,
16662 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16664 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16665 Free Software Foundation, Inc.
16666 This config.status script is free software; the Free Software Foundation
16667 gives unlimited permission to copy, distribute and modify it."
16672 cat >>$CONFIG_STATUS <<\EOF
16673 # If no file are specified by the user, then we need to provide default
16674 # value. By we need to know if files were specified by the user.
16680 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16681 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16683 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16687 *) # This is not an option, so the user has probably given explicit
16689 ac_need_defaults=false;;
16693 # Handling of the options.
16695 cat >>$CONFIG_STATUS <<EOF
16696 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16697 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16698 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16700 cat >>$CONFIG_STATUS <<\EOF
16701 --version | --vers* | -V )
16702 echo "$ac_cs_version"; exit 0 ;;
16704 # Conflict between --help and --header
16705 { { echo "$as_me:16705: error: ambiguous option: $1
16706 Try \`$0 --help' for more information." >&5
16707 echo "$as_me: error: ambiguous option: $1
16708 Try \`$0 --help' for more information." >&2;}
16709 { (exit 1); exit 1; }; };;
16710 --help | --hel | -h )
16711 echo "$ac_cs_usage"; exit 0 ;;
16712 --debug | --d* | -d )
16714 --file | --fil | --fi | --f )
16716 CONFIG_FILES="$CONFIG_FILES $1"
16717 ac_need_defaults=false;;
16718 --header | --heade | --head | --hea )
16720 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16721 ac_need_defaults=false;;
16723 # This is an error.
16724 -*) { { echo "$as_me:16724: error: unrecognized option: $1
16725 Try \`$0 --help' for more information." >&5
16726 echo "$as_me: error: unrecognized option: $1
16727 Try \`$0 --help' for more information." >&2;}
16728 { (exit 1); exit 1; }; } ;;
16730 *) ac_config_targets="$ac_config_targets $1" ;;
16739 ## ----------------------- ##
16740 ## Running config.status. ##
16741 ## ----------------------- ##
16743 This file was extended by $as_me 2.52.20181006, executed with
16744 CONFIG_FILES = $CONFIG_FILES
16745 CONFIG_HEADERS = $CONFIG_HEADERS
16746 CONFIG_LINKS = $CONFIG_LINKS
16747 CONFIG_COMMANDS = $CONFIG_COMMANDS
16748 > $ac_cs_invocation
16749 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16754 cat >>$CONFIG_STATUS <<EOF
16756 # INIT-COMMANDS section.
16759 ### Special initialization commands, used to pass information from the
16760 ### configuration-run into config.status
16763 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16764 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16765 LIB_NAME="$LIB_NAME"
16766 LIB_PREFIX="$LIB_PREFIX"
16767 LIB_SUFFIX="$LIB_SUFFIX"
16769 NCURSES_MAJOR="$NCURSES_MAJOR"
16770 NCURSES_MINOR="$NCURSES_MINOR"
16771 NCURSES_PATCH="$NCURSES_PATCH"
16772 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
16773 cf_cv_abi_version="$cf_cv_abi_version"
16774 cf_cv_rel_version="$cf_cv_rel_version"
16775 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16776 cf_cv_shared_soname='$cf_cv_shared_soname'
16777 cf_cv_shlib_version="$cf_cv_shlib_version"
16778 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16779 cf_cv_system_name="$cf_cv_system_name"
16785 cat >>$CONFIG_STATUS <<\EOF
16786 for ac_config_target in $ac_config_targets
16788 case "$ac_config_target" in
16789 # Handling of arguments.
16790 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16791 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
16792 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16793 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16794 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16795 *) { { echo "$as_me:16795: error: invalid argument: $ac_config_target" >&5
16796 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16797 { (exit 1); exit 1; }; };;
16801 # If the user did not use the arguments to specify the items to instantiate,
16802 # then the envvar interface is used. Set only those that are not.
16803 # We use the long form for the default assignment because of an extremely
16804 # bizarre bug on SunOS 4.1.3.
16805 if $ac_need_defaults; then
16806 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16807 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16808 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16811 # Create a temporary directory, and hook for its removal unless debugging.
16814 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16815 trap '{ (exit 1); exit 1; }' 1 2 13 15
16818 # Create a (secure) tmp directory for tmp files.
16821 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16822 test -n "$tmp" && test -d "$tmp"
16825 tmp=$TMPDIR/cs$$-$RANDOM
16826 (umask 077 && mkdir $tmp)
16829 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16830 { (exit 1); exit 1; }
16835 cat >>$CONFIG_STATUS <<EOF
16838 # CONFIG_FILES section.
16841 # No need to generate the scripts if there are no CONFIG_FILES.
16842 # This happens for instance when ./config.status config.h
16843 if test -n "\$CONFIG_FILES"; then
16844 # Protect against being on the right side of a sed subst in config.status.
16845 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16846 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16847 s,@SHELL@,$SHELL,;t t
16848 s,@exec_prefix@,$exec_prefix,;t t
16849 s,@prefix@,$prefix,;t t
16850 s,@program_transform_name@,$program_transform_name,;t t
16851 s,@bindir@,$bindir,;t t
16852 s,@sbindir@,$sbindir,;t t
16853 s,@libexecdir@,$libexecdir,;t t
16854 s,@datarootdir@,$datarootdir,;t t
16855 s,@datadir@,$datadir,;t t
16856 s,@sysconfdir@,$sysconfdir,;t t
16857 s,@sharedstatedir@,$sharedstatedir,;t t
16858 s,@localstatedir@,$localstatedir,;t t
16859 s,@runstatedir@,$runstatedir,;t t
16860 s,@libdir@,$libdir,;t t
16861 s,@includedir@,$includedir,;t t
16862 s,@oldincludedir@,$oldincludedir,;t t
16863 s,@infodir@,$infodir,;t t
16864 s,@mandir@,$mandir,;t t
16865 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16866 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16867 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16868 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16869 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16870 s,@build_alias@,$build_alias,;t t
16871 s,@host_alias@,$host_alias,;t t
16872 s,@target_alias@,$target_alias,;t t
16873 s,@ECHO_C@,$ECHO_C,;t t
16874 s,@ECHO_N@,$ECHO_N,;t t
16875 s,@ECHO_T@,$ECHO_T,;t t
16876 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16877 s,@DEFS@,$DEFS,;t t
16878 s,@LIBS@,$LIBS,;t t
16879 s,@top_builddir@,$top_builddir,;t t
16880 s,@build@,$build,;t t
16881 s,@build_cpu@,$build_cpu,;t t
16882 s,@build_vendor@,$build_vendor,;t t
16883 s,@build_os@,$build_os,;t t
16884 s,@host@,$host,;t t
16885 s,@host_cpu@,$host_cpu,;t t
16886 s,@host_vendor@,$host_vendor,;t t
16887 s,@host_os@,$host_os,;t t
16888 s,@target@,$target,;t t
16889 s,@target_cpu@,$target_cpu,;t t
16890 s,@target_vendor@,$target_vendor,;t t
16891 s,@target_os@,$target_os,;t t
16893 s,@CFLAGS@,$CFLAGS,;t t
16894 s,@LDFLAGS@,$LDFLAGS,;t t
16895 s,@CPPFLAGS@,$CPPFLAGS,;t t
16896 s,@ac_ct_CC@,$ac_ct_CC,;t t
16897 s,@EXEEXT@,$EXEEXT,;t t
16898 s,@OBJEXT@,$OBJEXT,;t t
16899 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16902 s,@EGREP@,$EGREP,;t t
16903 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16904 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16905 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16906 s,@LN_S@,$LN_S,;t t
16907 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
16908 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
16909 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16910 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16911 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
16912 s,@SET_MAKE@,$SET_MAKE,;t t
16913 s,@CTAGS@,$CTAGS,;t t
16914 s,@ETAGS@,$ETAGS,;t t
16915 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16916 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16917 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16918 s,@RANLIB@,$RANLIB,;t t
16919 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16921 s,@ac_ct_LD@,$ac_ct_LD,;t t
16923 s,@ac_ct_AR@,$ac_ct_AR,;t t
16924 s,@ARFLAGS@,$ARFLAGS,;t t
16925 s,@DESTDIR@,$DESTDIR,;t t
16926 s,@BUILD_CC@,$BUILD_CC,;t t
16927 s,@BUILD_CPP@,$BUILD_CPP,;t t
16928 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16929 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16930 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16931 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16932 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16933 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16934 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16935 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16936 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16937 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16938 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16939 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16940 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16941 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16942 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16943 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16944 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16945 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16946 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16947 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16948 s,@CC_G_OPT@,$CC_G_OPT,;t t
16949 s,@LD_MODEL@,$LD_MODEL,;t t
16950 s,@shlibdir@,$shlibdir,;t t
16951 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
16952 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16953 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16954 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16955 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16956 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16957 s,@LINK_PROGS@,$LINK_PROGS,;t t
16958 s,@LINK_TESTS@,$LINK_TESTS,;t t
16959 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16960 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16961 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16962 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16963 s,@RPATH_LIST@,$RPATH_LIST,;t t
16964 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16965 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16966 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16967 s,@PTHREAD@,$PTHREAD,;t t
16968 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16969 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16970 s,@ECHO_LT@,$ECHO_LT,;t t
16971 s,@ECHO_LD@,$ECHO_LD,;t t
16972 s,@RULE_CC@,$RULE_CC,;t t
16973 s,@SHOW_CC@,$SHOW_CC,;t t
16974 s,@ECHO_CC@,$ECHO_CC,;t t
16975 s,@ADAFLAGS@,$ADAFLAGS,;t t
16976 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16977 s,@ADA_TRACE@,$ADA_TRACE,;t t
16978 s,@gnatmake_exists@,$gnatmake_exists,;t t
16979 s,@gprconfig_exists@,$gprconfig_exists,;t t
16980 s,@M4_exists@,$M4_exists,;t t
16981 s,@cf_ada_make@,$cf_ada_make,;t t
16982 s,@cf_ada_config@,$cf_ada_config,;t t
16983 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
16984 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
16985 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
16986 s,@cf_compile_generics@,$cf_compile_generics,;t t
16987 s,@cf_generic_objects@,$cf_generic_objects,;t t
16988 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
16989 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
16990 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
16991 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
16992 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16993 s,@cf_ada_package@,$cf_ada_package,;t t
16994 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16995 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16996 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
16997 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
16998 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
16999 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
17000 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17001 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17002 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17003 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17004 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
17005 s,@TEST_ARG2@,$TEST_ARG2,;t t
17006 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
17007 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
17008 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17009 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17010 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
17011 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
17012 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
17017 cat >>$CONFIG_STATUS <<\EOF
17018 # Split the substitutions into bite-sized pieces for seds with
17019 # small command number limits, like on Digital OSF/1 and HP-UX.
17020 ac_max_sed_lines=48
17021 ac_sed_frag=1 # Number of current file.
17022 ac_beg=1 # First line for current file.
17023 ac_end=$ac_max_sed_lines # Line after last line for current file.
17026 while $ac_more_lines; do
17027 if test $ac_beg -gt 1; then
17028 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17030 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17032 if test ! -s $tmp/subs.frag; then
17033 ac_more_lines=false
17035 # The purpose of the label and of the branching condition is to
17036 # speed up the sed processing (if there are no `@' at all, there
17037 # is no need to browse any of the substitutions).
17038 # These are the two extra sed commands mentioned above.
17040 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17041 # It is possible to make a multiline substitution using escaped newlines.
17042 # Ensure that we do not split the substitution between script fragments.
17044 ac_END=`expr $ac_end + $ac_max_sed_lines`
17045 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
17046 if test -s $tmp/subs.next; then
17047 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
17048 if test ! -s $tmp/subs.edit; then
17049 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
17050 if test ! -s $tmp/subs.edit; then
17051 if test $ac_beg -gt 1; then
17052 ac_end=`expr $ac_end - 1`
17059 if test -z "$ac_sed_cmds"; then
17060 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17062 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17064 ac_sed_frag=`expr $ac_sed_frag + 1`
17066 ac_end=`expr $ac_end + $ac_max_sed_lines`
17069 if test -z "$ac_sed_cmds"; then
17072 fi # test -n "$CONFIG_FILES"
17075 cat >>$CONFIG_STATUS <<\EOF
17076 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17077 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17079 - | *:- | *:-:* ) # input from stdin
17081 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17082 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17083 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17084 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17085 * ) ac_file_in=$ac_file.in ;;
17088 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17089 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17090 X"$ac_file" : 'X\(//\)[^/]' \| \
17091 X"$ac_file" : 'X\(//\)$' \| \
17092 X"$ac_file" : 'X\(/\)' \| \
17093 . : '\(.\)' 2>/dev/null ||
17095 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17096 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17097 /^X\(\/\/\)$/{ s//\1/; q; }
17098 /^X\(\/\).*/{ s//\1/; q; }
17100 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17101 { case "$ac_dir" in
17102 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17106 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17107 case $as_mkdir_dir in
17108 # Skip DOS drivespec
17109 ?:) as_incr_dir=$as_mkdir_dir ;;
17111 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17112 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17117 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17118 # A "../" for each directory in $ac_dir_suffix.
17119 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17121 ac_dir_suffix= ac_dots=
17126 if test -z "$ac_dots"; then
17129 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17131 [\\/]* | ?:[\\/]* )
17132 ac_srcdir=$srcdir$ac_dir_suffix;
17133 ac_top_srcdir=$srcdir ;;
17134 *) # Relative path.
17135 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17136 ac_top_srcdir=$ac_dots$srcdir ;;
17140 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17141 *) ac_INSTALL=$ac_dots$INSTALL ;;
17144 if test x"$ac_file" != x-; then
17145 { echo "$as_me:17145: creating $ac_file" >&5
17146 echo "$as_me: creating $ac_file" >&6;}
17149 # Let's still pretend it is `configure' which instantiates (i.e., don't
17150 # use $as_me), people would be surprised to read:
17151 # /* config.h. Generated automatically by config.status. */
17152 configure_input="Generated automatically from `echo $ac_file_in |
17153 sed 's,.*/,,'` by configure."
17155 # First look for the input files in the build tree, otherwise in the
17157 ac_file_inputs=`IFS=:
17158 for f in $ac_file_in; do
17160 -) echo $tmp/stdin ;;
17162 # Absolute (can't be DOS-style, as IFS=:)
17163 test -f "$f" || { { echo "$as_me:17163: error: cannot find input file: $f" >&5
17164 echo "$as_me: error: cannot find input file: $f" >&2;}
17165 { (exit 1); exit 1; }; }
17168 if test -f "$f"; then
17171 elif test -f "$srcdir/$f"; then
17176 { { echo "$as_me:17176: error: cannot find input file: $f" >&5
17177 echo "$as_me: error: cannot find input file: $f" >&2;}
17178 { (exit 1); exit 1; }; }
17181 done` || { (exit 1); exit 1; }
17183 cat >>$CONFIG_STATUS <<\EOF
17184 ac_warn_datarootdir=no
17185 if test x"$ac_file" != x-; then
17186 for ac_item in $ac_file_inputs
17188 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17189 if test -n "$ac_seen"; then
17190 ac_used=`grep '@datarootdir@' $ac_item`
17191 if test -z "$ac_used"; then
17192 { echo "$as_me:17192: WARNING: datarootdir was used implicitly but not set:
17194 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17196 ac_warn_datarootdir=yes
17199 ac_seen=`grep '${datarootdir}' $ac_item`
17200 if test -n "$ac_seen"; then
17201 { echo "$as_me:17201: WARNING: datarootdir was used explicitly but not set:
17203 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17205 ac_warn_datarootdir=yes
17210 if test "x$ac_warn_datarootdir" = xyes; then
17211 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17215 cat >>$CONFIG_STATUS <<EOF
17219 cat >>$CONFIG_STATUS <<\EOF
17221 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17222 s,@configure_input@,$configure_input,;t t
17223 s,@srcdir@,$ac_srcdir,;t t
17224 s,@top_srcdir@,$ac_top_srcdir,;t t
17225 s,@INSTALL@,$ac_INSTALL,;t t
17226 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17228 if test x"$ac_file" != x-; then
17229 cp $tmp/out $ac_file
17231 for ac_name in prefix exec_prefix datarootdir
17233 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17234 if test -n "$ac_seen"; then
17235 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
17236 if test -z "$ac_init"; then
17237 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17238 { echo "$as_me:17238: WARNING: Variable $ac_name is used but was not set:
17240 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17245 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17246 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17247 if test -s $tmp/out; then
17248 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17249 { echo "$as_me:17249: WARNING: Some variables may not be substituted:
17251 echo "$as_me: WARNING: Some variables may not be substituted:
17261 cat >>$CONFIG_STATUS <<\EOF
17264 # CONFIG_HEADER section.
17267 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17268 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17270 # ac_d sets the value in "#define NAME VALUE" lines.
17271 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17272 ac_dB='[ ].*$,\1#\2'
17275 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17276 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17277 ac_iB='\([ ]\),\1#\2define\3'
17280 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17281 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17282 ac_uB='$,\1#\2define\3'
17286 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17287 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17289 - | *:- | *:-:* ) # input from stdin
17291 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17292 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17293 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17294 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17295 * ) ac_file_in=$ac_file.in ;;
17298 test x"$ac_file" != x- && { echo "$as_me:17298: creating $ac_file" >&5
17299 echo "$as_me: creating $ac_file" >&6;}
17301 # First look for the input files in the build tree, otherwise in the
17303 ac_file_inputs=`IFS=:
17304 for f in $ac_file_in; do
17306 -) echo $tmp/stdin ;;
17308 # Absolute (can't be DOS-style, as IFS=:)
17309 test -f "$f" || { { echo "$as_me:17309: error: cannot find input file: $f" >&5
17310 echo "$as_me: error: cannot find input file: $f" >&2;}
17311 { (exit 1); exit 1; }; }
17314 if test -f "$f"; then
17317 elif test -f "$srcdir/$f"; then
17322 { { echo "$as_me:17322: error: cannot find input file: $f" >&5
17323 echo "$as_me: error: cannot find input file: $f" >&2;}
17324 { (exit 1); exit 1; }; }
17327 done` || { (exit 1); exit 1; }
17328 # Remove the trailing spaces.
17329 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17333 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17334 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17335 # be either 'cat' or 'sort'.
17336 cat confdefs.h | uniq >conftest.vals
17338 # Break up conftest.vals because some shells have a limit on
17339 # the size of here documents, and old seds have small limits too.
17341 rm -f conftest.tail
17342 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17343 while grep . conftest.vals >/dev/null
17345 # Write chunks of a limited-size here document to conftest.frag.
17346 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17347 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17348 echo 'CEOF' >> $CONFIG_STATUS
17349 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17350 rm -f conftest.vals
17351 mv conftest.tail conftest.vals
17353 rm -f conftest.vals
17355 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17357 echo ' cat >> conftest.edit <<CEOF
17358 /@DEFS@/r conftest.frag
17361 sed -f conftest.edit $tmp/in > $tmp/out
17363 mv $tmp/out $tmp/in
17364 rm -f conftest.edit conftest.frag
17365 ' >> $CONFIG_STATUS
17367 cat >>$CONFIG_STATUS <<\EOF
17368 # Let's still pretend it is `configure' which instantiates (i.e., don't
17369 # use $as_me), people would be surprised to read:
17370 # /* config.h. Generated automatically by config.status. */
17371 if test x"$ac_file" = x-; then
17372 echo "/* Generated automatically by configure. */" >$tmp/config.h
17374 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17376 cat $tmp/in >>$tmp/config.h
17378 if test x"$ac_file" != x-; then
17379 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17380 { echo "$as_me:17380: $ac_file is unchanged" >&5
17381 echo "$as_me: $ac_file is unchanged" >&6;}
17383 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17384 X"$ac_file" : 'X\(//\)[^/]' \| \
17385 X"$ac_file" : 'X\(//\)$' \| \
17386 X"$ac_file" : 'X\(/\)' \| \
17387 . : '\(.\)' 2>/dev/null ||
17389 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17390 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17391 /^X\(\/\/\)$/{ s//\1/; q; }
17392 /^X\(\/\).*/{ s//\1/; q; }
17394 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17395 { case "$ac_dir" in
17396 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17400 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17401 case $as_mkdir_dir in
17402 # Skip DOS drivespec
17403 ?:) as_incr_dir=$as_mkdir_dir ;;
17405 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17406 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17413 mv $tmp/config.h $ac_file
17417 rm -f $tmp/config.h
17421 cat >>$CONFIG_STATUS <<\EOF
17423 # CONFIG_COMMANDS section.
17425 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17426 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17427 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17431 if test -z "$USE_OLD_MAKERULES" ; then
17432 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
17439 cat >>$CONFIG_STATUS <<\EOF
17441 { (exit 0); exit 0; }
17443 chmod +x $CONFIG_STATUS
17444 ac_clean_files=$ac_clean_files_save
17446 # configure is writing to config.log, and then calls config.status.
17447 # config.status does its own redirection, appending to config.log.
17448 # Unfortunately, on DOS this fails, as config.log is still kept open
17449 # by configure, so config.status won't be able to write to it; its
17450 # output is simply discarded. So we exec the FD to /dev/null,
17451 # effectively closing config.log, so it can be properly (re)opened and
17452 # appended to by config.status. When coming back to configure, we
17453 # need to make the FD available again.
17454 if test "$no_create" != yes; then
17457 $SHELL $CONFIG_STATUS || ac_cs_success=false
17459 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17460 # would make configure fail if this is the last instruction.
17461 $ac_cs_success || { (exit 1); exit 1; }
17463 ${MAKE:-make} preinstall