2 # From configure.in Revision: 1.62 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
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 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
185 # Identity of this package.
195 # If the previous option needs an argument, assign it.
196 if test -n "$ac_prev"; then
197 eval "$ac_prev=\$ac_option"
202 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204 # Accept the important Cygnus configure options, so we can diagnose typos.
208 -bindir | --bindir | --bindi | --bind | --bin | --bi)
210 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213 -build | --build | --buil | --bui | --bu)
214 ac_prev=build_alias ;;
215 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216 build_alias=$ac_optarg ;;
218 -cache-file | --cache-file | --cache-fil | --cache-fi \
219 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220 ac_prev=cache_file ;;
221 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223 cache_file=$ac_optarg ;;
226 cache_file=config.cache ;;
228 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232 datadir=$ac_optarg ;;
234 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235 | --dataroo | --dataro | --datar)
236 ac_prev=datarootdir ;;
237 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239 datarootdir=$ac_optarg ;;
241 -disable-* | --disable-*)
242 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243 # Reject names that are not valid shell variable names.
244 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246 { (exit 1); exit 1; }; }
247 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248 eval "enable_$ac_feature=no" ;;
250 -enable-* | --enable-*)
251 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252 # Reject names that are not valid shell variable names.
253 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255 { (exit 1); exit 1; }; }
256 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261 eval "enable_$ac_feature='$ac_optarg'" ;;
263 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265 | --exec | --exe | --ex)
266 ac_prev=exec_prefix ;;
267 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269 | --exec=* | --exe=* | --ex=*)
270 exec_prefix=$ac_optarg ;;
272 -gas | --gas | --ga | --g)
273 # Obsolete; use --with-gas.
276 -help | --help | --hel | --he | -h)
278 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279 ac_init_help=recursive ;;
280 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281 ac_init_help=short ;;
283 -host | --host | --hos | --ho)
284 ac_prev=host_alias ;;
285 -host=* | --host=* | --hos=* | --ho=*)
286 host_alias=$ac_optarg ;;
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir=$ac_optarg ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir=$ac_optarg ;;
300 -libdir | --libdir | --libdi | --libd)
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir=$ac_optarg ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir=$ac_optarg ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
327 # Obsolete; use --without-fp.
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir=$ac_optarg ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix=$ac_optarg ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix=$ac_optarg ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name=$ac_optarg ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391 sbindir=$ac_optarg ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402 sharedstatedir=$ac_optarg ;;
404 -site | --site | --sit)
406 -site=* | --site=* | --sit=*)
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir=$ac_optarg ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
422 ac_prev=target_alias ;;
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target_alias=$ac_optarg ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
429 -version | --version | --versio | --versi | --vers | -V)
433 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434 # Reject names that are not valid shell variable names.
435 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436 { echo "$as_me: error: invalid package name: $ac_package" >&2
437 { (exit 1); exit 1; }; }
438 ac_package=`echo $ac_package| sed 's/-/_/g'`
440 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
443 eval "with_$ac_package='$ac_optarg'" ;;
445 -without-* | --without-*)
446 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447 # Reject names that are not valid shell variable names.
448 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449 { echo "$as_me: error: invalid package name: $ac_package" >&2
450 { (exit 1); exit 1; }; }
451 ac_package=`echo $ac_package | sed 's/-/_/g'`
452 eval "with_$ac_package=no" ;;
455 # Obsolete; use --with-x.
458 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459 | --x-incl | --x-inc | --x-in | --x-i)
460 ac_prev=x_includes ;;
461 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463 x_includes=$ac_optarg ;;
465 -x-libraries | --x-libraries | --x-librarie | --x-librari \
466 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467 ac_prev=x_libraries ;;
468 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470 x_libraries=$ac_optarg ;;
472 -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474 { (exit 1); exit 1; }; }
478 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479 # Reject names that are not valid shell variable names.
480 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482 { (exit 1); exit 1; }; }
483 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484 eval "$ac_envvar='$ac_optarg'"
488 # FIXME: should be removed in autoconf 3.0.
489 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
498 if test -n "$ac_prev"; then
499 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500 { echo "$as_me: error: missing argument to $ac_option" >&2
501 { (exit 1); exit 1; }; }
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
507 eval ac_val=$`echo $ac_var`
509 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511 { (exit 1); exit 1; }; };;
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517 localstatedir libdir includedir oldincludedir infodir mandir
519 eval ac_val=$`echo $ac_var`
521 [\\/$]* | ?:[\\/]* ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535 if test "x$build_alias" = x; then
536 cross_compiling=maybe
537 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538 If a cross compiler is detected then cross compile mode will be used." >&2
539 elif test "x$build_alias" != "x$host_alias"; then
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
547 test "$silent" = yes && exec 6>/dev/null
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551 ac_srcdir_defaulted=yes
552 # Try the directory containing this script, then its parent.
554 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
557 if test ! -r $srcdir/$ac_unique_file; then
561 ac_srcdir_defaulted=no
563 if test ! -r $srcdir/$ac_unique_file; then
564 if test "$ac_srcdir_defaulted" = yes; then
565 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566 { (exit 1); exit 1; }; }
568 { echo "$as_me: error: cannot find sources in $srcdir" >&2
569 { (exit 1); exit 1; }; }
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
607 # Report the --help message.
609 if test "$ac_init_help" = "long"; then
610 # Omit some internal or obsolete options to make the list less imposing.
611 # This message is too long to be a string in the A/UX 3.1 sh.
613 \`configure' configures this package to adapt to many kinds of systems.
615 Usage: $0 [OPTION]... [VAR=VALUE]...
617 To assign environment variables (e.g., CC, CFLAGS...), specify them as
618 VAR=VALUE. See below for descriptions of some of the useful variables.
620 Defaults for the options are specified in brackets.
623 -h, --help display this help and exit
624 --help=short display options specific to this package
625 --help=recursive display the short help of all the included packages
626 -V, --version display version information and exit
627 -q, --quiet, --silent do not print \`checking...' messages
628 --cache-file=FILE cache test results in FILE [disabled]
629 -C, --config-cache alias for \`--cache-file=config.cache'
630 -n, --no-create do not create output files
631 --srcdir=DIR find the sources in DIR [configure dir or \`..']
636 Installation directories:
637 --prefix=PREFIX install architecture-independent files in PREFIX
639 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
642 By default, \`make install' will install all the files in
643 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
644 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
645 for instance \`--prefix=\$HOME'.
647 For better control, use the options below.
649 Fine tuning of the installation directories:
650 --bindir=DIR user executables [EPREFIX/bin]
651 --sbindir=DIR system admin executables [EPREFIX/sbin]
652 --libexecdir=DIR program executables [EPREFIX/libexec]
653 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
654 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
655 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
656 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
657 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
658 --libdir=DIR object code libraries [EPREFIX/lib]
659 --includedir=DIR C header files [PREFIX/include]
660 --oldincludedir=DIR C header files for non-gcc [/usr/include]
661 --infodir=DIR info documentation [DATAROOTDIR/info]
662 --mandir=DIR man documentation [DATAROOTDIR/man]
668 --program-prefix=PREFIX prepend PREFIX to installed program names
669 --program-suffix=SUFFIX append SUFFIX to installed program names
670 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
673 --build=BUILD configure for building on BUILD [guessed]
674 --host=HOST build programs to run on HOST [BUILD]
675 --target=TARGET configure for building compilers for TARGET [HOST]
679 if test -n "$ac_init_help"; then
684 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
685 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
688 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
689 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
691 --with-system-type=XXX test: override derived host system-type
692 --with-pkg-config{=path} enable/disable use of pkg-config
693 --with-pkg-config-libdir=XXX use given directory for installing pc-files
694 --without-tests suppress build with test-programs
695 --enable-mixed-case tic should assume mixed-case filenames
696 --with-install-prefix prefixes actual install-location ($DESTDIR)
697 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
698 --with-build-cc=XXX the build C compiler ($BUILD_CC)
699 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
700 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
701 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
702 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
703 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
704 Options to Specify the Libraries Built/Used:
705 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
706 --with-curses-dir=DIR directory in which (n)curses is installed
707 --enable-widec compile with wide-char/UTF-8 code
708 --with-lib-prefix override library-prefix
709 --with-shlib-version=X Specify rel or abi version for shared libs
710 --enable-rpath-link link sample programs with rpath option
711 Fine-Tuning Your Configuration:
712 --enable-broken_linker compile with broken-linker support code
713 --disable-largefile omit support for large files
714 --with-rcs-ids compile-in RCS identifiers
716 --disable-ext-funcs disable function-extensions
717 --enable-const compile with extra/non-standard const
719 --without-develop disable development options
721 --with-pthread use POSIX thread library
722 --enable-weak-symbols enable weak-symbols for pthreads
723 --enable-reentrant compile with experimental reentrant code
724 --with-wrap-prefix=XXX override prefix used for public variables
725 Testing/development Options:
726 --disable-echo do not display "compiling" commands
727 --enable-warnings build: turn on GCC compiler warnings
728 --enable-assertions test: turn on generation of assertion code
729 --enable-expanded test: generate functions for certain macros
730 --disable-macros test: use functions rather than macros
731 --with-trace test: add trace() function to all models of ncurses
732 --disable-gnat-projects test: disable GNAT projects even if usable
733 Ada95 Binding Options:
734 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
735 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
736 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
737 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
739 Some influential environment variables:
740 CC C compiler command
741 CFLAGS C compiler flags
742 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
743 nonstandard directory <lib dir>
744 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
745 headers in a nonstandard directory <include dir>
748 Use these variables to override the choices made by `configure' or to help
749 it to find libraries and programs with nonstandard names/locations.
754 if test "$ac_init_help" = "recursive"; then
755 # If there are subdirs, report their specific --help.
757 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
759 # A "../" for each directory in /$ac_subdir.
760 ac_dots=`echo $ac_subdir |
761 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
764 .) # No --srcdir option. We are building in place.
765 ac_sub_srcdir=$srcdir ;;
766 [\\/]* | ?:[\\/]* ) # Absolute path.
767 ac_sub_srcdir=$srcdir/$ac_subdir ;;
769 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
772 # Check for guested configure; otherwise get Cygnus style configure.
773 if test -f $ac_sub_srcdir/configure.gnu; then
775 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
776 elif test -f $ac_sub_srcdir/configure; then
778 $SHELL $ac_sub_srcdir/configure --help=recursive
779 elif test -f $ac_sub_srcdir/configure.ac ||
780 test -f $ac_sub_srcdir/configure.in; then
784 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
790 test -n "$ac_init_help" && exit 0
791 if $ac_init_version; then
794 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
795 Free Software Foundation, Inc.
796 This configure script is free software; the Free Software Foundation
797 gives unlimited permission to copy, distribute and modify it.
803 This file contains any messages produced by compilers while
804 running configure, to aid debugging if configure makes a mistake.
806 It was created by $as_me, which was
807 generated by GNU Autoconf 2.52.20150926. Invocation command line was
818 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
819 uname -m = `(uname -m) 2>/dev/null || echo unknown`
820 uname -r = `(uname -r) 2>/dev/null || echo unknown`
821 uname -s = `(uname -s) 2>/dev/null || echo unknown`
822 uname -v = `(uname -v) 2>/dev/null || echo unknown`
824 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
825 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
827 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
828 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
829 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
830 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
831 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
832 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
833 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
847 # Keep a trace of the command line.
848 # Strip out --no-create and --no-recursion so they do not pile up.
849 # Also quote any args containing shell meta-characters.
855 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
856 | --no-cr | --no-c) ;;
857 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
858 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
859 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
860 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
861 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
863 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
866 # Get rid of the leading space.
869 # When interrupted or exit'd, cleanup temporary files, and complete
870 # config.log. We remove comments because anyway the quotes in there
871 # would cause problems or look ugly.
873 # Save into config.log some information that might help in debugging.
875 echo "## ----------------- ##" >&5
876 echo "## Cache variables. ##" >&5
877 echo "## ----------------- ##" >&5
879 # The following way of writing the cache mishandles newlines in values,
882 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
885 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
886 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
890 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
894 sed "/^$/d" confdefs.h >conftest.log
895 if test -s conftest.log; then
897 echo "## ------------ ##" >&5
898 echo "## confdefs.h. ##" >&5
899 echo "## ------------ ##" >&5
904 test "$ac_signal" != 0 &&
905 echo "$as_me: caught signal $ac_signal" >&5
906 echo "$as_me: exit $exit_status" >&5
907 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
910 for ac_signal in 1 2 13 15; do
911 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
915 # confdefs.h avoids OS command line length limits that DEFS can exceed.
916 rm -rf conftest* confdefs.h
917 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
920 # Let the site file select an alternate cache file if it wants to.
921 # Prefer explicitly selected file to automatically selected ones.
922 if test -z "$CONFIG_SITE"; then
923 if test "x$prefix" != xNONE; then
924 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
926 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
929 for ac_site_file in $CONFIG_SITE; do
930 if test -r "$ac_site_file"; then
931 { echo "$as_me:931: loading site script $ac_site_file" >&5
932 echo "$as_me: loading site script $ac_site_file" >&6;}
933 cat "$ac_site_file" >&5
938 if test -r "$cache_file"; then
939 # Some versions of bash will fail to source /dev/null (special
940 # files actually), so we avoid doing that.
941 if test -f "$cache_file"; then
942 { echo "$as_me:942: loading cache $cache_file" >&5
943 echo "$as_me: loading cache $cache_file" >&6;}
945 [\\/]* | ?:[\\/]* ) . $cache_file;;
950 { echo "$as_me:950: creating cache $cache_file" >&5
951 echo "$as_me: creating cache $cache_file" >&6;}
955 # Check that the precious variables saved in the cache have kept the same
957 ac_cache_corrupted=false
958 for ac_var in `(set) 2>&1 |
959 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
960 eval ac_old_set=\$ac_cv_env_${ac_var}_set
961 eval ac_new_set=\$ac_env_${ac_var}_set
962 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
963 eval ac_new_val="\$ac_env_${ac_var}_value"
964 case $ac_old_set,$ac_new_set in
966 { echo "$as_me:966: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
967 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
968 ac_cache_corrupted=: ;;
970 { echo "$as_me:970: error: \`$ac_var' was not set in the previous run" >&5
971 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
972 ac_cache_corrupted=: ;;
975 if test "x$ac_old_val" != "x$ac_new_val"; then
976 { echo "$as_me:976: error: \`$ac_var' has changed since the previous run:" >&5
977 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
978 { echo "$as_me:978: former value: $ac_old_val" >&5
979 echo "$as_me: former value: $ac_old_val" >&2;}
980 { echo "$as_me:980: current value: $ac_new_val" >&5
981 echo "$as_me: current value: $ac_new_val" >&2;}
985 # Pass precious variables to config.status. It doesn't matter if
986 # we pass some twice (in addition to the command line arguments).
987 if test "$ac_new_set" = set; then
989 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
990 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
991 ac_configure_args="$ac_configure_args '$ac_arg'"
993 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
998 if $ac_cache_corrupted; then
999 { echo "$as_me:999: error: changes in the environment can compromise the build" >&5
1000 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1001 { { echo "$as_me:1001: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1002 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1003 { (exit 1); exit 1; }; }
1007 ac_cpp='$CPP $CPPFLAGS'
1008 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1009 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1010 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1011 ac_main_return=return
1013 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1014 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1016 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1017 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1019 echo "#! $SHELL" >conftest.sh
1020 echo "exit 0" >>conftest.sh
1021 chmod +x conftest.sh
1022 if { (echo "$as_me:1022: PATH=\".;.\"; conftest.sh") >&5
1023 (PATH=".;."; conftest.sh) 2>&5
1025 echo "$as_me:1025: \$? = $ac_status" >&5
1026 (exit $ac_status); }; then
1027 ac_path_separator=';'
1031 PATH_SEPARATOR="$ac_path_separator"
1034 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1039 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1040 if test -f $ac_dir/install-sh; then
1042 ac_install_sh="$ac_aux_dir/install-sh -c"
1044 elif test -f $ac_dir/install.sh; then
1046 ac_install_sh="$ac_aux_dir/install.sh -c"
1048 elif test -f $ac_dir/shtool; then
1050 ac_install_sh="$ac_aux_dir/shtool install -c"
1054 if test -z "$ac_aux_dir"; then
1055 { { echo "$as_me:1055: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1056 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1057 { (exit 1); exit 1; }; }
1059 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1060 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1061 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1063 # Make sure we can run config.sub.
1064 $ac_config_sub sun4 >/dev/null 2>&1 ||
1065 { { echo "$as_me:1065: error: cannot run $ac_config_sub" >&5
1066 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1067 { (exit 1); exit 1; }; }
1069 echo "$as_me:1069: checking build system type" >&5
1070 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1071 if test "${ac_cv_build+set}" = set; then
1072 echo $ECHO_N "(cached) $ECHO_C" >&6
1074 ac_cv_build_alias=$build_alias
1075 test -z "$ac_cv_build_alias" &&
1076 ac_cv_build_alias=`$ac_config_guess`
1077 test -z "$ac_cv_build_alias" &&
1078 { { echo "$as_me:1078: error: cannot guess build type; you must specify one" >&5
1079 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1080 { (exit 1); exit 1; }; }
1081 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1082 { { echo "$as_me:1082: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1083 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1084 { (exit 1); exit 1; }; }
1087 echo "$as_me:1087: result: $ac_cv_build" >&5
1088 echo "${ECHO_T}$ac_cv_build" >&6
1090 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1094 echo "$as_me:1094: checking host system type" >&5
1095 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1096 if test "${ac_cv_host+set}" = set; then
1097 echo $ECHO_N "(cached) $ECHO_C" >&6
1099 ac_cv_host_alias=$host_alias
1100 test -z "$ac_cv_host_alias" &&
1101 ac_cv_host_alias=$ac_cv_build_alias
1102 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1103 { { echo "$as_me:1103: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1104 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1105 { (exit 1); exit 1; }; }
1108 echo "$as_me:1108: result: $ac_cv_host" >&5
1109 echo "${ECHO_T}$ac_cv_host" >&6
1111 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1112 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1113 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1115 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1116 echo "$as_me:1116: checking target system type" >&5
1117 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1118 if test "${ac_cv_target+set}" = set; then
1119 echo $ECHO_N "(cached) $ECHO_C" >&6
1121 ac_cv_target_alias=$target_alias
1122 test "x$ac_cv_target_alias" = "x" &&
1123 ac_cv_target_alias=$ac_cv_host_alias
1124 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1125 { { echo "$as_me:1125: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1126 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1127 { (exit 1); exit 1; }; }
1130 echo "$as_me:1130: result: $ac_cv_target" >&5
1131 echo "${ECHO_T}$ac_cv_target" >&6
1132 target=$ac_cv_target
1133 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1134 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1135 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1137 # The aliases save the names the user supplied, while $host etc.
1138 # will get canonicalized.
1139 test -n "$target_alias" &&
1140 test "$program_prefix$program_suffix$program_transform_name" = \
1142 program_prefix=${target_alias}-
1143 system_name="$host_os"
1145 system_name="`(uname -s -r) 2>/dev/null`"
1146 if test -z "$system_name" ; then
1147 system_name="`(hostname) 2>/dev/null`"
1150 test -n "$system_name" &&
1151 cat >>confdefs.h <<EOF
1152 #define SYSTEM_NAME "$system_name"
1155 if test "${cf_cv_system_name+set}" = set; then
1156 echo $ECHO_N "(cached) $ECHO_C" >&6
1158 cf_cv_system_name="$system_name"
1161 test -z "$system_name" && system_name="$cf_cv_system_name"
1162 test -n "$cf_cv_system_name" && echo "$as_me:1162: result: Configuring for $cf_cv_system_name" >&5
1163 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1165 if test ".$system_name" != ".$cf_cv_system_name" ; then
1166 echo "$as_me:1166: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1167 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1168 { { echo "$as_me:1168: error: \"Please remove config.cache and try again.\"" >&5
1169 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1170 { (exit 1); exit 1; }; }
1173 # Check whether --with-system-type or --without-system-type was given.
1174 if test "${with_system_type+set}" = set; then
1175 withval="$with_system_type"
1176 { echo "$as_me:1176: WARNING: overriding system type to $withval" >&5
1177 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1178 cf_cv_system_name=$withval
1183 ### Save the given $CFLAGS to allow user-override.
1184 cf_user_CFLAGS="$CFLAGS"
1186 ### Default install-location
1188 echo "$as_me:1188: checking for prefix" >&5
1189 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1190 if test "x$prefix" = "xNONE" ; then
1191 case "$cf_cv_system_name" in
1192 # non-vendor systems don't have a conflict
1193 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1196 (*) prefix=$ac_default_prefix
1200 echo "$as_me:1200: result: $prefix" >&5
1201 echo "${ECHO_T}$prefix" >&6
1203 if test "x$prefix" = "xNONE" ; then
1204 echo "$as_me:1204: checking for default include-directory" >&5
1205 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1206 test -n "$verbose" && echo 1>&6
1209 $includedir/ncurses \
1211 $prefix/include/ncurses \
1212 /usr/local/include \
1213 /usr/local/include/ncurses \
1215 /usr/include/ncurses
1217 cf_dir=`eval echo $cf_symbol`
1218 if test -f $cf_dir/curses.h ; then
1219 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1220 includedir="$cf_symbol"
1221 test -n "$verbose" && echo $ac_n " found " 1>&6
1225 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1227 echo "$as_me:1227: result: $includedir" >&5
1228 echo "${ECHO_T}$includedir" >&6
1231 ### Checks for programs.
1234 ac_cpp='$CPP $CPPFLAGS'
1235 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1236 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1237 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1238 ac_main_return=return
1239 if test -n "$ac_tool_prefix"; then
1240 for ac_prog in gnatgcc gcc cc
1242 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1243 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1244 echo "$as_me:1244: checking for $ac_word" >&5
1245 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1246 if test "${ac_cv_prog_CC+set}" = set; then
1247 echo $ECHO_N "(cached) $ECHO_C" >&6
1249 if test -n "$CC"; then
1250 ac_cv_prog_CC="$CC" # Let the user override the test.
1252 ac_save_IFS=$IFS; IFS=$ac_path_separator
1254 for ac_dir in $ac_dummy; do
1256 test -z "$ac_dir" && ac_dir=.
1257 $as_executable_p "$ac_dir/$ac_word" || continue
1258 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1259 echo "$as_me:1259: found $ac_dir/$ac_word" >&5
1266 if test -n "$CC"; then
1267 echo "$as_me:1267: result: $CC" >&5
1268 echo "${ECHO_T}$CC" >&6
1270 echo "$as_me:1270: result: no" >&5
1271 echo "${ECHO_T}no" >&6
1274 test -n "$CC" && break
1277 if test -z "$CC"; then
1279 for ac_prog in gnatgcc gcc cc
1281 # Extract the first word of "$ac_prog", so it can be a program name with args.
1282 set dummy $ac_prog; ac_word=$2
1283 echo "$as_me:1283: checking for $ac_word" >&5
1284 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1285 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1286 echo $ECHO_N "(cached) $ECHO_C" >&6
1288 if test -n "$ac_ct_CC"; then
1289 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1291 ac_save_IFS=$IFS; IFS=$ac_path_separator
1293 for ac_dir in $ac_dummy; do
1295 test -z "$ac_dir" && ac_dir=.
1296 $as_executable_p "$ac_dir/$ac_word" || continue
1297 ac_cv_prog_ac_ct_CC="$ac_prog"
1298 echo "$as_me:1298: found $ac_dir/$ac_word" >&5
1304 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1305 if test -n "$ac_ct_CC"; then
1306 echo "$as_me:1306: result: $ac_ct_CC" >&5
1307 echo "${ECHO_T}$ac_ct_CC" >&6
1309 echo "$as_me:1309: result: no" >&5
1310 echo "${ECHO_T}no" >&6
1313 test -n "$ac_ct_CC" && break
1319 test -z "$CC" && { { echo "$as_me:1319: error: no acceptable cc found in \$PATH" >&5
1320 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1321 { (exit 1); exit 1; }; }
1323 # Provide some information about the compiler.
1324 echo "$as_me:1324:" \
1325 "checking for C compiler version" >&5
1326 ac_compiler=`set X $ac_compile; echo $2`
1327 { (eval echo "$as_me:1327: \"$ac_compiler --version </dev/null >&5\"") >&5
1328 (eval $ac_compiler --version </dev/null >&5) 2>&5
1330 echo "$as_me:1330: \$? = $ac_status" >&5
1331 (exit $ac_status); }
1332 { (eval echo "$as_me:1332: \"$ac_compiler -v </dev/null >&5\"") >&5
1333 (eval $ac_compiler -v </dev/null >&5) 2>&5
1335 echo "$as_me:1335: \$? = $ac_status" >&5
1336 (exit $ac_status); }
1337 { (eval echo "$as_me:1337: \"$ac_compiler -V </dev/null >&5\"") >&5
1338 (eval $ac_compiler -V </dev/null >&5) 2>&5
1340 echo "$as_me:1340: \$? = $ac_status" >&5
1341 (exit $ac_status); }
1343 cat >conftest.$ac_ext <<_ACEOF
1344 #line 1344 "configure"
1345 #include "confdefs.h"
1355 ac_clean_files_save=$ac_clean_files
1356 ac_clean_files="$ac_clean_files a.out a.exe"
1357 # Try to create an executable without -o first, disregard a.out.
1358 # It will help us diagnose broken compilers, and finding out an intuition
1360 echo "$as_me:1360: checking for C compiler default output" >&5
1361 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1362 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1363 if { (eval echo "$as_me:1363: \"$ac_link_default\"") >&5
1364 (eval $ac_link_default) 2>&5
1366 echo "$as_me:1366: \$? = $ac_status" >&5
1367 (exit $ac_status); }; then
1368 # Find the output, starting from the most likely. This scheme is
1369 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1371 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1372 ls a.out conftest 2>/dev/null;
1373 ls a.* conftest.* 2>/dev/null`; do
1375 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1376 a.out ) # We found the default executable, but exeext='' is most
1379 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1380 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1387 echo "$as_me: failed program was:" >&5
1388 cat conftest.$ac_ext >&5
1389 { { echo "$as_me:1389: error: C compiler cannot create executables" >&5
1390 echo "$as_me: error: C compiler cannot create executables" >&2;}
1391 { (exit 77); exit 77; }; }
1394 ac_exeext=$ac_cv_exeext
1395 echo "$as_me:1395: result: $ac_file" >&5
1396 echo "${ECHO_T}$ac_file" >&6
1398 # Check the compiler produces executables we can run. If not, either
1399 # the compiler is broken, or we cross compile.
1400 echo "$as_me:1400: checking whether the C compiler works" >&5
1401 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1402 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1403 # If not cross compiling, check that we can run a simple program.
1404 if test "$cross_compiling" != yes; then
1405 if { ac_try='./$ac_file'
1406 { (eval echo "$as_me:1406: \"$ac_try\"") >&5
1409 echo "$as_me:1409: \$? = $ac_status" >&5
1410 (exit $ac_status); }; }; then
1413 if test "$cross_compiling" = maybe; then
1416 { { echo "$as_me:1416: error: cannot run C compiled programs.
1417 If you meant to cross compile, use \`--host'." >&5
1418 echo "$as_me: error: cannot run C compiled programs.
1419 If you meant to cross compile, use \`--host'." >&2;}
1420 { (exit 1); exit 1; }; }
1424 echo "$as_me:1424: result: yes" >&5
1425 echo "${ECHO_T}yes" >&6
1427 rm -f a.out a.exe conftest$ac_cv_exeext
1428 ac_clean_files=$ac_clean_files_save
1429 # Check the compiler produces executables we can run. If not, either
1430 # the compiler is broken, or we cross compile.
1431 echo "$as_me:1431: checking whether we are cross compiling" >&5
1432 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1433 echo "$as_me:1433: result: $cross_compiling" >&5
1434 echo "${ECHO_T}$cross_compiling" >&6
1436 echo "$as_me:1436: checking for executable suffix" >&5
1437 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1438 if { (eval echo "$as_me:1438: \"$ac_link\"") >&5
1439 (eval $ac_link) 2>&5
1441 echo "$as_me:1441: \$? = $ac_status" >&5
1442 (exit $ac_status); }; then
1443 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1444 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1445 # work properly (i.e., refer to `conftest.exe'), while it won't with
1447 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1449 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1450 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1457 { { echo "$as_me:1457: error: cannot compute EXEEXT: cannot compile and link" >&5
1458 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1459 { (exit 1); exit 1; }; }
1462 rm -f conftest$ac_cv_exeext
1463 echo "$as_me:1463: result: $ac_cv_exeext" >&5
1464 echo "${ECHO_T}$ac_cv_exeext" >&6
1466 rm -f conftest.$ac_ext
1467 EXEEXT=$ac_cv_exeext
1469 echo "$as_me:1469: checking for object suffix" >&5
1470 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1471 if test "${ac_cv_objext+set}" = set; then
1472 echo $ECHO_N "(cached) $ECHO_C" >&6
1474 cat >conftest.$ac_ext <<_ACEOF
1475 #line 1475 "configure"
1476 #include "confdefs.h"
1486 rm -f conftest.o conftest.obj
1487 if { (eval echo "$as_me:1487: \"$ac_compile\"") >&5
1488 (eval $ac_compile) 2>&5
1490 echo "$as_me:1490: \$? = $ac_status" >&5
1491 (exit $ac_status); }; then
1492 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1494 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1495 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1500 echo "$as_me: failed program was:" >&5
1501 cat conftest.$ac_ext >&5
1502 { { echo "$as_me:1502: error: cannot compute OBJEXT: cannot compile" >&5
1503 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1504 { (exit 1); exit 1; }; }
1507 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1509 echo "$as_me:1509: result: $ac_cv_objext" >&5
1510 echo "${ECHO_T}$ac_cv_objext" >&6
1511 OBJEXT=$ac_cv_objext
1513 echo "$as_me:1513: checking whether we are using the GNU C compiler" >&5
1514 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1515 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1516 echo $ECHO_N "(cached) $ECHO_C" >&6
1518 cat >conftest.$ac_ext <<_ACEOF
1519 #line 1519 "configure"
1520 #include "confdefs.h"
1533 rm -f conftest.$ac_objext
1534 if { (eval echo "$as_me:1534: \"$ac_compile\"") >&5
1535 (eval $ac_compile) 2>&5
1537 echo "$as_me:1537: \$? = $ac_status" >&5
1538 (exit $ac_status); } &&
1539 { ac_try='test -s conftest.$ac_objext'
1540 { (eval echo "$as_me:1540: \"$ac_try\"") >&5
1543 echo "$as_me:1543: \$? = $ac_status" >&5
1544 (exit $ac_status); }; }; then
1547 echo "$as_me: failed program was:" >&5
1548 cat conftest.$ac_ext >&5
1551 rm -f conftest.$ac_objext conftest.$ac_ext
1552 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1555 echo "$as_me:1555: result: $ac_cv_c_compiler_gnu" >&5
1556 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1557 GCC=`test $ac_compiler_gnu = yes && echo yes`
1558 ac_test_CFLAGS=${CFLAGS+set}
1559 ac_save_CFLAGS=$CFLAGS
1561 echo "$as_me:1561: checking whether $CC accepts -g" >&5
1562 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1563 if test "${ac_cv_prog_cc_g+set}" = set; then
1564 echo $ECHO_N "(cached) $ECHO_C" >&6
1566 cat >conftest.$ac_ext <<_ACEOF
1567 #line 1567 "configure"
1568 #include "confdefs.h"
1578 rm -f conftest.$ac_objext
1579 if { (eval echo "$as_me:1579: \"$ac_compile\"") >&5
1580 (eval $ac_compile) 2>&5
1582 echo "$as_me:1582: \$? = $ac_status" >&5
1583 (exit $ac_status); } &&
1584 { ac_try='test -s conftest.$ac_objext'
1585 { (eval echo "$as_me:1585: \"$ac_try\"") >&5
1588 echo "$as_me:1588: \$? = $ac_status" >&5
1589 (exit $ac_status); }; }; then
1592 echo "$as_me: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1596 rm -f conftest.$ac_objext conftest.$ac_ext
1598 echo "$as_me:1598: result: $ac_cv_prog_cc_g" >&5
1599 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1600 if test "$ac_test_CFLAGS" = set; then
1601 CFLAGS=$ac_save_CFLAGS
1602 elif test $ac_cv_prog_cc_g = yes; then
1603 if test "$GCC" = yes; then
1609 if test "$GCC" = yes; then
1615 # Some people use a C++ compiler to compile C. Since we use `exit',
1616 # in C++ we need to declare it. In case someone uses the same compiler
1617 # for both compiling C and C++ we need to have the C++ compiler decide
1618 # the declaration of exit, since it's the most demanding environment.
1619 cat >conftest.$ac_ext <<_ACEOF
1624 rm -f conftest.$ac_objext
1625 if { (eval echo "$as_me:1625: \"$ac_compile\"") >&5
1626 (eval $ac_compile) 2>&5
1628 echo "$as_me:1628: \$? = $ac_status" >&5
1629 (exit $ac_status); } &&
1630 { ac_try='test -s conftest.$ac_objext'
1631 { (eval echo "$as_me:1631: \"$ac_try\"") >&5
1634 echo "$as_me:1634: \$? = $ac_status" >&5
1635 (exit $ac_status); }; }; then
1636 for ac_declaration in \
1638 '#include <stdlib.h>' \
1639 'extern "C" void std::exit (int) throw (); using std::exit;' \
1640 'extern "C" void std::exit (int); using std::exit;' \
1641 'extern "C" void exit (int) throw ();' \
1642 'extern "C" void exit (int);' \
1645 cat >conftest.$ac_ext <<_ACEOF
1646 #line 1646 "configure"
1647 #include "confdefs.h"
1658 rm -f conftest.$ac_objext
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit $ac_status); } &&
1664 { ac_try='test -s conftest.$ac_objext'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit $ac_status); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat conftest.$ac_ext >&5
1676 rm -f conftest.$ac_objext conftest.$ac_ext
1677 cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1689 rm -f conftest.$ac_objext
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691 (eval $ac_compile) 2>&5
1693 echo "$as_me:1693: \$? = $ac_status" >&5
1694 (exit $ac_status); } &&
1695 { ac_try='test -s conftest.$ac_objext'
1696 { (eval echo "$as_me:1696: \"$ac_try\"") >&5
1699 echo "$as_me:1699: \$? = $ac_status" >&5
1700 (exit $ac_status); }; }; then
1703 echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1706 rm -f conftest.$ac_objext conftest.$ac_ext
1709 if test -n "$ac_declaration"; then
1710 echo '#ifdef __cplusplus' >>confdefs.h
1711 echo $ac_declaration >>confdefs.h
1712 echo '#endif' >>confdefs.h
1716 echo "$as_me: failed program was:" >&5
1717 cat conftest.$ac_ext >&5
1719 rm -f conftest.$ac_objext conftest.$ac_ext
1721 ac_cpp='$CPP $CPPFLAGS'
1722 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1723 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1724 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1725 ac_main_return=return
1728 if test "$GCC" = yes ; then
1729 echo "$as_me:1729: checking version of $CC" >&5
1730 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1731 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.].*//'`"
1732 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1733 echo "$as_me:1733: result: $GCC_VERSION" >&5
1734 echo "${ECHO_T}$GCC_VERSION" >&6
1737 echo "$as_me:1737: checking for $CC option to accept ANSI C" >&5
1738 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1739 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1740 echo $ECHO_N "(cached) $ECHO_C" >&6
1742 ac_cv_prog_cc_stdc=no
1744 cat >conftest.$ac_ext <<_ACEOF
1745 #line 1745 "configure"
1746 #include "confdefs.h"
1749 #include <sys/types.h>
1750 #include <sys/stat.h>
1751 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1752 struct buf { int x; };
1753 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1754 static char *e (p, i)
1760 static char *f (char * (*g) (char **, int), char **p, ...)
1765 s = g (p, va_arg (v,int));
1769 int test (int i, double x);
1770 struct s1 {int (*f) (int a);};
1771 struct s2 {int (*f) (double a);};
1772 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1778 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1783 # Don't try gcc -ansi; that turns off useful extensions and
1784 # breaks some systems' header files.
1785 # AIX -qlanglvl=ansi
1786 # Ultrix and OSF/1 -std1
1787 # HP-UX 10.20 and later -Ae
1788 # HP-UX older versions -Aa -D_HPUX_SOURCE
1789 # SVR4 -Xc -D__EXTENSIONS__
1790 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1792 CC="$ac_save_CC $ac_arg"
1793 rm -f conftest.$ac_objext
1794 if { (eval echo "$as_me:1794: \"$ac_compile\"") >&5
1795 (eval $ac_compile) 2>&5
1797 echo "$as_me:1797: \$? = $ac_status" >&5
1798 (exit $ac_status); } &&
1799 { ac_try='test -s conftest.$ac_objext'
1800 { (eval echo "$as_me:1800: \"$ac_try\"") >&5
1803 echo "$as_me:1803: \$? = $ac_status" >&5
1804 (exit $ac_status); }; }; then
1805 ac_cv_prog_cc_stdc=$ac_arg
1808 echo "$as_me: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
1811 rm -f conftest.$ac_objext
1813 rm -f conftest.$ac_ext conftest.$ac_objext
1818 case "x$ac_cv_prog_cc_stdc" in
1820 echo "$as_me:1820: result: none needed" >&5
1821 echo "${ECHO_T}none needed" >&6 ;;
1823 echo "$as_me:1823: result: $ac_cv_prog_cc_stdc" >&5
1824 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1825 CC="$CC $ac_cv_prog_cc_stdc" ;;
1828 # This should have been defined by AC_PROG_CC
1831 echo "$as_me:1831: checking \$CC variable" >&5
1832 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1835 echo "$as_me:1835: result: broken" >&5
1836 echo "${ECHO_T}broken" >&6
1837 { echo "$as_me:1837: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1838 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1840 cf_flags=`echo "$CC" | sed -e 's/^.*[ ]\(-[^ ]\)/\1/'`
1841 CC=`echo "$CC " | sed -e 's/[ ]-[^ ].*$//' -e 's/[ ]*$//'`
1842 for cf_arg in $cf_flags
1850 cf_new_extra_cppflags=
1852 for cf_add_cflags in $cf_flags
1854 case $cf_fix_cppflags in
1856 case $cf_add_cflags in
1857 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1858 case $cf_add_cflags in
1860 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1862 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1863 && test -z "${cf_tst_cflags}" \
1864 && cf_fix_cppflags=yes
1866 if test $cf_fix_cppflags = yes ; then
1867 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1869 elif test "${cf_tst_cflags}" = "\"'" ; then
1870 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1879 case $cf_add_cflags in
1881 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1883 CPPFLAGS=`echo "$CPPFLAGS" | \
1884 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1885 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1889 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1894 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1899 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1901 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1903 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1904 && test -z "${cf_tst_cflags}" \
1905 && cf_fix_cppflags=no
1910 if test -n "$cf_new_cflags" ; then
1912 CFLAGS="$CFLAGS $cf_new_cflags"
1915 if test -n "$cf_new_cppflags" ; then
1917 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1920 if test -n "$cf_new_extra_cppflags" ; then
1922 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1931 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
1933 echo "${as_me:-configure}:1933: testing resulting CC: '$CC' ..." 1>&5
1935 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
1937 echo "${as_me:-configure}:1937: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1939 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1941 echo "${as_me:-configure}:1941: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1945 echo "$as_me:1945: result: ok" >&5
1946 echo "${ECHO_T}ok" >&6
1951 ac_cpp='$CPP $CPPFLAGS'
1952 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1953 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1954 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1955 ac_main_return=return
1956 echo "$as_me:1956: checking how to run the C preprocessor" >&5
1957 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1958 # On Suns, sometimes $CPP names a directory.
1959 if test -n "$CPP" && test -d "$CPP"; then
1962 if test -z "$CPP"; then
1963 if test "${ac_cv_prog_CPP+set}" = set; then
1964 echo $ECHO_N "(cached) $ECHO_C" >&6
1966 # Double quotes because CPP needs to be expanded
1967 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1970 for ac_c_preproc_warn_flag in '' yes
1972 # Use a header file that comes with gcc, so configuring glibc
1973 # with a fresh cross-compiler works.
1974 # On the NeXT, cc -E runs the code through the compiler's parser,
1975 # not just through cpp. "Syntax error" is here to catch this case.
1976 cat >conftest.$ac_ext <<_ACEOF
1977 #line 1977 "configure"
1978 #include "confdefs.h"
1982 if { (eval echo "$as_me:1982: \"$ac_cpp conftest.$ac_ext\"") >&5
1983 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1985 egrep -v '^ *\+' conftest.er1 >conftest.err
1987 cat conftest.err >&5
1988 echo "$as_me:1988: \$? = $ac_status" >&5
1989 (exit $ac_status); } >/dev/null; then
1990 if test -s conftest.err; then
1991 ac_cpp_err=$ac_c_preproc_warn_flag
1998 if test -z "$ac_cpp_err"; then
2001 echo "$as_me: failed program was:" >&5
2002 cat conftest.$ac_ext >&5
2003 # Broken: fails on valid input.
2006 rm -f conftest.err conftest.$ac_ext
2008 # OK, works on sane cases. Now check whether non-existent headers
2009 # can be detected and how.
2010 cat >conftest.$ac_ext <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013 #include <ac_nonexistent.h>
2015 if { (eval echo "$as_me:2015: \"$ac_cpp conftest.$ac_ext\"") >&5
2016 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2018 egrep -v '^ *\+' conftest.er1 >conftest.err
2020 cat conftest.err >&5
2021 echo "$as_me:2021: \$? = $ac_status" >&5
2022 (exit $ac_status); } >/dev/null; then
2023 if test -s conftest.err; then
2024 ac_cpp_err=$ac_c_preproc_warn_flag
2031 if test -z "$ac_cpp_err"; then
2032 # Broken: success on invalid input.
2035 echo "$as_me: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2037 # Passes both tests.
2041 rm -f conftest.err conftest.$ac_ext
2044 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2045 rm -f conftest.err conftest.$ac_ext
2046 if $ac_preproc_ok; then
2058 echo "$as_me:2058: result: $CPP" >&5
2059 echo "${ECHO_T}$CPP" >&6
2061 for ac_c_preproc_warn_flag in '' yes
2063 # Use a header file that comes with gcc, so configuring glibc
2064 # with a fresh cross-compiler works.
2065 # On the NeXT, cc -E runs the code through the compiler's parser,
2066 # not just through cpp. "Syntax error" is here to catch this case.
2067 cat >conftest.$ac_ext <<_ACEOF
2068 #line 2068 "configure"
2069 #include "confdefs.h"
2073 if { (eval echo "$as_me:2073: \"$ac_cpp conftest.$ac_ext\"") >&5
2074 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2076 egrep -v '^ *\+' conftest.er1 >conftest.err
2078 cat conftest.err >&5
2079 echo "$as_me:2079: \$? = $ac_status" >&5
2080 (exit $ac_status); } >/dev/null; then
2081 if test -s conftest.err; then
2082 ac_cpp_err=$ac_c_preproc_warn_flag
2089 if test -z "$ac_cpp_err"; then
2092 echo "$as_me: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 # Broken: fails on valid input.
2097 rm -f conftest.err conftest.$ac_ext
2099 # OK, works on sane cases. Now check whether non-existent headers
2100 # can be detected and how.
2101 cat >conftest.$ac_ext <<_ACEOF
2102 #line 2102 "configure"
2103 #include "confdefs.h"
2104 #include <ac_nonexistent.h>
2106 if { (eval echo "$as_me:2106: \"$ac_cpp conftest.$ac_ext\"") >&5
2107 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2109 egrep -v '^ *\+' conftest.er1 >conftest.err
2111 cat conftest.err >&5
2112 echo "$as_me:2112: \$? = $ac_status" >&5
2113 (exit $ac_status); } >/dev/null; then
2114 if test -s conftest.err; then
2115 ac_cpp_err=$ac_c_preproc_warn_flag
2122 if test -z "$ac_cpp_err"; then
2123 # Broken: success on invalid input.
2126 echo "$as_me: failed program was:" >&5
2127 cat conftest.$ac_ext >&5
2128 # Passes both tests.
2132 rm -f conftest.err conftest.$ac_ext
2135 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2136 rm -f conftest.err conftest.$ac_ext
2137 if $ac_preproc_ok; then
2140 { { echo "$as_me:2140: error: C preprocessor \"$CPP\" fails sanity check" >&5
2141 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2142 { (exit 1); exit 1; }; }
2146 ac_cpp='$CPP $CPPFLAGS'
2147 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2148 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2149 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2150 ac_main_return=return
2152 if test $ac_cv_c_compiler_gnu = yes; then
2153 echo "$as_me:2153: checking whether $CC needs -traditional" >&5
2154 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2155 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2156 echo $ECHO_N "(cached) $ECHO_C" >&6
2158 ac_pattern="Autoconf.*'x'"
2159 cat >conftest.$ac_ext <<_ACEOF
2160 #line 2160 "configure"
2161 #include "confdefs.h"
2163 int Autoconf = TIOCGETP;
2165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2166 egrep "$ac_pattern" >/dev/null 2>&1; then
2167 ac_cv_prog_gcc_traditional=yes
2169 ac_cv_prog_gcc_traditional=no
2173 if test $ac_cv_prog_gcc_traditional = no; then
2174 cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2178 int Autoconf = TCGETA;
2180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2181 egrep "$ac_pattern" >/dev/null 2>&1; then
2182 ac_cv_prog_gcc_traditional=yes
2188 echo "$as_me:2188: result: $ac_cv_prog_gcc_traditional" >&5
2189 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2190 if test $ac_cv_prog_gcc_traditional = yes; then
2191 CC="$CC -traditional"
2195 echo "$as_me:2195: checking whether $CC understands -c and -o together" >&5
2196 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2197 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2198 echo $ECHO_N "(cached) $ECHO_C" >&6
2201 cat > conftest.$ac_ext <<CF_EOF
2204 ${cf_cv_main_return:-return}(0);
2207 # We do the test twice because some compilers refuse to overwrite an
2208 # existing .o file with -o, though they will create one.
2209 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2210 if { (eval echo "$as_me:2210: \"$ac_try\"") >&5
2213 echo "$as_me:2213: \$? = $ac_status" >&5
2214 (exit $ac_status); } &&
2215 test -f conftest2.$ac_objext && { (eval echo "$as_me:2215: \"$ac_try\"") >&5
2218 echo "$as_me:2218: \$? = $ac_status" >&5
2219 (exit $ac_status); };
2221 eval cf_cv_prog_CC_c_o=yes
2223 eval cf_cv_prog_CC_c_o=no
2228 if test $cf_cv_prog_CC_c_o = yes; then
2229 echo "$as_me:2229: result: yes" >&5
2230 echo "${ECHO_T}yes" >&6
2232 echo "$as_me:2232: result: no" >&5
2233 echo "${ECHO_T}no" >&6
2236 test "$program_prefix" != NONE &&
2237 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2238 # Use a double $ so make ignores it.
2239 test "$program_suffix" != NONE &&
2240 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2241 # Double any \ or $. echo might interpret backslashes.
2242 # By default was `s,x,x', remove it if useless.
2243 cat <<\_ACEOF >conftest.sed
2244 s/[\\$]/&&/g;s/;s,x,x,$//
2246 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2249 for ac_prog in mawk gawk nawk awk
2251 # Extract the first word of "$ac_prog", so it can be a program name with args.
2252 set dummy $ac_prog; ac_word=$2
2253 echo "$as_me:2253: checking for $ac_word" >&5
2254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2255 if test "${ac_cv_prog_AWK+set}" = set; then
2256 echo $ECHO_N "(cached) $ECHO_C" >&6
2258 if test -n "$AWK"; then
2259 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2261 ac_save_IFS=$IFS; IFS=$ac_path_separator
2263 for ac_dir in $ac_dummy; do
2265 test -z "$ac_dir" && ac_dir=.
2266 $as_executable_p "$ac_dir/$ac_word" || continue
2267 ac_cv_prog_AWK="$ac_prog"
2268 echo "$as_me:2268: found $ac_dir/$ac_word" >&5
2275 if test -n "$AWK"; then
2276 echo "$as_me:2276: result: $AWK" >&5
2277 echo "${ECHO_T}$AWK" >&6
2279 echo "$as_me:2279: result: no" >&5
2280 echo "${ECHO_T}no" >&6
2283 test -n "$AWK" && break
2286 test -z "$AWK" && { { echo "$as_me:2286: error: No awk program found" >&5
2287 echo "$as_me: error: No awk program found" >&2;}
2288 { (exit 1); exit 1; }; }
2290 echo "$as_me:2290: checking for egrep" >&5
2291 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2292 if test "${ac_cv_prog_egrep+set}" = set; then
2293 echo $ECHO_N "(cached) $ECHO_C" >&6
2295 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2296 then ac_cv_prog_egrep='grep -E'
2297 else ac_cv_prog_egrep='egrep'
2300 echo "$as_me:2300: result: $ac_cv_prog_egrep" >&5
2301 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2302 EGREP=$ac_cv_prog_egrep
2304 test -z "$EGREP" && { { echo "$as_me:2304: error: No egrep program found" >&5
2305 echo "$as_me: error: No egrep program found" >&2;}
2306 { (exit 1); exit 1; }; }
2308 # Find a good install program. We prefer a C program (faster),
2309 # so one script is as good as another. But avoid the broken or
2310 # incompatible versions:
2311 # SysV /etc/install, /usr/sbin/install
2312 # SunOS /usr/etc/install
2313 # IRIX /sbin/install
2315 # AmigaOS /C/install, which installs bootblocks on floppy discs
2316 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2317 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2318 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2319 # ./install, which can be erroneously created by make from ./install.sh.
2320 echo "$as_me:2320: checking for a BSD compatible install" >&5
2321 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2322 if test -z "$INSTALL"; then
2323 if test "${ac_cv_path_install+set}" = set; then
2324 echo $ECHO_N "(cached) $ECHO_C" >&6
2326 ac_save_IFS=$IFS; IFS=$ac_path_separator
2327 for ac_dir in $PATH; do
2329 # Account for people who put trailing slashes in PATH elements.
2331 / | ./ | .// | /cC/* \
2332 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2335 # OSF1 and SCO ODT 3.0 have their own names for install.
2336 # Don't use installbsd from OSF since it installs stuff as root
2338 for ac_prog in ginstall scoinst install; do
2339 if $as_executable_p "$ac_dir/$ac_prog"; then
2340 if test $ac_prog = install &&
2341 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2342 # AIX install. It has an incompatible calling convention.
2344 elif test $ac_prog = install &&
2345 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2346 # program-specific install script used by HP pwplus--don't use.
2349 ac_cv_path_install="$ac_dir/$ac_prog -c"
2359 if test "${ac_cv_path_install+set}" = set; then
2360 INSTALL=$ac_cv_path_install
2362 # As a last resort, use the slow shell script. We don't cache a
2363 # path for INSTALL within a source directory, because that will
2364 # break other packages using the cache if that directory is
2365 # removed, or if the path is relative.
2366 INSTALL=$ac_install_sh
2369 echo "$as_me:2369: result: $INSTALL" >&5
2370 echo "${ECHO_T}$INSTALL" >&6
2372 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2373 # It thinks the first close brace ends the variable substitution.
2374 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2376 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2378 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2380 echo "$as_me:2380: checking whether ln -s works" >&5
2381 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2383 if test "$LN_S" = "ln -s"; then
2384 echo "$as_me:2384: result: yes" >&5
2385 echo "${ECHO_T}yes" >&6
2387 echo "$as_me:2387: result: no, using $LN_S" >&5
2388 echo "${ECHO_T}no, using $LN_S" >&6
2391 echo "$as_me:2391: checking if $LN_S -f options work" >&5
2392 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2394 rm -f conf$$.src conf$$dst
2396 echo first >conf$$.src
2397 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2402 rm -f conf$$.dst conf$$src
2403 echo "$as_me:2403: result: $cf_prog_ln_sf" >&5
2404 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2406 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2408 echo "$as_me:2408: checking for long file names" >&5
2409 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2410 if test "${ac_cv_sys_long_file_names+set}" = set; then
2411 echo $ECHO_N "(cached) $ECHO_C" >&6
2413 ac_cv_sys_long_file_names=yes
2414 # Test for long file names in all the places we know might matter:
2415 # . the current directory, where building will happen
2416 # $prefix/lib where we will be installing things
2417 # $exec_prefix/lib likewise
2418 # eval it to expand exec_prefix.
2419 # $TMPDIR if set, where it might want to write temporary files
2420 # if $TMPDIR is not set:
2421 # /tmp where it might want to write temporary files
2424 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2427 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2429 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2430 test -d $ac_dir || continue
2431 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2432 ac_xdir=$ac_dir/cf$$
2433 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2434 ac_tf1=$ac_xdir/conftest9012345
2435 ac_tf2=$ac_xdir/conftest9012346
2436 (echo 1 >$ac_tf1) 2>/dev/null
2437 (echo 2 >$ac_tf2) 2>/dev/null
2438 ac_val=`cat $ac_tf1 2>/dev/null`
2439 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2440 ac_cv_sys_long_file_names=no
2441 rm -rf $ac_xdir 2>/dev/null
2444 rm -rf $ac_xdir 2>/dev/null
2447 echo "$as_me:2447: result: $ac_cv_sys_long_file_names" >&5
2448 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2449 if test $ac_cv_sys_long_file_names = yes; then
2451 cat >>confdefs.h <<\EOF
2452 #define HAVE_LONG_FILE_NAMES 1
2457 # if we find pkg-config, check if we should install the ".pc" files.
2459 echo "$as_me:2459: checking if you want to use pkg-config" >&5
2460 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2462 # Check whether --with-pkg-config or --without-pkg-config was given.
2463 if test "${with_pkg_config+set}" = set; then
2464 withval="$with_pkg_config"
2465 cf_pkg_config=$withval
2469 echo "$as_me:2469: result: $cf_pkg_config" >&5
2470 echo "${ECHO_T}$cf_pkg_config" >&6
2472 case $cf_pkg_config in
2478 if test -n "$ac_tool_prefix"; then
2479 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2480 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2481 echo "$as_me:2481: checking for $ac_word" >&5
2482 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2483 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2484 echo $ECHO_N "(cached) $ECHO_C" >&6
2488 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2491 ac_save_IFS=$IFS; IFS=$ac_path_separator
2493 for ac_dir in $ac_dummy; do
2495 test -z "$ac_dir" && ac_dir=.
2496 if $as_executable_p "$ac_dir/$ac_word"; then
2497 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2498 echo "$as_me:2498: found $ac_dir/$ac_word" >&5
2506 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2508 if test -n "$PKG_CONFIG"; then
2509 echo "$as_me:2509: result: $PKG_CONFIG" >&5
2510 echo "${ECHO_T}$PKG_CONFIG" >&6
2512 echo "$as_me:2512: result: no" >&5
2513 echo "${ECHO_T}no" >&6
2517 if test -z "$ac_cv_path_PKG_CONFIG"; then
2518 ac_pt_PKG_CONFIG=$PKG_CONFIG
2519 # Extract the first word of "pkg-config", so it can be a program name with args.
2520 set dummy pkg-config; ac_word=$2
2521 echo "$as_me:2521: checking for $ac_word" >&5
2522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2523 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2524 echo $ECHO_N "(cached) $ECHO_C" >&6
2526 case $ac_pt_PKG_CONFIG in
2528 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2531 ac_save_IFS=$IFS; IFS=$ac_path_separator
2533 for ac_dir in $ac_dummy; do
2535 test -z "$ac_dir" && ac_dir=.
2536 if $as_executable_p "$ac_dir/$ac_word"; then
2537 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2538 echo "$as_me:2538: found $ac_dir/$ac_word" >&5
2543 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2547 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2549 if test -n "$ac_pt_PKG_CONFIG"; then
2550 echo "$as_me:2550: result: $ac_pt_PKG_CONFIG" >&5
2551 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2553 echo "$as_me:2553: result: no" >&5
2554 echo "${ECHO_T}no" >&6
2557 PKG_CONFIG=$ac_pt_PKG_CONFIG
2559 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2568 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2569 if test "$PKG_CONFIG" != none ; then
2571 if test "x$prefix" != xNONE; then
2572 cf_path_syntax="$prefix"
2574 cf_path_syntax="$ac_default_prefix"
2577 case ".$PKG_CONFIG" in
2582 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2584 (.\${*prefix}*|.\${*dir}*)
2585 eval PKG_CONFIG="$PKG_CONFIG"
2586 case ".$PKG_CONFIG" in
2588 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2593 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2596 { { echo "$as_me:2596: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2597 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2598 { (exit 1); exit 1; }; }
2602 elif test "x$cf_pkg_config" != xno ; then
2603 { echo "$as_me:2603: WARNING: pkg-config is not installed" >&5
2604 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2609 echo "$as_me:2609: checking for pkg-config library directory" >&5
2610 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2613 echo "$as_me:2613: checking for $PKG_CONFIG library directory" >&5
2614 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2618 PKG_CONFIG_LIBDIR=no
2620 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2621 if test "${with_pkg_config_libdir+set}" = set; then
2622 withval="$with_pkg_config_libdir"
2623 PKG_CONFIG_LIBDIR=$withval
2625 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2628 case x$PKG_CONFIG_LIBDIR in
2632 # Look for the library directory using the same prefix as the executable
2633 if test "x$PKG_CONFIG" = xnone
2637 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2640 # If you don't like using the default architecture, you have to specify the
2641 # intended library directory and corresponding compiler/linker options.
2643 # This case allows for Debian's 2014-flavor of multiarch, along with the
2644 # most common variations before that point. Some other variants spell the
2645 # directory differently, e.g., "pkg-config", and put it in unusual places.
2646 # pkg-config has always been poorly standardized, which is ironic...
2647 case x`(arch) 2>/dev/null` in
2650 $cf_path/lib/*64-linux-gnu \
2658 $cf_path/lib/*-linux-gnu \
2666 test -n "$verbose" && echo " list..." 1>&6
2668 echo "${as_me:-configure}:2668: testing list... ..." 1>&5
2670 for cf_config in $cf_search_path
2672 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2674 echo "${as_me:-configure}:2674: testing checking $cf_config/pkgconfig ..." 1>&5
2676 if test -d $cf_config/pkgconfig
2678 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2679 echo "$as_me:2679: checking done" >&5
2680 echo $ECHO_N "checking done... $ECHO_C" >&6
2689 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2690 echo "$as_me:2690: result: $PKG_CONFIG_LIBDIR" >&5
2691 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2694 echo "$as_me:2694: checking if you want to build test-programs" >&5
2695 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2697 # Check whether --with-tests or --without-tests was given.
2698 if test "${with_tests+set}" = set; then
2699 withval="$with_tests"
2700 cf_with_tests=$withval
2704 echo "$as_me:2704: result: $cf_with_tests" >&5
2705 echo "${ECHO_T}$cf_with_tests" >&6
2707 echo "$as_me:2707: checking if we should assume mixed-case filenames" >&5
2708 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2710 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2711 if test "${enable_mixed_case+set}" = set; then
2712 enableval="$enable_mixed_case"
2713 enable_mixedcase=$enableval
2715 enable_mixedcase=auto
2717 echo "$as_me:2717: result: $enable_mixedcase" >&5
2718 echo "${ECHO_T}$enable_mixedcase" >&6
2719 if test "$enable_mixedcase" = "auto" ; then
2721 echo "$as_me:2721: checking if filesystem supports mixed-case filenames" >&5
2722 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2723 if test "${cf_cv_mixedcase+set}" = set; then
2724 echo $ECHO_N "(cached) $ECHO_C" >&6
2727 if test "$cross_compiling" = yes ; then
2728 case $target_alias in
2729 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2737 rm -f conftest CONFTEST
2739 if test -f CONFTEST ; then
2744 rm -f conftest CONFTEST
2748 echo "$as_me:2748: result: $cf_cv_mixedcase" >&5
2749 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2750 test "$cf_cv_mixedcase" = yes &&
2751 cat >>confdefs.h <<\EOF
2752 #define MIXEDCASE_FILENAMES 1
2756 cf_cv_mixedcase=$enable_mixedcase
2757 if test "$enable_mixedcase" = "yes" ; then
2758 cat >>confdefs.h <<\EOF
2759 #define MIXEDCASE_FILENAMES 1
2765 # do this after mixed-case option (tags/TAGS is not as important as tic).
2766 echo "$as_me:2766: checking whether ${MAKE-make} sets \${MAKE}" >&5
2767 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2768 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2769 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2770 echo $ECHO_N "(cached) $ECHO_C" >&6
2772 cat >conftest.make <<\EOF
2774 @echo 'ac_maketemp="${MAKE}"'
2776 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2777 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2778 if test -n "$ac_maketemp"; then
2779 eval ac_cv_prog_make_${ac_make}_set=yes
2781 eval ac_cv_prog_make_${ac_make}_set=no
2785 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2786 echo "$as_me:2786: result: yes" >&5
2787 echo "${ECHO_T}yes" >&6
2790 echo "$as_me:2790: result: no" >&5
2791 echo "${ECHO_T}no" >&6
2792 SET_MAKE="MAKE=${MAKE-make}"
2795 for ac_prog in exctags ctags
2797 # Extract the first word of "$ac_prog", so it can be a program name with args.
2798 set dummy $ac_prog; ac_word=$2
2799 echo "$as_me:2799: checking for $ac_word" >&5
2800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2801 if test "${ac_cv_prog_CTAGS+set}" = set; then
2802 echo $ECHO_N "(cached) $ECHO_C" >&6
2804 if test -n "$CTAGS"; then
2805 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2807 ac_save_IFS=$IFS; IFS=$ac_path_separator
2809 for ac_dir in $ac_dummy; do
2811 test -z "$ac_dir" && ac_dir=.
2812 $as_executable_p "$ac_dir/$ac_word" || continue
2813 ac_cv_prog_CTAGS="$ac_prog"
2814 echo "$as_me:2814: found $ac_dir/$ac_word" >&5
2820 CTAGS=$ac_cv_prog_CTAGS
2821 if test -n "$CTAGS"; then
2822 echo "$as_me:2822: result: $CTAGS" >&5
2823 echo "${ECHO_T}$CTAGS" >&6
2825 echo "$as_me:2825: result: no" >&5
2826 echo "${ECHO_T}no" >&6
2829 test -n "$CTAGS" && break
2832 for ac_prog in exetags etags
2834 # Extract the first word of "$ac_prog", so it can be a program name with args.
2835 set dummy $ac_prog; ac_word=$2
2836 echo "$as_me:2836: checking for $ac_word" >&5
2837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2838 if test "${ac_cv_prog_ETAGS+set}" = set; then
2839 echo $ECHO_N "(cached) $ECHO_C" >&6
2841 if test -n "$ETAGS"; then
2842 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2844 ac_save_IFS=$IFS; IFS=$ac_path_separator
2846 for ac_dir in $ac_dummy; do
2848 test -z "$ac_dir" && ac_dir=.
2849 $as_executable_p "$ac_dir/$ac_word" || continue
2850 ac_cv_prog_ETAGS="$ac_prog"
2851 echo "$as_me:2851: found $ac_dir/$ac_word" >&5
2857 ETAGS=$ac_cv_prog_ETAGS
2858 if test -n "$ETAGS"; then
2859 echo "$as_me:2859: result: $ETAGS" >&5
2860 echo "${ECHO_T}$ETAGS" >&6
2862 echo "$as_me:2862: result: no" >&5
2863 echo "${ECHO_T}no" >&6
2866 test -n "$ETAGS" && break
2869 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2870 set dummy ${CTAGS:-ctags}; ac_word=$2
2871 echo "$as_me:2871: checking for $ac_word" >&5
2872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2873 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2874 echo $ECHO_N "(cached) $ECHO_C" >&6
2876 if test -n "$MAKE_LOWER_TAGS"; then
2877 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2879 ac_save_IFS=$IFS; IFS=$ac_path_separator
2881 for ac_dir in $ac_dummy; do
2883 test -z "$ac_dir" && ac_dir=.
2884 $as_executable_p "$ac_dir/$ac_word" || continue
2885 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2886 echo "$as_me:2886: found $ac_dir/$ac_word" >&5
2890 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2893 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2894 if test -n "$MAKE_LOWER_TAGS"; then
2895 echo "$as_me:2895: result: $MAKE_LOWER_TAGS" >&5
2896 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2898 echo "$as_me:2898: result: no" >&5
2899 echo "${ECHO_T}no" >&6
2902 if test "$cf_cv_mixedcase" = yes ; then
2903 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2904 set dummy ${ETAGS:-etags}; ac_word=$2
2905 echo "$as_me:2905: checking for $ac_word" >&5
2906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2907 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2908 echo $ECHO_N "(cached) $ECHO_C" >&6
2910 if test -n "$MAKE_UPPER_TAGS"; then
2911 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2913 ac_save_IFS=$IFS; IFS=$ac_path_separator
2915 for ac_dir in $ac_dummy; do
2917 test -z "$ac_dir" && ac_dir=.
2918 $as_executable_p "$ac_dir/$ac_word" || continue
2919 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2920 echo "$as_me:2920: found $ac_dir/$ac_word" >&5
2924 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2927 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2928 if test -n "$MAKE_UPPER_TAGS"; then
2929 echo "$as_me:2929: result: $MAKE_UPPER_TAGS" >&5
2930 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2932 echo "$as_me:2932: result: no" >&5
2933 echo "${ECHO_T}no" >&6
2940 if test "$MAKE_UPPER_TAGS" = yes ; then
2946 if test "$MAKE_LOWER_TAGS" = yes ; then
2952 echo "$as_me:2952: checking for makeflags variable" >&5
2953 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2954 if test "${cf_cv_makeflags+set}" = set; then
2955 echo $ECHO_N "(cached) $ECHO_C" >&6
2959 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2961 cat >cf_makeflags.tmp <<CF_EOF
2964 @ echo '.$cf_option'
2966 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2967 case "$cf_result" in
2969 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2970 case "$cf_result" in
2971 (.*CC=*) cf_cv_makeflags=
2973 (*) cf_cv_makeflags=$cf_option
2979 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
2983 rm -f cf_makeflags.tmp
2986 echo "$as_me:2986: result: $cf_cv_makeflags" >&5
2987 echo "${ECHO_T}$cf_cv_makeflags" >&6
2989 if test -n "$ac_tool_prefix"; then
2990 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2991 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2992 echo "$as_me:2992: checking for $ac_word" >&5
2993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2994 if test "${ac_cv_prog_RANLIB+set}" = set; then
2995 echo $ECHO_N "(cached) $ECHO_C" >&6
2997 if test -n "$RANLIB"; then
2998 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3000 ac_save_IFS=$IFS; IFS=$ac_path_separator
3002 for ac_dir in $ac_dummy; do
3004 test -z "$ac_dir" && ac_dir=.
3005 $as_executable_p "$ac_dir/$ac_word" || continue
3006 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3007 echo "$as_me:3007: found $ac_dir/$ac_word" >&5
3013 RANLIB=$ac_cv_prog_RANLIB
3014 if test -n "$RANLIB"; then
3015 echo "$as_me:3015: result: $RANLIB" >&5
3016 echo "${ECHO_T}$RANLIB" >&6
3018 echo "$as_me:3018: result: no" >&5
3019 echo "${ECHO_T}no" >&6
3023 if test -z "$ac_cv_prog_RANLIB"; then
3024 ac_ct_RANLIB=$RANLIB
3025 # Extract the first word of "ranlib", so it can be a program name with args.
3026 set dummy ranlib; ac_word=$2
3027 echo "$as_me:3027: checking for $ac_word" >&5
3028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3029 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3030 echo $ECHO_N "(cached) $ECHO_C" >&6
3032 if test -n "$ac_ct_RANLIB"; then
3033 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3035 ac_save_IFS=$IFS; IFS=$ac_path_separator
3037 for ac_dir in $ac_dummy; do
3039 test -z "$ac_dir" && ac_dir=.
3040 $as_executable_p "$ac_dir/$ac_word" || continue
3041 ac_cv_prog_ac_ct_RANLIB="ranlib"
3042 echo "$as_me:3042: found $ac_dir/$ac_word" >&5
3046 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3049 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3050 if test -n "$ac_ct_RANLIB"; then
3051 echo "$as_me:3051: result: $ac_ct_RANLIB" >&5
3052 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3054 echo "$as_me:3054: result: no" >&5
3055 echo "${ECHO_T}no" >&6
3058 RANLIB=$ac_ct_RANLIB
3060 RANLIB="$ac_cv_prog_RANLIB"
3063 if test -n "$ac_tool_prefix"; then
3064 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3065 set dummy ${ac_tool_prefix}ld; ac_word=$2
3066 echo "$as_me:3066: checking for $ac_word" >&5
3067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3068 if test "${ac_cv_prog_LD+set}" = set; then
3069 echo $ECHO_N "(cached) $ECHO_C" >&6
3071 if test -n "$LD"; then
3072 ac_cv_prog_LD="$LD" # Let the user override the test.
3074 ac_save_IFS=$IFS; IFS=$ac_path_separator
3076 for ac_dir in $ac_dummy; do
3078 test -z "$ac_dir" && ac_dir=.
3079 $as_executable_p "$ac_dir/$ac_word" || continue
3080 ac_cv_prog_LD="${ac_tool_prefix}ld"
3081 echo "$as_me:3081: found $ac_dir/$ac_word" >&5
3088 if test -n "$LD"; then
3089 echo "$as_me:3089: result: $LD" >&5
3090 echo "${ECHO_T}$LD" >&6
3092 echo "$as_me:3092: result: no" >&5
3093 echo "${ECHO_T}no" >&6
3097 if test -z "$ac_cv_prog_LD"; then
3099 # Extract the first word of "ld", so it can be a program name with args.
3100 set dummy ld; ac_word=$2
3101 echo "$as_me:3101: checking for $ac_word" >&5
3102 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3103 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3104 echo $ECHO_N "(cached) $ECHO_C" >&6
3106 if test -n "$ac_ct_LD"; then
3107 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3109 ac_save_IFS=$IFS; IFS=$ac_path_separator
3111 for ac_dir in $ac_dummy; do
3113 test -z "$ac_dir" && ac_dir=.
3114 $as_executable_p "$ac_dir/$ac_word" || continue
3115 ac_cv_prog_ac_ct_LD="ld"
3116 echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3120 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3123 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3124 if test -n "$ac_ct_LD"; then
3125 echo "$as_me:3125: result: $ac_ct_LD" >&5
3126 echo "${ECHO_T}$ac_ct_LD" >&6
3128 echo "$as_me:3128: result: no" >&5
3129 echo "${ECHO_T}no" >&6
3137 if test -n "$ac_tool_prefix"; then
3138 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3139 set dummy ${ac_tool_prefix}ar; ac_word=$2
3140 echo "$as_me:3140: checking for $ac_word" >&5
3141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3142 if test "${ac_cv_prog_AR+set}" = set; then
3143 echo $ECHO_N "(cached) $ECHO_C" >&6
3145 if test -n "$AR"; then
3146 ac_cv_prog_AR="$AR" # Let the user override the test.
3148 ac_save_IFS=$IFS; IFS=$ac_path_separator
3150 for ac_dir in $ac_dummy; do
3152 test -z "$ac_dir" && ac_dir=.
3153 $as_executable_p "$ac_dir/$ac_word" || continue
3154 ac_cv_prog_AR="${ac_tool_prefix}ar"
3155 echo "$as_me:3155: found $ac_dir/$ac_word" >&5
3162 if test -n "$AR"; then
3163 echo "$as_me:3163: result: $AR" >&5
3164 echo "${ECHO_T}$AR" >&6
3166 echo "$as_me:3166: result: no" >&5
3167 echo "${ECHO_T}no" >&6
3171 if test -z "$ac_cv_prog_AR"; then
3173 # Extract the first word of "ar", so it can be a program name with args.
3174 set dummy ar; ac_word=$2
3175 echo "$as_me:3175: checking for $ac_word" >&5
3176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3177 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3178 echo $ECHO_N "(cached) $ECHO_C" >&6
3180 if test -n "$ac_ct_AR"; then
3181 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3183 ac_save_IFS=$IFS; IFS=$ac_path_separator
3185 for ac_dir in $ac_dummy; do
3187 test -z "$ac_dir" && ac_dir=.
3188 $as_executable_p "$ac_dir/$ac_word" || continue
3189 ac_cv_prog_ac_ct_AR="ar"
3190 echo "$as_me:3190: found $ac_dir/$ac_word" >&5
3194 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3197 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3198 if test -n "$ac_ct_AR"; then
3199 echo "$as_me:3199: result: $ac_ct_AR" >&5
3200 echo "${ECHO_T}$ac_ct_AR" >&6
3202 echo "$as_me:3202: result: no" >&5
3203 echo "${ECHO_T}no" >&6
3211 if test -n "$ac_tool_prefix"; then
3212 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3213 set dummy ${ac_tool_prefix}ar; ac_word=$2
3214 echo "$as_me:3214: checking for $ac_word" >&5
3215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3216 if test "${ac_cv_prog_AR+set}" = set; then
3217 echo $ECHO_N "(cached) $ECHO_C" >&6
3219 if test -n "$AR"; then
3220 ac_cv_prog_AR="$AR" # Let the user override the test.
3222 ac_save_IFS=$IFS; IFS=$ac_path_separator
3224 for ac_dir in $ac_dummy; do
3226 test -z "$ac_dir" && ac_dir=.
3227 $as_executable_p "$ac_dir/$ac_word" || continue
3228 ac_cv_prog_AR="${ac_tool_prefix}ar"
3229 echo "$as_me:3229: found $ac_dir/$ac_word" >&5
3236 if test -n "$AR"; then
3237 echo "$as_me:3237: result: $AR" >&5
3238 echo "${ECHO_T}$AR" >&6
3240 echo "$as_me:3240: result: no" >&5
3241 echo "${ECHO_T}no" >&6
3245 if test -z "$ac_cv_prog_AR"; then
3247 # Extract the first word of "ar", so it can be a program name with args.
3248 set dummy ar; ac_word=$2
3249 echo "$as_me:3249: checking for $ac_word" >&5
3250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3251 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3252 echo $ECHO_N "(cached) $ECHO_C" >&6
3254 if test -n "$ac_ct_AR"; then
3255 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3257 ac_save_IFS=$IFS; IFS=$ac_path_separator
3259 for ac_dir in $ac_dummy; do
3261 test -z "$ac_dir" && ac_dir=.
3262 $as_executable_p "$ac_dir/$ac_word" || continue
3263 ac_cv_prog_ac_ct_AR="ar"
3264 echo "$as_me:3264: found $ac_dir/$ac_word" >&5
3268 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3271 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3272 if test -n "$ac_ct_AR"; then
3273 echo "$as_me:3273: result: $ac_ct_AR" >&5
3274 echo "${ECHO_T}$ac_ct_AR" >&6
3276 echo "$as_me:3276: result: no" >&5
3277 echo "${ECHO_T}no" >&6
3285 echo "$as_me:3285: checking for options to update archives" >&5
3286 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3287 if test "${cf_cv_ar_flags+set}" = set; then
3288 echo $ECHO_N "(cached) $ECHO_C" >&6
3291 cf_cv_ar_flags=unknown
3292 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3295 # check if $ARFLAGS already contains this choice
3296 if test "x$ARFLAGS" != "x" ; then
3297 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3298 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3304 rm -f conftest.$ac_cv_objext
3307 cat >conftest.$ac_ext <<EOF
3308 #line 3308 "configure"
3309 int testdata[3] = { 123, 456, 789 };
3311 if { (eval echo "$as_me:3311: \"$ac_compile\"") >&5
3312 (eval $ac_compile) 2>&5
3314 echo "$as_me:3314: \$? = $ac_status" >&5
3315 (exit $ac_status); } ; then
3316 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3317 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3318 if test -f conftest.a ; then
3319 cf_cv_ar_flags=$cf_ar_flags
3323 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3325 echo "${as_me:-configure}:3325: testing cannot compile test-program ..." 1>&5
3330 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3333 echo "$as_me:3333: result: $cf_cv_ar_flags" >&5
3334 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3336 if test -n "$ARFLAGS" ; then
3337 if test -n "$cf_cv_ar_flags" ; then
3338 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3341 ARFLAGS=$cf_cv_ar_flags
3344 echo "$as_me:3344: checking for PATH separator" >&5
3345 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3346 case $cf_cv_system_name in
3347 (os2*) PATH_SEPARATOR=';' ;;
3348 (*) ${PATH_SEPARATOR:=':'} ;;
3351 echo "$as_me:3351: result: $PATH_SEPARATOR" >&5
3352 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3354 echo "$as_me:3354: checking if you have specified an install-prefix" >&5
3355 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3357 # Check whether --with-install-prefix or --without-install-prefix was given.
3358 if test "${with_install_prefix+set}" = set; then
3359 withval="$with_install_prefix"
3363 (*) DESTDIR="$withval"
3367 echo "$as_me:3367: result: $DESTDIR" >&5
3368 echo "${ECHO_T}$DESTDIR" >&6
3370 ###############################################################################
3372 # If we're cross-compiling, allow the user to override the tools and their
3373 # options. The configure script is oriented toward identifying the host
3374 # compiler, etc., but we need a build compiler to generate parts of the source.
3376 if test "$cross_compiling" = yes ; then
3378 # defaults that we might want to override
3379 : ${BUILD_CFLAGS:=''}
3380 : ${BUILD_CPPFLAGS:=''}
3381 : ${BUILD_LDFLAGS:=''}
3383 : ${BUILD_EXEEXT:='$x'}
3384 : ${BUILD_OBJEXT:='o'}
3386 # Check whether --with-build-cc or --without-build-cc was given.
3387 if test "${with_build_cc+set}" = set; then
3388 withval="$with_build_cc"
3391 for ac_prog in gcc cc cl
3393 # Extract the first word of "$ac_prog", so it can be a program name with args.
3394 set dummy $ac_prog; ac_word=$2
3395 echo "$as_me:3395: checking for $ac_word" >&5
3396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3397 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3398 echo $ECHO_N "(cached) $ECHO_C" >&6
3400 if test -n "$BUILD_CC"; then
3401 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3403 ac_save_IFS=$IFS; IFS=$ac_path_separator
3405 for ac_dir in $ac_dummy; do
3407 test -z "$ac_dir" && ac_dir=.
3408 $as_executable_p "$ac_dir/$ac_word" || continue
3409 ac_cv_prog_BUILD_CC="$ac_prog"
3410 echo "$as_me:3410: found $ac_dir/$ac_word" >&5
3416 BUILD_CC=$ac_cv_prog_BUILD_CC
3417 if test -n "$BUILD_CC"; then
3418 echo "$as_me:3418: result: $BUILD_CC" >&5
3419 echo "${ECHO_T}$BUILD_CC" >&6
3421 echo "$as_me:3421: result: no" >&5
3422 echo "${ECHO_T}no" >&6
3425 test -n "$BUILD_CC" && break
3429 echo "$as_me:3429: checking for native build C compiler" >&5
3430 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3431 echo "$as_me:3431: result: $BUILD_CC" >&5
3432 echo "${ECHO_T}$BUILD_CC" >&6
3434 echo "$as_me:3434: checking for native build C preprocessor" >&5
3435 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3437 # Check whether --with-build-cpp or --without-build-cpp was given.
3438 if test "${with_build_cpp+set}" = set; then
3439 withval="$with_build_cpp"
3440 BUILD_CPP="$withval"
3442 BUILD_CPP='${BUILD_CC} -E'
3444 echo "$as_me:3444: result: $BUILD_CPP" >&5
3445 echo "${ECHO_T}$BUILD_CPP" >&6
3447 echo "$as_me:3447: checking for native build C flags" >&5
3448 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3450 # Check whether --with-build-cflags or --without-build-cflags was given.
3451 if test "${with_build_cflags+set}" = set; then
3452 withval="$with_build_cflags"
3453 BUILD_CFLAGS="$withval"
3455 echo "$as_me:3455: result: $BUILD_CFLAGS" >&5
3456 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3458 echo "$as_me:3458: checking for native build C preprocessor-flags" >&5
3459 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3461 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3462 if test "${with_build_cppflags+set}" = set; then
3463 withval="$with_build_cppflags"
3464 BUILD_CPPFLAGS="$withval"
3466 echo "$as_me:3466: result: $BUILD_CPPFLAGS" >&5
3467 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3469 echo "$as_me:3469: checking for native build linker-flags" >&5
3470 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3472 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3473 if test "${with_build_ldflags+set}" = set; then
3474 withval="$with_build_ldflags"
3475 BUILD_LDFLAGS="$withval"
3477 echo "$as_me:3477: result: $BUILD_LDFLAGS" >&5
3478 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3480 echo "$as_me:3480: checking for native build linker-libraries" >&5
3481 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3483 # Check whether --with-build-libs or --without-build-libs was given.
3484 if test "${with_build_libs+set}" = set; then
3485 withval="$with_build_libs"
3486 BUILD_LIBS="$withval"
3488 echo "$as_me:3488: result: $BUILD_LIBS" >&5
3489 echo "${ECHO_T}$BUILD_LIBS" >&6
3491 # this assumes we're on Unix.
3495 : ${BUILD_CC:='${CC}'}
3497 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3498 { { echo "$as_me:3498: error: Cross-build requires two compilers.
3499 Use --with-build-cc to specify the native compiler." >&5
3500 echo "$as_me: error: Cross-build requires two compilers.
3501 Use --with-build-cc to specify the native compiler." >&2;}
3502 { (exit 1); exit 1; }; }
3506 : ${BUILD_CC:='${CC}'}
3507 : ${BUILD_CPP:='${CPP}'}
3508 : ${BUILD_CFLAGS:='${CFLAGS}'}
3509 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3510 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3511 : ${BUILD_LIBS:='${LIBS}'}
3512 : ${BUILD_EXEEXT:='$x'}
3513 : ${BUILD_OBJEXT:='o'}
3516 ###############################################################################
3518 ### Options to allow the user to specify the set of libraries which are used.
3519 ### Use "--without-normal --with-shared" to allow the default model to be
3520 ### shared, for example.
3523 echo "$as_me:3523: checking if you want to build shared C-objects" >&5
3524 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3526 # Check whether --with-shared or --without-shared was given.
3527 if test "${with_shared+set}" = set; then
3528 withval="$with_shared"
3529 with_shared=$withval
3533 echo "$as_me:3533: result: $with_shared" >&5
3534 echo "${ECHO_T}$with_shared" >&6
3535 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3537 echo "$as_me:3537: checking for specified models" >&5
3538 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3539 test -z "$cf_list_models" && cf_list_models=normal
3540 echo "$as_me:3540: result: $cf_list_models" >&5
3541 echo "${ECHO_T}$cf_list_models" >&6
3543 ### Use the first model as the default, and save its suffix for use in building
3544 ### up test-applications.
3545 echo "$as_me:3545: checking for default model" >&5
3546 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3547 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3548 echo "$as_me:3548: result: $DFT_LWR_MODEL" >&5
3549 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3551 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3553 echo "$as_me:3553: checking for specific curses-directory" >&5
3554 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3556 # Check whether --with-curses-dir or --without-curses-dir was given.
3557 if test "${with_curses_dir+set}" = set; then
3558 withval="$with_curses_dir"
3559 cf_cv_curses_dir=$withval
3563 echo "$as_me:3563: result: $cf_cv_curses_dir" >&5
3564 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3566 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3569 if test "x$prefix" != xNONE; then
3570 cf_path_syntax="$prefix"
3572 cf_path_syntax="$ac_default_prefix"
3580 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3582 (.\${*prefix}*|.\${*dir}*)
3583 eval withval="$withval"
3586 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3591 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3594 { { echo "$as_me:3594: error: expected a pathname, not \"$withval\"" >&5
3595 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3596 { (exit 1); exit 1; }; }
3600 if test -d "$cf_cv_curses_dir"
3603 if test -n "$cf_cv_curses_dir/include" ; then
3604 for cf_add_incdir in $cf_cv_curses_dir/include
3606 while test $cf_add_incdir != /usr/include
3608 if test -d $cf_add_incdir
3611 if test -n "$CFLAGS$CPPFLAGS" ; then
3612 # a loop is needed to ensure we can add subdirs of existing dirs
3613 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3614 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3615 cf_have_incdir=yes; break
3620 if test "$cf_have_incdir" = no ; then
3621 if test "$cf_add_incdir" = /usr/local/include ; then
3622 if test "$GCC" = yes
3624 cf_save_CPPFLAGS=$CPPFLAGS
3625 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3626 cat >conftest.$ac_ext <<_ACEOF
3627 #line 3627 "configure"
3628 #include "confdefs.h"
3638 rm -f conftest.$ac_objext
3639 if { (eval echo "$as_me:3639: \"$ac_compile\"") >&5
3640 (eval $ac_compile) 2>&5
3642 echo "$as_me:3642: \$? = $ac_status" >&5
3643 (exit $ac_status); } &&
3644 { ac_try='test -s conftest.$ac_objext'
3645 { (eval echo "$as_me:3645: \"$ac_try\"") >&5
3648 echo "$as_me:3648: \$? = $ac_status" >&5
3649 (exit $ac_status); }; }; then
3652 echo "$as_me: failed program was:" >&5
3653 cat conftest.$ac_ext >&5
3656 rm -f conftest.$ac_objext conftest.$ac_ext
3657 CPPFLAGS=$cf_save_CPPFLAGS
3662 if test "$cf_have_incdir" = no ; then
3663 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3665 echo "${as_me:-configure}:3665: testing adding $cf_add_incdir to include-path ..." 1>&5
3667 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3669 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3670 test "$cf_top_incdir" = "$cf_add_incdir" && break
3671 cf_add_incdir="$cf_top_incdir"
3682 if test -n "$cf_cv_curses_dir/lib" ; then
3683 for cf_add_libdir in $cf_cv_curses_dir/lib
3685 if test $cf_add_libdir = /usr/lib ; then
3687 elif test -d $cf_add_libdir
3690 if test -n "$LDFLAGS$LIBS" ; then
3691 # a loop is needed to ensure we can add subdirs of existing dirs
3692 for cf_test_libdir in $LDFLAGS $LIBS ; do
3693 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3694 cf_have_libdir=yes; break
3698 if test "$cf_have_libdir" = no ; then
3699 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3701 echo "${as_me:-configure}:3701: testing adding $cf_add_libdir to library-path ..." 1>&5
3703 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3712 cf_ncuconfig_root=ncurses
3713 cf_have_ncuconfig=no
3715 if test "x${PKG_CONFIG:=none}" != xnone; then
3716 echo "$as_me:3716: checking pkg-config for $cf_ncuconfig_root" >&5
3717 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3718 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3719 echo "$as_me:3719: result: yes" >&5
3720 echo "${ECHO_T}yes" >&6
3722 echo "$as_me:3722: checking if the $cf_ncuconfig_root package files work" >&5
3723 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3724 cf_have_ncuconfig=unknown
3726 cf_save_CPPFLAGS="$CPPFLAGS"
3727 cf_save_LIBS="$LIBS"
3729 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3731 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3732 # Filter out duplicates - this happens with badly-designed ".pc" files...
3733 for cf_add_1lib in $LIBS
3735 for cf_add_2lib in $cf_add_libs
3737 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3743 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3747 cat >conftest.$ac_ext <<_ACEOF
3748 #line 3748 "configure"
3749 #include "confdefs.h"
3750 #include <${cf_cv_ncurses_header:-curses.h}>
3754 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3759 rm -f conftest.$ac_objext conftest$ac_exeext
3760 if { (eval echo "$as_me:3760: \"$ac_link\"") >&5
3761 (eval $ac_link) 2>&5
3763 echo "$as_me:3763: \$? = $ac_status" >&5
3764 (exit $ac_status); } &&
3765 { ac_try='test -s conftest$ac_exeext'
3766 { (eval echo "$as_me:3766: \"$ac_try\"") >&5
3769 echo "$as_me:3769: \$? = $ac_status" >&5
3770 (exit $ac_status); }; }; then
3771 if test "$cross_compiling" = yes; then
3772 cf_have_ncuconfig=maybe
3774 cat >conftest.$ac_ext <<_ACEOF
3775 #line 3775 "configure"
3776 #include "confdefs.h"
3777 #include <${cf_cv_ncurses_header:-curses.h}>
3779 { char *xx = curses_version(); return (xx == 0); }
3781 rm -f conftest$ac_exeext
3782 if { (eval echo "$as_me:3782: \"$ac_link\"") >&5
3783 (eval $ac_link) 2>&5
3785 echo "$as_me:3785: \$? = $ac_status" >&5
3786 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3787 { (eval echo "$as_me:3787: \"$ac_try\"") >&5
3790 echo "$as_me:3790: \$? = $ac_status" >&5
3791 (exit $ac_status); }; }; then
3792 cf_have_ncuconfig=yes
3794 echo "$as_me: program exited with status $ac_status" >&5
3795 echo "$as_me: failed program was:" >&5
3796 cat conftest.$ac_ext >&5
3797 cf_have_ncuconfig=no
3799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3802 echo "$as_me: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804 cf_have_ncuconfig=no
3806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3807 echo "$as_me:3807: result: $cf_have_ncuconfig" >&5
3808 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3809 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3810 if test "$cf_have_ncuconfig" != "yes"
3812 CPPFLAGS="$cf_save_CPPFLAGS"
3813 LIBS="$cf_save_LIBS"
3814 NCURSES_CONFIG_PKG=none
3817 cat >>confdefs.h <<\EOF
3821 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3825 echo "$as_me:3825: result: no" >&5
3826 echo "${ECHO_T}no" >&6
3827 NCURSES_CONFIG_PKG=none
3830 NCURSES_CONFIG_PKG=none
3833 if test "x$cf_have_ncuconfig" = "xno"; then
3834 echo "Looking for ${cf_ncuconfig_root}-config"
3836 if test -n "$ac_tool_prefix"; then
3837 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3839 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3840 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3841 echo "$as_me:3841: checking for $ac_word" >&5
3842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3843 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3844 echo $ECHO_N "(cached) $ECHO_C" >&6
3846 if test -n "$NCURSES_CONFIG"; then
3847 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3849 ac_save_IFS=$IFS; IFS=$ac_path_separator
3851 for ac_dir in $ac_dummy; do
3853 test -z "$ac_dir" && ac_dir=.
3854 $as_executable_p "$ac_dir/$ac_word" || continue
3855 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3856 echo "$as_me:3856: found $ac_dir/$ac_word" >&5
3862 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3863 if test -n "$NCURSES_CONFIG"; then
3864 echo "$as_me:3864: result: $NCURSES_CONFIG" >&5
3865 echo "${ECHO_T}$NCURSES_CONFIG" >&6
3867 echo "$as_me:3867: result: no" >&5
3868 echo "${ECHO_T}no" >&6
3871 test -n "$NCURSES_CONFIG" && break
3874 if test -z "$NCURSES_CONFIG"; then
3875 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3876 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3878 # Extract the first word of "$ac_prog", so it can be a program name with args.
3879 set dummy $ac_prog; ac_word=$2
3880 echo "$as_me:3880: checking for $ac_word" >&5
3881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3882 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3883 echo $ECHO_N "(cached) $ECHO_C" >&6
3885 if test -n "$ac_ct_NCURSES_CONFIG"; then
3886 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
3888 ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 for ac_dir in $ac_dummy; do
3892 test -z "$ac_dir" && ac_dir=.
3893 $as_executable_p "$ac_dir/$ac_word" || continue
3894 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
3895 echo "$as_me:3895: found $ac_dir/$ac_word" >&5
3901 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
3902 if test -n "$ac_ct_NCURSES_CONFIG"; then
3903 echo "$as_me:3903: result: $ac_ct_NCURSES_CONFIG" >&5
3904 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
3906 echo "$as_me:3906: result: no" >&5
3907 echo "${ECHO_T}no" >&6
3910 test -n "$ac_ct_NCURSES_CONFIG" && break
3912 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
3914 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
3917 if test "$NCURSES_CONFIG" != none ; then
3919 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3921 cf_add_libs="`$NCURSES_CONFIG --libs`"
3922 # Filter out duplicates - this happens with badly-designed ".pc" files...
3923 for cf_add_1lib in $LIBS
3925 for cf_add_2lib in $cf_add_libs
3927 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3933 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3937 # even with config script, some packages use no-override for curses.h
3939 echo "$as_me:3939: checking if we have identified curses headers" >&5
3940 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
3941 if test "${cf_cv_ncurses_header+set}" = set; then
3942 echo $ECHO_N "(cached) $ECHO_C" >&6
3945 cf_cv_ncurses_header=none
3947 ncurses.h ncurses/ncurses.h \
3948 curses.h ncurses/curses.h
3950 cat >conftest.$ac_ext <<_ACEOF
3951 #line 3951 "configure"
3952 #include "confdefs.h"
3953 #include <${cf_header}>
3957 initscr(); tgoto("?", 0,0)
3962 rm -f conftest.$ac_objext
3963 if { (eval echo "$as_me:3963: \"$ac_compile\"") >&5
3964 (eval $ac_compile) 2>&5
3966 echo "$as_me:3966: \$? = $ac_status" >&5
3967 (exit $ac_status); } &&
3968 { ac_try='test -s conftest.$ac_objext'
3969 { (eval echo "$as_me:3969: \"$ac_try\"") >&5
3972 echo "$as_me:3972: \$? = $ac_status" >&5
3973 (exit $ac_status); }; }; then
3974 cf_cv_ncurses_header=$cf_header; break
3976 echo "$as_me: failed program was:" >&5
3977 cat conftest.$ac_ext >&5
3979 rm -f conftest.$ac_objext conftest.$ac_ext
3983 echo "$as_me:3983: result: $cf_cv_ncurses_header" >&5
3984 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
3986 if test "$cf_cv_ncurses_header" = none ; then
3987 { { echo "$as_me:3987: error: No curses header-files found" >&5
3988 echo "$as_me: error: No curses header-files found" >&2;}
3989 { (exit 1); exit 1; }; }
3992 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3994 for ac_header in $cf_cv_ncurses_header
3996 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3997 echo "$as_me:3997: checking for $ac_header" >&5
3998 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3999 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4000 echo $ECHO_N "(cached) $ECHO_C" >&6
4002 cat >conftest.$ac_ext <<_ACEOF
4003 #line 4003 "configure"
4004 #include "confdefs.h"
4005 #include <$ac_header>
4007 if { (eval echo "$as_me:4007: \"$ac_cpp conftest.$ac_ext\"") >&5
4008 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4010 egrep -v '^ *\+' conftest.er1 >conftest.err
4012 cat conftest.err >&5
4013 echo "$as_me:4013: \$? = $ac_status" >&5
4014 (exit $ac_status); } >/dev/null; then
4015 if test -s conftest.err; then
4016 ac_cpp_err=$ac_c_preproc_warn_flag
4023 if test -z "$ac_cpp_err"; then
4024 eval "$as_ac_Header=yes"
4026 echo "$as_me: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 eval "$as_ac_Header=no"
4030 rm -f conftest.err conftest.$ac_ext
4032 echo "$as_me:4032: result: `eval echo '${'$as_ac_Header'}'`" >&5
4033 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4034 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4035 cat >>confdefs.h <<EOF
4036 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4042 cat >>confdefs.h <<\EOF
4046 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4048 cat >>confdefs.h <<EOF
4049 #define $cf_nculib_ROOT 1
4052 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4056 cf_ncuhdr_root=ncurses
4058 test -n "$cf_cv_curses_dir" && \
4059 test "$cf_cv_curses_dir" != "no" && { \
4061 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4062 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4064 while test $cf_add_incdir != /usr/include
4066 if test -d $cf_add_incdir
4069 if test -n "$CFLAGS$CPPFLAGS" ; then
4070 # a loop is needed to ensure we can add subdirs of existing dirs
4071 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4072 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4073 cf_have_incdir=yes; break
4078 if test "$cf_have_incdir" = no ; then
4079 if test "$cf_add_incdir" = /usr/local/include ; then
4080 if test "$GCC" = yes
4082 cf_save_CPPFLAGS=$CPPFLAGS
4083 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4084 cat >conftest.$ac_ext <<_ACEOF
4085 #line 4085 "configure"
4086 #include "confdefs.h"
4096 rm -f conftest.$ac_objext
4097 if { (eval echo "$as_me:4097: \"$ac_compile\"") >&5
4098 (eval $ac_compile) 2>&5
4100 echo "$as_me:4100: \$? = $ac_status" >&5
4101 (exit $ac_status); } &&
4102 { ac_try='test -s conftest.$ac_objext'
4103 { (eval echo "$as_me:4103: \"$ac_try\"") >&5
4106 echo "$as_me:4106: \$? = $ac_status" >&5
4107 (exit $ac_status); }; }; then
4110 echo "$as_me: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4114 rm -f conftest.$ac_objext conftest.$ac_ext
4115 CPPFLAGS=$cf_save_CPPFLAGS
4120 if test "$cf_have_incdir" = no ; then
4121 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4123 echo "${as_me:-configure}:4123: testing adding $cf_add_incdir to include-path ..." 1>&5
4125 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4127 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4128 test "$cf_top_incdir" = "$cf_add_incdir" && break
4129 cf_add_incdir="$cf_top_incdir"
4142 echo "$as_me:4142: checking for $cf_ncuhdr_root header in include-path" >&5
4143 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4144 if test "${cf_cv_ncurses_h+set}" = set; then
4145 echo $ECHO_N "(cached) $ECHO_C" >&6
4148 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4149 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4150 for cf_header in $cf_header_list
4153 cat >conftest.$ac_ext <<_ACEOF
4154 #line 4154 "configure"
4155 #include "confdefs.h"
4157 #include <$cf_header>
4162 #ifdef NCURSES_VERSION
4164 printf("%s\n", NCURSES_VERSION);
4177 rm -f conftest.$ac_objext
4178 if { (eval echo "$as_me:4178: \"$ac_compile\"") >&5
4179 (eval $ac_compile) 2>&5
4181 echo "$as_me:4181: \$? = $ac_status" >&5
4182 (exit $ac_status); } &&
4183 { ac_try='test -s conftest.$ac_objext'
4184 { (eval echo "$as_me:4184: \"$ac_try\"") >&5
4187 echo "$as_me:4187: \$? = $ac_status" >&5
4188 (exit $ac_status); }; }; then
4189 cf_cv_ncurses_h=$cf_header
4192 echo "$as_me: failed program was:" >&5
4193 cat conftest.$ac_ext >&5
4196 rm -f conftest.$ac_objext conftest.$ac_ext
4198 test "$cf_cv_ncurses_h" != no && break
4202 echo "$as_me:4202: result: $cf_cv_ncurses_h" >&5
4203 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4205 if test "$cf_cv_ncurses_h" != no ; then
4206 cf_cv_ncurses_header=$cf_cv_ncurses_h
4209 echo "$as_me:4209: checking for $cf_ncuhdr_root include-path" >&5
4210 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4211 if test "${cf_cv_ncurses_h2+set}" = set; then
4212 echo $ECHO_N "(cached) $ECHO_C" >&6
4215 test -n "$verbose" && echo
4219 # collect the current set of include-directories from compiler flags
4220 cf_header_path_list=""
4221 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4222 for cf_header_path in $CPPFLAGS $CFLAGS
4224 case $cf_header_path in
4226 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4228 test "x$cf_header_path" != "xNONE" && \
4229 test -d "$cf_header_path" && \
4231 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4232 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4233 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4234 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4235 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4236 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"
4239 cf_header_path_list="$cf_header_path_list $cf_search"
4245 # add the variations for the package we are looking for
4249 test "x$prefix" != "xNONE" && \
4250 test -d "$prefix" && \
4252 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4253 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4254 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4255 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4256 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4257 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4260 for cf_subdir_prefix in \
4269 test "x$cf_subdir_prefix" != "x$prefix" && \
4270 test -d "$cf_subdir_prefix" && \
4271 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4272 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4273 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4274 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4275 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4276 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4277 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"
4282 test "$includedir" != NONE && \
4283 test "$includedir" != "/usr/include" && \
4284 test -d "$includedir" && {
4285 test -d $includedir && cf_search="$cf_search $includedir"
4286 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4289 test "$oldincludedir" != NONE && \
4290 test "$oldincludedir" != "/usr/include" && \
4291 test -d "$oldincludedir" && {
4292 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4293 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4296 cf_search="$cf_search $cf_header_path_list"
4298 test -n "$verbose" && echo search path $cf_search
4299 cf_save2_CPPFLAGS="$CPPFLAGS"
4300 for cf_incdir in $cf_search
4303 if test -n "$cf_incdir" ; then
4304 for cf_add_incdir in $cf_incdir
4306 while test $cf_add_incdir != /usr/include
4308 if test -d $cf_add_incdir
4311 if test -n "$CFLAGS$CPPFLAGS" ; then
4312 # a loop is needed to ensure we can add subdirs of existing dirs
4313 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4314 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4315 cf_have_incdir=yes; break
4320 if test "$cf_have_incdir" = no ; then
4321 if test "$cf_add_incdir" = /usr/local/include ; then
4322 if test "$GCC" = yes
4324 cf_save_CPPFLAGS=$CPPFLAGS
4325 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4326 cat >conftest.$ac_ext <<_ACEOF
4327 #line 4327 "configure"
4328 #include "confdefs.h"
4338 rm -f conftest.$ac_objext
4339 if { (eval echo "$as_me:4339: \"$ac_compile\"") >&5
4340 (eval $ac_compile) 2>&5
4342 echo "$as_me:4342: \$? = $ac_status" >&5
4343 (exit $ac_status); } &&
4344 { ac_try='test -s conftest.$ac_objext'
4345 { (eval echo "$as_me:4345: \"$ac_try\"") >&5
4348 echo "$as_me:4348: \$? = $ac_status" >&5
4349 (exit $ac_status); }; }; then
4352 echo "$as_me: failed program was:" >&5
4353 cat conftest.$ac_ext >&5
4356 rm -f conftest.$ac_objext conftest.$ac_ext
4357 CPPFLAGS=$cf_save_CPPFLAGS
4362 if test "$cf_have_incdir" = no ; then
4363 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4365 echo "${as_me:-configure}:4365: testing adding $cf_add_incdir to include-path ..." 1>&5
4367 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4369 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4370 test "$cf_top_incdir" = "$cf_add_incdir" && break
4371 cf_add_incdir="$cf_top_incdir"
4387 cat >conftest.$ac_ext <<_ACEOF
4388 #line 4388 "configure"
4389 #include "confdefs.h"
4391 #include <$cf_header>
4396 #ifdef NCURSES_VERSION
4398 printf("%s\n", NCURSES_VERSION);
4411 rm -f conftest.$ac_objext
4412 if { (eval echo "$as_me:4412: \"$ac_compile\"") >&5
4413 (eval $ac_compile) 2>&5
4415 echo "$as_me:4415: \$? = $ac_status" >&5
4416 (exit $ac_status); } &&
4417 { ac_try='test -s conftest.$ac_objext'
4418 { (eval echo "$as_me:4418: \"$ac_try\"") >&5
4421 echo "$as_me:4421: \$? = $ac_status" >&5
4422 (exit $ac_status); }; }; then
4423 cf_cv_ncurses_h2=$cf_header
4426 echo "$as_me: failed program was:" >&5
4427 cat conftest.$ac_ext >&5
4430 rm -f conftest.$ac_objext conftest.$ac_ext
4432 if test "$cf_cv_ncurses_h2" != no ; then
4433 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4434 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4437 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4439 CPPFLAGS="$cf_save2_CPPFLAGS"
4440 test "$cf_cv_ncurses_h2" != no && break
4442 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4442: error: not found" >&5
4443 echo "$as_me: error: not found" >&2;}
4444 { (exit 1); exit 1; }; }
4447 echo "$as_me:4447: result: $cf_cv_ncurses_h2" >&5
4448 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4450 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4451 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4452 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4453 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4456 if test -n "$cf_1st_incdir" ; then
4457 for cf_add_incdir in $cf_1st_incdir
4459 while test $cf_add_incdir != /usr/include
4461 if test -d $cf_add_incdir
4464 if test -n "$CFLAGS$CPPFLAGS" ; then
4465 # a loop is needed to ensure we can add subdirs of existing dirs
4466 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4467 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4468 cf_have_incdir=yes; break
4473 if test "$cf_have_incdir" = no ; then
4474 if test "$cf_add_incdir" = /usr/local/include ; then
4475 if test "$GCC" = yes
4477 cf_save_CPPFLAGS=$CPPFLAGS
4478 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4479 cat >conftest.$ac_ext <<_ACEOF
4480 #line 4480 "configure"
4481 #include "confdefs.h"
4491 rm -f conftest.$ac_objext
4492 if { (eval echo "$as_me:4492: \"$ac_compile\"") >&5
4493 (eval $ac_compile) 2>&5
4495 echo "$as_me:4495: \$? = $ac_status" >&5
4496 (exit $ac_status); } &&
4497 { ac_try='test -s conftest.$ac_objext'
4498 { (eval echo "$as_me:4498: \"$ac_try\"") >&5
4501 echo "$as_me:4501: \$? = $ac_status" >&5
4502 (exit $ac_status); }; }; then
4505 echo "$as_me: failed program was:" >&5
4506 cat conftest.$ac_ext >&5
4509 rm -f conftest.$ac_objext conftest.$ac_ext
4510 CPPFLAGS=$cf_save_CPPFLAGS
4515 if test "$cf_have_incdir" = no ; then
4516 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4518 echo "${as_me:-configure}:4518: testing adding $cf_add_incdir to include-path ..." 1>&5
4520 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4522 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4523 test "$cf_top_incdir" = "$cf_add_incdir" && break
4524 cf_add_incdir="$cf_top_incdir"
4537 # Set definitions to allow ifdef'ing for ncurses.h
4539 case $cf_cv_ncurses_header in
4542 cat >>confdefs.h <<\EOF
4543 #define HAVE_NCURSES_H 1
4549 case $cf_cv_ncurses_header in
4550 (ncurses/curses.h|ncurses/ncurses.h)
4552 cat >>confdefs.h <<\EOF
4553 #define HAVE_NCURSES_NCURSES_H 1
4557 (ncursesw/curses.h|ncursesw/ncurses.h)
4559 cat >>confdefs.h <<\EOF
4560 #define HAVE_NCURSESW_NCURSES_H 1
4566 echo "$as_me:4566: checking for terminfo header" >&5
4567 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4568 if test "${cf_cv_term_header+set}" = set; then
4569 echo $ECHO_N "(cached) $ECHO_C" >&6
4572 case ${cf_cv_ncurses_header} in
4573 (*/ncurses.h|*/ncursesw.h)
4574 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4577 cf_term_header=term.h
4581 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4583 cat >conftest.$ac_ext <<_ACEOF
4584 #line 4584 "configure"
4585 #include "confdefs.h"
4587 #include <${cf_cv_ncurses_header:-curses.h}>
4593 int x = auto_left_margin
4598 rm -f conftest.$ac_objext
4599 if { (eval echo "$as_me:4599: \"$ac_compile\"") >&5
4600 (eval $ac_compile) 2>&5
4602 echo "$as_me:4602: \$? = $ac_status" >&5
4603 (exit $ac_status); } &&
4604 { ac_try='test -s conftest.$ac_objext'
4605 { (eval echo "$as_me:4605: \"$ac_try\"") >&5
4608 echo "$as_me:4608: \$? = $ac_status" >&5
4609 (exit $ac_status); }; }; then
4611 cf_cv_term_header="$cf_test"
4613 echo "$as_me: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4616 cf_cv_term_header=unknown
4619 rm -f conftest.$ac_objext conftest.$ac_ext
4620 test "$cf_cv_term_header" != unknown && break
4624 echo "$as_me:4624: result: $cf_cv_term_header" >&5
4625 echo "${ECHO_T}$cf_cv_term_header" >&6
4627 # Set definitions to allow ifdef'ing to accommodate subdirectories
4629 case $cf_cv_term_header in
4632 cat >>confdefs.h <<\EOF
4633 #define HAVE_TERM_H 1
4639 case $cf_cv_term_header in
4642 cat >>confdefs.h <<\EOF
4643 #define HAVE_NCURSES_TERM_H 1
4649 cat >>confdefs.h <<\EOF
4650 #define HAVE_NCURSESW_TERM_H 1
4656 # some applications need this, but should check for NCURSES_VERSION
4658 cat >>confdefs.h <<\EOF
4662 echo "$as_me:4662: checking for ncurses version" >&5
4663 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4664 if test "${cf_cv_ncurses_version+set}" = set; then
4665 echo $ECHO_N "(cached) $ECHO_C" >&6
4668 cf_cv_ncurses_version=no
4671 if test "$cross_compiling" = yes; then
4673 # This will not work if the preprocessor splits the line after the
4674 # Autoconf token. The 'unproto' program does that.
4675 cat > conftest.$ac_ext <<EOF
4676 #include <${cf_cv_ncurses_header:-curses.h}>
4678 #ifdef NCURSES_VERSION
4679 Autoconf NCURSES_VERSION
4687 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4688 { (eval echo "$as_me:4688: \"$cf_try\"") >&5
4691 echo "$as_me:4691: \$? = $ac_status" >&5
4692 (exit $ac_status); }
4693 if test -f conftest.out ; then
4694 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4695 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4700 cat >conftest.$ac_ext <<_ACEOF
4701 #line 4701 "configure"
4702 #include "confdefs.h"
4704 #include <${cf_cv_ncurses_header:-curses.h}>
4708 FILE *fp = fopen("$cf_tempfile", "w");
4709 #ifdef NCURSES_VERSION
4710 # ifdef NCURSES_VERSION_PATCH
4711 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4713 fprintf(fp, "%s\n", NCURSES_VERSION);
4717 fprintf(fp, "old\n");
4722 ${cf_cv_main_return:-return}(0);
4725 rm -f conftest$ac_exeext
4726 if { (eval echo "$as_me:4726: \"$ac_link\"") >&5
4727 (eval $ac_link) 2>&5
4729 echo "$as_me:4729: \$? = $ac_status" >&5
4730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4731 { (eval echo "$as_me:4731: \"$ac_try\"") >&5
4734 echo "$as_me:4734: \$? = $ac_status" >&5
4735 (exit $ac_status); }; }; then
4737 cf_cv_ncurses_version=`cat $cf_tempfile`
4739 echo "$as_me: program exited with status $ac_status" >&5
4740 echo "$as_me: failed program was:" >&5
4741 cat conftest.$ac_ext >&5
4743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4748 echo "$as_me:4748: result: $cf_cv_ncurses_version" >&5
4749 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4750 test "$cf_cv_ncurses_version" = no ||
4751 cat >>confdefs.h <<\EOF
4755 cf_nculib_root=ncurses
4756 # This works, except for the special case where we find gpm, but
4757 # ncurses is in a nonstandard location via $LIBS, and we really want
4760 cf_ncurses_SAVE="$LIBS"
4761 echo "$as_me:4761: checking for Gpm_Open in -lgpm" >&5
4762 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4763 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4764 echo $ECHO_N "(cached) $ECHO_C" >&6
4766 ac_check_lib_save_LIBS=$LIBS
4768 cat >conftest.$ac_ext <<_ACEOF
4769 #line 4769 "configure"
4770 #include "confdefs.h"
4772 /* Override any gcc2 internal prototype to avoid an error. */
4776 /* We use char because int might match the return type of a gcc2
4777 builtin and then its argument prototype would still apply. */
4787 rm -f conftest.$ac_objext conftest$ac_exeext
4788 if { (eval echo "$as_me:4788: \"$ac_link\"") >&5
4789 (eval $ac_link) 2>&5
4791 echo "$as_me:4791: \$? = $ac_status" >&5
4792 (exit $ac_status); } &&
4793 { ac_try='test -s conftest$ac_exeext'
4794 { (eval echo "$as_me:4794: \"$ac_try\"") >&5
4797 echo "$as_me:4797: \$? = $ac_status" >&5
4798 (exit $ac_status); }; }; then
4799 ac_cv_lib_gpm_Gpm_Open=yes
4801 echo "$as_me: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
4803 ac_cv_lib_gpm_Gpm_Open=no
4805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4806 LIBS=$ac_check_lib_save_LIBS
4808 echo "$as_me:4808: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4809 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4810 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4811 echo "$as_me:4811: checking for initscr in -lgpm" >&5
4812 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4813 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
4816 ac_check_lib_save_LIBS=$LIBS
4818 cat >conftest.$ac_ext <<_ACEOF
4819 #line 4819 "configure"
4820 #include "confdefs.h"
4822 /* Override any gcc2 internal prototype to avoid an error. */
4826 /* We use char because int might match the return type of a gcc2
4827 builtin and then its argument prototype would still apply. */
4837 rm -f conftest.$ac_objext conftest$ac_exeext
4838 if { (eval echo "$as_me:4838: \"$ac_link\"") >&5
4839 (eval $ac_link) 2>&5
4841 echo "$as_me:4841: \$? = $ac_status" >&5
4842 (exit $ac_status); } &&
4843 { ac_try='test -s conftest$ac_exeext'
4844 { (eval echo "$as_me:4844: \"$ac_try\"") >&5
4847 echo "$as_me:4847: \$? = $ac_status" >&5
4848 (exit $ac_status); }; }; then
4849 ac_cv_lib_gpm_initscr=yes
4851 echo "$as_me: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
4853 ac_cv_lib_gpm_initscr=no
4855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4856 LIBS=$ac_check_lib_save_LIBS
4858 echo "$as_me:4858: result: $ac_cv_lib_gpm_initscr" >&5
4859 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4860 if test $ac_cv_lib_gpm_initscr = yes; then
4861 LIBS="$cf_ncurses_SAVE"
4863 cf_ncurses_LIBS="-lgpm"
4870 # This is only necessary if you are linking against an obsolete
4871 # version of ncurses (but it should do no harm, since it's static).
4872 if test "$cf_nculib_root" = ncurses ; then
4873 echo "$as_me:4873: checking for tgoto in -lmytinfo" >&5
4874 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4875 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4876 echo $ECHO_N "(cached) $ECHO_C" >&6
4878 ac_check_lib_save_LIBS=$LIBS
4879 LIBS="-lmytinfo $LIBS"
4880 cat >conftest.$ac_ext <<_ACEOF
4881 #line 4881 "configure"
4882 #include "confdefs.h"
4884 /* Override any gcc2 internal prototype to avoid an error. */
4888 /* We use char because int might match the return type of a gcc2
4889 builtin and then its argument prototype would still apply. */
4899 rm -f conftest.$ac_objext conftest$ac_exeext
4900 if { (eval echo "$as_me:4900: \"$ac_link\"") >&5
4901 (eval $ac_link) 2>&5
4903 echo "$as_me:4903: \$? = $ac_status" >&5
4904 (exit $ac_status); } &&
4905 { ac_try='test -s conftest$ac_exeext'
4906 { (eval echo "$as_me:4906: \"$ac_try\"") >&5
4909 echo "$as_me:4909: \$? = $ac_status" >&5
4910 (exit $ac_status); }; }; then
4911 ac_cv_lib_mytinfo_tgoto=yes
4913 echo "$as_me: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
4915 ac_cv_lib_mytinfo_tgoto=no
4917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4918 LIBS=$ac_check_lib_save_LIBS
4920 echo "$as_me:4920: result: $ac_cv_lib_mytinfo_tgoto" >&5
4921 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4922 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4923 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4930 cf_add_libs="$cf_ncurses_LIBS"
4931 # Filter out duplicates - this happens with badly-designed ".pc" files...
4932 for cf_add_1lib in $LIBS
4934 for cf_add_2lib in $cf_add_libs
4936 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4942 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4946 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4949 cf_add_libs="-l$cf_nculib_root"
4950 # Filter out duplicates - this happens with badly-designed ".pc" files...
4951 for cf_add_1lib in $LIBS
4953 for cf_add_2lib in $cf_add_libs
4955 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4961 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4967 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4969 echo "$as_me:4969: checking for initscr" >&5
4970 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
4971 if test "${ac_cv_func_initscr+set}" = set; then
4972 echo $ECHO_N "(cached) $ECHO_C" >&6
4974 cat >conftest.$ac_ext <<_ACEOF
4975 #line 4975 "configure"
4976 #include "confdefs.h"
4977 /* System header to define __stub macros and hopefully few prototypes,
4978 which can conflict with char initscr (); below. */
4980 /* Override any gcc2 internal prototype to avoid an error. */
4984 /* We use char because int might match the return type of a gcc2
4985 builtin and then its argument prototype would still apply. */
4992 /* The GNU C library defines this for functions which it implements
4993 to always fail with ENOSYS. Some functions are actually named
4994 something starting with __ and the normal name is an alias. */
4995 #if defined (__stub_initscr) || defined (__stub___initscr)
4998 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5005 rm -f conftest.$ac_objext conftest$ac_exeext
5006 if { (eval echo "$as_me:5006: \"$ac_link\"") >&5
5007 (eval $ac_link) 2>&5
5009 echo "$as_me:5009: \$? = $ac_status" >&5
5010 (exit $ac_status); } &&
5011 { ac_try='test -s conftest$ac_exeext'
5012 { (eval echo "$as_me:5012: \"$ac_try\"") >&5
5015 echo "$as_me:5015: \$? = $ac_status" >&5
5016 (exit $ac_status); }; }; then
5017 ac_cv_func_initscr=yes
5019 echo "$as_me: failed program was:" >&5
5020 cat conftest.$ac_ext >&5
5021 ac_cv_func_initscr=no
5023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5025 echo "$as_me:5025: result: $ac_cv_func_initscr" >&5
5026 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5027 if test $ac_cv_func_initscr = yes; then
5028 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5031 cf_save_LIBS="$LIBS"
5032 echo "$as_me:5032: checking for initscr in -l$cf_nculib_root" >&5
5033 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5034 LIBS="-l$cf_nculib_root $LIBS"
5035 cat >conftest.$ac_ext <<_ACEOF
5036 #line 5036 "configure"
5037 #include "confdefs.h"
5038 #include <${cf_cv_ncurses_header:-curses.h}>
5047 rm -f conftest.$ac_objext conftest$ac_exeext
5048 if { (eval echo "$as_me:5048: \"$ac_link\"") >&5
5049 (eval $ac_link) 2>&5
5051 echo "$as_me:5051: \$? = $ac_status" >&5
5052 (exit $ac_status); } &&
5053 { ac_try='test -s conftest$ac_exeext'
5054 { (eval echo "$as_me:5054: \"$ac_try\"") >&5
5057 echo "$as_me:5057: \$? = $ac_status" >&5
5058 (exit $ac_status); }; }; then
5059 echo "$as_me:5059: result: yes" >&5
5060 echo "${ECHO_T}yes" >&6
5061 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5064 echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 echo "$as_me:5066: result: no" >&5
5067 echo "${ECHO_T}no" >&6
5070 cf_library_path_list=""
5071 if test -n "${LDFLAGS}${LIBS}" ; then
5072 for cf_library_path in $LDFLAGS $LIBS
5074 case $cf_library_path in
5076 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5078 test "x$cf_library_path" != "xNONE" && \
5079 test -d "$cf_library_path" && \
5081 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5082 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5083 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5084 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5085 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5086 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"
5089 cf_library_path_list="$cf_library_path_list $cf_search"
5097 test "x$prefix" != "xNONE" && \
5098 test -d "$prefix" && \
5100 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5101 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5102 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5103 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5104 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5105 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5108 for cf_subdir_prefix in \
5117 test "x$cf_subdir_prefix" != "x$prefix" && \
5118 test -d "$cf_subdir_prefix" && \
5119 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5120 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5121 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5122 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5123 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5124 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5125 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"
5130 cf_search="$cf_library_path_list $cf_search"
5132 for cf_libdir in $cf_search
5134 echo "$as_me:5134: checking for -l$cf_nculib_root in $cf_libdir" >&5
5135 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5136 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5137 cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <${cf_cv_ncurses_header:-curses.h}>
5149 rm -f conftest.$ac_objext conftest$ac_exeext
5150 if { (eval echo "$as_me:5150: \"$ac_link\"") >&5
5151 (eval $ac_link) 2>&5
5153 echo "$as_me:5153: \$? = $ac_status" >&5
5154 (exit $ac_status); } &&
5155 { ac_try='test -s conftest$ac_exeext'
5156 { (eval echo "$as_me:5156: \"$ac_try\"") >&5
5159 echo "$as_me:5159: \$? = $ac_status" >&5
5160 (exit $ac_status); }; }; then
5161 echo "$as_me:5161: result: yes" >&5
5162 echo "${ECHO_T}yes" >&6
5163 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5166 echo "$as_me: failed program was:" >&5
5167 cat conftest.$ac_ext >&5
5168 echo "$as_me:5168: result: no" >&5
5169 echo "${ECHO_T}no" >&6
5170 LIBS="$cf_save_LIBS"
5172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5180 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5182 if test $cf_found_library = no ; then
5183 { { echo "$as_me:5183: error: Cannot link $cf_nculib_root library" >&5
5184 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5185 { (exit 1); exit 1; }; }
5190 if test -n "$cf_ncurses_LIBS" ; then
5191 echo "$as_me:5191: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5192 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5193 cf_ncurses_SAVE="$LIBS"
5194 for p in $cf_ncurses_LIBS ; do
5195 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5196 if test "$q" != "$LIBS" ; then
5200 cat >conftest.$ac_ext <<_ACEOF
5201 #line 5201 "configure"
5202 #include "confdefs.h"
5203 #include <${cf_cv_ncurses_header:-curses.h}>
5207 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5212 rm -f conftest.$ac_objext conftest$ac_exeext
5213 if { (eval echo "$as_me:5213: \"$ac_link\"") >&5
5214 (eval $ac_link) 2>&5
5216 echo "$as_me:5216: \$? = $ac_status" >&5
5217 (exit $ac_status); } &&
5218 { ac_try='test -s conftest$ac_exeext'
5219 { (eval echo "$as_me:5219: \"$ac_try\"") >&5
5222 echo "$as_me:5222: \$? = $ac_status" >&5
5223 (exit $ac_status); }; }; then
5224 echo "$as_me:5224: result: yes" >&5
5225 echo "${ECHO_T}yes" >&6
5227 echo "$as_me: failed program was:" >&5
5228 cat conftest.$ac_ext >&5
5229 echo "$as_me:5229: result: no" >&5
5230 echo "${ECHO_T}no" >&6
5231 LIBS="$cf_ncurses_SAVE"
5233 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5236 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5238 cat >>confdefs.h <<EOF
5239 #define $cf_nculib_ROOT 1
5247 echo "$as_me:5247: checking if you want wide-character code" >&5
5248 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5250 # Check whether --enable-widec or --disable-widec was given.
5251 if test "${enable_widec+set}" = set; then
5252 enableval="$enable_widec"
5253 with_widec=$enableval
5257 echo "$as_me:5257: result: $with_widec" >&5
5258 echo "${ECHO_T}$with_widec" >&6
5259 if test "$with_widec" = yes ; then
5261 echo "$as_me:5261: checking for multibyte character support" >&5
5262 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5263 if test "${cf_cv_utf8_lib+set}" = set; then
5264 echo $ECHO_N "(cached) $ECHO_C" >&6
5267 cf_save_LIBS="$LIBS"
5268 cat >conftest.$ac_ext <<_ACEOF
5269 #line 5269 "configure"
5270 #include "confdefs.h"
5281 rm -f conftest.$ac_objext conftest$ac_exeext
5282 if { (eval echo "$as_me:5282: \"$ac_link\"") >&5
5283 (eval $ac_link) 2>&5
5285 echo "$as_me:5285: \$? = $ac_status" >&5
5286 (exit $ac_status); } &&
5287 { ac_try='test -s conftest$ac_exeext'
5288 { (eval echo "$as_me:5288: \"$ac_try\"") >&5
5291 echo "$as_me:5291: \$? = $ac_status" >&5
5292 (exit $ac_status); }; }; then
5295 echo "$as_me: failed program was:" >&5
5296 cat conftest.$ac_ext >&5
5298 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5299 # will be set on completion of the AC_TRY_LINK below.
5300 cf_cv_header_path_utf8=
5301 cf_cv_library_path_utf8=
5303 echo "${as_me:-configure}:5303: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5305 cf_save_LIBS="$LIBS"
5307 cat >conftest.$ac_ext <<_ACEOF
5308 #line 5308 "configure"
5309 #include "confdefs.h"
5311 #include <libutf8.h>
5320 rm -f conftest.$ac_objext conftest$ac_exeext
5321 if { (eval echo "$as_me:5321: \"$ac_link\"") >&5
5322 (eval $ac_link) 2>&5
5324 echo "$as_me:5324: \$? = $ac_status" >&5
5325 (exit $ac_status); } &&
5326 { ac_try='test -s conftest$ac_exeext'
5327 { (eval echo "$as_me:5327: \"$ac_try\"") >&5
5330 echo "$as_me:5330: \$? = $ac_status" >&5
5331 (exit $ac_status); }; }; then
5333 cf_cv_find_linkage_utf8=yes
5334 cf_cv_header_path_utf8=/usr/include
5335 cf_cv_library_path_utf8=/usr/lib
5338 echo "$as_me: failed program was:" >&5
5339 cat conftest.$ac_ext >&5
5341 LIBS="-lutf8 $cf_save_LIBS"
5343 cat >conftest.$ac_ext <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5347 #include <libutf8.h>
5356 rm -f conftest.$ac_objext conftest$ac_exeext
5357 if { (eval echo "$as_me:5357: \"$ac_link\"") >&5
5358 (eval $ac_link) 2>&5
5360 echo "$as_me:5360: \$? = $ac_status" >&5
5361 (exit $ac_status); } &&
5362 { ac_try='test -s conftest$ac_exeext'
5363 { (eval echo "$as_me:5363: \"$ac_try\"") >&5
5366 echo "$as_me:5366: \$? = $ac_status" >&5
5367 (exit $ac_status); }; }; then
5369 cf_cv_find_linkage_utf8=yes
5370 cf_cv_header_path_utf8=/usr/include
5371 cf_cv_library_path_utf8=/usr/lib
5372 cf_cv_library_file_utf8="-lutf8"
5375 echo "$as_me: failed program was:" >&5
5376 cat conftest.$ac_ext >&5
5378 cf_cv_find_linkage_utf8=no
5379 LIBS="$cf_save_LIBS"
5381 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5383 echo "${as_me:-configure}:5383: testing find linkage for utf8 library ..." 1>&5
5385 echo "${as_me:-configure}:5385: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5387 cf_save_CPPFLAGS="$CPPFLAGS"
5388 cf_test_CPPFLAGS="$CPPFLAGS"
5392 # collect the current set of include-directories from compiler flags
5393 cf_header_path_list=""
5394 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5395 for cf_header_path in $CPPFLAGS $CFLAGS
5397 case $cf_header_path in
5399 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5401 test "x$cf_header_path" != "xNONE" && \
5402 test -d "$cf_header_path" && \
5404 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5405 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5406 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5407 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5408 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5409 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5412 cf_header_path_list="$cf_header_path_list $cf_search"
5418 # add the variations for the package we are looking for
5422 test "x$prefix" != "xNONE" && \
5423 test -d "$prefix" && \
5425 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5426 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5427 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5428 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5429 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5430 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5433 for cf_subdir_prefix in \
5442 test "x$cf_subdir_prefix" != "x$prefix" && \
5443 test -d "$cf_subdir_prefix" && \
5444 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5445 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5446 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5447 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5448 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5449 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5450 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5455 test "$includedir" != NONE && \
5456 test "$includedir" != "/usr/include" && \
5457 test -d "$includedir" && {
5458 test -d $includedir && cf_search="$cf_search $includedir"
5459 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5462 test "$oldincludedir" != NONE && \
5463 test "$oldincludedir" != "/usr/include" && \
5464 test -d "$oldincludedir" && {
5465 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5466 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5469 cf_search="$cf_search $cf_header_path_list"
5471 for cf_cv_header_path_utf8 in $cf_search
5473 if test -d $cf_cv_header_path_utf8 ; then
5474 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5476 echo "${as_me:-configure}:5476: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5478 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5479 cat >conftest.$ac_ext <<_ACEOF
5480 #line 5480 "configure"
5481 #include "confdefs.h"
5483 #include <libutf8.h>
5492 rm -f conftest.$ac_objext
5493 if { (eval echo "$as_me:5493: \"$ac_compile\"") >&5
5494 (eval $ac_compile) 2>&5
5496 echo "$as_me:5496: \$? = $ac_status" >&5
5497 (exit $ac_status); } &&
5498 { ac_try='test -s conftest.$ac_objext'
5499 { (eval echo "$as_me:5499: \"$ac_try\"") >&5
5502 echo "$as_me:5502: \$? = $ac_status" >&5
5503 (exit $ac_status); }; }; then
5505 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5507 echo "${as_me:-configure}:5507: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5509 cf_cv_find_linkage_utf8=maybe
5510 cf_test_CPPFLAGS="$CPPFLAGS"
5513 echo "$as_me: failed program was:" >&5
5514 cat conftest.$ac_ext >&5
5516 CPPFLAGS="$cf_save_CPPFLAGS"
5519 rm -f conftest.$ac_objext conftest.$ac_ext
5523 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5525 echo "${as_me:-configure}:5525: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5527 cf_save_LIBS="$LIBS"
5528 cf_save_LDFLAGS="$LDFLAGS"
5530 if test "$cf_cv_find_linkage_utf8" != yes ; then
5533 cf_library_path_list=""
5534 if test -n "${LDFLAGS}${LIBS}" ; then
5535 for cf_library_path in $LDFLAGS $LIBS
5537 case $cf_library_path in
5539 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5541 test "x$cf_library_path" != "xNONE" && \
5542 test -d "$cf_library_path" && \
5544 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5545 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5546 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5547 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5548 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5549 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5552 cf_library_path_list="$cf_library_path_list $cf_search"
5560 test "x$prefix" != "xNONE" && \
5561 test -d "$prefix" && \
5563 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5564 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5565 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5566 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5567 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5568 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5571 for cf_subdir_prefix in \
5580 test "x$cf_subdir_prefix" != "x$prefix" && \
5581 test -d "$cf_subdir_prefix" && \
5582 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5583 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5584 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5585 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5586 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5587 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5588 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5593 cf_search="$cf_library_path_list $cf_search"
5595 for cf_cv_library_path_utf8 in $cf_search
5597 if test -d $cf_cv_library_path_utf8 ; then
5598 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5600 echo "${as_me:-configure}:5600: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5602 CPPFLAGS="$cf_test_CPPFLAGS"
5603 LIBS="-lutf8 $cf_save_LIBS"
5604 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5605 cat >conftest.$ac_ext <<_ACEOF
5606 #line 5606 "configure"
5607 #include "confdefs.h"
5609 #include <libutf8.h>
5618 rm -f conftest.$ac_objext conftest$ac_exeext
5619 if { (eval echo "$as_me:5619: \"$ac_link\"") >&5
5620 (eval $ac_link) 2>&5
5622 echo "$as_me:5622: \$? = $ac_status" >&5
5623 (exit $ac_status); } &&
5624 { ac_try='test -s conftest$ac_exeext'
5625 { (eval echo "$as_me:5625: \"$ac_try\"") >&5
5628 echo "$as_me:5628: \$? = $ac_status" >&5
5629 (exit $ac_status); }; }; then
5631 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5633 echo "${as_me:-configure}:5633: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5635 cf_cv_find_linkage_utf8=yes
5636 cf_cv_library_file_utf8="-lutf8"
5639 echo "$as_me: failed program was:" >&5
5640 cat conftest.$ac_ext >&5
5642 CPPFLAGS="$cf_save_CPPFLAGS"
5643 LIBS="$cf_save_LIBS"
5644 LDFLAGS="$cf_save_LDFLAGS"
5647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5650 CPPFLAGS="$cf_save_CPPFLAGS"
5651 LDFLAGS="$cf_save_LDFLAGS"
5655 cf_cv_find_linkage_utf8=no
5659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5664 LIBS="$cf_save_LIBS"
5666 if test "$cf_cv_find_linkage_utf8" = yes ; then
5667 cf_cv_utf8_lib=add-on
5673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5675 echo "$as_me:5675: result: $cf_cv_utf8_lib" >&5
5676 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5678 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5680 if test "$cf_cv_utf8_lib" = "add-on" ; then
5682 cat >>confdefs.h <<\EOF
5683 #define HAVE_LIBUTF8_H 1
5686 if test -n "$cf_cv_header_path_utf8" ; then
5687 for cf_add_incdir in $cf_cv_header_path_utf8
5689 while test $cf_add_incdir != /usr/include
5691 if test -d $cf_add_incdir
5694 if test -n "$CFLAGS$CPPFLAGS" ; then
5695 # a loop is needed to ensure we can add subdirs of existing dirs
5696 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5697 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5698 cf_have_incdir=yes; break
5703 if test "$cf_have_incdir" = no ; then
5704 if test "$cf_add_incdir" = /usr/local/include ; then
5705 if test "$GCC" = yes
5707 cf_save_CPPFLAGS=$CPPFLAGS
5708 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5709 cat >conftest.$ac_ext <<_ACEOF
5710 #line 5710 "configure"
5711 #include "confdefs.h"
5721 rm -f conftest.$ac_objext
5722 if { (eval echo "$as_me:5722: \"$ac_compile\"") >&5
5723 (eval $ac_compile) 2>&5
5725 echo "$as_me:5725: \$? = $ac_status" >&5
5726 (exit $ac_status); } &&
5727 { ac_try='test -s conftest.$ac_objext'
5728 { (eval echo "$as_me:5728: \"$ac_try\"") >&5
5731 echo "$as_me:5731: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
5735 echo "$as_me: failed program was:" >&5
5736 cat conftest.$ac_ext >&5
5739 rm -f conftest.$ac_objext conftest.$ac_ext
5740 CPPFLAGS=$cf_save_CPPFLAGS
5745 if test "$cf_have_incdir" = no ; then
5746 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5748 echo "${as_me:-configure}:5748: testing adding $cf_add_incdir to include-path ..." 1>&5
5750 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5752 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5753 test "$cf_top_incdir" = "$cf_add_incdir" && break
5754 cf_add_incdir="$cf_top_incdir"
5765 if test -n "$cf_cv_library_path_utf8" ; then
5766 for cf_add_libdir in $cf_cv_library_path_utf8
5768 if test $cf_add_libdir = /usr/lib ; then
5770 elif test -d $cf_add_libdir
5773 if test -n "$LDFLAGS$LIBS" ; then
5774 # a loop is needed to ensure we can add subdirs of existing dirs
5775 for cf_test_libdir in $LDFLAGS $LIBS ; do
5776 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5777 cf_have_libdir=yes; break
5781 if test "$cf_have_libdir" = no ; then
5782 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5784 echo "${as_me:-configure}:5784: testing adding $cf_add_libdir to library-path ..." 1>&5
5786 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5792 cf_add_libs="$cf_cv_library_file_utf8"
5793 # Filter out duplicates - this happens with badly-designed ".pc" files...
5794 for cf_add_1lib in $LIBS
5796 for cf_add_2lib in $cf_add_libs
5798 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5804 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5810 cf_ncuconfig_root=ncursesw
5811 cf_have_ncuconfig=no
5813 if test "x${PKG_CONFIG:=none}" != xnone; then
5814 echo "$as_me:5814: checking pkg-config for $cf_ncuconfig_root" >&5
5815 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5816 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5817 echo "$as_me:5817: result: yes" >&5
5818 echo "${ECHO_T}yes" >&6
5820 echo "$as_me:5820: checking if the $cf_ncuconfig_root package files work" >&5
5821 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5822 cf_have_ncuconfig=unknown
5824 cf_save_CPPFLAGS="$CPPFLAGS"
5825 cf_save_LIBS="$LIBS"
5827 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5829 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5830 # Filter out duplicates - this happens with badly-designed ".pc" files...
5831 for cf_add_1lib in $LIBS
5833 for cf_add_2lib in $cf_add_libs
5835 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5841 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5845 cat >conftest.$ac_ext <<_ACEOF
5846 #line 5846 "configure"
5847 #include "confdefs.h"
5848 #include <${cf_cv_ncurses_header:-curses.h}>
5852 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5857 rm -f conftest.$ac_objext conftest$ac_exeext
5858 if { (eval echo "$as_me:5858: \"$ac_link\"") >&5
5859 (eval $ac_link) 2>&5
5861 echo "$as_me:5861: \$? = $ac_status" >&5
5862 (exit $ac_status); } &&
5863 { ac_try='test -s conftest$ac_exeext'
5864 { (eval echo "$as_me:5864: \"$ac_try\"") >&5
5867 echo "$as_me:5867: \$? = $ac_status" >&5
5868 (exit $ac_status); }; }; then
5869 if test "$cross_compiling" = yes; then
5870 cf_have_ncuconfig=maybe
5872 cat >conftest.$ac_ext <<_ACEOF
5873 #line 5873 "configure"
5874 #include "confdefs.h"
5875 #include <${cf_cv_ncurses_header:-curses.h}>
5877 { char *xx = curses_version(); return (xx == 0); }
5879 rm -f conftest$ac_exeext
5880 if { (eval echo "$as_me:5880: \"$ac_link\"") >&5
5881 (eval $ac_link) 2>&5
5883 echo "$as_me:5883: \$? = $ac_status" >&5
5884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5885 { (eval echo "$as_me:5885: \"$ac_try\"") >&5
5888 echo "$as_me:5888: \$? = $ac_status" >&5
5889 (exit $ac_status); }; }; then
5890 cf_have_ncuconfig=yes
5892 echo "$as_me: program exited with status $ac_status" >&5
5893 echo "$as_me: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
5895 cf_have_ncuconfig=no
5897 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5900 echo "$as_me: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 cf_have_ncuconfig=no
5904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5905 echo "$as_me:5905: result: $cf_have_ncuconfig" >&5
5906 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5907 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5908 if test "$cf_have_ncuconfig" != "yes"
5910 CPPFLAGS="$cf_save_CPPFLAGS"
5911 LIBS="$cf_save_LIBS"
5912 NCURSES_CONFIG_PKG=none
5915 cat >>confdefs.h <<\EOF
5919 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5923 echo "$as_me:5923: result: no" >&5
5924 echo "${ECHO_T}no" >&6
5925 NCURSES_CONFIG_PKG=none
5928 NCURSES_CONFIG_PKG=none
5931 if test "x$cf_have_ncuconfig" = "xno"; then
5932 echo "Looking for ${cf_ncuconfig_root}-config"
5934 if test -n "$ac_tool_prefix"; then
5935 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5937 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5938 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5939 echo "$as_me:5939: checking for $ac_word" >&5
5940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5941 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5942 echo $ECHO_N "(cached) $ECHO_C" >&6
5944 if test -n "$NCURSES_CONFIG"; then
5945 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5947 ac_save_IFS=$IFS; IFS=$ac_path_separator
5949 for ac_dir in $ac_dummy; do
5951 test -z "$ac_dir" && ac_dir=.
5952 $as_executable_p "$ac_dir/$ac_word" || continue
5953 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5954 echo "$as_me:5954: found $ac_dir/$ac_word" >&5
5960 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5961 if test -n "$NCURSES_CONFIG"; then
5962 echo "$as_me:5962: result: $NCURSES_CONFIG" >&5
5963 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5965 echo "$as_me:5965: result: no" >&5
5966 echo "${ECHO_T}no" >&6
5969 test -n "$NCURSES_CONFIG" && break
5972 if test -z "$NCURSES_CONFIG"; then
5973 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5974 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5976 # Extract the first word of "$ac_prog", so it can be a program name with args.
5977 set dummy $ac_prog; ac_word=$2
5978 echo "$as_me:5978: checking for $ac_word" >&5
5979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5980 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5981 echo $ECHO_N "(cached) $ECHO_C" >&6
5983 if test -n "$ac_ct_NCURSES_CONFIG"; then
5984 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5986 ac_save_IFS=$IFS; IFS=$ac_path_separator
5988 for ac_dir in $ac_dummy; do
5990 test -z "$ac_dir" && ac_dir=.
5991 $as_executable_p "$ac_dir/$ac_word" || continue
5992 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5993 echo "$as_me:5993: found $ac_dir/$ac_word" >&5
5999 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6000 if test -n "$ac_ct_NCURSES_CONFIG"; then
6001 echo "$as_me:6001: result: $ac_ct_NCURSES_CONFIG" >&5
6002 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6004 echo "$as_me:6004: result: no" >&5
6005 echo "${ECHO_T}no" >&6
6008 test -n "$ac_ct_NCURSES_CONFIG" && break
6010 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6012 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6015 if test "$NCURSES_CONFIG" != none ; then
6017 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6019 cf_add_libs="`$NCURSES_CONFIG --libs`"
6020 # Filter out duplicates - this happens with badly-designed ".pc" files...
6021 for cf_add_1lib in $LIBS
6023 for cf_add_2lib in $cf_add_libs
6025 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6031 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6035 # even with config script, some packages use no-override for curses.h
6037 echo "$as_me:6037: checking if we have identified curses headers" >&5
6038 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6039 if test "${cf_cv_ncurses_header+set}" = set; then
6040 echo $ECHO_N "(cached) $ECHO_C" >&6
6043 cf_cv_ncurses_header=none
6045 ncurses.h ncursesw/ncurses.h \
6046 curses.h ncursesw/curses.h
6048 cat >conftest.$ac_ext <<_ACEOF
6049 #line 6049 "configure"
6050 #include "confdefs.h"
6051 #include <${cf_header}>
6055 initscr(); tgoto("?", 0,0)
6060 rm -f conftest.$ac_objext
6061 if { (eval echo "$as_me:6061: \"$ac_compile\"") >&5
6062 (eval $ac_compile) 2>&5
6064 echo "$as_me:6064: \$? = $ac_status" >&5
6065 (exit $ac_status); } &&
6066 { ac_try='test -s conftest.$ac_objext'
6067 { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6070 echo "$as_me:6070: \$? = $ac_status" >&5
6071 (exit $ac_status); }; }; then
6072 cf_cv_ncurses_header=$cf_header; break
6074 echo "$as_me: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6077 rm -f conftest.$ac_objext conftest.$ac_ext
6081 echo "$as_me:6081: result: $cf_cv_ncurses_header" >&5
6082 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6084 if test "$cf_cv_ncurses_header" = none ; then
6085 { { echo "$as_me:6085: error: No curses header-files found" >&5
6086 echo "$as_me: error: No curses header-files found" >&2;}
6087 { (exit 1); exit 1; }; }
6090 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6092 for ac_header in $cf_cv_ncurses_header
6094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6095 echo "$as_me:6095: checking for $ac_header" >&5
6096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6098 echo $ECHO_N "(cached) $ECHO_C" >&6
6100 cat >conftest.$ac_ext <<_ACEOF
6101 #line 6101 "configure"
6102 #include "confdefs.h"
6103 #include <$ac_header>
6105 if { (eval echo "$as_me:6105: \"$ac_cpp conftest.$ac_ext\"") >&5
6106 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6108 egrep -v '^ *\+' conftest.er1 >conftest.err
6110 cat conftest.err >&5
6111 echo "$as_me:6111: \$? = $ac_status" >&5
6112 (exit $ac_status); } >/dev/null; then
6113 if test -s conftest.err; then
6114 ac_cpp_err=$ac_c_preproc_warn_flag
6121 if test -z "$ac_cpp_err"; then
6122 eval "$as_ac_Header=yes"
6124 echo "$as_me: failed program was:" >&5
6125 cat conftest.$ac_ext >&5
6126 eval "$as_ac_Header=no"
6128 rm -f conftest.err conftest.$ac_ext
6130 echo "$as_me:6130: result: `eval echo '${'$as_ac_Header'}'`" >&5
6131 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6132 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6133 cat >>confdefs.h <<EOF
6134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6140 cat >>confdefs.h <<\EOF
6144 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6146 cat >>confdefs.h <<EOF
6147 #define $cf_nculib_ROOT 1
6150 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6154 cf_ncuhdr_root=ncursesw
6156 test -n "$cf_cv_curses_dir" && \
6157 test "$cf_cv_curses_dir" != "no" && { \
6159 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6160 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6162 while test $cf_add_incdir != /usr/include
6164 if test -d $cf_add_incdir
6167 if test -n "$CFLAGS$CPPFLAGS" ; then
6168 # a loop is needed to ensure we can add subdirs of existing dirs
6169 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6170 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6171 cf_have_incdir=yes; break
6176 if test "$cf_have_incdir" = no ; then
6177 if test "$cf_add_incdir" = /usr/local/include ; then
6178 if test "$GCC" = yes
6180 cf_save_CPPFLAGS=$CPPFLAGS
6181 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6182 cat >conftest.$ac_ext <<_ACEOF
6183 #line 6183 "configure"
6184 #include "confdefs.h"
6194 rm -f conftest.$ac_objext
6195 if { (eval echo "$as_me:6195: \"$ac_compile\"") >&5
6196 (eval $ac_compile) 2>&5
6198 echo "$as_me:6198: \$? = $ac_status" >&5
6199 (exit $ac_status); } &&
6200 { ac_try='test -s conftest.$ac_objext'
6201 { (eval echo "$as_me:6201: \"$ac_try\"") >&5
6204 echo "$as_me:6204: \$? = $ac_status" >&5
6205 (exit $ac_status); }; }; then
6208 echo "$as_me: failed program was:" >&5
6209 cat conftest.$ac_ext >&5
6212 rm -f conftest.$ac_objext conftest.$ac_ext
6213 CPPFLAGS=$cf_save_CPPFLAGS
6218 if test "$cf_have_incdir" = no ; then
6219 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6221 echo "${as_me:-configure}:6221: testing adding $cf_add_incdir to include-path ..." 1>&5
6223 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6225 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6226 test "$cf_top_incdir" = "$cf_add_incdir" && break
6227 cf_add_incdir="$cf_top_incdir"
6240 echo "$as_me:6240: checking for $cf_ncuhdr_root header in include-path" >&5
6241 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6242 if test "${cf_cv_ncurses_h+set}" = set; then
6243 echo $ECHO_N "(cached) $ECHO_C" >&6
6246 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6247 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6248 for cf_header in $cf_header_list
6251 cat >conftest.$ac_ext <<_ACEOF
6252 #line 6252 "configure"
6253 #include "confdefs.h"
6255 #define _XOPEN_SOURCE_EXTENDED
6256 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6257 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6259 #include <$cf_header>
6264 #ifdef NCURSES_VERSION
6270 printf("%s\n", NCURSES_VERSION);
6283 rm -f conftest.$ac_objext
6284 if { (eval echo "$as_me:6284: \"$ac_compile\"") >&5
6285 (eval $ac_compile) 2>&5
6287 echo "$as_me:6287: \$? = $ac_status" >&5
6288 (exit $ac_status); } &&
6289 { ac_try='test -s conftest.$ac_objext'
6290 { (eval echo "$as_me:6290: \"$ac_try\"") >&5
6293 echo "$as_me:6293: \$? = $ac_status" >&5
6294 (exit $ac_status); }; }; then
6295 cf_cv_ncurses_h=$cf_header
6298 echo "$as_me: failed program was:" >&5
6299 cat conftest.$ac_ext >&5
6302 rm -f conftest.$ac_objext conftest.$ac_ext
6304 test "$cf_cv_ncurses_h" != no && break
6308 echo "$as_me:6308: result: $cf_cv_ncurses_h" >&5
6309 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6311 if test "$cf_cv_ncurses_h" != no ; then
6312 cf_cv_ncurses_header=$cf_cv_ncurses_h
6315 echo "$as_me:6315: checking for $cf_ncuhdr_root include-path" >&5
6316 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6317 if test "${cf_cv_ncurses_h2+set}" = set; then
6318 echo $ECHO_N "(cached) $ECHO_C" >&6
6321 test -n "$verbose" && echo
6325 # collect the current set of include-directories from compiler flags
6326 cf_header_path_list=""
6327 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6328 for cf_header_path in $CPPFLAGS $CFLAGS
6330 case $cf_header_path in
6332 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6334 test "x$cf_header_path" != "xNONE" && \
6335 test -d "$cf_header_path" && \
6337 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6338 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6339 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6340 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6341 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6342 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"
6345 cf_header_path_list="$cf_header_path_list $cf_search"
6351 # add the variations for the package we are looking for
6355 test "x$prefix" != "xNONE" && \
6356 test -d "$prefix" && \
6358 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6359 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6360 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6361 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6362 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6363 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6366 for cf_subdir_prefix in \
6375 test "x$cf_subdir_prefix" != "x$prefix" && \
6376 test -d "$cf_subdir_prefix" && \
6377 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6378 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6379 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6380 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6381 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6382 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6383 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"
6388 test "$includedir" != NONE && \
6389 test "$includedir" != "/usr/include" && \
6390 test -d "$includedir" && {
6391 test -d $includedir && cf_search="$cf_search $includedir"
6392 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6395 test "$oldincludedir" != NONE && \
6396 test "$oldincludedir" != "/usr/include" && \
6397 test -d "$oldincludedir" && {
6398 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6399 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6402 cf_search="$cf_search $cf_header_path_list"
6404 test -n "$verbose" && echo search path $cf_search
6405 cf_save2_CPPFLAGS="$CPPFLAGS"
6406 for cf_incdir in $cf_search
6409 if test -n "$cf_incdir" ; then
6410 for cf_add_incdir in $cf_incdir
6412 while test $cf_add_incdir != /usr/include
6414 if test -d $cf_add_incdir
6417 if test -n "$CFLAGS$CPPFLAGS" ; then
6418 # a loop is needed to ensure we can add subdirs of existing dirs
6419 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6420 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6421 cf_have_incdir=yes; break
6426 if test "$cf_have_incdir" = no ; then
6427 if test "$cf_add_incdir" = /usr/local/include ; then
6428 if test "$GCC" = yes
6430 cf_save_CPPFLAGS=$CPPFLAGS
6431 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6432 cat >conftest.$ac_ext <<_ACEOF
6433 #line 6433 "configure"
6434 #include "confdefs.h"
6444 rm -f conftest.$ac_objext
6445 if { (eval echo "$as_me:6445: \"$ac_compile\"") >&5
6446 (eval $ac_compile) 2>&5
6448 echo "$as_me:6448: \$? = $ac_status" >&5
6449 (exit $ac_status); } &&
6450 { ac_try='test -s conftest.$ac_objext'
6451 { (eval echo "$as_me:6451: \"$ac_try\"") >&5
6454 echo "$as_me:6454: \$? = $ac_status" >&5
6455 (exit $ac_status); }; }; then
6458 echo "$as_me: failed program was:" >&5
6459 cat conftest.$ac_ext >&5
6462 rm -f conftest.$ac_objext conftest.$ac_ext
6463 CPPFLAGS=$cf_save_CPPFLAGS
6468 if test "$cf_have_incdir" = no ; then
6469 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6471 echo "${as_me:-configure}:6471: testing adding $cf_add_incdir to include-path ..." 1>&5
6473 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6475 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6476 test "$cf_top_incdir" = "$cf_add_incdir" && break
6477 cf_add_incdir="$cf_top_incdir"
6493 cat >conftest.$ac_ext <<_ACEOF
6494 #line 6494 "configure"
6495 #include "confdefs.h"
6497 #include <$cf_header>
6502 #ifdef NCURSES_VERSION
6504 printf("%s\n", NCURSES_VERSION);
6517 rm -f conftest.$ac_objext
6518 if { (eval echo "$as_me:6518: \"$ac_compile\"") >&5
6519 (eval $ac_compile) 2>&5
6521 echo "$as_me:6521: \$? = $ac_status" >&5
6522 (exit $ac_status); } &&
6523 { ac_try='test -s conftest.$ac_objext'
6524 { (eval echo "$as_me:6524: \"$ac_try\"") >&5
6527 echo "$as_me:6527: \$? = $ac_status" >&5
6528 (exit $ac_status); }; }; then
6529 cf_cv_ncurses_h2=$cf_header
6532 echo "$as_me: failed program was:" >&5
6533 cat conftest.$ac_ext >&5
6536 rm -f conftest.$ac_objext conftest.$ac_ext
6538 if test "$cf_cv_ncurses_h2" != no ; then
6539 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6540 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6543 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6545 CPPFLAGS="$cf_save2_CPPFLAGS"
6546 test "$cf_cv_ncurses_h2" != no && break
6548 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6548: error: not found" >&5
6549 echo "$as_me: error: not found" >&2;}
6550 { (exit 1); exit 1; }; }
6553 echo "$as_me:6553: result: $cf_cv_ncurses_h2" >&5
6554 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6556 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6557 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6558 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6559 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6562 if test -n "$cf_1st_incdir" ; then
6563 for cf_add_incdir in $cf_1st_incdir
6565 while test $cf_add_incdir != /usr/include
6567 if test -d $cf_add_incdir
6570 if test -n "$CFLAGS$CPPFLAGS" ; then
6571 # a loop is needed to ensure we can add subdirs of existing dirs
6572 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6573 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6574 cf_have_incdir=yes; break
6579 if test "$cf_have_incdir" = no ; then
6580 if test "$cf_add_incdir" = /usr/local/include ; then
6581 if test "$GCC" = yes
6583 cf_save_CPPFLAGS=$CPPFLAGS
6584 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6585 cat >conftest.$ac_ext <<_ACEOF
6586 #line 6586 "configure"
6587 #include "confdefs.h"
6597 rm -f conftest.$ac_objext
6598 if { (eval echo "$as_me:6598: \"$ac_compile\"") >&5
6599 (eval $ac_compile) 2>&5
6601 echo "$as_me:6601: \$? = $ac_status" >&5
6602 (exit $ac_status); } &&
6603 { ac_try='test -s conftest.$ac_objext'
6604 { (eval echo "$as_me:6604: \"$ac_try\"") >&5
6607 echo "$as_me:6607: \$? = $ac_status" >&5
6608 (exit $ac_status); }; }; then
6611 echo "$as_me: failed program was:" >&5
6612 cat conftest.$ac_ext >&5
6615 rm -f conftest.$ac_objext conftest.$ac_ext
6616 CPPFLAGS=$cf_save_CPPFLAGS
6621 if test "$cf_have_incdir" = no ; then
6622 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6624 echo "${as_me:-configure}:6624: testing adding $cf_add_incdir to include-path ..." 1>&5
6626 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6628 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6629 test "$cf_top_incdir" = "$cf_add_incdir" && break
6630 cf_add_incdir="$cf_top_incdir"
6643 # Set definitions to allow ifdef'ing for ncurses.h
6645 case $cf_cv_ncurses_header in
6648 cat >>confdefs.h <<\EOF
6649 #define HAVE_NCURSES_H 1
6655 case $cf_cv_ncurses_header in
6656 (ncurses/curses.h|ncurses/ncurses.h)
6658 cat >>confdefs.h <<\EOF
6659 #define HAVE_NCURSES_NCURSES_H 1
6663 (ncursesw/curses.h|ncursesw/ncurses.h)
6665 cat >>confdefs.h <<\EOF
6666 #define HAVE_NCURSESW_NCURSES_H 1
6672 echo "$as_me:6672: checking for terminfo header" >&5
6673 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6674 if test "${cf_cv_term_header+set}" = set; then
6675 echo $ECHO_N "(cached) $ECHO_C" >&6
6678 case ${cf_cv_ncurses_header} in
6679 (*/ncurses.h|*/ncursesw.h)
6680 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6683 cf_term_header=term.h
6687 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6689 cat >conftest.$ac_ext <<_ACEOF
6690 #line 6690 "configure"
6691 #include "confdefs.h"
6693 #include <${cf_cv_ncurses_header:-curses.h}>
6699 int x = auto_left_margin
6704 rm -f conftest.$ac_objext
6705 if { (eval echo "$as_me:6705: \"$ac_compile\"") >&5
6706 (eval $ac_compile) 2>&5
6708 echo "$as_me:6708: \$? = $ac_status" >&5
6709 (exit $ac_status); } &&
6710 { ac_try='test -s conftest.$ac_objext'
6711 { (eval echo "$as_me:6711: \"$ac_try\"") >&5
6714 echo "$as_me:6714: \$? = $ac_status" >&5
6715 (exit $ac_status); }; }; then
6717 cf_cv_term_header="$cf_test"
6719 echo "$as_me: failed program was:" >&5
6720 cat conftest.$ac_ext >&5
6722 cf_cv_term_header=unknown
6725 rm -f conftest.$ac_objext conftest.$ac_ext
6726 test "$cf_cv_term_header" != unknown && break
6730 echo "$as_me:6730: result: $cf_cv_term_header" >&5
6731 echo "${ECHO_T}$cf_cv_term_header" >&6
6733 # Set definitions to allow ifdef'ing to accommodate subdirectories
6735 case $cf_cv_term_header in
6738 cat >>confdefs.h <<\EOF
6739 #define HAVE_TERM_H 1
6745 case $cf_cv_term_header in
6748 cat >>confdefs.h <<\EOF
6749 #define HAVE_NCURSES_TERM_H 1
6755 cat >>confdefs.h <<\EOF
6756 #define HAVE_NCURSESW_TERM_H 1
6762 # some applications need this, but should check for NCURSES_VERSION
6764 cat >>confdefs.h <<\EOF
6768 echo "$as_me:6768: checking for ncurses version" >&5
6769 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6770 if test "${cf_cv_ncurses_version+set}" = set; then
6771 echo $ECHO_N "(cached) $ECHO_C" >&6
6774 cf_cv_ncurses_version=no
6777 if test "$cross_compiling" = yes; then
6779 # This will not work if the preprocessor splits the line after the
6780 # Autoconf token. The 'unproto' program does that.
6781 cat > conftest.$ac_ext <<EOF
6782 #include <${cf_cv_ncurses_header:-curses.h}>
6784 #ifdef NCURSES_VERSION
6785 Autoconf NCURSES_VERSION
6793 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6794 { (eval echo "$as_me:6794: \"$cf_try\"") >&5
6797 echo "$as_me:6797: \$? = $ac_status" >&5
6798 (exit $ac_status); }
6799 if test -f conftest.out ; then
6800 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6801 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6806 cat >conftest.$ac_ext <<_ACEOF
6807 #line 6807 "configure"
6808 #include "confdefs.h"
6810 #include <${cf_cv_ncurses_header:-curses.h}>
6814 FILE *fp = fopen("$cf_tempfile", "w");
6815 #ifdef NCURSES_VERSION
6816 # ifdef NCURSES_VERSION_PATCH
6817 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6819 fprintf(fp, "%s\n", NCURSES_VERSION);
6823 fprintf(fp, "old\n");
6828 ${cf_cv_main_return:-return}(0);
6831 rm -f conftest$ac_exeext
6832 if { (eval echo "$as_me:6832: \"$ac_link\"") >&5
6833 (eval $ac_link) 2>&5
6835 echo "$as_me:6835: \$? = $ac_status" >&5
6836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6837 { (eval echo "$as_me:6837: \"$ac_try\"") >&5
6840 echo "$as_me:6840: \$? = $ac_status" >&5
6841 (exit $ac_status); }; }; then
6843 cf_cv_ncurses_version=`cat $cf_tempfile`
6845 echo "$as_me: program exited with status $ac_status" >&5
6846 echo "$as_me: failed program was:" >&5
6847 cat conftest.$ac_ext >&5
6849 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6854 echo "$as_me:6854: result: $cf_cv_ncurses_version" >&5
6855 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6856 test "$cf_cv_ncurses_version" = no ||
6857 cat >>confdefs.h <<\EOF
6861 cf_nculib_root=ncursesw
6862 # This works, except for the special case where we find gpm, but
6863 # ncurses is in a nonstandard location via $LIBS, and we really want
6866 cf_ncurses_SAVE="$LIBS"
6867 echo "$as_me:6867: checking for Gpm_Open in -lgpm" >&5
6868 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6869 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6870 echo $ECHO_N "(cached) $ECHO_C" >&6
6872 ac_check_lib_save_LIBS=$LIBS
6874 cat >conftest.$ac_ext <<_ACEOF
6875 #line 6875 "configure"
6876 #include "confdefs.h"
6878 /* Override any gcc2 internal prototype to avoid an error. */
6882 /* We use char because int might match the return type of a gcc2
6883 builtin and then its argument prototype would still apply. */
6893 rm -f conftest.$ac_objext conftest$ac_exeext
6894 if { (eval echo "$as_me:6894: \"$ac_link\"") >&5
6895 (eval $ac_link) 2>&5
6897 echo "$as_me:6897: \$? = $ac_status" >&5
6898 (exit $ac_status); } &&
6899 { ac_try='test -s conftest$ac_exeext'
6900 { (eval echo "$as_me:6900: \"$ac_try\"") >&5
6903 echo "$as_me:6903: \$? = $ac_status" >&5
6904 (exit $ac_status); }; }; then
6905 ac_cv_lib_gpm_Gpm_Open=yes
6907 echo "$as_me: failed program was:" >&5
6908 cat conftest.$ac_ext >&5
6909 ac_cv_lib_gpm_Gpm_Open=no
6911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6912 LIBS=$ac_check_lib_save_LIBS
6914 echo "$as_me:6914: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6915 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6916 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6917 echo "$as_me:6917: checking for initscr in -lgpm" >&5
6918 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6919 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6920 echo $ECHO_N "(cached) $ECHO_C" >&6
6922 ac_check_lib_save_LIBS=$LIBS
6924 cat >conftest.$ac_ext <<_ACEOF
6925 #line 6925 "configure"
6926 #include "confdefs.h"
6928 /* Override any gcc2 internal prototype to avoid an error. */
6932 /* We use char because int might match the return type of a gcc2
6933 builtin and then its argument prototype would still apply. */
6943 rm -f conftest.$ac_objext conftest$ac_exeext
6944 if { (eval echo "$as_me:6944: \"$ac_link\"") >&5
6945 (eval $ac_link) 2>&5
6947 echo "$as_me:6947: \$? = $ac_status" >&5
6948 (exit $ac_status); } &&
6949 { ac_try='test -s conftest$ac_exeext'
6950 { (eval echo "$as_me:6950: \"$ac_try\"") >&5
6953 echo "$as_me:6953: \$? = $ac_status" >&5
6954 (exit $ac_status); }; }; then
6955 ac_cv_lib_gpm_initscr=yes
6957 echo "$as_me: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6959 ac_cv_lib_gpm_initscr=no
6961 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6962 LIBS=$ac_check_lib_save_LIBS
6964 echo "$as_me:6964: result: $ac_cv_lib_gpm_initscr" >&5
6965 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6966 if test $ac_cv_lib_gpm_initscr = yes; then
6967 LIBS="$cf_ncurses_SAVE"
6969 cf_ncurses_LIBS="-lgpm"
6976 # This is only necessary if you are linking against an obsolete
6977 # version of ncurses (but it should do no harm, since it's static).
6978 if test "$cf_nculib_root" = ncurses ; then
6979 echo "$as_me:6979: checking for tgoto in -lmytinfo" >&5
6980 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6981 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6984 ac_check_lib_save_LIBS=$LIBS
6985 LIBS="-lmytinfo $LIBS"
6986 cat >conftest.$ac_ext <<_ACEOF
6987 #line 6987 "configure"
6988 #include "confdefs.h"
6990 /* Override any gcc2 internal prototype to avoid an error. */
6994 /* We use char because int might match the return type of a gcc2
6995 builtin and then its argument prototype would still apply. */
7005 rm -f conftest.$ac_objext conftest$ac_exeext
7006 if { (eval echo "$as_me:7006: \"$ac_link\"") >&5
7007 (eval $ac_link) 2>&5
7009 echo "$as_me:7009: \$? = $ac_status" >&5
7010 (exit $ac_status); } &&
7011 { ac_try='test -s conftest$ac_exeext'
7012 { (eval echo "$as_me:7012: \"$ac_try\"") >&5
7015 echo "$as_me:7015: \$? = $ac_status" >&5
7016 (exit $ac_status); }; }; then
7017 ac_cv_lib_mytinfo_tgoto=yes
7019 echo "$as_me: failed program was:" >&5
7020 cat conftest.$ac_ext >&5
7021 ac_cv_lib_mytinfo_tgoto=no
7023 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7024 LIBS=$ac_check_lib_save_LIBS
7026 echo "$as_me:7026: result: $ac_cv_lib_mytinfo_tgoto" >&5
7027 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7028 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7029 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7036 cf_add_libs="$cf_ncurses_LIBS"
7037 # Filter out duplicates - this happens with badly-designed ".pc" files...
7038 for cf_add_1lib in $LIBS
7040 for cf_add_2lib in $cf_add_libs
7042 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7048 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7052 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7055 cf_add_libs="-l$cf_nculib_root"
7056 # Filter out duplicates - this happens with badly-designed ".pc" files...
7057 for cf_add_1lib in $LIBS
7059 for cf_add_2lib in $cf_add_libs
7061 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7067 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7073 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7075 echo "$as_me:7075: checking for initscr" >&5
7076 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7077 if test "${ac_cv_func_initscr+set}" = set; then
7078 echo $ECHO_N "(cached) $ECHO_C" >&6
7080 cat >conftest.$ac_ext <<_ACEOF
7081 #line 7081 "configure"
7082 #include "confdefs.h"
7083 /* System header to define __stub macros and hopefully few prototypes,
7084 which can conflict with char initscr (); below. */
7086 /* Override any gcc2 internal prototype to avoid an error. */
7090 /* We use char because int might match the return type of a gcc2
7091 builtin and then its argument prototype would still apply. */
7098 /* The GNU C library defines this for functions which it implements
7099 to always fail with ENOSYS. Some functions are actually named
7100 something starting with __ and the normal name is an alias. */
7101 #if defined (__stub_initscr) || defined (__stub___initscr)
7104 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7111 rm -f conftest.$ac_objext conftest$ac_exeext
7112 if { (eval echo "$as_me:7112: \"$ac_link\"") >&5
7113 (eval $ac_link) 2>&5
7115 echo "$as_me:7115: \$? = $ac_status" >&5
7116 (exit $ac_status); } &&
7117 { ac_try='test -s conftest$ac_exeext'
7118 { (eval echo "$as_me:7118: \"$ac_try\"") >&5
7121 echo "$as_me:7121: \$? = $ac_status" >&5
7122 (exit $ac_status); }; }; then
7123 ac_cv_func_initscr=yes
7125 echo "$as_me: failed program was:" >&5
7126 cat conftest.$ac_ext >&5
7127 ac_cv_func_initscr=no
7129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7131 echo "$as_me:7131: result: $ac_cv_func_initscr" >&5
7132 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7133 if test $ac_cv_func_initscr = yes; then
7134 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7137 cf_save_LIBS="$LIBS"
7138 echo "$as_me:7138: checking for initscr in -l$cf_nculib_root" >&5
7139 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7140 LIBS="-l$cf_nculib_root $LIBS"
7141 cat >conftest.$ac_ext <<_ACEOF
7142 #line 7142 "configure"
7143 #include "confdefs.h"
7144 #include <${cf_cv_ncurses_header:-curses.h}>
7153 rm -f conftest.$ac_objext conftest$ac_exeext
7154 if { (eval echo "$as_me:7154: \"$ac_link\"") >&5
7155 (eval $ac_link) 2>&5
7157 echo "$as_me:7157: \$? = $ac_status" >&5
7158 (exit $ac_status); } &&
7159 { ac_try='test -s conftest$ac_exeext'
7160 { (eval echo "$as_me:7160: \"$ac_try\"") >&5
7163 echo "$as_me:7163: \$? = $ac_status" >&5
7164 (exit $ac_status); }; }; then
7165 echo "$as_me:7165: result: yes" >&5
7166 echo "${ECHO_T}yes" >&6
7167 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7170 echo "$as_me: failed program was:" >&5
7171 cat conftest.$ac_ext >&5
7172 echo "$as_me:7172: result: no" >&5
7173 echo "${ECHO_T}no" >&6
7176 cf_library_path_list=""
7177 if test -n "${LDFLAGS}${LIBS}" ; then
7178 for cf_library_path in $LDFLAGS $LIBS
7180 case $cf_library_path in
7182 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7184 test "x$cf_library_path" != "xNONE" && \
7185 test -d "$cf_library_path" && \
7187 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7188 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7189 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7190 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7191 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7192 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"
7195 cf_library_path_list="$cf_library_path_list $cf_search"
7203 test "x$prefix" != "xNONE" && \
7204 test -d "$prefix" && \
7206 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7207 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7208 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7209 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7210 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7211 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7214 for cf_subdir_prefix in \
7223 test "x$cf_subdir_prefix" != "x$prefix" && \
7224 test -d "$cf_subdir_prefix" && \
7225 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7226 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7227 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7228 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7229 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7230 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7231 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"
7236 cf_search="$cf_library_path_list $cf_search"
7238 for cf_libdir in $cf_search
7240 echo "$as_me:7240: checking for -l$cf_nculib_root in $cf_libdir" >&5
7241 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7242 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7243 cat >conftest.$ac_ext <<_ACEOF
7244 #line 7244 "configure"
7245 #include "confdefs.h"
7246 #include <${cf_cv_ncurses_header:-curses.h}>
7255 rm -f conftest.$ac_objext conftest$ac_exeext
7256 if { (eval echo "$as_me:7256: \"$ac_link\"") >&5
7257 (eval $ac_link) 2>&5
7259 echo "$as_me:7259: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
7261 { ac_try='test -s conftest$ac_exeext'
7262 { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7265 echo "$as_me:7265: \$? = $ac_status" >&5
7266 (exit $ac_status); }; }; then
7267 echo "$as_me:7267: result: yes" >&5
7268 echo "${ECHO_T}yes" >&6
7269 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7272 echo "$as_me: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7274 echo "$as_me:7274: result: no" >&5
7275 echo "${ECHO_T}no" >&6
7276 LIBS="$cf_save_LIBS"
7278 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7286 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7288 if test $cf_found_library = no ; then
7289 { { echo "$as_me:7289: error: Cannot link $cf_nculib_root library" >&5
7290 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7291 { (exit 1); exit 1; }; }
7296 if test -n "$cf_ncurses_LIBS" ; then
7297 echo "$as_me:7297: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7298 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7299 cf_ncurses_SAVE="$LIBS"
7300 for p in $cf_ncurses_LIBS ; do
7301 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7302 if test "$q" != "$LIBS" ; then
7306 cat >conftest.$ac_ext <<_ACEOF
7307 #line 7307 "configure"
7308 #include "confdefs.h"
7309 #include <${cf_cv_ncurses_header:-curses.h}>
7313 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7318 rm -f conftest.$ac_objext conftest$ac_exeext
7319 if { (eval echo "$as_me:7319: \"$ac_link\"") >&5
7320 (eval $ac_link) 2>&5
7322 echo "$as_me:7322: \$? = $ac_status" >&5
7323 (exit $ac_status); } &&
7324 { ac_try='test -s conftest$ac_exeext'
7325 { (eval echo "$as_me:7325: \"$ac_try\"") >&5
7328 echo "$as_me:7328: \$? = $ac_status" >&5
7329 (exit $ac_status); }; }; then
7330 echo "$as_me:7330: result: yes" >&5
7331 echo "${ECHO_T}yes" >&6
7333 echo "$as_me: failed program was:" >&5
7334 cat conftest.$ac_ext >&5
7335 echo "$as_me:7335: result: no" >&5
7336 echo "${ECHO_T}no" >&6
7337 LIBS="$cf_ncurses_SAVE"
7339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7342 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7344 cat >>confdefs.h <<EOF
7345 #define $cf_nculib_ROOT 1
7355 cf_ncuconfig_root=ncurses
7356 cf_have_ncuconfig=no
7358 if test "x${PKG_CONFIG:=none}" != xnone; then
7359 echo "$as_me:7359: checking pkg-config for $cf_ncuconfig_root" >&5
7360 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7361 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7362 echo "$as_me:7362: result: yes" >&5
7363 echo "${ECHO_T}yes" >&6
7365 echo "$as_me:7365: checking if the $cf_ncuconfig_root package files work" >&5
7366 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7367 cf_have_ncuconfig=unknown
7369 cf_save_CPPFLAGS="$CPPFLAGS"
7370 cf_save_LIBS="$LIBS"
7372 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7374 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7375 # Filter out duplicates - this happens with badly-designed ".pc" files...
7376 for cf_add_1lib in $LIBS
7378 for cf_add_2lib in $cf_add_libs
7380 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7386 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7390 cat >conftest.$ac_ext <<_ACEOF
7391 #line 7391 "configure"
7392 #include "confdefs.h"
7393 #include <${cf_cv_ncurses_header:-curses.h}>
7397 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7402 rm -f conftest.$ac_objext conftest$ac_exeext
7403 if { (eval echo "$as_me:7403: \"$ac_link\"") >&5
7404 (eval $ac_link) 2>&5
7406 echo "$as_me:7406: \$? = $ac_status" >&5
7407 (exit $ac_status); } &&
7408 { ac_try='test -s conftest$ac_exeext'
7409 { (eval echo "$as_me:7409: \"$ac_try\"") >&5
7412 echo "$as_me:7412: \$? = $ac_status" >&5
7413 (exit $ac_status); }; }; then
7414 if test "$cross_compiling" = yes; then
7415 cf_have_ncuconfig=maybe
7417 cat >conftest.$ac_ext <<_ACEOF
7418 #line 7418 "configure"
7419 #include "confdefs.h"
7420 #include <${cf_cv_ncurses_header:-curses.h}>
7422 { char *xx = curses_version(); return (xx == 0); }
7424 rm -f conftest$ac_exeext
7425 if { (eval echo "$as_me:7425: \"$ac_link\"") >&5
7426 (eval $ac_link) 2>&5
7428 echo "$as_me:7428: \$? = $ac_status" >&5
7429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7430 { (eval echo "$as_me:7430: \"$ac_try\"") >&5
7433 echo "$as_me:7433: \$? = $ac_status" >&5
7434 (exit $ac_status); }; }; then
7435 cf_have_ncuconfig=yes
7437 echo "$as_me: program exited with status $ac_status" >&5
7438 echo "$as_me: failed program was:" >&5
7439 cat conftest.$ac_ext >&5
7440 cf_have_ncuconfig=no
7442 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7445 echo "$as_me: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7447 cf_have_ncuconfig=no
7449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7450 echo "$as_me:7450: result: $cf_have_ncuconfig" >&5
7451 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7452 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7453 if test "$cf_have_ncuconfig" != "yes"
7455 CPPFLAGS="$cf_save_CPPFLAGS"
7456 LIBS="$cf_save_LIBS"
7457 NCURSES_CONFIG_PKG=none
7460 cat >>confdefs.h <<\EOF
7464 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7468 echo "$as_me:7468: result: no" >&5
7469 echo "${ECHO_T}no" >&6
7470 NCURSES_CONFIG_PKG=none
7473 NCURSES_CONFIG_PKG=none
7476 if test "x$cf_have_ncuconfig" = "xno"; then
7477 echo "Looking for ${cf_ncuconfig_root}-config"
7479 if test -n "$ac_tool_prefix"; then
7480 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7482 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7483 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7484 echo "$as_me:7484: checking for $ac_word" >&5
7485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7486 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7487 echo $ECHO_N "(cached) $ECHO_C" >&6
7489 if test -n "$NCURSES_CONFIG"; then
7490 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7492 ac_save_IFS=$IFS; IFS=$ac_path_separator
7494 for ac_dir in $ac_dummy; do
7496 test -z "$ac_dir" && ac_dir=.
7497 $as_executable_p "$ac_dir/$ac_word" || continue
7498 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7499 echo "$as_me:7499: found $ac_dir/$ac_word" >&5
7505 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7506 if test -n "$NCURSES_CONFIG"; then
7507 echo "$as_me:7507: result: $NCURSES_CONFIG" >&5
7508 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7510 echo "$as_me:7510: result: no" >&5
7511 echo "${ECHO_T}no" >&6
7514 test -n "$NCURSES_CONFIG" && break
7517 if test -z "$NCURSES_CONFIG"; then
7518 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7519 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7521 # Extract the first word of "$ac_prog", so it can be a program name with args.
7522 set dummy $ac_prog; ac_word=$2
7523 echo "$as_me:7523: checking for $ac_word" >&5
7524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7525 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7526 echo $ECHO_N "(cached) $ECHO_C" >&6
7528 if test -n "$ac_ct_NCURSES_CONFIG"; then
7529 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7531 ac_save_IFS=$IFS; IFS=$ac_path_separator
7533 for ac_dir in $ac_dummy; do
7535 test -z "$ac_dir" && ac_dir=.
7536 $as_executable_p "$ac_dir/$ac_word" || continue
7537 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7538 echo "$as_me:7538: found $ac_dir/$ac_word" >&5
7544 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7545 if test -n "$ac_ct_NCURSES_CONFIG"; then
7546 echo "$as_me:7546: result: $ac_ct_NCURSES_CONFIG" >&5
7547 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7549 echo "$as_me:7549: result: no" >&5
7550 echo "${ECHO_T}no" >&6
7553 test -n "$ac_ct_NCURSES_CONFIG" && break
7555 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7557 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7560 if test "$NCURSES_CONFIG" != none ; then
7562 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7564 cf_add_libs="`$NCURSES_CONFIG --libs`"
7565 # Filter out duplicates - this happens with badly-designed ".pc" files...
7566 for cf_add_1lib in $LIBS
7568 for cf_add_2lib in $cf_add_libs
7570 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7576 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7580 # even with config script, some packages use no-override for curses.h
7582 echo "$as_me:7582: checking if we have identified curses headers" >&5
7583 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7584 if test "${cf_cv_ncurses_header+set}" = set; then
7585 echo $ECHO_N "(cached) $ECHO_C" >&6
7588 cf_cv_ncurses_header=none
7590 ncurses.h ncurses/ncurses.h \
7591 curses.h ncurses/curses.h
7593 cat >conftest.$ac_ext <<_ACEOF
7594 #line 7594 "configure"
7595 #include "confdefs.h"
7596 #include <${cf_header}>
7600 initscr(); tgoto("?", 0,0)
7605 rm -f conftest.$ac_objext
7606 if { (eval echo "$as_me:7606: \"$ac_compile\"") >&5
7607 (eval $ac_compile) 2>&5
7609 echo "$as_me:7609: \$? = $ac_status" >&5
7610 (exit $ac_status); } &&
7611 { ac_try='test -s conftest.$ac_objext'
7612 { (eval echo "$as_me:7612: \"$ac_try\"") >&5
7615 echo "$as_me:7615: \$? = $ac_status" >&5
7616 (exit $ac_status); }; }; then
7617 cf_cv_ncurses_header=$cf_header; break
7619 echo "$as_me: failed program was:" >&5
7620 cat conftest.$ac_ext >&5
7622 rm -f conftest.$ac_objext conftest.$ac_ext
7626 echo "$as_me:7626: result: $cf_cv_ncurses_header" >&5
7627 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7629 if test "$cf_cv_ncurses_header" = none ; then
7630 { { echo "$as_me:7630: error: No curses header-files found" >&5
7631 echo "$as_me: error: No curses header-files found" >&2;}
7632 { (exit 1); exit 1; }; }
7635 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7637 for ac_header in $cf_cv_ncurses_header
7639 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7640 echo "$as_me:7640: checking for $ac_header" >&5
7641 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7642 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7643 echo $ECHO_N "(cached) $ECHO_C" >&6
7645 cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648 #include <$ac_header>
7650 if { (eval echo "$as_me:7650: \"$ac_cpp conftest.$ac_ext\"") >&5
7651 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7653 egrep -v '^ *\+' conftest.er1 >conftest.err
7655 cat conftest.err >&5
7656 echo "$as_me:7656: \$? = $ac_status" >&5
7657 (exit $ac_status); } >/dev/null; then
7658 if test -s conftest.err; then
7659 ac_cpp_err=$ac_c_preproc_warn_flag
7666 if test -z "$ac_cpp_err"; then
7667 eval "$as_ac_Header=yes"
7669 echo "$as_me: failed program was:" >&5
7670 cat conftest.$ac_ext >&5
7671 eval "$as_ac_Header=no"
7673 rm -f conftest.err conftest.$ac_ext
7675 echo "$as_me:7675: result: `eval echo '${'$as_ac_Header'}'`" >&5
7676 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7677 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7678 cat >>confdefs.h <<EOF
7679 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7685 cat >>confdefs.h <<\EOF
7689 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7691 cat >>confdefs.h <<EOF
7692 #define $cf_nculib_ROOT 1
7695 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7699 cf_ncuhdr_root=ncurses
7701 test -n "$cf_cv_curses_dir" && \
7702 test "$cf_cv_curses_dir" != "no" && { \
7704 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7705 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7707 while test $cf_add_incdir != /usr/include
7709 if test -d $cf_add_incdir
7712 if test -n "$CFLAGS$CPPFLAGS" ; then
7713 # a loop is needed to ensure we can add subdirs of existing dirs
7714 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7715 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7716 cf_have_incdir=yes; break
7721 if test "$cf_have_incdir" = no ; then
7722 if test "$cf_add_incdir" = /usr/local/include ; then
7723 if test "$GCC" = yes
7725 cf_save_CPPFLAGS=$CPPFLAGS
7726 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7727 cat >conftest.$ac_ext <<_ACEOF
7728 #line 7728 "configure"
7729 #include "confdefs.h"
7739 rm -f conftest.$ac_objext
7740 if { (eval echo "$as_me:7740: \"$ac_compile\"") >&5
7741 (eval $ac_compile) 2>&5
7743 echo "$as_me:7743: \$? = $ac_status" >&5
7744 (exit $ac_status); } &&
7745 { ac_try='test -s conftest.$ac_objext'
7746 { (eval echo "$as_me:7746: \"$ac_try\"") >&5
7749 echo "$as_me:7749: \$? = $ac_status" >&5
7750 (exit $ac_status); }; }; then
7753 echo "$as_me: failed program was:" >&5
7754 cat conftest.$ac_ext >&5
7757 rm -f conftest.$ac_objext conftest.$ac_ext
7758 CPPFLAGS=$cf_save_CPPFLAGS
7763 if test "$cf_have_incdir" = no ; then
7764 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7766 echo "${as_me:-configure}:7766: testing adding $cf_add_incdir to include-path ..." 1>&5
7768 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7770 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7771 test "$cf_top_incdir" = "$cf_add_incdir" && break
7772 cf_add_incdir="$cf_top_incdir"
7785 echo "$as_me:7785: checking for $cf_ncuhdr_root header in include-path" >&5
7786 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7787 if test "${cf_cv_ncurses_h+set}" = set; then
7788 echo $ECHO_N "(cached) $ECHO_C" >&6
7791 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7792 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7793 for cf_header in $cf_header_list
7796 cat >conftest.$ac_ext <<_ACEOF
7797 #line 7797 "configure"
7798 #include "confdefs.h"
7800 #include <$cf_header>
7805 #ifdef NCURSES_VERSION
7807 printf("%s\n", NCURSES_VERSION);
7820 rm -f conftest.$ac_objext
7821 if { (eval echo "$as_me:7821: \"$ac_compile\"") >&5
7822 (eval $ac_compile) 2>&5
7824 echo "$as_me:7824: \$? = $ac_status" >&5
7825 (exit $ac_status); } &&
7826 { ac_try='test -s conftest.$ac_objext'
7827 { (eval echo "$as_me:7827: \"$ac_try\"") >&5
7830 echo "$as_me:7830: \$? = $ac_status" >&5
7831 (exit $ac_status); }; }; then
7832 cf_cv_ncurses_h=$cf_header
7835 echo "$as_me: failed program was:" >&5
7836 cat conftest.$ac_ext >&5
7839 rm -f conftest.$ac_objext conftest.$ac_ext
7841 test "$cf_cv_ncurses_h" != no && break
7845 echo "$as_me:7845: result: $cf_cv_ncurses_h" >&5
7846 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7848 if test "$cf_cv_ncurses_h" != no ; then
7849 cf_cv_ncurses_header=$cf_cv_ncurses_h
7852 echo "$as_me:7852: checking for $cf_ncuhdr_root include-path" >&5
7853 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7854 if test "${cf_cv_ncurses_h2+set}" = set; then
7855 echo $ECHO_N "(cached) $ECHO_C" >&6
7858 test -n "$verbose" && echo
7862 # collect the current set of include-directories from compiler flags
7863 cf_header_path_list=""
7864 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7865 for cf_header_path in $CPPFLAGS $CFLAGS
7867 case $cf_header_path in
7869 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7871 test "x$cf_header_path" != "xNONE" && \
7872 test -d "$cf_header_path" && \
7874 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7875 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7876 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7877 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7878 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7879 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"
7882 cf_header_path_list="$cf_header_path_list $cf_search"
7888 # add the variations for the package we are looking for
7892 test "x$prefix" != "xNONE" && \
7893 test -d "$prefix" && \
7895 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7896 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7897 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7898 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7899 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7900 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7903 for cf_subdir_prefix in \
7912 test "x$cf_subdir_prefix" != "x$prefix" && \
7913 test -d "$cf_subdir_prefix" && \
7914 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7915 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7916 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7917 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7918 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7919 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7920 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"
7925 test "$includedir" != NONE && \
7926 test "$includedir" != "/usr/include" && \
7927 test -d "$includedir" && {
7928 test -d $includedir && cf_search="$cf_search $includedir"
7929 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7932 test "$oldincludedir" != NONE && \
7933 test "$oldincludedir" != "/usr/include" && \
7934 test -d "$oldincludedir" && {
7935 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7936 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7939 cf_search="$cf_search $cf_header_path_list"
7941 test -n "$verbose" && echo search path $cf_search
7942 cf_save2_CPPFLAGS="$CPPFLAGS"
7943 for cf_incdir in $cf_search
7946 if test -n "$cf_incdir" ; then
7947 for cf_add_incdir in $cf_incdir
7949 while test $cf_add_incdir != /usr/include
7951 if test -d $cf_add_incdir
7954 if test -n "$CFLAGS$CPPFLAGS" ; then
7955 # a loop is needed to ensure we can add subdirs of existing dirs
7956 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7957 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7958 cf_have_incdir=yes; break
7963 if test "$cf_have_incdir" = no ; then
7964 if test "$cf_add_incdir" = /usr/local/include ; then
7965 if test "$GCC" = yes
7967 cf_save_CPPFLAGS=$CPPFLAGS
7968 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7969 cat >conftest.$ac_ext <<_ACEOF
7970 #line 7970 "configure"
7971 #include "confdefs.h"
7981 rm -f conftest.$ac_objext
7982 if { (eval echo "$as_me:7982: \"$ac_compile\"") >&5
7983 (eval $ac_compile) 2>&5
7985 echo "$as_me:7985: \$? = $ac_status" >&5
7986 (exit $ac_status); } &&
7987 { ac_try='test -s conftest.$ac_objext'
7988 { (eval echo "$as_me:7988: \"$ac_try\"") >&5
7991 echo "$as_me:7991: \$? = $ac_status" >&5
7992 (exit $ac_status); }; }; then
7995 echo "$as_me: failed program was:" >&5
7996 cat conftest.$ac_ext >&5
7999 rm -f conftest.$ac_objext conftest.$ac_ext
8000 CPPFLAGS=$cf_save_CPPFLAGS
8005 if test "$cf_have_incdir" = no ; then
8006 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8008 echo "${as_me:-configure}:8008: testing adding $cf_add_incdir to include-path ..." 1>&5
8010 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8012 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8013 test "$cf_top_incdir" = "$cf_add_incdir" && break
8014 cf_add_incdir="$cf_top_incdir"
8030 cat >conftest.$ac_ext <<_ACEOF
8031 #line 8031 "configure"
8032 #include "confdefs.h"
8034 #include <$cf_header>
8039 #ifdef NCURSES_VERSION
8041 printf("%s\n", NCURSES_VERSION);
8054 rm -f conftest.$ac_objext
8055 if { (eval echo "$as_me:8055: \"$ac_compile\"") >&5
8056 (eval $ac_compile) 2>&5
8058 echo "$as_me:8058: \$? = $ac_status" >&5
8059 (exit $ac_status); } &&
8060 { ac_try='test -s conftest.$ac_objext'
8061 { (eval echo "$as_me:8061: \"$ac_try\"") >&5
8064 echo "$as_me:8064: \$? = $ac_status" >&5
8065 (exit $ac_status); }; }; then
8066 cf_cv_ncurses_h2=$cf_header
8069 echo "$as_me: failed program was:" >&5
8070 cat conftest.$ac_ext >&5
8073 rm -f conftest.$ac_objext conftest.$ac_ext
8075 if test "$cf_cv_ncurses_h2" != no ; then
8076 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8077 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8080 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8082 CPPFLAGS="$cf_save2_CPPFLAGS"
8083 test "$cf_cv_ncurses_h2" != no && break
8085 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8085: error: not found" >&5
8086 echo "$as_me: error: not found" >&2;}
8087 { (exit 1); exit 1; }; }
8090 echo "$as_me:8090: result: $cf_cv_ncurses_h2" >&5
8091 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8093 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8094 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8095 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8096 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8099 if test -n "$cf_1st_incdir" ; then
8100 for cf_add_incdir in $cf_1st_incdir
8102 while test $cf_add_incdir != /usr/include
8104 if test -d $cf_add_incdir
8107 if test -n "$CFLAGS$CPPFLAGS" ; then
8108 # a loop is needed to ensure we can add subdirs of existing dirs
8109 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8110 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8111 cf_have_incdir=yes; break
8116 if test "$cf_have_incdir" = no ; then
8117 if test "$cf_add_incdir" = /usr/local/include ; then
8118 if test "$GCC" = yes
8120 cf_save_CPPFLAGS=$CPPFLAGS
8121 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8122 cat >conftest.$ac_ext <<_ACEOF
8123 #line 8123 "configure"
8124 #include "confdefs.h"
8134 rm -f conftest.$ac_objext
8135 if { (eval echo "$as_me:8135: \"$ac_compile\"") >&5
8136 (eval $ac_compile) 2>&5
8138 echo "$as_me:8138: \$? = $ac_status" >&5
8139 (exit $ac_status); } &&
8140 { ac_try='test -s conftest.$ac_objext'
8141 { (eval echo "$as_me:8141: \"$ac_try\"") >&5
8144 echo "$as_me:8144: \$? = $ac_status" >&5
8145 (exit $ac_status); }; }; then
8148 echo "$as_me: failed program was:" >&5
8149 cat conftest.$ac_ext >&5
8152 rm -f conftest.$ac_objext conftest.$ac_ext
8153 CPPFLAGS=$cf_save_CPPFLAGS
8158 if test "$cf_have_incdir" = no ; then
8159 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8161 echo "${as_me:-configure}:8161: testing adding $cf_add_incdir to include-path ..." 1>&5
8163 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8165 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8166 test "$cf_top_incdir" = "$cf_add_incdir" && break
8167 cf_add_incdir="$cf_top_incdir"
8180 # Set definitions to allow ifdef'ing for ncurses.h
8182 case $cf_cv_ncurses_header in
8185 cat >>confdefs.h <<\EOF
8186 #define HAVE_NCURSES_H 1
8192 case $cf_cv_ncurses_header in
8193 (ncurses/curses.h|ncurses/ncurses.h)
8195 cat >>confdefs.h <<\EOF
8196 #define HAVE_NCURSES_NCURSES_H 1
8200 (ncursesw/curses.h|ncursesw/ncurses.h)
8202 cat >>confdefs.h <<\EOF
8203 #define HAVE_NCURSESW_NCURSES_H 1
8209 echo "$as_me:8209: checking for terminfo header" >&5
8210 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8211 if test "${cf_cv_term_header+set}" = set; then
8212 echo $ECHO_N "(cached) $ECHO_C" >&6
8215 case ${cf_cv_ncurses_header} in
8216 (*/ncurses.h|*/ncursesw.h)
8217 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8220 cf_term_header=term.h
8224 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8226 cat >conftest.$ac_ext <<_ACEOF
8227 #line 8227 "configure"
8228 #include "confdefs.h"
8230 #include <${cf_cv_ncurses_header:-curses.h}>
8236 int x = auto_left_margin
8241 rm -f conftest.$ac_objext
8242 if { (eval echo "$as_me:8242: \"$ac_compile\"") >&5
8243 (eval $ac_compile) 2>&5
8245 echo "$as_me:8245: \$? = $ac_status" >&5
8246 (exit $ac_status); } &&
8247 { ac_try='test -s conftest.$ac_objext'
8248 { (eval echo "$as_me:8248: \"$ac_try\"") >&5
8251 echo "$as_me:8251: \$? = $ac_status" >&5
8252 (exit $ac_status); }; }; then
8254 cf_cv_term_header="$cf_test"
8256 echo "$as_me: failed program was:" >&5
8257 cat conftest.$ac_ext >&5
8259 cf_cv_term_header=unknown
8262 rm -f conftest.$ac_objext conftest.$ac_ext
8263 test "$cf_cv_term_header" != unknown && break
8267 echo "$as_me:8267: result: $cf_cv_term_header" >&5
8268 echo "${ECHO_T}$cf_cv_term_header" >&6
8270 # Set definitions to allow ifdef'ing to accommodate subdirectories
8272 case $cf_cv_term_header in
8275 cat >>confdefs.h <<\EOF
8276 #define HAVE_TERM_H 1
8282 case $cf_cv_term_header in
8285 cat >>confdefs.h <<\EOF
8286 #define HAVE_NCURSES_TERM_H 1
8292 cat >>confdefs.h <<\EOF
8293 #define HAVE_NCURSESW_TERM_H 1
8299 # some applications need this, but should check for NCURSES_VERSION
8301 cat >>confdefs.h <<\EOF
8305 echo "$as_me:8305: checking for ncurses version" >&5
8306 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8307 if test "${cf_cv_ncurses_version+set}" = set; then
8308 echo $ECHO_N "(cached) $ECHO_C" >&6
8311 cf_cv_ncurses_version=no
8314 if test "$cross_compiling" = yes; then
8316 # This will not work if the preprocessor splits the line after the
8317 # Autoconf token. The 'unproto' program does that.
8318 cat > conftest.$ac_ext <<EOF
8319 #include <${cf_cv_ncurses_header:-curses.h}>
8321 #ifdef NCURSES_VERSION
8322 Autoconf NCURSES_VERSION
8330 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8331 { (eval echo "$as_me:8331: \"$cf_try\"") >&5
8334 echo "$as_me:8334: \$? = $ac_status" >&5
8335 (exit $ac_status); }
8336 if test -f conftest.out ; then
8337 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8338 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8343 cat >conftest.$ac_ext <<_ACEOF
8344 #line 8344 "configure"
8345 #include "confdefs.h"
8347 #include <${cf_cv_ncurses_header:-curses.h}>
8351 FILE *fp = fopen("$cf_tempfile", "w");
8352 #ifdef NCURSES_VERSION
8353 # ifdef NCURSES_VERSION_PATCH
8354 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8356 fprintf(fp, "%s\n", NCURSES_VERSION);
8360 fprintf(fp, "old\n");
8365 ${cf_cv_main_return:-return}(0);
8368 rm -f conftest$ac_exeext
8369 if { (eval echo "$as_me:8369: \"$ac_link\"") >&5
8370 (eval $ac_link) 2>&5
8372 echo "$as_me:8372: \$? = $ac_status" >&5
8373 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8374 { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8377 echo "$as_me:8377: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8380 cf_cv_ncurses_version=`cat $cf_tempfile`
8382 echo "$as_me: program exited with status $ac_status" >&5
8383 echo "$as_me: failed program was:" >&5
8384 cat conftest.$ac_ext >&5
8386 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8391 echo "$as_me:8391: result: $cf_cv_ncurses_version" >&5
8392 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8393 test "$cf_cv_ncurses_version" = no ||
8394 cat >>confdefs.h <<\EOF
8398 cf_nculib_root=ncurses
8399 # This works, except for the special case where we find gpm, but
8400 # ncurses is in a nonstandard location via $LIBS, and we really want
8403 cf_ncurses_SAVE="$LIBS"
8404 echo "$as_me:8404: checking for Gpm_Open in -lgpm" >&5
8405 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8406 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8407 echo $ECHO_N "(cached) $ECHO_C" >&6
8409 ac_check_lib_save_LIBS=$LIBS
8411 cat >conftest.$ac_ext <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8415 /* Override any gcc2 internal prototype to avoid an error. */
8419 /* We use char because int might match the return type of a gcc2
8420 builtin and then its argument prototype would still apply. */
8430 rm -f conftest.$ac_objext conftest$ac_exeext
8431 if { (eval echo "$as_me:8431: \"$ac_link\"") >&5
8432 (eval $ac_link) 2>&5
8434 echo "$as_me:8434: \$? = $ac_status" >&5
8435 (exit $ac_status); } &&
8436 { ac_try='test -s conftest$ac_exeext'
8437 { (eval echo "$as_me:8437: \"$ac_try\"") >&5
8440 echo "$as_me:8440: \$? = $ac_status" >&5
8441 (exit $ac_status); }; }; then
8442 ac_cv_lib_gpm_Gpm_Open=yes
8444 echo "$as_me: failed program was:" >&5
8445 cat conftest.$ac_ext >&5
8446 ac_cv_lib_gpm_Gpm_Open=no
8448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8449 LIBS=$ac_check_lib_save_LIBS
8451 echo "$as_me:8451: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8452 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8453 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8454 echo "$as_me:8454: checking for initscr in -lgpm" >&5
8455 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8456 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8457 echo $ECHO_N "(cached) $ECHO_C" >&6
8459 ac_check_lib_save_LIBS=$LIBS
8461 cat >conftest.$ac_ext <<_ACEOF
8462 #line 8462 "configure"
8463 #include "confdefs.h"
8465 /* Override any gcc2 internal prototype to avoid an error. */
8469 /* We use char because int might match the return type of a gcc2
8470 builtin and then its argument prototype would still apply. */
8480 rm -f conftest.$ac_objext conftest$ac_exeext
8481 if { (eval echo "$as_me:8481: \"$ac_link\"") >&5
8482 (eval $ac_link) 2>&5
8484 echo "$as_me:8484: \$? = $ac_status" >&5
8485 (exit $ac_status); } &&
8486 { ac_try='test -s conftest$ac_exeext'
8487 { (eval echo "$as_me:8487: \"$ac_try\"") >&5
8490 echo "$as_me:8490: \$? = $ac_status" >&5
8491 (exit $ac_status); }; }; then
8492 ac_cv_lib_gpm_initscr=yes
8494 echo "$as_me: failed program was:" >&5
8495 cat conftest.$ac_ext >&5
8496 ac_cv_lib_gpm_initscr=no
8498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8499 LIBS=$ac_check_lib_save_LIBS
8501 echo "$as_me:8501: result: $ac_cv_lib_gpm_initscr" >&5
8502 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8503 if test $ac_cv_lib_gpm_initscr = yes; then
8504 LIBS="$cf_ncurses_SAVE"
8506 cf_ncurses_LIBS="-lgpm"
8513 # This is only necessary if you are linking against an obsolete
8514 # version of ncurses (but it should do no harm, since it's static).
8515 if test "$cf_nculib_root" = ncurses ; then
8516 echo "$as_me:8516: checking for tgoto in -lmytinfo" >&5
8517 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8518 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8519 echo $ECHO_N "(cached) $ECHO_C" >&6
8521 ac_check_lib_save_LIBS=$LIBS
8522 LIBS="-lmytinfo $LIBS"
8523 cat >conftest.$ac_ext <<_ACEOF
8524 #line 8524 "configure"
8525 #include "confdefs.h"
8527 /* Override any gcc2 internal prototype to avoid an error. */
8531 /* We use char because int might match the return type of a gcc2
8532 builtin and then its argument prototype would still apply. */
8542 rm -f conftest.$ac_objext conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544 (eval $ac_link) 2>&5
8546 echo "$as_me:8546: \$? = $ac_status" >&5
8547 (exit $ac_status); } &&
8548 { ac_try='test -s conftest$ac_exeext'
8549 { (eval echo "$as_me:8549: \"$ac_try\"") >&5
8552 echo "$as_me:8552: \$? = $ac_status" >&5
8553 (exit $ac_status); }; }; then
8554 ac_cv_lib_mytinfo_tgoto=yes
8556 echo "$as_me: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558 ac_cv_lib_mytinfo_tgoto=no
8560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8561 LIBS=$ac_check_lib_save_LIBS
8563 echo "$as_me:8563: result: $ac_cv_lib_mytinfo_tgoto" >&5
8564 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8565 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8566 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8573 cf_add_libs="$cf_ncurses_LIBS"
8574 # Filter out duplicates - this happens with badly-designed ".pc" files...
8575 for cf_add_1lib in $LIBS
8577 for cf_add_2lib in $cf_add_libs
8579 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8585 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8589 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8592 cf_add_libs="-l$cf_nculib_root"
8593 # Filter out duplicates - this happens with badly-designed ".pc" files...
8594 for cf_add_1lib in $LIBS
8596 for cf_add_2lib in $cf_add_libs
8598 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8604 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8610 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8612 echo "$as_me:8612: checking for initscr" >&5
8613 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8614 if test "${ac_cv_func_initscr+set}" = set; then
8615 echo $ECHO_N "(cached) $ECHO_C" >&6
8617 cat >conftest.$ac_ext <<_ACEOF
8618 #line 8618 "configure"
8619 #include "confdefs.h"
8620 /* System header to define __stub macros and hopefully few prototypes,
8621 which can conflict with char initscr (); below. */
8623 /* Override any gcc2 internal prototype to avoid an error. */
8627 /* We use char because int might match the return type of a gcc2
8628 builtin and then its argument prototype would still apply. */
8635 /* The GNU C library defines this for functions which it implements
8636 to always fail with ENOSYS. Some functions are actually named
8637 something starting with __ and the normal name is an alias. */
8638 #if defined (__stub_initscr) || defined (__stub___initscr)
8641 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8648 rm -f conftest.$ac_objext conftest$ac_exeext
8649 if { (eval echo "$as_me:8649: \"$ac_link\"") >&5
8650 (eval $ac_link) 2>&5
8652 echo "$as_me:8652: \$? = $ac_status" >&5
8653 (exit $ac_status); } &&
8654 { ac_try='test -s conftest$ac_exeext'
8655 { (eval echo "$as_me:8655: \"$ac_try\"") >&5
8658 echo "$as_me:8658: \$? = $ac_status" >&5
8659 (exit $ac_status); }; }; then
8660 ac_cv_func_initscr=yes
8662 echo "$as_me: failed program was:" >&5
8663 cat conftest.$ac_ext >&5
8664 ac_cv_func_initscr=no
8666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8668 echo "$as_me:8668: result: $ac_cv_func_initscr" >&5
8669 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8670 if test $ac_cv_func_initscr = yes; then
8671 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8674 cf_save_LIBS="$LIBS"
8675 echo "$as_me:8675: checking for initscr in -l$cf_nculib_root" >&5
8676 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8677 LIBS="-l$cf_nculib_root $LIBS"
8678 cat >conftest.$ac_ext <<_ACEOF
8679 #line 8679 "configure"
8680 #include "confdefs.h"
8681 #include <${cf_cv_ncurses_header:-curses.h}>
8690 rm -f conftest.$ac_objext conftest$ac_exeext
8691 if { (eval echo "$as_me:8691: \"$ac_link\"") >&5
8692 (eval $ac_link) 2>&5
8694 echo "$as_me:8694: \$? = $ac_status" >&5
8695 (exit $ac_status); } &&
8696 { ac_try='test -s conftest$ac_exeext'
8697 { (eval echo "$as_me:8697: \"$ac_try\"") >&5
8700 echo "$as_me:8700: \$? = $ac_status" >&5
8701 (exit $ac_status); }; }; then
8702 echo "$as_me:8702: result: yes" >&5
8703 echo "${ECHO_T}yes" >&6
8704 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8707 echo "$as_me: failed program was:" >&5
8708 cat conftest.$ac_ext >&5
8709 echo "$as_me:8709: result: no" >&5
8710 echo "${ECHO_T}no" >&6
8713 cf_library_path_list=""
8714 if test -n "${LDFLAGS}${LIBS}" ; then
8715 for cf_library_path in $LDFLAGS $LIBS
8717 case $cf_library_path in
8719 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8721 test "x$cf_library_path" != "xNONE" && \
8722 test -d "$cf_library_path" && \
8724 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8725 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8726 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8727 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8728 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8729 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"
8732 cf_library_path_list="$cf_library_path_list $cf_search"
8740 test "x$prefix" != "xNONE" && \
8741 test -d "$prefix" && \
8743 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8744 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8745 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8746 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8747 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8748 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8751 for cf_subdir_prefix in \
8760 test "x$cf_subdir_prefix" != "x$prefix" && \
8761 test -d "$cf_subdir_prefix" && \
8762 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8763 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8764 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8765 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8766 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8767 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8768 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"
8773 cf_search="$cf_library_path_list $cf_search"
8775 for cf_libdir in $cf_search
8777 echo "$as_me:8777: checking for -l$cf_nculib_root in $cf_libdir" >&5
8778 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8779 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8780 cat >conftest.$ac_ext <<_ACEOF
8781 #line 8781 "configure"
8782 #include "confdefs.h"
8783 #include <${cf_cv_ncurses_header:-curses.h}>
8792 rm -f conftest.$ac_objext conftest$ac_exeext
8793 if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
8794 (eval $ac_link) 2>&5
8796 echo "$as_me:8796: \$? = $ac_status" >&5
8797 (exit $ac_status); } &&
8798 { ac_try='test -s conftest$ac_exeext'
8799 { (eval echo "$as_me:8799: \"$ac_try\"") >&5
8802 echo "$as_me:8802: \$? = $ac_status" >&5
8803 (exit $ac_status); }; }; then
8804 echo "$as_me:8804: result: yes" >&5
8805 echo "${ECHO_T}yes" >&6
8806 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8809 echo "$as_me: failed program was:" >&5
8810 cat conftest.$ac_ext >&5
8811 echo "$as_me:8811: result: no" >&5
8812 echo "${ECHO_T}no" >&6
8813 LIBS="$cf_save_LIBS"
8815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8823 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8825 if test $cf_found_library = no ; then
8826 { { echo "$as_me:8826: error: Cannot link $cf_nculib_root library" >&5
8827 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8828 { (exit 1); exit 1; }; }
8833 if test -n "$cf_ncurses_LIBS" ; then
8834 echo "$as_me:8834: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8835 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8836 cf_ncurses_SAVE="$LIBS"
8837 for p in $cf_ncurses_LIBS ; do
8838 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8839 if test "$q" != "$LIBS" ; then
8843 cat >conftest.$ac_ext <<_ACEOF
8844 #line 8844 "configure"
8845 #include "confdefs.h"
8846 #include <${cf_cv_ncurses_header:-curses.h}>
8850 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8855 rm -f conftest.$ac_objext conftest$ac_exeext
8856 if { (eval echo "$as_me:8856: \"$ac_link\"") >&5
8857 (eval $ac_link) 2>&5
8859 echo "$as_me:8859: \$? = $ac_status" >&5
8860 (exit $ac_status); } &&
8861 { ac_try='test -s conftest$ac_exeext'
8862 { (eval echo "$as_me:8862: \"$ac_try\"") >&5
8865 echo "$as_me:8865: \$? = $ac_status" >&5
8866 (exit $ac_status); }; }; then
8867 echo "$as_me:8867: result: yes" >&5
8868 echo "${ECHO_T}yes" >&6
8870 echo "$as_me: failed program was:" >&5
8871 cat conftest.$ac_ext >&5
8872 echo "$as_me:8872: result: no" >&5
8873 echo "${ECHO_T}no" >&6
8874 LIBS="$cf_ncurses_SAVE"
8876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8879 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8881 cat >>confdefs.h <<EOF
8882 #define $cf_nculib_ROOT 1
8892 if test "$NCURSES_CONFIG_PKG" != none ; then
8893 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
8895 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8896 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8897 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8899 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
8900 if test -z "$cf_cv_abi_version"
8902 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
8905 elif test "$NCURSES_CONFIG" != none ; then
8907 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
8909 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8910 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8911 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8913 # ABI version is not available from headers
8914 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
8918 for cf_name in MAJOR MINOR PATCH
8920 cat >conftest.$ac_ext <<CF_EOF
8921 #include <${cf_cv_ncurses_header:-curses.h}>
8922 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
8924 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
8925 { (eval echo "$as_me:8925: \"$cf_try\"") >&5
8928 echo "$as_me:8928: \$? = $ac_status" >&5
8929 (exit $ac_status); }
8930 if test -f conftest.out ; then
8931 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
8932 eval NCURSES_$cf_name=\"$cf_result\"
8933 # cat conftest.$ac_ext
8938 cf_cv_abi_version=${NCURSES_MAJOR}
8942 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
8944 cf_cv_timestamp=`date`
8946 echo "$as_me:8946: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
8947 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
8949 echo "$as_me:8949: checking if you want to have a library-prefix" >&5
8950 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
8952 # Check whether --with-lib-prefix or --without-lib-prefix was given.
8953 if test "${with_lib_prefix+set}" = set; then
8954 withval="$with_lib_prefix"
8955 with_lib_prefix=$withval
8957 with_lib_prefix=auto
8959 echo "$as_me:8959: result: $with_lib_prefix" >&5
8960 echo "${ECHO_T}$with_lib_prefix" >&6
8962 if test $with_lib_prefix = auto
8965 case $cf_cv_system_name in
8967 if test "$DFT_LWR_MODEL" = libtool; then
8973 (*) LIB_PREFIX='lib'
8976 cf_prefix=$LIB_PREFIX
8978 elif test $with_lib_prefix = no
8982 LIB_PREFIX=$with_lib_prefix
8987 ###############################################################################
8989 if test X"$CC_G_OPT" = X"" ; then
8991 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
8994 echo "$as_me:8994: checking for default loader flags" >&5
8995 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
8996 case $DFT_LWR_MODEL in
8997 (normal) LD_MODEL='' ;;
8998 (debug) LD_MODEL=$CC_G_OPT ;;
8999 (profile) LD_MODEL='-pg';;
9000 (shared) LD_MODEL='' ;;
9002 echo "$as_me:9002: result: $LD_MODEL" >&5
9003 echo "${ECHO_T}$LD_MODEL" >&6
9006 echo "$as_me:9006: checking for an rpath option" >&5
9007 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
9008 case $cf_cv_system_name in
9010 if test "$GCC" = yes; then
9011 LD_RPATH_OPT="-Wl,-rpath,"
9013 LD_RPATH_OPT="-rpath "
9016 (linux*|gnu*|k*bsd*-gnu|freebsd*)
9017 LD_RPATH_OPT="-Wl,-rpath,"
9019 (openbsd[2-9].*|mirbsd*)
9020 LD_RPATH_OPT="-Wl,-rpath,"
9023 LD_RPATH_OPT="-rpath "
9026 LD_RPATH_OPT="-Wl,-rpath,"
9029 LD_RPATH_OPT="-rpath "
9037 echo "$as_me:9037: result: $LD_RPATH_OPT" >&5
9038 echo "${ECHO_T}$LD_RPATH_OPT" >&6
9040 case "x$LD_RPATH_OPT" in
9042 echo "$as_me:9042: checking if we need a space after rpath option" >&5
9043 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9044 cf_save_LIBS="$LIBS"
9046 cf_add_libs="${LD_RPATH_OPT}$libdir"
9047 # Filter out duplicates - this happens with badly-designed ".pc" files...
9048 for cf_add_1lib in $LIBS
9050 for cf_add_2lib in $cf_add_libs
9052 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9058 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9062 cat >conftest.$ac_ext <<_ACEOF
9063 #line 9063 "configure"
9064 #include "confdefs.h"
9074 rm -f conftest.$ac_objext conftest$ac_exeext
9075 if { (eval echo "$as_me:9075: \"$ac_link\"") >&5
9076 (eval $ac_link) 2>&5
9078 echo "$as_me:9078: \$? = $ac_status" >&5
9079 (exit $ac_status); } &&
9080 { ac_try='test -s conftest$ac_exeext'
9081 { (eval echo "$as_me:9081: \"$ac_try\"") >&5
9084 echo "$as_me:9084: \$? = $ac_status" >&5
9085 (exit $ac_status); }; }; then
9088 echo "$as_me: failed program was:" >&5
9089 cat conftest.$ac_ext >&5
9092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9093 LIBS="$cf_save_LIBS"
9094 echo "$as_me:9094: result: $cf_rpath_space" >&5
9095 echo "${ECHO_T}$cf_rpath_space" >&6
9096 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9104 INSTALL_LIB="-m 644"
9105 : ${rel_builddir:=.}
9111 cf_cv_do_symlinks=no
9113 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9115 echo "$as_me:9115: checking if release/abi version should be used for shared libs" >&5
9116 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9118 # Check whether --with-shlib-version or --without-shlib-version was given.
9119 if test "${with_shlib_version+set}" = set; then
9120 withval="$with_shlib_version"
9121 test -z "$withval" && withval=auto
9124 cf_cv_shlib_version=auto
9127 cf_cv_shlib_version=$withval
9130 echo "$as_me:9130: result: $withval" >&5
9131 echo "${ECHO_T}$withval" >&6
9132 { { echo "$as_me:9132: error: option value must be one of: rel, abi, or auto" >&5
9133 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
9134 { (exit 1); exit 1; }; }
9139 cf_cv_shlib_version=auto
9141 echo "$as_me:9141: result: $cf_cv_shlib_version" >&5
9142 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9147 # Some less-capable ports of gcc support only -fpic
9149 if test "$GCC" = yes
9151 echo "$as_me:9151: checking which $CC option to use" >&5
9152 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9153 cf_save_CFLAGS="$CFLAGS"
9154 for CC_SHARED_OPTS in -fPIC -fpic ''
9156 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9157 cat >conftest.$ac_ext <<_ACEOF
9158 #line 9158 "configure"
9159 #include "confdefs.h"
9169 rm -f conftest.$ac_objext
9170 if { (eval echo "$as_me:9170: \"$ac_compile\"") >&5
9171 (eval $ac_compile) 2>&5
9173 echo "$as_me:9173: \$? = $ac_status" >&5
9174 (exit $ac_status); } &&
9175 { ac_try='test -s conftest.$ac_objext'
9176 { (eval echo "$as_me:9176: \"$ac_try\"") >&5
9179 echo "$as_me:9179: \$? = $ac_status" >&5
9180 (exit $ac_status); }; }; then
9183 echo "$as_me: failed program was:" >&5
9184 cat conftest.$ac_ext >&5
9186 rm -f conftest.$ac_objext conftest.$ac_ext
9188 echo "$as_me:9188: result: $CC_SHARED_OPTS" >&5
9189 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9190 CFLAGS="$cf_save_CFLAGS"
9193 cf_cv_shlib_version_infix=no
9195 case $cf_cv_system_name in
9196 (aix4.3-9*|aix[5-7]*)
9197 if test "$GCC" = yes; then
9198 CC_SHARED_OPTS='-Wl,-brtl'
9199 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9201 CC_SHARED_OPTS='-brtl'
9202 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9203 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9207 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9211 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9212 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9213 cf_cv_shlib_version=cygdll
9214 cf_cv_shlib_version_infix=cygdll
9217 cat >mk_shared_lib.sh <<-CF_EOF
9220 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9223 Linking shared library
9224 ** SHARED_LIB \$SHARED_LIB
9225 ** IMPORT_LIB \$IMPORT_LIB
9227 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9229 chmod +x mk_shared_lib.sh
9233 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9234 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9235 cf_cv_shlib_version=msysdll
9236 cf_cv_shlib_version_infix=msysdll
9239 cat >mk_shared_lib.sh <<-CF_EOF
9242 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9245 Linking shared library
9246 ** SHARED_LIB \$SHARED_LIB
9247 ** IMPORT_LIB \$IMPORT_LIB
9249 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9251 chmod +x mk_shared_lib.sh
9254 cf_try_cflags="no-cpp-precomp"
9255 CC_SHARED_OPTS="-dynamic"
9256 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9257 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9258 cf_cv_shlib_version_infix=yes
9259 echo "$as_me:9259: checking if ld -search_paths_first works" >&5
9260 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9261 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9262 echo $ECHO_N "(cached) $ECHO_C" >&6
9265 cf_save_LDFLAGS=$LDFLAGS
9266 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9267 cat >conftest.$ac_ext <<_ACEOF
9268 #line 9268 "configure"
9269 #include "confdefs.h"
9279 rm -f conftest.$ac_objext conftest$ac_exeext
9280 if { (eval echo "$as_me:9280: \"$ac_link\"") >&5
9281 (eval $ac_link) 2>&5
9283 echo "$as_me:9283: \$? = $ac_status" >&5
9284 (exit $ac_status); } &&
9285 { ac_try='test -s conftest$ac_exeext'
9286 { (eval echo "$as_me:9286: \"$ac_try\"") >&5
9289 echo "$as_me:9289: \$? = $ac_status" >&5
9290 (exit $ac_status); }; }; then
9291 cf_cv_ldflags_search_paths_first=yes
9293 echo "$as_me: failed program was:" >&5
9294 cat conftest.$ac_ext >&5
9295 cf_cv_ldflags_search_paths_first=no
9297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9298 LDFLAGS=$cf_save_LDFLAGS
9300 echo "$as_me:9300: result: $cf_cv_ldflags_search_paths_first" >&5
9301 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9302 if test $cf_cv_ldflags_search_paths_first = yes; then
9303 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9307 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9308 if test "$GCC" != yes; then
9311 MK_SHARED_LIB='${LD} -b -o $@'
9312 INSTALL_LIB="-m 555"
9315 # (tested with gcc 2.7.2 -- I don't have c89)
9316 if test "$GCC" = yes; then
9317 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9320 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9322 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9323 # HP-UX shared libraries must be executable, and should be
9324 # readonly to exploit a quirk in the memory manager.
9325 INSTALL_LIB="-m 555"
9328 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9329 if test "$cf_cv_shlib_version" = rel; then
9330 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
9332 cf_shared_soname='`basename `'
9335 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9338 if test "$cf_cv_enable_rpath" = yes ; then
9339 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9341 # tested with IRIX 5.2 and 'cc'.
9342 if test "$GCC" != yes; then
9343 CC_SHARED_OPTS='-KPIC'
9344 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9346 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9348 cf_cv_rm_so_locs=yes
9350 (linux*|gnu*|k*bsd*-gnu)
9351 if test "$DFT_LWR_MODEL" = "shared" ; then
9352 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9353 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9355 if test "$cf_cv_enable_rpath" = yes ; then
9356 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9359 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9360 if test "$cf_cv_shlib_version" = rel; then
9361 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9363 cf_cv_shared_soname='`basename $@`'
9366 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9369 cf_cv_shlib_version=mingw
9370 cf_cv_shlib_version_infix=mingw
9373 if test "$DFT_LWR_MODEL" = "shared" ; then
9374 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9375 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9376 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9379 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9380 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9381 cat >mk_shared_lib.sh <<-CF_EOF
9384 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9387 Linking shared library
9388 ** SHARED_LIB \$SHARED_LIB
9389 ** IMPORT_LIB \$IMPORT_LIB
9391 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9393 chmod +x mk_shared_lib.sh
9395 (openbsd[2-9].*|mirbsd*)
9396 if test "$DFT_LWR_MODEL" = "shared" ; then
9397 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9398 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9400 if test "$cf_cv_enable_rpath" = yes ; then
9401 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9403 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9405 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9406 if test "$cf_cv_shlib_version" = rel; then
9407 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9409 cf_cv_shared_soname='`basename $@`'
9412 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9414 (nto-qnx*|openbsd*|freebsd[12].*)
9415 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9416 MK_SHARED_LIB='${LD} -Bshareable -o $@'
9417 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9419 (dragonfly*|freebsd*)
9420 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9421 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9422 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9423 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9424 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9427 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9428 if test "$cf_cv_shlib_version" = rel; then
9429 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9431 cf_cv_shared_soname='`basename $@`'
9434 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9437 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9438 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9439 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9440 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9441 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9442 if test "$cf_cv_shlib_version" = auto; then
9443 if test -f /usr/libexec/ld.elf_so; then
9444 cf_cv_shlib_version=abi
9446 cf_cv_shlib_version=rel
9450 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9451 if test "$cf_cv_shlib_version" = rel; then
9452 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9454 cf_cv_shared_soname='`basename $@`'
9457 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9459 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
9463 # tested with OSF/1 V3.2 and 'cc'
9464 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9465 # link with shared libs).
9466 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9469 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9472 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9473 if test "$DFT_LWR_MODEL" = "shared" ; then
9474 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9475 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9477 cf_cv_rm_so_locs=yes
9479 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9480 # tested with osr5.0.5
9481 if test "$GCC" != yes; then
9482 CC_SHARED_OPTS='-belf -KPIC'
9484 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9485 if test "$cf_cv_enable_rpath" = yes ; then
9486 # only way is to set LD_RUN_PATH but no switch for it
9489 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9490 LINK_PROGS='LD_RUN_PATH=${libdir}'
9491 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9494 # tested with SunOS 4.1.1 and gcc 2.7.0
9495 if test "$GCC" != yes; then
9496 CC_SHARED_OPTS='-KPIC'
9498 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
9499 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9502 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9503 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9504 if test "$DFT_LWR_MODEL" = "shared" ; then
9505 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9506 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9508 if test "$cf_cv_enable_rpath" = yes ; then
9509 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9512 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9513 if test "$cf_cv_shlib_version" = rel; then
9514 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9516 cf_cv_shared_soname='`basename $@`'
9519 if test "$GCC" != yes; then
9520 cf_save_CFLAGS="$CFLAGS"
9521 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9523 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9524 cat >conftest.$ac_ext <<_ACEOF
9525 #line 9525 "configure"
9526 #include "confdefs.h"
9536 rm -f conftest.$ac_objext
9537 if { (eval echo "$as_me:9537: \"$ac_compile\"") >&5
9538 (eval $ac_compile) 2>&5
9540 echo "$as_me:9540: \$? = $ac_status" >&5
9541 (exit $ac_status); } &&
9542 { ac_try='test -s conftest.$ac_objext'
9543 { (eval echo "$as_me:9543: \"$ac_try\"") >&5
9546 echo "$as_me:9546: \$? = $ac_status" >&5
9547 (exit $ac_status); }; }; then
9550 echo "$as_me: failed program was:" >&5
9551 cat conftest.$ac_ext >&5
9553 rm -f conftest.$ac_objext conftest.$ac_ext
9555 CFLAGS="$cf_save_CFLAGS"
9556 CC_SHARED_OPTS=$cf_shared_opts
9557 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
9559 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9562 (sysv5uw7*|unix_sv*)
9563 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9564 if test "$GCC" != yes; then
9565 CC_SHARED_OPTS='-KPIC'
9567 MK_SHARED_LIB='${LD} -d y -G -o $@'
9570 CC_SHARED_OPTS='unknown'
9571 MK_SHARED_LIB='echo unknown'
9575 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9576 case "$cf_cv_shlib_version" in
9578 case "$MK_SHARED_LIB" in
9580 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9583 { echo "$as_me:9583: WARNING: ignored --with-shlib-version" >&5
9584 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9590 if test -n "$cf_try_cflags"
9592 cat > conftest.$ac_ext <<EOF
9593 #line 9593 "${as_me:-configure}"
9595 int main(int argc, char *argv[])
9598 return (argv[argc-1] == 0) ;
9601 cf_save_CFLAGS="$CFLAGS"
9602 for cf_opt in $cf_try_cflags
9604 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9605 echo "$as_me:9605: checking if CFLAGS option -$cf_opt works" >&5
9606 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9607 if { (eval echo "$as_me:9607: \"$ac_compile\"") >&5
9608 (eval $ac_compile) 2>&5
9610 echo "$as_me:9610: \$? = $ac_status" >&5
9611 (exit $ac_status); }; then
9612 echo "$as_me:9612: result: yes" >&5
9613 echo "${ECHO_T}yes" >&6
9614 cf_save_CFLAGS="$CFLAGS"
9616 echo "$as_me:9616: result: no" >&5
9617 echo "${ECHO_T}no" >&6
9620 CFLAGS="$cf_save_CFLAGS"
9623 # RPATH_LIST is a colon-separated list of directories
9624 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9625 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9627 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9629 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9631 echo "${as_me:-configure}:9631: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9633 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9635 echo "${as_me:-configure}:9635: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9637 # The test/sample programs in the original tree link using rpath option.
9638 # Make it optional for packagers.
9639 if test -n "$LOCAL_LDFLAGS"
9641 echo "$as_me:9641: checking if you want to link sample programs with rpath option" >&5
9642 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9644 # Check whether --enable-rpath-link or --disable-rpath-link was given.
9645 if test "${enable_rpath_link+set}" = set; then
9646 enableval="$enable_rpath_link"
9647 with_rpath_link=$enableval
9651 echo "$as_me:9651: result: $with_rpath_link" >&5
9652 echo "${ECHO_T}$with_rpath_link" >&6
9653 if test "$with_rpath_link" = no
9660 ###############################################################################
9662 ### use option --enable-broken-linker to force on use of broken-linker support
9663 echo "$as_me:9663: checking if you want broken-linker support code" >&5
9664 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9666 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9667 if test "${enable_broken_linker+set}" = set; then
9668 enableval="$enable_broken_linker"
9669 with_broken_linker=$enableval
9671 with_broken_linker=${BROKEN_LINKER:-no}
9673 echo "$as_me:9673: result: $with_broken_linker" >&5
9674 echo "${ECHO_T}$with_broken_linker" >&6
9677 if test "$with_broken_linker" = yes ; then
9678 cat >>confdefs.h <<\EOF
9679 #define BROKEN_LINKER 1
9683 elif test "$DFT_LWR_MODEL" = shared ; then
9684 case $cf_cv_system_name in
9686 cat >>confdefs.h <<\EOF
9687 #define BROKEN_LINKER 1
9691 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9693 echo "${as_me:-configure}:9693: testing cygwin linker is broken anyway ..." 1>&5
9699 # Check to define _XOPEN_SOURCE "automatically"
9702 cf_POSIX_C_SOURCE=199506L
9707 cf_xopen_source="-D_ALL_SOURCE"
9713 cf_xopen_source="-D_APPLE_C_SOURCE"
9716 cf_xopen_source="-D_DARWIN_C_SOURCE"
9719 (freebsd*|dragonfly*)
9720 # 5.x headers associate
9721 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9722 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9723 cf_POSIX_C_SOURCE=200112L
9725 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9728 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9731 cf_xopen_source="-D_HPUX_SOURCE"
9734 cf_xopen_source="-D_SGI_SOURCE"
9737 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9739 echo "$as_me:9739: checking if we must define _GNU_SOURCE" >&5
9740 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9741 if test "${cf_cv_gnu_source+set}" = set; then
9742 echo $ECHO_N "(cached) $ECHO_C" >&6
9745 cat >conftest.$ac_ext <<_ACEOF
9746 #line 9746 "configure"
9747 #include "confdefs.h"
9748 #include <sys/types.h>
9753 #ifndef _XOPEN_SOURCE
9760 rm -f conftest.$ac_objext
9761 if { (eval echo "$as_me:9761: \"$ac_compile\"") >&5
9762 (eval $ac_compile) 2>&5
9764 echo "$as_me:9764: \$? = $ac_status" >&5
9765 (exit $ac_status); } &&
9766 { ac_try='test -s conftest.$ac_objext'
9767 { (eval echo "$as_me:9767: \"$ac_try\"") >&5
9770 echo "$as_me:9770: \$? = $ac_status" >&5
9771 (exit $ac_status); }; }; then
9774 echo "$as_me: failed program was:" >&5
9775 cat conftest.$ac_ext >&5
9777 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9778 cat >conftest.$ac_ext <<_ACEOF
9779 #line 9779 "configure"
9780 #include "confdefs.h"
9781 #include <sys/types.h>
9786 #ifdef _XOPEN_SOURCE
9793 rm -f conftest.$ac_objext
9794 if { (eval echo "$as_me:9794: \"$ac_compile\"") >&5
9795 (eval $ac_compile) 2>&5
9797 echo "$as_me:9797: \$? = $ac_status" >&5
9798 (exit $ac_status); } &&
9799 { ac_try='test -s conftest.$ac_objext'
9800 { (eval echo "$as_me:9800: \"$ac_try\"") >&5
9803 echo "$as_me:9803: \$? = $ac_status" >&5
9804 (exit $ac_status); }; }; then
9807 echo "$as_me: failed program was:" >&5
9808 cat conftest.$ac_ext >&5
9809 cf_cv_gnu_source=yes
9811 rm -f conftest.$ac_objext conftest.$ac_ext
9815 rm -f conftest.$ac_objext conftest.$ac_ext
9818 echo "$as_me:9818: result: $cf_cv_gnu_source" >&5
9819 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9821 if test "$cf_cv_gnu_source" = yes
9823 echo "$as_me:9823: checking if we should also define _DEFAULT_SOURCE" >&5
9824 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9825 if test "${cf_cv_default_source+set}" = set; then
9826 echo $ECHO_N "(cached) $ECHO_C" >&6
9829 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9830 cat >conftest.$ac_ext <<_ACEOF
9831 #line 9831 "configure"
9832 #include "confdefs.h"
9833 #include <sys/types.h>
9838 #ifdef _DEFAULT_SOURCE
9845 rm -f conftest.$ac_objext
9846 if { (eval echo "$as_me:9846: \"$ac_compile\"") >&5
9847 (eval $ac_compile) 2>&5
9849 echo "$as_me:9849: \$? = $ac_status" >&5
9850 (exit $ac_status); } &&
9851 { ac_try='test -s conftest.$ac_objext'
9852 { (eval echo "$as_me:9852: \"$ac_try\"") >&5
9855 echo "$as_me:9855: \$? = $ac_status" >&5
9856 (exit $ac_status); }; }; then
9857 cf_cv_default_source=no
9859 echo "$as_me: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9861 cf_cv_default_source=yes
9863 rm -f conftest.$ac_objext conftest.$ac_ext
9866 echo "$as_me:9866: result: $cf_cv_default_source" >&5
9867 echo "${ECHO_T}$cf_cv_default_source" >&6
9868 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
9873 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9876 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9879 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9881 cf_save_CFLAGS="$CFLAGS"
9882 cf_save_CPPFLAGS="$CPPFLAGS"
9884 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9885 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9886 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9888 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9889 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9890 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9892 echo "$as_me:9892: checking if we should define _POSIX_C_SOURCE" >&5
9893 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9894 if test "${cf_cv_posix_c_source+set}" = set; then
9895 echo $ECHO_N "(cached) $ECHO_C" >&6
9898 echo "${as_me:-configure}:9898: testing if the symbol is already defined go no further ..." 1>&5
9900 cat >conftest.$ac_ext <<_ACEOF
9901 #line 9901 "configure"
9902 #include "confdefs.h"
9903 #include <sys/types.h>
9908 #ifndef _POSIX_C_SOURCE
9915 rm -f conftest.$ac_objext
9916 if { (eval echo "$as_me:9916: \"$ac_compile\"") >&5
9917 (eval $ac_compile) 2>&5
9919 echo "$as_me:9919: \$? = $ac_status" >&5
9920 (exit $ac_status); } &&
9921 { ac_try='test -s conftest.$ac_objext'
9922 { (eval echo "$as_me:9922: \"$ac_try\"") >&5
9925 echo "$as_me:9925: \$? = $ac_status" >&5
9926 (exit $ac_status); }; }; then
9927 cf_cv_posix_c_source=no
9929 echo "$as_me: failed program was:" >&5
9930 cat conftest.$ac_ext >&5
9931 cf_want_posix_source=no
9932 case .$cf_POSIX_C_SOURCE in
9934 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9937 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9938 cf_want_posix_source=yes
9941 cf_want_posix_source=yes
9944 if test "$cf_want_posix_source" = yes ; then
9945 cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9948 #include <sys/types.h>
9953 #ifdef _POSIX_SOURCE
9960 rm -f conftest.$ac_objext
9961 if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
9962 (eval $ac_compile) 2>&5
9964 echo "$as_me:9964: \$? = $ac_status" >&5
9965 (exit $ac_status); } &&
9966 { ac_try='test -s conftest.$ac_objext'
9967 { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9970 echo "$as_me:9970: \$? = $ac_status" >&5
9971 (exit $ac_status); }; }; then
9974 echo "$as_me: failed program was:" >&5
9975 cat conftest.$ac_ext >&5
9976 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9978 rm -f conftest.$ac_objext conftest.$ac_ext
9981 echo "${as_me:-configure}:9981: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9983 CFLAGS="$cf_trim_CFLAGS"
9984 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9986 echo "${as_me:-configure}:9986: testing if the second compile does not leave our definition intact error ..." 1>&5
9988 cat >conftest.$ac_ext <<_ACEOF
9989 #line 9989 "configure"
9990 #include "confdefs.h"
9991 #include <sys/types.h>
9996 #ifndef _POSIX_C_SOURCE
10003 rm -f conftest.$ac_objext
10004 if { (eval echo "$as_me:10004: \"$ac_compile\"") >&5
10005 (eval $ac_compile) 2>&5
10007 echo "$as_me:10007: \$? = $ac_status" >&5
10008 (exit $ac_status); } &&
10009 { ac_try='test -s conftest.$ac_objext'
10010 { (eval echo "$as_me:10010: \"$ac_try\"") >&5
10011 (eval $ac_try) 2>&5
10013 echo "$as_me:10013: \$? = $ac_status" >&5
10014 (exit $ac_status); }; }; then
10017 echo "$as_me: failed program was:" >&5
10018 cat conftest.$ac_ext >&5
10019 cf_cv_posix_c_source=no
10021 rm -f conftest.$ac_objext conftest.$ac_ext
10022 CFLAGS="$cf_save_CFLAGS"
10023 CPPFLAGS="$cf_save_CPPFLAGS"
10026 rm -f conftest.$ac_objext conftest.$ac_ext
10029 echo "$as_me:10029: result: $cf_cv_posix_c_source" >&5
10030 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10032 if test "$cf_cv_posix_c_source" != no ; then
10033 CFLAGS="$cf_trim_CFLAGS"
10034 CPPFLAGS="$cf_trim_CPPFLAGS"
10039 cf_new_extra_cppflags=
10041 for cf_add_cflags in $cf_cv_posix_c_source
10043 case $cf_fix_cppflags in
10045 case $cf_add_cflags in
10046 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10047 case $cf_add_cflags in
10049 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10051 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10052 && test -z "${cf_tst_cflags}" \
10053 && cf_fix_cppflags=yes
10055 if test $cf_fix_cppflags = yes ; then
10056 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10058 elif test "${cf_tst_cflags}" = "\"'" ; then
10059 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10064 case "$CPPFLAGS" in
10068 case $cf_add_cflags in
10070 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10072 CPPFLAGS=`echo "$CPPFLAGS" | \
10073 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10074 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10078 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10083 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10088 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10090 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10092 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10093 && test -z "${cf_tst_cflags}" \
10094 && cf_fix_cppflags=no
10099 if test -n "$cf_new_cflags" ; then
10101 CFLAGS="$CFLAGS $cf_new_cflags"
10104 if test -n "$cf_new_cppflags" ; then
10106 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10109 if test -n "$cf_new_extra_cppflags" ; then
10111 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10118 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10121 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10122 cf_xopen_source="-D_BSD_SOURCE"
10123 cf_XOPEN_SOURCE=600
10126 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10129 cf_xopen_source="-D_OSF_SOURCE"
10132 cf_xopen_source="-D_QNX_SOURCE"
10135 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10138 cf_xopen_source="-D__EXTENSIONS__"
10139 cf_cv_xopen_source=broken
10141 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10147 echo "$as_me:10147: checking if we should define _XOPEN_SOURCE" >&5
10148 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10149 if test "${cf_cv_xopen_source+set}" = set; then
10150 echo $ECHO_N "(cached) $ECHO_C" >&6
10153 cat >conftest.$ac_ext <<_ACEOF
10154 #line 10154 "configure"
10155 #include "confdefs.h"
10157 #include <stdlib.h>
10158 #include <string.h>
10159 #include <sys/types.h>
10165 #ifndef _XOPEN_SOURCE
10172 rm -f conftest.$ac_objext
10173 if { (eval echo "$as_me:10173: \"$ac_compile\"") >&5
10174 (eval $ac_compile) 2>&5
10176 echo "$as_me:10176: \$? = $ac_status" >&5
10177 (exit $ac_status); } &&
10178 { ac_try='test -s conftest.$ac_objext'
10179 { (eval echo "$as_me:10179: \"$ac_try\"") >&5
10180 (eval $ac_try) 2>&5
10182 echo "$as_me:10182: \$? = $ac_status" >&5
10183 (exit $ac_status); }; }; then
10184 cf_cv_xopen_source=no
10186 echo "$as_me: failed program was:" >&5
10187 cat conftest.$ac_ext >&5
10188 cf_save="$CPPFLAGS"
10189 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10190 cat >conftest.$ac_ext <<_ACEOF
10191 #line 10191 "configure"
10192 #include "confdefs.h"
10194 #include <stdlib.h>
10195 #include <string.h>
10196 #include <sys/types.h>
10202 #ifdef _XOPEN_SOURCE
10209 rm -f conftest.$ac_objext
10210 if { (eval echo "$as_me:10210: \"$ac_compile\"") >&5
10211 (eval $ac_compile) 2>&5
10213 echo "$as_me:10213: \$? = $ac_status" >&5
10214 (exit $ac_status); } &&
10215 { ac_try='test -s conftest.$ac_objext'
10216 { (eval echo "$as_me:10216: \"$ac_try\"") >&5
10217 (eval $ac_try) 2>&5
10219 echo "$as_me:10219: \$? = $ac_status" >&5
10220 (exit $ac_status); }; }; then
10221 cf_cv_xopen_source=no
10223 echo "$as_me: failed program was:" >&5
10224 cat conftest.$ac_ext >&5
10225 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10227 rm -f conftest.$ac_objext conftest.$ac_ext
10228 CPPFLAGS="$cf_save"
10231 rm -f conftest.$ac_objext conftest.$ac_ext
10234 echo "$as_me:10234: result: $cf_cv_xopen_source" >&5
10235 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10237 if test "$cf_cv_xopen_source" != no ; then
10239 CFLAGS=`echo "$CFLAGS" | \
10240 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10241 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10243 CPPFLAGS=`echo "$CPPFLAGS" | \
10244 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10245 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10247 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10252 cf_new_extra_cppflags=
10254 for cf_add_cflags in $cf_temp_xopen_source
10256 case $cf_fix_cppflags in
10258 case $cf_add_cflags in
10259 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10260 case $cf_add_cflags in
10262 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10264 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10265 && test -z "${cf_tst_cflags}" \
10266 && cf_fix_cppflags=yes
10268 if test $cf_fix_cppflags = yes ; then
10269 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10271 elif test "${cf_tst_cflags}" = "\"'" ; then
10272 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10277 case "$CPPFLAGS" in
10281 case $cf_add_cflags in
10283 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10285 CPPFLAGS=`echo "$CPPFLAGS" | \
10286 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10287 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10291 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10296 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10301 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10303 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10305 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10306 && test -z "${cf_tst_cflags}" \
10307 && cf_fix_cppflags=no
10312 if test -n "$cf_new_cflags" ; then
10314 CFLAGS="$CFLAGS $cf_new_cflags"
10317 if test -n "$cf_new_cppflags" ; then
10319 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10322 if test -n "$cf_new_extra_cppflags" ; then
10324 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10329 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10331 cf_save_CFLAGS="$CFLAGS"
10332 cf_save_CPPFLAGS="$CPPFLAGS"
10334 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10335 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10336 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10338 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10339 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10340 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10342 echo "$as_me:10342: checking if we should define _POSIX_C_SOURCE" >&5
10343 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10344 if test "${cf_cv_posix_c_source+set}" = set; then
10345 echo $ECHO_N "(cached) $ECHO_C" >&6
10348 echo "${as_me:-configure}:10348: testing if the symbol is already defined go no further ..." 1>&5
10350 cat >conftest.$ac_ext <<_ACEOF
10351 #line 10351 "configure"
10352 #include "confdefs.h"
10353 #include <sys/types.h>
10358 #ifndef _POSIX_C_SOURCE
10365 rm -f conftest.$ac_objext
10366 if { (eval echo "$as_me:10366: \"$ac_compile\"") >&5
10367 (eval $ac_compile) 2>&5
10369 echo "$as_me:10369: \$? = $ac_status" >&5
10370 (exit $ac_status); } &&
10371 { ac_try='test -s conftest.$ac_objext'
10372 { (eval echo "$as_me:10372: \"$ac_try\"") >&5
10373 (eval $ac_try) 2>&5
10375 echo "$as_me:10375: \$? = $ac_status" >&5
10376 (exit $ac_status); }; }; then
10377 cf_cv_posix_c_source=no
10379 echo "$as_me: failed program was:" >&5
10380 cat conftest.$ac_ext >&5
10381 cf_want_posix_source=no
10382 case .$cf_POSIX_C_SOURCE in
10384 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10387 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10388 cf_want_posix_source=yes
10391 cf_want_posix_source=yes
10394 if test "$cf_want_posix_source" = yes ; then
10395 cat >conftest.$ac_ext <<_ACEOF
10396 #line 10396 "configure"
10397 #include "confdefs.h"
10398 #include <sys/types.h>
10403 #ifdef _POSIX_SOURCE
10410 rm -f conftest.$ac_objext
10411 if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
10412 (eval $ac_compile) 2>&5
10414 echo "$as_me:10414: \$? = $ac_status" >&5
10415 (exit $ac_status); } &&
10416 { ac_try='test -s conftest.$ac_objext'
10417 { (eval echo "$as_me:10417: \"$ac_try\"") >&5
10418 (eval $ac_try) 2>&5
10420 echo "$as_me:10420: \$? = $ac_status" >&5
10421 (exit $ac_status); }; }; then
10424 echo "$as_me: failed program was:" >&5
10425 cat conftest.$ac_ext >&5
10426 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10428 rm -f conftest.$ac_objext conftest.$ac_ext
10431 echo "${as_me:-configure}:10431: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10433 CFLAGS="$cf_trim_CFLAGS"
10434 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10436 echo "${as_me:-configure}:10436: testing if the second compile does not leave our definition intact error ..." 1>&5
10438 cat >conftest.$ac_ext <<_ACEOF
10439 #line 10439 "configure"
10440 #include "confdefs.h"
10441 #include <sys/types.h>
10446 #ifndef _POSIX_C_SOURCE
10453 rm -f conftest.$ac_objext
10454 if { (eval echo "$as_me:10454: \"$ac_compile\"") >&5
10455 (eval $ac_compile) 2>&5
10457 echo "$as_me:10457: \$? = $ac_status" >&5
10458 (exit $ac_status); } &&
10459 { ac_try='test -s conftest.$ac_objext'
10460 { (eval echo "$as_me:10460: \"$ac_try\"") >&5
10461 (eval $ac_try) 2>&5
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit $ac_status); }; }; then
10467 echo "$as_me: failed program was:" >&5
10468 cat conftest.$ac_ext >&5
10469 cf_cv_posix_c_source=no
10471 rm -f conftest.$ac_objext conftest.$ac_ext
10472 CFLAGS="$cf_save_CFLAGS"
10473 CPPFLAGS="$cf_save_CPPFLAGS"
10476 rm -f conftest.$ac_objext conftest.$ac_ext
10479 echo "$as_me:10479: result: $cf_cv_posix_c_source" >&5
10480 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10482 if test "$cf_cv_posix_c_source" != no ; then
10483 CFLAGS="$cf_trim_CFLAGS"
10484 CPPFLAGS="$cf_trim_CPPFLAGS"
10489 cf_new_extra_cppflags=
10491 for cf_add_cflags in $cf_cv_posix_c_source
10493 case $cf_fix_cppflags in
10495 case $cf_add_cflags in
10496 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10497 case $cf_add_cflags in
10499 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10501 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10502 && test -z "${cf_tst_cflags}" \
10503 && cf_fix_cppflags=yes
10505 if test $cf_fix_cppflags = yes ; then
10506 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10508 elif test "${cf_tst_cflags}" = "\"'" ; then
10509 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10514 case "$CPPFLAGS" in
10518 case $cf_add_cflags in
10520 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10522 CPPFLAGS=`echo "$CPPFLAGS" | \
10523 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10524 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10528 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10533 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10538 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10540 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10542 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10543 && test -z "${cf_tst_cflags}" \
10544 && cf_fix_cppflags=no
10549 if test -n "$cf_new_cflags" ; then
10551 CFLAGS="$CFLAGS $cf_new_cflags"
10554 if test -n "$cf_new_cppflags" ; then
10556 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10559 if test -n "$cf_new_extra_cppflags" ; then
10561 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10569 if test -n "$cf_xopen_source" ; then
10574 cf_new_extra_cppflags=
10576 for cf_add_cflags in $cf_xopen_source
10578 case $cf_fix_cppflags in
10580 case $cf_add_cflags in
10581 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10582 case $cf_add_cflags in
10584 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10587 && test -z "${cf_tst_cflags}" \
10588 && cf_fix_cppflags=yes
10590 if test $cf_fix_cppflags = yes ; then
10591 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10593 elif test "${cf_tst_cflags}" = "\"'" ; then
10594 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10599 case "$CPPFLAGS" in
10603 case $cf_add_cflags in
10605 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10607 CPPFLAGS=`echo "$CPPFLAGS" | \
10608 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10609 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10613 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10618 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10623 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10625 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10627 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10628 && test -z "${cf_tst_cflags}" \
10629 && cf_fix_cppflags=no
10634 if test -n "$cf_new_cflags" ; then
10635 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10637 echo "${as_me:-configure}:10637: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10639 CFLAGS="$CFLAGS $cf_new_cflags"
10642 if test -n "$cf_new_cppflags" ; then
10643 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10645 echo "${as_me:-configure}:10645: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10647 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10650 if test -n "$cf_new_extra_cppflags" ; then
10651 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10653 echo "${as_me:-configure}:10653: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10655 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10660 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10661 echo "$as_me:10661: checking if _XOPEN_SOURCE really is set" >&5
10662 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10663 cat >conftest.$ac_ext <<_ACEOF
10664 #line 10664 "configure"
10665 #include "confdefs.h"
10666 #include <stdlib.h>
10671 #ifndef _XOPEN_SOURCE
10678 rm -f conftest.$ac_objext
10679 if { (eval echo "$as_me:10679: \"$ac_compile\"") >&5
10680 (eval $ac_compile) 2>&5
10682 echo "$as_me:10682: \$? = $ac_status" >&5
10683 (exit $ac_status); } &&
10684 { ac_try='test -s conftest.$ac_objext'
10685 { (eval echo "$as_me:10685: \"$ac_try\"") >&5
10686 (eval $ac_try) 2>&5
10688 echo "$as_me:10688: \$? = $ac_status" >&5
10689 (exit $ac_status); }; }; then
10690 cf_XOPEN_SOURCE_set=yes
10692 echo "$as_me: failed program was:" >&5
10693 cat conftest.$ac_ext >&5
10694 cf_XOPEN_SOURCE_set=no
10696 rm -f conftest.$ac_objext conftest.$ac_ext
10697 echo "$as_me:10697: result: $cf_XOPEN_SOURCE_set" >&5
10698 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10699 if test $cf_XOPEN_SOURCE_set = yes
10701 cat >conftest.$ac_ext <<_ACEOF
10702 #line 10702 "configure"
10703 #include "confdefs.h"
10704 #include <stdlib.h>
10709 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10716 rm -f conftest.$ac_objext
10717 if { (eval echo "$as_me:10717: \"$ac_compile\"") >&5
10718 (eval $ac_compile) 2>&5
10720 echo "$as_me:10720: \$? = $ac_status" >&5
10721 (exit $ac_status); } &&
10722 { ac_try='test -s conftest.$ac_objext'
10723 { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5
10726 echo "$as_me:10726: \$? = $ac_status" >&5
10727 (exit $ac_status); }; }; then
10728 cf_XOPEN_SOURCE_set_ok=yes
10730 echo "$as_me: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732 cf_XOPEN_SOURCE_set_ok=no
10734 rm -f conftest.$ac_objext conftest.$ac_ext
10735 if test $cf_XOPEN_SOURCE_set_ok = no
10737 { echo "$as_me:10737: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10738 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10742 echo "$as_me:10742: checking if we should define _XOPEN_SOURCE" >&5
10743 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10744 if test "${cf_cv_xopen_source+set}" = set; then
10745 echo $ECHO_N "(cached) $ECHO_C" >&6
10748 cat >conftest.$ac_ext <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10752 #include <stdlib.h>
10753 #include <string.h>
10754 #include <sys/types.h>
10760 #ifndef _XOPEN_SOURCE
10767 rm -f conftest.$ac_objext
10768 if { (eval echo "$as_me:10768: \"$ac_compile\"") >&5
10769 (eval $ac_compile) 2>&5
10771 echo "$as_me:10771: \$? = $ac_status" >&5
10772 (exit $ac_status); } &&
10773 { ac_try='test -s conftest.$ac_objext'
10774 { (eval echo "$as_me:10774: \"$ac_try\"") >&5
10775 (eval $ac_try) 2>&5
10777 echo "$as_me:10777: \$? = $ac_status" >&5
10778 (exit $ac_status); }; }; then
10779 cf_cv_xopen_source=no
10781 echo "$as_me: failed program was:" >&5
10782 cat conftest.$ac_ext >&5
10783 cf_save="$CPPFLAGS"
10784 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10785 cat >conftest.$ac_ext <<_ACEOF
10786 #line 10786 "configure"
10787 #include "confdefs.h"
10789 #include <stdlib.h>
10790 #include <string.h>
10791 #include <sys/types.h>
10797 #ifdef _XOPEN_SOURCE
10804 rm -f conftest.$ac_objext
10805 if { (eval echo "$as_me:10805: \"$ac_compile\"") >&5
10806 (eval $ac_compile) 2>&5
10808 echo "$as_me:10808: \$? = $ac_status" >&5
10809 (exit $ac_status); } &&
10810 { ac_try='test -s conftest.$ac_objext'
10811 { (eval echo "$as_me:10811: \"$ac_try\"") >&5
10812 (eval $ac_try) 2>&5
10814 echo "$as_me:10814: \$? = $ac_status" >&5
10815 (exit $ac_status); }; }; then
10816 cf_cv_xopen_source=no
10818 echo "$as_me: failed program was:" >&5
10819 cat conftest.$ac_ext >&5
10820 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10822 rm -f conftest.$ac_objext conftest.$ac_ext
10823 CPPFLAGS="$cf_save"
10826 rm -f conftest.$ac_objext conftest.$ac_ext
10829 echo "$as_me:10829: result: $cf_cv_xopen_source" >&5
10830 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10832 if test "$cf_cv_xopen_source" != no ; then
10834 CFLAGS=`echo "$CFLAGS" | \
10835 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10836 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10838 CPPFLAGS=`echo "$CPPFLAGS" | \
10839 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10840 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10842 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10847 cf_new_extra_cppflags=
10849 for cf_add_cflags in $cf_temp_xopen_source
10851 case $cf_fix_cppflags in
10853 case $cf_add_cflags in
10854 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10855 case $cf_add_cflags in
10857 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10859 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10860 && test -z "${cf_tst_cflags}" \
10861 && cf_fix_cppflags=yes
10863 if test $cf_fix_cppflags = yes ; then
10864 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10866 elif test "${cf_tst_cflags}" = "\"'" ; then
10867 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10872 case "$CPPFLAGS" in
10876 case $cf_add_cflags in
10878 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10880 CPPFLAGS=`echo "$CPPFLAGS" | \
10881 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10882 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10886 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10891 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10896 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10898 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10900 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10901 && test -z "${cf_tst_cflags}" \
10902 && cf_fix_cppflags=no
10907 if test -n "$cf_new_cflags" ; then
10909 CFLAGS="$CFLAGS $cf_new_cflags"
10912 if test -n "$cf_new_cppflags" ; then
10914 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10917 if test -n "$cf_new_extra_cppflags" ; then
10919 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10927 # Check whether --enable-largefile or --disable-largefile was given.
10928 if test "${enable_largefile+set}" = set; then
10929 enableval="$enable_largefile"
10932 if test "$enable_largefile" != no; then
10934 echo "$as_me:10934: checking for special C compiler options needed for large files" >&5
10935 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10936 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10937 echo $ECHO_N "(cached) $ECHO_C" >&6
10939 ac_cv_sys_largefile_CC=no
10940 if test "$GCC" != yes; then
10943 # IRIX 6.2 and later do not support large files by default,
10944 # so use the C compiler's -n32 option if that helps.
10945 cat >conftest.$ac_ext <<_ACEOF
10946 #line 10946 "configure"
10947 #include "confdefs.h"
10948 #include <sys/types.h>
10949 /* Check that off_t can represent 2**63 - 1 correctly.
10950 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10951 since some C++ compilers masquerading as C compilers
10952 incorrectly reject 9223372036854775807. */
10953 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10954 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10955 && LARGE_OFF_T % 2147483647 == 1)
10965 rm -f conftest.$ac_objext
10966 if { (eval echo "$as_me:10966: \"$ac_compile\"") >&5
10967 (eval $ac_compile) 2>&5
10969 echo "$as_me:10969: \$? = $ac_status" >&5
10970 (exit $ac_status); } &&
10971 { ac_try='test -s conftest.$ac_objext'
10972 { (eval echo "$as_me:10972: \"$ac_try\"") >&5
10973 (eval $ac_try) 2>&5
10975 echo "$as_me:10975: \$? = $ac_status" >&5
10976 (exit $ac_status); }; }; then
10979 echo "$as_me: failed program was:" >&5
10980 cat conftest.$ac_ext >&5
10982 rm -f conftest.$ac_objext
10984 rm -f conftest.$ac_objext
10985 if { (eval echo "$as_me:10985: \"$ac_compile\"") >&5
10986 (eval $ac_compile) 2>&5
10988 echo "$as_me:10988: \$? = $ac_status" >&5
10989 (exit $ac_status); } &&
10990 { ac_try='test -s conftest.$ac_objext'
10991 { (eval echo "$as_me:10991: \"$ac_try\"") >&5
10992 (eval $ac_try) 2>&5
10994 echo "$as_me:10994: \$? = $ac_status" >&5
10995 (exit $ac_status); }; }; then
10996 ac_cv_sys_largefile_CC=' -n32'; break
10998 echo "$as_me: failed program was:" >&5
10999 cat conftest.$ac_ext >&5
11001 rm -f conftest.$ac_objext
11005 rm -f conftest.$ac_ext
11008 echo "$as_me:11008: result: $ac_cv_sys_largefile_CC" >&5
11009 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11010 if test "$ac_cv_sys_largefile_CC" != no; then
11011 CC=$CC$ac_cv_sys_largefile_CC
11014 echo "$as_me:11014: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11015 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11016 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11017 echo $ECHO_N "(cached) $ECHO_C" >&6
11020 ac_cv_sys_file_offset_bits=no
11021 cat >conftest.$ac_ext <<_ACEOF
11022 #line 11022 "configure"
11023 #include "confdefs.h"
11024 #include <sys/types.h>
11025 /* Check that off_t can represent 2**63 - 1 correctly.
11026 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11027 since some C++ compilers masquerading as C compilers
11028 incorrectly reject 9223372036854775807. */
11029 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11030 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11031 && LARGE_OFF_T % 2147483647 == 1)
11041 rm -f conftest.$ac_objext
11042 if { (eval echo "$as_me:11042: \"$ac_compile\"") >&5
11043 (eval $ac_compile) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit $ac_status); } &&
11047 { ac_try='test -s conftest.$ac_objext'
11048 { (eval echo "$as_me:11048: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11051 echo "$as_me:11051: \$? = $ac_status" >&5
11052 (exit $ac_status); }; }; then
11055 echo "$as_me: failed program was:" >&5
11056 cat conftest.$ac_ext >&5
11058 rm -f conftest.$ac_objext conftest.$ac_ext
11059 cat >conftest.$ac_ext <<_ACEOF
11060 #line 11060 "configure"
11061 #include "confdefs.h"
11062 #define _FILE_OFFSET_BITS 64
11063 #include <sys/types.h>
11064 /* Check that off_t can represent 2**63 - 1 correctly.
11065 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11066 since some C++ compilers masquerading as C compilers
11067 incorrectly reject 9223372036854775807. */
11068 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11069 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11070 && LARGE_OFF_T % 2147483647 == 1)
11080 rm -f conftest.$ac_objext
11081 if { (eval echo "$as_me:11081: \"$ac_compile\"") >&5
11082 (eval $ac_compile) 2>&5
11084 echo "$as_me:11084: \$? = $ac_status" >&5
11085 (exit $ac_status); } &&
11086 { ac_try='test -s conftest.$ac_objext'
11087 { (eval echo "$as_me:11087: \"$ac_try\"") >&5
11088 (eval $ac_try) 2>&5
11090 echo "$as_me:11090: \$? = $ac_status" >&5
11091 (exit $ac_status); }; }; then
11092 ac_cv_sys_file_offset_bits=64; break
11094 echo "$as_me: failed program was:" >&5
11095 cat conftest.$ac_ext >&5
11097 rm -f conftest.$ac_objext conftest.$ac_ext
11101 echo "$as_me:11101: result: $ac_cv_sys_file_offset_bits" >&5
11102 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11103 if test "$ac_cv_sys_file_offset_bits" != no; then
11105 cat >>confdefs.h <<EOF
11106 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11111 echo "$as_me:11111: checking for _LARGE_FILES value needed for large files" >&5
11112 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11113 if test "${ac_cv_sys_large_files+set}" = set; then
11114 echo $ECHO_N "(cached) $ECHO_C" >&6
11117 ac_cv_sys_large_files=no
11118 cat >conftest.$ac_ext <<_ACEOF
11119 #line 11119 "configure"
11120 #include "confdefs.h"
11121 #include <sys/types.h>
11122 /* Check that off_t can represent 2**63 - 1 correctly.
11123 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11124 since some C++ compilers masquerading as C compilers
11125 incorrectly reject 9223372036854775807. */
11126 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11127 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11128 && LARGE_OFF_T % 2147483647 == 1)
11138 rm -f conftest.$ac_objext
11139 if { (eval echo "$as_me:11139: \"$ac_compile\"") >&5
11140 (eval $ac_compile) 2>&5
11142 echo "$as_me:11142: \$? = $ac_status" >&5
11143 (exit $ac_status); } &&
11144 { ac_try='test -s conftest.$ac_objext'
11145 { (eval echo "$as_me:11145: \"$ac_try\"") >&5
11146 (eval $ac_try) 2>&5
11148 echo "$as_me:11148: \$? = $ac_status" >&5
11149 (exit $ac_status); }; }; then
11152 echo "$as_me: failed program was:" >&5
11153 cat conftest.$ac_ext >&5
11155 rm -f conftest.$ac_objext conftest.$ac_ext
11156 cat >conftest.$ac_ext <<_ACEOF
11157 #line 11157 "configure"
11158 #include "confdefs.h"
11159 #define _LARGE_FILES 1
11160 #include <sys/types.h>
11161 /* Check that off_t can represent 2**63 - 1 correctly.
11162 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11163 since some C++ compilers masquerading as C compilers
11164 incorrectly reject 9223372036854775807. */
11165 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11166 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11167 && LARGE_OFF_T % 2147483647 == 1)
11177 rm -f conftest.$ac_objext
11178 if { (eval echo "$as_me:11178: \"$ac_compile\"") >&5
11179 (eval $ac_compile) 2>&5
11181 echo "$as_me:11181: \$? = $ac_status" >&5
11182 (exit $ac_status); } &&
11183 { ac_try='test -s conftest.$ac_objext'
11184 { (eval echo "$as_me:11184: \"$ac_try\"") >&5
11185 (eval $ac_try) 2>&5
11187 echo "$as_me:11187: \$? = $ac_status" >&5
11188 (exit $ac_status); }; }; then
11189 ac_cv_sys_large_files=1; break
11191 echo "$as_me: failed program was:" >&5
11192 cat conftest.$ac_ext >&5
11194 rm -f conftest.$ac_objext conftest.$ac_ext
11198 echo "$as_me:11198: result: $ac_cv_sys_large_files" >&5
11199 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11200 if test "$ac_cv_sys_large_files" != no; then
11202 cat >>confdefs.h <<EOF
11203 #define _LARGE_FILES $ac_cv_sys_large_files
11210 if test "$enable_largefile" != no ; then
11211 echo "$as_me:11211: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11212 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11213 if test "${ac_cv_sys_largefile_source+set}" = set; then
11214 echo $ECHO_N "(cached) $ECHO_C" >&6
11217 ac_cv_sys_largefile_source=no
11218 cat >conftest.$ac_ext <<_ACEOF
11219 #line 11219 "configure"
11220 #include "confdefs.h"
11230 rm -f conftest.$ac_objext
11231 if { (eval echo "$as_me:11231: \"$ac_compile\"") >&5
11232 (eval $ac_compile) 2>&5
11234 echo "$as_me:11234: \$? = $ac_status" >&5
11235 (exit $ac_status); } &&
11236 { ac_try='test -s conftest.$ac_objext'
11237 { (eval echo "$as_me:11237: \"$ac_try\"") >&5
11238 (eval $ac_try) 2>&5
11240 echo "$as_me:11240: \$? = $ac_status" >&5
11241 (exit $ac_status); }; }; then
11244 echo "$as_me: failed program was:" >&5
11245 cat conftest.$ac_ext >&5
11247 rm -f conftest.$ac_objext conftest.$ac_ext
11248 cat >conftest.$ac_ext <<_ACEOF
11249 #line 11249 "configure"
11250 #include "confdefs.h"
11251 #define _LARGEFILE_SOURCE 1
11261 rm -f conftest.$ac_objext
11262 if { (eval echo "$as_me:11262: \"$ac_compile\"") >&5
11263 (eval $ac_compile) 2>&5
11265 echo "$as_me:11265: \$? = $ac_status" >&5
11266 (exit $ac_status); } &&
11267 { ac_try='test -s conftest.$ac_objext'
11268 { (eval echo "$as_me:11268: \"$ac_try\"") >&5
11269 (eval $ac_try) 2>&5
11271 echo "$as_me:11271: \$? = $ac_status" >&5
11272 (exit $ac_status); }; }; then
11273 ac_cv_sys_largefile_source=1; break
11275 echo "$as_me: failed program was:" >&5
11276 cat conftest.$ac_ext >&5
11278 rm -f conftest.$ac_objext conftest.$ac_ext
11282 echo "$as_me:11282: result: $ac_cv_sys_largefile_source" >&5
11283 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11284 if test "$ac_cv_sys_largefile_source" != no; then
11286 cat >>confdefs.h <<EOF
11287 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11293 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11294 # in glibc 2.1.3, but that breaks too many other things.
11295 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11296 echo "$as_me:11296: checking for fseeko" >&5
11297 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11298 if test "${ac_cv_func_fseeko+set}" = set; then
11299 echo $ECHO_N "(cached) $ECHO_C" >&6
11301 cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11308 return fseeko && fseeko (stdin, 0, 0);
11313 rm -f conftest.$ac_objext conftest$ac_exeext
11314 if { (eval echo "$as_me:11314: \"$ac_link\"") >&5
11315 (eval $ac_link) 2>&5
11317 echo "$as_me:11317: \$? = $ac_status" >&5
11318 (exit $ac_status); } &&
11319 { ac_try='test -s conftest$ac_exeext'
11320 { (eval echo "$as_me:11320: \"$ac_try\"") >&5
11321 (eval $ac_try) 2>&5
11323 echo "$as_me:11323: \$? = $ac_status" >&5
11324 (exit $ac_status); }; }; then
11325 ac_cv_func_fseeko=yes
11327 echo "$as_me: failed program was:" >&5
11328 cat conftest.$ac_ext >&5
11329 ac_cv_func_fseeko=no
11331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11333 echo "$as_me:11333: result: $ac_cv_func_fseeko" >&5
11334 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11335 if test $ac_cv_func_fseeko = yes; then
11337 cat >>confdefs.h <<\EOF
11338 #define HAVE_FSEEKO 1
11343 # Normally we would collect these definitions in the config.h,
11344 # but (like _XOPEN_SOURCE), some environments rely on having these
11345 # defined before any of the system headers are included. Another
11346 # case comes up with C++, e.g., on AIX the compiler compiles the
11347 # header files by themselves before looking at the body files it is
11348 # told to compile. For ncurses, those header files do not include
11350 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11351 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11352 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11354 echo "$as_me:11354: checking whether to use struct dirent64" >&5
11355 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11356 if test "${cf_cv_struct_dirent64+set}" = set; then
11357 echo $ECHO_N "(cached) $ECHO_C" >&6
11360 cat >conftest.$ac_ext <<_ACEOF
11361 #line 11361 "configure"
11362 #include "confdefs.h"
11364 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11365 #include <sys/types.h>
11366 #include <dirent.h>
11372 /* if transitional largefile support is setup, this is true */
11373 extern struct dirent64 * readdir(DIR *);
11374 struct dirent64 *x = readdir((DIR *)0);
11375 struct dirent *y = readdir((DIR *)0);
11382 rm -f conftest.$ac_objext
11383 if { (eval echo "$as_me:11383: \"$ac_compile\"") >&5
11384 (eval $ac_compile) 2>&5
11386 echo "$as_me:11386: \$? = $ac_status" >&5
11387 (exit $ac_status); } &&
11388 { ac_try='test -s conftest.$ac_objext'
11389 { (eval echo "$as_me:11389: \"$ac_try\"") >&5
11390 (eval $ac_try) 2>&5
11392 echo "$as_me:11392: \$? = $ac_status" >&5
11393 (exit $ac_status); }; }; then
11394 cf_cv_struct_dirent64=yes
11396 echo "$as_me: failed program was:" >&5
11397 cat conftest.$ac_ext >&5
11398 cf_cv_struct_dirent64=no
11400 rm -f conftest.$ac_objext conftest.$ac_ext
11403 echo "$as_me:11403: result: $cf_cv_struct_dirent64" >&5
11404 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11405 test "$cf_cv_struct_dirent64" = yes &&
11406 cat >>confdefs.h <<\EOF
11407 #define HAVE_STRUCT_DIRENT64 1
11412 ### Enable compiling-in rcs id's
11413 echo "$as_me:11413: checking if RCS identifiers should be compiled-in" >&5
11414 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11416 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11417 if test "${with_rcs_ids+set}" = set; then
11418 withval="$with_rcs_ids"
11419 with_rcs_ids=$withval
11423 echo "$as_me:11423: result: $with_rcs_ids" >&5
11424 echo "${ECHO_T}$with_rcs_ids" >&6
11425 test "$with_rcs_ids" = yes &&
11426 cat >>confdefs.h <<\EOF
11427 #define USE_RCS_IDS 1
11430 ###############################################################################
11432 ### Note that some functions (such as const) are normally disabled anyway.
11433 echo "$as_me:11433: checking if you want to build with function extensions" >&5
11434 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11436 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11437 if test "${enable_ext_funcs+set}" = set; then
11438 enableval="$enable_ext_funcs"
11439 with_ext_funcs=$enableval
11443 echo "$as_me:11443: result: $with_ext_funcs" >&5
11444 echo "${ECHO_T}$with_ext_funcs" >&6
11445 if test "$with_ext_funcs" = yes ; then
11446 NCURSES_EXT_FUNCS=1
11448 cat >>confdefs.h <<\EOF
11449 #define HAVE_USE_DEFAULT_COLORS 1
11452 cat >>confdefs.h <<\EOF
11453 #define NCURSES_EXT_FUNCS 1
11457 NCURSES_EXT_FUNCS=0
11460 ### use option --enable-const to turn on use of const beyond that in XSI.
11461 echo "$as_me:11461: checking for extended use of const keyword" >&5
11462 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11464 # Check whether --enable-const or --disable-const was given.
11465 if test "${enable_const+set}" = set; then
11466 enableval="$enable_const"
11467 with_ext_const=$enableval
11471 echo "$as_me:11471: result: $with_ext_const" >&5
11472 echo "${ECHO_T}$with_ext_const" >&6
11473 NCURSES_CONST='/*nothing*/'
11474 if test "$with_ext_const" = yes ; then
11475 NCURSES_CONST=const
11478 ###############################################################################
11479 # These options are relatively safe to experiment with.
11481 echo "$as_me:11481: checking if you want all development code" >&5
11482 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11484 # Check whether --with-develop or --without-develop was given.
11485 if test "${with_develop+set}" = set; then
11486 withval="$with_develop"
11487 with_develop=$withval
11491 echo "$as_me:11491: result: $with_develop" >&5
11492 echo "${ECHO_T}$with_develop" >&6
11494 ###############################################################################
11495 # These are just experimental, probably should not be in a package:
11497 # This is still experimental (20080329), but should ultimately be moved to
11498 # the script-block --with-normal, etc.
11500 echo "$as_me:11500: checking if you want to link with the pthread library" >&5
11501 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11503 # Check whether --with-pthread or --without-pthread was given.
11504 if test "${with_pthread+set}" = set; then
11505 withval="$with_pthread"
11506 with_pthread=$withval
11510 echo "$as_me:11510: result: $with_pthread" >&5
11511 echo "${ECHO_T}$with_pthread" >&6
11513 if test "$with_pthread" != no ; then
11514 echo "$as_me:11514: checking for pthread.h" >&5
11515 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11516 if test "${ac_cv_header_pthread_h+set}" = set; then
11517 echo $ECHO_N "(cached) $ECHO_C" >&6
11519 cat >conftest.$ac_ext <<_ACEOF
11520 #line 11520 "configure"
11521 #include "confdefs.h"
11522 #include <pthread.h>
11524 if { (eval echo "$as_me:11524: \"$ac_cpp conftest.$ac_ext\"") >&5
11525 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11527 egrep -v '^ *\+' conftest.er1 >conftest.err
11529 cat conftest.err >&5
11530 echo "$as_me:11530: \$? = $ac_status" >&5
11531 (exit $ac_status); } >/dev/null; then
11532 if test -s conftest.err; then
11533 ac_cpp_err=$ac_c_preproc_warn_flag
11540 if test -z "$ac_cpp_err"; then
11541 ac_cv_header_pthread_h=yes
11543 echo "$as_me: failed program was:" >&5
11544 cat conftest.$ac_ext >&5
11545 ac_cv_header_pthread_h=no
11547 rm -f conftest.err conftest.$ac_ext
11549 echo "$as_me:11549: result: $ac_cv_header_pthread_h" >&5
11550 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11551 if test $ac_cv_header_pthread_h = yes; then
11553 cat >>confdefs.h <<\EOF
11554 #define HAVE_PTHREADS_H 1
11557 for cf_lib_pthread in pthread c_r
11559 echo "$as_me:11559: checking if we can link with the $cf_lib_pthread library" >&5
11560 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11561 cf_save_LIBS="$LIBS"
11563 cf_add_libs="-l$cf_lib_pthread"
11564 # Filter out duplicates - this happens with badly-designed ".pc" files...
11565 for cf_add_1lib in $LIBS
11567 for cf_add_2lib in $cf_add_libs
11569 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11575 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11577 LIBS="$cf_add_libs"
11579 cat >conftest.$ac_ext <<_ACEOF
11580 #line 11580 "configure"
11581 #include "confdefs.h"
11583 #include <pthread.h>
11589 int rc = pthread_create(0,0,0,0);
11590 int r2 = pthread_mutexattr_settype(0, 0);
11596 rm -f conftest.$ac_objext conftest$ac_exeext
11597 if { (eval echo "$as_me:11597: \"$ac_link\"") >&5
11598 (eval $ac_link) 2>&5
11600 echo "$as_me:11600: \$? = $ac_status" >&5
11601 (exit $ac_status); } &&
11602 { ac_try='test -s conftest$ac_exeext'
11603 { (eval echo "$as_me:11603: \"$ac_try\"") >&5
11604 (eval $ac_try) 2>&5
11606 echo "$as_me:11606: \$? = $ac_status" >&5
11607 (exit $ac_status); }; }; then
11610 echo "$as_me: failed program was:" >&5
11611 cat conftest.$ac_ext >&5
11614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11615 LIBS="$cf_save_LIBS"
11616 echo "$as_me:11616: result: $with_pthread" >&5
11617 echo "${ECHO_T}$with_pthread" >&6
11618 test "$with_pthread" = yes && break
11621 if test "$with_pthread" = yes ; then
11623 cf_add_libs="-l$cf_lib_pthread"
11624 # Filter out duplicates - this happens with badly-designed ".pc" files...
11625 for cf_add_1lib in $LIBS
11627 for cf_add_2lib in $cf_add_libs
11629 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11635 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11637 LIBS="$cf_add_libs"
11639 cat >>confdefs.h <<\EOF
11640 #define HAVE_LIBPTHREADS 1
11644 { { echo "$as_me:11644: error: Cannot link with pthread library" >&5
11645 echo "$as_me: error: Cannot link with pthread library" >&2;}
11646 { (exit 1); exit 1; }; }
11653 echo "$as_me:11653: checking if you want to use weak-symbols for pthreads" >&5
11654 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11656 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11657 if test "${enable_weak_symbols+set}" = set; then
11658 enableval="$enable_weak_symbols"
11659 use_weak_symbols=$withval
11661 use_weak_symbols=no
11663 echo "$as_me:11663: result: $use_weak_symbols" >&5
11664 echo "${ECHO_T}$use_weak_symbols" >&6
11665 if test "$use_weak_symbols" = yes ; then
11667 echo "$as_me:11667: checking if $CC supports weak symbols" >&5
11668 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11669 if test "${cf_cv_weak_symbols+set}" = set; then
11670 echo $ECHO_N "(cached) $ECHO_C" >&6
11673 cat >conftest.$ac_ext <<_ACEOF
11674 #line 11674 "configure"
11675 #include "confdefs.h"
11682 #if defined(__GNUC__)
11683 # if defined __USE_ISOC99
11684 # define _cat_pragma(exp) _Pragma(#exp)
11685 # define _weak_pragma(exp) _cat_pragma(weak name)
11687 # define _weak_pragma(exp)
11689 # define _declare(name) __extension__ extern __typeof__(name) name
11690 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11693 weak_symbol(fopen);
11699 rm -f conftest.$ac_objext
11700 if { (eval echo "$as_me:11700: \"$ac_compile\"") >&5
11701 (eval $ac_compile) 2>&5
11703 echo "$as_me:11703: \$? = $ac_status" >&5
11704 (exit $ac_status); } &&
11705 { ac_try='test -s conftest.$ac_objext'
11706 { (eval echo "$as_me:11706: \"$ac_try\"") >&5
11707 (eval $ac_try) 2>&5
11709 echo "$as_me:11709: \$? = $ac_status" >&5
11710 (exit $ac_status); }; }; then
11711 cf_cv_weak_symbols=yes
11713 echo "$as_me: failed program was:" >&5
11714 cat conftest.$ac_ext >&5
11715 cf_cv_weak_symbols=no
11717 rm -f conftest.$ac_objext conftest.$ac_ext
11720 echo "$as_me:11720: result: $cf_cv_weak_symbols" >&5
11721 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11724 cf_cv_weak_symbols=no
11727 if test $cf_cv_weak_symbols = yes ; then
11729 cat >>confdefs.h <<\EOF
11730 #define USE_WEAK_SYMBOLS 1
11736 if test "$with_pthread" = "yes" ; then
11738 cat >>confdefs.h <<\EOF
11739 #define USE_PTHREADS 1
11742 enable_reentrant=yes
11743 if test $cf_cv_weak_symbols = yes ; then
11748 # OpenSUSE is installing ncurses6, using reentrant option.
11749 echo "$as_me:11749: checking for _nc_TABSIZE" >&5
11750 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11751 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11752 echo $ECHO_N "(cached) $ECHO_C" >&6
11754 cat >conftest.$ac_ext <<_ACEOF
11755 #line 11755 "configure"
11756 #include "confdefs.h"
11757 /* System header to define __stub macros and hopefully few prototypes,
11758 which can conflict with char _nc_TABSIZE (); below. */
11759 #include <assert.h>
11760 /* Override any gcc2 internal prototype to avoid an error. */
11764 /* We use char because int might match the return type of a gcc2
11765 builtin and then its argument prototype would still apply. */
11766 char _nc_TABSIZE ();
11772 /* The GNU C library defines this for functions which it implements
11773 to always fail with ENOSYS. Some functions are actually named
11774 something starting with __ and the normal name is an alias. */
11775 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11778 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11785 rm -f conftest.$ac_objext conftest$ac_exeext
11786 if { (eval echo "$as_me:11786: \"$ac_link\"") >&5
11787 (eval $ac_link) 2>&5
11789 echo "$as_me:11789: \$? = $ac_status" >&5
11790 (exit $ac_status); } &&
11791 { ac_try='test -s conftest$ac_exeext'
11792 { (eval echo "$as_me:11792: \"$ac_try\"") >&5
11793 (eval $ac_try) 2>&5
11795 echo "$as_me:11795: \$? = $ac_status" >&5
11796 (exit $ac_status); }; }; then
11797 ac_cv_func__nc_TABSIZE=yes
11799 echo "$as_me: failed program was:" >&5
11800 cat conftest.$ac_ext >&5
11801 ac_cv_func__nc_TABSIZE=no
11803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11805 echo "$as_me:11805: result: $ac_cv_func__nc_TABSIZE" >&5
11806 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11807 if test $ac_cv_func__nc_TABSIZE = yes; then
11808 assume_reentrant=yes
11810 assume_reentrant=no
11813 # Reentrant code has to be opaque; there's little advantage to making ncurses
11814 # opaque outside of that, so there is no --enable-opaque option. We can use
11815 # this option without --with-pthreads, but this will be always set for
11817 echo "$as_me:11817: checking if you want experimental reentrant code" >&5
11818 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11820 # Check whether --enable-reentrant or --disable-reentrant was given.
11821 if test "${enable_reentrant+set}" = set; then
11822 enableval="$enable_reentrant"
11823 with_reentrant=$enableval
11825 with_reentrant=$assume_reentrant
11827 echo "$as_me:11827: result: $with_reentrant" >&5
11828 echo "${ECHO_T}$with_reentrant" >&6
11829 if test "$with_reentrant" = yes ; then
11830 cf_cv_enable_reentrant=1
11831 if test $cf_cv_weak_symbols = yes ; then
11833 # remove pthread library from $LIBS
11834 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11836 elif test "$assume_reentrant" = no ; then
11837 LIB_SUFFIX="t${LIB_SUFFIX}"
11840 cat >>confdefs.h <<\EOF
11841 #define USE_REENTRANT 1
11845 cf_cv_enable_reentrant=0
11848 ### Allow using a different wrap-prefix
11849 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11850 echo "$as_me:11850: checking for prefix used to wrap public variables" >&5
11851 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11853 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11854 if test "${with_wrap_prefix+set}" = set; then
11855 withval="$with_wrap_prefix"
11856 NCURSES_WRAP_PREFIX=$withval
11858 NCURSES_WRAP_PREFIX=_nc_
11860 echo "$as_me:11860: result: $NCURSES_WRAP_PREFIX" >&5
11861 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11863 NCURSES_WRAP_PREFIX=_nc_
11866 cat >>confdefs.h <<EOF
11867 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11870 ###############################################################################
11872 ### use option --disable-echo to suppress full display compiling commands
11874 echo "$as_me:11874: checking if you want to see long compiling messages" >&5
11875 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11877 # Check whether --enable-echo or --disable-echo was given.
11878 if test "${enable_echo+set}" = set; then
11879 enableval="$enable_echo"
11880 test "$enableval" != no && enableval=yes
11881 if test "$enableval" != "yes" ; then
11884 ECHO_LD='@echo linking $@;'
11885 RULE_CC='@echo compiling $<'
11886 SHOW_CC='@echo compiling $@'
11908 echo "$as_me:11908: result: $enableval" >&5
11909 echo "${ECHO_T}$enableval" >&6
11911 ### use option --enable-warnings to turn on all gcc warnings
11912 echo "$as_me:11912: checking if you want to see compiler warnings" >&5
11913 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11915 # Check whether --enable-warnings or --disable-warnings was given.
11916 if test "${enable_warnings+set}" = set; then
11917 enableval="$enable_warnings"
11918 with_warnings=$enableval
11920 echo "$as_me:11920: result: $with_warnings" >&5
11921 echo "${ECHO_T}$with_warnings" >&6
11923 if test "x$with_warnings" = "xyes"; then
11925 ADAFLAGS="$ADAFLAGS -gnatg"
11929 if test "$GCC" = yes ; then
11932 echo "$as_me:11932: checking if this is really Intel C compiler" >&5
11933 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11934 cf_save_CFLAGS="$CFLAGS"
11935 CFLAGS="$CFLAGS -no-gcc"
11936 cat >conftest.$ac_ext <<_ACEOF
11937 #line 11937 "configure"
11938 #include "confdefs.h"
11944 #ifdef __INTEL_COMPILER
11953 rm -f conftest.$ac_objext
11954 if { (eval echo "$as_me:11954: \"$ac_compile\"") >&5
11955 (eval $ac_compile) 2>&5
11957 echo "$as_me:11957: \$? = $ac_status" >&5
11958 (exit $ac_status); } &&
11959 { ac_try='test -s conftest.$ac_objext'
11960 { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961 (eval $ac_try) 2>&5
11963 echo "$as_me:11963: \$? = $ac_status" >&5
11964 (exit $ac_status); }; }; then
11966 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11969 echo "$as_me: failed program was:" >&5
11970 cat conftest.$ac_ext >&5
11972 rm -f conftest.$ac_objext conftest.$ac_ext
11973 CFLAGS="$cf_save_CFLAGS"
11974 echo "$as_me:11974: result: $INTEL_COMPILER" >&5
11975 echo "${ECHO_T}$INTEL_COMPILER" >&6
11982 if test "$GCC" = yes ; then
11983 echo "$as_me:11983: checking if this is really Clang C compiler" >&5
11984 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11985 cf_save_CFLAGS="$CFLAGS"
11986 CFLAGS="$CFLAGS -Qunused-arguments"
11987 cat >conftest.$ac_ext <<_ACEOF
11988 #line 11988 "configure"
11989 #include "confdefs.h"
12004 rm -f conftest.$ac_objext
12005 if { (eval echo "$as_me:12005: \"$ac_compile\"") >&5
12006 (eval $ac_compile) 2>&5
12008 echo "$as_me:12008: \$? = $ac_status" >&5
12009 (exit $ac_status); } &&
12010 { ac_try='test -s conftest.$ac_objext'
12011 { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012 (eval $ac_try) 2>&5
12014 echo "$as_me:12014: \$? = $ac_status" >&5
12015 (exit $ac_status); }; }; then
12017 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12020 echo "$as_me: failed program was:" >&5
12021 cat conftest.$ac_ext >&5
12023 rm -f conftest.$ac_objext conftest.$ac_ext
12024 CFLAGS="$cf_save_CFLAGS"
12025 echo "$as_me:12025: result: $CLANG_COMPILER" >&5
12026 echo "${ECHO_T}$CLANG_COMPILER" >&6
12029 cat > conftest.$ac_ext <<EOF
12030 #line 12030 "${as_me:-configure}"
12031 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12034 if test "$INTEL_COMPILER" = yes
12036 # The "-wdXXX" options suppress warnings:
12037 # remark #1419: external declaration in primary source file
12038 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12039 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12040 # remark #193: zero used for undefined preprocessing identifier
12041 # remark #593: variable "curs_sb_left_arrow" was set but never used
12042 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12043 # remark #869: parameter "tw" was never referenced
12044 # remark #981: operands are evaluated in unspecified order
12045 # warning #279: controlling expression is constant
12047 { echo "$as_me:12047: checking for $CC warning options..." >&5
12048 echo "$as_me: checking for $CC warning options..." >&6;}
12049 cf_save_CFLAGS="$CFLAGS"
12050 EXTRA_CFLAGS="-Wall"
12062 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12063 if { (eval echo "$as_me:12063: \"$ac_compile\"") >&5
12064 (eval $ac_compile) 2>&5
12066 echo "$as_me:12066: \$? = $ac_status" >&5
12067 (exit $ac_status); }; then
12068 test -n "$verbose" && echo "$as_me:12068: result: ... -$cf_opt" >&5
12069 echo "${ECHO_T}... -$cf_opt" >&6
12070 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12073 CFLAGS="$cf_save_CFLAGS"
12075 elif test "$GCC" = yes
12077 { echo "$as_me:12077: checking for $CC warning options..." >&5
12078 echo "$as_me: checking for $CC warning options..." >&6;}
12079 cf_save_CFLAGS="$CFLAGS"
12082 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12083 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12084 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12085 for cf_opt in W Wall \
12086 Wbad-function-cast \
12089 Wdeclaration-after-statement \
12092 Wmissing-declarations \
12093 Wmissing-prototypes \
12097 Wstrict-prototypes \
12098 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12100 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12101 if { (eval echo "$as_me:12101: \"$ac_compile\"") >&5
12102 (eval $ac_compile) 2>&5
12104 echo "$as_me:12104: \$? = $ac_status" >&5
12105 (exit $ac_status); }; then
12106 test -n "$verbose" && echo "$as_me:12106: result: ... -$cf_opt" >&5
12107 echo "${ECHO_T}... -$cf_opt" >&6
12110 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12113 case $GCC_VERSION in
12115 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12117 echo "${as_me:-configure}:12117: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12123 case $GCC_VERSION in
12125 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12127 echo "${as_me:-configure}:12127: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12133 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12136 CFLAGS="$cf_save_CFLAGS"
12142 if test "$GCC" = yes
12144 cat > conftest.i <<EOF
12146 #define GCC_PRINTF 0
12149 #define GCC_SCANF 0
12151 #ifndef GCC_NORETURN
12152 #define GCC_NORETURN /* nothing */
12155 #define GCC_UNUSED /* nothing */
12158 if test "$GCC" = yes
12160 { echo "$as_me:12160: checking for $CC __attribute__ directives..." >&5
12161 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12162 cat > conftest.$ac_ext <<EOF
12163 #line 12163 "${as_me:-configure}"
12164 #include "confdefs.h"
12165 #include "conftest.h"
12166 #include "conftest.i"
12168 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12170 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12173 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12175 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12177 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12178 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12179 extern void foo(void) GCC_NORETURN;
12180 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12182 cf_printf_attribute=no
12183 cf_scanf_attribute=no
12184 for cf_attribute in scanf printf unused noreturn
12187 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12189 cf_directive="__attribute__(($cf_attribute))"
12190 echo "checking for $CC $cf_directive" 1>&5
12192 case $cf_attribute in
12194 cf_printf_attribute=yes
12195 cat >conftest.h <<EOF
12196 #define GCC_$cf_ATTRIBUTE 1
12200 cf_scanf_attribute=yes
12201 cat >conftest.h <<EOF
12202 #define GCC_$cf_ATTRIBUTE 1
12206 cat >conftest.h <<EOF
12207 #define GCC_$cf_ATTRIBUTE $cf_directive
12212 if { (eval echo "$as_me:12212: \"$ac_compile\"") >&5
12213 (eval $ac_compile) 2>&5
12215 echo "$as_me:12215: \$? = $ac_status" >&5
12216 (exit $ac_status); }; then
12217 test -n "$verbose" && echo "$as_me:12217: result: ... $cf_attribute" >&5
12218 echo "${ECHO_T}... $cf_attribute" >&6
12219 cat conftest.h >>confdefs.h
12220 case $cf_attribute in
12223 cat >>confdefs.h <<EOF
12224 #define GCC_NORETURN $cf_directive
12229 cf_value='/* nothing */'
12230 if test "$cf_printf_attribute" != no ; then
12231 cf_value='__attribute__((format(printf,fmt,var)))'
12233 cat >>confdefs.h <<\EOF
12234 #define GCC_PRINTF 1
12239 cat >>confdefs.h <<EOF
12240 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12245 cf_value='/* nothing */'
12246 if test "$cf_scanf_attribute" != no ; then
12247 cf_value='__attribute__((format(scanf,fmt,var)))'
12249 cat >>confdefs.h <<\EOF
12250 #define GCC_SCANF 1
12255 cat >>confdefs.h <<EOF
12256 #define GCC_SCANFLIKE(fmt,var) $cf_value
12262 cat >>confdefs.h <<EOF
12263 #define GCC_UNUSED $cf_directive
12271 fgrep define conftest.i >>confdefs.h
12276 ### use option --enable-assertions to turn on generation of assertion code
12277 echo "$as_me:12277: checking if you want to enable runtime assertions" >&5
12278 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12280 # Check whether --enable-assertions or --disable-assertions was given.
12281 if test "${enable_assertions+set}" = set; then
12282 enableval="$enable_assertions"
12283 with_assertions=$enableval
12287 echo "$as_me:12287: result: $with_assertions" >&5
12288 echo "${ECHO_T}$with_assertions" >&6
12291 if test "$with_assertions" = no
12293 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12296 ADAFLAGS="$ADAFLAGS -gnata"
12301 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12303 cat >>confdefs.h <<\EOF
12304 #define HAVE_NC_ALLOC_H 1
12307 ### use option --enable-expanded to generate certain macros as functions
12309 # Check whether --enable-expanded or --disable-expanded was given.
12310 if test "${enable_expanded+set}" = set; then
12311 enableval="$enable_expanded"
12312 test "$enableval" = yes &&
12313 cat >>confdefs.h <<\EOF
12314 #define NCURSES_EXPANDED 1
12319 ### use option --disable-macros to suppress macros in favor of functions
12321 # Check whether --enable-macros or --disable-macros was given.
12322 if test "${enable_macros+set}" = set; then
12323 enableval="$enable_macros"
12324 test "$enableval" = no &&
12325 cat >>confdefs.h <<\EOF
12326 #define NCURSES_NOMACROS 1
12331 # Normally we only add trace() to the debug-library. Allow this to be
12332 # extended to all models of the ncurses library:
12334 case "$CFLAGS $CPPFLAGS" in
12340 echo "$as_me:12340: checking whether to add trace feature to all models" >&5
12341 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12343 # Check whether --with-trace or --without-trace was given.
12344 if test "${with_trace+set}" = set; then
12345 withval="$with_trace"
12346 cf_with_trace=$withval
12348 cf_with_trace=$cf_all_traces
12350 echo "$as_me:12350: result: $cf_with_trace" >&5
12351 echo "${ECHO_T}$cf_with_trace" >&6
12353 if test "$cf_with_trace" = yes ; then
12359 cf_new_extra_cppflags=
12361 for cf_add_cflags in -DTRACE
12363 case $cf_fix_cppflags in
12365 case $cf_add_cflags in
12366 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12367 case $cf_add_cflags in
12369 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12372 && test -z "${cf_tst_cflags}" \
12373 && cf_fix_cppflags=yes
12375 if test $cf_fix_cppflags = yes ; then
12376 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12378 elif test "${cf_tst_cflags}" = "\"'" ; then
12379 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12384 case "$CPPFLAGS" in
12388 case $cf_add_cflags in
12390 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12392 CPPFLAGS=`echo "$CPPFLAGS" | \
12393 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12394 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12398 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12403 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12408 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12410 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12412 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12413 && test -z "${cf_tst_cflags}" \
12414 && cf_fix_cppflags=no
12419 if test -n "$cf_new_cflags" ; then
12421 CFLAGS="$CFLAGS $cf_new_cflags"
12424 if test -n "$cf_new_cppflags" ; then
12426 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12429 if test -n "$cf_new_extra_cppflags" ; then
12431 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12438 echo "$as_me:12438: checking if we want to use GNAT projects" >&5
12439 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12441 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12442 if test "${enable_gnat_projects+set}" = set; then
12443 enableval="$enable_gnat_projects"
12444 test "$enableval" != no && enableval=yes
12445 if test "$enableval" != "yes" ; then
12446 enable_gnat_projects=no
12448 enable_gnat_projects=yes
12452 enable_gnat_projects=yes
12455 echo "$as_me:12455: result: $enable_gnat_projects" >&5
12456 echo "${ECHO_T}$enable_gnat_projects" >&6
12458 ### Checks for libraries.
12459 case $cf_cv_system_name in
12463 echo "$as_me:12463: checking for gettimeofday" >&5
12464 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12465 if test "${ac_cv_func_gettimeofday+set}" = set; then
12466 echo $ECHO_N "(cached) $ECHO_C" >&6
12468 cat >conftest.$ac_ext <<_ACEOF
12469 #line 12469 "configure"
12470 #include "confdefs.h"
12471 /* System header to define __stub macros and hopefully few prototypes,
12472 which can conflict with char gettimeofday (); below. */
12473 #include <assert.h>
12474 /* Override any gcc2 internal prototype to avoid an error. */
12478 /* We use char because int might match the return type of a gcc2
12479 builtin and then its argument prototype would still apply. */
12480 char gettimeofday ();
12486 /* The GNU C library defines this for functions which it implements
12487 to always fail with ENOSYS. Some functions are actually named
12488 something starting with __ and the normal name is an alias. */
12489 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12492 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12499 rm -f conftest.$ac_objext conftest$ac_exeext
12500 if { (eval echo "$as_me:12500: \"$ac_link\"") >&5
12501 (eval $ac_link) 2>&5
12503 echo "$as_me:12503: \$? = $ac_status" >&5
12504 (exit $ac_status); } &&
12505 { ac_try='test -s conftest$ac_exeext'
12506 { (eval echo "$as_me:12506: \"$ac_try\"") >&5
12507 (eval $ac_try) 2>&5
12509 echo "$as_me:12509: \$? = $ac_status" >&5
12510 (exit $ac_status); }; }; then
12511 ac_cv_func_gettimeofday=yes
12513 echo "$as_me: failed program was:" >&5
12514 cat conftest.$ac_ext >&5
12515 ac_cv_func_gettimeofday=no
12517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12519 echo "$as_me:12519: result: $ac_cv_func_gettimeofday" >&5
12520 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12521 if test $ac_cv_func_gettimeofday = yes; then
12522 cat >>confdefs.h <<\EOF
12523 #define HAVE_GETTIMEOFDAY 1
12528 echo "$as_me:12528: checking for gettimeofday in -lbsd" >&5
12529 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12530 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
12533 ac_check_lib_save_LIBS=$LIBS
12535 cat >conftest.$ac_ext <<_ACEOF
12536 #line 12536 "configure"
12537 #include "confdefs.h"
12539 /* Override any gcc2 internal prototype to avoid an error. */
12543 /* We use char because int might match the return type of a gcc2
12544 builtin and then its argument prototype would still apply. */
12545 char gettimeofday ();
12554 rm -f conftest.$ac_objext conftest$ac_exeext
12555 if { (eval echo "$as_me:12555: \"$ac_link\"") >&5
12556 (eval $ac_link) 2>&5
12558 echo "$as_me:12558: \$? = $ac_status" >&5
12559 (exit $ac_status); } &&
12560 { ac_try='test -s conftest$ac_exeext'
12561 { (eval echo "$as_me:12561: \"$ac_try\"") >&5
12562 (eval $ac_try) 2>&5
12564 echo "$as_me:12564: \$? = $ac_status" >&5
12565 (exit $ac_status); }; }; then
12566 ac_cv_lib_bsd_gettimeofday=yes
12568 echo "$as_me: failed program was:" >&5
12569 cat conftest.$ac_ext >&5
12570 ac_cv_lib_bsd_gettimeofday=no
12572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12573 LIBS=$ac_check_lib_save_LIBS
12575 echo "$as_me:12575: result: $ac_cv_lib_bsd_gettimeofday" >&5
12576 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12577 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12579 cat >>confdefs.h <<\EOF
12580 #define HAVE_GETTIMEOFDAY 1
12590 ### Checks for header files.
12591 echo "$as_me:12591: checking for ANSI C header files" >&5
12592 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12593 if test "${ac_cv_header_stdc+set}" = set; then
12594 echo $ECHO_N "(cached) $ECHO_C" >&6
12596 cat >conftest.$ac_ext <<_ACEOF
12597 #line 12597 "configure"
12598 #include "confdefs.h"
12599 #include <stdlib.h>
12600 #include <stdarg.h>
12601 #include <string.h>
12605 if { (eval echo "$as_me:12605: \"$ac_cpp conftest.$ac_ext\"") >&5
12606 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12608 egrep -v '^ *\+' conftest.er1 >conftest.err
12610 cat conftest.err >&5
12611 echo "$as_me:12611: \$? = $ac_status" >&5
12612 (exit $ac_status); } >/dev/null; then
12613 if test -s conftest.err; then
12614 ac_cpp_err=$ac_c_preproc_warn_flag
12621 if test -z "$ac_cpp_err"; then
12622 ac_cv_header_stdc=yes
12624 echo "$as_me: failed program was:" >&5
12625 cat conftest.$ac_ext >&5
12626 ac_cv_header_stdc=no
12628 rm -f conftest.err conftest.$ac_ext
12630 if test $ac_cv_header_stdc = yes; then
12631 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12632 cat >conftest.$ac_ext <<_ACEOF
12633 #line 12633 "configure"
12634 #include "confdefs.h"
12635 #include <string.h>
12638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12639 egrep "memchr" >/dev/null 2>&1; then
12642 ac_cv_header_stdc=no
12648 if test $ac_cv_header_stdc = yes; then
12649 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12650 cat >conftest.$ac_ext <<_ACEOF
12651 #line 12651 "configure"
12652 #include "confdefs.h"
12653 #include <stdlib.h>
12656 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12657 egrep "free" >/dev/null 2>&1; then
12660 ac_cv_header_stdc=no
12666 if test $ac_cv_header_stdc = yes; then
12667 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12668 if test "$cross_compiling" = yes; then
12671 cat >conftest.$ac_ext <<_ACEOF
12672 #line 12672 "configure"
12673 #include "confdefs.h"
12675 #if ((' ' & 0x0FF) == 0x020)
12676 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12677 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12679 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12680 || ('j' <= (c) && (c) <= 'r') \
12681 || ('s' <= (c) && (c) <= 'z'))
12682 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12685 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12690 for (i = 0; i < 256; i++)
12691 if (XOR (islower (i), ISLOWER (i))
12692 || toupper (i) != TOUPPER (i))
12693 $ac_main_return(2);
12694 $ac_main_return (0);
12697 rm -f conftest$ac_exeext
12698 if { (eval echo "$as_me:12698: \"$ac_link\"") >&5
12699 (eval $ac_link) 2>&5
12701 echo "$as_me:12701: \$? = $ac_status" >&5
12702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12703 { (eval echo "$as_me:12703: \"$ac_try\"") >&5
12704 (eval $ac_try) 2>&5
12706 echo "$as_me:12706: \$? = $ac_status" >&5
12707 (exit $ac_status); }; }; then
12710 echo "$as_me: program exited with status $ac_status" >&5
12711 echo "$as_me: failed program was:" >&5
12712 cat conftest.$ac_ext >&5
12713 ac_cv_header_stdc=no
12715 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12719 echo "$as_me:12719: result: $ac_cv_header_stdc" >&5
12720 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12721 if test $ac_cv_header_stdc = yes; then
12723 cat >>confdefs.h <<\EOF
12724 #define STDC_HEADERS 1
12729 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12731 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12732 inttypes.h stdint.h unistd.h
12734 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12735 echo "$as_me:12735: checking for $ac_header" >&5
12736 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12737 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12738 echo $ECHO_N "(cached) $ECHO_C" >&6
12740 cat >conftest.$ac_ext <<_ACEOF
12741 #line 12741 "configure"
12742 #include "confdefs.h"
12743 $ac_includes_default
12744 #include <$ac_header>
12746 rm -f conftest.$ac_objext
12747 if { (eval echo "$as_me:12747: \"$ac_compile\"") >&5
12748 (eval $ac_compile) 2>&5
12750 echo "$as_me:12750: \$? = $ac_status" >&5
12751 (exit $ac_status); } &&
12752 { ac_try='test -s conftest.$ac_objext'
12753 { (eval echo "$as_me:12753: \"$ac_try\"") >&5
12754 (eval $ac_try) 2>&5
12756 echo "$as_me:12756: \$? = $ac_status" >&5
12757 (exit $ac_status); }; }; then
12758 eval "$as_ac_Header=yes"
12760 echo "$as_me: failed program was:" >&5
12761 cat conftest.$ac_ext >&5
12762 eval "$as_ac_Header=no"
12764 rm -f conftest.$ac_objext conftest.$ac_ext
12766 echo "$as_me:12766: result: `eval echo '${'$as_ac_Header'}'`" >&5
12767 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12768 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12769 cat >>confdefs.h <<EOF
12770 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12776 echo "$as_me:12776: checking for signed char" >&5
12777 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12778 if test "${ac_cv_type_signed_char+set}" = set; then
12779 echo $ECHO_N "(cached) $ECHO_C" >&6
12781 cat >conftest.$ac_ext <<_ACEOF
12782 #line 12782 "configure"
12783 #include "confdefs.h"
12784 $ac_includes_default
12788 if ((signed char *) 0)
12790 if (sizeof (signed char))
12796 rm -f conftest.$ac_objext
12797 if { (eval echo "$as_me:12797: \"$ac_compile\"") >&5
12798 (eval $ac_compile) 2>&5
12800 echo "$as_me:12800: \$? = $ac_status" >&5
12801 (exit $ac_status); } &&
12802 { ac_try='test -s conftest.$ac_objext'
12803 { (eval echo "$as_me:12803: \"$ac_try\"") >&5
12804 (eval $ac_try) 2>&5
12806 echo "$as_me:12806: \$? = $ac_status" >&5
12807 (exit $ac_status); }; }; then
12808 ac_cv_type_signed_char=yes
12810 echo "$as_me: failed program was:" >&5
12811 cat conftest.$ac_ext >&5
12812 ac_cv_type_signed_char=no
12814 rm -f conftest.$ac_objext conftest.$ac_ext
12816 echo "$as_me:12816: result: $ac_cv_type_signed_char" >&5
12817 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12819 echo "$as_me:12819: checking size of signed char" >&5
12820 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12821 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12822 echo $ECHO_N "(cached) $ECHO_C" >&6
12824 if test "$ac_cv_type_signed_char" = yes; then
12825 if test "$cross_compiling" = yes; then
12826 # Depending upon the size, compute the lo and hi bounds.
12827 cat >conftest.$ac_ext <<_ACEOF
12828 #line 12828 "configure"
12829 #include "confdefs.h"
12830 $ac_includes_default
12834 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12839 rm -f conftest.$ac_objext
12840 if { (eval echo "$as_me:12840: \"$ac_compile\"") >&5
12841 (eval $ac_compile) 2>&5
12843 echo "$as_me:12843: \$? = $ac_status" >&5
12844 (exit $ac_status); } &&
12845 { ac_try='test -s conftest.$ac_objext'
12846 { (eval echo "$as_me:12846: \"$ac_try\"") >&5
12847 (eval $ac_try) 2>&5
12849 echo "$as_me:12849: \$? = $ac_status" >&5
12850 (exit $ac_status); }; }; then
12853 cat >conftest.$ac_ext <<_ACEOF
12854 #line 12854 "configure"
12855 #include "confdefs.h"
12856 $ac_includes_default
12860 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12865 rm -f conftest.$ac_objext
12866 if { (eval echo "$as_me:12866: \"$ac_compile\"") >&5
12867 (eval $ac_compile) 2>&5
12869 echo "$as_me:12869: \$? = $ac_status" >&5
12870 (exit $ac_status); } &&
12871 { ac_try='test -s conftest.$ac_objext'
12872 { (eval echo "$as_me:12872: \"$ac_try\"") >&5
12873 (eval $ac_try) 2>&5
12875 echo "$as_me:12875: \$? = $ac_status" >&5
12876 (exit $ac_status); }; }; then
12877 ac_hi=$ac_mid; break
12879 echo "$as_me: failed program was:" >&5
12880 cat conftest.$ac_ext >&5
12881 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12883 rm -f conftest.$ac_objext conftest.$ac_ext
12886 echo "$as_me: failed program was:" >&5
12887 cat conftest.$ac_ext >&5
12890 cat >conftest.$ac_ext <<_ACEOF
12891 #line 12891 "configure"
12892 #include "confdefs.h"
12893 $ac_includes_default
12897 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12902 rm -f conftest.$ac_objext
12903 if { (eval echo "$as_me:12903: \"$ac_compile\"") >&5
12904 (eval $ac_compile) 2>&5
12906 echo "$as_me:12906: \$? = $ac_status" >&5
12907 (exit $ac_status); } &&
12908 { ac_try='test -s conftest.$ac_objext'
12909 { (eval echo "$as_me:12909: \"$ac_try\"") >&5
12910 (eval $ac_try) 2>&5
12912 echo "$as_me:12912: \$? = $ac_status" >&5
12913 (exit $ac_status); }; }; then
12914 ac_lo=$ac_mid; break
12916 echo "$as_me: failed program was:" >&5
12917 cat conftest.$ac_ext >&5
12918 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12920 rm -f conftest.$ac_objext conftest.$ac_ext
12923 rm -f conftest.$ac_objext conftest.$ac_ext
12924 # Binary search between lo and hi bounds.
12925 while test "x$ac_lo" != "x$ac_hi"; do
12926 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12927 cat >conftest.$ac_ext <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12930 $ac_includes_default
12934 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12939 rm -f conftest.$ac_objext
12940 if { (eval echo "$as_me:12940: \"$ac_compile\"") >&5
12941 (eval $ac_compile) 2>&5
12943 echo "$as_me:12943: \$? = $ac_status" >&5
12944 (exit $ac_status); } &&
12945 { ac_try='test -s conftest.$ac_objext'
12946 { (eval echo "$as_me:12946: \"$ac_try\"") >&5
12947 (eval $ac_try) 2>&5
12949 echo "$as_me:12949: \$? = $ac_status" >&5
12950 (exit $ac_status); }; }; then
12953 echo "$as_me: failed program was:" >&5
12954 cat conftest.$ac_ext >&5
12955 ac_lo=`expr $ac_mid + 1`
12957 rm -f conftest.$ac_objext conftest.$ac_ext
12959 ac_cv_sizeof_signed_char=$ac_lo
12961 if test "$cross_compiling" = yes; then
12962 { { echo "$as_me:12962: error: cannot run test program while cross compiling" >&5
12963 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12964 { (exit 1); exit 1; }; }
12966 cat >conftest.$ac_ext <<_ACEOF
12967 #line 12967 "configure"
12968 #include "confdefs.h"
12969 $ac_includes_default
12973 FILE *f = fopen ("conftest.val", "w");
12975 $ac_main_return (1);
12976 fprintf (f, "%d", (sizeof (signed char)));
12982 rm -f conftest$ac_exeext
12983 if { (eval echo "$as_me:12983: \"$ac_link\"") >&5
12984 (eval $ac_link) 2>&5
12986 echo "$as_me:12986: \$? = $ac_status" >&5
12987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12988 { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989 (eval $ac_try) 2>&5
12991 echo "$as_me:12991: \$? = $ac_status" >&5
12992 (exit $ac_status); }; }; then
12993 ac_cv_sizeof_signed_char=`cat conftest.val`
12995 echo "$as_me: program exited with status $ac_status" >&5
12996 echo "$as_me: failed program was:" >&5
12997 cat conftest.$ac_ext >&5
12999 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13004 ac_cv_sizeof_signed_char=0
13007 echo "$as_me:13007: result: $ac_cv_sizeof_signed_char" >&5
13008 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13009 cat >>confdefs.h <<EOF
13010 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13013 echo "$as_me:13013: checking for ANSI C header files" >&5
13014 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13015 if test "${ac_cv_header_stdc+set}" = set; then
13016 echo $ECHO_N "(cached) $ECHO_C" >&6
13018 cat >conftest.$ac_ext <<_ACEOF
13019 #line 13019 "configure"
13020 #include "confdefs.h"
13021 #include <stdlib.h>
13022 #include <stdarg.h>
13023 #include <string.h>
13027 if { (eval echo "$as_me:13027: \"$ac_cpp conftest.$ac_ext\"") >&5
13028 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13030 egrep -v '^ *\+' conftest.er1 >conftest.err
13032 cat conftest.err >&5
13033 echo "$as_me:13033: \$? = $ac_status" >&5
13034 (exit $ac_status); } >/dev/null; then
13035 if test -s conftest.err; then
13036 ac_cpp_err=$ac_c_preproc_warn_flag
13043 if test -z "$ac_cpp_err"; then
13044 ac_cv_header_stdc=yes
13046 echo "$as_me: failed program was:" >&5
13047 cat conftest.$ac_ext >&5
13048 ac_cv_header_stdc=no
13050 rm -f conftest.err conftest.$ac_ext
13052 if test $ac_cv_header_stdc = yes; then
13053 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13054 cat >conftest.$ac_ext <<_ACEOF
13055 #line 13055 "configure"
13056 #include "confdefs.h"
13057 #include <string.h>
13060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13061 egrep "memchr" >/dev/null 2>&1; then
13064 ac_cv_header_stdc=no
13070 if test $ac_cv_header_stdc = yes; then
13071 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13072 cat >conftest.$ac_ext <<_ACEOF
13073 #line 13073 "configure"
13074 #include "confdefs.h"
13075 #include <stdlib.h>
13078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13079 egrep "free" >/dev/null 2>&1; then
13082 ac_cv_header_stdc=no
13088 if test $ac_cv_header_stdc = yes; then
13089 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13090 if test "$cross_compiling" = yes; then
13093 cat >conftest.$ac_ext <<_ACEOF
13094 #line 13094 "configure"
13095 #include "confdefs.h"
13097 #if ((' ' & 0x0FF) == 0x020)
13098 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13099 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13101 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13102 || ('j' <= (c) && (c) <= 'r') \
13103 || ('s' <= (c) && (c) <= 'z'))
13104 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13107 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13112 for (i = 0; i < 256; i++)
13113 if (XOR (islower (i), ISLOWER (i))
13114 || toupper (i) != TOUPPER (i))
13115 $ac_main_return(2);
13116 $ac_main_return (0);
13119 rm -f conftest$ac_exeext
13120 if { (eval echo "$as_me:13120: \"$ac_link\"") >&5
13121 (eval $ac_link) 2>&5
13123 echo "$as_me:13123: \$? = $ac_status" >&5
13124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13125 { (eval echo "$as_me:13125: \"$ac_try\"") >&5
13126 (eval $ac_try) 2>&5
13128 echo "$as_me:13128: \$? = $ac_status" >&5
13129 (exit $ac_status); }; }; then
13132 echo "$as_me: program exited with status $ac_status" >&5
13133 echo "$as_me: failed program was:" >&5
13134 cat conftest.$ac_ext >&5
13135 ac_cv_header_stdc=no
13137 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13141 echo "$as_me:13141: result: $ac_cv_header_stdc" >&5
13142 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13143 if test $ac_cv_header_stdc = yes; then
13145 cat >>confdefs.h <<\EOF
13146 #define STDC_HEADERS 1
13151 ac_header_dirent=no
13152 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13153 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13154 echo "$as_me:13154: checking for $ac_hdr that defines DIR" >&5
13155 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13157 echo $ECHO_N "(cached) $ECHO_C" >&6
13159 cat >conftest.$ac_ext <<_ACEOF
13160 #line 13160 "configure"
13161 #include "confdefs.h"
13162 #include <sys/types.h>
13174 rm -f conftest.$ac_objext
13175 if { (eval echo "$as_me:13175: \"$ac_compile\"") >&5
13176 (eval $ac_compile) 2>&5
13178 echo "$as_me:13178: \$? = $ac_status" >&5
13179 (exit $ac_status); } &&
13180 { ac_try='test -s conftest.$ac_objext'
13181 { (eval echo "$as_me:13181: \"$ac_try\"") >&5
13182 (eval $ac_try) 2>&5
13184 echo "$as_me:13184: \$? = $ac_status" >&5
13185 (exit $ac_status); }; }; then
13186 eval "$as_ac_Header=yes"
13188 echo "$as_me: failed program was:" >&5
13189 cat conftest.$ac_ext >&5
13190 eval "$as_ac_Header=no"
13192 rm -f conftest.$ac_objext conftest.$ac_ext
13194 echo "$as_me:13194: result: `eval echo '${'$as_ac_Header'}'`" >&5
13195 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13196 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13197 cat >>confdefs.h <<EOF
13198 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13201 ac_header_dirent=$ac_hdr; break
13205 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13206 if test $ac_header_dirent = dirent.h; then
13207 echo "$as_me:13207: checking for opendir in -ldir" >&5
13208 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13209 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13210 echo $ECHO_N "(cached) $ECHO_C" >&6
13212 ac_check_lib_save_LIBS=$LIBS
13214 cat >conftest.$ac_ext <<_ACEOF
13215 #line 13215 "configure"
13216 #include "confdefs.h"
13218 /* Override any gcc2 internal prototype to avoid an error. */
13222 /* We use char because int might match the return type of a gcc2
13223 builtin and then its argument prototype would still apply. */
13233 rm -f conftest.$ac_objext conftest$ac_exeext
13234 if { (eval echo "$as_me:13234: \"$ac_link\"") >&5
13235 (eval $ac_link) 2>&5
13237 echo "$as_me:13237: \$? = $ac_status" >&5
13238 (exit $ac_status); } &&
13239 { ac_try='test -s conftest$ac_exeext'
13240 { (eval echo "$as_me:13240: \"$ac_try\"") >&5
13241 (eval $ac_try) 2>&5
13243 echo "$as_me:13243: \$? = $ac_status" >&5
13244 (exit $ac_status); }; }; then
13245 ac_cv_lib_dir_opendir=yes
13247 echo "$as_me: failed program was:" >&5
13248 cat conftest.$ac_ext >&5
13249 ac_cv_lib_dir_opendir=no
13251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13252 LIBS=$ac_check_lib_save_LIBS
13254 echo "$as_me:13254: result: $ac_cv_lib_dir_opendir" >&5
13255 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13256 if test $ac_cv_lib_dir_opendir = yes; then
13261 echo "$as_me:13261: checking for opendir in -lx" >&5
13262 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13263 if test "${ac_cv_lib_x_opendir+set}" = set; then
13264 echo $ECHO_N "(cached) $ECHO_C" >&6
13266 ac_check_lib_save_LIBS=$LIBS
13268 cat >conftest.$ac_ext <<_ACEOF
13269 #line 13269 "configure"
13270 #include "confdefs.h"
13272 /* Override any gcc2 internal prototype to avoid an error. */
13276 /* We use char because int might match the return type of a gcc2
13277 builtin and then its argument prototype would still apply. */
13287 rm -f conftest.$ac_objext conftest$ac_exeext
13288 if { (eval echo "$as_me:13288: \"$ac_link\"") >&5
13289 (eval $ac_link) 2>&5
13291 echo "$as_me:13291: \$? = $ac_status" >&5
13292 (exit $ac_status); } &&
13293 { ac_try='test -s conftest$ac_exeext'
13294 { (eval echo "$as_me:13294: \"$ac_try\"") >&5
13295 (eval $ac_try) 2>&5
13297 echo "$as_me:13297: \$? = $ac_status" >&5
13298 (exit $ac_status); }; }; then
13299 ac_cv_lib_x_opendir=yes
13301 echo "$as_me: failed program was:" >&5
13302 cat conftest.$ac_ext >&5
13303 ac_cv_lib_x_opendir=no
13305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13306 LIBS=$ac_check_lib_save_LIBS
13308 echo "$as_me:13308: result: $ac_cv_lib_x_opendir" >&5
13309 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13310 if test $ac_cv_lib_x_opendir = yes; then
13316 echo "$as_me:13316: checking whether time.h and sys/time.h may both be included" >&5
13317 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13318 if test "${ac_cv_header_time+set}" = set; then
13319 echo $ECHO_N "(cached) $ECHO_C" >&6
13321 cat >conftest.$ac_ext <<_ACEOF
13322 #line 13322 "configure"
13323 #include "confdefs.h"
13324 #include <sys/types.h>
13325 #include <sys/time.h>
13331 if ((struct tm *) 0)
13337 rm -f conftest.$ac_objext
13338 if { (eval echo "$as_me:13338: \"$ac_compile\"") >&5
13339 (eval $ac_compile) 2>&5
13341 echo "$as_me:13341: \$? = $ac_status" >&5
13342 (exit $ac_status); } &&
13343 { ac_try='test -s conftest.$ac_objext'
13344 { (eval echo "$as_me:13344: \"$ac_try\"") >&5
13345 (eval $ac_try) 2>&5
13347 echo "$as_me:13347: \$? = $ac_status" >&5
13348 (exit $ac_status); }; }; then
13349 ac_cv_header_time=yes
13351 echo "$as_me: failed program was:" >&5
13352 cat conftest.$ac_ext >&5
13353 ac_cv_header_time=no
13355 rm -f conftest.$ac_objext conftest.$ac_ext
13357 echo "$as_me:13357: result: $ac_cv_header_time" >&5
13358 echo "${ECHO_T}$ac_cv_header_time" >&6
13359 if test $ac_cv_header_time = yes; then
13361 cat >>confdefs.h <<\EOF
13362 #define TIME_WITH_SYS_TIME 1
13367 ### checks for compiler characteristics
13369 ac_cpp='$CPP $CPPFLAGS'
13370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13373 ac_main_return=return
13375 echo "$as_me:13375: checking for an ANSI C-conforming const" >&5
13376 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13377 if test "${ac_cv_c_const+set}" = set; then
13378 echo $ECHO_N "(cached) $ECHO_C" >&6
13380 cat >conftest.$ac_ext <<_ACEOF
13381 #line 13381 "configure"
13382 #include "confdefs.h"
13387 /* FIXME: Include the comments suggested by Paul. */
13388 #ifndef __cplusplus
13389 /* Ultrix mips cc rejects this. */
13390 typedef int charset[2];
13392 /* SunOS 4.1.1 cc rejects this. */
13393 char const *const *ccp;
13395 /* NEC SVR4.0.2 mips cc rejects this. */
13396 struct point {int x, y;};
13397 static struct point const zero = {0,0};
13398 /* AIX XL C 1.02.0.0 rejects this.
13399 It does not let you subtract one const X* pointer from another in
13400 an arm of an if-expression whose if-part is not a constant
13402 const char *g = "string";
13403 ccp = &g + (g ? g-g : 0);
13404 /* HPUX 7.0 cc rejects these. */
13407 ccp = (char const *const *) p;
13408 { /* SCO 3.2v4 cc rejects this. */
13410 char const *s = 0 ? (char *) 0 : (char const *) 0;
13414 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13415 int x[] = {25, 17};
13416 const int *foo = &x[0];
13419 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13420 typedef const int *iptr;
13424 { /* AIX XL C 1.02.0.0 rejects this saying
13425 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13426 struct s { int j; const int *ap[3]; };
13427 struct s *b; b->j = 5;
13429 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13430 const int foo = 10;
13438 rm -f conftest.$ac_objext
13439 if { (eval echo "$as_me:13439: \"$ac_compile\"") >&5
13440 (eval $ac_compile) 2>&5
13442 echo "$as_me:13442: \$? = $ac_status" >&5
13443 (exit $ac_status); } &&
13444 { ac_try='test -s conftest.$ac_objext'
13445 { (eval echo "$as_me:13445: \"$ac_try\"") >&5
13446 (eval $ac_try) 2>&5
13448 echo "$as_me:13448: \$? = $ac_status" >&5
13449 (exit $ac_status); }; }; then
13452 echo "$as_me: failed program was:" >&5
13453 cat conftest.$ac_ext >&5
13456 rm -f conftest.$ac_objext conftest.$ac_ext
13458 echo "$as_me:13458: result: $ac_cv_c_const" >&5
13459 echo "${ECHO_T}$ac_cv_c_const" >&6
13460 if test $ac_cv_c_const = no; then
13462 cat >>confdefs.h <<\EOF
13468 ### Checks for external-data
13470 echo "$as_me:13470: checking if data-only library module links" >&5
13471 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13472 if test "${cf_cv_link_dataonly+set}" = set; then
13473 echo $ECHO_N "(cached) $ECHO_C" >&6
13477 cat >conftest.$ac_ext <<EOF
13478 #line 13478 "configure"
13479 int testdata[3] = { 123, 456, 789 };
13481 if { (eval echo "$as_me:13481: \"$ac_compile\"") >&5
13482 (eval $ac_compile) 2>&5
13484 echo "$as_me:13484: \$? = $ac_status" >&5
13485 (exit $ac_status); } ; then
13486 mv conftest.o data.o && \
13487 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13489 rm -f conftest.$ac_ext data.o
13490 cat >conftest.$ac_ext <<EOF
13491 #line 13491 "configure"
13495 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
13497 extern int testdata[3];
13498 return testdata[0] == 123
13499 && testdata[1] == 456
13500 && testdata[2] == 789;
13504 if { (eval echo "$as_me:13504: \"$ac_compile\"") >&5
13505 (eval $ac_compile) 2>&5
13507 echo "$as_me:13507: \$? = $ac_status" >&5
13508 (exit $ac_status); }; then
13509 mv conftest.o func.o && \
13510 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13512 rm -f conftest.$ac_ext func.o
13513 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13514 cf_saveLIBS="$LIBS"
13515 LIBS="conftest.a $LIBS"
13516 if test "$cross_compiling" = yes; then
13517 cf_cv_link_dataonly=unknown
13519 cat >conftest.$ac_ext <<_ACEOF
13520 #line 13520 "configure"
13521 #include "confdefs.h"
13525 extern int testfunc();
13526 ${cf_cv_main_return:-return} (!testfunc());
13530 rm -f conftest$ac_exeext
13531 if { (eval echo "$as_me:13531: \"$ac_link\"") >&5
13532 (eval $ac_link) 2>&5
13534 echo "$as_me:13534: \$? = $ac_status" >&5
13535 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13536 { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537 (eval $ac_try) 2>&5
13539 echo "$as_me:13539: \$? = $ac_status" >&5
13540 (exit $ac_status); }; }; then
13541 cf_cv_link_dataonly=yes
13543 echo "$as_me: program exited with status $ac_status" >&5
13544 echo "$as_me: failed program was:" >&5
13545 cat conftest.$ac_ext >&5
13546 cf_cv_link_dataonly=no
13548 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13550 LIBS="$cf_saveLIBS"
13554 echo "$as_me:13554: result: $cf_cv_link_dataonly" >&5
13555 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13557 if test "$cf_cv_link_dataonly" = no ; then
13559 cat >>confdefs.h <<\EOF
13560 #define BROKEN_LINKER 1
13566 ### Checks for library functions.
13572 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13573 echo "$as_me:13573: checking for $ac_header" >&5
13574 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13576 echo $ECHO_N "(cached) $ECHO_C" >&6
13578 cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 #include <$ac_header>
13583 if { (eval echo "$as_me:13583: \"$ac_cpp conftest.$ac_ext\"") >&5
13584 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13586 egrep -v '^ *\+' conftest.er1 >conftest.err
13588 cat conftest.err >&5
13589 echo "$as_me:13589: \$? = $ac_status" >&5
13590 (exit $ac_status); } >/dev/null; then
13591 if test -s conftest.err; then
13592 ac_cpp_err=$ac_c_preproc_warn_flag
13599 if test -z "$ac_cpp_err"; then
13600 eval "$as_ac_Header=yes"
13602 echo "$as_me: failed program was:" >&5
13603 cat conftest.$ac_ext >&5
13604 eval "$as_ac_Header=no"
13606 rm -f conftest.err conftest.$ac_ext
13608 echo "$as_me:13608: result: `eval echo '${'$as_ac_Header'}'`" >&5
13609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13610 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13611 cat >>confdefs.h <<EOF
13612 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13618 echo "$as_me:13618: checking for working mkstemp" >&5
13619 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13620 if test "${cf_cv_func_mkstemp+set}" = set; then
13621 echo $ECHO_N "(cached) $ECHO_C" >&6
13625 if test "$cross_compiling" = yes; then
13626 cf_cv_func_mkstemp=maybe
13628 cat >conftest.$ac_ext <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13632 #include <sys/types.h>
13633 #ifdef HAVE_UNISTD_H
13634 #include <unistd.h>
13636 #include <stdlib.h>
13638 #include <string.h>
13639 #include <sys/stat.h>
13642 char *tmpl = "conftestXXXXXX";
13650 for (n = 0; n < 2; ++n) {
13651 strcpy(name[n], tmpl);
13652 if ((fd = mkstemp(name[n])) >= 0) {
13653 if (!strcmp(name[n], tmpl)
13654 || stat(name[n], &sb) != 0
13655 || (sb.st_mode & S_IFMT) != S_IFREG
13656 || (sb.st_mode & 077) != 0) {
13663 && !strcmp(name[0], name[1]))
13665 ${cf_cv_main_return:-return}(result);
13669 rm -f conftest$ac_exeext
13670 if { (eval echo "$as_me:13670: \"$ac_link\"") >&5
13671 (eval $ac_link) 2>&5
13673 echo "$as_me:13673: \$? = $ac_status" >&5
13674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13675 { (eval echo "$as_me:13675: \"$ac_try\"") >&5
13676 (eval $ac_try) 2>&5
13678 echo "$as_me:13678: \$? = $ac_status" >&5
13679 (exit $ac_status); }; }; then
13680 cf_cv_func_mkstemp=yes
13683 echo "$as_me: program exited with status $ac_status" >&5
13684 echo "$as_me: failed program was:" >&5
13685 cat conftest.$ac_ext >&5
13686 cf_cv_func_mkstemp=no
13689 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13693 echo "$as_me:13693: result: $cf_cv_func_mkstemp" >&5
13694 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13695 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13696 echo "$as_me:13696: checking for mkstemp" >&5
13697 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13698 if test "${ac_cv_func_mkstemp+set}" = set; then
13699 echo $ECHO_N "(cached) $ECHO_C" >&6
13701 cat >conftest.$ac_ext <<_ACEOF
13702 #line 13702 "configure"
13703 #include "confdefs.h"
13704 /* System header to define __stub macros and hopefully few prototypes,
13705 which can conflict with char mkstemp (); below. */
13706 #include <assert.h>
13707 /* Override any gcc2 internal prototype to avoid an error. */
13711 /* We use char because int might match the return type of a gcc2
13712 builtin and then its argument prototype would still apply. */
13719 /* The GNU C library defines this for functions which it implements
13720 to always fail with ENOSYS. Some functions are actually named
13721 something starting with __ and the normal name is an alias. */
13722 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13725 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13732 rm -f conftest.$ac_objext conftest$ac_exeext
13733 if { (eval echo "$as_me:13733: \"$ac_link\"") >&5
13734 (eval $ac_link) 2>&5
13736 echo "$as_me:13736: \$? = $ac_status" >&5
13737 (exit $ac_status); } &&
13738 { ac_try='test -s conftest$ac_exeext'
13739 { (eval echo "$as_me:13739: \"$ac_try\"") >&5
13740 (eval $ac_try) 2>&5
13742 echo "$as_me:13742: \$? = $ac_status" >&5
13743 (exit $ac_status); }; }; then
13744 ac_cv_func_mkstemp=yes
13746 echo "$as_me: failed program was:" >&5
13747 cat conftest.$ac_ext >&5
13748 ac_cv_func_mkstemp=no
13750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13752 echo "$as_me:13752: result: $ac_cv_func_mkstemp" >&5
13753 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13756 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13758 cat >>confdefs.h <<\EOF
13759 #define HAVE_MKSTEMP 1
13764 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13765 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13766 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13770 if test "$cf_with_ada" != "no" ; then
13772 cf_ada_make=gnatmake
13773 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13774 set dummy $cf_ada_make; ac_word=$2
13775 echo "$as_me:13775: checking for $ac_word" >&5
13776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13777 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13778 echo $ECHO_N "(cached) $ECHO_C" >&6
13780 if test -n "$gnat_exists"; then
13781 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13783 ac_save_IFS=$IFS; IFS=$ac_path_separator
13785 for ac_dir in $ac_dummy; do
13787 test -z "$ac_dir" && ac_dir=.
13788 $as_executable_p "$ac_dir/$ac_word" || continue
13789 ac_cv_prog_gnat_exists="yes"
13790 echo "$as_me:13790: found $ac_dir/$ac_word" >&5
13794 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13797 gnat_exists=$ac_cv_prog_gnat_exists
13798 if test -n "$gnat_exists"; then
13799 echo "$as_me:13799: result: $gnat_exists" >&5
13800 echo "${ECHO_T}$gnat_exists" >&6
13802 echo "$as_me:13802: result: no" >&5
13803 echo "${ECHO_T}no" >&6
13806 if test "$ac_cv_prog_gnat_exists" = no; then
13808 cf_cv_prog_gnat_correct=no
13811 echo "$as_me:13811: checking for gnat version" >&5
13812 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13813 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13814 grep '[0-9].[0-9][0-9]*' |\
13815 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13816 echo "$as_me:13816: result: $cf_gnat_version" >&5
13817 echo "${ECHO_T}$cf_gnat_version" >&6
13819 case $cf_gnat_version in
13820 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13821 cf_cv_prog_gnat_correct=yes
13824 { echo "$as_me:13824: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13825 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13826 cf_cv_prog_gnat_correct=no
13830 # Extract the first word of "m4", so it can be a program name with args.
13831 set dummy m4; ac_word=$2
13832 echo "$as_me:13832: checking for $ac_word" >&5
13833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13834 if test "${ac_cv_prog_M4_exists+set}" = set; then
13835 echo $ECHO_N "(cached) $ECHO_C" >&6
13837 if test -n "$M4_exists"; then
13838 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13840 ac_save_IFS=$IFS; IFS=$ac_path_separator
13842 for ac_dir in $ac_dummy; do
13844 test -z "$ac_dir" && ac_dir=.
13845 $as_executable_p "$ac_dir/$ac_word" || continue
13846 ac_cv_prog_M4_exists="yes"
13847 echo "$as_me:13847: found $ac_dir/$ac_word" >&5
13851 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13854 M4_exists=$ac_cv_prog_M4_exists
13855 if test -n "$M4_exists"; then
13856 echo "$as_me:13856: result: $M4_exists" >&5
13857 echo "${ECHO_T}$M4_exists" >&6
13859 echo "$as_me:13859: result: no" >&5
13860 echo "${ECHO_T}no" >&6
13863 if test "$ac_cv_prog_M4_exists" = no; then
13864 cf_cv_prog_gnat_correct=no
13865 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13867 if test "$cf_cv_prog_gnat_correct" = yes; then
13868 echo "$as_me:13868: checking if GNAT works" >&5
13869 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13871 rm -rf conftest* *~conftest*
13872 cat >>conftest.ads <<CF_EOF
13873 procedure conftest;
13875 cat >>conftest.adb <<CF_EOF
13878 procedure conftest is
13880 Text_IO.Put ("Hello World");
13882 GNAT.OS_Lib.OS_Exit (0);
13885 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13886 if ( ./conftest 1>&5 2>&1 ) ; then
13887 cf_cv_prog_gnat_correct=yes
13889 cf_cv_prog_gnat_correct=no
13892 cf_cv_prog_gnat_correct=no
13894 rm -rf conftest* *~conftest*
13896 echo "$as_me:13896: result: $cf_cv_prog_gnat_correct" >&5
13897 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13901 if test "$cf_cv_prog_gnat_correct" = yes; then
13903 echo "$as_me:13903: checking optimization options for ADAFLAGS" >&5
13904 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13908 ADAFLAGS="$ADAFLAGS -g"
13914 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13916 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13920 echo "$as_me:13920: result: $ADAFLAGS" >&5
13921 echo "${ECHO_T}$ADAFLAGS" >&6
13923 echo "$as_me:13923: checking if GNATPREP supports -T option" >&5
13924 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13925 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13926 echo $ECHO_N "(cached) $ECHO_C" >&6
13929 cf_cv_gnatprep_opt_t=no
13930 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13933 echo "$as_me:13933: result: $cf_cv_gnatprep_opt_t" >&5
13934 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13935 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13937 echo "$as_me:13937: checking if GNAT supports generics" >&5
13938 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13939 case $cf_gnat_version in
13941 cf_gnat_generics=yes
13944 cf_gnat_generics=no
13947 echo "$as_me:13947: result: $cf_gnat_generics" >&5
13948 echo "${ECHO_T}$cf_gnat_generics" >&6
13950 if test "$cf_gnat_generics" = yes
13952 cf_compile_generics=generics
13953 cf_generic_objects="\${GENOBJS}"
13955 cf_compile_generics=
13956 cf_generic_objects=
13959 echo "$as_me:13959: checking if GNAT supports SIGINT" >&5
13960 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13961 if test "${cf_cv_gnat_sigint+set}" = set; then
13962 echo $ECHO_N "(cached) $ECHO_C" >&6
13965 rm -rf conftest* *~conftest*
13966 cat >>conftest.ads <<CF_EOF
13967 with Ada.Interrupts.Names;
13969 package ConfTest is
13971 pragma Warnings (Off); -- the next pragma exists since 3.11p
13972 pragma Unreserve_All_Interrupts;
13973 pragma Warnings (On);
13975 protected Process is
13977 function Continue return Boolean;
13978 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13980 Done : Boolean := False;
13985 cat >>conftest.adb <<CF_EOF
13986 package body ConfTest is
13987 protected body Process is
13992 function Continue return Boolean is
13999 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14000 cf_cv_gnat_sigint=yes
14002 cf_cv_gnat_sigint=no
14004 rm -rf conftest* *~conftest*
14007 echo "$as_me:14007: result: $cf_cv_gnat_sigint" >&5
14008 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
14010 if test $cf_cv_gnat_sigint = yes ; then
14013 USE_GNAT_SIGINT="#"
14016 cf_gnat_libraries=no
14017 cf_gnat_projects=no
14019 if test "$enable_gnat_projects" != no ; then
14020 echo "$as_me:14020: checking if GNAT supports project files" >&5
14021 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
14022 case $cf_gnat_version in
14026 case $cf_cv_system_name in
14030 mkdir conftest.src conftest.bin conftest.lib
14032 rm -rf conftest* *~conftest*
14033 cat >>library.gpr <<CF_EOF
14035 Kind := External ("LIB_KIND");
14036 for Library_Name use "ConfTest";
14037 for Object_Dir use ".";
14038 for Library_ALI_Dir use External("LIBRARY_DIR");
14039 for Library_Version use External ("SONAME");
14040 for Library_Kind use Kind;
14041 for Library_Dir use External("BUILD_DIR");
14042 Source_Dir := External ("SOURCE_DIR");
14043 for Source_Dirs use (Source_Dir);
14046 cat >>confpackage.ads <<CF_EOF
14047 package ConfPackage is
14048 procedure conftest;
14051 cat >>confpackage.adb <<CF_EOF
14053 package body ConfPackage is
14054 procedure conftest is
14056 Text_IO.Put ("Hello World");
14061 if ( $cf_ada_make $ADAFLAGS \
14063 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
14064 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
14065 -XSOURCE_DIR=`pwd` \
14066 -XSONAME=libConfTest.so.1 \
14067 -XLIB_KIND=static 1>&5 2>&1 ) ; then
14068 cf_gnat_projects=yes
14071 if test -f conftest.lib/confpackage.ali
14073 cf_gnat_libraries=yes
14075 rm -rf conftest* *~conftest*
14080 echo "$as_me:14080: result: $cf_gnat_projects" >&5
14081 echo "${ECHO_T}$cf_gnat_projects" >&6
14082 fi # enable_gnat_projects
14084 if test $cf_gnat_projects = yes
14086 echo "$as_me:14086: checking if GNAT supports libraries" >&5
14087 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
14088 echo "$as_me:14088: result: $cf_gnat_libraries" >&5
14089 echo "${ECHO_T}$cf_gnat_libraries" >&6
14092 if test "$cf_gnat_projects" = yes
14094 USE_OLD_MAKERULES="#"
14095 USE_GNAT_PROJECTS=""
14097 USE_OLD_MAKERULES=""
14098 USE_GNAT_PROJECTS="#"
14101 if test "$cf_gnat_libraries" = yes
14103 USE_GNAT_LIBRARIES=""
14105 USE_GNAT_LIBRARIES="#"
14108 echo "$as_me:14108: checking for ada-compiler" >&5
14109 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
14111 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14112 if test "${with_ada_compiler+set}" = set; then
14113 withval="$with_ada_compiler"
14114 cf_ada_compiler=$withval
14116 cf_ada_compiler=gnatmake
14119 echo "$as_me:14119: result: $cf_ada_compiler" >&5
14120 echo "${ECHO_T}$cf_ada_compiler" >&6
14122 cf_ada_package=terminal_interface
14124 echo "$as_me:14124: checking for ada-include" >&5
14125 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
14127 # Check whether --with-ada-include or --without-ada-include was given.
14128 if test "${with_ada_include+set}" = set; then
14129 withval="$with_ada_include"
14132 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
14133 fi; if test -n "$prefix/share/ada/adainclude" ; then
14135 if test "x$prefix" != xNONE; then
14136 cf_path_syntax="$prefix"
14138 cf_path_syntax="$ac_default_prefix"
14141 case ".$withval" in
14142 (.\$\(*\)*|.\'*\'*)
14146 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14148 (.\${*prefix}*|.\${*dir}*)
14149 eval withval="$withval"
14150 case ".$withval" in
14152 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14157 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14160 { { echo "$as_me:14160: error: expected a pathname, not \"$withval\"" >&5
14161 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14162 { (exit 1); exit 1; }; }
14167 eval ADA_INCLUDE="$withval"
14169 echo "$as_me:14169: result: $ADA_INCLUDE" >&5
14170 echo "${ECHO_T}$ADA_INCLUDE" >&6
14172 echo "$as_me:14172: checking for ada-objects" >&5
14173 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
14175 # Check whether --with-ada-objects or --without-ada-objects was given.
14176 if test "${with_ada_objects+set}" = set; then
14177 withval="$with_ada_objects"
14180 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
14181 fi; if test -n "$prefix/lib/ada/adalib" ; then
14183 if test "x$prefix" != xNONE; then
14184 cf_path_syntax="$prefix"
14186 cf_path_syntax="$ac_default_prefix"
14189 case ".$withval" in
14190 (.\$\(*\)*|.\'*\'*)
14194 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14196 (.\${*prefix}*|.\${*dir}*)
14197 eval withval="$withval"
14198 case ".$withval" in
14200 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14205 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14208 { { echo "$as_me:14208: error: expected a pathname, not \"$withval\"" >&5
14209 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14210 { (exit 1); exit 1; }; }
14215 eval ADA_OBJECTS="$withval"
14217 echo "$as_me:14217: result: $ADA_OBJECTS" >&5
14218 echo "${ECHO_T}$ADA_OBJECTS" >&6
14220 echo "$as_me:14220: checking if an Ada95 shared-library should be built" >&5
14221 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
14223 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
14224 if test "${with_ada_sharedlib+set}" = set; then
14225 withval="$with_ada_sharedlib"
14226 with_ada_sharedlib=$withval
14228 with_ada_sharedlib=no
14230 echo "$as_me:14230: result: $with_ada_sharedlib" >&5
14231 echo "${ECHO_T}$with_ada_sharedlib" >&6
14233 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
14234 MAKE_ADA_SHAREDLIB="#"
14236 if test "x$with_ada_sharedlib" != xno
14238 MAKE_ADA_SHAREDLIB=
14239 if test "x$with_ada_sharedlib" != xyes
14241 ADA_SHAREDLIB="$with_ada_sharedlib"
14246 { { echo "$as_me:14246: error: No usable Ada compiler found" >&5
14247 echo "$as_me: error: No usable Ada compiler found" >&2;}
14248 { (exit 1); exit 1; }; }
14251 { { echo "$as_me:14251: error: The Ada compiler is needed for this package" >&5
14252 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
14253 { (exit 1); exit 1; }; }
14256 ################################################################################
14263 ### Construct the list of include-directories to be generated
14265 if test "$srcdir" != "."; then
14266 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14268 CPPFLAGS="-I../include $CPPFLAGS"
14269 if test "$srcdir" != "."; then
14270 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
14272 CPPFLAGS="-I. $CPPFLAGS"
14274 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
14275 if test "$srcdir" != "."; then
14276 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14278 if test "$GCC" != yes; then
14279 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14280 elif test "$includedir" != "/usr/include"; then
14281 if test "$includedir" = '${prefix}/include' ; then
14282 if test x$prefix != x/usr ; then
14283 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14286 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14290 ### Build up pieces for makefile rules
14291 echo "$as_me:14291: checking default library suffix" >&5
14292 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14294 case $DFT_LWR_MODEL in
14295 (libtool) DFT_ARG_SUFFIX='' ;;
14296 (normal) DFT_ARG_SUFFIX='' ;;
14297 (debug) DFT_ARG_SUFFIX='_g' ;;
14298 (profile) DFT_ARG_SUFFIX='_p' ;;
14299 (shared) DFT_ARG_SUFFIX='' ;;
14301 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14302 echo "$as_me:14302: result: $DFT_ARG_SUFFIX" >&5
14303 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14305 echo "$as_me:14305: checking default library-dependency suffix" >&5
14306 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14308 case X$DFT_LWR_MODEL in
14310 DFT_LIB_SUFFIX='.la'
14311 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14314 DFT_LIB_SUFFIX='_g.a'
14315 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14318 DFT_LIB_SUFFIX='_p.a'
14319 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14322 case $cf_cv_system_name in
14324 DFT_LIB_SUFFIX='.so'
14325 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14327 (cygwin*|msys*|mingw*)
14328 DFT_LIB_SUFFIX='.dll'
14329 DFT_DEP_SUFFIX='.dll.a'
14332 DFT_LIB_SUFFIX='.dylib'
14333 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14338 DFT_LIB_SUFFIX='.so'
14339 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14342 DFT_LIB_SUFFIX='.sl'
14343 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14348 DFT_LIB_SUFFIX='.so'
14349 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14354 DFT_LIB_SUFFIX='.a'
14355 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14358 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
14360 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
14361 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
14363 echo "$as_me:14363: result: $DFT_DEP_SUFFIX" >&5
14364 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14366 echo "$as_me:14366: checking default object directory" >&5
14367 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14369 case $DFT_LWR_MODEL in
14370 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
14371 (normal) DFT_OBJ_SUBDIR='objects' ;;
14372 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
14373 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
14375 case $cf_cv_system_name in
14377 DFT_OBJ_SUBDIR='objects' ;;
14379 DFT_OBJ_SUBDIR='obj_s' ;;
14382 echo "$as_me:14382: result: $DFT_OBJ_SUBDIR" >&5
14383 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14385 ### Set up low-level terminfo dependencies for makefiles.
14387 if test "$DFT_LWR_MODEL" = shared ; then
14388 case $cf_cv_system_name in
14390 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
14393 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
14398 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
14400 ### Construct the list of subdirectories for which we'll customize makefiles
14401 ### with the appropriate compile-rules.
14403 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
14405 cat >>confdefs.h <<EOF
14406 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
14409 ### Now that we're done running tests, add the compiler-warnings, if any
14414 cf_new_extra_cppflags=
14416 for cf_add_cflags in $EXTRA_CFLAGS
14418 case $cf_fix_cppflags in
14420 case $cf_add_cflags in
14421 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14422 case $cf_add_cflags in
14424 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14426 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14427 && test -z "${cf_tst_cflags}" \
14428 && cf_fix_cppflags=yes
14430 if test $cf_fix_cppflags = yes ; then
14431 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14433 elif test "${cf_tst_cflags}" = "\"'" ; then
14434 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14439 case "$CPPFLAGS" in
14443 case $cf_add_cflags in
14445 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14447 CPPFLAGS=`echo "$CPPFLAGS" | \
14448 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14449 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14453 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14458 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14463 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14465 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14467 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14468 && test -z "${cf_tst_cflags}" \
14469 && cf_fix_cppflags=no
14474 if test -n "$cf_new_cflags" ; then
14476 CFLAGS="$CFLAGS $cf_new_cflags"
14479 if test -n "$cf_new_cppflags" ; then
14481 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14484 if test -n "$cf_new_extra_cppflags" ; then
14486 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14489 ################################################################################
14495 NCURSES_SHLIB2="sh -c"
14497 ADA_SUBDIRS="include gen src doc"
14498 if test "x$cf_with_tests" != "xno" ; then
14499 ADA_SUBDIRS="$ADA_SUBDIRS samples"
14501 for cf_dir in $ADA_SUBDIRS
14503 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
14510 # match layout used by make-tar.sh
14511 ADAHTML_DIR=../doc/ada
14513 if test "x$cross_compiling" = xyes ; then
14514 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
14516 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
14519 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
14520 ac_config_commands="$ac_config_commands default"
14521 cat >confcache <<\_ACEOF
14522 # This file is a shell script that caches the results of configure
14523 # tests run on this system so they can be shared between configure
14524 # scripts and configure runs, see configure's option --config-cache.
14525 # It is not useful on other systems. If it contains results you don't
14526 # want to keep, you may remove or edit it.
14528 # config.status only pays attention to the cache file if you give it
14529 # the --recheck option to rerun configure.
14531 # `ac_cv_env_foo' variables (set or unset) will be overriden when
14532 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14533 # following values.
14537 # The following way of writing the cache mishandles newlines in values,
14538 # but we know of no workaround that is simple, portable, and efficient.
14539 # So, don't put newlines in cache variables' values.
14540 # Ultrix sh set writes to stderr and can't be redirected directly,
14541 # and sets the high bit in the cache file unless we assign to the vars.
14544 case `(ac_space=' '; set | grep ac_space) 2>&1` in
14546 # `set' does not quote correctly, so add quotes (double-quote
14547 # substitution turns \\\\ into \\, and sed turns \\ into \).
14550 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14553 # `set' quotes correctly as required by POSIX, so do not add quotes.
14555 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14562 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14564 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14566 if cmp -s $cache_file confcache; then :; else
14567 if test -w $cache_file; then
14568 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14569 cat confcache >$cache_file
14571 echo "not updating unwritable cache $cache_file"
14576 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14577 # Let make expand exec_prefix.
14578 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14580 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14581 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14582 # trailing colons and then remove the whole line if VPATH becomes empty
14583 # (actually we leave an empty line to preserve line numbers).
14584 if test "x$srcdir" = x.; then
14585 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14586 s/:*\$(srcdir):*/:/;
14587 s/:*\${srcdir}:*/:/;
14589 s/^\([^=]*=[ ]*\):*/\1/;
14595 DEFS=-DHAVE_CONFIG_H
14597 : ${CONFIG_STATUS=./config.status}
14598 ac_clean_files_save=$ac_clean_files
14599 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14600 { echo "$as_me:14600: creating $CONFIG_STATUS" >&5
14601 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14602 cat >$CONFIG_STATUS <<_ACEOF
14604 # Generated automatically by configure.
14605 # Run this file to recreate the current configuration.
14606 # Compiler output produced by configure, useful for debugging
14607 # configure, is in config.log if it exists.
14610 SHELL=\${CONFIG_SHELL-$SHELL}
14611 ac_cs_invocation="\$0 \$@"
14615 cat >>$CONFIG_STATUS <<\_ACEOF
14616 # Be Bourne compatible
14617 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14620 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14624 # Name of the executable.
14625 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14627 if expr a : '\(a\)' >/dev/null 2>&1; then
14633 rm -f conf$$ conf$$.exe conf$$.file
14635 if ln -s conf$$.file conf$$ 2>/dev/null; then
14636 # We could just check for DJGPP; but this test a) works b) is more generic
14637 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14638 if test -f conf$$.exe; then
14639 # Don't use ln at all; we don't have any links
14644 elif ln conf$$.file conf$$ 2>/dev/null; then
14649 rm -f conf$$ conf$$.exe conf$$.file
14651 as_executable_p="test -f"
14653 # Support unset when possible.
14654 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14661 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14662 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14663 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14664 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14665 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14666 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14667 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14668 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14671 # We need space, tab and new line, in precisely that order.
14677 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14683 # Files that config.status was made for.
14684 if test -n "$ac_config_files"; then
14685 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14688 if test -n "$ac_config_headers"; then
14689 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14692 if test -n "$ac_config_links"; then
14693 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14696 if test -n "$ac_config_commands"; then
14697 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14700 cat >>$CONFIG_STATUS <<\EOF
14703 \`$as_me' instantiates files from templates according to the
14704 current configuration.
14706 Usage: $0 [OPTIONS] [FILE]...
14708 -h, --help print this help, then exit
14709 -V, --version print version number, then exit
14710 -d, --debug don't remove temporary files
14711 --recheck update $as_me by reconfiguring in the same conditions
14712 --file=FILE[:TEMPLATE]
14713 instantiate the configuration file FILE
14714 --header=FILE[:TEMPLATE]
14715 instantiate the configuration header FILE
14717 Configuration files:
14720 Configuration headers:
14723 Configuration commands:
14726 Report bugs to <dickey@invisible-island.net>."
14729 cat >>$CONFIG_STATUS <<EOF
14732 configured by $0, generated by GNU Autoconf 2.52.20150926,
14733 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14735 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14736 Free Software Foundation, Inc.
14737 This config.status script is free software; the Free Software Foundation
14738 gives unlimited permission to copy, distribute and modify it."
14743 cat >>$CONFIG_STATUS <<\EOF
14744 # If no file are specified by the user, then we need to provide default
14745 # value. By we need to know if files were specified by the user.
14751 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14752 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14754 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14758 *) # This is not an option, so the user has probably given explicit
14760 ac_need_defaults=false;;
14764 # Handling of the options.
14766 cat >>$CONFIG_STATUS <<EOF
14767 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14768 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14769 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14771 cat >>$CONFIG_STATUS <<\EOF
14772 --version | --vers* | -V )
14773 echo "$ac_cs_version"; exit 0 ;;
14775 # Conflict between --help and --header
14776 { { echo "$as_me:14776: error: ambiguous option: $1
14777 Try \`$0 --help' for more information." >&5
14778 echo "$as_me: error: ambiguous option: $1
14779 Try \`$0 --help' for more information." >&2;}
14780 { (exit 1); exit 1; }; };;
14781 --help | --hel | -h )
14782 echo "$ac_cs_usage"; exit 0 ;;
14783 --debug | --d* | -d )
14785 --file | --fil | --fi | --f )
14787 CONFIG_FILES="$CONFIG_FILES $1"
14788 ac_need_defaults=false;;
14789 --header | --heade | --head | --hea )
14791 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14792 ac_need_defaults=false;;
14794 # This is an error.
14795 -*) { { echo "$as_me:14795: error: unrecognized option: $1
14796 Try \`$0 --help' for more information." >&5
14797 echo "$as_me: error: unrecognized option: $1
14798 Try \`$0 --help' for more information." >&2;}
14799 { (exit 1); exit 1; }; } ;;
14801 *) ac_config_targets="$ac_config_targets $1" ;;
14810 ## ----------------------- ##
14811 ## Running config.status. ##
14812 ## ----------------------- ##
14814 This file was extended by $as_me 2.52.20150926, executed with
14815 CONFIG_FILES = $CONFIG_FILES
14816 CONFIG_HEADERS = $CONFIG_HEADERS
14817 CONFIG_LINKS = $CONFIG_LINKS
14818 CONFIG_COMMANDS = $CONFIG_COMMANDS
14819 > $ac_cs_invocation
14820 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14825 cat >>$CONFIG_STATUS <<EOF
14827 # INIT-COMMANDS section.
14830 ### Special initialization commands, used to pass information from the
14831 ### configuration-run into config.status
14834 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14835 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14836 LIB_NAME="$LIB_NAME"
14837 LIB_PREFIX="$LIB_PREFIX"
14838 LIB_SUFFIX="$LIB_SUFFIX"
14840 NCURSES_MAJOR="$NCURSES_MAJOR"
14841 NCURSES_MINOR="$NCURSES_MINOR"
14842 NCURSES_PATCH="$NCURSES_PATCH"
14843 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14844 cf_cv_abi_version="$cf_cv_abi_version"
14845 cf_cv_rel_version="$cf_cv_rel_version"
14846 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14847 cf_cv_shared_soname='$cf_cv_shared_soname'
14848 cf_cv_shlib_version="$cf_cv_shlib_version"
14849 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14850 cf_cv_system_name="$cf_cv_system_name"
14856 cat >>$CONFIG_STATUS <<\EOF
14857 for ac_config_target in $ac_config_targets
14859 case "$ac_config_target" in
14860 # Handling of arguments.
14861 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14862 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14863 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14864 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14865 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14866 *) { { echo "$as_me:14866: error: invalid argument: $ac_config_target" >&5
14867 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14868 { (exit 1); exit 1; }; };;
14872 # If the user did not use the arguments to specify the items to instantiate,
14873 # then the envvar interface is used. Set only those that are not.
14874 # We use the long form for the default assignment because of an extremely
14875 # bizarre bug on SunOS 4.1.3.
14876 if $ac_need_defaults; then
14877 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14878 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14879 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14882 # Create a temporary directory, and hook for its removal unless debugging.
14885 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14886 trap '{ (exit 1); exit 1; }' 1 2 13 15
14889 # Create a (secure) tmp directory for tmp files.
14892 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14893 test -n "$tmp" && test -d "$tmp"
14896 tmp=$TMPDIR/cs$$-$RANDOM
14897 (umask 077 && mkdir $tmp)
14900 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14901 { (exit 1); exit 1; }
14906 cat >>$CONFIG_STATUS <<EOF
14909 # CONFIG_FILES section.
14912 # No need to generate the scripts if there are no CONFIG_FILES.
14913 # This happens for instance when ./config.status config.h
14914 if test -n "\$CONFIG_FILES"; then
14915 # Protect against being on the right side of a sed subst in config.status.
14916 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14917 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14918 s,@SHELL@,$SHELL,;t t
14919 s,@exec_prefix@,$exec_prefix,;t t
14920 s,@prefix@,$prefix,;t t
14921 s,@program_transform_name@,$program_transform_name,;t t
14922 s,@bindir@,$bindir,;t t
14923 s,@sbindir@,$sbindir,;t t
14924 s,@libexecdir@,$libexecdir,;t t
14925 s,@datarootdir@,$datarootdir,;t t
14926 s,@datadir@,$datadir,;t t
14927 s,@sysconfdir@,$sysconfdir,;t t
14928 s,@sharedstatedir@,$sharedstatedir,;t t
14929 s,@localstatedir@,$localstatedir,;t t
14930 s,@libdir@,$libdir,;t t
14931 s,@includedir@,$includedir,;t t
14932 s,@oldincludedir@,$oldincludedir,;t t
14933 s,@infodir@,$infodir,;t t
14934 s,@mandir@,$mandir,;t t
14935 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14936 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14937 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14938 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14939 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14940 s,@build_alias@,$build_alias,;t t
14941 s,@host_alias@,$host_alias,;t t
14942 s,@target_alias@,$target_alias,;t t
14943 s,@ECHO_C@,$ECHO_C,;t t
14944 s,@ECHO_N@,$ECHO_N,;t t
14945 s,@ECHO_T@,$ECHO_T,;t t
14946 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14947 s,@DEFS@,$DEFS,;t t
14948 s,@LIBS@,$LIBS,;t t
14949 s,@top_builddir@,$top_builddir,;t t
14950 s,@build@,$build,;t t
14951 s,@build_cpu@,$build_cpu,;t t
14952 s,@build_vendor@,$build_vendor,;t t
14953 s,@build_os@,$build_os,;t t
14954 s,@host@,$host,;t t
14955 s,@host_cpu@,$host_cpu,;t t
14956 s,@host_vendor@,$host_vendor,;t t
14957 s,@host_os@,$host_os,;t t
14958 s,@target@,$target,;t t
14959 s,@target_cpu@,$target_cpu,;t t
14960 s,@target_vendor@,$target_vendor,;t t
14961 s,@target_os@,$target_os,;t t
14963 s,@CFLAGS@,$CFLAGS,;t t
14964 s,@LDFLAGS@,$LDFLAGS,;t t
14965 s,@CPPFLAGS@,$CPPFLAGS,;t t
14966 s,@ac_ct_CC@,$ac_ct_CC,;t t
14967 s,@EXEEXT@,$EXEEXT,;t t
14968 s,@OBJEXT@,$OBJEXT,;t t
14969 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14972 s,@EGREP@,$EGREP,;t t
14973 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14974 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14975 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14976 s,@LN_S@,$LN_S,;t t
14977 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14978 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14979 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14980 s,@SET_MAKE@,$SET_MAKE,;t t
14981 s,@CTAGS@,$CTAGS,;t t
14982 s,@ETAGS@,$ETAGS,;t t
14983 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14984 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14985 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14986 s,@RANLIB@,$RANLIB,;t t
14987 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14989 s,@ac_ct_LD@,$ac_ct_LD,;t t
14991 s,@ac_ct_AR@,$ac_ct_AR,;t t
14992 s,@ARFLAGS@,$ARFLAGS,;t t
14993 s,@DESTDIR@,$DESTDIR,;t t
14994 s,@BUILD_CC@,$BUILD_CC,;t t
14995 s,@BUILD_CPP@,$BUILD_CPP,;t t
14996 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14997 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14998 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14999 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15000 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15001 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15002 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15003 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15004 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15005 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
15006 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15007 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15008 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15009 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15010 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15011 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15012 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15013 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15014 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15015 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15016 s,@CC_G_OPT@,$CC_G_OPT,;t t
15017 s,@LD_MODEL@,$LD_MODEL,;t t
15018 s,@shlibdir@,$shlibdir,;t t
15019 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
15020 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15021 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
15022 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15023 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15024 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
15025 s,@LINK_PROGS@,$LINK_PROGS,;t t
15026 s,@LINK_TESTS@,$LINK_TESTS,;t t
15027 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15028 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15029 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15030 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15031 s,@RPATH_LIST@,$RPATH_LIST,;t t
15032 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15033 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15034 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15035 s,@PTHREAD@,$PTHREAD,;t t
15036 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
15037 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15038 s,@ECHO_LT@,$ECHO_LT,;t t
15039 s,@ECHO_LD@,$ECHO_LD,;t t
15040 s,@RULE_CC@,$RULE_CC,;t t
15041 s,@SHOW_CC@,$SHOW_CC,;t t
15042 s,@ECHO_CC@,$ECHO_CC,;t t
15043 s,@ADAFLAGS@,$ADAFLAGS,;t t
15044 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15045 s,@ADA_TRACE@,$ADA_TRACE,;t t
15046 s,@gnat_exists@,$gnat_exists,;t t
15047 s,@M4_exists@,$M4_exists,;t t
15048 s,@cf_ada_make@,$cf_ada_make,;t t
15049 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
15050 s,@cf_compile_generics@,$cf_compile_generics,;t t
15051 s,@cf_generic_objects@,$cf_generic_objects,;t t
15052 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
15053 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
15054 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
15055 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
15056 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15057 s,@cf_ada_package@,$cf_ada_package,;t t
15058 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15059 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15060 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
15061 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
15062 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
15063 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15064 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15065 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15066 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15067 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15068 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
15069 s,@TEST_ARG2@,$TEST_ARG2,;t t
15070 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
15071 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
15072 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15073 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15074 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
15075 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
15076 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
15081 cat >>$CONFIG_STATUS <<\EOF
15082 # Split the substitutions into bite-sized pieces for seds with
15083 # small command number limits, like on Digital OSF/1 and HP-UX.
15084 ac_max_sed_lines=48
15085 ac_sed_frag=1 # Number of current file.
15086 ac_beg=1 # First line for current file.
15087 ac_end=$ac_max_sed_lines # Line after last line for current file.
15090 while $ac_more_lines; do
15091 if test $ac_beg -gt 1; then
15092 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15094 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15096 if test ! -s $tmp/subs.frag; then
15097 ac_more_lines=false
15099 # The purpose of the label and of the branching condition is to
15100 # speed up the sed processing (if there are no `@' at all, there
15101 # is no need to browse any of the substitutions).
15102 # These are the two extra sed commands mentioned above.
15104 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15105 # It is possible to make a multiline substitution using escaped newlines.
15106 # Ensure that we do not split the substitution between script fragments.
15108 ac_END=`expr $ac_end + $ac_max_sed_lines`
15109 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
15110 if test -s $tmp/subs.next; then
15111 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
15112 if test ! -s $tmp/subs.edit; then
15113 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
15114 if test ! -s $tmp/subs.edit; then
15115 if test $ac_beg -gt 1; then
15116 ac_end=`expr $ac_end - 1`
15123 if test -z "$ac_sed_cmds"; then
15124 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15126 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15128 ac_sed_frag=`expr $ac_sed_frag + 1`
15130 ac_end=`expr $ac_end + $ac_max_sed_lines`
15133 if test -z "$ac_sed_cmds"; then
15136 fi # test -n "$CONFIG_FILES"
15139 cat >>$CONFIG_STATUS <<\EOF
15140 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15141 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15143 - | *:- | *:-:* ) # input from stdin
15145 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15146 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15147 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15148 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15149 * ) ac_file_in=$ac_file.in ;;
15152 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15153 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15154 X"$ac_file" : 'X\(//\)[^/]' \| \
15155 X"$ac_file" : 'X\(//\)$' \| \
15156 X"$ac_file" : 'X\(/\)' \| \
15157 . : '\(.\)' 2>/dev/null ||
15159 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15160 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15161 /^X\(\/\/\)$/{ s//\1/; q; }
15162 /^X\(\/\).*/{ s//\1/; q; }
15164 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15165 { case "$ac_dir" in
15166 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15170 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15171 case $as_mkdir_dir in
15172 # Skip DOS drivespec
15173 ?:) as_incr_dir=$as_mkdir_dir ;;
15175 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15176 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15181 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15182 # A "../" for each directory in $ac_dir_suffix.
15183 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15185 ac_dir_suffix= ac_dots=
15190 if test -z "$ac_dots"; then
15193 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15195 [\\/]* | ?:[\\/]* )
15196 ac_srcdir=$srcdir$ac_dir_suffix;
15197 ac_top_srcdir=$srcdir ;;
15198 *) # Relative path.
15199 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15200 ac_top_srcdir=$ac_dots$srcdir ;;
15204 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15205 *) ac_INSTALL=$ac_dots$INSTALL ;;
15208 if test x"$ac_file" != x-; then
15209 { echo "$as_me:15209: creating $ac_file" >&5
15210 echo "$as_me: creating $ac_file" >&6;}
15213 # Let's still pretend it is `configure' which instantiates (i.e., don't
15214 # use $as_me), people would be surprised to read:
15215 # /* config.h. Generated automatically by config.status. */
15216 configure_input="Generated automatically from `echo $ac_file_in |
15217 sed 's,.*/,,'` by configure."
15219 # First look for the input files in the build tree, otherwise in the
15221 ac_file_inputs=`IFS=:
15222 for f in $ac_file_in; do
15224 -) echo $tmp/stdin ;;
15226 # Absolute (can't be DOS-style, as IFS=:)
15227 test -f "$f" || { { echo "$as_me:15227: error: cannot find input file: $f" >&5
15228 echo "$as_me: error: cannot find input file: $f" >&2;}
15229 { (exit 1); exit 1; }; }
15232 if test -f "$f"; then
15235 elif test -f "$srcdir/$f"; then
15240 { { echo "$as_me:15240: error: cannot find input file: $f" >&5
15241 echo "$as_me: error: cannot find input file: $f" >&2;}
15242 { (exit 1); exit 1; }; }
15245 done` || { (exit 1); exit 1; }
15247 cat >>$CONFIG_STATUS <<\EOF
15248 ac_warn_datarootdir=no
15249 if test x"$ac_file" != x-; then
15250 for ac_item in $ac_file_inputs
15252 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
15253 if test -n "$ac_seen"; then
15254 ac_used=`grep '@datarootdir@' $ac_item`
15255 if test -z "$ac_used"; then
15256 { echo "$as_me:15256: WARNING: datarootdir was used implicitly but not set:
15258 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
15260 ac_warn_datarootdir=yes
15263 ac_seen=`grep '${datarootdir}' $ac_item`
15264 if test -n "$ac_seen"; then
15265 { echo "$as_me:15265: WARNING: datarootdir was used explicitly but not set:
15267 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
15269 ac_warn_datarootdir=yes
15274 if test "x$ac_warn_datarootdir" = xyes; then
15275 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
15279 cat >>$CONFIG_STATUS <<EOF
15283 cat >>$CONFIG_STATUS <<\EOF
15285 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15286 s,@configure_input@,$configure_input,;t t
15287 s,@srcdir@,$ac_srcdir,;t t
15288 s,@top_srcdir@,$ac_top_srcdir,;t t
15289 s,@INSTALL@,$ac_INSTALL,;t t
15290 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15292 if test x"$ac_file" != x-; then
15293 cp $tmp/out $ac_file
15295 for ac_name in prefix exec_prefix datarootdir
15297 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
15298 if test -n "$ac_seen"; then
15299 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
15300 if test -z "$ac_init"; then
15301 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
15302 { echo "$as_me:15302: WARNING: Variable $ac_name is used but was not set:
15304 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
15309 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
15310 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
15311 if test -s $tmp/out; then
15312 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
15313 { echo "$as_me:15313: WARNING: Some variables may not be substituted:
15315 echo "$as_me: WARNING: Some variables may not be substituted:
15325 cat >>$CONFIG_STATUS <<\EOF
15328 # CONFIG_HEADER section.
15331 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15332 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15334 # ac_d sets the value in "#define NAME VALUE" lines.
15335 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
15336 ac_dB='[ ].*$,\1#\2'
15339 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15340 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15341 ac_iB='\([ ]\),\1#\2define\3'
15344 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15345 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15346 ac_uB='$,\1#\2define\3'
15350 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15351 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15353 - | *:- | *:-:* ) # input from stdin
15355 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15356 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15357 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15358 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15359 * ) ac_file_in=$ac_file.in ;;
15362 test x"$ac_file" != x- && { echo "$as_me:15362: creating $ac_file" >&5
15363 echo "$as_me: creating $ac_file" >&6;}
15365 # First look for the input files in the build tree, otherwise in the
15367 ac_file_inputs=`IFS=:
15368 for f in $ac_file_in; do
15370 -) echo $tmp/stdin ;;
15372 # Absolute (can't be DOS-style, as IFS=:)
15373 test -f "$f" || { { echo "$as_me:15373: error: cannot find input file: $f" >&5
15374 echo "$as_me: error: cannot find input file: $f" >&2;}
15375 { (exit 1); exit 1; }; }
15378 if test -f "$f"; then
15381 elif test -f "$srcdir/$f"; then
15386 { { echo "$as_me:15386: error: cannot find input file: $f" >&5
15387 echo "$as_me: error: cannot find input file: $f" >&2;}
15388 { (exit 1); exit 1; }; }
15391 done` || { (exit 1); exit 1; }
15392 # Remove the trailing spaces.
15393 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
15397 # Transform confdefs.h into a list of #define's. We won't use it as a sed
15398 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
15399 # be either 'cat' or 'sort'.
15400 cat confdefs.h | uniq >conftest.vals
15402 # Break up conftest.vals because some shells have a limit on
15403 # the size of here documents, and old seds have small limits too.
15405 rm -f conftest.tail
15406 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
15407 while grep . conftest.vals >/dev/null
15409 # Write chunks of a limited-size here document to conftest.frag.
15410 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15411 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15412 echo 'CEOF' >> $CONFIG_STATUS
15413 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15414 rm -f conftest.vals
15415 mv conftest.tail conftest.vals
15417 rm -f conftest.vals
15419 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15421 echo ' cat >> conftest.edit <<CEOF
15422 /@DEFS@/r conftest.frag
15425 sed -f conftest.edit $tmp/in > $tmp/out
15427 mv $tmp/out $tmp/in
15428 rm -f conftest.edit conftest.frag
15429 ' >> $CONFIG_STATUS
15431 cat >>$CONFIG_STATUS <<\EOF
15432 # Let's still pretend it is `configure' which instantiates (i.e., don't
15433 # use $as_me), people would be surprised to read:
15434 # /* config.h. Generated automatically by config.status. */
15435 if test x"$ac_file" = x-; then
15436 echo "/* Generated automatically by configure. */" >$tmp/config.h
15438 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
15440 cat $tmp/in >>$tmp/config.h
15442 if test x"$ac_file" != x-; then
15443 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15444 { echo "$as_me:15444: $ac_file is unchanged" >&5
15445 echo "$as_me: $ac_file is unchanged" >&6;}
15447 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15448 X"$ac_file" : 'X\(//\)[^/]' \| \
15449 X"$ac_file" : 'X\(//\)$' \| \
15450 X"$ac_file" : 'X\(/\)' \| \
15451 . : '\(.\)' 2>/dev/null ||
15453 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15454 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15455 /^X\(\/\/\)$/{ s//\1/; q; }
15456 /^X\(\/\).*/{ s//\1/; q; }
15458 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15459 { case "$ac_dir" in
15460 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15464 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15465 case $as_mkdir_dir in
15466 # Skip DOS drivespec
15467 ?:) as_incr_dir=$as_mkdir_dir ;;
15469 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15470 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15477 mv $tmp/config.h $ac_file
15481 rm -f $tmp/config.h
15485 cat >>$CONFIG_STATUS <<\EOF
15487 # CONFIG_COMMANDS section.
15489 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15490 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15491 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15495 if test -z "$USE_OLD_MAKERULES" ; then
15496 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
15503 cat >>$CONFIG_STATUS <<\EOF
15505 { (exit 0); exit 0; }
15507 chmod +x $CONFIG_STATUS
15508 ac_clean_files=$ac_clean_files_save
15510 # configure is writing to config.log, and then calls config.status.
15511 # config.status does its own redirection, appending to config.log.
15512 # Unfortunately, on DOS this fails, as config.log is still kept open
15513 # by configure, so config.status won't be able to write to it; its
15514 # output is simply discarded. So we exec the FD to /dev/null,
15515 # effectively closing config.log, so it can be properly (re)opened and
15516 # appended to by config.status. When coming back to configure, we
15517 # need to make the FD available again.
15518 if test "$no_create" != yes; then
15521 $SHELL $CONFIG_STATUS || ac_cs_success=false
15523 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15524 # would make configure fail if this is the last instruction.
15525 $ac_cs_success || { (exit 1); exit 1; }
15527 ${MAKE:-make} preinstall