2 # From configure.in Revision: 1.79 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
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-warnings test: turn on gcc compiler warnings
742 --enable-assertions test: turn on generation of assertion code
743 --enable-expanded test: generate functions for certain macros
744 --disable-macros test: use functions rather than macros
745 --with-trace test: add trace() function to all models of ncurses
746 --disable-gnat-projects test: disable GNAT projects even if usable
747 Ada95 Binding Options:
748 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
749 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
750 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
751 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
752 --with-ada-libname=XXX override default Ada library-name
754 Some influential environment variables:
755 CC C compiler command
756 CFLAGS C compiler flags
757 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
758 nonstandard directory <lib dir>
759 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
760 headers in a nonstandard directory <include dir>
763 Use these variables to override the choices made by `configure' or to help
764 it to find libraries and programs with nonstandard names/locations.
769 if test "$ac_init_help" = "recursive"; then
770 # If there are subdirs, report their specific --help.
772 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
774 # A "../" for each directory in /$ac_subdir.
775 ac_dots=`echo $ac_subdir |
776 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
779 .) # No --srcdir option. We are building in place.
780 ac_sub_srcdir=$srcdir ;;
781 [\\/]* | ?:[\\/]* ) # Absolute path.
782 ac_sub_srcdir=$srcdir/$ac_subdir ;;
784 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
787 # Check for guested configure; otherwise get Cygnus style configure.
788 if test -f $ac_sub_srcdir/configure.gnu; then
790 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
791 elif test -f $ac_sub_srcdir/configure; then
793 $SHELL $ac_sub_srcdir/configure --help=recursive
794 elif test -f $ac_sub_srcdir/configure.ac ||
795 test -f $ac_sub_srcdir/configure.in; then
799 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
805 test -n "$ac_init_help" && exit 0
806 if $ac_init_version; then
809 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
810 Free Software Foundation, Inc.
811 This configure script is free software; the Free Software Foundation
812 gives unlimited permission to copy, distribute and modify it.
818 This file contains any messages produced by compilers while
819 running configure, to aid debugging if configure makes a mistake.
821 It was created by $as_me, which was
822 generated by GNU Autoconf 2.52.20200802. Invocation command line was
833 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
834 uname -m = `(uname -m) 2>/dev/null || echo unknown`
835 uname -r = `(uname -r) 2>/dev/null || echo unknown`
836 uname -s = `(uname -s) 2>/dev/null || echo unknown`
837 uname -v = `(uname -v) 2>/dev/null || echo unknown`
839 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
840 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
842 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
843 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
844 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
845 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
846 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
847 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
848 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
862 # Keep a trace of the command line.
863 # Strip out --no-create and --no-recursion so they do not pile up.
864 # Also quote any args containing shell meta-characters.
870 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
871 | --no-cr | --no-c) ;;
872 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
873 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
874 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
875 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
876 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
878 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
881 # Get rid of the leading space.
884 # When interrupted or exit'd, cleanup temporary files, and complete
885 # config.log. We remove comments because anyway the quotes in there
886 # would cause problems or look ugly.
888 # Save into config.log some information that might help in debugging.
890 echo "## ----------------- ##" >&5
891 echo "## Cache variables. ##" >&5
892 echo "## ----------------- ##" >&5
894 # The following way of writing the cache mishandles newlines in values,
897 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
900 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
901 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
905 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
909 sed "/^$/d" confdefs.h >conftest.log
910 if test -s conftest.log; then
912 echo "## ------------ ##" >&5
913 echo "## confdefs.h. ##" >&5
914 echo "## ------------ ##" >&5
919 test "$ac_signal" != 0 &&
920 echo "$as_me: caught signal $ac_signal" >&5
921 echo "$as_me: exit $exit_status" >&5
922 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
925 for ac_signal in 1 2 13 15; do
926 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
930 # confdefs.h avoids OS command line length limits that DEFS can exceed.
931 rm -rf conftest* confdefs.h
932 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
935 # Let the site file select an alternate cache file if it wants to.
936 # Prefer explicitly selected file to automatically selected ones.
937 if test -z "$CONFIG_SITE"; then
938 if test "x$prefix" != xNONE; then
939 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
941 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
944 for ac_site_file in $CONFIG_SITE; do
945 if test -r "$ac_site_file"; then
946 { echo "$as_me:946: loading site script $ac_site_file" >&5
947 echo "$as_me: loading site script $ac_site_file" >&6;}
948 cat "$ac_site_file" >&5
953 if test -r "$cache_file"; then
954 # Some versions of bash will fail to source /dev/null (special
955 # files actually), so we avoid doing that.
956 if test -f "$cache_file"; then
957 { echo "$as_me:957: loading cache $cache_file" >&5
958 echo "$as_me: loading cache $cache_file" >&6;}
960 [\\/]* | ?:[\\/]* ) . $cache_file;;
965 { echo "$as_me:965: creating cache $cache_file" >&5
966 echo "$as_me: creating cache $cache_file" >&6;}
970 # Check that the precious variables saved in the cache have kept the same
972 ac_cache_corrupted=false
973 for ac_var in `(set) 2>&1 |
974 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
975 eval ac_old_set=\$ac_cv_env_${ac_var}_set
976 eval ac_new_set=\$ac_env_${ac_var}_set
977 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
978 eval ac_new_val="\$ac_env_${ac_var}_value"
979 case $ac_old_set,$ac_new_set in
981 { echo "$as_me:981: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
982 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
983 ac_cache_corrupted=: ;;
985 { echo "$as_me:985: error: \`$ac_var' was not set in the previous run" >&5
986 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
987 ac_cache_corrupted=: ;;
990 if test "x$ac_old_val" != "x$ac_new_val"; then
991 { echo "$as_me:991: error: \`$ac_var' has changed since the previous run:" >&5
992 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
993 { echo "$as_me:993: former value: $ac_old_val" >&5
994 echo "$as_me: former value: $ac_old_val" >&2;}
995 { echo "$as_me:995: current value: $ac_new_val" >&5
996 echo "$as_me: current value: $ac_new_val" >&2;}
1000 # Pass precious variables to config.status. It doesn't matter if
1001 # we pass some twice (in addition to the command line arguments).
1002 if test "$ac_new_set" = set; then
1004 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1006 ac_configure_args="$ac_configure_args '$ac_arg'"
1008 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1013 if $ac_cache_corrupted; then
1014 { echo "$as_me:1014: error: changes in the environment can compromise the build" >&5
1015 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1016 { { echo "$as_me:1016: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1017 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1018 { (exit 1); exit 1; }; }
1022 ac_cpp='$CPP $CPPFLAGS'
1023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1026 ac_main_return=return
1028 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1029 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1031 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1032 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1034 echo "#! $SHELL" >conftest.sh
1035 echo "exit 0" >>conftest.sh
1036 chmod +x conftest.sh
1037 if { (echo "$as_me:1037: PATH=\".;.\"; conftest.sh") >&5
1038 (PATH=".;."; conftest.sh) 2>&5
1040 echo "$as_me:1040: \$? = $ac_status" >&5
1041 (exit $ac_status); }; then
1042 ac_path_separator=';'
1046 PATH_SEPARATOR="$ac_path_separator"
1049 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1054 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1055 if test -f $ac_dir/install-sh; then
1057 ac_install_sh="$ac_aux_dir/install-sh -c"
1059 elif test -f $ac_dir/install.sh; then
1061 ac_install_sh="$ac_aux_dir/install.sh -c"
1063 elif test -f $ac_dir/shtool; then
1065 ac_install_sh="$ac_aux_dir/shtool install -c"
1069 if test -z "$ac_aux_dir"; then
1070 { { echo "$as_me:1070: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1071 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1072 { (exit 1); exit 1; }; }
1074 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1075 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1076 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1078 # Make sure we can run config.sub.
1079 $ac_config_sub sun4 >/dev/null 2>&1 ||
1080 { { echo "$as_me:1080: error: cannot run $ac_config_sub" >&5
1081 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1082 { (exit 1); exit 1; }; }
1084 echo "$as_me:1084: checking build system type" >&5
1085 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1086 if test "${ac_cv_build+set}" = set; then
1087 echo $ECHO_N "(cached) $ECHO_C" >&6
1089 ac_cv_build_alias=$build_alias
1090 test -z "$ac_cv_build_alias" &&
1091 ac_cv_build_alias=`$ac_config_guess`
1092 test -z "$ac_cv_build_alias" &&
1093 { { echo "$as_me:1093: error: cannot guess build type; you must specify one" >&5
1094 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1095 { (exit 1); exit 1; }; }
1096 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1097 { { echo "$as_me:1097: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1098 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1099 { (exit 1); exit 1; }; }
1102 echo "$as_me:1102: result: $ac_cv_build" >&5
1103 echo "${ECHO_T}$ac_cv_build" >&6
1105 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1106 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1107 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1109 echo "$as_me:1109: checking host system type" >&5
1110 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1111 if test "${ac_cv_host+set}" = set; then
1112 echo $ECHO_N "(cached) $ECHO_C" >&6
1114 ac_cv_host_alias=$host_alias
1115 test -z "$ac_cv_host_alias" &&
1116 ac_cv_host_alias=$ac_cv_build_alias
1117 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1118 { { echo "$as_me:1118: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1119 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1120 { (exit 1); exit 1; }; }
1123 echo "$as_me:1123: result: $ac_cv_host" >&5
1124 echo "${ECHO_T}$ac_cv_host" >&6
1126 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1127 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1128 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1130 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1131 echo "$as_me:1131: checking target system type" >&5
1132 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1133 if test "${ac_cv_target+set}" = set; then
1134 echo $ECHO_N "(cached) $ECHO_C" >&6
1136 ac_cv_target_alias=$target_alias
1137 test "x$ac_cv_target_alias" = "x" &&
1138 ac_cv_target_alias=$ac_cv_host_alias
1139 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1140 { { echo "$as_me:1140: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1141 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1142 { (exit 1); exit 1; }; }
1145 echo "$as_me:1145: result: $ac_cv_target" >&5
1146 echo "${ECHO_T}$ac_cv_target" >&6
1147 target=$ac_cv_target
1148 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1149 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1150 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1152 # The aliases save the names the user supplied, while $host etc.
1153 # will get canonicalized.
1154 test -n "$target_alias" &&
1155 test "$program_prefix$program_suffix$program_transform_name" = \
1157 program_prefix=${target_alias}-
1158 system_name="$host_os"
1160 system_name="`(uname -s -r) 2>/dev/null`"
1161 if test -z "$system_name" ; then
1162 system_name="`(hostname) 2>/dev/null`"
1165 test -n "$system_name" &&
1166 cat >>confdefs.h <<EOF
1167 #define SYSTEM_NAME "$system_name"
1170 if test "${cf_cv_system_name+set}" = set; then
1171 echo $ECHO_N "(cached) $ECHO_C" >&6
1173 cf_cv_system_name="$system_name"
1176 test -z "$system_name" && system_name="$cf_cv_system_name"
1177 test -n "$cf_cv_system_name" && echo "$as_me:1177: result: Configuring for $cf_cv_system_name" >&5
1178 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1180 if test ".$system_name" != ".$cf_cv_system_name" ; then
1181 echo "$as_me:1181: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1182 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1183 { { echo "$as_me:1183: error: \"Please remove config.cache and try again.\"" >&5
1184 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1185 { (exit 1); exit 1; }; }
1188 # Check whether --with-system-type or --without-system-type was given.
1189 if test "${with_system_type+set}" = set; then
1190 withval="$with_system_type"
1191 { echo "$as_me:1191: WARNING: overriding system type to $withval" >&5
1192 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1193 cf_cv_system_name=$withval
1198 ### Save the given $CFLAGS to allow user-override.
1199 cf_user_CFLAGS="$CFLAGS"
1201 ### Default install-location
1203 echo "$as_me:1203: checking for prefix" >&5
1204 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1205 if test "x$prefix" = "xNONE" ; then
1206 case "$cf_cv_system_name" in
1207 # non-vendor systems don't have a conflict
1208 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1211 (*) prefix=$ac_default_prefix
1215 echo "$as_me:1215: result: $prefix" >&5
1216 echo "${ECHO_T}$prefix" >&6
1218 if test "x$prefix" = "xNONE" ; then
1219 echo "$as_me:1219: checking for default include-directory" >&5
1220 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1221 test -n "$verbose" && echo 1>&6
1224 $includedir/ncurses \
1226 $prefix/include/ncurses \
1227 /usr/local/include \
1228 /usr/local/include/ncurses \
1230 /usr/include/ncurses
1232 cf_dir=`eval echo $cf_symbol`
1233 if test -f $cf_dir/curses.h ; then
1234 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1235 includedir="$cf_symbol"
1236 test -n "$verbose" && echo $ac_n " found " 1>&6
1240 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1242 echo "$as_me:1242: result: $includedir" >&5
1243 echo "${ECHO_T}$includedir" >&6
1246 ### Checks for programs.
1249 ac_cpp='$CPP $CPPFLAGS'
1250 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1251 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1252 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1253 ac_main_return=return
1254 if test -n "$ac_tool_prefix"; then
1255 for ac_prog in gnatgcc gcc cc
1257 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1258 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1259 echo "$as_me:1259: checking for $ac_word" >&5
1260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1261 if test "${ac_cv_prog_CC+set}" = set; then
1262 echo $ECHO_N "(cached) $ECHO_C" >&6
1264 if test -n "$CC"; then
1265 ac_cv_prog_CC="$CC" # Let the user override the test.
1267 ac_save_IFS=$IFS; IFS=$ac_path_separator
1269 for ac_dir in $ac_dummy; do
1271 test -z "$ac_dir" && ac_dir=.
1272 $as_executable_p "$ac_dir/$ac_word" || continue
1273 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1274 echo "$as_me:1274: found $ac_dir/$ac_word" >&5
1281 if test -n "$CC"; then
1282 echo "$as_me:1282: result: $CC" >&5
1283 echo "${ECHO_T}$CC" >&6
1285 echo "$as_me:1285: result: no" >&5
1286 echo "${ECHO_T}no" >&6
1289 test -n "$CC" && break
1292 if test -z "$CC"; then
1294 for ac_prog in gnatgcc gcc cc
1296 # Extract the first word of "$ac_prog", so it can be a program name with args.
1297 set dummy $ac_prog; ac_word=$2
1298 echo "$as_me:1298: checking for $ac_word" >&5
1299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301 echo $ECHO_N "(cached) $ECHO_C" >&6
1303 if test -n "$ac_ct_CC"; then
1304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1308 for ac_dir in $ac_dummy; do
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 ac_cv_prog_ac_ct_CC="$ac_prog"
1313 echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1319 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320 if test -n "$ac_ct_CC"; then
1321 echo "$as_me:1321: result: $ac_ct_CC" >&5
1322 echo "${ECHO_T}$ac_ct_CC" >&6
1324 echo "$as_me:1324: result: no" >&5
1325 echo "${ECHO_T}no" >&6
1328 test -n "$ac_ct_CC" && break
1334 test -z "$CC" && { { echo "$as_me:1334: error: no acceptable cc found in \$PATH" >&5
1335 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1336 { (exit 1); exit 1; }; }
1338 # Provide some information about the compiler.
1339 echo "$as_me:1339:" \
1340 "checking for C compiler version" >&5
1341 ac_compiler=`set X $ac_compile; echo $2`
1342 { (eval echo "$as_me:1342: \"$ac_compiler --version </dev/null >&5\"") >&5
1343 (eval $ac_compiler --version </dev/null >&5) 2>&5
1345 echo "$as_me:1345: \$? = $ac_status" >&5
1346 (exit $ac_status); }
1347 { (eval echo "$as_me:1347: \"$ac_compiler -v </dev/null >&5\"") >&5
1348 (eval $ac_compiler -v </dev/null >&5) 2>&5
1350 echo "$as_me:1350: \$? = $ac_status" >&5
1351 (exit $ac_status); }
1352 { (eval echo "$as_me:1352: \"$ac_compiler -V </dev/null >&5\"") >&5
1353 (eval $ac_compiler -V </dev/null >&5) 2>&5
1355 echo "$as_me:1355: \$? = $ac_status" >&5
1356 (exit $ac_status); }
1358 cat >conftest.$ac_ext <<_ACEOF
1359 #line 1359 "configure"
1360 #include "confdefs.h"
1370 ac_clean_files_save=$ac_clean_files
1371 ac_clean_files="$ac_clean_files a.out a.exe"
1372 # Try to create an executable without -o first, disregard a.out.
1373 # It will help us diagnose broken compilers, and finding out an intuition
1375 echo "$as_me:1375: checking for C compiler default output" >&5
1376 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1377 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1378 if { (eval echo "$as_me:1378: \"$ac_link_default\"") >&5
1379 (eval $ac_link_default) 2>&5
1381 echo "$as_me:1381: \$? = $ac_status" >&5
1382 (exit $ac_status); }; then
1383 # Find the output, starting from the most likely. This scheme is
1384 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1386 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1387 ls a.out conftest 2>/dev/null;
1388 ls a.* conftest.* 2>/dev/null`; do
1390 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1391 a.out ) # We found the default executable, but exeext='' is most
1394 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1395 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1402 echo "$as_me: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1404 { { echo "$as_me:1404: error: C compiler cannot create executables" >&5
1405 echo "$as_me: error: C compiler cannot create executables" >&2;}
1406 { (exit 77); exit 77; }; }
1409 ac_exeext=$ac_cv_exeext
1410 echo "$as_me:1410: result: $ac_file" >&5
1411 echo "${ECHO_T}$ac_file" >&6
1413 # Check the compiler produces executables we can run. If not, either
1414 # the compiler is broken, or we cross compile.
1415 echo "$as_me:1415: checking whether the C compiler works" >&5
1416 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1417 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1418 # If not cross compiling, check that we can run a simple program.
1419 if test "$cross_compiling" != yes; then
1420 if { ac_try='./$ac_file'
1421 { (eval echo "$as_me:1421: \"$ac_try\"") >&5
1424 echo "$as_me:1424: \$? = $ac_status" >&5
1425 (exit $ac_status); }; }; then
1428 if test "$cross_compiling" = maybe; then
1431 { { echo "$as_me:1431: error: cannot run C compiled programs.
1432 If you meant to cross compile, use \`--host'." >&5
1433 echo "$as_me: error: cannot run C compiled programs.
1434 If you meant to cross compile, use \`--host'." >&2;}
1435 { (exit 1); exit 1; }; }
1439 echo "$as_me:1439: result: yes" >&5
1440 echo "${ECHO_T}yes" >&6
1442 rm -f a.out a.exe conftest$ac_cv_exeext
1443 ac_clean_files=$ac_clean_files_save
1444 # Check the compiler produces executables we can run. If not, either
1445 # the compiler is broken, or we cross compile.
1446 echo "$as_me:1446: checking whether we are cross compiling" >&5
1447 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1448 echo "$as_me:1448: result: $cross_compiling" >&5
1449 echo "${ECHO_T}$cross_compiling" >&6
1451 echo "$as_me:1451: checking for executable suffix" >&5
1452 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1453 if { (eval echo "$as_me:1453: \"$ac_link\"") >&5
1454 (eval $ac_link) 2>&5
1456 echo "$as_me:1456: \$? = $ac_status" >&5
1457 (exit $ac_status); }; then
1458 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1459 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1460 # work properly (i.e., refer to `conftest.exe'), while it won't with
1462 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1464 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1465 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1472 { { echo "$as_me:1472: error: cannot compute EXEEXT: cannot compile and link" >&5
1473 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1474 { (exit 1); exit 1; }; }
1477 rm -f conftest$ac_cv_exeext
1478 echo "$as_me:1478: result: $ac_cv_exeext" >&5
1479 echo "${ECHO_T}$ac_cv_exeext" >&6
1481 rm -f conftest.$ac_ext
1482 EXEEXT=$ac_cv_exeext
1484 echo "$as_me:1484: checking for object suffix" >&5
1485 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1486 if test "${ac_cv_objext+set}" = set; then
1487 echo $ECHO_N "(cached) $ECHO_C" >&6
1489 cat >conftest.$ac_ext <<_ACEOF
1490 #line 1490 "configure"
1491 #include "confdefs.h"
1501 rm -f conftest.o conftest.obj
1502 if { (eval echo "$as_me:1502: \"$ac_compile\"") >&5
1503 (eval $ac_compile) 2>&5
1505 echo "$as_me:1505: \$? = $ac_status" >&5
1506 (exit $ac_status); }; then
1507 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1509 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1510 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1515 echo "$as_me: failed program was:" >&5
1516 cat conftest.$ac_ext >&5
1517 { { echo "$as_me:1517: error: cannot compute OBJEXT: cannot compile" >&5
1518 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1519 { (exit 1); exit 1; }; }
1522 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1524 echo "$as_me:1524: result: $ac_cv_objext" >&5
1525 echo "${ECHO_T}$ac_cv_objext" >&6
1526 OBJEXT=$ac_cv_objext
1528 echo "$as_me:1528: checking whether we are using the GNU C compiler" >&5
1529 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1530 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1531 echo $ECHO_N "(cached) $ECHO_C" >&6
1533 cat >conftest.$ac_ext <<_ACEOF
1534 #line 1534 "configure"
1535 #include "confdefs.h"
1548 rm -f conftest.$ac_objext
1549 if { (eval echo "$as_me:1549: \"$ac_compile\"") >&5
1550 (eval $ac_compile) 2>&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); } &&
1554 { ac_try='test -s conftest.$ac_objext'
1555 { (eval echo "$as_me:1555: \"$ac_try\"") >&5
1558 echo "$as_me:1558: \$? = $ac_status" >&5
1559 (exit $ac_status); }; }; then
1562 echo "$as_me: failed program was:" >&5
1563 cat conftest.$ac_ext >&5
1566 rm -f conftest.$ac_objext conftest.$ac_ext
1567 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1570 echo "$as_me:1570: result: $ac_cv_c_compiler_gnu" >&5
1571 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1572 GCC=`test $ac_compiler_gnu = yes && echo yes`
1573 ac_test_CFLAGS=${CFLAGS+set}
1574 ac_save_CFLAGS=$CFLAGS
1576 echo "$as_me:1576: checking whether $CC accepts -g" >&5
1577 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1578 if test "${ac_cv_prog_cc_g+set}" = set; then
1579 echo $ECHO_N "(cached) $ECHO_C" >&6
1581 cat >conftest.$ac_ext <<_ACEOF
1582 #line 1582 "configure"
1583 #include "confdefs.h"
1593 rm -f conftest.$ac_objext
1594 if { (eval echo "$as_me:1594: \"$ac_compile\"") >&5
1595 (eval $ac_compile) 2>&5
1597 echo "$as_me:1597: \$? = $ac_status" >&5
1598 (exit $ac_status); } &&
1599 { ac_try='test -s conftest.$ac_objext'
1600 { (eval echo "$as_me:1600: \"$ac_try\"") >&5
1603 echo "$as_me:1603: \$? = $ac_status" >&5
1604 (exit $ac_status); }; }; then
1607 echo "$as_me: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1611 rm -f conftest.$ac_objext conftest.$ac_ext
1613 echo "$as_me:1613: result: $ac_cv_prog_cc_g" >&5
1614 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1615 if test "$ac_test_CFLAGS" = set; then
1616 CFLAGS=$ac_save_CFLAGS
1617 elif test $ac_cv_prog_cc_g = yes; then
1618 if test "$GCC" = yes; then
1624 if test "$GCC" = yes; then
1630 # Some people use a C++ compiler to compile C. Since we use `exit',
1631 # in C++ we need to declare it. In case someone uses the same compiler
1632 # for both compiling C and C++ we need to have the C++ compiler decide
1633 # the declaration of exit, since it's the most demanding environment.
1634 cat >conftest.$ac_ext <<_ACEOF
1639 rm -f conftest.$ac_objext
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641 (eval $ac_compile) 2>&5
1643 echo "$as_me:1643: \$? = $ac_status" >&5
1644 (exit $ac_status); } &&
1645 { ac_try='test -s conftest.$ac_objext'
1646 { (eval echo "$as_me:1646: \"$ac_try\"") >&5
1649 echo "$as_me:1649: \$? = $ac_status" >&5
1650 (exit $ac_status); }; }; then
1651 for ac_declaration in \
1653 '#include <stdlib.h>' \
1654 'extern "C" void std::exit (int) throw (); using std::exit;' \
1655 'extern "C" void std::exit (int); using std::exit;' \
1656 'extern "C" void exit (int) throw ();' \
1657 'extern "C" void exit (int);' \
1660 cat >conftest.$ac_ext <<_ACEOF
1661 #line 1661 "configure"
1662 #include "confdefs.h"
1673 rm -f conftest.$ac_objext
1674 if { (eval echo "$as_me:1674: \"$ac_compile\"") >&5
1675 (eval $ac_compile) 2>&5
1677 echo "$as_me:1677: \$? = $ac_status" >&5
1678 (exit $ac_status); } &&
1679 { ac_try='test -s conftest.$ac_objext'
1680 { (eval echo "$as_me:1680: \"$ac_try\"") >&5
1683 echo "$as_me:1683: \$? = $ac_status" >&5
1684 (exit $ac_status); }; }; then
1687 echo "$as_me: failed program was:" >&5
1688 cat conftest.$ac_ext >&5
1691 rm -f conftest.$ac_objext conftest.$ac_ext
1692 cat >conftest.$ac_ext <<_ACEOF
1693 #line 1693 "configure"
1694 #include "confdefs.h"
1704 rm -f conftest.$ac_objext
1705 if { (eval echo "$as_me:1705: \"$ac_compile\"") >&5
1706 (eval $ac_compile) 2>&5
1708 echo "$as_me:1708: \$? = $ac_status" >&5
1709 (exit $ac_status); } &&
1710 { ac_try='test -s conftest.$ac_objext'
1711 { (eval echo "$as_me:1711: \"$ac_try\"") >&5
1714 echo "$as_me:1714: \$? = $ac_status" >&5
1715 (exit $ac_status); }; }; then
1718 echo "$as_me: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1721 rm -f conftest.$ac_objext conftest.$ac_ext
1724 if test -n "$ac_declaration"; then
1725 echo '#ifdef __cplusplus' >>confdefs.h
1726 echo $ac_declaration >>confdefs.h
1727 echo '#endif' >>confdefs.h
1731 echo "$as_me: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1734 rm -f conftest.$ac_objext conftest.$ac_ext
1736 ac_cpp='$CPP $CPPFLAGS'
1737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1740 ac_main_return=return
1743 if test "$GCC" = yes ; then
1744 echo "$as_me:1744: checking version of $CC" >&5
1745 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1746 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.].*//'`"
1747 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1748 echo "$as_me:1748: result: $GCC_VERSION" >&5
1749 echo "${ECHO_T}$GCC_VERSION" >&6
1754 if test "$GCC" = yes ; then
1757 echo "$as_me:1757: checking if this is really Intel C compiler" >&5
1758 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1759 cf_save_CFLAGS="$CFLAGS"
1760 CFLAGS="$CFLAGS -no-gcc"
1761 cat >conftest.$ac_ext <<_ACEOF
1762 #line 1762 "configure"
1763 #include "confdefs.h"
1769 #ifdef __INTEL_COMPILER
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780 (eval $ac_compile) 2>&5
1782 echo "$as_me:1782: \$? = $ac_status" >&5
1783 (exit $ac_status); } &&
1784 { ac_try='test -s conftest.$ac_objext'
1785 { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1788 echo "$as_me:1788: \$? = $ac_status" >&5
1789 (exit $ac_status); }; }; then
1791 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1797 rm -f conftest.$ac_objext conftest.$ac_ext
1798 CFLAGS="$cf_save_CFLAGS"
1799 echo "$as_me:1799: result: $INTEL_COMPILER" >&5
1800 echo "${ECHO_T}$INTEL_COMPILER" >&6
1807 if test "$GCC" = yes ; then
1808 echo "$as_me:1808: checking if this is really Clang C compiler" >&5
1809 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1810 cf_save_CFLAGS="$CFLAGS"
1811 cat >conftest.$ac_ext <<_ACEOF
1812 #line 1812 "configure"
1813 #include "confdefs.h"
1828 rm -f conftest.$ac_objext
1829 if { (eval echo "$as_me:1829: \"$ac_compile\"") >&5
1830 (eval $ac_compile) 2>&5
1832 echo "$as_me:1832: \$? = $ac_status" >&5
1833 (exit $ac_status); } &&
1834 { ac_try='test -s conftest.$ac_objext'
1835 { (eval echo "$as_me:1835: \"$ac_try\"") >&5
1838 echo "$as_me:1838: \$? = $ac_status" >&5
1839 (exit $ac_status); }; }; then
1843 echo "$as_me: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1846 rm -f conftest.$ac_objext conftest.$ac_ext
1847 CFLAGS="$cf_save_CFLAGS"
1848 echo "$as_me:1848: result: $CLANG_COMPILER" >&5
1849 echo "${ECHO_T}$CLANG_COMPILER" >&6
1854 if test "x$CLANG_COMPILER" = "xyes" ; then
1856 (c[1-9][0-9]|*/c[1-9][0-9])
1857 { echo "$as_me:1857: WARNING: replacing broken compiler alias $CC" >&5
1858 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1859 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1864 echo "$as_me:1864: checking version of $CC" >&5
1865 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1866 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1867 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1868 echo "$as_me:1868: result: $CLANG_VERSION" >&5
1869 echo "${ECHO_T}$CLANG_VERSION" >&6
1871 for cf_clang_opt in \
1872 -Qunused-arguments \
1873 -Wno-error=implicit-function-declaration
1875 echo "$as_me:1875: checking if option $cf_clang_opt works" >&5
1876 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1877 cf_save_CFLAGS="$CFLAGS"
1878 CFLAGS="$CFLAGS $cf_clang_opt"
1879 cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1893 rm -f conftest.$ac_objext conftest$ac_exeext
1894 if { (eval echo "$as_me:1894: \"$ac_link\"") >&5
1895 (eval $ac_link) 2>&5
1897 echo "$as_me:1897: \$? = $ac_status" >&5
1898 (exit $ac_status); } &&
1899 { ac_try='test -s conftest$ac_exeext'
1900 { (eval echo "$as_me:1900: \"$ac_try\"") >&5
1903 echo "$as_me:1903: \$? = $ac_status" >&5
1904 (exit $ac_status); }; }; then
1908 echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1914 echo "$as_me:1914: result: $cf_clang_optok" >&5
1915 echo "${ECHO_T}$cf_clang_optok" >&6
1916 CFLAGS="$cf_save_CFLAGS"
1917 if test $cf_clang_optok = yes; then
1918 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
1920 echo "${as_me:-configure}:1920: testing adding option $cf_clang_opt ..." 1>&5
1922 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1923 CFLAGS="${CFLAGS}$cf_clang_opt"
1929 echo "$as_me:1929: checking for $CC option to accept ANSI C" >&5
1930 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1931 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1932 echo $ECHO_N "(cached) $ECHO_C" >&6
1934 ac_cv_prog_cc_stdc=no
1936 cat >conftest.$ac_ext <<_ACEOF
1937 #line 1937 "configure"
1938 #include "confdefs.h"
1941 #include <sys/types.h>
1942 #include <sys/stat.h>
1943 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1944 struct buf { int x; };
1945 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1946 static char *e (p, i)
1952 static char *f (char * (*g) (char **, int), char **p, ...)
1957 s = g (p, va_arg (v,int));
1961 int test (int i, double x);
1962 struct s1 {int (*f) (int a);};
1963 struct s2 {int (*f) (double a);};
1964 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1970 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1975 # Don't try gcc -ansi; that turns off useful extensions and
1976 # breaks some systems' header files.
1977 # AIX -qlanglvl=ansi
1978 # Ultrix and OSF/1 -std1
1979 # HP-UX 10.20 and later -Ae
1980 # HP-UX older versions -Aa -D_HPUX_SOURCE
1981 # SVR4 -Xc -D__EXTENSIONS__
1982 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1984 CC="$ac_save_CC $ac_arg"
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987 (eval $ac_compile) 2>&5
1989 echo "$as_me:1989: \$? = $ac_status" >&5
1990 (exit $ac_status); } &&
1991 { ac_try='test -s conftest.$ac_objext'
1992 { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1995 echo "$as_me:1995: \$? = $ac_status" >&5
1996 (exit $ac_status); }; }; then
1997 ac_cv_prog_cc_stdc=$ac_arg
2000 echo "$as_me: failed program was:" >&5
2001 cat conftest.$ac_ext >&5
2003 rm -f conftest.$ac_objext
2005 rm -f conftest.$ac_ext conftest.$ac_objext
2010 case "x$ac_cv_prog_cc_stdc" in
2012 echo "$as_me:2012: result: none needed" >&5
2013 echo "${ECHO_T}none needed" >&6 ;;
2015 echo "$as_me:2015: result: $ac_cv_prog_cc_stdc" >&5
2016 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2017 CC="$CC $ac_cv_prog_cc_stdc" ;;
2020 # This should have been defined by AC_PROG_CC
2023 echo "$as_me:2023: checking \$CFLAGS variable" >&5
2024 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2027 echo "$as_me:2027: result: broken" >&5
2028 echo "${ECHO_T}broken" >&6
2029 { echo "$as_me:2029: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2030 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2033 for cf_arg in $cf_flags
2039 cf_new_extra_cppflags=
2041 for cf_add_cflags in $cf_arg
2043 case $cf_fix_cppflags in
2045 case $cf_add_cflags in
2046 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2047 case $cf_add_cflags in
2049 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2051 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2052 && test -z "${cf_tst_cflags}" \
2053 && cf_fix_cppflags=yes
2055 if test $cf_fix_cppflags = yes ; then
2057 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2058 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2061 elif test "${cf_tst_cflags}" = "\"'" ; then
2063 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2064 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2074 case $cf_add_cflags in
2076 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2078 CPPFLAGS=`echo "$CPPFLAGS" | \
2079 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2080 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2085 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2086 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2093 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2094 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2101 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2102 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2104 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2106 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2107 && test -z "${cf_tst_cflags}" \
2108 && cf_fix_cppflags=no
2113 if test -n "$cf_new_cflags" ; then
2115 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2116 CFLAGS="${CFLAGS}$cf_new_cflags"
2120 if test -n "$cf_new_cppflags" ; then
2122 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2123 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2127 if test -n "$cf_new_extra_cppflags" ; then
2129 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2130 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2137 echo "$as_me:2137: result: ok" >&5
2138 echo "${ECHO_T}ok" >&6
2142 echo "$as_me:2142: checking \$CC variable" >&5
2143 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2146 echo "$as_me:2146: result: broken" >&5
2147 echo "${ECHO_T}broken" >&6
2148 { echo "$as_me:2148: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2149 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2151 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2152 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2154 for cf_arg in $cf_flags
2162 cf_new_extra_cppflags=
2164 for cf_add_cflags in $cf_arg
2166 case $cf_fix_cppflags in
2168 case $cf_add_cflags in
2169 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2170 case $cf_add_cflags in
2172 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2174 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2175 && test -z "${cf_tst_cflags}" \
2176 && cf_fix_cppflags=yes
2178 if test $cf_fix_cppflags = yes ; then
2180 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2181 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2184 elif test "${cf_tst_cflags}" = "\"'" ; then
2186 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2187 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2197 case $cf_add_cflags in
2199 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2201 CPPFLAGS=`echo "$CPPFLAGS" | \
2202 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2203 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2208 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2209 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2216 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2217 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2227 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2229 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2230 && test -z "${cf_tst_cflags}" \
2231 && cf_fix_cppflags=no
2236 if test -n "$cf_new_cflags" ; then
2238 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2239 CFLAGS="${CFLAGS}$cf_new_cflags"
2243 if test -n "$cf_new_cppflags" ; then
2245 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2246 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2250 if test -n "$cf_new_extra_cppflags" ; then
2252 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2253 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2263 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2265 echo "${as_me:-configure}:2265: testing resulting CC: '$CC' ..." 1>&5
2267 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2269 echo "${as_me:-configure}:2269: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2271 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2273 echo "${as_me:-configure}:2273: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2277 echo "$as_me:2277: result: ok" >&5
2278 echo "${ECHO_T}ok" >&6
2283 ac_cpp='$CPP $CPPFLAGS'
2284 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2285 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2286 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2287 ac_main_return=return
2288 echo "$as_me:2288: checking how to run the C preprocessor" >&5
2289 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2290 # On Suns, sometimes $CPP names a directory.
2291 if test -n "$CPP" && test -d "$CPP"; then
2294 if test -z "$CPP"; then
2295 if test "${ac_cv_prog_CPP+set}" = set; then
2296 echo $ECHO_N "(cached) $ECHO_C" >&6
2298 # Double quotes because CPP needs to be expanded
2299 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2302 for ac_c_preproc_warn_flag in '' yes
2304 # Use a header file that comes with gcc, so configuring glibc
2305 # with a fresh cross-compiler works.
2306 # On the NeXT, cc -E runs the code through the compiler's parser,
2307 # not just through cpp. "Syntax error" is here to catch this case.
2308 cat >conftest.$ac_ext <<_ACEOF
2309 #line 2309 "configure"
2310 #include "confdefs.h"
2314 if { (eval echo "$as_me:2314: \"$ac_cpp conftest.$ac_ext\"") >&5
2315 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2317 egrep -v '^ *\+' conftest.er1 >conftest.err
2319 cat conftest.err >&5
2320 echo "$as_me:2320: \$? = $ac_status" >&5
2321 (exit $ac_status); } >/dev/null; then
2322 if test -s conftest.err; then
2323 ac_cpp_err=$ac_c_preproc_warn_flag
2330 if test -z "$ac_cpp_err"; then
2333 echo "$as_me: failed program was:" >&5
2334 cat conftest.$ac_ext >&5
2335 # Broken: fails on valid input.
2338 rm -f conftest.err conftest.$ac_ext
2340 # OK, works on sane cases. Now check whether non-existent headers
2341 # can be detected and how.
2342 cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <ac_nonexistent.h>
2347 if { (eval echo "$as_me:2347: \"$ac_cpp conftest.$ac_ext\"") >&5
2348 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2350 egrep -v '^ *\+' conftest.er1 >conftest.err
2352 cat conftest.err >&5
2353 echo "$as_me:2353: \$? = $ac_status" >&5
2354 (exit $ac_status); } >/dev/null; then
2355 if test -s conftest.err; then
2356 ac_cpp_err=$ac_c_preproc_warn_flag
2363 if test -z "$ac_cpp_err"; then
2364 # Broken: success on invalid input.
2367 echo "$as_me: failed program was:" >&5
2368 cat conftest.$ac_ext >&5
2369 # Passes both tests.
2373 rm -f conftest.err conftest.$ac_ext
2376 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2377 rm -f conftest.err conftest.$ac_ext
2378 if $ac_preproc_ok; then
2390 echo "$as_me:2390: result: $CPP" >&5
2391 echo "${ECHO_T}$CPP" >&6
2393 for ac_c_preproc_warn_flag in '' yes
2395 # Use a header file that comes with gcc, so configuring glibc
2396 # with a fresh cross-compiler works.
2397 # On the NeXT, cc -E runs the code through the compiler's parser,
2398 # not just through cpp. "Syntax error" is here to catch this case.
2399 cat >conftest.$ac_ext <<_ACEOF
2400 #line 2400 "configure"
2401 #include "confdefs.h"
2405 if { (eval echo "$as_me:2405: \"$ac_cpp conftest.$ac_ext\"") >&5
2406 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2408 egrep -v '^ *\+' conftest.er1 >conftest.err
2410 cat conftest.err >&5
2411 echo "$as_me:2411: \$? = $ac_status" >&5
2412 (exit $ac_status); } >/dev/null; then
2413 if test -s conftest.err; then
2414 ac_cpp_err=$ac_c_preproc_warn_flag
2421 if test -z "$ac_cpp_err"; then
2424 echo "$as_me: failed program was:" >&5
2425 cat conftest.$ac_ext >&5
2426 # Broken: fails on valid input.
2429 rm -f conftest.err conftest.$ac_ext
2431 # OK, works on sane cases. Now check whether non-existent headers
2432 # can be detected and how.
2433 cat >conftest.$ac_ext <<_ACEOF
2434 #line 2434 "configure"
2435 #include "confdefs.h"
2436 #include <ac_nonexistent.h>
2438 if { (eval echo "$as_me:2438: \"$ac_cpp conftest.$ac_ext\"") >&5
2439 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2441 egrep -v '^ *\+' conftest.er1 >conftest.err
2443 cat conftest.err >&5
2444 echo "$as_me:2444: \$? = $ac_status" >&5
2445 (exit $ac_status); } >/dev/null; then
2446 if test -s conftest.err; then
2447 ac_cpp_err=$ac_c_preproc_warn_flag
2454 if test -z "$ac_cpp_err"; then
2455 # Broken: success on invalid input.
2458 echo "$as_me: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 # Passes both tests.
2464 rm -f conftest.err conftest.$ac_ext
2467 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2468 rm -f conftest.err conftest.$ac_ext
2469 if $ac_preproc_ok; then
2472 { { echo "$as_me:2472: error: C preprocessor \"$CPP\" fails sanity check" >&5
2473 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2474 { (exit 1); exit 1; }; }
2478 ac_cpp='$CPP $CPPFLAGS'
2479 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2480 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2481 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2482 ac_main_return=return
2484 if test $ac_cv_c_compiler_gnu = yes; then
2485 echo "$as_me:2485: checking whether $CC needs -traditional" >&5
2486 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2487 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2488 echo $ECHO_N "(cached) $ECHO_C" >&6
2490 ac_pattern="Autoconf.*'x'"
2491 cat >conftest.$ac_ext <<_ACEOF
2492 #line 2492 "configure"
2493 #include "confdefs.h"
2495 int Autoconf = TIOCGETP;
2497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2498 egrep "$ac_pattern" >/dev/null 2>&1; then
2499 ac_cv_prog_gcc_traditional=yes
2501 ac_cv_prog_gcc_traditional=no
2505 if test $ac_cv_prog_gcc_traditional = no; then
2506 cat >conftest.$ac_ext <<_ACEOF
2507 #line 2507 "configure"
2508 #include "confdefs.h"
2510 int Autoconf = TCGETA;
2512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2513 egrep "$ac_pattern" >/dev/null 2>&1; then
2514 ac_cv_prog_gcc_traditional=yes
2520 echo "$as_me:2520: result: $ac_cv_prog_gcc_traditional" >&5
2521 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2522 if test $ac_cv_prog_gcc_traditional = yes; then
2523 CC="$CC -traditional"
2527 echo "$as_me:2527: checking whether $CC understands -c and -o together" >&5
2528 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2529 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2530 echo $ECHO_N "(cached) $ECHO_C" >&6
2533 cat > conftest.$ac_ext <<CF_EOF
2536 ${cf_cv_main_return:-return}(0);
2539 # We do the test twice because some compilers refuse to overwrite an
2540 # existing .o file with -o, though they will create one.
2541 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2542 if { (eval echo "$as_me:2542: \"$ac_try\"") >&5
2545 echo "$as_me:2545: \$? = $ac_status" >&5
2546 (exit $ac_status); } &&
2547 test -f conftest2.$ac_objext && { (eval echo "$as_me:2547: \"$ac_try\"") >&5
2550 echo "$as_me:2550: \$? = $ac_status" >&5
2551 (exit $ac_status); };
2553 eval cf_cv_prog_CC_c_o=yes
2555 eval cf_cv_prog_CC_c_o=no
2560 if test $cf_cv_prog_CC_c_o = yes; then
2561 echo "$as_me:2561: result: yes" >&5
2562 echo "${ECHO_T}yes" >&6
2564 echo "$as_me:2564: result: no" >&5
2565 echo "${ECHO_T}no" >&6
2568 test "$program_prefix" != NONE &&
2569 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2570 # Use a double $ so make ignores it.
2571 test "$program_suffix" != NONE &&
2572 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2573 # Double any \ or $. echo might interpret backslashes.
2574 # By default was `s,x,x', remove it if useless.
2575 cat <<\_ACEOF >conftest.sed
2576 s/[\\$]/&&/g;s/;s,x,x,$//
2578 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2581 for ac_prog in mawk gawk nawk awk
2583 # Extract the first word of "$ac_prog", so it can be a program name with args.
2584 set dummy $ac_prog; ac_word=$2
2585 echo "$as_me:2585: checking for $ac_word" >&5
2586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2587 if test "${ac_cv_prog_AWK+set}" = set; then
2588 echo $ECHO_N "(cached) $ECHO_C" >&6
2590 if test -n "$AWK"; then
2591 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2593 ac_save_IFS=$IFS; IFS=$ac_path_separator
2595 for ac_dir in $ac_dummy; do
2597 test -z "$ac_dir" && ac_dir=.
2598 $as_executable_p "$ac_dir/$ac_word" || continue
2599 ac_cv_prog_AWK="$ac_prog"
2600 echo "$as_me:2600: found $ac_dir/$ac_word" >&5
2607 if test -n "$AWK"; then
2608 echo "$as_me:2608: result: $AWK" >&5
2609 echo "${ECHO_T}$AWK" >&6
2611 echo "$as_me:2611: result: no" >&5
2612 echo "${ECHO_T}no" >&6
2615 test -n "$AWK" && break
2618 test -z "$AWK" && { { echo "$as_me:2618: error: No awk program found" >&5
2619 echo "$as_me: error: No awk program found" >&2;}
2620 { (exit 1); exit 1; }; }
2622 echo "$as_me:2622: checking for egrep" >&5
2623 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2624 if test "${ac_cv_prog_egrep+set}" = set; then
2625 echo $ECHO_N "(cached) $ECHO_C" >&6
2627 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2628 then ac_cv_prog_egrep='grep -E'
2629 else ac_cv_prog_egrep='egrep'
2632 echo "$as_me:2632: result: $ac_cv_prog_egrep" >&5
2633 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2634 EGREP=$ac_cv_prog_egrep
2636 test -z "$EGREP" && { { echo "$as_me:2636: error: No egrep program found" >&5
2637 echo "$as_me: error: No egrep program found" >&2;}
2638 { (exit 1); exit 1; }; }
2640 # Find a good install program. We prefer a C program (faster),
2641 # so one script is as good as another. But avoid the broken or
2642 # incompatible versions:
2643 # SysV /etc/install, /usr/sbin/install
2644 # SunOS /usr/etc/install
2645 # IRIX /sbin/install
2647 # AmigaOS /C/install, which installs bootblocks on floppy discs
2648 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2649 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2650 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2651 # ./install, which can be erroneously created by make from ./install.sh.
2652 echo "$as_me:2652: checking for a BSD compatible install" >&5
2653 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2654 if test -z "$INSTALL"; then
2655 if test "${ac_cv_path_install+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_save_IFS=$IFS; IFS=$ac_path_separator
2659 for ac_dir in $PATH; do
2661 # Account for people who put trailing slashes in PATH elements.
2663 / | ./ | .// | /cC/* \
2664 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2667 # OSF1 and SCO ODT 3.0 have their own names for install.
2668 # Don't use installbsd from OSF since it installs stuff as root
2670 for ac_prog in ginstall scoinst install; do
2671 if $as_executable_p "$ac_dir/$ac_prog"; then
2672 if test $ac_prog = install &&
2673 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2674 # AIX install. It has an incompatible calling convention.
2676 elif test $ac_prog = install &&
2677 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2678 # program-specific install script used by HP pwplus--don't use.
2681 ac_cv_path_install="$ac_dir/$ac_prog -c"
2691 if test "${ac_cv_path_install+set}" = set; then
2692 INSTALL=$ac_cv_path_install
2694 # As a last resort, use the slow shell script. We don't cache a
2695 # path for INSTALL within a source directory, because that will
2696 # break other packages using the cache if that directory is
2697 # removed, or if the path is relative.
2698 INSTALL=$ac_install_sh
2701 echo "$as_me:2701: result: $INSTALL" >&5
2702 echo "${ECHO_T}$INSTALL" >&6
2704 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2705 # It thinks the first close brace ends the variable substitution.
2706 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2708 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2710 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2712 echo "$as_me:2712: checking whether ln -s works" >&5
2713 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2715 if test "$LN_S" = "ln -s"; then
2716 echo "$as_me:2716: result: yes" >&5
2717 echo "${ECHO_T}yes" >&6
2719 echo "$as_me:2719: result: no, using $LN_S" >&5
2720 echo "${ECHO_T}no, using $LN_S" >&6
2723 echo "$as_me:2723: checking if $LN_S -f options work" >&5
2724 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2726 rm -f conf$$.src conf$$dst
2728 echo first >conf$$.src
2729 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2734 rm -f conf$$.dst conf$$src
2735 echo "$as_me:2735: result: $cf_prog_ln_sf" >&5
2736 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2738 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2740 # Find a good install program. We prefer a C program (faster),
2741 # so one script is as good as another. But avoid the broken or
2742 # incompatible versions:
2743 # SysV /etc/install, /usr/sbin/install
2744 # SunOS /usr/etc/install
2745 # IRIX /sbin/install
2747 # AmigaOS /C/install, which installs bootblocks on floppy discs
2748 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2749 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2750 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2751 # ./install, which can be erroneously created by make from ./install.sh.
2752 echo "$as_me:2752: checking for a BSD compatible install" >&5
2753 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2754 if test -z "$INSTALL"; then
2755 if test "${ac_cv_path_install+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 ac_save_IFS=$IFS; IFS=$ac_path_separator
2759 for ac_dir in $PATH; do
2761 # Account for people who put trailing slashes in PATH elements.
2763 / | ./ | .// | /cC/* \
2764 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2767 # OSF1 and SCO ODT 3.0 have their own names for install.
2768 # Don't use installbsd from OSF since it installs stuff as root
2770 for ac_prog in ginstall scoinst install; do
2771 if $as_executable_p "$ac_dir/$ac_prog"; then
2772 if test $ac_prog = install &&
2773 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2774 # AIX install. It has an incompatible calling convention.
2776 elif test $ac_prog = install &&
2777 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2778 # program-specific install script used by HP pwplus--don't use.
2781 ac_cv_path_install="$ac_dir/$ac_prog -c"
2791 if test "${ac_cv_path_install+set}" = set; then
2792 INSTALL=$ac_cv_path_install
2794 # As a last resort, use the slow shell script. We don't cache a
2795 # path for INSTALL within a source directory, because that will
2796 # break other packages using the cache if that directory is
2797 # removed, or if the path is relative.
2798 INSTALL=$ac_install_sh
2801 echo "$as_me:2801: result: $INSTALL" >&5
2802 echo "${ECHO_T}$INSTALL" >&6
2804 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2805 # It thinks the first close brace ends the variable substitution.
2806 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2808 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2810 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2816 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2817 test -z "$cf_dir" && cf_dir=.
2818 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2822 echo "$as_me:2822: checking if you want to install stripped executables" >&5
2823 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2825 # Check whether --enable-stripping or --disable-stripping was given.
2826 if test "${enable_stripping+set}" = set; then
2827 enableval="$enable_stripping"
2828 test "$enableval" != no && enableval=yes
2829 if test "$enableval" != "yes" ; then
2839 echo "$as_me:2839: result: $with_stripping" >&5
2840 echo "${ECHO_T}$with_stripping" >&6
2842 if test "$with_stripping" = yes
2849 : ${INSTALL:=install}
2850 echo "$as_me:2850: checking if install accepts -p option" >&5
2851 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2852 if test "${cf_cv_install_p+set}" = set; then
2853 echo $ECHO_N "(cached) $ECHO_C" >&6
2860 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2862 if test -f conftest.out/conftest.in
2864 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2865 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2866 if test -s conftest.err
2881 echo "$as_me:2881: result: $cf_cv_install_p" >&5
2882 echo "${ECHO_T}$cf_cv_install_p" >&6
2884 echo "$as_me:2884: checking if install needs to be told about ownership" >&5
2885 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2886 case `$ac_config_guess` in
2895 echo "$as_me:2895: result: $with_install_o" >&5
2896 echo "${ECHO_T}$with_install_o" >&6
2897 if test "x$with_install_o" = xyes
2899 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'`
2904 echo "$as_me:2904: checking for long file names" >&5
2905 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2906 if test "${ac_cv_sys_long_file_names+set}" = set; then
2907 echo $ECHO_N "(cached) $ECHO_C" >&6
2909 ac_cv_sys_long_file_names=yes
2910 # Test for long file names in all the places we know might matter:
2911 # . the current directory, where building will happen
2912 # $prefix/lib where we will be installing things
2913 # $exec_prefix/lib likewise
2914 # eval it to expand exec_prefix.
2915 # $TMPDIR if set, where it might want to write temporary files
2916 # if $TMPDIR is not set:
2917 # /tmp where it might want to write temporary files
2920 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2923 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2925 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2926 test -d $ac_dir || continue
2927 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2928 ac_xdir=$ac_dir/cf$$
2929 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2930 ac_tf1=$ac_xdir/conftest9012345
2931 ac_tf2=$ac_xdir/conftest9012346
2932 (echo 1 >$ac_tf1) 2>/dev/null
2933 (echo 2 >$ac_tf2) 2>/dev/null
2934 ac_val=`cat $ac_tf1 2>/dev/null`
2935 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2936 ac_cv_sys_long_file_names=no
2937 rm -rf $ac_xdir 2>/dev/null
2940 rm -rf $ac_xdir 2>/dev/null
2943 echo "$as_me:2943: result: $ac_cv_sys_long_file_names" >&5
2944 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2945 if test $ac_cv_sys_long_file_names = yes; then
2947 cat >>confdefs.h <<\EOF
2948 #define HAVE_LONG_FILE_NAMES 1
2953 # if we find pkg-config, check if we should install the ".pc" files.
2955 echo "$as_me:2955: checking if you want to use pkg-config" >&5
2956 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2958 # Check whether --with-pkg-config or --without-pkg-config was given.
2959 if test "${with_pkg_config+set}" = set; then
2960 withval="$with_pkg_config"
2961 cf_pkg_config=$withval
2965 echo "$as_me:2965: result: $cf_pkg_config" >&5
2966 echo "${ECHO_T}$cf_pkg_config" >&6
2968 case $cf_pkg_config in
2974 if test -n "$ac_tool_prefix"; then
2975 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2976 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2977 echo "$as_me:2977: checking for $ac_word" >&5
2978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2979 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2980 echo $ECHO_N "(cached) $ECHO_C" >&6
2984 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2987 ac_save_IFS=$IFS; IFS=$ac_path_separator
2989 for ac_dir in $ac_dummy; do
2991 test -z "$ac_dir" && ac_dir=.
2992 if $as_executable_p "$ac_dir/$ac_word"; then
2993 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2994 echo "$as_me:2994: found $ac_dir/$ac_word" >&5
3002 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3004 if test -n "$PKG_CONFIG"; then
3005 echo "$as_me:3005: result: $PKG_CONFIG" >&5
3006 echo "${ECHO_T}$PKG_CONFIG" >&6
3008 echo "$as_me:3008: result: no" >&5
3009 echo "${ECHO_T}no" >&6
3013 if test -z "$ac_cv_path_PKG_CONFIG"; then
3014 ac_pt_PKG_CONFIG=$PKG_CONFIG
3015 # Extract the first word of "pkg-config", so it can be a program name with args.
3016 set dummy pkg-config; ac_word=$2
3017 echo "$as_me:3017: checking for $ac_word" >&5
3018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3019 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3022 case $ac_pt_PKG_CONFIG in
3024 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3027 ac_save_IFS=$IFS; IFS=$ac_path_separator
3029 for ac_dir in $ac_dummy; do
3031 test -z "$ac_dir" && ac_dir=.
3032 if $as_executable_p "$ac_dir/$ac_word"; then
3033 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3034 echo "$as_me:3034: found $ac_dir/$ac_word" >&5
3039 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3043 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3045 if test -n "$ac_pt_PKG_CONFIG"; then
3046 echo "$as_me:3046: result: $ac_pt_PKG_CONFIG" >&5
3047 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3049 echo "$as_me:3049: result: no" >&5
3050 echo "${ECHO_T}no" >&6
3053 PKG_CONFIG=$ac_pt_PKG_CONFIG
3055 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3064 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3065 if test "$PKG_CONFIG" != none ; then
3067 if test "x$prefix" != xNONE; then
3068 cf_path_syntax="$prefix"
3070 cf_path_syntax="$ac_default_prefix"
3073 case ".$PKG_CONFIG" in
3078 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3080 (.\${*prefix}*|.\${*dir}*)
3081 eval PKG_CONFIG="$PKG_CONFIG"
3082 case ".$PKG_CONFIG" in
3084 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3089 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3092 { { echo "$as_me:3092: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3093 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3094 { (exit 1); exit 1; }; }
3098 elif test "x$cf_pkg_config" != xno ; then
3099 { echo "$as_me:3099: WARNING: pkg-config is not installed" >&5
3100 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3105 echo "$as_me:3105: checking for pkg-config library directory" >&5
3106 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3109 echo "$as_me:3109: checking for $PKG_CONFIG library directory" >&5
3110 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3114 PKG_CONFIG_LIBDIR=no
3116 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3117 if test "${with_pkg_config_libdir+set}" = set; then
3118 withval="$with_pkg_config_libdir"
3119 PKG_CONFIG_LIBDIR=$withval
3121 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3124 case x$PKG_CONFIG_LIBDIR in
3128 # Look for the library directory using the same prefix as the executable
3129 if test "x$PKG_CONFIG" = xnone
3133 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3136 # If you don't like using the default architecture, you have to specify the
3137 # intended library directory and corresponding compiler/linker options.
3139 # This case allows for Debian's 2014-flavor of multiarch, along with the
3140 # most common variations before that point. Some other variants spell the
3141 # directory differently, e.g., "pkg-config", and put it in unusual places.
3142 # pkg-config has always been poorly standardized, which is ironic...
3143 case x`(arch) 2>/dev/null` in
3146 $cf_path/lib/*64-linux-gnu \
3154 $cf_path/lib/*-linux-gnu \
3162 test -n "$verbose" && echo " list..." 1>&6
3164 echo "${as_me:-configure}:3164: testing list... ..." 1>&5
3166 for cf_config in $cf_search_path
3168 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3170 echo "${as_me:-configure}:3170: testing checking $cf_config/pkgconfig ..." 1>&5
3172 if test -d $cf_config/pkgconfig
3174 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3175 echo "$as_me:3175: checking done" >&5
3176 echo $ECHO_N "checking done... $ECHO_C" >&6
3185 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3186 echo "$as_me:3186: result: $PKG_CONFIG_LIBDIR" >&5
3187 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3190 echo "$as_me:3190: checking if you want to build test-programs" >&5
3191 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3193 # Check whether --with-tests or --without-tests was given.
3194 if test "${with_tests+set}" = set; then
3195 withval="$with_tests"
3196 cf_with_tests=$withval
3200 echo "$as_me:3200: result: $cf_with_tests" >&5
3201 echo "${ECHO_T}$cf_with_tests" >&6
3203 echo "$as_me:3203: checking if we should assume mixed-case filenames" >&5
3204 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3206 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3207 if test "${enable_mixed_case+set}" = set; then
3208 enableval="$enable_mixed_case"
3209 enable_mixedcase=$enableval
3211 enable_mixedcase=auto
3213 echo "$as_me:3213: result: $enable_mixedcase" >&5
3214 echo "${ECHO_T}$enable_mixedcase" >&6
3215 if test "$enable_mixedcase" = "auto" ; then
3217 echo "$as_me:3217: checking if filesystem supports mixed-case filenames" >&5
3218 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3219 if test "${cf_cv_mixedcase+set}" = set; then
3220 echo $ECHO_N "(cached) $ECHO_C" >&6
3223 if test "$cross_compiling" = yes ; then
3224 case $target_alias in
3225 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3233 rm -f conftest CONFTEST
3235 if test -f CONFTEST ; then
3240 rm -f conftest CONFTEST
3244 echo "$as_me:3244: result: $cf_cv_mixedcase" >&5
3245 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3246 test "$cf_cv_mixedcase" = yes &&
3247 cat >>confdefs.h <<\EOF
3248 #define MIXEDCASE_FILENAMES 1
3252 cf_cv_mixedcase=$enable_mixedcase
3253 if test "$enable_mixedcase" = "yes" ; then
3254 cat >>confdefs.h <<\EOF
3255 #define MIXEDCASE_FILENAMES 1
3261 # do this after mixed-case option (tags/TAGS is not as important as tic).
3262 echo "$as_me:3262: checking whether ${MAKE-make} sets \${MAKE}" >&5
3263 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3264 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3265 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3266 echo $ECHO_N "(cached) $ECHO_C" >&6
3268 cat >conftest.make <<\EOF
3270 @echo 'ac_maketemp="${MAKE}"'
3272 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3273 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3274 if test -n "$ac_maketemp"; then
3275 eval ac_cv_prog_make_${ac_make}_set=yes
3277 eval ac_cv_prog_make_${ac_make}_set=no
3281 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3282 echo "$as_me:3282: result: yes" >&5
3283 echo "${ECHO_T}yes" >&6
3286 echo "$as_me:3286: result: no" >&5
3287 echo "${ECHO_T}no" >&6
3288 SET_MAKE="MAKE=${MAKE-make}"
3291 for ac_prog in exctags ctags
3293 # Extract the first word of "$ac_prog", so it can be a program name with args.
3294 set dummy $ac_prog; ac_word=$2
3295 echo "$as_me:3295: checking for $ac_word" >&5
3296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3297 if test "${ac_cv_prog_CTAGS+set}" = set; then
3298 echo $ECHO_N "(cached) $ECHO_C" >&6
3300 if test -n "$CTAGS"; then
3301 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3303 ac_save_IFS=$IFS; IFS=$ac_path_separator
3305 for ac_dir in $ac_dummy; do
3307 test -z "$ac_dir" && ac_dir=.
3308 $as_executable_p "$ac_dir/$ac_word" || continue
3309 ac_cv_prog_CTAGS="$ac_prog"
3310 echo "$as_me:3310: found $ac_dir/$ac_word" >&5
3316 CTAGS=$ac_cv_prog_CTAGS
3317 if test -n "$CTAGS"; then
3318 echo "$as_me:3318: result: $CTAGS" >&5
3319 echo "${ECHO_T}$CTAGS" >&6
3321 echo "$as_me:3321: result: no" >&5
3322 echo "${ECHO_T}no" >&6
3325 test -n "$CTAGS" && break
3328 for ac_prog in exetags etags
3330 # Extract the first word of "$ac_prog", so it can be a program name with args.
3331 set dummy $ac_prog; ac_word=$2
3332 echo "$as_me:3332: checking for $ac_word" >&5
3333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3334 if test "${ac_cv_prog_ETAGS+set}" = set; then
3335 echo $ECHO_N "(cached) $ECHO_C" >&6
3337 if test -n "$ETAGS"; then
3338 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3340 ac_save_IFS=$IFS; IFS=$ac_path_separator
3342 for ac_dir in $ac_dummy; do
3344 test -z "$ac_dir" && ac_dir=.
3345 $as_executable_p "$ac_dir/$ac_word" || continue
3346 ac_cv_prog_ETAGS="$ac_prog"
3347 echo "$as_me:3347: found $ac_dir/$ac_word" >&5
3353 ETAGS=$ac_cv_prog_ETAGS
3354 if test -n "$ETAGS"; then
3355 echo "$as_me:3355: result: $ETAGS" >&5
3356 echo "${ECHO_T}$ETAGS" >&6
3358 echo "$as_me:3358: result: no" >&5
3359 echo "${ECHO_T}no" >&6
3362 test -n "$ETAGS" && break
3365 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3366 set dummy ${CTAGS:-ctags}; ac_word=$2
3367 echo "$as_me:3367: checking for $ac_word" >&5
3368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3369 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3370 echo $ECHO_N "(cached) $ECHO_C" >&6
3372 if test -n "$MAKE_LOWER_TAGS"; then
3373 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3375 ac_save_IFS=$IFS; IFS=$ac_path_separator
3377 for ac_dir in $ac_dummy; do
3379 test -z "$ac_dir" && ac_dir=.
3380 $as_executable_p "$ac_dir/$ac_word" || continue
3381 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3382 echo "$as_me:3382: found $ac_dir/$ac_word" >&5
3386 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3389 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3390 if test -n "$MAKE_LOWER_TAGS"; then
3391 echo "$as_me:3391: result: $MAKE_LOWER_TAGS" >&5
3392 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3394 echo "$as_me:3394: result: no" >&5
3395 echo "${ECHO_T}no" >&6
3398 if test "$cf_cv_mixedcase" = yes ; then
3399 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3400 set dummy ${ETAGS:-etags}; ac_word=$2
3401 echo "$as_me:3401: checking for $ac_word" >&5
3402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3403 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3404 echo $ECHO_N "(cached) $ECHO_C" >&6
3406 if test -n "$MAKE_UPPER_TAGS"; then
3407 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3409 ac_save_IFS=$IFS; IFS=$ac_path_separator
3411 for ac_dir in $ac_dummy; do
3413 test -z "$ac_dir" && ac_dir=.
3414 $as_executable_p "$ac_dir/$ac_word" || continue
3415 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3416 echo "$as_me:3416: found $ac_dir/$ac_word" >&5
3420 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3423 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3424 if test -n "$MAKE_UPPER_TAGS"; then
3425 echo "$as_me:3425: result: $MAKE_UPPER_TAGS" >&5
3426 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3428 echo "$as_me:3428: result: no" >&5
3429 echo "${ECHO_T}no" >&6
3436 if test "$MAKE_UPPER_TAGS" = yes ; then
3442 if test "$MAKE_LOWER_TAGS" = yes ; then
3448 echo "$as_me:3448: checking for makeflags variable" >&5
3449 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3450 if test "${cf_cv_makeflags+set}" = set; then
3451 echo $ECHO_N "(cached) $ECHO_C" >&6
3455 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3457 cat >cf_makeflags.tmp <<CF_EOF
3460 @ echo '.$cf_option'
3462 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3463 case "$cf_result" in
3465 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3466 case "$cf_result" in
3467 (.*CC=*) cf_cv_makeflags=
3469 (*) cf_cv_makeflags=$cf_option
3478 echo "${as_me:-configure}:3478: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3483 rm -f cf_makeflags.tmp
3486 echo "$as_me:3486: result: $cf_cv_makeflags" >&5
3487 echo "${ECHO_T}$cf_cv_makeflags" >&6
3489 if test -n "$ac_tool_prefix"; then
3490 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3491 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3492 echo "$as_me:3492: checking for $ac_word" >&5
3493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3494 if test "${ac_cv_prog_RANLIB+set}" = set; then
3495 echo $ECHO_N "(cached) $ECHO_C" >&6
3497 if test -n "$RANLIB"; then
3498 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3500 ac_save_IFS=$IFS; IFS=$ac_path_separator
3502 for ac_dir in $ac_dummy; do
3504 test -z "$ac_dir" && ac_dir=.
3505 $as_executable_p "$ac_dir/$ac_word" || continue
3506 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3507 echo "$as_me:3507: found $ac_dir/$ac_word" >&5
3513 RANLIB=$ac_cv_prog_RANLIB
3514 if test -n "$RANLIB"; then
3515 echo "$as_me:3515: result: $RANLIB" >&5
3516 echo "${ECHO_T}$RANLIB" >&6
3518 echo "$as_me:3518: result: no" >&5
3519 echo "${ECHO_T}no" >&6
3523 if test -z "$ac_cv_prog_RANLIB"; then
3524 ac_ct_RANLIB=$RANLIB
3525 # Extract the first word of "ranlib", so it can be a program name with args.
3526 set dummy ranlib; ac_word=$2
3527 echo "$as_me:3527: checking for $ac_word" >&5
3528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3529 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3530 echo $ECHO_N "(cached) $ECHO_C" >&6
3532 if test -n "$ac_ct_RANLIB"; then
3533 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3535 ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 for ac_dir in $ac_dummy; do
3539 test -z "$ac_dir" && ac_dir=.
3540 $as_executable_p "$ac_dir/$ac_word" || continue
3541 ac_cv_prog_ac_ct_RANLIB="ranlib"
3542 echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3546 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3549 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3550 if test -n "$ac_ct_RANLIB"; then
3551 echo "$as_me:3551: result: $ac_ct_RANLIB" >&5
3552 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3554 echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3558 RANLIB=$ac_ct_RANLIB
3560 RANLIB="$ac_cv_prog_RANLIB"
3563 if test -n "$ac_tool_prefix"; then
3564 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3565 set dummy ${ac_tool_prefix}ld; ac_word=$2
3566 echo "$as_me:3566: checking for $ac_word" >&5
3567 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3568 if test "${ac_cv_prog_LD+set}" = set; then
3569 echo $ECHO_N "(cached) $ECHO_C" >&6
3571 if test -n "$LD"; then
3572 ac_cv_prog_LD="$LD" # Let the user override the test.
3574 ac_save_IFS=$IFS; IFS=$ac_path_separator
3576 for ac_dir in $ac_dummy; do
3578 test -z "$ac_dir" && ac_dir=.
3579 $as_executable_p "$ac_dir/$ac_word" || continue
3580 ac_cv_prog_LD="${ac_tool_prefix}ld"
3581 echo "$as_me:3581: found $ac_dir/$ac_word" >&5
3588 if test -n "$LD"; then
3589 echo "$as_me:3589: result: $LD" >&5
3590 echo "${ECHO_T}$LD" >&6
3592 echo "$as_me:3592: result: no" >&5
3593 echo "${ECHO_T}no" >&6
3597 if test -z "$ac_cv_prog_LD"; then
3599 # Extract the first word of "ld", so it can be a program name with args.
3600 set dummy ld; ac_word=$2
3601 echo "$as_me:3601: checking for $ac_word" >&5
3602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3603 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3604 echo $ECHO_N "(cached) $ECHO_C" >&6
3606 if test -n "$ac_ct_LD"; then
3607 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3609 ac_save_IFS=$IFS; IFS=$ac_path_separator
3611 for ac_dir in $ac_dummy; do
3613 test -z "$ac_dir" && ac_dir=.
3614 $as_executable_p "$ac_dir/$ac_word" || continue
3615 ac_cv_prog_ac_ct_LD="ld"
3616 echo "$as_me:3616: found $ac_dir/$ac_word" >&5
3620 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3623 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3624 if test -n "$ac_ct_LD"; then
3625 echo "$as_me:3625: result: $ac_ct_LD" >&5
3626 echo "${ECHO_T}$ac_ct_LD" >&6
3628 echo "$as_me:3628: result: no" >&5
3629 echo "${ECHO_T}no" >&6
3637 if test -n "$ac_tool_prefix"; then
3638 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3639 set dummy ${ac_tool_prefix}ar; ac_word=$2
3640 echo "$as_me:3640: checking for $ac_word" >&5
3641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3642 if test "${ac_cv_prog_AR+set}" = set; then
3643 echo $ECHO_N "(cached) $ECHO_C" >&6
3645 if test -n "$AR"; then
3646 ac_cv_prog_AR="$AR" # Let the user override the test.
3648 ac_save_IFS=$IFS; IFS=$ac_path_separator
3650 for ac_dir in $ac_dummy; do
3652 test -z "$ac_dir" && ac_dir=.
3653 $as_executable_p "$ac_dir/$ac_word" || continue
3654 ac_cv_prog_AR="${ac_tool_prefix}ar"
3655 echo "$as_me:3655: found $ac_dir/$ac_word" >&5
3662 if test -n "$AR"; then
3663 echo "$as_me:3663: result: $AR" >&5
3664 echo "${ECHO_T}$AR" >&6
3666 echo "$as_me:3666: result: no" >&5
3667 echo "${ECHO_T}no" >&6
3671 if test -z "$ac_cv_prog_AR"; then
3673 # Extract the first word of "ar", so it can be a program name with args.
3674 set dummy ar; ac_word=$2
3675 echo "$as_me:3675: checking for $ac_word" >&5
3676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3677 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3678 echo $ECHO_N "(cached) $ECHO_C" >&6
3680 if test -n "$ac_ct_AR"; then
3681 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3683 ac_save_IFS=$IFS; IFS=$ac_path_separator
3685 for ac_dir in $ac_dummy; do
3687 test -z "$ac_dir" && ac_dir=.
3688 $as_executable_p "$ac_dir/$ac_word" || continue
3689 ac_cv_prog_ac_ct_AR="ar"
3690 echo "$as_me:3690: found $ac_dir/$ac_word" >&5
3694 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3697 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3698 if test -n "$ac_ct_AR"; then
3699 echo "$as_me:3699: result: $ac_ct_AR" >&5
3700 echo "${ECHO_T}$ac_ct_AR" >&6
3702 echo "$as_me:3702: result: no" >&5
3703 echo "${ECHO_T}no" >&6
3711 if test -n "$ac_tool_prefix"; then
3712 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3713 set dummy ${ac_tool_prefix}ar; ac_word=$2
3714 echo "$as_me:3714: checking for $ac_word" >&5
3715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3716 if test "${ac_cv_prog_AR+set}" = set; then
3717 echo $ECHO_N "(cached) $ECHO_C" >&6
3719 if test -n "$AR"; then
3720 ac_cv_prog_AR="$AR" # Let the user override the test.
3722 ac_save_IFS=$IFS; IFS=$ac_path_separator
3724 for ac_dir in $ac_dummy; do
3726 test -z "$ac_dir" && ac_dir=.
3727 $as_executable_p "$ac_dir/$ac_word" || continue
3728 ac_cv_prog_AR="${ac_tool_prefix}ar"
3729 echo "$as_me:3729: found $ac_dir/$ac_word" >&5
3736 if test -n "$AR"; then
3737 echo "$as_me:3737: result: $AR" >&5
3738 echo "${ECHO_T}$AR" >&6
3740 echo "$as_me:3740: result: no" >&5
3741 echo "${ECHO_T}no" >&6
3745 if test -z "$ac_cv_prog_AR"; then
3747 # Extract the first word of "ar", so it can be a program name with args.
3748 set dummy ar; ac_word=$2
3749 echo "$as_me:3749: checking for $ac_word" >&5
3750 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3751 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3752 echo $ECHO_N "(cached) $ECHO_C" >&6
3754 if test -n "$ac_ct_AR"; then
3755 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3757 ac_save_IFS=$IFS; IFS=$ac_path_separator
3759 for ac_dir in $ac_dummy; do
3761 test -z "$ac_dir" && ac_dir=.
3762 $as_executable_p "$ac_dir/$ac_word" || continue
3763 ac_cv_prog_ac_ct_AR="ar"
3764 echo "$as_me:3764: found $ac_dir/$ac_word" >&5
3768 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3771 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3772 if test -n "$ac_ct_AR"; then
3773 echo "$as_me:3773: result: $ac_ct_AR" >&5
3774 echo "${ECHO_T}$ac_ct_AR" >&6
3776 echo "$as_me:3776: result: no" >&5
3777 echo "${ECHO_T}no" >&6
3785 echo "$as_me:3785: checking for options to update archives" >&5
3786 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3787 if test "${cf_cv_ar_flags+set}" = set; then
3788 echo $ECHO_N "(cached) $ECHO_C" >&6
3791 case $cf_cv_system_name in
3794 cat >mk_static_lib.sh <<-EOF
3799 exec \$MSVC_BIN -out:"\$out" \$@
3801 chmod +x mk_static_lib.sh
3802 AR=`pwd`/mk_static_lib.sh
3805 cf_cv_ar_flags=unknown
3806 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3809 # check if $ARFLAGS already contains this choice
3810 if test "x$ARFLAGS" != "x" ; then
3811 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3812 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3818 rm -f conftest.$ac_cv_objext
3821 cat >conftest.$ac_ext <<EOF
3822 #line 3822 "configure"
3823 int testdata[3] = { 123, 456, 789 };
3825 if { (eval echo "$as_me:3825: \"$ac_compile\"") >&5
3826 (eval $ac_compile) 2>&5
3828 echo "$as_me:3828: \$? = $ac_status" >&5
3829 (exit $ac_status); } ; then
3830 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3831 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3832 if test -f conftest.a ; then
3833 cf_cv_ar_flags=$cf_ar_flags
3837 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3839 echo "${as_me:-configure}:3839: testing cannot compile test-program ..." 1>&5
3844 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3849 echo "$as_me:3849: result: $cf_cv_ar_flags" >&5
3850 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3852 if test -n "$ARFLAGS" ; then
3853 if test -n "$cf_cv_ar_flags" ; then
3854 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3857 ARFLAGS=$cf_cv_ar_flags
3860 echo "$as_me:3860: checking for PATH separator" >&5
3861 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3862 case $cf_cv_system_name in
3863 (os2*) PATH_SEPARATOR=';' ;;
3864 (*) ${PATH_SEPARATOR:=':'} ;;
3867 echo "$as_me:3867: result: $PATH_SEPARATOR" >&5
3868 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3870 echo "$as_me:3870: checking if you have specified an install-prefix" >&5
3871 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3873 # Check whether --with-install-prefix or --without-install-prefix was given.
3874 if test "${with_install_prefix+set}" = set; then
3875 withval="$with_install_prefix"
3879 (*) DESTDIR="$withval"
3883 echo "$as_me:3883: result: $DESTDIR" >&5
3884 echo "${ECHO_T}$DESTDIR" >&6
3886 ###############################################################################
3888 # If we're cross-compiling, allow the user to override the tools and their
3889 # options. The configure script is oriented toward identifying the host
3890 # compiler, etc., but we need a build compiler to generate parts of the source.
3892 if test "$cross_compiling" = yes ; then
3894 # defaults that we might want to override
3895 : ${BUILD_CFLAGS:=''}
3896 : ${BUILD_CPPFLAGS:=''}
3897 : ${BUILD_LDFLAGS:=''}
3899 : ${BUILD_EXEEXT:='$x'}
3900 : ${BUILD_OBJEXT:='o'}
3902 # Check whether --with-build-cc or --without-build-cc was given.
3903 if test "${with_build_cc+set}" = set; then
3904 withval="$with_build_cc"
3907 for ac_prog in gcc clang c99 c89 cc cl
3909 # Extract the first word of "$ac_prog", so it can be a program name with args.
3910 set dummy $ac_prog; ac_word=$2
3911 echo "$as_me:3911: checking for $ac_word" >&5
3912 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3913 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3914 echo $ECHO_N "(cached) $ECHO_C" >&6
3916 if test -n "$BUILD_CC"; then
3917 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3919 ac_save_IFS=$IFS; IFS=$ac_path_separator
3921 for ac_dir in $ac_dummy; do
3923 test -z "$ac_dir" && ac_dir=.
3924 $as_executable_p "$ac_dir/$ac_word" || continue
3925 ac_cv_prog_BUILD_CC="$ac_prog"
3926 echo "$as_me:3926: found $ac_dir/$ac_word" >&5
3932 BUILD_CC=$ac_cv_prog_BUILD_CC
3933 if test -n "$BUILD_CC"; then
3934 echo "$as_me:3934: result: $BUILD_CC" >&5
3935 echo "${ECHO_T}$BUILD_CC" >&6
3937 echo "$as_me:3937: result: no" >&5
3938 echo "${ECHO_T}no" >&6
3941 test -n "$BUILD_CC" && break
3943 test -n "$BUILD_CC" || BUILD_CC="none"
3946 echo "$as_me:3946: checking for native build C compiler" >&5
3947 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3948 echo "$as_me:3948: result: $BUILD_CC" >&5
3949 echo "${ECHO_T}$BUILD_CC" >&6
3951 echo "$as_me:3951: checking for native build C preprocessor" >&5
3952 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3954 # Check whether --with-build-cpp or --without-build-cpp was given.
3955 if test "${with_build_cpp+set}" = set; then
3956 withval="$with_build_cpp"
3957 BUILD_CPP="$withval"
3959 BUILD_CPP='${BUILD_CC} -E'
3961 echo "$as_me:3961: result: $BUILD_CPP" >&5
3962 echo "${ECHO_T}$BUILD_CPP" >&6
3964 echo "$as_me:3964: checking for native build C flags" >&5
3965 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3967 # Check whether --with-build-cflags or --without-build-cflags was given.
3968 if test "${with_build_cflags+set}" = set; then
3969 withval="$with_build_cflags"
3970 BUILD_CFLAGS="$withval"
3972 echo "$as_me:3972: result: $BUILD_CFLAGS" >&5
3973 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3975 echo "$as_me:3975: checking for native build C preprocessor-flags" >&5
3976 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3978 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3979 if test "${with_build_cppflags+set}" = set; then
3980 withval="$with_build_cppflags"
3981 BUILD_CPPFLAGS="$withval"
3983 echo "$as_me:3983: result: $BUILD_CPPFLAGS" >&5
3984 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3986 echo "$as_me:3986: checking for native build linker-flags" >&5
3987 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3989 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3990 if test "${with_build_ldflags+set}" = set; then
3991 withval="$with_build_ldflags"
3992 BUILD_LDFLAGS="$withval"
3994 echo "$as_me:3994: result: $BUILD_LDFLAGS" >&5
3995 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3997 echo "$as_me:3997: checking for native build linker-libraries" >&5
3998 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4000 # Check whether --with-build-libs or --without-build-libs was given.
4001 if test "${with_build_libs+set}" = set; then
4002 withval="$with_build_libs"
4003 BUILD_LIBS="$withval"
4005 echo "$as_me:4005: result: $BUILD_LIBS" >&5
4006 echo "${ECHO_T}$BUILD_LIBS" >&6
4008 # this assumes we're on Unix.
4012 : ${BUILD_CC:='${CC}'}
4014 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4015 { { echo "$as_me:4015: error: Cross-build requires two compilers.
4016 Use --with-build-cc to specify the native compiler." >&5
4017 echo "$as_me: error: Cross-build requires two compilers.
4018 Use --with-build-cc to specify the native compiler." >&2;}
4019 { (exit 1); exit 1; }; }
4023 : ${BUILD_CC:='${CC}'}
4024 : ${BUILD_CPP:='${CPP}'}
4025 : ${BUILD_CFLAGS:='${CFLAGS}'}
4026 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4027 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4028 : ${BUILD_LIBS:='${LIBS}'}
4029 : ${BUILD_EXEEXT:='$x'}
4030 : ${BUILD_OBJEXT:='o'}
4033 ###############################################################################
4035 ### Options to allow the user to specify the set of libraries which are used.
4036 ### Use "--without-normal --with-shared" to allow the default model to be
4037 ### shared, for example.
4040 echo "$as_me:4040: checking if you want to build shared C-objects" >&5
4041 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4043 # Check whether --with-shared or --without-shared was given.
4044 if test "${with_shared+set}" = set; then
4045 withval="$with_shared"
4046 with_shared=$withval
4050 echo "$as_me:4050: result: $with_shared" >&5
4051 echo "${ECHO_T}$with_shared" >&6
4052 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4054 echo "$as_me:4054: checking for specified models" >&5
4055 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4056 test -z "$cf_list_models" && cf_list_models=normal
4057 echo "$as_me:4057: result: $cf_list_models" >&5
4058 echo "${ECHO_T}$cf_list_models" >&6
4060 ### Use the first model as the default, and save its suffix for use in building
4061 ### up test-applications.
4062 echo "$as_me:4062: checking for default model" >&5
4063 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4064 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4065 echo "$as_me:4065: result: $DFT_LWR_MODEL" >&5
4066 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4068 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4070 echo "$as_me:4070: checking for specific curses-directory" >&5
4071 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4073 # Check whether --with-curses-dir or --without-curses-dir was given.
4074 if test "${with_curses_dir+set}" = set; then
4075 withval="$with_curses_dir"
4076 cf_cv_curses_dir=$withval
4080 echo "$as_me:4080: result: $cf_cv_curses_dir" >&5
4081 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4083 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4086 if test "x$prefix" != xNONE; then
4087 cf_path_syntax="$prefix"
4089 cf_path_syntax="$ac_default_prefix"
4097 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4099 (.\${*prefix}*|.\${*dir}*)
4100 eval withval="$withval"
4103 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4108 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4111 { { echo "$as_me:4111: error: expected a pathname, not \"$withval\"" >&5
4112 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4113 { (exit 1); exit 1; }; }
4117 if test -d "$cf_cv_curses_dir"
4120 if test -n "$cf_cv_curses_dir/include" ; then
4121 for cf_add_incdir in $cf_cv_curses_dir/include
4123 while test $cf_add_incdir != /usr/include
4125 if test -d $cf_add_incdir
4128 if test -n "$CFLAGS$CPPFLAGS" ; then
4129 # a loop is needed to ensure we can add subdirs of existing dirs
4130 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4131 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4132 cf_have_incdir=yes; break
4137 if test "$cf_have_incdir" = no ; then
4138 if test "$cf_add_incdir" = /usr/local/include ; then
4139 if test "$GCC" = yes
4141 cf_save_CPPFLAGS=$CPPFLAGS
4143 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4144 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4146 cat >conftest.$ac_ext <<_ACEOF
4147 #line 4147 "configure"
4148 #include "confdefs.h"
4158 rm -f conftest.$ac_objext
4159 if { (eval echo "$as_me:4159: \"$ac_compile\"") >&5
4160 (eval $ac_compile) 2>&5
4162 echo "$as_me:4162: \$? = $ac_status" >&5
4163 (exit $ac_status); } &&
4164 { ac_try='test -s conftest.$ac_objext'
4165 { (eval echo "$as_me:4165: \"$ac_try\"") >&5
4168 echo "$as_me:4168: \$? = $ac_status" >&5
4169 (exit $ac_status); }; }; then
4172 echo "$as_me: failed program was:" >&5
4173 cat conftest.$ac_ext >&5
4176 rm -f conftest.$ac_objext conftest.$ac_ext
4177 CPPFLAGS=$cf_save_CPPFLAGS
4182 if test "$cf_have_incdir" = no ; then
4183 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4185 echo "${as_me:-configure}:4185: testing adding $cf_add_incdir to include-path ..." 1>&5
4187 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4189 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4190 test "$cf_top_incdir" = "$cf_add_incdir" && break
4191 cf_add_incdir="$cf_top_incdir"
4202 if test -n "$cf_cv_curses_dir/lib" ; then
4203 for cf_add_libdir in $cf_cv_curses_dir/lib
4205 if test $cf_add_libdir = /usr/lib ; then
4207 elif test -d $cf_add_libdir
4210 if test -n "$LDFLAGS$LIBS" ; then
4211 # a loop is needed to ensure we can add subdirs of existing dirs
4212 for cf_test_libdir in $LDFLAGS $LIBS ; do
4213 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4214 cf_have_libdir=yes; break
4218 if test "$cf_have_libdir" = no ; then
4219 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4221 echo "${as_me:-configure}:4221: testing adding $cf_add_libdir to library-path ..." 1>&5
4223 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4232 cf_ncuconfig_root=ncurses
4233 cf_have_ncuconfig=no
4235 if test "x${PKG_CONFIG:=none}" != xnone; then
4236 echo "$as_me:4236: checking pkg-config for $cf_ncuconfig_root" >&5
4237 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4238 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4239 echo "$as_me:4239: result: yes" >&5
4240 echo "${ECHO_T}yes" >&6
4242 echo "$as_me:4242: checking if the $cf_ncuconfig_root package files work" >&5
4243 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4244 cf_have_ncuconfig=unknown
4246 cf_save_CFLAGS="$CFLAGS"
4247 cf_save_CPPFLAGS="$CPPFLAGS"
4248 cf_save_LIBS="$LIBS"
4250 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
4251 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
4253 # while -W for passing linker flags is prevalent, it is not "standard".
4254 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4255 # incompatible _and_ non-standard -W option which gives an error. Work
4256 # around that pitfall.
4257 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4263 cf_new_extra_cppflags=
4265 for cf_add_cflags in $cf_pkg_cflags
4267 case $cf_fix_cppflags in
4269 case $cf_add_cflags in
4270 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4271 case $cf_add_cflags in
4273 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4275 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4276 && test -z "${cf_tst_cflags}" \
4277 && cf_fix_cppflags=yes
4279 if test $cf_fix_cppflags = yes ; then
4281 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4282 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4285 elif test "${cf_tst_cflags}" = "\"'" ; then
4287 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4288 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4298 case $cf_add_cflags in
4300 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4302 CPPFLAGS=`echo "$CPPFLAGS" | \
4303 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4304 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4309 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4310 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4317 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4318 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4325 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4326 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4328 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4330 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4331 && test -z "${cf_tst_cflags}" \
4332 && cf_fix_cppflags=no
4337 if test -n "$cf_new_cflags" ; then
4339 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4340 CFLAGS="${CFLAGS}$cf_new_cflags"
4344 if test -n "$cf_new_cppflags" ; then
4346 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4347 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4351 if test -n "$cf_new_extra_cppflags" ; then
4353 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4354 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4361 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4363 for cf_add_1lib in $cf_add_0lib; do
4364 for cf_add_2lib in $cf_add_libs; do
4365 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4370 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4374 cat >conftest.$ac_ext <<_ACEOF
4375 #line 4375 "configure"
4376 #include "confdefs.h"
4377 #include <${cf_cv_ncurses_header:-curses.h}>
4381 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4386 rm -f conftest.$ac_objext conftest$ac_exeext
4387 if { (eval echo "$as_me:4387: \"$ac_link\"") >&5
4388 (eval $ac_link) 2>&5
4390 echo "$as_me:4390: \$? = $ac_status" >&5
4391 (exit $ac_status); } &&
4392 { ac_try='test -s conftest$ac_exeext'
4393 { (eval echo "$as_me:4393: \"$ac_try\"") >&5
4396 echo "$as_me:4396: \$? = $ac_status" >&5
4397 (exit $ac_status); }; }; then
4398 if test "$cross_compiling" = yes; then
4399 cf_test_ncuconfig=maybe
4401 cat >conftest.$ac_ext <<_ACEOF
4402 #line 4402 "configure"
4403 #include "confdefs.h"
4404 #include <${cf_cv_ncurses_header:-curses.h}>
4406 { char *xx = curses_version(); return (xx == 0); }
4408 rm -f conftest$ac_exeext
4409 if { (eval echo "$as_me:4409: \"$ac_link\"") >&5
4410 (eval $ac_link) 2>&5
4412 echo "$as_me:4412: \$? = $ac_status" >&5
4413 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4414 { (eval echo "$as_me:4414: \"$ac_try\"") >&5
4417 echo "$as_me:4417: \$? = $ac_status" >&5
4418 (exit $ac_status); }; }; then
4419 cf_test_ncuconfig=yes
4421 echo "$as_me: program exited with status $ac_status" >&5
4422 echo "$as_me: failed program was:" >&5
4423 cat conftest.$ac_ext >&5
4424 cf_test_ncuconfig=no
4426 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4429 echo "$as_me: failed program was:" >&5
4430 cat conftest.$ac_ext >&5
4431 cf_test_ncuconfig=no
4433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4435 CFLAGS="$cf_save_CFLAGS"
4436 CPPFLAGS="$cf_save_CPPFLAGS"
4437 LIBS="$cf_save_LIBS"
4439 if test "x$cf_test_ncuconfig" != xyes; then
4440 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4441 cf_pkg_cflags="$cf_temp"
4442 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4443 cf_pkg_libs="$cf_temp"
4451 cf_new_extra_cppflags=
4453 for cf_add_cflags in $cf_pkg_cflags
4455 case $cf_fix_cppflags in
4457 case $cf_add_cflags in
4458 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4459 case $cf_add_cflags in
4461 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4463 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4464 && test -z "${cf_tst_cflags}" \
4465 && cf_fix_cppflags=yes
4467 if test $cf_fix_cppflags = yes ; then
4469 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4470 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4473 elif test "${cf_tst_cflags}" = "\"'" ; then
4475 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4476 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4486 case $cf_add_cflags in
4488 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4490 CPPFLAGS=`echo "$CPPFLAGS" | \
4491 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4492 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4497 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4498 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4505 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4506 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4513 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4514 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4516 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4518 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4519 && test -z "${cf_tst_cflags}" \
4520 && cf_fix_cppflags=no
4525 if test -n "$cf_new_cflags" ; then
4527 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4528 CFLAGS="${CFLAGS}$cf_new_cflags"
4532 if test -n "$cf_new_cppflags" ; then
4534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4535 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4539 if test -n "$cf_new_extra_cppflags" ; then
4541 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4542 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4549 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4551 for cf_add_1lib in $cf_add_0lib; do
4552 for cf_add_2lib in $cf_add_libs; do
4553 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4562 cat >conftest.$ac_ext <<_ACEOF
4563 #line 4563 "configure"
4564 #include "confdefs.h"
4565 #include <${cf_cv_ncurses_header:-curses.h}>
4569 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4574 rm -f conftest.$ac_objext conftest$ac_exeext
4575 if { (eval echo "$as_me:4575: \"$ac_link\"") >&5
4576 (eval $ac_link) 2>&5
4578 echo "$as_me:4578: \$? = $ac_status" >&5
4579 (exit $ac_status); } &&
4580 { ac_try='test -s conftest$ac_exeext'
4581 { (eval echo "$as_me:4581: \"$ac_try\"") >&5
4584 echo "$as_me:4584: \$? = $ac_status" >&5
4585 (exit $ac_status); }; }; then
4586 if test "$cross_compiling" = yes; then
4587 cf_have_ncuconfig=maybe
4589 cat >conftest.$ac_ext <<_ACEOF
4590 #line 4590 "configure"
4591 #include "confdefs.h"
4592 #include <${cf_cv_ncurses_header:-curses.h}>
4594 { char *xx = curses_version(); return (xx == 0); }
4596 rm -f conftest$ac_exeext
4597 if { (eval echo "$as_me:4597: \"$ac_link\"") >&5
4598 (eval $ac_link) 2>&5
4600 echo "$as_me:4600: \$? = $ac_status" >&5
4601 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4602 { (eval echo "$as_me:4602: \"$ac_try\"") >&5
4605 echo "$as_me:4605: \$? = $ac_status" >&5
4606 (exit $ac_status); }; }; then
4607 cf_have_ncuconfig=yes
4609 echo "$as_me: program exited with status $ac_status" >&5
4610 echo "$as_me: failed program was:" >&5
4611 cat conftest.$ac_ext >&5
4612 cf_have_ncuconfig=no
4614 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4617 echo "$as_me: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4619 cf_have_ncuconfig=no
4621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4622 echo "$as_me:4622: result: $cf_have_ncuconfig" >&5
4623 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4624 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4625 if test "$cf_have_ncuconfig" != "yes"
4627 CPPFLAGS="$cf_save_CPPFLAGS"
4628 LIBS="$cf_save_LIBS"
4629 NCURSES_CONFIG_PKG=none
4632 cat >>confdefs.h <<\EOF
4636 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4638 echo "$as_me:4638: checking for terminfo header" >&5
4639 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4640 if test "${cf_cv_term_header+set}" = set; then
4641 echo $ECHO_N "(cached) $ECHO_C" >&6
4644 case ${cf_cv_ncurses_header} in
4645 (*/ncurses.h|*/ncursesw.h)
4646 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4649 cf_term_header=term.h
4653 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4655 cat >conftest.$ac_ext <<_ACEOF
4656 #line 4656 "configure"
4657 #include "confdefs.h"
4659 #include <${cf_cv_ncurses_header:-curses.h}>
4665 int x = auto_left_margin; (void)x
4670 rm -f conftest.$ac_objext
4671 if { (eval echo "$as_me:4671: \"$ac_compile\"") >&5
4672 (eval $ac_compile) 2>&5
4674 echo "$as_me:4674: \$? = $ac_status" >&5
4675 (exit $ac_status); } &&
4676 { ac_try='test -s conftest.$ac_objext'
4677 { (eval echo "$as_me:4677: \"$ac_try\"") >&5
4680 echo "$as_me:4680: \$? = $ac_status" >&5
4681 (exit $ac_status); }; }; then
4683 cf_cv_term_header="$cf_test"
4685 echo "$as_me: failed program was:" >&5
4686 cat conftest.$ac_ext >&5
4688 cf_cv_term_header=unknown
4691 rm -f conftest.$ac_objext conftest.$ac_ext
4692 test "$cf_cv_term_header" != unknown && break
4696 echo "$as_me:4696: result: $cf_cv_term_header" >&5
4697 echo "${ECHO_T}$cf_cv_term_header" >&6
4699 # Set definitions to allow ifdef'ing to accommodate subdirectories
4701 case $cf_cv_term_header in
4704 cat >>confdefs.h <<\EOF
4705 #define HAVE_TERM_H 1
4711 case $cf_cv_term_header in
4714 cat >>confdefs.h <<\EOF
4715 #define HAVE_NCURSES_TERM_H 1
4721 cat >>confdefs.h <<\EOF
4722 #define HAVE_NCURSESW_TERM_H 1
4731 echo "$as_me:4731: result: no" >&5
4732 echo "${ECHO_T}no" >&6
4733 NCURSES_CONFIG_PKG=none
4736 NCURSES_CONFIG_PKG=none
4739 if test "x$cf_have_ncuconfig" = "xno"; then
4740 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4742 if test -n "$ac_tool_prefix"; then
4743 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4745 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4746 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4747 echo "$as_me:4747: checking for $ac_word" >&5
4748 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4749 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4750 echo $ECHO_N "(cached) $ECHO_C" >&6
4752 if test -n "$NCURSES_CONFIG"; then
4753 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4755 ac_save_IFS=$IFS; IFS=$ac_path_separator
4757 for ac_dir in $ac_dummy; do
4759 test -z "$ac_dir" && ac_dir=.
4760 $as_executable_p "$ac_dir/$ac_word" || continue
4761 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4762 echo "$as_me:4762: found $ac_dir/$ac_word" >&5
4768 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4769 if test -n "$NCURSES_CONFIG"; then
4770 echo "$as_me:4770: result: $NCURSES_CONFIG" >&5
4771 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4773 echo "$as_me:4773: result: no" >&5
4774 echo "${ECHO_T}no" >&6
4777 test -n "$NCURSES_CONFIG" && break
4780 if test -z "$NCURSES_CONFIG"; then
4781 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4782 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4784 # Extract the first word of "$ac_prog", so it can be a program name with args.
4785 set dummy $ac_prog; ac_word=$2
4786 echo "$as_me:4786: checking for $ac_word" >&5
4787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4788 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4789 echo $ECHO_N "(cached) $ECHO_C" >&6
4791 if test -n "$ac_ct_NCURSES_CONFIG"; then
4792 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4794 ac_save_IFS=$IFS; IFS=$ac_path_separator
4796 for ac_dir in $ac_dummy; do
4798 test -z "$ac_dir" && ac_dir=.
4799 $as_executable_p "$ac_dir/$ac_word" || continue
4800 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4801 echo "$as_me:4801: found $ac_dir/$ac_word" >&5
4807 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4808 if test -n "$ac_ct_NCURSES_CONFIG"; then
4809 echo "$as_me:4809: result: $ac_ct_NCURSES_CONFIG" >&5
4810 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4812 echo "$as_me:4812: result: no" >&5
4813 echo "${ECHO_T}no" >&6
4816 test -n "$ac_ct_NCURSES_CONFIG" && break
4818 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4820 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4823 if test "$NCURSES_CONFIG" != none ; then
4828 cf_new_extra_cppflags=
4830 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4832 case $cf_fix_cppflags in
4834 case $cf_add_cflags in
4835 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4836 case $cf_add_cflags in
4838 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4840 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4841 && test -z "${cf_tst_cflags}" \
4842 && cf_fix_cppflags=yes
4844 if test $cf_fix_cppflags = yes ; then
4846 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4847 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4850 elif test "${cf_tst_cflags}" = "\"'" ; then
4852 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4853 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4863 case $cf_add_cflags in
4865 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4867 CPPFLAGS=`echo "$CPPFLAGS" | \
4868 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4869 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4874 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4875 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4882 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4883 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4890 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4891 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4893 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4895 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4896 && test -z "${cf_tst_cflags}" \
4897 && cf_fix_cppflags=no
4902 if test -n "$cf_new_cflags" ; then
4904 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4905 CFLAGS="${CFLAGS}$cf_new_cflags"
4909 if test -n "$cf_new_cppflags" ; then
4911 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4912 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4916 if test -n "$cf_new_extra_cppflags" ; then
4918 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4919 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4926 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4928 for cf_add_1lib in $cf_add_0lib; do
4929 for cf_add_2lib in $cf_add_libs; do
4930 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4935 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4939 # even with config script, some packages use no-override for curses.h
4941 echo "$as_me:4941: checking if we have identified curses headers" >&5
4942 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4943 if test "${cf_cv_ncurses_header+set}" = set; then
4944 echo $ECHO_N "(cached) $ECHO_C" >&6
4947 cf_cv_ncurses_header=none
4949 ncurses.h ncurses/ncurses.h \
4950 curses.h ncurses/curses.h
4952 cat >conftest.$ac_ext <<_ACEOF
4953 #line 4953 "configure"
4954 #include "confdefs.h"
4955 #include <${cf_header}>
4959 initscr(); tgoto("?", 0,0)
4964 rm -f conftest.$ac_objext
4965 if { (eval echo "$as_me:4965: \"$ac_compile\"") >&5
4966 (eval $ac_compile) 2>&5
4968 echo "$as_me:4968: \$? = $ac_status" >&5
4969 (exit $ac_status); } &&
4970 { ac_try='test -s conftest.$ac_objext'
4971 { (eval echo "$as_me:4971: \"$ac_try\"") >&5
4974 echo "$as_me:4974: \$? = $ac_status" >&5
4975 (exit $ac_status); }; }; then
4976 cf_cv_ncurses_header=$cf_header; break
4978 echo "$as_me: failed program was:" >&5
4979 cat conftest.$ac_ext >&5
4981 rm -f conftest.$ac_objext conftest.$ac_ext
4985 echo "$as_me:4985: result: $cf_cv_ncurses_header" >&5
4986 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4988 if test "$cf_cv_ncurses_header" = none ; then
4989 { { echo "$as_me:4989: error: No curses header-files found" >&5
4990 echo "$as_me: error: No curses header-files found" >&2;}
4991 { (exit 1); exit 1; }; }
4994 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4996 for ac_header in $cf_cv_ncurses_header
4998 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4999 echo "$as_me:4999: checking for $ac_header" >&5
5000 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5001 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5002 echo $ECHO_N "(cached) $ECHO_C" >&6
5004 cat >conftest.$ac_ext <<_ACEOF
5005 #line 5005 "configure"
5006 #include "confdefs.h"
5007 #include <$ac_header>
5009 if { (eval echo "$as_me:5009: \"$ac_cpp conftest.$ac_ext\"") >&5
5010 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5012 egrep -v '^ *\+' conftest.er1 >conftest.err
5014 cat conftest.err >&5
5015 echo "$as_me:5015: \$? = $ac_status" >&5
5016 (exit $ac_status); } >/dev/null; then
5017 if test -s conftest.err; then
5018 ac_cpp_err=$ac_c_preproc_warn_flag
5025 if test -z "$ac_cpp_err"; then
5026 eval "$as_ac_Header=yes"
5028 echo "$as_me: failed program was:" >&5
5029 cat conftest.$ac_ext >&5
5030 eval "$as_ac_Header=no"
5032 rm -f conftest.err conftest.$ac_ext
5034 echo "$as_me:5034: result: `eval echo '${'$as_ac_Header'}'`" >&5
5035 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5036 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5037 cat >>confdefs.h <<EOF
5038 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5044 cat >>confdefs.h <<\EOF
5048 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5050 cat >>confdefs.h <<EOF
5051 #define $cf_nculib_ROOT 1
5054 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5058 cf_ncuhdr_root=ncurses
5060 test -n "$cf_cv_curses_dir" && \
5061 test "$cf_cv_curses_dir" != "no" && { \
5063 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5064 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5066 while test $cf_add_incdir != /usr/include
5068 if test -d $cf_add_incdir
5071 if test -n "$CFLAGS$CPPFLAGS" ; then
5072 # a loop is needed to ensure we can add subdirs of existing dirs
5073 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5074 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5075 cf_have_incdir=yes; break
5080 if test "$cf_have_incdir" = no ; then
5081 if test "$cf_add_incdir" = /usr/local/include ; then
5082 if test "$GCC" = yes
5084 cf_save_CPPFLAGS=$CPPFLAGS
5086 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5087 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5089 cat >conftest.$ac_ext <<_ACEOF
5090 #line 5090 "configure"
5091 #include "confdefs.h"
5101 rm -f conftest.$ac_objext
5102 if { (eval echo "$as_me:5102: \"$ac_compile\"") >&5
5103 (eval $ac_compile) 2>&5
5105 echo "$as_me:5105: \$? = $ac_status" >&5
5106 (exit $ac_status); } &&
5107 { ac_try='test -s conftest.$ac_objext'
5108 { (eval echo "$as_me:5108: \"$ac_try\"") >&5
5111 echo "$as_me:5111: \$? = $ac_status" >&5
5112 (exit $ac_status); }; }; then
5115 echo "$as_me: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5119 rm -f conftest.$ac_objext conftest.$ac_ext
5120 CPPFLAGS=$cf_save_CPPFLAGS
5125 if test "$cf_have_incdir" = no ; then
5126 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5128 echo "${as_me:-configure}:5128: testing adding $cf_add_incdir to include-path ..." 1>&5
5130 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5132 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5133 test "$cf_top_incdir" = "$cf_add_incdir" && break
5134 cf_add_incdir="$cf_top_incdir"
5147 echo "$as_me:5147: checking for $cf_ncuhdr_root header in include-path" >&5
5148 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5149 if test "${cf_cv_ncurses_h+set}" = set; then
5150 echo $ECHO_N "(cached) $ECHO_C" >&6
5153 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5154 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5155 for cf_header in $cf_header_list
5158 cat >conftest.$ac_ext <<_ACEOF
5159 #line 5159 "configure"
5160 #include "confdefs.h"
5162 #include <$cf_header>
5167 #ifdef NCURSES_VERSION
5169 printf("%s\n", NCURSES_VERSION);
5182 rm -f conftest.$ac_objext
5183 if { (eval echo "$as_me:5183: \"$ac_compile\"") >&5
5184 (eval $ac_compile) 2>&5
5186 echo "$as_me:5186: \$? = $ac_status" >&5
5187 (exit $ac_status); } &&
5188 { ac_try='test -s conftest.$ac_objext'
5189 { (eval echo "$as_me:5189: \"$ac_try\"") >&5
5192 echo "$as_me:5192: \$? = $ac_status" >&5
5193 (exit $ac_status); }; }; then
5194 cf_cv_ncurses_h=$cf_header
5197 echo "$as_me: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
5201 rm -f conftest.$ac_objext conftest.$ac_ext
5203 test "$cf_cv_ncurses_h" != no && break
5207 echo "$as_me:5207: result: $cf_cv_ncurses_h" >&5
5208 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5210 if test "$cf_cv_ncurses_h" != no ; then
5211 cf_cv_ncurses_header=$cf_cv_ncurses_h
5214 echo "$as_me:5214: checking for $cf_ncuhdr_root include-path" >&5
5215 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5216 if test "${cf_cv_ncurses_h2+set}" = set; then
5217 echo $ECHO_N "(cached) $ECHO_C" >&6
5220 test -n "$verbose" && echo
5224 # collect the current set of include-directories from compiler flags
5225 cf_header_path_list=""
5226 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5227 for cf_header_path in $CPPFLAGS $CFLAGS
5229 case $cf_header_path in
5231 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5233 test "x$cf_header_path" != "xNONE" && \
5234 test -d "$cf_header_path" && \
5236 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5237 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5238 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5239 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5240 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5241 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"
5244 cf_header_path_list="$cf_header_path_list $cf_search"
5250 # add the variations for the package we are looking for
5254 test "x$prefix" != "xNONE" && \
5255 test -d "$prefix" && \
5257 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5258 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5259 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5260 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5261 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5262 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5265 for cf_subdir_prefix in \
5274 test "x$cf_subdir_prefix" != "x$prefix" && \
5275 test -d "$cf_subdir_prefix" && \
5276 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5277 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5278 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5279 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5280 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5281 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5282 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"
5287 test "$includedir" != NONE && \
5288 test "$includedir" != "/usr/include" && \
5289 test -d "$includedir" && {
5290 test -d $includedir && cf_search="$cf_search $includedir"
5291 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5294 test "$oldincludedir" != NONE && \
5295 test "$oldincludedir" != "/usr/include" && \
5296 test -d "$oldincludedir" && {
5297 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5298 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5301 cf_search="$cf_search $cf_header_path_list"
5303 test -n "$verbose" && echo search path $cf_search
5304 cf_save2_CPPFLAGS="$CPPFLAGS"
5305 for cf_incdir in $cf_search
5308 if test -n "$cf_incdir" ; then
5309 for cf_add_incdir in $cf_incdir
5311 while test $cf_add_incdir != /usr/include
5313 if test -d $cf_add_incdir
5316 if test -n "$CFLAGS$CPPFLAGS" ; then
5317 # a loop is needed to ensure we can add subdirs of existing dirs
5318 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5319 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5320 cf_have_incdir=yes; break
5325 if test "$cf_have_incdir" = no ; then
5326 if test "$cf_add_incdir" = /usr/local/include ; then
5327 if test "$GCC" = yes
5329 cf_save_CPPFLAGS=$CPPFLAGS
5331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5332 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5334 cat >conftest.$ac_ext <<_ACEOF
5335 #line 5335 "configure"
5336 #include "confdefs.h"
5346 rm -f conftest.$ac_objext
5347 if { (eval echo "$as_me:5347: \"$ac_compile\"") >&5
5348 (eval $ac_compile) 2>&5
5350 echo "$as_me:5350: \$? = $ac_status" >&5
5351 (exit $ac_status); } &&
5352 { ac_try='test -s conftest.$ac_objext'
5353 { (eval echo "$as_me:5353: \"$ac_try\"") >&5
5356 echo "$as_me:5356: \$? = $ac_status" >&5
5357 (exit $ac_status); }; }; then
5360 echo "$as_me: failed program was:" >&5
5361 cat conftest.$ac_ext >&5
5364 rm -f conftest.$ac_objext conftest.$ac_ext
5365 CPPFLAGS=$cf_save_CPPFLAGS
5370 if test "$cf_have_incdir" = no ; then
5371 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5373 echo "${as_me:-configure}:5373: testing adding $cf_add_incdir to include-path ..." 1>&5
5375 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5377 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5378 test "$cf_top_incdir" = "$cf_add_incdir" && break
5379 cf_add_incdir="$cf_top_incdir"
5395 cat >conftest.$ac_ext <<_ACEOF
5396 #line 5396 "configure"
5397 #include "confdefs.h"
5399 #include <$cf_header>
5404 #ifdef NCURSES_VERSION
5406 printf("%s\n", NCURSES_VERSION);
5419 rm -f conftest.$ac_objext
5420 if { (eval echo "$as_me:5420: \"$ac_compile\"") >&5
5421 (eval $ac_compile) 2>&5
5423 echo "$as_me:5423: \$? = $ac_status" >&5
5424 (exit $ac_status); } &&
5425 { ac_try='test -s conftest.$ac_objext'
5426 { (eval echo "$as_me:5426: \"$ac_try\"") >&5
5429 echo "$as_me:5429: \$? = $ac_status" >&5
5430 (exit $ac_status); }; }; then
5431 cf_cv_ncurses_h2=$cf_header
5434 echo "$as_me: failed program was:" >&5
5435 cat conftest.$ac_ext >&5
5438 rm -f conftest.$ac_objext conftest.$ac_ext
5440 if test "$cf_cv_ncurses_h2" != no ; then
5441 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5442 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5445 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5447 CPPFLAGS="$cf_save2_CPPFLAGS"
5448 test "$cf_cv_ncurses_h2" != no && break
5450 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5450: error: not found" >&5
5451 echo "$as_me: error: not found" >&2;}
5452 { (exit 1); exit 1; }; }
5455 echo "$as_me:5455: result: $cf_cv_ncurses_h2" >&5
5456 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5458 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5459 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5460 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5461 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5464 if test -n "$cf_1st_incdir" ; then
5465 for cf_add_incdir in $cf_1st_incdir
5467 while test $cf_add_incdir != /usr/include
5469 if test -d $cf_add_incdir
5472 if test -n "$CFLAGS$CPPFLAGS" ; then
5473 # a loop is needed to ensure we can add subdirs of existing dirs
5474 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5475 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5476 cf_have_incdir=yes; break
5481 if test "$cf_have_incdir" = no ; then
5482 if test "$cf_add_incdir" = /usr/local/include ; then
5483 if test "$GCC" = yes
5485 cf_save_CPPFLAGS=$CPPFLAGS
5487 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5488 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5490 cat >conftest.$ac_ext <<_ACEOF
5491 #line 5491 "configure"
5492 #include "confdefs.h"
5502 rm -f conftest.$ac_objext
5503 if { (eval echo "$as_me:5503: \"$ac_compile\"") >&5
5504 (eval $ac_compile) 2>&5
5506 echo "$as_me:5506: \$? = $ac_status" >&5
5507 (exit $ac_status); } &&
5508 { ac_try='test -s conftest.$ac_objext'
5509 { (eval echo "$as_me:5509: \"$ac_try\"") >&5
5512 echo "$as_me:5512: \$? = $ac_status" >&5
5513 (exit $ac_status); }; }; then
5516 echo "$as_me: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5520 rm -f conftest.$ac_objext conftest.$ac_ext
5521 CPPFLAGS=$cf_save_CPPFLAGS
5526 if test "$cf_have_incdir" = no ; then
5527 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5529 echo "${as_me:-configure}:5529: testing adding $cf_add_incdir to include-path ..." 1>&5
5531 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5533 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5534 test "$cf_top_incdir" = "$cf_add_incdir" && break
5535 cf_add_incdir="$cf_top_incdir"
5548 # Set definitions to allow ifdef'ing for ncurses.h
5550 case $cf_cv_ncurses_header in
5553 cat >>confdefs.h <<\EOF
5554 #define HAVE_NCURSES_H 1
5560 case $cf_cv_ncurses_header in
5561 (ncurses/curses.h|ncurses/ncurses.h)
5563 cat >>confdefs.h <<\EOF
5564 #define HAVE_NCURSES_NCURSES_H 1
5568 (ncursesw/curses.h|ncursesw/ncurses.h)
5570 cat >>confdefs.h <<\EOF
5571 #define HAVE_NCURSESW_NCURSES_H 1
5577 echo "$as_me:5577: checking for terminfo header" >&5
5578 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5579 if test "${cf_cv_term_header+set}" = set; then
5580 echo $ECHO_N "(cached) $ECHO_C" >&6
5583 case ${cf_cv_ncurses_header} in
5584 (*/ncurses.h|*/ncursesw.h)
5585 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5588 cf_term_header=term.h
5592 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5594 cat >conftest.$ac_ext <<_ACEOF
5595 #line 5595 "configure"
5596 #include "confdefs.h"
5598 #include <${cf_cv_ncurses_header:-curses.h}>
5604 int x = auto_left_margin; (void)x
5609 rm -f conftest.$ac_objext
5610 if { (eval echo "$as_me:5610: \"$ac_compile\"") >&5
5611 (eval $ac_compile) 2>&5
5613 echo "$as_me:5613: \$? = $ac_status" >&5
5614 (exit $ac_status); } &&
5615 { ac_try='test -s conftest.$ac_objext'
5616 { (eval echo "$as_me:5616: \"$ac_try\"") >&5
5619 echo "$as_me:5619: \$? = $ac_status" >&5
5620 (exit $ac_status); }; }; then
5622 cf_cv_term_header="$cf_test"
5624 echo "$as_me: failed program was:" >&5
5625 cat conftest.$ac_ext >&5
5627 cf_cv_term_header=unknown
5630 rm -f conftest.$ac_objext conftest.$ac_ext
5631 test "$cf_cv_term_header" != unknown && break
5635 echo "$as_me:5635: result: $cf_cv_term_header" >&5
5636 echo "${ECHO_T}$cf_cv_term_header" >&6
5638 # Set definitions to allow ifdef'ing to accommodate subdirectories
5640 case $cf_cv_term_header in
5643 cat >>confdefs.h <<\EOF
5644 #define HAVE_TERM_H 1
5650 case $cf_cv_term_header in
5653 cat >>confdefs.h <<\EOF
5654 #define HAVE_NCURSES_TERM_H 1
5660 cat >>confdefs.h <<\EOF
5661 #define HAVE_NCURSESW_TERM_H 1
5667 # some applications need this, but should check for NCURSES_VERSION
5669 cat >>confdefs.h <<\EOF
5673 echo "$as_me:5673: checking for ncurses version" >&5
5674 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5675 if test "${cf_cv_ncurses_version+set}" = set; then
5676 echo $ECHO_N "(cached) $ECHO_C" >&6
5679 cf_cv_ncurses_version=no
5682 if test "$cross_compiling" = yes; then
5684 # This will not work if the preprocessor splits the line after the
5685 # Autoconf token. The 'unproto' program does that.
5686 cat > conftest.$ac_ext <<EOF
5687 #include <${cf_cv_ncurses_header:-curses.h}>
5689 #ifdef NCURSES_VERSION
5690 Autoconf NCURSES_VERSION
5698 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5699 { (eval echo "$as_me:5699: \"$cf_try\"") >&5
5702 echo "$as_me:5702: \$? = $ac_status" >&5
5703 (exit $ac_status); }
5704 if test -f conftest.out ; then
5705 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5706 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5711 cat >conftest.$ac_ext <<_ACEOF
5712 #line 5712 "configure"
5713 #include "confdefs.h"
5715 #include <${cf_cv_ncurses_header:-curses.h}>
5719 FILE *fp = fopen("$cf_tempfile", "w");
5720 #ifdef NCURSES_VERSION
5721 # ifdef NCURSES_VERSION_PATCH
5722 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5724 fprintf(fp, "%s\n", NCURSES_VERSION);
5728 fprintf(fp, "old\n");
5733 ${cf_cv_main_return:-return}(0);
5736 rm -f conftest$ac_exeext
5737 if { (eval echo "$as_me:5737: \"$ac_link\"") >&5
5738 (eval $ac_link) 2>&5
5740 echo "$as_me:5740: \$? = $ac_status" >&5
5741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5742 { (eval echo "$as_me:5742: \"$ac_try\"") >&5
5745 echo "$as_me:5745: \$? = $ac_status" >&5
5746 (exit $ac_status); }; }; then
5748 cf_cv_ncurses_version=`cat $cf_tempfile`
5750 echo "$as_me: program exited with status $ac_status" >&5
5751 echo "$as_me: failed program was:" >&5
5752 cat conftest.$ac_ext >&5
5754 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5759 echo "$as_me:5759: result: $cf_cv_ncurses_version" >&5
5760 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5761 test "$cf_cv_ncurses_version" = no ||
5762 cat >>confdefs.h <<\EOF
5766 cf_nculib_root=ncurses
5767 # This works, except for the special case where we find gpm, but
5768 # ncurses is in a nonstandard location via $LIBS, and we really want
5771 cf_ncurses_SAVE="$LIBS"
5772 echo "$as_me:5772: checking for Gpm_Open in -lgpm" >&5
5773 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5774 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5775 echo $ECHO_N "(cached) $ECHO_C" >&6
5777 ac_check_lib_save_LIBS=$LIBS
5779 cat >conftest.$ac_ext <<_ACEOF
5780 #line 5780 "configure"
5781 #include "confdefs.h"
5783 /* Override any gcc2 internal prototype to avoid an error. */
5787 /* We use char because int might match the return type of a gcc2
5788 builtin and then its argument prototype would still apply. */
5798 rm -f conftest.$ac_objext conftest$ac_exeext
5799 if { (eval echo "$as_me:5799: \"$ac_link\"") >&5
5800 (eval $ac_link) 2>&5
5802 echo "$as_me:5802: \$? = $ac_status" >&5
5803 (exit $ac_status); } &&
5804 { ac_try='test -s conftest$ac_exeext'
5805 { (eval echo "$as_me:5805: \"$ac_try\"") >&5
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit $ac_status); }; }; then
5810 ac_cv_lib_gpm_Gpm_Open=yes
5812 echo "$as_me: failed program was:" >&5
5813 cat conftest.$ac_ext >&5
5814 ac_cv_lib_gpm_Gpm_Open=no
5816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5817 LIBS=$ac_check_lib_save_LIBS
5819 echo "$as_me:5819: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5820 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5821 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5822 echo "$as_me:5822: checking for initscr in -lgpm" >&5
5823 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5824 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5825 echo $ECHO_N "(cached) $ECHO_C" >&6
5827 ac_check_lib_save_LIBS=$LIBS
5829 cat >conftest.$ac_ext <<_ACEOF
5830 #line 5830 "configure"
5831 #include "confdefs.h"
5833 /* Override any gcc2 internal prototype to avoid an error. */
5837 /* We use char because int might match the return type of a gcc2
5838 builtin and then its argument prototype would still apply. */
5848 rm -f conftest.$ac_objext conftest$ac_exeext
5849 if { (eval echo "$as_me:5849: \"$ac_link\"") >&5
5850 (eval $ac_link) 2>&5
5852 echo "$as_me:5852: \$? = $ac_status" >&5
5853 (exit $ac_status); } &&
5854 { ac_try='test -s conftest$ac_exeext'
5855 { (eval echo "$as_me:5855: \"$ac_try\"") >&5
5858 echo "$as_me:5858: \$? = $ac_status" >&5
5859 (exit $ac_status); }; }; then
5860 ac_cv_lib_gpm_initscr=yes
5862 echo "$as_me: failed program was:" >&5
5863 cat conftest.$ac_ext >&5
5864 ac_cv_lib_gpm_initscr=no
5866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5867 LIBS=$ac_check_lib_save_LIBS
5869 echo "$as_me:5869: result: $ac_cv_lib_gpm_initscr" >&5
5870 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5871 if test $ac_cv_lib_gpm_initscr = yes; then
5872 LIBS="$cf_ncurses_SAVE"
5874 cf_ncurses_LIBS="-lgpm"
5881 # This is only necessary if you are linking against an obsolete
5882 # version of ncurses (but it should do no harm, since it's static).
5883 if test "$cf_nculib_root" = ncurses ; then
5884 echo "$as_me:5884: checking for tgoto in -lmytinfo" >&5
5885 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5886 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5887 echo $ECHO_N "(cached) $ECHO_C" >&6
5889 ac_check_lib_save_LIBS=$LIBS
5890 LIBS="-lmytinfo $LIBS"
5891 cat >conftest.$ac_ext <<_ACEOF
5892 #line 5892 "configure"
5893 #include "confdefs.h"
5895 /* Override any gcc2 internal prototype to avoid an error. */
5899 /* We use char because int might match the return type of a gcc2
5900 builtin and then its argument prototype would still apply. */
5910 rm -f conftest.$ac_objext conftest$ac_exeext
5911 if { (eval echo "$as_me:5911: \"$ac_link\"") >&5
5912 (eval $ac_link) 2>&5
5914 echo "$as_me:5914: \$? = $ac_status" >&5
5915 (exit $ac_status); } &&
5916 { ac_try='test -s conftest$ac_exeext'
5917 { (eval echo "$as_me:5917: \"$ac_try\"") >&5
5920 echo "$as_me:5920: \$? = $ac_status" >&5
5921 (exit $ac_status); }; }; then
5922 ac_cv_lib_mytinfo_tgoto=yes
5924 echo "$as_me: failed program was:" >&5
5925 cat conftest.$ac_ext >&5
5926 ac_cv_lib_mytinfo_tgoto=no
5928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5929 LIBS=$ac_check_lib_save_LIBS
5931 echo "$as_me:5931: result: $ac_cv_lib_mytinfo_tgoto" >&5
5932 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5933 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5934 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5944 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5946 for cf_add_1lib in $cf_add_0lib; do
5947 for cf_add_2lib in $cf_add_libs; do
5948 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5953 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5957 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5963 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5965 for cf_add_1lib in $cf_add_0lib; do
5966 for cf_add_2lib in $cf_add_libs; do
5967 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5972 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5978 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5980 echo "$as_me:5980: checking for initscr" >&5
5981 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5982 if test "${ac_cv_func_initscr+set}" = set; then
5983 echo $ECHO_N "(cached) $ECHO_C" >&6
5985 cat >conftest.$ac_ext <<_ACEOF
5986 #line 5986 "configure"
5987 #include "confdefs.h"
5988 #define initscr autoconf_temporary
5989 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5996 /* We use char because int might match the return type of a gcc2
5997 builtin and then its argument prototype would still apply. */
5998 char initscr (void);
6004 /* The GNU C library defines stubs for functions which it implements
6005 to always fail with ENOSYS. Some functions are actually named
6006 something starting with __ and the normal name is an alias. */
6007 #if defined (__stub_initscr) || defined (__stub___initscr)
6008 #error found stub for initscr
6016 rm -f conftest.$ac_objext conftest$ac_exeext
6017 if { (eval echo "$as_me:6017: \"$ac_link\"") >&5
6018 (eval $ac_link) 2>&5
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit $ac_status); } &&
6022 { ac_try='test -s conftest$ac_exeext'
6023 { (eval echo "$as_me:6023: \"$ac_try\"") >&5
6026 echo "$as_me:6026: \$? = $ac_status" >&5
6027 (exit $ac_status); }; }; then
6028 ac_cv_func_initscr=yes
6030 echo "$as_me: failed program was:" >&5
6031 cat conftest.$ac_ext >&5
6032 ac_cv_func_initscr=no
6034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6036 echo "$as_me:6036: result: $ac_cv_func_initscr" >&5
6037 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6038 if test $ac_cv_func_initscr = yes; then
6039 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6042 cf_save_LIBS="$LIBS"
6043 echo "$as_me:6043: checking for initscr in -l$cf_nculib_root" >&5
6044 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6045 LIBS="-l$cf_nculib_root $LIBS"
6046 cat >conftest.$ac_ext <<_ACEOF
6047 #line 6047 "configure"
6048 #include "confdefs.h"
6049 #include <${cf_cv_ncurses_header:-curses.h}>
6058 rm -f conftest.$ac_objext conftest$ac_exeext
6059 if { (eval echo "$as_me:6059: \"$ac_link\"") >&5
6060 (eval $ac_link) 2>&5
6062 echo "$as_me:6062: \$? = $ac_status" >&5
6063 (exit $ac_status); } &&
6064 { ac_try='test -s conftest$ac_exeext'
6065 { (eval echo "$as_me:6065: \"$ac_try\"") >&5
6068 echo "$as_me:6068: \$? = $ac_status" >&5
6069 (exit $ac_status); }; }; then
6070 echo "$as_me:6070: result: yes" >&5
6071 echo "${ECHO_T}yes" >&6
6072 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6075 echo "$as_me: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 echo "$as_me:6077: result: no" >&5
6078 echo "${ECHO_T}no" >&6
6081 cf_library_path_list=""
6082 if test -n "${LDFLAGS}${LIBS}" ; then
6083 for cf_library_path in $LDFLAGS $LIBS
6085 case $cf_library_path in
6087 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6089 test "x$cf_library_path" != "xNONE" && \
6090 test -d "$cf_library_path" && \
6092 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6093 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6094 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6095 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6096 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6097 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"
6100 cf_library_path_list="$cf_library_path_list $cf_search"
6108 test "x$prefix" != "xNONE" && \
6109 test -d "$prefix" && \
6111 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6112 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6113 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6114 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6115 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6116 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6119 for cf_subdir_prefix in \
6128 test "x$cf_subdir_prefix" != "x$prefix" && \
6129 test -d "$cf_subdir_prefix" && \
6130 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6131 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6132 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6133 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6134 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6135 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6136 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"
6141 cf_search="$cf_library_path_list $cf_search"
6143 for cf_libdir in $cf_search
6145 echo "$as_me:6145: checking for -l$cf_nculib_root in $cf_libdir" >&5
6146 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6147 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6148 cat >conftest.$ac_ext <<_ACEOF
6149 #line 6149 "configure"
6150 #include "confdefs.h"
6151 #include <${cf_cv_ncurses_header:-curses.h}>
6160 rm -f conftest.$ac_objext conftest$ac_exeext
6161 if { (eval echo "$as_me:6161: \"$ac_link\"") >&5
6162 (eval $ac_link) 2>&5
6164 echo "$as_me:6164: \$? = $ac_status" >&5
6165 (exit $ac_status); } &&
6166 { ac_try='test -s conftest$ac_exeext'
6167 { (eval echo "$as_me:6167: \"$ac_try\"") >&5
6170 echo "$as_me:6170: \$? = $ac_status" >&5
6171 (exit $ac_status); }; }; then
6172 echo "$as_me:6172: result: yes" >&5
6173 echo "${ECHO_T}yes" >&6
6174 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6177 echo "$as_me: failed program was:" >&5
6178 cat conftest.$ac_ext >&5
6179 echo "$as_me:6179: result: no" >&5
6180 echo "${ECHO_T}no" >&6
6181 LIBS="$cf_save_LIBS"
6183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6191 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6193 if test $cf_found_library = no ; then
6194 { { echo "$as_me:6194: error: Cannot link $cf_nculib_root library" >&5
6195 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6196 { (exit 1); exit 1; }; }
6201 if test -n "$cf_ncurses_LIBS" ; then
6202 echo "$as_me:6202: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6203 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6204 cf_ncurses_SAVE="$LIBS"
6205 for p in $cf_ncurses_LIBS ; do
6206 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6207 if test "$q" != "$LIBS" ; then
6211 cat >conftest.$ac_ext <<_ACEOF
6212 #line 6212 "configure"
6213 #include "confdefs.h"
6214 #include <${cf_cv_ncurses_header:-curses.h}>
6218 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6223 rm -f conftest.$ac_objext conftest$ac_exeext
6224 if { (eval echo "$as_me:6224: \"$ac_link\"") >&5
6225 (eval $ac_link) 2>&5
6227 echo "$as_me:6227: \$? = $ac_status" >&5
6228 (exit $ac_status); } &&
6229 { ac_try='test -s conftest$ac_exeext'
6230 { (eval echo "$as_me:6230: \"$ac_try\"") >&5
6233 echo "$as_me:6233: \$? = $ac_status" >&5
6234 (exit $ac_status); }; }; then
6235 echo "$as_me:6235: result: yes" >&5
6236 echo "${ECHO_T}yes" >&6
6238 echo "$as_me: failed program was:" >&5
6239 cat conftest.$ac_ext >&5
6240 echo "$as_me:6240: result: no" >&5
6241 echo "${ECHO_T}no" >&6
6242 LIBS="$cf_ncurses_SAVE"
6244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6247 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6249 cat >>confdefs.h <<EOF
6250 #define $cf_nculib_ROOT 1
6258 echo "$as_me:6258: checking if you want wide-character code" >&5
6259 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6261 # Check whether --enable-widec or --disable-widec was given.
6262 if test "${enable_widec+set}" = set; then
6263 enableval="$enable_widec"
6264 with_widec=$enableval
6268 echo "$as_me:6268: result: $with_widec" >&5
6269 echo "${ECHO_T}$with_widec" >&6
6270 if test "$with_widec" = yes ; then
6272 echo "$as_me:6272: checking for multibyte character support" >&5
6273 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6274 if test "${cf_cv_utf8_lib+set}" = set; then
6275 echo $ECHO_N "(cached) $ECHO_C" >&6
6278 cf_save_LIBS="$LIBS"
6279 cat >conftest.$ac_ext <<_ACEOF
6280 #line 6280 "configure"
6281 #include "confdefs.h"
6292 rm -f conftest.$ac_objext conftest$ac_exeext
6293 if { (eval echo "$as_me:6293: \"$ac_link\"") >&5
6294 (eval $ac_link) 2>&5
6296 echo "$as_me:6296: \$? = $ac_status" >&5
6297 (exit $ac_status); } &&
6298 { ac_try='test -s conftest$ac_exeext'
6299 { (eval echo "$as_me:6299: \"$ac_try\"") >&5
6302 echo "$as_me:6302: \$? = $ac_status" >&5
6303 (exit $ac_status); }; }; then
6306 echo "$as_me: failed program was:" >&5
6307 cat conftest.$ac_ext >&5
6309 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6310 # will be set on completion of the AC_TRY_LINK below.
6311 cf_cv_header_path_utf8=
6312 cf_cv_library_path_utf8=
6314 echo "${as_me:-configure}:6314: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6316 cf_save_LIBS="$LIBS"
6318 cat >conftest.$ac_ext <<_ACEOF
6319 #line 6319 "configure"
6320 #include "confdefs.h"
6322 #include <libutf8.h>
6331 rm -f conftest.$ac_objext conftest$ac_exeext
6332 if { (eval echo "$as_me:6332: \"$ac_link\"") >&5
6333 (eval $ac_link) 2>&5
6335 echo "$as_me:6335: \$? = $ac_status" >&5
6336 (exit $ac_status); } &&
6337 { ac_try='test -s conftest$ac_exeext'
6338 { (eval echo "$as_me:6338: \"$ac_try\"") >&5
6341 echo "$as_me:6341: \$? = $ac_status" >&5
6342 (exit $ac_status); }; }; then
6344 cf_cv_find_linkage_utf8=yes
6345 cf_cv_header_path_utf8=/usr/include
6346 cf_cv_library_path_utf8=/usr/lib
6349 echo "$as_me: failed program was:" >&5
6350 cat conftest.$ac_ext >&5
6352 LIBS="-lutf8 $cf_save_LIBS"
6354 cat >conftest.$ac_ext <<_ACEOF
6355 #line 6355 "configure"
6356 #include "confdefs.h"
6358 #include <libutf8.h>
6367 rm -f conftest.$ac_objext conftest$ac_exeext
6368 if { (eval echo "$as_me:6368: \"$ac_link\"") >&5
6369 (eval $ac_link) 2>&5
6371 echo "$as_me:6371: \$? = $ac_status" >&5
6372 (exit $ac_status); } &&
6373 { ac_try='test -s conftest$ac_exeext'
6374 { (eval echo "$as_me:6374: \"$ac_try\"") >&5
6377 echo "$as_me:6377: \$? = $ac_status" >&5
6378 (exit $ac_status); }; }; then
6380 cf_cv_find_linkage_utf8=yes
6381 cf_cv_header_path_utf8=/usr/include
6382 cf_cv_library_path_utf8=/usr/lib
6383 cf_cv_library_file_utf8="-lutf8"
6386 echo "$as_me: failed program was:" >&5
6387 cat conftest.$ac_ext >&5
6389 cf_cv_find_linkage_utf8=no
6390 LIBS="$cf_save_LIBS"
6392 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6394 echo "${as_me:-configure}:6394: testing find linkage for utf8 library ..." 1>&5
6396 echo "${as_me:-configure}:6396: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6398 cf_save_CPPFLAGS="$CPPFLAGS"
6399 cf_test_CPPFLAGS="$CPPFLAGS"
6403 # collect the current set of include-directories from compiler flags
6404 cf_header_path_list=""
6405 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6406 for cf_header_path in $CPPFLAGS $CFLAGS
6408 case $cf_header_path in
6410 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6412 test "x$cf_header_path" != "xNONE" && \
6413 test -d "$cf_header_path" && \
6415 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6416 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6417 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6418 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6419 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6420 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6423 cf_header_path_list="$cf_header_path_list $cf_search"
6429 # add the variations for the package we are looking for
6433 test "x$prefix" != "xNONE" && \
6434 test -d "$prefix" && \
6436 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6437 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6438 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6439 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6440 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6441 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6444 for cf_subdir_prefix in \
6453 test "x$cf_subdir_prefix" != "x$prefix" && \
6454 test -d "$cf_subdir_prefix" && \
6455 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6456 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6457 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6458 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6459 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6460 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6461 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6466 test "$includedir" != NONE && \
6467 test "$includedir" != "/usr/include" && \
6468 test -d "$includedir" && {
6469 test -d $includedir && cf_search="$cf_search $includedir"
6470 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6473 test "$oldincludedir" != NONE && \
6474 test "$oldincludedir" != "/usr/include" && \
6475 test -d "$oldincludedir" && {
6476 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6477 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6480 cf_search="$cf_search $cf_header_path_list"
6482 for cf_cv_header_path_utf8 in $cf_search
6484 if test -d $cf_cv_header_path_utf8 ; then
6485 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6487 echo "${as_me:-configure}:6487: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6489 CPPFLAGS="$cf_save_CPPFLAGS"
6491 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6492 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6494 cat >conftest.$ac_ext <<_ACEOF
6495 #line 6495 "configure"
6496 #include "confdefs.h"
6498 #include <libutf8.h>
6507 rm -f conftest.$ac_objext
6508 if { (eval echo "$as_me:6508: \"$ac_compile\"") >&5
6509 (eval $ac_compile) 2>&5
6511 echo "$as_me:6511: \$? = $ac_status" >&5
6512 (exit $ac_status); } &&
6513 { ac_try='test -s conftest.$ac_objext'
6514 { (eval echo "$as_me:6514: \"$ac_try\"") >&5
6517 echo "$as_me:6517: \$? = $ac_status" >&5
6518 (exit $ac_status); }; }; then
6520 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6522 echo "${as_me:-configure}:6522: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6524 cf_cv_find_linkage_utf8=maybe
6525 cf_test_CPPFLAGS="$CPPFLAGS"
6528 echo "$as_me: failed program was:" >&5
6529 cat conftest.$ac_ext >&5
6531 CPPFLAGS="$cf_save_CPPFLAGS"
6534 rm -f conftest.$ac_objext conftest.$ac_ext
6538 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6540 echo "${as_me:-configure}:6540: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6542 cf_save_LIBS="$LIBS"
6543 cf_save_LDFLAGS="$LDFLAGS"
6545 if test "$cf_cv_find_linkage_utf8" != yes ; then
6548 cf_library_path_list=""
6549 if test -n "${LDFLAGS}${LIBS}" ; then
6550 for cf_library_path in $LDFLAGS $LIBS
6552 case $cf_library_path in
6554 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6556 test "x$cf_library_path" != "xNONE" && \
6557 test -d "$cf_library_path" && \
6559 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6560 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6561 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6562 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6563 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6564 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6567 cf_library_path_list="$cf_library_path_list $cf_search"
6575 test "x$prefix" != "xNONE" && \
6576 test -d "$prefix" && \
6578 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6579 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6580 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6581 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6582 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6583 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6586 for cf_subdir_prefix in \
6595 test "x$cf_subdir_prefix" != "x$prefix" && \
6596 test -d "$cf_subdir_prefix" && \
6597 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6598 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6599 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6600 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6601 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6602 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6603 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6608 cf_search="$cf_library_path_list $cf_search"
6610 for cf_cv_library_path_utf8 in $cf_search
6612 if test -d $cf_cv_library_path_utf8 ; then
6613 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6615 echo "${as_me:-configure}:6615: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6617 CPPFLAGS="$cf_test_CPPFLAGS"
6618 LIBS="-lutf8 $cf_save_LIBS"
6619 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6620 cat >conftest.$ac_ext <<_ACEOF
6621 #line 6621 "configure"
6622 #include "confdefs.h"
6624 #include <libutf8.h>
6633 rm -f conftest.$ac_objext conftest$ac_exeext
6634 if { (eval echo "$as_me:6634: \"$ac_link\"") >&5
6635 (eval $ac_link) 2>&5
6637 echo "$as_me:6637: \$? = $ac_status" >&5
6638 (exit $ac_status); } &&
6639 { ac_try='test -s conftest$ac_exeext'
6640 { (eval echo "$as_me:6640: \"$ac_try\"") >&5
6643 echo "$as_me:6643: \$? = $ac_status" >&5
6644 (exit $ac_status); }; }; then
6646 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6648 echo "${as_me:-configure}:6648: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6650 cf_cv_find_linkage_utf8=yes
6651 cf_cv_library_file_utf8="-lutf8"
6654 echo "$as_me: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6657 CPPFLAGS="$cf_save_CPPFLAGS"
6658 LIBS="$cf_save_LIBS"
6659 LDFLAGS="$cf_save_LDFLAGS"
6662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6665 CPPFLAGS="$cf_save_CPPFLAGS"
6666 LDFLAGS="$cf_save_LDFLAGS"
6670 cf_cv_find_linkage_utf8=no
6674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6679 LIBS="$cf_save_LIBS"
6681 if test "$cf_cv_find_linkage_utf8" = yes ; then
6682 cf_cv_utf8_lib=add-on
6688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6690 echo "$as_me:6690: result: $cf_cv_utf8_lib" >&5
6691 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6693 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6695 if test "$cf_cv_utf8_lib" = "add-on" ; then
6697 cat >>confdefs.h <<\EOF
6698 #define HAVE_LIBUTF8_H 1
6701 if test -n "$cf_cv_header_path_utf8" ; then
6702 for cf_add_incdir in $cf_cv_header_path_utf8
6704 while test $cf_add_incdir != /usr/include
6706 if test -d $cf_add_incdir
6709 if test -n "$CFLAGS$CPPFLAGS" ; then
6710 # a loop is needed to ensure we can add subdirs of existing dirs
6711 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6712 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6713 cf_have_incdir=yes; break
6718 if test "$cf_have_incdir" = no ; then
6719 if test "$cf_add_incdir" = /usr/local/include ; then
6720 if test "$GCC" = yes
6722 cf_save_CPPFLAGS=$CPPFLAGS
6724 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6725 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6727 cat >conftest.$ac_ext <<_ACEOF
6728 #line 6728 "configure"
6729 #include "confdefs.h"
6739 rm -f conftest.$ac_objext
6740 if { (eval echo "$as_me:6740: \"$ac_compile\"") >&5
6741 (eval $ac_compile) 2>&5
6743 echo "$as_me:6743: \$? = $ac_status" >&5
6744 (exit $ac_status); } &&
6745 { ac_try='test -s conftest.$ac_objext'
6746 { (eval echo "$as_me:6746: \"$ac_try\"") >&5
6749 echo "$as_me:6749: \$? = $ac_status" >&5
6750 (exit $ac_status); }; }; then
6753 echo "$as_me: failed program was:" >&5
6754 cat conftest.$ac_ext >&5
6757 rm -f conftest.$ac_objext conftest.$ac_ext
6758 CPPFLAGS=$cf_save_CPPFLAGS
6763 if test "$cf_have_incdir" = no ; then
6764 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6766 echo "${as_me:-configure}:6766: testing adding $cf_add_incdir to include-path ..." 1>&5
6768 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6770 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6771 test "$cf_top_incdir" = "$cf_add_incdir" && break
6772 cf_add_incdir="$cf_top_incdir"
6783 if test -n "$cf_cv_library_path_utf8" ; then
6784 for cf_add_libdir in $cf_cv_library_path_utf8
6786 if test $cf_add_libdir = /usr/lib ; then
6788 elif test -d $cf_add_libdir
6791 if test -n "$LDFLAGS$LIBS" ; then
6792 # a loop is needed to ensure we can add subdirs of existing dirs
6793 for cf_test_libdir in $LDFLAGS $LIBS ; do
6794 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6795 cf_have_libdir=yes; break
6799 if test "$cf_have_libdir" = no ; then
6800 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6802 echo "${as_me:-configure}:6802: testing adding $cf_add_libdir to library-path ..." 1>&5
6804 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6813 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6815 for cf_add_1lib in $cf_add_0lib; do
6816 for cf_add_2lib in $cf_add_libs; do
6817 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6822 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6828 cf_ncuconfig_root=ncursesw
6829 cf_have_ncuconfig=no
6831 if test "x${PKG_CONFIG:=none}" != xnone; then
6832 echo "$as_me:6832: checking pkg-config for $cf_ncuconfig_root" >&5
6833 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6834 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6835 echo "$as_me:6835: result: yes" >&5
6836 echo "${ECHO_T}yes" >&6
6838 echo "$as_me:6838: checking if the $cf_ncuconfig_root package files work" >&5
6839 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6840 cf_have_ncuconfig=unknown
6842 cf_save_CFLAGS="$CFLAGS"
6843 cf_save_CPPFLAGS="$CPPFLAGS"
6844 cf_save_LIBS="$LIBS"
6846 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
6847 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
6849 # while -W for passing linker flags is prevalent, it is not "standard".
6850 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
6851 # incompatible _and_ non-standard -W option which gives an error. Work
6852 # around that pitfall.
6853 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
6859 cf_new_extra_cppflags=
6861 for cf_add_cflags in $cf_pkg_cflags
6863 case $cf_fix_cppflags in
6865 case $cf_add_cflags in
6866 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6867 case $cf_add_cflags in
6869 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6871 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6872 && test -z "${cf_tst_cflags}" \
6873 && cf_fix_cppflags=yes
6875 if test $cf_fix_cppflags = yes ; then
6877 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6878 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6881 elif test "${cf_tst_cflags}" = "\"'" ; then
6883 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6884 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6894 case $cf_add_cflags in
6896 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6898 CPPFLAGS=`echo "$CPPFLAGS" | \
6899 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6900 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6905 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6906 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6913 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6914 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6921 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6922 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6924 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6926 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6927 && test -z "${cf_tst_cflags}" \
6928 && cf_fix_cppflags=no
6933 if test -n "$cf_new_cflags" ; then
6935 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6936 CFLAGS="${CFLAGS}$cf_new_cflags"
6940 if test -n "$cf_new_cppflags" ; then
6942 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6943 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6947 if test -n "$cf_new_extra_cppflags" ; then
6949 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6950 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6957 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6959 for cf_add_1lib in $cf_add_0lib; do
6960 for cf_add_2lib in $cf_add_libs; do
6961 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6966 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6970 cat >conftest.$ac_ext <<_ACEOF
6971 #line 6971 "configure"
6972 #include "confdefs.h"
6973 #include <${cf_cv_ncurses_header:-curses.h}>
6977 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6982 rm -f conftest.$ac_objext conftest$ac_exeext
6983 if { (eval echo "$as_me:6983: \"$ac_link\"") >&5
6984 (eval $ac_link) 2>&5
6986 echo "$as_me:6986: \$? = $ac_status" >&5
6987 (exit $ac_status); } &&
6988 { ac_try='test -s conftest$ac_exeext'
6989 { (eval echo "$as_me:6989: \"$ac_try\"") >&5
6992 echo "$as_me:6992: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 if test "$cross_compiling" = yes; then
6995 cf_test_ncuconfig=maybe
6997 cat >conftest.$ac_ext <<_ACEOF
6998 #line 6998 "configure"
6999 #include "confdefs.h"
7000 #include <${cf_cv_ncurses_header:-curses.h}>
7002 { char *xx = curses_version(); return (xx == 0); }
7004 rm -f conftest$ac_exeext
7005 if { (eval echo "$as_me:7005: \"$ac_link\"") >&5
7006 (eval $ac_link) 2>&5
7008 echo "$as_me:7008: \$? = $ac_status" >&5
7009 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7010 { (eval echo "$as_me:7010: \"$ac_try\"") >&5
7013 echo "$as_me:7013: \$? = $ac_status" >&5
7014 (exit $ac_status); }; }; then
7015 cf_test_ncuconfig=yes
7017 echo "$as_me: program exited with status $ac_status" >&5
7018 echo "$as_me: failed program was:" >&5
7019 cat conftest.$ac_ext >&5
7020 cf_test_ncuconfig=no
7022 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7025 echo "$as_me: failed program was:" >&5
7026 cat conftest.$ac_ext >&5
7027 cf_test_ncuconfig=no
7029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7031 CFLAGS="$cf_save_CFLAGS"
7032 CPPFLAGS="$cf_save_CPPFLAGS"
7033 LIBS="$cf_save_LIBS"
7035 if test "x$cf_test_ncuconfig" != xyes; then
7036 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7037 cf_pkg_cflags="$cf_temp"
7038 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7039 cf_pkg_libs="$cf_temp"
7047 cf_new_extra_cppflags=
7049 for cf_add_cflags in $cf_pkg_cflags
7051 case $cf_fix_cppflags in
7053 case $cf_add_cflags in
7054 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7055 case $cf_add_cflags in
7057 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7059 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7060 && test -z "${cf_tst_cflags}" \
7061 && cf_fix_cppflags=yes
7063 if test $cf_fix_cppflags = yes ; then
7065 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7066 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7069 elif test "${cf_tst_cflags}" = "\"'" ; then
7071 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7072 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7082 case $cf_add_cflags in
7084 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7086 CPPFLAGS=`echo "$CPPFLAGS" | \
7087 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7088 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7093 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7094 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7101 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7102 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7109 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7110 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7112 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7114 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7115 && test -z "${cf_tst_cflags}" \
7116 && cf_fix_cppflags=no
7121 if test -n "$cf_new_cflags" ; then
7123 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7124 CFLAGS="${CFLAGS}$cf_new_cflags"
7128 if test -n "$cf_new_cppflags" ; then
7130 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7131 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7135 if test -n "$cf_new_extra_cppflags" ; then
7137 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7138 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7145 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7147 for cf_add_1lib in $cf_add_0lib; do
7148 for cf_add_2lib in $cf_add_libs; do
7149 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7154 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7158 cat >conftest.$ac_ext <<_ACEOF
7159 #line 7159 "configure"
7160 #include "confdefs.h"
7161 #include <${cf_cv_ncurses_header:-curses.h}>
7165 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7170 rm -f conftest.$ac_objext conftest$ac_exeext
7171 if { (eval echo "$as_me:7171: \"$ac_link\"") >&5
7172 (eval $ac_link) 2>&5
7174 echo "$as_me:7174: \$? = $ac_status" >&5
7175 (exit $ac_status); } &&
7176 { ac_try='test -s conftest$ac_exeext'
7177 { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7180 echo "$as_me:7180: \$? = $ac_status" >&5
7181 (exit $ac_status); }; }; then
7182 if test "$cross_compiling" = yes; then
7183 cf_have_ncuconfig=maybe
7185 cat >conftest.$ac_ext <<_ACEOF
7186 #line 7186 "configure"
7187 #include "confdefs.h"
7188 #include <${cf_cv_ncurses_header:-curses.h}>
7190 { char *xx = curses_version(); return (xx == 0); }
7192 rm -f conftest$ac_exeext
7193 if { (eval echo "$as_me:7193: \"$ac_link\"") >&5
7194 (eval $ac_link) 2>&5
7196 echo "$as_me:7196: \$? = $ac_status" >&5
7197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7198 { (eval echo "$as_me:7198: \"$ac_try\"") >&5
7201 echo "$as_me:7201: \$? = $ac_status" >&5
7202 (exit $ac_status); }; }; then
7203 cf_have_ncuconfig=yes
7205 echo "$as_me: program exited with status $ac_status" >&5
7206 echo "$as_me: failed program was:" >&5
7207 cat conftest.$ac_ext >&5
7208 cf_have_ncuconfig=no
7210 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7213 echo "$as_me: failed program was:" >&5
7214 cat conftest.$ac_ext >&5
7215 cf_have_ncuconfig=no
7217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7218 echo "$as_me:7218: result: $cf_have_ncuconfig" >&5
7219 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7220 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7221 if test "$cf_have_ncuconfig" != "yes"
7223 CPPFLAGS="$cf_save_CPPFLAGS"
7224 LIBS="$cf_save_LIBS"
7225 NCURSES_CONFIG_PKG=none
7228 cat >>confdefs.h <<\EOF
7232 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7234 echo "$as_me:7234: checking for terminfo header" >&5
7235 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7236 if test "${cf_cv_term_header+set}" = set; then
7237 echo $ECHO_N "(cached) $ECHO_C" >&6
7240 case ${cf_cv_ncurses_header} in
7241 (*/ncurses.h|*/ncursesw.h)
7242 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7245 cf_term_header=term.h
7249 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7251 cat >conftest.$ac_ext <<_ACEOF
7252 #line 7252 "configure"
7253 #include "confdefs.h"
7255 #include <${cf_cv_ncurses_header:-curses.h}>
7261 int x = auto_left_margin; (void)x
7266 rm -f conftest.$ac_objext
7267 if { (eval echo "$as_me:7267: \"$ac_compile\"") >&5
7268 (eval $ac_compile) 2>&5
7270 echo "$as_me:7270: \$? = $ac_status" >&5
7271 (exit $ac_status); } &&
7272 { ac_try='test -s conftest.$ac_objext'
7273 { (eval echo "$as_me:7273: \"$ac_try\"") >&5
7276 echo "$as_me:7276: \$? = $ac_status" >&5
7277 (exit $ac_status); }; }; then
7279 cf_cv_term_header="$cf_test"
7281 echo "$as_me: failed program was:" >&5
7282 cat conftest.$ac_ext >&5
7284 cf_cv_term_header=unknown
7287 rm -f conftest.$ac_objext conftest.$ac_ext
7288 test "$cf_cv_term_header" != unknown && break
7292 echo "$as_me:7292: result: $cf_cv_term_header" >&5
7293 echo "${ECHO_T}$cf_cv_term_header" >&6
7295 # Set definitions to allow ifdef'ing to accommodate subdirectories
7297 case $cf_cv_term_header in
7300 cat >>confdefs.h <<\EOF
7301 #define HAVE_TERM_H 1
7307 case $cf_cv_term_header in
7310 cat >>confdefs.h <<\EOF
7311 #define HAVE_NCURSES_TERM_H 1
7317 cat >>confdefs.h <<\EOF
7318 #define HAVE_NCURSESW_TERM_H 1
7327 echo "$as_me:7327: result: no" >&5
7328 echo "${ECHO_T}no" >&6
7329 NCURSES_CONFIG_PKG=none
7332 NCURSES_CONFIG_PKG=none
7335 if test "x$cf_have_ncuconfig" = "xno"; then
7336 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7338 if test -n "$ac_tool_prefix"; then
7339 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7341 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7342 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7343 echo "$as_me:7343: checking for $ac_word" >&5
7344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7345 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7346 echo $ECHO_N "(cached) $ECHO_C" >&6
7348 if test -n "$NCURSES_CONFIG"; then
7349 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7351 ac_save_IFS=$IFS; IFS=$ac_path_separator
7353 for ac_dir in $ac_dummy; do
7355 test -z "$ac_dir" && ac_dir=.
7356 $as_executable_p "$ac_dir/$ac_word" || continue
7357 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7358 echo "$as_me:7358: found $ac_dir/$ac_word" >&5
7364 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7365 if test -n "$NCURSES_CONFIG"; then
7366 echo "$as_me:7366: result: $NCURSES_CONFIG" >&5
7367 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7369 echo "$as_me:7369: result: no" >&5
7370 echo "${ECHO_T}no" >&6
7373 test -n "$NCURSES_CONFIG" && break
7376 if test -z "$NCURSES_CONFIG"; then
7377 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7378 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7380 # Extract the first word of "$ac_prog", so it can be a program name with args.
7381 set dummy $ac_prog; ac_word=$2
7382 echo "$as_me:7382: checking for $ac_word" >&5
7383 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7384 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7385 echo $ECHO_N "(cached) $ECHO_C" >&6
7387 if test -n "$ac_ct_NCURSES_CONFIG"; then
7388 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7390 ac_save_IFS=$IFS; IFS=$ac_path_separator
7392 for ac_dir in $ac_dummy; do
7394 test -z "$ac_dir" && ac_dir=.
7395 $as_executable_p "$ac_dir/$ac_word" || continue
7396 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7397 echo "$as_me:7397: found $ac_dir/$ac_word" >&5
7403 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7404 if test -n "$ac_ct_NCURSES_CONFIG"; then
7405 echo "$as_me:7405: result: $ac_ct_NCURSES_CONFIG" >&5
7406 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7408 echo "$as_me:7408: result: no" >&5
7409 echo "${ECHO_T}no" >&6
7412 test -n "$ac_ct_NCURSES_CONFIG" && break
7414 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7416 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7419 if test "$NCURSES_CONFIG" != none ; then
7424 cf_new_extra_cppflags=
7426 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7428 case $cf_fix_cppflags in
7430 case $cf_add_cflags in
7431 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7432 case $cf_add_cflags in
7434 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7436 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7437 && test -z "${cf_tst_cflags}" \
7438 && cf_fix_cppflags=yes
7440 if test $cf_fix_cppflags = yes ; then
7442 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7443 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7446 elif test "${cf_tst_cflags}" = "\"'" ; then
7448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7459 case $cf_add_cflags in
7461 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7463 CPPFLAGS=`echo "$CPPFLAGS" | \
7464 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7465 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7470 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7471 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7478 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7479 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7486 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7487 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7489 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7492 && test -z "${cf_tst_cflags}" \
7493 && cf_fix_cppflags=no
7498 if test -n "$cf_new_cflags" ; then
7500 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7501 CFLAGS="${CFLAGS}$cf_new_cflags"
7505 if test -n "$cf_new_cppflags" ; then
7507 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7508 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7512 if test -n "$cf_new_extra_cppflags" ; then
7514 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7515 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7522 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7524 for cf_add_1lib in $cf_add_0lib; do
7525 for cf_add_2lib in $cf_add_libs; do
7526 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7531 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7535 # even with config script, some packages use no-override for curses.h
7537 echo "$as_me:7537: checking if we have identified curses headers" >&5
7538 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7539 if test "${cf_cv_ncurses_header+set}" = set; then
7540 echo $ECHO_N "(cached) $ECHO_C" >&6
7543 cf_cv_ncurses_header=none
7545 ncurses.h ncursesw/ncurses.h \
7546 curses.h ncursesw/curses.h
7548 cat >conftest.$ac_ext <<_ACEOF
7549 #line 7549 "configure"
7550 #include "confdefs.h"
7551 #include <${cf_header}>
7555 initscr(); tgoto("?", 0,0)
7560 rm -f conftest.$ac_objext
7561 if { (eval echo "$as_me:7561: \"$ac_compile\"") >&5
7562 (eval $ac_compile) 2>&5
7564 echo "$as_me:7564: \$? = $ac_status" >&5
7565 (exit $ac_status); } &&
7566 { ac_try='test -s conftest.$ac_objext'
7567 { (eval echo "$as_me:7567: \"$ac_try\"") >&5
7570 echo "$as_me:7570: \$? = $ac_status" >&5
7571 (exit $ac_status); }; }; then
7572 cf_cv_ncurses_header=$cf_header; break
7574 echo "$as_me: failed program was:" >&5
7575 cat conftest.$ac_ext >&5
7577 rm -f conftest.$ac_objext conftest.$ac_ext
7581 echo "$as_me:7581: result: $cf_cv_ncurses_header" >&5
7582 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7584 if test "$cf_cv_ncurses_header" = none ; then
7585 { { echo "$as_me:7585: error: No curses header-files found" >&5
7586 echo "$as_me: error: No curses header-files found" >&2;}
7587 { (exit 1); exit 1; }; }
7590 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7592 for ac_header in $cf_cv_ncurses_header
7594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7595 echo "$as_me:7595: checking for $ac_header" >&5
7596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7598 echo $ECHO_N "(cached) $ECHO_C" >&6
7600 cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #include <$ac_header>
7605 if { (eval echo "$as_me:7605: \"$ac_cpp conftest.$ac_ext\"") >&5
7606 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7608 egrep -v '^ *\+' conftest.er1 >conftest.err
7610 cat conftest.err >&5
7611 echo "$as_me:7611: \$? = $ac_status" >&5
7612 (exit $ac_status); } >/dev/null; then
7613 if test -s conftest.err; then
7614 ac_cpp_err=$ac_c_preproc_warn_flag
7621 if test -z "$ac_cpp_err"; then
7622 eval "$as_ac_Header=yes"
7624 echo "$as_me: failed program was:" >&5
7625 cat conftest.$ac_ext >&5
7626 eval "$as_ac_Header=no"
7628 rm -f conftest.err conftest.$ac_ext
7630 echo "$as_me:7630: result: `eval echo '${'$as_ac_Header'}'`" >&5
7631 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7632 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7633 cat >>confdefs.h <<EOF
7634 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7640 cat >>confdefs.h <<\EOF
7644 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7646 cat >>confdefs.h <<EOF
7647 #define $cf_nculib_ROOT 1
7650 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7654 cf_ncuhdr_root=ncursesw
7656 test -n "$cf_cv_curses_dir" && \
7657 test "$cf_cv_curses_dir" != "no" && { \
7659 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7660 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7662 while test $cf_add_incdir != /usr/include
7664 if test -d $cf_add_incdir
7667 if test -n "$CFLAGS$CPPFLAGS" ; then
7668 # a loop is needed to ensure we can add subdirs of existing dirs
7669 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7670 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7671 cf_have_incdir=yes; break
7676 if test "$cf_have_incdir" = no ; then
7677 if test "$cf_add_incdir" = /usr/local/include ; then
7678 if test "$GCC" = yes
7680 cf_save_CPPFLAGS=$CPPFLAGS
7682 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7683 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7685 cat >conftest.$ac_ext <<_ACEOF
7686 #line 7686 "configure"
7687 #include "confdefs.h"
7697 rm -f conftest.$ac_objext
7698 if { (eval echo "$as_me:7698: \"$ac_compile\"") >&5
7699 (eval $ac_compile) 2>&5
7701 echo "$as_me:7701: \$? = $ac_status" >&5
7702 (exit $ac_status); } &&
7703 { ac_try='test -s conftest.$ac_objext'
7704 { (eval echo "$as_me:7704: \"$ac_try\"") >&5
7707 echo "$as_me:7707: \$? = $ac_status" >&5
7708 (exit $ac_status); }; }; then
7711 echo "$as_me: failed program was:" >&5
7712 cat conftest.$ac_ext >&5
7715 rm -f conftest.$ac_objext conftest.$ac_ext
7716 CPPFLAGS=$cf_save_CPPFLAGS
7721 if test "$cf_have_incdir" = no ; then
7722 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7724 echo "${as_me:-configure}:7724: testing adding $cf_add_incdir to include-path ..." 1>&5
7726 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7728 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7729 test "$cf_top_incdir" = "$cf_add_incdir" && break
7730 cf_add_incdir="$cf_top_incdir"
7743 echo "$as_me:7743: checking for $cf_ncuhdr_root header in include-path" >&5
7744 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7745 if test "${cf_cv_ncurses_h+set}" = set; then
7746 echo $ECHO_N "(cached) $ECHO_C" >&6
7749 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7750 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7751 for cf_header in $cf_header_list
7754 cat >conftest.$ac_ext <<_ACEOF
7755 #line 7755 "configure"
7756 #include "confdefs.h"
7758 #define _XOPEN_SOURCE_EXTENDED
7759 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7760 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7762 #include <$cf_header>
7767 #ifdef NCURSES_VERSION
7773 printf("%s\n", NCURSES_VERSION);
7786 rm -f conftest.$ac_objext
7787 if { (eval echo "$as_me:7787: \"$ac_compile\"") >&5
7788 (eval $ac_compile) 2>&5
7790 echo "$as_me:7790: \$? = $ac_status" >&5
7791 (exit $ac_status); } &&
7792 { ac_try='test -s conftest.$ac_objext'
7793 { (eval echo "$as_me:7793: \"$ac_try\"") >&5
7796 echo "$as_me:7796: \$? = $ac_status" >&5
7797 (exit $ac_status); }; }; then
7798 cf_cv_ncurses_h=$cf_header
7801 echo "$as_me: failed program was:" >&5
7802 cat conftest.$ac_ext >&5
7805 rm -f conftest.$ac_objext conftest.$ac_ext
7807 test "$cf_cv_ncurses_h" != no && break
7811 echo "$as_me:7811: result: $cf_cv_ncurses_h" >&5
7812 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7814 if test "$cf_cv_ncurses_h" != no ; then
7815 cf_cv_ncurses_header=$cf_cv_ncurses_h
7818 echo "$as_me:7818: checking for $cf_ncuhdr_root include-path" >&5
7819 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7820 if test "${cf_cv_ncurses_h2+set}" = set; then
7821 echo $ECHO_N "(cached) $ECHO_C" >&6
7824 test -n "$verbose" && echo
7828 # collect the current set of include-directories from compiler flags
7829 cf_header_path_list=""
7830 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7831 for cf_header_path in $CPPFLAGS $CFLAGS
7833 case $cf_header_path in
7835 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7837 test "x$cf_header_path" != "xNONE" && \
7838 test -d "$cf_header_path" && \
7840 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7841 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7842 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7843 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7844 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7845 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"
7848 cf_header_path_list="$cf_header_path_list $cf_search"
7854 # add the variations for the package we are looking for
7858 test "x$prefix" != "xNONE" && \
7859 test -d "$prefix" && \
7861 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7862 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7863 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7864 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7865 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7866 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7869 for cf_subdir_prefix in \
7878 test "x$cf_subdir_prefix" != "x$prefix" && \
7879 test -d "$cf_subdir_prefix" && \
7880 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7881 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7882 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7883 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7884 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7885 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7886 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"
7891 test "$includedir" != NONE && \
7892 test "$includedir" != "/usr/include" && \
7893 test -d "$includedir" && {
7894 test -d $includedir && cf_search="$cf_search $includedir"
7895 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7898 test "$oldincludedir" != NONE && \
7899 test "$oldincludedir" != "/usr/include" && \
7900 test -d "$oldincludedir" && {
7901 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7902 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7905 cf_search="$cf_search $cf_header_path_list"
7907 test -n "$verbose" && echo search path $cf_search
7908 cf_save2_CPPFLAGS="$CPPFLAGS"
7909 for cf_incdir in $cf_search
7912 if test -n "$cf_incdir" ; then
7913 for cf_add_incdir in $cf_incdir
7915 while test $cf_add_incdir != /usr/include
7917 if test -d $cf_add_incdir
7920 if test -n "$CFLAGS$CPPFLAGS" ; then
7921 # a loop is needed to ensure we can add subdirs of existing dirs
7922 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7923 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7924 cf_have_incdir=yes; break
7929 if test "$cf_have_incdir" = no ; then
7930 if test "$cf_add_incdir" = /usr/local/include ; then
7931 if test "$GCC" = yes
7933 cf_save_CPPFLAGS=$CPPFLAGS
7935 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7936 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7938 cat >conftest.$ac_ext <<_ACEOF
7939 #line 7939 "configure"
7940 #include "confdefs.h"
7950 rm -f conftest.$ac_objext
7951 if { (eval echo "$as_me:7951: \"$ac_compile\"") >&5
7952 (eval $ac_compile) 2>&5
7954 echo "$as_me:7954: \$? = $ac_status" >&5
7955 (exit $ac_status); } &&
7956 { ac_try='test -s conftest.$ac_objext'
7957 { (eval echo "$as_me:7957: \"$ac_try\"") >&5
7960 echo "$as_me:7960: \$? = $ac_status" >&5
7961 (exit $ac_status); }; }; then
7964 echo "$as_me: failed program was:" >&5
7965 cat conftest.$ac_ext >&5
7968 rm -f conftest.$ac_objext conftest.$ac_ext
7969 CPPFLAGS=$cf_save_CPPFLAGS
7974 if test "$cf_have_incdir" = no ; then
7975 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7977 echo "${as_me:-configure}:7977: testing adding $cf_add_incdir to include-path ..." 1>&5
7979 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7981 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7982 test "$cf_top_incdir" = "$cf_add_incdir" && break
7983 cf_add_incdir="$cf_top_incdir"
7999 cat >conftest.$ac_ext <<_ACEOF
8000 #line 8000 "configure"
8001 #include "confdefs.h"
8003 #include <$cf_header>
8008 #ifdef NCURSES_VERSION
8010 printf("%s\n", NCURSES_VERSION);
8023 rm -f conftest.$ac_objext
8024 if { (eval echo "$as_me:8024: \"$ac_compile\"") >&5
8025 (eval $ac_compile) 2>&5
8027 echo "$as_me:8027: \$? = $ac_status" >&5
8028 (exit $ac_status); } &&
8029 { ac_try='test -s conftest.$ac_objext'
8030 { (eval echo "$as_me:8030: \"$ac_try\"") >&5
8033 echo "$as_me:8033: \$? = $ac_status" >&5
8034 (exit $ac_status); }; }; then
8035 cf_cv_ncurses_h2=$cf_header
8038 echo "$as_me: failed program was:" >&5
8039 cat conftest.$ac_ext >&5
8042 rm -f conftest.$ac_objext conftest.$ac_ext
8044 if test "$cf_cv_ncurses_h2" != no ; then
8045 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8046 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8049 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8051 CPPFLAGS="$cf_save2_CPPFLAGS"
8052 test "$cf_cv_ncurses_h2" != no && break
8054 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8054: error: not found" >&5
8055 echo "$as_me: error: not found" >&2;}
8056 { (exit 1); exit 1; }; }
8059 echo "$as_me:8059: result: $cf_cv_ncurses_h2" >&5
8060 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8062 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8063 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8064 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8065 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8068 if test -n "$cf_1st_incdir" ; then
8069 for cf_add_incdir in $cf_1st_incdir
8071 while test $cf_add_incdir != /usr/include
8073 if test -d $cf_add_incdir
8076 if test -n "$CFLAGS$CPPFLAGS" ; then
8077 # a loop is needed to ensure we can add subdirs of existing dirs
8078 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8079 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8080 cf_have_incdir=yes; break
8085 if test "$cf_have_incdir" = no ; then
8086 if test "$cf_add_incdir" = /usr/local/include ; then
8087 if test "$GCC" = yes
8089 cf_save_CPPFLAGS=$CPPFLAGS
8091 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8092 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8094 cat >conftest.$ac_ext <<_ACEOF
8095 #line 8095 "configure"
8096 #include "confdefs.h"
8106 rm -f conftest.$ac_objext
8107 if { (eval echo "$as_me:8107: \"$ac_compile\"") >&5
8108 (eval $ac_compile) 2>&5
8110 echo "$as_me:8110: \$? = $ac_status" >&5
8111 (exit $ac_status); } &&
8112 { ac_try='test -s conftest.$ac_objext'
8113 { (eval echo "$as_me:8113: \"$ac_try\"") >&5
8116 echo "$as_me:8116: \$? = $ac_status" >&5
8117 (exit $ac_status); }; }; then
8120 echo "$as_me: failed program was:" >&5
8121 cat conftest.$ac_ext >&5
8124 rm -f conftest.$ac_objext conftest.$ac_ext
8125 CPPFLAGS=$cf_save_CPPFLAGS
8130 if test "$cf_have_incdir" = no ; then
8131 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8133 echo "${as_me:-configure}:8133: testing adding $cf_add_incdir to include-path ..." 1>&5
8135 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8137 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8138 test "$cf_top_incdir" = "$cf_add_incdir" && break
8139 cf_add_incdir="$cf_top_incdir"
8152 # Set definitions to allow ifdef'ing for ncurses.h
8154 case $cf_cv_ncurses_header in
8157 cat >>confdefs.h <<\EOF
8158 #define HAVE_NCURSES_H 1
8164 case $cf_cv_ncurses_header in
8165 (ncurses/curses.h|ncurses/ncurses.h)
8167 cat >>confdefs.h <<\EOF
8168 #define HAVE_NCURSES_NCURSES_H 1
8172 (ncursesw/curses.h|ncursesw/ncurses.h)
8174 cat >>confdefs.h <<\EOF
8175 #define HAVE_NCURSESW_NCURSES_H 1
8181 echo "$as_me:8181: checking for terminfo header" >&5
8182 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8183 if test "${cf_cv_term_header+set}" = set; then
8184 echo $ECHO_N "(cached) $ECHO_C" >&6
8187 case ${cf_cv_ncurses_header} in
8188 (*/ncurses.h|*/ncursesw.h)
8189 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8192 cf_term_header=term.h
8196 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8198 cat >conftest.$ac_ext <<_ACEOF
8199 #line 8199 "configure"
8200 #include "confdefs.h"
8202 #include <${cf_cv_ncurses_header:-curses.h}>
8208 int x = auto_left_margin; (void)x
8213 rm -f conftest.$ac_objext
8214 if { (eval echo "$as_me:8214: \"$ac_compile\"") >&5
8215 (eval $ac_compile) 2>&5
8217 echo "$as_me:8217: \$? = $ac_status" >&5
8218 (exit $ac_status); } &&
8219 { ac_try='test -s conftest.$ac_objext'
8220 { (eval echo "$as_me:8220: \"$ac_try\"") >&5
8223 echo "$as_me:8223: \$? = $ac_status" >&5
8224 (exit $ac_status); }; }; then
8226 cf_cv_term_header="$cf_test"
8228 echo "$as_me: failed program was:" >&5
8229 cat conftest.$ac_ext >&5
8231 cf_cv_term_header=unknown
8234 rm -f conftest.$ac_objext conftest.$ac_ext
8235 test "$cf_cv_term_header" != unknown && break
8239 echo "$as_me:8239: result: $cf_cv_term_header" >&5
8240 echo "${ECHO_T}$cf_cv_term_header" >&6
8242 # Set definitions to allow ifdef'ing to accommodate subdirectories
8244 case $cf_cv_term_header in
8247 cat >>confdefs.h <<\EOF
8248 #define HAVE_TERM_H 1
8254 case $cf_cv_term_header in
8257 cat >>confdefs.h <<\EOF
8258 #define HAVE_NCURSES_TERM_H 1
8264 cat >>confdefs.h <<\EOF
8265 #define HAVE_NCURSESW_TERM_H 1
8271 # some applications need this, but should check for NCURSES_VERSION
8273 cat >>confdefs.h <<\EOF
8277 echo "$as_me:8277: checking for ncurses version" >&5
8278 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8279 if test "${cf_cv_ncurses_version+set}" = set; then
8280 echo $ECHO_N "(cached) $ECHO_C" >&6
8283 cf_cv_ncurses_version=no
8286 if test "$cross_compiling" = yes; then
8288 # This will not work if the preprocessor splits the line after the
8289 # Autoconf token. The 'unproto' program does that.
8290 cat > conftest.$ac_ext <<EOF
8291 #include <${cf_cv_ncurses_header:-curses.h}>
8293 #ifdef NCURSES_VERSION
8294 Autoconf NCURSES_VERSION
8302 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8303 { (eval echo "$as_me:8303: \"$cf_try\"") >&5
8306 echo "$as_me:8306: \$? = $ac_status" >&5
8307 (exit $ac_status); }
8308 if test -f conftest.out ; then
8309 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8310 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8315 cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8319 #include <${cf_cv_ncurses_header:-curses.h}>
8323 FILE *fp = fopen("$cf_tempfile", "w");
8324 #ifdef NCURSES_VERSION
8325 # ifdef NCURSES_VERSION_PATCH
8326 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8328 fprintf(fp, "%s\n", NCURSES_VERSION);
8332 fprintf(fp, "old\n");
8337 ${cf_cv_main_return:-return}(0);
8340 rm -f conftest$ac_exeext
8341 if { (eval echo "$as_me:8341: \"$ac_link\"") >&5
8342 (eval $ac_link) 2>&5
8344 echo "$as_me:8344: \$? = $ac_status" >&5
8345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8346 { (eval echo "$as_me:8346: \"$ac_try\"") >&5
8349 echo "$as_me:8349: \$? = $ac_status" >&5
8350 (exit $ac_status); }; }; then
8352 cf_cv_ncurses_version=`cat $cf_tempfile`
8354 echo "$as_me: program exited with status $ac_status" >&5
8355 echo "$as_me: failed program was:" >&5
8356 cat conftest.$ac_ext >&5
8358 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8363 echo "$as_me:8363: result: $cf_cv_ncurses_version" >&5
8364 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8365 test "$cf_cv_ncurses_version" = no ||
8366 cat >>confdefs.h <<\EOF
8370 cf_nculib_root=ncursesw
8371 # This works, except for the special case where we find gpm, but
8372 # ncurses is in a nonstandard location via $LIBS, and we really want
8375 cf_ncurses_SAVE="$LIBS"
8376 echo "$as_me:8376: checking for Gpm_Open in -lgpm" >&5
8377 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8378 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8379 echo $ECHO_N "(cached) $ECHO_C" >&6
8381 ac_check_lib_save_LIBS=$LIBS
8383 cat >conftest.$ac_ext <<_ACEOF
8384 #line 8384 "configure"
8385 #include "confdefs.h"
8387 /* Override any gcc2 internal prototype to avoid an error. */
8391 /* We use char because int might match the return type of a gcc2
8392 builtin and then its argument prototype would still apply. */
8402 rm -f conftest.$ac_objext conftest$ac_exeext
8403 if { (eval echo "$as_me:8403: \"$ac_link\"") >&5
8404 (eval $ac_link) 2>&5
8406 echo "$as_me:8406: \$? = $ac_status" >&5
8407 (exit $ac_status); } &&
8408 { ac_try='test -s conftest$ac_exeext'
8409 { (eval echo "$as_me:8409: \"$ac_try\"") >&5
8412 echo "$as_me:8412: \$? = $ac_status" >&5
8413 (exit $ac_status); }; }; then
8414 ac_cv_lib_gpm_Gpm_Open=yes
8416 echo "$as_me: failed program was:" >&5
8417 cat conftest.$ac_ext >&5
8418 ac_cv_lib_gpm_Gpm_Open=no
8420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8421 LIBS=$ac_check_lib_save_LIBS
8423 echo "$as_me:8423: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8424 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8425 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8426 echo "$as_me:8426: checking for initscr in -lgpm" >&5
8427 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8428 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8429 echo $ECHO_N "(cached) $ECHO_C" >&6
8431 ac_check_lib_save_LIBS=$LIBS
8433 cat >conftest.$ac_ext <<_ACEOF
8434 #line 8434 "configure"
8435 #include "confdefs.h"
8437 /* Override any gcc2 internal prototype to avoid an error. */
8441 /* We use char because int might match the return type of a gcc2
8442 builtin and then its argument prototype would still apply. */
8452 rm -f conftest.$ac_objext conftest$ac_exeext
8453 if { (eval echo "$as_me:8453: \"$ac_link\"") >&5
8454 (eval $ac_link) 2>&5
8456 echo "$as_me:8456: \$? = $ac_status" >&5
8457 (exit $ac_status); } &&
8458 { ac_try='test -s conftest$ac_exeext'
8459 { (eval echo "$as_me:8459: \"$ac_try\"") >&5
8462 echo "$as_me:8462: \$? = $ac_status" >&5
8463 (exit $ac_status); }; }; then
8464 ac_cv_lib_gpm_initscr=yes
8466 echo "$as_me: failed program was:" >&5
8467 cat conftest.$ac_ext >&5
8468 ac_cv_lib_gpm_initscr=no
8470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8471 LIBS=$ac_check_lib_save_LIBS
8473 echo "$as_me:8473: result: $ac_cv_lib_gpm_initscr" >&5
8474 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8475 if test $ac_cv_lib_gpm_initscr = yes; then
8476 LIBS="$cf_ncurses_SAVE"
8478 cf_ncurses_LIBS="-lgpm"
8485 # This is only necessary if you are linking against an obsolete
8486 # version of ncurses (but it should do no harm, since it's static).
8487 if test "$cf_nculib_root" = ncurses ; then
8488 echo "$as_me:8488: checking for tgoto in -lmytinfo" >&5
8489 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8490 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8491 echo $ECHO_N "(cached) $ECHO_C" >&6
8493 ac_check_lib_save_LIBS=$LIBS
8494 LIBS="-lmytinfo $LIBS"
8495 cat >conftest.$ac_ext <<_ACEOF
8496 #line 8496 "configure"
8497 #include "confdefs.h"
8499 /* Override any gcc2 internal prototype to avoid an error. */
8503 /* We use char because int might match the return type of a gcc2
8504 builtin and then its argument prototype would still apply. */
8514 rm -f conftest.$ac_objext conftest$ac_exeext
8515 if { (eval echo "$as_me:8515: \"$ac_link\"") >&5
8516 (eval $ac_link) 2>&5
8518 echo "$as_me:8518: \$? = $ac_status" >&5
8519 (exit $ac_status); } &&
8520 { ac_try='test -s conftest$ac_exeext'
8521 { (eval echo "$as_me:8521: \"$ac_try\"") >&5
8524 echo "$as_me:8524: \$? = $ac_status" >&5
8525 (exit $ac_status); }; }; then
8526 ac_cv_lib_mytinfo_tgoto=yes
8528 echo "$as_me: failed program was:" >&5
8529 cat conftest.$ac_ext >&5
8530 ac_cv_lib_mytinfo_tgoto=no
8532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8533 LIBS=$ac_check_lib_save_LIBS
8535 echo "$as_me:8535: result: $ac_cv_lib_mytinfo_tgoto" >&5
8536 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8537 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8538 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8548 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8550 for cf_add_1lib in $cf_add_0lib; do
8551 for cf_add_2lib in $cf_add_libs; do
8552 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8557 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8561 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8567 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8569 for cf_add_1lib in $cf_add_0lib; do
8570 for cf_add_2lib in $cf_add_libs; do
8571 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8576 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8582 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8584 echo "$as_me:8584: checking for initscr" >&5
8585 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8586 if test "${ac_cv_func_initscr+set}" = set; then
8587 echo $ECHO_N "(cached) $ECHO_C" >&6
8589 cat >conftest.$ac_ext <<_ACEOF
8590 #line 8590 "configure"
8591 #include "confdefs.h"
8592 #define initscr autoconf_temporary
8593 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8600 /* We use char because int might match the return type of a gcc2
8601 builtin and then its argument prototype would still apply. */
8602 char initscr (void);
8608 /* The GNU C library defines stubs for functions which it implements
8609 to always fail with ENOSYS. Some functions are actually named
8610 something starting with __ and the normal name is an alias. */
8611 #if defined (__stub_initscr) || defined (__stub___initscr)
8612 #error found stub for initscr
8620 rm -f conftest.$ac_objext conftest$ac_exeext
8621 if { (eval echo "$as_me:8621: \"$ac_link\"") >&5
8622 (eval $ac_link) 2>&5
8624 echo "$as_me:8624: \$? = $ac_status" >&5
8625 (exit $ac_status); } &&
8626 { ac_try='test -s conftest$ac_exeext'
8627 { (eval echo "$as_me:8627: \"$ac_try\"") >&5
8630 echo "$as_me:8630: \$? = $ac_status" >&5
8631 (exit $ac_status); }; }; then
8632 ac_cv_func_initscr=yes
8634 echo "$as_me: failed program was:" >&5
8635 cat conftest.$ac_ext >&5
8636 ac_cv_func_initscr=no
8638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8640 echo "$as_me:8640: result: $ac_cv_func_initscr" >&5
8641 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8642 if test $ac_cv_func_initscr = yes; then
8643 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8646 cf_save_LIBS="$LIBS"
8647 echo "$as_me:8647: checking for initscr in -l$cf_nculib_root" >&5
8648 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8649 LIBS="-l$cf_nculib_root $LIBS"
8650 cat >conftest.$ac_ext <<_ACEOF
8651 #line 8651 "configure"
8652 #include "confdefs.h"
8653 #include <${cf_cv_ncurses_header:-curses.h}>
8662 rm -f conftest.$ac_objext conftest$ac_exeext
8663 if { (eval echo "$as_me:8663: \"$ac_link\"") >&5
8664 (eval $ac_link) 2>&5
8666 echo "$as_me:8666: \$? = $ac_status" >&5
8667 (exit $ac_status); } &&
8668 { ac_try='test -s conftest$ac_exeext'
8669 { (eval echo "$as_me:8669: \"$ac_try\"") >&5
8672 echo "$as_me:8672: \$? = $ac_status" >&5
8673 (exit $ac_status); }; }; then
8674 echo "$as_me:8674: result: yes" >&5
8675 echo "${ECHO_T}yes" >&6
8676 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8679 echo "$as_me: failed program was:" >&5
8680 cat conftest.$ac_ext >&5
8681 echo "$as_me:8681: result: no" >&5
8682 echo "${ECHO_T}no" >&6
8685 cf_library_path_list=""
8686 if test -n "${LDFLAGS}${LIBS}" ; then
8687 for cf_library_path in $LDFLAGS $LIBS
8689 case $cf_library_path in
8691 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8693 test "x$cf_library_path" != "xNONE" && \
8694 test -d "$cf_library_path" && \
8696 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8697 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8698 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8699 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8700 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8701 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"
8704 cf_library_path_list="$cf_library_path_list $cf_search"
8712 test "x$prefix" != "xNONE" && \
8713 test -d "$prefix" && \
8715 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8716 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8717 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8718 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8719 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8720 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8723 for cf_subdir_prefix in \
8732 test "x$cf_subdir_prefix" != "x$prefix" && \
8733 test -d "$cf_subdir_prefix" && \
8734 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8735 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8736 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8737 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8738 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8739 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8740 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"
8745 cf_search="$cf_library_path_list $cf_search"
8747 for cf_libdir in $cf_search
8749 echo "$as_me:8749: checking for -l$cf_nculib_root in $cf_libdir" >&5
8750 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8751 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8752 cat >conftest.$ac_ext <<_ACEOF
8753 #line 8753 "configure"
8754 #include "confdefs.h"
8755 #include <${cf_cv_ncurses_header:-curses.h}>
8764 rm -f conftest.$ac_objext conftest$ac_exeext
8765 if { (eval echo "$as_me:8765: \"$ac_link\"") >&5
8766 (eval $ac_link) 2>&5
8768 echo "$as_me:8768: \$? = $ac_status" >&5
8769 (exit $ac_status); } &&
8770 { ac_try='test -s conftest$ac_exeext'
8771 { (eval echo "$as_me:8771: \"$ac_try\"") >&5
8774 echo "$as_me:8774: \$? = $ac_status" >&5
8775 (exit $ac_status); }; }; then
8776 echo "$as_me:8776: result: yes" >&5
8777 echo "${ECHO_T}yes" >&6
8778 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8781 echo "$as_me: failed program was:" >&5
8782 cat conftest.$ac_ext >&5
8783 echo "$as_me:8783: result: no" >&5
8784 echo "${ECHO_T}no" >&6
8785 LIBS="$cf_save_LIBS"
8787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8795 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8797 if test $cf_found_library = no ; then
8798 { { echo "$as_me:8798: error: Cannot link $cf_nculib_root library" >&5
8799 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8800 { (exit 1); exit 1; }; }
8805 if test -n "$cf_ncurses_LIBS" ; then
8806 echo "$as_me:8806: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8807 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8808 cf_ncurses_SAVE="$LIBS"
8809 for p in $cf_ncurses_LIBS ; do
8810 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8811 if test "$q" != "$LIBS" ; then
8815 cat >conftest.$ac_ext <<_ACEOF
8816 #line 8816 "configure"
8817 #include "confdefs.h"
8818 #include <${cf_cv_ncurses_header:-curses.h}>
8822 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8827 rm -f conftest.$ac_objext conftest$ac_exeext
8828 if { (eval echo "$as_me:8828: \"$ac_link\"") >&5
8829 (eval $ac_link) 2>&5
8831 echo "$as_me:8831: \$? = $ac_status" >&5
8832 (exit $ac_status); } &&
8833 { ac_try='test -s conftest$ac_exeext'
8834 { (eval echo "$as_me:8834: \"$ac_try\"") >&5
8837 echo "$as_me:8837: \$? = $ac_status" >&5
8838 (exit $ac_status); }; }; then
8839 echo "$as_me:8839: result: yes" >&5
8840 echo "${ECHO_T}yes" >&6
8842 echo "$as_me: failed program was:" >&5
8843 cat conftest.$ac_ext >&5
8844 echo "$as_me:8844: result: no" >&5
8845 echo "${ECHO_T}no" >&6
8846 LIBS="$cf_ncurses_SAVE"
8848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8851 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8853 cat >>confdefs.h <<EOF
8854 #define $cf_nculib_ROOT 1
8864 cf_ncuconfig_root=ncurses
8865 cf_have_ncuconfig=no
8867 if test "x${PKG_CONFIG:=none}" != xnone; then
8868 echo "$as_me:8868: checking pkg-config for $cf_ncuconfig_root" >&5
8869 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8870 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8871 echo "$as_me:8871: result: yes" >&5
8872 echo "${ECHO_T}yes" >&6
8874 echo "$as_me:8874: checking if the $cf_ncuconfig_root package files work" >&5
8875 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8876 cf_have_ncuconfig=unknown
8878 cf_save_CFLAGS="$CFLAGS"
8879 cf_save_CPPFLAGS="$CPPFLAGS"
8880 cf_save_LIBS="$LIBS"
8882 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
8883 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
8885 # while -W for passing linker flags is prevalent, it is not "standard".
8886 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8887 # incompatible _and_ non-standard -W option which gives an error. Work
8888 # around that pitfall.
8889 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8895 cf_new_extra_cppflags=
8897 for cf_add_cflags in $cf_pkg_cflags
8899 case $cf_fix_cppflags in
8901 case $cf_add_cflags in
8902 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8903 case $cf_add_cflags in
8905 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8907 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8908 && test -z "${cf_tst_cflags}" \
8909 && cf_fix_cppflags=yes
8911 if test $cf_fix_cppflags = yes ; then
8913 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8914 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8917 elif test "${cf_tst_cflags}" = "\"'" ; then
8919 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8920 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8930 case $cf_add_cflags in
8932 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8934 CPPFLAGS=`echo "$CPPFLAGS" | \
8935 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8936 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8941 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8942 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8949 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8950 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8960 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8962 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8963 && test -z "${cf_tst_cflags}" \
8964 && cf_fix_cppflags=no
8969 if test -n "$cf_new_cflags" ; then
8971 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8972 CFLAGS="${CFLAGS}$cf_new_cflags"
8976 if test -n "$cf_new_cppflags" ; then
8978 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8979 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8983 if test -n "$cf_new_extra_cppflags" ; then
8985 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8986 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8993 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8995 for cf_add_1lib in $cf_add_0lib; do
8996 for cf_add_2lib in $cf_add_libs; do
8997 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9002 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9006 cat >conftest.$ac_ext <<_ACEOF
9007 #line 9007 "configure"
9008 #include "confdefs.h"
9009 #include <${cf_cv_ncurses_header:-curses.h}>
9013 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9018 rm -f conftest.$ac_objext conftest$ac_exeext
9019 if { (eval echo "$as_me:9019: \"$ac_link\"") >&5
9020 (eval $ac_link) 2>&5
9022 echo "$as_me:9022: \$? = $ac_status" >&5
9023 (exit $ac_status); } &&
9024 { ac_try='test -s conftest$ac_exeext'
9025 { (eval echo "$as_me:9025: \"$ac_try\"") >&5
9028 echo "$as_me:9028: \$? = $ac_status" >&5
9029 (exit $ac_status); }; }; then
9030 if test "$cross_compiling" = yes; then
9031 cf_test_ncuconfig=maybe
9033 cat >conftest.$ac_ext <<_ACEOF
9034 #line 9034 "configure"
9035 #include "confdefs.h"
9036 #include <${cf_cv_ncurses_header:-curses.h}>
9038 { char *xx = curses_version(); return (xx == 0); }
9040 rm -f conftest$ac_exeext
9041 if { (eval echo "$as_me:9041: \"$ac_link\"") >&5
9042 (eval $ac_link) 2>&5
9044 echo "$as_me:9044: \$? = $ac_status" >&5
9045 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9046 { (eval echo "$as_me:9046: \"$ac_try\"") >&5
9049 echo "$as_me:9049: \$? = $ac_status" >&5
9050 (exit $ac_status); }; }; then
9051 cf_test_ncuconfig=yes
9053 echo "$as_me: program exited with status $ac_status" >&5
9054 echo "$as_me: failed program was:" >&5
9055 cat conftest.$ac_ext >&5
9056 cf_test_ncuconfig=no
9058 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9061 echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063 cf_test_ncuconfig=no
9065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9067 CFLAGS="$cf_save_CFLAGS"
9068 CPPFLAGS="$cf_save_CPPFLAGS"
9069 LIBS="$cf_save_LIBS"
9071 if test "x$cf_test_ncuconfig" != xyes; then
9072 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9073 cf_pkg_cflags="$cf_temp"
9074 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9075 cf_pkg_libs="$cf_temp"
9083 cf_new_extra_cppflags=
9085 for cf_add_cflags in $cf_pkg_cflags
9087 case $cf_fix_cppflags in
9089 case $cf_add_cflags in
9090 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9091 case $cf_add_cflags in
9093 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9095 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9096 && test -z "${cf_tst_cflags}" \
9097 && cf_fix_cppflags=yes
9099 if test $cf_fix_cppflags = yes ; then
9101 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9102 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9105 elif test "${cf_tst_cflags}" = "\"'" ; then
9107 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9108 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9118 case $cf_add_cflags in
9120 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9122 CPPFLAGS=`echo "$CPPFLAGS" | \
9123 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9124 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9129 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9130 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9137 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9138 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9145 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9146 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9148 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9150 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9151 && test -z "${cf_tst_cflags}" \
9152 && cf_fix_cppflags=no
9157 if test -n "$cf_new_cflags" ; then
9159 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9160 CFLAGS="${CFLAGS}$cf_new_cflags"
9164 if test -n "$cf_new_cppflags" ; then
9166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9167 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9171 if test -n "$cf_new_extra_cppflags" ; then
9173 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9174 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9181 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9183 for cf_add_1lib in $cf_add_0lib; do
9184 for cf_add_2lib in $cf_add_libs; do
9185 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9190 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9194 cat >conftest.$ac_ext <<_ACEOF
9195 #line 9195 "configure"
9196 #include "confdefs.h"
9197 #include <${cf_cv_ncurses_header:-curses.h}>
9201 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9206 rm -f conftest.$ac_objext conftest$ac_exeext
9207 if { (eval echo "$as_me:9207: \"$ac_link\"") >&5
9208 (eval $ac_link) 2>&5
9210 echo "$as_me:9210: \$? = $ac_status" >&5
9211 (exit $ac_status); } &&
9212 { ac_try='test -s conftest$ac_exeext'
9213 { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9216 echo "$as_me:9216: \$? = $ac_status" >&5
9217 (exit $ac_status); }; }; then
9218 if test "$cross_compiling" = yes; then
9219 cf_have_ncuconfig=maybe
9221 cat >conftest.$ac_ext <<_ACEOF
9222 #line 9222 "configure"
9223 #include "confdefs.h"
9224 #include <${cf_cv_ncurses_header:-curses.h}>
9226 { char *xx = curses_version(); return (xx == 0); }
9228 rm -f conftest$ac_exeext
9229 if { (eval echo "$as_me:9229: \"$ac_link\"") >&5
9230 (eval $ac_link) 2>&5
9232 echo "$as_me:9232: \$? = $ac_status" >&5
9233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9234 { (eval echo "$as_me:9234: \"$ac_try\"") >&5
9237 echo "$as_me:9237: \$? = $ac_status" >&5
9238 (exit $ac_status); }; }; then
9239 cf_have_ncuconfig=yes
9241 echo "$as_me: program exited with status $ac_status" >&5
9242 echo "$as_me: failed program was:" >&5
9243 cat conftest.$ac_ext >&5
9244 cf_have_ncuconfig=no
9246 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9249 echo "$as_me: failed program was:" >&5
9250 cat conftest.$ac_ext >&5
9251 cf_have_ncuconfig=no
9253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9254 echo "$as_me:9254: result: $cf_have_ncuconfig" >&5
9255 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9256 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9257 if test "$cf_have_ncuconfig" != "yes"
9259 CPPFLAGS="$cf_save_CPPFLAGS"
9260 LIBS="$cf_save_LIBS"
9261 NCURSES_CONFIG_PKG=none
9264 cat >>confdefs.h <<\EOF
9268 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9270 echo "$as_me:9270: checking for terminfo header" >&5
9271 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9272 if test "${cf_cv_term_header+set}" = set; then
9273 echo $ECHO_N "(cached) $ECHO_C" >&6
9276 case ${cf_cv_ncurses_header} in
9277 (*/ncurses.h|*/ncursesw.h)
9278 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9281 cf_term_header=term.h
9285 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9287 cat >conftest.$ac_ext <<_ACEOF
9288 #line 9288 "configure"
9289 #include "confdefs.h"
9291 #include <${cf_cv_ncurses_header:-curses.h}>
9297 int x = auto_left_margin; (void)x
9302 rm -f conftest.$ac_objext
9303 if { (eval echo "$as_me:9303: \"$ac_compile\"") >&5
9304 (eval $ac_compile) 2>&5
9306 echo "$as_me:9306: \$? = $ac_status" >&5
9307 (exit $ac_status); } &&
9308 { ac_try='test -s conftest.$ac_objext'
9309 { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9312 echo "$as_me:9312: \$? = $ac_status" >&5
9313 (exit $ac_status); }; }; then
9315 cf_cv_term_header="$cf_test"
9317 echo "$as_me: failed program was:" >&5
9318 cat conftest.$ac_ext >&5
9320 cf_cv_term_header=unknown
9323 rm -f conftest.$ac_objext conftest.$ac_ext
9324 test "$cf_cv_term_header" != unknown && break
9328 echo "$as_me:9328: result: $cf_cv_term_header" >&5
9329 echo "${ECHO_T}$cf_cv_term_header" >&6
9331 # Set definitions to allow ifdef'ing to accommodate subdirectories
9333 case $cf_cv_term_header in
9336 cat >>confdefs.h <<\EOF
9337 #define HAVE_TERM_H 1
9343 case $cf_cv_term_header in
9346 cat >>confdefs.h <<\EOF
9347 #define HAVE_NCURSES_TERM_H 1
9353 cat >>confdefs.h <<\EOF
9354 #define HAVE_NCURSESW_TERM_H 1
9363 echo "$as_me:9363: result: no" >&5
9364 echo "${ECHO_T}no" >&6
9365 NCURSES_CONFIG_PKG=none
9368 NCURSES_CONFIG_PKG=none
9371 if test "x$cf_have_ncuconfig" = "xno"; then
9372 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9374 if test -n "$ac_tool_prefix"; then
9375 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9377 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9378 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9379 echo "$as_me:9379: checking for $ac_word" >&5
9380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9381 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9382 echo $ECHO_N "(cached) $ECHO_C" >&6
9384 if test -n "$NCURSES_CONFIG"; then
9385 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9387 ac_save_IFS=$IFS; IFS=$ac_path_separator
9389 for ac_dir in $ac_dummy; do
9391 test -z "$ac_dir" && ac_dir=.
9392 $as_executable_p "$ac_dir/$ac_word" || continue
9393 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9394 echo "$as_me:9394: found $ac_dir/$ac_word" >&5
9400 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9401 if test -n "$NCURSES_CONFIG"; then
9402 echo "$as_me:9402: result: $NCURSES_CONFIG" >&5
9403 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9405 echo "$as_me:9405: result: no" >&5
9406 echo "${ECHO_T}no" >&6
9409 test -n "$NCURSES_CONFIG" && break
9412 if test -z "$NCURSES_CONFIG"; then
9413 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9414 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9416 # Extract the first word of "$ac_prog", so it can be a program name with args.
9417 set dummy $ac_prog; ac_word=$2
9418 echo "$as_me:9418: checking for $ac_word" >&5
9419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9420 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9421 echo $ECHO_N "(cached) $ECHO_C" >&6
9423 if test -n "$ac_ct_NCURSES_CONFIG"; then
9424 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9426 ac_save_IFS=$IFS; IFS=$ac_path_separator
9428 for ac_dir in $ac_dummy; do
9430 test -z "$ac_dir" && ac_dir=.
9431 $as_executable_p "$ac_dir/$ac_word" || continue
9432 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9433 echo "$as_me:9433: found $ac_dir/$ac_word" >&5
9439 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9440 if test -n "$ac_ct_NCURSES_CONFIG"; then
9441 echo "$as_me:9441: result: $ac_ct_NCURSES_CONFIG" >&5
9442 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9444 echo "$as_me:9444: result: no" >&5
9445 echo "${ECHO_T}no" >&6
9448 test -n "$ac_ct_NCURSES_CONFIG" && break
9450 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9452 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9455 if test "$NCURSES_CONFIG" != none ; then
9460 cf_new_extra_cppflags=
9462 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9464 case $cf_fix_cppflags in
9466 case $cf_add_cflags in
9467 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9468 case $cf_add_cflags in
9470 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9472 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9473 && test -z "${cf_tst_cflags}" \
9474 && cf_fix_cppflags=yes
9476 if test $cf_fix_cppflags = yes ; then
9478 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9479 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9482 elif test "${cf_tst_cflags}" = "\"'" ; then
9484 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9485 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9495 case $cf_add_cflags in
9497 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9499 CPPFLAGS=`echo "$CPPFLAGS" | \
9500 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9501 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9506 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9507 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9514 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9515 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9522 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9523 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9525 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9528 && test -z "${cf_tst_cflags}" \
9529 && cf_fix_cppflags=no
9534 if test -n "$cf_new_cflags" ; then
9536 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9537 CFLAGS="${CFLAGS}$cf_new_cflags"
9541 if test -n "$cf_new_cppflags" ; then
9543 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9544 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9548 if test -n "$cf_new_extra_cppflags" ; then
9550 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9551 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9558 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9560 for cf_add_1lib in $cf_add_0lib; do
9561 for cf_add_2lib in $cf_add_libs; do
9562 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9571 # even with config script, some packages use no-override for curses.h
9573 echo "$as_me:9573: checking if we have identified curses headers" >&5
9574 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9575 if test "${cf_cv_ncurses_header+set}" = set; then
9576 echo $ECHO_N "(cached) $ECHO_C" >&6
9579 cf_cv_ncurses_header=none
9581 ncurses.h ncurses/ncurses.h \
9582 curses.h ncurses/curses.h
9584 cat >conftest.$ac_ext <<_ACEOF
9585 #line 9585 "configure"
9586 #include "confdefs.h"
9587 #include <${cf_header}>
9591 initscr(); tgoto("?", 0,0)
9596 rm -f conftest.$ac_objext
9597 if { (eval echo "$as_me:9597: \"$ac_compile\"") >&5
9598 (eval $ac_compile) 2>&5
9600 echo "$as_me:9600: \$? = $ac_status" >&5
9601 (exit $ac_status); } &&
9602 { ac_try='test -s conftest.$ac_objext'
9603 { (eval echo "$as_me:9603: \"$ac_try\"") >&5
9606 echo "$as_me:9606: \$? = $ac_status" >&5
9607 (exit $ac_status); }; }; then
9608 cf_cv_ncurses_header=$cf_header; break
9610 echo "$as_me: failed program was:" >&5
9611 cat conftest.$ac_ext >&5
9613 rm -f conftest.$ac_objext conftest.$ac_ext
9617 echo "$as_me:9617: result: $cf_cv_ncurses_header" >&5
9618 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9620 if test "$cf_cv_ncurses_header" = none ; then
9621 { { echo "$as_me:9621: error: No curses header-files found" >&5
9622 echo "$as_me: error: No curses header-files found" >&2;}
9623 { (exit 1); exit 1; }; }
9626 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9628 for ac_header in $cf_cv_ncurses_header
9630 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9631 echo "$as_me:9631: checking for $ac_header" >&5
9632 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9633 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9634 echo $ECHO_N "(cached) $ECHO_C" >&6
9636 cat >conftest.$ac_ext <<_ACEOF
9637 #line 9637 "configure"
9638 #include "confdefs.h"
9639 #include <$ac_header>
9641 if { (eval echo "$as_me:9641: \"$ac_cpp conftest.$ac_ext\"") >&5
9642 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9644 egrep -v '^ *\+' conftest.er1 >conftest.err
9646 cat conftest.err >&5
9647 echo "$as_me:9647: \$? = $ac_status" >&5
9648 (exit $ac_status); } >/dev/null; then
9649 if test -s conftest.err; then
9650 ac_cpp_err=$ac_c_preproc_warn_flag
9657 if test -z "$ac_cpp_err"; then
9658 eval "$as_ac_Header=yes"
9660 echo "$as_me: failed program was:" >&5
9661 cat conftest.$ac_ext >&5
9662 eval "$as_ac_Header=no"
9664 rm -f conftest.err conftest.$ac_ext
9666 echo "$as_me:9666: result: `eval echo '${'$as_ac_Header'}'`" >&5
9667 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9668 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9669 cat >>confdefs.h <<EOF
9670 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9676 cat >>confdefs.h <<\EOF
9680 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9682 cat >>confdefs.h <<EOF
9683 #define $cf_nculib_ROOT 1
9686 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9690 cf_ncuhdr_root=ncurses
9692 test -n "$cf_cv_curses_dir" && \
9693 test "$cf_cv_curses_dir" != "no" && { \
9695 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9696 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9698 while test $cf_add_incdir != /usr/include
9700 if test -d $cf_add_incdir
9703 if test -n "$CFLAGS$CPPFLAGS" ; then
9704 # a loop is needed to ensure we can add subdirs of existing dirs
9705 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9706 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9707 cf_have_incdir=yes; break
9712 if test "$cf_have_incdir" = no ; then
9713 if test "$cf_add_incdir" = /usr/local/include ; then
9714 if test "$GCC" = yes
9716 cf_save_CPPFLAGS=$CPPFLAGS
9718 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9719 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9721 cat >conftest.$ac_ext <<_ACEOF
9722 #line 9722 "configure"
9723 #include "confdefs.h"
9733 rm -f conftest.$ac_objext
9734 if { (eval echo "$as_me:9734: \"$ac_compile\"") >&5
9735 (eval $ac_compile) 2>&5
9737 echo "$as_me:9737: \$? = $ac_status" >&5
9738 (exit $ac_status); } &&
9739 { ac_try='test -s conftest.$ac_objext'
9740 { (eval echo "$as_me:9740: \"$ac_try\"") >&5
9743 echo "$as_me:9743: \$? = $ac_status" >&5
9744 (exit $ac_status); }; }; then
9747 echo "$as_me: failed program was:" >&5
9748 cat conftest.$ac_ext >&5
9751 rm -f conftest.$ac_objext conftest.$ac_ext
9752 CPPFLAGS=$cf_save_CPPFLAGS
9757 if test "$cf_have_incdir" = no ; then
9758 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9760 echo "${as_me:-configure}:9760: testing adding $cf_add_incdir to include-path ..." 1>&5
9762 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9764 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9765 test "$cf_top_incdir" = "$cf_add_incdir" && break
9766 cf_add_incdir="$cf_top_incdir"
9779 echo "$as_me:9779: checking for $cf_ncuhdr_root header in include-path" >&5
9780 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9781 if test "${cf_cv_ncurses_h+set}" = set; then
9782 echo $ECHO_N "(cached) $ECHO_C" >&6
9785 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9786 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9787 for cf_header in $cf_header_list
9790 cat >conftest.$ac_ext <<_ACEOF
9791 #line 9791 "configure"
9792 #include "confdefs.h"
9794 #include <$cf_header>
9799 #ifdef NCURSES_VERSION
9801 printf("%s\n", NCURSES_VERSION);
9814 rm -f conftest.$ac_objext
9815 if { (eval echo "$as_me:9815: \"$ac_compile\"") >&5
9816 (eval $ac_compile) 2>&5
9818 echo "$as_me:9818: \$? = $ac_status" >&5
9819 (exit $ac_status); } &&
9820 { ac_try='test -s conftest.$ac_objext'
9821 { (eval echo "$as_me:9821: \"$ac_try\"") >&5
9824 echo "$as_me:9824: \$? = $ac_status" >&5
9825 (exit $ac_status); }; }; then
9826 cf_cv_ncurses_h=$cf_header
9829 echo "$as_me: failed program was:" >&5
9830 cat conftest.$ac_ext >&5
9833 rm -f conftest.$ac_objext conftest.$ac_ext
9835 test "$cf_cv_ncurses_h" != no && break
9839 echo "$as_me:9839: result: $cf_cv_ncurses_h" >&5
9840 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9842 if test "$cf_cv_ncurses_h" != no ; then
9843 cf_cv_ncurses_header=$cf_cv_ncurses_h
9846 echo "$as_me:9846: checking for $cf_ncuhdr_root include-path" >&5
9847 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9848 if test "${cf_cv_ncurses_h2+set}" = set; then
9849 echo $ECHO_N "(cached) $ECHO_C" >&6
9852 test -n "$verbose" && echo
9856 # collect the current set of include-directories from compiler flags
9857 cf_header_path_list=""
9858 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9859 for cf_header_path in $CPPFLAGS $CFLAGS
9861 case $cf_header_path in
9863 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9865 test "x$cf_header_path" != "xNONE" && \
9866 test -d "$cf_header_path" && \
9868 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9869 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9870 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9871 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9872 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9873 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"
9876 cf_header_path_list="$cf_header_path_list $cf_search"
9882 # add the variations for the package we are looking for
9886 test "x$prefix" != "xNONE" && \
9887 test -d "$prefix" && \
9889 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9890 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9891 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9892 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9893 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9894 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9897 for cf_subdir_prefix in \
9906 test "x$cf_subdir_prefix" != "x$prefix" && \
9907 test -d "$cf_subdir_prefix" && \
9908 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9909 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9910 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9911 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9912 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9913 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9914 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"
9919 test "$includedir" != NONE && \
9920 test "$includedir" != "/usr/include" && \
9921 test -d "$includedir" && {
9922 test -d $includedir && cf_search="$cf_search $includedir"
9923 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9926 test "$oldincludedir" != NONE && \
9927 test "$oldincludedir" != "/usr/include" && \
9928 test -d "$oldincludedir" && {
9929 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9930 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9933 cf_search="$cf_search $cf_header_path_list"
9935 test -n "$verbose" && echo search path $cf_search
9936 cf_save2_CPPFLAGS="$CPPFLAGS"
9937 for cf_incdir in $cf_search
9940 if test -n "$cf_incdir" ; then
9941 for cf_add_incdir in $cf_incdir
9943 while test $cf_add_incdir != /usr/include
9945 if test -d $cf_add_incdir
9948 if test -n "$CFLAGS$CPPFLAGS" ; then
9949 # a loop is needed to ensure we can add subdirs of existing dirs
9950 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9951 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9952 cf_have_incdir=yes; break
9957 if test "$cf_have_incdir" = no ; then
9958 if test "$cf_add_incdir" = /usr/local/include ; then
9959 if test "$GCC" = yes
9961 cf_save_CPPFLAGS=$CPPFLAGS
9963 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9964 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9966 cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9978 rm -f conftest.$ac_objext
9979 if { (eval echo "$as_me:9979: \"$ac_compile\"") >&5
9980 (eval $ac_compile) 2>&5
9982 echo "$as_me:9982: \$? = $ac_status" >&5
9983 (exit $ac_status); } &&
9984 { ac_try='test -s conftest.$ac_objext'
9985 { (eval echo "$as_me:9985: \"$ac_try\"") >&5
9988 echo "$as_me:9988: \$? = $ac_status" >&5
9989 (exit $ac_status); }; }; then
9992 echo "$as_me: failed program was:" >&5
9993 cat conftest.$ac_ext >&5
9996 rm -f conftest.$ac_objext conftest.$ac_ext
9997 CPPFLAGS=$cf_save_CPPFLAGS
10002 if test "$cf_have_incdir" = no ; then
10003 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10005 echo "${as_me:-configure}:10005: testing adding $cf_add_incdir to include-path ..." 1>&5
10007 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10009 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10010 test "$cf_top_incdir" = "$cf_add_incdir" && break
10011 cf_add_incdir="$cf_top_incdir"
10027 cat >conftest.$ac_ext <<_ACEOF
10028 #line 10028 "configure"
10029 #include "confdefs.h"
10031 #include <$cf_header>
10036 #ifdef NCURSES_VERSION
10038 printf("%s\n", NCURSES_VERSION);
10051 rm -f conftest.$ac_objext
10052 if { (eval echo "$as_me:10052: \"$ac_compile\"") >&5
10053 (eval $ac_compile) 2>&5
10055 echo "$as_me:10055: \$? = $ac_status" >&5
10056 (exit $ac_status); } &&
10057 { ac_try='test -s conftest.$ac_objext'
10058 { (eval echo "$as_me:10058: \"$ac_try\"") >&5
10059 (eval $ac_try) 2>&5
10061 echo "$as_me:10061: \$? = $ac_status" >&5
10062 (exit $ac_status); }; }; then
10063 cf_cv_ncurses_h2=$cf_header
10066 echo "$as_me: failed program was:" >&5
10067 cat conftest.$ac_ext >&5
10068 cf_cv_ncurses_h2=no
10070 rm -f conftest.$ac_objext conftest.$ac_ext
10072 if test "$cf_cv_ncurses_h2" != no ; then
10073 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10074 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10077 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10079 CPPFLAGS="$cf_save2_CPPFLAGS"
10080 test "$cf_cv_ncurses_h2" != no && break
10082 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10082: error: not found" >&5
10083 echo "$as_me: error: not found" >&2;}
10084 { (exit 1); exit 1; }; }
10087 echo "$as_me:10087: result: $cf_cv_ncurses_h2" >&5
10088 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10090 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10091 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10092 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10093 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10096 if test -n "$cf_1st_incdir" ; then
10097 for cf_add_incdir in $cf_1st_incdir
10099 while test $cf_add_incdir != /usr/include
10101 if test -d $cf_add_incdir
10104 if test -n "$CFLAGS$CPPFLAGS" ; then
10105 # a loop is needed to ensure we can add subdirs of existing dirs
10106 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10107 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10108 cf_have_incdir=yes; break
10113 if test "$cf_have_incdir" = no ; then
10114 if test "$cf_add_incdir" = /usr/local/include ; then
10115 if test "$GCC" = yes
10117 cf_save_CPPFLAGS=$CPPFLAGS
10119 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10120 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10122 cat >conftest.$ac_ext <<_ACEOF
10123 #line 10123 "configure"
10124 #include "confdefs.h"
10134 rm -f conftest.$ac_objext
10135 if { (eval echo "$as_me:10135: \"$ac_compile\"") >&5
10136 (eval $ac_compile) 2>&5
10138 echo "$as_me:10138: \$? = $ac_status" >&5
10139 (exit $ac_status); } &&
10140 { ac_try='test -s conftest.$ac_objext'
10141 { (eval echo "$as_me:10141: \"$ac_try\"") >&5
10142 (eval $ac_try) 2>&5
10144 echo "$as_me:10144: \$? = $ac_status" >&5
10145 (exit $ac_status); }; }; then
10148 echo "$as_me: failed program was:" >&5
10149 cat conftest.$ac_ext >&5
10152 rm -f conftest.$ac_objext conftest.$ac_ext
10153 CPPFLAGS=$cf_save_CPPFLAGS
10158 if test "$cf_have_incdir" = no ; then
10159 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10161 echo "${as_me:-configure}:10161: testing adding $cf_add_incdir to include-path ..." 1>&5
10163 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10165 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10166 test "$cf_top_incdir" = "$cf_add_incdir" && break
10167 cf_add_incdir="$cf_top_incdir"
10180 # Set definitions to allow ifdef'ing for ncurses.h
10182 case $cf_cv_ncurses_header in
10185 cat >>confdefs.h <<\EOF
10186 #define HAVE_NCURSES_H 1
10192 case $cf_cv_ncurses_header in
10193 (ncurses/curses.h|ncurses/ncurses.h)
10195 cat >>confdefs.h <<\EOF
10196 #define HAVE_NCURSES_NCURSES_H 1
10200 (ncursesw/curses.h|ncursesw/ncurses.h)
10202 cat >>confdefs.h <<\EOF
10203 #define HAVE_NCURSESW_NCURSES_H 1
10209 echo "$as_me:10209: checking for terminfo header" >&5
10210 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10211 if test "${cf_cv_term_header+set}" = set; then
10212 echo $ECHO_N "(cached) $ECHO_C" >&6
10215 case ${cf_cv_ncurses_header} in
10216 (*/ncurses.h|*/ncursesw.h)
10217 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10220 cf_term_header=term.h
10224 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10226 cat >conftest.$ac_ext <<_ACEOF
10227 #line 10227 "configure"
10228 #include "confdefs.h"
10230 #include <${cf_cv_ncurses_header:-curses.h}>
10231 #include <$cf_test>
10236 int x = auto_left_margin; (void)x
10241 rm -f conftest.$ac_objext
10242 if { (eval echo "$as_me:10242: \"$ac_compile\"") >&5
10243 (eval $ac_compile) 2>&5
10245 echo "$as_me:10245: \$? = $ac_status" >&5
10246 (exit $ac_status); } &&
10247 { ac_try='test -s conftest.$ac_objext'
10248 { (eval echo "$as_me:10248: \"$ac_try\"") >&5
10249 (eval $ac_try) 2>&5
10251 echo "$as_me:10251: \$? = $ac_status" >&5
10252 (exit $ac_status); }; }; then
10254 cf_cv_term_header="$cf_test"
10256 echo "$as_me: failed program was:" >&5
10257 cat conftest.$ac_ext >&5
10259 cf_cv_term_header=unknown
10262 rm -f conftest.$ac_objext conftest.$ac_ext
10263 test "$cf_cv_term_header" != unknown && break
10267 echo "$as_me:10267: result: $cf_cv_term_header" >&5
10268 echo "${ECHO_T}$cf_cv_term_header" >&6
10270 # Set definitions to allow ifdef'ing to accommodate subdirectories
10272 case $cf_cv_term_header in
10275 cat >>confdefs.h <<\EOF
10276 #define HAVE_TERM_H 1
10282 case $cf_cv_term_header in
10285 cat >>confdefs.h <<\EOF
10286 #define HAVE_NCURSES_TERM_H 1
10292 cat >>confdefs.h <<\EOF
10293 #define HAVE_NCURSESW_TERM_H 1
10299 # some applications need this, but should check for NCURSES_VERSION
10301 cat >>confdefs.h <<\EOF
10305 echo "$as_me:10305: checking for ncurses version" >&5
10306 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10307 if test "${cf_cv_ncurses_version+set}" = set; then
10308 echo $ECHO_N "(cached) $ECHO_C" >&6
10311 cf_cv_ncurses_version=no
10314 if test "$cross_compiling" = yes; then
10316 # This will not work if the preprocessor splits the line after the
10317 # Autoconf token. The 'unproto' program does that.
10318 cat > conftest.$ac_ext <<EOF
10319 #include <${cf_cv_ncurses_header:-curses.h}>
10321 #ifdef NCURSES_VERSION
10322 Autoconf NCURSES_VERSION
10330 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10331 { (eval echo "$as_me:10331: \"$cf_try\"") >&5
10332 (eval $cf_try) 2>&5
10334 echo "$as_me:10334: \$? = $ac_status" >&5
10335 (exit $ac_status); }
10336 if test -f conftest.out ; then
10337 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10338 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10343 cat >conftest.$ac_ext <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10347 #include <${cf_cv_ncurses_header:-curses.h}>
10351 FILE *fp = fopen("$cf_tempfile", "w");
10352 #ifdef NCURSES_VERSION
10353 # ifdef NCURSES_VERSION_PATCH
10354 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10356 fprintf(fp, "%s\n", NCURSES_VERSION);
10359 # ifdef __NCURSES_H
10360 fprintf(fp, "old\n");
10365 ${cf_cv_main_return:-return}(0);
10368 rm -f conftest$ac_exeext
10369 if { (eval echo "$as_me:10369: \"$ac_link\"") >&5
10370 (eval $ac_link) 2>&5
10372 echo "$as_me:10372: \$? = $ac_status" >&5
10373 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10374 { (eval echo "$as_me:10374: \"$ac_try\"") >&5
10375 (eval $ac_try) 2>&5
10377 echo "$as_me:10377: \$? = $ac_status" >&5
10378 (exit $ac_status); }; }; then
10380 cf_cv_ncurses_version=`cat $cf_tempfile`
10382 echo "$as_me: program exited with status $ac_status" >&5
10383 echo "$as_me: failed program was:" >&5
10384 cat conftest.$ac_ext >&5
10386 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10391 echo "$as_me:10391: result: $cf_cv_ncurses_version" >&5
10392 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10393 test "$cf_cv_ncurses_version" = no ||
10394 cat >>confdefs.h <<\EOF
10398 cf_nculib_root=ncurses
10399 # This works, except for the special case where we find gpm, but
10400 # ncurses is in a nonstandard location via $LIBS, and we really want
10403 cf_ncurses_SAVE="$LIBS"
10404 echo "$as_me:10404: checking for Gpm_Open in -lgpm" >&5
10405 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10406 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10407 echo $ECHO_N "(cached) $ECHO_C" >&6
10409 ac_check_lib_save_LIBS=$LIBS
10411 cat >conftest.$ac_ext <<_ACEOF
10412 #line 10412 "configure"
10413 #include "confdefs.h"
10415 /* Override any gcc2 internal prototype to avoid an error. */
10419 /* We use char because int might match the return type of a gcc2
10420 builtin and then its argument prototype would still apply. */
10430 rm -f conftest.$ac_objext conftest$ac_exeext
10431 if { (eval echo "$as_me:10431: \"$ac_link\"") >&5
10432 (eval $ac_link) 2>&5
10434 echo "$as_me:10434: \$? = $ac_status" >&5
10435 (exit $ac_status); } &&
10436 { ac_try='test -s conftest$ac_exeext'
10437 { (eval echo "$as_me:10437: \"$ac_try\"") >&5
10438 (eval $ac_try) 2>&5
10440 echo "$as_me:10440: \$? = $ac_status" >&5
10441 (exit $ac_status); }; }; then
10442 ac_cv_lib_gpm_Gpm_Open=yes
10444 echo "$as_me: failed program was:" >&5
10445 cat conftest.$ac_ext >&5
10446 ac_cv_lib_gpm_Gpm_Open=no
10448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10449 LIBS=$ac_check_lib_save_LIBS
10451 echo "$as_me:10451: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10452 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10453 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10454 echo "$as_me:10454: checking for initscr in -lgpm" >&5
10455 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10456 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10457 echo $ECHO_N "(cached) $ECHO_C" >&6
10459 ac_check_lib_save_LIBS=$LIBS
10461 cat >conftest.$ac_ext <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10465 /* Override any gcc2 internal prototype to avoid an error. */
10469 /* We use char because int might match the return type of a gcc2
10470 builtin and then its argument prototype would still apply. */
10480 rm -f conftest.$ac_objext conftest$ac_exeext
10481 if { (eval echo "$as_me:10481: \"$ac_link\"") >&5
10482 (eval $ac_link) 2>&5
10484 echo "$as_me:10484: \$? = $ac_status" >&5
10485 (exit $ac_status); } &&
10486 { ac_try='test -s conftest$ac_exeext'
10487 { (eval echo "$as_me:10487: \"$ac_try\"") >&5
10488 (eval $ac_try) 2>&5
10490 echo "$as_me:10490: \$? = $ac_status" >&5
10491 (exit $ac_status); }; }; then
10492 ac_cv_lib_gpm_initscr=yes
10494 echo "$as_me: failed program was:" >&5
10495 cat conftest.$ac_ext >&5
10496 ac_cv_lib_gpm_initscr=no
10498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10499 LIBS=$ac_check_lib_save_LIBS
10501 echo "$as_me:10501: result: $ac_cv_lib_gpm_initscr" >&5
10502 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10503 if test $ac_cv_lib_gpm_initscr = yes; then
10504 LIBS="$cf_ncurses_SAVE"
10506 cf_ncurses_LIBS="-lgpm"
10513 # This is only necessary if you are linking against an obsolete
10514 # version of ncurses (but it should do no harm, since it's static).
10515 if test "$cf_nculib_root" = ncurses ; then
10516 echo "$as_me:10516: checking for tgoto in -lmytinfo" >&5
10517 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10518 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10519 echo $ECHO_N "(cached) $ECHO_C" >&6
10521 ac_check_lib_save_LIBS=$LIBS
10522 LIBS="-lmytinfo $LIBS"
10523 cat >conftest.$ac_ext <<_ACEOF
10524 #line 10524 "configure"
10525 #include "confdefs.h"
10527 /* Override any gcc2 internal prototype to avoid an error. */
10531 /* We use char because int might match the return type of a gcc2
10532 builtin and then its argument prototype would still apply. */
10542 rm -f conftest.$ac_objext conftest$ac_exeext
10543 if { (eval echo "$as_me:10543: \"$ac_link\"") >&5
10544 (eval $ac_link) 2>&5
10546 echo "$as_me:10546: \$? = $ac_status" >&5
10547 (exit $ac_status); } &&
10548 { ac_try='test -s conftest$ac_exeext'
10549 { (eval echo "$as_me:10549: \"$ac_try\"") >&5
10550 (eval $ac_try) 2>&5
10552 echo "$as_me:10552: \$? = $ac_status" >&5
10553 (exit $ac_status); }; }; then
10554 ac_cv_lib_mytinfo_tgoto=yes
10556 echo "$as_me: failed program was:" >&5
10557 cat conftest.$ac_ext >&5
10558 ac_cv_lib_mytinfo_tgoto=no
10560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10561 LIBS=$ac_check_lib_save_LIBS
10563 echo "$as_me:10563: result: $ac_cv_lib_mytinfo_tgoto" >&5
10564 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10565 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10566 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10573 cf_add_libs="$LIBS"
10576 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10577 # filter duplicates
10578 for cf_add_1lib in $cf_add_0lib; do
10579 for cf_add_2lib in $cf_add_libs; do
10580 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10585 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10587 LIBS="$cf_add_libs"
10589 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10592 cf_add_libs="$LIBS"
10595 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10596 # filter duplicates
10597 for cf_add_1lib in $cf_add_0lib; do
10598 for cf_add_2lib in $cf_add_libs; do
10599 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10604 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10606 LIBS="$cf_add_libs"
10610 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10612 echo "$as_me:10612: checking for initscr" >&5
10613 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10614 if test "${ac_cv_func_initscr+set}" = set; then
10615 echo $ECHO_N "(cached) $ECHO_C" >&6
10617 cat >conftest.$ac_ext <<_ACEOF
10618 #line 10618 "configure"
10619 #include "confdefs.h"
10620 #define initscr autoconf_temporary
10621 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10628 /* We use char because int might match the return type of a gcc2
10629 builtin and then its argument prototype would still apply. */
10630 char initscr (void);
10636 /* The GNU C library defines stubs for functions which it implements
10637 to always fail with ENOSYS. Some functions are actually named
10638 something starting with __ and the normal name is an alias. */
10639 #if defined (__stub_initscr) || defined (__stub___initscr)
10640 #error found stub for initscr
10648 rm -f conftest.$ac_objext conftest$ac_exeext
10649 if { (eval echo "$as_me:10649: \"$ac_link\"") >&5
10650 (eval $ac_link) 2>&5
10652 echo "$as_me:10652: \$? = $ac_status" >&5
10653 (exit $ac_status); } &&
10654 { ac_try='test -s conftest$ac_exeext'
10655 { (eval echo "$as_me:10655: \"$ac_try\"") >&5
10656 (eval $ac_try) 2>&5
10658 echo "$as_me:10658: \$? = $ac_status" >&5
10659 (exit $ac_status); }; }; then
10660 ac_cv_func_initscr=yes
10662 echo "$as_me: failed program was:" >&5
10663 cat conftest.$ac_ext >&5
10664 ac_cv_func_initscr=no
10666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10668 echo "$as_me:10668: result: $ac_cv_func_initscr" >&5
10669 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10670 if test $ac_cv_func_initscr = yes; then
10671 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10674 cf_save_LIBS="$LIBS"
10675 echo "$as_me:10675: checking for initscr in -l$cf_nculib_root" >&5
10676 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10677 LIBS="-l$cf_nculib_root $LIBS"
10678 cat >conftest.$ac_ext <<_ACEOF
10679 #line 10679 "configure"
10680 #include "confdefs.h"
10681 #include <${cf_cv_ncurses_header:-curses.h}>
10690 rm -f conftest.$ac_objext conftest$ac_exeext
10691 if { (eval echo "$as_me:10691: \"$ac_link\"") >&5
10692 (eval $ac_link) 2>&5
10694 echo "$as_me:10694: \$? = $ac_status" >&5
10695 (exit $ac_status); } &&
10696 { ac_try='test -s conftest$ac_exeext'
10697 { (eval echo "$as_me:10697: \"$ac_try\"") >&5
10698 (eval $ac_try) 2>&5
10700 echo "$as_me:10700: \$? = $ac_status" >&5
10701 (exit $ac_status); }; }; then
10702 echo "$as_me:10702: result: yes" >&5
10703 echo "${ECHO_T}yes" >&6
10704 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10707 echo "$as_me: failed program was:" >&5
10708 cat conftest.$ac_ext >&5
10709 echo "$as_me:10709: result: no" >&5
10710 echo "${ECHO_T}no" >&6
10713 cf_library_path_list=""
10714 if test -n "${LDFLAGS}${LIBS}" ; then
10715 for cf_library_path in $LDFLAGS $LIBS
10717 case $cf_library_path in
10719 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10721 test "x$cf_library_path" != "xNONE" && \
10722 test -d "$cf_library_path" && \
10724 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10725 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10726 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10727 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10728 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10729 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"
10732 cf_library_path_list="$cf_library_path_list $cf_search"
10740 test "x$prefix" != "xNONE" && \
10741 test -d "$prefix" && \
10743 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10744 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10745 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10746 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10747 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10748 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10751 for cf_subdir_prefix in \
10760 test "x$cf_subdir_prefix" != "x$prefix" && \
10761 test -d "$cf_subdir_prefix" && \
10762 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10763 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10764 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10765 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10766 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10767 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10768 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"
10773 cf_search="$cf_library_path_list $cf_search"
10775 for cf_libdir in $cf_search
10777 echo "$as_me:10777: checking for -l$cf_nculib_root in $cf_libdir" >&5
10778 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10779 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10780 cat >conftest.$ac_ext <<_ACEOF
10781 #line 10781 "configure"
10782 #include "confdefs.h"
10783 #include <${cf_cv_ncurses_header:-curses.h}>
10792 rm -f conftest.$ac_objext conftest$ac_exeext
10793 if { (eval echo "$as_me:10793: \"$ac_link\"") >&5
10794 (eval $ac_link) 2>&5
10796 echo "$as_me:10796: \$? = $ac_status" >&5
10797 (exit $ac_status); } &&
10798 { ac_try='test -s conftest$ac_exeext'
10799 { (eval echo "$as_me:10799: \"$ac_try\"") >&5
10800 (eval $ac_try) 2>&5
10802 echo "$as_me:10802: \$? = $ac_status" >&5
10803 (exit $ac_status); }; }; then
10804 echo "$as_me:10804: result: yes" >&5
10805 echo "${ECHO_T}yes" >&6
10806 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10809 echo "$as_me: failed program was:" >&5
10810 cat conftest.$ac_ext >&5
10811 echo "$as_me:10811: result: no" >&5
10812 echo "${ECHO_T}no" >&6
10813 LIBS="$cf_save_LIBS"
10815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10823 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10825 if test $cf_found_library = no ; then
10826 { { echo "$as_me:10826: error: Cannot link $cf_nculib_root library" >&5
10827 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10828 { (exit 1); exit 1; }; }
10833 if test -n "$cf_ncurses_LIBS" ; then
10834 echo "$as_me:10834: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10835 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10836 cf_ncurses_SAVE="$LIBS"
10837 for p in $cf_ncurses_LIBS ; do
10838 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10839 if test "$q" != "$LIBS" ; then
10843 cat >conftest.$ac_ext <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846 #include <${cf_cv_ncurses_header:-curses.h}>
10850 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10855 rm -f conftest.$ac_objext conftest$ac_exeext
10856 if { (eval echo "$as_me:10856: \"$ac_link\"") >&5
10857 (eval $ac_link) 2>&5
10859 echo "$as_me:10859: \$? = $ac_status" >&5
10860 (exit $ac_status); } &&
10861 { ac_try='test -s conftest$ac_exeext'
10862 { (eval echo "$as_me:10862: \"$ac_try\"") >&5
10863 (eval $ac_try) 2>&5
10865 echo "$as_me:10865: \$? = $ac_status" >&5
10866 (exit $ac_status); }; }; then
10867 echo "$as_me:10867: result: yes" >&5
10868 echo "${ECHO_T}yes" >&6
10870 echo "$as_me: failed program was:" >&5
10871 cat conftest.$ac_ext >&5
10872 echo "$as_me:10872: result: no" >&5
10873 echo "${ECHO_T}no" >&6
10874 LIBS="$cf_ncurses_SAVE"
10876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10879 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10881 cat >>confdefs.h <<EOF
10882 #define $cf_nculib_ROOT 1
10887 NCURSES_CONFIG=none
10892 if test "$NCURSES_CONFIG_PKG" != none ; then
10893 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10895 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10896 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10897 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10899 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10900 if test -z "$cf_cv_abi_version"
10902 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10905 elif test "$NCURSES_CONFIG" != none ; then
10907 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10909 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10910 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10911 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10913 # ABI version is not available from headers
10914 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10918 for cf_name in MAJOR MINOR PATCH
10920 cat >conftest.$ac_ext <<CF_EOF
10921 #include <${cf_cv_ncurses_header:-curses.h}>
10922 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10924 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10925 { (eval echo "$as_me:10925: \"$cf_try\"") >&5
10926 (eval $cf_try) 2>&5
10928 echo "$as_me:10928: \$? = $ac_status" >&5
10929 (exit $ac_status); }
10930 if test -f conftest.out ; then
10931 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10932 eval NCURSES_$cf_name=\"$cf_result\"
10933 # cat conftest.$ac_ext
10938 cf_cv_abi_version=${NCURSES_MAJOR}
10942 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10944 cf_cv_timestamp=`date`
10946 echo "$as_me:10946: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10947 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10949 echo "$as_me:10949: checking if you want to have a library-prefix" >&5
10950 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10952 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10953 if test "${with_lib_prefix+set}" = set; then
10954 withval="$with_lib_prefix"
10955 with_lib_prefix=$withval
10957 with_lib_prefix=auto
10959 echo "$as_me:10959: result: $with_lib_prefix" >&5
10960 echo "${ECHO_T}$with_lib_prefix" >&6
10962 if test $with_lib_prefix = auto
10965 case $cf_cv_system_name in
10967 if test "$DFT_LWR_MODEL" = libtool; then
10976 (*) LIB_PREFIX='lib'
10979 cf_prefix=$LIB_PREFIX
10981 elif test $with_lib_prefix = no
10985 LIB_PREFIX=$with_lib_prefix
10990 ###############################################################################
10992 if test X"$CC_G_OPT" = X"" ; then
10994 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10997 echo "$as_me:10997: checking for default loader flags" >&5
10998 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10999 case $DFT_LWR_MODEL in
11000 (normal) LD_MODEL='' ;;
11001 (debug) LD_MODEL=$CC_G_OPT ;;
11002 (profile) LD_MODEL='-pg';;
11003 (shared) LD_MODEL='' ;;
11005 echo "$as_me:11005: result: $LD_MODEL" >&5
11006 echo "${ECHO_T}$LD_MODEL" >&6
11009 if test "x$cf_cv_enable_rpath" != xno
11011 echo "$as_me:11011: checking for an rpath option" >&5
11012 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11013 case $cf_cv_system_name in
11015 if test "$GCC" = yes; then
11016 LD_RPATH_OPT="-Wl,-rpath,"
11018 LD_RPATH_OPT="-rpath "
11021 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11022 LD_RPATH_OPT="-Wl,-rpath,"
11024 (openbsd[2-9].*|mirbsd*)
11025 LD_RPATH_OPT="-Wl,-rpath,"
11028 LD_RPATH_OPT="-rpath "
11031 LD_RPATH_OPT="-Wl,-rpath,"
11034 LD_RPATH_OPT="-rpath "
11042 echo "$as_me:11042: result: $LD_RPATH_OPT" >&5
11043 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11045 case "x$LD_RPATH_OPT" in
11047 echo "$as_me:11047: checking if we need a space after rpath option" >&5
11048 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11049 cf_save_LIBS="$LIBS"
11051 cf_add_libs="$LIBS"
11054 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11055 # filter duplicates
11056 for cf_add_1lib in $cf_add_0lib; do
11057 for cf_add_2lib in $cf_add_libs; do
11058 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11063 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11065 LIBS="$cf_add_libs"
11067 cat >conftest.$ac_ext <<_ACEOF
11068 #line 11068 "configure"
11069 #include "confdefs.h"
11079 rm -f conftest.$ac_objext conftest$ac_exeext
11080 if { (eval echo "$as_me:11080: \"$ac_link\"") >&5
11081 (eval $ac_link) 2>&5
11083 echo "$as_me:11083: \$? = $ac_status" >&5
11084 (exit $ac_status); } &&
11085 { ac_try='test -s conftest$ac_exeext'
11086 { (eval echo "$as_me:11086: \"$ac_try\"") >&5
11087 (eval $ac_try) 2>&5
11089 echo "$as_me:11089: \$? = $ac_status" >&5
11090 (exit $ac_status); }; }; then
11093 echo "$as_me: failed program was:" >&5
11094 cat conftest.$ac_ext >&5
11097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11098 LIBS="$cf_save_LIBS"
11099 echo "$as_me:11099: result: $cf_rpath_space" >&5
11100 echo "${ECHO_T}$cf_rpath_space" >&6
11101 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11110 INSTALL_LIB="-m 644"
11111 : ${rel_builddir:=.}
11117 cf_cv_do_symlinks=no
11119 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11121 echo "$as_me:11121: checking if release/abi version should be used for shared libs" >&5
11122 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11124 # Check whether --with-shlib-version or --without-shlib-version was given.
11125 if test "${with_shlib_version+set}" = set; then
11126 withval="$with_shlib_version"
11127 test -z "$withval" && withval=auto
11130 cf_cv_shlib_version=auto
11133 cf_cv_shlib_version=$withval
11136 echo "$as_me:11136: result: $withval" >&5
11137 echo "${ECHO_T}$withval" >&6
11138 { { echo "$as_me:11138: error: option value must be one of: rel, abi, or auto" >&5
11139 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11140 { (exit 1); exit 1; }; }
11145 cf_cv_shlib_version=auto
11147 echo "$as_me:11147: result: $cf_cv_shlib_version" >&5
11148 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11150 cf_cv_rm_so_locs=no
11153 # Some less-capable ports of gcc support only -fpic
11157 if test "$GCC" = yes
11161 case $cf_cv_system_name in
11162 (*linux*) # e.g., PGI compiler
11168 if test "$cf_try_fPIC" = yes
11170 echo "$as_me:11170: checking which $CC option to use" >&5
11171 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11172 cf_save_CFLAGS="$CFLAGS"
11173 for CC_SHARED_OPTS in -fPIC -fpic ''
11175 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11176 cat >conftest.$ac_ext <<_ACEOF
11177 #line 11177 "configure"
11178 #include "confdefs.h"
11188 rm -f conftest.$ac_objext
11189 if { (eval echo "$as_me:11189: \"$ac_compile\"") >&5
11190 (eval $ac_compile) 2>&5
11192 echo "$as_me:11192: \$? = $ac_status" >&5
11193 (exit $ac_status); } &&
11194 { ac_try='test -s conftest.$ac_objext'
11195 { (eval echo "$as_me:11195: \"$ac_try\"") >&5
11196 (eval $ac_try) 2>&5
11198 echo "$as_me:11198: \$? = $ac_status" >&5
11199 (exit $ac_status); }; }; then
11202 echo "$as_me: failed program was:" >&5
11203 cat conftest.$ac_ext >&5
11205 rm -f conftest.$ac_objext conftest.$ac_ext
11207 echo "$as_me:11207: result: $CC_SHARED_OPTS" >&5
11208 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11209 CFLAGS="$cf_save_CFLAGS"
11212 cf_cv_shlib_version_infix=no
11214 case $cf_cv_system_name in
11215 (aix4.3-9*|aix[5-7]*)
11216 if test "$GCC" = yes; then
11217 CC_SHARED_OPTS='-Wl,-brtl'
11218 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11220 CC_SHARED_OPTS='-brtl'
11221 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11222 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11226 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11230 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11231 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11232 cf_cv_shlib_version=cygdll
11233 cf_cv_shlib_version_infix=cygdll
11236 cat >mk_shared_lib.sh <<-CF_EOF
11239 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11242 Linking shared library
11243 ** SHARED_LIB \$SHARED_LIB
11244 ** IMPORT_LIB \$IMPORT_LIB
11246 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11248 chmod +x mk_shared_lib.sh
11252 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11253 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11254 cf_cv_shlib_version=msysdll
11255 cf_cv_shlib_version_infix=msysdll
11258 cat >mk_shared_lib.sh <<-CF_EOF
11261 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11264 Linking shared library
11265 ** SHARED_LIB \$SHARED_LIB
11266 ** IMPORT_LIB \$IMPORT_LIB
11268 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11270 chmod +x mk_shared_lib.sh
11273 cf_try_cflags="no-cpp-precomp"
11274 CC_SHARED_OPTS="-dynamic"
11275 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11276 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11277 cf_cv_shlib_version_infix=yes
11278 echo "$as_me:11278: checking if ld -search_paths_first works" >&5
11279 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11280 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11281 echo $ECHO_N "(cached) $ECHO_C" >&6
11284 cf_save_LDFLAGS=$LDFLAGS
11285 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11286 cat >conftest.$ac_ext <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11298 rm -f conftest.$ac_objext conftest$ac_exeext
11299 if { (eval echo "$as_me:11299: \"$ac_link\"") >&5
11300 (eval $ac_link) 2>&5
11302 echo "$as_me:11302: \$? = $ac_status" >&5
11303 (exit $ac_status); } &&
11304 { ac_try='test -s conftest$ac_exeext'
11305 { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306 (eval $ac_try) 2>&5
11308 echo "$as_me:11308: \$? = $ac_status" >&5
11309 (exit $ac_status); }; }; then
11310 cf_cv_ldflags_search_paths_first=yes
11312 echo "$as_me: failed program was:" >&5
11313 cat conftest.$ac_ext >&5
11314 cf_cv_ldflags_search_paths_first=no
11316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11317 LDFLAGS=$cf_save_LDFLAGS
11319 echo "$as_me:11319: result: $cf_cv_ldflags_search_paths_first" >&5
11320 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11321 if test $cf_cv_ldflags_search_paths_first = yes; then
11322 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11326 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11327 if test "$GCC" != yes; then
11328 CC_SHARED_OPTS='+Z'
11330 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11331 INSTALL_LIB="-m 555"
11334 # (tested with gcc 2.7.2 -- I don't have c89)
11335 if test "$GCC" = yes; then
11336 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11338 CC_SHARED_OPTS='+Z'
11339 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11341 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11342 # HP-UX shared libraries must be executable, and should be
11343 # readonly to exploit a quirk in the memory manager.
11344 INSTALL_LIB="-m 555"
11347 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11348 if test "$cf_cv_shlib_version" = rel; then
11349 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11351 cf_shared_soname='`basename $@`'
11354 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11357 if test "$cf_cv_enable_rpath" = yes ; then
11358 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11360 # tested with IRIX 5.2 and 'cc'.
11361 if test "$GCC" != yes; then
11362 CC_SHARED_OPTS='-KPIC'
11363 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11365 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11367 cf_cv_rm_so_locs=yes
11369 (linux*|gnu*|k*bsd*-gnu)
11370 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11371 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11372 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11374 if test "$cf_cv_enable_rpath" = yes ; then
11375 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11378 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11379 if test "$cf_cv_shlib_version" = rel; then
11380 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11382 cf_cv_shared_soname='`basename $@`'
11385 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11388 cf_cv_shlib_version=msvcdll
11389 cf_cv_shlib_version_infix=msvcdll
11392 if test "$DFT_LWR_MODEL" = "shared" ; then
11393 LOCAL_LDFLAGS="-link -dll"
11394 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11395 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11398 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11399 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11400 cat >mk_shared_lib.sh <<-CF_EOF
11403 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11408 Linking shared library
11409 ** SHARED LIB \$SHARED_LIB
11410 ** IMPORT_LIB \$IMPORT_LIB
11412 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11413 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11414 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11416 chmod +x mk_shared_lib.sh
11417 cat >mk_prog.sh <<-CF_EOF
11420 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11423 ldopts=("/subsystem:console")
11426 while test \$# -gt 0; do
11429 # ignore -link argument
11432 # ignore runtime-library option
11447 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11450 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11456 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11457 ldopts+=("\${linkarg}")
11465 ldopts+=("-out:\$1")
11474 if [ "\$isdll" -ne 0 ]; then
11475 for lib in \${libs[*]}; do
11476 ldopts+=("\$lib.dll.lib")
11479 for lib in \${libs[*]}; do
11480 ldopts+=("\$lib.lib")
11485 ** ld options: "\${ldopts[@]}"
11487 exec \$LD \${ldopts[@]}
11489 chmod +x mk_prog.sh
11490 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11491 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11494 cf_cv_shlib_version=mingw
11495 cf_cv_shlib_version_infix=mingw
11498 if test "$DFT_LWR_MODEL" = "shared" ; then
11499 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11500 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11501 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11504 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11505 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11506 cat >mk_shared_lib.sh <<-CF_EOF
11509 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11512 Linking shared library
11513 ** SHARED_LIB \$SHARED_LIB
11514 ** IMPORT_LIB \$IMPORT_LIB
11516 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11518 chmod +x mk_shared_lib.sh
11520 (openbsd[2-9].*|mirbsd*)
11521 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11522 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11523 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11525 if test "$cf_cv_enable_rpath" = yes ; then
11526 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11528 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11530 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11531 if test "$cf_cv_shlib_version" = rel; then
11532 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11534 cf_cv_shared_soname='`basename $@`'
11537 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11541 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11545 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11547 (nto-qnx*|openbsd*|freebsd[12].*)
11548 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11549 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11550 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11552 (dragonfly*|freebsd*)
11553 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11554 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11555 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11556 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11557 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11560 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11561 if test "$cf_cv_shlib_version" = rel; then
11562 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11564 cf_cv_shared_soname='`basename $@`'
11567 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11570 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11571 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11572 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11573 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11574 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11575 if test "$cf_cv_shlib_version" = auto; then
11576 if test -f /usr/libexec/ld.elf_so; then
11577 cf_cv_shlib_version=abi
11579 cf_cv_shlib_version=rel
11583 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11584 if test "$cf_cv_shlib_version" = rel; then
11585 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11587 cf_cv_shared_soname='`basename $@`'
11590 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11592 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11596 # tested with OSF/1 V3.2 and 'cc'
11597 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11598 # link with shared libs).
11599 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11602 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11605 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11606 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11607 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11608 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11610 cf_cv_rm_so_locs=yes
11612 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11613 # tested with osr5.0.5
11614 if test "$GCC" != yes; then
11615 CC_SHARED_OPTS='-belf -KPIC'
11617 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11618 if test "$cf_cv_enable_rpath" = yes ; then
11619 # only way is to set LD_RUN_PATH but no switch for it
11622 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11623 LINK_PROGS='LD_RUN_PATH=${libdir}'
11624 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11627 # tested with SunOS 4.1.1 and gcc 2.7.0
11628 if test "$GCC" != yes; then
11629 CC_SHARED_OPTS='-KPIC'
11631 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11632 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11635 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11636 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11637 if test "$DFT_LWR_MODEL" = "shared" ; then
11638 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11639 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11641 if test "$cf_cv_enable_rpath" = yes ; then
11642 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11645 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11646 if test "$cf_cv_shlib_version" = rel; then
11647 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11649 cf_cv_shared_soname='`basename $@`'
11652 if test "$GCC" != yes; then
11653 cf_save_CFLAGS="$CFLAGS"
11654 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11656 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11657 cat >conftest.$ac_ext <<_ACEOF
11658 #line 11658 "configure"
11659 #include "confdefs.h"
11669 rm -f conftest.$ac_objext
11670 if { (eval echo "$as_me:11670: \"$ac_compile\"") >&5
11671 (eval $ac_compile) 2>&5
11673 echo "$as_me:11673: \$? = $ac_status" >&5
11674 (exit $ac_status); } &&
11675 { ac_try='test -s conftest.$ac_objext'
11676 { (eval echo "$as_me:11676: \"$ac_try\"") >&5
11677 (eval $ac_try) 2>&5
11679 echo "$as_me:11679: \$? = $ac_status" >&5
11680 (exit $ac_status); }; }; then
11683 echo "$as_me: failed program was:" >&5
11684 cat conftest.$ac_ext >&5
11686 rm -f conftest.$ac_objext conftest.$ac_ext
11688 CFLAGS="$cf_save_CFLAGS"
11689 CC_SHARED_OPTS=$cf_shared_opts
11690 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11692 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11695 (sysv5uw7*|unix_sv*)
11696 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11697 if test "$GCC" != yes; then
11698 CC_SHARED_OPTS='-KPIC'
11700 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11703 CC_SHARED_OPTS='unknown'
11704 MK_SHARED_LIB='echo unknown'
11708 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11709 case "$cf_cv_shlib_version" in
11711 case "$MK_SHARED_LIB" in
11713 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11716 { echo "$as_me:11716: WARNING: ignored --with-shlib-version" >&5
11717 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11723 if test -n "$cf_try_cflags"
11725 cat > conftest.$ac_ext <<EOF
11726 #line 11726 "${as_me:-configure}"
11728 int main(int argc, char *argv[])
11731 return (argv[argc-1] == 0) ;
11734 cf_save_CFLAGS="$CFLAGS"
11735 for cf_opt in $cf_try_cflags
11737 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11738 echo "$as_me:11738: checking if CFLAGS option -$cf_opt works" >&5
11739 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11740 if { (eval echo "$as_me:11740: \"$ac_compile\"") >&5
11741 (eval $ac_compile) 2>&5
11743 echo "$as_me:11743: \$? = $ac_status" >&5
11744 (exit $ac_status); }; then
11745 echo "$as_me:11745: result: yes" >&5
11746 echo "${ECHO_T}yes" >&6
11747 cf_save_CFLAGS="$CFLAGS"
11749 echo "$as_me:11749: result: no" >&5
11750 echo "${ECHO_T}no" >&6
11753 CFLAGS="$cf_save_CFLAGS"
11756 # RPATH_LIST is a colon-separated list of directories
11757 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11758 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11760 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11762 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11764 echo "${as_me:-configure}:11764: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11766 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11768 echo "${as_me:-configure}:11768: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11770 # The test/sample programs in the original tree link using rpath option.
11771 # Make it optional for packagers.
11772 if test -n "$LOCAL_LDFLAGS"
11774 echo "$as_me:11774: checking if you want to link sample programs with rpath option" >&5
11775 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11777 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11778 if test "${enable_rpath_link+set}" = set; then
11779 enableval="$enable_rpath_link"
11780 with_rpath_link=$enableval
11782 with_rpath_link=yes
11784 echo "$as_me:11784: result: $with_rpath_link" >&5
11785 echo "${ECHO_T}$with_rpath_link" >&6
11786 if test "$with_rpath_link" = no
11793 ###############################################################################
11795 ### use option --enable-broken-linker to force on use of broken-linker support
11797 echo "$as_me:11797: checking if you want broken-linker support code" >&5
11798 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
11800 # Check whether --enable-broken_linker or --disable-broken_linker was given.
11801 if test "${enable_broken_linker+set}" = set; then
11802 enableval="$enable_broken_linker"
11803 with_broken_linker=$enableval
11805 with_broken_linker=no
11807 echo "$as_me:11807: result: $with_broken_linker" >&5
11808 echo "${ECHO_T}$with_broken_linker" >&6
11810 : ${BROKEN_LINKER:=0}
11811 if test "x$with_broken_linker" = xyes ; then
11813 cat >>confdefs.h <<\EOF
11814 #define BROKEN_LINKER 1
11820 # Check to define _XOPEN_SOURCE "automatically"
11822 echo "$as_me:11822: checking if the POSIX test-macros are already defined" >&5
11823 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11824 if test "${cf_cv_posix_visible+set}" = set; then
11825 echo $ECHO_N "(cached) $ECHO_C" >&6
11828 cat >conftest.$ac_ext <<_ACEOF
11829 #line 11829 "configure"
11830 #include "confdefs.h"
11836 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
11837 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
11838 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
11839 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
11840 #error conflicting symbols found
11847 rm -f conftest.$ac_objext
11848 if { (eval echo "$as_me:11848: \"$ac_compile\"") >&5
11849 (eval $ac_compile) 2>&5
11851 echo "$as_me:11851: \$? = $ac_status" >&5
11852 (exit $ac_status); } &&
11853 { ac_try='test -s conftest.$ac_objext'
11854 { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855 (eval $ac_try) 2>&5
11857 echo "$as_me:11857: \$? = $ac_status" >&5
11858 (exit $ac_status); }; }; then
11859 cf_cv_posix_visible=no
11861 echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 cf_cv_posix_visible=yes
11865 rm -f conftest.$ac_objext conftest.$ac_ext
11868 echo "$as_me:11868: result: $cf_cv_posix_visible" >&5
11869 echo "${ECHO_T}$cf_cv_posix_visible" >&6
11871 if test "$cf_cv_posix_visible" = no; then
11873 cf_XOPEN_SOURCE=600
11874 cf_POSIX_C_SOURCE=199506L
11879 cf_xopen_source="-D_ALL_SOURCE"
11882 cf_XOPEN_SOURCE=600
11885 cf_xopen_source="-D_APPLE_C_SOURCE"
11888 cf_xopen_source="-D_DARWIN_C_SOURCE"
11891 (freebsd*|dragonfly*|midnightbsd*)
11892 # 5.x headers associate
11893 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
11894 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
11895 cf_POSIX_C_SOURCE=200112L
11896 cf_XOPEN_SOURCE=600
11897 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11900 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
11903 cf_xopen_source="-D_HPUX_SOURCE"
11906 cf_xopen_source="-D_SGI_SOURCE"
11909 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
11911 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
11913 echo "$as_me:11913: checking if this is the GNU C library" >&5
11914 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
11915 if test "${cf_cv_gnu_library+set}" = set; then
11916 echo $ECHO_N "(cached) $ECHO_C" >&6
11919 cat >conftest.$ac_ext <<_ACEOF
11920 #line 11920 "configure"
11921 #include "confdefs.h"
11922 #include <sys/types.h>
11927 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
11929 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
11932 # error not GNU C library
11938 rm -f conftest.$ac_objext
11939 if { (eval echo "$as_me:11939: \"$ac_compile\"") >&5
11940 (eval $ac_compile) 2>&5
11942 echo "$as_me:11942: \$? = $ac_status" >&5
11943 (exit $ac_status); } &&
11944 { ac_try='test -s conftest.$ac_objext'
11945 { (eval echo "$as_me:11945: \"$ac_try\"") >&5
11946 (eval $ac_try) 2>&5
11948 echo "$as_me:11948: \$? = $ac_status" >&5
11949 (exit $ac_status); }; }; then
11950 cf_cv_gnu_library=yes
11952 echo "$as_me: failed program was:" >&5
11953 cat conftest.$ac_ext >&5
11954 cf_cv_gnu_library=no
11956 rm -f conftest.$ac_objext conftest.$ac_ext
11959 echo "$as_me:11959: result: $cf_cv_gnu_library" >&5
11960 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11962 if test x$cf_cv_gnu_library = xyes; then
11964 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11965 # was changed to help a little. newlib incorporated the change about 4
11967 echo "$as_me:11967: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11968 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11969 if test "${cf_cv_gnu_library_219+set}" = set; then
11970 echo $ECHO_N "(cached) $ECHO_C" >&6
11973 cf_save="$CPPFLAGS"
11975 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11976 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11978 cat >conftest.$ac_ext <<_ACEOF
11979 #line 11979 "configure"
11980 #include "confdefs.h"
11981 #include <sys/types.h>
11986 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11988 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11991 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11997 rm -f conftest.$ac_objext
11998 if { (eval echo "$as_me:11998: \"$ac_compile\"") >&5
11999 (eval $ac_compile) 2>&5
12001 echo "$as_me:12001: \$? = $ac_status" >&5
12002 (exit $ac_status); } &&
12003 { ac_try='test -s conftest.$ac_objext'
12004 { (eval echo "$as_me:12004: \"$ac_try\"") >&5
12005 (eval $ac_try) 2>&5
12007 echo "$as_me:12007: \$? = $ac_status" >&5
12008 (exit $ac_status); }; }; then
12009 cf_cv_gnu_library_219=yes
12011 echo "$as_me: failed program was:" >&5
12012 cat conftest.$ac_ext >&5
12013 cf_cv_gnu_library_219=no
12015 rm -f conftest.$ac_objext conftest.$ac_ext
12016 CPPFLAGS="$cf_save"
12019 echo "$as_me:12019: result: $cf_cv_gnu_library_219" >&5
12020 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12022 if test "x$cf_cv_gnu_library_219" = xyes; then
12023 cf_save="$CPPFLAGS"
12024 echo "$as_me:12024: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12025 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12026 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12027 echo $ECHO_N "(cached) $ECHO_C" >&6
12033 cf_new_extra_cppflags=
12035 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12037 case $cf_fix_cppflags in
12039 case $cf_add_cflags in
12040 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12041 case $cf_add_cflags in
12043 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12045 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12046 && test -z "${cf_tst_cflags}" \
12047 && cf_fix_cppflags=yes
12049 if test $cf_fix_cppflags = yes ; then
12051 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12052 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12055 elif test "${cf_tst_cflags}" = "\"'" ; then
12057 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12058 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12064 case "$CPPFLAGS" in
12068 case $cf_add_cflags in
12070 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12072 CPPFLAGS=`echo "$CPPFLAGS" | \
12073 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12074 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12079 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12080 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12087 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12088 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12098 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12100 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12101 && test -z "${cf_tst_cflags}" \
12102 && cf_fix_cppflags=no
12107 if test -n "$cf_new_cflags" ; then
12109 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12110 CFLAGS="${CFLAGS}$cf_new_cflags"
12114 if test -n "$cf_new_cppflags" ; then
12116 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12117 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12121 if test -n "$cf_new_extra_cppflags" ; then
12123 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12124 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12128 cat >conftest.$ac_ext <<_ACEOF
12129 #line 12129 "configure"
12130 #include "confdefs.h"
12132 #include <limits.h>
12133 #include <sys/types.h>
12139 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12142 # error GNU C library is too old
12148 rm -f conftest.$ac_objext
12149 if { (eval echo "$as_me:12149: \"$ac_compile\"") >&5
12150 (eval $ac_compile) 2>&5
12152 echo "$as_me:12152: \$? = $ac_status" >&5
12153 (exit $ac_status); } &&
12154 { ac_try='test -s conftest.$ac_objext'
12155 { (eval echo "$as_me:12155: \"$ac_try\"") >&5
12156 (eval $ac_try) 2>&5
12158 echo "$as_me:12158: \$? = $ac_status" >&5
12159 (exit $ac_status); }; }; then
12160 cf_cv_gnu_dftsrc_219=yes
12162 echo "$as_me: failed program was:" >&5
12163 cat conftest.$ac_ext >&5
12164 cf_cv_gnu_dftsrc_219=no
12166 rm -f conftest.$ac_objext conftest.$ac_ext
12169 echo "$as_me:12169: result: $cf_cv_gnu_dftsrc_219" >&5
12170 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12171 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12173 cf_cv_gnu_dftsrc_219=maybe
12176 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12178 echo "$as_me:12178: checking if we must define _GNU_SOURCE" >&5
12179 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12180 if test "${cf_cv_gnu_source+set}" = set; then
12181 echo $ECHO_N "(cached) $ECHO_C" >&6
12184 cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187 #include <sys/types.h>
12192 #ifndef _XOPEN_SOURCE
12193 #error expected _XOPEN_SOURCE to be defined
12199 rm -f conftest.$ac_objext
12200 if { (eval echo "$as_me:12200: \"$ac_compile\"") >&5
12201 (eval $ac_compile) 2>&5
12203 echo "$as_me:12203: \$? = $ac_status" >&5
12204 (exit $ac_status); } &&
12205 { ac_try='test -s conftest.$ac_objext'
12206 { (eval echo "$as_me:12206: \"$ac_try\"") >&5
12207 (eval $ac_try) 2>&5
12209 echo "$as_me:12209: \$? = $ac_status" >&5
12210 (exit $ac_status); }; }; then
12211 cf_cv_gnu_source=no
12213 echo "$as_me: failed program was:" >&5
12214 cat conftest.$ac_ext >&5
12215 cf_save="$CPPFLAGS"
12220 cf_new_extra_cppflags=
12222 for cf_add_cflags in -D_GNU_SOURCE
12224 case $cf_fix_cppflags in
12226 case $cf_add_cflags in
12227 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12228 case $cf_add_cflags in
12230 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12232 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12233 && test -z "${cf_tst_cflags}" \
12234 && cf_fix_cppflags=yes
12236 if test $cf_fix_cppflags = yes ; then
12238 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12239 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12242 elif test "${cf_tst_cflags}" = "\"'" ; then
12244 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12245 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12251 case "$CPPFLAGS" in
12255 case $cf_add_cflags in
12257 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12259 CPPFLAGS=`echo "$CPPFLAGS" | \
12260 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12261 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12266 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12267 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12274 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12275 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12282 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12283 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12285 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12287 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12288 && test -z "${cf_tst_cflags}" \
12289 && cf_fix_cppflags=no
12294 if test -n "$cf_new_cflags" ; then
12296 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12297 CFLAGS="${CFLAGS}$cf_new_cflags"
12301 if test -n "$cf_new_cppflags" ; then
12303 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12304 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12308 if test -n "$cf_new_extra_cppflags" ; then
12310 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12311 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12315 cat >conftest.$ac_ext <<_ACEOF
12316 #line 12316 "configure"
12317 #include "confdefs.h"
12318 #include <sys/types.h>
12323 #ifdef _XOPEN_SOURCE
12324 #error expected _XOPEN_SOURCE to be undefined
12330 rm -f conftest.$ac_objext
12331 if { (eval echo "$as_me:12331: \"$ac_compile\"") >&5
12332 (eval $ac_compile) 2>&5
12334 echo "$as_me:12334: \$? = $ac_status" >&5
12335 (exit $ac_status); } &&
12336 { ac_try='test -s conftest.$ac_objext'
12337 { (eval echo "$as_me:12337: \"$ac_try\"") >&5
12338 (eval $ac_try) 2>&5
12340 echo "$as_me:12340: \$? = $ac_status" >&5
12341 (exit $ac_status); }; }; then
12342 cf_cv_gnu_source=no
12344 echo "$as_me: failed program was:" >&5
12345 cat conftest.$ac_ext >&5
12346 cf_cv_gnu_source=yes
12348 rm -f conftest.$ac_objext conftest.$ac_ext
12349 CPPFLAGS="$cf_save"
12352 rm -f conftest.$ac_objext conftest.$ac_ext
12355 echo "$as_me:12355: result: $cf_cv_gnu_source" >&5
12356 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12358 if test "$cf_cv_gnu_source" = yes
12360 echo "$as_me:12360: checking if we should also define _DEFAULT_SOURCE" >&5
12361 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12362 if test "${cf_cv_default_source+set}" = set; then
12363 echo $ECHO_N "(cached) $ECHO_C" >&6
12366 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12367 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12369 cat >conftest.$ac_ext <<_ACEOF
12370 #line 12370 "configure"
12371 #include "confdefs.h"
12372 #include <sys/types.h>
12377 #ifdef _DEFAULT_SOURCE
12378 #error expected _DEFAULT_SOURCE to be undefined
12384 rm -f conftest.$ac_objext
12385 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386 (eval $ac_compile) 2>&5
12388 echo "$as_me:12388: \$? = $ac_status" >&5
12389 (exit $ac_status); } &&
12390 { ac_try='test -s conftest.$ac_objext'
12391 { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392 (eval $ac_try) 2>&5
12394 echo "$as_me:12394: \$? = $ac_status" >&5
12395 (exit $ac_status); }; }; then
12396 cf_cv_default_source=no
12398 echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400 cf_cv_default_source=yes
12402 rm -f conftest.$ac_objext conftest.$ac_ext
12405 echo "$as_me:12405: result: $cf_cv_default_source" >&5
12406 echo "${ECHO_T}$cf_cv_default_source" >&6
12407 if test "$cf_cv_default_source" = yes
12410 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12411 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12421 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12424 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12427 if test "$cf_cv_posix_visible" = no; then
12429 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12431 cf_save_CFLAGS="$CFLAGS"
12432 cf_save_CPPFLAGS="$CPPFLAGS"
12434 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12435 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12436 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12438 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12439 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12440 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12442 echo "$as_me:12442: checking if we should define _POSIX_C_SOURCE" >&5
12443 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12444 if test "${cf_cv_posix_c_source+set}" = set; then
12445 echo $ECHO_N "(cached) $ECHO_C" >&6
12448 echo "${as_me:-configure}:12448: testing if the symbol is already defined go no further ..." 1>&5
12450 cat >conftest.$ac_ext <<_ACEOF
12451 #line 12451 "configure"
12452 #include "confdefs.h"
12453 #include <sys/types.h>
12458 #ifndef _POSIX_C_SOURCE
12465 rm -f conftest.$ac_objext
12466 if { (eval echo "$as_me:12466: \"$ac_compile\"") >&5
12467 (eval $ac_compile) 2>&5
12469 echo "$as_me:12469: \$? = $ac_status" >&5
12470 (exit $ac_status); } &&
12471 { ac_try='test -s conftest.$ac_objext'
12472 { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473 (eval $ac_try) 2>&5
12475 echo "$as_me:12475: \$? = $ac_status" >&5
12476 (exit $ac_status); }; }; then
12477 cf_cv_posix_c_source=no
12479 echo "$as_me: failed program was:" >&5
12480 cat conftest.$ac_ext >&5
12481 cf_want_posix_source=no
12482 case .$cf_POSIX_C_SOURCE in
12484 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12487 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12488 cf_want_posix_source=yes
12491 cf_want_posix_source=yes
12494 if test "$cf_want_posix_source" = yes ; then
12495 cat >conftest.$ac_ext <<_ACEOF
12496 #line 12496 "configure"
12497 #include "confdefs.h"
12498 #include <sys/types.h>
12503 #ifdef _POSIX_SOURCE
12510 rm -f conftest.$ac_objext
12511 if { (eval echo "$as_me:12511: \"$ac_compile\"") >&5
12512 (eval $ac_compile) 2>&5
12514 echo "$as_me:12514: \$? = $ac_status" >&5
12515 (exit $ac_status); } &&
12516 { ac_try='test -s conftest.$ac_objext'
12517 { (eval echo "$as_me:12517: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12520 echo "$as_me:12520: \$? = $ac_status" >&5
12521 (exit $ac_status); }; }; then
12524 echo "$as_me: failed program was:" >&5
12525 cat conftest.$ac_ext >&5
12526 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12528 rm -f conftest.$ac_objext conftest.$ac_ext
12531 echo "${as_me:-configure}:12531: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12533 CFLAGS="$cf_trim_CFLAGS"
12534 CPPFLAGS="$cf_trim_CPPFLAGS"
12536 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12537 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12539 echo "${as_me:-configure}:12539: testing if the second compile does not leave our definition intact error ..." 1>&5
12541 cat >conftest.$ac_ext <<_ACEOF
12542 #line 12542 "configure"
12543 #include "confdefs.h"
12544 #include <sys/types.h>
12549 #ifndef _POSIX_C_SOURCE
12556 rm -f conftest.$ac_objext
12557 if { (eval echo "$as_me:12557: \"$ac_compile\"") >&5
12558 (eval $ac_compile) 2>&5
12560 echo "$as_me:12560: \$? = $ac_status" >&5
12561 (exit $ac_status); } &&
12562 { ac_try='test -s conftest.$ac_objext'
12563 { (eval echo "$as_me:12563: \"$ac_try\"") >&5
12564 (eval $ac_try) 2>&5
12566 echo "$as_me:12566: \$? = $ac_status" >&5
12567 (exit $ac_status); }; }; then
12570 echo "$as_me: failed program was:" >&5
12571 cat conftest.$ac_ext >&5
12572 cf_cv_posix_c_source=no
12574 rm -f conftest.$ac_objext conftest.$ac_ext
12575 CFLAGS="$cf_save_CFLAGS"
12576 CPPFLAGS="$cf_save_CPPFLAGS"
12579 rm -f conftest.$ac_objext conftest.$ac_ext
12582 echo "$as_me:12582: result: $cf_cv_posix_c_source" >&5
12583 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12585 if test "$cf_cv_posix_c_source" != no ; then
12586 CFLAGS="$cf_trim_CFLAGS"
12587 CPPFLAGS="$cf_trim_CPPFLAGS"
12592 cf_new_extra_cppflags=
12594 for cf_add_cflags in $cf_cv_posix_c_source
12596 case $cf_fix_cppflags in
12598 case $cf_add_cflags in
12599 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12600 case $cf_add_cflags in
12602 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12605 && test -z "${cf_tst_cflags}" \
12606 && cf_fix_cppflags=yes
12608 if test $cf_fix_cppflags = yes ; then
12610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12614 elif test "${cf_tst_cflags}" = "\"'" ; 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"
12623 case "$CPPFLAGS" in
12627 case $cf_add_cflags in
12629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12631 CPPFLAGS=`echo "$CPPFLAGS" | \
12632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12638 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12639 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12646 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12647 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12654 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12655 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12657 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12659 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12660 && test -z "${cf_tst_cflags}" \
12661 && cf_fix_cppflags=no
12666 if test -n "$cf_new_cflags" ; then
12668 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12669 CFLAGS="${CFLAGS}$cf_new_cflags"
12673 if test -n "$cf_new_cppflags" ; then
12675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12676 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12680 if test -n "$cf_new_extra_cppflags" ; then
12682 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12683 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12689 fi # cf_cv_posix_visible
12693 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12696 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12697 cf_xopen_source="-D_BSD_SOURCE"
12698 cf_XOPEN_SOURCE=600
12701 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12704 cf_xopen_source="-D_OSF_SOURCE"
12707 cf_xopen_source="-D_QNX_SOURCE"
12710 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12713 cf_xopen_source="-D__EXTENSIONS__"
12714 cf_cv_xopen_source=broken
12716 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12722 echo "$as_me:12722: checking if we should define _XOPEN_SOURCE" >&5
12723 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12724 if test "${cf_cv_xopen_source+set}" = set; then
12725 echo $ECHO_N "(cached) $ECHO_C" >&6
12728 cat >conftest.$ac_ext <<_ACEOF
12729 #line 12729 "configure"
12730 #include "confdefs.h"
12732 #include <stdlib.h>
12733 #include <string.h>
12734 #include <sys/types.h>
12740 #ifndef _XOPEN_SOURCE
12747 rm -f conftest.$ac_objext
12748 if { (eval echo "$as_me:12748: \"$ac_compile\"") >&5
12749 (eval $ac_compile) 2>&5
12751 echo "$as_me:12751: \$? = $ac_status" >&5
12752 (exit $ac_status); } &&
12753 { ac_try='test -s conftest.$ac_objext'
12754 { (eval echo "$as_me:12754: \"$ac_try\"") >&5
12755 (eval $ac_try) 2>&5
12757 echo "$as_me:12757: \$? = $ac_status" >&5
12758 (exit $ac_status); }; }; then
12759 cf_cv_xopen_source=no
12761 echo "$as_me: failed program was:" >&5
12762 cat conftest.$ac_ext >&5
12763 cf_save="$CPPFLAGS"
12765 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12766 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12768 cat >conftest.$ac_ext <<_ACEOF
12769 #line 12769 "configure"
12770 #include "confdefs.h"
12772 #include <stdlib.h>
12773 #include <string.h>
12774 #include <sys/types.h>
12780 #ifdef _XOPEN_SOURCE
12787 rm -f conftest.$ac_objext
12788 if { (eval echo "$as_me:12788: \"$ac_compile\"") >&5
12789 (eval $ac_compile) 2>&5
12791 echo "$as_me:12791: \$? = $ac_status" >&5
12792 (exit $ac_status); } &&
12793 { ac_try='test -s conftest.$ac_objext'
12794 { (eval echo "$as_me:12794: \"$ac_try\"") >&5
12795 (eval $ac_try) 2>&5
12797 echo "$as_me:12797: \$? = $ac_status" >&5
12798 (exit $ac_status); }; }; then
12799 cf_cv_xopen_source=no
12801 echo "$as_me: failed program was:" >&5
12802 cat conftest.$ac_ext >&5
12803 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12805 rm -f conftest.$ac_objext conftest.$ac_ext
12806 CPPFLAGS="$cf_save"
12809 rm -f conftest.$ac_objext conftest.$ac_ext
12812 echo "$as_me:12812: result: $cf_cv_xopen_source" >&5
12813 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12815 if test "$cf_cv_xopen_source" != no ; then
12817 CFLAGS=`echo "$CFLAGS" | \
12818 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12819 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12821 CPPFLAGS=`echo "$CPPFLAGS" | \
12822 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12823 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12825 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12830 cf_new_extra_cppflags=
12832 for cf_add_cflags in $cf_temp_xopen_source
12834 case $cf_fix_cppflags in
12836 case $cf_add_cflags in
12837 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12838 case $cf_add_cflags in
12840 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12842 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12843 && test -z "${cf_tst_cflags}" \
12844 && cf_fix_cppflags=yes
12846 if test $cf_fix_cppflags = yes ; then
12848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12852 elif test "${cf_tst_cflags}" = "\"'" ; then
12854 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12855 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12861 case "$CPPFLAGS" in
12865 case $cf_add_cflags in
12867 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12869 CPPFLAGS=`echo "$CPPFLAGS" | \
12870 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12871 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12876 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12877 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12884 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12885 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12892 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12893 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12895 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12897 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12898 && test -z "${cf_tst_cflags}" \
12899 && cf_fix_cppflags=no
12904 if test -n "$cf_new_cflags" ; then
12906 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12907 CFLAGS="${CFLAGS}$cf_new_cflags"
12911 if test -n "$cf_new_cppflags" ; then
12913 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12914 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12918 if test -n "$cf_new_extra_cppflags" ; then
12920 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12921 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12927 if test "$cf_cv_posix_visible" = no; then
12929 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12931 cf_save_CFLAGS="$CFLAGS"
12932 cf_save_CPPFLAGS="$CPPFLAGS"
12934 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12935 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12936 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12938 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12939 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12940 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12942 echo "$as_me:12942: checking if we should define _POSIX_C_SOURCE" >&5
12943 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12944 if test "${cf_cv_posix_c_source+set}" = set; then
12945 echo $ECHO_N "(cached) $ECHO_C" >&6
12948 echo "${as_me:-configure}:12948: testing if the symbol is already defined go no further ..." 1>&5
12950 cat >conftest.$ac_ext <<_ACEOF
12951 #line 12951 "configure"
12952 #include "confdefs.h"
12953 #include <sys/types.h>
12958 #ifndef _POSIX_C_SOURCE
12965 rm -f conftest.$ac_objext
12966 if { (eval echo "$as_me:12966: \"$ac_compile\"") >&5
12967 (eval $ac_compile) 2>&5
12969 echo "$as_me:12969: \$? = $ac_status" >&5
12970 (exit $ac_status); } &&
12971 { ac_try='test -s conftest.$ac_objext'
12972 { (eval echo "$as_me:12972: \"$ac_try\"") >&5
12973 (eval $ac_try) 2>&5
12975 echo "$as_me:12975: \$? = $ac_status" >&5
12976 (exit $ac_status); }; }; then
12977 cf_cv_posix_c_source=no
12979 echo "$as_me: failed program was:" >&5
12980 cat conftest.$ac_ext >&5
12981 cf_want_posix_source=no
12982 case .$cf_POSIX_C_SOURCE in
12984 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12987 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12988 cf_want_posix_source=yes
12991 cf_want_posix_source=yes
12994 if test "$cf_want_posix_source" = yes ; then
12995 cat >conftest.$ac_ext <<_ACEOF
12996 #line 12996 "configure"
12997 #include "confdefs.h"
12998 #include <sys/types.h>
13003 #ifdef _POSIX_SOURCE
13010 rm -f conftest.$ac_objext
13011 if { (eval echo "$as_me:13011: \"$ac_compile\"") >&5
13012 (eval $ac_compile) 2>&5
13014 echo "$as_me:13014: \$? = $ac_status" >&5
13015 (exit $ac_status); } &&
13016 { ac_try='test -s conftest.$ac_objext'
13017 { (eval echo "$as_me:13017: \"$ac_try\"") >&5
13018 (eval $ac_try) 2>&5
13020 echo "$as_me:13020: \$? = $ac_status" >&5
13021 (exit $ac_status); }; }; then
13024 echo "$as_me: failed program was:" >&5
13025 cat conftest.$ac_ext >&5
13026 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13028 rm -f conftest.$ac_objext conftest.$ac_ext
13031 echo "${as_me:-configure}:13031: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13033 CFLAGS="$cf_trim_CFLAGS"
13034 CPPFLAGS="$cf_trim_CPPFLAGS"
13036 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13037 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13039 echo "${as_me:-configure}:13039: testing if the second compile does not leave our definition intact error ..." 1>&5
13041 cat >conftest.$ac_ext <<_ACEOF
13042 #line 13042 "configure"
13043 #include "confdefs.h"
13044 #include <sys/types.h>
13049 #ifndef _POSIX_C_SOURCE
13056 rm -f conftest.$ac_objext
13057 if { (eval echo "$as_me:13057: \"$ac_compile\"") >&5
13058 (eval $ac_compile) 2>&5
13060 echo "$as_me:13060: \$? = $ac_status" >&5
13061 (exit $ac_status); } &&
13062 { ac_try='test -s conftest.$ac_objext'
13063 { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064 (eval $ac_try) 2>&5
13066 echo "$as_me:13066: \$? = $ac_status" >&5
13067 (exit $ac_status); }; }; then
13070 echo "$as_me: failed program was:" >&5
13071 cat conftest.$ac_ext >&5
13072 cf_cv_posix_c_source=no
13074 rm -f conftest.$ac_objext conftest.$ac_ext
13075 CFLAGS="$cf_save_CFLAGS"
13076 CPPFLAGS="$cf_save_CPPFLAGS"
13079 rm -f conftest.$ac_objext conftest.$ac_ext
13082 echo "$as_me:13082: result: $cf_cv_posix_c_source" >&5
13083 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13085 if test "$cf_cv_posix_c_source" != no ; then
13086 CFLAGS="$cf_trim_CFLAGS"
13087 CPPFLAGS="$cf_trim_CPPFLAGS"
13092 cf_new_extra_cppflags=
13094 for cf_add_cflags in $cf_cv_posix_c_source
13096 case $cf_fix_cppflags in
13098 case $cf_add_cflags in
13099 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13100 case $cf_add_cflags in
13102 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13104 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13105 && test -z "${cf_tst_cflags}" \
13106 && cf_fix_cppflags=yes
13108 if test $cf_fix_cppflags = yes ; then
13110 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13111 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13114 elif test "${cf_tst_cflags}" = "\"'" ; then
13116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13123 case "$CPPFLAGS" in
13127 case $cf_add_cflags in
13129 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13131 CPPFLAGS=`echo "$CPPFLAGS" | \
13132 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13133 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13138 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13139 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13146 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13147 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13154 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13155 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13157 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13160 && test -z "${cf_tst_cflags}" \
13161 && cf_fix_cppflags=no
13166 if test -n "$cf_new_cflags" ; then
13168 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13169 CFLAGS="${CFLAGS}$cf_new_cflags"
13173 if test -n "$cf_new_cppflags" ; then
13175 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13176 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13180 if test -n "$cf_new_extra_cppflags" ; then
13182 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13183 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13189 fi # cf_cv_posix_visible
13194 if test -n "$cf_xopen_source" ; then
13199 cf_new_extra_cppflags=
13201 for cf_add_cflags in $cf_xopen_source
13203 case $cf_fix_cppflags in
13205 case $cf_add_cflags in
13206 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13207 case $cf_add_cflags in
13209 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13211 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13212 && test -z "${cf_tst_cflags}" \
13213 && cf_fix_cppflags=yes
13215 if test $cf_fix_cppflags = yes ; then
13217 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13218 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13221 elif test "${cf_tst_cflags}" = "\"'" ; then
13223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13230 case "$CPPFLAGS" in
13234 case $cf_add_cflags in
13236 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13238 CPPFLAGS=`echo "$CPPFLAGS" | \
13239 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13240 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13245 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13246 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13253 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13254 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13261 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13262 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13264 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13266 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13267 && test -z "${cf_tst_cflags}" \
13268 && cf_fix_cppflags=no
13273 if test -n "$cf_new_cflags" ; then
13274 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13276 echo "${as_me:-configure}:13276: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13278 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13279 CFLAGS="${CFLAGS}$cf_new_cflags"
13283 if test -n "$cf_new_cppflags" ; then
13284 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13286 echo "${as_me:-configure}:13286: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13288 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13289 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13293 if test -n "$cf_new_extra_cppflags" ; then
13294 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13296 echo "${as_me:-configure}:13296: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13298 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13299 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13305 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13306 echo "$as_me:13306: checking if _XOPEN_SOURCE really is set" >&5
13307 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13308 cat >conftest.$ac_ext <<_ACEOF
13309 #line 13309 "configure"
13310 #include "confdefs.h"
13311 #include <stdlib.h>
13316 #ifndef _XOPEN_SOURCE
13323 rm -f conftest.$ac_objext
13324 if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5
13325 (eval $ac_compile) 2>&5
13327 echo "$as_me:13327: \$? = $ac_status" >&5
13328 (exit $ac_status); } &&
13329 { ac_try='test -s conftest.$ac_objext'
13330 { (eval echo "$as_me:13330: \"$ac_try\"") >&5
13331 (eval $ac_try) 2>&5
13333 echo "$as_me:13333: \$? = $ac_status" >&5
13334 (exit $ac_status); }; }; then
13335 cf_XOPEN_SOURCE_set=yes
13337 echo "$as_me: failed program was:" >&5
13338 cat conftest.$ac_ext >&5
13339 cf_XOPEN_SOURCE_set=no
13341 rm -f conftest.$ac_objext conftest.$ac_ext
13342 echo "$as_me:13342: result: $cf_XOPEN_SOURCE_set" >&5
13343 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13344 if test $cf_XOPEN_SOURCE_set = yes
13346 cat >conftest.$ac_ext <<_ACEOF
13347 #line 13347 "configure"
13348 #include "confdefs.h"
13349 #include <stdlib.h>
13354 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13361 rm -f conftest.$ac_objext
13362 if { (eval echo "$as_me:13362: \"$ac_compile\"") >&5
13363 (eval $ac_compile) 2>&5
13365 echo "$as_me:13365: \$? = $ac_status" >&5
13366 (exit $ac_status); } &&
13367 { ac_try='test -s conftest.$ac_objext'
13368 { (eval echo "$as_me:13368: \"$ac_try\"") >&5
13369 (eval $ac_try) 2>&5
13371 echo "$as_me:13371: \$? = $ac_status" >&5
13372 (exit $ac_status); }; }; then
13373 cf_XOPEN_SOURCE_set_ok=yes
13375 echo "$as_me: failed program was:" >&5
13376 cat conftest.$ac_ext >&5
13377 cf_XOPEN_SOURCE_set_ok=no
13379 rm -f conftest.$ac_objext conftest.$ac_ext
13380 if test $cf_XOPEN_SOURCE_set_ok = no
13382 { echo "$as_me:13382: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13383 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13387 echo "$as_me:13387: checking if we should define _XOPEN_SOURCE" >&5
13388 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13389 if test "${cf_cv_xopen_source+set}" = set; then
13390 echo $ECHO_N "(cached) $ECHO_C" >&6
13393 cat >conftest.$ac_ext <<_ACEOF
13394 #line 13394 "configure"
13395 #include "confdefs.h"
13397 #include <stdlib.h>
13398 #include <string.h>
13399 #include <sys/types.h>
13405 #ifndef _XOPEN_SOURCE
13412 rm -f conftest.$ac_objext
13413 if { (eval echo "$as_me:13413: \"$ac_compile\"") >&5
13414 (eval $ac_compile) 2>&5
13416 echo "$as_me:13416: \$? = $ac_status" >&5
13417 (exit $ac_status); } &&
13418 { ac_try='test -s conftest.$ac_objext'
13419 { (eval echo "$as_me:13419: \"$ac_try\"") >&5
13420 (eval $ac_try) 2>&5
13422 echo "$as_me:13422: \$? = $ac_status" >&5
13423 (exit $ac_status); }; }; then
13424 cf_cv_xopen_source=no
13426 echo "$as_me: failed program was:" >&5
13427 cat conftest.$ac_ext >&5
13428 cf_save="$CPPFLAGS"
13430 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13431 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13433 cat >conftest.$ac_ext <<_ACEOF
13434 #line 13434 "configure"
13435 #include "confdefs.h"
13437 #include <stdlib.h>
13438 #include <string.h>
13439 #include <sys/types.h>
13445 #ifdef _XOPEN_SOURCE
13452 rm -f conftest.$ac_objext
13453 if { (eval echo "$as_me:13453: \"$ac_compile\"") >&5
13454 (eval $ac_compile) 2>&5
13456 echo "$as_me:13456: \$? = $ac_status" >&5
13457 (exit $ac_status); } &&
13458 { ac_try='test -s conftest.$ac_objext'
13459 { (eval echo "$as_me:13459: \"$ac_try\"") >&5
13460 (eval $ac_try) 2>&5
13462 echo "$as_me:13462: \$? = $ac_status" >&5
13463 (exit $ac_status); }; }; then
13464 cf_cv_xopen_source=no
13466 echo "$as_me: failed program was:" >&5
13467 cat conftest.$ac_ext >&5
13468 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13470 rm -f conftest.$ac_objext conftest.$ac_ext
13471 CPPFLAGS="$cf_save"
13474 rm -f conftest.$ac_objext conftest.$ac_ext
13477 echo "$as_me:13477: result: $cf_cv_xopen_source" >&5
13478 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13480 if test "$cf_cv_xopen_source" != no ; then
13482 CFLAGS=`echo "$CFLAGS" | \
13483 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13484 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13486 CPPFLAGS=`echo "$CPPFLAGS" | \
13487 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13488 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13490 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13495 cf_new_extra_cppflags=
13497 for cf_add_cflags in $cf_temp_xopen_source
13499 case $cf_fix_cppflags in
13501 case $cf_add_cflags in
13502 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13503 case $cf_add_cflags in
13505 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13507 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13508 && test -z "${cf_tst_cflags}" \
13509 && cf_fix_cppflags=yes
13511 if test $cf_fix_cppflags = yes ; then
13513 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13514 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13517 elif test "${cf_tst_cflags}" = "\"'" ; then
13519 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13520 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13526 case "$CPPFLAGS" in
13530 case $cf_add_cflags in
13532 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13534 CPPFLAGS=`echo "$CPPFLAGS" | \
13535 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13536 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13541 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13542 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13549 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13550 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13557 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13558 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13560 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13562 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13563 && test -z "${cf_tst_cflags}" \
13564 && cf_fix_cppflags=no
13569 if test -n "$cf_new_cflags" ; then
13571 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13572 CFLAGS="${CFLAGS}$cf_new_cflags"
13576 if test -n "$cf_new_cppflags" ; then
13578 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13579 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13583 if test -n "$cf_new_extra_cppflags" ; then
13585 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13586 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13594 fi # cf_cv_posix_visible
13596 # Check whether --enable-largefile or --disable-largefile was given.
13597 if test "${enable_largefile+set}" = set; then
13598 enableval="$enable_largefile"
13601 if test "$enable_largefile" != no; then
13603 echo "$as_me:13603: checking for special C compiler options needed for large files" >&5
13604 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13605 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13606 echo $ECHO_N "(cached) $ECHO_C" >&6
13608 ac_cv_sys_largefile_CC=no
13609 if test "$GCC" != yes; then
13612 # IRIX 6.2 and later do not support large files by default,
13613 # so use the C compiler's -n32 option if that helps.
13614 cat >conftest.$ac_ext <<_ACEOF
13615 #line 13615 "configure"
13616 #include "confdefs.h"
13617 #include <sys/types.h>
13618 /* Check that off_t can represent 2**63 - 1 correctly.
13619 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13620 since some C++ compilers masquerading as C compilers
13621 incorrectly reject 9223372036854775807. */
13622 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13623 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13624 && LARGE_OFF_T % 2147483647 == 1)
13634 rm -f conftest.$ac_objext
13635 if { (eval echo "$as_me:13635: \"$ac_compile\"") >&5
13636 (eval $ac_compile) 2>&5
13638 echo "$as_me:13638: \$? = $ac_status" >&5
13639 (exit $ac_status); } &&
13640 { ac_try='test -s conftest.$ac_objext'
13641 { (eval echo "$as_me:13641: \"$ac_try\"") >&5
13642 (eval $ac_try) 2>&5
13644 echo "$as_me:13644: \$? = $ac_status" >&5
13645 (exit $ac_status); }; }; then
13648 echo "$as_me: failed program was:" >&5
13649 cat conftest.$ac_ext >&5
13651 rm -f conftest.$ac_objext
13653 rm -f conftest.$ac_objext
13654 if { (eval echo "$as_me:13654: \"$ac_compile\"") >&5
13655 (eval $ac_compile) 2>&5
13657 echo "$as_me:13657: \$? = $ac_status" >&5
13658 (exit $ac_status); } &&
13659 { ac_try='test -s conftest.$ac_objext'
13660 { (eval echo "$as_me:13660: \"$ac_try\"") >&5
13661 (eval $ac_try) 2>&5
13663 echo "$as_me:13663: \$? = $ac_status" >&5
13664 (exit $ac_status); }; }; then
13665 ac_cv_sys_largefile_CC=' -n32'; break
13667 echo "$as_me: failed program was:" >&5
13668 cat conftest.$ac_ext >&5
13670 rm -f conftest.$ac_objext
13674 rm -f conftest.$ac_ext
13677 echo "$as_me:13677: result: $ac_cv_sys_largefile_CC" >&5
13678 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13679 if test "$ac_cv_sys_largefile_CC" != no; then
13680 CC=$CC$ac_cv_sys_largefile_CC
13683 echo "$as_me:13683: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13684 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13685 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13686 echo $ECHO_N "(cached) $ECHO_C" >&6
13689 ac_cv_sys_file_offset_bits=no
13690 cat >conftest.$ac_ext <<_ACEOF
13691 #line 13691 "configure"
13692 #include "confdefs.h"
13693 #include <sys/types.h>
13694 /* Check that off_t can represent 2**63 - 1 correctly.
13695 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13696 since some C++ compilers masquerading as C compilers
13697 incorrectly reject 9223372036854775807. */
13698 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13699 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13700 && LARGE_OFF_T % 2147483647 == 1)
13710 rm -f conftest.$ac_objext
13711 if { (eval echo "$as_me:13711: \"$ac_compile\"") >&5
13712 (eval $ac_compile) 2>&5
13714 echo "$as_me:13714: \$? = $ac_status" >&5
13715 (exit $ac_status); } &&
13716 { ac_try='test -s conftest.$ac_objext'
13717 { (eval echo "$as_me:13717: \"$ac_try\"") >&5
13718 (eval $ac_try) 2>&5
13720 echo "$as_me:13720: \$? = $ac_status" >&5
13721 (exit $ac_status); }; }; then
13724 echo "$as_me: failed program was:" >&5
13725 cat conftest.$ac_ext >&5
13727 rm -f conftest.$ac_objext conftest.$ac_ext
13728 cat >conftest.$ac_ext <<_ACEOF
13729 #line 13729 "configure"
13730 #include "confdefs.h"
13731 #define _FILE_OFFSET_BITS 64
13732 #include <sys/types.h>
13733 /* Check that off_t can represent 2**63 - 1 correctly.
13734 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13735 since some C++ compilers masquerading as C compilers
13736 incorrectly reject 9223372036854775807. */
13737 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13738 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13739 && LARGE_OFF_T % 2147483647 == 1)
13749 rm -f conftest.$ac_objext
13750 if { (eval echo "$as_me:13750: \"$ac_compile\"") >&5
13751 (eval $ac_compile) 2>&5
13753 echo "$as_me:13753: \$? = $ac_status" >&5
13754 (exit $ac_status); } &&
13755 { ac_try='test -s conftest.$ac_objext'
13756 { (eval echo "$as_me:13756: \"$ac_try\"") >&5
13757 (eval $ac_try) 2>&5
13759 echo "$as_me:13759: \$? = $ac_status" >&5
13760 (exit $ac_status); }; }; then
13761 ac_cv_sys_file_offset_bits=64; break
13763 echo "$as_me: failed program was:" >&5
13764 cat conftest.$ac_ext >&5
13766 rm -f conftest.$ac_objext conftest.$ac_ext
13770 echo "$as_me:13770: result: $ac_cv_sys_file_offset_bits" >&5
13771 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13772 if test "$ac_cv_sys_file_offset_bits" != no; then
13774 cat >>confdefs.h <<EOF
13775 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13780 echo "$as_me:13780: checking for _LARGE_FILES value needed for large files" >&5
13781 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13782 if test "${ac_cv_sys_large_files+set}" = set; then
13783 echo $ECHO_N "(cached) $ECHO_C" >&6
13786 ac_cv_sys_large_files=no
13787 cat >conftest.$ac_ext <<_ACEOF
13788 #line 13788 "configure"
13789 #include "confdefs.h"
13790 #include <sys/types.h>
13791 /* Check that off_t can represent 2**63 - 1 correctly.
13792 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13793 since some C++ compilers masquerading as C compilers
13794 incorrectly reject 9223372036854775807. */
13795 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13796 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13797 && LARGE_OFF_T % 2147483647 == 1)
13807 rm -f conftest.$ac_objext
13808 if { (eval echo "$as_me:13808: \"$ac_compile\"") >&5
13809 (eval $ac_compile) 2>&5
13811 echo "$as_me:13811: \$? = $ac_status" >&5
13812 (exit $ac_status); } &&
13813 { ac_try='test -s conftest.$ac_objext'
13814 { (eval echo "$as_me:13814: \"$ac_try\"") >&5
13815 (eval $ac_try) 2>&5
13817 echo "$as_me:13817: \$? = $ac_status" >&5
13818 (exit $ac_status); }; }; then
13821 echo "$as_me: failed program was:" >&5
13822 cat conftest.$ac_ext >&5
13824 rm -f conftest.$ac_objext conftest.$ac_ext
13825 cat >conftest.$ac_ext <<_ACEOF
13826 #line 13826 "configure"
13827 #include "confdefs.h"
13828 #define _LARGE_FILES 1
13829 #include <sys/types.h>
13830 /* Check that off_t can represent 2**63 - 1 correctly.
13831 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13832 since some C++ compilers masquerading as C compilers
13833 incorrectly reject 9223372036854775807. */
13834 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13835 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13836 && LARGE_OFF_T % 2147483647 == 1)
13846 rm -f conftest.$ac_objext
13847 if { (eval echo "$as_me:13847: \"$ac_compile\"") >&5
13848 (eval $ac_compile) 2>&5
13850 echo "$as_me:13850: \$? = $ac_status" >&5
13851 (exit $ac_status); } &&
13852 { ac_try='test -s conftest.$ac_objext'
13853 { (eval echo "$as_me:13853: \"$ac_try\"") >&5
13854 (eval $ac_try) 2>&5
13856 echo "$as_me:13856: \$? = $ac_status" >&5
13857 (exit $ac_status); }; }; then
13858 ac_cv_sys_large_files=1; break
13860 echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13863 rm -f conftest.$ac_objext conftest.$ac_ext
13867 echo "$as_me:13867: result: $ac_cv_sys_large_files" >&5
13868 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13869 if test "$ac_cv_sys_large_files" != no; then
13871 cat >>confdefs.h <<EOF
13872 #define _LARGE_FILES $ac_cv_sys_large_files
13879 if test "$enable_largefile" != no ; then
13880 echo "$as_me:13880: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13881 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13882 if test "${ac_cv_sys_largefile_source+set}" = set; then
13883 echo $ECHO_N "(cached) $ECHO_C" >&6
13886 ac_cv_sys_largefile_source=no
13887 cat >conftest.$ac_ext <<_ACEOF
13888 #line 13888 "configure"
13889 #include "confdefs.h"
13899 rm -f conftest.$ac_objext
13900 if { (eval echo "$as_me:13900: \"$ac_compile\"") >&5
13901 (eval $ac_compile) 2>&5
13903 echo "$as_me:13903: \$? = $ac_status" >&5
13904 (exit $ac_status); } &&
13905 { ac_try='test -s conftest.$ac_objext'
13906 { (eval echo "$as_me:13906: \"$ac_try\"") >&5
13907 (eval $ac_try) 2>&5
13909 echo "$as_me:13909: \$? = $ac_status" >&5
13910 (exit $ac_status); }; }; then
13913 echo "$as_me: failed program was:" >&5
13914 cat conftest.$ac_ext >&5
13916 rm -f conftest.$ac_objext conftest.$ac_ext
13917 cat >conftest.$ac_ext <<_ACEOF
13918 #line 13918 "configure"
13919 #include "confdefs.h"
13920 #define _LARGEFILE_SOURCE 1
13930 rm -f conftest.$ac_objext
13931 if { (eval echo "$as_me:13931: \"$ac_compile\"") >&5
13932 (eval $ac_compile) 2>&5
13934 echo "$as_me:13934: \$? = $ac_status" >&5
13935 (exit $ac_status); } &&
13936 { ac_try='test -s conftest.$ac_objext'
13937 { (eval echo "$as_me:13937: \"$ac_try\"") >&5
13938 (eval $ac_try) 2>&5
13940 echo "$as_me:13940: \$? = $ac_status" >&5
13941 (exit $ac_status); }; }; then
13942 ac_cv_sys_largefile_source=1; break
13944 echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13947 rm -f conftest.$ac_objext conftest.$ac_ext
13951 echo "$as_me:13951: result: $ac_cv_sys_largefile_source" >&5
13952 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13953 if test "$ac_cv_sys_largefile_source" != no; then
13955 cat >>confdefs.h <<EOF
13956 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13962 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13963 # in glibc 2.1.3, but that breaks too many other things.
13964 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13965 echo "$as_me:13965: checking for fseeko" >&5
13966 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13967 if test "${ac_cv_func_fseeko+set}" = set; then
13968 echo $ECHO_N "(cached) $ECHO_C" >&6
13970 cat >conftest.$ac_ext <<_ACEOF
13971 #line 13971 "configure"
13972 #include "confdefs.h"
13977 return fseeko && fseeko (stdin, 0, 0);
13982 rm -f conftest.$ac_objext conftest$ac_exeext
13983 if { (eval echo "$as_me:13983: \"$ac_link\"") >&5
13984 (eval $ac_link) 2>&5
13986 echo "$as_me:13986: \$? = $ac_status" >&5
13987 (exit $ac_status); } &&
13988 { ac_try='test -s conftest$ac_exeext'
13989 { (eval echo "$as_me:13989: \"$ac_try\"") >&5
13990 (eval $ac_try) 2>&5
13992 echo "$as_me:13992: \$? = $ac_status" >&5
13993 (exit $ac_status); }; }; then
13994 ac_cv_func_fseeko=yes
13996 echo "$as_me: failed program was:" >&5
13997 cat conftest.$ac_ext >&5
13998 ac_cv_func_fseeko=no
14000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14002 echo "$as_me:14002: result: $ac_cv_func_fseeko" >&5
14003 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14004 if test $ac_cv_func_fseeko = yes; then
14006 cat >>confdefs.h <<\EOF
14007 #define HAVE_FSEEKO 1
14012 # Normally we would collect these definitions in the config.h,
14013 # but (like _XOPEN_SOURCE), some environments rely on having these
14014 # defined before any of the system headers are included. Another
14015 # case comes up with C++, e.g., on AIX the compiler compiles the
14016 # header files by themselves before looking at the body files it is
14017 # told to compile. For ncurses, those header files do not include
14019 if test "$ac_cv_sys_large_files" != no
14022 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14023 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14026 if test "$ac_cv_sys_largefile_source" != no
14029 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14030 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14033 if test "$ac_cv_sys_file_offset_bits" != no
14036 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14037 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14041 echo "$as_me:14041: checking whether to use struct dirent64" >&5
14042 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14043 if test "${cf_cv_struct_dirent64+set}" = set; then
14044 echo $ECHO_N "(cached) $ECHO_C" >&6
14047 cat >conftest.$ac_ext <<_ACEOF
14048 #line 14048 "configure"
14049 #include "confdefs.h"
14051 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14052 #include <sys/types.h>
14053 #include <dirent.h>
14059 /* if transitional largefile support is setup, this is true */
14060 extern struct dirent64 * readdir(DIR *);
14061 struct dirent64 *x = readdir((DIR *)0);
14062 struct dirent *y = readdir((DIR *)0);
14070 rm -f conftest.$ac_objext
14071 if { (eval echo "$as_me:14071: \"$ac_compile\"") >&5
14072 (eval $ac_compile) 2>&5
14074 echo "$as_me:14074: \$? = $ac_status" >&5
14075 (exit $ac_status); } &&
14076 { ac_try='test -s conftest.$ac_objext'
14077 { (eval echo "$as_me:14077: \"$ac_try\"") >&5
14078 (eval $ac_try) 2>&5
14080 echo "$as_me:14080: \$? = $ac_status" >&5
14081 (exit $ac_status); }; }; then
14082 cf_cv_struct_dirent64=yes
14084 echo "$as_me: failed program was:" >&5
14085 cat conftest.$ac_ext >&5
14086 cf_cv_struct_dirent64=no
14088 rm -f conftest.$ac_objext conftest.$ac_ext
14091 echo "$as_me:14091: result: $cf_cv_struct_dirent64" >&5
14092 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14093 test "$cf_cv_struct_dirent64" = yes &&
14094 cat >>confdefs.h <<\EOF
14095 #define HAVE_STRUCT_DIRENT64 1
14100 ### Enable compiling-in rcs id's
14101 echo "$as_me:14101: checking if RCS identifiers should be compiled-in" >&5
14102 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14104 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14105 if test "${with_rcs_ids+set}" = set; then
14106 withval="$with_rcs_ids"
14107 with_rcs_ids=$withval
14111 echo "$as_me:14111: result: $with_rcs_ids" >&5
14112 echo "${ECHO_T}$with_rcs_ids" >&6
14113 test "$with_rcs_ids" = yes &&
14114 cat >>confdefs.h <<\EOF
14115 #define USE_RCS_IDS 1
14118 ###############################################################################
14120 ### Note that some functions (such as const) are normally disabled anyway.
14121 echo "$as_me:14121: checking if you want to build with function extensions" >&5
14122 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14124 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14125 if test "${enable_ext_funcs+set}" = set; then
14126 enableval="$enable_ext_funcs"
14127 with_ext_funcs=$enableval
14131 echo "$as_me:14131: result: $with_ext_funcs" >&5
14132 echo "${ECHO_T}$with_ext_funcs" >&6
14133 if test "$with_ext_funcs" = yes ; then
14134 NCURSES_EXT_FUNCS=1
14136 cat >>confdefs.h <<\EOF
14137 #define HAVE_USE_DEFAULT_COLORS 1
14140 cat >>confdefs.h <<\EOF
14141 #define NCURSES_EXT_FUNCS 1
14145 NCURSES_EXT_FUNCS=0
14148 ### use option --enable-const to turn on use of const beyond that in XSI.
14149 echo "$as_me:14149: checking for extended use of const keyword" >&5
14150 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14152 # Check whether --enable-const or --disable-const was given.
14153 if test "${enable_const+set}" = set; then
14154 enableval="$enable_const"
14155 with_ext_const=$enableval
14159 echo "$as_me:14159: result: $with_ext_const" >&5
14160 echo "${ECHO_T}$with_ext_const" >&6
14161 NCURSES_CONST='/*nothing*/'
14162 if test "$with_ext_const" = yes ; then
14163 NCURSES_CONST=const
14166 ###############################################################################
14167 # These options are relatively safe to experiment with.
14169 echo "$as_me:14169: checking if you want all development code" >&5
14170 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14172 # Check whether --with-develop or --without-develop was given.
14173 if test "${with_develop+set}" = set; then
14174 withval="$with_develop"
14175 with_develop=$withval
14179 echo "$as_me:14179: result: $with_develop" >&5
14180 echo "${ECHO_T}$with_develop" >&6
14182 ###############################################################################
14183 # These are just experimental, probably should not be in a package:
14185 # This is still experimental (20080329), but should ultimately be moved to
14186 # the script-block --with-normal, etc.
14188 echo "$as_me:14188: checking if you want to link with the pthread library" >&5
14189 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14191 # Check whether --with-pthread or --without-pthread was given.
14192 if test "${with_pthread+set}" = set; then
14193 withval="$with_pthread"
14194 with_pthread=$withval
14198 echo "$as_me:14198: result: $with_pthread" >&5
14199 echo "${ECHO_T}$with_pthread" >&6
14201 if test "$with_pthread" != no ; then
14202 echo "$as_me:14202: checking for pthread.h" >&5
14203 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14204 if test "${ac_cv_header_pthread_h+set}" = set; then
14205 echo $ECHO_N "(cached) $ECHO_C" >&6
14207 cat >conftest.$ac_ext <<_ACEOF
14208 #line 14208 "configure"
14209 #include "confdefs.h"
14210 #include <pthread.h>
14212 if { (eval echo "$as_me:14212: \"$ac_cpp conftest.$ac_ext\"") >&5
14213 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14215 egrep -v '^ *\+' conftest.er1 >conftest.err
14217 cat conftest.err >&5
14218 echo "$as_me:14218: \$? = $ac_status" >&5
14219 (exit $ac_status); } >/dev/null; then
14220 if test -s conftest.err; then
14221 ac_cpp_err=$ac_c_preproc_warn_flag
14228 if test -z "$ac_cpp_err"; then
14229 ac_cv_header_pthread_h=yes
14231 echo "$as_me: failed program was:" >&5
14232 cat conftest.$ac_ext >&5
14233 ac_cv_header_pthread_h=no
14235 rm -f conftest.err conftest.$ac_ext
14237 echo "$as_me:14237: result: $ac_cv_header_pthread_h" >&5
14238 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14239 if test $ac_cv_header_pthread_h = yes; then
14241 cat >>confdefs.h <<\EOF
14242 #define HAVE_PTHREADS_H 1
14245 for cf_lib_pthread in pthread c_r
14247 echo "$as_me:14247: checking if we can link with the $cf_lib_pthread library" >&5
14248 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14249 cf_save_LIBS="$LIBS"
14251 cf_add_libs="$LIBS"
14254 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14255 # filter duplicates
14256 for cf_add_1lib in $cf_add_0lib; do
14257 for cf_add_2lib in $cf_add_libs; do
14258 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14263 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14265 LIBS="$cf_add_libs"
14267 cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14271 #include <pthread.h>
14277 int rc = pthread_create(0,0,0,0);
14278 int r2 = pthread_mutexattr_settype(0, 0);
14284 rm -f conftest.$ac_objext conftest$ac_exeext
14285 if { (eval echo "$as_me:14285: \"$ac_link\"") >&5
14286 (eval $ac_link) 2>&5
14288 echo "$as_me:14288: \$? = $ac_status" >&5
14289 (exit $ac_status); } &&
14290 { ac_try='test -s conftest$ac_exeext'
14291 { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292 (eval $ac_try) 2>&5
14294 echo "$as_me:14294: \$? = $ac_status" >&5
14295 (exit $ac_status); }; }; then
14298 echo "$as_me: failed program was:" >&5
14299 cat conftest.$ac_ext >&5
14302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14303 LIBS="$cf_save_LIBS"
14304 echo "$as_me:14304: result: $with_pthread" >&5
14305 echo "${ECHO_T}$with_pthread" >&6
14306 test "$with_pthread" = yes && break
14309 if test "$with_pthread" = yes ; then
14311 cf_add_libs="$LIBS"
14314 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14315 # filter duplicates
14316 for cf_add_1lib in $cf_add_0lib; do
14317 for cf_add_2lib in $cf_add_libs; do
14318 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14323 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14325 LIBS="$cf_add_libs"
14327 cat >>confdefs.h <<\EOF
14328 #define HAVE_LIBPTHREADS 1
14332 { { echo "$as_me:14332: error: Cannot link with pthread library" >&5
14333 echo "$as_me: error: Cannot link with pthread library" >&2;}
14334 { (exit 1); exit 1; }; }
14341 echo "$as_me:14341: checking if you want to use weak-symbols for pthreads" >&5
14342 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14344 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14345 if test "${enable_weak_symbols+set}" = set; then
14346 enableval="$enable_weak_symbols"
14347 use_weak_symbols=$withval
14349 use_weak_symbols=no
14351 echo "$as_me:14351: result: $use_weak_symbols" >&5
14352 echo "${ECHO_T}$use_weak_symbols" >&6
14353 if test "$use_weak_symbols" = yes ; then
14355 echo "$as_me:14355: checking if $CC supports weak symbols" >&5
14356 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14357 if test "${cf_cv_weak_symbols+set}" = set; then
14358 echo $ECHO_N "(cached) $ECHO_C" >&6
14361 cat >conftest.$ac_ext <<_ACEOF
14362 #line 14362 "configure"
14363 #include "confdefs.h"
14370 #if defined(__GNUC__)
14371 # if defined __USE_ISOC99
14372 # define _cat_pragma(exp) _Pragma(#exp)
14373 # define _weak_pragma(exp) _cat_pragma(weak name)
14375 # define _weak_pragma(exp)
14377 # define _declare(name) __extension__ extern __typeof__(name) name
14378 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14381 weak_symbol(fopen);
14387 rm -f conftest.$ac_objext
14388 if { (eval echo "$as_me:14388: \"$ac_compile\"") >&5
14389 (eval $ac_compile) 2>&5
14391 echo "$as_me:14391: \$? = $ac_status" >&5
14392 (exit $ac_status); } &&
14393 { ac_try='test -s conftest.$ac_objext'
14394 { (eval echo "$as_me:14394: \"$ac_try\"") >&5
14395 (eval $ac_try) 2>&5
14397 echo "$as_me:14397: \$? = $ac_status" >&5
14398 (exit $ac_status); }; }; then
14399 cf_cv_weak_symbols=yes
14401 echo "$as_me: failed program was:" >&5
14402 cat conftest.$ac_ext >&5
14403 cf_cv_weak_symbols=no
14405 rm -f conftest.$ac_objext conftest.$ac_ext
14408 echo "$as_me:14408: result: $cf_cv_weak_symbols" >&5
14409 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14412 cf_cv_weak_symbols=no
14415 if test $cf_cv_weak_symbols = yes ; then
14417 cat >>confdefs.h <<\EOF
14418 #define USE_WEAK_SYMBOLS 1
14424 if test "$with_pthread" = "yes" ; then
14426 cat >>confdefs.h <<\EOF
14427 #define USE_PTHREADS 1
14430 enable_reentrant=yes
14431 if test $cf_cv_weak_symbols = yes ; then
14436 # OpenSUSE is installing ncurses6, using reentrant option.
14437 echo "$as_me:14437: checking for _nc_TABSIZE" >&5
14438 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14439 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14440 echo $ECHO_N "(cached) $ECHO_C" >&6
14442 cat >conftest.$ac_ext <<_ACEOF
14443 #line 14443 "configure"
14444 #include "confdefs.h"
14445 #define _nc_TABSIZE autoconf_temporary
14446 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14453 /* We use char because int might match the return type of a gcc2
14454 builtin and then its argument prototype would still apply. */
14455 char _nc_TABSIZE (void);
14461 /* The GNU C library defines stubs for functions which it implements
14462 to always fail with ENOSYS. Some functions are actually named
14463 something starting with __ and the normal name is an alias. */
14464 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14465 #error found stub for _nc_TABSIZE
14468 return _nc_TABSIZE ();
14473 rm -f conftest.$ac_objext conftest$ac_exeext
14474 if { (eval echo "$as_me:14474: \"$ac_link\"") >&5
14475 (eval $ac_link) 2>&5
14477 echo "$as_me:14477: \$? = $ac_status" >&5
14478 (exit $ac_status); } &&
14479 { ac_try='test -s conftest$ac_exeext'
14480 { (eval echo "$as_me:14480: \"$ac_try\"") >&5
14481 (eval $ac_try) 2>&5
14483 echo "$as_me:14483: \$? = $ac_status" >&5
14484 (exit $ac_status); }; }; then
14485 ac_cv_func__nc_TABSIZE=yes
14487 echo "$as_me: failed program was:" >&5
14488 cat conftest.$ac_ext >&5
14489 ac_cv_func__nc_TABSIZE=no
14491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14493 echo "$as_me:14493: result: $ac_cv_func__nc_TABSIZE" >&5
14494 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14495 if test $ac_cv_func__nc_TABSIZE = yes; then
14496 assume_reentrant=yes
14498 assume_reentrant=no
14501 # Reentrant code has to be opaque; there's little advantage to making ncurses
14502 # opaque outside of that, so there is no --enable-opaque option. We can use
14503 # this option without --with-pthreads, but this will be always set for
14505 echo "$as_me:14505: checking if you want experimental reentrant code" >&5
14506 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14508 # Check whether --enable-reentrant or --disable-reentrant was given.
14509 if test "${enable_reentrant+set}" = set; then
14510 enableval="$enable_reentrant"
14511 with_reentrant=$enableval
14513 with_reentrant=$assume_reentrant
14515 echo "$as_me:14515: result: $with_reentrant" >&5
14516 echo "${ECHO_T}$with_reentrant" >&6
14517 if test "$with_reentrant" = yes ; then
14518 cf_cv_enable_reentrant=1
14519 if test $cf_cv_weak_symbols = yes ; then
14521 # remove pthread library from $LIBS
14522 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14524 elif test "$assume_reentrant" = no ; then
14525 LIB_SUFFIX="t${LIB_SUFFIX}"
14528 cat >>confdefs.h <<\EOF
14529 #define USE_REENTRANT 1
14533 cf_cv_enable_reentrant=0
14536 ### Allow using a different wrap-prefix
14537 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14538 echo "$as_me:14538: checking for prefix used to wrap public variables" >&5
14539 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14541 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14542 if test "${with_wrap_prefix+set}" = set; then
14543 withval="$with_wrap_prefix"
14544 NCURSES_WRAP_PREFIX=$withval
14546 NCURSES_WRAP_PREFIX=_nc_
14548 echo "$as_me:14548: result: $NCURSES_WRAP_PREFIX" >&5
14549 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14551 NCURSES_WRAP_PREFIX=_nc_
14554 cat >>confdefs.h <<EOF
14555 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14558 ###############################################################################
14560 ### use option --disable-echo to suppress full display compiling commands
14562 echo "$as_me:14562: checking if you want to see long compiling messages" >&5
14563 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14565 # Check whether --enable-echo or --disable-echo was given.
14566 if test "${enable_echo+set}" = set; then
14567 enableval="$enable_echo"
14568 test "$enableval" != no && enableval=yes
14569 if test "$enableval" != "yes" ; then
14572 ECHO_LD='@echo linking $@;'
14573 RULE_CC='@echo compiling $<'
14574 SHOW_CC='@echo compiling $@'
14596 echo "$as_me:14596: result: $enableval" >&5
14597 echo "${ECHO_T}$enableval" >&6
14599 ### use option --enable-warnings to turn on all gcc warnings
14600 echo "$as_me:14600: checking if you want to see compiler warnings" >&5
14601 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14603 # Check whether --enable-warnings or --disable-warnings was given.
14604 if test "${enable_warnings+set}" = set; then
14605 enableval="$enable_warnings"
14606 with_warnings=$enableval
14608 echo "$as_me:14608: result: $with_warnings" >&5
14609 echo "${ECHO_T}$with_warnings" >&6
14611 if ( test "$GCC" = yes || test "$GXX" = yes )
14614 if ( test "$GCC" = yes || test "$GXX" = yes )
14618 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14620 echo "${as_me:-configure}:14620: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14623 for cf_temp_scan in $CFLAGS
14625 case "x$cf_temp_scan" in
14628 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14629 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14634 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14635 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14640 CFLAGS="$cf_temp_flags"
14641 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14643 echo "${as_me:-configure}:14643: testing ... fixed $CFLAGS ..." 1>&5
14645 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14647 echo "${as_me:-configure}:14647: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14653 if ( test "$GCC" = yes || test "$GXX" = yes )
14657 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14659 echo "${as_me:-configure}:14659: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14662 for cf_temp_scan in $CPPFLAGS
14664 case "x$cf_temp_scan" in
14667 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14668 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14673 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14674 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14679 CPPFLAGS="$cf_temp_flags"
14680 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14682 echo "${as_me:-configure}:14682: testing ... fixed $CPPFLAGS ..." 1>&5
14684 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14686 echo "${as_me:-configure}:14686: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14692 if ( test "$GCC" = yes || test "$GXX" = yes )
14696 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
14698 echo "${as_me:-configure}:14698: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
14701 for cf_temp_scan in $LDFLAGS
14703 case "x$cf_temp_scan" in
14706 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14707 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14712 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14713 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14718 LDFLAGS="$cf_temp_flags"
14719 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
14721 echo "${as_me:-configure}:14721: testing ... fixed $LDFLAGS ..." 1>&5
14723 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14725 echo "${as_me:-configure}:14725: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14731 echo "$as_me:14731: checking if you want to turn on gcc warnings" >&5
14732 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
14734 # Check whether --enable-warnings or --disable-warnings was given.
14735 if test "${enable_warnings+set}" = set; then
14736 enableval="$enable_warnings"
14737 test "$enableval" != yes && enableval=no
14738 if test "$enableval" != "no" ; then
14748 echo "$as_me:14748: result: $with_warnings" >&5
14749 echo "${ECHO_T}$with_warnings" >&6
14750 if test "$with_warnings" = "yes"
14753 if test "x$have_x" = xyes; then
14755 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
14756 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
14757 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
14758 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14759 for cf_X_CFLAGS in $X_CFLAGS
14761 case "x$cf_X_CFLAGS" in
14763 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14766 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14771 cat >conftest.$ac_ext <<_ACEOF
14772 #line 14772 "configure"
14773 #include "confdefs.h"
14775 #include <stdlib.h>
14776 #include <X11/Intrinsic.h>
14781 String foo = malloc(1); (void)foo
14786 rm -f conftest.$ac_objext
14787 if { (eval echo "$as_me:14787: \"$ac_compile\"") >&5
14788 (eval $ac_compile) 2>&5
14790 echo "$as_me:14790: \$? = $ac_status" >&5
14791 (exit $ac_status); } &&
14792 { ac_try='test -s conftest.$ac_objext'
14793 { (eval echo "$as_me:14793: \"$ac_try\"") >&5
14794 (eval $ac_try) 2>&5
14796 echo "$as_me:14796: \$? = $ac_status" >&5
14797 (exit $ac_status); }; }; then
14799 echo "$as_me:14799: checking for X11/Xt const-feature" >&5
14800 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
14801 if test "${cf_cv_const_x_string+set}" = set; then
14802 echo $ECHO_N "(cached) $ECHO_C" >&6
14805 cat >conftest.$ac_ext <<_ACEOF
14806 #line 14806 "configure"
14807 #include "confdefs.h"
14809 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
14810 #undef XTSTRINGDEFINES /* X11R5 and later */
14811 #include <stdlib.h>
14812 #include <X11/Intrinsic.h>
14817 String foo = malloc(1); *foo = 0
14822 rm -f conftest.$ac_objext
14823 if { (eval echo "$as_me:14823: \"$ac_compile\"") >&5
14824 (eval $ac_compile) 2>&5
14826 echo "$as_me:14826: \$? = $ac_status" >&5
14827 (exit $ac_status); } &&
14828 { ac_try='test -s conftest.$ac_objext'
14829 { (eval echo "$as_me:14829: \"$ac_try\"") >&5
14830 (eval $ac_try) 2>&5
14832 echo "$as_me:14832: \$? = $ac_status" >&5
14833 (exit $ac_status); }; }; then
14835 cf_cv_const_x_string=no
14838 echo "$as_me: failed program was:" >&5
14839 cat conftest.$ac_ext >&5
14841 cf_cv_const_x_string=yes
14844 rm -f conftest.$ac_objext conftest.$ac_ext
14847 echo "$as_me:14847: result: $cf_cv_const_x_string" >&5
14848 echo "${ECHO_T}$cf_cv_const_x_string" >&6
14850 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
14851 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
14852 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
14854 case $cf_cv_const_x_string in
14857 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14858 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
14863 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14864 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
14870 echo "$as_me: failed program was:" >&5
14871 cat conftest.$ac_ext >&5
14873 rm -f conftest.$ac_objext conftest.$ac_ext
14875 cat > conftest.$ac_ext <<EOF
14876 #line 14876 "${as_me:-configure}"
14877 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14879 if test "$INTEL_COMPILER" = yes
14881 # The "-wdXXX" options suppress warnings:
14882 # remark #1419: external declaration in primary source file
14883 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14884 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14885 # remark #193: zero used for undefined preprocessing identifier
14886 # remark #593: variable "curs_sb_left_arrow" was set but never used
14887 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14888 # remark #869: parameter "tw" was never referenced
14889 # remark #981: operands are evaluated in unspecified order
14890 # warning #279: controlling expression is constant
14892 { echo "$as_me:14892: checking for $CC warning options..." >&5
14893 echo "$as_me: checking for $CC warning options..." >&6;}
14894 cf_save_CFLAGS="$CFLAGS"
14895 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
14907 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14908 if { (eval echo "$as_me:14908: \"$ac_compile\"") >&5
14909 (eval $ac_compile) 2>&5
14911 echo "$as_me:14911: \$? = $ac_status" >&5
14912 (exit $ac_status); }; then
14913 test -n "$verbose" && echo "$as_me:14913: result: ... -$cf_opt" >&5
14914 echo "${ECHO_T}... -$cf_opt" >&6
14915 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14918 CFLAGS="$cf_save_CFLAGS"
14919 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
14921 { echo "$as_me:14921: checking for $CC warning options..." >&5
14922 echo "$as_me: checking for $CC warning options..." >&6;}
14923 cf_save_CFLAGS="$CFLAGS"
14925 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14926 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14927 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14928 for cf_opt in W Wall \
14929 Wbad-function-cast \
14932 Wdeclaration-after-statement \
14935 Wmissing-declarations \
14936 Wmissing-prototypes \
14940 Wstrict-prototypes \
14941 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
14943 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14944 if { (eval echo "$as_me:14944: \"$ac_compile\"") >&5
14945 (eval $ac_compile) 2>&5
14947 echo "$as_me:14947: \$? = $ac_status" >&5
14948 (exit $ac_status); }; then
14949 test -n "$verbose" && echo "$as_me:14949: result: ... -$cf_opt" >&5
14950 echo "${ECHO_T}... -$cf_opt" >&6
14953 case $GCC_VERSION in
14955 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
14957 echo "${as_me:-configure}:14957: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14963 case $GCC_VERSION in
14965 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
14967 echo "${as_me:-configure}:14967: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14973 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14976 CFLAGS="$cf_save_CFLAGS"
14982 if ( test "$GCC" = yes || test "$GXX" = yes )
14984 cat > conftest.i <<EOF
14986 #define GCC_PRINTF 0
14989 #define GCC_SCANF 0
14991 #ifndef GCC_NORETURN
14992 #define GCC_NORETURN /* nothing */
14995 #define GCC_UNUSED /* nothing */
14998 if test "$GCC" = yes
15000 { echo "$as_me:15000: checking for $CC __attribute__ directives..." >&5
15001 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15002 cat > conftest.$ac_ext <<EOF
15003 #line 15003 "${as_me:-configure}"
15004 #include "confdefs.h"
15005 #include "conftest.h"
15006 #include "conftest.i"
15008 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15010 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15013 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15015 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15017 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15018 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15019 extern void foo(void) GCC_NORETURN;
15020 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15022 cf_printf_attribute=no
15023 cf_scanf_attribute=no
15024 for cf_attribute in scanf printf unused noreturn
15027 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15029 cf_directive="__attribute__(($cf_attribute))"
15030 echo "checking for $CC $cf_directive" 1>&5
15032 case $cf_attribute in
15034 cf_printf_attribute=yes
15035 cat >conftest.h <<EOF
15036 #define GCC_$cf_ATTRIBUTE 1
15040 cf_scanf_attribute=yes
15041 cat >conftest.h <<EOF
15042 #define GCC_$cf_ATTRIBUTE 1
15046 cat >conftest.h <<EOF
15047 #define GCC_$cf_ATTRIBUTE $cf_directive
15052 if { (eval echo "$as_me:15052: \"$ac_compile\"") >&5
15053 (eval $ac_compile) 2>&5
15055 echo "$as_me:15055: \$? = $ac_status" >&5
15056 (exit $ac_status); }; then
15057 test -n "$verbose" && echo "$as_me:15057: result: ... $cf_attribute" >&5
15058 echo "${ECHO_T}... $cf_attribute" >&6
15059 cat conftest.h >>confdefs.h
15060 case $cf_attribute in
15063 cat >>confdefs.h <<EOF
15064 #define GCC_NORETURN $cf_directive
15069 cf_value='/* nothing */'
15070 if test "$cf_printf_attribute" != no ; then
15071 cf_value='__attribute__((format(printf,fmt,var)))'
15073 cat >>confdefs.h <<\EOF
15074 #define GCC_PRINTF 1
15079 cat >>confdefs.h <<EOF
15080 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15085 cf_value='/* nothing */'
15086 if test "$cf_scanf_attribute" != no ; then
15087 cf_value='__attribute__((format(scanf,fmt,var)))'
15089 cat >>confdefs.h <<\EOF
15090 #define GCC_SCANF 1
15095 cat >>confdefs.h <<EOF
15096 #define GCC_SCANFLIKE(fmt,var) $cf_value
15102 cat >>confdefs.h <<EOF
15103 #define GCC_UNUSED $cf_directive
15111 fgrep define conftest.i >>confdefs.h
15118 if test "x$with_warnings" = "xyes"; then
15120 ADAFLAGS="$ADAFLAGS -gnatg"
15124 ### use option --enable-assertions to turn on generation of assertion code
15125 echo "$as_me:15125: checking if you want to enable runtime assertions" >&5
15126 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15128 # Check whether --enable-assertions or --disable-assertions was given.
15129 if test "${enable_assertions+set}" = set; then
15130 enableval="$enable_assertions"
15131 with_assertions=$enableval
15135 echo "$as_me:15135: result: $with_assertions" >&5
15136 echo "${ECHO_T}$with_assertions" >&6
15139 if test "$with_assertions" = no
15141 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15144 ADAFLAGS="$ADAFLAGS -gnata"
15149 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15151 cat >>confdefs.h <<\EOF
15152 #define HAVE_NC_ALLOC_H 1
15155 ### use option --enable-expanded to generate certain macros as functions
15157 # Check whether --enable-expanded or --disable-expanded was given.
15158 if test "${enable_expanded+set}" = set; then
15159 enableval="$enable_expanded"
15160 test "$enableval" = yes &&
15161 cat >>confdefs.h <<\EOF
15162 #define NCURSES_EXPANDED 1
15167 ### use option --disable-macros to suppress macros in favor of functions
15169 # Check whether --enable-macros or --disable-macros was given.
15170 if test "${enable_macros+set}" = set; then
15171 enableval="$enable_macros"
15172 test "$enableval" = no &&
15173 cat >>confdefs.h <<\EOF
15174 #define NCURSES_NOMACROS 1
15179 # Normally we only add trace() to the debug-library. Allow this to be
15180 # extended to all models of the ncurses library:
15182 case "$CFLAGS $CPPFLAGS" in
15188 echo "$as_me:15188: checking whether to add trace feature to all models" >&5
15189 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15191 # Check whether --with-trace or --without-trace was given.
15192 if test "${with_trace+set}" = set; then
15193 withval="$with_trace"
15194 cf_with_trace=$withval
15196 cf_with_trace=$cf_all_traces
15198 echo "$as_me:15198: result: $cf_with_trace" >&5
15199 echo "${ECHO_T}$cf_with_trace" >&6
15201 if test "$cf_with_trace" = yes ; then
15207 cf_new_extra_cppflags=
15209 for cf_add_cflags in -DTRACE
15211 case $cf_fix_cppflags in
15213 case $cf_add_cflags in
15214 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15215 case $cf_add_cflags in
15217 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15219 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15220 && test -z "${cf_tst_cflags}" \
15221 && cf_fix_cppflags=yes
15223 if test $cf_fix_cppflags = yes ; then
15225 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15226 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15229 elif test "${cf_tst_cflags}" = "\"'" ; then
15231 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15232 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15238 case "$CPPFLAGS" in
15242 case $cf_add_cflags in
15244 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15246 CPPFLAGS=`echo "$CPPFLAGS" | \
15247 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15248 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15253 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15254 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15261 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15262 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15272 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15274 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15275 && test -z "${cf_tst_cflags}" \
15276 && cf_fix_cppflags=no
15281 if test -n "$cf_new_cflags" ; then
15283 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15284 CFLAGS="${CFLAGS}$cf_new_cflags"
15288 if test -n "$cf_new_cppflags" ; then
15290 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15291 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15295 if test -n "$cf_new_extra_cppflags" ; then
15297 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15298 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15306 echo "$as_me:15306: checking if we want to use GNAT projects" >&5
15307 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15309 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15310 if test "${enable_gnat_projects+set}" = set; then
15311 enableval="$enable_gnat_projects"
15312 test "$enableval" != no && enableval=yes
15313 if test "$enableval" != "yes" ; then
15314 enable_gnat_projects=no
15316 enable_gnat_projects=yes
15320 enable_gnat_projects=yes
15323 echo "$as_me:15323: result: $enable_gnat_projects" >&5
15324 echo "${ECHO_T}$enable_gnat_projects" >&6
15326 ### Checks for libraries.
15327 case $cf_cv_system_name in
15331 echo "$as_me:15331: checking for gettimeofday" >&5
15332 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15333 if test "${ac_cv_func_gettimeofday+set}" = set; then
15334 echo $ECHO_N "(cached) $ECHO_C" >&6
15336 cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339 #define gettimeofday autoconf_temporary
15340 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15341 #undef gettimeofday
15347 /* We use char because int might match the return type of a gcc2
15348 builtin and then its argument prototype would still apply. */
15349 char gettimeofday (void);
15355 /* The GNU C library defines stubs for functions which it implements
15356 to always fail with ENOSYS. Some functions are actually named
15357 something starting with __ and the normal name is an alias. */
15358 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15359 #error found stub for gettimeofday
15362 return gettimeofday ();
15367 rm -f conftest.$ac_objext conftest$ac_exeext
15368 if { (eval echo "$as_me:15368: \"$ac_link\"") >&5
15369 (eval $ac_link) 2>&5
15371 echo "$as_me:15371: \$? = $ac_status" >&5
15372 (exit $ac_status); } &&
15373 { ac_try='test -s conftest$ac_exeext'
15374 { (eval echo "$as_me:15374: \"$ac_try\"") >&5
15375 (eval $ac_try) 2>&5
15377 echo "$as_me:15377: \$? = $ac_status" >&5
15378 (exit $ac_status); }; }; then
15379 ac_cv_func_gettimeofday=yes
15381 echo "$as_me: failed program was:" >&5
15382 cat conftest.$ac_ext >&5
15383 ac_cv_func_gettimeofday=no
15385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15387 echo "$as_me:15387: result: $ac_cv_func_gettimeofday" >&5
15388 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15389 if test $ac_cv_func_gettimeofday = yes; then
15390 cat >>confdefs.h <<\EOF
15391 #define HAVE_GETTIMEOFDAY 1
15396 echo "$as_me:15396: checking for gettimeofday in -lbsd" >&5
15397 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15398 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15399 echo $ECHO_N "(cached) $ECHO_C" >&6
15401 ac_check_lib_save_LIBS=$LIBS
15403 cat >conftest.$ac_ext <<_ACEOF
15404 #line 15404 "configure"
15405 #include "confdefs.h"
15407 /* Override any gcc2 internal prototype to avoid an error. */
15411 /* We use char because int might match the return type of a gcc2
15412 builtin and then its argument prototype would still apply. */
15413 char gettimeofday ();
15422 rm -f conftest.$ac_objext conftest$ac_exeext
15423 if { (eval echo "$as_me:15423: \"$ac_link\"") >&5
15424 (eval $ac_link) 2>&5
15426 echo "$as_me:15426: \$? = $ac_status" >&5
15427 (exit $ac_status); } &&
15428 { ac_try='test -s conftest$ac_exeext'
15429 { (eval echo "$as_me:15429: \"$ac_try\"") >&5
15430 (eval $ac_try) 2>&5
15432 echo "$as_me:15432: \$? = $ac_status" >&5
15433 (exit $ac_status); }; }; then
15434 ac_cv_lib_bsd_gettimeofday=yes
15436 echo "$as_me: failed program was:" >&5
15437 cat conftest.$ac_ext >&5
15438 ac_cv_lib_bsd_gettimeofday=no
15440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15441 LIBS=$ac_check_lib_save_LIBS
15443 echo "$as_me:15443: result: $ac_cv_lib_bsd_gettimeofday" >&5
15444 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15445 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_GETTIMEOFDAY 1
15458 ### Checks for header files.
15459 echo "$as_me:15459: checking for ANSI C header files" >&5
15460 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15461 if test "${ac_cv_header_stdc+set}" = set; then
15462 echo $ECHO_N "(cached) $ECHO_C" >&6
15464 cat >conftest.$ac_ext <<_ACEOF
15465 #line 15465 "configure"
15466 #include "confdefs.h"
15467 #include <stdlib.h>
15468 #include <stdarg.h>
15469 #include <string.h>
15473 if { (eval echo "$as_me:15473: \"$ac_cpp conftest.$ac_ext\"") >&5
15474 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15476 egrep -v '^ *\+' conftest.er1 >conftest.err
15478 cat conftest.err >&5
15479 echo "$as_me:15479: \$? = $ac_status" >&5
15480 (exit $ac_status); } >/dev/null; then
15481 if test -s conftest.err; then
15482 ac_cpp_err=$ac_c_preproc_warn_flag
15489 if test -z "$ac_cpp_err"; then
15490 ac_cv_header_stdc=yes
15492 echo "$as_me: failed program was:" >&5
15493 cat conftest.$ac_ext >&5
15494 ac_cv_header_stdc=no
15496 rm -f conftest.err conftest.$ac_ext
15498 if test $ac_cv_header_stdc = yes; then
15499 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15500 cat >conftest.$ac_ext <<_ACEOF
15501 #line 15501 "configure"
15502 #include "confdefs.h"
15503 #include <string.h>
15506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15507 egrep "memchr" >/dev/null 2>&1; then
15510 ac_cv_header_stdc=no
15516 if test $ac_cv_header_stdc = yes; then
15517 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15518 cat >conftest.$ac_ext <<_ACEOF
15519 #line 15519 "configure"
15520 #include "confdefs.h"
15521 #include <stdlib.h>
15524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15525 egrep "free" >/dev/null 2>&1; then
15528 ac_cv_header_stdc=no
15534 if test $ac_cv_header_stdc = yes; then
15535 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15536 if test "$cross_compiling" = yes; then
15539 cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15543 #if ((' ' & 0x0FF) == 0x020)
15544 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15545 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15547 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15548 || ('j' <= (c) && (c) <= 'r') \
15549 || ('s' <= (c) && (c) <= 'z'))
15550 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15553 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15558 for (i = 0; i < 256; i++)
15559 if (XOR (islower (i), ISLOWER (i))
15560 || toupper (i) != TOUPPER (i))
15561 $ac_main_return(2);
15562 $ac_main_return (0);
15565 rm -f conftest$ac_exeext
15566 if { (eval echo "$as_me:15566: \"$ac_link\"") >&5
15567 (eval $ac_link) 2>&5
15569 echo "$as_me:15569: \$? = $ac_status" >&5
15570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15571 { (eval echo "$as_me:15571: \"$ac_try\"") >&5
15572 (eval $ac_try) 2>&5
15574 echo "$as_me:15574: \$? = $ac_status" >&5
15575 (exit $ac_status); }; }; then
15578 echo "$as_me: program exited with status $ac_status" >&5
15579 echo "$as_me: failed program was:" >&5
15580 cat conftest.$ac_ext >&5
15581 ac_cv_header_stdc=no
15583 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15587 echo "$as_me:15587: result: $ac_cv_header_stdc" >&5
15588 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15589 if test $ac_cv_header_stdc = yes; then
15591 cat >>confdefs.h <<\EOF
15592 #define STDC_HEADERS 1
15597 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15599 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15600 inttypes.h stdint.h unistd.h
15602 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15603 echo "$as_me:15603: checking for $ac_header" >&5
15604 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15605 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15606 echo $ECHO_N "(cached) $ECHO_C" >&6
15608 cat >conftest.$ac_ext <<_ACEOF
15609 #line 15609 "configure"
15610 #include "confdefs.h"
15611 $ac_includes_default
15612 #include <$ac_header>
15614 rm -f conftest.$ac_objext
15615 if { (eval echo "$as_me:15615: \"$ac_compile\"") >&5
15616 (eval $ac_compile) 2>&5
15618 echo "$as_me:15618: \$? = $ac_status" >&5
15619 (exit $ac_status); } &&
15620 { ac_try='test -s conftest.$ac_objext'
15621 { (eval echo "$as_me:15621: \"$ac_try\"") >&5
15622 (eval $ac_try) 2>&5
15624 echo "$as_me:15624: \$? = $ac_status" >&5
15625 (exit $ac_status); }; }; then
15626 eval "$as_ac_Header=yes"
15628 echo "$as_me: failed program was:" >&5
15629 cat conftest.$ac_ext >&5
15630 eval "$as_ac_Header=no"
15632 rm -f conftest.$ac_objext conftest.$ac_ext
15634 echo "$as_me:15634: result: `eval echo '${'$as_ac_Header'}'`" >&5
15635 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15636 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15637 cat >>confdefs.h <<EOF
15638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15644 echo "$as_me:15644: checking for signed char" >&5
15645 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15646 if test "${ac_cv_type_signed_char+set}" = set; then
15647 echo $ECHO_N "(cached) $ECHO_C" >&6
15649 cat >conftest.$ac_ext <<_ACEOF
15650 #line 15650 "configure"
15651 #include "confdefs.h"
15652 $ac_includes_default
15656 if ((signed char *) 0)
15658 if (sizeof (signed char))
15664 rm -f conftest.$ac_objext
15665 if { (eval echo "$as_me:15665: \"$ac_compile\"") >&5
15666 (eval $ac_compile) 2>&5
15668 echo "$as_me:15668: \$? = $ac_status" >&5
15669 (exit $ac_status); } &&
15670 { ac_try='test -s conftest.$ac_objext'
15671 { (eval echo "$as_me:15671: \"$ac_try\"") >&5
15672 (eval $ac_try) 2>&5
15674 echo "$as_me:15674: \$? = $ac_status" >&5
15675 (exit $ac_status); }; }; then
15676 ac_cv_type_signed_char=yes
15678 echo "$as_me: failed program was:" >&5
15679 cat conftest.$ac_ext >&5
15680 ac_cv_type_signed_char=no
15682 rm -f conftest.$ac_objext conftest.$ac_ext
15684 echo "$as_me:15684: result: $ac_cv_type_signed_char" >&5
15685 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15687 echo "$as_me:15687: checking size of signed char" >&5
15688 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15689 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15690 echo $ECHO_N "(cached) $ECHO_C" >&6
15692 if test "$ac_cv_type_signed_char" = yes; then
15693 if test "$cross_compiling" = yes; then
15694 # Depending upon the size, compute the lo and hi bounds.
15695 cat >conftest.$ac_ext <<_ACEOF
15696 #line 15696 "configure"
15697 #include "confdefs.h"
15698 $ac_includes_default
15702 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15707 rm -f conftest.$ac_objext
15708 if { (eval echo "$as_me:15708: \"$ac_compile\"") >&5
15709 (eval $ac_compile) 2>&5
15711 echo "$as_me:15711: \$? = $ac_status" >&5
15712 (exit $ac_status); } &&
15713 { ac_try='test -s conftest.$ac_objext'
15714 { (eval echo "$as_me:15714: \"$ac_try\"") >&5
15715 (eval $ac_try) 2>&5
15717 echo "$as_me:15717: \$? = $ac_status" >&5
15718 (exit $ac_status); }; }; then
15721 cat >conftest.$ac_ext <<_ACEOF
15722 #line 15722 "configure"
15723 #include "confdefs.h"
15724 $ac_includes_default
15728 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15733 rm -f conftest.$ac_objext
15734 if { (eval echo "$as_me:15734: \"$ac_compile\"") >&5
15735 (eval $ac_compile) 2>&5
15737 echo "$as_me:15737: \$? = $ac_status" >&5
15738 (exit $ac_status); } &&
15739 { ac_try='test -s conftest.$ac_objext'
15740 { (eval echo "$as_me:15740: \"$ac_try\"") >&5
15741 (eval $ac_try) 2>&5
15743 echo "$as_me:15743: \$? = $ac_status" >&5
15744 (exit $ac_status); }; }; then
15745 ac_hi=$ac_mid; break
15747 echo "$as_me: failed program was:" >&5
15748 cat conftest.$ac_ext >&5
15749 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
15751 rm -f conftest.$ac_objext conftest.$ac_ext
15754 echo "$as_me: failed program was:" >&5
15755 cat conftest.$ac_ext >&5
15758 cat >conftest.$ac_ext <<_ACEOF
15759 #line 15759 "configure"
15760 #include "confdefs.h"
15761 $ac_includes_default
15765 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15770 rm -f conftest.$ac_objext
15771 if { (eval echo "$as_me:15771: \"$ac_compile\"") >&5
15772 (eval $ac_compile) 2>&5
15774 echo "$as_me:15774: \$? = $ac_status" >&5
15775 (exit $ac_status); } &&
15776 { ac_try='test -s conftest.$ac_objext'
15777 { (eval echo "$as_me:15777: \"$ac_try\"") >&5
15778 (eval $ac_try) 2>&5
15780 echo "$as_me:15780: \$? = $ac_status" >&5
15781 (exit $ac_status); }; }; then
15782 ac_lo=$ac_mid; break
15784 echo "$as_me: failed program was:" >&5
15785 cat conftest.$ac_ext >&5
15786 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
15788 rm -f conftest.$ac_objext conftest.$ac_ext
15791 rm -f conftest.$ac_objext conftest.$ac_ext
15792 # Binary search between lo and hi bounds.
15793 while test "x$ac_lo" != "x$ac_hi"; do
15794 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15795 cat >conftest.$ac_ext <<_ACEOF
15796 #line 15796 "configure"
15797 #include "confdefs.h"
15798 $ac_includes_default
15802 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15807 rm -f conftest.$ac_objext
15808 if { (eval echo "$as_me:15808: \"$ac_compile\"") >&5
15809 (eval $ac_compile) 2>&5
15811 echo "$as_me:15811: \$? = $ac_status" >&5
15812 (exit $ac_status); } &&
15813 { ac_try='test -s conftest.$ac_objext'
15814 { (eval echo "$as_me:15814: \"$ac_try\"") >&5
15815 (eval $ac_try) 2>&5
15817 echo "$as_me:15817: \$? = $ac_status" >&5
15818 (exit $ac_status); }; }; then
15821 echo "$as_me: failed program was:" >&5
15822 cat conftest.$ac_ext >&5
15823 ac_lo=`expr $ac_mid + 1`
15825 rm -f conftest.$ac_objext conftest.$ac_ext
15827 ac_cv_sizeof_signed_char=$ac_lo
15829 if test "$cross_compiling" = yes; then
15830 { { echo "$as_me:15830: error: cannot run test program while cross compiling" >&5
15831 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15832 { (exit 1); exit 1; }; }
15834 cat >conftest.$ac_ext <<_ACEOF
15835 #line 15835 "configure"
15836 #include "confdefs.h"
15837 $ac_includes_default
15841 FILE *f = fopen ("conftest.val", "w");
15843 $ac_main_return (1);
15844 fprintf (f, "%d", (sizeof (signed char)));
15850 rm -f conftest$ac_exeext
15851 if { (eval echo "$as_me:15851: \"$ac_link\"") >&5
15852 (eval $ac_link) 2>&5
15854 echo "$as_me:15854: \$? = $ac_status" >&5
15855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15856 { (eval echo "$as_me:15856: \"$ac_try\"") >&5
15857 (eval $ac_try) 2>&5
15859 echo "$as_me:15859: \$? = $ac_status" >&5
15860 (exit $ac_status); }; }; then
15861 ac_cv_sizeof_signed_char=`cat conftest.val`
15863 echo "$as_me: program exited with status $ac_status" >&5
15864 echo "$as_me: failed program was:" >&5
15865 cat conftest.$ac_ext >&5
15867 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15872 ac_cv_sizeof_signed_char=0
15875 echo "$as_me:15875: result: $ac_cv_sizeof_signed_char" >&5
15876 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15877 cat >>confdefs.h <<EOF
15878 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15881 echo "$as_me:15881: checking for ANSI C header files" >&5
15882 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15883 if test "${ac_cv_header_stdc+set}" = set; then
15884 echo $ECHO_N "(cached) $ECHO_C" >&6
15886 cat >conftest.$ac_ext <<_ACEOF
15887 #line 15887 "configure"
15888 #include "confdefs.h"
15889 #include <stdlib.h>
15890 #include <stdarg.h>
15891 #include <string.h>
15895 if { (eval echo "$as_me:15895: \"$ac_cpp conftest.$ac_ext\"") >&5
15896 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15898 egrep -v '^ *\+' conftest.er1 >conftest.err
15900 cat conftest.err >&5
15901 echo "$as_me:15901: \$? = $ac_status" >&5
15902 (exit $ac_status); } >/dev/null; then
15903 if test -s conftest.err; then
15904 ac_cpp_err=$ac_c_preproc_warn_flag
15911 if test -z "$ac_cpp_err"; then
15912 ac_cv_header_stdc=yes
15914 echo "$as_me: failed program was:" >&5
15915 cat conftest.$ac_ext >&5
15916 ac_cv_header_stdc=no
15918 rm -f conftest.err conftest.$ac_ext
15920 if test $ac_cv_header_stdc = yes; then
15921 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15922 cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15925 #include <string.h>
15928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15929 egrep "memchr" >/dev/null 2>&1; then
15932 ac_cv_header_stdc=no
15938 if test $ac_cv_header_stdc = yes; then
15939 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15940 cat >conftest.$ac_ext <<_ACEOF
15941 #line 15941 "configure"
15942 #include "confdefs.h"
15943 #include <stdlib.h>
15946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15947 egrep "free" >/dev/null 2>&1; then
15950 ac_cv_header_stdc=no
15956 if test $ac_cv_header_stdc = yes; then
15957 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15958 if test "$cross_compiling" = yes; then
15961 cat >conftest.$ac_ext <<_ACEOF
15962 #line 15962 "configure"
15963 #include "confdefs.h"
15965 #if ((' ' & 0x0FF) == 0x020)
15966 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15967 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15969 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15970 || ('j' <= (c) && (c) <= 'r') \
15971 || ('s' <= (c) && (c) <= 'z'))
15972 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15975 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15980 for (i = 0; i < 256; i++)
15981 if (XOR (islower (i), ISLOWER (i))
15982 || toupper (i) != TOUPPER (i))
15983 $ac_main_return(2);
15984 $ac_main_return (0);
15987 rm -f conftest$ac_exeext
15988 if { (eval echo "$as_me:15988: \"$ac_link\"") >&5
15989 (eval $ac_link) 2>&5
15991 echo "$as_me:15991: \$? = $ac_status" >&5
15992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15993 { (eval echo "$as_me:15993: \"$ac_try\"") >&5
15994 (eval $ac_try) 2>&5
15996 echo "$as_me:15996: \$? = $ac_status" >&5
15997 (exit $ac_status); }; }; then
16000 echo "$as_me: program exited with status $ac_status" >&5
16001 echo "$as_me: failed program was:" >&5
16002 cat conftest.$ac_ext >&5
16003 ac_cv_header_stdc=no
16005 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16009 echo "$as_me:16009: result: $ac_cv_header_stdc" >&5
16010 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16011 if test $ac_cv_header_stdc = yes; then
16013 cat >>confdefs.h <<\EOF
16014 #define STDC_HEADERS 1
16019 ac_header_dirent=no
16020 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16021 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16022 echo "$as_me:16022: checking for $ac_hdr that defines DIR" >&5
16023 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16024 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16025 echo $ECHO_N "(cached) $ECHO_C" >&6
16027 cat >conftest.$ac_ext <<_ACEOF
16028 #line 16028 "configure"
16029 #include "confdefs.h"
16030 #include <sys/types.h>
16042 rm -f conftest.$ac_objext
16043 if { (eval echo "$as_me:16043: \"$ac_compile\"") >&5
16044 (eval $ac_compile) 2>&5
16046 echo "$as_me:16046: \$? = $ac_status" >&5
16047 (exit $ac_status); } &&
16048 { ac_try='test -s conftest.$ac_objext'
16049 { (eval echo "$as_me:16049: \"$ac_try\"") >&5
16050 (eval $ac_try) 2>&5
16052 echo "$as_me:16052: \$? = $ac_status" >&5
16053 (exit $ac_status); }; }; then
16054 eval "$as_ac_Header=yes"
16056 echo "$as_me: failed program was:" >&5
16057 cat conftest.$ac_ext >&5
16058 eval "$as_ac_Header=no"
16060 rm -f conftest.$ac_objext conftest.$ac_ext
16062 echo "$as_me:16062: result: `eval echo '${'$as_ac_Header'}'`" >&5
16063 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16064 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16065 cat >>confdefs.h <<EOF
16066 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16069 ac_header_dirent=$ac_hdr; break
16073 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16074 if test $ac_header_dirent = dirent.h; then
16075 echo "$as_me:16075: checking for opendir in -ldir" >&5
16076 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16077 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16078 echo $ECHO_N "(cached) $ECHO_C" >&6
16080 ac_check_lib_save_LIBS=$LIBS
16082 cat >conftest.$ac_ext <<_ACEOF
16083 #line 16083 "configure"
16084 #include "confdefs.h"
16086 /* Override any gcc2 internal prototype to avoid an error. */
16090 /* We use char because int might match the return type of a gcc2
16091 builtin and then its argument prototype would still apply. */
16101 rm -f conftest.$ac_objext conftest$ac_exeext
16102 if { (eval echo "$as_me:16102: \"$ac_link\"") >&5
16103 (eval $ac_link) 2>&5
16105 echo "$as_me:16105: \$? = $ac_status" >&5
16106 (exit $ac_status); } &&
16107 { ac_try='test -s conftest$ac_exeext'
16108 { (eval echo "$as_me:16108: \"$ac_try\"") >&5
16109 (eval $ac_try) 2>&5
16111 echo "$as_me:16111: \$? = $ac_status" >&5
16112 (exit $ac_status); }; }; then
16113 ac_cv_lib_dir_opendir=yes
16115 echo "$as_me: failed program was:" >&5
16116 cat conftest.$ac_ext >&5
16117 ac_cv_lib_dir_opendir=no
16119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16120 LIBS=$ac_check_lib_save_LIBS
16122 echo "$as_me:16122: result: $ac_cv_lib_dir_opendir" >&5
16123 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16124 if test $ac_cv_lib_dir_opendir = yes; then
16129 echo "$as_me:16129: checking for opendir in -lx" >&5
16130 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16131 if test "${ac_cv_lib_x_opendir+set}" = set; then
16132 echo $ECHO_N "(cached) $ECHO_C" >&6
16134 ac_check_lib_save_LIBS=$LIBS
16136 cat >conftest.$ac_ext <<_ACEOF
16137 #line 16137 "configure"
16138 #include "confdefs.h"
16140 /* Override any gcc2 internal prototype to avoid an error. */
16144 /* We use char because int might match the return type of a gcc2
16145 builtin and then its argument prototype would still apply. */
16155 rm -f conftest.$ac_objext conftest$ac_exeext
16156 if { (eval echo "$as_me:16156: \"$ac_link\"") >&5
16157 (eval $ac_link) 2>&5
16159 echo "$as_me:16159: \$? = $ac_status" >&5
16160 (exit $ac_status); } &&
16161 { ac_try='test -s conftest$ac_exeext'
16162 { (eval echo "$as_me:16162: \"$ac_try\"") >&5
16163 (eval $ac_try) 2>&5
16165 echo "$as_me:16165: \$? = $ac_status" >&5
16166 (exit $ac_status); }; }; then
16167 ac_cv_lib_x_opendir=yes
16169 echo "$as_me: failed program was:" >&5
16170 cat conftest.$ac_ext >&5
16171 ac_cv_lib_x_opendir=no
16173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16174 LIBS=$ac_check_lib_save_LIBS
16176 echo "$as_me:16176: result: $ac_cv_lib_x_opendir" >&5
16177 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16178 if test $ac_cv_lib_x_opendir = yes; then
16184 echo "$as_me:16184: checking whether time.h and sys/time.h may both be included" >&5
16185 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16186 if test "${ac_cv_header_time+set}" = set; then
16187 echo $ECHO_N "(cached) $ECHO_C" >&6
16189 cat >conftest.$ac_ext <<_ACEOF
16190 #line 16190 "configure"
16191 #include "confdefs.h"
16192 #include <sys/types.h>
16193 #include <sys/time.h>
16199 if ((struct tm *) 0)
16205 rm -f conftest.$ac_objext
16206 if { (eval echo "$as_me:16206: \"$ac_compile\"") >&5
16207 (eval $ac_compile) 2>&5
16209 echo "$as_me:16209: \$? = $ac_status" >&5
16210 (exit $ac_status); } &&
16211 { ac_try='test -s conftest.$ac_objext'
16212 { (eval echo "$as_me:16212: \"$ac_try\"") >&5
16213 (eval $ac_try) 2>&5
16215 echo "$as_me:16215: \$? = $ac_status" >&5
16216 (exit $ac_status); }; }; then
16217 ac_cv_header_time=yes
16219 echo "$as_me: failed program was:" >&5
16220 cat conftest.$ac_ext >&5
16221 ac_cv_header_time=no
16223 rm -f conftest.$ac_objext conftest.$ac_ext
16225 echo "$as_me:16225: result: $ac_cv_header_time" >&5
16226 echo "${ECHO_T}$ac_cv_header_time" >&6
16227 if test $ac_cv_header_time = yes; then
16229 cat >>confdefs.h <<\EOF
16230 #define TIME_WITH_SYS_TIME 1
16235 ### checks for compiler characteristics
16237 ac_cpp='$CPP $CPPFLAGS'
16238 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16239 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16240 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16241 ac_main_return=return
16243 echo "$as_me:16243: checking for an ANSI C-conforming const" >&5
16244 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16245 if test "${ac_cv_c_const+set}" = set; then
16246 echo $ECHO_N "(cached) $ECHO_C" >&6
16248 cat >conftest.$ac_ext <<_ACEOF
16249 #line 16249 "configure"
16250 #include "confdefs.h"
16255 /* FIXME: Include the comments suggested by Paul. */
16256 #ifndef __cplusplus
16257 /* Ultrix mips cc rejects this. */
16258 typedef int charset[2];
16260 /* SunOS 4.1.1 cc rejects this. */
16261 char const *const *ccp;
16263 /* NEC SVR4.0.2 mips cc rejects this. */
16264 struct point {int x, y;};
16265 static struct point const zero = {0,0};
16266 /* AIX XL C 1.02.0.0 rejects this.
16267 It does not let you subtract one const X* pointer from another in
16268 an arm of an if-expression whose if-part is not a constant
16270 const char *g = "string";
16271 ccp = &g + (g ? g-g : 0);
16272 /* HPUX 7.0 cc rejects these. */
16275 ccp = (char const *const *) p;
16276 { /* SCO 3.2v4 cc rejects this. */
16278 char const *s = 0 ? (char *) 0 : (char const *) 0;
16282 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16283 int x[] = {25, 17};
16284 const int *foo = &x[0];
16287 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16288 typedef const int *iptr;
16292 { /* AIX XL C 1.02.0.0 rejects this saying
16293 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16294 struct s { int j; const int *ap[3]; };
16295 struct s *b; b->j = 5;
16297 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16298 const int foo = 10;
16306 rm -f conftest.$ac_objext
16307 if { (eval echo "$as_me:16307: \"$ac_compile\"") >&5
16308 (eval $ac_compile) 2>&5
16310 echo "$as_me:16310: \$? = $ac_status" >&5
16311 (exit $ac_status); } &&
16312 { ac_try='test -s conftest.$ac_objext'
16313 { (eval echo "$as_me:16313: \"$ac_try\"") >&5
16314 (eval $ac_try) 2>&5
16316 echo "$as_me:16316: \$? = $ac_status" >&5
16317 (exit $ac_status); }; }; then
16320 echo "$as_me: failed program was:" >&5
16321 cat conftest.$ac_ext >&5
16324 rm -f conftest.$ac_objext conftest.$ac_ext
16326 echo "$as_me:16326: result: $ac_cv_c_const" >&5
16327 echo "${ECHO_T}$ac_cv_c_const" >&6
16328 if test $ac_cv_c_const = no; then
16330 cat >>confdefs.h <<\EOF
16336 ### Checks for external-data
16338 echo "$as_me:16338: checking if data-only library module links" >&5
16339 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16340 if test "${cf_cv_link_dataonly+set}" = set; then
16341 echo $ECHO_N "(cached) $ECHO_C" >&6
16345 cat >conftest.$ac_ext <<EOF
16346 #line 16346 "configure"
16347 int testdata[3] = { 123, 456, 789 };
16349 if { (eval echo "$as_me:16349: \"$ac_compile\"") >&5
16350 (eval $ac_compile) 2>&5
16352 echo "$as_me:16352: \$? = $ac_status" >&5
16353 (exit $ac_status); } ; then
16354 mv conftest.o data.o && \
16355 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16357 rm -f conftest.$ac_ext data.o
16358 cat >conftest.$ac_ext <<EOF
16359 #line 16359 "configure"
16363 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16365 extern int testdata[3];
16366 return testdata[0] == 123
16367 && testdata[1] == 456
16368 && testdata[2] == 789;
16372 if { (eval echo "$as_me:16372: \"$ac_compile\"") >&5
16373 (eval $ac_compile) 2>&5
16375 echo "$as_me:16375: \$? = $ac_status" >&5
16376 (exit $ac_status); }; then
16377 mv conftest.o func.o && \
16378 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16380 rm -f conftest.$ac_ext func.o
16381 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16382 cf_saveLIBS="$LIBS"
16383 LIBS="conftest.a $LIBS"
16384 if test "$cross_compiling" = yes; then
16385 cf_cv_link_dataonly=unknown
16387 cat >conftest.$ac_ext <<_ACEOF
16388 #line 16388 "configure"
16389 #include "confdefs.h"
16393 extern int testfunc();
16394 ${cf_cv_main_return:-return} (!testfunc());
16398 rm -f conftest$ac_exeext
16399 if { (eval echo "$as_me:16399: \"$ac_link\"") >&5
16400 (eval $ac_link) 2>&5
16402 echo "$as_me:16402: \$? = $ac_status" >&5
16403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16404 { (eval echo "$as_me:16404: \"$ac_try\"") >&5
16405 (eval $ac_try) 2>&5
16407 echo "$as_me:16407: \$? = $ac_status" >&5
16408 (exit $ac_status); }; }; then
16409 cf_cv_link_dataonly=yes
16411 echo "$as_me: program exited with status $ac_status" >&5
16412 echo "$as_me: failed program was:" >&5
16413 cat conftest.$ac_ext >&5
16414 cf_cv_link_dataonly=no
16416 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16418 LIBS="$cf_saveLIBS"
16422 echo "$as_me:16422: result: $cf_cv_link_dataonly" >&5
16423 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16425 if test "$cf_cv_link_dataonly" = no ; then
16427 cat >>confdefs.h <<\EOF
16428 #define BROKEN_LINKER 1
16434 ### Checks for library functions.
16440 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16441 echo "$as_me:16441: checking for $ac_header" >&5
16442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16444 echo $ECHO_N "(cached) $ECHO_C" >&6
16446 cat >conftest.$ac_ext <<_ACEOF
16447 #line 16447 "configure"
16448 #include "confdefs.h"
16449 #include <$ac_header>
16451 if { (eval echo "$as_me:16451: \"$ac_cpp conftest.$ac_ext\"") >&5
16452 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16454 egrep -v '^ *\+' conftest.er1 >conftest.err
16456 cat conftest.err >&5
16457 echo "$as_me:16457: \$? = $ac_status" >&5
16458 (exit $ac_status); } >/dev/null; then
16459 if test -s conftest.err; then
16460 ac_cpp_err=$ac_c_preproc_warn_flag
16467 if test -z "$ac_cpp_err"; then
16468 eval "$as_ac_Header=yes"
16470 echo "$as_me: failed program was:" >&5
16471 cat conftest.$ac_ext >&5
16472 eval "$as_ac_Header=no"
16474 rm -f conftest.err conftest.$ac_ext
16476 echo "$as_me:16476: result: `eval echo '${'$as_ac_Header'}'`" >&5
16477 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16478 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16479 cat >>confdefs.h <<EOF
16480 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16486 echo "$as_me:16486: checking for working mkstemp" >&5
16487 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16488 if test "${cf_cv_func_mkstemp+set}" = set; then
16489 echo $ECHO_N "(cached) $ECHO_C" >&6
16493 if test "$cross_compiling" = yes; then
16494 cf_cv_func_mkstemp=maybe
16496 cat >conftest.$ac_ext <<_ACEOF
16497 #line 16497 "configure"
16498 #include "confdefs.h"
16500 #include <sys/types.h>
16501 #ifdef HAVE_UNISTD_H
16502 #include <unistd.h>
16504 #include <stdlib.h>
16506 #include <string.h>
16507 #include <sys/stat.h>
16510 char *tmpl = "conftestXXXXXX";
16518 for (n = 0; n < 2; ++n) {
16519 strcpy(name[n], tmpl);
16520 if ((fd = mkstemp(name[n])) >= 0) {
16521 if (!strcmp(name[n], tmpl)
16522 || stat(name[n], &sb) != 0
16523 || (sb.st_mode & S_IFMT) != S_IFREG
16524 || (sb.st_mode & 077) != 0) {
16531 && !strcmp(name[0], name[1]))
16533 ${cf_cv_main_return:-return}(result);
16537 rm -f conftest$ac_exeext
16538 if { (eval echo "$as_me:16538: \"$ac_link\"") >&5
16539 (eval $ac_link) 2>&5
16541 echo "$as_me:16541: \$? = $ac_status" >&5
16542 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16543 { (eval echo "$as_me:16543: \"$ac_try\"") >&5
16544 (eval $ac_try) 2>&5
16546 echo "$as_me:16546: \$? = $ac_status" >&5
16547 (exit $ac_status); }; }; then
16548 cf_cv_func_mkstemp=yes
16551 echo "$as_me: program exited with status $ac_status" >&5
16552 echo "$as_me: failed program was:" >&5
16553 cat conftest.$ac_ext >&5
16554 cf_cv_func_mkstemp=no
16557 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16561 echo "$as_me:16561: result: $cf_cv_func_mkstemp" >&5
16562 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16563 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16564 echo "$as_me:16564: checking for mkstemp" >&5
16565 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16566 if test "${ac_cv_func_mkstemp+set}" = set; then
16567 echo $ECHO_N "(cached) $ECHO_C" >&6
16569 cat >conftest.$ac_ext <<_ACEOF
16570 #line 16570 "configure"
16571 #include "confdefs.h"
16572 #define mkstemp autoconf_temporary
16573 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16580 /* We use char because int might match the return type of a gcc2
16581 builtin and then its argument prototype would still apply. */
16582 char mkstemp (void);
16588 /* The GNU C library defines stubs for functions which it implements
16589 to always fail with ENOSYS. Some functions are actually named
16590 something starting with __ and the normal name is an alias. */
16591 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16592 #error found stub for mkstemp
16600 rm -f conftest.$ac_objext conftest$ac_exeext
16601 if { (eval echo "$as_me:16601: \"$ac_link\"") >&5
16602 (eval $ac_link) 2>&5
16604 echo "$as_me:16604: \$? = $ac_status" >&5
16605 (exit $ac_status); } &&
16606 { ac_try='test -s conftest$ac_exeext'
16607 { (eval echo "$as_me:16607: \"$ac_try\"") >&5
16608 (eval $ac_try) 2>&5
16610 echo "$as_me:16610: \$? = $ac_status" >&5
16611 (exit $ac_status); }; }; then
16612 ac_cv_func_mkstemp=yes
16614 echo "$as_me: failed program was:" >&5
16615 cat conftest.$ac_ext >&5
16616 ac_cv_func_mkstemp=no
16618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16620 echo "$as_me:16620: result: $ac_cv_func_mkstemp" >&5
16621 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16624 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16626 cat >>confdefs.h <<\EOF
16627 #define HAVE_MKSTEMP 1
16632 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16633 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16634 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16638 if test "$cf_with_ada" != "no" ; then
16640 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16643 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16645 unset ac_cv_path_cf_TEMP_gnat
16647 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16648 set dummy $cf_prog_gnat; ac_word=$2
16649 echo "$as_me:16649: checking for $ac_word" >&5
16650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16651 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16652 echo $ECHO_N "(cached) $ECHO_C" >&6
16654 case $cf_TEMP_gnat in
16656 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16659 ac_save_IFS=$IFS; IFS=$ac_path_separator
16661 for ac_dir in $ac_dummy; do
16663 test -z "$ac_dir" && ac_dir=.
16664 if $as_executable_p "$ac_dir/$ac_word"; then
16665 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16666 echo "$as_me:16666: found $ac_dir/$ac_word" >&5
16671 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16675 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16677 if test -n "$cf_TEMP_gnat"; then
16678 echo "$as_me:16678: result: $cf_TEMP_gnat" >&5
16679 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16681 echo "$as_me:16681: result: no" >&5
16682 echo "${ECHO_T}no" >&6
16685 eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
16687 if test "x$cf_TEMP_gnat" != xno; then
16688 unset cf_cv_gnat_version
16691 echo "$as_me:16691: checking for $cf_prog_gnat version" >&5
16692 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16693 if test "${cf_cv_gnat_version+set}" = set; then
16694 echo $ECHO_N "(cached) $ECHO_C" >&6
16697 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
16698 grep '[0-9].[0-9][0-9]*' |\
16699 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16702 echo "$as_me:16702: result: $cf_cv_gnat_version" >&5
16703 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16704 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16705 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
16708 eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
16711 unset cf_cv_gnat_version
16712 unset ac_cv_path_cf_TEMP_gnat
16715 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
16717 cf_cv_prog_gnat_correct=no
16719 cf_ada_make=gnatmake
16720 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
16721 # gprconfig is newer than gnatmake; we can continue...
16724 rm -rf conftest* *~conftest*
16725 if mkdir conftest.src
16729 for cf_gprconfig in Ada C
16731 echo "$as_me:16731: checking for gprconfig name for $cf_gprconfig" >&5
16732 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
16733 if test $cf_gprconfig = C
16735 for cf_gprconfig_param in \
16736 $cf_gprconfig,,,,GNATGCC \
16737 $cf_gprconfig,,,,GCC \
16740 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16741 test -n "$cf_gprconfig_value" && break
16744 cf_gprconfig_param=$cf_gprconfig
16745 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16747 if test -n "$cf_gprconfig_value"
16749 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
16750 echo "$as_me:16750: result: $cf_gprconfig_value" >&5
16751 echo "${ECHO_T}$cf_gprconfig_value" >&6
16753 echo "$as_me:16753: result: missing" >&5
16754 echo "${ECHO_T}missing" >&6
16760 rm -rf conftest* *~conftest*
16763 if test "x$cf_ada_config" != "x#"
16766 echo "$as_me:16766: checking for gnat version" >&5
16767 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16768 if test "${cf_cv_gnat_version+set}" = set; then
16769 echo $ECHO_N "(cached) $ECHO_C" >&6
16772 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
16773 grep '[0-9].[0-9][0-9]*' |\
16774 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16777 echo "$as_me:16777: result: $cf_cv_gnat_version" >&5
16778 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16779 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16781 case $cf_cv_gnat_version in
16782 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16783 cf_cv_prog_gnat_correct=yes
16786 { echo "$as_me:16786: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
16787 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
16788 cf_cv_prog_gnat_correct=no
16792 # Extract the first word of "m4", so it can be a program name with args.
16793 set dummy m4; ac_word=$2
16794 echo "$as_me:16794: checking for $ac_word" >&5
16795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16796 if test "${ac_cv_prog_M4_exists+set}" = set; then
16797 echo $ECHO_N "(cached) $ECHO_C" >&6
16799 if test -n "$M4_exists"; then
16800 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16802 ac_save_IFS=$IFS; IFS=$ac_path_separator
16804 for ac_dir in $ac_dummy; do
16806 test -z "$ac_dir" && ac_dir=.
16807 $as_executable_p "$ac_dir/$ac_word" || continue
16808 ac_cv_prog_M4_exists="yes"
16809 echo "$as_me:16809: found $ac_dir/$ac_word" >&5
16813 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16816 M4_exists=$ac_cv_prog_M4_exists
16817 if test -n "$M4_exists"; then
16818 echo "$as_me:16818: result: $M4_exists" >&5
16819 echo "${ECHO_T}$M4_exists" >&6
16821 echo "$as_me:16821: result: no" >&5
16822 echo "${ECHO_T}no" >&6
16825 if test "$ac_cv_prog_M4_exists" = no; then
16826 cf_cv_prog_gnat_correct=no
16827 { echo "$as_me:16827: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
16828 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
16830 if test "$cf_cv_prog_gnat_correct" = yes; then
16831 echo "$as_me:16831: checking if GNAT works" >&5
16832 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16834 rm -rf conftest* *~conftest*
16835 cat >>conftest.ads <<CF_EOF
16836 procedure conftest;
16838 cat >>conftest.adb <<CF_EOF
16841 procedure conftest is
16843 Text_IO.Put ("Hello World");
16845 GNAT.OS_Lib.OS_Exit (0);
16848 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16849 if ( ./conftest 1>&5 2>&1 ) ; then
16850 cf_cv_prog_gnat_correct=yes
16852 cf_cv_prog_gnat_correct=no
16855 cf_cv_prog_gnat_correct=no
16857 rm -rf conftest* *~conftest*
16859 echo "$as_me:16859: result: $cf_cv_prog_gnat_correct" >&5
16860 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16863 cf_cv_prog_gnat_correct=no
16867 if test "$cf_cv_prog_gnat_correct" = yes; then
16869 echo "$as_me:16869: checking optimization options for ADAFLAGS" >&5
16870 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
16874 ADAFLAGS="$ADAFLAGS -g"
16880 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
16882 ADAFLAGS="$ADAFLAGS $cf_O_flag"
16886 echo "$as_me:16886: result: $ADAFLAGS" >&5
16887 echo "${ECHO_T}$ADAFLAGS" >&6
16889 echo "$as_me:16889: checking if GNATPREP supports -T option" >&5
16890 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
16891 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
16892 echo $ECHO_N "(cached) $ECHO_C" >&6
16895 cf_cv_gnatprep_opt_t=no
16896 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
16899 echo "$as_me:16899: result: $cf_cv_gnatprep_opt_t" >&5
16900 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
16901 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
16903 echo "$as_me:16903: checking if GNAT supports generics" >&5
16904 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
16905 case $cf_cv_gnat_version in
16906 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16907 cf_gnat_generics=yes
16910 cf_gnat_generics=no
16913 echo "$as_me:16913: result: $cf_gnat_generics" >&5
16914 echo "${ECHO_T}$cf_gnat_generics" >&6
16916 if test "$cf_gnat_generics" = yes
16918 cf_compile_generics=generics
16919 cf_generic_objects="\${GENOBJS}"
16921 cf_compile_generics=
16922 cf_generic_objects=
16925 echo "$as_me:16925: checking if GNAT supports SIGINT" >&5
16926 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
16927 if test "${cf_cv_gnat_sigint+set}" = set; then
16928 echo $ECHO_N "(cached) $ECHO_C" >&6
16931 rm -rf conftest* *~conftest*
16932 cat >>conftest.ads <<CF_EOF
16933 with Ada.Interrupts.Names;
16935 package ConfTest is
16937 pragma Warnings (Off); -- the next pragma exists since 3.11p
16938 pragma Unreserve_All_Interrupts;
16939 pragma Warnings (On);
16941 protected Process is
16943 function Continue return Boolean;
16944 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
16946 Done : Boolean := False;
16951 cat >>conftest.adb <<CF_EOF
16952 package body ConfTest is
16953 protected body Process is
16958 function Continue return Boolean is
16965 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16966 cf_cv_gnat_sigint=yes
16968 cf_cv_gnat_sigint=no
16970 rm -rf conftest* *~conftest*
16973 echo "$as_me:16973: result: $cf_cv_gnat_sigint" >&5
16974 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
16976 if test $cf_cv_gnat_sigint = yes ; then
16979 USE_GNAT_SIGINT="#"
16982 cf_gnat_libraries=no
16983 cf_gnat_projects=no
16985 if test "$enable_gnat_projects" != no ; then
16986 echo "$as_me:16986: checking if GNAT supports project files" >&5
16987 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
16988 case $cf_cv_gnat_version in
16992 case $cf_cv_system_name in
16996 rm -rf conftest* *~conftest*
16997 if mkdir conftest.src conftest.bin conftest.lib
17000 rm -rf conftest* *~conftest*
17001 cat >>library.gpr <<CF_EOF
17003 Kind := External ("LIB_KIND");
17004 for Library_Name use "ConfTest";
17005 for Object_Dir use ".";
17006 for Library_ALI_Dir use External("LIBRARY_DIR");
17007 for Library_Version use External ("SONAME");
17008 for Library_Kind use Kind;
17009 for Library_Dir use External("BUILD_DIR");
17010 Source_Dir := External ("SOURCE_DIR");
17011 for Source_Dirs use (Source_Dir);
17014 cat >>confpackage.ads <<CF_EOF
17015 package ConfPackage is
17016 procedure conftest;
17019 cat >>confpackage.adb <<CF_EOF
17021 package body ConfPackage is
17022 procedure conftest is
17024 Text_IO.Put ("Hello World");
17029 if ( $cf_ada_make $ADAFLAGS \
17031 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
17032 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
17033 -XSOURCE_DIR=`pwd` \
17034 -XSONAME=libConfTest.so.1 \
17035 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17036 cf_gnat_projects=yes
17040 if test -f conftest.lib/confpackage.ali
17042 cf_gnat_libraries=yes
17044 rm -rf conftest* *~conftest*
17049 echo "$as_me:17049: result: $cf_gnat_projects" >&5
17050 echo "${ECHO_T}$cf_gnat_projects" >&6
17051 fi # enable_gnat_projects
17053 if test $cf_gnat_projects = yes
17055 echo "$as_me:17055: checking if GNAT supports libraries" >&5
17056 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17057 echo "$as_me:17057: result: $cf_gnat_libraries" >&5
17058 echo "${ECHO_T}$cf_gnat_libraries" >&6
17061 USE_OLD_MAKERULES=""
17062 USE_GNAT_PROJECTS="#"
17063 USE_GNAT_MAKE_GPR="#"
17064 USE_GNAT_GPRBUILD="#"
17066 if test "$cf_gnat_projects" = yes
17068 USE_OLD_MAKERULES="#"
17069 USE_GNAT_PROJECTS=""
17070 if test "$cf_cv_VERSION_GPRBUILD" != no
17072 USE_GNAT_GPRBUILD=""
17073 elif test "$cf_cv_VERSION_GNATMAKE" != no
17075 USE_GNAT_MAKE_GPR=""
17077 { echo "$as_me:17077: WARNING: use old makefile rules since tools are missing" >&5
17078 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17082 if test "$cf_gnat_libraries" = yes
17084 USE_GNAT_LIBRARIES=""
17086 USE_GNAT_LIBRARIES="#"
17089 echo "$as_me:17089: checking for ada-compiler" >&5
17090 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17092 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17093 if test "${with_ada_compiler+set}" = set; then
17094 withval="$with_ada_compiler"
17095 cf_ada_compiler=$withval
17097 cf_ada_compiler=gnatmake
17100 echo "$as_me:17100: result: $cf_ada_compiler" >&5
17101 echo "${ECHO_T}$cf_ada_compiler" >&6
17103 cf_ada_package=terminal_interface
17105 echo "$as_me:17105: checking for ada-include" >&5
17106 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17108 # Check whether --with-ada-include or --without-ada-include was given.
17109 if test "${with_ada_include+set}" = set; then
17110 withval="$with_ada_include"
17113 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17114 fi; if test -n "$prefix/share/ada/adainclude" ; then
17116 if test "x$prefix" != xNONE; then
17117 cf_path_syntax="$prefix"
17119 cf_path_syntax="$ac_default_prefix"
17122 case ".$withval" in
17123 (.\$\(*\)*|.\'*\'*)
17127 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17129 (.\${*prefix}*|.\${*dir}*)
17130 eval withval="$withval"
17131 case ".$withval" in
17133 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17138 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17141 { { echo "$as_me:17141: error: expected a pathname, not \"$withval\"" >&5
17142 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17143 { (exit 1); exit 1; }; }
17148 eval ADA_INCLUDE="$withval"
17150 echo "$as_me:17150: result: $ADA_INCLUDE" >&5
17151 echo "${ECHO_T}$ADA_INCLUDE" >&6
17153 echo "$as_me:17153: checking for ada-objects" >&5
17154 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17156 # Check whether --with-ada-objects or --without-ada-objects was given.
17157 if test "${with_ada_objects+set}" = set; then
17158 withval="$with_ada_objects"
17161 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17162 fi; if test -n "$prefix/lib/ada/adalib" ; then
17164 if test "x$prefix" != xNONE; then
17165 cf_path_syntax="$prefix"
17167 cf_path_syntax="$ac_default_prefix"
17170 case ".$withval" in
17171 (.\$\(*\)*|.\'*\'*)
17175 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17177 (.\${*prefix}*|.\${*dir}*)
17178 eval withval="$withval"
17179 case ".$withval" in
17181 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17186 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17189 { { echo "$as_me:17189: error: expected a pathname, not \"$withval\"" >&5
17190 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17191 { (exit 1); exit 1; }; }
17196 eval ADA_OBJECTS="$withval"
17198 echo "$as_me:17198: result: $ADA_OBJECTS" >&5
17199 echo "${ECHO_T}$ADA_OBJECTS" >&6
17201 echo "$as_me:17201: checking if an Ada95 shared-library should be built" >&5
17202 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17204 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17205 if test "${with_ada_sharedlib+set}" = set; then
17206 withval="$with_ada_sharedlib"
17207 with_ada_sharedlib=$withval
17209 with_ada_sharedlib=no
17211 echo "$as_me:17211: result: $with_ada_sharedlib" >&5
17212 echo "${ECHO_T}$with_ada_sharedlib" >&6
17214 if test "x$with_ada_sharedlib" != xno
17216 if test "x$cf_gnat_projects" != xyes
17218 { echo "$as_me:17218: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17219 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17220 with_ada_sharedlib=no
17224 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17225 MAKE_ADA_SHAREDLIB="#"
17227 if test "x$with_ada_sharedlib" != xno
17229 MAKE_ADA_SHAREDLIB=
17230 if test "x$with_ada_sharedlib" != xyes
17232 ADA_SHAREDLIB="$with_ada_sharedlib"
17236 # allow the Ada binding to be renamed
17238 echo "$as_me:17238: checking for ada-libname" >&5
17239 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17241 # Check whether --with-ada-libname or --without-ada-libname was given.
17242 if test "${with_ada_libname+set}" = set; then
17243 withval="$with_ada_libname"
17244 ADA_LIBNAME=$withval
17246 ADA_LIBNAME=AdaCurses
17248 case "x$ADA_LIBNAME" in
17250 ADA_LIBNAME=AdaCurses
17254 echo "$as_me:17254: result: $ADA_LIBNAME" >&5
17255 echo "${ECHO_T}$ADA_LIBNAME" >&6
17258 { { echo "$as_me:17258: error: No usable Ada compiler found" >&5
17259 echo "$as_me: error: No usable Ada compiler found" >&2;}
17260 { (exit 1); exit 1; }; }
17263 { { echo "$as_me:17263: error: The Ada compiler is needed for this package" >&5
17264 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17265 { (exit 1); exit 1; }; }
17268 ################################################################################
17275 ### Construct the list of include-directories to be generated
17277 if test "$srcdir" != "."; then
17278 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17280 CPPFLAGS="-I../include $CPPFLAGS"
17281 if test "$srcdir" != "."; then
17282 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17284 CPPFLAGS="-I. $CPPFLAGS"
17286 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17287 if test "$srcdir" != "."; then
17288 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17290 if test "$GCC" != yes; then
17291 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17292 elif test "$includedir" != "/usr/include"; then
17293 if test "$includedir" = '${prefix}/include' ; then
17294 if test x$prefix != x/usr ; then
17295 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17298 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17302 ### Build up pieces for makefile rules
17303 echo "$as_me:17303: checking default library suffix" >&5
17304 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17306 case $DFT_LWR_MODEL in
17307 (libtool) DFT_ARG_SUFFIX='' ;;
17308 (normal) DFT_ARG_SUFFIX='' ;;
17309 (debug) DFT_ARG_SUFFIX='_g' ;;
17310 (profile) DFT_ARG_SUFFIX='_p' ;;
17311 (shared) DFT_ARG_SUFFIX='' ;;
17313 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17314 echo "$as_me:17314: result: $DFT_ARG_SUFFIX" >&5
17315 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17317 echo "$as_me:17317: checking default library-dependency suffix" >&5
17318 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17320 case X$DFT_LWR_MODEL in
17322 DFT_LIB_SUFFIX='.la'
17323 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17326 case $cf_cv_system_name in
17328 DFT_LIB_SUFFIX='_g.lib'
17331 DFT_LIB_SUFFIX='_g.a'
17334 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17337 case $cf_cv_system_name in
17339 DFT_LIB_SUFFIX='_p.lib'
17342 DFT_LIB_SUFFIX='_p.a'
17345 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17348 case $cf_cv_system_name in
17350 DFT_LIB_SUFFIX='.so'
17351 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17354 DFT_LIB_SUFFIX='.dll'
17355 DFT_DEP_SUFFIX='.dll.lib'
17357 (cygwin*|msys*|mingw*)
17358 DFT_LIB_SUFFIX='.dll'
17359 DFT_DEP_SUFFIX='.dll.a'
17362 DFT_LIB_SUFFIX='.dylib'
17363 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17368 DFT_LIB_SUFFIX='.so'
17369 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17372 DFT_LIB_SUFFIX='.sl'
17373 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17378 DFT_LIB_SUFFIX='.so'
17379 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17386 DFT_LIB_SUFFIX='.lib'
17389 DFT_LIB_SUFFIX='.a'
17392 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17395 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17397 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17398 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17400 echo "$as_me:17400: result: $DFT_DEP_SUFFIX" >&5
17401 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17403 echo "$as_me:17403: checking default object directory" >&5
17404 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17406 case $DFT_LWR_MODEL in
17407 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17408 (normal) DFT_OBJ_SUBDIR='objects' ;;
17409 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17410 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17412 case $cf_cv_system_name in
17414 DFT_OBJ_SUBDIR='objects' ;;
17416 DFT_OBJ_SUBDIR='obj_s' ;;
17419 echo "$as_me:17419: result: $DFT_OBJ_SUBDIR" >&5
17420 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17422 ### Set up low-level terminfo dependencies for makefiles.
17424 if test "$DFT_LWR_MODEL" = shared ; then
17425 case $cf_cv_system_name in
17427 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17430 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17435 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17437 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17439 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17441 ### Construct the list of subdirectories for which we'll customize makefiles
17442 ### with the appropriate compile-rules.
17444 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17446 cat >>confdefs.h <<EOF
17447 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17450 ################################################################################
17456 NCURSES_SHLIB2="sh -c"
17458 ADA_SUBDIRS="include gen src doc"
17459 if test "x$cf_with_tests" != "xno" ; then
17460 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17462 for cf_dir in $ADA_SUBDIRS
17464 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17471 # match layout used by make-tar.sh
17472 ADAHTML_DIR=../doc/ada
17474 if test "x$cross_compiling" = xyes ; then
17475 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17477 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17480 ac_config_files="$ac_config_files $SUB_MAKEFILES src/library.gpr:src/library.gpr.in doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
17481 ac_config_commands="$ac_config_commands default"
17482 cat >confcache <<\_ACEOF
17483 # This file is a shell script that caches the results of configure
17484 # tests run on this system so they can be shared between configure
17485 # scripts and configure runs, see configure's option --config-cache.
17486 # It is not useful on other systems. If it contains results you don't
17487 # want to keep, you may remove or edit it.
17489 # config.status only pays attention to the cache file if you give it
17490 # the --recheck option to rerun configure.
17492 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17493 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17494 # following values.
17498 # The following way of writing the cache mishandles newlines in values,
17499 # but we know of no workaround that is simple, portable, and efficient.
17500 # So, don't put newlines in cache variables' values.
17501 # Ultrix sh set writes to stderr and can't be redirected directly,
17502 # and sets the high bit in the cache file unless we assign to the vars.
17505 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17507 # `set' does not quote correctly, so add quotes (double-quote
17508 # substitution turns \\\\ into \\, and sed turns \\ into \).
17511 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17514 # `set' quotes correctly as required by POSIX, so do not add quotes.
17516 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17523 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17525 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17527 if cmp -s $cache_file confcache; then :; else
17528 if test -w $cache_file; then
17529 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17530 cat confcache >$cache_file
17532 echo "not updating unwritable cache $cache_file"
17537 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17538 # Let make expand exec_prefix.
17539 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17541 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17542 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17543 # trailing colons and then remove the whole line if VPATH becomes empty
17544 # (actually we leave an empty line to preserve line numbers).
17545 if test "x$srcdir" = x.; then
17546 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17547 s/:*\$(srcdir):*/:/;
17548 s/:*\${srcdir}:*/:/;
17550 s/^\([^=]*=[ ]*\):*/\1/;
17556 DEFS=-DHAVE_CONFIG_H
17558 : ${CONFIG_STATUS=./config.status}
17559 ac_clean_files_save=$ac_clean_files
17560 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17561 { echo "$as_me:17561: creating $CONFIG_STATUS" >&5
17562 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17563 cat >$CONFIG_STATUS <<_ACEOF
17565 # Generated automatically by configure.
17566 # Run this file to recreate the current configuration.
17567 # Compiler output produced by configure, useful for debugging
17568 # configure, is in config.log if it exists.
17571 SHELL=\${CONFIG_SHELL-$SHELL}
17572 ac_cs_invocation="\$0 \$@"
17574 CLICOLOR_FORCE= GREP_OPTIONS=
17575 unset CLICOLOR_FORCE GREP_OPTIONS
17578 cat >>$CONFIG_STATUS <<\_ACEOF
17579 # Be Bourne compatible
17580 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17583 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17587 # Name of the executable.
17588 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17590 if expr a : '\(a\)' >/dev/null 2>&1; then
17596 rm -f conf$$ conf$$.exe conf$$.file
17598 if ln -s conf$$.file conf$$ 2>/dev/null; then
17599 # We could just check for DJGPP; but this test a) works b) is more generic
17600 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17601 if test -f conf$$.exe; then
17602 # Don't use ln at all; we don't have any links
17607 elif ln conf$$.file conf$$ 2>/dev/null; then
17612 rm -f conf$$ conf$$.exe conf$$.file
17614 as_executable_p="test -f"
17616 # Support unset when possible.
17617 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17624 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17625 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17626 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17627 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17628 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17629 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17630 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17631 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17634 # We need space, tab and new line, in precisely that order.
17640 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17646 # Files that config.status was made for.
17647 if test -n "$ac_config_files"; then
17648 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17651 if test -n "$ac_config_headers"; then
17652 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17655 if test -n "$ac_config_links"; then
17656 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17659 if test -n "$ac_config_commands"; then
17660 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17663 cat >>$CONFIG_STATUS <<\EOF
17666 \`$as_me' instantiates files from templates according to the
17667 current configuration.
17669 Usage: $0 [OPTIONS] [FILE]...
17671 -h, --help print this help, then exit
17672 -V, --version print version number, then exit
17673 -d, --debug don't remove temporary files
17674 --recheck update $as_me by reconfiguring in the same conditions
17675 --file=FILE[:TEMPLATE]
17676 instantiate the configuration file FILE
17677 --header=FILE[:TEMPLATE]
17678 instantiate the configuration header FILE
17680 Configuration files:
17683 Configuration headers:
17686 Configuration commands:
17689 Report bugs to <dickey@invisible-island.net>."
17692 cat >>$CONFIG_STATUS <<EOF
17695 configured by $0, generated by GNU Autoconf 2.52.20200802,
17696 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17698 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17699 Free Software Foundation, Inc.
17700 This config.status script is free software; the Free Software Foundation
17701 gives unlimited permission to copy, distribute and modify it."
17706 cat >>$CONFIG_STATUS <<\EOF
17707 # If no file are specified by the user, then we need to provide default
17708 # value. By we need to know if files were specified by the user.
17714 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17715 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17717 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17721 *) # This is not an option, so the user has probably given explicit
17723 ac_need_defaults=false;;
17727 # Handling of the options.
17729 cat >>$CONFIG_STATUS <<EOF
17730 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17731 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17732 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17734 cat >>$CONFIG_STATUS <<\EOF
17735 --version | --vers* | -V )
17736 echo "$ac_cs_version"; exit 0 ;;
17738 # Conflict between --help and --header
17739 { { echo "$as_me:17739: error: ambiguous option: $1
17740 Try \`$0 --help' for more information." >&5
17741 echo "$as_me: error: ambiguous option: $1
17742 Try \`$0 --help' for more information." >&2;}
17743 { (exit 1); exit 1; }; };;
17744 --help | --hel | -h )
17745 echo "$ac_cs_usage"; exit 0 ;;
17746 --debug | --d* | -d )
17748 --file | --fil | --fi | --f )
17750 CONFIG_FILES="$CONFIG_FILES $1"
17751 ac_need_defaults=false;;
17752 --header | --heade | --head | --hea )
17754 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17755 ac_need_defaults=false;;
17757 # This is an error.
17758 -*) { { echo "$as_me:17758: error: unrecognized option: $1
17759 Try \`$0 --help' for more information." >&5
17760 echo "$as_me: error: unrecognized option: $1
17761 Try \`$0 --help' for more information." >&2;}
17762 { (exit 1); exit 1; }; } ;;
17764 *) ac_config_targets="$ac_config_targets $1" ;;
17773 ## ----------------------- ##
17774 ## Running config.status. ##
17775 ## ----------------------- ##
17777 This file was extended by $as_me 2.52.20200802, executed with
17778 CONFIG_FILES = $CONFIG_FILES
17779 CONFIG_HEADERS = $CONFIG_HEADERS
17780 CONFIG_LINKS = $CONFIG_LINKS
17781 CONFIG_COMMANDS = $CONFIG_COMMANDS
17782 > $ac_cs_invocation
17783 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17788 cat >>$CONFIG_STATUS <<EOF
17790 # INIT-COMMANDS section.
17793 ### Special initialization commands, used to pass information from the
17794 ### configuration-run into config.status
17797 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17798 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17799 LIB_NAME="$LIB_NAME"
17800 LIB_PREFIX="$LIB_PREFIX"
17801 LIB_SUFFIX="$LIB_SUFFIX"
17803 NCURSES_MAJOR="$NCURSES_MAJOR"
17804 NCURSES_MINOR="$NCURSES_MINOR"
17805 NCURSES_PATCH="$NCURSES_PATCH"
17806 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
17807 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
17808 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
17809 cf_cv_abi_version="$cf_cv_abi_version"
17810 cf_cv_rel_version="$cf_cv_rel_version"
17811 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17812 cf_cv_shared_soname='$cf_cv_shared_soname'
17813 cf_cv_shlib_version="$cf_cv_shlib_version"
17814 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17815 cf_cv_system_name="$cf_cv_system_name"
17821 cat >>$CONFIG_STATUS <<\EOF
17822 for ac_config_target in $ac_config_targets
17824 case "$ac_config_target" in
17825 # Handling of arguments.
17826 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17827 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
17828 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
17829 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17830 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17831 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17832 *) { { echo "$as_me:17832: error: invalid argument: $ac_config_target" >&5
17833 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17834 { (exit 1); exit 1; }; };;
17838 # If the user did not use the arguments to specify the items to instantiate,
17839 # then the envvar interface is used. Set only those that are not.
17840 # We use the long form for the default assignment because of an extremely
17841 # bizarre bug on SunOS 4.1.3.
17842 if $ac_need_defaults; then
17843 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17844 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17845 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17848 # Create a temporary directory, and hook for its removal unless debugging.
17851 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17852 trap '{ (exit 1); exit 1; }' 1 2 13 15
17855 # Create a (secure) tmp directory for tmp files.
17858 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17859 test -n "$tmp" && test -d "$tmp"
17862 tmp=$TMPDIR/cs$$-$RANDOM
17863 (umask 077 && mkdir $tmp)
17866 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17867 { (exit 1); exit 1; }
17872 cat >>$CONFIG_STATUS <<EOF
17875 # CONFIG_FILES section.
17878 # No need to generate the scripts if there are no CONFIG_FILES.
17879 # This happens for instance when ./config.status config.h
17880 if test -n "\$CONFIG_FILES"; then
17881 # Protect against being on the right side of a sed subst in config.status.
17882 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17883 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17884 s,@SHELL@,$SHELL,;t t
17885 s,@exec_prefix@,$exec_prefix,;t t
17886 s,@prefix@,$prefix,;t t
17887 s,@program_transform_name@,$program_transform_name,;t t
17888 s,@bindir@,$bindir,;t t
17889 s,@sbindir@,$sbindir,;t t
17890 s,@libexecdir@,$libexecdir,;t t
17891 s,@datarootdir@,$datarootdir,;t t
17892 s,@datadir@,$datadir,;t t
17893 s,@sysconfdir@,$sysconfdir,;t t
17894 s,@sharedstatedir@,$sharedstatedir,;t t
17895 s,@localstatedir@,$localstatedir,;t t
17896 s,@runstatedir@,$runstatedir,;t t
17897 s,@libdir@,$libdir,;t t
17898 s,@includedir@,$includedir,;t t
17899 s,@oldincludedir@,$oldincludedir,;t t
17900 s,@infodir@,$infodir,;t t
17901 s,@mandir@,$mandir,;t t
17902 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17903 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17904 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17905 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17906 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17907 s,@build_alias@,$build_alias,;t t
17908 s,@host_alias@,$host_alias,;t t
17909 s,@target_alias@,$target_alias,;t t
17910 s,@ECHO_C@,$ECHO_C,;t t
17911 s,@ECHO_N@,$ECHO_N,;t t
17912 s,@ECHO_T@,$ECHO_T,;t t
17913 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17914 s,@DEFS@,$DEFS,;t t
17915 s,@LIBS@,$LIBS,;t t
17916 s,@top_builddir@,$top_builddir,;t t
17917 s,@build@,$build,;t t
17918 s,@build_cpu@,$build_cpu,;t t
17919 s,@build_vendor@,$build_vendor,;t t
17920 s,@build_os@,$build_os,;t t
17921 s,@host@,$host,;t t
17922 s,@host_cpu@,$host_cpu,;t t
17923 s,@host_vendor@,$host_vendor,;t t
17924 s,@host_os@,$host_os,;t t
17925 s,@target@,$target,;t t
17926 s,@target_cpu@,$target_cpu,;t t
17927 s,@target_vendor@,$target_vendor,;t t
17928 s,@target_os@,$target_os,;t t
17930 s,@CFLAGS@,$CFLAGS,;t t
17931 s,@LDFLAGS@,$LDFLAGS,;t t
17932 s,@CPPFLAGS@,$CPPFLAGS,;t t
17933 s,@ac_ct_CC@,$ac_ct_CC,;t t
17934 s,@EXEEXT@,$EXEEXT,;t t
17935 s,@OBJEXT@,$OBJEXT,;t t
17936 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17939 s,@EGREP@,$EGREP,;t t
17940 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17941 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17942 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17943 s,@LN_S@,$LN_S,;t t
17944 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
17945 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
17946 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17947 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17948 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17949 s,@SET_MAKE@,$SET_MAKE,;t t
17950 s,@CTAGS@,$CTAGS,;t t
17951 s,@ETAGS@,$ETAGS,;t t
17952 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17953 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17954 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17955 s,@RANLIB@,$RANLIB,;t t
17956 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17958 s,@ac_ct_LD@,$ac_ct_LD,;t t
17960 s,@ac_ct_AR@,$ac_ct_AR,;t t
17961 s,@ARFLAGS@,$ARFLAGS,;t t
17962 s,@DESTDIR@,$DESTDIR,;t t
17963 s,@BUILD_CC@,$BUILD_CC,;t t
17964 s,@BUILD_CPP@,$BUILD_CPP,;t t
17965 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17966 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17967 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17968 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17969 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17970 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17971 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17972 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17973 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17974 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17975 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17976 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17977 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17978 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17979 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17980 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17981 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17982 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17983 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17984 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17985 s,@CC_G_OPT@,$CC_G_OPT,;t t
17986 s,@LD_MODEL@,$LD_MODEL,;t t
17987 s,@shlibdir@,$shlibdir,;t t
17988 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
17989 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17990 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17991 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17992 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17993 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
17994 s,@LINK_PROGS@,$LINK_PROGS,;t t
17995 s,@LINK_TESTS@,$LINK_TESTS,;t t
17996 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17997 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17998 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17999 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18000 s,@RPATH_LIST@,$RPATH_LIST,;t t
18001 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18002 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18003 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18004 s,@PTHREAD@,$PTHREAD,;t t
18005 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18006 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18007 s,@ECHO_LT@,$ECHO_LT,;t t
18008 s,@ECHO_LD@,$ECHO_LD,;t t
18009 s,@RULE_CC@,$RULE_CC,;t t
18010 s,@SHOW_CC@,$SHOW_CC,;t t
18011 s,@ECHO_CC@,$ECHO_CC,;t t
18012 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18013 s,@ADAFLAGS@,$ADAFLAGS,;t t
18014 s,@ADA_TRACE@,$ADA_TRACE,;t t
18015 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18016 s,@M4_exists@,$M4_exists,;t t
18017 s,@cf_ada_make@,$cf_ada_make,;t t
18018 s,@cf_ada_config@,$cf_ada_config,;t t
18019 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18020 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18021 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18022 s,@cf_compile_generics@,$cf_compile_generics,;t t
18023 s,@cf_generic_objects@,$cf_generic_objects,;t t
18024 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18025 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18026 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18027 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18028 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18029 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18030 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18031 s,@cf_ada_package@,$cf_ada_package,;t t
18032 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18033 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18034 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18035 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18036 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18037 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18038 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18039 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18040 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18041 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18042 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18043 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18044 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18045 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18046 s,@TEST_ARG2@,$TEST_ARG2,;t t
18047 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18048 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18049 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18050 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18051 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18052 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18053 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18058 cat >>$CONFIG_STATUS <<\EOF
18059 # Split the substitutions into bite-sized pieces for seds with
18060 # small command number limits, like on Digital OSF/1 and HP-UX.
18061 ac_max_sed_lines=48
18062 ac_sed_frag=1 # Number of current file.
18063 ac_beg=1 # First line for current file.
18064 ac_end=$ac_max_sed_lines # Line after last line for current file.
18067 while $ac_more_lines; do
18068 if test $ac_beg -gt 1; then
18069 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18071 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18073 if test ! -s $tmp/subs.frag; then
18074 ac_more_lines=false
18076 # The purpose of the label and of the branching condition is to
18077 # speed up the sed processing (if there are no `@' at all, there
18078 # is no need to browse any of the substitutions).
18079 # These are the two extra sed commands mentioned above.
18081 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18082 # It is possible to make a multiline substitution using escaped newlines.
18083 # Ensure that we do not split the substitution between script fragments.
18085 ac_END=`expr $ac_end + $ac_max_sed_lines`
18086 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18087 if test -s $tmp/subs.next; then
18088 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18089 if test ! -s $tmp/subs.edit; then
18090 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18091 if test ! -s $tmp/subs.edit; then
18092 if test $ac_beg -gt 1; then
18093 ac_end=`expr $ac_end - 1`
18100 if test -z "$ac_sed_cmds"; then
18101 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18103 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18105 ac_sed_frag=`expr $ac_sed_frag + 1`
18107 ac_end=`expr $ac_end + $ac_max_sed_lines`
18110 if test -z "$ac_sed_cmds"; then
18113 fi # test -n "$CONFIG_FILES"
18116 cat >>$CONFIG_STATUS <<\EOF
18117 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18118 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18120 - | *:- | *:-:* ) # input from stdin
18122 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18123 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18124 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18125 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18126 * ) ac_file_in=$ac_file.in ;;
18129 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18130 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18131 X"$ac_file" : 'X\(//\)[^/]' \| \
18132 X"$ac_file" : 'X\(//\)$' \| \
18133 X"$ac_file" : 'X\(/\)' \| \
18134 . : '\(.\)' 2>/dev/null ||
18136 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18137 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18138 /^X\(\/\/\)$/{ s//\1/; q; }
18139 /^X\(\/\).*/{ s//\1/; q; }
18141 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18142 { case "$ac_dir" in
18143 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18147 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18148 case $as_mkdir_dir in
18149 # Skip DOS drivespec
18150 ?:) as_incr_dir=$as_mkdir_dir ;;
18152 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18153 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18158 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18159 # A "../" for each directory in $ac_dir_suffix.
18160 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18162 ac_dir_suffix= ac_dots=
18167 if test -z "$ac_dots"; then
18170 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18172 [\\/]* | ?:[\\/]* )
18173 ac_srcdir=$srcdir$ac_dir_suffix;
18174 ac_top_srcdir=$srcdir ;;
18175 *) # Relative path.
18176 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18177 ac_top_srcdir=$ac_dots$srcdir ;;
18181 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18182 *) ac_INSTALL=$ac_dots$INSTALL ;;
18185 if test x"$ac_file" != x-; then
18186 { echo "$as_me:18186: creating $ac_file" >&5
18187 echo "$as_me: creating $ac_file" >&6;}
18190 # Let's still pretend it is `configure' which instantiates (i.e., don't
18191 # use $as_me), people would be surprised to read:
18192 # /* config.h. Generated automatically by config.status. */
18193 configure_input="Generated automatically from `echo $ac_file_in |
18194 sed 's,.*/,,'` by configure."
18196 # First look for the input files in the build tree, otherwise in the
18198 ac_file_inputs=`IFS=:
18199 for f in $ac_file_in; do
18201 -) echo $tmp/stdin ;;
18203 # Absolute (can't be DOS-style, as IFS=:)
18204 test -f "$f" || { { echo "$as_me:18204: error: cannot find input file: $f" >&5
18205 echo "$as_me: error: cannot find input file: $f" >&2;}
18206 { (exit 1); exit 1; }; }
18209 if test -f "$f"; then
18212 elif test -f "$srcdir/$f"; then
18217 { { echo "$as_me:18217: error: cannot find input file: $f" >&5
18218 echo "$as_me: error: cannot find input file: $f" >&2;}
18219 { (exit 1); exit 1; }; }
18222 done` || { (exit 1); exit 1; }
18224 cat >>$CONFIG_STATUS <<\EOF
18225 ac_warn_datarootdir=no
18226 if test x"$ac_file" != x-; then
18227 for ac_item in $ac_file_inputs
18229 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18230 if test -n "$ac_seen"; then
18231 ac_used=`grep '@datarootdir@' $ac_item`
18232 if test -z "$ac_used"; then
18233 { echo "$as_me:18233: WARNING: datarootdir was used implicitly but not set:
18235 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18237 ac_warn_datarootdir=yes
18240 ac_seen=`grep '${datarootdir}' $ac_item`
18241 if test -n "$ac_seen"; then
18242 { echo "$as_me:18242: WARNING: datarootdir was used explicitly but not set:
18244 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18246 ac_warn_datarootdir=yes
18251 if test "x$ac_warn_datarootdir" = xyes; then
18252 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18256 cat >>$CONFIG_STATUS <<EOF
18260 cat >>$CONFIG_STATUS <<\EOF
18262 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18263 s,@configure_input@,$configure_input,;t t
18264 s,@srcdir@,$ac_srcdir,;t t
18265 s,@top_srcdir@,$ac_top_srcdir,;t t
18266 s,@INSTALL@,$ac_INSTALL,;t t
18267 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18269 if test x"$ac_file" != x-; then
18270 cp $tmp/out $ac_file
18272 for ac_name in prefix exec_prefix datarootdir
18274 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18275 if test -n "$ac_seen"; then
18276 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18277 if test -z "$ac_init"; then
18278 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18279 { echo "$as_me:18279: WARNING: Variable $ac_name is used but was not set:
18281 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18286 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18287 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18288 if test -s $tmp/out; then
18289 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18290 { echo "$as_me:18290: WARNING: Some variables may not be substituted:
18292 echo "$as_me: WARNING: Some variables may not be substituted:
18302 cat >>$CONFIG_STATUS <<\EOF
18305 # CONFIG_HEADER section.
18308 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18309 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18311 # ac_d sets the value in "#define NAME VALUE" lines.
18312 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18313 ac_dB='[ ].*$,\1#\2'
18316 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18317 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18318 ac_iB='\([ ]\),\1#\2define\3'
18321 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18322 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18323 ac_uB='$,\1#\2define\3'
18327 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18328 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18330 - | *:- | *:-:* ) # input from stdin
18332 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18333 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18334 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18335 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18336 * ) ac_file_in=$ac_file.in ;;
18339 test x"$ac_file" != x- && { echo "$as_me:18339: creating $ac_file" >&5
18340 echo "$as_me: creating $ac_file" >&6;}
18342 # First look for the input files in the build tree, otherwise in the
18344 ac_file_inputs=`IFS=:
18345 for f in $ac_file_in; do
18347 -) echo $tmp/stdin ;;
18349 # Absolute (can't be DOS-style, as IFS=:)
18350 test -f "$f" || { { echo "$as_me:18350: error: cannot find input file: $f" >&5
18351 echo "$as_me: error: cannot find input file: $f" >&2;}
18352 { (exit 1); exit 1; }; }
18355 if test -f "$f"; then
18358 elif test -f "$srcdir/$f"; then
18363 { { echo "$as_me:18363: error: cannot find input file: $f" >&5
18364 echo "$as_me: error: cannot find input file: $f" >&2;}
18365 { (exit 1); exit 1; }; }
18368 done` || { (exit 1); exit 1; }
18369 # Remove the trailing spaces.
18370 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18374 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18375 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18376 # be either 'cat' or 'sort'.
18377 cat confdefs.h | uniq >conftest.vals
18379 # Break up conftest.vals because some shells have a limit on
18380 # the size of here documents, and old seds have small limits too.
18382 rm -f conftest.tail
18383 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18384 while grep . conftest.vals >/dev/null
18386 # Write chunks of a limited-size here document to conftest.frag.
18387 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18388 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18389 echo 'CEOF' >> $CONFIG_STATUS
18390 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18391 rm -f conftest.vals
18392 mv conftest.tail conftest.vals
18394 rm -f conftest.vals
18396 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18398 echo ' cat >> conftest.edit <<CEOF
18399 /@DEFS@/r conftest.frag
18402 sed -f conftest.edit $tmp/in > $tmp/out
18404 mv $tmp/out $tmp/in
18405 rm -f conftest.edit conftest.frag
18406 ' >> $CONFIG_STATUS
18408 cat >>$CONFIG_STATUS <<\EOF
18409 # Let's still pretend it is `configure' which instantiates (i.e., don't
18410 # use $as_me), people would be surprised to read:
18411 # /* config.h. Generated automatically by config.status. */
18412 if test x"$ac_file" = x-; then
18413 echo "/* Generated automatically by configure. */" >$tmp/config.h
18415 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18417 cat $tmp/in >>$tmp/config.h
18419 if test x"$ac_file" != x-; then
18420 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18421 { echo "$as_me:18421: $ac_file is unchanged" >&5
18422 echo "$as_me: $ac_file is unchanged" >&6;}
18424 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18425 X"$ac_file" : 'X\(//\)[^/]' \| \
18426 X"$ac_file" : 'X\(//\)$' \| \
18427 X"$ac_file" : 'X\(/\)' \| \
18428 . : '\(.\)' 2>/dev/null ||
18430 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18431 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18432 /^X\(\/\/\)$/{ s//\1/; q; }
18433 /^X\(\/\).*/{ s//\1/; q; }
18435 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18436 { case "$ac_dir" in
18437 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18441 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18442 case $as_mkdir_dir in
18443 # Skip DOS drivespec
18444 ?:) as_incr_dir=$as_mkdir_dir ;;
18446 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18447 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18454 mv $tmp/config.h $ac_file
18458 rm -f $tmp/config.h
18462 cat >>$CONFIG_STATUS <<\EOF
18464 # CONFIG_COMMANDS section.
18466 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18467 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18468 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18472 if test -z "$USE_OLD_MAKERULES" ; then
18473 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18480 cat >>$CONFIG_STATUS <<\EOF
18482 { (exit 0); exit 0; }
18484 chmod +x $CONFIG_STATUS
18485 ac_clean_files=$ac_clean_files_save
18487 # configure is writing to config.log, and then calls config.status.
18488 # config.status does its own redirection, appending to config.log.
18489 # Unfortunately, on DOS this fails, as config.log is still kept open
18490 # by configure, so config.status won't be able to write to it; its
18491 # output is simply discarded. So we exec the FD to /dev/null,
18492 # effectively closing config.log, so it can be properly (re)opened and
18493 # appended to by config.status. When coming back to configure, we
18494 # need to make the FD available again.
18495 if test "$no_create" != yes; then
18498 $SHELL $CONFIG_STATUS || ac_cs_success=false
18500 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18501 # would make configure fail if this is the last instruction.
18502 $ac_cs_success || { (exit 1); exit 1; }
18504 ${MAKE:-make} preinstall