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/^[^ ]*[ ][ ]*//'`
1841 CC=`echo "$CC " | sed -e 's/[ ]-[IUD][^ ][^ ]*//g' -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*|gnu*|mint*|k*bsd*-gnu)
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
10122 cf_xopen_source="-D_OSF_SOURCE"
10125 cf_xopen_source="-D_QNX_SOURCE"
10128 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10131 cf_xopen_source="-D__EXTENSIONS__"
10132 cf_cv_xopen_source=broken
10134 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10140 echo "$as_me:10140: checking if we should define _XOPEN_SOURCE" >&5
10141 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10142 if test "${cf_cv_xopen_source+set}" = set; then
10143 echo $ECHO_N "(cached) $ECHO_C" >&6
10146 cat >conftest.$ac_ext <<_ACEOF
10147 #line 10147 "configure"
10148 #include "confdefs.h"
10150 #include <stdlib.h>
10151 #include <string.h>
10152 #include <sys/types.h>
10158 #ifndef _XOPEN_SOURCE
10165 rm -f conftest.$ac_objext
10166 if { (eval echo "$as_me:10166: \"$ac_compile\"") >&5
10167 (eval $ac_compile) 2>&5
10169 echo "$as_me:10169: \$? = $ac_status" >&5
10170 (exit $ac_status); } &&
10171 { ac_try='test -s conftest.$ac_objext'
10172 { (eval echo "$as_me:10172: \"$ac_try\"") >&5
10173 (eval $ac_try) 2>&5
10175 echo "$as_me:10175: \$? = $ac_status" >&5
10176 (exit $ac_status); }; }; then
10177 cf_cv_xopen_source=no
10179 echo "$as_me: failed program was:" >&5
10180 cat conftest.$ac_ext >&5
10181 cf_save="$CPPFLAGS"
10182 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10183 cat >conftest.$ac_ext <<_ACEOF
10184 #line 10184 "configure"
10185 #include "confdefs.h"
10187 #include <stdlib.h>
10188 #include <string.h>
10189 #include <sys/types.h>
10195 #ifdef _XOPEN_SOURCE
10202 rm -f conftest.$ac_objext
10203 if { (eval echo "$as_me:10203: \"$ac_compile\"") >&5
10204 (eval $ac_compile) 2>&5
10206 echo "$as_me:10206: \$? = $ac_status" >&5
10207 (exit $ac_status); } &&
10208 { ac_try='test -s conftest.$ac_objext'
10209 { (eval echo "$as_me:10209: \"$ac_try\"") >&5
10210 (eval $ac_try) 2>&5
10212 echo "$as_me:10212: \$? = $ac_status" >&5
10213 (exit $ac_status); }; }; then
10214 cf_cv_xopen_source=no
10216 echo "$as_me: failed program was:" >&5
10217 cat conftest.$ac_ext >&5
10218 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10220 rm -f conftest.$ac_objext conftest.$ac_ext
10221 CPPFLAGS="$cf_save"
10224 rm -f conftest.$ac_objext conftest.$ac_ext
10227 echo "$as_me:10227: result: $cf_cv_xopen_source" >&5
10228 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10230 if test "$cf_cv_xopen_source" != no ; then
10232 CFLAGS=`echo "$CFLAGS" | \
10233 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10234 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10236 CPPFLAGS=`echo "$CPPFLAGS" | \
10237 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10238 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10240 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10245 cf_new_extra_cppflags=
10247 for cf_add_cflags in $cf_temp_xopen_source
10249 case $cf_fix_cppflags in
10251 case $cf_add_cflags in
10252 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10253 case $cf_add_cflags in
10255 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10257 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10258 && test -z "${cf_tst_cflags}" \
10259 && cf_fix_cppflags=yes
10261 if test $cf_fix_cppflags = yes ; then
10262 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10264 elif test "${cf_tst_cflags}" = "\"'" ; then
10265 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10270 case "$CPPFLAGS" in
10274 case $cf_add_cflags in
10276 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10278 CPPFLAGS=`echo "$CPPFLAGS" | \
10279 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10280 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10284 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10289 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10294 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10296 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10298 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10299 && test -z "${cf_tst_cflags}" \
10300 && cf_fix_cppflags=no
10305 if test -n "$cf_new_cflags" ; then
10307 CFLAGS="$CFLAGS $cf_new_cflags"
10310 if test -n "$cf_new_cppflags" ; then
10312 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10315 if test -n "$cf_new_extra_cppflags" ; then
10317 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10322 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10324 cf_save_CFLAGS="$CFLAGS"
10325 cf_save_CPPFLAGS="$CPPFLAGS"
10327 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10328 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10329 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10331 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10332 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10333 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10335 echo "$as_me:10335: checking if we should define _POSIX_C_SOURCE" >&5
10336 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10337 if test "${cf_cv_posix_c_source+set}" = set; then
10338 echo $ECHO_N "(cached) $ECHO_C" >&6
10341 echo "${as_me:-configure}:10341: testing if the symbol is already defined go no further ..." 1>&5
10343 cat >conftest.$ac_ext <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10346 #include <sys/types.h>
10351 #ifndef _POSIX_C_SOURCE
10358 rm -f conftest.$ac_objext
10359 if { (eval echo "$as_me:10359: \"$ac_compile\"") >&5
10360 (eval $ac_compile) 2>&5
10362 echo "$as_me:10362: \$? = $ac_status" >&5
10363 (exit $ac_status); } &&
10364 { ac_try='test -s conftest.$ac_objext'
10365 { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366 (eval $ac_try) 2>&5
10368 echo "$as_me:10368: \$? = $ac_status" >&5
10369 (exit $ac_status); }; }; then
10370 cf_cv_posix_c_source=no
10372 echo "$as_me: failed program was:" >&5
10373 cat conftest.$ac_ext >&5
10374 cf_want_posix_source=no
10375 case .$cf_POSIX_C_SOURCE in
10377 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10380 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10381 cf_want_posix_source=yes
10384 cf_want_posix_source=yes
10387 if test "$cf_want_posix_source" = yes ; then
10388 cat >conftest.$ac_ext <<_ACEOF
10389 #line 10389 "configure"
10390 #include "confdefs.h"
10391 #include <sys/types.h>
10396 #ifdef _POSIX_SOURCE
10403 rm -f conftest.$ac_objext
10404 if { (eval echo "$as_me:10404: \"$ac_compile\"") >&5
10405 (eval $ac_compile) 2>&5
10407 echo "$as_me:10407: \$? = $ac_status" >&5
10408 (exit $ac_status); } &&
10409 { ac_try='test -s conftest.$ac_objext'
10410 { (eval echo "$as_me:10410: \"$ac_try\"") >&5
10411 (eval $ac_try) 2>&5
10413 echo "$as_me:10413: \$? = $ac_status" >&5
10414 (exit $ac_status); }; }; then
10417 echo "$as_me: failed program was:" >&5
10418 cat conftest.$ac_ext >&5
10419 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10421 rm -f conftest.$ac_objext conftest.$ac_ext
10424 echo "${as_me:-configure}:10424: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10426 CFLAGS="$cf_trim_CFLAGS"
10427 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10429 echo "${as_me:-configure}:10429: testing if the second compile does not leave our definition intact error ..." 1>&5
10431 cat >conftest.$ac_ext <<_ACEOF
10432 #line 10432 "configure"
10433 #include "confdefs.h"
10434 #include <sys/types.h>
10439 #ifndef _POSIX_C_SOURCE
10446 rm -f conftest.$ac_objext
10447 if { (eval echo "$as_me:10447: \"$ac_compile\"") >&5
10448 (eval $ac_compile) 2>&5
10450 echo "$as_me:10450: \$? = $ac_status" >&5
10451 (exit $ac_status); } &&
10452 { ac_try='test -s conftest.$ac_objext'
10453 { (eval echo "$as_me:10453: \"$ac_try\"") >&5
10454 (eval $ac_try) 2>&5
10456 echo "$as_me:10456: \$? = $ac_status" >&5
10457 (exit $ac_status); }; }; then
10460 echo "$as_me: failed program was:" >&5
10461 cat conftest.$ac_ext >&5
10462 cf_cv_posix_c_source=no
10464 rm -f conftest.$ac_objext conftest.$ac_ext
10465 CFLAGS="$cf_save_CFLAGS"
10466 CPPFLAGS="$cf_save_CPPFLAGS"
10469 rm -f conftest.$ac_objext conftest.$ac_ext
10472 echo "$as_me:10472: result: $cf_cv_posix_c_source" >&5
10473 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10475 if test "$cf_cv_posix_c_source" != no ; then
10476 CFLAGS="$cf_trim_CFLAGS"
10477 CPPFLAGS="$cf_trim_CPPFLAGS"
10482 cf_new_extra_cppflags=
10484 for cf_add_cflags in $cf_cv_posix_c_source
10486 case $cf_fix_cppflags in
10488 case $cf_add_cflags in
10489 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10490 case $cf_add_cflags in
10492 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10494 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10495 && test -z "${cf_tst_cflags}" \
10496 && cf_fix_cppflags=yes
10498 if test $cf_fix_cppflags = yes ; then
10499 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10501 elif test "${cf_tst_cflags}" = "\"'" ; then
10502 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10507 case "$CPPFLAGS" in
10511 case $cf_add_cflags in
10513 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10515 CPPFLAGS=`echo "$CPPFLAGS" | \
10516 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10517 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10521 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10526 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10531 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10533 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10535 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10536 && test -z "${cf_tst_cflags}" \
10537 && cf_fix_cppflags=no
10542 if test -n "$cf_new_cflags" ; then
10544 CFLAGS="$CFLAGS $cf_new_cflags"
10547 if test -n "$cf_new_cppflags" ; then
10549 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10552 if test -n "$cf_new_extra_cppflags" ; then
10554 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10562 if test -n "$cf_xopen_source" ; then
10567 cf_new_extra_cppflags=
10569 for cf_add_cflags in $cf_xopen_source
10571 case $cf_fix_cppflags in
10573 case $cf_add_cflags in
10574 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10575 case $cf_add_cflags in
10577 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10579 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10580 && test -z "${cf_tst_cflags}" \
10581 && cf_fix_cppflags=yes
10583 if test $cf_fix_cppflags = yes ; then
10584 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10586 elif test "${cf_tst_cflags}" = "\"'" ; then
10587 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10592 case "$CPPFLAGS" in
10596 case $cf_add_cflags in
10598 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10600 CPPFLAGS=`echo "$CPPFLAGS" | \
10601 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10602 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10606 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10611 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10616 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10618 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10620 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10621 && test -z "${cf_tst_cflags}" \
10622 && cf_fix_cppflags=no
10627 if test -n "$cf_new_cflags" ; then
10628 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
10630 echo "${as_me:-configure}:10630: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10632 CFLAGS="$CFLAGS $cf_new_cflags"
10635 if test -n "$cf_new_cppflags" ; then
10636 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10638 echo "${as_me:-configure}:10638: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10640 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10643 if test -n "$cf_new_extra_cppflags" ; then
10644 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10646 echo "${as_me:-configure}:10646: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10648 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10653 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10654 echo "$as_me:10654: checking if _XOPEN_SOURCE really is set" >&5
10655 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10656 cat >conftest.$ac_ext <<_ACEOF
10657 #line 10657 "configure"
10658 #include "confdefs.h"
10659 #include <stdlib.h>
10664 #ifndef _XOPEN_SOURCE
10671 rm -f conftest.$ac_objext
10672 if { (eval echo "$as_me:10672: \"$ac_compile\"") >&5
10673 (eval $ac_compile) 2>&5
10675 echo "$as_me:10675: \$? = $ac_status" >&5
10676 (exit $ac_status); } &&
10677 { ac_try='test -s conftest.$ac_objext'
10678 { (eval echo "$as_me:10678: \"$ac_try\"") >&5
10679 (eval $ac_try) 2>&5
10681 echo "$as_me:10681: \$? = $ac_status" >&5
10682 (exit $ac_status); }; }; then
10683 cf_XOPEN_SOURCE_set=yes
10685 echo "$as_me: failed program was:" >&5
10686 cat conftest.$ac_ext >&5
10687 cf_XOPEN_SOURCE_set=no
10689 rm -f conftest.$ac_objext conftest.$ac_ext
10690 echo "$as_me:10690: result: $cf_XOPEN_SOURCE_set" >&5
10691 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10692 if test $cf_XOPEN_SOURCE_set = yes
10694 cat >conftest.$ac_ext <<_ACEOF
10695 #line 10695 "configure"
10696 #include "confdefs.h"
10697 #include <stdlib.h>
10702 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10709 rm -f conftest.$ac_objext
10710 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711 (eval $ac_compile) 2>&5
10713 echo "$as_me:10713: \$? = $ac_status" >&5
10714 (exit $ac_status); } &&
10715 { ac_try='test -s conftest.$ac_objext'
10716 { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717 (eval $ac_try) 2>&5
10719 echo "$as_me:10719: \$? = $ac_status" >&5
10720 (exit $ac_status); }; }; then
10721 cf_XOPEN_SOURCE_set_ok=yes
10723 echo "$as_me: failed program was:" >&5
10724 cat conftest.$ac_ext >&5
10725 cf_XOPEN_SOURCE_set_ok=no
10727 rm -f conftest.$ac_objext conftest.$ac_ext
10728 if test $cf_XOPEN_SOURCE_set_ok = no
10730 { echo "$as_me:10730: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10731 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10735 echo "$as_me:10735: checking if we should define _XOPEN_SOURCE" >&5
10736 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10737 if test "${cf_cv_xopen_source+set}" = set; then
10738 echo $ECHO_N "(cached) $ECHO_C" >&6
10741 cat >conftest.$ac_ext <<_ACEOF
10742 #line 10742 "configure"
10743 #include "confdefs.h"
10745 #include <stdlib.h>
10746 #include <string.h>
10747 #include <sys/types.h>
10753 #ifndef _XOPEN_SOURCE
10760 rm -f conftest.$ac_objext
10761 if { (eval echo "$as_me:10761: \"$ac_compile\"") >&5
10762 (eval $ac_compile) 2>&5
10764 echo "$as_me:10764: \$? = $ac_status" >&5
10765 (exit $ac_status); } &&
10766 { ac_try='test -s conftest.$ac_objext'
10767 { (eval echo "$as_me:10767: \"$ac_try\"") >&5
10768 (eval $ac_try) 2>&5
10770 echo "$as_me:10770: \$? = $ac_status" >&5
10771 (exit $ac_status); }; }; then
10772 cf_cv_xopen_source=no
10774 echo "$as_me: failed program was:" >&5
10775 cat conftest.$ac_ext >&5
10776 cf_save="$CPPFLAGS"
10777 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10778 cat >conftest.$ac_ext <<_ACEOF
10779 #line 10779 "configure"
10780 #include "confdefs.h"
10782 #include <stdlib.h>
10783 #include <string.h>
10784 #include <sys/types.h>
10790 #ifdef _XOPEN_SOURCE
10797 rm -f conftest.$ac_objext
10798 if { (eval echo "$as_me:10798: \"$ac_compile\"") >&5
10799 (eval $ac_compile) 2>&5
10801 echo "$as_me:10801: \$? = $ac_status" >&5
10802 (exit $ac_status); } &&
10803 { ac_try='test -s conftest.$ac_objext'
10804 { (eval echo "$as_me:10804: \"$ac_try\"") >&5
10805 (eval $ac_try) 2>&5
10807 echo "$as_me:10807: \$? = $ac_status" >&5
10808 (exit $ac_status); }; }; then
10809 cf_cv_xopen_source=no
10811 echo "$as_me: failed program was:" >&5
10812 cat conftest.$ac_ext >&5
10813 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10815 rm -f conftest.$ac_objext conftest.$ac_ext
10816 CPPFLAGS="$cf_save"
10819 rm -f conftest.$ac_objext conftest.$ac_ext
10822 echo "$as_me:10822: result: $cf_cv_xopen_source" >&5
10823 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10825 if test "$cf_cv_xopen_source" != no ; then
10827 CFLAGS=`echo "$CFLAGS" | \
10828 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10829 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10831 CPPFLAGS=`echo "$CPPFLAGS" | \
10832 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10833 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10835 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10840 cf_new_extra_cppflags=
10842 for cf_add_cflags in $cf_temp_xopen_source
10844 case $cf_fix_cppflags in
10846 case $cf_add_cflags in
10847 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10848 case $cf_add_cflags in
10850 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10852 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10853 && test -z "${cf_tst_cflags}" \
10854 && cf_fix_cppflags=yes
10856 if test $cf_fix_cppflags = yes ; then
10857 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10859 elif test "${cf_tst_cflags}" = "\"'" ; then
10860 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10865 case "$CPPFLAGS" in
10869 case $cf_add_cflags in
10871 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10873 CPPFLAGS=`echo "$CPPFLAGS" | \
10874 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10875 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10879 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10884 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10889 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10891 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10893 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10894 && test -z "${cf_tst_cflags}" \
10895 && cf_fix_cppflags=no
10900 if test -n "$cf_new_cflags" ; then
10902 CFLAGS="$CFLAGS $cf_new_cflags"
10905 if test -n "$cf_new_cppflags" ; then
10907 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10910 if test -n "$cf_new_extra_cppflags" ; then
10912 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10920 # Check whether --enable-largefile or --disable-largefile was given.
10921 if test "${enable_largefile+set}" = set; then
10922 enableval="$enable_largefile"
10925 if test "$enable_largefile" != no; then
10927 echo "$as_me:10927: checking for special C compiler options needed for large files" >&5
10928 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10929 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10930 echo $ECHO_N "(cached) $ECHO_C" >&6
10932 ac_cv_sys_largefile_CC=no
10933 if test "$GCC" != yes; then
10936 # IRIX 6.2 and later do not support large files by default,
10937 # so use the C compiler's -n32 option if that helps.
10938 cat >conftest.$ac_ext <<_ACEOF
10939 #line 10939 "configure"
10940 #include "confdefs.h"
10941 #include <sys/types.h>
10942 /* Check that off_t can represent 2**63 - 1 correctly.
10943 We can't simply define LARGE_OFF_T to be 9223372036854775807,
10944 since some C++ compilers masquerading as C compilers
10945 incorrectly reject 9223372036854775807. */
10946 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10947 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10948 && LARGE_OFF_T % 2147483647 == 1)
10958 rm -f conftest.$ac_objext
10959 if { (eval echo "$as_me:10959: \"$ac_compile\"") >&5
10960 (eval $ac_compile) 2>&5
10962 echo "$as_me:10962: \$? = $ac_status" >&5
10963 (exit $ac_status); } &&
10964 { ac_try='test -s conftest.$ac_objext'
10965 { (eval echo "$as_me:10965: \"$ac_try\"") >&5
10966 (eval $ac_try) 2>&5
10968 echo "$as_me:10968: \$? = $ac_status" >&5
10969 (exit $ac_status); }; }; then
10972 echo "$as_me: failed program was:" >&5
10973 cat conftest.$ac_ext >&5
10975 rm -f conftest.$ac_objext
10977 rm -f conftest.$ac_objext
10978 if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
10979 (eval $ac_compile) 2>&5
10981 echo "$as_me:10981: \$? = $ac_status" >&5
10982 (exit $ac_status); } &&
10983 { ac_try='test -s conftest.$ac_objext'
10984 { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985 (eval $ac_try) 2>&5
10987 echo "$as_me:10987: \$? = $ac_status" >&5
10988 (exit $ac_status); }; }; then
10989 ac_cv_sys_largefile_CC=' -n32'; break
10991 echo "$as_me: failed program was:" >&5
10992 cat conftest.$ac_ext >&5
10994 rm -f conftest.$ac_objext
10998 rm -f conftest.$ac_ext
11001 echo "$as_me:11001: result: $ac_cv_sys_largefile_CC" >&5
11002 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11003 if test "$ac_cv_sys_largefile_CC" != no; then
11004 CC=$CC$ac_cv_sys_largefile_CC
11007 echo "$as_me:11007: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11008 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11009 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11010 echo $ECHO_N "(cached) $ECHO_C" >&6
11013 ac_cv_sys_file_offset_bits=no
11014 cat >conftest.$ac_ext <<_ACEOF
11015 #line 11015 "configure"
11016 #include "confdefs.h"
11017 #include <sys/types.h>
11018 /* Check that off_t can represent 2**63 - 1 correctly.
11019 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11020 since some C++ compilers masquerading as C compilers
11021 incorrectly reject 9223372036854775807. */
11022 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11023 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11024 && LARGE_OFF_T % 2147483647 == 1)
11034 rm -f conftest.$ac_objext
11035 if { (eval echo "$as_me:11035: \"$ac_compile\"") >&5
11036 (eval $ac_compile) 2>&5
11038 echo "$as_me:11038: \$? = $ac_status" >&5
11039 (exit $ac_status); } &&
11040 { ac_try='test -s conftest.$ac_objext'
11041 { (eval echo "$as_me:11041: \"$ac_try\"") >&5
11042 (eval $ac_try) 2>&5
11044 echo "$as_me:11044: \$? = $ac_status" >&5
11045 (exit $ac_status); }; }; then
11048 echo "$as_me: failed program was:" >&5
11049 cat conftest.$ac_ext >&5
11051 rm -f conftest.$ac_objext conftest.$ac_ext
11052 cat >conftest.$ac_ext <<_ACEOF
11053 #line 11053 "configure"
11054 #include "confdefs.h"
11055 #define _FILE_OFFSET_BITS 64
11056 #include <sys/types.h>
11057 /* Check that off_t can represent 2**63 - 1 correctly.
11058 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11059 since some C++ compilers masquerading as C compilers
11060 incorrectly reject 9223372036854775807. */
11061 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11062 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11063 && LARGE_OFF_T % 2147483647 == 1)
11073 rm -f conftest.$ac_objext
11074 if { (eval echo "$as_me:11074: \"$ac_compile\"") >&5
11075 (eval $ac_compile) 2>&5
11077 echo "$as_me:11077: \$? = $ac_status" >&5
11078 (exit $ac_status); } &&
11079 { ac_try='test -s conftest.$ac_objext'
11080 { (eval echo "$as_me:11080: \"$ac_try\"") >&5
11081 (eval $ac_try) 2>&5
11083 echo "$as_me:11083: \$? = $ac_status" >&5
11084 (exit $ac_status); }; }; then
11085 ac_cv_sys_file_offset_bits=64; break
11087 echo "$as_me: failed program was:" >&5
11088 cat conftest.$ac_ext >&5
11090 rm -f conftest.$ac_objext conftest.$ac_ext
11094 echo "$as_me:11094: result: $ac_cv_sys_file_offset_bits" >&5
11095 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11096 if test "$ac_cv_sys_file_offset_bits" != no; then
11098 cat >>confdefs.h <<EOF
11099 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11104 echo "$as_me:11104: checking for _LARGE_FILES value needed for large files" >&5
11105 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11106 if test "${ac_cv_sys_large_files+set}" = set; then
11107 echo $ECHO_N "(cached) $ECHO_C" >&6
11110 ac_cv_sys_large_files=no
11111 cat >conftest.$ac_ext <<_ACEOF
11112 #line 11112 "configure"
11113 #include "confdefs.h"
11114 #include <sys/types.h>
11115 /* Check that off_t can represent 2**63 - 1 correctly.
11116 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11117 since some C++ compilers masquerading as C compilers
11118 incorrectly reject 9223372036854775807. */
11119 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11120 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11121 && LARGE_OFF_T % 2147483647 == 1)
11131 rm -f conftest.$ac_objext
11132 if { (eval echo "$as_me:11132: \"$ac_compile\"") >&5
11133 (eval $ac_compile) 2>&5
11135 echo "$as_me:11135: \$? = $ac_status" >&5
11136 (exit $ac_status); } &&
11137 { ac_try='test -s conftest.$ac_objext'
11138 { (eval echo "$as_me:11138: \"$ac_try\"") >&5
11139 (eval $ac_try) 2>&5
11141 echo "$as_me:11141: \$? = $ac_status" >&5
11142 (exit $ac_status); }; }; then
11145 echo "$as_me: failed program was:" >&5
11146 cat conftest.$ac_ext >&5
11148 rm -f conftest.$ac_objext conftest.$ac_ext
11149 cat >conftest.$ac_ext <<_ACEOF
11150 #line 11150 "configure"
11151 #include "confdefs.h"
11152 #define _LARGE_FILES 1
11153 #include <sys/types.h>
11154 /* Check that off_t can represent 2**63 - 1 correctly.
11155 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11156 since some C++ compilers masquerading as C compilers
11157 incorrectly reject 9223372036854775807. */
11158 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11159 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11160 && LARGE_OFF_T % 2147483647 == 1)
11170 rm -f conftest.$ac_objext
11171 if { (eval echo "$as_me:11171: \"$ac_compile\"") >&5
11172 (eval $ac_compile) 2>&5
11174 echo "$as_me:11174: \$? = $ac_status" >&5
11175 (exit $ac_status); } &&
11176 { ac_try='test -s conftest.$ac_objext'
11177 { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178 (eval $ac_try) 2>&5
11180 echo "$as_me:11180: \$? = $ac_status" >&5
11181 (exit $ac_status); }; }; then
11182 ac_cv_sys_large_files=1; break
11184 echo "$as_me: failed program was:" >&5
11185 cat conftest.$ac_ext >&5
11187 rm -f conftest.$ac_objext conftest.$ac_ext
11191 echo "$as_me:11191: result: $ac_cv_sys_large_files" >&5
11192 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11193 if test "$ac_cv_sys_large_files" != no; then
11195 cat >>confdefs.h <<EOF
11196 #define _LARGE_FILES $ac_cv_sys_large_files
11203 if test "$enable_largefile" != no ; then
11204 echo "$as_me:11204: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11205 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11206 if test "${ac_cv_sys_largefile_source+set}" = set; then
11207 echo $ECHO_N "(cached) $ECHO_C" >&6
11210 ac_cv_sys_largefile_source=no
11211 cat >conftest.$ac_ext <<_ACEOF
11212 #line 11212 "configure"
11213 #include "confdefs.h"
11223 rm -f conftest.$ac_objext
11224 if { (eval echo "$as_me:11224: \"$ac_compile\"") >&5
11225 (eval $ac_compile) 2>&5
11227 echo "$as_me:11227: \$? = $ac_status" >&5
11228 (exit $ac_status); } &&
11229 { ac_try='test -s conftest.$ac_objext'
11230 { (eval echo "$as_me:11230: \"$ac_try\"") >&5
11231 (eval $ac_try) 2>&5
11233 echo "$as_me:11233: \$? = $ac_status" >&5
11234 (exit $ac_status); }; }; then
11237 echo "$as_me: failed program was:" >&5
11238 cat conftest.$ac_ext >&5
11240 rm -f conftest.$ac_objext conftest.$ac_ext
11241 cat >conftest.$ac_ext <<_ACEOF
11242 #line 11242 "configure"
11243 #include "confdefs.h"
11244 #define _LARGEFILE_SOURCE 1
11254 rm -f conftest.$ac_objext
11255 if { (eval echo "$as_me:11255: \"$ac_compile\"") >&5
11256 (eval $ac_compile) 2>&5
11258 echo "$as_me:11258: \$? = $ac_status" >&5
11259 (exit $ac_status); } &&
11260 { ac_try='test -s conftest.$ac_objext'
11261 { (eval echo "$as_me:11261: \"$ac_try\"") >&5
11262 (eval $ac_try) 2>&5
11264 echo "$as_me:11264: \$? = $ac_status" >&5
11265 (exit $ac_status); }; }; then
11266 ac_cv_sys_largefile_source=1; break
11268 echo "$as_me: failed program was:" >&5
11269 cat conftest.$ac_ext >&5
11271 rm -f conftest.$ac_objext conftest.$ac_ext
11275 echo "$as_me:11275: result: $ac_cv_sys_largefile_source" >&5
11276 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11277 if test "$ac_cv_sys_largefile_source" != no; then
11279 cat >>confdefs.h <<EOF
11280 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11286 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11287 # in glibc 2.1.3, but that breaks too many other things.
11288 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11289 echo "$as_me:11289: checking for fseeko" >&5
11290 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11291 if test "${ac_cv_func_fseeko+set}" = set; then
11292 echo $ECHO_N "(cached) $ECHO_C" >&6
11294 cat >conftest.$ac_ext <<_ACEOF
11295 #line 11295 "configure"
11296 #include "confdefs.h"
11301 return fseeko && fseeko (stdin, 0, 0);
11306 rm -f conftest.$ac_objext conftest$ac_exeext
11307 if { (eval echo "$as_me:11307: \"$ac_link\"") >&5
11308 (eval $ac_link) 2>&5
11310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit $ac_status); } &&
11312 { ac_try='test -s conftest$ac_exeext'
11313 { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314 (eval $ac_try) 2>&5
11316 echo "$as_me:11316: \$? = $ac_status" >&5
11317 (exit $ac_status); }; }; then
11318 ac_cv_func_fseeko=yes
11320 echo "$as_me: failed program was:" >&5
11321 cat conftest.$ac_ext >&5
11322 ac_cv_func_fseeko=no
11324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11326 echo "$as_me:11326: result: $ac_cv_func_fseeko" >&5
11327 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11328 if test $ac_cv_func_fseeko = yes; then
11330 cat >>confdefs.h <<\EOF
11331 #define HAVE_FSEEKO 1
11336 # Normally we would collect these definitions in the config.h,
11337 # but (like _XOPEN_SOURCE), some environments rely on having these
11338 # defined before any of the system headers are included. Another
11339 # case comes up with C++, e.g., on AIX the compiler compiles the
11340 # header files by themselves before looking at the body files it is
11341 # told to compile. For ncurses, those header files do not include
11343 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11344 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11345 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11347 echo "$as_me:11347: checking whether to use struct dirent64" >&5
11348 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11349 if test "${cf_cv_struct_dirent64+set}" = set; then
11350 echo $ECHO_N "(cached) $ECHO_C" >&6
11353 cat >conftest.$ac_ext <<_ACEOF
11354 #line 11354 "configure"
11355 #include "confdefs.h"
11357 #include <sys/types.h>
11358 #include <dirent.h>
11364 /* if transitional largefile support is setup, this is true */
11365 extern struct dirent64 * readdir(DIR *);
11366 struct dirent64 *x = readdir((DIR *)0);
11367 struct dirent *y = readdir((DIR *)0);
11374 rm -f conftest.$ac_objext
11375 if { (eval echo "$as_me:11375: \"$ac_compile\"") >&5
11376 (eval $ac_compile) 2>&5
11378 echo "$as_me:11378: \$? = $ac_status" >&5
11379 (exit $ac_status); } &&
11380 { ac_try='test -s conftest.$ac_objext'
11381 { (eval echo "$as_me:11381: \"$ac_try\"") >&5
11382 (eval $ac_try) 2>&5
11384 echo "$as_me:11384: \$? = $ac_status" >&5
11385 (exit $ac_status); }; }; then
11386 cf_cv_struct_dirent64=yes
11388 echo "$as_me: failed program was:" >&5
11389 cat conftest.$ac_ext >&5
11390 cf_cv_struct_dirent64=no
11392 rm -f conftest.$ac_objext conftest.$ac_ext
11395 echo "$as_me:11395: result: $cf_cv_struct_dirent64" >&5
11396 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11397 test "$cf_cv_struct_dirent64" = yes &&
11398 cat >>confdefs.h <<\EOF
11399 #define HAVE_STRUCT_DIRENT64 1
11404 ### Enable compiling-in rcs id's
11405 echo "$as_me:11405: checking if RCS identifiers should be compiled-in" >&5
11406 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11408 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11409 if test "${with_rcs_ids+set}" = set; then
11410 withval="$with_rcs_ids"
11411 with_rcs_ids=$withval
11415 echo "$as_me:11415: result: $with_rcs_ids" >&5
11416 echo "${ECHO_T}$with_rcs_ids" >&6
11417 test "$with_rcs_ids" = yes &&
11418 cat >>confdefs.h <<\EOF
11419 #define USE_RCS_IDS 1
11422 ###############################################################################
11424 ### Note that some functions (such as const) are normally disabled anyway.
11425 echo "$as_me:11425: checking if you want to build with function extensions" >&5
11426 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11428 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11429 if test "${enable_ext_funcs+set}" = set; then
11430 enableval="$enable_ext_funcs"
11431 with_ext_funcs=$enableval
11435 echo "$as_me:11435: result: $with_ext_funcs" >&5
11436 echo "${ECHO_T}$with_ext_funcs" >&6
11437 if test "$with_ext_funcs" = yes ; then
11438 NCURSES_EXT_FUNCS=1
11440 cat >>confdefs.h <<\EOF
11441 #define HAVE_USE_DEFAULT_COLORS 1
11444 cat >>confdefs.h <<\EOF
11445 #define NCURSES_EXT_FUNCS 1
11449 NCURSES_EXT_FUNCS=0
11452 ### use option --enable-const to turn on use of const beyond that in XSI.
11453 echo "$as_me:11453: checking for extended use of const keyword" >&5
11454 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11456 # Check whether --enable-const or --disable-const was given.
11457 if test "${enable_const+set}" = set; then
11458 enableval="$enable_const"
11459 with_ext_const=$enableval
11463 echo "$as_me:11463: result: $with_ext_const" >&5
11464 echo "${ECHO_T}$with_ext_const" >&6
11465 NCURSES_CONST='/*nothing*/'
11466 if test "$with_ext_const" = yes ; then
11467 NCURSES_CONST=const
11470 ###############################################################################
11471 # These options are relatively safe to experiment with.
11473 echo "$as_me:11473: checking if you want all development code" >&5
11474 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11476 # Check whether --with-develop or --without-develop was given.
11477 if test "${with_develop+set}" = set; then
11478 withval="$with_develop"
11479 with_develop=$withval
11483 echo "$as_me:11483: result: $with_develop" >&5
11484 echo "${ECHO_T}$with_develop" >&6
11486 ###############################################################################
11487 # These are just experimental, probably should not be in a package:
11489 # This is still experimental (20080329), but should ultimately be moved to
11490 # the script-block --with-normal, etc.
11492 echo "$as_me:11492: checking if you want to link with the pthread library" >&5
11493 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11495 # Check whether --with-pthread or --without-pthread was given.
11496 if test "${with_pthread+set}" = set; then
11497 withval="$with_pthread"
11498 with_pthread=$withval
11502 echo "$as_me:11502: result: $with_pthread" >&5
11503 echo "${ECHO_T}$with_pthread" >&6
11505 if test "$with_pthread" != no ; then
11506 echo "$as_me:11506: checking for pthread.h" >&5
11507 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11508 if test "${ac_cv_header_pthread_h+set}" = set; then
11509 echo $ECHO_N "(cached) $ECHO_C" >&6
11511 cat >conftest.$ac_ext <<_ACEOF
11512 #line 11512 "configure"
11513 #include "confdefs.h"
11514 #include <pthread.h>
11516 if { (eval echo "$as_me:11516: \"$ac_cpp conftest.$ac_ext\"") >&5
11517 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11519 egrep -v '^ *\+' conftest.er1 >conftest.err
11521 cat conftest.err >&5
11522 echo "$as_me:11522: \$? = $ac_status" >&5
11523 (exit $ac_status); } >/dev/null; then
11524 if test -s conftest.err; then
11525 ac_cpp_err=$ac_c_preproc_warn_flag
11532 if test -z "$ac_cpp_err"; then
11533 ac_cv_header_pthread_h=yes
11535 echo "$as_me: failed program was:" >&5
11536 cat conftest.$ac_ext >&5
11537 ac_cv_header_pthread_h=no
11539 rm -f conftest.err conftest.$ac_ext
11541 echo "$as_me:11541: result: $ac_cv_header_pthread_h" >&5
11542 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11543 if test $ac_cv_header_pthread_h = yes; then
11545 cat >>confdefs.h <<\EOF
11546 #define HAVE_PTHREADS_H 1
11549 for cf_lib_pthread in pthread c_r
11551 echo "$as_me:11551: checking if we can link with the $cf_lib_pthread library" >&5
11552 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11553 cf_save_LIBS="$LIBS"
11555 cf_add_libs="-l$cf_lib_pthread"
11556 # Filter out duplicates - this happens with badly-designed ".pc" files...
11557 for cf_add_1lib in $LIBS
11559 for cf_add_2lib in $cf_add_libs
11561 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11569 LIBS="$cf_add_libs"
11571 cat >conftest.$ac_ext <<_ACEOF
11572 #line 11572 "configure"
11573 #include "confdefs.h"
11575 #include <pthread.h>
11581 int rc = pthread_create(0,0,0,0);
11582 int r2 = pthread_mutexattr_settype(0, 0);
11588 rm -f conftest.$ac_objext conftest$ac_exeext
11589 if { (eval echo "$as_me:11589: \"$ac_link\"") >&5
11590 (eval $ac_link) 2>&5
11592 echo "$as_me:11592: \$? = $ac_status" >&5
11593 (exit $ac_status); } &&
11594 { ac_try='test -s conftest$ac_exeext'
11595 { (eval echo "$as_me:11595: \"$ac_try\"") >&5
11596 (eval $ac_try) 2>&5
11598 echo "$as_me:11598: \$? = $ac_status" >&5
11599 (exit $ac_status); }; }; then
11602 echo "$as_me: failed program was:" >&5
11603 cat conftest.$ac_ext >&5
11606 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11607 LIBS="$cf_save_LIBS"
11608 echo "$as_me:11608: result: $with_pthread" >&5
11609 echo "${ECHO_T}$with_pthread" >&6
11610 test "$with_pthread" = yes && break
11613 if test "$with_pthread" = yes ; then
11615 cf_add_libs="-l$cf_lib_pthread"
11616 # Filter out duplicates - this happens with badly-designed ".pc" files...
11617 for cf_add_1lib in $LIBS
11619 for cf_add_2lib in $cf_add_libs
11621 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11627 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11629 LIBS="$cf_add_libs"
11631 cat >>confdefs.h <<\EOF
11632 #define HAVE_LIBPTHREADS 1
11636 { { echo "$as_me:11636: error: Cannot link with pthread library" >&5
11637 echo "$as_me: error: Cannot link with pthread library" >&2;}
11638 { (exit 1); exit 1; }; }
11645 echo "$as_me:11645: checking if you want to use weak-symbols for pthreads" >&5
11646 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11648 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11649 if test "${enable_weak_symbols+set}" = set; then
11650 enableval="$enable_weak_symbols"
11651 use_weak_symbols=$withval
11653 use_weak_symbols=no
11655 echo "$as_me:11655: result: $use_weak_symbols" >&5
11656 echo "${ECHO_T}$use_weak_symbols" >&6
11657 if test "$use_weak_symbols" = yes ; then
11659 echo "$as_me:11659: checking if $CC supports weak symbols" >&5
11660 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11661 if test "${cf_cv_weak_symbols+set}" = set; then
11662 echo $ECHO_N "(cached) $ECHO_C" >&6
11665 cat >conftest.$ac_ext <<_ACEOF
11666 #line 11666 "configure"
11667 #include "confdefs.h"
11674 #if defined(__GNUC__)
11675 # if defined __USE_ISOC99
11676 # define _cat_pragma(exp) _Pragma(#exp)
11677 # define _weak_pragma(exp) _cat_pragma(weak name)
11679 # define _weak_pragma(exp)
11681 # define _declare(name) __extension__ extern __typeof__(name) name
11682 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
11685 weak_symbol(fopen);
11691 rm -f conftest.$ac_objext
11692 if { (eval echo "$as_me:11692: \"$ac_compile\"") >&5
11693 (eval $ac_compile) 2>&5
11695 echo "$as_me:11695: \$? = $ac_status" >&5
11696 (exit $ac_status); } &&
11697 { ac_try='test -s conftest.$ac_objext'
11698 { (eval echo "$as_me:11698: \"$ac_try\"") >&5
11699 (eval $ac_try) 2>&5
11701 echo "$as_me:11701: \$? = $ac_status" >&5
11702 (exit $ac_status); }; }; then
11703 cf_cv_weak_symbols=yes
11705 echo "$as_me: failed program was:" >&5
11706 cat conftest.$ac_ext >&5
11707 cf_cv_weak_symbols=no
11709 rm -f conftest.$ac_objext conftest.$ac_ext
11712 echo "$as_me:11712: result: $cf_cv_weak_symbols" >&5
11713 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11716 cf_cv_weak_symbols=no
11719 if test $cf_cv_weak_symbols = yes ; then
11721 cat >>confdefs.h <<\EOF
11722 #define USE_WEAK_SYMBOLS 1
11728 if test "$with_pthread" = "yes" ; then
11730 cat >>confdefs.h <<\EOF
11731 #define USE_PTHREADS 1
11734 enable_reentrant=yes
11735 if test $cf_cv_weak_symbols = yes ; then
11740 # OpenSUSE is installing ncurses6, using reentrant option.
11741 echo "$as_me:11741: checking for _nc_TABSIZE" >&5
11742 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
11743 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
11744 echo $ECHO_N "(cached) $ECHO_C" >&6
11746 cat >conftest.$ac_ext <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749 /* System header to define __stub macros and hopefully few prototypes,
11750 which can conflict with char _nc_TABSIZE (); below. */
11751 #include <assert.h>
11752 /* Override any gcc2 internal prototype to avoid an error. */
11756 /* We use char because int might match the return type of a gcc2
11757 builtin and then its argument prototype would still apply. */
11758 char _nc_TABSIZE ();
11764 /* The GNU C library defines this for functions which it implements
11765 to always fail with ENOSYS. Some functions are actually named
11766 something starting with __ and the normal name is an alias. */
11767 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
11770 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11777 rm -f conftest.$ac_objext conftest$ac_exeext
11778 if { (eval echo "$as_me:11778: \"$ac_link\"") >&5
11779 (eval $ac_link) 2>&5
11781 echo "$as_me:11781: \$? = $ac_status" >&5
11782 (exit $ac_status); } &&
11783 { ac_try='test -s conftest$ac_exeext'
11784 { (eval echo "$as_me:11784: \"$ac_try\"") >&5
11785 (eval $ac_try) 2>&5
11787 echo "$as_me:11787: \$? = $ac_status" >&5
11788 (exit $ac_status); }; }; then
11789 ac_cv_func__nc_TABSIZE=yes
11791 echo "$as_me: failed program was:" >&5
11792 cat conftest.$ac_ext >&5
11793 ac_cv_func__nc_TABSIZE=no
11795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11797 echo "$as_me:11797: result: $ac_cv_func__nc_TABSIZE" >&5
11798 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
11799 if test $ac_cv_func__nc_TABSIZE = yes; then
11800 assume_reentrant=yes
11802 assume_reentrant=no
11805 # Reentrant code has to be opaque; there's little advantage to making ncurses
11806 # opaque outside of that, so there is no --enable-opaque option. We can use
11807 # this option without --with-pthreads, but this will be always set for
11809 echo "$as_me:11809: checking if you want experimental reentrant code" >&5
11810 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11812 # Check whether --enable-reentrant or --disable-reentrant was given.
11813 if test "${enable_reentrant+set}" = set; then
11814 enableval="$enable_reentrant"
11815 with_reentrant=$enableval
11817 with_reentrant=$assume_reentrant
11819 echo "$as_me:11819: result: $with_reentrant" >&5
11820 echo "${ECHO_T}$with_reentrant" >&6
11821 if test "$with_reentrant" = yes ; then
11822 cf_cv_enable_reentrant=1
11823 if test $cf_cv_weak_symbols = yes ; then
11825 # remove pthread library from $LIBS
11826 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
11828 elif test "$assume_reentrant" = no ; then
11829 LIB_SUFFIX="t${LIB_SUFFIX}"
11832 cat >>confdefs.h <<\EOF
11833 #define USE_REENTRANT 1
11837 cf_cv_enable_reentrant=0
11840 ### Allow using a different wrap-prefix
11841 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11842 echo "$as_me:11842: checking for prefix used to wrap public variables" >&5
11843 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11845 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11846 if test "${with_wrap_prefix+set}" = set; then
11847 withval="$with_wrap_prefix"
11848 NCURSES_WRAP_PREFIX=$withval
11850 NCURSES_WRAP_PREFIX=_nc_
11852 echo "$as_me:11852: result: $NCURSES_WRAP_PREFIX" >&5
11853 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11855 NCURSES_WRAP_PREFIX=_nc_
11858 cat >>confdefs.h <<EOF
11859 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11862 ###############################################################################
11864 ### use option --disable-echo to suppress full display compiling commands
11866 echo "$as_me:11866: checking if you want to see long compiling messages" >&5
11867 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11869 # Check whether --enable-echo or --disable-echo was given.
11870 if test "${enable_echo+set}" = set; then
11871 enableval="$enable_echo"
11872 test "$enableval" != no && enableval=yes
11873 if test "$enableval" != "yes" ; then
11876 ECHO_LD='@echo linking $@;'
11877 RULE_CC='@echo compiling $<'
11878 SHOW_CC='@echo compiling $@'
11900 echo "$as_me:11900: result: $enableval" >&5
11901 echo "${ECHO_T}$enableval" >&6
11903 ### use option --enable-warnings to turn on all gcc warnings
11904 echo "$as_me:11904: checking if you want to see compiler warnings" >&5
11905 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11907 # Check whether --enable-warnings or --disable-warnings was given.
11908 if test "${enable_warnings+set}" = set; then
11909 enableval="$enable_warnings"
11910 with_warnings=$enableval
11912 echo "$as_me:11912: result: $with_warnings" >&5
11913 echo "${ECHO_T}$with_warnings" >&6
11915 if test "x$with_warnings" = "xyes"; then
11917 ADAFLAGS="$ADAFLAGS -gnatg"
11921 if test "$GCC" = yes ; then
11924 echo "$as_me:11924: checking if this is really Intel C compiler" >&5
11925 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11926 cf_save_CFLAGS="$CFLAGS"
11927 CFLAGS="$CFLAGS -no-gcc"
11928 cat >conftest.$ac_ext <<_ACEOF
11929 #line 11929 "configure"
11930 #include "confdefs.h"
11936 #ifdef __INTEL_COMPILER
11945 rm -f conftest.$ac_objext
11946 if { (eval echo "$as_me:11946: \"$ac_compile\"") >&5
11947 (eval $ac_compile) 2>&5
11949 echo "$as_me:11949: \$? = $ac_status" >&5
11950 (exit $ac_status); } &&
11951 { ac_try='test -s conftest.$ac_objext'
11952 { (eval echo "$as_me:11952: \"$ac_try\"") >&5
11953 (eval $ac_try) 2>&5
11955 echo "$as_me:11955: \$? = $ac_status" >&5
11956 (exit $ac_status); }; }; then
11958 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
11961 echo "$as_me: failed program was:" >&5
11962 cat conftest.$ac_ext >&5
11964 rm -f conftest.$ac_objext conftest.$ac_ext
11965 CFLAGS="$cf_save_CFLAGS"
11966 echo "$as_me:11966: result: $INTEL_COMPILER" >&5
11967 echo "${ECHO_T}$INTEL_COMPILER" >&6
11974 if test "$GCC" = yes ; then
11975 echo "$as_me:11975: checking if this is really Clang C compiler" >&5
11976 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11977 cf_save_CFLAGS="$CFLAGS"
11978 CFLAGS="$CFLAGS -Qunused-arguments"
11979 cat >conftest.$ac_ext <<_ACEOF
11980 #line 11980 "configure"
11981 #include "confdefs.h"
11996 rm -f conftest.$ac_objext
11997 if { (eval echo "$as_me:11997: \"$ac_compile\"") >&5
11998 (eval $ac_compile) 2>&5
12000 echo "$as_me:12000: \$? = $ac_status" >&5
12001 (exit $ac_status); } &&
12002 { ac_try='test -s conftest.$ac_objext'
12003 { (eval echo "$as_me:12003: \"$ac_try\"") >&5
12004 (eval $ac_try) 2>&5
12006 echo "$as_me:12006: \$? = $ac_status" >&5
12007 (exit $ac_status); }; }; then
12009 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12012 echo "$as_me: failed program was:" >&5
12013 cat conftest.$ac_ext >&5
12015 rm -f conftest.$ac_objext conftest.$ac_ext
12016 CFLAGS="$cf_save_CFLAGS"
12017 echo "$as_me:12017: result: $CLANG_COMPILER" >&5
12018 echo "${ECHO_T}$CLANG_COMPILER" >&6
12021 cat > conftest.$ac_ext <<EOF
12022 #line 12022 "${as_me:-configure}"
12023 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12026 if test "$INTEL_COMPILER" = yes
12028 # The "-wdXXX" options suppress warnings:
12029 # remark #1419: external declaration in primary source file
12030 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12031 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12032 # remark #193: zero used for undefined preprocessing identifier
12033 # remark #593: variable "curs_sb_left_arrow" was set but never used
12034 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12035 # remark #869: parameter "tw" was never referenced
12036 # remark #981: operands are evaluated in unspecified order
12037 # warning #279: controlling expression is constant
12039 { echo "$as_me:12039: checking for $CC warning options..." >&5
12040 echo "$as_me: checking for $CC warning options..." >&6;}
12041 cf_save_CFLAGS="$CFLAGS"
12042 EXTRA_CFLAGS="-Wall"
12054 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12055 if { (eval echo "$as_me:12055: \"$ac_compile\"") >&5
12056 (eval $ac_compile) 2>&5
12058 echo "$as_me:12058: \$? = $ac_status" >&5
12059 (exit $ac_status); }; then
12060 test -n "$verbose" && echo "$as_me:12060: result: ... -$cf_opt" >&5
12061 echo "${ECHO_T}... -$cf_opt" >&6
12062 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12065 CFLAGS="$cf_save_CFLAGS"
12067 elif test "$GCC" = yes
12069 { echo "$as_me:12069: checking for $CC warning options..." >&5
12070 echo "$as_me: checking for $CC warning options..." >&6;}
12071 cf_save_CFLAGS="$CFLAGS"
12074 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12075 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12076 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12077 for cf_opt in W Wall \
12078 Wbad-function-cast \
12081 Wdeclaration-after-statement \
12084 Wmissing-declarations \
12085 Wmissing-prototypes \
12089 Wstrict-prototypes \
12090 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12092 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12093 if { (eval echo "$as_me:12093: \"$ac_compile\"") >&5
12094 (eval $ac_compile) 2>&5
12096 echo "$as_me:12096: \$? = $ac_status" >&5
12097 (exit $ac_status); }; then
12098 test -n "$verbose" && echo "$as_me:12098: result: ... -$cf_opt" >&5
12099 echo "${ECHO_T}... -$cf_opt" >&6
12102 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12105 case $GCC_VERSION in
12107 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12109 echo "${as_me:-configure}:12109: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12115 case $GCC_VERSION in
12117 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12119 echo "${as_me:-configure}:12119: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12125 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12128 CFLAGS="$cf_save_CFLAGS"
12134 if test "$GCC" = yes
12136 cat > conftest.i <<EOF
12138 #define GCC_PRINTF 0
12141 #define GCC_SCANF 0
12143 #ifndef GCC_NORETURN
12144 #define GCC_NORETURN /* nothing */
12147 #define GCC_UNUSED /* nothing */
12150 if test "$GCC" = yes
12152 { echo "$as_me:12152: checking for $CC __attribute__ directives..." >&5
12153 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12154 cat > conftest.$ac_ext <<EOF
12155 #line 12155 "${as_me:-configure}"
12156 #include "confdefs.h"
12157 #include "conftest.h"
12158 #include "conftest.i"
12160 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12162 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12165 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12167 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12169 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12170 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12171 extern void foo(void) GCC_NORETURN;
12172 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12174 cf_printf_attribute=no
12175 cf_scanf_attribute=no
12176 for cf_attribute in scanf printf unused noreturn
12179 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12181 cf_directive="__attribute__(($cf_attribute))"
12182 echo "checking for $CC $cf_directive" 1>&5
12184 case $cf_attribute in
12186 cf_printf_attribute=yes
12187 cat >conftest.h <<EOF
12188 #define GCC_$cf_ATTRIBUTE 1
12192 cf_scanf_attribute=yes
12193 cat >conftest.h <<EOF
12194 #define GCC_$cf_ATTRIBUTE 1
12198 cat >conftest.h <<EOF
12199 #define GCC_$cf_ATTRIBUTE $cf_directive
12204 if { (eval echo "$as_me:12204: \"$ac_compile\"") >&5
12205 (eval $ac_compile) 2>&5
12207 echo "$as_me:12207: \$? = $ac_status" >&5
12208 (exit $ac_status); }; then
12209 test -n "$verbose" && echo "$as_me:12209: result: ... $cf_attribute" >&5
12210 echo "${ECHO_T}... $cf_attribute" >&6
12211 cat conftest.h >>confdefs.h
12212 case $cf_attribute in
12215 cat >>confdefs.h <<EOF
12216 #define GCC_NORETURN $cf_directive
12221 cf_value='/* nothing */'
12222 if test "$cf_printf_attribute" != no ; then
12223 cf_value='__attribute__((format(printf,fmt,var)))'
12225 cat >>confdefs.h <<\EOF
12226 #define GCC_PRINTF 1
12231 cat >>confdefs.h <<EOF
12232 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12237 cf_value='/* nothing */'
12238 if test "$cf_scanf_attribute" != no ; then
12239 cf_value='__attribute__((format(scanf,fmt,var)))'
12241 cat >>confdefs.h <<\EOF
12242 #define GCC_SCANF 1
12247 cat >>confdefs.h <<EOF
12248 #define GCC_SCANFLIKE(fmt,var) $cf_value
12254 cat >>confdefs.h <<EOF
12255 #define GCC_UNUSED $cf_directive
12263 fgrep define conftest.i >>confdefs.h
12268 ### use option --enable-assertions to turn on generation of assertion code
12269 echo "$as_me:12269: checking if you want to enable runtime assertions" >&5
12270 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12272 # Check whether --enable-assertions or --disable-assertions was given.
12273 if test "${enable_assertions+set}" = set; then
12274 enableval="$enable_assertions"
12275 with_assertions=$enableval
12279 echo "$as_me:12279: result: $with_assertions" >&5
12280 echo "${ECHO_T}$with_assertions" >&6
12283 if test "$with_assertions" = no
12285 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12288 ADAFLAGS="$ADAFLAGS -gnata"
12293 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12295 cat >>confdefs.h <<\EOF
12296 #define HAVE_NC_ALLOC_H 1
12299 ### use option --enable-expanded to generate certain macros as functions
12301 # Check whether --enable-expanded or --disable-expanded was given.
12302 if test "${enable_expanded+set}" = set; then
12303 enableval="$enable_expanded"
12304 test "$enableval" = yes &&
12305 cat >>confdefs.h <<\EOF
12306 #define NCURSES_EXPANDED 1
12311 ### use option --disable-macros to suppress macros in favor of functions
12313 # Check whether --enable-macros or --disable-macros was given.
12314 if test "${enable_macros+set}" = set; then
12315 enableval="$enable_macros"
12316 test "$enableval" = no &&
12317 cat >>confdefs.h <<\EOF
12318 #define NCURSES_NOMACROS 1
12323 # Normally we only add trace() to the debug-library. Allow this to be
12324 # extended to all models of the ncurses library:
12326 case "$CFLAGS $CPPFLAGS" in
12332 echo "$as_me:12332: checking whether to add trace feature to all models" >&5
12333 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12335 # Check whether --with-trace or --without-trace was given.
12336 if test "${with_trace+set}" = set; then
12337 withval="$with_trace"
12338 cf_with_trace=$withval
12340 cf_with_trace=$cf_all_traces
12342 echo "$as_me:12342: result: $cf_with_trace" >&5
12343 echo "${ECHO_T}$cf_with_trace" >&6
12345 if test "$cf_with_trace" = yes ; then
12351 cf_new_extra_cppflags=
12353 for cf_add_cflags in -DTRACE
12355 case $cf_fix_cppflags in
12357 case $cf_add_cflags in
12358 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12359 case $cf_add_cflags in
12361 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12363 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12364 && test -z "${cf_tst_cflags}" \
12365 && cf_fix_cppflags=yes
12367 if test $cf_fix_cppflags = yes ; then
12368 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12370 elif test "${cf_tst_cflags}" = "\"'" ; then
12371 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12376 case "$CPPFLAGS" in
12380 case $cf_add_cflags in
12382 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12384 CPPFLAGS=`echo "$CPPFLAGS" | \
12385 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12386 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12390 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12395 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12400 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12402 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12404 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12405 && test -z "${cf_tst_cflags}" \
12406 && cf_fix_cppflags=no
12411 if test -n "$cf_new_cflags" ; then
12413 CFLAGS="$CFLAGS $cf_new_cflags"
12416 if test -n "$cf_new_cppflags" ; then
12418 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12421 if test -n "$cf_new_extra_cppflags" ; then
12423 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12430 echo "$as_me:12430: checking if we want to use GNAT projects" >&5
12431 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12433 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12434 if test "${enable_gnat_projects+set}" = set; then
12435 enableval="$enable_gnat_projects"
12436 test "$enableval" != no && enableval=yes
12437 if test "$enableval" != "yes" ; then
12438 enable_gnat_projects=no
12440 enable_gnat_projects=yes
12444 enable_gnat_projects=yes
12447 echo "$as_me:12447: result: $enable_gnat_projects" >&5
12448 echo "${ECHO_T}$enable_gnat_projects" >&6
12450 ### Checks for libraries.
12451 case $cf_cv_system_name in
12455 echo "$as_me:12455: checking for gettimeofday" >&5
12456 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12457 if test "${ac_cv_func_gettimeofday+set}" = set; then
12458 echo $ECHO_N "(cached) $ECHO_C" >&6
12460 cat >conftest.$ac_ext <<_ACEOF
12461 #line 12461 "configure"
12462 #include "confdefs.h"
12463 /* System header to define __stub macros and hopefully few prototypes,
12464 which can conflict with char gettimeofday (); below. */
12465 #include <assert.h>
12466 /* Override any gcc2 internal prototype to avoid an error. */
12470 /* We use char because int might match the return type of a gcc2
12471 builtin and then its argument prototype would still apply. */
12472 char gettimeofday ();
12478 /* The GNU C library defines this for functions which it implements
12479 to always fail with ENOSYS. Some functions are actually named
12480 something starting with __ and the normal name is an alias. */
12481 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12484 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12491 rm -f conftest.$ac_objext conftest$ac_exeext
12492 if { (eval echo "$as_me:12492: \"$ac_link\"") >&5
12493 (eval $ac_link) 2>&5
12495 echo "$as_me:12495: \$? = $ac_status" >&5
12496 (exit $ac_status); } &&
12497 { ac_try='test -s conftest$ac_exeext'
12498 { (eval echo "$as_me:12498: \"$ac_try\"") >&5
12499 (eval $ac_try) 2>&5
12501 echo "$as_me:12501: \$? = $ac_status" >&5
12502 (exit $ac_status); }; }; then
12503 ac_cv_func_gettimeofday=yes
12505 echo "$as_me: failed program was:" >&5
12506 cat conftest.$ac_ext >&5
12507 ac_cv_func_gettimeofday=no
12509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12511 echo "$as_me:12511: result: $ac_cv_func_gettimeofday" >&5
12512 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12513 if test $ac_cv_func_gettimeofday = yes; then
12514 cat >>confdefs.h <<\EOF
12515 #define HAVE_GETTIMEOFDAY 1
12520 echo "$as_me:12520: checking for gettimeofday in -lbsd" >&5
12521 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12522 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12523 echo $ECHO_N "(cached) $ECHO_C" >&6
12525 ac_check_lib_save_LIBS=$LIBS
12527 cat >conftest.$ac_ext <<_ACEOF
12528 #line 12528 "configure"
12529 #include "confdefs.h"
12531 /* Override any gcc2 internal prototype to avoid an error. */
12535 /* We use char because int might match the return type of a gcc2
12536 builtin and then its argument prototype would still apply. */
12537 char gettimeofday ();
12546 rm -f conftest.$ac_objext conftest$ac_exeext
12547 if { (eval echo "$as_me:12547: \"$ac_link\"") >&5
12548 (eval $ac_link) 2>&5
12550 echo "$as_me:12550: \$? = $ac_status" >&5
12551 (exit $ac_status); } &&
12552 { ac_try='test -s conftest$ac_exeext'
12553 { (eval echo "$as_me:12553: \"$ac_try\"") >&5
12554 (eval $ac_try) 2>&5
12556 echo "$as_me:12556: \$? = $ac_status" >&5
12557 (exit $ac_status); }; }; then
12558 ac_cv_lib_bsd_gettimeofday=yes
12560 echo "$as_me: failed program was:" >&5
12561 cat conftest.$ac_ext >&5
12562 ac_cv_lib_bsd_gettimeofday=no
12564 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12565 LIBS=$ac_check_lib_save_LIBS
12567 echo "$as_me:12567: result: $ac_cv_lib_bsd_gettimeofday" >&5
12568 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12569 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12571 cat >>confdefs.h <<\EOF
12572 #define HAVE_GETTIMEOFDAY 1
12582 ### Checks for header files.
12583 echo "$as_me:12583: checking for ANSI C header files" >&5
12584 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12585 if test "${ac_cv_header_stdc+set}" = set; then
12586 echo $ECHO_N "(cached) $ECHO_C" >&6
12588 cat >conftest.$ac_ext <<_ACEOF
12589 #line 12589 "configure"
12590 #include "confdefs.h"
12591 #include <stdlib.h>
12592 #include <stdarg.h>
12593 #include <string.h>
12597 if { (eval echo "$as_me:12597: \"$ac_cpp conftest.$ac_ext\"") >&5
12598 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12600 egrep -v '^ *\+' conftest.er1 >conftest.err
12602 cat conftest.err >&5
12603 echo "$as_me:12603: \$? = $ac_status" >&5
12604 (exit $ac_status); } >/dev/null; then
12605 if test -s conftest.err; then
12606 ac_cpp_err=$ac_c_preproc_warn_flag
12613 if test -z "$ac_cpp_err"; then
12614 ac_cv_header_stdc=yes
12616 echo "$as_me: failed program was:" >&5
12617 cat conftest.$ac_ext >&5
12618 ac_cv_header_stdc=no
12620 rm -f conftest.err conftest.$ac_ext
12622 if test $ac_cv_header_stdc = yes; then
12623 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12624 cat >conftest.$ac_ext <<_ACEOF
12625 #line 12625 "configure"
12626 #include "confdefs.h"
12627 #include <string.h>
12630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12631 egrep "memchr" >/dev/null 2>&1; then
12634 ac_cv_header_stdc=no
12640 if test $ac_cv_header_stdc = yes; then
12641 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12642 cat >conftest.$ac_ext <<_ACEOF
12643 #line 12643 "configure"
12644 #include "confdefs.h"
12645 #include <stdlib.h>
12648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12649 egrep "free" >/dev/null 2>&1; then
12652 ac_cv_header_stdc=no
12658 if test $ac_cv_header_stdc = yes; then
12659 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12660 if test "$cross_compiling" = yes; then
12663 cat >conftest.$ac_ext <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12667 #if ((' ' & 0x0FF) == 0x020)
12668 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12669 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12671 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12672 || ('j' <= (c) && (c) <= 'r') \
12673 || ('s' <= (c) && (c) <= 'z'))
12674 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12677 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12682 for (i = 0; i < 256; i++)
12683 if (XOR (islower (i), ISLOWER (i))
12684 || toupper (i) != TOUPPER (i))
12685 $ac_main_return(2);
12686 $ac_main_return (0);
12689 rm -f conftest$ac_exeext
12690 if { (eval echo "$as_me:12690: \"$ac_link\"") >&5
12691 (eval $ac_link) 2>&5
12693 echo "$as_me:12693: \$? = $ac_status" >&5
12694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12695 { (eval echo "$as_me:12695: \"$ac_try\"") >&5
12696 (eval $ac_try) 2>&5
12698 echo "$as_me:12698: \$? = $ac_status" >&5
12699 (exit $ac_status); }; }; then
12702 echo "$as_me: program exited with status $ac_status" >&5
12703 echo "$as_me: failed program was:" >&5
12704 cat conftest.$ac_ext >&5
12705 ac_cv_header_stdc=no
12707 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12711 echo "$as_me:12711: result: $ac_cv_header_stdc" >&5
12712 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12713 if test $ac_cv_header_stdc = yes; then
12715 cat >>confdefs.h <<\EOF
12716 #define STDC_HEADERS 1
12721 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12723 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12724 inttypes.h stdint.h unistd.h
12726 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12727 echo "$as_me:12727: checking for $ac_header" >&5
12728 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12729 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12730 echo $ECHO_N "(cached) $ECHO_C" >&6
12732 cat >conftest.$ac_ext <<_ACEOF
12733 #line 12733 "configure"
12734 #include "confdefs.h"
12735 $ac_includes_default
12736 #include <$ac_header>
12738 rm -f conftest.$ac_objext
12739 if { (eval echo "$as_me:12739: \"$ac_compile\"") >&5
12740 (eval $ac_compile) 2>&5
12742 echo "$as_me:12742: \$? = $ac_status" >&5
12743 (exit $ac_status); } &&
12744 { ac_try='test -s conftest.$ac_objext'
12745 { (eval echo "$as_me:12745: \"$ac_try\"") >&5
12746 (eval $ac_try) 2>&5
12748 echo "$as_me:12748: \$? = $ac_status" >&5
12749 (exit $ac_status); }; }; then
12750 eval "$as_ac_Header=yes"
12752 echo "$as_me: failed program was:" >&5
12753 cat conftest.$ac_ext >&5
12754 eval "$as_ac_Header=no"
12756 rm -f conftest.$ac_objext conftest.$ac_ext
12758 echo "$as_me:12758: result: `eval echo '${'$as_ac_Header'}'`" >&5
12759 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12760 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12761 cat >>confdefs.h <<EOF
12762 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12768 echo "$as_me:12768: checking for signed char" >&5
12769 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12770 if test "${ac_cv_type_signed_char+set}" = set; then
12771 echo $ECHO_N "(cached) $ECHO_C" >&6
12773 cat >conftest.$ac_ext <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776 $ac_includes_default
12780 if ((signed char *) 0)
12782 if (sizeof (signed char))
12788 rm -f conftest.$ac_objext
12789 if { (eval echo "$as_me:12789: \"$ac_compile\"") >&5
12790 (eval $ac_compile) 2>&5
12792 echo "$as_me:12792: \$? = $ac_status" >&5
12793 (exit $ac_status); } &&
12794 { ac_try='test -s conftest.$ac_objext'
12795 { (eval echo "$as_me:12795: \"$ac_try\"") >&5
12796 (eval $ac_try) 2>&5
12798 echo "$as_me:12798: \$? = $ac_status" >&5
12799 (exit $ac_status); }; }; then
12800 ac_cv_type_signed_char=yes
12802 echo "$as_me: failed program was:" >&5
12803 cat conftest.$ac_ext >&5
12804 ac_cv_type_signed_char=no
12806 rm -f conftest.$ac_objext conftest.$ac_ext
12808 echo "$as_me:12808: result: $ac_cv_type_signed_char" >&5
12809 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12811 echo "$as_me:12811: checking size of signed char" >&5
12812 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12813 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12814 echo $ECHO_N "(cached) $ECHO_C" >&6
12816 if test "$ac_cv_type_signed_char" = yes; then
12817 if test "$cross_compiling" = yes; then
12818 # Depending upon the size, compute the lo and hi bounds.
12819 cat >conftest.$ac_ext <<_ACEOF
12820 #line 12820 "configure"
12821 #include "confdefs.h"
12822 $ac_includes_default
12826 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12831 rm -f conftest.$ac_objext
12832 if { (eval echo "$as_me:12832: \"$ac_compile\"") >&5
12833 (eval $ac_compile) 2>&5
12835 echo "$as_me:12835: \$? = $ac_status" >&5
12836 (exit $ac_status); } &&
12837 { ac_try='test -s conftest.$ac_objext'
12838 { (eval echo "$as_me:12838: \"$ac_try\"") >&5
12839 (eval $ac_try) 2>&5
12841 echo "$as_me:12841: \$? = $ac_status" >&5
12842 (exit $ac_status); }; }; then
12845 cat >conftest.$ac_ext <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848 $ac_includes_default
12852 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12857 rm -f conftest.$ac_objext
12858 if { (eval echo "$as_me:12858: \"$ac_compile\"") >&5
12859 (eval $ac_compile) 2>&5
12861 echo "$as_me:12861: \$? = $ac_status" >&5
12862 (exit $ac_status); } &&
12863 { ac_try='test -s conftest.$ac_objext'
12864 { (eval echo "$as_me:12864: \"$ac_try\"") >&5
12865 (eval $ac_try) 2>&5
12867 echo "$as_me:12867: \$? = $ac_status" >&5
12868 (exit $ac_status); }; }; then
12869 ac_hi=$ac_mid; break
12871 echo "$as_me: failed program was:" >&5
12872 cat conftest.$ac_ext >&5
12873 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12875 rm -f conftest.$ac_objext conftest.$ac_ext
12878 echo "$as_me: failed program was:" >&5
12879 cat conftest.$ac_ext >&5
12882 cat >conftest.$ac_ext <<_ACEOF
12883 #line 12883 "configure"
12884 #include "confdefs.h"
12885 $ac_includes_default
12889 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12894 rm -f conftest.$ac_objext
12895 if { (eval echo "$as_me:12895: \"$ac_compile\"") >&5
12896 (eval $ac_compile) 2>&5
12898 echo "$as_me:12898: \$? = $ac_status" >&5
12899 (exit $ac_status); } &&
12900 { ac_try='test -s conftest.$ac_objext'
12901 { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902 (eval $ac_try) 2>&5
12904 echo "$as_me:12904: \$? = $ac_status" >&5
12905 (exit $ac_status); }; }; then
12906 ac_lo=$ac_mid; break
12908 echo "$as_me: failed program was:" >&5
12909 cat conftest.$ac_ext >&5
12910 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12912 rm -f conftest.$ac_objext conftest.$ac_ext
12915 rm -f conftest.$ac_objext conftest.$ac_ext
12916 # Binary search between lo and hi bounds.
12917 while test "x$ac_lo" != "x$ac_hi"; do
12918 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12919 cat >conftest.$ac_ext <<_ACEOF
12920 #line 12920 "configure"
12921 #include "confdefs.h"
12922 $ac_includes_default
12926 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12931 rm -f conftest.$ac_objext
12932 if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933 (eval $ac_compile) 2>&5
12935 echo "$as_me:12935: \$? = $ac_status" >&5
12936 (exit $ac_status); } &&
12937 { ac_try='test -s conftest.$ac_objext'
12938 { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939 (eval $ac_try) 2>&5
12941 echo "$as_me:12941: \$? = $ac_status" >&5
12942 (exit $ac_status); }; }; then
12945 echo "$as_me: failed program was:" >&5
12946 cat conftest.$ac_ext >&5
12947 ac_lo=`expr $ac_mid + 1`
12949 rm -f conftest.$ac_objext conftest.$ac_ext
12951 ac_cv_sizeof_signed_char=$ac_lo
12953 if test "$cross_compiling" = yes; then
12954 { { echo "$as_me:12954: error: cannot run test program while cross compiling" >&5
12955 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12956 { (exit 1); exit 1; }; }
12958 cat >conftest.$ac_ext <<_ACEOF
12959 #line 12959 "configure"
12960 #include "confdefs.h"
12961 $ac_includes_default
12965 FILE *f = fopen ("conftest.val", "w");
12967 $ac_main_return (1);
12968 fprintf (f, "%d", (sizeof (signed char)));
12974 rm -f conftest$ac_exeext
12975 if { (eval echo "$as_me:12975: \"$ac_link\"") >&5
12976 (eval $ac_link) 2>&5
12978 echo "$as_me:12978: \$? = $ac_status" >&5
12979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12980 { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981 (eval $ac_try) 2>&5
12983 echo "$as_me:12983: \$? = $ac_status" >&5
12984 (exit $ac_status); }; }; then
12985 ac_cv_sizeof_signed_char=`cat conftest.val`
12987 echo "$as_me: program exited with status $ac_status" >&5
12988 echo "$as_me: failed program was:" >&5
12989 cat conftest.$ac_ext >&5
12991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12996 ac_cv_sizeof_signed_char=0
12999 echo "$as_me:12999: result: $ac_cv_sizeof_signed_char" >&5
13000 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13001 cat >>confdefs.h <<EOF
13002 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13005 echo "$as_me:13005: checking for ANSI C header files" >&5
13006 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13007 if test "${ac_cv_header_stdc+set}" = set; then
13008 echo $ECHO_N "(cached) $ECHO_C" >&6
13010 cat >conftest.$ac_ext <<_ACEOF
13011 #line 13011 "configure"
13012 #include "confdefs.h"
13013 #include <stdlib.h>
13014 #include <stdarg.h>
13015 #include <string.h>
13019 if { (eval echo "$as_me:13019: \"$ac_cpp conftest.$ac_ext\"") >&5
13020 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13022 egrep -v '^ *\+' conftest.er1 >conftest.err
13024 cat conftest.err >&5
13025 echo "$as_me:13025: \$? = $ac_status" >&5
13026 (exit $ac_status); } >/dev/null; then
13027 if test -s conftest.err; then
13028 ac_cpp_err=$ac_c_preproc_warn_flag
13035 if test -z "$ac_cpp_err"; then
13036 ac_cv_header_stdc=yes
13038 echo "$as_me: failed program was:" >&5
13039 cat conftest.$ac_ext >&5
13040 ac_cv_header_stdc=no
13042 rm -f conftest.err conftest.$ac_ext
13044 if test $ac_cv_header_stdc = yes; then
13045 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13046 cat >conftest.$ac_ext <<_ACEOF
13047 #line 13047 "configure"
13048 #include "confdefs.h"
13049 #include <string.h>
13052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13053 egrep "memchr" >/dev/null 2>&1; then
13056 ac_cv_header_stdc=no
13062 if test $ac_cv_header_stdc = yes; then
13063 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13064 cat >conftest.$ac_ext <<_ACEOF
13065 #line 13065 "configure"
13066 #include "confdefs.h"
13067 #include <stdlib.h>
13070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13071 egrep "free" >/dev/null 2>&1; then
13074 ac_cv_header_stdc=no
13080 if test $ac_cv_header_stdc = yes; then
13081 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13082 if test "$cross_compiling" = yes; then
13085 cat >conftest.$ac_ext <<_ACEOF
13086 #line 13086 "configure"
13087 #include "confdefs.h"
13089 #if ((' ' & 0x0FF) == 0x020)
13090 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13091 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13093 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13094 || ('j' <= (c) && (c) <= 'r') \
13095 || ('s' <= (c) && (c) <= 'z'))
13096 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13099 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13104 for (i = 0; i < 256; i++)
13105 if (XOR (islower (i), ISLOWER (i))
13106 || toupper (i) != TOUPPER (i))
13107 $ac_main_return(2);
13108 $ac_main_return (0);
13111 rm -f conftest$ac_exeext
13112 if { (eval echo "$as_me:13112: \"$ac_link\"") >&5
13113 (eval $ac_link) 2>&5
13115 echo "$as_me:13115: \$? = $ac_status" >&5
13116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13117 { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118 (eval $ac_try) 2>&5
13120 echo "$as_me:13120: \$? = $ac_status" >&5
13121 (exit $ac_status); }; }; then
13124 echo "$as_me: program exited with status $ac_status" >&5
13125 echo "$as_me: failed program was:" >&5
13126 cat conftest.$ac_ext >&5
13127 ac_cv_header_stdc=no
13129 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13133 echo "$as_me:13133: result: $ac_cv_header_stdc" >&5
13134 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13135 if test $ac_cv_header_stdc = yes; then
13137 cat >>confdefs.h <<\EOF
13138 #define STDC_HEADERS 1
13143 ac_header_dirent=no
13144 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13145 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13146 echo "$as_me:13146: checking for $ac_hdr that defines DIR" >&5
13147 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13149 echo $ECHO_N "(cached) $ECHO_C" >&6
13151 cat >conftest.$ac_ext <<_ACEOF
13152 #line 13152 "configure"
13153 #include "confdefs.h"
13154 #include <sys/types.h>
13166 rm -f conftest.$ac_objext
13167 if { (eval echo "$as_me:13167: \"$ac_compile\"") >&5
13168 (eval $ac_compile) 2>&5
13170 echo "$as_me:13170: \$? = $ac_status" >&5
13171 (exit $ac_status); } &&
13172 { ac_try='test -s conftest.$ac_objext'
13173 { (eval echo "$as_me:13173: \"$ac_try\"") >&5
13174 (eval $ac_try) 2>&5
13176 echo "$as_me:13176: \$? = $ac_status" >&5
13177 (exit $ac_status); }; }; then
13178 eval "$as_ac_Header=yes"
13180 echo "$as_me: failed program was:" >&5
13181 cat conftest.$ac_ext >&5
13182 eval "$as_ac_Header=no"
13184 rm -f conftest.$ac_objext conftest.$ac_ext
13186 echo "$as_me:13186: result: `eval echo '${'$as_ac_Header'}'`" >&5
13187 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13188 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13189 cat >>confdefs.h <<EOF
13190 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13193 ac_header_dirent=$ac_hdr; break
13197 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13198 if test $ac_header_dirent = dirent.h; then
13199 echo "$as_me:13199: checking for opendir in -ldir" >&5
13200 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13201 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13202 echo $ECHO_N "(cached) $ECHO_C" >&6
13204 ac_check_lib_save_LIBS=$LIBS
13206 cat >conftest.$ac_ext <<_ACEOF
13207 #line 13207 "configure"
13208 #include "confdefs.h"
13210 /* Override any gcc2 internal prototype to avoid an error. */
13214 /* We use char because int might match the return type of a gcc2
13215 builtin and then its argument prototype would still apply. */
13225 rm -f conftest.$ac_objext conftest$ac_exeext
13226 if { (eval echo "$as_me:13226: \"$ac_link\"") >&5
13227 (eval $ac_link) 2>&5
13229 echo "$as_me:13229: \$? = $ac_status" >&5
13230 (exit $ac_status); } &&
13231 { ac_try='test -s conftest$ac_exeext'
13232 { (eval echo "$as_me:13232: \"$ac_try\"") >&5
13233 (eval $ac_try) 2>&5
13235 echo "$as_me:13235: \$? = $ac_status" >&5
13236 (exit $ac_status); }; }; then
13237 ac_cv_lib_dir_opendir=yes
13239 echo "$as_me: failed program was:" >&5
13240 cat conftest.$ac_ext >&5
13241 ac_cv_lib_dir_opendir=no
13243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13244 LIBS=$ac_check_lib_save_LIBS
13246 echo "$as_me:13246: result: $ac_cv_lib_dir_opendir" >&5
13247 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13248 if test $ac_cv_lib_dir_opendir = yes; then
13253 echo "$as_me:13253: checking for opendir in -lx" >&5
13254 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13255 if test "${ac_cv_lib_x_opendir+set}" = set; then
13256 echo $ECHO_N "(cached) $ECHO_C" >&6
13258 ac_check_lib_save_LIBS=$LIBS
13260 cat >conftest.$ac_ext <<_ACEOF
13261 #line 13261 "configure"
13262 #include "confdefs.h"
13264 /* Override any gcc2 internal prototype to avoid an error. */
13268 /* We use char because int might match the return type of a gcc2
13269 builtin and then its argument prototype would still apply. */
13279 rm -f conftest.$ac_objext conftest$ac_exeext
13280 if { (eval echo "$as_me:13280: \"$ac_link\"") >&5
13281 (eval $ac_link) 2>&5
13283 echo "$as_me:13283: \$? = $ac_status" >&5
13284 (exit $ac_status); } &&
13285 { ac_try='test -s conftest$ac_exeext'
13286 { (eval echo "$as_me:13286: \"$ac_try\"") >&5
13287 (eval $ac_try) 2>&5
13289 echo "$as_me:13289: \$? = $ac_status" >&5
13290 (exit $ac_status); }; }; then
13291 ac_cv_lib_x_opendir=yes
13293 echo "$as_me: failed program was:" >&5
13294 cat conftest.$ac_ext >&5
13295 ac_cv_lib_x_opendir=no
13297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13298 LIBS=$ac_check_lib_save_LIBS
13300 echo "$as_me:13300: result: $ac_cv_lib_x_opendir" >&5
13301 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13302 if test $ac_cv_lib_x_opendir = yes; then
13308 echo "$as_me:13308: checking whether time.h and sys/time.h may both be included" >&5
13309 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13310 if test "${ac_cv_header_time+set}" = set; then
13311 echo $ECHO_N "(cached) $ECHO_C" >&6
13313 cat >conftest.$ac_ext <<_ACEOF
13314 #line 13314 "configure"
13315 #include "confdefs.h"
13316 #include <sys/types.h>
13317 #include <sys/time.h>
13323 if ((struct tm *) 0)
13329 rm -f conftest.$ac_objext
13330 if { (eval echo "$as_me:13330: \"$ac_compile\"") >&5
13331 (eval $ac_compile) 2>&5
13333 echo "$as_me:13333: \$? = $ac_status" >&5
13334 (exit $ac_status); } &&
13335 { ac_try='test -s conftest.$ac_objext'
13336 { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337 (eval $ac_try) 2>&5
13339 echo "$as_me:13339: \$? = $ac_status" >&5
13340 (exit $ac_status); }; }; then
13341 ac_cv_header_time=yes
13343 echo "$as_me: failed program was:" >&5
13344 cat conftest.$ac_ext >&5
13345 ac_cv_header_time=no
13347 rm -f conftest.$ac_objext conftest.$ac_ext
13349 echo "$as_me:13349: result: $ac_cv_header_time" >&5
13350 echo "${ECHO_T}$ac_cv_header_time" >&6
13351 if test $ac_cv_header_time = yes; then
13353 cat >>confdefs.h <<\EOF
13354 #define TIME_WITH_SYS_TIME 1
13359 ### checks for compiler characteristics
13361 ac_cpp='$CPP $CPPFLAGS'
13362 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13363 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13365 ac_main_return=return
13367 echo "$as_me:13367: checking for an ANSI C-conforming const" >&5
13368 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13369 if test "${ac_cv_c_const+set}" = set; then
13370 echo $ECHO_N "(cached) $ECHO_C" >&6
13372 cat >conftest.$ac_ext <<_ACEOF
13373 #line 13373 "configure"
13374 #include "confdefs.h"
13379 /* FIXME: Include the comments suggested by Paul. */
13380 #ifndef __cplusplus
13381 /* Ultrix mips cc rejects this. */
13382 typedef int charset[2];
13384 /* SunOS 4.1.1 cc rejects this. */
13385 char const *const *ccp;
13387 /* NEC SVR4.0.2 mips cc rejects this. */
13388 struct point {int x, y;};
13389 static struct point const zero = {0,0};
13390 /* AIX XL C 1.02.0.0 rejects this.
13391 It does not let you subtract one const X* pointer from another in
13392 an arm of an if-expression whose if-part is not a constant
13394 const char *g = "string";
13395 ccp = &g + (g ? g-g : 0);
13396 /* HPUX 7.0 cc rejects these. */
13399 ccp = (char const *const *) p;
13400 { /* SCO 3.2v4 cc rejects this. */
13402 char const *s = 0 ? (char *) 0 : (char const *) 0;
13406 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13407 int x[] = {25, 17};
13408 const int *foo = &x[0];
13411 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13412 typedef const int *iptr;
13416 { /* AIX XL C 1.02.0.0 rejects this saying
13417 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13418 struct s { int j; const int *ap[3]; };
13419 struct s *b; b->j = 5;
13421 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13422 const int foo = 10;
13430 rm -f conftest.$ac_objext
13431 if { (eval echo "$as_me:13431: \"$ac_compile\"") >&5
13432 (eval $ac_compile) 2>&5
13434 echo "$as_me:13434: \$? = $ac_status" >&5
13435 (exit $ac_status); } &&
13436 { ac_try='test -s conftest.$ac_objext'
13437 { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438 (eval $ac_try) 2>&5
13440 echo "$as_me:13440: \$? = $ac_status" >&5
13441 (exit $ac_status); }; }; then
13444 echo "$as_me: failed program was:" >&5
13445 cat conftest.$ac_ext >&5
13448 rm -f conftest.$ac_objext conftest.$ac_ext
13450 echo "$as_me:13450: result: $ac_cv_c_const" >&5
13451 echo "${ECHO_T}$ac_cv_c_const" >&6
13452 if test $ac_cv_c_const = no; then
13454 cat >>confdefs.h <<\EOF
13460 ### Checks for external-data
13462 echo "$as_me:13462: checking if data-only library module links" >&5
13463 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13464 if test "${cf_cv_link_dataonly+set}" = set; then
13465 echo $ECHO_N "(cached) $ECHO_C" >&6
13469 cat >conftest.$ac_ext <<EOF
13470 #line 13470 "configure"
13471 int testdata[3] = { 123, 456, 789 };
13473 if { (eval echo "$as_me:13473: \"$ac_compile\"") >&5
13474 (eval $ac_compile) 2>&5
13476 echo "$as_me:13476: \$? = $ac_status" >&5
13477 (exit $ac_status); } ; then
13478 mv conftest.o data.o && \
13479 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13481 rm -f conftest.$ac_ext data.o
13482 cat >conftest.$ac_ext <<EOF
13483 #line 13483 "configure"
13487 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
13489 extern int testdata[3];
13490 return testdata[0] == 123
13491 && testdata[1] == 456
13492 && testdata[2] == 789;
13496 if { (eval echo "$as_me:13496: \"$ac_compile\"") >&5
13497 (eval $ac_compile) 2>&5
13499 echo "$as_me:13499: \$? = $ac_status" >&5
13500 (exit $ac_status); }; then
13501 mv conftest.o func.o && \
13502 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13504 rm -f conftest.$ac_ext func.o
13505 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13506 cf_saveLIBS="$LIBS"
13507 LIBS="conftest.a $LIBS"
13508 if test "$cross_compiling" = yes; then
13509 cf_cv_link_dataonly=unknown
13511 cat >conftest.$ac_ext <<_ACEOF
13512 #line 13512 "configure"
13513 #include "confdefs.h"
13517 extern int testfunc();
13518 ${cf_cv_main_return:-return} (!testfunc());
13522 rm -f conftest$ac_exeext
13523 if { (eval echo "$as_me:13523: \"$ac_link\"") >&5
13524 (eval $ac_link) 2>&5
13526 echo "$as_me:13526: \$? = $ac_status" >&5
13527 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13528 { (eval echo "$as_me:13528: \"$ac_try\"") >&5
13529 (eval $ac_try) 2>&5
13531 echo "$as_me:13531: \$? = $ac_status" >&5
13532 (exit $ac_status); }; }; then
13533 cf_cv_link_dataonly=yes
13535 echo "$as_me: program exited with status $ac_status" >&5
13536 echo "$as_me: failed program was:" >&5
13537 cat conftest.$ac_ext >&5
13538 cf_cv_link_dataonly=no
13540 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13542 LIBS="$cf_saveLIBS"
13546 echo "$as_me:13546: result: $cf_cv_link_dataonly" >&5
13547 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13549 if test "$cf_cv_link_dataonly" = no ; then
13551 cat >>confdefs.h <<\EOF
13552 #define BROKEN_LINKER 1
13558 ### Checks for library functions.
13560 echo "$as_me:13560: checking for working mkstemp" >&5
13561 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13562 if test "${cf_cv_func_mkstemp+set}" = set; then
13563 echo $ECHO_N "(cached) $ECHO_C" >&6
13567 if test "$cross_compiling" = yes; then
13568 cf_cv_func_mkstemp=maybe
13570 cat >conftest.$ac_ext <<_ACEOF
13571 #line 13571 "configure"
13572 #include "confdefs.h"
13574 #include <sys/types.h>
13575 #include <stdlib.h>
13577 #include <string.h>
13578 #include <sys/stat.h>
13581 char *tmpl = "conftestXXXXXX";
13589 for (n = 0; n < 2; ++n) {
13590 strcpy(name[n], tmpl);
13591 if ((fd = mkstemp(name[n])) >= 0) {
13592 if (!strcmp(name[n], tmpl)
13593 || stat(name[n], &sb) != 0
13594 || (sb.st_mode & S_IFMT) != S_IFREG
13595 || (sb.st_mode & 077) != 0) {
13602 && !strcmp(name[0], name[1]))
13604 ${cf_cv_main_return:-return}(result);
13608 rm -f conftest$ac_exeext
13609 if { (eval echo "$as_me:13609: \"$ac_link\"") >&5
13610 (eval $ac_link) 2>&5
13612 echo "$as_me:13612: \$? = $ac_status" >&5
13613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13614 { (eval echo "$as_me:13614: \"$ac_try\"") >&5
13615 (eval $ac_try) 2>&5
13617 echo "$as_me:13617: \$? = $ac_status" >&5
13618 (exit $ac_status); }; }; then
13619 cf_cv_func_mkstemp=yes
13622 echo "$as_me: program exited with status $ac_status" >&5
13623 echo "$as_me: failed program was:" >&5
13624 cat conftest.$ac_ext >&5
13625 cf_cv_func_mkstemp=no
13628 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13632 echo "$as_me:13632: result: $cf_cv_func_mkstemp" >&5
13633 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13634 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
13635 echo "$as_me:13635: checking for mkstemp" >&5
13636 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13637 if test "${ac_cv_func_mkstemp+set}" = set; then
13638 echo $ECHO_N "(cached) $ECHO_C" >&6
13640 cat >conftest.$ac_ext <<_ACEOF
13641 #line 13641 "configure"
13642 #include "confdefs.h"
13643 /* System header to define __stub macros and hopefully few prototypes,
13644 which can conflict with char mkstemp (); below. */
13645 #include <assert.h>
13646 /* Override any gcc2 internal prototype to avoid an error. */
13650 /* We use char because int might match the return type of a gcc2
13651 builtin and then its argument prototype would still apply. */
13658 /* The GNU C library defines this for functions which it implements
13659 to always fail with ENOSYS. Some functions are actually named
13660 something starting with __ and the normal name is an alias. */
13661 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13664 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13671 rm -f conftest.$ac_objext conftest$ac_exeext
13672 if { (eval echo "$as_me:13672: \"$ac_link\"") >&5
13673 (eval $ac_link) 2>&5
13675 echo "$as_me:13675: \$? = $ac_status" >&5
13676 (exit $ac_status); } &&
13677 { ac_try='test -s conftest$ac_exeext'
13678 { (eval echo "$as_me:13678: \"$ac_try\"") >&5
13679 (eval $ac_try) 2>&5
13681 echo "$as_me:13681: \$? = $ac_status" >&5
13682 (exit $ac_status); }; }; then
13683 ac_cv_func_mkstemp=yes
13685 echo "$as_me: failed program was:" >&5
13686 cat conftest.$ac_ext >&5
13687 ac_cv_func_mkstemp=no
13689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13691 echo "$as_me:13691: result: $ac_cv_func_mkstemp" >&5
13692 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13695 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
13697 cat >>confdefs.h <<\EOF
13698 #define HAVE_MKSTEMP 1
13703 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13704 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13705 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13709 if test "$cf_with_ada" != "no" ; then
13711 cf_ada_make=gnatmake
13712 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
13713 set dummy $cf_ada_make; ac_word=$2
13714 echo "$as_me:13714: checking for $ac_word" >&5
13715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13716 if test "${ac_cv_prog_gnat_exists+set}" = set; then
13717 echo $ECHO_N "(cached) $ECHO_C" >&6
13719 if test -n "$gnat_exists"; then
13720 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13722 ac_save_IFS=$IFS; IFS=$ac_path_separator
13724 for ac_dir in $ac_dummy; do
13726 test -z "$ac_dir" && ac_dir=.
13727 $as_executable_p "$ac_dir/$ac_word" || continue
13728 ac_cv_prog_gnat_exists="yes"
13729 echo "$as_me:13729: found $ac_dir/$ac_word" >&5
13733 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13736 gnat_exists=$ac_cv_prog_gnat_exists
13737 if test -n "$gnat_exists"; then
13738 echo "$as_me:13738: result: $gnat_exists" >&5
13739 echo "${ECHO_T}$gnat_exists" >&6
13741 echo "$as_me:13741: result: no" >&5
13742 echo "${ECHO_T}no" >&6
13745 if test "$ac_cv_prog_gnat_exists" = no; then
13747 cf_cv_prog_gnat_correct=no
13750 echo "$as_me:13750: checking for gnat version" >&5
13751 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13752 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
13753 grep '[0-9].[0-9][0-9]*' |\
13754 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13755 echo "$as_me:13755: result: $cf_gnat_version" >&5
13756 echo "${ECHO_T}$cf_gnat_version" >&6
13758 case $cf_gnat_version in
13759 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
13760 cf_cv_prog_gnat_correct=yes
13763 { echo "$as_me:13763: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
13764 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
13765 cf_cv_prog_gnat_correct=no
13769 # Extract the first word of "m4", so it can be a program name with args.
13770 set dummy m4; ac_word=$2
13771 echo "$as_me:13771: checking for $ac_word" >&5
13772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13773 if test "${ac_cv_prog_M4_exists+set}" = set; then
13774 echo $ECHO_N "(cached) $ECHO_C" >&6
13776 if test -n "$M4_exists"; then
13777 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13779 ac_save_IFS=$IFS; IFS=$ac_path_separator
13781 for ac_dir in $ac_dummy; do
13783 test -z "$ac_dir" && ac_dir=.
13784 $as_executable_p "$ac_dir/$ac_word" || continue
13785 ac_cv_prog_M4_exists="yes"
13786 echo "$as_me:13786: found $ac_dir/$ac_word" >&5
13790 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13793 M4_exists=$ac_cv_prog_M4_exists
13794 if test -n "$M4_exists"; then
13795 echo "$as_me:13795: result: $M4_exists" >&5
13796 echo "${ECHO_T}$M4_exists" >&6
13798 echo "$as_me:13798: result: no" >&5
13799 echo "${ECHO_T}no" >&6
13802 if test "$ac_cv_prog_M4_exists" = no; then
13803 cf_cv_prog_gnat_correct=no
13804 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13806 if test "$cf_cv_prog_gnat_correct" = yes; then
13807 echo "$as_me:13807: checking if GNAT works" >&5
13808 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13810 rm -rf conftest* *~conftest*
13811 cat >>conftest.ads <<CF_EOF
13812 procedure conftest;
13814 cat >>conftest.adb <<CF_EOF
13817 procedure conftest is
13819 Text_IO.Put ("Hello World");
13821 GNAT.OS_Lib.OS_Exit (0);
13824 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13825 if ( ./conftest 1>&5 2>&1 ) ; then
13826 cf_cv_prog_gnat_correct=yes
13828 cf_cv_prog_gnat_correct=no
13831 cf_cv_prog_gnat_correct=no
13833 rm -rf conftest* *~conftest*
13835 echo "$as_me:13835: result: $cf_cv_prog_gnat_correct" >&5
13836 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13840 if test "$cf_cv_prog_gnat_correct" = yes; then
13842 echo "$as_me:13842: checking optimization options for ADAFLAGS" >&5
13843 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
13847 ADAFLAGS="$ADAFLAGS -g"
13853 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
13855 ADAFLAGS="$ADAFLAGS $cf_O_flag"
13859 echo "$as_me:13859: result: $ADAFLAGS" >&5
13860 echo "${ECHO_T}$ADAFLAGS" >&6
13862 echo "$as_me:13862: checking if GNATPREP supports -T option" >&5
13863 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
13864 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
13865 echo $ECHO_N "(cached) $ECHO_C" >&6
13868 cf_cv_gnatprep_opt_t=no
13869 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
13872 echo "$as_me:13872: result: $cf_cv_gnatprep_opt_t" >&5
13873 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
13874 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
13876 echo "$as_me:13876: checking if GNAT supports generics" >&5
13877 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
13878 case $cf_gnat_version in
13880 cf_gnat_generics=yes
13883 cf_gnat_generics=no
13886 echo "$as_me:13886: result: $cf_gnat_generics" >&5
13887 echo "${ECHO_T}$cf_gnat_generics" >&6
13889 if test "$cf_gnat_generics" = yes
13891 cf_compile_generics=generics
13892 cf_generic_objects="\${GENOBJS}"
13894 cf_compile_generics=
13895 cf_generic_objects=
13898 echo "$as_me:13898: checking if GNAT supports SIGINT" >&5
13899 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
13900 if test "${cf_cv_gnat_sigint+set}" = set; then
13901 echo $ECHO_N "(cached) $ECHO_C" >&6
13904 rm -rf conftest* *~conftest*
13905 cat >>conftest.ads <<CF_EOF
13906 with Ada.Interrupts.Names;
13908 package ConfTest is
13910 pragma Warnings (Off); -- the next pragma exists since 3.11p
13911 pragma Unreserve_All_Interrupts;
13912 pragma Warnings (On);
13914 protected Process is
13916 function Continue return Boolean;
13917 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
13919 Done : Boolean := False;
13924 cat >>conftest.adb <<CF_EOF
13925 package body ConfTest is
13926 protected body Process is
13931 function Continue return Boolean is
13938 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13939 cf_cv_gnat_sigint=yes
13941 cf_cv_gnat_sigint=no
13943 rm -rf conftest* *~conftest*
13946 echo "$as_me:13946: result: $cf_cv_gnat_sigint" >&5
13947 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
13949 if test $cf_cv_gnat_sigint = yes ; then
13952 USE_GNAT_SIGINT="#"
13955 cf_gnat_libraries=no
13956 cf_gnat_projects=no
13958 if test "$enable_gnat_projects" != no ; then
13959 echo "$as_me:13959: checking if GNAT supports project files" >&5
13960 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
13961 case $cf_gnat_version in
13965 case $cf_cv_system_name in
13969 mkdir conftest.src conftest.bin conftest.lib
13971 rm -rf conftest* *~conftest*
13972 cat >>library.gpr <<CF_EOF
13974 Kind := External ("LIB_KIND");
13975 for Library_Name use "ConfTest";
13976 for Object_Dir use ".";
13977 for Library_ALI_Dir use External("LIBRARY_DIR");
13978 for Library_Version use External ("SONAME");
13979 for Library_Kind use Kind;
13980 for Library_Dir use External("BUILD_DIR");
13981 Source_Dir := External ("SOURCE_DIR");
13982 for Source_Dirs use (Source_Dir);
13985 cat >>confpackage.ads <<CF_EOF
13986 package ConfPackage is
13987 procedure conftest;
13990 cat >>confpackage.adb <<CF_EOF
13992 package body ConfPackage is
13993 procedure conftest is
13995 Text_IO.Put ("Hello World");
14000 if ( $cf_ada_make $ADAFLAGS \
14002 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
14003 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
14004 -XSOURCE_DIR=`pwd` \
14005 -XSONAME=libConfTest.so.1 \
14006 -XLIB_KIND=static 1>&5 2>&1 ) ; then
14007 cf_gnat_projects=yes
14010 if test -f conftest.lib/confpackage.ali
14012 cf_gnat_libraries=yes
14014 rm -rf conftest* *~conftest*
14019 echo "$as_me:14019: result: $cf_gnat_projects" >&5
14020 echo "${ECHO_T}$cf_gnat_projects" >&6
14021 fi # enable_gnat_projects
14023 if test $cf_gnat_projects = yes
14025 echo "$as_me:14025: checking if GNAT supports libraries" >&5
14026 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
14027 echo "$as_me:14027: result: $cf_gnat_libraries" >&5
14028 echo "${ECHO_T}$cf_gnat_libraries" >&6
14031 if test "$cf_gnat_projects" = yes
14033 USE_OLD_MAKERULES="#"
14034 USE_GNAT_PROJECTS=""
14036 USE_OLD_MAKERULES=""
14037 USE_GNAT_PROJECTS="#"
14040 if test "$cf_gnat_libraries" = yes
14042 USE_GNAT_LIBRARIES=""
14044 USE_GNAT_LIBRARIES="#"
14047 echo "$as_me:14047: checking for ada-compiler" >&5
14048 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
14050 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14051 if test "${with_ada_compiler+set}" = set; then
14052 withval="$with_ada_compiler"
14053 cf_ada_compiler=$withval
14055 cf_ada_compiler=gnatmake
14058 echo "$as_me:14058: result: $cf_ada_compiler" >&5
14059 echo "${ECHO_T}$cf_ada_compiler" >&6
14061 cf_ada_package=terminal_interface
14063 echo "$as_me:14063: checking for ada-include" >&5
14064 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
14066 # Check whether --with-ada-include or --without-ada-include was given.
14067 if test "${with_ada_include+set}" = set; then
14068 withval="$with_ada_include"
14071 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
14072 fi; if test -n "$prefix/share/ada/adainclude" ; then
14074 if test "x$prefix" != xNONE; then
14075 cf_path_syntax="$prefix"
14077 cf_path_syntax="$ac_default_prefix"
14080 case ".$withval" in
14081 (.\$\(*\)*|.\'*\'*)
14085 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14087 (.\${*prefix}*|.\${*dir}*)
14088 eval withval="$withval"
14089 case ".$withval" in
14091 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14096 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14099 { { echo "$as_me:14099: error: expected a pathname, not \"$withval\"" >&5
14100 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14101 { (exit 1); exit 1; }; }
14106 eval ADA_INCLUDE="$withval"
14108 echo "$as_me:14108: result: $ADA_INCLUDE" >&5
14109 echo "${ECHO_T}$ADA_INCLUDE" >&6
14111 echo "$as_me:14111: checking for ada-objects" >&5
14112 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
14114 # Check whether --with-ada-objects or --without-ada-objects was given.
14115 if test "${with_ada_objects+set}" = set; then
14116 withval="$with_ada_objects"
14119 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
14120 fi; if test -n "$prefix/lib/ada/adalib" ; then
14122 if test "x$prefix" != xNONE; then
14123 cf_path_syntax="$prefix"
14125 cf_path_syntax="$ac_default_prefix"
14128 case ".$withval" in
14129 (.\$\(*\)*|.\'*\'*)
14133 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14135 (.\${*prefix}*|.\${*dir}*)
14136 eval withval="$withval"
14137 case ".$withval" in
14139 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14144 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14147 { { echo "$as_me:14147: error: expected a pathname, not \"$withval\"" >&5
14148 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14149 { (exit 1); exit 1; }; }
14154 eval ADA_OBJECTS="$withval"
14156 echo "$as_me:14156: result: $ADA_OBJECTS" >&5
14157 echo "${ECHO_T}$ADA_OBJECTS" >&6
14159 echo "$as_me:14159: checking if an Ada95 shared-library should be built" >&5
14160 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
14162 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
14163 if test "${with_ada_sharedlib+set}" = set; then
14164 withval="$with_ada_sharedlib"
14165 with_ada_sharedlib=$withval
14167 with_ada_sharedlib=no
14169 echo "$as_me:14169: result: $with_ada_sharedlib" >&5
14170 echo "${ECHO_T}$with_ada_sharedlib" >&6
14172 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
14173 MAKE_ADA_SHAREDLIB="#"
14175 if test "x$with_ada_sharedlib" != xno
14177 MAKE_ADA_SHAREDLIB=
14178 if test "x$with_ada_sharedlib" != xyes
14180 ADA_SHAREDLIB="$with_ada_sharedlib"
14185 { { echo "$as_me:14185: error: No usable Ada compiler found" >&5
14186 echo "$as_me: error: No usable Ada compiler found" >&2;}
14187 { (exit 1); exit 1; }; }
14190 { { echo "$as_me:14190: error: The Ada compiler is needed for this package" >&5
14191 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
14192 { (exit 1); exit 1; }; }
14195 ################################################################################
14202 ### Construct the list of include-directories to be generated
14204 if test "$srcdir" != "."; then
14205 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14207 CPPFLAGS="-I../include $CPPFLAGS"
14208 if test "$srcdir" != "."; then
14209 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
14211 CPPFLAGS="-I. $CPPFLAGS"
14213 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
14214 if test "$srcdir" != "."; then
14215 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14217 if test "$GCC" != yes; then
14218 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14219 elif test "$includedir" != "/usr/include"; then
14220 if test "$includedir" = '${prefix}/include' ; then
14221 if test x$prefix != x/usr ; then
14222 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14225 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14229 ### Build up pieces for makefile rules
14230 echo "$as_me:14230: checking default library suffix" >&5
14231 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14233 case $DFT_LWR_MODEL in
14234 (libtool) DFT_ARG_SUFFIX='' ;;
14235 (normal) DFT_ARG_SUFFIX='' ;;
14236 (debug) DFT_ARG_SUFFIX='_g' ;;
14237 (profile) DFT_ARG_SUFFIX='_p' ;;
14238 (shared) DFT_ARG_SUFFIX='' ;;
14240 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14241 echo "$as_me:14241: result: $DFT_ARG_SUFFIX" >&5
14242 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14244 echo "$as_me:14244: checking default library-dependency suffix" >&5
14245 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14247 case X$DFT_LWR_MODEL in
14249 DFT_LIB_SUFFIX='.la'
14250 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14253 DFT_LIB_SUFFIX='_g.a'
14254 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14257 DFT_LIB_SUFFIX='_p.a'
14258 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14261 case $cf_cv_system_name in
14263 DFT_LIB_SUFFIX='.so'
14264 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14266 (cygwin*|msys*|mingw*)
14267 DFT_LIB_SUFFIX='.dll'
14268 DFT_DEP_SUFFIX='.dll.a'
14271 DFT_LIB_SUFFIX='.dylib'
14272 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14277 DFT_LIB_SUFFIX='.so'
14278 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14281 DFT_LIB_SUFFIX='.sl'
14282 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14287 DFT_LIB_SUFFIX='.so'
14288 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14293 DFT_LIB_SUFFIX='.a'
14294 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14297 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
14299 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
14300 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
14302 echo "$as_me:14302: result: $DFT_DEP_SUFFIX" >&5
14303 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14305 echo "$as_me:14305: checking default object directory" >&5
14306 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14308 case $DFT_LWR_MODEL in
14309 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
14310 (normal) DFT_OBJ_SUBDIR='objects' ;;
14311 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
14312 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
14314 case $cf_cv_system_name in
14316 DFT_OBJ_SUBDIR='objects' ;;
14318 DFT_OBJ_SUBDIR='obj_s' ;;
14321 echo "$as_me:14321: result: $DFT_OBJ_SUBDIR" >&5
14322 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14324 ### Set up low-level terminfo dependencies for makefiles.
14326 if test "$DFT_LWR_MODEL" = shared ; then
14327 case $cf_cv_system_name in
14329 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
14332 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
14337 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
14339 ### Construct the list of subdirectories for which we'll customize makefiles
14340 ### with the appropriate compile-rules.
14342 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
14344 cat >>confdefs.h <<EOF
14345 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
14348 ### Now that we're done running tests, add the compiler-warnings, if any
14353 cf_new_extra_cppflags=
14355 for cf_add_cflags in $EXTRA_CFLAGS
14357 case $cf_fix_cppflags in
14359 case $cf_add_cflags in
14360 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14361 case $cf_add_cflags in
14363 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14365 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14366 && test -z "${cf_tst_cflags}" \
14367 && cf_fix_cppflags=yes
14369 if test $cf_fix_cppflags = yes ; then
14370 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14372 elif test "${cf_tst_cflags}" = "\"'" ; then
14373 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14378 case "$CPPFLAGS" in
14382 case $cf_add_cflags in
14384 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14386 CPPFLAGS=`echo "$CPPFLAGS" | \
14387 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14388 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14392 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14397 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14402 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14404 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14406 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14407 && test -z "${cf_tst_cflags}" \
14408 && cf_fix_cppflags=no
14413 if test -n "$cf_new_cflags" ; then
14415 CFLAGS="$CFLAGS $cf_new_cflags"
14418 if test -n "$cf_new_cppflags" ; then
14420 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14423 if test -n "$cf_new_extra_cppflags" ; then
14425 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14428 ################################################################################
14434 NCURSES_SHLIB2="sh -c"
14436 ADA_SUBDIRS="include gen src doc"
14437 if test "x$cf_with_tests" != "xno" ; then
14438 ADA_SUBDIRS="$ADA_SUBDIRS samples"
14440 for cf_dir in $ADA_SUBDIRS
14442 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
14449 # match layout used by make-tar.sh
14450 ADAHTML_DIR=../doc/ada
14452 if test "x$cross_compiling" = xyes ; then
14453 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
14455 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
14458 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
14459 ac_config_commands="$ac_config_commands default"
14460 cat >confcache <<\_ACEOF
14461 # This file is a shell script that caches the results of configure
14462 # tests run on this system so they can be shared between configure
14463 # scripts and configure runs, see configure's option --config-cache.
14464 # It is not useful on other systems. If it contains results you don't
14465 # want to keep, you may remove or edit it.
14467 # config.status only pays attention to the cache file if you give it
14468 # the --recheck option to rerun configure.
14470 # `ac_cv_env_foo' variables (set or unset) will be overriden when
14471 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14472 # following values.
14476 # The following way of writing the cache mishandles newlines in values,
14477 # but we know of no workaround that is simple, portable, and efficient.
14478 # So, don't put newlines in cache variables' values.
14479 # Ultrix sh set writes to stderr and can't be redirected directly,
14480 # and sets the high bit in the cache file unless we assign to the vars.
14483 case `(ac_space=' '; set | grep ac_space) 2>&1` in
14485 # `set' does not quote correctly, so add quotes (double-quote
14486 # substitution turns \\\\ into \\, and sed turns \\ into \).
14489 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14492 # `set' quotes correctly as required by POSIX, so do not add quotes.
14494 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14501 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14503 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14505 if cmp -s $cache_file confcache; then :; else
14506 if test -w $cache_file; then
14507 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14508 cat confcache >$cache_file
14510 echo "not updating unwritable cache $cache_file"
14515 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14516 # Let make expand exec_prefix.
14517 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14519 # VPATH may cause trouble with some makes, so we remove $(srcdir),
14520 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14521 # trailing colons and then remove the whole line if VPATH becomes empty
14522 # (actually we leave an empty line to preserve line numbers).
14523 if test "x$srcdir" = x.; then
14524 ac_vpsub='/^[ ]*VPATH[ ]*=/{
14525 s/:*\$(srcdir):*/:/;
14526 s/:*\${srcdir}:*/:/;
14528 s/^\([^=]*=[ ]*\):*/\1/;
14534 DEFS=-DHAVE_CONFIG_H
14536 : ${CONFIG_STATUS=./config.status}
14537 ac_clean_files_save=$ac_clean_files
14538 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14539 { echo "$as_me:14539: creating $CONFIG_STATUS" >&5
14540 echo "$as_me: creating $CONFIG_STATUS" >&6;}
14541 cat >$CONFIG_STATUS <<_ACEOF
14543 # Generated automatically by configure.
14544 # Run this file to recreate the current configuration.
14545 # Compiler output produced by configure, useful for debugging
14546 # configure, is in config.log if it exists.
14549 SHELL=\${CONFIG_SHELL-$SHELL}
14550 ac_cs_invocation="\$0 \$@"
14554 cat >>$CONFIG_STATUS <<\_ACEOF
14555 # Be Bourne compatible
14556 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14559 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14563 # Name of the executable.
14564 as_me=`echo "$0" |sed 's,.*[\\/],,'`
14566 if expr a : '\(a\)' >/dev/null 2>&1; then
14572 rm -f conf$$ conf$$.exe conf$$.file
14574 if ln -s conf$$.file conf$$ 2>/dev/null; then
14575 # We could just check for DJGPP; but this test a) works b) is more generic
14576 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14577 if test -f conf$$.exe; then
14578 # Don't use ln at all; we don't have any links
14583 elif ln conf$$.file conf$$ 2>/dev/null; then
14588 rm -f conf$$ conf$$.exe conf$$.file
14590 as_executable_p="test -f"
14592 # Support unset when possible.
14593 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14600 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14601 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14602 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14603 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14604 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14605 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14606 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14607 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14610 # We need space, tab and new line, in precisely that order.
14616 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14622 # Files that config.status was made for.
14623 if test -n "$ac_config_files"; then
14624 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14627 if test -n "$ac_config_headers"; then
14628 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14631 if test -n "$ac_config_links"; then
14632 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14635 if test -n "$ac_config_commands"; then
14636 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14639 cat >>$CONFIG_STATUS <<\EOF
14642 \`$as_me' instantiates files from templates according to the
14643 current configuration.
14645 Usage: $0 [OPTIONS] [FILE]...
14647 -h, --help print this help, then exit
14648 -V, --version print version number, then exit
14649 -d, --debug don't remove temporary files
14650 --recheck update $as_me by reconfiguring in the same conditions
14651 --file=FILE[:TEMPLATE]
14652 instantiate the configuration file FILE
14653 --header=FILE[:TEMPLATE]
14654 instantiate the configuration header FILE
14656 Configuration files:
14659 Configuration headers:
14662 Configuration commands:
14665 Report bugs to <dickey@invisible-island.net>."
14668 cat >>$CONFIG_STATUS <<EOF
14671 configured by $0, generated by GNU Autoconf 2.52.20150926,
14672 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14674 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14675 Free Software Foundation, Inc.
14676 This config.status script is free software; the Free Software Foundation
14677 gives unlimited permission to copy, distribute and modify it."
14682 cat >>$CONFIG_STATUS <<\EOF
14683 # If no file are specified by the user, then we need to provide default
14684 # value. By we need to know if files were specified by the user.
14690 ac_option=`expr "x$1" : 'x\([^=]*\)='`
14691 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14693 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14697 *) # This is not an option, so the user has probably given explicit
14699 ac_need_defaults=false;;
14703 # Handling of the options.
14705 cat >>$CONFIG_STATUS <<EOF
14706 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14707 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14708 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14710 cat >>$CONFIG_STATUS <<\EOF
14711 --version | --vers* | -V )
14712 echo "$ac_cs_version"; exit 0 ;;
14714 # Conflict between --help and --header
14715 { { echo "$as_me:14715: error: ambiguous option: $1
14716 Try \`$0 --help' for more information." >&5
14717 echo "$as_me: error: ambiguous option: $1
14718 Try \`$0 --help' for more information." >&2;}
14719 { (exit 1); exit 1; }; };;
14720 --help | --hel | -h )
14721 echo "$ac_cs_usage"; exit 0 ;;
14722 --debug | --d* | -d )
14724 --file | --fil | --fi | --f )
14726 CONFIG_FILES="$CONFIG_FILES $1"
14727 ac_need_defaults=false;;
14728 --header | --heade | --head | --hea )
14730 CONFIG_HEADERS="$CONFIG_HEADERS $1"
14731 ac_need_defaults=false;;
14733 # This is an error.
14734 -*) { { echo "$as_me:14734: error: unrecognized option: $1
14735 Try \`$0 --help' for more information." >&5
14736 echo "$as_me: error: unrecognized option: $1
14737 Try \`$0 --help' for more information." >&2;}
14738 { (exit 1); exit 1; }; } ;;
14740 *) ac_config_targets="$ac_config_targets $1" ;;
14749 ## ----------------------- ##
14750 ## Running config.status. ##
14751 ## ----------------------- ##
14753 This file was extended by $as_me 2.52.20150926, executed with
14754 CONFIG_FILES = $CONFIG_FILES
14755 CONFIG_HEADERS = $CONFIG_HEADERS
14756 CONFIG_LINKS = $CONFIG_LINKS
14757 CONFIG_COMMANDS = $CONFIG_COMMANDS
14758 > $ac_cs_invocation
14759 on `(hostname || uname -n) 2>/dev/null | sed 1q`
14764 cat >>$CONFIG_STATUS <<EOF
14766 # INIT-COMMANDS section.
14769 ### Special initialization commands, used to pass information from the
14770 ### configuration-run into config.status
14773 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14774 DFT_LWR_MODEL="$DFT_LWR_MODEL"
14775 LIB_NAME="$LIB_NAME"
14776 LIB_PREFIX="$LIB_PREFIX"
14777 LIB_SUFFIX="$LIB_SUFFIX"
14779 NCURSES_MAJOR="$NCURSES_MAJOR"
14780 NCURSES_MINOR="$NCURSES_MINOR"
14781 NCURSES_PATCH="$NCURSES_PATCH"
14782 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
14783 cf_cv_abi_version="$cf_cv_abi_version"
14784 cf_cv_rel_version="$cf_cv_rel_version"
14785 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14786 cf_cv_shared_soname='$cf_cv_shared_soname'
14787 cf_cv_shlib_version="$cf_cv_shlib_version"
14788 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14789 cf_cv_system_name="$cf_cv_system_name"
14795 cat >>$CONFIG_STATUS <<\EOF
14796 for ac_config_target in $ac_config_targets
14798 case "$ac_config_target" in
14799 # Handling of arguments.
14800 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14801 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
14802 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14803 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14804 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14805 *) { { echo "$as_me:14805: error: invalid argument: $ac_config_target" >&5
14806 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14807 { (exit 1); exit 1; }; };;
14811 # If the user did not use the arguments to specify the items to instantiate,
14812 # then the envvar interface is used. Set only those that are not.
14813 # We use the long form for the default assignment because of an extremely
14814 # bizarre bug on SunOS 4.1.3.
14815 if $ac_need_defaults; then
14816 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14817 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14818 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14821 # Create a temporary directory, and hook for its removal unless debugging.
14824 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14825 trap '{ (exit 1); exit 1; }' 1 2 13 15
14828 # Create a (secure) tmp directory for tmp files.
14831 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14832 test -n "$tmp" && test -d "$tmp"
14835 tmp=$TMPDIR/cs$$-$RANDOM
14836 (umask 077 && mkdir $tmp)
14839 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14840 { (exit 1); exit 1; }
14845 cat >>$CONFIG_STATUS <<EOF
14848 # CONFIG_FILES section.
14851 # No need to generate the scripts if there are no CONFIG_FILES.
14852 # This happens for instance when ./config.status config.h
14853 if test -n "\$CONFIG_FILES"; then
14854 # Protect against being on the right side of a sed subst in config.status.
14855 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14856 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14857 s,@SHELL@,$SHELL,;t t
14858 s,@exec_prefix@,$exec_prefix,;t t
14859 s,@prefix@,$prefix,;t t
14860 s,@program_transform_name@,$program_transform_name,;t t
14861 s,@bindir@,$bindir,;t t
14862 s,@sbindir@,$sbindir,;t t
14863 s,@libexecdir@,$libexecdir,;t t
14864 s,@datarootdir@,$datarootdir,;t t
14865 s,@datadir@,$datadir,;t t
14866 s,@sysconfdir@,$sysconfdir,;t t
14867 s,@sharedstatedir@,$sharedstatedir,;t t
14868 s,@localstatedir@,$localstatedir,;t t
14869 s,@libdir@,$libdir,;t t
14870 s,@includedir@,$includedir,;t t
14871 s,@oldincludedir@,$oldincludedir,;t t
14872 s,@infodir@,$infodir,;t t
14873 s,@mandir@,$mandir,;t t
14874 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14875 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14876 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14877 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14878 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14879 s,@build_alias@,$build_alias,;t t
14880 s,@host_alias@,$host_alias,;t t
14881 s,@target_alias@,$target_alias,;t t
14882 s,@ECHO_C@,$ECHO_C,;t t
14883 s,@ECHO_N@,$ECHO_N,;t t
14884 s,@ECHO_T@,$ECHO_T,;t t
14885 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14886 s,@DEFS@,$DEFS,;t t
14887 s,@LIBS@,$LIBS,;t t
14888 s,@top_builddir@,$top_builddir,;t t
14889 s,@build@,$build,;t t
14890 s,@build_cpu@,$build_cpu,;t t
14891 s,@build_vendor@,$build_vendor,;t t
14892 s,@build_os@,$build_os,;t t
14893 s,@host@,$host,;t t
14894 s,@host_cpu@,$host_cpu,;t t
14895 s,@host_vendor@,$host_vendor,;t t
14896 s,@host_os@,$host_os,;t t
14897 s,@target@,$target,;t t
14898 s,@target_cpu@,$target_cpu,;t t
14899 s,@target_vendor@,$target_vendor,;t t
14900 s,@target_os@,$target_os,;t t
14902 s,@CFLAGS@,$CFLAGS,;t t
14903 s,@LDFLAGS@,$LDFLAGS,;t t
14904 s,@CPPFLAGS@,$CPPFLAGS,;t t
14905 s,@ac_ct_CC@,$ac_ct_CC,;t t
14906 s,@EXEEXT@,$EXEEXT,;t t
14907 s,@OBJEXT@,$OBJEXT,;t t
14908 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14911 s,@EGREP@,$EGREP,;t t
14912 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14913 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14914 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14915 s,@LN_S@,$LN_S,;t t
14916 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
14917 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
14918 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
14919 s,@SET_MAKE@,$SET_MAKE,;t t
14920 s,@CTAGS@,$CTAGS,;t t
14921 s,@ETAGS@,$ETAGS,;t t
14922 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14923 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14924 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14925 s,@RANLIB@,$RANLIB,;t t
14926 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14928 s,@ac_ct_LD@,$ac_ct_LD,;t t
14930 s,@ac_ct_AR@,$ac_ct_AR,;t t
14931 s,@ARFLAGS@,$ARFLAGS,;t t
14932 s,@DESTDIR@,$DESTDIR,;t t
14933 s,@BUILD_CC@,$BUILD_CC,;t t
14934 s,@BUILD_CPP@,$BUILD_CPP,;t t
14935 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14936 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14937 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14938 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14939 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14940 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14941 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14942 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14943 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
14944 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
14945 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14946 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14947 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14948 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14949 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14950 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14951 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14952 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14953 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14954 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14955 s,@CC_G_OPT@,$CC_G_OPT,;t t
14956 s,@LD_MODEL@,$LD_MODEL,;t t
14957 s,@shlibdir@,$shlibdir,;t t
14958 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
14959 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14960 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
14961 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14962 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14963 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
14964 s,@LINK_PROGS@,$LINK_PROGS,;t t
14965 s,@LINK_TESTS@,$LINK_TESTS,;t t
14966 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14967 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14968 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14969 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14970 s,@RPATH_LIST@,$RPATH_LIST,;t t
14971 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14972 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14973 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14974 s,@PTHREAD@,$PTHREAD,;t t
14975 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
14976 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
14977 s,@ECHO_LT@,$ECHO_LT,;t t
14978 s,@ECHO_LD@,$ECHO_LD,;t t
14979 s,@RULE_CC@,$RULE_CC,;t t
14980 s,@SHOW_CC@,$SHOW_CC,;t t
14981 s,@ECHO_CC@,$ECHO_CC,;t t
14982 s,@ADAFLAGS@,$ADAFLAGS,;t t
14983 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14984 s,@ADA_TRACE@,$ADA_TRACE,;t t
14985 s,@gnat_exists@,$gnat_exists,;t t
14986 s,@M4_exists@,$M4_exists,;t t
14987 s,@cf_ada_make@,$cf_ada_make,;t t
14988 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
14989 s,@cf_compile_generics@,$cf_compile_generics,;t t
14990 s,@cf_generic_objects@,$cf_generic_objects,;t t
14991 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
14992 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
14993 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
14994 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
14995 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14996 s,@cf_ada_package@,$cf_ada_package,;t t
14997 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14998 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14999 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
15000 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
15001 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
15002 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15003 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15004 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15005 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15006 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15007 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
15008 s,@TEST_ARG2@,$TEST_ARG2,;t t
15009 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
15010 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
15011 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15012 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15013 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
15014 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
15015 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
15020 cat >>$CONFIG_STATUS <<\EOF
15021 # Split the substitutions into bite-sized pieces for seds with
15022 # small command number limits, like on Digital OSF/1 and HP-UX.
15023 ac_max_sed_lines=48
15024 ac_sed_frag=1 # Number of current file.
15025 ac_beg=1 # First line for current file.
15026 ac_end=$ac_max_sed_lines # Line after last line for current file.
15029 while $ac_more_lines; do
15030 if test $ac_beg -gt 1; then
15031 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15033 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15035 if test ! -s $tmp/subs.frag; then
15036 ac_more_lines=false
15038 # The purpose of the label and of the branching condition is to
15039 # speed up the sed processing (if there are no `@' at all, there
15040 # is no need to browse any of the substitutions).
15041 # These are the two extra sed commands mentioned above.
15043 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15044 # It is possible to make a multiline substitution using escaped newlines.
15045 # Ensure that we do not split the substitution between script fragments.
15047 ac_END=`expr $ac_end + $ac_max_sed_lines`
15048 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
15049 if test -s $tmp/subs.next; then
15050 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
15051 if test ! -s $tmp/subs.edit; then
15052 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
15053 if test ! -s $tmp/subs.edit; then
15054 if test $ac_beg -gt 1; then
15055 ac_end=`expr $ac_end - 1`
15062 if test -z "$ac_sed_cmds"; then
15063 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15065 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15067 ac_sed_frag=`expr $ac_sed_frag + 1`
15069 ac_end=`expr $ac_end + $ac_max_sed_lines`
15072 if test -z "$ac_sed_cmds"; then
15075 fi # test -n "$CONFIG_FILES"
15078 cat >>$CONFIG_STATUS <<\EOF
15079 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15080 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15082 - | *:- | *:-:* ) # input from stdin
15084 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15085 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15086 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15087 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15088 * ) ac_file_in=$ac_file.in ;;
15091 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15092 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15093 X"$ac_file" : 'X\(//\)[^/]' \| \
15094 X"$ac_file" : 'X\(//\)$' \| \
15095 X"$ac_file" : 'X\(/\)' \| \
15096 . : '\(.\)' 2>/dev/null ||
15098 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15099 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15100 /^X\(\/\/\)$/{ s//\1/; q; }
15101 /^X\(\/\).*/{ s//\1/; q; }
15103 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15104 { case "$ac_dir" in
15105 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15109 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15110 case $as_mkdir_dir in
15111 # Skip DOS drivespec
15112 ?:) as_incr_dir=$as_mkdir_dir ;;
15114 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15115 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15120 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15121 # A "../" for each directory in $ac_dir_suffix.
15122 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15124 ac_dir_suffix= ac_dots=
15129 if test -z "$ac_dots"; then
15132 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15134 [\\/]* | ?:[\\/]* )
15135 ac_srcdir=$srcdir$ac_dir_suffix;
15136 ac_top_srcdir=$srcdir ;;
15137 *) # Relative path.
15138 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15139 ac_top_srcdir=$ac_dots$srcdir ;;
15143 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15144 *) ac_INSTALL=$ac_dots$INSTALL ;;
15147 if test x"$ac_file" != x-; then
15148 { echo "$as_me:15148: creating $ac_file" >&5
15149 echo "$as_me: creating $ac_file" >&6;}
15152 # Let's still pretend it is `configure' which instantiates (i.e., don't
15153 # use $as_me), people would be surprised to read:
15154 # /* config.h. Generated automatically by config.status. */
15155 configure_input="Generated automatically from `echo $ac_file_in |
15156 sed 's,.*/,,'` by configure."
15158 # First look for the input files in the build tree, otherwise in the
15160 ac_file_inputs=`IFS=:
15161 for f in $ac_file_in; do
15163 -) echo $tmp/stdin ;;
15165 # Absolute (can't be DOS-style, as IFS=:)
15166 test -f "$f" || { { echo "$as_me:15166: error: cannot find input file: $f" >&5
15167 echo "$as_me: error: cannot find input file: $f" >&2;}
15168 { (exit 1); exit 1; }; }
15171 if test -f "$f"; then
15174 elif test -f "$srcdir/$f"; then
15179 { { echo "$as_me:15179: error: cannot find input file: $f" >&5
15180 echo "$as_me: error: cannot find input file: $f" >&2;}
15181 { (exit 1); exit 1; }; }
15184 done` || { (exit 1); exit 1; }
15186 cat >>$CONFIG_STATUS <<\EOF
15187 ac_warn_datarootdir=no
15188 if test x"$ac_file" != x-; then
15189 for ac_item in $ac_file_inputs
15191 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
15192 if test -n "$ac_seen"; then
15193 ac_used=`grep '@datarootdir@' $ac_item`
15194 if test -z "$ac_used"; then
15195 { echo "$as_me:15195: WARNING: datarootdir was used implicitly but not set:
15197 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
15199 ac_warn_datarootdir=yes
15202 ac_seen=`grep '${datarootdir}' $ac_item`
15203 if test -n "$ac_seen"; then
15204 { echo "$as_me:15204: WARNING: datarootdir was used explicitly but not set:
15206 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
15208 ac_warn_datarootdir=yes
15213 if test "x$ac_warn_datarootdir" = xyes; then
15214 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
15218 cat >>$CONFIG_STATUS <<EOF
15222 cat >>$CONFIG_STATUS <<\EOF
15224 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15225 s,@configure_input@,$configure_input,;t t
15226 s,@srcdir@,$ac_srcdir,;t t
15227 s,@top_srcdir@,$ac_top_srcdir,;t t
15228 s,@INSTALL@,$ac_INSTALL,;t t
15229 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15231 if test x"$ac_file" != x-; then
15232 cp $tmp/out $ac_file
15234 for ac_name in prefix exec_prefix datarootdir
15236 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
15237 if test -n "$ac_seen"; then
15238 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
15239 if test -z "$ac_init"; then
15240 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
15241 { echo "$as_me:15241: WARNING: Variable $ac_name is used but was not set:
15243 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
15248 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
15249 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
15250 if test -s $tmp/out; then
15251 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
15252 { echo "$as_me:15252: WARNING: Some variables may not be substituted:
15254 echo "$as_me: WARNING: Some variables may not be substituted:
15264 cat >>$CONFIG_STATUS <<\EOF
15267 # CONFIG_HEADER section.
15270 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15271 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15273 # ac_d sets the value in "#define NAME VALUE" lines.
15274 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
15275 ac_dB='[ ].*$,\1#\2'
15278 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15279 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15280 ac_iB='\([ ]\),\1#\2define\3'
15283 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15284 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15285 ac_uB='$,\1#\2define\3'
15289 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15290 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15292 - | *:- | *:-:* ) # input from stdin
15294 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15295 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15296 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15297 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15298 * ) ac_file_in=$ac_file.in ;;
15301 test x"$ac_file" != x- && { echo "$as_me:15301: creating $ac_file" >&5
15302 echo "$as_me: creating $ac_file" >&6;}
15304 # First look for the input files in the build tree, otherwise in the
15306 ac_file_inputs=`IFS=:
15307 for f in $ac_file_in; do
15309 -) echo $tmp/stdin ;;
15311 # Absolute (can't be DOS-style, as IFS=:)
15312 test -f "$f" || { { echo "$as_me:15312: error: cannot find input file: $f" >&5
15313 echo "$as_me: error: cannot find input file: $f" >&2;}
15314 { (exit 1); exit 1; }; }
15317 if test -f "$f"; then
15320 elif test -f "$srcdir/$f"; then
15325 { { echo "$as_me:15325: error: cannot find input file: $f" >&5
15326 echo "$as_me: error: cannot find input file: $f" >&2;}
15327 { (exit 1); exit 1; }; }
15330 done` || { (exit 1); exit 1; }
15331 # Remove the trailing spaces.
15332 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
15336 # Transform confdefs.h into a list of #define's. We won't use it as a sed
15337 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
15338 # be either 'cat' or 'sort'.
15339 cat confdefs.h | uniq >conftest.vals
15341 # Break up conftest.vals because some shells have a limit on
15342 # the size of here documents, and old seds have small limits too.
15344 rm -f conftest.tail
15345 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
15346 while grep . conftest.vals >/dev/null
15348 # Write chunks of a limited-size here document to conftest.frag.
15349 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15350 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15351 echo 'CEOF' >> $CONFIG_STATUS
15352 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15353 rm -f conftest.vals
15354 mv conftest.tail conftest.vals
15356 rm -f conftest.vals
15358 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15360 echo ' cat >> conftest.edit <<CEOF
15361 /@DEFS@/r conftest.frag
15364 sed -f conftest.edit $tmp/in > $tmp/out
15366 mv $tmp/out $tmp/in
15367 rm -f conftest.edit conftest.frag
15368 ' >> $CONFIG_STATUS
15370 cat >>$CONFIG_STATUS <<\EOF
15371 # Let's still pretend it is `configure' which instantiates (i.e., don't
15372 # use $as_me), people would be surprised to read:
15373 # /* config.h. Generated automatically by config.status. */
15374 if test x"$ac_file" = x-; then
15375 echo "/* Generated automatically by configure. */" >$tmp/config.h
15377 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
15379 cat $tmp/in >>$tmp/config.h
15381 if test x"$ac_file" != x-; then
15382 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15383 { echo "$as_me:15383: $ac_file is unchanged" >&5
15384 echo "$as_me: $ac_file is unchanged" >&6;}
15386 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15387 X"$ac_file" : 'X\(//\)[^/]' \| \
15388 X"$ac_file" : 'X\(//\)$' \| \
15389 X"$ac_file" : 'X\(/\)' \| \
15390 . : '\(.\)' 2>/dev/null ||
15392 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15393 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15394 /^X\(\/\/\)$/{ s//\1/; q; }
15395 /^X\(\/\).*/{ s//\1/; q; }
15397 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15398 { case "$ac_dir" in
15399 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15403 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15404 case $as_mkdir_dir in
15405 # Skip DOS drivespec
15406 ?:) as_incr_dir=$as_mkdir_dir ;;
15408 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15409 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15416 mv $tmp/config.h $ac_file
15420 rm -f $tmp/config.h
15424 cat >>$CONFIG_STATUS <<\EOF
15426 # CONFIG_COMMANDS section.
15428 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15429 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15430 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15434 if test -z "$USE_OLD_MAKERULES" ; then
15435 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
15442 cat >>$CONFIG_STATUS <<\EOF
15444 { (exit 0); exit 0; }
15446 chmod +x $CONFIG_STATUS
15447 ac_clean_files=$ac_clean_files_save
15449 # configure is writing to config.log, and then calls config.status.
15450 # config.status does its own redirection, appending to config.log.
15451 # Unfortunately, on DOS this fails, as config.log is still kept open
15452 # by configure, so config.status won't be able to write to it; its
15453 # output is simply discarded. So we exec the FD to /dev/null,
15454 # effectively closing config.log, so it can be properly (re)opened and
15455 # appended to by config.status. When coming back to configure, we
15456 # need to make the FD available again.
15457 if test "$no_create" != yes; then
15460 $SHELL $CONFIG_STATUS || ac_cs_success=false
15462 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15463 # would make configure fail if this is the last instruction.
15464 $ac_cs_success || { (exit 1); exit 1; }
15466 ${MAKE:-make} preinstall