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/[ ]*$//'`
1846 cf_new_extra_cppflags=
1848 for cf_add_cflags in $cf_flags
1850 case $cf_fix_cppflags in
1852 case $cf_add_cflags in
1853 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1854 case $cf_add_cflags in
1856 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1858 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1859 && test -z "${cf_tst_cflags}" \
1860 && cf_fix_cppflags=yes
1862 if test $cf_fix_cppflags = yes ; then
1863 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1865 elif test "${cf_tst_cflags}" = "\"'" ; then
1866 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1875 case $cf_add_cflags in
1877 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1879 CPPFLAGS=`echo "$CPPFLAGS" | \
1880 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1881 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1885 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1890 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1895 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1897 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1899 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1900 && test -z "${cf_tst_cflags}" \
1901 && cf_fix_cppflags=no
1906 if test -n "$cf_new_cflags" ; then
1908 CFLAGS="$CFLAGS $cf_new_cflags"
1911 if test -n "$cf_new_cppflags" ; then
1913 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1916 if test -n "$cf_new_extra_cppflags" ; then
1918 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1921 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
1923 echo "${as_me:-configure}:1923: testing resulting CC: '$CC' ..." 1>&5
1925 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
1927 echo "${as_me:-configure}:1927: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1929 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1931 echo "${as_me:-configure}:1931: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1935 echo "$as_me:1935: result: ok" >&5
1936 echo "${ECHO_T}ok" >&6
1941 ac_cpp='$CPP $CPPFLAGS'
1942 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1943 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1944 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1945 ac_main_return=return
1946 echo "$as_me:1946: checking how to run the C preprocessor" >&5
1947 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1948 # On Suns, sometimes $CPP names a directory.
1949 if test -n "$CPP" && test -d "$CPP"; then
1952 if test -z "$CPP"; then
1953 if test "${ac_cv_prog_CPP+set}" = set; then
1954 echo $ECHO_N "(cached) $ECHO_C" >&6
1956 # Double quotes because CPP needs to be expanded
1957 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1960 for ac_c_preproc_warn_flag in '' yes
1962 # Use a header file that comes with gcc, so configuring glibc
1963 # with a fresh cross-compiler works.
1964 # On the NeXT, cc -E runs the code through the compiler's parser,
1965 # not just through cpp. "Syntax error" is here to catch this case.
1966 cat >conftest.$ac_ext <<_ACEOF
1967 #line 1967 "configure"
1968 #include "confdefs.h"
1972 if { (eval echo "$as_me:1972: \"$ac_cpp conftest.$ac_ext\"") >&5
1973 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1975 egrep -v '^ *\+' conftest.er1 >conftest.err
1977 cat conftest.err >&5
1978 echo "$as_me:1978: \$? = $ac_status" >&5
1979 (exit $ac_status); } >/dev/null; then
1980 if test -s conftest.err; then
1981 ac_cpp_err=$ac_c_preproc_warn_flag
1988 if test -z "$ac_cpp_err"; then
1991 echo "$as_me: failed program was:" >&5
1992 cat conftest.$ac_ext >&5
1993 # Broken: fails on valid input.
1996 rm -f conftest.err conftest.$ac_ext
1998 # OK, works on sane cases. Now check whether non-existent headers
1999 # can be detected and how.
2000 cat >conftest.$ac_ext <<_ACEOF
2001 #line 2001 "configure"
2002 #include "confdefs.h"
2003 #include <ac_nonexistent.h>
2005 if { (eval echo "$as_me:2005: \"$ac_cpp conftest.$ac_ext\"") >&5
2006 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2008 egrep -v '^ *\+' conftest.er1 >conftest.err
2010 cat conftest.err >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit $ac_status); } >/dev/null; then
2013 if test -s conftest.err; then
2014 ac_cpp_err=$ac_c_preproc_warn_flag
2021 if test -z "$ac_cpp_err"; then
2022 # Broken: success on invalid input.
2025 echo "$as_me: failed program was:" >&5
2026 cat conftest.$ac_ext >&5
2027 # Passes both tests.
2031 rm -f conftest.err conftest.$ac_ext
2034 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2035 rm -f conftest.err conftest.$ac_ext
2036 if $ac_preproc_ok; then
2048 echo "$as_me:2048: result: $CPP" >&5
2049 echo "${ECHO_T}$CPP" >&6
2051 for ac_c_preproc_warn_flag in '' yes
2053 # Use a header file that comes with gcc, so configuring glibc
2054 # with a fresh cross-compiler works.
2055 # On the NeXT, cc -E runs the code through the compiler's parser,
2056 # not just through cpp. "Syntax error" is here to catch this case.
2057 cat >conftest.$ac_ext <<_ACEOF
2058 #line 2058 "configure"
2059 #include "confdefs.h"
2063 if { (eval echo "$as_me:2063: \"$ac_cpp conftest.$ac_ext\"") >&5
2064 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2066 egrep -v '^ *\+' conftest.er1 >conftest.err
2068 cat conftest.err >&5
2069 echo "$as_me:2069: \$? = $ac_status" >&5
2070 (exit $ac_status); } >/dev/null; then
2071 if test -s conftest.err; then
2072 ac_cpp_err=$ac_c_preproc_warn_flag
2079 if test -z "$ac_cpp_err"; then
2082 echo "$as_me: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 # Broken: fails on valid input.
2087 rm -f conftest.err conftest.$ac_ext
2089 # OK, works on sane cases. Now check whether non-existent headers
2090 # can be detected and how.
2091 cat >conftest.$ac_ext <<_ACEOF
2092 #line 2092 "configure"
2093 #include "confdefs.h"
2094 #include <ac_nonexistent.h>
2096 if { (eval echo "$as_me:2096: \"$ac_cpp conftest.$ac_ext\"") >&5
2097 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2099 egrep -v '^ *\+' conftest.er1 >conftest.err
2101 cat conftest.err >&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit $ac_status); } >/dev/null; then
2104 if test -s conftest.err; then
2105 ac_cpp_err=$ac_c_preproc_warn_flag
2112 if test -z "$ac_cpp_err"; then
2113 # Broken: success on invalid input.
2116 echo "$as_me: failed program was:" >&5
2117 cat conftest.$ac_ext >&5
2118 # Passes both tests.
2122 rm -f conftest.err conftest.$ac_ext
2125 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2126 rm -f conftest.err conftest.$ac_ext
2127 if $ac_preproc_ok; then
2130 { { echo "$as_me:2130: error: C preprocessor \"$CPP\" fails sanity check" >&5
2131 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2132 { (exit 1); exit 1; }; }
2136 ac_cpp='$CPP $CPPFLAGS'
2137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2140 ac_main_return=return
2142 if test $ac_cv_c_compiler_gnu = yes; then
2143 echo "$as_me:2143: checking whether $CC needs -traditional" >&5
2144 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2145 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2146 echo $ECHO_N "(cached) $ECHO_C" >&6
2148 ac_pattern="Autoconf.*'x'"
2149 cat >conftest.$ac_ext <<_ACEOF
2150 #line 2150 "configure"
2151 #include "confdefs.h"
2153 int Autoconf = TIOCGETP;
2155 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2156 egrep "$ac_pattern" >/dev/null 2>&1; then
2157 ac_cv_prog_gcc_traditional=yes
2159 ac_cv_prog_gcc_traditional=no
2163 if test $ac_cv_prog_gcc_traditional = no; then
2164 cat >conftest.$ac_ext <<_ACEOF
2165 #line 2165 "configure"
2166 #include "confdefs.h"
2168 int Autoconf = TCGETA;
2170 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2171 egrep "$ac_pattern" >/dev/null 2>&1; then
2172 ac_cv_prog_gcc_traditional=yes
2178 echo "$as_me:2178: result: $ac_cv_prog_gcc_traditional" >&5
2179 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2180 if test $ac_cv_prog_gcc_traditional = yes; then
2181 CC="$CC -traditional"
2185 echo "$as_me:2185: checking whether $CC understands -c and -o together" >&5
2186 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2187 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2188 echo $ECHO_N "(cached) $ECHO_C" >&6
2191 cat > conftest.$ac_ext <<CF_EOF
2194 ${cf_cv_main_return:-return}(0);
2197 # We do the test twice because some compilers refuse to overwrite an
2198 # existing .o file with -o, though they will create one.
2199 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2200 if { (eval echo "$as_me:2200: \"$ac_try\"") >&5
2203 echo "$as_me:2203: \$? = $ac_status" >&5
2204 (exit $ac_status); } &&
2205 test -f conftest2.$ac_objext && { (eval echo "$as_me:2205: \"$ac_try\"") >&5
2208 echo "$as_me:2208: \$? = $ac_status" >&5
2209 (exit $ac_status); };
2211 eval cf_cv_prog_CC_c_o=yes
2213 eval cf_cv_prog_CC_c_o=no
2218 if test $cf_cv_prog_CC_c_o = yes; then
2219 echo "$as_me:2219: result: yes" >&5
2220 echo "${ECHO_T}yes" >&6
2222 echo "$as_me:2222: result: no" >&5
2223 echo "${ECHO_T}no" >&6
2226 test "$program_prefix" != NONE &&
2227 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2228 # Use a double $ so make ignores it.
2229 test "$program_suffix" != NONE &&
2230 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2231 # Double any \ or $. echo might interpret backslashes.
2232 # By default was `s,x,x', remove it if useless.
2233 cat <<\_ACEOF >conftest.sed
2234 s/[\\$]/&&/g;s/;s,x,x,$//
2236 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2239 for ac_prog in mawk gawk nawk awk
2241 # Extract the first word of "$ac_prog", so it can be a program name with args.
2242 set dummy $ac_prog; ac_word=$2
2243 echo "$as_me:2243: checking for $ac_word" >&5
2244 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2245 if test "${ac_cv_prog_AWK+set}" = set; then
2246 echo $ECHO_N "(cached) $ECHO_C" >&6
2248 if test -n "$AWK"; then
2249 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2251 ac_save_IFS=$IFS; IFS=$ac_path_separator
2253 for ac_dir in $ac_dummy; do
2255 test -z "$ac_dir" && ac_dir=.
2256 $as_executable_p "$ac_dir/$ac_word" || continue
2257 ac_cv_prog_AWK="$ac_prog"
2258 echo "$as_me:2258: found $ac_dir/$ac_word" >&5
2265 if test -n "$AWK"; then
2266 echo "$as_me:2266: result: $AWK" >&5
2267 echo "${ECHO_T}$AWK" >&6
2269 echo "$as_me:2269: result: no" >&5
2270 echo "${ECHO_T}no" >&6
2273 test -n "$AWK" && break
2276 test -z "$AWK" && { { echo "$as_me:2276: error: No awk program found" >&5
2277 echo "$as_me: error: No awk program found" >&2;}
2278 { (exit 1); exit 1; }; }
2280 echo "$as_me:2280: checking for egrep" >&5
2281 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2282 if test "${ac_cv_prog_egrep+set}" = set; then
2283 echo $ECHO_N "(cached) $ECHO_C" >&6
2285 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2286 then ac_cv_prog_egrep='grep -E'
2287 else ac_cv_prog_egrep='egrep'
2290 echo "$as_me:2290: result: $ac_cv_prog_egrep" >&5
2291 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2292 EGREP=$ac_cv_prog_egrep
2294 test -z "$EGREP" && { { echo "$as_me:2294: error: No egrep program found" >&5
2295 echo "$as_me: error: No egrep program found" >&2;}
2296 { (exit 1); exit 1; }; }
2298 # Find a good install program. We prefer a C program (faster),
2299 # so one script is as good as another. But avoid the broken or
2300 # incompatible versions:
2301 # SysV /etc/install, /usr/sbin/install
2302 # SunOS /usr/etc/install
2303 # IRIX /sbin/install
2305 # AmigaOS /C/install, which installs bootblocks on floppy discs
2306 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2307 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2308 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2309 # ./install, which can be erroneously created by make from ./install.sh.
2310 echo "$as_me:2310: checking for a BSD compatible install" >&5
2311 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2312 if test -z "$INSTALL"; then
2313 if test "${ac_cv_path_install+set}" = set; then
2314 echo $ECHO_N "(cached) $ECHO_C" >&6
2316 ac_save_IFS=$IFS; IFS=$ac_path_separator
2317 for ac_dir in $PATH; do
2319 # Account for people who put trailing slashes in PATH elements.
2321 / | ./ | .// | /cC/* \
2322 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2325 # OSF1 and SCO ODT 3.0 have their own names for install.
2326 # Don't use installbsd from OSF since it installs stuff as root
2328 for ac_prog in ginstall scoinst install; do
2329 if $as_executable_p "$ac_dir/$ac_prog"; then
2330 if test $ac_prog = install &&
2331 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2332 # AIX install. It has an incompatible calling convention.
2334 elif test $ac_prog = install &&
2335 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2336 # program-specific install script used by HP pwplus--don't use.
2339 ac_cv_path_install="$ac_dir/$ac_prog -c"
2349 if test "${ac_cv_path_install+set}" = set; then
2350 INSTALL=$ac_cv_path_install
2352 # As a last resort, use the slow shell script. We don't cache a
2353 # path for INSTALL within a source directory, because that will
2354 # break other packages using the cache if that directory is
2355 # removed, or if the path is relative.
2356 INSTALL=$ac_install_sh
2359 echo "$as_me:2359: result: $INSTALL" >&5
2360 echo "${ECHO_T}$INSTALL" >&6
2362 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2363 # It thinks the first close brace ends the variable substitution.
2364 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2366 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2368 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2370 echo "$as_me:2370: checking whether ln -s works" >&5
2371 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2373 if test "$LN_S" = "ln -s"; then
2374 echo "$as_me:2374: result: yes" >&5
2375 echo "${ECHO_T}yes" >&6
2377 echo "$as_me:2377: result: no, using $LN_S" >&5
2378 echo "${ECHO_T}no, using $LN_S" >&6
2381 echo "$as_me:2381: checking if $LN_S -f options work" >&5
2382 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2384 rm -f conf$$.src conf$$dst
2386 echo first >conf$$.src
2387 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2392 rm -f conf$$.dst conf$$src
2393 echo "$as_me:2393: result: $cf_prog_ln_sf" >&5
2394 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2396 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2398 echo "$as_me:2398: checking for long file names" >&5
2399 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2400 if test "${ac_cv_sys_long_file_names+set}" = set; then
2401 echo $ECHO_N "(cached) $ECHO_C" >&6
2403 ac_cv_sys_long_file_names=yes
2404 # Test for long file names in all the places we know might matter:
2405 # . the current directory, where building will happen
2406 # $prefix/lib where we will be installing things
2407 # $exec_prefix/lib likewise
2408 # eval it to expand exec_prefix.
2409 # $TMPDIR if set, where it might want to write temporary files
2410 # if $TMPDIR is not set:
2411 # /tmp where it might want to write temporary files
2414 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2417 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2419 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2420 test -d $ac_dir || continue
2421 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2422 ac_xdir=$ac_dir/cf$$
2423 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2424 ac_tf1=$ac_xdir/conftest9012345
2425 ac_tf2=$ac_xdir/conftest9012346
2426 (echo 1 >$ac_tf1) 2>/dev/null
2427 (echo 2 >$ac_tf2) 2>/dev/null
2428 ac_val=`cat $ac_tf1 2>/dev/null`
2429 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2430 ac_cv_sys_long_file_names=no
2431 rm -rf $ac_xdir 2>/dev/null
2434 rm -rf $ac_xdir 2>/dev/null
2437 echo "$as_me:2437: result: $ac_cv_sys_long_file_names" >&5
2438 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2439 if test $ac_cv_sys_long_file_names = yes; then
2441 cat >>confdefs.h <<\EOF
2442 #define HAVE_LONG_FILE_NAMES 1
2447 # if we find pkg-config, check if we should install the ".pc" files.
2449 echo "$as_me:2449: checking if you want to use pkg-config" >&5
2450 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2452 # Check whether --with-pkg-config or --without-pkg-config was given.
2453 if test "${with_pkg_config+set}" = set; then
2454 withval="$with_pkg_config"
2455 cf_pkg_config=$withval
2459 echo "$as_me:2459: result: $cf_pkg_config" >&5
2460 echo "${ECHO_T}$cf_pkg_config" >&6
2462 case $cf_pkg_config in
2468 if test -n "$ac_tool_prefix"; then
2469 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2470 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2471 echo "$as_me:2471: checking for $ac_word" >&5
2472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2473 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2474 echo $ECHO_N "(cached) $ECHO_C" >&6
2478 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2481 ac_save_IFS=$IFS; IFS=$ac_path_separator
2483 for ac_dir in $ac_dummy; do
2485 test -z "$ac_dir" && ac_dir=.
2486 if $as_executable_p "$ac_dir/$ac_word"; then
2487 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2488 echo "$as_me:2488: found $ac_dir/$ac_word" >&5
2496 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2498 if test -n "$PKG_CONFIG"; then
2499 echo "$as_me:2499: result: $PKG_CONFIG" >&5
2500 echo "${ECHO_T}$PKG_CONFIG" >&6
2502 echo "$as_me:2502: result: no" >&5
2503 echo "${ECHO_T}no" >&6
2507 if test -z "$ac_cv_path_PKG_CONFIG"; then
2508 ac_pt_PKG_CONFIG=$PKG_CONFIG
2509 # Extract the first word of "pkg-config", so it can be a program name with args.
2510 set dummy pkg-config; ac_word=$2
2511 echo "$as_me:2511: checking for $ac_word" >&5
2512 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2513 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2514 echo $ECHO_N "(cached) $ECHO_C" >&6
2516 case $ac_pt_PKG_CONFIG in
2518 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2521 ac_save_IFS=$IFS; IFS=$ac_path_separator
2523 for ac_dir in $ac_dummy; do
2525 test -z "$ac_dir" && ac_dir=.
2526 if $as_executable_p "$ac_dir/$ac_word"; then
2527 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2528 echo "$as_me:2528: found $ac_dir/$ac_word" >&5
2533 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2537 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2539 if test -n "$ac_pt_PKG_CONFIG"; then
2540 echo "$as_me:2540: result: $ac_pt_PKG_CONFIG" >&5
2541 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2543 echo "$as_me:2543: result: no" >&5
2544 echo "${ECHO_T}no" >&6
2547 PKG_CONFIG=$ac_pt_PKG_CONFIG
2549 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2558 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2559 if test "$PKG_CONFIG" != none ; then
2561 if test "x$prefix" != xNONE; then
2562 cf_path_syntax="$prefix"
2564 cf_path_syntax="$ac_default_prefix"
2567 case ".$PKG_CONFIG" in
2572 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2574 (.\${*prefix}*|.\${*dir}*)
2575 eval PKG_CONFIG="$PKG_CONFIG"
2576 case ".$PKG_CONFIG" in
2578 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2583 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2586 { { echo "$as_me:2586: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2587 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2588 { (exit 1); exit 1; }; }
2592 elif test "x$cf_pkg_config" != xno ; then
2593 { echo "$as_me:2593: WARNING: pkg-config is not installed" >&5
2594 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2599 echo "$as_me:2599: checking for pkg-config library directory" >&5
2600 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2603 echo "$as_me:2603: checking for $PKG_CONFIG library directory" >&5
2604 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2608 PKG_CONFIG_LIBDIR=no
2610 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2611 if test "${with_pkg_config_libdir+set}" = set; then
2612 withval="$with_pkg_config_libdir"
2613 PKG_CONFIG_LIBDIR=$withval
2615 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2618 case x$PKG_CONFIG_LIBDIR in
2622 # Look for the library directory using the same prefix as the executable
2623 if test "x$PKG_CONFIG" = xnone
2627 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2630 # If you don't like using the default architecture, you have to specify the
2631 # intended library directory and corresponding compiler/linker options.
2633 # This case allows for Debian's 2014-flavor of multiarch, along with the
2634 # most common variations before that point. Some other variants spell the
2635 # directory differently, e.g., "pkg-config", and put it in unusual places.
2636 # pkg-config has always been poorly standardized, which is ironic...
2637 case x`(arch) 2>/dev/null` in
2640 $cf_path/lib/*64-linux-gnu \
2648 $cf_path/lib/*-linux-gnu \
2656 test -n "$verbose" && echo " list..." 1>&6
2658 echo "${as_me:-configure}:2658: testing list... ..." 1>&5
2660 for cf_config in $cf_search_path
2662 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2664 echo "${as_me:-configure}:2664: testing checking $cf_config/pkgconfig ..." 1>&5
2666 if test -d $cf_config/pkgconfig
2668 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2669 echo "$as_me:2669: checking done" >&5
2670 echo $ECHO_N "checking done... $ECHO_C" >&6
2679 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2680 echo "$as_me:2680: result: $PKG_CONFIG_LIBDIR" >&5
2681 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2684 echo "$as_me:2684: checking if you want to build test-programs" >&5
2685 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2687 # Check whether --with-tests or --without-tests was given.
2688 if test "${with_tests+set}" = set; then
2689 withval="$with_tests"
2690 cf_with_tests=$withval
2694 echo "$as_me:2694: result: $cf_with_tests" >&5
2695 echo "${ECHO_T}$cf_with_tests" >&6
2697 echo "$as_me:2697: checking if we should assume mixed-case filenames" >&5
2698 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2700 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2701 if test "${enable_mixed_case+set}" = set; then
2702 enableval="$enable_mixed_case"
2703 enable_mixedcase=$enableval
2705 enable_mixedcase=auto
2707 echo "$as_me:2707: result: $enable_mixedcase" >&5
2708 echo "${ECHO_T}$enable_mixedcase" >&6
2709 if test "$enable_mixedcase" = "auto" ; then
2711 echo "$as_me:2711: checking if filesystem supports mixed-case filenames" >&5
2712 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2713 if test "${cf_cv_mixedcase+set}" = set; then
2714 echo $ECHO_N "(cached) $ECHO_C" >&6
2717 if test "$cross_compiling" = yes ; then
2718 case $target_alias in
2719 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2727 rm -f conftest CONFTEST
2729 if test -f CONFTEST ; then
2734 rm -f conftest CONFTEST
2738 echo "$as_me:2738: result: $cf_cv_mixedcase" >&5
2739 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2740 test "$cf_cv_mixedcase" = yes &&
2741 cat >>confdefs.h <<\EOF
2742 #define MIXEDCASE_FILENAMES 1
2746 cf_cv_mixedcase=$enable_mixedcase
2747 if test "$enable_mixedcase" = "yes" ; then
2748 cat >>confdefs.h <<\EOF
2749 #define MIXEDCASE_FILENAMES 1
2755 # do this after mixed-case option (tags/TAGS is not as important as tic).
2756 echo "$as_me:2756: checking whether ${MAKE-make} sets \${MAKE}" >&5
2757 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2758 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2759 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2760 echo $ECHO_N "(cached) $ECHO_C" >&6
2762 cat >conftest.make <<\EOF
2764 @echo 'ac_maketemp="${MAKE}"'
2766 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2767 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2768 if test -n "$ac_maketemp"; then
2769 eval ac_cv_prog_make_${ac_make}_set=yes
2771 eval ac_cv_prog_make_${ac_make}_set=no
2775 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2776 echo "$as_me:2776: result: yes" >&5
2777 echo "${ECHO_T}yes" >&6
2780 echo "$as_me:2780: result: no" >&5
2781 echo "${ECHO_T}no" >&6
2782 SET_MAKE="MAKE=${MAKE-make}"
2785 for ac_prog in exctags ctags
2787 # Extract the first word of "$ac_prog", so it can be a program name with args.
2788 set dummy $ac_prog; ac_word=$2
2789 echo "$as_me:2789: checking for $ac_word" >&5
2790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2791 if test "${ac_cv_prog_CTAGS+set}" = set; then
2792 echo $ECHO_N "(cached) $ECHO_C" >&6
2794 if test -n "$CTAGS"; then
2795 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2797 ac_save_IFS=$IFS; IFS=$ac_path_separator
2799 for ac_dir in $ac_dummy; do
2801 test -z "$ac_dir" && ac_dir=.
2802 $as_executable_p "$ac_dir/$ac_word" || continue
2803 ac_cv_prog_CTAGS="$ac_prog"
2804 echo "$as_me:2804: found $ac_dir/$ac_word" >&5
2810 CTAGS=$ac_cv_prog_CTAGS
2811 if test -n "$CTAGS"; then
2812 echo "$as_me:2812: result: $CTAGS" >&5
2813 echo "${ECHO_T}$CTAGS" >&6
2815 echo "$as_me:2815: result: no" >&5
2816 echo "${ECHO_T}no" >&6
2819 test -n "$CTAGS" && break
2822 for ac_prog in exetags etags
2824 # Extract the first word of "$ac_prog", so it can be a program name with args.
2825 set dummy $ac_prog; ac_word=$2
2826 echo "$as_me:2826: checking for $ac_word" >&5
2827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2828 if test "${ac_cv_prog_ETAGS+set}" = set; then
2829 echo $ECHO_N "(cached) $ECHO_C" >&6
2831 if test -n "$ETAGS"; then
2832 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2834 ac_save_IFS=$IFS; IFS=$ac_path_separator
2836 for ac_dir in $ac_dummy; do
2838 test -z "$ac_dir" && ac_dir=.
2839 $as_executable_p "$ac_dir/$ac_word" || continue
2840 ac_cv_prog_ETAGS="$ac_prog"
2841 echo "$as_me:2841: found $ac_dir/$ac_word" >&5
2847 ETAGS=$ac_cv_prog_ETAGS
2848 if test -n "$ETAGS"; then
2849 echo "$as_me:2849: result: $ETAGS" >&5
2850 echo "${ECHO_T}$ETAGS" >&6
2852 echo "$as_me:2852: result: no" >&5
2853 echo "${ECHO_T}no" >&6
2856 test -n "$ETAGS" && break
2859 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2860 set dummy ${CTAGS:-ctags}; ac_word=$2
2861 echo "$as_me:2861: checking for $ac_word" >&5
2862 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2863 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2864 echo $ECHO_N "(cached) $ECHO_C" >&6
2866 if test -n "$MAKE_LOWER_TAGS"; then
2867 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2869 ac_save_IFS=$IFS; IFS=$ac_path_separator
2871 for ac_dir in $ac_dummy; do
2873 test -z "$ac_dir" && ac_dir=.
2874 $as_executable_p "$ac_dir/$ac_word" || continue
2875 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2876 echo "$as_me:2876: found $ac_dir/$ac_word" >&5
2880 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2883 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2884 if test -n "$MAKE_LOWER_TAGS"; then
2885 echo "$as_me:2885: result: $MAKE_LOWER_TAGS" >&5
2886 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2888 echo "$as_me:2888: result: no" >&5
2889 echo "${ECHO_T}no" >&6
2892 if test "$cf_cv_mixedcase" = yes ; then
2893 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2894 set dummy ${ETAGS:-etags}; ac_word=$2
2895 echo "$as_me:2895: checking for $ac_word" >&5
2896 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2897 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2898 echo $ECHO_N "(cached) $ECHO_C" >&6
2900 if test -n "$MAKE_UPPER_TAGS"; then
2901 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2903 ac_save_IFS=$IFS; IFS=$ac_path_separator
2905 for ac_dir in $ac_dummy; do
2907 test -z "$ac_dir" && ac_dir=.
2908 $as_executable_p "$ac_dir/$ac_word" || continue
2909 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2910 echo "$as_me:2910: found $ac_dir/$ac_word" >&5
2914 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2917 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2918 if test -n "$MAKE_UPPER_TAGS"; then
2919 echo "$as_me:2919: result: $MAKE_UPPER_TAGS" >&5
2920 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2922 echo "$as_me:2922: result: no" >&5
2923 echo "${ECHO_T}no" >&6
2930 if test "$MAKE_UPPER_TAGS" = yes ; then
2936 if test "$MAKE_LOWER_TAGS" = yes ; then
2942 echo "$as_me:2942: checking for makeflags variable" >&5
2943 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2944 if test "${cf_cv_makeflags+set}" = set; then
2945 echo $ECHO_N "(cached) $ECHO_C" >&6
2949 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2951 cat >cf_makeflags.tmp <<CF_EOF
2954 @ echo '.$cf_option'
2956 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2957 case "$cf_result" in
2959 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2960 case "$cf_result" in
2961 (.*CC=*) cf_cv_makeflags=
2963 (*) cf_cv_makeflags=$cf_option
2969 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
2973 rm -f cf_makeflags.tmp
2976 echo "$as_me:2976: result: $cf_cv_makeflags" >&5
2977 echo "${ECHO_T}$cf_cv_makeflags" >&6
2979 if test -n "$ac_tool_prefix"; then
2980 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2981 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2982 echo "$as_me:2982: checking for $ac_word" >&5
2983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2984 if test "${ac_cv_prog_RANLIB+set}" = set; then
2985 echo $ECHO_N "(cached) $ECHO_C" >&6
2987 if test -n "$RANLIB"; then
2988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2990 ac_save_IFS=$IFS; IFS=$ac_path_separator
2992 for ac_dir in $ac_dummy; do
2994 test -z "$ac_dir" && ac_dir=.
2995 $as_executable_p "$ac_dir/$ac_word" || continue
2996 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2997 echo "$as_me:2997: found $ac_dir/$ac_word" >&5
3003 RANLIB=$ac_cv_prog_RANLIB
3004 if test -n "$RANLIB"; then
3005 echo "$as_me:3005: result: $RANLIB" >&5
3006 echo "${ECHO_T}$RANLIB" >&6
3008 echo "$as_me:3008: result: no" >&5
3009 echo "${ECHO_T}no" >&6
3013 if test -z "$ac_cv_prog_RANLIB"; then
3014 ac_ct_RANLIB=$RANLIB
3015 # Extract the first word of "ranlib", so it can be a program name with args.
3016 set dummy ranlib; ac_word=$2
3017 echo "$as_me:3017: checking for $ac_word" >&5
3018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3019 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3020 echo $ECHO_N "(cached) $ECHO_C" >&6
3022 if test -n "$ac_ct_RANLIB"; then
3023 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3025 ac_save_IFS=$IFS; IFS=$ac_path_separator
3027 for ac_dir in $ac_dummy; do
3029 test -z "$ac_dir" && ac_dir=.
3030 $as_executable_p "$ac_dir/$ac_word" || continue
3031 ac_cv_prog_ac_ct_RANLIB="ranlib"
3032 echo "$as_me:3032: found $ac_dir/$ac_word" >&5
3036 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3039 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3040 if test -n "$ac_ct_RANLIB"; then
3041 echo "$as_me:3041: result: $ac_ct_RANLIB" >&5
3042 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3044 echo "$as_me:3044: result: no" >&5
3045 echo "${ECHO_T}no" >&6
3048 RANLIB=$ac_ct_RANLIB
3050 RANLIB="$ac_cv_prog_RANLIB"
3053 if test -n "$ac_tool_prefix"; then
3054 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3055 set dummy ${ac_tool_prefix}ld; ac_word=$2
3056 echo "$as_me:3056: checking for $ac_word" >&5
3057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3058 if test "${ac_cv_prog_LD+set}" = set; then
3059 echo $ECHO_N "(cached) $ECHO_C" >&6
3061 if test -n "$LD"; then
3062 ac_cv_prog_LD="$LD" # Let the user override the test.
3064 ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 for ac_dir in $ac_dummy; do
3068 test -z "$ac_dir" && ac_dir=.
3069 $as_executable_p "$ac_dir/$ac_word" || continue
3070 ac_cv_prog_LD="${ac_tool_prefix}ld"
3071 echo "$as_me:3071: found $ac_dir/$ac_word" >&5
3078 if test -n "$LD"; then
3079 echo "$as_me:3079: result: $LD" >&5
3080 echo "${ECHO_T}$LD" >&6
3082 echo "$as_me:3082: result: no" >&5
3083 echo "${ECHO_T}no" >&6
3087 if test -z "$ac_cv_prog_LD"; then
3089 # Extract the first word of "ld", so it can be a program name with args.
3090 set dummy ld; ac_word=$2
3091 echo "$as_me:3091: checking for $ac_word" >&5
3092 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3093 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3094 echo $ECHO_N "(cached) $ECHO_C" >&6
3096 if test -n "$ac_ct_LD"; then
3097 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3099 ac_save_IFS=$IFS; IFS=$ac_path_separator
3101 for ac_dir in $ac_dummy; do
3103 test -z "$ac_dir" && ac_dir=.
3104 $as_executable_p "$ac_dir/$ac_word" || continue
3105 ac_cv_prog_ac_ct_LD="ld"
3106 echo "$as_me:3106: found $ac_dir/$ac_word" >&5
3110 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3113 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3114 if test -n "$ac_ct_LD"; then
3115 echo "$as_me:3115: result: $ac_ct_LD" >&5
3116 echo "${ECHO_T}$ac_ct_LD" >&6
3118 echo "$as_me:3118: result: no" >&5
3119 echo "${ECHO_T}no" >&6
3127 if test -n "$ac_tool_prefix"; then
3128 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3129 set dummy ${ac_tool_prefix}ar; ac_word=$2
3130 echo "$as_me:3130: checking for $ac_word" >&5
3131 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3132 if test "${ac_cv_prog_AR+set}" = set; then
3133 echo $ECHO_N "(cached) $ECHO_C" >&6
3135 if test -n "$AR"; then
3136 ac_cv_prog_AR="$AR" # Let the user override the test.
3138 ac_save_IFS=$IFS; IFS=$ac_path_separator
3140 for ac_dir in $ac_dummy; do
3142 test -z "$ac_dir" && ac_dir=.
3143 $as_executable_p "$ac_dir/$ac_word" || continue
3144 ac_cv_prog_AR="${ac_tool_prefix}ar"
3145 echo "$as_me:3145: found $ac_dir/$ac_word" >&5
3152 if test -n "$AR"; then
3153 echo "$as_me:3153: result: $AR" >&5
3154 echo "${ECHO_T}$AR" >&6
3156 echo "$as_me:3156: result: no" >&5
3157 echo "${ECHO_T}no" >&6
3161 if test -z "$ac_cv_prog_AR"; then
3163 # Extract the first word of "ar", so it can be a program name with args.
3164 set dummy ar; ac_word=$2
3165 echo "$as_me:3165: checking for $ac_word" >&5
3166 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3167 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3168 echo $ECHO_N "(cached) $ECHO_C" >&6
3170 if test -n "$ac_ct_AR"; then
3171 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3173 ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 for ac_dir in $ac_dummy; do
3177 test -z "$ac_dir" && ac_dir=.
3178 $as_executable_p "$ac_dir/$ac_word" || continue
3179 ac_cv_prog_ac_ct_AR="ar"
3180 echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3184 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3187 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3188 if test -n "$ac_ct_AR"; then
3189 echo "$as_me:3189: result: $ac_ct_AR" >&5
3190 echo "${ECHO_T}$ac_ct_AR" >&6
3192 echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3201 if test -n "$ac_tool_prefix"; then
3202 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3203 set dummy ${ac_tool_prefix}ar; ac_word=$2
3204 echo "$as_me:3204: checking for $ac_word" >&5
3205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3206 if test "${ac_cv_prog_AR+set}" = set; then
3207 echo $ECHO_N "(cached) $ECHO_C" >&6
3209 if test -n "$AR"; then
3210 ac_cv_prog_AR="$AR" # Let the user override the test.
3212 ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 for ac_dir in $ac_dummy; do
3216 test -z "$ac_dir" && ac_dir=.
3217 $as_executable_p "$ac_dir/$ac_word" || continue
3218 ac_cv_prog_AR="${ac_tool_prefix}ar"
3219 echo "$as_me:3219: found $ac_dir/$ac_word" >&5
3226 if test -n "$AR"; then
3227 echo "$as_me:3227: result: $AR" >&5
3228 echo "${ECHO_T}$AR" >&6
3230 echo "$as_me:3230: result: no" >&5
3231 echo "${ECHO_T}no" >&6
3235 if test -z "$ac_cv_prog_AR"; then
3237 # Extract the first word of "ar", so it can be a program name with args.
3238 set dummy ar; ac_word=$2
3239 echo "$as_me:3239: checking for $ac_word" >&5
3240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3241 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3242 echo $ECHO_N "(cached) $ECHO_C" >&6
3244 if test -n "$ac_ct_AR"; then
3245 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3247 ac_save_IFS=$IFS; IFS=$ac_path_separator
3249 for ac_dir in $ac_dummy; do
3251 test -z "$ac_dir" && ac_dir=.
3252 $as_executable_p "$ac_dir/$ac_word" || continue
3253 ac_cv_prog_ac_ct_AR="ar"
3254 echo "$as_me:3254: found $ac_dir/$ac_word" >&5
3258 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3261 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3262 if test -n "$ac_ct_AR"; then
3263 echo "$as_me:3263: result: $ac_ct_AR" >&5
3264 echo "${ECHO_T}$ac_ct_AR" >&6
3266 echo "$as_me:3266: result: no" >&5
3267 echo "${ECHO_T}no" >&6
3275 echo "$as_me:3275: checking for options to update archives" >&5
3276 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3277 if test "${cf_cv_ar_flags+set}" = set; then
3278 echo $ECHO_N "(cached) $ECHO_C" >&6
3281 cf_cv_ar_flags=unknown
3282 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3285 # check if $ARFLAGS already contains this choice
3286 if test "x$ARFLAGS" != "x" ; then
3287 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3288 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3294 rm -f conftest.$ac_cv_objext
3297 cat >conftest.$ac_ext <<EOF
3298 #line 3298 "configure"
3299 int testdata[3] = { 123, 456, 789 };
3301 if { (eval echo "$as_me:3301: \"$ac_compile\"") >&5
3302 (eval $ac_compile) 2>&5
3304 echo "$as_me:3304: \$? = $ac_status" >&5
3305 (exit $ac_status); } ; then
3306 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3307 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3308 if test -f conftest.a ; then
3309 cf_cv_ar_flags=$cf_ar_flags
3313 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3315 echo "${as_me:-configure}:3315: testing cannot compile test-program ..." 1>&5
3320 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3323 echo "$as_me:3323: result: $cf_cv_ar_flags" >&5
3324 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3326 if test -n "$ARFLAGS" ; then
3327 if test -n "$cf_cv_ar_flags" ; then
3328 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3331 ARFLAGS=$cf_cv_ar_flags
3334 echo "$as_me:3334: checking for PATH separator" >&5
3335 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3336 case $cf_cv_system_name in
3337 (os2*) PATH_SEPARATOR=';' ;;
3338 (*) ${PATH_SEPARATOR:=':'} ;;
3341 echo "$as_me:3341: result: $PATH_SEPARATOR" >&5
3342 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3344 echo "$as_me:3344: checking if you have specified an install-prefix" >&5
3345 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3347 # Check whether --with-install-prefix or --without-install-prefix was given.
3348 if test "${with_install_prefix+set}" = set; then
3349 withval="$with_install_prefix"
3353 (*) DESTDIR="$withval"
3357 echo "$as_me:3357: result: $DESTDIR" >&5
3358 echo "${ECHO_T}$DESTDIR" >&6
3360 ###############################################################################
3362 # If we're cross-compiling, allow the user to override the tools and their
3363 # options. The configure script is oriented toward identifying the host
3364 # compiler, etc., but we need a build compiler to generate parts of the source.
3366 if test "$cross_compiling" = yes ; then
3368 # defaults that we might want to override
3369 : ${BUILD_CFLAGS:=''}
3370 : ${BUILD_CPPFLAGS:=''}
3371 : ${BUILD_LDFLAGS:=''}
3373 : ${BUILD_EXEEXT:='$x'}
3374 : ${BUILD_OBJEXT:='o'}
3376 # Check whether --with-build-cc or --without-build-cc was given.
3377 if test "${with_build_cc+set}" = set; then
3378 withval="$with_build_cc"
3381 for ac_prog in gcc cc cl
3383 # Extract the first word of "$ac_prog", so it can be a program name with args.
3384 set dummy $ac_prog; ac_word=$2
3385 echo "$as_me:3385: checking for $ac_word" >&5
3386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3387 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
3390 if test -n "$BUILD_CC"; then
3391 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3393 ac_save_IFS=$IFS; IFS=$ac_path_separator
3395 for ac_dir in $ac_dummy; do
3397 test -z "$ac_dir" && ac_dir=.
3398 $as_executable_p "$ac_dir/$ac_word" || continue
3399 ac_cv_prog_BUILD_CC="$ac_prog"
3400 echo "$as_me:3400: found $ac_dir/$ac_word" >&5
3406 BUILD_CC=$ac_cv_prog_BUILD_CC
3407 if test -n "$BUILD_CC"; then
3408 echo "$as_me:3408: result: $BUILD_CC" >&5
3409 echo "${ECHO_T}$BUILD_CC" >&6
3411 echo "$as_me:3411: result: no" >&5
3412 echo "${ECHO_T}no" >&6
3415 test -n "$BUILD_CC" && break
3419 echo "$as_me:3419: checking for native build C compiler" >&5
3420 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3421 echo "$as_me:3421: result: $BUILD_CC" >&5
3422 echo "${ECHO_T}$BUILD_CC" >&6
3424 echo "$as_me:3424: checking for native build C preprocessor" >&5
3425 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3427 # Check whether --with-build-cpp or --without-build-cpp was given.
3428 if test "${with_build_cpp+set}" = set; then
3429 withval="$with_build_cpp"
3430 BUILD_CPP="$withval"
3432 BUILD_CPP='${BUILD_CC} -E'
3434 echo "$as_me:3434: result: $BUILD_CPP" >&5
3435 echo "${ECHO_T}$BUILD_CPP" >&6
3437 echo "$as_me:3437: checking for native build C flags" >&5
3438 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3440 # Check whether --with-build-cflags or --without-build-cflags was given.
3441 if test "${with_build_cflags+set}" = set; then
3442 withval="$with_build_cflags"
3443 BUILD_CFLAGS="$withval"
3445 echo "$as_me:3445: result: $BUILD_CFLAGS" >&5
3446 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3448 echo "$as_me:3448: checking for native build C preprocessor-flags" >&5
3449 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3451 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3452 if test "${with_build_cppflags+set}" = set; then
3453 withval="$with_build_cppflags"
3454 BUILD_CPPFLAGS="$withval"
3456 echo "$as_me:3456: result: $BUILD_CPPFLAGS" >&5
3457 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3459 echo "$as_me:3459: checking for native build linker-flags" >&5
3460 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3462 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3463 if test "${with_build_ldflags+set}" = set; then
3464 withval="$with_build_ldflags"
3465 BUILD_LDFLAGS="$withval"
3467 echo "$as_me:3467: result: $BUILD_LDFLAGS" >&5
3468 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3470 echo "$as_me:3470: checking for native build linker-libraries" >&5
3471 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3473 # Check whether --with-build-libs or --without-build-libs was given.
3474 if test "${with_build_libs+set}" = set; then
3475 withval="$with_build_libs"
3476 BUILD_LIBS="$withval"
3478 echo "$as_me:3478: result: $BUILD_LIBS" >&5
3479 echo "${ECHO_T}$BUILD_LIBS" >&6
3481 # this assumes we're on Unix.
3485 : ${BUILD_CC:='${CC}'}
3487 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3488 { { echo "$as_me:3488: error: Cross-build requires two compilers.
3489 Use --with-build-cc to specify the native compiler." >&5
3490 echo "$as_me: error: Cross-build requires two compilers.
3491 Use --with-build-cc to specify the native compiler." >&2;}
3492 { (exit 1); exit 1; }; }
3496 : ${BUILD_CC:='${CC}'}
3497 : ${BUILD_CPP:='${CPP}'}
3498 : ${BUILD_CFLAGS:='${CFLAGS}'}
3499 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3500 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3501 : ${BUILD_LIBS:='${LIBS}'}
3502 : ${BUILD_EXEEXT:='$x'}
3503 : ${BUILD_OBJEXT:='o'}
3506 ###############################################################################
3508 ### Options to allow the user to specify the set of libraries which are used.
3509 ### Use "--without-normal --with-shared" to allow the default model to be
3510 ### shared, for example.
3513 echo "$as_me:3513: checking if you want to build shared C-objects" >&5
3514 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3516 # Check whether --with-shared or --without-shared was given.
3517 if test "${with_shared+set}" = set; then
3518 withval="$with_shared"
3519 with_shared=$withval
3523 echo "$as_me:3523: result: $with_shared" >&5
3524 echo "${ECHO_T}$with_shared" >&6
3525 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3527 echo "$as_me:3527: checking for specified models" >&5
3528 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3529 test -z "$cf_list_models" && cf_list_models=normal
3530 echo "$as_me:3530: result: $cf_list_models" >&5
3531 echo "${ECHO_T}$cf_list_models" >&6
3533 ### Use the first model as the default, and save its suffix for use in building
3534 ### up test-applications.
3535 echo "$as_me:3535: checking for default model" >&5
3536 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3537 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3538 echo "$as_me:3538: result: $DFT_LWR_MODEL" >&5
3539 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3541 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3543 echo "$as_me:3543: checking for specific curses-directory" >&5
3544 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3546 # Check whether --with-curses-dir or --without-curses-dir was given.
3547 if test "${with_curses_dir+set}" = set; then
3548 withval="$with_curses_dir"
3549 cf_cv_curses_dir=$withval
3553 echo "$as_me:3553: result: $cf_cv_curses_dir" >&5
3554 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3556 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3559 if test "x$prefix" != xNONE; then
3560 cf_path_syntax="$prefix"
3562 cf_path_syntax="$ac_default_prefix"
3570 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3572 (.\${*prefix}*|.\${*dir}*)
3573 eval withval="$withval"
3576 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3581 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3584 { { echo "$as_me:3584: error: expected a pathname, not \"$withval\"" >&5
3585 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3586 { (exit 1); exit 1; }; }
3590 if test -d "$cf_cv_curses_dir"
3593 if test -n "$cf_cv_curses_dir/include" ; then
3594 for cf_add_incdir in $cf_cv_curses_dir/include
3596 while test $cf_add_incdir != /usr/include
3598 if test -d $cf_add_incdir
3601 if test -n "$CFLAGS$CPPFLAGS" ; then
3602 # a loop is needed to ensure we can add subdirs of existing dirs
3603 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3604 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3605 cf_have_incdir=yes; break
3610 if test "$cf_have_incdir" = no ; then
3611 if test "$cf_add_incdir" = /usr/local/include ; then
3612 if test "$GCC" = yes
3614 cf_save_CPPFLAGS=$CPPFLAGS
3615 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3616 cat >conftest.$ac_ext <<_ACEOF
3617 #line 3617 "configure"
3618 #include "confdefs.h"
3628 rm -f conftest.$ac_objext
3629 if { (eval echo "$as_me:3629: \"$ac_compile\"") >&5
3630 (eval $ac_compile) 2>&5
3632 echo "$as_me:3632: \$? = $ac_status" >&5
3633 (exit $ac_status); } &&
3634 { ac_try='test -s conftest.$ac_objext'
3635 { (eval echo "$as_me:3635: \"$ac_try\"") >&5
3638 echo "$as_me:3638: \$? = $ac_status" >&5
3639 (exit $ac_status); }; }; then
3642 echo "$as_me: failed program was:" >&5
3643 cat conftest.$ac_ext >&5
3646 rm -f conftest.$ac_objext conftest.$ac_ext
3647 CPPFLAGS=$cf_save_CPPFLAGS
3652 if test "$cf_have_incdir" = no ; then
3653 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3655 echo "${as_me:-configure}:3655: testing adding $cf_add_incdir to include-path ..." 1>&5
3657 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3659 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3660 test "$cf_top_incdir" = "$cf_add_incdir" && break
3661 cf_add_incdir="$cf_top_incdir"
3672 if test -n "$cf_cv_curses_dir/lib" ; then
3673 for cf_add_libdir in $cf_cv_curses_dir/lib
3675 if test $cf_add_libdir = /usr/lib ; then
3677 elif test -d $cf_add_libdir
3680 if test -n "$LDFLAGS$LIBS" ; then
3681 # a loop is needed to ensure we can add subdirs of existing dirs
3682 for cf_test_libdir in $LDFLAGS $LIBS ; do
3683 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3684 cf_have_libdir=yes; break
3688 if test "$cf_have_libdir" = no ; then
3689 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3691 echo "${as_me:-configure}:3691: testing adding $cf_add_libdir to library-path ..." 1>&5
3693 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3702 cf_ncuconfig_root=ncurses
3703 cf_have_ncuconfig=no
3705 if test "x${PKG_CONFIG:=none}" != xnone; then
3706 echo "$as_me:3706: checking pkg-config for $cf_ncuconfig_root" >&5
3707 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3708 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3709 echo "$as_me:3709: result: yes" >&5
3710 echo "${ECHO_T}yes" >&6
3712 echo "$as_me:3712: checking if the $cf_ncuconfig_root package files work" >&5
3713 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3714 cf_have_ncuconfig=unknown
3716 cf_save_CPPFLAGS="$CPPFLAGS"
3717 cf_save_LIBS="$LIBS"
3719 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3721 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3722 # Filter out duplicates - this happens with badly-designed ".pc" files...
3723 for cf_add_1lib in $LIBS
3725 for cf_add_2lib in $cf_add_libs
3727 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3733 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3737 cat >conftest.$ac_ext <<_ACEOF
3738 #line 3738 "configure"
3739 #include "confdefs.h"
3740 #include <${cf_cv_ncurses_header:-curses.h}>
3744 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3749 rm -f conftest.$ac_objext conftest$ac_exeext
3750 if { (eval echo "$as_me:3750: \"$ac_link\"") >&5
3751 (eval $ac_link) 2>&5
3753 echo "$as_me:3753: \$? = $ac_status" >&5
3754 (exit $ac_status); } &&
3755 { ac_try='test -s conftest$ac_exeext'
3756 { (eval echo "$as_me:3756: \"$ac_try\"") >&5
3759 echo "$as_me:3759: \$? = $ac_status" >&5
3760 (exit $ac_status); }; }; then
3761 if test "$cross_compiling" = yes; then
3762 cf_have_ncuconfig=maybe
3764 cat >conftest.$ac_ext <<_ACEOF
3765 #line 3765 "configure"
3766 #include "confdefs.h"
3767 #include <${cf_cv_ncurses_header:-curses.h}>
3769 { char *xx = curses_version(); return (xx == 0); }
3771 rm -f conftest$ac_exeext
3772 if { (eval echo "$as_me:3772: \"$ac_link\"") >&5
3773 (eval $ac_link) 2>&5
3775 echo "$as_me:3775: \$? = $ac_status" >&5
3776 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3777 { (eval echo "$as_me:3777: \"$ac_try\"") >&5
3780 echo "$as_me:3780: \$? = $ac_status" >&5
3781 (exit $ac_status); }; }; then
3782 cf_have_ncuconfig=yes
3784 echo "$as_me: program exited with status $ac_status" >&5
3785 echo "$as_me: failed program was:" >&5
3786 cat conftest.$ac_ext >&5
3787 cf_have_ncuconfig=no
3789 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3792 echo "$as_me: failed program was:" >&5
3793 cat conftest.$ac_ext >&5
3794 cf_have_ncuconfig=no
3796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3797 echo "$as_me:3797: result: $cf_have_ncuconfig" >&5
3798 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3799 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3800 if test "$cf_have_ncuconfig" != "yes"
3802 CPPFLAGS="$cf_save_CPPFLAGS"
3803 LIBS="$cf_save_LIBS"
3804 NCURSES_CONFIG_PKG=none
3807 cat >>confdefs.h <<\EOF
3811 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3815 echo "$as_me:3815: result: no" >&5
3816 echo "${ECHO_T}no" >&6
3817 NCURSES_CONFIG_PKG=none
3820 NCURSES_CONFIG_PKG=none
3823 if test "x$cf_have_ncuconfig" = "xno"; then
3824 echo "Looking for ${cf_ncuconfig_root}-config"
3826 if test -n "$ac_tool_prefix"; then
3827 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3829 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3830 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3831 echo "$as_me:3831: checking for $ac_word" >&5
3832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3833 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3834 echo $ECHO_N "(cached) $ECHO_C" >&6
3836 if test -n "$NCURSES_CONFIG"; then
3837 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3839 ac_save_IFS=$IFS; IFS=$ac_path_separator
3841 for ac_dir in $ac_dummy; do
3843 test -z "$ac_dir" && ac_dir=.
3844 $as_executable_p "$ac_dir/$ac_word" || continue
3845 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3846 echo "$as_me:3846: found $ac_dir/$ac_word" >&5
3852 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3853 if test -n "$NCURSES_CONFIG"; then
3854 echo "$as_me:3854: result: $NCURSES_CONFIG" >&5
3855 echo "${ECHO_T}$NCURSES_CONFIG" >&6
3857 echo "$as_me:3857: result: no" >&5
3858 echo "${ECHO_T}no" >&6
3861 test -n "$NCURSES_CONFIG" && break
3864 if test -z "$NCURSES_CONFIG"; then
3865 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3866 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3868 # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 echo "$as_me:3870: checking for $ac_word" >&5
3871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3872 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3873 echo $ECHO_N "(cached) $ECHO_C" >&6
3875 if test -n "$ac_ct_NCURSES_CONFIG"; then
3876 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
3878 ac_save_IFS=$IFS; IFS=$ac_path_separator
3880 for ac_dir in $ac_dummy; do
3882 test -z "$ac_dir" && ac_dir=.
3883 $as_executable_p "$ac_dir/$ac_word" || continue
3884 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
3885 echo "$as_me:3885: found $ac_dir/$ac_word" >&5
3891 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
3892 if test -n "$ac_ct_NCURSES_CONFIG"; then
3893 echo "$as_me:3893: result: $ac_ct_NCURSES_CONFIG" >&5
3894 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
3896 echo "$as_me:3896: result: no" >&5
3897 echo "${ECHO_T}no" >&6
3900 test -n "$ac_ct_NCURSES_CONFIG" && break
3902 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
3904 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
3907 if test "$NCURSES_CONFIG" != none ; then
3909 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3911 cf_add_libs="`$NCURSES_CONFIG --libs`"
3912 # Filter out duplicates - this happens with badly-designed ".pc" files...
3913 for cf_add_1lib in $LIBS
3915 for cf_add_2lib in $cf_add_libs
3917 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3923 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3927 # even with config script, some packages use no-override for curses.h
3929 echo "$as_me:3929: checking if we have identified curses headers" >&5
3930 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
3931 if test "${cf_cv_ncurses_header+set}" = set; then
3932 echo $ECHO_N "(cached) $ECHO_C" >&6
3935 cf_cv_ncurses_header=none
3937 ncurses.h ncurses/ncurses.h \
3938 curses.h ncurses/curses.h
3940 cat >conftest.$ac_ext <<_ACEOF
3941 #line 3941 "configure"
3942 #include "confdefs.h"
3943 #include <${cf_header}>
3947 initscr(); tgoto("?", 0,0)
3952 rm -f conftest.$ac_objext
3953 if { (eval echo "$as_me:3953: \"$ac_compile\"") >&5
3954 (eval $ac_compile) 2>&5
3956 echo "$as_me:3956: \$? = $ac_status" >&5
3957 (exit $ac_status); } &&
3958 { ac_try='test -s conftest.$ac_objext'
3959 { (eval echo "$as_me:3959: \"$ac_try\"") >&5
3962 echo "$as_me:3962: \$? = $ac_status" >&5
3963 (exit $ac_status); }; }; then
3964 cf_cv_ncurses_header=$cf_header; break
3966 echo "$as_me: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3969 rm -f conftest.$ac_objext conftest.$ac_ext
3973 echo "$as_me:3973: result: $cf_cv_ncurses_header" >&5
3974 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
3976 if test "$cf_cv_ncurses_header" = none ; then
3977 { { echo "$as_me:3977: error: No curses header-files found" >&5
3978 echo "$as_me: error: No curses header-files found" >&2;}
3979 { (exit 1); exit 1; }; }
3982 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3984 for ac_header in $cf_cv_ncurses_header
3986 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3987 echo "$as_me:3987: checking for $ac_header" >&5
3988 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3989 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3990 echo $ECHO_N "(cached) $ECHO_C" >&6
3992 cat >conftest.$ac_ext <<_ACEOF
3993 #line 3993 "configure"
3994 #include "confdefs.h"
3995 #include <$ac_header>
3997 if { (eval echo "$as_me:3997: \"$ac_cpp conftest.$ac_ext\"") >&5
3998 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4000 egrep -v '^ *\+' conftest.er1 >conftest.err
4002 cat conftest.err >&5
4003 echo "$as_me:4003: \$? = $ac_status" >&5
4004 (exit $ac_status); } >/dev/null; then
4005 if test -s conftest.err; then
4006 ac_cpp_err=$ac_c_preproc_warn_flag
4013 if test -z "$ac_cpp_err"; then
4014 eval "$as_ac_Header=yes"
4016 echo "$as_me: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
4018 eval "$as_ac_Header=no"
4020 rm -f conftest.err conftest.$ac_ext
4022 echo "$as_me:4022: result: `eval echo '${'$as_ac_Header'}'`" >&5
4023 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4024 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4025 cat >>confdefs.h <<EOF
4026 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4032 cat >>confdefs.h <<\EOF
4036 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4038 cat >>confdefs.h <<EOF
4039 #define $cf_nculib_ROOT 1
4042 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4046 cf_ncuhdr_root=ncurses
4048 test -n "$cf_cv_curses_dir" && \
4049 test "$cf_cv_curses_dir" != "no" && { \
4051 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4052 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4054 while test $cf_add_incdir != /usr/include
4056 if test -d $cf_add_incdir
4059 if test -n "$CFLAGS$CPPFLAGS" ; then
4060 # a loop is needed to ensure we can add subdirs of existing dirs
4061 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4062 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4063 cf_have_incdir=yes; break
4068 if test "$cf_have_incdir" = no ; then
4069 if test "$cf_add_incdir" = /usr/local/include ; then
4070 if test "$GCC" = yes
4072 cf_save_CPPFLAGS=$CPPFLAGS
4073 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4074 cat >conftest.$ac_ext <<_ACEOF
4075 #line 4075 "configure"
4076 #include "confdefs.h"
4086 rm -f conftest.$ac_objext
4087 if { (eval echo "$as_me:4087: \"$ac_compile\"") >&5
4088 (eval $ac_compile) 2>&5
4090 echo "$as_me:4090: \$? = $ac_status" >&5
4091 (exit $ac_status); } &&
4092 { ac_try='test -s conftest.$ac_objext'
4093 { (eval echo "$as_me:4093: \"$ac_try\"") >&5
4096 echo "$as_me:4096: \$? = $ac_status" >&5
4097 (exit $ac_status); }; }; then
4100 echo "$as_me: failed program was:" >&5
4101 cat conftest.$ac_ext >&5
4104 rm -f conftest.$ac_objext conftest.$ac_ext
4105 CPPFLAGS=$cf_save_CPPFLAGS
4110 if test "$cf_have_incdir" = no ; then
4111 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4113 echo "${as_me:-configure}:4113: testing adding $cf_add_incdir to include-path ..." 1>&5
4115 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4117 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4118 test "$cf_top_incdir" = "$cf_add_incdir" && break
4119 cf_add_incdir="$cf_top_incdir"
4132 echo "$as_me:4132: checking for $cf_ncuhdr_root header in include-path" >&5
4133 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4134 if test "${cf_cv_ncurses_h+set}" = set; then
4135 echo $ECHO_N "(cached) $ECHO_C" >&6
4138 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4139 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4140 for cf_header in $cf_header_list
4143 cat >conftest.$ac_ext <<_ACEOF
4144 #line 4144 "configure"
4145 #include "confdefs.h"
4147 #include <$cf_header>
4152 #ifdef NCURSES_VERSION
4154 printf("%s\n", NCURSES_VERSION);
4167 rm -f conftest.$ac_objext
4168 if { (eval echo "$as_me:4168: \"$ac_compile\"") >&5
4169 (eval $ac_compile) 2>&5
4171 echo "$as_me:4171: \$? = $ac_status" >&5
4172 (exit $ac_status); } &&
4173 { ac_try='test -s conftest.$ac_objext'
4174 { (eval echo "$as_me:4174: \"$ac_try\"") >&5
4177 echo "$as_me:4177: \$? = $ac_status" >&5
4178 (exit $ac_status); }; }; then
4179 cf_cv_ncurses_h=$cf_header
4182 echo "$as_me: failed program was:" >&5
4183 cat conftest.$ac_ext >&5
4186 rm -f conftest.$ac_objext conftest.$ac_ext
4188 test "$cf_cv_ncurses_h" != no && break
4192 echo "$as_me:4192: result: $cf_cv_ncurses_h" >&5
4193 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4195 if test "$cf_cv_ncurses_h" != no ; then
4196 cf_cv_ncurses_header=$cf_cv_ncurses_h
4199 echo "$as_me:4199: checking for $cf_ncuhdr_root include-path" >&5
4200 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4201 if test "${cf_cv_ncurses_h2+set}" = set; then
4202 echo $ECHO_N "(cached) $ECHO_C" >&6
4205 test -n "$verbose" && echo
4209 # collect the current set of include-directories from compiler flags
4210 cf_header_path_list=""
4211 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4212 for cf_header_path in $CPPFLAGS $CFLAGS
4214 case $cf_header_path in
4216 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4218 test "x$cf_header_path" != "xNONE" && \
4219 test -d "$cf_header_path" && \
4221 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4222 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4223 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4224 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4225 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4226 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"
4229 cf_header_path_list="$cf_header_path_list $cf_search"
4235 # add the variations for the package we are looking for
4239 test "x$prefix" != "xNONE" && \
4240 test -d "$prefix" && \
4242 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4243 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4244 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4245 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4246 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4247 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4250 for cf_subdir_prefix in \
4259 test "x$cf_subdir_prefix" != "x$prefix" && \
4260 test -d "$cf_subdir_prefix" && \
4261 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4262 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4263 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4264 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4265 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4266 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4267 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"
4272 test "$includedir" != NONE && \
4273 test "$includedir" != "/usr/include" && \
4274 test -d "$includedir" && {
4275 test -d $includedir && cf_search="$cf_search $includedir"
4276 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4279 test "$oldincludedir" != NONE && \
4280 test "$oldincludedir" != "/usr/include" && \
4281 test -d "$oldincludedir" && {
4282 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4283 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4286 cf_search="$cf_search $cf_header_path_list"
4288 test -n "$verbose" && echo search path $cf_search
4289 cf_save2_CPPFLAGS="$CPPFLAGS"
4290 for cf_incdir in $cf_search
4293 if test -n "$cf_incdir" ; then
4294 for cf_add_incdir in $cf_incdir
4296 while test $cf_add_incdir != /usr/include
4298 if test -d $cf_add_incdir
4301 if test -n "$CFLAGS$CPPFLAGS" ; then
4302 # a loop is needed to ensure we can add subdirs of existing dirs
4303 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4304 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4305 cf_have_incdir=yes; break
4310 if test "$cf_have_incdir" = no ; then
4311 if test "$cf_add_incdir" = /usr/local/include ; then
4312 if test "$GCC" = yes
4314 cf_save_CPPFLAGS=$CPPFLAGS
4315 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4316 cat >conftest.$ac_ext <<_ACEOF
4317 #line 4317 "configure"
4318 #include "confdefs.h"
4328 rm -f conftest.$ac_objext
4329 if { (eval echo "$as_me:4329: \"$ac_compile\"") >&5
4330 (eval $ac_compile) 2>&5
4332 echo "$as_me:4332: \$? = $ac_status" >&5
4333 (exit $ac_status); } &&
4334 { ac_try='test -s conftest.$ac_objext'
4335 { (eval echo "$as_me:4335: \"$ac_try\"") >&5
4338 echo "$as_me:4338: \$? = $ac_status" >&5
4339 (exit $ac_status); }; }; then
4342 echo "$as_me: failed program was:" >&5
4343 cat conftest.$ac_ext >&5
4346 rm -f conftest.$ac_objext conftest.$ac_ext
4347 CPPFLAGS=$cf_save_CPPFLAGS
4352 if test "$cf_have_incdir" = no ; then
4353 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4355 echo "${as_me:-configure}:4355: testing adding $cf_add_incdir to include-path ..." 1>&5
4357 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4359 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4360 test "$cf_top_incdir" = "$cf_add_incdir" && break
4361 cf_add_incdir="$cf_top_incdir"
4377 cat >conftest.$ac_ext <<_ACEOF
4378 #line 4378 "configure"
4379 #include "confdefs.h"
4381 #include <$cf_header>
4386 #ifdef NCURSES_VERSION
4388 printf("%s\n", NCURSES_VERSION);
4401 rm -f conftest.$ac_objext
4402 if { (eval echo "$as_me:4402: \"$ac_compile\"") >&5
4403 (eval $ac_compile) 2>&5
4405 echo "$as_me:4405: \$? = $ac_status" >&5
4406 (exit $ac_status); } &&
4407 { ac_try='test -s conftest.$ac_objext'
4408 { (eval echo "$as_me:4408: \"$ac_try\"") >&5
4411 echo "$as_me:4411: \$? = $ac_status" >&5
4412 (exit $ac_status); }; }; then
4413 cf_cv_ncurses_h2=$cf_header
4416 echo "$as_me: failed program was:" >&5
4417 cat conftest.$ac_ext >&5
4420 rm -f conftest.$ac_objext conftest.$ac_ext
4422 if test "$cf_cv_ncurses_h2" != no ; then
4423 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4424 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4427 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4429 CPPFLAGS="$cf_save2_CPPFLAGS"
4430 test "$cf_cv_ncurses_h2" != no && break
4432 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4432: error: not found" >&5
4433 echo "$as_me: error: not found" >&2;}
4434 { (exit 1); exit 1; }; }
4437 echo "$as_me:4437: result: $cf_cv_ncurses_h2" >&5
4438 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4440 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4441 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4442 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4443 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4446 if test -n "$cf_1st_incdir" ; then
4447 for cf_add_incdir in $cf_1st_incdir
4449 while test $cf_add_incdir != /usr/include
4451 if test -d $cf_add_incdir
4454 if test -n "$CFLAGS$CPPFLAGS" ; then
4455 # a loop is needed to ensure we can add subdirs of existing dirs
4456 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4457 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4458 cf_have_incdir=yes; break
4463 if test "$cf_have_incdir" = no ; then
4464 if test "$cf_add_incdir" = /usr/local/include ; then
4465 if test "$GCC" = yes
4467 cf_save_CPPFLAGS=$CPPFLAGS
4468 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4469 cat >conftest.$ac_ext <<_ACEOF
4470 #line 4470 "configure"
4471 #include "confdefs.h"
4481 rm -f conftest.$ac_objext
4482 if { (eval echo "$as_me:4482: \"$ac_compile\"") >&5
4483 (eval $ac_compile) 2>&5
4485 echo "$as_me:4485: \$? = $ac_status" >&5
4486 (exit $ac_status); } &&
4487 { ac_try='test -s conftest.$ac_objext'
4488 { (eval echo "$as_me:4488: \"$ac_try\"") >&5
4491 echo "$as_me:4491: \$? = $ac_status" >&5
4492 (exit $ac_status); }; }; then
4495 echo "$as_me: failed program was:" >&5
4496 cat conftest.$ac_ext >&5
4499 rm -f conftest.$ac_objext conftest.$ac_ext
4500 CPPFLAGS=$cf_save_CPPFLAGS
4505 if test "$cf_have_incdir" = no ; then
4506 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4508 echo "${as_me:-configure}:4508: testing adding $cf_add_incdir to include-path ..." 1>&5
4510 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4512 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4513 test "$cf_top_incdir" = "$cf_add_incdir" && break
4514 cf_add_incdir="$cf_top_incdir"
4527 # Set definitions to allow ifdef'ing for ncurses.h
4529 case $cf_cv_ncurses_header in
4532 cat >>confdefs.h <<\EOF
4533 #define HAVE_NCURSES_H 1
4539 case $cf_cv_ncurses_header in
4540 (ncurses/curses.h|ncurses/ncurses.h)
4542 cat >>confdefs.h <<\EOF
4543 #define HAVE_NCURSES_NCURSES_H 1
4547 (ncursesw/curses.h|ncursesw/ncurses.h)
4549 cat >>confdefs.h <<\EOF
4550 #define HAVE_NCURSESW_NCURSES_H 1
4556 echo "$as_me:4556: checking for terminfo header" >&5
4557 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4558 if test "${cf_cv_term_header+set}" = set; then
4559 echo $ECHO_N "(cached) $ECHO_C" >&6
4562 case ${cf_cv_ncurses_header} in
4563 (*/ncurses.h|*/ncursesw.h)
4564 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4567 cf_term_header=term.h
4571 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4573 cat >conftest.$ac_ext <<_ACEOF
4574 #line 4574 "configure"
4575 #include "confdefs.h"
4577 #include <${cf_cv_ncurses_header:-curses.h}>
4583 int x = auto_left_margin
4588 rm -f conftest.$ac_objext
4589 if { (eval echo "$as_me:4589: \"$ac_compile\"") >&5
4590 (eval $ac_compile) 2>&5
4592 echo "$as_me:4592: \$? = $ac_status" >&5
4593 (exit $ac_status); } &&
4594 { ac_try='test -s conftest.$ac_objext'
4595 { (eval echo "$as_me:4595: \"$ac_try\"") >&5
4598 echo "$as_me:4598: \$? = $ac_status" >&5
4599 (exit $ac_status); }; }; then
4601 cf_cv_term_header="$cf_test"
4603 echo "$as_me: failed program was:" >&5
4604 cat conftest.$ac_ext >&5
4606 cf_cv_term_header=unknown
4609 rm -f conftest.$ac_objext conftest.$ac_ext
4610 test "$cf_cv_term_header" != unknown && break
4614 echo "$as_me:4614: result: $cf_cv_term_header" >&5
4615 echo "${ECHO_T}$cf_cv_term_header" >&6
4617 # Set definitions to allow ifdef'ing to accommodate subdirectories
4619 case $cf_cv_term_header in
4622 cat >>confdefs.h <<\EOF
4623 #define HAVE_TERM_H 1
4629 case $cf_cv_term_header in
4632 cat >>confdefs.h <<\EOF
4633 #define HAVE_NCURSES_TERM_H 1
4639 cat >>confdefs.h <<\EOF
4640 #define HAVE_NCURSESW_TERM_H 1
4646 # some applications need this, but should check for NCURSES_VERSION
4648 cat >>confdefs.h <<\EOF
4652 echo "$as_me:4652: checking for ncurses version" >&5
4653 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4654 if test "${cf_cv_ncurses_version+set}" = set; then
4655 echo $ECHO_N "(cached) $ECHO_C" >&6
4658 cf_cv_ncurses_version=no
4661 if test "$cross_compiling" = yes; then
4663 # This will not work if the preprocessor splits the line after the
4664 # Autoconf token. The 'unproto' program does that.
4665 cat > conftest.$ac_ext <<EOF
4666 #include <${cf_cv_ncurses_header:-curses.h}>
4668 #ifdef NCURSES_VERSION
4669 Autoconf NCURSES_VERSION
4677 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4678 { (eval echo "$as_me:4678: \"$cf_try\"") >&5
4681 echo "$as_me:4681: \$? = $ac_status" >&5
4682 (exit $ac_status); }
4683 if test -f conftest.out ; then
4684 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4685 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4690 cat >conftest.$ac_ext <<_ACEOF
4691 #line 4691 "configure"
4692 #include "confdefs.h"
4694 #include <${cf_cv_ncurses_header:-curses.h}>
4698 FILE *fp = fopen("$cf_tempfile", "w");
4699 #ifdef NCURSES_VERSION
4700 # ifdef NCURSES_VERSION_PATCH
4701 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4703 fprintf(fp, "%s\n", NCURSES_VERSION);
4707 fprintf(fp, "old\n");
4712 ${cf_cv_main_return:-return}(0);
4715 rm -f conftest$ac_exeext
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717 (eval $ac_link) 2>&5
4719 echo "$as_me:4719: \$? = $ac_status" >&5
4720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4721 { (eval echo "$as_me:4721: \"$ac_try\"") >&5
4724 echo "$as_me:4724: \$? = $ac_status" >&5
4725 (exit $ac_status); }; }; then
4727 cf_cv_ncurses_version=`cat $cf_tempfile`
4729 echo "$as_me: program exited with status $ac_status" >&5
4730 echo "$as_me: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4733 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4738 echo "$as_me:4738: result: $cf_cv_ncurses_version" >&5
4739 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4740 test "$cf_cv_ncurses_version" = no ||
4741 cat >>confdefs.h <<\EOF
4745 cf_nculib_root=ncurses
4746 # This works, except for the special case where we find gpm, but
4747 # ncurses is in a nonstandard location via $LIBS, and we really want
4750 cf_ncurses_SAVE="$LIBS"
4751 echo "$as_me:4751: checking for Gpm_Open in -lgpm" >&5
4752 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4753 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4754 echo $ECHO_N "(cached) $ECHO_C" >&6
4756 ac_check_lib_save_LIBS=$LIBS
4758 cat >conftest.$ac_ext <<_ACEOF
4759 #line 4759 "configure"
4760 #include "confdefs.h"
4762 /* Override any gcc2 internal prototype to avoid an error. */
4766 /* We use char because int might match the return type of a gcc2
4767 builtin and then its argument prototype would still apply. */
4777 rm -f conftest.$ac_objext conftest$ac_exeext
4778 if { (eval echo "$as_me:4778: \"$ac_link\"") >&5
4779 (eval $ac_link) 2>&5
4781 echo "$as_me:4781: \$? = $ac_status" >&5
4782 (exit $ac_status); } &&
4783 { ac_try='test -s conftest$ac_exeext'
4784 { (eval echo "$as_me:4784: \"$ac_try\"") >&5
4787 echo "$as_me:4787: \$? = $ac_status" >&5
4788 (exit $ac_status); }; }; then
4789 ac_cv_lib_gpm_Gpm_Open=yes
4791 echo "$as_me: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 ac_cv_lib_gpm_Gpm_Open=no
4795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4796 LIBS=$ac_check_lib_save_LIBS
4798 echo "$as_me:4798: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4799 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4800 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4801 echo "$as_me:4801: checking for initscr in -lgpm" >&5
4802 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4803 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4804 echo $ECHO_N "(cached) $ECHO_C" >&6
4806 ac_check_lib_save_LIBS=$LIBS
4808 cat >conftest.$ac_ext <<_ACEOF
4809 #line 4809 "configure"
4810 #include "confdefs.h"
4812 /* Override any gcc2 internal prototype to avoid an error. */
4816 /* We use char because int might match the return type of a gcc2
4817 builtin and then its argument prototype would still apply. */
4827 rm -f conftest.$ac_objext conftest$ac_exeext
4828 if { (eval echo "$as_me:4828: \"$ac_link\"") >&5
4829 (eval $ac_link) 2>&5
4831 echo "$as_me:4831: \$? = $ac_status" >&5
4832 (exit $ac_status); } &&
4833 { ac_try='test -s conftest$ac_exeext'
4834 { (eval echo "$as_me:4834: \"$ac_try\"") >&5
4837 echo "$as_me:4837: \$? = $ac_status" >&5
4838 (exit $ac_status); }; }; then
4839 ac_cv_lib_gpm_initscr=yes
4841 echo "$as_me: failed program was:" >&5
4842 cat conftest.$ac_ext >&5
4843 ac_cv_lib_gpm_initscr=no
4845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4846 LIBS=$ac_check_lib_save_LIBS
4848 echo "$as_me:4848: result: $ac_cv_lib_gpm_initscr" >&5
4849 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4850 if test $ac_cv_lib_gpm_initscr = yes; then
4851 LIBS="$cf_ncurses_SAVE"
4853 cf_ncurses_LIBS="-lgpm"
4860 # This is only necessary if you are linking against an obsolete
4861 # version of ncurses (but it should do no harm, since it's static).
4862 if test "$cf_nculib_root" = ncurses ; then
4863 echo "$as_me:4863: checking for tgoto in -lmytinfo" >&5
4864 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4865 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4866 echo $ECHO_N "(cached) $ECHO_C" >&6
4868 ac_check_lib_save_LIBS=$LIBS
4869 LIBS="-lmytinfo $LIBS"
4870 cat >conftest.$ac_ext <<_ACEOF
4871 #line 4871 "configure"
4872 #include "confdefs.h"
4874 /* Override any gcc2 internal prototype to avoid an error. */
4878 /* We use char because int might match the return type of a gcc2
4879 builtin and then its argument prototype would still apply. */
4889 rm -f conftest.$ac_objext conftest$ac_exeext
4890 if { (eval echo "$as_me:4890: \"$ac_link\"") >&5
4891 (eval $ac_link) 2>&5
4893 echo "$as_me:4893: \$? = $ac_status" >&5
4894 (exit $ac_status); } &&
4895 { ac_try='test -s conftest$ac_exeext'
4896 { (eval echo "$as_me:4896: \"$ac_try\"") >&5
4899 echo "$as_me:4899: \$? = $ac_status" >&5
4900 (exit $ac_status); }; }; then
4901 ac_cv_lib_mytinfo_tgoto=yes
4903 echo "$as_me: failed program was:" >&5
4904 cat conftest.$ac_ext >&5
4905 ac_cv_lib_mytinfo_tgoto=no
4907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4908 LIBS=$ac_check_lib_save_LIBS
4910 echo "$as_me:4910: result: $ac_cv_lib_mytinfo_tgoto" >&5
4911 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
4912 if test $ac_cv_lib_mytinfo_tgoto = yes; then
4913 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4920 cf_add_libs="$cf_ncurses_LIBS"
4921 # Filter out duplicates - this happens with badly-designed ".pc" files...
4922 for cf_add_1lib in $LIBS
4924 for cf_add_2lib in $cf_add_libs
4926 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4932 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4936 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4939 cf_add_libs="-l$cf_nculib_root"
4940 # Filter out duplicates - this happens with badly-designed ".pc" files...
4941 for cf_add_1lib in $LIBS
4943 for cf_add_2lib in $cf_add_libs
4945 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4951 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4957 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4959 echo "$as_me:4959: checking for initscr" >&5
4960 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
4961 if test "${ac_cv_func_initscr+set}" = set; then
4962 echo $ECHO_N "(cached) $ECHO_C" >&6
4964 cat >conftest.$ac_ext <<_ACEOF
4965 #line 4965 "configure"
4966 #include "confdefs.h"
4967 /* System header to define __stub macros and hopefully few prototypes,
4968 which can conflict with char initscr (); below. */
4970 /* Override any gcc2 internal prototype to avoid an error. */
4974 /* We use char because int might match the return type of a gcc2
4975 builtin and then its argument prototype would still apply. */
4982 /* The GNU C library defines this for functions which it implements
4983 to always fail with ENOSYS. Some functions are actually named
4984 something starting with __ and the normal name is an alias. */
4985 #if defined (__stub_initscr) || defined (__stub___initscr)
4988 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4995 rm -f conftest.$ac_objext conftest$ac_exeext
4996 if { (eval echo "$as_me:4996: \"$ac_link\"") >&5
4997 (eval $ac_link) 2>&5
4999 echo "$as_me:4999: \$? = $ac_status" >&5
5000 (exit $ac_status); } &&
5001 { ac_try='test -s conftest$ac_exeext'
5002 { (eval echo "$as_me:5002: \"$ac_try\"") >&5
5005 echo "$as_me:5005: \$? = $ac_status" >&5
5006 (exit $ac_status); }; }; then
5007 ac_cv_func_initscr=yes
5009 echo "$as_me: failed program was:" >&5
5010 cat conftest.$ac_ext >&5
5011 ac_cv_func_initscr=no
5013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5015 echo "$as_me:5015: result: $ac_cv_func_initscr" >&5
5016 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5017 if test $ac_cv_func_initscr = yes; then
5018 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5021 cf_save_LIBS="$LIBS"
5022 echo "$as_me:5022: checking for initscr in -l$cf_nculib_root" >&5
5023 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5024 LIBS="-l$cf_nculib_root $LIBS"
5025 cat >conftest.$ac_ext <<_ACEOF
5026 #line 5026 "configure"
5027 #include "confdefs.h"
5028 #include <${cf_cv_ncurses_header:-curses.h}>
5037 rm -f conftest.$ac_objext conftest$ac_exeext
5038 if { (eval echo "$as_me:5038: \"$ac_link\"") >&5
5039 (eval $ac_link) 2>&5
5041 echo "$as_me:5041: \$? = $ac_status" >&5
5042 (exit $ac_status); } &&
5043 { ac_try='test -s conftest$ac_exeext'
5044 { (eval echo "$as_me:5044: \"$ac_try\"") >&5
5047 echo "$as_me:5047: \$? = $ac_status" >&5
5048 (exit $ac_status); }; }; then
5049 echo "$as_me:5049: result: yes" >&5
5050 echo "${ECHO_T}yes" >&6
5051 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5054 echo "$as_me: failed program was:" >&5
5055 cat conftest.$ac_ext >&5
5056 echo "$as_me:5056: result: no" >&5
5057 echo "${ECHO_T}no" >&6
5060 cf_library_path_list=""
5061 if test -n "${LDFLAGS}${LIBS}" ; then
5062 for cf_library_path in $LDFLAGS $LIBS
5064 case $cf_library_path in
5066 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5068 test "x$cf_library_path" != "xNONE" && \
5069 test -d "$cf_library_path" && \
5071 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5072 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5073 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5074 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5075 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5076 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"
5079 cf_library_path_list="$cf_library_path_list $cf_search"
5087 test "x$prefix" != "xNONE" && \
5088 test -d "$prefix" && \
5090 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5091 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5092 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5093 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5094 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5095 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5098 for cf_subdir_prefix in \
5107 test "x$cf_subdir_prefix" != "x$prefix" && \
5108 test -d "$cf_subdir_prefix" && \
5109 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5110 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5111 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5112 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5113 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5114 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5115 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"
5120 cf_search="$cf_library_path_list $cf_search"
5122 for cf_libdir in $cf_search
5124 echo "$as_me:5124: checking for -l$cf_nculib_root in $cf_libdir" >&5
5125 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5126 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5127 cat >conftest.$ac_ext <<_ACEOF
5128 #line 5128 "configure"
5129 #include "confdefs.h"
5130 #include <${cf_cv_ncurses_header:-curses.h}>
5139 rm -f conftest.$ac_objext conftest$ac_exeext
5140 if { (eval echo "$as_me:5140: \"$ac_link\"") >&5
5141 (eval $ac_link) 2>&5
5143 echo "$as_me:5143: \$? = $ac_status" >&5
5144 (exit $ac_status); } &&
5145 { ac_try='test -s conftest$ac_exeext'
5146 { (eval echo "$as_me:5146: \"$ac_try\"") >&5
5149 echo "$as_me:5149: \$? = $ac_status" >&5
5150 (exit $ac_status); }; }; then
5151 echo "$as_me:5151: result: yes" >&5
5152 echo "${ECHO_T}yes" >&6
5153 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5156 echo "$as_me: failed program was:" >&5
5157 cat conftest.$ac_ext >&5
5158 echo "$as_me:5158: result: no" >&5
5159 echo "${ECHO_T}no" >&6
5160 LIBS="$cf_save_LIBS"
5162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5170 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5172 if test $cf_found_library = no ; then
5173 { { echo "$as_me:5173: error: Cannot link $cf_nculib_root library" >&5
5174 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5175 { (exit 1); exit 1; }; }
5180 if test -n "$cf_ncurses_LIBS" ; then
5181 echo "$as_me:5181: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5182 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5183 cf_ncurses_SAVE="$LIBS"
5184 for p in $cf_ncurses_LIBS ; do
5185 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5186 if test "$q" != "$LIBS" ; then
5190 cat >conftest.$ac_ext <<_ACEOF
5191 #line 5191 "configure"
5192 #include "confdefs.h"
5193 #include <${cf_cv_ncurses_header:-curses.h}>
5197 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5202 rm -f conftest.$ac_objext conftest$ac_exeext
5203 if { (eval echo "$as_me:5203: \"$ac_link\"") >&5
5204 (eval $ac_link) 2>&5
5206 echo "$as_me:5206: \$? = $ac_status" >&5
5207 (exit $ac_status); } &&
5208 { ac_try='test -s conftest$ac_exeext'
5209 { (eval echo "$as_me:5209: \"$ac_try\"") >&5
5212 echo "$as_me:5212: \$? = $ac_status" >&5
5213 (exit $ac_status); }; }; then
5214 echo "$as_me:5214: result: yes" >&5
5215 echo "${ECHO_T}yes" >&6
5217 echo "$as_me: failed program was:" >&5
5218 cat conftest.$ac_ext >&5
5219 echo "$as_me:5219: result: no" >&5
5220 echo "${ECHO_T}no" >&6
5221 LIBS="$cf_ncurses_SAVE"
5223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5226 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5228 cat >>confdefs.h <<EOF
5229 #define $cf_nculib_ROOT 1
5237 echo "$as_me:5237: checking if you want wide-character code" >&5
5238 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5240 # Check whether --enable-widec or --disable-widec was given.
5241 if test "${enable_widec+set}" = set; then
5242 enableval="$enable_widec"
5243 with_widec=$enableval
5247 echo "$as_me:5247: result: $with_widec" >&5
5248 echo "${ECHO_T}$with_widec" >&6
5249 if test "$with_widec" = yes ; then
5251 echo "$as_me:5251: checking for multibyte character support" >&5
5252 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5253 if test "${cf_cv_utf8_lib+set}" = set; then
5254 echo $ECHO_N "(cached) $ECHO_C" >&6
5257 cf_save_LIBS="$LIBS"
5258 cat >conftest.$ac_ext <<_ACEOF
5259 #line 5259 "configure"
5260 #include "confdefs.h"
5271 rm -f conftest.$ac_objext conftest$ac_exeext
5272 if { (eval echo "$as_me:5272: \"$ac_link\"") >&5
5273 (eval $ac_link) 2>&5
5275 echo "$as_me:5275: \$? = $ac_status" >&5
5276 (exit $ac_status); } &&
5277 { ac_try='test -s conftest$ac_exeext'
5278 { (eval echo "$as_me:5278: \"$ac_try\"") >&5
5281 echo "$as_me:5281: \$? = $ac_status" >&5
5282 (exit $ac_status); }; }; then
5285 echo "$as_me: failed program was:" >&5
5286 cat conftest.$ac_ext >&5
5288 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5289 # will be set on completion of the AC_TRY_LINK below.
5290 cf_cv_header_path_utf8=
5291 cf_cv_library_path_utf8=
5293 echo "${as_me:-configure}:5293: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5295 cf_save_LIBS="$LIBS"
5297 cat >conftest.$ac_ext <<_ACEOF
5298 #line 5298 "configure"
5299 #include "confdefs.h"
5301 #include <libutf8.h>
5310 rm -f conftest.$ac_objext conftest$ac_exeext
5311 if { (eval echo "$as_me:5311: \"$ac_link\"") >&5
5312 (eval $ac_link) 2>&5
5314 echo "$as_me:5314: \$? = $ac_status" >&5
5315 (exit $ac_status); } &&
5316 { ac_try='test -s conftest$ac_exeext'
5317 { (eval echo "$as_me:5317: \"$ac_try\"") >&5
5320 echo "$as_me:5320: \$? = $ac_status" >&5
5321 (exit $ac_status); }; }; then
5323 cf_cv_find_linkage_utf8=yes
5324 cf_cv_header_path_utf8=/usr/include
5325 cf_cv_library_path_utf8=/usr/lib
5328 echo "$as_me: failed program was:" >&5
5329 cat conftest.$ac_ext >&5
5331 LIBS="-lutf8 $cf_save_LIBS"
5333 cat >conftest.$ac_ext <<_ACEOF
5334 #line 5334 "configure"
5335 #include "confdefs.h"
5337 #include <libutf8.h>
5346 rm -f conftest.$ac_objext conftest$ac_exeext
5347 if { (eval echo "$as_me:5347: \"$ac_link\"") >&5
5348 (eval $ac_link) 2>&5
5350 echo "$as_me:5350: \$? = $ac_status" >&5
5351 (exit $ac_status); } &&
5352 { ac_try='test -s conftest$ac_exeext'
5353 { (eval echo "$as_me:5353: \"$ac_try\"") >&5
5356 echo "$as_me:5356: \$? = $ac_status" >&5
5357 (exit $ac_status); }; }; then
5359 cf_cv_find_linkage_utf8=yes
5360 cf_cv_header_path_utf8=/usr/include
5361 cf_cv_library_path_utf8=/usr/lib
5362 cf_cv_library_file_utf8="-lutf8"
5365 echo "$as_me: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5368 cf_cv_find_linkage_utf8=no
5369 LIBS="$cf_save_LIBS"
5371 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5373 echo "${as_me:-configure}:5373: testing find linkage for utf8 library ..." 1>&5
5375 echo "${as_me:-configure}:5375: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5377 cf_save_CPPFLAGS="$CPPFLAGS"
5378 cf_test_CPPFLAGS="$CPPFLAGS"
5382 # collect the current set of include-directories from compiler flags
5383 cf_header_path_list=""
5384 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5385 for cf_header_path in $CPPFLAGS $CFLAGS
5387 case $cf_header_path in
5389 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5391 test "x$cf_header_path" != "xNONE" && \
5392 test -d "$cf_header_path" && \
5394 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5395 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5396 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5397 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5398 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5399 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5402 cf_header_path_list="$cf_header_path_list $cf_search"
5408 # add the variations for the package we are looking for
5412 test "x$prefix" != "xNONE" && \
5413 test -d "$prefix" && \
5415 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5416 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5417 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5418 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5419 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5420 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5423 for cf_subdir_prefix in \
5432 test "x$cf_subdir_prefix" != "x$prefix" && \
5433 test -d "$cf_subdir_prefix" && \
5434 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5435 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5436 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5437 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5438 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5439 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5440 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5445 test "$includedir" != NONE && \
5446 test "$includedir" != "/usr/include" && \
5447 test -d "$includedir" && {
5448 test -d $includedir && cf_search="$cf_search $includedir"
5449 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5452 test "$oldincludedir" != NONE && \
5453 test "$oldincludedir" != "/usr/include" && \
5454 test -d "$oldincludedir" && {
5455 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5456 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5459 cf_search="$cf_search $cf_header_path_list"
5461 for cf_cv_header_path_utf8 in $cf_search
5463 if test -d $cf_cv_header_path_utf8 ; then
5464 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5466 echo "${as_me:-configure}:5466: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5468 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5469 cat >conftest.$ac_ext <<_ACEOF
5470 #line 5470 "configure"
5471 #include "confdefs.h"
5473 #include <libutf8.h>
5482 rm -f conftest.$ac_objext
5483 if { (eval echo "$as_me:5483: \"$ac_compile\"") >&5
5484 (eval $ac_compile) 2>&5
5486 echo "$as_me:5486: \$? = $ac_status" >&5
5487 (exit $ac_status); } &&
5488 { ac_try='test -s conftest.$ac_objext'
5489 { (eval echo "$as_me:5489: \"$ac_try\"") >&5
5492 echo "$as_me:5492: \$? = $ac_status" >&5
5493 (exit $ac_status); }; }; then
5495 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5497 echo "${as_me:-configure}:5497: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5499 cf_cv_find_linkage_utf8=maybe
5500 cf_test_CPPFLAGS="$CPPFLAGS"
5503 echo "$as_me: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5506 CPPFLAGS="$cf_save_CPPFLAGS"
5509 rm -f conftest.$ac_objext conftest.$ac_ext
5513 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5515 echo "${as_me:-configure}:5515: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5517 cf_save_LIBS="$LIBS"
5518 cf_save_LDFLAGS="$LDFLAGS"
5520 if test "$cf_cv_find_linkage_utf8" != yes ; then
5523 cf_library_path_list=""
5524 if test -n "${LDFLAGS}${LIBS}" ; then
5525 for cf_library_path in $LDFLAGS $LIBS
5527 case $cf_library_path in
5529 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5531 test "x$cf_library_path" != "xNONE" && \
5532 test -d "$cf_library_path" && \
5534 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5535 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5536 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5537 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5538 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5539 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5542 cf_library_path_list="$cf_library_path_list $cf_search"
5550 test "x$prefix" != "xNONE" && \
5551 test -d "$prefix" && \
5553 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5554 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5555 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5556 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5557 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5558 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5561 for cf_subdir_prefix in \
5570 test "x$cf_subdir_prefix" != "x$prefix" && \
5571 test -d "$cf_subdir_prefix" && \
5572 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5573 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5574 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5575 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5576 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5577 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5578 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5583 cf_search="$cf_library_path_list $cf_search"
5585 for cf_cv_library_path_utf8 in $cf_search
5587 if test -d $cf_cv_library_path_utf8 ; then
5588 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5590 echo "${as_me:-configure}:5590: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5592 CPPFLAGS="$cf_test_CPPFLAGS"
5593 LIBS="-lutf8 $cf_save_LIBS"
5594 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5595 cat >conftest.$ac_ext <<_ACEOF
5596 #line 5596 "configure"
5597 #include "confdefs.h"
5599 #include <libutf8.h>
5608 rm -f conftest.$ac_objext conftest$ac_exeext
5609 if { (eval echo "$as_me:5609: \"$ac_link\"") >&5
5610 (eval $ac_link) 2>&5
5612 echo "$as_me:5612: \$? = $ac_status" >&5
5613 (exit $ac_status); } &&
5614 { ac_try='test -s conftest$ac_exeext'
5615 { (eval echo "$as_me:5615: \"$ac_try\"") >&5
5618 echo "$as_me:5618: \$? = $ac_status" >&5
5619 (exit $ac_status); }; }; then
5621 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5623 echo "${as_me:-configure}:5623: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5625 cf_cv_find_linkage_utf8=yes
5626 cf_cv_library_file_utf8="-lutf8"
5629 echo "$as_me: failed program was:" >&5
5630 cat conftest.$ac_ext >&5
5632 CPPFLAGS="$cf_save_CPPFLAGS"
5633 LIBS="$cf_save_LIBS"
5634 LDFLAGS="$cf_save_LDFLAGS"
5637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5640 CPPFLAGS="$cf_save_CPPFLAGS"
5641 LDFLAGS="$cf_save_LDFLAGS"
5645 cf_cv_find_linkage_utf8=no
5649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5654 LIBS="$cf_save_LIBS"
5656 if test "$cf_cv_find_linkage_utf8" = yes ; then
5657 cf_cv_utf8_lib=add-on
5663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5665 echo "$as_me:5665: result: $cf_cv_utf8_lib" >&5
5666 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5668 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5670 if test "$cf_cv_utf8_lib" = "add-on" ; then
5672 cat >>confdefs.h <<\EOF
5673 #define HAVE_LIBUTF8_H 1
5676 if test -n "$cf_cv_header_path_utf8" ; then
5677 for cf_add_incdir in $cf_cv_header_path_utf8
5679 while test $cf_add_incdir != /usr/include
5681 if test -d $cf_add_incdir
5684 if test -n "$CFLAGS$CPPFLAGS" ; then
5685 # a loop is needed to ensure we can add subdirs of existing dirs
5686 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5687 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5688 cf_have_incdir=yes; break
5693 if test "$cf_have_incdir" = no ; then
5694 if test "$cf_add_incdir" = /usr/local/include ; then
5695 if test "$GCC" = yes
5697 cf_save_CPPFLAGS=$CPPFLAGS
5698 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5699 cat >conftest.$ac_ext <<_ACEOF
5700 #line 5700 "configure"
5701 #include "confdefs.h"
5711 rm -f conftest.$ac_objext
5712 if { (eval echo "$as_me:5712: \"$ac_compile\"") >&5
5713 (eval $ac_compile) 2>&5
5715 echo "$as_me:5715: \$? = $ac_status" >&5
5716 (exit $ac_status); } &&
5717 { ac_try='test -s conftest.$ac_objext'
5718 { (eval echo "$as_me:5718: \"$ac_try\"") >&5
5721 echo "$as_me:5721: \$? = $ac_status" >&5
5722 (exit $ac_status); }; }; then
5725 echo "$as_me: failed program was:" >&5
5726 cat conftest.$ac_ext >&5
5729 rm -f conftest.$ac_objext conftest.$ac_ext
5730 CPPFLAGS=$cf_save_CPPFLAGS
5735 if test "$cf_have_incdir" = no ; then
5736 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5738 echo "${as_me:-configure}:5738: testing adding $cf_add_incdir to include-path ..." 1>&5
5740 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5742 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5743 test "$cf_top_incdir" = "$cf_add_incdir" && break
5744 cf_add_incdir="$cf_top_incdir"
5755 if test -n "$cf_cv_library_path_utf8" ; then
5756 for cf_add_libdir in $cf_cv_library_path_utf8
5758 if test $cf_add_libdir = /usr/lib ; then
5760 elif test -d $cf_add_libdir
5763 if test -n "$LDFLAGS$LIBS" ; then
5764 # a loop is needed to ensure we can add subdirs of existing dirs
5765 for cf_test_libdir in $LDFLAGS $LIBS ; do
5766 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5767 cf_have_libdir=yes; break
5771 if test "$cf_have_libdir" = no ; then
5772 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5774 echo "${as_me:-configure}:5774: testing adding $cf_add_libdir to library-path ..." 1>&5
5776 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5782 cf_add_libs="$cf_cv_library_file_utf8"
5783 # Filter out duplicates - this happens with badly-designed ".pc" files...
5784 for cf_add_1lib in $LIBS
5786 for cf_add_2lib in $cf_add_libs
5788 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5794 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5800 cf_ncuconfig_root=ncursesw
5801 cf_have_ncuconfig=no
5803 if test "x${PKG_CONFIG:=none}" != xnone; then
5804 echo "$as_me:5804: checking pkg-config for $cf_ncuconfig_root" >&5
5805 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5806 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5807 echo "$as_me:5807: result: yes" >&5
5808 echo "${ECHO_T}yes" >&6
5810 echo "$as_me:5810: checking if the $cf_ncuconfig_root package files work" >&5
5811 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5812 cf_have_ncuconfig=unknown
5814 cf_save_CPPFLAGS="$CPPFLAGS"
5815 cf_save_LIBS="$LIBS"
5817 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5819 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5820 # Filter out duplicates - this happens with badly-designed ".pc" files...
5821 for cf_add_1lib in $LIBS
5823 for cf_add_2lib in $cf_add_libs
5825 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5831 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5835 cat >conftest.$ac_ext <<_ACEOF
5836 #line 5836 "configure"
5837 #include "confdefs.h"
5838 #include <${cf_cv_ncurses_header:-curses.h}>
5842 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5847 rm -f conftest.$ac_objext conftest$ac_exeext
5848 if { (eval echo "$as_me:5848: \"$ac_link\"") >&5
5849 (eval $ac_link) 2>&5
5851 echo "$as_me:5851: \$? = $ac_status" >&5
5852 (exit $ac_status); } &&
5853 { ac_try='test -s conftest$ac_exeext'
5854 { (eval echo "$as_me:5854: \"$ac_try\"") >&5
5857 echo "$as_me:5857: \$? = $ac_status" >&5
5858 (exit $ac_status); }; }; then
5859 if test "$cross_compiling" = yes; then
5860 cf_have_ncuconfig=maybe
5862 cat >conftest.$ac_ext <<_ACEOF
5863 #line 5863 "configure"
5864 #include "confdefs.h"
5865 #include <${cf_cv_ncurses_header:-curses.h}>
5867 { char *xx = curses_version(); return (xx == 0); }
5869 rm -f conftest$ac_exeext
5870 if { (eval echo "$as_me:5870: \"$ac_link\"") >&5
5871 (eval $ac_link) 2>&5
5873 echo "$as_me:5873: \$? = $ac_status" >&5
5874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5875 { (eval echo "$as_me:5875: \"$ac_try\"") >&5
5878 echo "$as_me:5878: \$? = $ac_status" >&5
5879 (exit $ac_status); }; }; then
5880 cf_have_ncuconfig=yes
5882 echo "$as_me: program exited with status $ac_status" >&5
5883 echo "$as_me: failed program was:" >&5
5884 cat conftest.$ac_ext >&5
5885 cf_have_ncuconfig=no
5887 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5890 echo "$as_me: failed program was:" >&5
5891 cat conftest.$ac_ext >&5
5892 cf_have_ncuconfig=no
5894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5895 echo "$as_me:5895: result: $cf_have_ncuconfig" >&5
5896 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5897 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5898 if test "$cf_have_ncuconfig" != "yes"
5900 CPPFLAGS="$cf_save_CPPFLAGS"
5901 LIBS="$cf_save_LIBS"
5902 NCURSES_CONFIG_PKG=none
5905 cat >>confdefs.h <<\EOF
5909 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5913 echo "$as_me:5913: result: no" >&5
5914 echo "${ECHO_T}no" >&6
5915 NCURSES_CONFIG_PKG=none
5918 NCURSES_CONFIG_PKG=none
5921 if test "x$cf_have_ncuconfig" = "xno"; then
5922 echo "Looking for ${cf_ncuconfig_root}-config"
5924 if test -n "$ac_tool_prefix"; then
5925 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5927 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5928 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5929 echo "$as_me:5929: checking for $ac_word" >&5
5930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5931 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5932 echo $ECHO_N "(cached) $ECHO_C" >&6
5934 if test -n "$NCURSES_CONFIG"; then
5935 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5937 ac_save_IFS=$IFS; IFS=$ac_path_separator
5939 for ac_dir in $ac_dummy; do
5941 test -z "$ac_dir" && ac_dir=.
5942 $as_executable_p "$ac_dir/$ac_word" || continue
5943 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5944 echo "$as_me:5944: found $ac_dir/$ac_word" >&5
5950 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5951 if test -n "$NCURSES_CONFIG"; then
5952 echo "$as_me:5952: result: $NCURSES_CONFIG" >&5
5953 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5955 echo "$as_me:5955: result: no" >&5
5956 echo "${ECHO_T}no" >&6
5959 test -n "$NCURSES_CONFIG" && break
5962 if test -z "$NCURSES_CONFIG"; then
5963 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5964 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5966 # Extract the first word of "$ac_prog", so it can be a program name with args.
5967 set dummy $ac_prog; ac_word=$2
5968 echo "$as_me:5968: checking for $ac_word" >&5
5969 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5970 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5971 echo $ECHO_N "(cached) $ECHO_C" >&6
5973 if test -n "$ac_ct_NCURSES_CONFIG"; then
5974 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5976 ac_save_IFS=$IFS; IFS=$ac_path_separator
5978 for ac_dir in $ac_dummy; do
5980 test -z "$ac_dir" && ac_dir=.
5981 $as_executable_p "$ac_dir/$ac_word" || continue
5982 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5983 echo "$as_me:5983: found $ac_dir/$ac_word" >&5
5989 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5990 if test -n "$ac_ct_NCURSES_CONFIG"; then
5991 echo "$as_me:5991: result: $ac_ct_NCURSES_CONFIG" >&5
5992 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5994 echo "$as_me:5994: result: no" >&5
5995 echo "${ECHO_T}no" >&6
5998 test -n "$ac_ct_NCURSES_CONFIG" && break
6000 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6002 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6005 if test "$NCURSES_CONFIG" != none ; then
6007 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6009 cf_add_libs="`$NCURSES_CONFIG --libs`"
6010 # Filter out duplicates - this happens with badly-designed ".pc" files...
6011 for cf_add_1lib in $LIBS
6013 for cf_add_2lib in $cf_add_libs
6015 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6021 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6025 # even with config script, some packages use no-override for curses.h
6027 echo "$as_me:6027: checking if we have identified curses headers" >&5
6028 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6029 if test "${cf_cv_ncurses_header+set}" = set; then
6030 echo $ECHO_N "(cached) $ECHO_C" >&6
6033 cf_cv_ncurses_header=none
6035 ncurses.h ncursesw/ncurses.h \
6036 curses.h ncursesw/curses.h
6038 cat >conftest.$ac_ext <<_ACEOF
6039 #line 6039 "configure"
6040 #include "confdefs.h"
6041 #include <${cf_header}>
6045 initscr(); tgoto("?", 0,0)
6050 rm -f conftest.$ac_objext
6051 if { (eval echo "$as_me:6051: \"$ac_compile\"") >&5
6052 (eval $ac_compile) 2>&5
6054 echo "$as_me:6054: \$? = $ac_status" >&5
6055 (exit $ac_status); } &&
6056 { ac_try='test -s conftest.$ac_objext'
6057 { (eval echo "$as_me:6057: \"$ac_try\"") >&5
6060 echo "$as_me:6060: \$? = $ac_status" >&5
6061 (exit $ac_status); }; }; then
6062 cf_cv_ncurses_header=$cf_header; break
6064 echo "$as_me: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6067 rm -f conftest.$ac_objext conftest.$ac_ext
6071 echo "$as_me:6071: result: $cf_cv_ncurses_header" >&5
6072 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6074 if test "$cf_cv_ncurses_header" = none ; then
6075 { { echo "$as_me:6075: error: No curses header-files found" >&5
6076 echo "$as_me: error: No curses header-files found" >&2;}
6077 { (exit 1); exit 1; }; }
6080 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6082 for ac_header in $cf_cv_ncurses_header
6084 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6085 echo "$as_me:6085: checking for $ac_header" >&5
6086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6087 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6088 echo $ECHO_N "(cached) $ECHO_C" >&6
6090 cat >conftest.$ac_ext <<_ACEOF
6091 #line 6091 "configure"
6092 #include "confdefs.h"
6093 #include <$ac_header>
6095 if { (eval echo "$as_me:6095: \"$ac_cpp conftest.$ac_ext\"") >&5
6096 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6098 egrep -v '^ *\+' conftest.er1 >conftest.err
6100 cat conftest.err >&5
6101 echo "$as_me:6101: \$? = $ac_status" >&5
6102 (exit $ac_status); } >/dev/null; then
6103 if test -s conftest.err; then
6104 ac_cpp_err=$ac_c_preproc_warn_flag
6111 if test -z "$ac_cpp_err"; then
6112 eval "$as_ac_Header=yes"
6114 echo "$as_me: failed program was:" >&5
6115 cat conftest.$ac_ext >&5
6116 eval "$as_ac_Header=no"
6118 rm -f conftest.err conftest.$ac_ext
6120 echo "$as_me:6120: result: `eval echo '${'$as_ac_Header'}'`" >&5
6121 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6122 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6123 cat >>confdefs.h <<EOF
6124 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6130 cat >>confdefs.h <<\EOF
6134 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6136 cat >>confdefs.h <<EOF
6137 #define $cf_nculib_ROOT 1
6140 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6144 cf_ncuhdr_root=ncursesw
6146 test -n "$cf_cv_curses_dir" && \
6147 test "$cf_cv_curses_dir" != "no" && { \
6149 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6150 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6152 while test $cf_add_incdir != /usr/include
6154 if test -d $cf_add_incdir
6157 if test -n "$CFLAGS$CPPFLAGS" ; then
6158 # a loop is needed to ensure we can add subdirs of existing dirs
6159 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6160 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6161 cf_have_incdir=yes; break
6166 if test "$cf_have_incdir" = no ; then
6167 if test "$cf_add_incdir" = /usr/local/include ; then
6168 if test "$GCC" = yes
6170 cf_save_CPPFLAGS=$CPPFLAGS
6171 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6172 cat >conftest.$ac_ext <<_ACEOF
6173 #line 6173 "configure"
6174 #include "confdefs.h"
6184 rm -f conftest.$ac_objext
6185 if { (eval echo "$as_me:6185: \"$ac_compile\"") >&5
6186 (eval $ac_compile) 2>&5
6188 echo "$as_me:6188: \$? = $ac_status" >&5
6189 (exit $ac_status); } &&
6190 { ac_try='test -s conftest.$ac_objext'
6191 { (eval echo "$as_me:6191: \"$ac_try\"") >&5
6194 echo "$as_me:6194: \$? = $ac_status" >&5
6195 (exit $ac_status); }; }; then
6198 echo "$as_me: failed program was:" >&5
6199 cat conftest.$ac_ext >&5
6202 rm -f conftest.$ac_objext conftest.$ac_ext
6203 CPPFLAGS=$cf_save_CPPFLAGS
6208 if test "$cf_have_incdir" = no ; then
6209 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6211 echo "${as_me:-configure}:6211: testing adding $cf_add_incdir to include-path ..." 1>&5
6213 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6215 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6216 test "$cf_top_incdir" = "$cf_add_incdir" && break
6217 cf_add_incdir="$cf_top_incdir"
6230 echo "$as_me:6230: checking for $cf_ncuhdr_root header in include-path" >&5
6231 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6232 if test "${cf_cv_ncurses_h+set}" = set; then
6233 echo $ECHO_N "(cached) $ECHO_C" >&6
6236 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6237 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6238 for cf_header in $cf_header_list
6241 cat >conftest.$ac_ext <<_ACEOF
6242 #line 6242 "configure"
6243 #include "confdefs.h"
6245 #define _XOPEN_SOURCE_EXTENDED
6246 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6247 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6249 #include <$cf_header>
6254 #ifdef NCURSES_VERSION
6260 printf("%s\n", NCURSES_VERSION);
6273 rm -f conftest.$ac_objext
6274 if { (eval echo "$as_me:6274: \"$ac_compile\"") >&5
6275 (eval $ac_compile) 2>&5
6277 echo "$as_me:6277: \$? = $ac_status" >&5
6278 (exit $ac_status); } &&
6279 { ac_try='test -s conftest.$ac_objext'
6280 { (eval echo "$as_me:6280: \"$ac_try\"") >&5
6283 echo "$as_me:6283: \$? = $ac_status" >&5
6284 (exit $ac_status); }; }; then
6285 cf_cv_ncurses_h=$cf_header
6288 echo "$as_me: failed program was:" >&5
6289 cat conftest.$ac_ext >&5
6292 rm -f conftest.$ac_objext conftest.$ac_ext
6294 test "$cf_cv_ncurses_h" != no && break
6298 echo "$as_me:6298: result: $cf_cv_ncurses_h" >&5
6299 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6301 if test "$cf_cv_ncurses_h" != no ; then
6302 cf_cv_ncurses_header=$cf_cv_ncurses_h
6305 echo "$as_me:6305: checking for $cf_ncuhdr_root include-path" >&5
6306 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6307 if test "${cf_cv_ncurses_h2+set}" = set; then
6308 echo $ECHO_N "(cached) $ECHO_C" >&6
6311 test -n "$verbose" && echo
6315 # collect the current set of include-directories from compiler flags
6316 cf_header_path_list=""
6317 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6318 for cf_header_path in $CPPFLAGS $CFLAGS
6320 case $cf_header_path in
6322 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6324 test "x$cf_header_path" != "xNONE" && \
6325 test -d "$cf_header_path" && \
6327 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6328 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6329 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6330 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6331 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6332 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"
6335 cf_header_path_list="$cf_header_path_list $cf_search"
6341 # add the variations for the package we are looking for
6345 test "x$prefix" != "xNONE" && \
6346 test -d "$prefix" && \
6348 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6349 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6350 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6351 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6352 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6353 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6356 for cf_subdir_prefix in \
6365 test "x$cf_subdir_prefix" != "x$prefix" && \
6366 test -d "$cf_subdir_prefix" && \
6367 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6368 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6369 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6370 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6371 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6372 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6373 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"
6378 test "$includedir" != NONE && \
6379 test "$includedir" != "/usr/include" && \
6380 test -d "$includedir" && {
6381 test -d $includedir && cf_search="$cf_search $includedir"
6382 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6385 test "$oldincludedir" != NONE && \
6386 test "$oldincludedir" != "/usr/include" && \
6387 test -d "$oldincludedir" && {
6388 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6389 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6392 cf_search="$cf_search $cf_header_path_list"
6394 test -n "$verbose" && echo search path $cf_search
6395 cf_save2_CPPFLAGS="$CPPFLAGS"
6396 for cf_incdir in $cf_search
6399 if test -n "$cf_incdir" ; then
6400 for cf_add_incdir in $cf_incdir
6402 while test $cf_add_incdir != /usr/include
6404 if test -d $cf_add_incdir
6407 if test -n "$CFLAGS$CPPFLAGS" ; then
6408 # a loop is needed to ensure we can add subdirs of existing dirs
6409 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6410 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6411 cf_have_incdir=yes; break
6416 if test "$cf_have_incdir" = no ; then
6417 if test "$cf_add_incdir" = /usr/local/include ; then
6418 if test "$GCC" = yes
6420 cf_save_CPPFLAGS=$CPPFLAGS
6421 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6422 cat >conftest.$ac_ext <<_ACEOF
6423 #line 6423 "configure"
6424 #include "confdefs.h"
6434 rm -f conftest.$ac_objext
6435 if { (eval echo "$as_me:6435: \"$ac_compile\"") >&5
6436 (eval $ac_compile) 2>&5
6438 echo "$as_me:6438: \$? = $ac_status" >&5
6439 (exit $ac_status); } &&
6440 { ac_try='test -s conftest.$ac_objext'
6441 { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6444 echo "$as_me:6444: \$? = $ac_status" >&5
6445 (exit $ac_status); }; }; then
6448 echo "$as_me: failed program was:" >&5
6449 cat conftest.$ac_ext >&5
6452 rm -f conftest.$ac_objext conftest.$ac_ext
6453 CPPFLAGS=$cf_save_CPPFLAGS
6458 if test "$cf_have_incdir" = no ; then
6459 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6461 echo "${as_me:-configure}:6461: testing adding $cf_add_incdir to include-path ..." 1>&5
6463 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6465 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6466 test "$cf_top_incdir" = "$cf_add_incdir" && break
6467 cf_add_incdir="$cf_top_incdir"
6483 cat >conftest.$ac_ext <<_ACEOF
6484 #line 6484 "configure"
6485 #include "confdefs.h"
6487 #include <$cf_header>
6492 #ifdef NCURSES_VERSION
6494 printf("%s\n", NCURSES_VERSION);
6507 rm -f conftest.$ac_objext
6508 if { (eval echo "$as_me:6508: \"$ac_compile\"") >&5
6509 (eval $ac_compile) 2>&5
6511 echo "$as_me:6511: \$? = $ac_status" >&5
6512 (exit $ac_status); } &&
6513 { ac_try='test -s conftest.$ac_objext'
6514 { (eval echo "$as_me:6514: \"$ac_try\"") >&5
6517 echo "$as_me:6517: \$? = $ac_status" >&5
6518 (exit $ac_status); }; }; then
6519 cf_cv_ncurses_h2=$cf_header
6522 echo "$as_me: failed program was:" >&5
6523 cat conftest.$ac_ext >&5
6526 rm -f conftest.$ac_objext conftest.$ac_ext
6528 if test "$cf_cv_ncurses_h2" != no ; then
6529 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6530 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6533 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6535 CPPFLAGS="$cf_save2_CPPFLAGS"
6536 test "$cf_cv_ncurses_h2" != no && break
6538 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6538: error: not found" >&5
6539 echo "$as_me: error: not found" >&2;}
6540 { (exit 1); exit 1; }; }
6543 echo "$as_me:6543: result: $cf_cv_ncurses_h2" >&5
6544 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6546 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6547 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6548 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6549 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6552 if test -n "$cf_1st_incdir" ; then
6553 for cf_add_incdir in $cf_1st_incdir
6555 while test $cf_add_incdir != /usr/include
6557 if test -d $cf_add_incdir
6560 if test -n "$CFLAGS$CPPFLAGS" ; then
6561 # a loop is needed to ensure we can add subdirs of existing dirs
6562 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6563 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6564 cf_have_incdir=yes; break
6569 if test "$cf_have_incdir" = no ; then
6570 if test "$cf_add_incdir" = /usr/local/include ; then
6571 if test "$GCC" = yes
6573 cf_save_CPPFLAGS=$CPPFLAGS
6574 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6575 cat >conftest.$ac_ext <<_ACEOF
6576 #line 6576 "configure"
6577 #include "confdefs.h"
6587 rm -f conftest.$ac_objext
6588 if { (eval echo "$as_me:6588: \"$ac_compile\"") >&5
6589 (eval $ac_compile) 2>&5
6591 echo "$as_me:6591: \$? = $ac_status" >&5
6592 (exit $ac_status); } &&
6593 { ac_try='test -s conftest.$ac_objext'
6594 { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6597 echo "$as_me:6597: \$? = $ac_status" >&5
6598 (exit $ac_status); }; }; then
6601 echo "$as_me: failed program was:" >&5
6602 cat conftest.$ac_ext >&5
6605 rm -f conftest.$ac_objext conftest.$ac_ext
6606 CPPFLAGS=$cf_save_CPPFLAGS
6611 if test "$cf_have_incdir" = no ; then
6612 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6614 echo "${as_me:-configure}:6614: testing adding $cf_add_incdir to include-path ..." 1>&5
6616 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6618 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6619 test "$cf_top_incdir" = "$cf_add_incdir" && break
6620 cf_add_incdir="$cf_top_incdir"
6633 # Set definitions to allow ifdef'ing for ncurses.h
6635 case $cf_cv_ncurses_header in
6638 cat >>confdefs.h <<\EOF
6639 #define HAVE_NCURSES_H 1
6645 case $cf_cv_ncurses_header in
6646 (ncurses/curses.h|ncurses/ncurses.h)
6648 cat >>confdefs.h <<\EOF
6649 #define HAVE_NCURSES_NCURSES_H 1
6653 (ncursesw/curses.h|ncursesw/ncurses.h)
6655 cat >>confdefs.h <<\EOF
6656 #define HAVE_NCURSESW_NCURSES_H 1
6662 echo "$as_me:6662: checking for terminfo header" >&5
6663 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6664 if test "${cf_cv_term_header+set}" = set; then
6665 echo $ECHO_N "(cached) $ECHO_C" >&6
6668 case ${cf_cv_ncurses_header} in
6669 (*/ncurses.h|*/ncursesw.h)
6670 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6673 cf_term_header=term.h
6677 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6679 cat >conftest.$ac_ext <<_ACEOF
6680 #line 6680 "configure"
6681 #include "confdefs.h"
6683 #include <${cf_cv_ncurses_header:-curses.h}>
6689 int x = auto_left_margin
6694 rm -f conftest.$ac_objext
6695 if { (eval echo "$as_me:6695: \"$ac_compile\"") >&5
6696 (eval $ac_compile) 2>&5
6698 echo "$as_me:6698: \$? = $ac_status" >&5
6699 (exit $ac_status); } &&
6700 { ac_try='test -s conftest.$ac_objext'
6701 { (eval echo "$as_me:6701: \"$ac_try\"") >&5
6704 echo "$as_me:6704: \$? = $ac_status" >&5
6705 (exit $ac_status); }; }; then
6707 cf_cv_term_header="$cf_test"
6709 echo "$as_me: failed program was:" >&5
6710 cat conftest.$ac_ext >&5
6712 cf_cv_term_header=unknown
6715 rm -f conftest.$ac_objext conftest.$ac_ext
6716 test "$cf_cv_term_header" != unknown && break
6720 echo "$as_me:6720: result: $cf_cv_term_header" >&5
6721 echo "${ECHO_T}$cf_cv_term_header" >&6
6723 # Set definitions to allow ifdef'ing to accommodate subdirectories
6725 case $cf_cv_term_header in
6728 cat >>confdefs.h <<\EOF
6729 #define HAVE_TERM_H 1
6735 case $cf_cv_term_header in
6738 cat >>confdefs.h <<\EOF
6739 #define HAVE_NCURSES_TERM_H 1
6745 cat >>confdefs.h <<\EOF
6746 #define HAVE_NCURSESW_TERM_H 1
6752 # some applications need this, but should check for NCURSES_VERSION
6754 cat >>confdefs.h <<\EOF
6758 echo "$as_me:6758: checking for ncurses version" >&5
6759 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6760 if test "${cf_cv_ncurses_version+set}" = set; then
6761 echo $ECHO_N "(cached) $ECHO_C" >&6
6764 cf_cv_ncurses_version=no
6767 if test "$cross_compiling" = yes; then
6769 # This will not work if the preprocessor splits the line after the
6770 # Autoconf token. The 'unproto' program does that.
6771 cat > conftest.$ac_ext <<EOF
6772 #include <${cf_cv_ncurses_header:-curses.h}>
6774 #ifdef NCURSES_VERSION
6775 Autoconf NCURSES_VERSION
6783 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6784 { (eval echo "$as_me:6784: \"$cf_try\"") >&5
6787 echo "$as_me:6787: \$? = $ac_status" >&5
6788 (exit $ac_status); }
6789 if test -f conftest.out ; then
6790 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6791 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6796 cat >conftest.$ac_ext <<_ACEOF
6797 #line 6797 "configure"
6798 #include "confdefs.h"
6800 #include <${cf_cv_ncurses_header:-curses.h}>
6804 FILE *fp = fopen("$cf_tempfile", "w");
6805 #ifdef NCURSES_VERSION
6806 # ifdef NCURSES_VERSION_PATCH
6807 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6809 fprintf(fp, "%s\n", NCURSES_VERSION);
6813 fprintf(fp, "old\n");
6818 ${cf_cv_main_return:-return}(0);
6821 rm -f conftest$ac_exeext
6822 if { (eval echo "$as_me:6822: \"$ac_link\"") >&5
6823 (eval $ac_link) 2>&5
6825 echo "$as_me:6825: \$? = $ac_status" >&5
6826 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6827 { (eval echo "$as_me:6827: \"$ac_try\"") >&5
6830 echo "$as_me:6830: \$? = $ac_status" >&5
6831 (exit $ac_status); }; }; then
6833 cf_cv_ncurses_version=`cat $cf_tempfile`
6835 echo "$as_me: program exited with status $ac_status" >&5
6836 echo "$as_me: failed program was:" >&5
6837 cat conftest.$ac_ext >&5
6839 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6844 echo "$as_me:6844: result: $cf_cv_ncurses_version" >&5
6845 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6846 test "$cf_cv_ncurses_version" = no ||
6847 cat >>confdefs.h <<\EOF
6851 cf_nculib_root=ncursesw
6852 # This works, except for the special case where we find gpm, but
6853 # ncurses is in a nonstandard location via $LIBS, and we really want
6856 cf_ncurses_SAVE="$LIBS"
6857 echo "$as_me:6857: checking for Gpm_Open in -lgpm" >&5
6858 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6859 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6860 echo $ECHO_N "(cached) $ECHO_C" >&6
6862 ac_check_lib_save_LIBS=$LIBS
6864 cat >conftest.$ac_ext <<_ACEOF
6865 #line 6865 "configure"
6866 #include "confdefs.h"
6868 /* Override any gcc2 internal prototype to avoid an error. */
6872 /* We use char because int might match the return type of a gcc2
6873 builtin and then its argument prototype would still apply. */
6883 rm -f conftest.$ac_objext conftest$ac_exeext
6884 if { (eval echo "$as_me:6884: \"$ac_link\"") >&5
6885 (eval $ac_link) 2>&5
6887 echo "$as_me:6887: \$? = $ac_status" >&5
6888 (exit $ac_status); } &&
6889 { ac_try='test -s conftest$ac_exeext'
6890 { (eval echo "$as_me:6890: \"$ac_try\"") >&5
6893 echo "$as_me:6893: \$? = $ac_status" >&5
6894 (exit $ac_status); }; }; then
6895 ac_cv_lib_gpm_Gpm_Open=yes
6897 echo "$as_me: failed program was:" >&5
6898 cat conftest.$ac_ext >&5
6899 ac_cv_lib_gpm_Gpm_Open=no
6901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6902 LIBS=$ac_check_lib_save_LIBS
6904 echo "$as_me:6904: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6905 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6906 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6907 echo "$as_me:6907: checking for initscr in -lgpm" >&5
6908 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6909 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6910 echo $ECHO_N "(cached) $ECHO_C" >&6
6912 ac_check_lib_save_LIBS=$LIBS
6914 cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6918 /* Override any gcc2 internal prototype to avoid an error. */
6922 /* We use char because int might match the return type of a gcc2
6923 builtin and then its argument prototype would still apply. */
6933 rm -f conftest.$ac_objext conftest$ac_exeext
6934 if { (eval echo "$as_me:6934: \"$ac_link\"") >&5
6935 (eval $ac_link) 2>&5
6937 echo "$as_me:6937: \$? = $ac_status" >&5
6938 (exit $ac_status); } &&
6939 { ac_try='test -s conftest$ac_exeext'
6940 { (eval echo "$as_me:6940: \"$ac_try\"") >&5
6943 echo "$as_me:6943: \$? = $ac_status" >&5
6944 (exit $ac_status); }; }; then
6945 ac_cv_lib_gpm_initscr=yes
6947 echo "$as_me: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 ac_cv_lib_gpm_initscr=no
6951 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6952 LIBS=$ac_check_lib_save_LIBS
6954 echo "$as_me:6954: result: $ac_cv_lib_gpm_initscr" >&5
6955 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6956 if test $ac_cv_lib_gpm_initscr = yes; then
6957 LIBS="$cf_ncurses_SAVE"
6959 cf_ncurses_LIBS="-lgpm"
6966 # This is only necessary if you are linking against an obsolete
6967 # version of ncurses (but it should do no harm, since it's static).
6968 if test "$cf_nculib_root" = ncurses ; then
6969 echo "$as_me:6969: checking for tgoto in -lmytinfo" >&5
6970 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6971 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6972 echo $ECHO_N "(cached) $ECHO_C" >&6
6974 ac_check_lib_save_LIBS=$LIBS
6975 LIBS="-lmytinfo $LIBS"
6976 cat >conftest.$ac_ext <<_ACEOF
6977 #line 6977 "configure"
6978 #include "confdefs.h"
6980 /* Override any gcc2 internal prototype to avoid an error. */
6984 /* We use char because int might match the return type of a gcc2
6985 builtin and then its argument prototype would still apply. */
6995 rm -f conftest.$ac_objext conftest$ac_exeext
6996 if { (eval echo "$as_me:6996: \"$ac_link\"") >&5
6997 (eval $ac_link) 2>&5
6999 echo "$as_me:6999: \$? = $ac_status" >&5
7000 (exit $ac_status); } &&
7001 { ac_try='test -s conftest$ac_exeext'
7002 { (eval echo "$as_me:7002: \"$ac_try\"") >&5
7005 echo "$as_me:7005: \$? = $ac_status" >&5
7006 (exit $ac_status); }; }; then
7007 ac_cv_lib_mytinfo_tgoto=yes
7009 echo "$as_me: failed program was:" >&5
7010 cat conftest.$ac_ext >&5
7011 ac_cv_lib_mytinfo_tgoto=no
7013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7014 LIBS=$ac_check_lib_save_LIBS
7016 echo "$as_me:7016: result: $ac_cv_lib_mytinfo_tgoto" >&5
7017 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7018 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7019 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7026 cf_add_libs="$cf_ncurses_LIBS"
7027 # Filter out duplicates - this happens with badly-designed ".pc" files...
7028 for cf_add_1lib in $LIBS
7030 for cf_add_2lib in $cf_add_libs
7032 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7038 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7042 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7045 cf_add_libs="-l$cf_nculib_root"
7046 # Filter out duplicates - this happens with badly-designed ".pc" files...
7047 for cf_add_1lib in $LIBS
7049 for cf_add_2lib in $cf_add_libs
7051 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7063 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7065 echo "$as_me:7065: checking for initscr" >&5
7066 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7067 if test "${ac_cv_func_initscr+set}" = set; then
7068 echo $ECHO_N "(cached) $ECHO_C" >&6
7070 cat >conftest.$ac_ext <<_ACEOF
7071 #line 7071 "configure"
7072 #include "confdefs.h"
7073 /* System header to define __stub macros and hopefully few prototypes,
7074 which can conflict with char initscr (); below. */
7076 /* Override any gcc2 internal prototype to avoid an error. */
7080 /* We use char because int might match the return type of a gcc2
7081 builtin and then its argument prototype would still apply. */
7088 /* The GNU C library defines this for functions which it implements
7089 to always fail with ENOSYS. Some functions are actually named
7090 something starting with __ and the normal name is an alias. */
7091 #if defined (__stub_initscr) || defined (__stub___initscr)
7094 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7101 rm -f conftest.$ac_objext conftest$ac_exeext
7102 if { (eval echo "$as_me:7102: \"$ac_link\"") >&5
7103 (eval $ac_link) 2>&5
7105 echo "$as_me:7105: \$? = $ac_status" >&5
7106 (exit $ac_status); } &&
7107 { ac_try='test -s conftest$ac_exeext'
7108 { (eval echo "$as_me:7108: \"$ac_try\"") >&5
7111 echo "$as_me:7111: \$? = $ac_status" >&5
7112 (exit $ac_status); }; }; then
7113 ac_cv_func_initscr=yes
7115 echo "$as_me: failed program was:" >&5
7116 cat conftest.$ac_ext >&5
7117 ac_cv_func_initscr=no
7119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7121 echo "$as_me:7121: result: $ac_cv_func_initscr" >&5
7122 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7123 if test $ac_cv_func_initscr = yes; then
7124 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7127 cf_save_LIBS="$LIBS"
7128 echo "$as_me:7128: checking for initscr in -l$cf_nculib_root" >&5
7129 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7130 LIBS="-l$cf_nculib_root $LIBS"
7131 cat >conftest.$ac_ext <<_ACEOF
7132 #line 7132 "configure"
7133 #include "confdefs.h"
7134 #include <${cf_cv_ncurses_header:-curses.h}>
7143 rm -f conftest.$ac_objext conftest$ac_exeext
7144 if { (eval echo "$as_me:7144: \"$ac_link\"") >&5
7145 (eval $ac_link) 2>&5
7147 echo "$as_me:7147: \$? = $ac_status" >&5
7148 (exit $ac_status); } &&
7149 { ac_try='test -s conftest$ac_exeext'
7150 { (eval echo "$as_me:7150: \"$ac_try\"") >&5
7153 echo "$as_me:7153: \$? = $ac_status" >&5
7154 (exit $ac_status); }; }; then
7155 echo "$as_me:7155: result: yes" >&5
7156 echo "${ECHO_T}yes" >&6
7157 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7160 echo "$as_me: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7162 echo "$as_me:7162: result: no" >&5
7163 echo "${ECHO_T}no" >&6
7166 cf_library_path_list=""
7167 if test -n "${LDFLAGS}${LIBS}" ; then
7168 for cf_library_path in $LDFLAGS $LIBS
7170 case $cf_library_path in
7172 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7174 test "x$cf_library_path" != "xNONE" && \
7175 test -d "$cf_library_path" && \
7177 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7178 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7179 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7180 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7181 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7182 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"
7185 cf_library_path_list="$cf_library_path_list $cf_search"
7193 test "x$prefix" != "xNONE" && \
7194 test -d "$prefix" && \
7196 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7197 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7198 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7199 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7200 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7201 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7204 for cf_subdir_prefix in \
7213 test "x$cf_subdir_prefix" != "x$prefix" && \
7214 test -d "$cf_subdir_prefix" && \
7215 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7216 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7217 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7218 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7219 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7220 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7221 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"
7226 cf_search="$cf_library_path_list $cf_search"
7228 for cf_libdir in $cf_search
7230 echo "$as_me:7230: checking for -l$cf_nculib_root in $cf_libdir" >&5
7231 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7232 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7233 cat >conftest.$ac_ext <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7236 #include <${cf_cv_ncurses_header:-curses.h}>
7245 rm -f conftest.$ac_objext conftest$ac_exeext
7246 if { (eval echo "$as_me:7246: \"$ac_link\"") >&5
7247 (eval $ac_link) 2>&5
7249 echo "$as_me:7249: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest$ac_exeext'
7252 { (eval echo "$as_me:7252: \"$ac_try\"") >&5
7255 echo "$as_me:7255: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7257 echo "$as_me:7257: result: yes" >&5
7258 echo "${ECHO_T}yes" >&6
7259 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7262 echo "$as_me: failed program was:" >&5
7263 cat conftest.$ac_ext >&5
7264 echo "$as_me:7264: result: no" >&5
7265 echo "${ECHO_T}no" >&6
7266 LIBS="$cf_save_LIBS"
7268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7276 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7278 if test $cf_found_library = no ; then
7279 { { echo "$as_me:7279: error: Cannot link $cf_nculib_root library" >&5
7280 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7281 { (exit 1); exit 1; }; }
7286 if test -n "$cf_ncurses_LIBS" ; then
7287 echo "$as_me:7287: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7288 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7289 cf_ncurses_SAVE="$LIBS"
7290 for p in $cf_ncurses_LIBS ; do
7291 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7292 if test "$q" != "$LIBS" ; then
7296 cat >conftest.$ac_ext <<_ACEOF
7297 #line 7297 "configure"
7298 #include "confdefs.h"
7299 #include <${cf_cv_ncurses_header:-curses.h}>
7303 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7308 rm -f conftest.$ac_objext conftest$ac_exeext
7309 if { (eval echo "$as_me:7309: \"$ac_link\"") >&5
7310 (eval $ac_link) 2>&5
7312 echo "$as_me:7312: \$? = $ac_status" >&5
7313 (exit $ac_status); } &&
7314 { ac_try='test -s conftest$ac_exeext'
7315 { (eval echo "$as_me:7315: \"$ac_try\"") >&5
7318 echo "$as_me:7318: \$? = $ac_status" >&5
7319 (exit $ac_status); }; }; then
7320 echo "$as_me:7320: result: yes" >&5
7321 echo "${ECHO_T}yes" >&6
7323 echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 echo "$as_me:7325: result: no" >&5
7326 echo "${ECHO_T}no" >&6
7327 LIBS="$cf_ncurses_SAVE"
7329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7332 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7334 cat >>confdefs.h <<EOF
7335 #define $cf_nculib_ROOT 1
7345 cf_ncuconfig_root=ncurses
7346 cf_have_ncuconfig=no
7348 if test "x${PKG_CONFIG:=none}" != xnone; then
7349 echo "$as_me:7349: checking pkg-config for $cf_ncuconfig_root" >&5
7350 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7351 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7352 echo "$as_me:7352: result: yes" >&5
7353 echo "${ECHO_T}yes" >&6
7355 echo "$as_me:7355: checking if the $cf_ncuconfig_root package files work" >&5
7356 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7357 cf_have_ncuconfig=unknown
7359 cf_save_CPPFLAGS="$CPPFLAGS"
7360 cf_save_LIBS="$LIBS"
7362 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7364 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7365 # Filter out duplicates - this happens with badly-designed ".pc" files...
7366 for cf_add_1lib in $LIBS
7368 for cf_add_2lib in $cf_add_libs
7370 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7376 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7380 cat >conftest.$ac_ext <<_ACEOF
7381 #line 7381 "configure"
7382 #include "confdefs.h"
7383 #include <${cf_cv_ncurses_header:-curses.h}>
7387 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7392 rm -f conftest.$ac_objext conftest$ac_exeext
7393 if { (eval echo "$as_me:7393: \"$ac_link\"") >&5
7394 (eval $ac_link) 2>&5
7396 echo "$as_me:7396: \$? = $ac_status" >&5
7397 (exit $ac_status); } &&
7398 { ac_try='test -s conftest$ac_exeext'
7399 { (eval echo "$as_me:7399: \"$ac_try\"") >&5
7402 echo "$as_me:7402: \$? = $ac_status" >&5
7403 (exit $ac_status); }; }; then
7404 if test "$cross_compiling" = yes; then
7405 cf_have_ncuconfig=maybe
7407 cat >conftest.$ac_ext <<_ACEOF
7408 #line 7408 "configure"
7409 #include "confdefs.h"
7410 #include <${cf_cv_ncurses_header:-curses.h}>
7412 { char *xx = curses_version(); return (xx == 0); }
7414 rm -f conftest$ac_exeext
7415 if { (eval echo "$as_me:7415: \"$ac_link\"") >&5
7416 (eval $ac_link) 2>&5
7418 echo "$as_me:7418: \$? = $ac_status" >&5
7419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7420 { (eval echo "$as_me:7420: \"$ac_try\"") >&5
7423 echo "$as_me:7423: \$? = $ac_status" >&5
7424 (exit $ac_status); }; }; then
7425 cf_have_ncuconfig=yes
7427 echo "$as_me: program exited with status $ac_status" >&5
7428 echo "$as_me: failed program was:" >&5
7429 cat conftest.$ac_ext >&5
7430 cf_have_ncuconfig=no
7432 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7435 echo "$as_me: failed program was:" >&5
7436 cat conftest.$ac_ext >&5
7437 cf_have_ncuconfig=no
7439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7440 echo "$as_me:7440: result: $cf_have_ncuconfig" >&5
7441 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7442 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7443 if test "$cf_have_ncuconfig" != "yes"
7445 CPPFLAGS="$cf_save_CPPFLAGS"
7446 LIBS="$cf_save_LIBS"
7447 NCURSES_CONFIG_PKG=none
7450 cat >>confdefs.h <<\EOF
7454 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7458 echo "$as_me:7458: result: no" >&5
7459 echo "${ECHO_T}no" >&6
7460 NCURSES_CONFIG_PKG=none
7463 NCURSES_CONFIG_PKG=none
7466 if test "x$cf_have_ncuconfig" = "xno"; then
7467 echo "Looking for ${cf_ncuconfig_root}-config"
7469 if test -n "$ac_tool_prefix"; then
7470 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7472 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7473 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7474 echo "$as_me:7474: checking for $ac_word" >&5
7475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7476 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7477 echo $ECHO_N "(cached) $ECHO_C" >&6
7479 if test -n "$NCURSES_CONFIG"; then
7480 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7482 ac_save_IFS=$IFS; IFS=$ac_path_separator
7484 for ac_dir in $ac_dummy; do
7486 test -z "$ac_dir" && ac_dir=.
7487 $as_executable_p "$ac_dir/$ac_word" || continue
7488 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7489 echo "$as_me:7489: found $ac_dir/$ac_word" >&5
7495 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7496 if test -n "$NCURSES_CONFIG"; then
7497 echo "$as_me:7497: result: $NCURSES_CONFIG" >&5
7498 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7500 echo "$as_me:7500: result: no" >&5
7501 echo "${ECHO_T}no" >&6
7504 test -n "$NCURSES_CONFIG" && break
7507 if test -z "$NCURSES_CONFIG"; then
7508 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7509 for ac_prog in ${cf_ncuconfig_root}-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7511 # Extract the first word of "$ac_prog", so it can be a program name with args.
7512 set dummy $ac_prog; ac_word=$2
7513 echo "$as_me:7513: checking for $ac_word" >&5
7514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7515 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7516 echo $ECHO_N "(cached) $ECHO_C" >&6
7518 if test -n "$ac_ct_NCURSES_CONFIG"; then
7519 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7521 ac_save_IFS=$IFS; IFS=$ac_path_separator
7523 for ac_dir in $ac_dummy; do
7525 test -z "$ac_dir" && ac_dir=.
7526 $as_executable_p "$ac_dir/$ac_word" || continue
7527 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7528 echo "$as_me:7528: found $ac_dir/$ac_word" >&5
7534 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7535 if test -n "$ac_ct_NCURSES_CONFIG"; then
7536 echo "$as_me:7536: result: $ac_ct_NCURSES_CONFIG" >&5
7537 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7539 echo "$as_me:7539: result: no" >&5
7540 echo "${ECHO_T}no" >&6
7543 test -n "$ac_ct_NCURSES_CONFIG" && break
7545 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7547 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7550 if test "$NCURSES_CONFIG" != none ; then
7552 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7554 cf_add_libs="`$NCURSES_CONFIG --libs`"
7555 # Filter out duplicates - this happens with badly-designed ".pc" files...
7556 for cf_add_1lib in $LIBS
7558 for cf_add_2lib in $cf_add_libs
7560 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7566 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7570 # even with config script, some packages use no-override for curses.h
7572 echo "$as_me:7572: checking if we have identified curses headers" >&5
7573 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7574 if test "${cf_cv_ncurses_header+set}" = set; then
7575 echo $ECHO_N "(cached) $ECHO_C" >&6
7578 cf_cv_ncurses_header=none
7580 ncurses.h ncurses/ncurses.h \
7581 curses.h ncurses/curses.h
7583 cat >conftest.$ac_ext <<_ACEOF
7584 #line 7584 "configure"
7585 #include "confdefs.h"
7586 #include <${cf_header}>
7590 initscr(); tgoto("?", 0,0)
7595 rm -f conftest.$ac_objext
7596 if { (eval echo "$as_me:7596: \"$ac_compile\"") >&5
7597 (eval $ac_compile) 2>&5
7599 echo "$as_me:7599: \$? = $ac_status" >&5
7600 (exit $ac_status); } &&
7601 { ac_try='test -s conftest.$ac_objext'
7602 { (eval echo "$as_me:7602: \"$ac_try\"") >&5
7605 echo "$as_me:7605: \$? = $ac_status" >&5
7606 (exit $ac_status); }; }; then
7607 cf_cv_ncurses_header=$cf_header; break
7609 echo "$as_me: failed program was:" >&5
7610 cat conftest.$ac_ext >&5
7612 rm -f conftest.$ac_objext conftest.$ac_ext
7616 echo "$as_me:7616: result: $cf_cv_ncurses_header" >&5
7617 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7619 if test "$cf_cv_ncurses_header" = none ; then
7620 { { echo "$as_me:7620: error: No curses header-files found" >&5
7621 echo "$as_me: error: No curses header-files found" >&2;}
7622 { (exit 1); exit 1; }; }
7625 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7627 for ac_header in $cf_cv_ncurses_header
7629 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7630 echo "$as_me:7630: checking for $ac_header" >&5
7631 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7632 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7633 echo $ECHO_N "(cached) $ECHO_C" >&6
7635 cat >conftest.$ac_ext <<_ACEOF
7636 #line 7636 "configure"
7637 #include "confdefs.h"
7638 #include <$ac_header>
7640 if { (eval echo "$as_me:7640: \"$ac_cpp conftest.$ac_ext\"") >&5
7641 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7643 egrep -v '^ *\+' conftest.er1 >conftest.err
7645 cat conftest.err >&5
7646 echo "$as_me:7646: \$? = $ac_status" >&5
7647 (exit $ac_status); } >/dev/null; then
7648 if test -s conftest.err; then
7649 ac_cpp_err=$ac_c_preproc_warn_flag
7656 if test -z "$ac_cpp_err"; then
7657 eval "$as_ac_Header=yes"
7659 echo "$as_me: failed program was:" >&5
7660 cat conftest.$ac_ext >&5
7661 eval "$as_ac_Header=no"
7663 rm -f conftest.err conftest.$ac_ext
7665 echo "$as_me:7665: result: `eval echo '${'$as_ac_Header'}'`" >&5
7666 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7667 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7668 cat >>confdefs.h <<EOF
7669 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7675 cat >>confdefs.h <<\EOF
7679 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7681 cat >>confdefs.h <<EOF
7682 #define $cf_nculib_ROOT 1
7685 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7689 cf_ncuhdr_root=ncurses
7691 test -n "$cf_cv_curses_dir" && \
7692 test "$cf_cv_curses_dir" != "no" && { \
7694 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7695 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7697 while test $cf_add_incdir != /usr/include
7699 if test -d $cf_add_incdir
7702 if test -n "$CFLAGS$CPPFLAGS" ; then
7703 # a loop is needed to ensure we can add subdirs of existing dirs
7704 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7705 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7706 cf_have_incdir=yes; break
7711 if test "$cf_have_incdir" = no ; then
7712 if test "$cf_add_incdir" = /usr/local/include ; then
7713 if test "$GCC" = yes
7715 cf_save_CPPFLAGS=$CPPFLAGS
7716 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7717 cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7729 rm -f conftest.$ac_objext
7730 if { (eval echo "$as_me:7730: \"$ac_compile\"") >&5
7731 (eval $ac_compile) 2>&5
7733 echo "$as_me:7733: \$? = $ac_status" >&5
7734 (exit $ac_status); } &&
7735 { ac_try='test -s conftest.$ac_objext'
7736 { (eval echo "$as_me:7736: \"$ac_try\"") >&5
7739 echo "$as_me:7739: \$? = $ac_status" >&5
7740 (exit $ac_status); }; }; then
7743 echo "$as_me: failed program was:" >&5
7744 cat conftest.$ac_ext >&5
7747 rm -f conftest.$ac_objext conftest.$ac_ext
7748 CPPFLAGS=$cf_save_CPPFLAGS
7753 if test "$cf_have_incdir" = no ; then
7754 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7756 echo "${as_me:-configure}:7756: testing adding $cf_add_incdir to include-path ..." 1>&5
7758 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7760 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7761 test "$cf_top_incdir" = "$cf_add_incdir" && break
7762 cf_add_incdir="$cf_top_incdir"
7775 echo "$as_me:7775: checking for $cf_ncuhdr_root header in include-path" >&5
7776 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7777 if test "${cf_cv_ncurses_h+set}" = set; then
7778 echo $ECHO_N "(cached) $ECHO_C" >&6
7781 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7782 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7783 for cf_header in $cf_header_list
7786 cat >conftest.$ac_ext <<_ACEOF
7787 #line 7787 "configure"
7788 #include "confdefs.h"
7790 #include <$cf_header>
7795 #ifdef NCURSES_VERSION
7797 printf("%s\n", NCURSES_VERSION);
7810 rm -f conftest.$ac_objext
7811 if { (eval echo "$as_me:7811: \"$ac_compile\"") >&5
7812 (eval $ac_compile) 2>&5
7814 echo "$as_me:7814: \$? = $ac_status" >&5
7815 (exit $ac_status); } &&
7816 { ac_try='test -s conftest.$ac_objext'
7817 { (eval echo "$as_me:7817: \"$ac_try\"") >&5
7820 echo "$as_me:7820: \$? = $ac_status" >&5
7821 (exit $ac_status); }; }; then
7822 cf_cv_ncurses_h=$cf_header
7825 echo "$as_me: failed program was:" >&5
7826 cat conftest.$ac_ext >&5
7829 rm -f conftest.$ac_objext conftest.$ac_ext
7831 test "$cf_cv_ncurses_h" != no && break
7835 echo "$as_me:7835: result: $cf_cv_ncurses_h" >&5
7836 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7838 if test "$cf_cv_ncurses_h" != no ; then
7839 cf_cv_ncurses_header=$cf_cv_ncurses_h
7842 echo "$as_me:7842: checking for $cf_ncuhdr_root include-path" >&5
7843 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7844 if test "${cf_cv_ncurses_h2+set}" = set; then
7845 echo $ECHO_N "(cached) $ECHO_C" >&6
7848 test -n "$verbose" && echo
7852 # collect the current set of include-directories from compiler flags
7853 cf_header_path_list=""
7854 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7855 for cf_header_path in $CPPFLAGS $CFLAGS
7857 case $cf_header_path in
7859 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7861 test "x$cf_header_path" != "xNONE" && \
7862 test -d "$cf_header_path" && \
7864 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7865 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7866 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7867 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7868 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7869 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"
7872 cf_header_path_list="$cf_header_path_list $cf_search"
7878 # add the variations for the package we are looking for
7882 test "x$prefix" != "xNONE" && \
7883 test -d "$prefix" && \
7885 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7886 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7887 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7888 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7889 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7890 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7893 for cf_subdir_prefix in \
7902 test "x$cf_subdir_prefix" != "x$prefix" && \
7903 test -d "$cf_subdir_prefix" && \
7904 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7905 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7906 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7907 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7908 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7909 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7910 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"
7915 test "$includedir" != NONE && \
7916 test "$includedir" != "/usr/include" && \
7917 test -d "$includedir" && {
7918 test -d $includedir && cf_search="$cf_search $includedir"
7919 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7922 test "$oldincludedir" != NONE && \
7923 test "$oldincludedir" != "/usr/include" && \
7924 test -d "$oldincludedir" && {
7925 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7926 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7929 cf_search="$cf_search $cf_header_path_list"
7931 test -n "$verbose" && echo search path $cf_search
7932 cf_save2_CPPFLAGS="$CPPFLAGS"
7933 for cf_incdir in $cf_search
7936 if test -n "$cf_incdir" ; then
7937 for cf_add_incdir in $cf_incdir
7939 while test $cf_add_incdir != /usr/include
7941 if test -d $cf_add_incdir
7944 if test -n "$CFLAGS$CPPFLAGS" ; then
7945 # a loop is needed to ensure we can add subdirs of existing dirs
7946 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7947 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7948 cf_have_incdir=yes; break
7953 if test "$cf_have_incdir" = no ; then
7954 if test "$cf_add_incdir" = /usr/local/include ; then
7955 if test "$GCC" = yes
7957 cf_save_CPPFLAGS=$CPPFLAGS
7958 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7959 cat >conftest.$ac_ext <<_ACEOF
7960 #line 7960 "configure"
7961 #include "confdefs.h"
7971 rm -f conftest.$ac_objext
7972 if { (eval echo "$as_me:7972: \"$ac_compile\"") >&5
7973 (eval $ac_compile) 2>&5
7975 echo "$as_me:7975: \$? = $ac_status" >&5
7976 (exit $ac_status); } &&
7977 { ac_try='test -s conftest.$ac_objext'
7978 { (eval echo "$as_me:7978: \"$ac_try\"") >&5
7981 echo "$as_me:7981: \$? = $ac_status" >&5
7982 (exit $ac_status); }; }; then
7985 echo "$as_me: failed program was:" >&5
7986 cat conftest.$ac_ext >&5
7989 rm -f conftest.$ac_objext conftest.$ac_ext
7990 CPPFLAGS=$cf_save_CPPFLAGS
7995 if test "$cf_have_incdir" = no ; then
7996 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7998 echo "${as_me:-configure}:7998: testing adding $cf_add_incdir to include-path ..." 1>&5
8000 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8002 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8003 test "$cf_top_incdir" = "$cf_add_incdir" && break
8004 cf_add_incdir="$cf_top_incdir"
8020 cat >conftest.$ac_ext <<_ACEOF
8021 #line 8021 "configure"
8022 #include "confdefs.h"
8024 #include <$cf_header>
8029 #ifdef NCURSES_VERSION
8031 printf("%s\n", NCURSES_VERSION);
8044 rm -f conftest.$ac_objext
8045 if { (eval echo "$as_me:8045: \"$ac_compile\"") >&5
8046 (eval $ac_compile) 2>&5
8048 echo "$as_me:8048: \$? = $ac_status" >&5
8049 (exit $ac_status); } &&
8050 { ac_try='test -s conftest.$ac_objext'
8051 { (eval echo "$as_me:8051: \"$ac_try\"") >&5
8054 echo "$as_me:8054: \$? = $ac_status" >&5
8055 (exit $ac_status); }; }; then
8056 cf_cv_ncurses_h2=$cf_header
8059 echo "$as_me: failed program was:" >&5
8060 cat conftest.$ac_ext >&5
8063 rm -f conftest.$ac_objext conftest.$ac_ext
8065 if test "$cf_cv_ncurses_h2" != no ; then
8066 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8067 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8070 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8072 CPPFLAGS="$cf_save2_CPPFLAGS"
8073 test "$cf_cv_ncurses_h2" != no && break
8075 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8075: error: not found" >&5
8076 echo "$as_me: error: not found" >&2;}
8077 { (exit 1); exit 1; }; }
8080 echo "$as_me:8080: result: $cf_cv_ncurses_h2" >&5
8081 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8083 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8084 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8085 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8086 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8089 if test -n "$cf_1st_incdir" ; then
8090 for cf_add_incdir in $cf_1st_incdir
8092 while test $cf_add_incdir != /usr/include
8094 if test -d $cf_add_incdir
8097 if test -n "$CFLAGS$CPPFLAGS" ; then
8098 # a loop is needed to ensure we can add subdirs of existing dirs
8099 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8100 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8101 cf_have_incdir=yes; break
8106 if test "$cf_have_incdir" = no ; then
8107 if test "$cf_add_incdir" = /usr/local/include ; then
8108 if test "$GCC" = yes
8110 cf_save_CPPFLAGS=$CPPFLAGS
8111 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8112 cat >conftest.$ac_ext <<_ACEOF
8113 #line 8113 "configure"
8114 #include "confdefs.h"
8124 rm -f conftest.$ac_objext
8125 if { (eval echo "$as_me:8125: \"$ac_compile\"") >&5
8126 (eval $ac_compile) 2>&5
8128 echo "$as_me:8128: \$? = $ac_status" >&5
8129 (exit $ac_status); } &&
8130 { ac_try='test -s conftest.$ac_objext'
8131 { (eval echo "$as_me:8131: \"$ac_try\"") >&5
8134 echo "$as_me:8134: \$? = $ac_status" >&5
8135 (exit $ac_status); }; }; then
8138 echo "$as_me: failed program was:" >&5
8139 cat conftest.$ac_ext >&5
8142 rm -f conftest.$ac_objext conftest.$ac_ext
8143 CPPFLAGS=$cf_save_CPPFLAGS
8148 if test "$cf_have_incdir" = no ; then
8149 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8151 echo "${as_me:-configure}:8151: testing adding $cf_add_incdir to include-path ..." 1>&5
8153 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8155 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8156 test "$cf_top_incdir" = "$cf_add_incdir" && break
8157 cf_add_incdir="$cf_top_incdir"
8170 # Set definitions to allow ifdef'ing for ncurses.h
8172 case $cf_cv_ncurses_header in
8175 cat >>confdefs.h <<\EOF
8176 #define HAVE_NCURSES_H 1
8182 case $cf_cv_ncurses_header in
8183 (ncurses/curses.h|ncurses/ncurses.h)
8185 cat >>confdefs.h <<\EOF
8186 #define HAVE_NCURSES_NCURSES_H 1
8190 (ncursesw/curses.h|ncursesw/ncurses.h)
8192 cat >>confdefs.h <<\EOF
8193 #define HAVE_NCURSESW_NCURSES_H 1
8199 echo "$as_me:8199: checking for terminfo header" >&5
8200 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8201 if test "${cf_cv_term_header+set}" = set; then
8202 echo $ECHO_N "(cached) $ECHO_C" >&6
8205 case ${cf_cv_ncurses_header} in
8206 (*/ncurses.h|*/ncursesw.h)
8207 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8210 cf_term_header=term.h
8214 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8216 cat >conftest.$ac_ext <<_ACEOF
8217 #line 8217 "configure"
8218 #include "confdefs.h"
8220 #include <${cf_cv_ncurses_header:-curses.h}>
8226 int x = auto_left_margin
8231 rm -f conftest.$ac_objext
8232 if { (eval echo "$as_me:8232: \"$ac_compile\"") >&5
8233 (eval $ac_compile) 2>&5
8235 echo "$as_me:8235: \$? = $ac_status" >&5
8236 (exit $ac_status); } &&
8237 { ac_try='test -s conftest.$ac_objext'
8238 { (eval echo "$as_me:8238: \"$ac_try\"") >&5
8241 echo "$as_me:8241: \$? = $ac_status" >&5
8242 (exit $ac_status); }; }; then
8244 cf_cv_term_header="$cf_test"
8246 echo "$as_me: failed program was:" >&5
8247 cat conftest.$ac_ext >&5
8249 cf_cv_term_header=unknown
8252 rm -f conftest.$ac_objext conftest.$ac_ext
8253 test "$cf_cv_term_header" != unknown && break
8257 echo "$as_me:8257: result: $cf_cv_term_header" >&5
8258 echo "${ECHO_T}$cf_cv_term_header" >&6
8260 # Set definitions to allow ifdef'ing to accommodate subdirectories
8262 case $cf_cv_term_header in
8265 cat >>confdefs.h <<\EOF
8266 #define HAVE_TERM_H 1
8272 case $cf_cv_term_header in
8275 cat >>confdefs.h <<\EOF
8276 #define HAVE_NCURSES_TERM_H 1
8282 cat >>confdefs.h <<\EOF
8283 #define HAVE_NCURSESW_TERM_H 1
8289 # some applications need this, but should check for NCURSES_VERSION
8291 cat >>confdefs.h <<\EOF
8295 echo "$as_me:8295: checking for ncurses version" >&5
8296 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8297 if test "${cf_cv_ncurses_version+set}" = set; then
8298 echo $ECHO_N "(cached) $ECHO_C" >&6
8301 cf_cv_ncurses_version=no
8304 if test "$cross_compiling" = yes; then
8306 # This will not work if the preprocessor splits the line after the
8307 # Autoconf token. The 'unproto' program does that.
8308 cat > conftest.$ac_ext <<EOF
8309 #include <${cf_cv_ncurses_header:-curses.h}>
8311 #ifdef NCURSES_VERSION
8312 Autoconf NCURSES_VERSION
8320 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8321 { (eval echo "$as_me:8321: \"$cf_try\"") >&5
8324 echo "$as_me:8324: \$? = $ac_status" >&5
8325 (exit $ac_status); }
8326 if test -f conftest.out ; then
8327 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8328 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8333 cat >conftest.$ac_ext <<_ACEOF
8334 #line 8334 "configure"
8335 #include "confdefs.h"
8337 #include <${cf_cv_ncurses_header:-curses.h}>
8341 FILE *fp = fopen("$cf_tempfile", "w");
8342 #ifdef NCURSES_VERSION
8343 # ifdef NCURSES_VERSION_PATCH
8344 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8346 fprintf(fp, "%s\n", NCURSES_VERSION);
8350 fprintf(fp, "old\n");
8355 ${cf_cv_main_return:-return}(0);
8358 rm -f conftest$ac_exeext
8359 if { (eval echo "$as_me:8359: \"$ac_link\"") >&5
8360 (eval $ac_link) 2>&5
8362 echo "$as_me:8362: \$? = $ac_status" >&5
8363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8364 { (eval echo "$as_me:8364: \"$ac_try\"") >&5
8367 echo "$as_me:8367: \$? = $ac_status" >&5
8368 (exit $ac_status); }; }; then
8370 cf_cv_ncurses_version=`cat $cf_tempfile`
8372 echo "$as_me: program exited with status $ac_status" >&5
8373 echo "$as_me: failed program was:" >&5
8374 cat conftest.$ac_ext >&5
8376 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8381 echo "$as_me:8381: result: $cf_cv_ncurses_version" >&5
8382 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8383 test "$cf_cv_ncurses_version" = no ||
8384 cat >>confdefs.h <<\EOF
8388 cf_nculib_root=ncurses
8389 # This works, except for the special case where we find gpm, but
8390 # ncurses is in a nonstandard location via $LIBS, and we really want
8393 cf_ncurses_SAVE="$LIBS"
8394 echo "$as_me:8394: checking for Gpm_Open in -lgpm" >&5
8395 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8396 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8397 echo $ECHO_N "(cached) $ECHO_C" >&6
8399 ac_check_lib_save_LIBS=$LIBS
8401 cat >conftest.$ac_ext <<_ACEOF
8402 #line 8402 "configure"
8403 #include "confdefs.h"
8405 /* Override any gcc2 internal prototype to avoid an error. */
8409 /* We use char because int might match the return type of a gcc2
8410 builtin and then its argument prototype would still apply. */
8420 rm -f conftest.$ac_objext conftest$ac_exeext
8421 if { (eval echo "$as_me:8421: \"$ac_link\"") >&5
8422 (eval $ac_link) 2>&5
8424 echo "$as_me:8424: \$? = $ac_status" >&5
8425 (exit $ac_status); } &&
8426 { ac_try='test -s conftest$ac_exeext'
8427 { (eval echo "$as_me:8427: \"$ac_try\"") >&5
8430 echo "$as_me:8430: \$? = $ac_status" >&5
8431 (exit $ac_status); }; }; then
8432 ac_cv_lib_gpm_Gpm_Open=yes
8434 echo "$as_me: failed program was:" >&5
8435 cat conftest.$ac_ext >&5
8436 ac_cv_lib_gpm_Gpm_Open=no
8438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8439 LIBS=$ac_check_lib_save_LIBS
8441 echo "$as_me:8441: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8442 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8443 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8444 echo "$as_me:8444: checking for initscr in -lgpm" >&5
8445 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8446 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8447 echo $ECHO_N "(cached) $ECHO_C" >&6
8449 ac_check_lib_save_LIBS=$LIBS
8451 cat >conftest.$ac_ext <<_ACEOF
8452 #line 8452 "configure"
8453 #include "confdefs.h"
8455 /* Override any gcc2 internal prototype to avoid an error. */
8459 /* We use char because int might match the return type of a gcc2
8460 builtin and then its argument prototype would still apply. */
8470 rm -f conftest.$ac_objext conftest$ac_exeext
8471 if { (eval echo "$as_me:8471: \"$ac_link\"") >&5
8472 (eval $ac_link) 2>&5
8474 echo "$as_me:8474: \$? = $ac_status" >&5
8475 (exit $ac_status); } &&
8476 { ac_try='test -s conftest$ac_exeext'
8477 { (eval echo "$as_me:8477: \"$ac_try\"") >&5
8480 echo "$as_me:8480: \$? = $ac_status" >&5
8481 (exit $ac_status); }; }; then
8482 ac_cv_lib_gpm_initscr=yes
8484 echo "$as_me: failed program was:" >&5
8485 cat conftest.$ac_ext >&5
8486 ac_cv_lib_gpm_initscr=no
8488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8489 LIBS=$ac_check_lib_save_LIBS
8491 echo "$as_me:8491: result: $ac_cv_lib_gpm_initscr" >&5
8492 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8493 if test $ac_cv_lib_gpm_initscr = yes; then
8494 LIBS="$cf_ncurses_SAVE"
8496 cf_ncurses_LIBS="-lgpm"
8503 # This is only necessary if you are linking against an obsolete
8504 # version of ncurses (but it should do no harm, since it's static).
8505 if test "$cf_nculib_root" = ncurses ; then
8506 echo "$as_me:8506: checking for tgoto in -lmytinfo" >&5
8507 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8508 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8509 echo $ECHO_N "(cached) $ECHO_C" >&6
8511 ac_check_lib_save_LIBS=$LIBS
8512 LIBS="-lmytinfo $LIBS"
8513 cat >conftest.$ac_ext <<_ACEOF
8514 #line 8514 "configure"
8515 #include "confdefs.h"
8517 /* Override any gcc2 internal prototype to avoid an error. */
8521 /* We use char because int might match the return type of a gcc2
8522 builtin and then its argument prototype would still apply. */
8532 rm -f conftest.$ac_objext conftest$ac_exeext
8533 if { (eval echo "$as_me:8533: \"$ac_link\"") >&5
8534 (eval $ac_link) 2>&5
8536 echo "$as_me:8536: \$? = $ac_status" >&5
8537 (exit $ac_status); } &&
8538 { ac_try='test -s conftest$ac_exeext'
8539 { (eval echo "$as_me:8539: \"$ac_try\"") >&5
8542 echo "$as_me:8542: \$? = $ac_status" >&5
8543 (exit $ac_status); }; }; then
8544 ac_cv_lib_mytinfo_tgoto=yes
8546 echo "$as_me: failed program was:" >&5
8547 cat conftest.$ac_ext >&5
8548 ac_cv_lib_mytinfo_tgoto=no
8550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8551 LIBS=$ac_check_lib_save_LIBS
8553 echo "$as_me:8553: result: $ac_cv_lib_mytinfo_tgoto" >&5
8554 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8555 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8556 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8563 cf_add_libs="$cf_ncurses_LIBS"
8564 # Filter out duplicates - this happens with badly-designed ".pc" files...
8565 for cf_add_1lib in $LIBS
8567 for cf_add_2lib in $cf_add_libs
8569 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8575 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8579 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8582 cf_add_libs="-l$cf_nculib_root"
8583 # Filter out duplicates - this happens with badly-designed ".pc" files...
8584 for cf_add_1lib in $LIBS
8586 for cf_add_2lib in $cf_add_libs
8588 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8594 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8600 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8602 echo "$as_me:8602: checking for initscr" >&5
8603 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8604 if test "${ac_cv_func_initscr+set}" = set; then
8605 echo $ECHO_N "(cached) $ECHO_C" >&6
8607 cat >conftest.$ac_ext <<_ACEOF
8608 #line 8608 "configure"
8609 #include "confdefs.h"
8610 /* System header to define __stub macros and hopefully few prototypes,
8611 which can conflict with char initscr (); below. */
8613 /* Override any gcc2 internal prototype to avoid an error. */
8617 /* We use char because int might match the return type of a gcc2
8618 builtin and then its argument prototype would still apply. */
8625 /* The GNU C library defines this for functions which it implements
8626 to always fail with ENOSYS. Some functions are actually named
8627 something starting with __ and the normal name is an alias. */
8628 #if defined (__stub_initscr) || defined (__stub___initscr)
8631 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8638 rm -f conftest.$ac_objext conftest$ac_exeext
8639 if { (eval echo "$as_me:8639: \"$ac_link\"") >&5
8640 (eval $ac_link) 2>&5
8642 echo "$as_me:8642: \$? = $ac_status" >&5
8643 (exit $ac_status); } &&
8644 { ac_try='test -s conftest$ac_exeext'
8645 { (eval echo "$as_me:8645: \"$ac_try\"") >&5
8648 echo "$as_me:8648: \$? = $ac_status" >&5
8649 (exit $ac_status); }; }; then
8650 ac_cv_func_initscr=yes
8652 echo "$as_me: failed program was:" >&5
8653 cat conftest.$ac_ext >&5
8654 ac_cv_func_initscr=no
8656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8658 echo "$as_me:8658: result: $ac_cv_func_initscr" >&5
8659 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8660 if test $ac_cv_func_initscr = yes; then
8661 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8664 cf_save_LIBS="$LIBS"
8665 echo "$as_me:8665: checking for initscr in -l$cf_nculib_root" >&5
8666 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8667 LIBS="-l$cf_nculib_root $LIBS"
8668 cat >conftest.$ac_ext <<_ACEOF
8669 #line 8669 "configure"
8670 #include "confdefs.h"
8671 #include <${cf_cv_ncurses_header:-curses.h}>
8680 rm -f conftest.$ac_objext conftest$ac_exeext
8681 if { (eval echo "$as_me:8681: \"$ac_link\"") >&5
8682 (eval $ac_link) 2>&5
8684 echo "$as_me:8684: \$? = $ac_status" >&5
8685 (exit $ac_status); } &&
8686 { ac_try='test -s conftest$ac_exeext'
8687 { (eval echo "$as_me:8687: \"$ac_try\"") >&5
8690 echo "$as_me:8690: \$? = $ac_status" >&5
8691 (exit $ac_status); }; }; then
8692 echo "$as_me:8692: result: yes" >&5
8693 echo "${ECHO_T}yes" >&6
8694 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8697 echo "$as_me: failed program was:" >&5
8698 cat conftest.$ac_ext >&5
8699 echo "$as_me:8699: result: no" >&5
8700 echo "${ECHO_T}no" >&6
8703 cf_library_path_list=""
8704 if test -n "${LDFLAGS}${LIBS}" ; then
8705 for cf_library_path in $LDFLAGS $LIBS
8707 case $cf_library_path in
8709 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8711 test "x$cf_library_path" != "xNONE" && \
8712 test -d "$cf_library_path" && \
8714 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8715 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8716 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8717 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8718 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8719 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"
8722 cf_library_path_list="$cf_library_path_list $cf_search"
8730 test "x$prefix" != "xNONE" && \
8731 test -d "$prefix" && \
8733 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8734 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8735 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8736 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8737 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8738 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8741 for cf_subdir_prefix in \
8750 test "x$cf_subdir_prefix" != "x$prefix" && \
8751 test -d "$cf_subdir_prefix" && \
8752 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8753 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8754 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8755 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8756 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8757 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8758 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"
8763 cf_search="$cf_library_path_list $cf_search"
8765 for cf_libdir in $cf_search
8767 echo "$as_me:8767: checking for -l$cf_nculib_root in $cf_libdir" >&5
8768 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8769 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8770 cat >conftest.$ac_ext <<_ACEOF
8771 #line 8771 "configure"
8772 #include "confdefs.h"
8773 #include <${cf_cv_ncurses_header:-curses.h}>
8782 rm -f conftest.$ac_objext conftest$ac_exeext
8783 if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
8784 (eval $ac_link) 2>&5
8786 echo "$as_me:8786: \$? = $ac_status" >&5
8787 (exit $ac_status); } &&
8788 { ac_try='test -s conftest$ac_exeext'
8789 { (eval echo "$as_me:8789: \"$ac_try\"") >&5
8792 echo "$as_me:8792: \$? = $ac_status" >&5
8793 (exit $ac_status); }; }; then
8794 echo "$as_me:8794: result: yes" >&5
8795 echo "${ECHO_T}yes" >&6
8796 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8799 echo "$as_me: failed program was:" >&5
8800 cat conftest.$ac_ext >&5
8801 echo "$as_me:8801: result: no" >&5
8802 echo "${ECHO_T}no" >&6
8803 LIBS="$cf_save_LIBS"
8805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8813 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8815 if test $cf_found_library = no ; then
8816 { { echo "$as_me:8816: error: Cannot link $cf_nculib_root library" >&5
8817 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8818 { (exit 1); exit 1; }; }
8823 if test -n "$cf_ncurses_LIBS" ; then
8824 echo "$as_me:8824: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8825 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8826 cf_ncurses_SAVE="$LIBS"
8827 for p in $cf_ncurses_LIBS ; do
8828 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8829 if test "$q" != "$LIBS" ; then
8833 cat >conftest.$ac_ext <<_ACEOF
8834 #line 8834 "configure"
8835 #include "confdefs.h"
8836 #include <${cf_cv_ncurses_header:-curses.h}>
8840 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8845 rm -f conftest.$ac_objext conftest$ac_exeext
8846 if { (eval echo "$as_me:8846: \"$ac_link\"") >&5
8847 (eval $ac_link) 2>&5
8849 echo "$as_me:8849: \$? = $ac_status" >&5
8850 (exit $ac_status); } &&
8851 { ac_try='test -s conftest$ac_exeext'
8852 { (eval echo "$as_me:8852: \"$ac_try\"") >&5
8855 echo "$as_me:8855: \$? = $ac_status" >&5
8856 (exit $ac_status); }; }; then
8857 echo "$as_me:8857: result: yes" >&5
8858 echo "${ECHO_T}yes" >&6
8860 echo "$as_me: failed program was:" >&5
8861 cat conftest.$ac_ext >&5
8862 echo "$as_me:8862: result: no" >&5
8863 echo "${ECHO_T}no" >&6
8864 LIBS="$cf_ncurses_SAVE"
8866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8869 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8871 cat >>confdefs.h <<EOF
8872 #define $cf_nculib_ROOT 1
8882 if test "$NCURSES_CONFIG_PKG" != none ; then
8883 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
8885 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8886 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8887 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8889 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
8890 if test -z "$cf_cv_abi_version"
8892 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
8895 elif test "$NCURSES_CONFIG" != none ; then
8897 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
8899 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
8900 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
8901 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
8903 # ABI version is not available from headers
8904 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
8908 for cf_name in MAJOR MINOR PATCH
8910 cat >conftest.$ac_ext <<CF_EOF
8911 #include <${cf_cv_ncurses_header:-curses.h}>
8912 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
8914 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
8915 { (eval echo "$as_me:8915: \"$cf_try\"") >&5
8918 echo "$as_me:8918: \$? = $ac_status" >&5
8919 (exit $ac_status); }
8920 if test -f conftest.out ; then
8921 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
8922 eval NCURSES_$cf_name=\"$cf_result\"
8923 # cat conftest.$ac_ext
8928 cf_cv_abi_version=${NCURSES_MAJOR}
8932 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
8934 cf_cv_timestamp=`date`
8936 echo "$as_me:8936: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
8937 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
8939 echo "$as_me:8939: checking if you want to have a library-prefix" >&5
8940 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
8942 # Check whether --with-lib-prefix or --without-lib-prefix was given.
8943 if test "${with_lib_prefix+set}" = set; then
8944 withval="$with_lib_prefix"
8945 with_lib_prefix=$withval
8947 with_lib_prefix=auto
8949 echo "$as_me:8949: result: $with_lib_prefix" >&5
8950 echo "${ECHO_T}$with_lib_prefix" >&6
8952 if test $with_lib_prefix = auto
8955 case $cf_cv_system_name in
8957 if test "$DFT_LWR_MODEL" = libtool; then
8963 (*) LIB_PREFIX='lib'
8966 cf_prefix=$LIB_PREFIX
8968 elif test $with_lib_prefix = no
8972 LIB_PREFIX=$with_lib_prefix
8977 ###############################################################################
8979 if test X"$CC_G_OPT" = X"" ; then
8981 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
8984 echo "$as_me:8984: checking for default loader flags" >&5
8985 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
8986 case $DFT_LWR_MODEL in
8987 (normal) LD_MODEL='' ;;
8988 (debug) LD_MODEL=$CC_G_OPT ;;
8989 (profile) LD_MODEL='-pg';;
8990 (shared) LD_MODEL='' ;;
8992 echo "$as_me:8992: result: $LD_MODEL" >&5
8993 echo "${ECHO_T}$LD_MODEL" >&6
8996 echo "$as_me:8996: checking for an rpath option" >&5
8997 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
8998 case $cf_cv_system_name in
9000 if test "$GCC" = yes; then
9001 LD_RPATH_OPT="-Wl,-rpath,"
9003 LD_RPATH_OPT="-rpath "
9006 (linux*|gnu*|k*bsd*-gnu|freebsd*)
9007 LD_RPATH_OPT="-Wl,-rpath,"
9009 (openbsd[2-9].*|mirbsd*)
9010 LD_RPATH_OPT="-Wl,-rpath,"
9013 LD_RPATH_OPT="-rpath "
9016 LD_RPATH_OPT="-Wl,-rpath,"
9019 LD_RPATH_OPT="-rpath "
9027 echo "$as_me:9027: result: $LD_RPATH_OPT" >&5
9028 echo "${ECHO_T}$LD_RPATH_OPT" >&6
9030 case "x$LD_RPATH_OPT" in
9032 echo "$as_me:9032: checking if we need a space after rpath option" >&5
9033 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9034 cf_save_LIBS="$LIBS"
9036 cf_add_libs="${LD_RPATH_OPT}$libdir"
9037 # Filter out duplicates - this happens with badly-designed ".pc" files...
9038 for cf_add_1lib in $LIBS
9040 for cf_add_2lib in $cf_add_libs
9042 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9048 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9052 cat >conftest.$ac_ext <<_ACEOF
9053 #line 9053 "configure"
9054 #include "confdefs.h"
9064 rm -f conftest.$ac_objext conftest$ac_exeext
9065 if { (eval echo "$as_me:9065: \"$ac_link\"") >&5
9066 (eval $ac_link) 2>&5
9068 echo "$as_me:9068: \$? = $ac_status" >&5
9069 (exit $ac_status); } &&
9070 { ac_try='test -s conftest$ac_exeext'
9071 { (eval echo "$as_me:9071: \"$ac_try\"") >&5
9074 echo "$as_me:9074: \$? = $ac_status" >&5
9075 (exit $ac_status); }; }; then
9078 echo "$as_me: failed program was:" >&5
9079 cat conftest.$ac_ext >&5
9082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9083 LIBS="$cf_save_LIBS"
9084 echo "$as_me:9084: result: $cf_rpath_space" >&5
9085 echo "${ECHO_T}$cf_rpath_space" >&6
9086 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9094 INSTALL_LIB="-m 644"
9095 : ${rel_builddir:=.}
9101 cf_cv_do_symlinks=no
9103 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9105 echo "$as_me:9105: checking if release/abi version should be used for shared libs" >&5
9106 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9108 # Check whether --with-shlib-version or --without-shlib-version was given.
9109 if test "${with_shlib_version+set}" = set; then
9110 withval="$with_shlib_version"
9111 test -z "$withval" && withval=auto
9114 cf_cv_shlib_version=auto
9117 cf_cv_shlib_version=$withval
9120 echo "$as_me:9120: result: $withval" >&5
9121 echo "${ECHO_T}$withval" >&6
9122 { { echo "$as_me:9122: error: option value must be one of: rel, abi, or auto" >&5
9123 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
9124 { (exit 1); exit 1; }; }
9129 cf_cv_shlib_version=auto
9131 echo "$as_me:9131: result: $cf_cv_shlib_version" >&5
9132 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9137 # Some less-capable ports of gcc support only -fpic
9139 if test "$GCC" = yes
9141 echo "$as_me:9141: checking which $CC option to use" >&5
9142 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9143 cf_save_CFLAGS="$CFLAGS"
9144 for CC_SHARED_OPTS in -fPIC -fpic ''
9146 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9147 cat >conftest.$ac_ext <<_ACEOF
9148 #line 9148 "configure"
9149 #include "confdefs.h"
9159 rm -f conftest.$ac_objext
9160 if { (eval echo "$as_me:9160: \"$ac_compile\"") >&5
9161 (eval $ac_compile) 2>&5
9163 echo "$as_me:9163: \$? = $ac_status" >&5
9164 (exit $ac_status); } &&
9165 { ac_try='test -s conftest.$ac_objext'
9166 { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit $ac_status); }; }; then
9173 echo "$as_me: failed program was:" >&5
9174 cat conftest.$ac_ext >&5
9176 rm -f conftest.$ac_objext conftest.$ac_ext
9178 echo "$as_me:9178: result: $CC_SHARED_OPTS" >&5
9179 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9180 CFLAGS="$cf_save_CFLAGS"
9183 cf_cv_shlib_version_infix=no
9185 case $cf_cv_system_name in
9186 (aix4.3-9*|aix[5-7]*)
9187 if test "$GCC" = yes; then
9188 CC_SHARED_OPTS='-Wl,-brtl'
9189 MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9191 CC_SHARED_OPTS='-brtl'
9192 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9193 MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9197 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9201 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9202 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9203 cf_cv_shlib_version=cygdll
9204 cf_cv_shlib_version_infix=cygdll
9207 cat >mk_shared_lib.sh <<-CF_EOF
9210 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9213 Linking shared library
9214 ** SHARED_LIB \$SHARED_LIB
9215 ** IMPORT_LIB \$IMPORT_LIB
9217 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9219 chmod +x mk_shared_lib.sh
9223 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9224 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9225 cf_cv_shlib_version=msysdll
9226 cf_cv_shlib_version_infix=msysdll
9229 cat >mk_shared_lib.sh <<-CF_EOF
9232 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9235 Linking shared library
9236 ** SHARED_LIB \$SHARED_LIB
9237 ** IMPORT_LIB \$IMPORT_LIB
9239 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9241 chmod +x mk_shared_lib.sh
9244 cf_try_cflags="no-cpp-precomp"
9245 CC_SHARED_OPTS="-dynamic"
9246 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9247 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9248 cf_cv_shlib_version_infix=yes
9249 echo "$as_me:9249: checking if ld -search_paths_first works" >&5
9250 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9251 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9252 echo $ECHO_N "(cached) $ECHO_C" >&6
9255 cf_save_LDFLAGS=$LDFLAGS
9256 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9257 cat >conftest.$ac_ext <<_ACEOF
9258 #line 9258 "configure"
9259 #include "confdefs.h"
9269 rm -f conftest.$ac_objext conftest$ac_exeext
9270 if { (eval echo "$as_me:9270: \"$ac_link\"") >&5
9271 (eval $ac_link) 2>&5
9273 echo "$as_me:9273: \$? = $ac_status" >&5
9274 (exit $ac_status); } &&
9275 { ac_try='test -s conftest$ac_exeext'
9276 { (eval echo "$as_me:9276: \"$ac_try\"") >&5
9279 echo "$as_me:9279: \$? = $ac_status" >&5
9280 (exit $ac_status); }; }; then
9281 cf_cv_ldflags_search_paths_first=yes
9283 echo "$as_me: failed program was:" >&5
9284 cat conftest.$ac_ext >&5
9285 cf_cv_ldflags_search_paths_first=no
9287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9288 LDFLAGS=$cf_save_LDFLAGS
9290 echo "$as_me:9290: result: $cf_cv_ldflags_search_paths_first" >&5
9291 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9292 if test $cf_cv_ldflags_search_paths_first = yes; then
9293 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9297 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9298 if test "$GCC" != yes; then
9301 MK_SHARED_LIB='${LD} -b -o $@'
9302 INSTALL_LIB="-m 555"
9305 # (tested with gcc 2.7.2 -- I don't have c89)
9306 if test "$GCC" = yes; then
9307 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9310 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9312 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
9313 # HP-UX shared libraries must be executable, and should be
9314 # readonly to exploit a quirk in the memory manager.
9315 INSTALL_LIB="-m 555"
9318 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9319 if test "$cf_cv_shlib_version" = rel; then
9320 cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
9322 cf_shared_soname='`basename `'
9325 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
9328 if test "$cf_cv_enable_rpath" = yes ; then
9329 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9331 # tested with IRIX 5.2 and 'cc'.
9332 if test "$GCC" != yes; then
9333 CC_SHARED_OPTS='-KPIC'
9334 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
9336 MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
9338 cf_cv_rm_so_locs=yes
9340 (linux*|gnu*|k*bsd*-gnu)
9341 if test "$DFT_LWR_MODEL" = "shared" ; then
9342 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9343 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9345 if test "$cf_cv_enable_rpath" = yes ; then
9346 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9349 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9350 if test "$cf_cv_shlib_version" = rel; then
9351 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9353 cf_cv_shared_soname='`basename $@`'
9356 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9359 cf_cv_shlib_version=mingw
9360 cf_cv_shlib_version_infix=mingw
9363 if test "$DFT_LWR_MODEL" = "shared" ; then
9364 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9365 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9366 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9369 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9370 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9371 cat >mk_shared_lib.sh <<-CF_EOF
9374 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9377 Linking shared library
9378 ** SHARED_LIB \$SHARED_LIB
9379 ** IMPORT_LIB \$IMPORT_LIB
9381 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9383 chmod +x mk_shared_lib.sh
9385 (openbsd[2-9].*|mirbsd*)
9386 if test "$DFT_LWR_MODEL" = "shared" ; then
9387 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9388 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9390 if test "$cf_cv_enable_rpath" = yes ; then
9391 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9393 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9395 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9396 if test "$cf_cv_shlib_version" = rel; then
9397 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9399 cf_cv_shared_soname='`basename $@`'
9402 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9404 (nto-qnx*|openbsd*|freebsd[12].*)
9405 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9406 MK_SHARED_LIB='${LD} -Bshareable -o $@'
9407 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9409 (dragonfly*|freebsd*)
9410 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9411 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9412 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9413 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9414 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9417 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9418 if test "$cf_cv_shlib_version" = rel; then
9419 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9421 cf_cv_shared_soname='`basename $@`'
9424 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9427 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9428 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9429 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9430 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9431 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9432 if test "$cf_cv_shlib_version" = auto; then
9433 if test -f /usr/libexec/ld.elf_so; then
9434 cf_cv_shlib_version=abi
9436 cf_cv_shlib_version=rel
9440 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9441 if test "$cf_cv_shlib_version" = rel; then
9442 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9444 cf_cv_shared_soname='`basename $@`'
9447 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9449 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
9453 # tested with OSF/1 V3.2 and 'cc'
9454 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9455 # link with shared libs).
9456 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9459 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9462 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9463 if test "$DFT_LWR_MODEL" = "shared" ; then
9464 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9465 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9467 cf_cv_rm_so_locs=yes
9469 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9470 # tested with osr5.0.5
9471 if test "$GCC" != yes; then
9472 CC_SHARED_OPTS='-belf -KPIC'
9474 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9475 if test "$cf_cv_enable_rpath" = yes ; then
9476 # only way is to set LD_RUN_PATH but no switch for it
9479 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9480 LINK_PROGS='LD_RUN_PATH=${libdir}'
9481 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9484 # tested with SunOS 4.1.1 and gcc 2.7.0
9485 if test "$GCC" != yes; then
9486 CC_SHARED_OPTS='-KPIC'
9488 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
9489 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9492 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9493 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9494 if test "$DFT_LWR_MODEL" = "shared" ; then
9495 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9496 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9498 if test "$cf_cv_enable_rpath" = yes ; then
9499 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9502 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9503 if test "$cf_cv_shlib_version" = rel; then
9504 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9506 cf_cv_shared_soname='`basename $@`'
9509 if test "$GCC" != yes; then
9510 cf_save_CFLAGS="$CFLAGS"
9511 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9513 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9514 cat >conftest.$ac_ext <<_ACEOF
9515 #line 9515 "configure"
9516 #include "confdefs.h"
9526 rm -f conftest.$ac_objext
9527 if { (eval echo "$as_me:9527: \"$ac_compile\"") >&5
9528 (eval $ac_compile) 2>&5
9530 echo "$as_me:9530: \$? = $ac_status" >&5
9531 (exit $ac_status); } &&
9532 { ac_try='test -s conftest.$ac_objext'
9533 { (eval echo "$as_me:9533: \"$ac_try\"") >&5
9536 echo "$as_me:9536: \$? = $ac_status" >&5
9537 (exit $ac_status); }; }; then
9540 echo "$as_me: failed program was:" >&5
9541 cat conftest.$ac_ext >&5
9543 rm -f conftest.$ac_objext conftest.$ac_ext
9545 CFLAGS="$cf_save_CFLAGS"
9546 CC_SHARED_OPTS=$cf_shared_opts
9547 MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
9549 MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9552 (sysv5uw7*|unix_sv*)
9553 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9554 if test "$GCC" != yes; then
9555 CC_SHARED_OPTS='-KPIC'
9557 MK_SHARED_LIB='${LD} -d y -G -o $@'
9560 CC_SHARED_OPTS='unknown'
9561 MK_SHARED_LIB='echo unknown'
9565 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9566 case "$cf_cv_shlib_version" in
9568 case "$MK_SHARED_LIB" in
9570 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9573 { echo "$as_me:9573: WARNING: ignored --with-shlib-version" >&5
9574 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9580 if test -n "$cf_try_cflags"
9582 cat > conftest.$ac_ext <<EOF
9583 #line 9583 "${as_me:-configure}"
9585 int main(int argc, char *argv[])
9588 return (argv[argc-1] == 0) ;
9591 cf_save_CFLAGS="$CFLAGS"
9592 for cf_opt in $cf_try_cflags
9594 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9595 echo "$as_me:9595: checking if CFLAGS option -$cf_opt works" >&5
9596 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9597 if { (eval echo "$as_me:9597: \"$ac_compile\"") >&5
9598 (eval $ac_compile) 2>&5
9600 echo "$as_me:9600: \$? = $ac_status" >&5
9601 (exit $ac_status); }; then
9602 echo "$as_me:9602: result: yes" >&5
9603 echo "${ECHO_T}yes" >&6
9604 cf_save_CFLAGS="$CFLAGS"
9606 echo "$as_me:9606: result: no" >&5
9607 echo "${ECHO_T}no" >&6
9610 CFLAGS="$cf_save_CFLAGS"
9613 # RPATH_LIST is a colon-separated list of directories
9614 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9615 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9617 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9619 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9621 echo "${as_me:-configure}:9621: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9623 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9625 echo "${as_me:-configure}:9625: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9627 # The test/sample programs in the original tree link using rpath option.
9628 # Make it optional for packagers.
9629 if test -n "$LOCAL_LDFLAGS"
9631 echo "$as_me:9631: checking if you want to link sample programs with rpath option" >&5
9632 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9634 # Check whether --enable-rpath-link or --disable-rpath-link was given.
9635 if test "${enable_rpath_link+set}" = set; then
9636 enableval="$enable_rpath_link"
9637 with_rpath_link=$enableval
9641 echo "$as_me:9641: result: $with_rpath_link" >&5
9642 echo "${ECHO_T}$with_rpath_link" >&6
9643 if test "$with_rpath_link" = no
9650 ###############################################################################
9652 ### use option --enable-broken-linker to force on use of broken-linker support
9653 echo "$as_me:9653: checking if you want broken-linker support code" >&5
9654 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9656 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9657 if test "${enable_broken_linker+set}" = set; then
9658 enableval="$enable_broken_linker"
9659 with_broken_linker=$enableval
9661 with_broken_linker=${BROKEN_LINKER:-no}
9663 echo "$as_me:9663: result: $with_broken_linker" >&5
9664 echo "${ECHO_T}$with_broken_linker" >&6
9667 if test "$with_broken_linker" = yes ; then
9668 cat >>confdefs.h <<\EOF
9669 #define BROKEN_LINKER 1
9673 elif test "$DFT_LWR_MODEL" = shared ; then
9674 case $cf_cv_system_name in
9676 cat >>confdefs.h <<\EOF
9677 #define BROKEN_LINKER 1
9681 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9683 echo "${as_me:-configure}:9683: testing cygwin linker is broken anyway ..." 1>&5
9689 # Check to define _XOPEN_SOURCE "automatically"
9692 cf_POSIX_C_SOURCE=199506L
9697 cf_xopen_source="-D_ALL_SOURCE"
9703 cf_xopen_source="-D_APPLE_C_SOURCE"
9706 cf_xopen_source="-D_DARWIN_C_SOURCE"
9709 (freebsd*|dragonfly*)
9710 # 5.x headers associate
9711 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9712 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9713 cf_POSIX_C_SOURCE=200112L
9715 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9718 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9721 cf_xopen_source="-D_HPUX_SOURCE"
9724 cf_xopen_source="-D_SGI_SOURCE"
9727 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9729 echo "$as_me:9729: checking if we must define _GNU_SOURCE" >&5
9730 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9731 if test "${cf_cv_gnu_source+set}" = set; then
9732 echo $ECHO_N "(cached) $ECHO_C" >&6
9735 cat >conftest.$ac_ext <<_ACEOF
9736 #line 9736 "configure"
9737 #include "confdefs.h"
9738 #include <sys/types.h>
9743 #ifndef _XOPEN_SOURCE
9750 rm -f conftest.$ac_objext
9751 if { (eval echo "$as_me:9751: \"$ac_compile\"") >&5
9752 (eval $ac_compile) 2>&5
9754 echo "$as_me:9754: \$? = $ac_status" >&5
9755 (exit $ac_status); } &&
9756 { ac_try='test -s conftest.$ac_objext'
9757 { (eval echo "$as_me:9757: \"$ac_try\"") >&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit $ac_status); }; }; then
9764 echo "$as_me: failed program was:" >&5
9765 cat conftest.$ac_ext >&5
9767 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9768 cat >conftest.$ac_ext <<_ACEOF
9769 #line 9769 "configure"
9770 #include "confdefs.h"
9771 #include <sys/types.h>
9776 #ifdef _XOPEN_SOURCE
9783 rm -f conftest.$ac_objext
9784 if { (eval echo "$as_me:9784: \"$ac_compile\"") >&5
9785 (eval $ac_compile) 2>&5
9787 echo "$as_me:9787: \$? = $ac_status" >&5
9788 (exit $ac_status); } &&
9789 { ac_try='test -s conftest.$ac_objext'
9790 { (eval echo "$as_me:9790: \"$ac_try\"") >&5
9793 echo "$as_me:9793: \$? = $ac_status" >&5
9794 (exit $ac_status); }; }; then
9797 echo "$as_me: failed program was:" >&5
9798 cat conftest.$ac_ext >&5
9799 cf_cv_gnu_source=yes
9801 rm -f conftest.$ac_objext conftest.$ac_ext
9805 rm -f conftest.$ac_objext conftest.$ac_ext
9808 echo "$as_me:9808: result: $cf_cv_gnu_source" >&5
9809 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9811 if test "$cf_cv_gnu_source" = yes
9813 echo "$as_me:9813: checking if we should also define _DEFAULT_SOURCE" >&5
9814 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9815 if test "${cf_cv_default_source+set}" = set; then
9816 echo $ECHO_N "(cached) $ECHO_C" >&6
9819 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
9820 cat >conftest.$ac_ext <<_ACEOF
9821 #line 9821 "configure"
9822 #include "confdefs.h"
9823 #include <sys/types.h>
9828 #ifdef _DEFAULT_SOURCE
9835 rm -f conftest.$ac_objext
9836 if { (eval echo "$as_me:9836: \"$ac_compile\"") >&5
9837 (eval $ac_compile) 2>&5
9839 echo "$as_me:9839: \$? = $ac_status" >&5
9840 (exit $ac_status); } &&
9841 { ac_try='test -s conftest.$ac_objext'
9842 { (eval echo "$as_me:9842: \"$ac_try\"") >&5
9845 echo "$as_me:9845: \$? = $ac_status" >&5
9846 (exit $ac_status); }; }; then
9847 cf_cv_default_source=no
9849 echo "$as_me: failed program was:" >&5
9850 cat conftest.$ac_ext >&5
9851 cf_cv_default_source=yes
9853 rm -f conftest.$ac_objext conftest.$ac_ext
9856 echo "$as_me:9856: result: $cf_cv_default_source" >&5
9857 echo "${ECHO_T}$cf_cv_default_source" >&6
9858 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
9863 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9866 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9869 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9871 cf_save_CFLAGS="$CFLAGS"
9872 cf_save_CPPFLAGS="$CPPFLAGS"
9874 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9875 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9876 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9878 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9879 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
9880 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
9882 echo "$as_me:9882: checking if we should define _POSIX_C_SOURCE" >&5
9883 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9884 if test "${cf_cv_posix_c_source+set}" = set; then
9885 echo $ECHO_N "(cached) $ECHO_C" >&6
9888 echo "${as_me:-configure}:9888: testing if the symbol is already defined go no further ..." 1>&5
9890 cat >conftest.$ac_ext <<_ACEOF
9891 #line 9891 "configure"
9892 #include "confdefs.h"
9893 #include <sys/types.h>
9898 #ifndef _POSIX_C_SOURCE
9905 rm -f conftest.$ac_objext
9906 if { (eval echo "$as_me:9906: \"$ac_compile\"") >&5
9907 (eval $ac_compile) 2>&5
9909 echo "$as_me:9909: \$? = $ac_status" >&5
9910 (exit $ac_status); } &&
9911 { ac_try='test -s conftest.$ac_objext'
9912 { (eval echo "$as_me:9912: \"$ac_try\"") >&5
9915 echo "$as_me:9915: \$? = $ac_status" >&5
9916 (exit $ac_status); }; }; then
9917 cf_cv_posix_c_source=no
9919 echo "$as_me: failed program was:" >&5
9920 cat conftest.$ac_ext >&5
9921 cf_want_posix_source=no
9922 case .$cf_POSIX_C_SOURCE in
9924 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9927 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9928 cf_want_posix_source=yes
9931 cf_want_posix_source=yes
9934 if test "$cf_want_posix_source" = yes ; then
9935 cat >conftest.$ac_ext <<_ACEOF
9936 #line 9936 "configure"
9937 #include "confdefs.h"
9938 #include <sys/types.h>
9943 #ifdef _POSIX_SOURCE
9950 rm -f conftest.$ac_objext
9951 if { (eval echo "$as_me:9951: \"$ac_compile\"") >&5
9952 (eval $ac_compile) 2>&5
9954 echo "$as_me:9954: \$? = $ac_status" >&5
9955 (exit $ac_status); } &&
9956 { ac_try='test -s conftest.$ac_objext'
9957 { (eval echo "$as_me:9957: \"$ac_try\"") >&5
9960 echo "$as_me:9960: \$? = $ac_status" >&5
9961 (exit $ac_status); }; }; then
9964 echo "$as_me: failed program was:" >&5
9965 cat conftest.$ac_ext >&5
9966 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9968 rm -f conftest.$ac_objext conftest.$ac_ext
9971 echo "${as_me:-configure}:9971: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9973 CFLAGS="$cf_trim_CFLAGS"
9974 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9976 echo "${as_me:-configure}:9976: testing if the second compile does not leave our definition intact error ..." 1>&5
9978 cat >conftest.$ac_ext <<_ACEOF
9979 #line 9979 "configure"
9980 #include "confdefs.h"
9981 #include <sys/types.h>
9986 #ifndef _POSIX_C_SOURCE
9993 rm -f conftest.$ac_objext
9994 if { (eval echo "$as_me:9994: \"$ac_compile\"") >&5
9995 (eval $ac_compile) 2>&5
9997 echo "$as_me:9997: \$? = $ac_status" >&5
9998 (exit $ac_status); } &&
9999 { ac_try='test -s conftest.$ac_objext'
10000 { (eval echo "$as_me:10000: \"$ac_try\"") >&5
10001 (eval $ac_try) 2>&5
10003 echo "$as_me:10003: \$? = $ac_status" >&5
10004 (exit $ac_status); }; }; then
10007 echo "$as_me: failed program was:" >&5
10008 cat conftest.$ac_ext >&5
10009 cf_cv_posix_c_source=no
10011 rm -f conftest.$ac_objext conftest.$ac_ext
10012 CFLAGS="$cf_save_CFLAGS"
10013 CPPFLAGS="$cf_save_CPPFLAGS"
10016 rm -f conftest.$ac_objext conftest.$ac_ext
10019 echo "$as_me:10019: result: $cf_cv_posix_c_source" >&5
10020 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10022 if test "$cf_cv_posix_c_source" != no ; then
10023 CFLAGS="$cf_trim_CFLAGS"
10024 CPPFLAGS="$cf_trim_CPPFLAGS"
10029 cf_new_extra_cppflags=
10031 for cf_add_cflags in $cf_cv_posix_c_source
10033 case $cf_fix_cppflags in
10035 case $cf_add_cflags in
10036 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10037 case $cf_add_cflags in
10039 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10041 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10042 && test -z "${cf_tst_cflags}" \
10043 && cf_fix_cppflags=yes
10045 if test $cf_fix_cppflags = yes ; then
10046 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10048 elif test "${cf_tst_cflags}" = "\"'" ; then
10049 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10054 case "$CPPFLAGS" in
10058 case $cf_add_cflags in
10060 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10062 CPPFLAGS=`echo "$CPPFLAGS" | \
10063 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10064 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10068 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10073 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10078 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10080 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10082 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10083 && test -z "${cf_tst_cflags}" \
10084 && cf_fix_cppflags=no
10089 if test -n "$cf_new_cflags" ; then
10091 CFLAGS="$CFLAGS $cf_new_cflags"
10094 if test -n "$cf_new_cppflags" ; then
10096 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10099 if test -n "$cf_new_extra_cppflags" ; then
10101 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10108 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10111 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10112 cf_xopen_source="-D_BSD_SOURCE"
10113 cf_XOPEN_SOURCE=600
10116 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10119 cf_xopen_source="-D_OSF_SOURCE"
10122 cf_xopen_source="-D_QNX_SOURCE"
10125 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10128 cf_xopen_source="-D__EXTENSIONS__"
10129 cf_cv_xopen_source=broken
10131 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10137 echo "$as_me:10137: checking if we should define _XOPEN_SOURCE" >&5
10138 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10139 if test "${cf_cv_xopen_source+set}" = set; then
10140 echo $ECHO_N "(cached) $ECHO_C" >&6
10143 cat >conftest.$ac_ext <<_ACEOF
10144 #line 10144 "configure"
10145 #include "confdefs.h"
10147 #include <stdlib.h>
10148 #include <string.h>
10149 #include <sys/types.h>
10155 #ifndef _XOPEN_SOURCE
10162 rm -f conftest.$ac_objext
10163 if { (eval echo "$as_me:10163: \"$ac_compile\"") >&5
10164 (eval $ac_compile) 2>&5
10166 echo "$as_me:10166: \$? = $ac_status" >&5
10167 (exit $ac_status); } &&
10168 { ac_try='test -s conftest.$ac_objext'
10169 { (eval echo "$as_me:10169: \"$ac_try\"") >&5
10170 (eval $ac_try) 2>&5
10172 echo "$as_me:10172: \$? = $ac_status" >&5
10173 (exit $ac_status); }; }; then
10174 cf_cv_xopen_source=no
10176 echo "$as_me: failed program was:" >&5
10177 cat conftest.$ac_ext >&5
10178 cf_save="$CPPFLAGS"
10179 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10180 cat >conftest.$ac_ext <<_ACEOF
10181 #line 10181 "configure"
10182 #include "confdefs.h"
10184 #include <stdlib.h>
10185 #include <string.h>
10186 #include <sys/types.h>
10192 #ifdef _XOPEN_SOURCE
10199 rm -f conftest.$ac_objext
10200 if { (eval echo "$as_me:10200: \"$ac_compile\"") >&5
10201 (eval $ac_compile) 2>&5
10203 echo "$as_me:10203: \$? = $ac_status" >&5
10204 (exit $ac_status); } &&
10205 { ac_try='test -s conftest.$ac_objext'
10206 { (eval echo "$as_me:10206: \"$ac_try\"") >&5
10207 (eval $ac_try) 2>&5
10209 echo "$as_me:10209: \$? = $ac_status" >&5
10210 (exit $ac_status); }; }; then
10211 cf_cv_xopen_source=no
10213 echo "$as_me: failed program was:" >&5
10214 cat conftest.$ac_ext >&5
10215 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10217 rm -f conftest.$ac_objext conftest.$ac_ext
10218 CPPFLAGS="$cf_save"
10221 rm -f conftest.$ac_objext conftest.$ac_ext
10224 echo "$as_me:10224: result: $cf_cv_xopen_source" >&5
10225 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10227 if test "$cf_cv_xopen_source" != no ; then
10229 CFLAGS=`echo "$CFLAGS" | \
10230 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10231 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10233 CPPFLAGS=`echo "$CPPFLAGS" | \
10234 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10235 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10237 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10242 cf_new_extra_cppflags=
10244 for cf_add_cflags in $cf_temp_xopen_source
10246 case $cf_fix_cppflags in
10248 case $cf_add_cflags in
10249 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10250 case $cf_add_cflags in
10252 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10255 && test -z "${cf_tst_cflags}" \
10256 && cf_fix_cppflags=yes
10258 if test $cf_fix_cppflags = yes ; then
10259 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10261 elif test "${cf_tst_cflags}" = "\"'" ; then
10262 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10267 case "$CPPFLAGS" in
10271 case $cf_add_cflags in
10273 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10275 CPPFLAGS=`echo "$CPPFLAGS" | \
10276 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10277 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10281 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10286 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10291 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10293 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10295 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10296 && test -z "${cf_tst_cflags}" \
10297 && cf_fix_cppflags=no
10302 if test -n "$cf_new_cflags" ; then
10304 CFLAGS="$CFLAGS $cf_new_cflags"
10307 if test -n "$cf_new_cppflags" ; then
10309 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10312 if test -n "$cf_new_extra_cppflags" ; then
10314 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10319 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10321 cf_save_CFLAGS="$CFLAGS"
10322 cf_save_CPPFLAGS="$CPPFLAGS"
10324 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10325 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10326 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10328 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10329 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10330 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10332 echo "$as_me:10332: checking if we should define _POSIX_C_SOURCE" >&5
10333 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10334 if test "${cf_cv_posix_c_source+set}" = set; then
10335 echo $ECHO_N "(cached) $ECHO_C" >&6
10338 echo "${as_me:-configure}:10338: testing if the symbol is already defined go no further ..." 1>&5
10340 cat >conftest.$ac_ext <<_ACEOF
10341 #line 10341 "configure"
10342 #include "confdefs.h"
10343 #include <sys/types.h>
10348 #ifndef _POSIX_C_SOURCE
10355 rm -f conftest.$ac_objext
10356 if { (eval echo "$as_me:10356: \"$ac_compile\"") >&5
10357 (eval $ac_compile) 2>&5
10359 echo "$as_me:10359: \$? = $ac_status" >&5
10360 (exit $ac_status); } &&
10361 { ac_try='test -s conftest.$ac_objext'
10362 { (eval echo "$as_me:10362: \"$ac_try\"") >&5
10363 (eval $ac_try) 2>&5
10365 echo "$as_me:10365: \$? = $ac_status" >&5
10366 (exit $ac_status); }; }; then
10367 cf_cv_posix_c_source=no
10369 echo "$as_me: failed program was:" >&5
10370 cat conftest.$ac_ext >&5
10371 cf_want_posix_source=no
10372 case .$cf_POSIX_C_SOURCE in
10374 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10377 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10378 cf_want_posix_source=yes
10381 cf_want_posix_source=yes
10384 if test "$cf_want_posix_source" = yes ; then
10385 cat >conftest.$ac_ext <<_ACEOF
10386 #line 10386 "configure"
10387 #include "confdefs.h"
10388 #include <sys/types.h>
10393 #ifdef _POSIX_SOURCE
10400 rm -f conftest.$ac_objext
10401 if { (eval echo "$as_me:10401: \"$ac_compile\"") >&5
10402 (eval $ac_compile) 2>&5
10404 echo "$as_me:10404: \$? = $ac_status" >&5
10405 (exit $ac_status); } &&
10406 { ac_try='test -s conftest.$ac_objext'
10407 { (eval echo "$as_me:10407: \"$ac_try\"") >&5
10408 (eval $ac_try) 2>&5
10410 echo "$as_me:10410: \$? = $ac_status" >&5
10411 (exit $ac_status); }; }; then
10414 echo "$as_me: failed program was:" >&5
10415 cat conftest.$ac_ext >&5
10416 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10418 rm -f conftest.$ac_objext conftest.$ac_ext
10421 echo "${as_me:-configure}:10421: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10423 CFLAGS="$cf_trim_CFLAGS"
10424 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10426 echo "${as_me:-configure}:10426: testing if the second compile does not leave our definition intact error ..." 1>&5
10428 cat >conftest.$ac_ext <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431 #include <sys/types.h>
10436 #ifndef _POSIX_C_SOURCE
10443 rm -f conftest.$ac_objext
10444 if { (eval echo "$as_me:10444: \"$ac_compile\"") >&5
10445 (eval $ac_compile) 2>&5
10447 echo "$as_me:10447: \$? = $ac_status" >&5
10448 (exit $ac_status); } &&
10449 { ac_try='test -s conftest.$ac_objext'
10450 { (eval echo "$as_me:10450: \"$ac_try\"") >&5
10451 (eval $ac_try) 2>&5
10453 echo "$as_me:10453: \$? = $ac_status" >&5
10454 (exit $ac_status); }; }; then
10457 echo "$as_me: failed program was:" >&5
10458 cat conftest.$ac_ext >&5
10459 cf_cv_posix_c_source=no
10461 rm -f conftest.$ac_objext conftest.$ac_ext
10462 CFLAGS="$cf_save_CFLAGS"
10463 CPPFLAGS="$cf_save_CPPFLAGS"
10466 rm -f conftest.$ac_objext conftest.$ac_ext
10469 echo "$as_me:10469: result: $cf_cv_posix_c_source" >&5
10470 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10472 if test "$cf_cv_posix_c_source" != no ; then
10473 CFLAGS="$cf_trim_CFLAGS"
10474 CPPFLAGS="$cf_trim_CPPFLAGS"
10479 cf_new_extra_cppflags=
10481 for cf_add_cflags in $cf_cv_posix_c_source
10483 case $cf_fix_cppflags in
10485 case $cf_add_cflags in
10486 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10487 case $cf_add_cflags in
10489 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10491 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10492 && test -z "${cf_tst_cflags}" \
10493 && cf_fix_cppflags=yes
10495 if test $cf_fix_cppflags = yes ; then
10496 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10498 elif test "${cf_tst_cflags}" = "\"'" ; then
10499 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10504 case "$CPPFLAGS" in
10508 case $cf_add_cflags in
10510 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10512 CPPFLAGS=`echo "$CPPFLAGS" | \
10513 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10514 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10518 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10523 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10528 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10530 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10532 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10533 && test -z "${cf_tst_cflags}" \
10534 && cf_fix_cppflags=no
10539 if test -n "$cf_new_cflags" ; then
10541 CFLAGS="$CFLAGS $cf_new_cflags"
10544 if test -n "$cf_new_cppflags" ; then
10546 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10549 if test -n "$cf_new_extra_cppflags" ; then
10551 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10559 if test -n "$cf_xopen_source" ; then
10564 cf_new_extra_cppflags=
10566 for cf_add_cflags in $cf_xopen_source
10568 case $cf_fix_cppflags in
10570 case $cf_add_cflags in
10571 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10572 case $cf_add_cflags in
10574 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10576 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10577 && test -z "${cf_tst_cflags}" \
10578 && cf_fix_cppflags=yes
10580 if test $cf_fix_cppflags = yes ; then
10581 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10583 elif test "${cf_tst_cflags}" = "\"'" ; then
10584 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10589 case "$CPPFLAGS" in
10593 case $cf_add_cflags in
10595 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10597 CPPFLAGS=`echo "$CPPFLAGS" | \
10598 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10599 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10603 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10608 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10613 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10615 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10617 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10618 && test -z "${cf_tst_cflags}" \
10619 && cf_fix_cppflags=no
10624 if test -n "$cf_new_cflags" ; then
10625 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10627 echo "${as_me:-configure}:10627: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10629 CFLAGS="$CFLAGS $cf_new_cflags"
10632 if test -n "$cf_new_cppflags" ; then
10633 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10635 echo "${as_me:-configure}:10635: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10637 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10640 if test -n "$cf_new_extra_cppflags" ; then
10641 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10643 echo "${as_me:-configure}:10643: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10645 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10650 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10651 echo "$as_me:10651: checking if _XOPEN_SOURCE really is set" >&5
10652 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10653 cat >conftest.$ac_ext <<_ACEOF
10654 #line 10654 "configure"
10655 #include "confdefs.h"
10656 #include <stdlib.h>
10661 #ifndef _XOPEN_SOURCE
10668 rm -f conftest.$ac_objext
10669 if { (eval echo "$as_me:10669: \"$ac_compile\"") >&5
10670 (eval $ac_compile) 2>&5
10672 echo "$as_me:10672: \$? = $ac_status" >&5
10673 (exit $ac_status); } &&
10674 { ac_try='test -s conftest.$ac_objext'
10675 { (eval echo "$as_me:10675: \"$ac_try\"") >&5
10676 (eval $ac_try) 2>&5
10678 echo "$as_me:10678: \$? = $ac_status" >&5
10679 (exit $ac_status); }; }; then
10680 cf_XOPEN_SOURCE_set=yes
10682 echo "$as_me: failed program was:" >&5
10683 cat conftest.$ac_ext >&5
10684 cf_XOPEN_SOURCE_set=no
10686 rm -f conftest.$ac_objext conftest.$ac_ext
10687 echo "$as_me:10687: result: $cf_XOPEN_SOURCE_set" >&5
10688 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10689 if test $cf_XOPEN_SOURCE_set = yes
10691 cat >conftest.$ac_ext <<_ACEOF
10692 #line 10692 "configure"
10693 #include "confdefs.h"
10694 #include <stdlib.h>
10699 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10706 rm -f conftest.$ac_objext
10707 if { (eval echo "$as_me:10707: \"$ac_compile\"") >&5
10708 (eval $ac_compile) 2>&5
10710 echo "$as_me:10710: \$? = $ac_status" >&5
10711 (exit $ac_status); } &&
10712 { ac_try='test -s conftest.$ac_objext'
10713 { (eval echo "$as_me:10713: \"$ac_try\"") >&5
10714 (eval $ac_try) 2>&5
10716 echo "$as_me:10716: \$? = $ac_status" >&5
10717 (exit $ac_status); }; }; then
10718 cf_XOPEN_SOURCE_set_ok=yes
10720 echo "$as_me: failed program was:" >&5
10721 cat conftest.$ac_ext >&5
10722 cf_XOPEN_SOURCE_set_ok=no
10724 rm -f conftest.$ac_objext conftest.$ac_ext
10725 if test $cf_XOPEN_SOURCE_set_ok = no
10727 { echo "$as_me:10727: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10728 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10732 echo "$as_me:10732: checking if we should define _XOPEN_SOURCE" >&5
10733 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10734 if test "${cf_cv_xopen_source+set}" = set; then
10735 echo $ECHO_N "(cached) $ECHO_C" >&6
10738 cat >conftest.$ac_ext <<_ACEOF
10739 #line 10739 "configure"
10740 #include "confdefs.h"
10742 #include <stdlib.h>
10743 #include <string.h>
10744 #include <sys/types.h>
10750 #ifndef _XOPEN_SOURCE
10757 rm -f conftest.$ac_objext
10758 if { (eval echo "$as_me:10758: \"$ac_compile\"") >&5
10759 (eval $ac_compile) 2>&5
10761 echo "$as_me:10761: \$? = $ac_status" >&5
10762 (exit $ac_status); } &&
10763 { ac_try='test -s conftest.$ac_objext'
10764 { (eval echo "$as_me:10764: \"$ac_try\"") >&5
10765 (eval $ac_try) 2>&5
10767 echo "$as_me:10767: \$? = $ac_status" >&5
10768 (exit $ac_status); }; }; then
10769 cf_cv_xopen_source=no
10771 echo "$as_me: failed program was:" >&5
10772 cat conftest.$ac_ext >&5
10773 cf_save="$CPPFLAGS"
10774 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10775 cat >conftest.$ac_ext <<_ACEOF
10776 #line 10776 "configure"
10777 #include "confdefs.h"
10779 #include <stdlib.h>
10780 #include <string.h>
10781 #include <sys/types.h>
10787 #ifdef _XOPEN_SOURCE
10794 rm -f conftest.$ac_objext
10795 if { (eval echo "$as_me:10795: \"$ac_compile\"") >&5
10796 (eval $ac_compile) 2>&5
10798 echo "$as_me:10798: \$? = $ac_status" >&5
10799 (exit $ac_status); } &&
10800 { ac_try='test -s conftest.$ac_objext'
10801 { (eval echo "$as_me:10801: \"$ac_try\"") >&5
10802 (eval $ac_try) 2>&5
10804 echo "$as_me:10804: \$? = $ac_status" >&5
10805 (exit $ac_status); }; }; then
10806 cf_cv_xopen_source=no
10808 echo "$as_me: failed program was:" >&5
10809 cat conftest.$ac_ext >&5
10810 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10812 rm -f conftest.$ac_objext conftest.$ac_ext
10813 CPPFLAGS="$cf_save"
10816 rm -f conftest.$ac_objext conftest.$ac_ext
10819 echo "$as_me:10819: result: $cf_cv_xopen_source" >&5
10820 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10822 if test "$cf_cv_xopen_source" != no ; then
10824 CFLAGS=`echo "$CFLAGS" | \
10825 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10826 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10828 CPPFLAGS=`echo "$CPPFLAGS" | \
10829 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10830 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10832 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10837 cf_new_extra_cppflags=
10839 for cf_add_cflags in $cf_temp_xopen_source
10841 case $cf_fix_cppflags in
10843 case $cf_add_cflags in
10844 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10845 case $cf_add_cflags in
10847 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10849 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10850 && test -z "${cf_tst_cflags}" \
10851 && cf_fix_cppflags=yes
10853 if test $cf_fix_cppflags = yes ; then
10854 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10856 elif test "${cf_tst_cflags}" = "\"'" ; then
10857 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10862 case "$CPPFLAGS" in
10866 case $cf_add_cflags in
10868 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10870 CPPFLAGS=`echo "$CPPFLAGS" | \
10871 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10872 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10876 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10881 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10886 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10888 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10890 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10891 && test -z "${cf_tst_cflags}" \
10892 && cf_fix_cppflags=no
10897 if test -n "$cf_new_cflags" ; then
10899 CFLAGS="$CFLAGS $cf_new_cflags"
10902 if test -n "$cf_new_cppflags" ; then
10904 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10907 if test -n "$cf_new_extra_cppflags" ; then
10909 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10917 # Check whether --enable-largefile or --disable-largefile was given.
10918 if test "${enable_largefile+set}" = set; then
10919 enableval="$enable_largefile"
10922 if test "$enable_largefile" != no; then
10924 echo "$as_me:10924: checking for special C compiler options needed for large files" >&5
10925 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10926 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10927 echo $ECHO_N "(cached) $ECHO_C" >&6
10929 ac_cv_sys_largefile_CC=no
10930 if test "$GCC" != yes; then
10933 # IRIX 6.2 and later do not support large files by default,
10934 # so use the C compiler's -n32 option if that helps.
10935 cat >conftest.$ac_ext <<_ACEOF
10936 #line 10936 "configure"
10937 #include "confdefs.h"
10938 #include <sys/types.h>
10939 /* Check that off_t can represent 2**63 - 1 correctly.
10940 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10941 since some C++ compilers masquerading as C compilers
10942 incorrectly reject 9223372036854775807. */
10943 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10944 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10945 && LARGE_OFF_T % 2147483647 == 1)
10955 rm -f conftest.$ac_objext
10956 if { (eval echo "$as_me:10956: \"$ac_compile\"") >&5
10957 (eval $ac_compile) 2>&5
10959 echo "$as_me:10959: \$? = $ac_status" >&5
10960 (exit $ac_status); } &&
10961 { ac_try='test -s conftest.$ac_objext'
10962 { (eval echo "$as_me:10962: \"$ac_try\"") >&5
10963 (eval $ac_try) 2>&5
10965 echo "$as_me:10965: \$? = $ac_status" >&5
10966 (exit $ac_status); }; }; then
10969 echo "$as_me: failed program was:" >&5
10970 cat conftest.$ac_ext >&5
10972 rm -f conftest.$ac_objext
10974 rm -f conftest.$ac_objext
10975 if { (eval echo "$as_me:10975: \"$ac_compile\"") >&5
10976 (eval $ac_compile) 2>&5
10978 echo "$as_me:10978: \$? = $ac_status" >&5
10979 (exit $ac_status); } &&
10980 { ac_try='test -s conftest.$ac_objext'
10981 { (eval echo "$as_me:10981: \"$ac_try\"") >&5
10982 (eval $ac_try) 2>&5
10984 echo "$as_me:10984: \$? = $ac_status" >&5
10985 (exit $ac_status); }; }; then
10986 ac_cv_sys_largefile_CC=' -n32'; break
10988 echo "$as_me: failed program was:" >&5
10989 cat conftest.$ac_ext >&5
10991 rm -f conftest.$ac_objext
10995 rm -f conftest.$ac_ext
10998 echo "$as_me:10998: result: $ac_cv_sys_largefile_CC" >&5
10999 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11000 if test "$ac_cv_sys_largefile_CC" != no; then
11001 CC=$CC$ac_cv_sys_largefile_CC
11004 echo "$as_me:11004: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11005 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11006 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11007 echo $ECHO_N "(cached) $ECHO_C" >&6
11010 ac_cv_sys_file_offset_bits=no
11011 cat >conftest.$ac_ext <<_ACEOF
11012 #line 11012 "configure"
11013 #include "confdefs.h"
11014 #include <sys/types.h>
11015 /* Check that off_t can represent 2**63 - 1 correctly.
11016 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11017 since some C++ compilers masquerading as C compilers
11018 incorrectly reject 9223372036854775807. */
11019 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11020 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11021 && LARGE_OFF_T % 2147483647 == 1)
11031 rm -f conftest.$ac_objext
11032 if { (eval echo "$as_me:11032: \"$ac_compile\"") >&5
11033 (eval $ac_compile) 2>&5
11035 echo "$as_me:11035: \$? = $ac_status" >&5
11036 (exit $ac_status); } &&
11037 { ac_try='test -s conftest.$ac_objext'
11038 { (eval echo "$as_me:11038: \"$ac_try\"") >&5
11039 (eval $ac_try) 2>&5
11041 echo "$as_me:11041: \$? = $ac_status" >&5
11042 (exit $ac_status); }; }; then
11045 echo "$as_me: failed program was:" >&5
11046 cat conftest.$ac_ext >&5
11048 rm -f conftest.$ac_objext conftest.$ac_ext
11049 cat >conftest.$ac_ext <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11052 #define _FILE_OFFSET_BITS 64
11053 #include <sys/types.h>
11054 /* Check that off_t can represent 2**63 - 1 correctly.
11055 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11056 since some C++ compilers masquerading as C compilers
11057 incorrectly reject 9223372036854775807. */
11058 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11059 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11060 && LARGE_OFF_T % 2147483647 == 1)
11070 rm -f conftest.$ac_objext
11071 if { (eval echo "$as_me:11071: \"$ac_compile\"") >&5
11072 (eval $ac_compile) 2>&5
11074 echo "$as_me:11074: \$? = $ac_status" >&5
11075 (exit $ac_status); } &&
11076 { ac_try='test -s conftest.$ac_objext'
11077 { (eval echo "$as_me:11077: \"$ac_try\"") >&5
11078 (eval $ac_try) 2>&5
11080 echo "$as_me:11080: \$? = $ac_status" >&5
11081 (exit $ac_status); }; }; then
11082 ac_cv_sys_file_offset_bits=64; break
11084 echo "$as_me: failed program was:" >&5
11085 cat conftest.$ac_ext >&5
11087 rm -f conftest.$ac_objext conftest.$ac_ext
11091 echo "$as_me:11091: result: $ac_cv_sys_file_offset_bits" >&5
11092 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11093 if test "$ac_cv_sys_file_offset_bits" != no; then
11095 cat >>confdefs.h <<EOF
11096 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11101 echo "$as_me:11101: checking for _LARGE_FILES value needed for large files" >&5
11102 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11103 if test "${ac_cv_sys_large_files+set}" = set; then
11104 echo $ECHO_N "(cached) $ECHO_C" >&6
11107 ac_cv_sys_large_files=no
11108 cat >conftest.$ac_ext <<_ACEOF
11109 #line 11109 "configure"
11110 #include "confdefs.h"
11111 #include <sys/types.h>
11112 /* Check that off_t can represent 2**63 - 1 correctly.
11113 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11114 since some C++ compilers masquerading as C compilers
11115 incorrectly reject 9223372036854775807. */
11116 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11117 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11118 && LARGE_OFF_T % 2147483647 == 1)
11128 rm -f conftest.$ac_objext
11129 if { (eval echo "$as_me:11129: \"$ac_compile\"") >&5
11130 (eval $ac_compile) 2>&5
11132 echo "$as_me:11132: \$? = $ac_status" >&5
11133 (exit $ac_status); } &&
11134 { ac_try='test -s conftest.$ac_objext'
11135 { (eval echo "$as_me:11135: \"$ac_try\"") >&5
11136 (eval $ac_try) 2>&5
11138 echo "$as_me:11138: \$? = $ac_status" >&5
11139 (exit $ac_status); }; }; then
11142 echo "$as_me: failed program was:" >&5
11143 cat conftest.$ac_ext >&5
11145 rm -f conftest.$ac_objext conftest.$ac_ext
11146 cat >conftest.$ac_ext <<_ACEOF
11147 #line 11147 "configure"
11148 #include "confdefs.h"
11149 #define _LARGE_FILES 1
11150 #include <sys/types.h>
11151 /* Check that off_t can represent 2**63 - 1 correctly.
11152 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11153 since some C++ compilers masquerading as C compilers
11154 incorrectly reject 9223372036854775807. */
11155 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11156 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11157 && LARGE_OFF_T % 2147483647 == 1)
11167 rm -f conftest.$ac_objext
11168 if { (eval echo "$as_me:11168: \"$ac_compile\"") >&5
11169 (eval $ac_compile) 2>&5
11171 echo "$as_me:11171: \$? = $ac_status" >&5
11172 (exit $ac_status); } &&
11173 { ac_try='test -s conftest.$ac_objext'
11174 { (eval echo "$as_me:11174: \"$ac_try\"") >&5
11175 (eval $ac_try) 2>&5
11177 echo "$as_me:11177: \$? = $ac_status" >&5
11178 (exit $ac_status); }; }; then
11179 ac_cv_sys_large_files=1; break
11181 echo "$as_me: failed program was:" >&5
11182 cat conftest.$ac_ext >&5
11184 rm -f conftest.$ac_objext conftest.$ac_ext
11188 echo "$as_me:11188: result: $ac_cv_sys_large_files" >&5
11189 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11190 if test "$ac_cv_sys_large_files" != no; then
11192 cat >>confdefs.h <<EOF
11193 #define _LARGE_FILES $ac_cv_sys_large_files
11200 if test "$enable_largefile" != no ; then
11201 echo "$as_me:11201: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11202 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11203 if test "${ac_cv_sys_largefile_source+set}" = set; then
11204 echo $ECHO_N "(cached) $ECHO_C" >&6
11207 ac_cv_sys_largefile_source=no
11208 cat >conftest.$ac_ext <<_ACEOF
11209 #line 11209 "configure"
11210 #include "confdefs.h"
11220 rm -f conftest.$ac_objext
11221 if { (eval echo "$as_me:11221: \"$ac_compile\"") >&5
11222 (eval $ac_compile) 2>&5
11224 echo "$as_me:11224: \$? = $ac_status" >&5
11225 (exit $ac_status); } &&
11226 { ac_try='test -s conftest.$ac_objext'
11227 { (eval echo "$as_me:11227: \"$ac_try\"") >&5
11228 (eval $ac_try) 2>&5
11230 echo "$as_me:11230: \$? = $ac_status" >&5
11231 (exit $ac_status); }; }; then
11234 echo "$as_me: failed program was:" >&5
11235 cat conftest.$ac_ext >&5
11237 rm -f conftest.$ac_objext conftest.$ac_ext
11238 cat >conftest.$ac_ext <<_ACEOF
11239 #line 11239 "configure"
11240 #include "confdefs.h"
11241 #define _LARGEFILE_SOURCE 1
11251 rm -f conftest.$ac_objext
11252 if { (eval echo "$as_me:11252: \"$ac_compile\"") >&5
11253 (eval $ac_compile) 2>&5
11255 echo "$as_me:11255: \$? = $ac_status" >&5
11256 (exit $ac_status); } &&
11257 { ac_try='test -s conftest.$ac_objext'
11258 { (eval echo "$as_me:11258: \"$ac_try\"") >&5
11259 (eval $ac_try) 2>&5
11261 echo "$as_me:11261: \$? = $ac_status" >&5
11262 (exit $ac_status); }; }; then
11263 ac_cv_sys_largefile_source=1; break
11265 echo "$as_me: failed program was:" >&5
11266 cat conftest.$ac_ext >&5
11268 rm -f conftest.$ac_objext conftest.$ac_ext
11272 echo "$as_me:11272: result: $ac_cv_sys_largefile_source" >&5
11273 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11274 if test "$ac_cv_sys_largefile_source" != no; then
11276 cat >>confdefs.h <<EOF
11277 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11283 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11284 # in glibc 2.1.3, but that breaks too many other things.
11285 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11286 echo "$as_me:11286: checking for fseeko" >&5
11287 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11288 if test "${ac_cv_func_fseeko+set}" = set; then
11289 echo $ECHO_N "(cached) $ECHO_C" >&6
11291 cat >conftest.$ac_ext <<_ACEOF
11292 #line 11292 "configure"
11293 #include "confdefs.h"
11298 return fseeko && fseeko (stdin, 0, 0);
11303 rm -f conftest.$ac_objext conftest$ac_exeext
11304 if { (eval echo "$as_me:11304: \"$ac_link\"") >&5
11305 (eval $ac_link) 2>&5
11307 echo "$as_me:11307: \$? = $ac_status" >&5
11308 (exit $ac_status); } &&
11309 { ac_try='test -s conftest$ac_exeext'
11310 { (eval echo "$as_me:11310: \"$ac_try\"") >&5
11311 (eval $ac_try) 2>&5
11313 echo "$as_me:11313: \$? = $ac_status" >&5
11314 (exit $ac_status); }; }; then
11315 ac_cv_func_fseeko=yes
11317 echo "$as_me: failed program was:" >&5
11318 cat conftest.$ac_ext >&5
11319 ac_cv_func_fseeko=no
11321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11323 echo "$as_me:11323: result: $ac_cv_func_fseeko" >&5
11324 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11325 if test $ac_cv_func_fseeko = yes; then
11327 cat >>confdefs.h <<\EOF
11328 #define HAVE_FSEEKO 1
11333 # Normally we would collect these definitions in the config.h,
11334 # but (like _XOPEN_SOURCE), some environments rely on having these
11335 # defined before any of the system headers are included. Another
11336 # case comes up with C++, e.g., on AIX the compiler compiles the
11337 # header files by themselves before looking at the body files it is
11338 # told to compile. For ncurses, those header files do not include
11340 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11341 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11342 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11344 echo "$as_me:11344: checking whether to use struct dirent64" >&5
11345 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11346 if test "${cf_cv_struct_dirent64+set}" = set; then
11347 echo $ECHO_N "(cached) $ECHO_C" >&6
11350 cat >conftest.$ac_ext <<_ACEOF
11351 #line 11351 "configure"
11352 #include "confdefs.h"
11354 #include <sys/types.h>
11355 #include <dirent.h>
11361 /* if transitional largefile support is setup, this is true */
11362 extern struct dirent64 * readdir(DIR *);
11363 struct dirent64 *x = readdir((DIR *)0);
11364 struct dirent *y = readdir((DIR *)0);
11371 rm -f conftest.$ac_objext
11372 if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5
11373 (eval $ac_compile) 2>&5
11375 echo "$as_me:11375: \$? = $ac_status" >&5
11376 (exit $ac_status); } &&
11377 { ac_try='test -s conftest.$ac_objext'
11378 { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379 (eval $ac_try) 2>&5
11381 echo "$as_me:11381: \$? = $ac_status" >&5
11382 (exit $ac_status); }; }; then
11383 cf_cv_struct_dirent64=yes
11385 echo "$as_me: failed program was:" >&5
11386 cat conftest.$ac_ext >&5
11387 cf_cv_struct_dirent64=no
11389 rm -f conftest.$ac_objext conftest.$ac_ext
11392 echo "$as_me:11392: result: $cf_cv_struct_dirent64" >&5
11393 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11394 test "$cf_cv_struct_dirent64" = yes &&
11395 cat >>confdefs.h <<\EOF
11396 #define HAVE_STRUCT_DIRENT64 1
11401 ### Enable compiling-in rcs id's
11402 echo "$as_me:11402: checking if RCS identifiers should be compiled-in" >&5
11403 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11405 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11406 if test "${with_rcs_ids+set}" = set; then
11407 withval="$with_rcs_ids"
11408 with_rcs_ids=$withval
11412 echo "$as_me:11412: result: $with_rcs_ids" >&5
11413 echo "${ECHO_T}$with_rcs_ids" >&6
11414 test "$with_rcs_ids" = yes &&
11415 cat >>confdefs.h <<\EOF
11416 #define USE_RCS_IDS 1
11419 ###############################################################################
11421 ### Note that some functions (such as const) are normally disabled anyway.
11422 echo "$as_me:11422: checking if you want to build with function extensions" >&5
11423 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11425 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11426 if test "${enable_ext_funcs+set}" = set; then
11427 enableval="$enable_ext_funcs"
11428 with_ext_funcs=$enableval
11432 echo "$as_me:11432: result: $with_ext_funcs" >&5
11433 echo "${ECHO_T}$with_ext_funcs" >&6
11434 if test "$with_ext_funcs" = yes ; then
11435 NCURSES_EXT_FUNCS=1
11437 cat >>confdefs.h <<\EOF
11438 #define HAVE_USE_DEFAULT_COLORS 1
11441 cat >>confdefs.h <<\EOF
11442 #define NCURSES_EXT_FUNCS 1
11446 NCURSES_EXT_FUNCS=0
11449 ### use option --enable-const to turn on use of const beyond that in XSI.
11450 echo "$as_me:11450: checking for extended use of const keyword" >&5
11451 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11453 # Check whether --enable-const or --disable-const was given.
11454 if test "${enable_const+set}" = set; then
11455 enableval="$enable_const"
11456 with_ext_const=$enableval
11460 echo "$as_me:11460: result: $with_ext_const" >&5
11461 echo "${ECHO_T}$with_ext_const" >&6
11462 NCURSES_CONST='/*nothing*/'
11463 if test "$with_ext_const" = yes ; then
11464 NCURSES_CONST=const
11467 ###############################################################################
11468 # These options are relatively safe to experiment with.
11470 echo "$as_me:11470: checking if you want all development code" >&5
11471 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11473 # Check whether --with-develop or --without-develop was given.
11474 if test "${with_develop+set}" = set; then
11475 withval="$with_develop"
11476 with_develop=$withval
11480 echo "$as_me:11480: result: $with_develop" >&5
11481 echo "${ECHO_T}$with_develop" >&6
11483 ###############################################################################
11484 # These are just experimental, probably should not be in a package:
11486 # This is still experimental (20080329), but should ultimately be moved to
11487 # the script-block --with-normal, etc.
11489 echo "$as_me:11489: checking if you want to link with the pthread library" >&5
11490 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11492 # Check whether --with-pthread or --without-pthread was given.
11493 if test "${with_pthread+set}" = set; then
11494 withval="$with_pthread"
11495 with_pthread=$withval
11499 echo "$as_me:11499: result: $with_pthread" >&5
11500 echo "${ECHO_T}$with_pthread" >&6
11502 if test "$with_pthread" != no ; then
11503 echo "$as_me:11503: checking for pthread.h" >&5
11504 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11505 if test "${ac_cv_header_pthread_h+set}" = set; then
11506 echo $ECHO_N "(cached) $ECHO_C" >&6
11508 cat >conftest.$ac_ext <<_ACEOF
11509 #line 11509 "configure"
11510 #include "confdefs.h"
11511 #include <pthread.h>
11513 if { (eval echo "$as_me:11513: \"$ac_cpp conftest.$ac_ext\"") >&5
11514 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11516 egrep -v '^ *\+' conftest.er1 >conftest.err
11518 cat conftest.err >&5
11519 echo "$as_me:11519: \$? = $ac_status" >&5
11520 (exit $ac_status); } >/dev/null; then
11521 if test -s conftest.err; then
11522 ac_cpp_err=$ac_c_preproc_warn_flag
11529 if test -z "$ac_cpp_err"; then
11530 ac_cv_header_pthread_h=yes
11532 echo "$as_me: failed program was:" >&5
11533 cat conftest.$ac_ext >&5
11534 ac_cv_header_pthread_h=no
11536 rm -f conftest.err conftest.$ac_ext
11538 echo "$as_me:11538: result: $ac_cv_header_pthread_h" >&5
11539 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11540 if test $ac_cv_header_pthread_h = yes; then
11542 cat >>confdefs.h <<\EOF
11543 #define HAVE_PTHREADS_H 1
11546 for cf_lib_pthread in pthread c_r
11548 echo "$as_me:11548: checking if we can link with the $cf_lib_pthread library" >&5
11549 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11550 cf_save_LIBS="$LIBS"
11552 cf_add_libs="-l$cf_lib_pthread"
11553 # Filter out duplicates - this happens with badly-designed ".pc" files...
11554 for cf_add_1lib in $LIBS
11556 for cf_add_2lib in $cf_add_libs
11558 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11564 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11566 LIBS="$cf_add_libs"
11568 cat >conftest.$ac_ext <<_ACEOF
11569 #line 11569 "configure"
11570 #include "confdefs.h"
11572 #include <pthread.h>
11578 int rc = pthread_create(0,0,0,0);
11579 int r2 = pthread_mutexattr_settype(0, 0);
11585 rm -f conftest.$ac_objext conftest$ac_exeext
11586 if { (eval echo "$as_me:11586: \"$ac_link\"") >&5
11587 (eval $ac_link) 2>&5
11589 echo "$as_me:11589: \$? = $ac_status" >&5
11590 (exit $ac_status); } &&
11591 { ac_try='test -s conftest$ac_exeext'
11592 { (eval echo "$as_me:11592: \"$ac_try\"") >&5
11593 (eval $ac_try) 2>&5
11595 echo "$as_me:11595: \$? = $ac_status" >&5
11596 (exit $ac_status); }; }; then
11599 echo "$as_me: failed program was:" >&5
11600 cat conftest.$ac_ext >&5
11603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11604 LIBS="$cf_save_LIBS"
11605 echo "$as_me:11605: result: $with_pthread" >&5
11606 echo "${ECHO_T}$with_pthread" >&6
11607 test "$with_pthread" = yes && break
11610 if test "$with_pthread" = yes ; then
11612 cf_add_libs="-l$cf_lib_pthread"
11613 # Filter out duplicates - this happens with badly-designed ".pc" files...
11614 for cf_add_1lib in $LIBS
11616 for cf_add_2lib in $cf_add_libs
11618 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11624 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11626 LIBS="$cf_add_libs"
11628 cat >>confdefs.h <<\EOF
11629 #define HAVE_LIBPTHREADS 1
11633 { { echo "$as_me:11633: error: Cannot link with pthread library" >&5
11634 echo "$as_me: error: Cannot link with pthread library" >&2;}
11635 { (exit 1); exit 1; }; }
11642 echo "$as_me:11642: checking if you want to use weak-symbols for pthreads" >&5
11643 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11645 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11646 if test "${enable_weak_symbols+set}" = set; then
11647 enableval="$enable_weak_symbols"
11648 use_weak_symbols=$withval
11650 use_weak_symbols=no
11652 echo "$as_me:11652: result: $use_weak_symbols" >&5
11653 echo "${ECHO_T}$use_weak_symbols" >&6
11654 if test "$use_weak_symbols" = yes ; then
11656 echo "$as_me:11656: checking if $CC supports weak symbols" >&5
11657 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11658 if test "${cf_cv_weak_symbols+set}" = set; then
11659 echo $ECHO_N "(cached) $ECHO_C" >&6
11662 cat >conftest.$ac_ext <<_ACEOF
11663 #line 11663 "configure"
11664 #include "confdefs.h"
11671 #if defined(__GNUC__)
11672 # if defined __USE_ISOC99
11673 # define _cat_pragma(exp) _Pragma(#exp)
11674 # define _weak_pragma(exp) _cat_pragma(weak name)
11676 # define _weak_pragma(exp)
11678 # define _declare(name) __extension__ extern __typeof__(name) name
11679 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11682 weak_symbol(fopen);
11688 rm -f conftest.$ac_objext
11689 if { (eval echo "$as_me:11689: \"$ac_compile\"") >&5
11690 (eval $ac_compile) 2>&5
11692 echo "$as_me:11692: \$? = $ac_status" >&5
11693 (exit $ac_status); } &&
11694 { ac_try='test -s conftest.$ac_objext'
11695 { (eval echo "$as_me:11695: \"$ac_try\"") >&5
11696 (eval $ac_try) 2>&5
11698 echo "$as_me:11698: \$? = $ac_status" >&5
11699 (exit $ac_status); }; }; then
11700 cf_cv_weak_symbols=yes
11702 echo "$as_me: failed program was:" >&5
11703 cat conftest.$ac_ext >&5
11704 cf_cv_weak_symbols=no
11706 rm -f conftest.$ac_objext conftest.$ac_ext
11709 echo "$as_me:11709: result: $cf_cv_weak_symbols" >&5
11710 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11713 cf_cv_weak_symbols=no
11716 if test $cf_cv_weak_symbols = yes ; then
11718 cat >>confdefs.h <<\EOF
11719 #define USE_WEAK_SYMBOLS 1
11725 if test "$with_pthread" = "yes" ; then
11727 cat >>confdefs.h <<\EOF
11728 #define USE_PTHREADS 1
11731 enable_reentrant=yes
11732 if test $cf_cv_weak_symbols = yes ; then
11737 # OpenSUSE is installing ncurses6, using reentrant option.
11738 echo "$as_me:11738: checking for _nc_TABSIZE" >&5
11739 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11740 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11741 echo $ECHO_N "(cached) $ECHO_C" >&6
11743 cat >conftest.$ac_ext <<_ACEOF
11744 #line 11744 "configure"
11745 #include "confdefs.h"
11746 /* System header to define __stub macros and hopefully few prototypes,
11747 which can conflict with char _nc_TABSIZE (); below. */
11748 #include <assert.h>
11749 /* Override any gcc2 internal prototype to avoid an error. */
11753 /* We use char because int might match the return type of a gcc2
11754 builtin and then its argument prototype would still apply. */
11755 char _nc_TABSIZE ();
11761 /* The GNU C library defines this for functions which it implements
11762 to always fail with ENOSYS. Some functions are actually named
11763 something starting with __ and the normal name is an alias. */
11764 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11767 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11774 rm -f conftest.$ac_objext conftest$ac_exeext
11775 if { (eval echo "$as_me:11775: \"$ac_link\"") >&5
11776 (eval $ac_link) 2>&5
11778 echo "$as_me:11778: \$? = $ac_status" >&5
11779 (exit $ac_status); } &&
11780 { ac_try='test -s conftest$ac_exeext'
11781 { (eval echo "$as_me:11781: \"$ac_try\"") >&5
11782 (eval $ac_try) 2>&5
11784 echo "$as_me:11784: \$? = $ac_status" >&5
11785 (exit $ac_status); }; }; then
11786 ac_cv_func__nc_TABSIZE=yes
11788 echo "$as_me: failed program was:" >&5
11789 cat conftest.$ac_ext >&5
11790 ac_cv_func__nc_TABSIZE=no
11792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11794 echo "$as_me:11794: result: $ac_cv_func__nc_TABSIZE" >&5
11795 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11796 if test $ac_cv_func__nc_TABSIZE = yes; then
11797 assume_reentrant=yes
11799 assume_reentrant=no
11802 # Reentrant code has to be opaque; there's little advantage to making ncurses
11803 # opaque outside of that, so there is no --enable-opaque option. We can use
11804 # this option without --with-pthreads, but this will be always set for
11806 echo "$as_me:11806: checking if you want experimental reentrant code" >&5
11807 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11809 # Check whether --enable-reentrant or --disable-reentrant was given.
11810 if test "${enable_reentrant+set}" = set; then
11811 enableval="$enable_reentrant"
11812 with_reentrant=$enableval
11814 with_reentrant=$assume_reentrant
11816 echo "$as_me:11816: result: $with_reentrant" >&5
11817 echo "${ECHO_T}$with_reentrant" >&6
11818 if test "$with_reentrant" = yes ; then
11819 cf_cv_enable_reentrant=1
11820 if test $cf_cv_weak_symbols = yes ; then
11822 # remove pthread library from $LIBS
11823 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11825 elif test "$assume_reentrant" = no ; then
11826 LIB_SUFFIX="t${LIB_SUFFIX}"
11829 cat >>confdefs.h <<\EOF
11830 #define USE_REENTRANT 1
11834 cf_cv_enable_reentrant=0
11837 ### Allow using a different wrap-prefix
11838 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11839 echo "$as_me:11839: checking for prefix used to wrap public variables" >&5
11840 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11842 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11843 if test "${with_wrap_prefix+set}" = set; then
11844 withval="$with_wrap_prefix"
11845 NCURSES_WRAP_PREFIX=$withval
11847 NCURSES_WRAP_PREFIX=_nc_
11849 echo "$as_me:11849: result: $NCURSES_WRAP_PREFIX" >&5
11850 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11852 NCURSES_WRAP_PREFIX=_nc_
11855 cat >>confdefs.h <<EOF
11856 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11859 ###############################################################################
11861 ### use option --disable-echo to suppress full display compiling commands
11863 echo "$as_me:11863: checking if you want to see long compiling messages" >&5
11864 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11866 # Check whether --enable-echo or --disable-echo was given.
11867 if test "${enable_echo+set}" = set; then
11868 enableval="$enable_echo"
11869 test "$enableval" != no && enableval=yes
11870 if test "$enableval" != "yes" ; then
11873 ECHO_LD='@echo linking $@;'
11874 RULE_CC='@echo compiling $<'
11875 SHOW_CC='@echo compiling $@'
11897 echo "$as_me:11897: result: $enableval" >&5
11898 echo "${ECHO_T}$enableval" >&6
11900 ### use option --enable-warnings to turn on all gcc warnings
11901 echo "$as_me:11901: checking if you want to see compiler warnings" >&5
11902 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11904 # Check whether --enable-warnings or --disable-warnings was given.
11905 if test "${enable_warnings+set}" = set; then
11906 enableval="$enable_warnings"
11907 with_warnings=$enableval
11909 echo "$as_me:11909: result: $with_warnings" >&5
11910 echo "${ECHO_T}$with_warnings" >&6
11912 if test "x$with_warnings" = "xyes"; then
11914 ADAFLAGS="$ADAFLAGS -gnatg"
11918 if test "$GCC" = yes ; then
11921 echo "$as_me:11921: checking if this is really Intel C compiler" >&5
11922 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11923 cf_save_CFLAGS="$CFLAGS"
11924 CFLAGS="$CFLAGS -no-gcc"
11925 cat >conftest.$ac_ext <<_ACEOF
11926 #line 11926 "configure"
11927 #include "confdefs.h"
11933 #ifdef __INTEL_COMPILER
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944 (eval $ac_compile) 2>&5
11946 echo "$as_me:11946: \$? = $ac_status" >&5
11947 (exit $ac_status); } &&
11948 { ac_try='test -s conftest.$ac_objext'
11949 { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950 (eval $ac_try) 2>&5
11952 echo "$as_me:11952: \$? = $ac_status" >&5
11953 (exit $ac_status); }; }; then
11955 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11958 echo "$as_me: failed program was:" >&5
11959 cat conftest.$ac_ext >&5
11961 rm -f conftest.$ac_objext conftest.$ac_ext
11962 CFLAGS="$cf_save_CFLAGS"
11963 echo "$as_me:11963: result: $INTEL_COMPILER" >&5
11964 echo "${ECHO_T}$INTEL_COMPILER" >&6
11971 if test "$GCC" = yes ; then
11972 echo "$as_me:11972: checking if this is really Clang C compiler" >&5
11973 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11974 cf_save_CFLAGS="$CFLAGS"
11975 CFLAGS="$CFLAGS -Qunused-arguments"
11976 cat >conftest.$ac_ext <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11993 rm -f conftest.$ac_objext
11994 if { (eval echo "$as_me:11994: \"$ac_compile\"") >&5
11995 (eval $ac_compile) 2>&5
11997 echo "$as_me:11997: \$? = $ac_status" >&5
11998 (exit $ac_status); } &&
11999 { ac_try='test -s conftest.$ac_objext'
12000 { (eval echo "$as_me:12000: \"$ac_try\"") >&5
12001 (eval $ac_try) 2>&5
12003 echo "$as_me:12003: \$? = $ac_status" >&5
12004 (exit $ac_status); }; }; then
12006 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12009 echo "$as_me: failed program was:" >&5
12010 cat conftest.$ac_ext >&5
12012 rm -f conftest.$ac_objext conftest.$ac_ext
12013 CFLAGS="$cf_save_CFLAGS"
12014 echo "$as_me:12014: result: $CLANG_COMPILER" >&5
12015 echo "${ECHO_T}$CLANG_COMPILER" >&6
12018 cat > conftest.$ac_ext <<EOF
12019 #line 12019 "${as_me:-configure}"
12020 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12023 if test "$INTEL_COMPILER" = yes
12025 # The "-wdXXX" options suppress warnings:
12026 # remark #1419: external declaration in primary source file
12027 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12028 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12029 # remark #193: zero used for undefined preprocessing identifier
12030 # remark #593: variable "curs_sb_left_arrow" was set but never used
12031 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12032 # remark #869: parameter "tw" was never referenced
12033 # remark #981: operands are evaluated in unspecified order
12034 # warning #279: controlling expression is constant
12036 { echo "$as_me:12036: checking for $CC warning options..." >&5
12037 echo "$as_me: checking for $CC warning options..." >&6;}
12038 cf_save_CFLAGS="$CFLAGS"
12039 EXTRA_CFLAGS="-Wall"
12051 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12052 if { (eval echo "$as_me:12052: \"$ac_compile\"") >&5
12053 (eval $ac_compile) 2>&5
12055 echo "$as_me:12055: \$? = $ac_status" >&5
12056 (exit $ac_status); }; then
12057 test -n "$verbose" && echo "$as_me:12057: result: ... -$cf_opt" >&5
12058 echo "${ECHO_T}... -$cf_opt" >&6
12059 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12062 CFLAGS="$cf_save_CFLAGS"
12064 elif test "$GCC" = yes
12066 { echo "$as_me:12066: checking for $CC warning options..." >&5
12067 echo "$as_me: checking for $CC warning options..." >&6;}
12068 cf_save_CFLAGS="$CFLAGS"
12071 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12072 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12073 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12074 for cf_opt in W Wall \
12075 Wbad-function-cast \
12078 Wdeclaration-after-statement \
12081 Wmissing-declarations \
12082 Wmissing-prototypes \
12086 Wstrict-prototypes \
12087 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12089 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12090 if { (eval echo "$as_me:12090: \"$ac_compile\"") >&5
12091 (eval $ac_compile) 2>&5
12093 echo "$as_me:12093: \$? = $ac_status" >&5
12094 (exit $ac_status); }; then
12095 test -n "$verbose" && echo "$as_me:12095: result: ... -$cf_opt" >&5
12096 echo "${ECHO_T}... -$cf_opt" >&6
12099 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12102 case $GCC_VERSION in
12104 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12106 echo "${as_me:-configure}:12106: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12112 case $GCC_VERSION in
12114 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12116 echo "${as_me:-configure}:12116: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12122 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12125 CFLAGS="$cf_save_CFLAGS"
12131 if test "$GCC" = yes
12133 cat > conftest.i <<EOF
12135 #define GCC_PRINTF 0
12138 #define GCC_SCANF 0
12140 #ifndef GCC_NORETURN
12141 #define GCC_NORETURN /* nothing */
12144 #define GCC_UNUSED /* nothing */
12147 if test "$GCC" = yes
12149 { echo "$as_me:12149: checking for $CC __attribute__ directives..." >&5
12150 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12151 cat > conftest.$ac_ext <<EOF
12152 #line 12152 "${as_me:-configure}"
12153 #include "confdefs.h"
12154 #include "conftest.h"
12155 #include "conftest.i"
12157 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12159 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12162 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12164 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12166 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12167 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12168 extern void foo(void) GCC_NORETURN;
12169 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12171 cf_printf_attribute=no
12172 cf_scanf_attribute=no
12173 for cf_attribute in scanf printf unused noreturn
12176 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12178 cf_directive="__attribute__(($cf_attribute))"
12179 echo "checking for $CC $cf_directive" 1>&5
12181 case $cf_attribute in
12183 cf_printf_attribute=yes
12184 cat >conftest.h <<EOF
12185 #define GCC_$cf_ATTRIBUTE 1
12189 cf_scanf_attribute=yes
12190 cat >conftest.h <<EOF
12191 #define GCC_$cf_ATTRIBUTE 1
12195 cat >conftest.h <<EOF
12196 #define GCC_$cf_ATTRIBUTE $cf_directive
12201 if { (eval echo "$as_me:12201: \"$ac_compile\"") >&5
12202 (eval $ac_compile) 2>&5
12204 echo "$as_me:12204: \$? = $ac_status" >&5
12205 (exit $ac_status); }; then
12206 test -n "$verbose" && echo "$as_me:12206: result: ... $cf_attribute" >&5
12207 echo "${ECHO_T}... $cf_attribute" >&6
12208 cat conftest.h >>confdefs.h
12209 case $cf_attribute in
12212 cat >>confdefs.h <<EOF
12213 #define GCC_NORETURN $cf_directive
12218 cf_value='/* nothing */'
12219 if test "$cf_printf_attribute" != no ; then
12220 cf_value='__attribute__((format(printf,fmt,var)))'
12222 cat >>confdefs.h <<\EOF
12223 #define GCC_PRINTF 1
12228 cat >>confdefs.h <<EOF
12229 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12234 cf_value='/* nothing */'
12235 if test "$cf_scanf_attribute" != no ; then
12236 cf_value='__attribute__((format(scanf,fmt,var)))'
12238 cat >>confdefs.h <<\EOF
12239 #define GCC_SCANF 1
12244 cat >>confdefs.h <<EOF
12245 #define GCC_SCANFLIKE(fmt,var) $cf_value
12251 cat >>confdefs.h <<EOF
12252 #define GCC_UNUSED $cf_directive
12260 fgrep define conftest.i >>confdefs.h
12265 ### use option --enable-assertions to turn on generation of assertion code
12266 echo "$as_me:12266: checking if you want to enable runtime assertions" >&5
12267 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12269 # Check whether --enable-assertions or --disable-assertions was given.
12270 if test "${enable_assertions+set}" = set; then
12271 enableval="$enable_assertions"
12272 with_assertions=$enableval
12276 echo "$as_me:12276: result: $with_assertions" >&5
12277 echo "${ECHO_T}$with_assertions" >&6
12280 if test "$with_assertions" = no
12282 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12285 ADAFLAGS="$ADAFLAGS -gnata"
12290 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12292 cat >>confdefs.h <<\EOF
12293 #define HAVE_NC_ALLOC_H 1
12296 ### use option --enable-expanded to generate certain macros as functions
12298 # Check whether --enable-expanded or --disable-expanded was given.
12299 if test "${enable_expanded+set}" = set; then
12300 enableval="$enable_expanded"
12301 test "$enableval" = yes &&
12302 cat >>confdefs.h <<\EOF
12303 #define NCURSES_EXPANDED 1
12308 ### use option --disable-macros to suppress macros in favor of functions
12310 # Check whether --enable-macros or --disable-macros was given.
12311 if test "${enable_macros+set}" = set; then
12312 enableval="$enable_macros"
12313 test "$enableval" = no &&
12314 cat >>confdefs.h <<\EOF
12315 #define NCURSES_NOMACROS 1
12320 # Normally we only add trace() to the debug-library. Allow this to be
12321 # extended to all models of the ncurses library:
12323 case "$CFLAGS $CPPFLAGS" in
12329 echo "$as_me:12329: checking whether to add trace feature to all models" >&5
12330 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12332 # Check whether --with-trace or --without-trace was given.
12333 if test "${with_trace+set}" = set; then
12334 withval="$with_trace"
12335 cf_with_trace=$withval
12337 cf_with_trace=$cf_all_traces
12339 echo "$as_me:12339: result: $cf_with_trace" >&5
12340 echo "${ECHO_T}$cf_with_trace" >&6
12342 if test "$cf_with_trace" = yes ; then
12348 cf_new_extra_cppflags=
12350 for cf_add_cflags in -DTRACE
12352 case $cf_fix_cppflags in
12354 case $cf_add_cflags in
12355 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12356 case $cf_add_cflags in
12358 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12360 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12361 && test -z "${cf_tst_cflags}" \
12362 && cf_fix_cppflags=yes
12364 if test $cf_fix_cppflags = yes ; then
12365 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12367 elif test "${cf_tst_cflags}" = "\"'" ; then
12368 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12373 case "$CPPFLAGS" in
12377 case $cf_add_cflags in
12379 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12381 CPPFLAGS=`echo "$CPPFLAGS" | \
12382 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12383 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12387 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12392 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12397 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12399 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12401 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12402 && test -z "${cf_tst_cflags}" \
12403 && cf_fix_cppflags=no
12408 if test -n "$cf_new_cflags" ; then
12410 CFLAGS="$CFLAGS $cf_new_cflags"
12413 if test -n "$cf_new_cppflags" ; then
12415 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12418 if test -n "$cf_new_extra_cppflags" ; then
12420 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12427 echo "$as_me:12427: checking if we want to use GNAT projects" >&5
12428 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12430 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12431 if test "${enable_gnat_projects+set}" = set; then
12432 enableval="$enable_gnat_projects"
12433 test "$enableval" != no && enableval=yes
12434 if test "$enableval" != "yes" ; then
12435 enable_gnat_projects=no
12437 enable_gnat_projects=yes
12441 enable_gnat_projects=yes
12444 echo "$as_me:12444: result: $enable_gnat_projects" >&5
12445 echo "${ECHO_T}$enable_gnat_projects" >&6
12447 ### Checks for libraries.
12448 case $cf_cv_system_name in
12452 echo "$as_me:12452: checking for gettimeofday" >&5
12453 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12454 if test "${ac_cv_func_gettimeofday+set}" = set; then
12455 echo $ECHO_N "(cached) $ECHO_C" >&6
12457 cat >conftest.$ac_ext <<_ACEOF
12458 #line 12458 "configure"
12459 #include "confdefs.h"
12460 /* System header to define __stub macros and hopefully few prototypes,
12461 which can conflict with char gettimeofday (); below. */
12462 #include <assert.h>
12463 /* Override any gcc2 internal prototype to avoid an error. */
12467 /* We use char because int might match the return type of a gcc2
12468 builtin and then its argument prototype would still apply. */
12469 char gettimeofday ();
12475 /* The GNU C library defines this for functions which it implements
12476 to always fail with ENOSYS. Some functions are actually named
12477 something starting with __ and the normal name is an alias. */
12478 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12481 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12488 rm -f conftest.$ac_objext conftest$ac_exeext
12489 if { (eval echo "$as_me:12489: \"$ac_link\"") >&5
12490 (eval $ac_link) 2>&5
12492 echo "$as_me:12492: \$? = $ac_status" >&5
12493 (exit $ac_status); } &&
12494 { ac_try='test -s conftest$ac_exeext'
12495 { (eval echo "$as_me:12495: \"$ac_try\"") >&5
12496 (eval $ac_try) 2>&5
12498 echo "$as_me:12498: \$? = $ac_status" >&5
12499 (exit $ac_status); }; }; then
12500 ac_cv_func_gettimeofday=yes
12502 echo "$as_me: failed program was:" >&5
12503 cat conftest.$ac_ext >&5
12504 ac_cv_func_gettimeofday=no
12506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12508 echo "$as_me:12508: result: $ac_cv_func_gettimeofday" >&5
12509 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12510 if test $ac_cv_func_gettimeofday = yes; then
12511 cat >>confdefs.h <<\EOF
12512 #define HAVE_GETTIMEOFDAY 1
12517 echo "$as_me:12517: checking for gettimeofday in -lbsd" >&5
12518 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12519 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12520 echo $ECHO_N "(cached) $ECHO_C" >&6
12522 ac_check_lib_save_LIBS=$LIBS
12524 cat >conftest.$ac_ext <<_ACEOF
12525 #line 12525 "configure"
12526 #include "confdefs.h"
12528 /* Override any gcc2 internal prototype to avoid an error. */
12532 /* We use char because int might match the return type of a gcc2
12533 builtin and then its argument prototype would still apply. */
12534 char gettimeofday ();
12543 rm -f conftest.$ac_objext conftest$ac_exeext
12544 if { (eval echo "$as_me:12544: \"$ac_link\"") >&5
12545 (eval $ac_link) 2>&5
12547 echo "$as_me:12547: \$? = $ac_status" >&5
12548 (exit $ac_status); } &&
12549 { ac_try='test -s conftest$ac_exeext'
12550 { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551 (eval $ac_try) 2>&5
12553 echo "$as_me:12553: \$? = $ac_status" >&5
12554 (exit $ac_status); }; }; then
12555 ac_cv_lib_bsd_gettimeofday=yes
12557 echo "$as_me: failed program was:" >&5
12558 cat conftest.$ac_ext >&5
12559 ac_cv_lib_bsd_gettimeofday=no
12561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12562 LIBS=$ac_check_lib_save_LIBS
12564 echo "$as_me:12564: result: $ac_cv_lib_bsd_gettimeofday" >&5
12565 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12566 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12568 cat >>confdefs.h <<\EOF
12569 #define HAVE_GETTIMEOFDAY 1
12579 ### Checks for header files.
12580 echo "$as_me:12580: checking for ANSI C header files" >&5
12581 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12582 if test "${ac_cv_header_stdc+set}" = set; then
12583 echo $ECHO_N "(cached) $ECHO_C" >&6
12585 cat >conftest.$ac_ext <<_ACEOF
12586 #line 12586 "configure"
12587 #include "confdefs.h"
12588 #include <stdlib.h>
12589 #include <stdarg.h>
12590 #include <string.h>
12594 if { (eval echo "$as_me:12594: \"$ac_cpp conftest.$ac_ext\"") >&5
12595 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12597 egrep -v '^ *\+' conftest.er1 >conftest.err
12599 cat conftest.err >&5
12600 echo "$as_me:12600: \$? = $ac_status" >&5
12601 (exit $ac_status); } >/dev/null; then
12602 if test -s conftest.err; then
12603 ac_cpp_err=$ac_c_preproc_warn_flag
12610 if test -z "$ac_cpp_err"; then
12611 ac_cv_header_stdc=yes
12613 echo "$as_me: failed program was:" >&5
12614 cat conftest.$ac_ext >&5
12615 ac_cv_header_stdc=no
12617 rm -f conftest.err conftest.$ac_ext
12619 if test $ac_cv_header_stdc = yes; then
12620 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12621 cat >conftest.$ac_ext <<_ACEOF
12622 #line 12622 "configure"
12623 #include "confdefs.h"
12624 #include <string.h>
12627 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12628 egrep "memchr" >/dev/null 2>&1; then
12631 ac_cv_header_stdc=no
12637 if test $ac_cv_header_stdc = yes; then
12638 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12639 cat >conftest.$ac_ext <<_ACEOF
12640 #line 12640 "configure"
12641 #include "confdefs.h"
12642 #include <stdlib.h>
12645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12646 egrep "free" >/dev/null 2>&1; then
12649 ac_cv_header_stdc=no
12655 if test $ac_cv_header_stdc = yes; then
12656 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12657 if test "$cross_compiling" = yes; then
12660 cat >conftest.$ac_ext <<_ACEOF
12661 #line 12661 "configure"
12662 #include "confdefs.h"
12664 #if ((' ' & 0x0FF) == 0x020)
12665 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12666 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12668 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12669 || ('j' <= (c) && (c) <= 'r') \
12670 || ('s' <= (c) && (c) <= 'z'))
12671 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12674 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12679 for (i = 0; i < 256; i++)
12680 if (XOR (islower (i), ISLOWER (i))
12681 || toupper (i) != TOUPPER (i))
12682 $ac_main_return(2);
12683 $ac_main_return (0);
12686 rm -f conftest$ac_exeext
12687 if { (eval echo "$as_me:12687: \"$ac_link\"") >&5
12688 (eval $ac_link) 2>&5
12690 echo "$as_me:12690: \$? = $ac_status" >&5
12691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12692 { (eval echo "$as_me:12692: \"$ac_try\"") >&5
12693 (eval $ac_try) 2>&5
12695 echo "$as_me:12695: \$? = $ac_status" >&5
12696 (exit $ac_status); }; }; then
12699 echo "$as_me: program exited with status $ac_status" >&5
12700 echo "$as_me: failed program was:" >&5
12701 cat conftest.$ac_ext >&5
12702 ac_cv_header_stdc=no
12704 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12708 echo "$as_me:12708: result: $ac_cv_header_stdc" >&5
12709 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12710 if test $ac_cv_header_stdc = yes; then
12712 cat >>confdefs.h <<\EOF
12713 #define STDC_HEADERS 1
12718 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12720 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12721 inttypes.h stdint.h unistd.h
12723 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12724 echo "$as_me:12724: checking for $ac_header" >&5
12725 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12727 echo $ECHO_N "(cached) $ECHO_C" >&6
12729 cat >conftest.$ac_ext <<_ACEOF
12730 #line 12730 "configure"
12731 #include "confdefs.h"
12732 $ac_includes_default
12733 #include <$ac_header>
12735 rm -f conftest.$ac_objext
12736 if { (eval echo "$as_me:12736: \"$ac_compile\"") >&5
12737 (eval $ac_compile) 2>&5
12739 echo "$as_me:12739: \$? = $ac_status" >&5
12740 (exit $ac_status); } &&
12741 { ac_try='test -s conftest.$ac_objext'
12742 { (eval echo "$as_me:12742: \"$ac_try\"") >&5
12743 (eval $ac_try) 2>&5
12745 echo "$as_me:12745: \$? = $ac_status" >&5
12746 (exit $ac_status); }; }; then
12747 eval "$as_ac_Header=yes"
12749 echo "$as_me: failed program was:" >&5
12750 cat conftest.$ac_ext >&5
12751 eval "$as_ac_Header=no"
12753 rm -f conftest.$ac_objext conftest.$ac_ext
12755 echo "$as_me:12755: result: `eval echo '${'$as_ac_Header'}'`" >&5
12756 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12757 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12758 cat >>confdefs.h <<EOF
12759 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12765 echo "$as_me:12765: checking for signed char" >&5
12766 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12767 if test "${ac_cv_type_signed_char+set}" = set; then
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
12770 cat >conftest.$ac_ext <<_ACEOF
12771 #line 12771 "configure"
12772 #include "confdefs.h"
12773 $ac_includes_default
12777 if ((signed char *) 0)
12779 if (sizeof (signed char))
12785 rm -f conftest.$ac_objext
12786 if { (eval echo "$as_me:12786: \"$ac_compile\"") >&5
12787 (eval $ac_compile) 2>&5
12789 echo "$as_me:12789: \$? = $ac_status" >&5
12790 (exit $ac_status); } &&
12791 { ac_try='test -s conftest.$ac_objext'
12792 { (eval echo "$as_me:12792: \"$ac_try\"") >&5
12793 (eval $ac_try) 2>&5
12795 echo "$as_me:12795: \$? = $ac_status" >&5
12796 (exit $ac_status); }; }; then
12797 ac_cv_type_signed_char=yes
12799 echo "$as_me: failed program was:" >&5
12800 cat conftest.$ac_ext >&5
12801 ac_cv_type_signed_char=no
12803 rm -f conftest.$ac_objext conftest.$ac_ext
12805 echo "$as_me:12805: result: $ac_cv_type_signed_char" >&5
12806 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12808 echo "$as_me:12808: checking size of signed char" >&5
12809 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12810 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12811 echo $ECHO_N "(cached) $ECHO_C" >&6
12813 if test "$ac_cv_type_signed_char" = yes; then
12814 if test "$cross_compiling" = yes; then
12815 # Depending upon the size, compute the lo and hi bounds.
12816 cat >conftest.$ac_ext <<_ACEOF
12817 #line 12817 "configure"
12818 #include "confdefs.h"
12819 $ac_includes_default
12823 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12828 rm -f conftest.$ac_objext
12829 if { (eval echo "$as_me:12829: \"$ac_compile\"") >&5
12830 (eval $ac_compile) 2>&5
12832 echo "$as_me:12832: \$? = $ac_status" >&5
12833 (exit $ac_status); } &&
12834 { ac_try='test -s conftest.$ac_objext'
12835 { (eval echo "$as_me:12835: \"$ac_try\"") >&5
12836 (eval $ac_try) 2>&5
12838 echo "$as_me:12838: \$? = $ac_status" >&5
12839 (exit $ac_status); }; }; then
12842 cat >conftest.$ac_ext <<_ACEOF
12843 #line 12843 "configure"
12844 #include "confdefs.h"
12845 $ac_includes_default
12849 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12854 rm -f conftest.$ac_objext
12855 if { (eval echo "$as_me:12855: \"$ac_compile\"") >&5
12856 (eval $ac_compile) 2>&5
12858 echo "$as_me:12858: \$? = $ac_status" >&5
12859 (exit $ac_status); } &&
12860 { ac_try='test -s conftest.$ac_objext'
12861 { (eval echo "$as_me:12861: \"$ac_try\"") >&5
12862 (eval $ac_try) 2>&5
12864 echo "$as_me:12864: \$? = $ac_status" >&5
12865 (exit $ac_status); }; }; then
12866 ac_hi=$ac_mid; break
12868 echo "$as_me: failed program was:" >&5
12869 cat conftest.$ac_ext >&5
12870 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12872 rm -f conftest.$ac_objext conftest.$ac_ext
12875 echo "$as_me: failed program was:" >&5
12876 cat conftest.$ac_ext >&5
12879 cat >conftest.$ac_ext <<_ACEOF
12880 #line 12880 "configure"
12881 #include "confdefs.h"
12882 $ac_includes_default
12886 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12891 rm -f conftest.$ac_objext
12892 if { (eval echo "$as_me:12892: \"$ac_compile\"") >&5
12893 (eval $ac_compile) 2>&5
12895 echo "$as_me:12895: \$? = $ac_status" >&5
12896 (exit $ac_status); } &&
12897 { ac_try='test -s conftest.$ac_objext'
12898 { (eval echo "$as_me:12898: \"$ac_try\"") >&5
12899 (eval $ac_try) 2>&5
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit $ac_status); }; }; then
12903 ac_lo=$ac_mid; break
12905 echo "$as_me: failed program was:" >&5
12906 cat conftest.$ac_ext >&5
12907 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12909 rm -f conftest.$ac_objext conftest.$ac_ext
12912 rm -f conftest.$ac_objext conftest.$ac_ext
12913 # Binary search between lo and hi bounds.
12914 while test "x$ac_lo" != "x$ac_hi"; do
12915 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12916 cat >conftest.$ac_ext <<_ACEOF
12917 #line 12917 "configure"
12918 #include "confdefs.h"
12919 $ac_includes_default
12923 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12928 rm -f conftest.$ac_objext
12929 if { (eval echo "$as_me:12929: \"$ac_compile\"") >&5
12930 (eval $ac_compile) 2>&5
12932 echo "$as_me:12932: \$? = $ac_status" >&5
12933 (exit $ac_status); } &&
12934 { ac_try='test -s conftest.$ac_objext'
12935 { (eval echo "$as_me:12935: \"$ac_try\"") >&5
12936 (eval $ac_try) 2>&5
12938 echo "$as_me:12938: \$? = $ac_status" >&5
12939 (exit $ac_status); }; }; then
12942 echo "$as_me: failed program was:" >&5
12943 cat conftest.$ac_ext >&5
12944 ac_lo=`expr $ac_mid + 1`
12946 rm -f conftest.$ac_objext conftest.$ac_ext
12948 ac_cv_sizeof_signed_char=$ac_lo
12950 if test "$cross_compiling" = yes; then
12951 { { echo "$as_me:12951: error: cannot run test program while cross compiling" >&5
12952 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12953 { (exit 1); exit 1; }; }
12955 cat >conftest.$ac_ext <<_ACEOF
12956 #line 12956 "configure"
12957 #include "confdefs.h"
12958 $ac_includes_default
12962 FILE *f = fopen ("conftest.val", "w");
12964 $ac_main_return (1);
12965 fprintf (f, "%d", (sizeof (signed char)));
12971 rm -f conftest$ac_exeext
12972 if { (eval echo "$as_me:12972: \"$ac_link\"") >&5
12973 (eval $ac_link) 2>&5
12975 echo "$as_me:12975: \$? = $ac_status" >&5
12976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12977 { (eval echo "$as_me:12977: \"$ac_try\"") >&5
12978 (eval $ac_try) 2>&5
12980 echo "$as_me:12980: \$? = $ac_status" >&5
12981 (exit $ac_status); }; }; then
12982 ac_cv_sizeof_signed_char=`cat conftest.val`
12984 echo "$as_me: program exited with status $ac_status" >&5
12985 echo "$as_me: failed program was:" >&5
12986 cat conftest.$ac_ext >&5
12988 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12993 ac_cv_sizeof_signed_char=0
12996 echo "$as_me:12996: result: $ac_cv_sizeof_signed_char" >&5
12997 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12998 cat >>confdefs.h <<EOF
12999 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13002 echo "$as_me:13002: checking for ANSI C header files" >&5
13003 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13004 if test "${ac_cv_header_stdc+set}" = set; then
13005 echo $ECHO_N "(cached) $ECHO_C" >&6
13007 cat >conftest.$ac_ext <<_ACEOF
13008 #line 13008 "configure"
13009 #include "confdefs.h"
13010 #include <stdlib.h>
13011 #include <stdarg.h>
13012 #include <string.h>
13016 if { (eval echo "$as_me:13016: \"$ac_cpp conftest.$ac_ext\"") >&5
13017 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13019 egrep -v '^ *\+' conftest.er1 >conftest.err
13021 cat conftest.err >&5
13022 echo "$as_me:13022: \$? = $ac_status" >&5
13023 (exit $ac_status); } >/dev/null; then
13024 if test -s conftest.err; then
13025 ac_cpp_err=$ac_c_preproc_warn_flag
13032 if test -z "$ac_cpp_err"; then
13033 ac_cv_header_stdc=yes
13035 echo "$as_me: failed program was:" >&5
13036 cat conftest.$ac_ext >&5
13037 ac_cv_header_stdc=no
13039 rm -f conftest.err conftest.$ac_ext
13041 if test $ac_cv_header_stdc = yes; then
13042 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13043 cat >conftest.$ac_ext <<_ACEOF
13044 #line 13044 "configure"
13045 #include "confdefs.h"
13046 #include <string.h>
13049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13050 egrep "memchr" >/dev/null 2>&1; then
13053 ac_cv_header_stdc=no
13059 if test $ac_cv_header_stdc = yes; then
13060 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13061 cat >conftest.$ac_ext <<_ACEOF
13062 #line 13062 "configure"
13063 #include "confdefs.h"
13064 #include <stdlib.h>
13067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13068 egrep "free" >/dev/null 2>&1; then
13071 ac_cv_header_stdc=no
13077 if test $ac_cv_header_stdc = yes; then
13078 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13079 if test "$cross_compiling" = yes; then
13082 cat >conftest.$ac_ext <<_ACEOF
13083 #line 13083 "configure"
13084 #include "confdefs.h"
13086 #if ((' ' & 0x0FF) == 0x020)
13087 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13088 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13090 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13091 || ('j' <= (c) && (c) <= 'r') \
13092 || ('s' <= (c) && (c) <= 'z'))
13093 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13096 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13101 for (i = 0; i < 256; i++)
13102 if (XOR (islower (i), ISLOWER (i))
13103 || toupper (i) != TOUPPER (i))
13104 $ac_main_return(2);
13105 $ac_main_return (0);
13108 rm -f conftest$ac_exeext
13109 if { (eval echo "$as_me:13109: \"$ac_link\"") >&5
13110 (eval $ac_link) 2>&5
13112 echo "$as_me:13112: \$? = $ac_status" >&5
13113 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13114 { (eval echo "$as_me:13114: \"$ac_try\"") >&5
13115 (eval $ac_try) 2>&5
13117 echo "$as_me:13117: \$? = $ac_status" >&5
13118 (exit $ac_status); }; }; then
13121 echo "$as_me: program exited with status $ac_status" >&5
13122 echo "$as_me: failed program was:" >&5
13123 cat conftest.$ac_ext >&5
13124 ac_cv_header_stdc=no
13126 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13130 echo "$as_me:13130: result: $ac_cv_header_stdc" >&5
13131 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13132 if test $ac_cv_header_stdc = yes; then
13134 cat >>confdefs.h <<\EOF
13135 #define STDC_HEADERS 1
13140 ac_header_dirent=no
13141 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13142 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13143 echo "$as_me:13143: checking for $ac_hdr that defines DIR" >&5
13144 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13145 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13146 echo $ECHO_N "(cached) $ECHO_C" >&6
13148 cat >conftest.$ac_ext <<_ACEOF
13149 #line 13149 "configure"
13150 #include "confdefs.h"
13151 #include <sys/types.h>
13163 rm -f conftest.$ac_objext
13164 if { (eval echo "$as_me:13164: \"$ac_compile\"") >&5
13165 (eval $ac_compile) 2>&5
13167 echo "$as_me:13167: \$? = $ac_status" >&5
13168 (exit $ac_status); } &&
13169 { ac_try='test -s conftest.$ac_objext'
13170 { (eval echo "$as_me:13170: \"$ac_try\"") >&5
13171 (eval $ac_try) 2>&5
13173 echo "$as_me:13173: \$? = $ac_status" >&5
13174 (exit $ac_status); }; }; then
13175 eval "$as_ac_Header=yes"
13177 echo "$as_me: failed program was:" >&5
13178 cat conftest.$ac_ext >&5
13179 eval "$as_ac_Header=no"
13181 rm -f conftest.$ac_objext conftest.$ac_ext
13183 echo "$as_me:13183: result: `eval echo '${'$as_ac_Header'}'`" >&5
13184 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13185 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13186 cat >>confdefs.h <<EOF
13187 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13190 ac_header_dirent=$ac_hdr; break
13194 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13195 if test $ac_header_dirent = dirent.h; then
13196 echo "$as_me:13196: checking for opendir in -ldir" >&5
13197 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13198 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13199 echo $ECHO_N "(cached) $ECHO_C" >&6
13201 ac_check_lib_save_LIBS=$LIBS
13203 cat >conftest.$ac_ext <<_ACEOF
13204 #line 13204 "configure"
13205 #include "confdefs.h"
13207 /* Override any gcc2 internal prototype to avoid an error. */
13211 /* We use char because int might match the return type of a gcc2
13212 builtin and then its argument prototype would still apply. */
13222 rm -f conftest.$ac_objext conftest$ac_exeext
13223 if { (eval echo "$as_me:13223: \"$ac_link\"") >&5
13224 (eval $ac_link) 2>&5
13226 echo "$as_me:13226: \$? = $ac_status" >&5
13227 (exit $ac_status); } &&
13228 { ac_try='test -s conftest$ac_exeext'
13229 { (eval echo "$as_me:13229: \"$ac_try\"") >&5
13230 (eval $ac_try) 2>&5
13232 echo "$as_me:13232: \$? = $ac_status" >&5
13233 (exit $ac_status); }; }; then
13234 ac_cv_lib_dir_opendir=yes
13236 echo "$as_me: failed program was:" >&5
13237 cat conftest.$ac_ext >&5
13238 ac_cv_lib_dir_opendir=no
13240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13241 LIBS=$ac_check_lib_save_LIBS
13243 echo "$as_me:13243: result: $ac_cv_lib_dir_opendir" >&5
13244 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13245 if test $ac_cv_lib_dir_opendir = yes; then
13250 echo "$as_me:13250: checking for opendir in -lx" >&5
13251 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13252 if test "${ac_cv_lib_x_opendir+set}" = set; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
13255 ac_check_lib_save_LIBS=$LIBS
13257 cat >conftest.$ac_ext <<_ACEOF
13258 #line 13258 "configure"
13259 #include "confdefs.h"
13261 /* Override any gcc2 internal prototype to avoid an error. */
13265 /* We use char because int might match the return type of a gcc2
13266 builtin and then its argument prototype would still apply. */
13276 rm -f conftest.$ac_objext conftest$ac_exeext
13277 if { (eval echo "$as_me:13277: \"$ac_link\"") >&5
13278 (eval $ac_link) 2>&5
13280 echo "$as_me:13280: \$? = $ac_status" >&5
13281 (exit $ac_status); } &&
13282 { ac_try='test -s conftest$ac_exeext'
13283 { (eval echo "$as_me:13283: \"$ac_try\"") >&5
13284 (eval $ac_try) 2>&5
13286 echo "$as_me:13286: \$? = $ac_status" >&5
13287 (exit $ac_status); }; }; then
13288 ac_cv_lib_x_opendir=yes
13290 echo "$as_me: failed program was:" >&5
13291 cat conftest.$ac_ext >&5
13292 ac_cv_lib_x_opendir=no
13294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13295 LIBS=$ac_check_lib_save_LIBS
13297 echo "$as_me:13297: result: $ac_cv_lib_x_opendir" >&5
13298 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13299 if test $ac_cv_lib_x_opendir = yes; then
13305 echo "$as_me:13305: checking whether time.h and sys/time.h may both be included" >&5
13306 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13307 if test "${ac_cv_header_time+set}" = set; then
13308 echo $ECHO_N "(cached) $ECHO_C" >&6
13310 cat >conftest.$ac_ext <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313 #include <sys/types.h>
13314 #include <sys/time.h>
13320 if ((struct tm *) 0)
13326 rm -f conftest.$ac_objext
13327 if { (eval echo "$as_me:13327: \"$ac_compile\"") >&5
13328 (eval $ac_compile) 2>&5
13330 echo "$as_me:13330: \$? = $ac_status" >&5
13331 (exit $ac_status); } &&
13332 { ac_try='test -s conftest.$ac_objext'
13333 { (eval echo "$as_me:13333: \"$ac_try\"") >&5
13334 (eval $ac_try) 2>&5
13336 echo "$as_me:13336: \$? = $ac_status" >&5
13337 (exit $ac_status); }; }; then
13338 ac_cv_header_time=yes
13340 echo "$as_me: failed program was:" >&5
13341 cat conftest.$ac_ext >&5
13342 ac_cv_header_time=no
13344 rm -f conftest.$ac_objext conftest.$ac_ext
13346 echo "$as_me:13346: result: $ac_cv_header_time" >&5
13347 echo "${ECHO_T}$ac_cv_header_time" >&6
13348 if test $ac_cv_header_time = yes; then
13350 cat >>confdefs.h <<\EOF
13351 #define TIME_WITH_SYS_TIME 1
13356 ### checks for compiler characteristics
13358 ac_cpp='$CPP $CPPFLAGS'
13359 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13360 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13361 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13362 ac_main_return=return
13364 echo "$as_me:13364: checking for an ANSI C-conforming const" >&5
13365 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13366 if test "${ac_cv_c_const+set}" = set; then
13367 echo $ECHO_N "(cached) $ECHO_C" >&6
13369 cat >conftest.$ac_ext <<_ACEOF
13370 #line 13370 "configure"
13371 #include "confdefs.h"
13376 /* FIXME: Include the comments suggested by Paul. */
13377 #ifndef __cplusplus
13378 /* Ultrix mips cc rejects this. */
13379 typedef int charset[2];
13381 /* SunOS 4.1.1 cc rejects this. */
13382 char const *const *ccp;
13384 /* NEC SVR4.0.2 mips cc rejects this. */
13385 struct point {int x, y;};
13386 static struct point const zero = {0,0};
13387 /* AIX XL C 1.02.0.0 rejects this.
13388 It does not let you subtract one const X* pointer from another in
13389 an arm of an if-expression whose if-part is not a constant
13391 const char *g = "string";
13392 ccp = &g + (g ? g-g : 0);
13393 /* HPUX 7.0 cc rejects these. */
13396 ccp = (char const *const *) p;
13397 { /* SCO 3.2v4 cc rejects this. */
13399 char const *s = 0 ? (char *) 0 : (char const *) 0;
13403 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13404 int x[] = {25, 17};
13405 const int *foo = &x[0];
13408 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13409 typedef const int *iptr;
13413 { /* AIX XL C 1.02.0.0 rejects this saying
13414 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13415 struct s { int j; const int *ap[3]; };
13416 struct s *b; b->j = 5;
13418 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13419 const int foo = 10;
13427 rm -f conftest.$ac_objext
13428 if { (eval echo "$as_me:13428: \"$ac_compile\"") >&5
13429 (eval $ac_compile) 2>&5
13431 echo "$as_me:13431: \$? = $ac_status" >&5
13432 (exit $ac_status); } &&
13433 { ac_try='test -s conftest.$ac_objext'
13434 { (eval echo "$as_me:13434: \"$ac_try\"") >&5
13435 (eval $ac_try) 2>&5
13437 echo "$as_me:13437: \$? = $ac_status" >&5
13438 (exit $ac_status); }; }; then
13441 echo "$as_me: failed program was:" >&5
13442 cat conftest.$ac_ext >&5
13445 rm -f conftest.$ac_objext conftest.$ac_ext
13447 echo "$as_me:13447: result: $ac_cv_c_const" >&5
13448 echo "${ECHO_T}$ac_cv_c_const" >&6
13449 if test $ac_cv_c_const = no; then
13451 cat >>confdefs.h <<\EOF
13457 ### Checks for external-data
13459 echo "$as_me:13459: checking if data-only library module links" >&5
13460 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13461 if test "${cf_cv_link_dataonly+set}" = set; then
13462 echo $ECHO_N "(cached) $ECHO_C" >&6
13466 cat >conftest.$ac_ext <<EOF
13467 #line 13467 "configure"
13468 int testdata[3] = { 123, 456, 789 };
13470 if { (eval echo "$as_me:13470: \"$ac_compile\"") >&5
13471 (eval $ac_compile) 2>&5
13473 echo "$as_me:13473: \$? = $ac_status" >&5
13474 (exit $ac_status); } ; then
13475 mv conftest.o data.o && \
13476 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13478 rm -f conftest.$ac_ext data.o
13479 cat >conftest.$ac_ext <<EOF
13480 #line 13480 "configure"
13484 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
13486 extern int testdata[3];
13487 return testdata[0] == 123
13488 && testdata[1] == 456
13489 && testdata[2] == 789;
13493 if { (eval echo "$as_me:13493: \"$ac_compile\"") >&5
13494 (eval $ac_compile) 2>&5
13496 echo "$as_me:13496: \$? = $ac_status" >&5
13497 (exit $ac_status); }; then
13498 mv conftest.o func.o && \
13499 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13501 rm -f conftest.$ac_ext func.o
13502 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13503 cf_saveLIBS="$LIBS"
13504 LIBS="conftest.a $LIBS"
13505 if test "$cross_compiling" = yes; then
13506 cf_cv_link_dataonly=unknown
13508 cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13514 extern int testfunc();
13515 ${cf_cv_main_return:-return} (!testfunc());
13519 rm -f conftest$ac_exeext
13520 if { (eval echo "$as_me:13520: \"$ac_link\"") >&5
13521 (eval $ac_link) 2>&5
13523 echo "$as_me:13523: \$? = $ac_status" >&5
13524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13525 { (eval echo "$as_me:13525: \"$ac_try\"") >&5
13526 (eval $ac_try) 2>&5
13528 echo "$as_me:13528: \$? = $ac_status" >&5
13529 (exit $ac_status); }; }; then
13530 cf_cv_link_dataonly=yes
13532 echo "$as_me: program exited with status $ac_status" >&5
13533 echo "$as_me: failed program was:" >&5
13534 cat conftest.$ac_ext >&5
13535 cf_cv_link_dataonly=no
13537 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13539 LIBS="$cf_saveLIBS"
13543 echo "$as_me:13543: result: $cf_cv_link_dataonly" >&5
13544 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13546 if test "$cf_cv_link_dataonly" = no ; then
13548 cat >>confdefs.h <<\EOF
13549 #define BROKEN_LINKER 1
13555 ### Checks for library functions.
13557 echo "$as_me:13557: checking for working mkstemp" >&5
13558 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13559 if test "${cf_cv_func_mkstemp+set}" = set; then
13560 echo $ECHO_N "(cached) $ECHO_C" >&6
13564 if test "$cross_compiling" = yes; then
13565 cf_cv_func_mkstemp=maybe
13567 cat >conftest.$ac_ext <<_ACEOF
13568 #line 13568 "configure"
13569 #include "confdefs.h"
13571 #include <sys/types.h>
13572 #include <stdlib.h>
13574 #include <string.h>
13575 #include <sys/stat.h>
13578 char *tmpl = "conftestXXXXXX";
13586 for (n = 0; n < 2; ++n) {
13587 strcpy(name[n], tmpl);
13588 if ((fd = mkstemp(name[n])) >= 0) {
13589 if (!strcmp(name[n], tmpl)
13590 || stat(name[n], &sb) != 0
13591 || (sb.st_mode & S_IFMT) != S_IFREG
13592 || (sb.st_mode & 077) != 0) {
13599 && !strcmp(name[0], name[1]))
13601 ${cf_cv_main_return:-return}(result);
13605 rm -f conftest$ac_exeext
13606 if { (eval echo "$as_me:13606: \"$ac_link\"") >&5
13607 (eval $ac_link) 2>&5
13609 echo "$as_me:13609: \$? = $ac_status" >&5
13610 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13611 { (eval echo "$as_me:13611: \"$ac_try\"") >&5
13612 (eval $ac_try) 2>&5
13614 echo "$as_me:13614: \$? = $ac_status" >&5
13615 (exit $ac_status); }; }; then
13616 cf_cv_func_mkstemp=yes
13619 echo "$as_me: program exited with status $ac_status" >&5
13620 echo "$as_me: failed program was:" >&5
13621 cat conftest.$ac_ext >&5
13622 cf_cv_func_mkstemp=no
13625 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13629 echo "$as_me:13629: result: $cf_cv_func_mkstemp" >&5
13630 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13631 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13632 echo "$as_me:13632: checking for mkstemp" >&5
13633 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13634 if test "${ac_cv_func_mkstemp+set}" = set; then
13635 echo $ECHO_N "(cached) $ECHO_C" >&6
13637 cat >conftest.$ac_ext <<_ACEOF
13638 #line 13638 "configure"
13639 #include "confdefs.h"
13640 /* System header to define __stub macros and hopefully few prototypes,
13641 which can conflict with char mkstemp (); below. */
13642 #include <assert.h>
13643 /* Override any gcc2 internal prototype to avoid an error. */
13647 /* We use char because int might match the return type of a gcc2
13648 builtin and then its argument prototype would still apply. */
13655 /* The GNU C library defines this for functions which it implements
13656 to always fail with ENOSYS. Some functions are actually named
13657 something starting with __ and the normal name is an alias. */
13658 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13661 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13668 rm -f conftest.$ac_objext conftest$ac_exeext
13669 if { (eval echo "$as_me:13669: \"$ac_link\"") >&5
13670 (eval $ac_link) 2>&5
13672 echo "$as_me:13672: \$? = $ac_status" >&5
13673 (exit $ac_status); } &&
13674 { ac_try='test -s 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 ac_cv_func_mkstemp=yes
13682 echo "$as_me: failed program was:" >&5
13683 cat conftest.$ac_ext >&5
13684 ac_cv_func_mkstemp=no
13686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13688 echo "$as_me:13688: result: $ac_cv_func_mkstemp" >&5
13689 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13692 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13694 cat >>confdefs.h <<\EOF
13695 #define HAVE_MKSTEMP 1
13700 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13701 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13702 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13706 if test "$cf_with_ada" != "no" ; then
13708 cf_ada_make=gnatmake
13709 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13710 set dummy $cf_ada_make; ac_word=$2
13711 echo "$as_me:13711: checking for $ac_word" >&5
13712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13713 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13714 echo $ECHO_N "(cached) $ECHO_C" >&6
13716 if test -n "$gnat_exists"; then
13717 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13719 ac_save_IFS=$IFS; IFS=$ac_path_separator
13721 for ac_dir in $ac_dummy; do
13723 test -z "$ac_dir" && ac_dir=.
13724 $as_executable_p "$ac_dir/$ac_word" || continue
13725 ac_cv_prog_gnat_exists="yes"
13726 echo "$as_me:13726: found $ac_dir/$ac_word" >&5
13730 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13733 gnat_exists=$ac_cv_prog_gnat_exists
13734 if test -n "$gnat_exists"; then
13735 echo "$as_me:13735: result: $gnat_exists" >&5
13736 echo "${ECHO_T}$gnat_exists" >&6
13738 echo "$as_me:13738: result: no" >&5
13739 echo "${ECHO_T}no" >&6
13742 if test "$ac_cv_prog_gnat_exists" = no; then
13744 cf_cv_prog_gnat_correct=no
13747 echo "$as_me:13747: checking for gnat version" >&5
13748 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13749 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13750 grep '[0-9].[0-9][0-9]*' |\
13751 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13752 echo "$as_me:13752: result: $cf_gnat_version" >&5
13753 echo "${ECHO_T}$cf_gnat_version" >&6
13755 case $cf_gnat_version in
13756 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13757 cf_cv_prog_gnat_correct=yes
13760 { echo "$as_me:13760: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13761 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13762 cf_cv_prog_gnat_correct=no
13766 # Extract the first word of "m4", so it can be a program name with args.
13767 set dummy m4; ac_word=$2
13768 echo "$as_me:13768: checking for $ac_word" >&5
13769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13770 if test "${ac_cv_prog_M4_exists+set}" = set; then
13771 echo $ECHO_N "(cached) $ECHO_C" >&6
13773 if test -n "$M4_exists"; then
13774 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13776 ac_save_IFS=$IFS; IFS=$ac_path_separator
13778 for ac_dir in $ac_dummy; do
13780 test -z "$ac_dir" && ac_dir=.
13781 $as_executable_p "$ac_dir/$ac_word" || continue
13782 ac_cv_prog_M4_exists="yes"
13783 echo "$as_me:13783: found $ac_dir/$ac_word" >&5
13787 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13790 M4_exists=$ac_cv_prog_M4_exists
13791 if test -n "$M4_exists"; then
13792 echo "$as_me:13792: result: $M4_exists" >&5
13793 echo "${ECHO_T}$M4_exists" >&6
13795 echo "$as_me:13795: result: no" >&5
13796 echo "${ECHO_T}no" >&6
13799 if test "$ac_cv_prog_M4_exists" = no; then
13800 cf_cv_prog_gnat_correct=no
13801 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13803 if test "$cf_cv_prog_gnat_correct" = yes; then
13804 echo "$as_me:13804: checking if GNAT works" >&5
13805 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13807 rm -rf conftest* *~conftest*
13808 cat >>conftest.ads <<CF_EOF
13809 procedure conftest;
13811 cat >>conftest.adb <<CF_EOF
13814 procedure conftest is
13816 Text_IO.Put ("Hello World");
13818 GNAT.OS_Lib.OS_Exit (0);
13821 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13822 if ( ./conftest 1>&5 2>&1 ) ; then
13823 cf_cv_prog_gnat_correct=yes
13825 cf_cv_prog_gnat_correct=no
13828 cf_cv_prog_gnat_correct=no
13830 rm -rf conftest* *~conftest*
13832 echo "$as_me:13832: result: $cf_cv_prog_gnat_correct" >&5
13833 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13837 if test "$cf_cv_prog_gnat_correct" = yes; then
13839 echo "$as_me:13839: checking optimization options for ADAFLAGS" >&5
13840 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13844 ADAFLAGS="$ADAFLAGS -g"
13850 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13852 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13856 echo "$as_me:13856: result: $ADAFLAGS" >&5
13857 echo "${ECHO_T}$ADAFLAGS" >&6
13859 echo "$as_me:13859: checking if GNATPREP supports -T option" >&5
13860 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13861 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13862 echo $ECHO_N "(cached) $ECHO_C" >&6
13865 cf_cv_gnatprep_opt_t=no
13866 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13869 echo "$as_me:13869: result: $cf_cv_gnatprep_opt_t" >&5
13870 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13871 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13873 echo "$as_me:13873: checking if GNAT supports generics" >&5
13874 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13875 case $cf_gnat_version in
13877 cf_gnat_generics=yes
13880 cf_gnat_generics=no
13883 echo "$as_me:13883: result: $cf_gnat_generics" >&5
13884 echo "${ECHO_T}$cf_gnat_generics" >&6
13886 if test "$cf_gnat_generics" = yes
13888 cf_compile_generics=generics
13889 cf_generic_objects="\${GENOBJS}"
13891 cf_compile_generics=
13892 cf_generic_objects=
13895 echo "$as_me:13895: checking if GNAT supports SIGINT" >&5
13896 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13897 if test "${cf_cv_gnat_sigint+set}" = set; then
13898 echo $ECHO_N "(cached) $ECHO_C" >&6
13901 rm -rf conftest* *~conftest*
13902 cat >>conftest.ads <<CF_EOF
13903 with Ada.Interrupts.Names;
13905 package ConfTest is
13907 pragma Warnings (Off); -- the next pragma exists since 3.11p
13908 pragma Unreserve_All_Interrupts;
13909 pragma Warnings (On);
13911 protected Process is
13913 function Continue return Boolean;
13914 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13916 Done : Boolean := False;
13921 cat >>conftest.adb <<CF_EOF
13922 package body ConfTest is
13923 protected body Process is
13928 function Continue return Boolean is
13935 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13936 cf_cv_gnat_sigint=yes
13938 cf_cv_gnat_sigint=no
13940 rm -rf conftest* *~conftest*
13943 echo "$as_me:13943: result: $cf_cv_gnat_sigint" >&5
13944 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
13946 if test $cf_cv_gnat_sigint = yes ; then
13949 USE_GNAT_SIGINT="#"
13952 cf_gnat_libraries=no
13953 cf_gnat_projects=no
13955 if test "$enable_gnat_projects" != no ; then
13956 echo "$as_me:13956: checking if GNAT supports project files" >&5
13957 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
13958 case $cf_gnat_version in
13962 case $cf_cv_system_name in
13966 mkdir conftest.src conftest.bin conftest.lib
13968 rm -rf conftest* *~conftest*
13969 cat >>library.gpr <<CF_EOF
13971 Kind := External ("LIB_KIND");
13972 for Library_Name use "ConfTest";
13973 for Object_Dir use ".";
13974 for Library_ALI_Dir use External("LIBRARY_DIR");
13975 for Library_Version use External ("SONAME");
13976 for Library_Kind use Kind;
13977 for Library_Dir use External("BUILD_DIR");
13978 Source_Dir := External ("SOURCE_DIR");
13979 for Source_Dirs use (Source_Dir);
13982 cat >>confpackage.ads <<CF_EOF
13983 package ConfPackage is
13984 procedure conftest;
13987 cat >>confpackage.adb <<CF_EOF
13989 package body ConfPackage is
13990 procedure conftest is
13992 Text_IO.Put ("Hello World");
13997 if ( $cf_ada_make $ADAFLAGS \
13999 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
14000 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
14001 -XSOURCE_DIR=`pwd` \
14002 -XSONAME=libConfTest.so.1 \
14003 -XLIB_KIND=static 1>&5 2>&1 ) ; then
14004 cf_gnat_projects=yes
14007 if test -f conftest.lib/confpackage.ali
14009 cf_gnat_libraries=yes
14011 rm -rf conftest* *~conftest*
14016 echo "$as_me:14016: result: $cf_gnat_projects" >&5
14017 echo "${ECHO_T}$cf_gnat_projects" >&6
14018 fi # enable_gnat_projects
14020 if test $cf_gnat_projects = yes
14022 echo "$as_me:14022: checking if GNAT supports libraries" >&5
14023 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
14024 echo "$as_me:14024: result: $cf_gnat_libraries" >&5
14025 echo "${ECHO_T}$cf_gnat_libraries" >&6
14028 if test "$cf_gnat_projects" = yes
14030 USE_OLD_MAKERULES="#"
14031 USE_GNAT_PROJECTS=""
14033 USE_OLD_MAKERULES=""
14034 USE_GNAT_PROJECTS="#"
14037 if test "$cf_gnat_libraries" = yes
14039 USE_GNAT_LIBRARIES=""
14041 USE_GNAT_LIBRARIES="#"
14044 echo "$as_me:14044: checking for ada-compiler" >&5
14045 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
14047 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14048 if test "${with_ada_compiler+set}" = set; then
14049 withval="$with_ada_compiler"
14050 cf_ada_compiler=$withval
14052 cf_ada_compiler=gnatmake
14055 echo "$as_me:14055: result: $cf_ada_compiler" >&5
14056 echo "${ECHO_T}$cf_ada_compiler" >&6
14058 cf_ada_package=terminal_interface
14060 echo "$as_me:14060: checking for ada-include" >&5
14061 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
14063 # Check whether --with-ada-include or --without-ada-include was given.
14064 if test "${with_ada_include+set}" = set; then
14065 withval="$with_ada_include"
14068 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
14069 fi; if test -n "$prefix/share/ada/adainclude" ; then
14071 if test "x$prefix" != xNONE; then
14072 cf_path_syntax="$prefix"
14074 cf_path_syntax="$ac_default_prefix"
14077 case ".$withval" in
14078 (.\$\(*\)*|.\'*\'*)
14082 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14084 (.\${*prefix}*|.\${*dir}*)
14085 eval withval="$withval"
14086 case ".$withval" in
14088 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14093 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14096 { { echo "$as_me:14096: error: expected a pathname, not \"$withval\"" >&5
14097 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14098 { (exit 1); exit 1; }; }
14103 eval ADA_INCLUDE="$withval"
14105 echo "$as_me:14105: result: $ADA_INCLUDE" >&5
14106 echo "${ECHO_T}$ADA_INCLUDE" >&6
14108 echo "$as_me:14108: checking for ada-objects" >&5
14109 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
14111 # Check whether --with-ada-objects or --without-ada-objects was given.
14112 if test "${with_ada_objects+set}" = set; then
14113 withval="$with_ada_objects"
14116 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
14117 fi; if test -n "$prefix/lib/ada/adalib" ; then
14119 if test "x$prefix" != xNONE; then
14120 cf_path_syntax="$prefix"
14122 cf_path_syntax="$ac_default_prefix"
14125 case ".$withval" in
14126 (.\$\(*\)*|.\'*\'*)
14130 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14132 (.\${*prefix}*|.\${*dir}*)
14133 eval withval="$withval"
14134 case ".$withval" in
14136 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14141 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14144 { { echo "$as_me:14144: error: expected a pathname, not \"$withval\"" >&5
14145 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14146 { (exit 1); exit 1; }; }
14151 eval ADA_OBJECTS="$withval"
14153 echo "$as_me:14153: result: $ADA_OBJECTS" >&5
14154 echo "${ECHO_T}$ADA_OBJECTS" >&6
14156 echo "$as_me:14156: checking if an Ada95 shared-library should be built" >&5
14157 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
14159 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
14160 if test "${with_ada_sharedlib+set}" = set; then
14161 withval="$with_ada_sharedlib"
14162 with_ada_sharedlib=$withval
14164 with_ada_sharedlib=no
14166 echo "$as_me:14166: result: $with_ada_sharedlib" >&5
14167 echo "${ECHO_T}$with_ada_sharedlib" >&6
14169 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
14170 MAKE_ADA_SHAREDLIB="#"
14172 if test "x$with_ada_sharedlib" != xno
14174 MAKE_ADA_SHAREDLIB=
14175 if test "x$with_ada_sharedlib" != xyes
14177 ADA_SHAREDLIB="$with_ada_sharedlib"
14182 { { echo "$as_me:14182: error: No usable Ada compiler found" >&5
14183 echo "$as_me: error: No usable Ada compiler found" >&2;}
14184 { (exit 1); exit 1; }; }
14187 { { echo "$as_me:14187: error: The Ada compiler is needed for this package" >&5
14188 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
14189 { (exit 1); exit 1; }; }
14192 ################################################################################
14199 ### Construct the list of include-directories to be generated
14201 if test "$srcdir" != "."; then
14202 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14204 CPPFLAGS="-I../include $CPPFLAGS"
14205 if test "$srcdir" != "."; then
14206 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
14208 CPPFLAGS="-I. $CPPFLAGS"
14210 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
14211 if test "$srcdir" != "."; then
14212 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14214 if test "$GCC" != yes; then
14215 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14216 elif test "$includedir" != "/usr/include"; then
14217 if test "$includedir" = '${prefix}/include' ; then
14218 if test x$prefix != x/usr ; then
14219 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14222 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14226 ### Build up pieces for makefile rules
14227 echo "$as_me:14227: checking default library suffix" >&5
14228 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14230 case $DFT_LWR_MODEL in
14231 (libtool) DFT_ARG_SUFFIX='' ;;
14232 (normal) DFT_ARG_SUFFIX='' ;;
14233 (debug) DFT_ARG_SUFFIX='_g' ;;
14234 (profile) DFT_ARG_SUFFIX='_p' ;;
14235 (shared) DFT_ARG_SUFFIX='' ;;
14237 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14238 echo "$as_me:14238: result: $DFT_ARG_SUFFIX" >&5
14239 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14241 echo "$as_me:14241: checking default library-dependency suffix" >&5
14242 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14244 case X$DFT_LWR_MODEL in
14246 DFT_LIB_SUFFIX='.la'
14247 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14250 DFT_LIB_SUFFIX='_g.a'
14251 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14254 DFT_LIB_SUFFIX='_p.a'
14255 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14258 case $cf_cv_system_name in
14260 DFT_LIB_SUFFIX='.so'
14261 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14263 (cygwin*|msys*|mingw*)
14264 DFT_LIB_SUFFIX='.dll'
14265 DFT_DEP_SUFFIX='.dll.a'
14268 DFT_LIB_SUFFIX='.dylib'
14269 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14274 DFT_LIB_SUFFIX='.so'
14275 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14278 DFT_LIB_SUFFIX='.sl'
14279 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14284 DFT_LIB_SUFFIX='.so'
14285 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14290 DFT_LIB_SUFFIX='.a'
14291 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14294 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
14296 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
14297 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
14299 echo "$as_me:14299: result: $DFT_DEP_SUFFIX" >&5
14300 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14302 echo "$as_me:14302: checking default object directory" >&5
14303 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14305 case $DFT_LWR_MODEL in
14306 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
14307 (normal) DFT_OBJ_SUBDIR='objects' ;;
14308 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
14309 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
14311 case $cf_cv_system_name in
14313 DFT_OBJ_SUBDIR='objects' ;;
14315 DFT_OBJ_SUBDIR='obj_s' ;;
14318 echo "$as_me:14318: result: $DFT_OBJ_SUBDIR" >&5
14319 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14321 ### Set up low-level terminfo dependencies for makefiles.
14323 if test "$DFT_LWR_MODEL" = shared ; then
14324 case $cf_cv_system_name in
14326 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
14329 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
14334 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
14336 ### Construct the list of subdirectories for which we'll customize makefiles
14337 ### with the appropriate compile-rules.
14339 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
14341 cat >>confdefs.h <<EOF
14342 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
14345 ### Now that we're done running tests, add the compiler-warnings, if any
14350 cf_new_extra_cppflags=
14352 for cf_add_cflags in $EXTRA_CFLAGS
14354 case $cf_fix_cppflags in
14356 case $cf_add_cflags in
14357 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14358 case $cf_add_cflags in
14360 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14362 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14363 && test -z "${cf_tst_cflags}" \
14364 && cf_fix_cppflags=yes
14366 if test $cf_fix_cppflags = yes ; then
14367 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14369 elif test "${cf_tst_cflags}" = "\"'" ; then
14370 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14375 case "$CPPFLAGS" in
14379 case $cf_add_cflags in
14381 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14383 CPPFLAGS=`echo "$CPPFLAGS" | \
14384 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14385 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14389 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14394 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14399 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14401 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14403 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14404 && test -z "${cf_tst_cflags}" \
14405 && cf_fix_cppflags=no
14410 if test -n "$cf_new_cflags" ; then
14412 CFLAGS="$CFLAGS $cf_new_cflags"
14415 if test -n "$cf_new_cppflags" ; then
14417 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14420 if test -n "$cf_new_extra_cppflags" ; then
14422 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14425 ################################################################################
14431 NCURSES_SHLIB2="sh -c"
14433 ADA_SUBDIRS="include gen src doc"
14434 if test "x$cf_with_tests" != "xno" ; then
14435 ADA_SUBDIRS="$ADA_SUBDIRS samples"
14437 for cf_dir in $ADA_SUBDIRS
14439 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
14446 # match layout used by make-tar.sh
14447 ADAHTML_DIR=../doc/ada
14449 if test "x$cross_compiling" = xyes ; then
14450 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
14452 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
14455 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
14456 ac_config_commands="$ac_config_commands default"
14457 cat >confcache <<\_ACEOF
14458 # This file is a shell script that caches the results of configure
14459 # tests run on this system so they can be shared between configure
14460 # scripts and configure runs, see configure's option --config-cache.
14461 # It is not useful on other systems. If it contains results you don't
14462 # want to keep, you may remove or edit it.
14464 # config.status only pays attention to the cache file if you give it
14465 # the --recheck option to rerun configure.
14467 # `ac_cv_env_foo' variables (set or unset) will be overriden when
14468 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14469 # following values.
14473 # The following way of writing the cache mishandles newlines in values,
14474 # but we know of no workaround that is simple, portable, and efficient.
14475 # So, don't put newlines in cache variables' values.
14476 # Ultrix sh set writes to stderr and can't be redirected directly,
14477 # and sets the high bit in the cache file unless we assign to the vars.
14480 case `(ac_space=' '; set | grep ac_space) 2>&1` in
14482 # `set' does not quote correctly, so add quotes (double-quote
14483 # substitution turns \\\\ into \\, and sed turns \\ into \).
14486 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14489 # `set' quotes correctly as required by POSIX, so do not add quotes.
14491 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14498 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14500 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14502 if cmp -s $cache_file confcache; then :; else
14503 if test -w $cache_file; then
14504 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14505 cat confcache >$cache_file
14507 echo "not updating unwritable cache $cache_file"
14512 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14513 # Let make expand exec_prefix.
14514 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14516 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14517 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14518 # trailing colons and then remove the whole line if VPATH becomes empty
14519 # (actually we leave an empty line to preserve line numbers).
14520 if test "x$srcdir" = x.; then
14521 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14522 s/:*\$(srcdir):*/:/;
14523 s/:*\${srcdir}:*/:/;
14525 s/^\([^=]*=[ ]*\):*/\1/;
14531 DEFS=-DHAVE_CONFIG_H
14533 : ${CONFIG_STATUS=./config.status}
14534 ac_clean_files_save=$ac_clean_files
14535 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14536 { echo "$as_me:14536: creating $CONFIG_STATUS" >&5
14537 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14538 cat >$CONFIG_STATUS <<_ACEOF
14540 # Generated automatically by configure.
14541 # Run this file to recreate the current configuration.
14542 # Compiler output produced by configure, useful for debugging
14543 # configure, is in config.log if it exists.
14546 SHELL=\${CONFIG_SHELL-$SHELL}
14547 ac_cs_invocation="\$0 \$@"
14551 cat >>$CONFIG_STATUS <<\_ACEOF
14552 # Be Bourne compatible
14553 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14556 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14560 # Name of the executable.
14561 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14563 if expr a : '\(a\)' >/dev/null 2>&1; then
14569 rm -f conf$$ conf$$.exe conf$$.file
14571 if ln -s conf$$.file conf$$ 2>/dev/null; then
14572 # We could just check for DJGPP; but this test a) works b) is more generic
14573 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14574 if test -f conf$$.exe; then
14575 # Don't use ln at all; we don't have any links
14580 elif ln conf$$.file conf$$ 2>/dev/null; then
14585 rm -f conf$$ conf$$.exe conf$$.file
14587 as_executable_p="test -f"
14589 # Support unset when possible.
14590 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14597 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14598 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14599 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14600 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14601 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14602 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14603 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14604 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14607 # We need space, tab and new line, in precisely that order.
14613 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14619 # Files that config.status was made for.
14620 if test -n "$ac_config_files"; then
14621 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14624 if test -n "$ac_config_headers"; then
14625 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14628 if test -n "$ac_config_links"; then
14629 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14632 if test -n "$ac_config_commands"; then
14633 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14636 cat >>$CONFIG_STATUS <<\EOF
14639 \`$as_me' instantiates files from templates according to the
14640 current configuration.
14642 Usage: $0 [OPTIONS] [FILE]...
14644 -h, --help print this help, then exit
14645 -V, --version print version number, then exit
14646 -d, --debug don't remove temporary files
14647 --recheck update $as_me by reconfiguring in the same conditions
14648 --file=FILE[:TEMPLATE]
14649 instantiate the configuration file FILE
14650 --header=FILE[:TEMPLATE]
14651 instantiate the configuration header FILE
14653 Configuration files:
14656 Configuration headers:
14659 Configuration commands:
14662 Report bugs to <dickey@invisible-island.net>."
14665 cat >>$CONFIG_STATUS <<EOF
14668 configured by $0, generated by GNU Autoconf 2.52.20150926,
14669 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14671 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14672 Free Software Foundation, Inc.
14673 This config.status script is free software; the Free Software Foundation
14674 gives unlimited permission to copy, distribute and modify it."
14679 cat >>$CONFIG_STATUS <<\EOF
14680 # If no file are specified by the user, then we need to provide default
14681 # value. By we need to know if files were specified by the user.
14687 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14688 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14690 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14694 *) # This is not an option, so the user has probably given explicit
14696 ac_need_defaults=false;;
14700 # Handling of the options.
14702 cat >>$CONFIG_STATUS <<EOF
14703 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14704 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14705 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14707 cat >>$CONFIG_STATUS <<\EOF
14708 --version | --vers* | -V )
14709 echo "$ac_cs_version"; exit 0 ;;
14711 # Conflict between --help and --header
14712 { { echo "$as_me:14712: error: ambiguous option: $1
14713 Try \`$0 --help' for more information." >&5
14714 echo "$as_me: error: ambiguous option: $1
14715 Try \`$0 --help' for more information." >&2;}
14716 { (exit 1); exit 1; }; };;
14717 --help | --hel | -h )
14718 echo "$ac_cs_usage"; exit 0 ;;
14719 --debug | --d* | -d )
14721 --file | --fil | --fi | --f )
14723 CONFIG_FILES="$CONFIG_FILES $1"
14724 ac_need_defaults=false;;
14725 --header | --heade | --head | --hea )
14727 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14728 ac_need_defaults=false;;
14730 # This is an error.
14731 -*) { { echo "$as_me:14731: error: unrecognized option: $1
14732 Try \`$0 --help' for more information." >&5
14733 echo "$as_me: error: unrecognized option: $1
14734 Try \`$0 --help' for more information." >&2;}
14735 { (exit 1); exit 1; }; } ;;
14737 *) ac_config_targets="$ac_config_targets $1" ;;
14746 ## ----------------------- ##
14747 ## Running config.status. ##
14748 ## ----------------------- ##
14750 This file was extended by $as_me 2.52.20150926, executed with
14751 CONFIG_FILES = $CONFIG_FILES
14752 CONFIG_HEADERS = $CONFIG_HEADERS
14753 CONFIG_LINKS = $CONFIG_LINKS
14754 CONFIG_COMMANDS = $CONFIG_COMMANDS
14755 > $ac_cs_invocation
14756 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14761 cat >>$CONFIG_STATUS <<EOF
14763 # INIT-COMMANDS section.
14766 ### Special initialization commands, used to pass information from the
14767 ### configuration-run into config.status
14770 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14771 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14772 LIB_NAME="$LIB_NAME"
14773 LIB_PREFIX="$LIB_PREFIX"
14774 LIB_SUFFIX="$LIB_SUFFIX"
14776 NCURSES_MAJOR="$NCURSES_MAJOR"
14777 NCURSES_MINOR="$NCURSES_MINOR"
14778 NCURSES_PATCH="$NCURSES_PATCH"
14779 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14780 cf_cv_abi_version="$cf_cv_abi_version"
14781 cf_cv_rel_version="$cf_cv_rel_version"
14782 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14783 cf_cv_shared_soname='$cf_cv_shared_soname'
14784 cf_cv_shlib_version="$cf_cv_shlib_version"
14785 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14786 cf_cv_system_name="$cf_cv_system_name"
14792 cat >>$CONFIG_STATUS <<\EOF
14793 for ac_config_target in $ac_config_targets
14795 case "$ac_config_target" in
14796 # Handling of arguments.
14797 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14798 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14799 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14800 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14801 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14802 *) { { echo "$as_me:14802: error: invalid argument: $ac_config_target" >&5
14803 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14804 { (exit 1); exit 1; }; };;
14808 # If the user did not use the arguments to specify the items to instantiate,
14809 # then the envvar interface is used. Set only those that are not.
14810 # We use the long form for the default assignment because of an extremely
14811 # bizarre bug on SunOS 4.1.3.
14812 if $ac_need_defaults; then
14813 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14814 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14815 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14818 # Create a temporary directory, and hook for its removal unless debugging.
14821 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14822 trap '{ (exit 1); exit 1; }' 1 2 13 15
14825 # Create a (secure) tmp directory for tmp files.
14828 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14829 test -n "$tmp" && test -d "$tmp"
14832 tmp=$TMPDIR/cs$$-$RANDOM
14833 (umask 077 && mkdir $tmp)
14836 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14837 { (exit 1); exit 1; }
14842 cat >>$CONFIG_STATUS <<EOF
14845 # CONFIG_FILES section.
14848 # No need to generate the scripts if there are no CONFIG_FILES.
14849 # This happens for instance when ./config.status config.h
14850 if test -n "\$CONFIG_FILES"; then
14851 # Protect against being on the right side of a sed subst in config.status.
14852 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14853 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14854 s,@SHELL@,$SHELL,;t t
14855 s,@exec_prefix@,$exec_prefix,;t t
14856 s,@prefix@,$prefix,;t t
14857 s,@program_transform_name@,$program_transform_name,;t t
14858 s,@bindir@,$bindir,;t t
14859 s,@sbindir@,$sbindir,;t t
14860 s,@libexecdir@,$libexecdir,;t t
14861 s,@datarootdir@,$datarootdir,;t t
14862 s,@datadir@,$datadir,;t t
14863 s,@sysconfdir@,$sysconfdir,;t t
14864 s,@sharedstatedir@,$sharedstatedir,;t t
14865 s,@localstatedir@,$localstatedir,;t t
14866 s,@libdir@,$libdir,;t t
14867 s,@includedir@,$includedir,;t t
14868 s,@oldincludedir@,$oldincludedir,;t t
14869 s,@infodir@,$infodir,;t t
14870 s,@mandir@,$mandir,;t t
14871 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14872 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14873 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14874 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14875 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14876 s,@build_alias@,$build_alias,;t t
14877 s,@host_alias@,$host_alias,;t t
14878 s,@target_alias@,$target_alias,;t t
14879 s,@ECHO_C@,$ECHO_C,;t t
14880 s,@ECHO_N@,$ECHO_N,;t t
14881 s,@ECHO_T@,$ECHO_T,;t t
14882 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14883 s,@DEFS@,$DEFS,;t t
14884 s,@LIBS@,$LIBS,;t t
14885 s,@top_builddir@,$top_builddir,;t t
14886 s,@build@,$build,;t t
14887 s,@build_cpu@,$build_cpu,;t t
14888 s,@build_vendor@,$build_vendor,;t t
14889 s,@build_os@,$build_os,;t t
14890 s,@host@,$host,;t t
14891 s,@host_cpu@,$host_cpu,;t t
14892 s,@host_vendor@,$host_vendor,;t t
14893 s,@host_os@,$host_os,;t t
14894 s,@target@,$target,;t t
14895 s,@target_cpu@,$target_cpu,;t t
14896 s,@target_vendor@,$target_vendor,;t t
14897 s,@target_os@,$target_os,;t t
14899 s,@CFLAGS@,$CFLAGS,;t t
14900 s,@LDFLAGS@,$LDFLAGS,;t t
14901 s,@CPPFLAGS@,$CPPFLAGS,;t t
14902 s,@ac_ct_CC@,$ac_ct_CC,;t t
14903 s,@EXEEXT@,$EXEEXT,;t t
14904 s,@OBJEXT@,$OBJEXT,;t t
14905 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14908 s,@EGREP@,$EGREP,;t t
14909 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14910 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14911 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14912 s,@LN_S@,$LN_S,;t t
14913 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14914 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14915 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14916 s,@SET_MAKE@,$SET_MAKE,;t t
14917 s,@CTAGS@,$CTAGS,;t t
14918 s,@ETAGS@,$ETAGS,;t t
14919 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14920 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14921 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14922 s,@RANLIB@,$RANLIB,;t t
14923 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14925 s,@ac_ct_LD@,$ac_ct_LD,;t t
14927 s,@ac_ct_AR@,$ac_ct_AR,;t t
14928 s,@ARFLAGS@,$ARFLAGS,;t t
14929 s,@DESTDIR@,$DESTDIR,;t t
14930 s,@BUILD_CC@,$BUILD_CC,;t t
14931 s,@BUILD_CPP@,$BUILD_CPP,;t t
14932 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14933 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14934 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14935 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14936 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14937 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14938 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14939 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14940 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14941 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
14942 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14943 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14944 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14945 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14946 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14947 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14948 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14949 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14950 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14951 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14952 s,@CC_G_OPT@,$CC_G_OPT,;t t
14953 s,@LD_MODEL@,$LD_MODEL,;t t
14954 s,@shlibdir@,$shlibdir,;t t
14955 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
14956 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14957 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
14958 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14959 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14960 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
14961 s,@LINK_PROGS@,$LINK_PROGS,;t t
14962 s,@LINK_TESTS@,$LINK_TESTS,;t t
14963 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14964 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14965 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14966 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14967 s,@RPATH_LIST@,$RPATH_LIST,;t t
14968 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14969 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14970 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14971 s,@PTHREAD@,$PTHREAD,;t t
14972 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
14973 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14974 s,@ECHO_LT@,$ECHO_LT,;t t
14975 s,@ECHO_LD@,$ECHO_LD,;t t
14976 s,@RULE_CC@,$RULE_CC,;t t
14977 s,@SHOW_CC@,$SHOW_CC,;t t
14978 s,@ECHO_CC@,$ECHO_CC,;t t
14979 s,@ADAFLAGS@,$ADAFLAGS,;t t
14980 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14981 s,@ADA_TRACE@,$ADA_TRACE,;t t
14982 s,@gnat_exists@,$gnat_exists,;t t
14983 s,@M4_exists@,$M4_exists,;t t
14984 s,@cf_ada_make@,$cf_ada_make,;t t
14985 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
14986 s,@cf_compile_generics@,$cf_compile_generics,;t t
14987 s,@cf_generic_objects@,$cf_generic_objects,;t t
14988 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
14989 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
14990 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
14991 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
14992 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14993 s,@cf_ada_package@,$cf_ada_package,;t t
14994 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14995 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14996 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
14997 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
14998 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
14999 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15000 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15001 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15002 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15003 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15004 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
15005 s,@TEST_ARG2@,$TEST_ARG2,;t t
15006 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
15007 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
15008 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15009 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15010 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
15011 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
15012 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
15017 cat >>$CONFIG_STATUS <<\EOF
15018 # Split the substitutions into bite-sized pieces for seds with
15019 # small command number limits, like on Digital OSF/1 and HP-UX.
15020 ac_max_sed_lines=48
15021 ac_sed_frag=1 # Number of current file.
15022 ac_beg=1 # First line for current file.
15023 ac_end=$ac_max_sed_lines # Line after last line for current file.
15026 while $ac_more_lines; do
15027 if test $ac_beg -gt 1; then
15028 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15030 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15032 if test ! -s $tmp/subs.frag; then
15033 ac_more_lines=false
15035 # The purpose of the label and of the branching condition is to
15036 # speed up the sed processing (if there are no `@' at all, there
15037 # is no need to browse any of the substitutions).
15038 # These are the two extra sed commands mentioned above.
15040 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15041 # It is possible to make a multiline substitution using escaped newlines.
15042 # Ensure that we do not split the substitution between script fragments.
15044 ac_END=`expr $ac_end + $ac_max_sed_lines`
15045 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
15046 if test -s $tmp/subs.next; then
15047 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
15048 if test ! -s $tmp/subs.edit; then
15049 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
15050 if test ! -s $tmp/subs.edit; then
15051 if test $ac_beg -gt 1; then
15052 ac_end=`expr $ac_end - 1`
15059 if test -z "$ac_sed_cmds"; then
15060 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15062 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15064 ac_sed_frag=`expr $ac_sed_frag + 1`
15066 ac_end=`expr $ac_end + $ac_max_sed_lines`
15069 if test -z "$ac_sed_cmds"; then
15072 fi # test -n "$CONFIG_FILES"
15075 cat >>$CONFIG_STATUS <<\EOF
15076 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15077 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15079 - | *:- | *:-:* ) # input from stdin
15081 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15082 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15083 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15084 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15085 * ) ac_file_in=$ac_file.in ;;
15088 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15089 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15090 X"$ac_file" : 'X\(//\)[^/]' \| \
15091 X"$ac_file" : 'X\(//\)$' \| \
15092 X"$ac_file" : 'X\(/\)' \| \
15093 . : '\(.\)' 2>/dev/null ||
15095 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15096 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15097 /^X\(\/\/\)$/{ s//\1/; q; }
15098 /^X\(\/\).*/{ s//\1/; q; }
15100 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15101 { case "$ac_dir" in
15102 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15106 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15107 case $as_mkdir_dir in
15108 # Skip DOS drivespec
15109 ?:) as_incr_dir=$as_mkdir_dir ;;
15111 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15112 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15117 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15118 # A "../" for each directory in $ac_dir_suffix.
15119 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15121 ac_dir_suffix= ac_dots=
15126 if test -z "$ac_dots"; then
15129 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15131 [\\/]* | ?:[\\/]* )
15132 ac_srcdir=$srcdir$ac_dir_suffix;
15133 ac_top_srcdir=$srcdir ;;
15134 *) # Relative path.
15135 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15136 ac_top_srcdir=$ac_dots$srcdir ;;
15140 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15141 *) ac_INSTALL=$ac_dots$INSTALL ;;
15144 if test x"$ac_file" != x-; then
15145 { echo "$as_me:15145: creating $ac_file" >&5
15146 echo "$as_me: creating $ac_file" >&6;}
15149 # Let's still pretend it is `configure' which instantiates (i.e., don't
15150 # use $as_me), people would be surprised to read:
15151 # /* config.h. Generated automatically by config.status. */
15152 configure_input="Generated automatically from `echo $ac_file_in |
15153 sed 's,.*/,,'` by configure."
15155 # First look for the input files in the build tree, otherwise in the
15157 ac_file_inputs=`IFS=:
15158 for f in $ac_file_in; do
15160 -) echo $tmp/stdin ;;
15162 # Absolute (can't be DOS-style, as IFS=:)
15163 test -f "$f" || { { echo "$as_me:15163: error: cannot find input file: $f" >&5
15164 echo "$as_me: error: cannot find input file: $f" >&2;}
15165 { (exit 1); exit 1; }; }
15168 if test -f "$f"; then
15171 elif test -f "$srcdir/$f"; then
15176 { { echo "$as_me:15176: error: cannot find input file: $f" >&5
15177 echo "$as_me: error: cannot find input file: $f" >&2;}
15178 { (exit 1); exit 1; }; }
15181 done` || { (exit 1); exit 1; }
15183 cat >>$CONFIG_STATUS <<\EOF
15184 ac_warn_datarootdir=no
15185 if test x"$ac_file" != x-; then
15186 for ac_item in $ac_file_inputs
15188 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
15189 if test -n "$ac_seen"; then
15190 ac_used=`grep '@datarootdir@' $ac_item`
15191 if test -z "$ac_used"; then
15192 { echo "$as_me:15192: WARNING: datarootdir was used implicitly but not set:
15194 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
15196 ac_warn_datarootdir=yes
15199 ac_seen=`grep '${datarootdir}' $ac_item`
15200 if test -n "$ac_seen"; then
15201 { echo "$as_me:15201: WARNING: datarootdir was used explicitly but not set:
15203 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
15205 ac_warn_datarootdir=yes
15210 if test "x$ac_warn_datarootdir" = xyes; then
15211 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
15215 cat >>$CONFIG_STATUS <<EOF
15219 cat >>$CONFIG_STATUS <<\EOF
15221 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15222 s,@configure_input@,$configure_input,;t t
15223 s,@srcdir@,$ac_srcdir,;t t
15224 s,@top_srcdir@,$ac_top_srcdir,;t t
15225 s,@INSTALL@,$ac_INSTALL,;t t
15226 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15228 if test x"$ac_file" != x-; then
15229 cp $tmp/out $ac_file
15231 for ac_name in prefix exec_prefix datarootdir
15233 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
15234 if test -n "$ac_seen"; then
15235 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
15236 if test -z "$ac_init"; then
15237 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
15238 { echo "$as_me:15238: WARNING: Variable $ac_name is used but was not set:
15240 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
15245 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
15246 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
15247 if test -s $tmp/out; then
15248 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
15249 { echo "$as_me:15249: WARNING: Some variables may not be substituted:
15251 echo "$as_me: WARNING: Some variables may not be substituted:
15261 cat >>$CONFIG_STATUS <<\EOF
15264 # CONFIG_HEADER section.
15267 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15268 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15270 # ac_d sets the value in "#define NAME VALUE" lines.
15271 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
15272 ac_dB='[ ].*$,\1#\2'
15275 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15276 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15277 ac_iB='\([ ]\),\1#\2define\3'
15280 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15281 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15282 ac_uB='$,\1#\2define\3'
15286 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15287 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15289 - | *:- | *:-:* ) # input from stdin
15291 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15292 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15293 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15294 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15295 * ) ac_file_in=$ac_file.in ;;
15298 test x"$ac_file" != x- && { echo "$as_me:15298: creating $ac_file" >&5
15299 echo "$as_me: creating $ac_file" >&6;}
15301 # First look for the input files in the build tree, otherwise in the
15303 ac_file_inputs=`IFS=:
15304 for f in $ac_file_in; do
15306 -) echo $tmp/stdin ;;
15308 # Absolute (can't be DOS-style, as IFS=:)
15309 test -f "$f" || { { echo "$as_me:15309: error: cannot find input file: $f" >&5
15310 echo "$as_me: error: cannot find input file: $f" >&2;}
15311 { (exit 1); exit 1; }; }
15314 if test -f "$f"; then
15317 elif test -f "$srcdir/$f"; then
15322 { { echo "$as_me:15322: error: cannot find input file: $f" >&5
15323 echo "$as_me: error: cannot find input file: $f" >&2;}
15324 { (exit 1); exit 1; }; }
15327 done` || { (exit 1); exit 1; }
15328 # Remove the trailing spaces.
15329 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
15333 # Transform confdefs.h into a list of #define's. We won't use it as a sed
15334 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
15335 # be either 'cat' or 'sort'.
15336 cat confdefs.h | uniq >conftest.vals
15338 # Break up conftest.vals because some shells have a limit on
15339 # the size of here documents, and old seds have small limits too.
15341 rm -f conftest.tail
15342 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
15343 while grep . conftest.vals >/dev/null
15345 # Write chunks of a limited-size here document to conftest.frag.
15346 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15347 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15348 echo 'CEOF' >> $CONFIG_STATUS
15349 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15350 rm -f conftest.vals
15351 mv conftest.tail conftest.vals
15353 rm -f conftest.vals
15355 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15357 echo ' cat >> conftest.edit <<CEOF
15358 /@DEFS@/r conftest.frag
15361 sed -f conftest.edit $tmp/in > $tmp/out
15363 mv $tmp/out $tmp/in
15364 rm -f conftest.edit conftest.frag
15365 ' >> $CONFIG_STATUS
15367 cat >>$CONFIG_STATUS <<\EOF
15368 # Let's still pretend it is `configure' which instantiates (i.e., don't
15369 # use $as_me), people would be surprised to read:
15370 # /* config.h. Generated automatically by config.status. */
15371 if test x"$ac_file" = x-; then
15372 echo "/* Generated automatically by configure. */" >$tmp/config.h
15374 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
15376 cat $tmp/in >>$tmp/config.h
15378 if test x"$ac_file" != x-; then
15379 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15380 { echo "$as_me:15380: $ac_file is unchanged" >&5
15381 echo "$as_me: $ac_file is unchanged" >&6;}
15383 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15384 X"$ac_file" : 'X\(//\)[^/]' \| \
15385 X"$ac_file" : 'X\(//\)$' \| \
15386 X"$ac_file" : 'X\(/\)' \| \
15387 . : '\(.\)' 2>/dev/null ||
15389 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15390 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15391 /^X\(\/\/\)$/{ s//\1/; q; }
15392 /^X\(\/\).*/{ s//\1/; q; }
15394 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15395 { case "$ac_dir" in
15396 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15400 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15401 case $as_mkdir_dir in
15402 # Skip DOS drivespec
15403 ?:) as_incr_dir=$as_mkdir_dir ;;
15405 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15406 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15413 mv $tmp/config.h $ac_file
15417 rm -f $tmp/config.h
15421 cat >>$CONFIG_STATUS <<\EOF
15423 # CONFIG_COMMANDS section.
15425 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15426 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15427 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15431 if test -z "$USE_OLD_MAKERULES" ; then
15432 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
15439 cat >>$CONFIG_STATUS <<\EOF
15441 { (exit 0); exit 0; }
15443 chmod +x $CONFIG_STATUS
15444 ac_clean_files=$ac_clean_files_save
15446 # configure is writing to config.log, and then calls config.status.
15447 # config.status does its own redirection, appending to config.log.
15448 # Unfortunately, on DOS this fails, as config.log is still kept open
15449 # by configure, so config.status won't be able to write to it; its
15450 # output is simply discarded. So we exec the FD to /dev/null,
15451 # effectively closing config.log, so it can be properly (re)opened and
15452 # appended to by config.status. When coming back to configure, we
15453 # need to make the FD available again.
15454 if test "$no_create" != yes; then
15457 $SHELL $CONFIG_STATUS || ac_cs_success=false
15459 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15460 # would make configure fail if this is the last instruction.
15461 $ac_cs_success || { (exit 1); exit 1; }
15463 ${MAKE:-make} preinstall