2 # From configure.in Revision: 1.64 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
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.20170501. 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_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1841 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1843 for cf_arg in $cf_flags
1851 cf_new_extra_cppflags=
1853 for cf_add_cflags in $cf_arg
1855 case $cf_fix_cppflags in
1857 case $cf_add_cflags in
1858 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1859 case $cf_add_cflags in
1861 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1863 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1864 && test -z "${cf_tst_cflags}" \
1865 && cf_fix_cppflags=yes
1867 if test $cf_fix_cppflags = yes ; then
1869 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1870 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1873 elif test "${cf_tst_cflags}" = "\"'" ; then
1875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1886 case $cf_add_cflags in
1888 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1890 CPPFLAGS=`echo "$CPPFLAGS" | \
1891 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1892 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1897 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1898 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1905 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1906 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1913 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1914 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1916 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1918 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1919 && test -z "${cf_tst_cflags}" \
1920 && cf_fix_cppflags=no
1925 if test -n "$cf_new_cflags" ; then
1927 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1928 CFLAGS="${CFLAGS}$cf_new_cflags"
1932 if test -n "$cf_new_cppflags" ; then
1934 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1935 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1939 if test -n "$cf_new_extra_cppflags" ; then
1941 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1942 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1952 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
1954 echo "${as_me:-configure}:1954: testing resulting CC: '$CC' ..." 1>&5
1956 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
1958 echo "${as_me:-configure}:1958: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1960 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1962 echo "${as_me:-configure}:1962: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1966 echo "$as_me:1966: result: ok" >&5
1967 echo "${ECHO_T}ok" >&6
1972 ac_cpp='$CPP $CPPFLAGS'
1973 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1974 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1975 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1976 ac_main_return=return
1977 echo "$as_me:1977: checking how to run the C preprocessor" >&5
1978 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1979 # On Suns, sometimes $CPP names a directory.
1980 if test -n "$CPP" && test -d "$CPP"; then
1983 if test -z "$CPP"; then
1984 if test "${ac_cv_prog_CPP+set}" = set; then
1985 echo $ECHO_N "(cached) $ECHO_C" >&6
1987 # Double quotes because CPP needs to be expanded
1988 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1991 for ac_c_preproc_warn_flag in '' yes
1993 # Use a header file that comes with gcc, so configuring glibc
1994 # with a fresh cross-compiler works.
1995 # On the NeXT, cc -E runs the code through the compiler's parser,
1996 # not just through cpp. "Syntax error" is here to catch this case.
1997 cat >conftest.$ac_ext <<_ACEOF
1998 #line 1998 "configure"
1999 #include "confdefs.h"
2003 if { (eval echo "$as_me:2003: \"$ac_cpp conftest.$ac_ext\"") >&5
2004 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2006 egrep -v '^ *\+' conftest.er1 >conftest.err
2008 cat conftest.err >&5
2009 echo "$as_me:2009: \$? = $ac_status" >&5
2010 (exit $ac_status); } >/dev/null; then
2011 if test -s conftest.err; then
2012 ac_cpp_err=$ac_c_preproc_warn_flag
2019 if test -z "$ac_cpp_err"; then
2022 echo "$as_me: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 # Broken: fails on valid input.
2027 rm -f conftest.err conftest.$ac_ext
2029 # OK, works on sane cases. Now check whether non-existent headers
2030 # can be detected and how.
2031 cat >conftest.$ac_ext <<_ACEOF
2032 #line 2032 "configure"
2033 #include "confdefs.h"
2034 #include <ac_nonexistent.h>
2036 if { (eval echo "$as_me:2036: \"$ac_cpp conftest.$ac_ext\"") >&5
2037 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2039 egrep -v '^ *\+' conftest.er1 >conftest.err
2041 cat conftest.err >&5
2042 echo "$as_me:2042: \$? = $ac_status" >&5
2043 (exit $ac_status); } >/dev/null; then
2044 if test -s conftest.err; then
2045 ac_cpp_err=$ac_c_preproc_warn_flag
2052 if test -z "$ac_cpp_err"; then
2053 # Broken: success on invalid input.
2056 echo "$as_me: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 # Passes both tests.
2062 rm -f conftest.err conftest.$ac_ext
2065 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2066 rm -f conftest.err conftest.$ac_ext
2067 if $ac_preproc_ok; then
2079 echo "$as_me:2079: result: $CPP" >&5
2080 echo "${ECHO_T}$CPP" >&6
2082 for ac_c_preproc_warn_flag in '' yes
2084 # Use a header file that comes with gcc, so configuring glibc
2085 # with a fresh cross-compiler works.
2086 # On the NeXT, cc -E runs the code through the compiler's parser,
2087 # not just through cpp. "Syntax error" is here to catch this case.
2088 cat >conftest.$ac_ext <<_ACEOF
2089 #line 2089 "configure"
2090 #include "confdefs.h"
2094 if { (eval echo "$as_me:2094: \"$ac_cpp conftest.$ac_ext\"") >&5
2095 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2097 egrep -v '^ *\+' conftest.er1 >conftest.err
2099 cat conftest.err >&5
2100 echo "$as_me:2100: \$? = $ac_status" >&5
2101 (exit $ac_status); } >/dev/null; then
2102 if test -s conftest.err; then
2103 ac_cpp_err=$ac_c_preproc_warn_flag
2110 if test -z "$ac_cpp_err"; then
2113 echo "$as_me: failed program was:" >&5
2114 cat conftest.$ac_ext >&5
2115 # Broken: fails on valid input.
2118 rm -f conftest.err conftest.$ac_ext
2120 # OK, works on sane cases. Now check whether non-existent headers
2121 # can be detected and how.
2122 cat >conftest.$ac_ext <<_ACEOF
2123 #line 2123 "configure"
2124 #include "confdefs.h"
2125 #include <ac_nonexistent.h>
2127 if { (eval echo "$as_me:2127: \"$ac_cpp conftest.$ac_ext\"") >&5
2128 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2130 egrep -v '^ *\+' conftest.er1 >conftest.err
2132 cat conftest.err >&5
2133 echo "$as_me:2133: \$? = $ac_status" >&5
2134 (exit $ac_status); } >/dev/null; then
2135 if test -s conftest.err; then
2136 ac_cpp_err=$ac_c_preproc_warn_flag
2143 if test -z "$ac_cpp_err"; then
2144 # Broken: success on invalid input.
2147 echo "$as_me: failed program was:" >&5
2148 cat conftest.$ac_ext >&5
2149 # Passes both tests.
2153 rm -f conftest.err conftest.$ac_ext
2156 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2157 rm -f conftest.err conftest.$ac_ext
2158 if $ac_preproc_ok; then
2161 { { echo "$as_me:2161: error: C preprocessor \"$CPP\" fails sanity check" >&5
2162 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2163 { (exit 1); exit 1; }; }
2167 ac_cpp='$CPP $CPPFLAGS'
2168 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2169 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2171 ac_main_return=return
2173 if test $ac_cv_c_compiler_gnu = yes; then
2174 echo "$as_me:2174: checking whether $CC needs -traditional" >&5
2175 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2176 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2177 echo $ECHO_N "(cached) $ECHO_C" >&6
2179 ac_pattern="Autoconf.*'x'"
2180 cat >conftest.$ac_ext <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2184 int Autoconf = TIOCGETP;
2186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2187 egrep "$ac_pattern" >/dev/null 2>&1; then
2188 ac_cv_prog_gcc_traditional=yes
2190 ac_cv_prog_gcc_traditional=no
2194 if test $ac_cv_prog_gcc_traditional = no; then
2195 cat >conftest.$ac_ext <<_ACEOF
2196 #line 2196 "configure"
2197 #include "confdefs.h"
2199 int Autoconf = TCGETA;
2201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2202 egrep "$ac_pattern" >/dev/null 2>&1; then
2203 ac_cv_prog_gcc_traditional=yes
2209 echo "$as_me:2209: result: $ac_cv_prog_gcc_traditional" >&5
2210 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2211 if test $ac_cv_prog_gcc_traditional = yes; then
2212 CC="$CC -traditional"
2216 echo "$as_me:2216: checking whether $CC understands -c and -o together" >&5
2217 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2218 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2219 echo $ECHO_N "(cached) $ECHO_C" >&6
2222 cat > conftest.$ac_ext <<CF_EOF
2225 ${cf_cv_main_return:-return}(0);
2228 # We do the test twice because some compilers refuse to overwrite an
2229 # existing .o file with -o, though they will create one.
2230 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2231 if { (eval echo "$as_me:2231: \"$ac_try\"") >&5
2234 echo "$as_me:2234: \$? = $ac_status" >&5
2235 (exit $ac_status); } &&
2236 test -f conftest2.$ac_objext && { (eval echo "$as_me:2236: \"$ac_try\"") >&5
2239 echo "$as_me:2239: \$? = $ac_status" >&5
2240 (exit $ac_status); };
2242 eval cf_cv_prog_CC_c_o=yes
2244 eval cf_cv_prog_CC_c_o=no
2249 if test $cf_cv_prog_CC_c_o = yes; then
2250 echo "$as_me:2250: result: yes" >&5
2251 echo "${ECHO_T}yes" >&6
2253 echo "$as_me:2253: result: no" >&5
2254 echo "${ECHO_T}no" >&6
2257 test "$program_prefix" != NONE &&
2258 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2259 # Use a double $ so make ignores it.
2260 test "$program_suffix" != NONE &&
2261 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2262 # Double any \ or $. echo might interpret backslashes.
2263 # By default was `s,x,x', remove it if useless.
2264 cat <<\_ACEOF >conftest.sed
2265 s/[\\$]/&&/g;s/;s,x,x,$//
2267 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2270 for ac_prog in mawk gawk nawk awk
2272 # Extract the first word of "$ac_prog", so it can be a program name with args.
2273 set dummy $ac_prog; ac_word=$2
2274 echo "$as_me:2274: checking for $ac_word" >&5
2275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2276 if test "${ac_cv_prog_AWK+set}" = set; then
2277 echo $ECHO_N "(cached) $ECHO_C" >&6
2279 if test -n "$AWK"; then
2280 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2282 ac_save_IFS=$IFS; IFS=$ac_path_separator
2284 for ac_dir in $ac_dummy; do
2286 test -z "$ac_dir" && ac_dir=.
2287 $as_executable_p "$ac_dir/$ac_word" || continue
2288 ac_cv_prog_AWK="$ac_prog"
2289 echo "$as_me:2289: found $ac_dir/$ac_word" >&5
2296 if test -n "$AWK"; then
2297 echo "$as_me:2297: result: $AWK" >&5
2298 echo "${ECHO_T}$AWK" >&6
2300 echo "$as_me:2300: result: no" >&5
2301 echo "${ECHO_T}no" >&6
2304 test -n "$AWK" && break
2307 test -z "$AWK" && { { echo "$as_me:2307: error: No awk program found" >&5
2308 echo "$as_me: error: No awk program found" >&2;}
2309 { (exit 1); exit 1; }; }
2311 echo "$as_me:2311: checking for egrep" >&5
2312 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2313 if test "${ac_cv_prog_egrep+set}" = set; then
2314 echo $ECHO_N "(cached) $ECHO_C" >&6
2316 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2317 then ac_cv_prog_egrep='grep -E'
2318 else ac_cv_prog_egrep='egrep'
2321 echo "$as_me:2321: result: $ac_cv_prog_egrep" >&5
2322 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2323 EGREP=$ac_cv_prog_egrep
2325 test -z "$EGREP" && { { echo "$as_me:2325: error: No egrep program found" >&5
2326 echo "$as_me: error: No egrep program found" >&2;}
2327 { (exit 1); exit 1; }; }
2329 # Find a good install program. We prefer a C program (faster),
2330 # so one script is as good as another. But avoid the broken or
2331 # incompatible versions:
2332 # SysV /etc/install, /usr/sbin/install
2333 # SunOS /usr/etc/install
2334 # IRIX /sbin/install
2336 # AmigaOS /C/install, which installs bootblocks on floppy discs
2337 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2338 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2339 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2340 # ./install, which can be erroneously created by make from ./install.sh.
2341 echo "$as_me:2341: checking for a BSD compatible install" >&5
2342 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2343 if test -z "$INSTALL"; then
2344 if test "${ac_cv_path_install+set}" = set; then
2345 echo $ECHO_N "(cached) $ECHO_C" >&6
2347 ac_save_IFS=$IFS; IFS=$ac_path_separator
2348 for ac_dir in $PATH; do
2350 # Account for people who put trailing slashes in PATH elements.
2352 / | ./ | .// | /cC/* \
2353 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2356 # OSF1 and SCO ODT 3.0 have their own names for install.
2357 # Don't use installbsd from OSF since it installs stuff as root
2359 for ac_prog in ginstall scoinst install; do
2360 if $as_executable_p "$ac_dir/$ac_prog"; then
2361 if test $ac_prog = install &&
2362 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2363 # AIX install. It has an incompatible calling convention.
2365 elif test $ac_prog = install &&
2366 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2367 # program-specific install script used by HP pwplus--don't use.
2370 ac_cv_path_install="$ac_dir/$ac_prog -c"
2380 if test "${ac_cv_path_install+set}" = set; then
2381 INSTALL=$ac_cv_path_install
2383 # As a last resort, use the slow shell script. We don't cache a
2384 # path for INSTALL within a source directory, because that will
2385 # break other packages using the cache if that directory is
2386 # removed, or if the path is relative.
2387 INSTALL=$ac_install_sh
2390 echo "$as_me:2390: result: $INSTALL" >&5
2391 echo "${ECHO_T}$INSTALL" >&6
2393 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2394 # It thinks the first close brace ends the variable substitution.
2395 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2397 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2399 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2401 echo "$as_me:2401: checking whether ln -s works" >&5
2402 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2404 if test "$LN_S" = "ln -s"; then
2405 echo "$as_me:2405: result: yes" >&5
2406 echo "${ECHO_T}yes" >&6
2408 echo "$as_me:2408: result: no, using $LN_S" >&5
2409 echo "${ECHO_T}no, using $LN_S" >&6
2412 echo "$as_me:2412: checking if $LN_S -f options work" >&5
2413 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2415 rm -f conf$$.src conf$$dst
2417 echo first >conf$$.src
2418 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2423 rm -f conf$$.dst conf$$src
2424 echo "$as_me:2424: result: $cf_prog_ln_sf" >&5
2425 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2427 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2429 echo "$as_me:2429: checking for long file names" >&5
2430 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2431 if test "${ac_cv_sys_long_file_names+set}" = set; then
2432 echo $ECHO_N "(cached) $ECHO_C" >&6
2434 ac_cv_sys_long_file_names=yes
2435 # Test for long file names in all the places we know might matter:
2436 # . the current directory, where building will happen
2437 # $prefix/lib where we will be installing things
2438 # $exec_prefix/lib likewise
2439 # eval it to expand exec_prefix.
2440 # $TMPDIR if set, where it might want to write temporary files
2441 # if $TMPDIR is not set:
2442 # /tmp where it might want to write temporary files
2445 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2448 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2450 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2451 test -d $ac_dir || continue
2452 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2453 ac_xdir=$ac_dir/cf$$
2454 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2455 ac_tf1=$ac_xdir/conftest9012345
2456 ac_tf2=$ac_xdir/conftest9012346
2457 (echo 1 >$ac_tf1) 2>/dev/null
2458 (echo 2 >$ac_tf2) 2>/dev/null
2459 ac_val=`cat $ac_tf1 2>/dev/null`
2460 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2461 ac_cv_sys_long_file_names=no
2462 rm -rf $ac_xdir 2>/dev/null
2465 rm -rf $ac_xdir 2>/dev/null
2468 echo "$as_me:2468: result: $ac_cv_sys_long_file_names" >&5
2469 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2470 if test $ac_cv_sys_long_file_names = yes; then
2472 cat >>confdefs.h <<\EOF
2473 #define HAVE_LONG_FILE_NAMES 1
2478 # if we find pkg-config, check if we should install the ".pc" files.
2480 echo "$as_me:2480: checking if you want to use pkg-config" >&5
2481 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2483 # Check whether --with-pkg-config or --without-pkg-config was given.
2484 if test "${with_pkg_config+set}" = set; then
2485 withval="$with_pkg_config"
2486 cf_pkg_config=$withval
2490 echo "$as_me:2490: result: $cf_pkg_config" >&5
2491 echo "${ECHO_T}$cf_pkg_config" >&6
2493 case $cf_pkg_config in
2499 if test -n "$ac_tool_prefix"; then
2500 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2501 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2502 echo "$as_me:2502: checking for $ac_word" >&5
2503 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2504 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2505 echo $ECHO_N "(cached) $ECHO_C" >&6
2509 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2512 ac_save_IFS=$IFS; IFS=$ac_path_separator
2514 for ac_dir in $ac_dummy; do
2516 test -z "$ac_dir" && ac_dir=.
2517 if $as_executable_p "$ac_dir/$ac_word"; then
2518 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2519 echo "$as_me:2519: found $ac_dir/$ac_word" >&5
2527 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2529 if test -n "$PKG_CONFIG"; then
2530 echo "$as_me:2530: result: $PKG_CONFIG" >&5
2531 echo "${ECHO_T}$PKG_CONFIG" >&6
2533 echo "$as_me:2533: result: no" >&5
2534 echo "${ECHO_T}no" >&6
2538 if test -z "$ac_cv_path_PKG_CONFIG"; then
2539 ac_pt_PKG_CONFIG=$PKG_CONFIG
2540 # Extract the first word of "pkg-config", so it can be a program name with args.
2541 set dummy pkg-config; ac_word=$2
2542 echo "$as_me:2542: checking for $ac_word" >&5
2543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2544 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2545 echo $ECHO_N "(cached) $ECHO_C" >&6
2547 case $ac_pt_PKG_CONFIG in
2549 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2552 ac_save_IFS=$IFS; IFS=$ac_path_separator
2554 for ac_dir in $ac_dummy; do
2556 test -z "$ac_dir" && ac_dir=.
2557 if $as_executable_p "$ac_dir/$ac_word"; then
2558 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2559 echo "$as_me:2559: found $ac_dir/$ac_word" >&5
2564 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2568 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2570 if test -n "$ac_pt_PKG_CONFIG"; then
2571 echo "$as_me:2571: result: $ac_pt_PKG_CONFIG" >&5
2572 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2574 echo "$as_me:2574: result: no" >&5
2575 echo "${ECHO_T}no" >&6
2578 PKG_CONFIG=$ac_pt_PKG_CONFIG
2580 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2589 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2590 if test "$PKG_CONFIG" != none ; then
2592 if test "x$prefix" != xNONE; then
2593 cf_path_syntax="$prefix"
2595 cf_path_syntax="$ac_default_prefix"
2598 case ".$PKG_CONFIG" in
2603 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2605 (.\${*prefix}*|.\${*dir}*)
2606 eval PKG_CONFIG="$PKG_CONFIG"
2607 case ".$PKG_CONFIG" in
2609 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2614 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2617 { { echo "$as_me:2617: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2618 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2619 { (exit 1); exit 1; }; }
2623 elif test "x$cf_pkg_config" != xno ; then
2624 { echo "$as_me:2624: WARNING: pkg-config is not installed" >&5
2625 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2630 echo "$as_me:2630: checking for pkg-config library directory" >&5
2631 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2634 echo "$as_me:2634: checking for $PKG_CONFIG library directory" >&5
2635 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2639 PKG_CONFIG_LIBDIR=no
2641 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2642 if test "${with_pkg_config_libdir+set}" = set; then
2643 withval="$with_pkg_config_libdir"
2644 PKG_CONFIG_LIBDIR=$withval
2646 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2649 case x$PKG_CONFIG_LIBDIR in
2653 # Look for the library directory using the same prefix as the executable
2654 if test "x$PKG_CONFIG" = xnone
2658 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2661 # If you don't like using the default architecture, you have to specify the
2662 # intended library directory and corresponding compiler/linker options.
2664 # This case allows for Debian's 2014-flavor of multiarch, along with the
2665 # most common variations before that point. Some other variants spell the
2666 # directory differently, e.g., "pkg-config", and put it in unusual places.
2667 # pkg-config has always been poorly standardized, which is ironic...
2668 case x`(arch) 2>/dev/null` in
2671 $cf_path/lib/*64-linux-gnu \
2679 $cf_path/lib/*-linux-gnu \
2687 test -n "$verbose" && echo " list..." 1>&6
2689 echo "${as_me:-configure}:2689: testing list... ..." 1>&5
2691 for cf_config in $cf_search_path
2693 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2695 echo "${as_me:-configure}:2695: testing checking $cf_config/pkgconfig ..." 1>&5
2697 if test -d $cf_config/pkgconfig
2699 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2700 echo "$as_me:2700: checking done" >&5
2701 echo $ECHO_N "checking done... $ECHO_C" >&6
2710 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2711 echo "$as_me:2711: result: $PKG_CONFIG_LIBDIR" >&5
2712 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2715 echo "$as_me:2715: checking if you want to build test-programs" >&5
2716 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2718 # Check whether --with-tests or --without-tests was given.
2719 if test "${with_tests+set}" = set; then
2720 withval="$with_tests"
2721 cf_with_tests=$withval
2725 echo "$as_me:2725: result: $cf_with_tests" >&5
2726 echo "${ECHO_T}$cf_with_tests" >&6
2728 echo "$as_me:2728: checking if we should assume mixed-case filenames" >&5
2729 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2731 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2732 if test "${enable_mixed_case+set}" = set; then
2733 enableval="$enable_mixed_case"
2734 enable_mixedcase=$enableval
2736 enable_mixedcase=auto
2738 echo "$as_me:2738: result: $enable_mixedcase" >&5
2739 echo "${ECHO_T}$enable_mixedcase" >&6
2740 if test "$enable_mixedcase" = "auto" ; then
2742 echo "$as_me:2742: checking if filesystem supports mixed-case filenames" >&5
2743 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2744 if test "${cf_cv_mixedcase+set}" = set; then
2745 echo $ECHO_N "(cached) $ECHO_C" >&6
2748 if test "$cross_compiling" = yes ; then
2749 case $target_alias in
2750 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2758 rm -f conftest CONFTEST
2760 if test -f CONFTEST ; then
2765 rm -f conftest CONFTEST
2769 echo "$as_me:2769: result: $cf_cv_mixedcase" >&5
2770 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2771 test "$cf_cv_mixedcase" = yes &&
2772 cat >>confdefs.h <<\EOF
2773 #define MIXEDCASE_FILENAMES 1
2777 cf_cv_mixedcase=$enable_mixedcase
2778 if test "$enable_mixedcase" = "yes" ; then
2779 cat >>confdefs.h <<\EOF
2780 #define MIXEDCASE_FILENAMES 1
2786 # do this after mixed-case option (tags/TAGS is not as important as tic).
2787 echo "$as_me:2787: checking whether ${MAKE-make} sets \${MAKE}" >&5
2788 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2789 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2790 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2791 echo $ECHO_N "(cached) $ECHO_C" >&6
2793 cat >conftest.make <<\EOF
2795 @echo 'ac_maketemp="${MAKE}"'
2797 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2798 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2799 if test -n "$ac_maketemp"; then
2800 eval ac_cv_prog_make_${ac_make}_set=yes
2802 eval ac_cv_prog_make_${ac_make}_set=no
2806 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2807 echo "$as_me:2807: result: yes" >&5
2808 echo "${ECHO_T}yes" >&6
2811 echo "$as_me:2811: result: no" >&5
2812 echo "${ECHO_T}no" >&6
2813 SET_MAKE="MAKE=${MAKE-make}"
2816 for ac_prog in exctags ctags
2818 # Extract the first word of "$ac_prog", so it can be a program name with args.
2819 set dummy $ac_prog; ac_word=$2
2820 echo "$as_me:2820: checking for $ac_word" >&5
2821 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2822 if test "${ac_cv_prog_CTAGS+set}" = set; then
2823 echo $ECHO_N "(cached) $ECHO_C" >&6
2825 if test -n "$CTAGS"; then
2826 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2828 ac_save_IFS=$IFS; IFS=$ac_path_separator
2830 for ac_dir in $ac_dummy; do
2832 test -z "$ac_dir" && ac_dir=.
2833 $as_executable_p "$ac_dir/$ac_word" || continue
2834 ac_cv_prog_CTAGS="$ac_prog"
2835 echo "$as_me:2835: found $ac_dir/$ac_word" >&5
2841 CTAGS=$ac_cv_prog_CTAGS
2842 if test -n "$CTAGS"; then
2843 echo "$as_me:2843: result: $CTAGS" >&5
2844 echo "${ECHO_T}$CTAGS" >&6
2846 echo "$as_me:2846: result: no" >&5
2847 echo "${ECHO_T}no" >&6
2850 test -n "$CTAGS" && break
2853 for ac_prog in exetags etags
2855 # Extract the first word of "$ac_prog", so it can be a program name with args.
2856 set dummy $ac_prog; ac_word=$2
2857 echo "$as_me:2857: checking for $ac_word" >&5
2858 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2859 if test "${ac_cv_prog_ETAGS+set}" = set; then
2860 echo $ECHO_N "(cached) $ECHO_C" >&6
2862 if test -n "$ETAGS"; then
2863 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2865 ac_save_IFS=$IFS; IFS=$ac_path_separator
2867 for ac_dir in $ac_dummy; do
2869 test -z "$ac_dir" && ac_dir=.
2870 $as_executable_p "$ac_dir/$ac_word" || continue
2871 ac_cv_prog_ETAGS="$ac_prog"
2872 echo "$as_me:2872: found $ac_dir/$ac_word" >&5
2878 ETAGS=$ac_cv_prog_ETAGS
2879 if test -n "$ETAGS"; then
2880 echo "$as_me:2880: result: $ETAGS" >&5
2881 echo "${ECHO_T}$ETAGS" >&6
2883 echo "$as_me:2883: result: no" >&5
2884 echo "${ECHO_T}no" >&6
2887 test -n "$ETAGS" && break
2890 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2891 set dummy ${CTAGS:-ctags}; ac_word=$2
2892 echo "$as_me:2892: checking for $ac_word" >&5
2893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2894 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2895 echo $ECHO_N "(cached) $ECHO_C" >&6
2897 if test -n "$MAKE_LOWER_TAGS"; then
2898 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2900 ac_save_IFS=$IFS; IFS=$ac_path_separator
2902 for ac_dir in $ac_dummy; do
2904 test -z "$ac_dir" && ac_dir=.
2905 $as_executable_p "$ac_dir/$ac_word" || continue
2906 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2907 echo "$as_me:2907: found $ac_dir/$ac_word" >&5
2911 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2914 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2915 if test -n "$MAKE_LOWER_TAGS"; then
2916 echo "$as_me:2916: result: $MAKE_LOWER_TAGS" >&5
2917 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2919 echo "$as_me:2919: result: no" >&5
2920 echo "${ECHO_T}no" >&6
2923 if test "$cf_cv_mixedcase" = yes ; then
2924 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2925 set dummy ${ETAGS:-etags}; ac_word=$2
2926 echo "$as_me:2926: checking for $ac_word" >&5
2927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2928 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2929 echo $ECHO_N "(cached) $ECHO_C" >&6
2931 if test -n "$MAKE_UPPER_TAGS"; then
2932 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2934 ac_save_IFS=$IFS; IFS=$ac_path_separator
2936 for ac_dir in $ac_dummy; do
2938 test -z "$ac_dir" && ac_dir=.
2939 $as_executable_p "$ac_dir/$ac_word" || continue
2940 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2941 echo "$as_me:2941: found $ac_dir/$ac_word" >&5
2945 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2948 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2949 if test -n "$MAKE_UPPER_TAGS"; then
2950 echo "$as_me:2950: result: $MAKE_UPPER_TAGS" >&5
2951 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2953 echo "$as_me:2953: result: no" >&5
2954 echo "${ECHO_T}no" >&6
2961 if test "$MAKE_UPPER_TAGS" = yes ; then
2967 if test "$MAKE_LOWER_TAGS" = yes ; then
2973 echo "$as_me:2973: checking for makeflags variable" >&5
2974 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
2975 if test "${cf_cv_makeflags+set}" = set; then
2976 echo $ECHO_N "(cached) $ECHO_C" >&6
2980 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
2982 cat >cf_makeflags.tmp <<CF_EOF
2985 @ echo '.$cf_option'
2987 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
2988 case "$cf_result" in
2990 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2991 case "$cf_result" in
2992 (.*CC=*) cf_cv_makeflags=
2994 (*) cf_cv_makeflags=$cf_option
3000 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
3004 rm -f cf_makeflags.tmp
3007 echo "$as_me:3007: result: $cf_cv_makeflags" >&5
3008 echo "${ECHO_T}$cf_cv_makeflags" >&6
3010 if test -n "$ac_tool_prefix"; then
3011 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3012 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3013 echo "$as_me:3013: checking for $ac_word" >&5
3014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3015 if test "${ac_cv_prog_RANLIB+set}" = set; then
3016 echo $ECHO_N "(cached) $ECHO_C" >&6
3018 if test -n "$RANLIB"; then
3019 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3021 ac_save_IFS=$IFS; IFS=$ac_path_separator
3023 for ac_dir in $ac_dummy; do
3025 test -z "$ac_dir" && ac_dir=.
3026 $as_executable_p "$ac_dir/$ac_word" || continue
3027 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3028 echo "$as_me:3028: found $ac_dir/$ac_word" >&5
3034 RANLIB=$ac_cv_prog_RANLIB
3035 if test -n "$RANLIB"; then
3036 echo "$as_me:3036: result: $RANLIB" >&5
3037 echo "${ECHO_T}$RANLIB" >&6
3039 echo "$as_me:3039: result: no" >&5
3040 echo "${ECHO_T}no" >&6
3044 if test -z "$ac_cv_prog_RANLIB"; then
3045 ac_ct_RANLIB=$RANLIB
3046 # Extract the first word of "ranlib", so it can be a program name with args.
3047 set dummy ranlib; ac_word=$2
3048 echo "$as_me:3048: checking for $ac_word" >&5
3049 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3050 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3051 echo $ECHO_N "(cached) $ECHO_C" >&6
3053 if test -n "$ac_ct_RANLIB"; then
3054 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3056 ac_save_IFS=$IFS; IFS=$ac_path_separator
3058 for ac_dir in $ac_dummy; do
3060 test -z "$ac_dir" && ac_dir=.
3061 $as_executable_p "$ac_dir/$ac_word" || continue
3062 ac_cv_prog_ac_ct_RANLIB="ranlib"
3063 echo "$as_me:3063: found $ac_dir/$ac_word" >&5
3067 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3070 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3071 if test -n "$ac_ct_RANLIB"; then
3072 echo "$as_me:3072: result: $ac_ct_RANLIB" >&5
3073 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3075 echo "$as_me:3075: result: no" >&5
3076 echo "${ECHO_T}no" >&6
3079 RANLIB=$ac_ct_RANLIB
3081 RANLIB="$ac_cv_prog_RANLIB"
3084 if test -n "$ac_tool_prefix"; then
3085 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3086 set dummy ${ac_tool_prefix}ld; ac_word=$2
3087 echo "$as_me:3087: checking for $ac_word" >&5
3088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3089 if test "${ac_cv_prog_LD+set}" = set; then
3090 echo $ECHO_N "(cached) $ECHO_C" >&6
3092 if test -n "$LD"; then
3093 ac_cv_prog_LD="$LD" # Let the user override the test.
3095 ac_save_IFS=$IFS; IFS=$ac_path_separator
3097 for ac_dir in $ac_dummy; do
3099 test -z "$ac_dir" && ac_dir=.
3100 $as_executable_p "$ac_dir/$ac_word" || continue
3101 ac_cv_prog_LD="${ac_tool_prefix}ld"
3102 echo "$as_me:3102: found $ac_dir/$ac_word" >&5
3109 if test -n "$LD"; then
3110 echo "$as_me:3110: result: $LD" >&5
3111 echo "${ECHO_T}$LD" >&6
3113 echo "$as_me:3113: result: no" >&5
3114 echo "${ECHO_T}no" >&6
3118 if test -z "$ac_cv_prog_LD"; then
3120 # Extract the first word of "ld", so it can be a program name with args.
3121 set dummy ld; ac_word=$2
3122 echo "$as_me:3122: checking for $ac_word" >&5
3123 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3124 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3125 echo $ECHO_N "(cached) $ECHO_C" >&6
3127 if test -n "$ac_ct_LD"; then
3128 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3130 ac_save_IFS=$IFS; IFS=$ac_path_separator
3132 for ac_dir in $ac_dummy; do
3134 test -z "$ac_dir" && ac_dir=.
3135 $as_executable_p "$ac_dir/$ac_word" || continue
3136 ac_cv_prog_ac_ct_LD="ld"
3137 echo "$as_me:3137: found $ac_dir/$ac_word" >&5
3141 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3144 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3145 if test -n "$ac_ct_LD"; then
3146 echo "$as_me:3146: result: $ac_ct_LD" >&5
3147 echo "${ECHO_T}$ac_ct_LD" >&6
3149 echo "$as_me:3149: result: no" >&5
3150 echo "${ECHO_T}no" >&6
3158 if test -n "$ac_tool_prefix"; then
3159 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3160 set dummy ${ac_tool_prefix}ar; ac_word=$2
3161 echo "$as_me:3161: checking for $ac_word" >&5
3162 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3163 if test "${ac_cv_prog_AR+set}" = set; then
3164 echo $ECHO_N "(cached) $ECHO_C" >&6
3166 if test -n "$AR"; then
3167 ac_cv_prog_AR="$AR" # Let the user override the test.
3169 ac_save_IFS=$IFS; IFS=$ac_path_separator
3171 for ac_dir in $ac_dummy; do
3173 test -z "$ac_dir" && ac_dir=.
3174 $as_executable_p "$ac_dir/$ac_word" || continue
3175 ac_cv_prog_AR="${ac_tool_prefix}ar"
3176 echo "$as_me:3176: found $ac_dir/$ac_word" >&5
3183 if test -n "$AR"; then
3184 echo "$as_me:3184: result: $AR" >&5
3185 echo "${ECHO_T}$AR" >&6
3187 echo "$as_me:3187: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3192 if test -z "$ac_cv_prog_AR"; then
3194 # Extract the first word of "ar", so it can be a program name with args.
3195 set dummy ar; ac_word=$2
3196 echo "$as_me:3196: checking for $ac_word" >&5
3197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3198 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3199 echo $ECHO_N "(cached) $ECHO_C" >&6
3201 if test -n "$ac_ct_AR"; then
3202 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3204 ac_save_IFS=$IFS; IFS=$ac_path_separator
3206 for ac_dir in $ac_dummy; do
3208 test -z "$ac_dir" && ac_dir=.
3209 $as_executable_p "$ac_dir/$ac_word" || continue
3210 ac_cv_prog_ac_ct_AR="ar"
3211 echo "$as_me:3211: found $ac_dir/$ac_word" >&5
3215 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3218 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3219 if test -n "$ac_ct_AR"; then
3220 echo "$as_me:3220: result: $ac_ct_AR" >&5
3221 echo "${ECHO_T}$ac_ct_AR" >&6
3223 echo "$as_me:3223: result: no" >&5
3224 echo "${ECHO_T}no" >&6
3232 if test -n "$ac_tool_prefix"; then
3233 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3234 set dummy ${ac_tool_prefix}ar; ac_word=$2
3235 echo "$as_me:3235: checking for $ac_word" >&5
3236 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3237 if test "${ac_cv_prog_AR+set}" = set; then
3238 echo $ECHO_N "(cached) $ECHO_C" >&6
3240 if test -n "$AR"; then
3241 ac_cv_prog_AR="$AR" # Let the user override the test.
3243 ac_save_IFS=$IFS; IFS=$ac_path_separator
3245 for ac_dir in $ac_dummy; do
3247 test -z "$ac_dir" && ac_dir=.
3248 $as_executable_p "$ac_dir/$ac_word" || continue
3249 ac_cv_prog_AR="${ac_tool_prefix}ar"
3250 echo "$as_me:3250: found $ac_dir/$ac_word" >&5
3257 if test -n "$AR"; then
3258 echo "$as_me:3258: result: $AR" >&5
3259 echo "${ECHO_T}$AR" >&6
3261 echo "$as_me:3261: result: no" >&5
3262 echo "${ECHO_T}no" >&6
3266 if test -z "$ac_cv_prog_AR"; then
3268 # Extract the first word of "ar", so it can be a program name with args.
3269 set dummy ar; ac_word=$2
3270 echo "$as_me:3270: checking for $ac_word" >&5
3271 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3272 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3273 echo $ECHO_N "(cached) $ECHO_C" >&6
3275 if test -n "$ac_ct_AR"; then
3276 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3278 ac_save_IFS=$IFS; IFS=$ac_path_separator
3280 for ac_dir in $ac_dummy; do
3282 test -z "$ac_dir" && ac_dir=.
3283 $as_executable_p "$ac_dir/$ac_word" || continue
3284 ac_cv_prog_ac_ct_AR="ar"
3285 echo "$as_me:3285: found $ac_dir/$ac_word" >&5
3289 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3292 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3293 if test -n "$ac_ct_AR"; then
3294 echo "$as_me:3294: result: $ac_ct_AR" >&5
3295 echo "${ECHO_T}$ac_ct_AR" >&6
3297 echo "$as_me:3297: result: no" >&5
3298 echo "${ECHO_T}no" >&6
3306 echo "$as_me:3306: checking for options to update archives" >&5
3307 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3308 if test "${cf_cv_ar_flags+set}" = set; then
3309 echo $ECHO_N "(cached) $ECHO_C" >&6
3312 cf_cv_ar_flags=unknown
3313 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3316 # check if $ARFLAGS already contains this choice
3317 if test "x$ARFLAGS" != "x" ; then
3318 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3319 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3325 rm -f conftest.$ac_cv_objext
3328 cat >conftest.$ac_ext <<EOF
3329 #line 3329 "configure"
3330 int testdata[3] = { 123, 456, 789 };
3332 if { (eval echo "$as_me:3332: \"$ac_compile\"") >&5
3333 (eval $ac_compile) 2>&5
3335 echo "$as_me:3335: \$? = $ac_status" >&5
3336 (exit $ac_status); } ; then
3337 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3338 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3339 if test -f conftest.a ; then
3340 cf_cv_ar_flags=$cf_ar_flags
3344 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3346 echo "${as_me:-configure}:3346: testing cannot compile test-program ..." 1>&5
3351 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3354 echo "$as_me:3354: result: $cf_cv_ar_flags" >&5
3355 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3357 if test -n "$ARFLAGS" ; then
3358 if test -n "$cf_cv_ar_flags" ; then
3359 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3362 ARFLAGS=$cf_cv_ar_flags
3365 echo "$as_me:3365: checking for PATH separator" >&5
3366 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3367 case $cf_cv_system_name in
3368 (os2*) PATH_SEPARATOR=';' ;;
3369 (*) ${PATH_SEPARATOR:=':'} ;;
3372 echo "$as_me:3372: result: $PATH_SEPARATOR" >&5
3373 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3375 echo "$as_me:3375: checking if you have specified an install-prefix" >&5
3376 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3378 # Check whether --with-install-prefix or --without-install-prefix was given.
3379 if test "${with_install_prefix+set}" = set; then
3380 withval="$with_install_prefix"
3384 (*) DESTDIR="$withval"
3388 echo "$as_me:3388: result: $DESTDIR" >&5
3389 echo "${ECHO_T}$DESTDIR" >&6
3391 ###############################################################################
3393 # If we're cross-compiling, allow the user to override the tools and their
3394 # options. The configure script is oriented toward identifying the host
3395 # compiler, etc., but we need a build compiler to generate parts of the source.
3397 if test "$cross_compiling" = yes ; then
3399 # defaults that we might want to override
3400 : ${BUILD_CFLAGS:=''}
3401 : ${BUILD_CPPFLAGS:=''}
3402 : ${BUILD_LDFLAGS:=''}
3404 : ${BUILD_EXEEXT:='$x'}
3405 : ${BUILD_OBJEXT:='o'}
3407 # Check whether --with-build-cc or --without-build-cc was given.
3408 if test "${with_build_cc+set}" = set; then
3409 withval="$with_build_cc"
3412 for ac_prog in gcc clang c99 c89 cc cl
3414 # Extract the first word of "$ac_prog", so it can be a program name with args.
3415 set dummy $ac_prog; ac_word=$2
3416 echo "$as_me:3416: checking for $ac_word" >&5
3417 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3418 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3419 echo $ECHO_N "(cached) $ECHO_C" >&6
3421 if test -n "$BUILD_CC"; then
3422 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3424 ac_save_IFS=$IFS; IFS=$ac_path_separator
3426 for ac_dir in $ac_dummy; do
3428 test -z "$ac_dir" && ac_dir=.
3429 $as_executable_p "$ac_dir/$ac_word" || continue
3430 ac_cv_prog_BUILD_CC="$ac_prog"
3431 echo "$as_me:3431: found $ac_dir/$ac_word" >&5
3437 BUILD_CC=$ac_cv_prog_BUILD_CC
3438 if test -n "$BUILD_CC"; then
3439 echo "$as_me:3439: result: $BUILD_CC" >&5
3440 echo "${ECHO_T}$BUILD_CC" >&6
3442 echo "$as_me:3442: result: no" >&5
3443 echo "${ECHO_T}no" >&6
3446 test -n "$BUILD_CC" && break
3448 test -n "$BUILD_CC" || BUILD_CC="none"
3451 echo "$as_me:3451: checking for native build C compiler" >&5
3452 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3453 echo "$as_me:3453: result: $BUILD_CC" >&5
3454 echo "${ECHO_T}$BUILD_CC" >&6
3456 echo "$as_me:3456: checking for native build C preprocessor" >&5
3457 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3459 # Check whether --with-build-cpp or --without-build-cpp was given.
3460 if test "${with_build_cpp+set}" = set; then
3461 withval="$with_build_cpp"
3462 BUILD_CPP="$withval"
3464 BUILD_CPP='${BUILD_CC} -E'
3466 echo "$as_me:3466: result: $BUILD_CPP" >&5
3467 echo "${ECHO_T}$BUILD_CPP" >&6
3469 echo "$as_me:3469: checking for native build C flags" >&5
3470 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3472 # Check whether --with-build-cflags or --without-build-cflags was given.
3473 if test "${with_build_cflags+set}" = set; then
3474 withval="$with_build_cflags"
3475 BUILD_CFLAGS="$withval"
3477 echo "$as_me:3477: result: $BUILD_CFLAGS" >&5
3478 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3480 echo "$as_me:3480: checking for native build C preprocessor-flags" >&5
3481 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3483 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3484 if test "${with_build_cppflags+set}" = set; then
3485 withval="$with_build_cppflags"
3486 BUILD_CPPFLAGS="$withval"
3488 echo "$as_me:3488: result: $BUILD_CPPFLAGS" >&5
3489 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3491 echo "$as_me:3491: checking for native build linker-flags" >&5
3492 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3494 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3495 if test "${with_build_ldflags+set}" = set; then
3496 withval="$with_build_ldflags"
3497 BUILD_LDFLAGS="$withval"
3499 echo "$as_me:3499: result: $BUILD_LDFLAGS" >&5
3500 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3502 echo "$as_me:3502: checking for native build linker-libraries" >&5
3503 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3505 # Check whether --with-build-libs or --without-build-libs was given.
3506 if test "${with_build_libs+set}" = set; then
3507 withval="$with_build_libs"
3508 BUILD_LIBS="$withval"
3510 echo "$as_me:3510: result: $BUILD_LIBS" >&5
3511 echo "${ECHO_T}$BUILD_LIBS" >&6
3513 # this assumes we're on Unix.
3517 : ${BUILD_CC:='${CC}'}
3519 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3520 { { echo "$as_me:3520: error: Cross-build requires two compilers.
3521 Use --with-build-cc to specify the native compiler." >&5
3522 echo "$as_me: error: Cross-build requires two compilers.
3523 Use --with-build-cc to specify the native compiler." >&2;}
3524 { (exit 1); exit 1; }; }
3528 : ${BUILD_CC:='${CC}'}
3529 : ${BUILD_CPP:='${CPP}'}
3530 : ${BUILD_CFLAGS:='${CFLAGS}'}
3531 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3532 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3533 : ${BUILD_LIBS:='${LIBS}'}
3534 : ${BUILD_EXEEXT:='$x'}
3535 : ${BUILD_OBJEXT:='o'}
3538 ###############################################################################
3540 ### Options to allow the user to specify the set of libraries which are used.
3541 ### Use "--without-normal --with-shared" to allow the default model to be
3542 ### shared, for example.
3545 echo "$as_me:3545: checking if you want to build shared C-objects" >&5
3546 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3548 # Check whether --with-shared or --without-shared was given.
3549 if test "${with_shared+set}" = set; then
3550 withval="$with_shared"
3551 with_shared=$withval
3555 echo "$as_me:3555: result: $with_shared" >&5
3556 echo "${ECHO_T}$with_shared" >&6
3557 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3559 echo "$as_me:3559: checking for specified models" >&5
3560 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3561 test -z "$cf_list_models" && cf_list_models=normal
3562 echo "$as_me:3562: result: $cf_list_models" >&5
3563 echo "${ECHO_T}$cf_list_models" >&6
3565 ### Use the first model as the default, and save its suffix for use in building
3566 ### up test-applications.
3567 echo "$as_me:3567: checking for default model" >&5
3568 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3569 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3570 echo "$as_me:3570: result: $DFT_LWR_MODEL" >&5
3571 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3573 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3575 echo "$as_me:3575: checking for specific curses-directory" >&5
3576 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3578 # Check whether --with-curses-dir or --without-curses-dir was given.
3579 if test "${with_curses_dir+set}" = set; then
3580 withval="$with_curses_dir"
3581 cf_cv_curses_dir=$withval
3585 echo "$as_me:3585: result: $cf_cv_curses_dir" >&5
3586 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3588 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3591 if test "x$prefix" != xNONE; then
3592 cf_path_syntax="$prefix"
3594 cf_path_syntax="$ac_default_prefix"
3602 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3604 (.\${*prefix}*|.\${*dir}*)
3605 eval withval="$withval"
3608 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3613 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3616 { { echo "$as_me:3616: error: expected a pathname, not \"$withval\"" >&5
3617 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3618 { (exit 1); exit 1; }; }
3622 if test -d "$cf_cv_curses_dir"
3625 if test -n "$cf_cv_curses_dir/include" ; then
3626 for cf_add_incdir in $cf_cv_curses_dir/include
3628 while test $cf_add_incdir != /usr/include
3630 if test -d $cf_add_incdir
3633 if test -n "$CFLAGS$CPPFLAGS" ; then
3634 # a loop is needed to ensure we can add subdirs of existing dirs
3635 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3636 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3637 cf_have_incdir=yes; break
3642 if test "$cf_have_incdir" = no ; then
3643 if test "$cf_add_incdir" = /usr/local/include ; then
3644 if test "$GCC" = yes
3646 cf_save_CPPFLAGS=$CPPFLAGS
3647 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3648 cat >conftest.$ac_ext <<_ACEOF
3649 #line 3649 "configure"
3650 #include "confdefs.h"
3660 rm -f conftest.$ac_objext
3661 if { (eval echo "$as_me:3661: \"$ac_compile\"") >&5
3662 (eval $ac_compile) 2>&5
3664 echo "$as_me:3664: \$? = $ac_status" >&5
3665 (exit $ac_status); } &&
3666 { ac_try='test -s conftest.$ac_objext'
3667 { (eval echo "$as_me:3667: \"$ac_try\"") >&5
3670 echo "$as_me:3670: \$? = $ac_status" >&5
3671 (exit $ac_status); }; }; then
3674 echo "$as_me: failed program was:" >&5
3675 cat conftest.$ac_ext >&5
3678 rm -f conftest.$ac_objext conftest.$ac_ext
3679 CPPFLAGS=$cf_save_CPPFLAGS
3684 if test "$cf_have_incdir" = no ; then
3685 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3687 echo "${as_me:-configure}:3687: testing adding $cf_add_incdir to include-path ..." 1>&5
3689 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3691 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3692 test "$cf_top_incdir" = "$cf_add_incdir" && break
3693 cf_add_incdir="$cf_top_incdir"
3704 if test -n "$cf_cv_curses_dir/lib" ; then
3705 for cf_add_libdir in $cf_cv_curses_dir/lib
3707 if test $cf_add_libdir = /usr/lib ; then
3709 elif test -d $cf_add_libdir
3712 if test -n "$LDFLAGS$LIBS" ; then
3713 # a loop is needed to ensure we can add subdirs of existing dirs
3714 for cf_test_libdir in $LDFLAGS $LIBS ; do
3715 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3716 cf_have_libdir=yes; break
3720 if test "$cf_have_libdir" = no ; then
3721 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3723 echo "${as_me:-configure}:3723: testing adding $cf_add_libdir to library-path ..." 1>&5
3725 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3734 cf_ncuconfig_root=ncurses
3735 cf_have_ncuconfig=no
3737 if test "x${PKG_CONFIG:=none}" != xnone; then
3738 echo "$as_me:3738: checking pkg-config for $cf_ncuconfig_root" >&5
3739 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3740 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3741 echo "$as_me:3741: result: yes" >&5
3742 echo "${ECHO_T}yes" >&6
3744 echo "$as_me:3744: checking if the $cf_ncuconfig_root package files work" >&5
3745 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3746 cf_have_ncuconfig=unknown
3748 cf_save_CPPFLAGS="$CPPFLAGS"
3749 cf_save_LIBS="$LIBS"
3751 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3753 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3754 # Filter out duplicates - this happens with badly-designed ".pc" files...
3755 for cf_add_1lib in $LIBS
3757 for cf_add_2lib in $cf_add_libs
3759 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3765 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3769 cat >conftest.$ac_ext <<_ACEOF
3770 #line 3770 "configure"
3771 #include "confdefs.h"
3772 #include <${cf_cv_ncurses_header:-curses.h}>
3776 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3781 rm -f conftest.$ac_objext conftest$ac_exeext
3782 if { (eval echo "$as_me:3782: \"$ac_link\"") >&5
3783 (eval $ac_link) 2>&5
3785 echo "$as_me:3785: \$? = $ac_status" >&5
3786 (exit $ac_status); } &&
3787 { ac_try='test -s conftest$ac_exeext'
3788 { (eval echo "$as_me:3788: \"$ac_try\"") >&5
3791 echo "$as_me:3791: \$? = $ac_status" >&5
3792 (exit $ac_status); }; }; then
3793 if test "$cross_compiling" = yes; then
3794 cf_have_ncuconfig=maybe
3796 cat >conftest.$ac_ext <<_ACEOF
3797 #line 3797 "configure"
3798 #include "confdefs.h"
3799 #include <${cf_cv_ncurses_header:-curses.h}>
3801 { char *xx = curses_version(); return (xx == 0); }
3803 rm -f conftest$ac_exeext
3804 if { (eval echo "$as_me:3804: \"$ac_link\"") >&5
3805 (eval $ac_link) 2>&5
3807 echo "$as_me:3807: \$? = $ac_status" >&5
3808 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3809 { (eval echo "$as_me:3809: \"$ac_try\"") >&5
3812 echo "$as_me:3812: \$? = $ac_status" >&5
3813 (exit $ac_status); }; }; then
3814 cf_have_ncuconfig=yes
3816 echo "$as_me: program exited with status $ac_status" >&5
3817 echo "$as_me: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 cf_have_ncuconfig=no
3821 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3824 echo "$as_me: failed program was:" >&5
3825 cat conftest.$ac_ext >&5
3826 cf_have_ncuconfig=no
3828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3829 echo "$as_me:3829: result: $cf_have_ncuconfig" >&5
3830 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3831 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3832 if test "$cf_have_ncuconfig" != "yes"
3834 CPPFLAGS="$cf_save_CPPFLAGS"
3835 LIBS="$cf_save_LIBS"
3836 NCURSES_CONFIG_PKG=none
3839 cat >>confdefs.h <<\EOF
3843 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3846 echo "$as_me:3846: checking for terminfo header" >&5
3847 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
3848 if test "${cf_cv_term_header+set}" = set; then
3849 echo $ECHO_N "(cached) $ECHO_C" >&6
3852 case ${cf_cv_ncurses_header} in
3853 (*/ncurses.h|*/ncursesw.h)
3854 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3857 cf_term_header=term.h
3861 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3863 cat >conftest.$ac_ext <<_ACEOF
3864 #line 3864 "configure"
3865 #include "confdefs.h"
3867 #include <${cf_cv_ncurses_header:-curses.h}>
3873 int x = auto_left_margin
3878 rm -f conftest.$ac_objext
3879 if { (eval echo "$as_me:3879: \"$ac_compile\"") >&5
3880 (eval $ac_compile) 2>&5
3882 echo "$as_me:3882: \$? = $ac_status" >&5
3883 (exit $ac_status); } &&
3884 { ac_try='test -s conftest.$ac_objext'
3885 { (eval echo "$as_me:3885: \"$ac_try\"") >&5
3888 echo "$as_me:3888: \$? = $ac_status" >&5
3889 (exit $ac_status); }; }; then
3891 cf_cv_term_header="$cf_test"
3893 echo "$as_me: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3896 cf_cv_term_header=unknown
3899 rm -f conftest.$ac_objext conftest.$ac_ext
3900 test "$cf_cv_term_header" != unknown && break
3904 echo "$as_me:3904: result: $cf_cv_term_header" >&5
3905 echo "${ECHO_T}$cf_cv_term_header" >&6
3907 # Set definitions to allow ifdef'ing to accommodate subdirectories
3909 case $cf_cv_term_header in
3912 cat >>confdefs.h <<\EOF
3913 #define HAVE_TERM_H 1
3919 case $cf_cv_term_header in
3922 cat >>confdefs.h <<\EOF
3923 #define HAVE_NCURSES_TERM_H 1
3929 cat >>confdefs.h <<\EOF
3930 #define HAVE_NCURSESW_TERM_H 1
3937 echo "$as_me:3937: result: no" >&5
3938 echo "${ECHO_T}no" >&6
3939 NCURSES_CONFIG_PKG=none
3942 NCURSES_CONFIG_PKG=none
3945 if test "x$cf_have_ncuconfig" = "xno"; then
3946 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
3948 if test -n "$ac_tool_prefix"; then
3949 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3951 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3952 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3958 if test -n "$NCURSES_CONFIG"; then
3959 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
3961 ac_save_IFS=$IFS; IFS=$ac_path_separator
3963 for ac_dir in $ac_dummy; do
3965 test -z "$ac_dir" && ac_dir=.
3966 $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3974 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
3975 if test -n "$NCURSES_CONFIG"; then
3976 echo "$as_me:3976: result: $NCURSES_CONFIG" >&5
3977 echo "${ECHO_T}$NCURSES_CONFIG" >&6
3979 echo "$as_me:3979: result: no" >&5
3980 echo "${ECHO_T}no" >&6
3983 test -n "$NCURSES_CONFIG" && break
3986 if test -z "$NCURSES_CONFIG"; then
3987 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
3988 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3990 # Extract the first word of "$ac_prog", so it can be a program name with args.
3991 set dummy $ac_prog; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3997 if test -n "$ac_ct_NCURSES_CONFIG"; then
3998 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4000 ac_save_IFS=$IFS; IFS=$ac_path_separator
4002 for ac_dir in $ac_dummy; do
4004 test -z "$ac_dir" && ac_dir=.
4005 $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4013 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4014 if test -n "$ac_ct_NCURSES_CONFIG"; then
4015 echo "$as_me:4015: result: $ac_ct_NCURSES_CONFIG" >&5
4016 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4018 echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4022 test -n "$ac_ct_NCURSES_CONFIG" && break
4024 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4026 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4029 if test "$NCURSES_CONFIG" != none ; then
4031 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4033 cf_add_libs="`$NCURSES_CONFIG --libs`"
4034 # Filter out duplicates - this happens with badly-designed ".pc" files...
4035 for cf_add_1lib in $LIBS
4037 for cf_add_2lib in $cf_add_libs
4039 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4045 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4049 # even with config script, some packages use no-override for curses.h
4051 echo "$as_me:4051: checking if we have identified curses headers" >&5
4052 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4053 if test "${cf_cv_ncurses_header+set}" = set; then
4054 echo $ECHO_N "(cached) $ECHO_C" >&6
4057 cf_cv_ncurses_header=none
4059 ncurses.h ncurses/ncurses.h \
4060 curses.h ncurses/curses.h
4062 cat >conftest.$ac_ext <<_ACEOF
4063 #line 4063 "configure"
4064 #include "confdefs.h"
4065 #include <${cf_header}>
4069 initscr(); tgoto("?", 0,0)
4074 rm -f conftest.$ac_objext
4075 if { (eval echo "$as_me:4075: \"$ac_compile\"") >&5
4076 (eval $ac_compile) 2>&5
4078 echo "$as_me:4078: \$? = $ac_status" >&5
4079 (exit $ac_status); } &&
4080 { ac_try='test -s conftest.$ac_objext'
4081 { (eval echo "$as_me:4081: \"$ac_try\"") >&5
4084 echo "$as_me:4084: \$? = $ac_status" >&5
4085 (exit $ac_status); }; }; then
4086 cf_cv_ncurses_header=$cf_header; break
4088 echo "$as_me: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4091 rm -f conftest.$ac_objext conftest.$ac_ext
4095 echo "$as_me:4095: result: $cf_cv_ncurses_header" >&5
4096 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4098 if test "$cf_cv_ncurses_header" = none ; then
4099 { { echo "$as_me:4099: error: No curses header-files found" >&5
4100 echo "$as_me: error: No curses header-files found" >&2;}
4101 { (exit 1); exit 1; }; }
4104 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4106 for ac_header in $cf_cv_ncurses_header
4108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4109 echo "$as_me:4109: checking for $ac_header" >&5
4110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4112 echo $ECHO_N "(cached) $ECHO_C" >&6
4114 cat >conftest.$ac_ext <<_ACEOF
4115 #line 4115 "configure"
4116 #include "confdefs.h"
4117 #include <$ac_header>
4119 if { (eval echo "$as_me:4119: \"$ac_cpp conftest.$ac_ext\"") >&5
4120 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4122 egrep -v '^ *\+' conftest.er1 >conftest.err
4124 cat conftest.err >&5
4125 echo "$as_me:4125: \$? = $ac_status" >&5
4126 (exit $ac_status); } >/dev/null; then
4127 if test -s conftest.err; then
4128 ac_cpp_err=$ac_c_preproc_warn_flag
4135 if test -z "$ac_cpp_err"; then
4136 eval "$as_ac_Header=yes"
4138 echo "$as_me: failed program was:" >&5
4139 cat conftest.$ac_ext >&5
4140 eval "$as_ac_Header=no"
4142 rm -f conftest.err conftest.$ac_ext
4144 echo "$as_me:4144: result: `eval echo '${'$as_ac_Header'}'`" >&5
4145 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4146 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4147 cat >>confdefs.h <<EOF
4148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4154 cat >>confdefs.h <<\EOF
4158 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4160 cat >>confdefs.h <<EOF
4161 #define $cf_nculib_ROOT 1
4164 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4168 cf_ncuhdr_root=ncurses
4170 test -n "$cf_cv_curses_dir" && \
4171 test "$cf_cv_curses_dir" != "no" && { \
4173 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4174 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4176 while test $cf_add_incdir != /usr/include
4178 if test -d $cf_add_incdir
4181 if test -n "$CFLAGS$CPPFLAGS" ; then
4182 # a loop is needed to ensure we can add subdirs of existing dirs
4183 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4184 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4185 cf_have_incdir=yes; break
4190 if test "$cf_have_incdir" = no ; then
4191 if test "$cf_add_incdir" = /usr/local/include ; then
4192 if test "$GCC" = yes
4194 cf_save_CPPFLAGS=$CPPFLAGS
4195 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4196 cat >conftest.$ac_ext <<_ACEOF
4197 #line 4197 "configure"
4198 #include "confdefs.h"
4208 rm -f conftest.$ac_objext
4209 if { (eval echo "$as_me:4209: \"$ac_compile\"") >&5
4210 (eval $ac_compile) 2>&5
4212 echo "$as_me:4212: \$? = $ac_status" >&5
4213 (exit $ac_status); } &&
4214 { ac_try='test -s conftest.$ac_objext'
4215 { (eval echo "$as_me:4215: \"$ac_try\"") >&5
4218 echo "$as_me:4218: \$? = $ac_status" >&5
4219 (exit $ac_status); }; }; then
4222 echo "$as_me: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4226 rm -f conftest.$ac_objext conftest.$ac_ext
4227 CPPFLAGS=$cf_save_CPPFLAGS
4232 if test "$cf_have_incdir" = no ; then
4233 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4235 echo "${as_me:-configure}:4235: testing adding $cf_add_incdir to include-path ..." 1>&5
4237 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4239 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4240 test "$cf_top_incdir" = "$cf_add_incdir" && break
4241 cf_add_incdir="$cf_top_incdir"
4254 echo "$as_me:4254: checking for $cf_ncuhdr_root header in include-path" >&5
4255 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4256 if test "${cf_cv_ncurses_h+set}" = set; then
4257 echo $ECHO_N "(cached) $ECHO_C" >&6
4260 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4261 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4262 for cf_header in $cf_header_list
4265 cat >conftest.$ac_ext <<_ACEOF
4266 #line 4266 "configure"
4267 #include "confdefs.h"
4269 #include <$cf_header>
4274 #ifdef NCURSES_VERSION
4276 printf("%s\n", NCURSES_VERSION);
4289 rm -f conftest.$ac_objext
4290 if { (eval echo "$as_me:4290: \"$ac_compile\"") >&5
4291 (eval $ac_compile) 2>&5
4293 echo "$as_me:4293: \$? = $ac_status" >&5
4294 (exit $ac_status); } &&
4295 { ac_try='test -s conftest.$ac_objext'
4296 { (eval echo "$as_me:4296: \"$ac_try\"") >&5
4299 echo "$as_me:4299: \$? = $ac_status" >&5
4300 (exit $ac_status); }; }; then
4301 cf_cv_ncurses_h=$cf_header
4304 echo "$as_me: failed program was:" >&5
4305 cat conftest.$ac_ext >&5
4308 rm -f conftest.$ac_objext conftest.$ac_ext
4310 test "$cf_cv_ncurses_h" != no && break
4314 echo "$as_me:4314: result: $cf_cv_ncurses_h" >&5
4315 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4317 if test "$cf_cv_ncurses_h" != no ; then
4318 cf_cv_ncurses_header=$cf_cv_ncurses_h
4321 echo "$as_me:4321: checking for $cf_ncuhdr_root include-path" >&5
4322 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4323 if test "${cf_cv_ncurses_h2+set}" = set; then
4324 echo $ECHO_N "(cached) $ECHO_C" >&6
4327 test -n "$verbose" && echo
4331 # collect the current set of include-directories from compiler flags
4332 cf_header_path_list=""
4333 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4334 for cf_header_path in $CPPFLAGS $CFLAGS
4336 case $cf_header_path in
4338 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4340 test "x$cf_header_path" != "xNONE" && \
4341 test -d "$cf_header_path" && \
4343 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4344 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4345 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4346 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4347 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4348 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"
4351 cf_header_path_list="$cf_header_path_list $cf_search"
4357 # add the variations for the package we are looking for
4361 test "x$prefix" != "xNONE" && \
4362 test -d "$prefix" && \
4364 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4365 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4366 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4367 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4368 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4369 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4372 for cf_subdir_prefix in \
4381 test "x$cf_subdir_prefix" != "x$prefix" && \
4382 test -d "$cf_subdir_prefix" && \
4383 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4384 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4385 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4386 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4387 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4388 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4389 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"
4394 test "$includedir" != NONE && \
4395 test "$includedir" != "/usr/include" && \
4396 test -d "$includedir" && {
4397 test -d $includedir && cf_search="$cf_search $includedir"
4398 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4401 test "$oldincludedir" != NONE && \
4402 test "$oldincludedir" != "/usr/include" && \
4403 test -d "$oldincludedir" && {
4404 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4405 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4408 cf_search="$cf_search $cf_header_path_list"
4410 test -n "$verbose" && echo search path $cf_search
4411 cf_save2_CPPFLAGS="$CPPFLAGS"
4412 for cf_incdir in $cf_search
4415 if test -n "$cf_incdir" ; then
4416 for cf_add_incdir in $cf_incdir
4418 while test $cf_add_incdir != /usr/include
4420 if test -d $cf_add_incdir
4423 if test -n "$CFLAGS$CPPFLAGS" ; then
4424 # a loop is needed to ensure we can add subdirs of existing dirs
4425 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4426 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4427 cf_have_incdir=yes; break
4432 if test "$cf_have_incdir" = no ; then
4433 if test "$cf_add_incdir" = /usr/local/include ; then
4434 if test "$GCC" = yes
4436 cf_save_CPPFLAGS=$CPPFLAGS
4437 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4438 cat >conftest.$ac_ext <<_ACEOF
4439 #line 4439 "configure"
4440 #include "confdefs.h"
4450 rm -f conftest.$ac_objext
4451 if { (eval echo "$as_me:4451: \"$ac_compile\"") >&5
4452 (eval $ac_compile) 2>&5
4454 echo "$as_me:4454: \$? = $ac_status" >&5
4455 (exit $ac_status); } &&
4456 { ac_try='test -s conftest.$ac_objext'
4457 { (eval echo "$as_me:4457: \"$ac_try\"") >&5
4460 echo "$as_me:4460: \$? = $ac_status" >&5
4461 (exit $ac_status); }; }; then
4464 echo "$as_me: failed program was:" >&5
4465 cat conftest.$ac_ext >&5
4468 rm -f conftest.$ac_objext conftest.$ac_ext
4469 CPPFLAGS=$cf_save_CPPFLAGS
4474 if test "$cf_have_incdir" = no ; then
4475 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4477 echo "${as_me:-configure}:4477: testing adding $cf_add_incdir to include-path ..." 1>&5
4479 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4481 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4482 test "$cf_top_incdir" = "$cf_add_incdir" && break
4483 cf_add_incdir="$cf_top_incdir"
4499 cat >conftest.$ac_ext <<_ACEOF
4500 #line 4500 "configure"
4501 #include "confdefs.h"
4503 #include <$cf_header>
4508 #ifdef NCURSES_VERSION
4510 printf("%s\n", NCURSES_VERSION);
4523 rm -f conftest.$ac_objext
4524 if { (eval echo "$as_me:4524: \"$ac_compile\"") >&5
4525 (eval $ac_compile) 2>&5
4527 echo "$as_me:4527: \$? = $ac_status" >&5
4528 (exit $ac_status); } &&
4529 { ac_try='test -s conftest.$ac_objext'
4530 { (eval echo "$as_me:4530: \"$ac_try\"") >&5
4533 echo "$as_me:4533: \$? = $ac_status" >&5
4534 (exit $ac_status); }; }; then
4535 cf_cv_ncurses_h2=$cf_header
4538 echo "$as_me: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4542 rm -f conftest.$ac_objext conftest.$ac_ext
4544 if test "$cf_cv_ncurses_h2" != no ; then
4545 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4546 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4549 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4551 CPPFLAGS="$cf_save2_CPPFLAGS"
4552 test "$cf_cv_ncurses_h2" != no && break
4554 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4554: error: not found" >&5
4555 echo "$as_me: error: not found" >&2;}
4556 { (exit 1); exit 1; }; }
4559 echo "$as_me:4559: result: $cf_cv_ncurses_h2" >&5
4560 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4562 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4563 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4564 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4565 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4568 if test -n "$cf_1st_incdir" ; then
4569 for cf_add_incdir in $cf_1st_incdir
4571 while test $cf_add_incdir != /usr/include
4573 if test -d $cf_add_incdir
4576 if test -n "$CFLAGS$CPPFLAGS" ; then
4577 # a loop is needed to ensure we can add subdirs of existing dirs
4578 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4579 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4580 cf_have_incdir=yes; break
4585 if test "$cf_have_incdir" = no ; then
4586 if test "$cf_add_incdir" = /usr/local/include ; then
4587 if test "$GCC" = yes
4589 cf_save_CPPFLAGS=$CPPFLAGS
4590 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4591 cat >conftest.$ac_ext <<_ACEOF
4592 #line 4592 "configure"
4593 #include "confdefs.h"
4603 rm -f conftest.$ac_objext
4604 if { (eval echo "$as_me:4604: \"$ac_compile\"") >&5
4605 (eval $ac_compile) 2>&5
4607 echo "$as_me:4607: \$? = $ac_status" >&5
4608 (exit $ac_status); } &&
4609 { ac_try='test -s conftest.$ac_objext'
4610 { (eval echo "$as_me:4610: \"$ac_try\"") >&5
4613 echo "$as_me:4613: \$? = $ac_status" >&5
4614 (exit $ac_status); }; }; then
4617 echo "$as_me: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
4621 rm -f conftest.$ac_objext conftest.$ac_ext
4622 CPPFLAGS=$cf_save_CPPFLAGS
4627 if test "$cf_have_incdir" = no ; then
4628 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4630 echo "${as_me:-configure}:4630: testing adding $cf_add_incdir to include-path ..." 1>&5
4632 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4634 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4635 test "$cf_top_incdir" = "$cf_add_incdir" && break
4636 cf_add_incdir="$cf_top_incdir"
4649 # Set definitions to allow ifdef'ing for ncurses.h
4651 case $cf_cv_ncurses_header in
4654 cat >>confdefs.h <<\EOF
4655 #define HAVE_NCURSES_H 1
4661 case $cf_cv_ncurses_header in
4662 (ncurses/curses.h|ncurses/ncurses.h)
4664 cat >>confdefs.h <<\EOF
4665 #define HAVE_NCURSES_NCURSES_H 1
4669 (ncursesw/curses.h|ncursesw/ncurses.h)
4671 cat >>confdefs.h <<\EOF
4672 #define HAVE_NCURSESW_NCURSES_H 1
4678 echo "$as_me:4678: checking for terminfo header" >&5
4679 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4680 if test "${cf_cv_term_header+set}" = set; then
4681 echo $ECHO_N "(cached) $ECHO_C" >&6
4684 case ${cf_cv_ncurses_header} in
4685 (*/ncurses.h|*/ncursesw.h)
4686 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4689 cf_term_header=term.h
4693 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4695 cat >conftest.$ac_ext <<_ACEOF
4696 #line 4696 "configure"
4697 #include "confdefs.h"
4699 #include <${cf_cv_ncurses_header:-curses.h}>
4705 int x = auto_left_margin
4710 rm -f conftest.$ac_objext
4711 if { (eval echo "$as_me:4711: \"$ac_compile\"") >&5
4712 (eval $ac_compile) 2>&5
4714 echo "$as_me:4714: \$? = $ac_status" >&5
4715 (exit $ac_status); } &&
4716 { ac_try='test -s conftest.$ac_objext'
4717 { (eval echo "$as_me:4717: \"$ac_try\"") >&5
4720 echo "$as_me:4720: \$? = $ac_status" >&5
4721 (exit $ac_status); }; }; then
4723 cf_cv_term_header="$cf_test"
4725 echo "$as_me: failed program was:" >&5
4726 cat conftest.$ac_ext >&5
4728 cf_cv_term_header=unknown
4731 rm -f conftest.$ac_objext conftest.$ac_ext
4732 test "$cf_cv_term_header" != unknown && break
4736 echo "$as_me:4736: result: $cf_cv_term_header" >&5
4737 echo "${ECHO_T}$cf_cv_term_header" >&6
4739 # Set definitions to allow ifdef'ing to accommodate subdirectories
4741 case $cf_cv_term_header in
4744 cat >>confdefs.h <<\EOF
4745 #define HAVE_TERM_H 1
4751 case $cf_cv_term_header in
4754 cat >>confdefs.h <<\EOF
4755 #define HAVE_NCURSES_TERM_H 1
4761 cat >>confdefs.h <<\EOF
4762 #define HAVE_NCURSESW_TERM_H 1
4768 # some applications need this, but should check for NCURSES_VERSION
4770 cat >>confdefs.h <<\EOF
4774 echo "$as_me:4774: checking for ncurses version" >&5
4775 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4776 if test "${cf_cv_ncurses_version+set}" = set; then
4777 echo $ECHO_N "(cached) $ECHO_C" >&6
4780 cf_cv_ncurses_version=no
4783 if test "$cross_compiling" = yes; then
4785 # This will not work if the preprocessor splits the line after the
4786 # Autoconf token. The 'unproto' program does that.
4787 cat > conftest.$ac_ext <<EOF
4788 #include <${cf_cv_ncurses_header:-curses.h}>
4790 #ifdef NCURSES_VERSION
4791 Autoconf NCURSES_VERSION
4799 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4800 { (eval echo "$as_me:4800: \"$cf_try\"") >&5
4803 echo "$as_me:4803: \$? = $ac_status" >&5
4804 (exit $ac_status); }
4805 if test -f conftest.out ; then
4806 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4807 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4812 cat >conftest.$ac_ext <<_ACEOF
4813 #line 4813 "configure"
4814 #include "confdefs.h"
4816 #include <${cf_cv_ncurses_header:-curses.h}>
4820 FILE *fp = fopen("$cf_tempfile", "w");
4821 #ifdef NCURSES_VERSION
4822 # ifdef NCURSES_VERSION_PATCH
4823 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4825 fprintf(fp, "%s\n", NCURSES_VERSION);
4829 fprintf(fp, "old\n");
4834 ${cf_cv_main_return:-return}(0);
4837 rm -f conftest$ac_exeext
4838 if { (eval echo "$as_me:4838: \"$ac_link\"") >&5
4839 (eval $ac_link) 2>&5
4841 echo "$as_me:4841: \$? = $ac_status" >&5
4842 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4843 { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4846 echo "$as_me:4846: \$? = $ac_status" >&5
4847 (exit $ac_status); }; }; then
4849 cf_cv_ncurses_version=`cat $cf_tempfile`
4851 echo "$as_me: program exited with status $ac_status" >&5
4852 echo "$as_me: failed program was:" >&5
4853 cat conftest.$ac_ext >&5
4855 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4860 echo "$as_me:4860: result: $cf_cv_ncurses_version" >&5
4861 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4862 test "$cf_cv_ncurses_version" = no ||
4863 cat >>confdefs.h <<\EOF
4867 cf_nculib_root=ncurses
4868 # This works, except for the special case where we find gpm, but
4869 # ncurses is in a nonstandard location via $LIBS, and we really want
4872 cf_ncurses_SAVE="$LIBS"
4873 echo "$as_me:4873: checking for Gpm_Open in -lgpm" >&5
4874 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4875 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4876 echo $ECHO_N "(cached) $ECHO_C" >&6
4878 ac_check_lib_save_LIBS=$LIBS
4880 cat >conftest.$ac_ext <<_ACEOF
4881 #line 4881 "configure"
4882 #include "confdefs.h"
4884 /* Override any gcc2 internal prototype to avoid an error. */
4888 /* We use char because int might match the return type of a gcc2
4889 builtin and then its argument prototype would still apply. */
4899 rm -f conftest.$ac_objext conftest$ac_exeext
4900 if { (eval echo "$as_me:4900: \"$ac_link\"") >&5
4901 (eval $ac_link) 2>&5
4903 echo "$as_me:4903: \$? = $ac_status" >&5
4904 (exit $ac_status); } &&
4905 { ac_try='test -s conftest$ac_exeext'
4906 { (eval echo "$as_me:4906: \"$ac_try\"") >&5
4909 echo "$as_me:4909: \$? = $ac_status" >&5
4910 (exit $ac_status); }; }; then
4911 ac_cv_lib_gpm_Gpm_Open=yes
4913 echo "$as_me: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
4915 ac_cv_lib_gpm_Gpm_Open=no
4917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4918 LIBS=$ac_check_lib_save_LIBS
4920 echo "$as_me:4920: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4921 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4922 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4923 echo "$as_me:4923: checking for initscr in -lgpm" >&5
4924 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
4925 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
4926 echo $ECHO_N "(cached) $ECHO_C" >&6
4928 ac_check_lib_save_LIBS=$LIBS
4930 cat >conftest.$ac_ext <<_ACEOF
4931 #line 4931 "configure"
4932 #include "confdefs.h"
4934 /* Override any gcc2 internal prototype to avoid an error. */
4938 /* We use char because int might match the return type of a gcc2
4939 builtin and then its argument prototype would still apply. */
4949 rm -f conftest.$ac_objext conftest$ac_exeext
4950 if { (eval echo "$as_me:4950: \"$ac_link\"") >&5
4951 (eval $ac_link) 2>&5
4953 echo "$as_me:4953: \$? = $ac_status" >&5
4954 (exit $ac_status); } &&
4955 { ac_try='test -s conftest$ac_exeext'
4956 { (eval echo "$as_me:4956: \"$ac_try\"") >&5
4959 echo "$as_me:4959: \$? = $ac_status" >&5
4960 (exit $ac_status); }; }; then
4961 ac_cv_lib_gpm_initscr=yes
4963 echo "$as_me: failed program was:" >&5
4964 cat conftest.$ac_ext >&5
4965 ac_cv_lib_gpm_initscr=no
4967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4968 LIBS=$ac_check_lib_save_LIBS
4970 echo "$as_me:4970: result: $ac_cv_lib_gpm_initscr" >&5
4971 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
4972 if test $ac_cv_lib_gpm_initscr = yes; then
4973 LIBS="$cf_ncurses_SAVE"
4975 cf_ncurses_LIBS="-lgpm"
4982 # This is only necessary if you are linking against an obsolete
4983 # version of ncurses (but it should do no harm, since it's static).
4984 if test "$cf_nculib_root" = ncurses ; then
4985 echo "$as_me:4985: checking for tgoto in -lmytinfo" >&5
4986 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
4987 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
4988 echo $ECHO_N "(cached) $ECHO_C" >&6
4990 ac_check_lib_save_LIBS=$LIBS
4991 LIBS="-lmytinfo $LIBS"
4992 cat >conftest.$ac_ext <<_ACEOF
4993 #line 4993 "configure"
4994 #include "confdefs.h"
4996 /* Override any gcc2 internal prototype to avoid an error. */
5000 /* We use char because int might match the return type of a gcc2
5001 builtin and then its argument prototype would still apply. */
5011 rm -f conftest.$ac_objext conftest$ac_exeext
5012 if { (eval echo "$as_me:5012: \"$ac_link\"") >&5
5013 (eval $ac_link) 2>&5
5015 echo "$as_me:5015: \$? = $ac_status" >&5
5016 (exit $ac_status); } &&
5017 { ac_try='test -s conftest$ac_exeext'
5018 { (eval echo "$as_me:5018: \"$ac_try\"") >&5
5021 echo "$as_me:5021: \$? = $ac_status" >&5
5022 (exit $ac_status); }; }; then
5023 ac_cv_lib_mytinfo_tgoto=yes
5025 echo "$as_me: failed program was:" >&5
5026 cat conftest.$ac_ext >&5
5027 ac_cv_lib_mytinfo_tgoto=no
5029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5030 LIBS=$ac_check_lib_save_LIBS
5032 echo "$as_me:5032: result: $ac_cv_lib_mytinfo_tgoto" >&5
5033 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5034 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5035 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5042 cf_add_libs="$cf_ncurses_LIBS"
5043 # Filter out duplicates - this happens with badly-designed ".pc" files...
5044 for cf_add_1lib in $LIBS
5046 for cf_add_2lib in $cf_add_libs
5048 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5054 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5058 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5061 cf_add_libs="-l$cf_nculib_root"
5062 # Filter out duplicates - this happens with badly-designed ".pc" files...
5063 for cf_add_1lib in $LIBS
5065 for cf_add_2lib in $cf_add_libs
5067 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5073 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5079 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5081 echo "$as_me:5081: checking for initscr" >&5
5082 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5083 if test "${ac_cv_func_initscr+set}" = set; then
5084 echo $ECHO_N "(cached) $ECHO_C" >&6
5086 cat >conftest.$ac_ext <<_ACEOF
5087 #line 5087 "configure"
5088 #include "confdefs.h"
5089 /* System header to define __stub macros and hopefully few prototypes,
5090 which can conflict with char initscr (); below. */
5092 /* Override any gcc2 internal prototype to avoid an error. */
5096 /* We use char because int might match the return type of a gcc2
5097 builtin and then its argument prototype would still apply. */
5104 /* The GNU C library defines this for functions which it implements
5105 to always fail with ENOSYS. Some functions are actually named
5106 something starting with __ and the normal name is an alias. */
5107 #if defined (__stub_initscr) || defined (__stub___initscr)
5110 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5117 rm -f conftest.$ac_objext conftest$ac_exeext
5118 if { (eval echo "$as_me:5118: \"$ac_link\"") >&5
5119 (eval $ac_link) 2>&5
5121 echo "$as_me:5121: \$? = $ac_status" >&5
5122 (exit $ac_status); } &&
5123 { ac_try='test -s conftest$ac_exeext'
5124 { (eval echo "$as_me:5124: \"$ac_try\"") >&5
5127 echo "$as_me:5127: \$? = $ac_status" >&5
5128 (exit $ac_status); }; }; then
5129 ac_cv_func_initscr=yes
5131 echo "$as_me: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 ac_cv_func_initscr=no
5135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5137 echo "$as_me:5137: result: $ac_cv_func_initscr" >&5
5138 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5139 if test $ac_cv_func_initscr = yes; then
5140 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5143 cf_save_LIBS="$LIBS"
5144 echo "$as_me:5144: checking for initscr in -l$cf_nculib_root" >&5
5145 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5146 LIBS="-l$cf_nculib_root $LIBS"
5147 cat >conftest.$ac_ext <<_ACEOF
5148 #line 5148 "configure"
5149 #include "confdefs.h"
5150 #include <${cf_cv_ncurses_header:-curses.h}>
5159 rm -f conftest.$ac_objext conftest$ac_exeext
5160 if { (eval echo "$as_me:5160: \"$ac_link\"") >&5
5161 (eval $ac_link) 2>&5
5163 echo "$as_me:5163: \$? = $ac_status" >&5
5164 (exit $ac_status); } &&
5165 { ac_try='test -s conftest$ac_exeext'
5166 { (eval echo "$as_me:5166: \"$ac_try\"") >&5
5169 echo "$as_me:5169: \$? = $ac_status" >&5
5170 (exit $ac_status); }; }; then
5171 echo "$as_me:5171: result: yes" >&5
5172 echo "${ECHO_T}yes" >&6
5173 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5176 echo "$as_me: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
5178 echo "$as_me:5178: result: no" >&5
5179 echo "${ECHO_T}no" >&6
5182 cf_library_path_list=""
5183 if test -n "${LDFLAGS}${LIBS}" ; then
5184 for cf_library_path in $LDFLAGS $LIBS
5186 case $cf_library_path in
5188 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5190 test "x$cf_library_path" != "xNONE" && \
5191 test -d "$cf_library_path" && \
5193 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5194 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5195 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5196 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5197 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5198 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"
5201 cf_library_path_list="$cf_library_path_list $cf_search"
5209 test "x$prefix" != "xNONE" && \
5210 test -d "$prefix" && \
5212 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5213 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5214 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5215 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5216 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5217 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5220 for cf_subdir_prefix in \
5229 test "x$cf_subdir_prefix" != "x$prefix" && \
5230 test -d "$cf_subdir_prefix" && \
5231 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5232 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5233 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5234 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5235 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5236 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5237 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"
5242 cf_search="$cf_library_path_list $cf_search"
5244 for cf_libdir in $cf_search
5246 echo "$as_me:5246: checking for -l$cf_nculib_root in $cf_libdir" >&5
5247 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5248 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5249 cat >conftest.$ac_ext <<_ACEOF
5250 #line 5250 "configure"
5251 #include "confdefs.h"
5252 #include <${cf_cv_ncurses_header:-curses.h}>
5261 rm -f conftest.$ac_objext conftest$ac_exeext
5262 if { (eval echo "$as_me:5262: \"$ac_link\"") >&5
5263 (eval $ac_link) 2>&5
5265 echo "$as_me:5265: \$? = $ac_status" >&5
5266 (exit $ac_status); } &&
5267 { ac_try='test -s conftest$ac_exeext'
5268 { (eval echo "$as_me:5268: \"$ac_try\"") >&5
5271 echo "$as_me:5271: \$? = $ac_status" >&5
5272 (exit $ac_status); }; }; then
5273 echo "$as_me:5273: result: yes" >&5
5274 echo "${ECHO_T}yes" >&6
5275 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5278 echo "$as_me: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 echo "$as_me:5280: result: no" >&5
5281 echo "${ECHO_T}no" >&6
5282 LIBS="$cf_save_LIBS"
5284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5292 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5294 if test $cf_found_library = no ; then
5295 { { echo "$as_me:5295: error: Cannot link $cf_nculib_root library" >&5
5296 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5297 { (exit 1); exit 1; }; }
5302 if test -n "$cf_ncurses_LIBS" ; then
5303 echo "$as_me:5303: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5304 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5305 cf_ncurses_SAVE="$LIBS"
5306 for p in $cf_ncurses_LIBS ; do
5307 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5308 if test "$q" != "$LIBS" ; then
5312 cat >conftest.$ac_ext <<_ACEOF
5313 #line 5313 "configure"
5314 #include "confdefs.h"
5315 #include <${cf_cv_ncurses_header:-curses.h}>
5319 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5324 rm -f conftest.$ac_objext conftest$ac_exeext
5325 if { (eval echo "$as_me:5325: \"$ac_link\"") >&5
5326 (eval $ac_link) 2>&5
5328 echo "$as_me:5328: \$? = $ac_status" >&5
5329 (exit $ac_status); } &&
5330 { ac_try='test -s conftest$ac_exeext'
5331 { (eval echo "$as_me:5331: \"$ac_try\"") >&5
5334 echo "$as_me:5334: \$? = $ac_status" >&5
5335 (exit $ac_status); }; }; then
5336 echo "$as_me:5336: result: yes" >&5
5337 echo "${ECHO_T}yes" >&6
5339 echo "$as_me: failed program was:" >&5
5340 cat conftest.$ac_ext >&5
5341 echo "$as_me:5341: result: no" >&5
5342 echo "${ECHO_T}no" >&6
5343 LIBS="$cf_ncurses_SAVE"
5345 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5348 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5350 cat >>confdefs.h <<EOF
5351 #define $cf_nculib_ROOT 1
5359 echo "$as_me:5359: checking if you want wide-character code" >&5
5360 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5362 # Check whether --enable-widec or --disable-widec was given.
5363 if test "${enable_widec+set}" = set; then
5364 enableval="$enable_widec"
5365 with_widec=$enableval
5369 echo "$as_me:5369: result: $with_widec" >&5
5370 echo "${ECHO_T}$with_widec" >&6
5371 if test "$with_widec" = yes ; then
5373 echo "$as_me:5373: checking for multibyte character support" >&5
5374 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5375 if test "${cf_cv_utf8_lib+set}" = set; then
5376 echo $ECHO_N "(cached) $ECHO_C" >&6
5379 cf_save_LIBS="$LIBS"
5380 cat >conftest.$ac_ext <<_ACEOF
5381 #line 5381 "configure"
5382 #include "confdefs.h"
5393 rm -f conftest.$ac_objext conftest$ac_exeext
5394 if { (eval echo "$as_me:5394: \"$ac_link\"") >&5
5395 (eval $ac_link) 2>&5
5397 echo "$as_me:5397: \$? = $ac_status" >&5
5398 (exit $ac_status); } &&
5399 { ac_try='test -s conftest$ac_exeext'
5400 { (eval echo "$as_me:5400: \"$ac_try\"") >&5
5403 echo "$as_me:5403: \$? = $ac_status" >&5
5404 (exit $ac_status); }; }; then
5407 echo "$as_me: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5410 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5411 # will be set on completion of the AC_TRY_LINK below.
5412 cf_cv_header_path_utf8=
5413 cf_cv_library_path_utf8=
5415 echo "${as_me:-configure}:5415: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5417 cf_save_LIBS="$LIBS"
5419 cat >conftest.$ac_ext <<_ACEOF
5420 #line 5420 "configure"
5421 #include "confdefs.h"
5423 #include <libutf8.h>
5432 rm -f conftest.$ac_objext conftest$ac_exeext
5433 if { (eval echo "$as_me:5433: \"$ac_link\"") >&5
5434 (eval $ac_link) 2>&5
5436 echo "$as_me:5436: \$? = $ac_status" >&5
5437 (exit $ac_status); } &&
5438 { ac_try='test -s conftest$ac_exeext'
5439 { (eval echo "$as_me:5439: \"$ac_try\"") >&5
5442 echo "$as_me:5442: \$? = $ac_status" >&5
5443 (exit $ac_status); }; }; then
5445 cf_cv_find_linkage_utf8=yes
5446 cf_cv_header_path_utf8=/usr/include
5447 cf_cv_library_path_utf8=/usr/lib
5450 echo "$as_me: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5453 LIBS="-lutf8 $cf_save_LIBS"
5455 cat >conftest.$ac_ext <<_ACEOF
5456 #line 5456 "configure"
5457 #include "confdefs.h"
5459 #include <libutf8.h>
5468 rm -f conftest.$ac_objext conftest$ac_exeext
5469 if { (eval echo "$as_me:5469: \"$ac_link\"") >&5
5470 (eval $ac_link) 2>&5
5472 echo "$as_me:5472: \$? = $ac_status" >&5
5473 (exit $ac_status); } &&
5474 { ac_try='test -s conftest$ac_exeext'
5475 { (eval echo "$as_me:5475: \"$ac_try\"") >&5
5478 echo "$as_me:5478: \$? = $ac_status" >&5
5479 (exit $ac_status); }; }; then
5481 cf_cv_find_linkage_utf8=yes
5482 cf_cv_header_path_utf8=/usr/include
5483 cf_cv_library_path_utf8=/usr/lib
5484 cf_cv_library_file_utf8="-lutf8"
5487 echo "$as_me: failed program was:" >&5
5488 cat conftest.$ac_ext >&5
5490 cf_cv_find_linkage_utf8=no
5491 LIBS="$cf_save_LIBS"
5493 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5495 echo "${as_me:-configure}:5495: testing find linkage for utf8 library ..." 1>&5
5497 echo "${as_me:-configure}:5497: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5499 cf_save_CPPFLAGS="$CPPFLAGS"
5500 cf_test_CPPFLAGS="$CPPFLAGS"
5504 # collect the current set of include-directories from compiler flags
5505 cf_header_path_list=""
5506 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5507 for cf_header_path in $CPPFLAGS $CFLAGS
5509 case $cf_header_path in
5511 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5513 test "x$cf_header_path" != "xNONE" && \
5514 test -d "$cf_header_path" && \
5516 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5517 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5518 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5519 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5520 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5521 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5524 cf_header_path_list="$cf_header_path_list $cf_search"
5530 # add the variations for the package we are looking for
5534 test "x$prefix" != "xNONE" && \
5535 test -d "$prefix" && \
5537 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5538 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5539 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5540 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5541 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5542 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5545 for cf_subdir_prefix in \
5554 test "x$cf_subdir_prefix" != "x$prefix" && \
5555 test -d "$cf_subdir_prefix" && \
5556 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5557 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5558 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5559 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5560 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5561 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5562 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5567 test "$includedir" != NONE && \
5568 test "$includedir" != "/usr/include" && \
5569 test -d "$includedir" && {
5570 test -d $includedir && cf_search="$cf_search $includedir"
5571 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5574 test "$oldincludedir" != NONE && \
5575 test "$oldincludedir" != "/usr/include" && \
5576 test -d "$oldincludedir" && {
5577 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5578 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5581 cf_search="$cf_search $cf_header_path_list"
5583 for cf_cv_header_path_utf8 in $cf_search
5585 if test -d $cf_cv_header_path_utf8 ; then
5586 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5588 echo "${as_me:-configure}:5588: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5590 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5591 cat >conftest.$ac_ext <<_ACEOF
5592 #line 5592 "configure"
5593 #include "confdefs.h"
5595 #include <libutf8.h>
5604 rm -f conftest.$ac_objext
5605 if { (eval echo "$as_me:5605: \"$ac_compile\"") >&5
5606 (eval $ac_compile) 2>&5
5608 echo "$as_me:5608: \$? = $ac_status" >&5
5609 (exit $ac_status); } &&
5610 { ac_try='test -s conftest.$ac_objext'
5611 { (eval echo "$as_me:5611: \"$ac_try\"") >&5
5614 echo "$as_me:5614: \$? = $ac_status" >&5
5615 (exit $ac_status); }; }; then
5617 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5619 echo "${as_me:-configure}:5619: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5621 cf_cv_find_linkage_utf8=maybe
5622 cf_test_CPPFLAGS="$CPPFLAGS"
5625 echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5628 CPPFLAGS="$cf_save_CPPFLAGS"
5631 rm -f conftest.$ac_objext conftest.$ac_ext
5635 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5637 echo "${as_me:-configure}:5637: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5639 cf_save_LIBS="$LIBS"
5640 cf_save_LDFLAGS="$LDFLAGS"
5642 if test "$cf_cv_find_linkage_utf8" != yes ; then
5645 cf_library_path_list=""
5646 if test -n "${LDFLAGS}${LIBS}" ; then
5647 for cf_library_path in $LDFLAGS $LIBS
5649 case $cf_library_path in
5651 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5653 test "x$cf_library_path" != "xNONE" && \
5654 test -d "$cf_library_path" && \
5656 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5657 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5658 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5659 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5660 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5661 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5664 cf_library_path_list="$cf_library_path_list $cf_search"
5672 test "x$prefix" != "xNONE" && \
5673 test -d "$prefix" && \
5675 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5676 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5677 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5678 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5679 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5680 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5683 for cf_subdir_prefix in \
5692 test "x$cf_subdir_prefix" != "x$prefix" && \
5693 test -d "$cf_subdir_prefix" && \
5694 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5695 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5696 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5697 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5698 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5699 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5700 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5705 cf_search="$cf_library_path_list $cf_search"
5707 for cf_cv_library_path_utf8 in $cf_search
5709 if test -d $cf_cv_library_path_utf8 ; then
5710 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5712 echo "${as_me:-configure}:5712: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5714 CPPFLAGS="$cf_test_CPPFLAGS"
5715 LIBS="-lutf8 $cf_save_LIBS"
5716 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5717 cat >conftest.$ac_ext <<_ACEOF
5718 #line 5718 "configure"
5719 #include "confdefs.h"
5721 #include <libutf8.h>
5730 rm -f conftest.$ac_objext conftest$ac_exeext
5731 if { (eval echo "$as_me:5731: \"$ac_link\"") >&5
5732 (eval $ac_link) 2>&5
5734 echo "$as_me:5734: \$? = $ac_status" >&5
5735 (exit $ac_status); } &&
5736 { ac_try='test -s conftest$ac_exeext'
5737 { (eval echo "$as_me:5737: \"$ac_try\"") >&5
5740 echo "$as_me:5740: \$? = $ac_status" >&5
5741 (exit $ac_status); }; }; then
5743 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5745 echo "${as_me:-configure}:5745: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5747 cf_cv_find_linkage_utf8=yes
5748 cf_cv_library_file_utf8="-lutf8"
5751 echo "$as_me: failed program was:" >&5
5752 cat conftest.$ac_ext >&5
5754 CPPFLAGS="$cf_save_CPPFLAGS"
5755 LIBS="$cf_save_LIBS"
5756 LDFLAGS="$cf_save_LDFLAGS"
5759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5762 CPPFLAGS="$cf_save_CPPFLAGS"
5763 LDFLAGS="$cf_save_LDFLAGS"
5767 cf_cv_find_linkage_utf8=no
5771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776 LIBS="$cf_save_LIBS"
5778 if test "$cf_cv_find_linkage_utf8" = yes ; then
5779 cf_cv_utf8_lib=add-on
5785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5787 echo "$as_me:5787: result: $cf_cv_utf8_lib" >&5
5788 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5790 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5792 if test "$cf_cv_utf8_lib" = "add-on" ; then
5794 cat >>confdefs.h <<\EOF
5795 #define HAVE_LIBUTF8_H 1
5798 if test -n "$cf_cv_header_path_utf8" ; then
5799 for cf_add_incdir in $cf_cv_header_path_utf8
5801 while test $cf_add_incdir != /usr/include
5803 if test -d $cf_add_incdir
5806 if test -n "$CFLAGS$CPPFLAGS" ; then
5807 # a loop is needed to ensure we can add subdirs of existing dirs
5808 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5809 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5810 cf_have_incdir=yes; break
5815 if test "$cf_have_incdir" = no ; then
5816 if test "$cf_add_incdir" = /usr/local/include ; then
5817 if test "$GCC" = yes
5819 cf_save_CPPFLAGS=$CPPFLAGS
5820 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5821 cat >conftest.$ac_ext <<_ACEOF
5822 #line 5822 "configure"
5823 #include "confdefs.h"
5833 rm -f conftest.$ac_objext
5834 if { (eval echo "$as_me:5834: \"$ac_compile\"") >&5
5835 (eval $ac_compile) 2>&5
5837 echo "$as_me:5837: \$? = $ac_status" >&5
5838 (exit $ac_status); } &&
5839 { ac_try='test -s conftest.$ac_objext'
5840 { (eval echo "$as_me:5840: \"$ac_try\"") >&5
5843 echo "$as_me:5843: \$? = $ac_status" >&5
5844 (exit $ac_status); }; }; then
5847 echo "$as_me: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
5851 rm -f conftest.$ac_objext conftest.$ac_ext
5852 CPPFLAGS=$cf_save_CPPFLAGS
5857 if test "$cf_have_incdir" = no ; then
5858 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5860 echo "${as_me:-configure}:5860: testing adding $cf_add_incdir to include-path ..." 1>&5
5862 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5864 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5865 test "$cf_top_incdir" = "$cf_add_incdir" && break
5866 cf_add_incdir="$cf_top_incdir"
5877 if test -n "$cf_cv_library_path_utf8" ; then
5878 for cf_add_libdir in $cf_cv_library_path_utf8
5880 if test $cf_add_libdir = /usr/lib ; then
5882 elif test -d $cf_add_libdir
5885 if test -n "$LDFLAGS$LIBS" ; then
5886 # a loop is needed to ensure we can add subdirs of existing dirs
5887 for cf_test_libdir in $LDFLAGS $LIBS ; do
5888 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5889 cf_have_libdir=yes; break
5893 if test "$cf_have_libdir" = no ; then
5894 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5896 echo "${as_me:-configure}:5896: testing adding $cf_add_libdir to library-path ..." 1>&5
5898 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5904 cf_add_libs="$cf_cv_library_file_utf8"
5905 # Filter out duplicates - this happens with badly-designed ".pc" files...
5906 for cf_add_1lib in $LIBS
5908 for cf_add_2lib in $cf_add_libs
5910 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5916 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5922 cf_ncuconfig_root=ncursesw
5923 cf_have_ncuconfig=no
5925 if test "x${PKG_CONFIG:=none}" != xnone; then
5926 echo "$as_me:5926: checking pkg-config for $cf_ncuconfig_root" >&5
5927 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
5928 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
5929 echo "$as_me:5929: result: yes" >&5
5930 echo "${ECHO_T}yes" >&6
5932 echo "$as_me:5932: checking if the $cf_ncuconfig_root package files work" >&5
5933 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
5934 cf_have_ncuconfig=unknown
5936 cf_save_CPPFLAGS="$CPPFLAGS"
5937 cf_save_LIBS="$LIBS"
5939 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
5941 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
5942 # Filter out duplicates - this happens with badly-designed ".pc" files...
5943 for cf_add_1lib in $LIBS
5945 for cf_add_2lib in $cf_add_libs
5947 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5953 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5957 cat >conftest.$ac_ext <<_ACEOF
5958 #line 5958 "configure"
5959 #include "confdefs.h"
5960 #include <${cf_cv_ncurses_header:-curses.h}>
5964 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5969 rm -f conftest.$ac_objext conftest$ac_exeext
5970 if { (eval echo "$as_me:5970: \"$ac_link\"") >&5
5971 (eval $ac_link) 2>&5
5973 echo "$as_me:5973: \$? = $ac_status" >&5
5974 (exit $ac_status); } &&
5975 { ac_try='test -s conftest$ac_exeext'
5976 { (eval echo "$as_me:5976: \"$ac_try\"") >&5
5979 echo "$as_me:5979: \$? = $ac_status" >&5
5980 (exit $ac_status); }; }; then
5981 if test "$cross_compiling" = yes; then
5982 cf_have_ncuconfig=maybe
5984 cat >conftest.$ac_ext <<_ACEOF
5985 #line 5985 "configure"
5986 #include "confdefs.h"
5987 #include <${cf_cv_ncurses_header:-curses.h}>
5989 { char *xx = curses_version(); return (xx == 0); }
5991 rm -f conftest$ac_exeext
5992 if { (eval echo "$as_me:5992: \"$ac_link\"") >&5
5993 (eval $ac_link) 2>&5
5995 echo "$as_me:5995: \$? = $ac_status" >&5
5996 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5997 { (eval echo "$as_me:5997: \"$ac_try\"") >&5
6000 echo "$as_me:6000: \$? = $ac_status" >&5
6001 (exit $ac_status); }; }; then
6002 cf_have_ncuconfig=yes
6004 echo "$as_me: program exited with status $ac_status" >&5
6005 echo "$as_me: failed program was:" >&5
6006 cat conftest.$ac_ext >&5
6007 cf_have_ncuconfig=no
6009 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6012 echo "$as_me: failed program was:" >&5
6013 cat conftest.$ac_ext >&5
6014 cf_have_ncuconfig=no
6016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6017 echo "$as_me:6017: result: $cf_have_ncuconfig" >&5
6018 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6019 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6020 if test "$cf_have_ncuconfig" != "yes"
6022 CPPFLAGS="$cf_save_CPPFLAGS"
6023 LIBS="$cf_save_LIBS"
6024 NCURSES_CONFIG_PKG=none
6027 cat >>confdefs.h <<\EOF
6031 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6034 echo "$as_me:6034: checking for terminfo header" >&5
6035 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6036 if test "${cf_cv_term_header+set}" = set; then
6037 echo $ECHO_N "(cached) $ECHO_C" >&6
6040 case ${cf_cv_ncurses_header} in
6041 (*/ncurses.h|*/ncursesw.h)
6042 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6045 cf_term_header=term.h
6049 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6051 cat >conftest.$ac_ext <<_ACEOF
6052 #line 6052 "configure"
6053 #include "confdefs.h"
6055 #include <${cf_cv_ncurses_header:-curses.h}>
6061 int x = auto_left_margin
6066 rm -f conftest.$ac_objext
6067 if { (eval echo "$as_me:6067: \"$ac_compile\"") >&5
6068 (eval $ac_compile) 2>&5
6070 echo "$as_me:6070: \$? = $ac_status" >&5
6071 (exit $ac_status); } &&
6072 { ac_try='test -s conftest.$ac_objext'
6073 { (eval echo "$as_me:6073: \"$ac_try\"") >&5
6076 echo "$as_me:6076: \$? = $ac_status" >&5
6077 (exit $ac_status); }; }; then
6079 cf_cv_term_header="$cf_test"
6081 echo "$as_me: failed program was:" >&5
6082 cat conftest.$ac_ext >&5
6084 cf_cv_term_header=unknown
6087 rm -f conftest.$ac_objext conftest.$ac_ext
6088 test "$cf_cv_term_header" != unknown && break
6092 echo "$as_me:6092: result: $cf_cv_term_header" >&5
6093 echo "${ECHO_T}$cf_cv_term_header" >&6
6095 # Set definitions to allow ifdef'ing to accommodate subdirectories
6097 case $cf_cv_term_header in
6100 cat >>confdefs.h <<\EOF
6101 #define HAVE_TERM_H 1
6107 case $cf_cv_term_header in
6110 cat >>confdefs.h <<\EOF
6111 #define HAVE_NCURSES_TERM_H 1
6117 cat >>confdefs.h <<\EOF
6118 #define HAVE_NCURSESW_TERM_H 1
6125 echo "$as_me:6125: result: no" >&5
6126 echo "${ECHO_T}no" >&6
6127 NCURSES_CONFIG_PKG=none
6130 NCURSES_CONFIG_PKG=none
6133 if test "x$cf_have_ncuconfig" = "xno"; then
6134 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6136 if test -n "$ac_tool_prefix"; then
6137 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6139 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6140 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6141 echo "$as_me:6141: checking for $ac_word" >&5
6142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6143 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6144 echo $ECHO_N "(cached) $ECHO_C" >&6
6146 if test -n "$NCURSES_CONFIG"; then
6147 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6149 ac_save_IFS=$IFS; IFS=$ac_path_separator
6151 for ac_dir in $ac_dummy; do
6153 test -z "$ac_dir" && ac_dir=.
6154 $as_executable_p "$ac_dir/$ac_word" || continue
6155 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6156 echo "$as_me:6156: found $ac_dir/$ac_word" >&5
6162 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6163 if test -n "$NCURSES_CONFIG"; then
6164 echo "$as_me:6164: result: $NCURSES_CONFIG" >&5
6165 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6167 echo "$as_me:6167: result: no" >&5
6168 echo "${ECHO_T}no" >&6
6171 test -n "$NCURSES_CONFIG" && break
6174 if test -z "$NCURSES_CONFIG"; then
6175 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6176 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6178 # Extract the first word of "$ac_prog", so it can be a program name with args.
6179 set dummy $ac_prog; ac_word=$2
6180 echo "$as_me:6180: checking for $ac_word" >&5
6181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6182 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6183 echo $ECHO_N "(cached) $ECHO_C" >&6
6185 if test -n "$ac_ct_NCURSES_CONFIG"; then
6186 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6188 ac_save_IFS=$IFS; IFS=$ac_path_separator
6190 for ac_dir in $ac_dummy; do
6192 test -z "$ac_dir" && ac_dir=.
6193 $as_executable_p "$ac_dir/$ac_word" || continue
6194 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6195 echo "$as_me:6195: found $ac_dir/$ac_word" >&5
6201 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6202 if test -n "$ac_ct_NCURSES_CONFIG"; then
6203 echo "$as_me:6203: result: $ac_ct_NCURSES_CONFIG" >&5
6204 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6206 echo "$as_me:6206: result: no" >&5
6207 echo "${ECHO_T}no" >&6
6210 test -n "$ac_ct_NCURSES_CONFIG" && break
6212 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6214 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6217 if test "$NCURSES_CONFIG" != none ; then
6219 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6221 cf_add_libs="`$NCURSES_CONFIG --libs`"
6222 # Filter out duplicates - this happens with badly-designed ".pc" files...
6223 for cf_add_1lib in $LIBS
6225 for cf_add_2lib in $cf_add_libs
6227 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6237 # even with config script, some packages use no-override for curses.h
6239 echo "$as_me:6239: checking if we have identified curses headers" >&5
6240 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6241 if test "${cf_cv_ncurses_header+set}" = set; then
6242 echo $ECHO_N "(cached) $ECHO_C" >&6
6245 cf_cv_ncurses_header=none
6247 ncurses.h ncursesw/ncurses.h \
6248 curses.h ncursesw/curses.h
6250 cat >conftest.$ac_ext <<_ACEOF
6251 #line 6251 "configure"
6252 #include "confdefs.h"
6253 #include <${cf_header}>
6257 initscr(); tgoto("?", 0,0)
6262 rm -f conftest.$ac_objext
6263 if { (eval echo "$as_me:6263: \"$ac_compile\"") >&5
6264 (eval $ac_compile) 2>&5
6266 echo "$as_me:6266: \$? = $ac_status" >&5
6267 (exit $ac_status); } &&
6268 { ac_try='test -s conftest.$ac_objext'
6269 { (eval echo "$as_me:6269: \"$ac_try\"") >&5
6272 echo "$as_me:6272: \$? = $ac_status" >&5
6273 (exit $ac_status); }; }; then
6274 cf_cv_ncurses_header=$cf_header; break
6276 echo "$as_me: failed program was:" >&5
6277 cat conftest.$ac_ext >&5
6279 rm -f conftest.$ac_objext conftest.$ac_ext
6283 echo "$as_me:6283: result: $cf_cv_ncurses_header" >&5
6284 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6286 if test "$cf_cv_ncurses_header" = none ; then
6287 { { echo "$as_me:6287: error: No curses header-files found" >&5
6288 echo "$as_me: error: No curses header-files found" >&2;}
6289 { (exit 1); exit 1; }; }
6292 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6294 for ac_header in $cf_cv_ncurses_header
6296 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6297 echo "$as_me:6297: checking for $ac_header" >&5
6298 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6299 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6300 echo $ECHO_N "(cached) $ECHO_C" >&6
6302 cat >conftest.$ac_ext <<_ACEOF
6303 #line 6303 "configure"
6304 #include "confdefs.h"
6305 #include <$ac_header>
6307 if { (eval echo "$as_me:6307: \"$ac_cpp conftest.$ac_ext\"") >&5
6308 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6310 egrep -v '^ *\+' conftest.er1 >conftest.err
6312 cat conftest.err >&5
6313 echo "$as_me:6313: \$? = $ac_status" >&5
6314 (exit $ac_status); } >/dev/null; then
6315 if test -s conftest.err; then
6316 ac_cpp_err=$ac_c_preproc_warn_flag
6323 if test -z "$ac_cpp_err"; then
6324 eval "$as_ac_Header=yes"
6326 echo "$as_me: failed program was:" >&5
6327 cat conftest.$ac_ext >&5
6328 eval "$as_ac_Header=no"
6330 rm -f conftest.err conftest.$ac_ext
6332 echo "$as_me:6332: result: `eval echo '${'$as_ac_Header'}'`" >&5
6333 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6334 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6335 cat >>confdefs.h <<EOF
6336 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6342 cat >>confdefs.h <<\EOF
6346 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6348 cat >>confdefs.h <<EOF
6349 #define $cf_nculib_ROOT 1
6352 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6356 cf_ncuhdr_root=ncursesw
6358 test -n "$cf_cv_curses_dir" && \
6359 test "$cf_cv_curses_dir" != "no" && { \
6361 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6362 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6364 while test $cf_add_incdir != /usr/include
6366 if test -d $cf_add_incdir
6369 if test -n "$CFLAGS$CPPFLAGS" ; then
6370 # a loop is needed to ensure we can add subdirs of existing dirs
6371 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6372 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6373 cf_have_incdir=yes; break
6378 if test "$cf_have_incdir" = no ; then
6379 if test "$cf_add_incdir" = /usr/local/include ; then
6380 if test "$GCC" = yes
6382 cf_save_CPPFLAGS=$CPPFLAGS
6383 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6384 cat >conftest.$ac_ext <<_ACEOF
6385 #line 6385 "configure"
6386 #include "confdefs.h"
6396 rm -f conftest.$ac_objext
6397 if { (eval echo "$as_me:6397: \"$ac_compile\"") >&5
6398 (eval $ac_compile) 2>&5
6400 echo "$as_me:6400: \$? = $ac_status" >&5
6401 (exit $ac_status); } &&
6402 { ac_try='test -s conftest.$ac_objext'
6403 { (eval echo "$as_me:6403: \"$ac_try\"") >&5
6406 echo "$as_me:6406: \$? = $ac_status" >&5
6407 (exit $ac_status); }; }; then
6410 echo "$as_me: failed program was:" >&5
6411 cat conftest.$ac_ext >&5
6414 rm -f conftest.$ac_objext conftest.$ac_ext
6415 CPPFLAGS=$cf_save_CPPFLAGS
6420 if test "$cf_have_incdir" = no ; then
6421 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6423 echo "${as_me:-configure}:6423: testing adding $cf_add_incdir to include-path ..." 1>&5
6425 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6427 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6428 test "$cf_top_incdir" = "$cf_add_incdir" && break
6429 cf_add_incdir="$cf_top_incdir"
6442 echo "$as_me:6442: checking for $cf_ncuhdr_root header in include-path" >&5
6443 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6444 if test "${cf_cv_ncurses_h+set}" = set; then
6445 echo $ECHO_N "(cached) $ECHO_C" >&6
6448 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6449 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6450 for cf_header in $cf_header_list
6453 cat >conftest.$ac_ext <<_ACEOF
6454 #line 6454 "configure"
6455 #include "confdefs.h"
6457 #define _XOPEN_SOURCE_EXTENDED
6458 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6459 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6461 #include <$cf_header>
6466 #ifdef NCURSES_VERSION
6472 printf("%s\n", NCURSES_VERSION);
6485 rm -f conftest.$ac_objext
6486 if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
6487 (eval $ac_compile) 2>&5
6489 echo "$as_me:6489: \$? = $ac_status" >&5
6490 (exit $ac_status); } &&
6491 { ac_try='test -s conftest.$ac_objext'
6492 { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6495 echo "$as_me:6495: \$? = $ac_status" >&5
6496 (exit $ac_status); }; }; then
6497 cf_cv_ncurses_h=$cf_header
6500 echo "$as_me: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6504 rm -f conftest.$ac_objext conftest.$ac_ext
6506 test "$cf_cv_ncurses_h" != no && break
6510 echo "$as_me:6510: result: $cf_cv_ncurses_h" >&5
6511 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6513 if test "$cf_cv_ncurses_h" != no ; then
6514 cf_cv_ncurses_header=$cf_cv_ncurses_h
6517 echo "$as_me:6517: checking for $cf_ncuhdr_root include-path" >&5
6518 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6519 if test "${cf_cv_ncurses_h2+set}" = set; then
6520 echo $ECHO_N "(cached) $ECHO_C" >&6
6523 test -n "$verbose" && echo
6527 # collect the current set of include-directories from compiler flags
6528 cf_header_path_list=""
6529 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6530 for cf_header_path in $CPPFLAGS $CFLAGS
6532 case $cf_header_path in
6534 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6536 test "x$cf_header_path" != "xNONE" && \
6537 test -d "$cf_header_path" && \
6539 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6540 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6541 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6542 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6543 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6544 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"
6547 cf_header_path_list="$cf_header_path_list $cf_search"
6553 # add the variations for the package we are looking for
6557 test "x$prefix" != "xNONE" && \
6558 test -d "$prefix" && \
6560 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6561 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6562 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6563 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6564 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6565 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6568 for cf_subdir_prefix in \
6577 test "x$cf_subdir_prefix" != "x$prefix" && \
6578 test -d "$cf_subdir_prefix" && \
6579 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6580 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6581 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6582 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6583 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6584 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6585 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"
6590 test "$includedir" != NONE && \
6591 test "$includedir" != "/usr/include" && \
6592 test -d "$includedir" && {
6593 test -d $includedir && cf_search="$cf_search $includedir"
6594 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6597 test "$oldincludedir" != NONE && \
6598 test "$oldincludedir" != "/usr/include" && \
6599 test -d "$oldincludedir" && {
6600 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6601 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6604 cf_search="$cf_search $cf_header_path_list"
6606 test -n "$verbose" && echo search path $cf_search
6607 cf_save2_CPPFLAGS="$CPPFLAGS"
6608 for cf_incdir in $cf_search
6611 if test -n "$cf_incdir" ; then
6612 for cf_add_incdir in $cf_incdir
6614 while test $cf_add_incdir != /usr/include
6616 if test -d $cf_add_incdir
6619 if test -n "$CFLAGS$CPPFLAGS" ; then
6620 # a loop is needed to ensure we can add subdirs of existing dirs
6621 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6622 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6623 cf_have_incdir=yes; break
6628 if test "$cf_have_incdir" = no ; then
6629 if test "$cf_add_incdir" = /usr/local/include ; then
6630 if test "$GCC" = yes
6632 cf_save_CPPFLAGS=$CPPFLAGS
6633 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6634 cat >conftest.$ac_ext <<_ACEOF
6635 #line 6635 "configure"
6636 #include "confdefs.h"
6646 rm -f conftest.$ac_objext
6647 if { (eval echo "$as_me:6647: \"$ac_compile\"") >&5
6648 (eval $ac_compile) 2>&5
6650 echo "$as_me:6650: \$? = $ac_status" >&5
6651 (exit $ac_status); } &&
6652 { ac_try='test -s conftest.$ac_objext'
6653 { (eval echo "$as_me:6653: \"$ac_try\"") >&5
6656 echo "$as_me:6656: \$? = $ac_status" >&5
6657 (exit $ac_status); }; }; then
6660 echo "$as_me: failed program was:" >&5
6661 cat conftest.$ac_ext >&5
6664 rm -f conftest.$ac_objext conftest.$ac_ext
6665 CPPFLAGS=$cf_save_CPPFLAGS
6670 if test "$cf_have_incdir" = no ; then
6671 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6673 echo "${as_me:-configure}:6673: testing adding $cf_add_incdir to include-path ..." 1>&5
6675 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6677 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6678 test "$cf_top_incdir" = "$cf_add_incdir" && break
6679 cf_add_incdir="$cf_top_incdir"
6695 cat >conftest.$ac_ext <<_ACEOF
6696 #line 6696 "configure"
6697 #include "confdefs.h"
6699 #include <$cf_header>
6704 #ifdef NCURSES_VERSION
6706 printf("%s\n", NCURSES_VERSION);
6719 rm -f conftest.$ac_objext
6720 if { (eval echo "$as_me:6720: \"$ac_compile\"") >&5
6721 (eval $ac_compile) 2>&5
6723 echo "$as_me:6723: \$? = $ac_status" >&5
6724 (exit $ac_status); } &&
6725 { ac_try='test -s conftest.$ac_objext'
6726 { (eval echo "$as_me:6726: \"$ac_try\"") >&5
6729 echo "$as_me:6729: \$? = $ac_status" >&5
6730 (exit $ac_status); }; }; then
6731 cf_cv_ncurses_h2=$cf_header
6734 echo "$as_me: failed program was:" >&5
6735 cat conftest.$ac_ext >&5
6738 rm -f conftest.$ac_objext conftest.$ac_ext
6740 if test "$cf_cv_ncurses_h2" != no ; then
6741 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6742 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6745 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6747 CPPFLAGS="$cf_save2_CPPFLAGS"
6748 test "$cf_cv_ncurses_h2" != no && break
6750 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6750: error: not found" >&5
6751 echo "$as_me: error: not found" >&2;}
6752 { (exit 1); exit 1; }; }
6755 echo "$as_me:6755: result: $cf_cv_ncurses_h2" >&5
6756 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6758 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6759 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6760 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6761 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6764 if test -n "$cf_1st_incdir" ; then
6765 for cf_add_incdir in $cf_1st_incdir
6767 while test $cf_add_incdir != /usr/include
6769 if test -d $cf_add_incdir
6772 if test -n "$CFLAGS$CPPFLAGS" ; then
6773 # a loop is needed to ensure we can add subdirs of existing dirs
6774 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6775 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6776 cf_have_incdir=yes; break
6781 if test "$cf_have_incdir" = no ; then
6782 if test "$cf_add_incdir" = /usr/local/include ; then
6783 if test "$GCC" = yes
6785 cf_save_CPPFLAGS=$CPPFLAGS
6786 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6787 cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6799 rm -f conftest.$ac_objext
6800 if { (eval echo "$as_me:6800: \"$ac_compile\"") >&5
6801 (eval $ac_compile) 2>&5
6803 echo "$as_me:6803: \$? = $ac_status" >&5
6804 (exit $ac_status); } &&
6805 { ac_try='test -s conftest.$ac_objext'
6806 { (eval echo "$as_me:6806: \"$ac_try\"") >&5
6809 echo "$as_me:6809: \$? = $ac_status" >&5
6810 (exit $ac_status); }; }; then
6813 echo "$as_me: failed program was:" >&5
6814 cat conftest.$ac_ext >&5
6817 rm -f conftest.$ac_objext conftest.$ac_ext
6818 CPPFLAGS=$cf_save_CPPFLAGS
6823 if test "$cf_have_incdir" = no ; then
6824 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6826 echo "${as_me:-configure}:6826: testing adding $cf_add_incdir to include-path ..." 1>&5
6828 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6830 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6831 test "$cf_top_incdir" = "$cf_add_incdir" && break
6832 cf_add_incdir="$cf_top_incdir"
6845 # Set definitions to allow ifdef'ing for ncurses.h
6847 case $cf_cv_ncurses_header in
6850 cat >>confdefs.h <<\EOF
6851 #define HAVE_NCURSES_H 1
6857 case $cf_cv_ncurses_header in
6858 (ncurses/curses.h|ncurses/ncurses.h)
6860 cat >>confdefs.h <<\EOF
6861 #define HAVE_NCURSES_NCURSES_H 1
6865 (ncursesw/curses.h|ncursesw/ncurses.h)
6867 cat >>confdefs.h <<\EOF
6868 #define HAVE_NCURSESW_NCURSES_H 1
6874 echo "$as_me:6874: checking for terminfo header" >&5
6875 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6876 if test "${cf_cv_term_header+set}" = set; then
6877 echo $ECHO_N "(cached) $ECHO_C" >&6
6880 case ${cf_cv_ncurses_header} in
6881 (*/ncurses.h|*/ncursesw.h)
6882 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6885 cf_term_header=term.h
6889 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6891 cat >conftest.$ac_ext <<_ACEOF
6892 #line 6892 "configure"
6893 #include "confdefs.h"
6895 #include <${cf_cv_ncurses_header:-curses.h}>
6901 int x = auto_left_margin
6906 rm -f conftest.$ac_objext
6907 if { (eval echo "$as_me:6907: \"$ac_compile\"") >&5
6908 (eval $ac_compile) 2>&5
6910 echo "$as_me:6910: \$? = $ac_status" >&5
6911 (exit $ac_status); } &&
6912 { ac_try='test -s conftest.$ac_objext'
6913 { (eval echo "$as_me:6913: \"$ac_try\"") >&5
6916 echo "$as_me:6916: \$? = $ac_status" >&5
6917 (exit $ac_status); }; }; then
6919 cf_cv_term_header="$cf_test"
6921 echo "$as_me: failed program was:" >&5
6922 cat conftest.$ac_ext >&5
6924 cf_cv_term_header=unknown
6927 rm -f conftest.$ac_objext conftest.$ac_ext
6928 test "$cf_cv_term_header" != unknown && break
6932 echo "$as_me:6932: result: $cf_cv_term_header" >&5
6933 echo "${ECHO_T}$cf_cv_term_header" >&6
6935 # Set definitions to allow ifdef'ing to accommodate subdirectories
6937 case $cf_cv_term_header in
6940 cat >>confdefs.h <<\EOF
6941 #define HAVE_TERM_H 1
6947 case $cf_cv_term_header in
6950 cat >>confdefs.h <<\EOF
6951 #define HAVE_NCURSES_TERM_H 1
6957 cat >>confdefs.h <<\EOF
6958 #define HAVE_NCURSESW_TERM_H 1
6964 # some applications need this, but should check for NCURSES_VERSION
6966 cat >>confdefs.h <<\EOF
6970 echo "$as_me:6970: checking for ncurses version" >&5
6971 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6972 if test "${cf_cv_ncurses_version+set}" = set; then
6973 echo $ECHO_N "(cached) $ECHO_C" >&6
6976 cf_cv_ncurses_version=no
6979 if test "$cross_compiling" = yes; then
6981 # This will not work if the preprocessor splits the line after the
6982 # Autoconf token. The 'unproto' program does that.
6983 cat > conftest.$ac_ext <<EOF
6984 #include <${cf_cv_ncurses_header:-curses.h}>
6986 #ifdef NCURSES_VERSION
6987 Autoconf NCURSES_VERSION
6995 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6996 { (eval echo "$as_me:6996: \"$cf_try\"") >&5
6999 echo "$as_me:6999: \$? = $ac_status" >&5
7000 (exit $ac_status); }
7001 if test -f conftest.out ; then
7002 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7003 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7008 cat >conftest.$ac_ext <<_ACEOF
7009 #line 7009 "configure"
7010 #include "confdefs.h"
7012 #include <${cf_cv_ncurses_header:-curses.h}>
7016 FILE *fp = fopen("$cf_tempfile", "w");
7017 #ifdef NCURSES_VERSION
7018 # ifdef NCURSES_VERSION_PATCH
7019 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7021 fprintf(fp, "%s\n", NCURSES_VERSION);
7025 fprintf(fp, "old\n");
7030 ${cf_cv_main_return:-return}(0);
7033 rm -f conftest$ac_exeext
7034 if { (eval echo "$as_me:7034: \"$ac_link\"") >&5
7035 (eval $ac_link) 2>&5
7037 echo "$as_me:7037: \$? = $ac_status" >&5
7038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7039 { (eval echo "$as_me:7039: \"$ac_try\"") >&5
7042 echo "$as_me:7042: \$? = $ac_status" >&5
7043 (exit $ac_status); }; }; then
7045 cf_cv_ncurses_version=`cat $cf_tempfile`
7047 echo "$as_me: program exited with status $ac_status" >&5
7048 echo "$as_me: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7051 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7056 echo "$as_me:7056: result: $cf_cv_ncurses_version" >&5
7057 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7058 test "$cf_cv_ncurses_version" = no ||
7059 cat >>confdefs.h <<\EOF
7063 cf_nculib_root=ncursesw
7064 # This works, except for the special case where we find gpm, but
7065 # ncurses is in a nonstandard location via $LIBS, and we really want
7068 cf_ncurses_SAVE="$LIBS"
7069 echo "$as_me:7069: checking for Gpm_Open in -lgpm" >&5
7070 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7071 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7072 echo $ECHO_N "(cached) $ECHO_C" >&6
7074 ac_check_lib_save_LIBS=$LIBS
7076 cat >conftest.$ac_ext <<_ACEOF
7077 #line 7077 "configure"
7078 #include "confdefs.h"
7080 /* Override any gcc2 internal prototype to avoid an error. */
7084 /* We use char because int might match the return type of a gcc2
7085 builtin and then its argument prototype would still apply. */
7095 rm -f conftest.$ac_objext conftest$ac_exeext
7096 if { (eval echo "$as_me:7096: \"$ac_link\"") >&5
7097 (eval $ac_link) 2>&5
7099 echo "$as_me:7099: \$? = $ac_status" >&5
7100 (exit $ac_status); } &&
7101 { ac_try='test -s conftest$ac_exeext'
7102 { (eval echo "$as_me:7102: \"$ac_try\"") >&5
7105 echo "$as_me:7105: \$? = $ac_status" >&5
7106 (exit $ac_status); }; }; then
7107 ac_cv_lib_gpm_Gpm_Open=yes
7109 echo "$as_me: failed program was:" >&5
7110 cat conftest.$ac_ext >&5
7111 ac_cv_lib_gpm_Gpm_Open=no
7113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7114 LIBS=$ac_check_lib_save_LIBS
7116 echo "$as_me:7116: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7117 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7118 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7119 echo "$as_me:7119: checking for initscr in -lgpm" >&5
7120 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7121 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7122 echo $ECHO_N "(cached) $ECHO_C" >&6
7124 ac_check_lib_save_LIBS=$LIBS
7126 cat >conftest.$ac_ext <<_ACEOF
7127 #line 7127 "configure"
7128 #include "confdefs.h"
7130 /* Override any gcc2 internal prototype to avoid an error. */
7134 /* We use char because int might match the return type of a gcc2
7135 builtin and then its argument prototype would still apply. */
7145 rm -f conftest.$ac_objext conftest$ac_exeext
7146 if { (eval echo "$as_me:7146: \"$ac_link\"") >&5
7147 (eval $ac_link) 2>&5
7149 echo "$as_me:7149: \$? = $ac_status" >&5
7150 (exit $ac_status); } &&
7151 { ac_try='test -s conftest$ac_exeext'
7152 { (eval echo "$as_me:7152: \"$ac_try\"") >&5
7155 echo "$as_me:7155: \$? = $ac_status" >&5
7156 (exit $ac_status); }; }; then
7157 ac_cv_lib_gpm_initscr=yes
7159 echo "$as_me: failed program was:" >&5
7160 cat conftest.$ac_ext >&5
7161 ac_cv_lib_gpm_initscr=no
7163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7164 LIBS=$ac_check_lib_save_LIBS
7166 echo "$as_me:7166: result: $ac_cv_lib_gpm_initscr" >&5
7167 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7168 if test $ac_cv_lib_gpm_initscr = yes; then
7169 LIBS="$cf_ncurses_SAVE"
7171 cf_ncurses_LIBS="-lgpm"
7178 # This is only necessary if you are linking against an obsolete
7179 # version of ncurses (but it should do no harm, since it's static).
7180 if test "$cf_nculib_root" = ncurses ; then
7181 echo "$as_me:7181: checking for tgoto in -lmytinfo" >&5
7182 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7183 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7184 echo $ECHO_N "(cached) $ECHO_C" >&6
7186 ac_check_lib_save_LIBS=$LIBS
7187 LIBS="-lmytinfo $LIBS"
7188 cat >conftest.$ac_ext <<_ACEOF
7189 #line 7189 "configure"
7190 #include "confdefs.h"
7192 /* Override any gcc2 internal prototype to avoid an error. */
7196 /* We use char because int might match the return type of a gcc2
7197 builtin and then its argument prototype would still apply. */
7207 rm -f conftest.$ac_objext conftest$ac_exeext
7208 if { (eval echo "$as_me:7208: \"$ac_link\"") >&5
7209 (eval $ac_link) 2>&5
7211 echo "$as_me:7211: \$? = $ac_status" >&5
7212 (exit $ac_status); } &&
7213 { ac_try='test -s conftest$ac_exeext'
7214 { (eval echo "$as_me:7214: \"$ac_try\"") >&5
7217 echo "$as_me:7217: \$? = $ac_status" >&5
7218 (exit $ac_status); }; }; then
7219 ac_cv_lib_mytinfo_tgoto=yes
7221 echo "$as_me: failed program was:" >&5
7222 cat conftest.$ac_ext >&5
7223 ac_cv_lib_mytinfo_tgoto=no
7225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7226 LIBS=$ac_check_lib_save_LIBS
7228 echo "$as_me:7228: result: $ac_cv_lib_mytinfo_tgoto" >&5
7229 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7230 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7231 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7238 cf_add_libs="$cf_ncurses_LIBS"
7239 # Filter out duplicates - this happens with badly-designed ".pc" files...
7240 for cf_add_1lib in $LIBS
7242 for cf_add_2lib in $cf_add_libs
7244 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7250 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7254 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7257 cf_add_libs="-l$cf_nculib_root"
7258 # Filter out duplicates - this happens with badly-designed ".pc" files...
7259 for cf_add_1lib in $LIBS
7261 for cf_add_2lib in $cf_add_libs
7263 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7269 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7275 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7277 echo "$as_me:7277: checking for initscr" >&5
7278 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7279 if test "${ac_cv_func_initscr+set}" = set; then
7280 echo $ECHO_N "(cached) $ECHO_C" >&6
7282 cat >conftest.$ac_ext <<_ACEOF
7283 #line 7283 "configure"
7284 #include "confdefs.h"
7285 /* System header to define __stub macros and hopefully few prototypes,
7286 which can conflict with char initscr (); below. */
7288 /* Override any gcc2 internal prototype to avoid an error. */
7292 /* We use char because int might match the return type of a gcc2
7293 builtin and then its argument prototype would still apply. */
7300 /* The GNU C library defines this for functions which it implements
7301 to always fail with ENOSYS. Some functions are actually named
7302 something starting with __ and the normal name is an alias. */
7303 #if defined (__stub_initscr) || defined (__stub___initscr)
7306 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7313 rm -f conftest.$ac_objext conftest$ac_exeext
7314 if { (eval echo "$as_me:7314: \"$ac_link\"") >&5
7315 (eval $ac_link) 2>&5
7317 echo "$as_me:7317: \$? = $ac_status" >&5
7318 (exit $ac_status); } &&
7319 { ac_try='test -s conftest$ac_exeext'
7320 { (eval echo "$as_me:7320: \"$ac_try\"") >&5
7323 echo "$as_me:7323: \$? = $ac_status" >&5
7324 (exit $ac_status); }; }; then
7325 ac_cv_func_initscr=yes
7327 echo "$as_me: failed program was:" >&5
7328 cat conftest.$ac_ext >&5
7329 ac_cv_func_initscr=no
7331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7333 echo "$as_me:7333: result: $ac_cv_func_initscr" >&5
7334 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7335 if test $ac_cv_func_initscr = yes; then
7336 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7339 cf_save_LIBS="$LIBS"
7340 echo "$as_me:7340: checking for initscr in -l$cf_nculib_root" >&5
7341 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7342 LIBS="-l$cf_nculib_root $LIBS"
7343 cat >conftest.$ac_ext <<_ACEOF
7344 #line 7344 "configure"
7345 #include "confdefs.h"
7346 #include <${cf_cv_ncurses_header:-curses.h}>
7355 rm -f conftest.$ac_objext conftest$ac_exeext
7356 if { (eval echo "$as_me:7356: \"$ac_link\"") >&5
7357 (eval $ac_link) 2>&5
7359 echo "$as_me:7359: \$? = $ac_status" >&5
7360 (exit $ac_status); } &&
7361 { ac_try='test -s conftest$ac_exeext'
7362 { (eval echo "$as_me:7362: \"$ac_try\"") >&5
7365 echo "$as_me:7365: \$? = $ac_status" >&5
7366 (exit $ac_status); }; }; then
7367 echo "$as_me:7367: result: yes" >&5
7368 echo "${ECHO_T}yes" >&6
7369 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7372 echo "$as_me: failed program was:" >&5
7373 cat conftest.$ac_ext >&5
7374 echo "$as_me:7374: result: no" >&5
7375 echo "${ECHO_T}no" >&6
7378 cf_library_path_list=""
7379 if test -n "${LDFLAGS}${LIBS}" ; then
7380 for cf_library_path in $LDFLAGS $LIBS
7382 case $cf_library_path in
7384 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7386 test "x$cf_library_path" != "xNONE" && \
7387 test -d "$cf_library_path" && \
7389 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7390 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7391 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7392 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7393 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7394 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"
7397 cf_library_path_list="$cf_library_path_list $cf_search"
7405 test "x$prefix" != "xNONE" && \
7406 test -d "$prefix" && \
7408 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7409 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7410 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7411 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7412 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7413 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7416 for cf_subdir_prefix in \
7425 test "x$cf_subdir_prefix" != "x$prefix" && \
7426 test -d "$cf_subdir_prefix" && \
7427 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7428 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7429 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7430 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7431 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7432 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7433 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"
7438 cf_search="$cf_library_path_list $cf_search"
7440 for cf_libdir in $cf_search
7442 echo "$as_me:7442: checking for -l$cf_nculib_root in $cf_libdir" >&5
7443 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7444 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7445 cat >conftest.$ac_ext <<_ACEOF
7446 #line 7446 "configure"
7447 #include "confdefs.h"
7448 #include <${cf_cv_ncurses_header:-curses.h}>
7457 rm -f conftest.$ac_objext conftest$ac_exeext
7458 if { (eval echo "$as_me:7458: \"$ac_link\"") >&5
7459 (eval $ac_link) 2>&5
7461 echo "$as_me:7461: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
7463 { ac_try='test -s conftest$ac_exeext'
7464 { (eval echo "$as_me:7464: \"$ac_try\"") >&5
7467 echo "$as_me:7467: \$? = $ac_status" >&5
7468 (exit $ac_status); }; }; then
7469 echo "$as_me:7469: result: yes" >&5
7470 echo "${ECHO_T}yes" >&6
7471 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7474 echo "$as_me: failed program was:" >&5
7475 cat conftest.$ac_ext >&5
7476 echo "$as_me:7476: result: no" >&5
7477 echo "${ECHO_T}no" >&6
7478 LIBS="$cf_save_LIBS"
7480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7488 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7490 if test $cf_found_library = no ; then
7491 { { echo "$as_me:7491: error: Cannot link $cf_nculib_root library" >&5
7492 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7493 { (exit 1); exit 1; }; }
7498 if test -n "$cf_ncurses_LIBS" ; then
7499 echo "$as_me:7499: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7500 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7501 cf_ncurses_SAVE="$LIBS"
7502 for p in $cf_ncurses_LIBS ; do
7503 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7504 if test "$q" != "$LIBS" ; then
7508 cat >conftest.$ac_ext <<_ACEOF
7509 #line 7509 "configure"
7510 #include "confdefs.h"
7511 #include <${cf_cv_ncurses_header:-curses.h}>
7515 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7520 rm -f conftest.$ac_objext conftest$ac_exeext
7521 if { (eval echo "$as_me:7521: \"$ac_link\"") >&5
7522 (eval $ac_link) 2>&5
7524 echo "$as_me:7524: \$? = $ac_status" >&5
7525 (exit $ac_status); } &&
7526 { ac_try='test -s conftest$ac_exeext'
7527 { (eval echo "$as_me:7527: \"$ac_try\"") >&5
7530 echo "$as_me:7530: \$? = $ac_status" >&5
7531 (exit $ac_status); }; }; then
7532 echo "$as_me:7532: result: yes" >&5
7533 echo "${ECHO_T}yes" >&6
7535 echo "$as_me: failed program was:" >&5
7536 cat conftest.$ac_ext >&5
7537 echo "$as_me:7537: result: no" >&5
7538 echo "${ECHO_T}no" >&6
7539 LIBS="$cf_ncurses_SAVE"
7541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7544 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7546 cat >>confdefs.h <<EOF
7547 #define $cf_nculib_ROOT 1
7557 cf_ncuconfig_root=ncurses
7558 cf_have_ncuconfig=no
7560 if test "x${PKG_CONFIG:=none}" != xnone; then
7561 echo "$as_me:7561: checking pkg-config for $cf_ncuconfig_root" >&5
7562 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7563 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7564 echo "$as_me:7564: result: yes" >&5
7565 echo "${ECHO_T}yes" >&6
7567 echo "$as_me:7567: checking if the $cf_ncuconfig_root package files work" >&5
7568 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7569 cf_have_ncuconfig=unknown
7571 cf_save_CPPFLAGS="$CPPFLAGS"
7572 cf_save_LIBS="$LIBS"
7574 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7576 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7577 # Filter out duplicates - this happens with badly-designed ".pc" files...
7578 for cf_add_1lib in $LIBS
7580 for cf_add_2lib in $cf_add_libs
7582 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7588 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7592 cat >conftest.$ac_ext <<_ACEOF
7593 #line 7593 "configure"
7594 #include "confdefs.h"
7595 #include <${cf_cv_ncurses_header:-curses.h}>
7599 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7604 rm -f conftest.$ac_objext conftest$ac_exeext
7605 if { (eval echo "$as_me:7605: \"$ac_link\"") >&5
7606 (eval $ac_link) 2>&5
7608 echo "$as_me:7608: \$? = $ac_status" >&5
7609 (exit $ac_status); } &&
7610 { ac_try='test -s conftest$ac_exeext'
7611 { (eval echo "$as_me:7611: \"$ac_try\"") >&5
7614 echo "$as_me:7614: \$? = $ac_status" >&5
7615 (exit $ac_status); }; }; then
7616 if test "$cross_compiling" = yes; then
7617 cf_have_ncuconfig=maybe
7619 cat >conftest.$ac_ext <<_ACEOF
7620 #line 7620 "configure"
7621 #include "confdefs.h"
7622 #include <${cf_cv_ncurses_header:-curses.h}>
7624 { char *xx = curses_version(); return (xx == 0); }
7626 rm -f conftest$ac_exeext
7627 if { (eval echo "$as_me:7627: \"$ac_link\"") >&5
7628 (eval $ac_link) 2>&5
7630 echo "$as_me:7630: \$? = $ac_status" >&5
7631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7632 { (eval echo "$as_me:7632: \"$ac_try\"") >&5
7635 echo "$as_me:7635: \$? = $ac_status" >&5
7636 (exit $ac_status); }; }; then
7637 cf_have_ncuconfig=yes
7639 echo "$as_me: program exited with status $ac_status" >&5
7640 echo "$as_me: failed program was:" >&5
7641 cat conftest.$ac_ext >&5
7642 cf_have_ncuconfig=no
7644 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7647 echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 cf_have_ncuconfig=no
7651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7652 echo "$as_me:7652: result: $cf_have_ncuconfig" >&5
7653 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7654 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7655 if test "$cf_have_ncuconfig" != "yes"
7657 CPPFLAGS="$cf_save_CPPFLAGS"
7658 LIBS="$cf_save_LIBS"
7659 NCURSES_CONFIG_PKG=none
7662 cat >>confdefs.h <<\EOF
7666 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7669 echo "$as_me:7669: checking for terminfo header" >&5
7670 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7671 if test "${cf_cv_term_header+set}" = set; then
7672 echo $ECHO_N "(cached) $ECHO_C" >&6
7675 case ${cf_cv_ncurses_header} in
7676 (*/ncurses.h|*/ncursesw.h)
7677 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7680 cf_term_header=term.h
7684 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7686 cat >conftest.$ac_ext <<_ACEOF
7687 #line 7687 "configure"
7688 #include "confdefs.h"
7690 #include <${cf_cv_ncurses_header:-curses.h}>
7696 int x = auto_left_margin
7701 rm -f conftest.$ac_objext
7702 if { (eval echo "$as_me:7702: \"$ac_compile\"") >&5
7703 (eval $ac_compile) 2>&5
7705 echo "$as_me:7705: \$? = $ac_status" >&5
7706 (exit $ac_status); } &&
7707 { ac_try='test -s conftest.$ac_objext'
7708 { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7711 echo "$as_me:7711: \$? = $ac_status" >&5
7712 (exit $ac_status); }; }; then
7714 cf_cv_term_header="$cf_test"
7716 echo "$as_me: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7719 cf_cv_term_header=unknown
7722 rm -f conftest.$ac_objext conftest.$ac_ext
7723 test "$cf_cv_term_header" != unknown && break
7727 echo "$as_me:7727: result: $cf_cv_term_header" >&5
7728 echo "${ECHO_T}$cf_cv_term_header" >&6
7730 # Set definitions to allow ifdef'ing to accommodate subdirectories
7732 case $cf_cv_term_header in
7735 cat >>confdefs.h <<\EOF
7736 #define HAVE_TERM_H 1
7742 case $cf_cv_term_header in
7745 cat >>confdefs.h <<\EOF
7746 #define HAVE_NCURSES_TERM_H 1
7752 cat >>confdefs.h <<\EOF
7753 #define HAVE_NCURSESW_TERM_H 1
7760 echo "$as_me:7760: result: no" >&5
7761 echo "${ECHO_T}no" >&6
7762 NCURSES_CONFIG_PKG=none
7765 NCURSES_CONFIG_PKG=none
7768 if test "x$cf_have_ncuconfig" = "xno"; then
7769 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7771 if test -n "$ac_tool_prefix"; then
7772 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7774 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7775 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7776 echo "$as_me:7776: checking for $ac_word" >&5
7777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7778 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7779 echo $ECHO_N "(cached) $ECHO_C" >&6
7781 if test -n "$NCURSES_CONFIG"; then
7782 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7784 ac_save_IFS=$IFS; IFS=$ac_path_separator
7786 for ac_dir in $ac_dummy; do
7788 test -z "$ac_dir" && ac_dir=.
7789 $as_executable_p "$ac_dir/$ac_word" || continue
7790 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7791 echo "$as_me:7791: found $ac_dir/$ac_word" >&5
7797 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7798 if test -n "$NCURSES_CONFIG"; then
7799 echo "$as_me:7799: result: $NCURSES_CONFIG" >&5
7800 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7802 echo "$as_me:7802: result: no" >&5
7803 echo "${ECHO_T}no" >&6
7806 test -n "$NCURSES_CONFIG" && break
7809 if test -z "$NCURSES_CONFIG"; then
7810 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7811 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7813 # Extract the first word of "$ac_prog", so it can be a program name with args.
7814 set dummy $ac_prog; ac_word=$2
7815 echo "$as_me:7815: checking for $ac_word" >&5
7816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7817 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7818 echo $ECHO_N "(cached) $ECHO_C" >&6
7820 if test -n "$ac_ct_NCURSES_CONFIG"; then
7821 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7823 ac_save_IFS=$IFS; IFS=$ac_path_separator
7825 for ac_dir in $ac_dummy; do
7827 test -z "$ac_dir" && ac_dir=.
7828 $as_executable_p "$ac_dir/$ac_word" || continue
7829 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7830 echo "$as_me:7830: found $ac_dir/$ac_word" >&5
7836 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7837 if test -n "$ac_ct_NCURSES_CONFIG"; then
7838 echo "$as_me:7838: result: $ac_ct_NCURSES_CONFIG" >&5
7839 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7841 echo "$as_me:7841: result: no" >&5
7842 echo "${ECHO_T}no" >&6
7845 test -n "$ac_ct_NCURSES_CONFIG" && break
7847 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7849 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7852 if test "$NCURSES_CONFIG" != none ; then
7854 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7856 cf_add_libs="`$NCURSES_CONFIG --libs`"
7857 # Filter out duplicates - this happens with badly-designed ".pc" files...
7858 for cf_add_1lib in $LIBS
7860 for cf_add_2lib in $cf_add_libs
7862 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7868 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7872 # even with config script, some packages use no-override for curses.h
7874 echo "$as_me:7874: checking if we have identified curses headers" >&5
7875 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7876 if test "${cf_cv_ncurses_header+set}" = set; then
7877 echo $ECHO_N "(cached) $ECHO_C" >&6
7880 cf_cv_ncurses_header=none
7882 ncurses.h ncurses/ncurses.h \
7883 curses.h ncurses/curses.h
7885 cat >conftest.$ac_ext <<_ACEOF
7886 #line 7886 "configure"
7887 #include "confdefs.h"
7888 #include <${cf_header}>
7892 initscr(); tgoto("?", 0,0)
7897 rm -f conftest.$ac_objext
7898 if { (eval echo "$as_me:7898: \"$ac_compile\"") >&5
7899 (eval $ac_compile) 2>&5
7901 echo "$as_me:7901: \$? = $ac_status" >&5
7902 (exit $ac_status); } &&
7903 { ac_try='test -s conftest.$ac_objext'
7904 { (eval echo "$as_me:7904: \"$ac_try\"") >&5
7907 echo "$as_me:7907: \$? = $ac_status" >&5
7908 (exit $ac_status); }; }; then
7909 cf_cv_ncurses_header=$cf_header; break
7911 echo "$as_me: failed program was:" >&5
7912 cat conftest.$ac_ext >&5
7914 rm -f conftest.$ac_objext conftest.$ac_ext
7918 echo "$as_me:7918: result: $cf_cv_ncurses_header" >&5
7919 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7921 if test "$cf_cv_ncurses_header" = none ; then
7922 { { echo "$as_me:7922: error: No curses header-files found" >&5
7923 echo "$as_me: error: No curses header-files found" >&2;}
7924 { (exit 1); exit 1; }; }
7927 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7929 for ac_header in $cf_cv_ncurses_header
7931 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7932 echo "$as_me:7932: checking for $ac_header" >&5
7933 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7934 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7935 echo $ECHO_N "(cached) $ECHO_C" >&6
7937 cat >conftest.$ac_ext <<_ACEOF
7938 #line 7938 "configure"
7939 #include "confdefs.h"
7940 #include <$ac_header>
7942 if { (eval echo "$as_me:7942: \"$ac_cpp conftest.$ac_ext\"") >&5
7943 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7945 egrep -v '^ *\+' conftest.er1 >conftest.err
7947 cat conftest.err >&5
7948 echo "$as_me:7948: \$? = $ac_status" >&5
7949 (exit $ac_status); } >/dev/null; then
7950 if test -s conftest.err; then
7951 ac_cpp_err=$ac_c_preproc_warn_flag
7958 if test -z "$ac_cpp_err"; then
7959 eval "$as_ac_Header=yes"
7961 echo "$as_me: failed program was:" >&5
7962 cat conftest.$ac_ext >&5
7963 eval "$as_ac_Header=no"
7965 rm -f conftest.err conftest.$ac_ext
7967 echo "$as_me:7967: result: `eval echo '${'$as_ac_Header'}'`" >&5
7968 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7969 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7970 cat >>confdefs.h <<EOF
7971 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7977 cat >>confdefs.h <<\EOF
7981 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7983 cat >>confdefs.h <<EOF
7984 #define $cf_nculib_ROOT 1
7987 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7991 cf_ncuhdr_root=ncurses
7993 test -n "$cf_cv_curses_dir" && \
7994 test "$cf_cv_curses_dir" != "no" && { \
7996 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7997 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7999 while test $cf_add_incdir != /usr/include
8001 if test -d $cf_add_incdir
8004 if test -n "$CFLAGS$CPPFLAGS" ; then
8005 # a loop is needed to ensure we can add subdirs of existing dirs
8006 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8007 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8008 cf_have_incdir=yes; break
8013 if test "$cf_have_incdir" = no ; then
8014 if test "$cf_add_incdir" = /usr/local/include ; then
8015 if test "$GCC" = yes
8017 cf_save_CPPFLAGS=$CPPFLAGS
8018 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8019 cat >conftest.$ac_ext <<_ACEOF
8020 #line 8020 "configure"
8021 #include "confdefs.h"
8031 rm -f conftest.$ac_objext
8032 if { (eval echo "$as_me:8032: \"$ac_compile\"") >&5
8033 (eval $ac_compile) 2>&5
8035 echo "$as_me:8035: \$? = $ac_status" >&5
8036 (exit $ac_status); } &&
8037 { ac_try='test -s conftest.$ac_objext'
8038 { (eval echo "$as_me:8038: \"$ac_try\"") >&5
8041 echo "$as_me:8041: \$? = $ac_status" >&5
8042 (exit $ac_status); }; }; then
8045 echo "$as_me: failed program was:" >&5
8046 cat conftest.$ac_ext >&5
8049 rm -f conftest.$ac_objext conftest.$ac_ext
8050 CPPFLAGS=$cf_save_CPPFLAGS
8055 if test "$cf_have_incdir" = no ; then
8056 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8058 echo "${as_me:-configure}:8058: testing adding $cf_add_incdir to include-path ..." 1>&5
8060 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8062 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8063 test "$cf_top_incdir" = "$cf_add_incdir" && break
8064 cf_add_incdir="$cf_top_incdir"
8077 echo "$as_me:8077: checking for $cf_ncuhdr_root header in include-path" >&5
8078 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8079 if test "${cf_cv_ncurses_h+set}" = set; then
8080 echo $ECHO_N "(cached) $ECHO_C" >&6
8083 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8084 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8085 for cf_header in $cf_header_list
8088 cat >conftest.$ac_ext <<_ACEOF
8089 #line 8089 "configure"
8090 #include "confdefs.h"
8092 #include <$cf_header>
8097 #ifdef NCURSES_VERSION
8099 printf("%s\n", NCURSES_VERSION);
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5
8114 (eval $ac_compile) 2>&5
8116 echo "$as_me:8116: \$? = $ac_status" >&5
8117 (exit $ac_status); } &&
8118 { ac_try='test -s conftest.$ac_objext'
8119 { (eval echo "$as_me:8119: \"$ac_try\"") >&5
8122 echo "$as_me:8122: \$? = $ac_status" >&5
8123 (exit $ac_status); }; }; then
8124 cf_cv_ncurses_h=$cf_header
8127 echo "$as_me: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8131 rm -f conftest.$ac_objext conftest.$ac_ext
8133 test "$cf_cv_ncurses_h" != no && break
8137 echo "$as_me:8137: result: $cf_cv_ncurses_h" >&5
8138 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8140 if test "$cf_cv_ncurses_h" != no ; then
8141 cf_cv_ncurses_header=$cf_cv_ncurses_h
8144 echo "$as_me:8144: checking for $cf_ncuhdr_root include-path" >&5
8145 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8146 if test "${cf_cv_ncurses_h2+set}" = set; then
8147 echo $ECHO_N "(cached) $ECHO_C" >&6
8150 test -n "$verbose" && echo
8154 # collect the current set of include-directories from compiler flags
8155 cf_header_path_list=""
8156 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8157 for cf_header_path in $CPPFLAGS $CFLAGS
8159 case $cf_header_path in
8161 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8163 test "x$cf_header_path" != "xNONE" && \
8164 test -d "$cf_header_path" && \
8166 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8167 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8168 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8169 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8170 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8171 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"
8174 cf_header_path_list="$cf_header_path_list $cf_search"
8180 # add the variations for the package we are looking for
8184 test "x$prefix" != "xNONE" && \
8185 test -d "$prefix" && \
8187 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8188 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8189 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8190 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8191 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8192 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8195 for cf_subdir_prefix in \
8204 test "x$cf_subdir_prefix" != "x$prefix" && \
8205 test -d "$cf_subdir_prefix" && \
8206 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8207 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8208 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8209 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8210 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8211 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8212 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"
8217 test "$includedir" != NONE && \
8218 test "$includedir" != "/usr/include" && \
8219 test -d "$includedir" && {
8220 test -d $includedir && cf_search="$cf_search $includedir"
8221 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8224 test "$oldincludedir" != NONE && \
8225 test "$oldincludedir" != "/usr/include" && \
8226 test -d "$oldincludedir" && {
8227 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8228 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8231 cf_search="$cf_search $cf_header_path_list"
8233 test -n "$verbose" && echo search path $cf_search
8234 cf_save2_CPPFLAGS="$CPPFLAGS"
8235 for cf_incdir in $cf_search
8238 if test -n "$cf_incdir" ; then
8239 for cf_add_incdir in $cf_incdir
8241 while test $cf_add_incdir != /usr/include
8243 if test -d $cf_add_incdir
8246 if test -n "$CFLAGS$CPPFLAGS" ; then
8247 # a loop is needed to ensure we can add subdirs of existing dirs
8248 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8249 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8250 cf_have_incdir=yes; break
8255 if test "$cf_have_incdir" = no ; then
8256 if test "$cf_add_incdir" = /usr/local/include ; then
8257 if test "$GCC" = yes
8259 cf_save_CPPFLAGS=$CPPFLAGS
8260 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8261 cat >conftest.$ac_ext <<_ACEOF
8262 #line 8262 "configure"
8263 #include "confdefs.h"
8273 rm -f conftest.$ac_objext
8274 if { (eval echo "$as_me:8274: \"$ac_compile\"") >&5
8275 (eval $ac_compile) 2>&5
8277 echo "$as_me:8277: \$? = $ac_status" >&5
8278 (exit $ac_status); } &&
8279 { ac_try='test -s conftest.$ac_objext'
8280 { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8283 echo "$as_me:8283: \$? = $ac_status" >&5
8284 (exit $ac_status); }; }; then
8287 echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8291 rm -f conftest.$ac_objext conftest.$ac_ext
8292 CPPFLAGS=$cf_save_CPPFLAGS
8297 if test "$cf_have_incdir" = no ; then
8298 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8300 echo "${as_me:-configure}:8300: testing adding $cf_add_incdir to include-path ..." 1>&5
8302 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8304 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8305 test "$cf_top_incdir" = "$cf_add_incdir" && break
8306 cf_add_incdir="$cf_top_incdir"
8322 cat >conftest.$ac_ext <<_ACEOF
8323 #line 8323 "configure"
8324 #include "confdefs.h"
8326 #include <$cf_header>
8331 #ifdef NCURSES_VERSION
8333 printf("%s\n", NCURSES_VERSION);
8346 rm -f conftest.$ac_objext
8347 if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348 (eval $ac_compile) 2>&5
8350 echo "$as_me:8350: \$? = $ac_status" >&5
8351 (exit $ac_status); } &&
8352 { ac_try='test -s conftest.$ac_objext'
8353 { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8356 echo "$as_me:8356: \$? = $ac_status" >&5
8357 (exit $ac_status); }; }; then
8358 cf_cv_ncurses_h2=$cf_header
8361 echo "$as_me: failed program was:" >&5
8362 cat conftest.$ac_ext >&5
8365 rm -f conftest.$ac_objext conftest.$ac_ext
8367 if test "$cf_cv_ncurses_h2" != no ; then
8368 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8369 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8372 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8374 CPPFLAGS="$cf_save2_CPPFLAGS"
8375 test "$cf_cv_ncurses_h2" != no && break
8377 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8377: error: not found" >&5
8378 echo "$as_me: error: not found" >&2;}
8379 { (exit 1); exit 1; }; }
8382 echo "$as_me:8382: result: $cf_cv_ncurses_h2" >&5
8383 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8385 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8386 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8387 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8388 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8391 if test -n "$cf_1st_incdir" ; then
8392 for cf_add_incdir in $cf_1st_incdir
8394 while test $cf_add_incdir != /usr/include
8396 if test -d $cf_add_incdir
8399 if test -n "$CFLAGS$CPPFLAGS" ; then
8400 # a loop is needed to ensure we can add subdirs of existing dirs
8401 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8402 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8403 cf_have_incdir=yes; break
8408 if test "$cf_have_incdir" = no ; then
8409 if test "$cf_add_incdir" = /usr/local/include ; then
8410 if test "$GCC" = yes
8412 cf_save_CPPFLAGS=$CPPFLAGS
8413 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8414 cat >conftest.$ac_ext <<_ACEOF
8415 #line 8415 "configure"
8416 #include "confdefs.h"
8426 rm -f conftest.$ac_objext
8427 if { (eval echo "$as_me:8427: \"$ac_compile\"") >&5
8428 (eval $ac_compile) 2>&5
8430 echo "$as_me:8430: \$? = $ac_status" >&5
8431 (exit $ac_status); } &&
8432 { ac_try='test -s conftest.$ac_objext'
8433 { (eval echo "$as_me:8433: \"$ac_try\"") >&5
8436 echo "$as_me:8436: \$? = $ac_status" >&5
8437 (exit $ac_status); }; }; then
8440 echo "$as_me: failed program was:" >&5
8441 cat conftest.$ac_ext >&5
8444 rm -f conftest.$ac_objext conftest.$ac_ext
8445 CPPFLAGS=$cf_save_CPPFLAGS
8450 if test "$cf_have_incdir" = no ; then
8451 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8453 echo "${as_me:-configure}:8453: testing adding $cf_add_incdir to include-path ..." 1>&5
8455 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8457 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8458 test "$cf_top_incdir" = "$cf_add_incdir" && break
8459 cf_add_incdir="$cf_top_incdir"
8472 # Set definitions to allow ifdef'ing for ncurses.h
8474 case $cf_cv_ncurses_header in
8477 cat >>confdefs.h <<\EOF
8478 #define HAVE_NCURSES_H 1
8484 case $cf_cv_ncurses_header in
8485 (ncurses/curses.h|ncurses/ncurses.h)
8487 cat >>confdefs.h <<\EOF
8488 #define HAVE_NCURSES_NCURSES_H 1
8492 (ncursesw/curses.h|ncursesw/ncurses.h)
8494 cat >>confdefs.h <<\EOF
8495 #define HAVE_NCURSESW_NCURSES_H 1
8501 echo "$as_me:8501: checking for terminfo header" >&5
8502 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8503 if test "${cf_cv_term_header+set}" = set; then
8504 echo $ECHO_N "(cached) $ECHO_C" >&6
8507 case ${cf_cv_ncurses_header} in
8508 (*/ncurses.h|*/ncursesw.h)
8509 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8512 cf_term_header=term.h
8516 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8518 cat >conftest.$ac_ext <<_ACEOF
8519 #line 8519 "configure"
8520 #include "confdefs.h"
8522 #include <${cf_cv_ncurses_header:-curses.h}>
8528 int x = auto_left_margin
8533 rm -f conftest.$ac_objext
8534 if { (eval echo "$as_me:8534: \"$ac_compile\"") >&5
8535 (eval $ac_compile) 2>&5
8537 echo "$as_me:8537: \$? = $ac_status" >&5
8538 (exit $ac_status); } &&
8539 { ac_try='test -s conftest.$ac_objext'
8540 { (eval echo "$as_me:8540: \"$ac_try\"") >&5
8543 echo "$as_me:8543: \$? = $ac_status" >&5
8544 (exit $ac_status); }; }; then
8546 cf_cv_term_header="$cf_test"
8548 echo "$as_me: failed program was:" >&5
8549 cat conftest.$ac_ext >&5
8551 cf_cv_term_header=unknown
8554 rm -f conftest.$ac_objext conftest.$ac_ext
8555 test "$cf_cv_term_header" != unknown && break
8559 echo "$as_me:8559: result: $cf_cv_term_header" >&5
8560 echo "${ECHO_T}$cf_cv_term_header" >&6
8562 # Set definitions to allow ifdef'ing to accommodate subdirectories
8564 case $cf_cv_term_header in
8567 cat >>confdefs.h <<\EOF
8568 #define HAVE_TERM_H 1
8574 case $cf_cv_term_header in
8577 cat >>confdefs.h <<\EOF
8578 #define HAVE_NCURSES_TERM_H 1
8584 cat >>confdefs.h <<\EOF
8585 #define HAVE_NCURSESW_TERM_H 1
8591 # some applications need this, but should check for NCURSES_VERSION
8593 cat >>confdefs.h <<\EOF
8597 echo "$as_me:8597: checking for ncurses version" >&5
8598 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8599 if test "${cf_cv_ncurses_version+set}" = set; then
8600 echo $ECHO_N "(cached) $ECHO_C" >&6
8603 cf_cv_ncurses_version=no
8606 if test "$cross_compiling" = yes; then
8608 # This will not work if the preprocessor splits the line after the
8609 # Autoconf token. The 'unproto' program does that.
8610 cat > conftest.$ac_ext <<EOF
8611 #include <${cf_cv_ncurses_header:-curses.h}>
8613 #ifdef NCURSES_VERSION
8614 Autoconf NCURSES_VERSION
8622 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8623 { (eval echo "$as_me:8623: \"$cf_try\"") >&5
8626 echo "$as_me:8626: \$? = $ac_status" >&5
8627 (exit $ac_status); }
8628 if test -f conftest.out ; then
8629 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8630 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8635 cat >conftest.$ac_ext <<_ACEOF
8636 #line 8636 "configure"
8637 #include "confdefs.h"
8639 #include <${cf_cv_ncurses_header:-curses.h}>
8643 FILE *fp = fopen("$cf_tempfile", "w");
8644 #ifdef NCURSES_VERSION
8645 # ifdef NCURSES_VERSION_PATCH
8646 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8648 fprintf(fp, "%s\n", NCURSES_VERSION);
8652 fprintf(fp, "old\n");
8657 ${cf_cv_main_return:-return}(0);
8660 rm -f conftest$ac_exeext
8661 if { (eval echo "$as_me:8661: \"$ac_link\"") >&5
8662 (eval $ac_link) 2>&5
8664 echo "$as_me:8664: \$? = $ac_status" >&5
8665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8666 { (eval echo "$as_me:8666: \"$ac_try\"") >&5
8669 echo "$as_me:8669: \$? = $ac_status" >&5
8670 (exit $ac_status); }; }; then
8672 cf_cv_ncurses_version=`cat $cf_tempfile`
8674 echo "$as_me: program exited with status $ac_status" >&5
8675 echo "$as_me: failed program was:" >&5
8676 cat conftest.$ac_ext >&5
8678 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8683 echo "$as_me:8683: result: $cf_cv_ncurses_version" >&5
8684 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8685 test "$cf_cv_ncurses_version" = no ||
8686 cat >>confdefs.h <<\EOF
8690 cf_nculib_root=ncurses
8691 # This works, except for the special case where we find gpm, but
8692 # ncurses is in a nonstandard location via $LIBS, and we really want
8695 cf_ncurses_SAVE="$LIBS"
8696 echo "$as_me:8696: checking for Gpm_Open in -lgpm" >&5
8697 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8698 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8699 echo $ECHO_N "(cached) $ECHO_C" >&6
8701 ac_check_lib_save_LIBS=$LIBS
8703 cat >conftest.$ac_ext <<_ACEOF
8704 #line 8704 "configure"
8705 #include "confdefs.h"
8707 /* Override any gcc2 internal prototype to avoid an error. */
8711 /* We use char because int might match the return type of a gcc2
8712 builtin and then its argument prototype would still apply. */
8722 rm -f conftest.$ac_objext conftest$ac_exeext
8723 if { (eval echo "$as_me:8723: \"$ac_link\"") >&5
8724 (eval $ac_link) 2>&5
8726 echo "$as_me:8726: \$? = $ac_status" >&5
8727 (exit $ac_status); } &&
8728 { ac_try='test -s conftest$ac_exeext'
8729 { (eval echo "$as_me:8729: \"$ac_try\"") >&5
8732 echo "$as_me:8732: \$? = $ac_status" >&5
8733 (exit $ac_status); }; }; then
8734 ac_cv_lib_gpm_Gpm_Open=yes
8736 echo "$as_me: failed program was:" >&5
8737 cat conftest.$ac_ext >&5
8738 ac_cv_lib_gpm_Gpm_Open=no
8740 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8741 LIBS=$ac_check_lib_save_LIBS
8743 echo "$as_me:8743: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8744 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8745 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8746 echo "$as_me:8746: checking for initscr in -lgpm" >&5
8747 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8748 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8749 echo $ECHO_N "(cached) $ECHO_C" >&6
8751 ac_check_lib_save_LIBS=$LIBS
8753 cat >conftest.$ac_ext <<_ACEOF
8754 #line 8754 "configure"
8755 #include "confdefs.h"
8757 /* Override any gcc2 internal prototype to avoid an error. */
8761 /* We use char because int might match the return type of a gcc2
8762 builtin and then its argument prototype would still apply. */
8772 rm -f conftest.$ac_objext conftest$ac_exeext
8773 if { (eval echo "$as_me:8773: \"$ac_link\"") >&5
8774 (eval $ac_link) 2>&5
8776 echo "$as_me:8776: \$? = $ac_status" >&5
8777 (exit $ac_status); } &&
8778 { ac_try='test -s conftest$ac_exeext'
8779 { (eval echo "$as_me:8779: \"$ac_try\"") >&5
8782 echo "$as_me:8782: \$? = $ac_status" >&5
8783 (exit $ac_status); }; }; then
8784 ac_cv_lib_gpm_initscr=yes
8786 echo "$as_me: failed program was:" >&5
8787 cat conftest.$ac_ext >&5
8788 ac_cv_lib_gpm_initscr=no
8790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8791 LIBS=$ac_check_lib_save_LIBS
8793 echo "$as_me:8793: result: $ac_cv_lib_gpm_initscr" >&5
8794 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8795 if test $ac_cv_lib_gpm_initscr = yes; then
8796 LIBS="$cf_ncurses_SAVE"
8798 cf_ncurses_LIBS="-lgpm"
8805 # This is only necessary if you are linking against an obsolete
8806 # version of ncurses (but it should do no harm, since it's static).
8807 if test "$cf_nculib_root" = ncurses ; then
8808 echo "$as_me:8808: checking for tgoto in -lmytinfo" >&5
8809 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8810 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8811 echo $ECHO_N "(cached) $ECHO_C" >&6
8813 ac_check_lib_save_LIBS=$LIBS
8814 LIBS="-lmytinfo $LIBS"
8815 cat >conftest.$ac_ext <<_ACEOF
8816 #line 8816 "configure"
8817 #include "confdefs.h"
8819 /* Override any gcc2 internal prototype to avoid an error. */
8823 /* We use char because int might match the return type of a gcc2
8824 builtin and then its argument prototype would still apply. */
8834 rm -f conftest.$ac_objext conftest$ac_exeext
8835 if { (eval echo "$as_me:8835: \"$ac_link\"") >&5
8836 (eval $ac_link) 2>&5
8838 echo "$as_me:8838: \$? = $ac_status" >&5
8839 (exit $ac_status); } &&
8840 { ac_try='test -s conftest$ac_exeext'
8841 { (eval echo "$as_me:8841: \"$ac_try\"") >&5
8844 echo "$as_me:8844: \$? = $ac_status" >&5
8845 (exit $ac_status); }; }; then
8846 ac_cv_lib_mytinfo_tgoto=yes
8848 echo "$as_me: failed program was:" >&5
8849 cat conftest.$ac_ext >&5
8850 ac_cv_lib_mytinfo_tgoto=no
8852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8853 LIBS=$ac_check_lib_save_LIBS
8855 echo "$as_me:8855: result: $ac_cv_lib_mytinfo_tgoto" >&5
8856 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8857 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8858 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8865 cf_add_libs="$cf_ncurses_LIBS"
8866 # Filter out duplicates - this happens with badly-designed ".pc" files...
8867 for cf_add_1lib in $LIBS
8869 for cf_add_2lib in $cf_add_libs
8871 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8877 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8881 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8884 cf_add_libs="-l$cf_nculib_root"
8885 # Filter out duplicates - this happens with badly-designed ".pc" files...
8886 for cf_add_1lib in $LIBS
8888 for cf_add_2lib in $cf_add_libs
8890 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8896 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8902 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8904 echo "$as_me:8904: checking for initscr" >&5
8905 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8906 if test "${ac_cv_func_initscr+set}" = set; then
8907 echo $ECHO_N "(cached) $ECHO_C" >&6
8909 cat >conftest.$ac_ext <<_ACEOF
8910 #line 8910 "configure"
8911 #include "confdefs.h"
8912 /* System header to define __stub macros and hopefully few prototypes,
8913 which can conflict with char initscr (); below. */
8915 /* Override any gcc2 internal prototype to avoid an error. */
8919 /* We use char because int might match the return type of a gcc2
8920 builtin and then its argument prototype would still apply. */
8927 /* The GNU C library defines this for functions which it implements
8928 to always fail with ENOSYS. Some functions are actually named
8929 something starting with __ and the normal name is an alias. */
8930 #if defined (__stub_initscr) || defined (__stub___initscr)
8933 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8940 rm -f conftest.$ac_objext conftest$ac_exeext
8941 if { (eval echo "$as_me:8941: \"$ac_link\"") >&5
8942 (eval $ac_link) 2>&5
8944 echo "$as_me:8944: \$? = $ac_status" >&5
8945 (exit $ac_status); } &&
8946 { ac_try='test -s conftest$ac_exeext'
8947 { (eval echo "$as_me:8947: \"$ac_try\"") >&5
8950 echo "$as_me:8950: \$? = $ac_status" >&5
8951 (exit $ac_status); }; }; then
8952 ac_cv_func_initscr=yes
8954 echo "$as_me: failed program was:" >&5
8955 cat conftest.$ac_ext >&5
8956 ac_cv_func_initscr=no
8958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8960 echo "$as_me:8960: result: $ac_cv_func_initscr" >&5
8961 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8962 if test $ac_cv_func_initscr = yes; then
8963 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8966 cf_save_LIBS="$LIBS"
8967 echo "$as_me:8967: checking for initscr in -l$cf_nculib_root" >&5
8968 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8969 LIBS="-l$cf_nculib_root $LIBS"
8970 cat >conftest.$ac_ext <<_ACEOF
8971 #line 8971 "configure"
8972 #include "confdefs.h"
8973 #include <${cf_cv_ncurses_header:-curses.h}>
8982 rm -f conftest.$ac_objext conftest$ac_exeext
8983 if { (eval echo "$as_me:8983: \"$ac_link\"") >&5
8984 (eval $ac_link) 2>&5
8986 echo "$as_me:8986: \$? = $ac_status" >&5
8987 (exit $ac_status); } &&
8988 { ac_try='test -s conftest$ac_exeext'
8989 { (eval echo "$as_me:8989: \"$ac_try\"") >&5
8992 echo "$as_me:8992: \$? = $ac_status" >&5
8993 (exit $ac_status); }; }; then
8994 echo "$as_me:8994: result: yes" >&5
8995 echo "${ECHO_T}yes" >&6
8996 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8999 echo "$as_me: failed program was:" >&5
9000 cat conftest.$ac_ext >&5
9001 echo "$as_me:9001: result: no" >&5
9002 echo "${ECHO_T}no" >&6
9005 cf_library_path_list=""
9006 if test -n "${LDFLAGS}${LIBS}" ; then
9007 for cf_library_path in $LDFLAGS $LIBS
9009 case $cf_library_path in
9011 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9013 test "x$cf_library_path" != "xNONE" && \
9014 test -d "$cf_library_path" && \
9016 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9017 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9018 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9019 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9020 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9021 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"
9024 cf_library_path_list="$cf_library_path_list $cf_search"
9032 test "x$prefix" != "xNONE" && \
9033 test -d "$prefix" && \
9035 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9036 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9037 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9038 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9039 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9040 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9043 for cf_subdir_prefix in \
9052 test "x$cf_subdir_prefix" != "x$prefix" && \
9053 test -d "$cf_subdir_prefix" && \
9054 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9055 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9056 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9057 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9058 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9059 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9060 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"
9065 cf_search="$cf_library_path_list $cf_search"
9067 for cf_libdir in $cf_search
9069 echo "$as_me:9069: checking for -l$cf_nculib_root in $cf_libdir" >&5
9070 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9071 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9072 cat >conftest.$ac_ext <<_ACEOF
9073 #line 9073 "configure"
9074 #include "confdefs.h"
9075 #include <${cf_cv_ncurses_header:-curses.h}>
9084 rm -f conftest.$ac_objext conftest$ac_exeext
9085 if { (eval echo "$as_me:9085: \"$ac_link\"") >&5
9086 (eval $ac_link) 2>&5
9088 echo "$as_me:9088: \$? = $ac_status" >&5
9089 (exit $ac_status); } &&
9090 { ac_try='test -s conftest$ac_exeext'
9091 { (eval echo "$as_me:9091: \"$ac_try\"") >&5
9094 echo "$as_me:9094: \$? = $ac_status" >&5
9095 (exit $ac_status); }; }; then
9096 echo "$as_me:9096: result: yes" >&5
9097 echo "${ECHO_T}yes" >&6
9098 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9101 echo "$as_me: failed program was:" >&5
9102 cat conftest.$ac_ext >&5
9103 echo "$as_me:9103: result: no" >&5
9104 echo "${ECHO_T}no" >&6
9105 LIBS="$cf_save_LIBS"
9107 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9115 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9117 if test $cf_found_library = no ; then
9118 { { echo "$as_me:9118: error: Cannot link $cf_nculib_root library" >&5
9119 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9120 { (exit 1); exit 1; }; }
9125 if test -n "$cf_ncurses_LIBS" ; then
9126 echo "$as_me:9126: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9127 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9128 cf_ncurses_SAVE="$LIBS"
9129 for p in $cf_ncurses_LIBS ; do
9130 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9131 if test "$q" != "$LIBS" ; then
9135 cat >conftest.$ac_ext <<_ACEOF
9136 #line 9136 "configure"
9137 #include "confdefs.h"
9138 #include <${cf_cv_ncurses_header:-curses.h}>
9142 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9147 rm -f conftest.$ac_objext conftest$ac_exeext
9148 if { (eval echo "$as_me:9148: \"$ac_link\"") >&5
9149 (eval $ac_link) 2>&5
9151 echo "$as_me:9151: \$? = $ac_status" >&5
9152 (exit $ac_status); } &&
9153 { ac_try='test -s conftest$ac_exeext'
9154 { (eval echo "$as_me:9154: \"$ac_try\"") >&5
9157 echo "$as_me:9157: \$? = $ac_status" >&5
9158 (exit $ac_status); }; }; then
9159 echo "$as_me:9159: result: yes" >&5
9160 echo "${ECHO_T}yes" >&6
9162 echo "$as_me: failed program was:" >&5
9163 cat conftest.$ac_ext >&5
9164 echo "$as_me:9164: result: no" >&5
9165 echo "${ECHO_T}no" >&6
9166 LIBS="$cf_ncurses_SAVE"
9168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9171 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9173 cat >>confdefs.h <<EOF
9174 #define $cf_nculib_ROOT 1
9184 if test "$NCURSES_CONFIG_PKG" != none ; then
9185 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
9187 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9188 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9189 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9191 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
9192 if test -z "$cf_cv_abi_version"
9194 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
9197 elif test "$NCURSES_CONFIG" != none ; then
9199 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
9201 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9202 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9203 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9205 # ABI version is not available from headers
9206 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
9210 for cf_name in MAJOR MINOR PATCH
9212 cat >conftest.$ac_ext <<CF_EOF
9213 #include <${cf_cv_ncurses_header:-curses.h}>
9214 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
9216 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
9217 { (eval echo "$as_me:9217: \"$cf_try\"") >&5
9220 echo "$as_me:9220: \$? = $ac_status" >&5
9221 (exit $ac_status); }
9222 if test -f conftest.out ; then
9223 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
9224 eval NCURSES_$cf_name=\"$cf_result\"
9225 # cat conftest.$ac_ext
9230 cf_cv_abi_version=${NCURSES_MAJOR}
9234 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
9236 cf_cv_timestamp=`date`
9238 echo "$as_me:9238: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
9239 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
9241 echo "$as_me:9241: checking if you want to have a library-prefix" >&5
9242 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
9244 # Check whether --with-lib-prefix or --without-lib-prefix was given.
9245 if test "${with_lib_prefix+set}" = set; then
9246 withval="$with_lib_prefix"
9247 with_lib_prefix=$withval
9249 with_lib_prefix=auto
9251 echo "$as_me:9251: result: $with_lib_prefix" >&5
9252 echo "${ECHO_T}$with_lib_prefix" >&6
9254 if test $with_lib_prefix = auto
9257 case $cf_cv_system_name in
9259 if test "$DFT_LWR_MODEL" = libtool; then
9265 (*) LIB_PREFIX='lib'
9268 cf_prefix=$LIB_PREFIX
9270 elif test $with_lib_prefix = no
9274 LIB_PREFIX=$with_lib_prefix
9279 ###############################################################################
9281 if test X"$CC_G_OPT" = X"" ; then
9283 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
9286 echo "$as_me:9286: checking for default loader flags" >&5
9287 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
9288 case $DFT_LWR_MODEL in
9289 (normal) LD_MODEL='' ;;
9290 (debug) LD_MODEL=$CC_G_OPT ;;
9291 (profile) LD_MODEL='-pg';;
9292 (shared) LD_MODEL='' ;;
9294 echo "$as_me:9294: result: $LD_MODEL" >&5
9295 echo "${ECHO_T}$LD_MODEL" >&6
9298 echo "$as_me:9298: checking for an rpath option" >&5
9299 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
9300 case $cf_cv_system_name in
9302 if test "$GCC" = yes; then
9303 LD_RPATH_OPT="-Wl,-rpath,"
9305 LD_RPATH_OPT="-rpath "
9308 (linux*|gnu*|k*bsd*-gnu|freebsd*)
9309 LD_RPATH_OPT="-Wl,-rpath,"
9311 (openbsd[2-9].*|mirbsd*)
9312 LD_RPATH_OPT="-Wl,-rpath,"
9315 LD_RPATH_OPT="-rpath "
9318 LD_RPATH_OPT="-Wl,-rpath,"
9321 LD_RPATH_OPT="-rpath "
9329 echo "$as_me:9329: result: $LD_RPATH_OPT" >&5
9330 echo "${ECHO_T}$LD_RPATH_OPT" >&6
9332 case "x$LD_RPATH_OPT" in
9334 echo "$as_me:9334: checking if we need a space after rpath option" >&5
9335 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9336 cf_save_LIBS="$LIBS"
9338 cf_add_libs="${LD_RPATH_OPT}$libdir"
9339 # Filter out duplicates - this happens with badly-designed ".pc" files...
9340 for cf_add_1lib in $LIBS
9342 for cf_add_2lib in $cf_add_libs
9344 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9350 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9354 cat >conftest.$ac_ext <<_ACEOF
9355 #line 9355 "configure"
9356 #include "confdefs.h"
9366 rm -f conftest.$ac_objext conftest$ac_exeext
9367 if { (eval echo "$as_me:9367: \"$ac_link\"") >&5
9368 (eval $ac_link) 2>&5
9370 echo "$as_me:9370: \$? = $ac_status" >&5
9371 (exit $ac_status); } &&
9372 { ac_try='test -s conftest$ac_exeext'
9373 { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9376 echo "$as_me:9376: \$? = $ac_status" >&5
9377 (exit $ac_status); }; }; then
9380 echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9385 LIBS="$cf_save_LIBS"
9386 echo "$as_me:9386: result: $cf_rpath_space" >&5
9387 echo "${ECHO_T}$cf_rpath_space" >&6
9388 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9396 INSTALL_LIB="-m 644"
9397 : ${rel_builddir:=.}
9403 cf_cv_do_symlinks=no
9405 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9407 echo "$as_me:9407: checking if release/abi version should be used for shared libs" >&5
9408 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9410 # Check whether --with-shlib-version or --without-shlib-version was given.
9411 if test "${with_shlib_version+set}" = set; then
9412 withval="$with_shlib_version"
9413 test -z "$withval" && withval=auto
9416 cf_cv_shlib_version=auto
9419 cf_cv_shlib_version=$withval
9422 echo "$as_me:9422: result: $withval" >&5
9423 echo "${ECHO_T}$withval" >&6
9424 { { echo "$as_me:9424: error: option value must be one of: rel, abi, or auto" >&5
9425 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
9426 { (exit 1); exit 1; }; }
9431 cf_cv_shlib_version=auto
9433 echo "$as_me:9433: result: $cf_cv_shlib_version" >&5
9434 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9439 # Some less-capable ports of gcc support only -fpic
9443 if test "$GCC" = yes
9447 case $cf_cv_system_name in
9448 (*linux*) # e.g., PGI compiler
9454 if test "$cf_try_fPIC" = yes
9456 echo "$as_me:9456: checking which $CC option to use" >&5
9457 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9458 cf_save_CFLAGS="$CFLAGS"
9459 for CC_SHARED_OPTS in -fPIC -fpic ''
9461 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9462 cat >conftest.$ac_ext <<_ACEOF
9463 #line 9463 "configure"
9464 #include "confdefs.h"
9474 rm -f conftest.$ac_objext
9475 if { (eval echo "$as_me:9475: \"$ac_compile\"") >&5
9476 (eval $ac_compile) 2>&5
9478 echo "$as_me:9478: \$? = $ac_status" >&5
9479 (exit $ac_status); } &&
9480 { ac_try='test -s conftest.$ac_objext'
9481 { (eval echo "$as_me:9481: \"$ac_try\"") >&5
9484 echo "$as_me:9484: \$? = $ac_status" >&5
9485 (exit $ac_status); }; }; then
9488 echo "$as_me: failed program was:" >&5
9489 cat conftest.$ac_ext >&5
9491 rm -f conftest.$ac_objext conftest.$ac_ext
9493 echo "$as_me:9493: result: $CC_SHARED_OPTS" >&5
9494 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9495 CFLAGS="$cf_save_CFLAGS"
9498 cf_cv_shlib_version_infix=no
9500 case $cf_cv_system_name in
9501 (aix4.3-9*|aix[5-7]*)
9502 if test "$GCC" = yes; then
9503 CC_SHARED_OPTS='-Wl,-brtl'
9504 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9506 CC_SHARED_OPTS='-brtl'
9507 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9508 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9512 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9516 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9517 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9518 cf_cv_shlib_version=cygdll
9519 cf_cv_shlib_version_infix=cygdll
9522 cat >mk_shared_lib.sh <<-CF_EOF
9525 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9528 Linking shared library
9529 ** SHARED_LIB \$SHARED_LIB
9530 ** IMPORT_LIB \$IMPORT_LIB
9532 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9534 chmod +x mk_shared_lib.sh
9538 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9539 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9540 cf_cv_shlib_version=msysdll
9541 cf_cv_shlib_version_infix=msysdll
9544 cat >mk_shared_lib.sh <<-CF_EOF
9547 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9550 Linking shared library
9551 ** SHARED_LIB \$SHARED_LIB
9552 ** IMPORT_LIB \$IMPORT_LIB
9554 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9556 chmod +x mk_shared_lib.sh
9559 cf_try_cflags="no-cpp-precomp"
9560 CC_SHARED_OPTS="-dynamic"
9561 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9562 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9563 cf_cv_shlib_version_infix=yes
9564 echo "$as_me:9564: checking if ld -search_paths_first works" >&5
9565 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9566 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9567 echo $ECHO_N "(cached) $ECHO_C" >&6
9570 cf_save_LDFLAGS=$LDFLAGS
9571 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9572 cat >conftest.$ac_ext <<_ACEOF
9573 #line 9573 "configure"
9574 #include "confdefs.h"
9584 rm -f conftest.$ac_objext conftest$ac_exeext
9585 if { (eval echo "$as_me:9585: \"$ac_link\"") >&5
9586 (eval $ac_link) 2>&5
9588 echo "$as_me:9588: \$? = $ac_status" >&5
9589 (exit $ac_status); } &&
9590 { ac_try='test -s conftest$ac_exeext'
9591 { (eval echo "$as_me:9591: \"$ac_try\"") >&5
9594 echo "$as_me:9594: \$? = $ac_status" >&5
9595 (exit $ac_status); }; }; then
9596 cf_cv_ldflags_search_paths_first=yes
9598 echo "$as_me: failed program was:" >&5
9599 cat conftest.$ac_ext >&5
9600 cf_cv_ldflags_search_paths_first=no
9602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9603 LDFLAGS=$cf_save_LDFLAGS
9605 echo "$as_me:9605: result: $cf_cv_ldflags_search_paths_first" >&5
9606 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9607 if test $cf_cv_ldflags_search_paths_first = yes; then
9608 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9612 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9613 if test "$GCC" != yes; then
9616 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
9617 INSTALL_LIB="-m 555"
9620 # (tested with gcc 2.7.2 -- I don't have c89)
9621 if test "$GCC" = yes; then
9622 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9625 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9627 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
9628 # HP-UX shared libraries must be executable, and should be
9629 # readonly to exploit a quirk in the memory manager.
9630 INSTALL_LIB="-m 555"
9633 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9634 if test "$cf_cv_shlib_version" = rel; then
9635 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9637 cf_shared_soname='`basename $@`'
9640 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
9643 if test "$cf_cv_enable_rpath" = yes ; then
9644 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9646 # tested with IRIX 5.2 and 'cc'.
9647 if test "$GCC" != yes; then
9648 CC_SHARED_OPTS='-KPIC'
9649 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
9651 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
9653 cf_cv_rm_so_locs=yes
9655 (linux*|gnu*|k*bsd*-gnu)
9656 if test "$DFT_LWR_MODEL" = "shared" ; then
9657 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9658 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9660 if test "$cf_cv_enable_rpath" = yes ; then
9661 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9664 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9665 if test "$cf_cv_shlib_version" = rel; then
9666 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9668 cf_cv_shared_soname='`basename $@`'
9671 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9674 cf_cv_shlib_version=mingw
9675 cf_cv_shlib_version_infix=mingw
9678 if test "$DFT_LWR_MODEL" = "shared" ; then
9679 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9680 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9681 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9684 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9685 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9686 cat >mk_shared_lib.sh <<-CF_EOF
9689 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9692 Linking shared library
9693 ** SHARED_LIB \$SHARED_LIB
9694 ** IMPORT_LIB \$IMPORT_LIB
9696 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9698 chmod +x mk_shared_lib.sh
9700 (openbsd[2-9].*|mirbsd*)
9701 if test "$DFT_LWR_MODEL" = "shared" ; then
9702 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9703 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9705 if test "$cf_cv_enable_rpath" = yes ; then
9706 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9708 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9710 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9711 if test "$cf_cv_shlib_version" = rel; then
9712 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9714 cf_cv_shared_soname='`basename $@`'
9717 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9719 (nto-qnx*|openbsd*|freebsd[12].*)
9720 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9721 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
9722 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9724 (dragonfly*|freebsd*)
9725 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9726 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9727 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9728 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9729 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9732 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9733 if test "$cf_cv_shlib_version" = rel; then
9734 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9736 cf_cv_shared_soname='`basename $@`'
9739 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9742 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9743 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9744 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9745 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9746 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9747 if test "$cf_cv_shlib_version" = auto; then
9748 if test -f /usr/libexec/ld.elf_so; then
9749 cf_cv_shlib_version=abi
9751 cf_cv_shlib_version=rel
9755 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9756 if test "$cf_cv_shlib_version" = rel; then
9757 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9759 cf_cv_shared_soname='`basename $@`'
9762 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9764 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
9768 # tested with OSF/1 V3.2 and 'cc'
9769 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9770 # link with shared libs).
9771 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9774 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9777 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9778 if test "$DFT_LWR_MODEL" = "shared" ; then
9779 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9780 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9782 cf_cv_rm_so_locs=yes
9784 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9785 # tested with osr5.0.5
9786 if test "$GCC" != yes; then
9787 CC_SHARED_OPTS='-belf -KPIC'
9789 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9790 if test "$cf_cv_enable_rpath" = yes ; then
9791 # only way is to set LD_RUN_PATH but no switch for it
9794 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9795 LINK_PROGS='LD_RUN_PATH=${libdir}'
9796 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9799 # tested with SunOS 4.1.1 and gcc 2.7.0
9800 if test "$GCC" != yes; then
9801 CC_SHARED_OPTS='-KPIC'
9803 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
9804 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9807 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9808 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9809 if test "$DFT_LWR_MODEL" = "shared" ; then
9810 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9811 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9813 if test "$cf_cv_enable_rpath" = yes ; then
9814 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9817 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9818 if test "$cf_cv_shlib_version" = rel; then
9819 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9821 cf_cv_shared_soname='`basename $@`'
9824 if test "$GCC" != yes; then
9825 cf_save_CFLAGS="$CFLAGS"
9826 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9828 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9829 cat >conftest.$ac_ext <<_ACEOF
9830 #line 9830 "configure"
9831 #include "confdefs.h"
9841 rm -f conftest.$ac_objext
9842 if { (eval echo "$as_me:9842: \"$ac_compile\"") >&5
9843 (eval $ac_compile) 2>&5
9845 echo "$as_me:9845: \$? = $ac_status" >&5
9846 (exit $ac_status); } &&
9847 { ac_try='test -s conftest.$ac_objext'
9848 { (eval echo "$as_me:9848: \"$ac_try\"") >&5
9851 echo "$as_me:9851: \$? = $ac_status" >&5
9852 (exit $ac_status); }; }; then
9855 echo "$as_me: failed program was:" >&5
9856 cat conftest.$ac_ext >&5
9858 rm -f conftest.$ac_objext conftest.$ac_ext
9860 CFLAGS="$cf_save_CFLAGS"
9861 CC_SHARED_OPTS=$cf_shared_opts
9862 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
9864 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
9867 (sysv5uw7*|unix_sv*)
9868 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
9869 if test "$GCC" != yes; then
9870 CC_SHARED_OPTS='-KPIC'
9872 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
9875 CC_SHARED_OPTS='unknown'
9876 MK_SHARED_LIB='echo unknown'
9880 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
9881 case "$cf_cv_shlib_version" in
9883 case "$MK_SHARED_LIB" in
9885 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
9888 { echo "$as_me:9888: WARNING: ignored --with-shlib-version" >&5
9889 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
9895 if test -n "$cf_try_cflags"
9897 cat > conftest.$ac_ext <<EOF
9898 #line 9898 "${as_me:-configure}"
9900 int main(int argc, char *argv[])
9903 return (argv[argc-1] == 0) ;
9906 cf_save_CFLAGS="$CFLAGS"
9907 for cf_opt in $cf_try_cflags
9909 CFLAGS="$cf_save_CFLAGS -$cf_opt"
9910 echo "$as_me:9910: checking if CFLAGS option -$cf_opt works" >&5
9911 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
9912 if { (eval echo "$as_me:9912: \"$ac_compile\"") >&5
9913 (eval $ac_compile) 2>&5
9915 echo "$as_me:9915: \$? = $ac_status" >&5
9916 (exit $ac_status); }; then
9917 echo "$as_me:9917: result: yes" >&5
9918 echo "${ECHO_T}yes" >&6
9919 cf_save_CFLAGS="$CFLAGS"
9921 echo "$as_me:9921: result: no" >&5
9922 echo "${ECHO_T}no" >&6
9925 CFLAGS="$cf_save_CFLAGS"
9928 # RPATH_LIST is a colon-separated list of directories
9929 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
9930 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
9932 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
9934 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
9936 echo "${as_me:-configure}:9936: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
9938 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
9940 echo "${as_me:-configure}:9940: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
9942 # The test/sample programs in the original tree link using rpath option.
9943 # Make it optional for packagers.
9944 if test -n "$LOCAL_LDFLAGS"
9946 echo "$as_me:9946: checking if you want to link sample programs with rpath option" >&5
9947 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
9949 # Check whether --enable-rpath-link or --disable-rpath-link was given.
9950 if test "${enable_rpath_link+set}" = set; then
9951 enableval="$enable_rpath_link"
9952 with_rpath_link=$enableval
9956 echo "$as_me:9956: result: $with_rpath_link" >&5
9957 echo "${ECHO_T}$with_rpath_link" >&6
9958 if test "$with_rpath_link" = no
9965 ###############################################################################
9967 ### use option --enable-broken-linker to force on use of broken-linker support
9968 echo "$as_me:9968: checking if you want broken-linker support code" >&5
9969 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9971 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9972 if test "${enable_broken_linker+set}" = set; then
9973 enableval="$enable_broken_linker"
9974 with_broken_linker=$enableval
9976 with_broken_linker=${BROKEN_LINKER:-no}
9978 echo "$as_me:9978: result: $with_broken_linker" >&5
9979 echo "${ECHO_T}$with_broken_linker" >&6
9982 if test "$with_broken_linker" = yes ; then
9983 cat >>confdefs.h <<\EOF
9984 #define BROKEN_LINKER 1
9988 elif test "$DFT_LWR_MODEL" = shared ; then
9989 case $cf_cv_system_name in
9991 cat >>confdefs.h <<\EOF
9992 #define BROKEN_LINKER 1
9996 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
9998 echo "${as_me:-configure}:9998: testing cygwin linker is broken anyway ..." 1>&5
10004 # Check to define _XOPEN_SOURCE "automatically"
10006 cf_XOPEN_SOURCE=500
10007 cf_POSIX_C_SOURCE=199506L
10012 cf_xopen_source="-D_ALL_SOURCE"
10015 cf_XOPEN_SOURCE=600
10018 cf_xopen_source="-D_APPLE_C_SOURCE"
10021 cf_xopen_source="-D_DARWIN_C_SOURCE"
10024 (freebsd*|dragonfly*)
10025 # 5.x headers associate
10026 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10027 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10028 cf_POSIX_C_SOURCE=200112L
10029 cf_XOPEN_SOURCE=600
10030 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10033 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10036 cf_xopen_source="-D_HPUX_SOURCE"
10039 cf_xopen_source="-D_SGI_SOURCE"
10042 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10044 echo "$as_me:10044: checking if we must define _GNU_SOURCE" >&5
10045 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10046 if test "${cf_cv_gnu_source+set}" = set; then
10047 echo $ECHO_N "(cached) $ECHO_C" >&6
10050 cat >conftest.$ac_ext <<_ACEOF
10051 #line 10051 "configure"
10052 #include "confdefs.h"
10053 #include <sys/types.h>
10058 #ifndef _XOPEN_SOURCE
10065 rm -f conftest.$ac_objext
10066 if { (eval echo "$as_me:10066: \"$ac_compile\"") >&5
10067 (eval $ac_compile) 2>&5
10069 echo "$as_me:10069: \$? = $ac_status" >&5
10070 (exit $ac_status); } &&
10071 { ac_try='test -s conftest.$ac_objext'
10072 { (eval echo "$as_me:10072: \"$ac_try\"") >&5
10073 (eval $ac_try) 2>&5
10075 echo "$as_me:10075: \$? = $ac_status" >&5
10076 (exit $ac_status); }; }; then
10077 cf_cv_gnu_source=no
10079 echo "$as_me: failed program was:" >&5
10080 cat conftest.$ac_ext >&5
10081 cf_save="$CPPFLAGS"
10082 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
10083 cat >conftest.$ac_ext <<_ACEOF
10084 #line 10084 "configure"
10085 #include "confdefs.h"
10086 #include <sys/types.h>
10091 #ifdef _XOPEN_SOURCE
10098 rm -f conftest.$ac_objext
10099 if { (eval echo "$as_me:10099: \"$ac_compile\"") >&5
10100 (eval $ac_compile) 2>&5
10102 echo "$as_me:10102: \$? = $ac_status" >&5
10103 (exit $ac_status); } &&
10104 { ac_try='test -s conftest.$ac_objext'
10105 { (eval echo "$as_me:10105: \"$ac_try\"") >&5
10106 (eval $ac_try) 2>&5
10108 echo "$as_me:10108: \$? = $ac_status" >&5
10109 (exit $ac_status); }; }; then
10110 cf_cv_gnu_source=no
10112 echo "$as_me: failed program was:" >&5
10113 cat conftest.$ac_ext >&5
10114 cf_cv_gnu_source=yes
10116 rm -f conftest.$ac_objext conftest.$ac_ext
10117 CPPFLAGS="$cf_save"
10120 rm -f conftest.$ac_objext conftest.$ac_ext
10123 echo "$as_me:10123: result: $cf_cv_gnu_source" >&5
10124 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10126 if test "$cf_cv_gnu_source" = yes
10128 echo "$as_me:10128: checking if we should also define _DEFAULT_SOURCE" >&5
10129 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10130 if test "${cf_cv_default_source+set}" = set; then
10131 echo $ECHO_N "(cached) $ECHO_C" >&6
10134 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
10135 cat >conftest.$ac_ext <<_ACEOF
10136 #line 10136 "configure"
10137 #include "confdefs.h"
10138 #include <sys/types.h>
10143 #ifdef _DEFAULT_SOURCE
10150 rm -f conftest.$ac_objext
10151 if { (eval echo "$as_me:10151: \"$ac_compile\"") >&5
10152 (eval $ac_compile) 2>&5
10154 echo "$as_me:10154: \$? = $ac_status" >&5
10155 (exit $ac_status); } &&
10156 { ac_try='test -s conftest.$ac_objext'
10157 { (eval echo "$as_me:10157: \"$ac_try\"") >&5
10158 (eval $ac_try) 2>&5
10160 echo "$as_me:10160: \$? = $ac_status" >&5
10161 (exit $ac_status); }; }; then
10162 cf_cv_default_source=no
10164 echo "$as_me: failed program was:" >&5
10165 cat conftest.$ac_ext >&5
10166 cf_cv_default_source=yes
10168 rm -f conftest.$ac_objext conftest.$ac_ext
10171 echo "$as_me:10171: result: $cf_cv_default_source" >&5
10172 echo "${ECHO_T}$cf_cv_default_source" >&6
10173 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
10178 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10181 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10184 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10186 cf_save_CFLAGS="$CFLAGS"
10187 cf_save_CPPFLAGS="$CPPFLAGS"
10189 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10190 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10191 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10193 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10194 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10195 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10197 echo "$as_me:10197: checking if we should define _POSIX_C_SOURCE" >&5
10198 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10199 if test "${cf_cv_posix_c_source+set}" = set; then
10200 echo $ECHO_N "(cached) $ECHO_C" >&6
10203 echo "${as_me:-configure}:10203: testing if the symbol is already defined go no further ..." 1>&5
10205 cat >conftest.$ac_ext <<_ACEOF
10206 #line 10206 "configure"
10207 #include "confdefs.h"
10208 #include <sys/types.h>
10213 #ifndef _POSIX_C_SOURCE
10220 rm -f conftest.$ac_objext
10221 if { (eval echo "$as_me:10221: \"$ac_compile\"") >&5
10222 (eval $ac_compile) 2>&5
10224 echo "$as_me:10224: \$? = $ac_status" >&5
10225 (exit $ac_status); } &&
10226 { ac_try='test -s conftest.$ac_objext'
10227 { (eval echo "$as_me:10227: \"$ac_try\"") >&5
10228 (eval $ac_try) 2>&5
10230 echo "$as_me:10230: \$? = $ac_status" >&5
10231 (exit $ac_status); }; }; then
10232 cf_cv_posix_c_source=no
10234 echo "$as_me: failed program was:" >&5
10235 cat conftest.$ac_ext >&5
10236 cf_want_posix_source=no
10237 case .$cf_POSIX_C_SOURCE in
10239 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10242 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10243 cf_want_posix_source=yes
10246 cf_want_posix_source=yes
10249 if test "$cf_want_posix_source" = yes ; then
10250 cat >conftest.$ac_ext <<_ACEOF
10251 #line 10251 "configure"
10252 #include "confdefs.h"
10253 #include <sys/types.h>
10258 #ifdef _POSIX_SOURCE
10265 rm -f conftest.$ac_objext
10266 if { (eval echo "$as_me:10266: \"$ac_compile\"") >&5
10267 (eval $ac_compile) 2>&5
10269 echo "$as_me:10269: \$? = $ac_status" >&5
10270 (exit $ac_status); } &&
10271 { ac_try='test -s conftest.$ac_objext'
10272 { (eval echo "$as_me:10272: \"$ac_try\"") >&5
10273 (eval $ac_try) 2>&5
10275 echo "$as_me:10275: \$? = $ac_status" >&5
10276 (exit $ac_status); }; }; then
10279 echo "$as_me: failed program was:" >&5
10280 cat conftest.$ac_ext >&5
10281 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10283 rm -f conftest.$ac_objext conftest.$ac_ext
10286 echo "${as_me:-configure}:10286: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10288 CFLAGS="$cf_trim_CFLAGS"
10289 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10291 echo "${as_me:-configure}:10291: testing if the second compile does not leave our definition intact error ..." 1>&5
10293 cat >conftest.$ac_ext <<_ACEOF
10294 #line 10294 "configure"
10295 #include "confdefs.h"
10296 #include <sys/types.h>
10301 #ifndef _POSIX_C_SOURCE
10308 rm -f conftest.$ac_objext
10309 if { (eval echo "$as_me:10309: \"$ac_compile\"") >&5
10310 (eval $ac_compile) 2>&5
10312 echo "$as_me:10312: \$? = $ac_status" >&5
10313 (exit $ac_status); } &&
10314 { ac_try='test -s conftest.$ac_objext'
10315 { (eval echo "$as_me:10315: \"$ac_try\"") >&5
10316 (eval $ac_try) 2>&5
10318 echo "$as_me:10318: \$? = $ac_status" >&5
10319 (exit $ac_status); }; }; then
10322 echo "$as_me: failed program was:" >&5
10323 cat conftest.$ac_ext >&5
10324 cf_cv_posix_c_source=no
10326 rm -f conftest.$ac_objext conftest.$ac_ext
10327 CFLAGS="$cf_save_CFLAGS"
10328 CPPFLAGS="$cf_save_CPPFLAGS"
10331 rm -f conftest.$ac_objext conftest.$ac_ext
10334 echo "$as_me:10334: result: $cf_cv_posix_c_source" >&5
10335 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10337 if test "$cf_cv_posix_c_source" != no ; then
10338 CFLAGS="$cf_trim_CFLAGS"
10339 CPPFLAGS="$cf_trim_CPPFLAGS"
10344 cf_new_extra_cppflags=
10346 for cf_add_cflags in $cf_cv_posix_c_source
10348 case $cf_fix_cppflags in
10350 case $cf_add_cflags in
10351 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10352 case $cf_add_cflags in
10354 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10356 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10357 && test -z "${cf_tst_cflags}" \
10358 && cf_fix_cppflags=yes
10360 if test $cf_fix_cppflags = yes ; then
10362 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10363 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10366 elif test "${cf_tst_cflags}" = "\"'" ; then
10368 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10369 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10375 case "$CPPFLAGS" in
10379 case $cf_add_cflags in
10381 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10383 CPPFLAGS=`echo "$CPPFLAGS" | \
10384 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10385 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10390 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10391 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10398 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10399 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10406 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10407 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10409 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10411 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10412 && test -z "${cf_tst_cflags}" \
10413 && cf_fix_cppflags=no
10418 if test -n "$cf_new_cflags" ; then
10420 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10421 CFLAGS="${CFLAGS}$cf_new_cflags"
10425 if test -n "$cf_new_cppflags" ; then
10427 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10428 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10432 if test -n "$cf_new_extra_cppflags" ; then
10434 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10435 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10443 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10446 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10447 cf_xopen_source="-D_BSD_SOURCE"
10448 cf_XOPEN_SOURCE=600
10451 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10454 cf_xopen_source="-D_OSF_SOURCE"
10457 cf_xopen_source="-D_QNX_SOURCE"
10460 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10463 cf_xopen_source="-D__EXTENSIONS__"
10464 cf_cv_xopen_source=broken
10466 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10472 echo "$as_me:10472: checking if we should define _XOPEN_SOURCE" >&5
10473 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10474 if test "${cf_cv_xopen_source+set}" = set; then
10475 echo $ECHO_N "(cached) $ECHO_C" >&6
10478 cat >conftest.$ac_ext <<_ACEOF
10479 #line 10479 "configure"
10480 #include "confdefs.h"
10482 #include <stdlib.h>
10483 #include <string.h>
10484 #include <sys/types.h>
10490 #ifndef _XOPEN_SOURCE
10497 rm -f conftest.$ac_objext
10498 if { (eval echo "$as_me:10498: \"$ac_compile\"") >&5
10499 (eval $ac_compile) 2>&5
10501 echo "$as_me:10501: \$? = $ac_status" >&5
10502 (exit $ac_status); } &&
10503 { ac_try='test -s conftest.$ac_objext'
10504 { (eval echo "$as_me:10504: \"$ac_try\"") >&5
10505 (eval $ac_try) 2>&5
10507 echo "$as_me:10507: \$? = $ac_status" >&5
10508 (exit $ac_status); }; }; then
10509 cf_cv_xopen_source=no
10511 echo "$as_me: failed program was:" >&5
10512 cat conftest.$ac_ext >&5
10513 cf_save="$CPPFLAGS"
10514 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10515 cat >conftest.$ac_ext <<_ACEOF
10516 #line 10516 "configure"
10517 #include "confdefs.h"
10519 #include <stdlib.h>
10520 #include <string.h>
10521 #include <sys/types.h>
10527 #ifdef _XOPEN_SOURCE
10534 rm -f conftest.$ac_objext
10535 if { (eval echo "$as_me:10535: \"$ac_compile\"") >&5
10536 (eval $ac_compile) 2>&5
10538 echo "$as_me:10538: \$? = $ac_status" >&5
10539 (exit $ac_status); } &&
10540 { ac_try='test -s conftest.$ac_objext'
10541 { (eval echo "$as_me:10541: \"$ac_try\"") >&5
10542 (eval $ac_try) 2>&5
10544 echo "$as_me:10544: \$? = $ac_status" >&5
10545 (exit $ac_status); }; }; then
10546 cf_cv_xopen_source=no
10548 echo "$as_me: failed program was:" >&5
10549 cat conftest.$ac_ext >&5
10550 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10552 rm -f conftest.$ac_objext conftest.$ac_ext
10553 CPPFLAGS="$cf_save"
10556 rm -f conftest.$ac_objext conftest.$ac_ext
10559 echo "$as_me:10559: result: $cf_cv_xopen_source" >&5
10560 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10562 if test "$cf_cv_xopen_source" != no ; then
10564 CFLAGS=`echo "$CFLAGS" | \
10565 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10566 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10568 CPPFLAGS=`echo "$CPPFLAGS" | \
10569 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10570 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10572 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10577 cf_new_extra_cppflags=
10579 for cf_add_cflags in $cf_temp_xopen_source
10581 case $cf_fix_cppflags in
10583 case $cf_add_cflags in
10584 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10585 case $cf_add_cflags in
10587 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10589 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10590 && test -z "${cf_tst_cflags}" \
10591 && cf_fix_cppflags=yes
10593 if test $cf_fix_cppflags = yes ; then
10595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10599 elif test "${cf_tst_cflags}" = "\"'" ; then
10601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10608 case "$CPPFLAGS" in
10612 case $cf_add_cflags in
10614 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10616 CPPFLAGS=`echo "$CPPFLAGS" | \
10617 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10618 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10623 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10624 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10631 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10632 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10639 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10640 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10642 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10644 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10645 && test -z "${cf_tst_cflags}" \
10646 && cf_fix_cppflags=no
10651 if test -n "$cf_new_cflags" ; then
10653 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10654 CFLAGS="${CFLAGS}$cf_new_cflags"
10658 if test -n "$cf_new_cppflags" ; then
10660 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10661 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10665 if test -n "$cf_new_extra_cppflags" ; then
10667 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10668 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10674 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10676 cf_save_CFLAGS="$CFLAGS"
10677 cf_save_CPPFLAGS="$CPPFLAGS"
10679 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10680 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10681 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10683 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10684 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10685 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10687 echo "$as_me:10687: checking if we should define _POSIX_C_SOURCE" >&5
10688 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10689 if test "${cf_cv_posix_c_source+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
10693 echo "${as_me:-configure}:10693: testing if the symbol is already defined go no further ..." 1>&5
10695 cat >conftest.$ac_ext <<_ACEOF
10696 #line 10696 "configure"
10697 #include "confdefs.h"
10698 #include <sys/types.h>
10703 #ifndef _POSIX_C_SOURCE
10710 rm -f conftest.$ac_objext
10711 if { (eval echo "$as_me:10711: \"$ac_compile\"") >&5
10712 (eval $ac_compile) 2>&5
10714 echo "$as_me:10714: \$? = $ac_status" >&5
10715 (exit $ac_status); } &&
10716 { ac_try='test -s conftest.$ac_objext'
10717 { (eval echo "$as_me:10717: \"$ac_try\"") >&5
10718 (eval $ac_try) 2>&5
10720 echo "$as_me:10720: \$? = $ac_status" >&5
10721 (exit $ac_status); }; }; then
10722 cf_cv_posix_c_source=no
10724 echo "$as_me: failed program was:" >&5
10725 cat conftest.$ac_ext >&5
10726 cf_want_posix_source=no
10727 case .$cf_POSIX_C_SOURCE in
10729 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10732 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10733 cf_want_posix_source=yes
10736 cf_want_posix_source=yes
10739 if test "$cf_want_posix_source" = yes ; then
10740 cat >conftest.$ac_ext <<_ACEOF
10741 #line 10741 "configure"
10742 #include "confdefs.h"
10743 #include <sys/types.h>
10748 #ifdef _POSIX_SOURCE
10755 rm -f conftest.$ac_objext
10756 if { (eval echo "$as_me:10756: \"$ac_compile\"") >&5
10757 (eval $ac_compile) 2>&5
10759 echo "$as_me:10759: \$? = $ac_status" >&5
10760 (exit $ac_status); } &&
10761 { ac_try='test -s conftest.$ac_objext'
10762 { (eval echo "$as_me:10762: \"$ac_try\"") >&5
10763 (eval $ac_try) 2>&5
10765 echo "$as_me:10765: \$? = $ac_status" >&5
10766 (exit $ac_status); }; }; then
10769 echo "$as_me: failed program was:" >&5
10770 cat conftest.$ac_ext >&5
10771 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10773 rm -f conftest.$ac_objext conftest.$ac_ext
10776 echo "${as_me:-configure}:10776: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10778 CFLAGS="$cf_trim_CFLAGS"
10779 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10781 echo "${as_me:-configure}:10781: testing if the second compile does not leave our definition intact error ..." 1>&5
10783 cat >conftest.$ac_ext <<_ACEOF
10784 #line 10784 "configure"
10785 #include "confdefs.h"
10786 #include <sys/types.h>
10791 #ifndef _POSIX_C_SOURCE
10798 rm -f conftest.$ac_objext
10799 if { (eval echo "$as_me:10799: \"$ac_compile\"") >&5
10800 (eval $ac_compile) 2>&5
10802 echo "$as_me:10802: \$? = $ac_status" >&5
10803 (exit $ac_status); } &&
10804 { ac_try='test -s conftest.$ac_objext'
10805 { (eval echo "$as_me:10805: \"$ac_try\"") >&5
10806 (eval $ac_try) 2>&5
10808 echo "$as_me:10808: \$? = $ac_status" >&5
10809 (exit $ac_status); }; }; then
10812 echo "$as_me: failed program was:" >&5
10813 cat conftest.$ac_ext >&5
10814 cf_cv_posix_c_source=no
10816 rm -f conftest.$ac_objext conftest.$ac_ext
10817 CFLAGS="$cf_save_CFLAGS"
10818 CPPFLAGS="$cf_save_CPPFLAGS"
10821 rm -f conftest.$ac_objext conftest.$ac_ext
10824 echo "$as_me:10824: result: $cf_cv_posix_c_source" >&5
10825 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10827 if test "$cf_cv_posix_c_source" != no ; then
10828 CFLAGS="$cf_trim_CFLAGS"
10829 CPPFLAGS="$cf_trim_CPPFLAGS"
10834 cf_new_extra_cppflags=
10836 for cf_add_cflags in $cf_cv_posix_c_source
10838 case $cf_fix_cppflags in
10840 case $cf_add_cflags in
10841 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10842 case $cf_add_cflags in
10844 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10847 && test -z "${cf_tst_cflags}" \
10848 && cf_fix_cppflags=yes
10850 if test $cf_fix_cppflags = yes ; then
10852 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10853 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10856 elif test "${cf_tst_cflags}" = "\"'" ; then
10858 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10859 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'`
10880 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10881 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10888 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10889 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10899 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10901 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10902 && test -z "${cf_tst_cflags}" \
10903 && cf_fix_cppflags=no
10908 if test -n "$cf_new_cflags" ; then
10910 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10911 CFLAGS="${CFLAGS}$cf_new_cflags"
10915 if test -n "$cf_new_cppflags" ; then
10917 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10918 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10922 if test -n "$cf_new_extra_cppflags" ; then
10924 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10925 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10934 if test -n "$cf_xopen_source" ; then
10939 cf_new_extra_cppflags=
10941 for cf_add_cflags in $cf_xopen_source
10943 case $cf_fix_cppflags in
10945 case $cf_add_cflags in
10946 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10947 case $cf_add_cflags in
10949 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10951 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10952 && test -z "${cf_tst_cflags}" \
10953 && cf_fix_cppflags=yes
10955 if test $cf_fix_cppflags = yes ; then
10957 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10958 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10961 elif test "${cf_tst_cflags}" = "\"'" ; then
10963 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10964 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10970 case "$CPPFLAGS" in
10974 case $cf_add_cflags in
10976 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10978 CPPFLAGS=`echo "$CPPFLAGS" | \
10979 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10980 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10985 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10986 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10993 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10994 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11001 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11002 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11004 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11006 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11007 && test -z "${cf_tst_cflags}" \
11008 && cf_fix_cppflags=no
11013 if test -n "$cf_new_cflags" ; then
11014 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11016 echo "${as_me:-configure}:11016: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11018 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11019 CFLAGS="${CFLAGS}$cf_new_cflags"
11023 if test -n "$cf_new_cppflags" ; then
11024 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11026 echo "${as_me:-configure}:11026: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11028 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11029 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11033 if test -n "$cf_new_extra_cppflags" ; then
11034 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11036 echo "${as_me:-configure}:11036: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11038 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11039 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11045 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11046 echo "$as_me:11046: checking if _XOPEN_SOURCE really is set" >&5
11047 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11048 cat >conftest.$ac_ext <<_ACEOF
11049 #line 11049 "configure"
11050 #include "confdefs.h"
11051 #include <stdlib.h>
11056 #ifndef _XOPEN_SOURCE
11063 rm -f conftest.$ac_objext
11064 if { (eval echo "$as_me:11064: \"$ac_compile\"") >&5
11065 (eval $ac_compile) 2>&5
11067 echo "$as_me:11067: \$? = $ac_status" >&5
11068 (exit $ac_status); } &&
11069 { ac_try='test -s conftest.$ac_objext'
11070 { (eval echo "$as_me:11070: \"$ac_try\"") >&5
11071 (eval $ac_try) 2>&5
11073 echo "$as_me:11073: \$? = $ac_status" >&5
11074 (exit $ac_status); }; }; then
11075 cf_XOPEN_SOURCE_set=yes
11077 echo "$as_me: failed program was:" >&5
11078 cat conftest.$ac_ext >&5
11079 cf_XOPEN_SOURCE_set=no
11081 rm -f conftest.$ac_objext conftest.$ac_ext
11082 echo "$as_me:11082: result: $cf_XOPEN_SOURCE_set" >&5
11083 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11084 if test $cf_XOPEN_SOURCE_set = yes
11086 cat >conftest.$ac_ext <<_ACEOF
11087 #line 11087 "configure"
11088 #include "confdefs.h"
11089 #include <stdlib.h>
11094 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11101 rm -f conftest.$ac_objext
11102 if { (eval echo "$as_me:11102: \"$ac_compile\"") >&5
11103 (eval $ac_compile) 2>&5
11105 echo "$as_me:11105: \$? = $ac_status" >&5
11106 (exit $ac_status); } &&
11107 { ac_try='test -s conftest.$ac_objext'
11108 { (eval echo "$as_me:11108: \"$ac_try\"") >&5
11109 (eval $ac_try) 2>&5
11111 echo "$as_me:11111: \$? = $ac_status" >&5
11112 (exit $ac_status); }; }; then
11113 cf_XOPEN_SOURCE_set_ok=yes
11115 echo "$as_me: failed program was:" >&5
11116 cat conftest.$ac_ext >&5
11117 cf_XOPEN_SOURCE_set_ok=no
11119 rm -f conftest.$ac_objext conftest.$ac_ext
11120 if test $cf_XOPEN_SOURCE_set_ok = no
11122 { echo "$as_me:11122: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11123 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11127 echo "$as_me:11127: checking if we should define _XOPEN_SOURCE" >&5
11128 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11129 if test "${cf_cv_xopen_source+set}" = set; then
11130 echo $ECHO_N "(cached) $ECHO_C" >&6
11133 cat >conftest.$ac_ext <<_ACEOF
11134 #line 11134 "configure"
11135 #include "confdefs.h"
11137 #include <stdlib.h>
11138 #include <string.h>
11139 #include <sys/types.h>
11145 #ifndef _XOPEN_SOURCE
11152 rm -f conftest.$ac_objext
11153 if { (eval echo "$as_me:11153: \"$ac_compile\"") >&5
11154 (eval $ac_compile) 2>&5
11156 echo "$as_me:11156: \$? = $ac_status" >&5
11157 (exit $ac_status); } &&
11158 { ac_try='test -s conftest.$ac_objext'
11159 { (eval echo "$as_me:11159: \"$ac_try\"") >&5
11160 (eval $ac_try) 2>&5
11162 echo "$as_me:11162: \$? = $ac_status" >&5
11163 (exit $ac_status); }; }; then
11164 cf_cv_xopen_source=no
11166 echo "$as_me: failed program was:" >&5
11167 cat conftest.$ac_ext >&5
11168 cf_save="$CPPFLAGS"
11169 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11170 cat >conftest.$ac_ext <<_ACEOF
11171 #line 11171 "configure"
11172 #include "confdefs.h"
11174 #include <stdlib.h>
11175 #include <string.h>
11176 #include <sys/types.h>
11182 #ifdef _XOPEN_SOURCE
11189 rm -f conftest.$ac_objext
11190 if { (eval echo "$as_me:11190: \"$ac_compile\"") >&5
11191 (eval $ac_compile) 2>&5
11193 echo "$as_me:11193: \$? = $ac_status" >&5
11194 (exit $ac_status); } &&
11195 { ac_try='test -s conftest.$ac_objext'
11196 { (eval echo "$as_me:11196: \"$ac_try\"") >&5
11197 (eval $ac_try) 2>&5
11199 echo "$as_me:11199: \$? = $ac_status" >&5
11200 (exit $ac_status); }; }; then
11201 cf_cv_xopen_source=no
11203 echo "$as_me: failed program was:" >&5
11204 cat conftest.$ac_ext >&5
11205 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11207 rm -f conftest.$ac_objext conftest.$ac_ext
11208 CPPFLAGS="$cf_save"
11211 rm -f conftest.$ac_objext conftest.$ac_ext
11214 echo "$as_me:11214: result: $cf_cv_xopen_source" >&5
11215 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11217 if test "$cf_cv_xopen_source" != no ; then
11219 CFLAGS=`echo "$CFLAGS" | \
11220 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11221 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11223 CPPFLAGS=`echo "$CPPFLAGS" | \
11224 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11225 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11227 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11232 cf_new_extra_cppflags=
11234 for cf_add_cflags in $cf_temp_xopen_source
11236 case $cf_fix_cppflags in
11238 case $cf_add_cflags in
11239 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11240 case $cf_add_cflags in
11242 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11244 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11245 && test -z "${cf_tst_cflags}" \
11246 && cf_fix_cppflags=yes
11248 if test $cf_fix_cppflags = yes ; then
11250 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11251 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11254 elif test "${cf_tst_cflags}" = "\"'" ; then
11256 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11257 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11263 case "$CPPFLAGS" in
11267 case $cf_add_cflags in
11269 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11271 CPPFLAGS=`echo "$CPPFLAGS" | \
11272 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11273 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11278 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11279 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11286 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11287 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11297 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11299 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11300 && test -z "${cf_tst_cflags}" \
11301 && cf_fix_cppflags=no
11306 if test -n "$cf_new_cflags" ; then
11308 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11309 CFLAGS="${CFLAGS}$cf_new_cflags"
11313 if test -n "$cf_new_cppflags" ; then
11315 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11316 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11320 if test -n "$cf_new_extra_cppflags" ; then
11322 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11323 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11332 # Check whether --enable-largefile or --disable-largefile was given.
11333 if test "${enable_largefile+set}" = set; then
11334 enableval="$enable_largefile"
11337 if test "$enable_largefile" != no; then
11339 echo "$as_me:11339: checking for special C compiler options needed for large files" >&5
11340 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11341 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11342 echo $ECHO_N "(cached) $ECHO_C" >&6
11344 ac_cv_sys_largefile_CC=no
11345 if test "$GCC" != yes; then
11348 # IRIX 6.2 and later do not support large files by default,
11349 # so use the C compiler's -n32 option if that helps.
11350 cat >conftest.$ac_ext <<_ACEOF
11351 #line 11351 "configure"
11352 #include "confdefs.h"
11353 #include <sys/types.h>
11354 /* Check that off_t can represent 2**63 - 1 correctly.
11355 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11356 since some C++ compilers masquerading as C compilers
11357 incorrectly reject 9223372036854775807. */
11358 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11359 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11360 && LARGE_OFF_T % 2147483647 == 1)
11370 rm -f conftest.$ac_objext
11371 if { (eval echo "$as_me:11371: \"$ac_compile\"") >&5
11372 (eval $ac_compile) 2>&5
11374 echo "$as_me:11374: \$? = $ac_status" >&5
11375 (exit $ac_status); } &&
11376 { ac_try='test -s conftest.$ac_objext'
11377 { (eval echo "$as_me:11377: \"$ac_try\"") >&5
11378 (eval $ac_try) 2>&5
11380 echo "$as_me:11380: \$? = $ac_status" >&5
11381 (exit $ac_status); }; }; then
11384 echo "$as_me: failed program was:" >&5
11385 cat conftest.$ac_ext >&5
11387 rm -f conftest.$ac_objext
11389 rm -f conftest.$ac_objext
11390 if { (eval echo "$as_me:11390: \"$ac_compile\"") >&5
11391 (eval $ac_compile) 2>&5
11393 echo "$as_me:11393: \$? = $ac_status" >&5
11394 (exit $ac_status); } &&
11395 { ac_try='test -s conftest.$ac_objext'
11396 { (eval echo "$as_me:11396: \"$ac_try\"") >&5
11397 (eval $ac_try) 2>&5
11399 echo "$as_me:11399: \$? = $ac_status" >&5
11400 (exit $ac_status); }; }; then
11401 ac_cv_sys_largefile_CC=' -n32'; break
11403 echo "$as_me: failed program was:" >&5
11404 cat conftest.$ac_ext >&5
11406 rm -f conftest.$ac_objext
11410 rm -f conftest.$ac_ext
11413 echo "$as_me:11413: result: $ac_cv_sys_largefile_CC" >&5
11414 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11415 if test "$ac_cv_sys_largefile_CC" != no; then
11416 CC=$CC$ac_cv_sys_largefile_CC
11419 echo "$as_me:11419: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11420 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11421 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11422 echo $ECHO_N "(cached) $ECHO_C" >&6
11425 ac_cv_sys_file_offset_bits=no
11426 cat >conftest.$ac_ext <<_ACEOF
11427 #line 11427 "configure"
11428 #include "confdefs.h"
11429 #include <sys/types.h>
11430 /* Check that off_t can represent 2**63 - 1 correctly.
11431 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11432 since some C++ compilers masquerading as C compilers
11433 incorrectly reject 9223372036854775807. */
11434 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11435 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11436 && LARGE_OFF_T % 2147483647 == 1)
11446 rm -f conftest.$ac_objext
11447 if { (eval echo "$as_me:11447: \"$ac_compile\"") >&5
11448 (eval $ac_compile) 2>&5
11450 echo "$as_me:11450: \$? = $ac_status" >&5
11451 (exit $ac_status); } &&
11452 { ac_try='test -s conftest.$ac_objext'
11453 { (eval echo "$as_me:11453: \"$ac_try\"") >&5
11454 (eval $ac_try) 2>&5
11456 echo "$as_me:11456: \$? = $ac_status" >&5
11457 (exit $ac_status); }; }; then
11460 echo "$as_me: failed program was:" >&5
11461 cat conftest.$ac_ext >&5
11463 rm -f conftest.$ac_objext conftest.$ac_ext
11464 cat >conftest.$ac_ext <<_ACEOF
11465 #line 11465 "configure"
11466 #include "confdefs.h"
11467 #define _FILE_OFFSET_BITS 64
11468 #include <sys/types.h>
11469 /* Check that off_t can represent 2**63 - 1 correctly.
11470 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11471 since some C++ compilers masquerading as C compilers
11472 incorrectly reject 9223372036854775807. */
11473 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11474 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11475 && LARGE_OFF_T % 2147483647 == 1)
11485 rm -f conftest.$ac_objext
11486 if { (eval echo "$as_me:11486: \"$ac_compile\"") >&5
11487 (eval $ac_compile) 2>&5
11489 echo "$as_me:11489: \$? = $ac_status" >&5
11490 (exit $ac_status); } &&
11491 { ac_try='test -s conftest.$ac_objext'
11492 { (eval echo "$as_me:11492: \"$ac_try\"") >&5
11493 (eval $ac_try) 2>&5
11495 echo "$as_me:11495: \$? = $ac_status" >&5
11496 (exit $ac_status); }; }; then
11497 ac_cv_sys_file_offset_bits=64; break
11499 echo "$as_me: failed program was:" >&5
11500 cat conftest.$ac_ext >&5
11502 rm -f conftest.$ac_objext conftest.$ac_ext
11506 echo "$as_me:11506: result: $ac_cv_sys_file_offset_bits" >&5
11507 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11508 if test "$ac_cv_sys_file_offset_bits" != no; then
11510 cat >>confdefs.h <<EOF
11511 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11516 echo "$as_me:11516: checking for _LARGE_FILES value needed for large files" >&5
11517 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11518 if test "${ac_cv_sys_large_files+set}" = set; then
11519 echo $ECHO_N "(cached) $ECHO_C" >&6
11522 ac_cv_sys_large_files=no
11523 cat >conftest.$ac_ext <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11526 #include <sys/types.h>
11527 /* Check that off_t can represent 2**63 - 1 correctly.
11528 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11529 since some C++ compilers masquerading as C compilers
11530 incorrectly reject 9223372036854775807. */
11531 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11532 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11533 && LARGE_OFF_T % 2147483647 == 1)
11543 rm -f conftest.$ac_objext
11544 if { (eval echo "$as_me:11544: \"$ac_compile\"") >&5
11545 (eval $ac_compile) 2>&5
11547 echo "$as_me:11547: \$? = $ac_status" >&5
11548 (exit $ac_status); } &&
11549 { ac_try='test -s conftest.$ac_objext'
11550 { (eval echo "$as_me:11550: \"$ac_try\"") >&5
11551 (eval $ac_try) 2>&5
11553 echo "$as_me:11553: \$? = $ac_status" >&5
11554 (exit $ac_status); }; }; then
11557 echo "$as_me: failed program was:" >&5
11558 cat conftest.$ac_ext >&5
11560 rm -f conftest.$ac_objext conftest.$ac_ext
11561 cat >conftest.$ac_ext <<_ACEOF
11562 #line 11562 "configure"
11563 #include "confdefs.h"
11564 #define _LARGE_FILES 1
11565 #include <sys/types.h>
11566 /* Check that off_t can represent 2**63 - 1 correctly.
11567 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11568 since some C++ compilers masquerading as C compilers
11569 incorrectly reject 9223372036854775807. */
11570 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11571 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11572 && LARGE_OFF_T % 2147483647 == 1)
11582 rm -f conftest.$ac_objext
11583 if { (eval echo "$as_me:11583: \"$ac_compile\"") >&5
11584 (eval $ac_compile) 2>&5
11586 echo "$as_me:11586: \$? = $ac_status" >&5
11587 (exit $ac_status); } &&
11588 { ac_try='test -s conftest.$ac_objext'
11589 { (eval echo "$as_me:11589: \"$ac_try\"") >&5
11590 (eval $ac_try) 2>&5
11592 echo "$as_me:11592: \$? = $ac_status" >&5
11593 (exit $ac_status); }; }; then
11594 ac_cv_sys_large_files=1; break
11596 echo "$as_me: failed program was:" >&5
11597 cat conftest.$ac_ext >&5
11599 rm -f conftest.$ac_objext conftest.$ac_ext
11603 echo "$as_me:11603: result: $ac_cv_sys_large_files" >&5
11604 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11605 if test "$ac_cv_sys_large_files" != no; then
11607 cat >>confdefs.h <<EOF
11608 #define _LARGE_FILES $ac_cv_sys_large_files
11615 if test "$enable_largefile" != no ; then
11616 echo "$as_me:11616: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11617 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11618 if test "${ac_cv_sys_largefile_source+set}" = set; then
11619 echo $ECHO_N "(cached) $ECHO_C" >&6
11622 ac_cv_sys_largefile_source=no
11623 cat >conftest.$ac_ext <<_ACEOF
11624 #line 11624 "configure"
11625 #include "confdefs.h"
11635 rm -f conftest.$ac_objext
11636 if { (eval echo "$as_me:11636: \"$ac_compile\"") >&5
11637 (eval $ac_compile) 2>&5
11639 echo "$as_me:11639: \$? = $ac_status" >&5
11640 (exit $ac_status); } &&
11641 { ac_try='test -s conftest.$ac_objext'
11642 { (eval echo "$as_me:11642: \"$ac_try\"") >&5
11643 (eval $ac_try) 2>&5
11645 echo "$as_me:11645: \$? = $ac_status" >&5
11646 (exit $ac_status); }; }; then
11649 echo "$as_me: failed program was:" >&5
11650 cat conftest.$ac_ext >&5
11652 rm -f conftest.$ac_objext conftest.$ac_ext
11653 cat >conftest.$ac_ext <<_ACEOF
11654 #line 11654 "configure"
11655 #include "confdefs.h"
11656 #define _LARGEFILE_SOURCE 1
11666 rm -f conftest.$ac_objext
11667 if { (eval echo "$as_me:11667: \"$ac_compile\"") >&5
11668 (eval $ac_compile) 2>&5
11670 echo "$as_me:11670: \$? = $ac_status" >&5
11671 (exit $ac_status); } &&
11672 { ac_try='test -s conftest.$ac_objext'
11673 { (eval echo "$as_me:11673: \"$ac_try\"") >&5
11674 (eval $ac_try) 2>&5
11676 echo "$as_me:11676: \$? = $ac_status" >&5
11677 (exit $ac_status); }; }; then
11678 ac_cv_sys_largefile_source=1; break
11680 echo "$as_me: failed program was:" >&5
11681 cat conftest.$ac_ext >&5
11683 rm -f conftest.$ac_objext conftest.$ac_ext
11687 echo "$as_me:11687: result: $ac_cv_sys_largefile_source" >&5
11688 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11689 if test "$ac_cv_sys_largefile_source" != no; then
11691 cat >>confdefs.h <<EOF
11692 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11698 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11699 # in glibc 2.1.3, but that breaks too many other things.
11700 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11701 echo "$as_me:11701: checking for fseeko" >&5
11702 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11703 if test "${ac_cv_func_fseeko+set}" = set; then
11704 echo $ECHO_N "(cached) $ECHO_C" >&6
11706 cat >conftest.$ac_ext <<_ACEOF
11707 #line 11707 "configure"
11708 #include "confdefs.h"
11713 return fseeko && fseeko (stdin, 0, 0);
11718 rm -f conftest.$ac_objext conftest$ac_exeext
11719 if { (eval echo "$as_me:11719: \"$ac_link\"") >&5
11720 (eval $ac_link) 2>&5
11722 echo "$as_me:11722: \$? = $ac_status" >&5
11723 (exit $ac_status); } &&
11724 { ac_try='test -s conftest$ac_exeext'
11725 { (eval echo "$as_me:11725: \"$ac_try\"") >&5
11726 (eval $ac_try) 2>&5
11728 echo "$as_me:11728: \$? = $ac_status" >&5
11729 (exit $ac_status); }; }; then
11730 ac_cv_func_fseeko=yes
11732 echo "$as_me: failed program was:" >&5
11733 cat conftest.$ac_ext >&5
11734 ac_cv_func_fseeko=no
11736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11738 echo "$as_me:11738: result: $ac_cv_func_fseeko" >&5
11739 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11740 if test $ac_cv_func_fseeko = yes; then
11742 cat >>confdefs.h <<\EOF
11743 #define HAVE_FSEEKO 1
11748 # Normally we would collect these definitions in the config.h,
11749 # but (like _XOPEN_SOURCE), some environments rely on having these
11750 # defined before any of the system headers are included. Another
11751 # case comes up with C++, e.g., on AIX the compiler compiles the
11752 # header files by themselves before looking at the body files it is
11753 # told to compile. For ncurses, those header files do not include
11755 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11756 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11757 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11759 echo "$as_me:11759: checking whether to use struct dirent64" >&5
11760 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11761 if test "${cf_cv_struct_dirent64+set}" = set; then
11762 echo $ECHO_N "(cached) $ECHO_C" >&6
11765 cat >conftest.$ac_ext <<_ACEOF
11766 #line 11766 "configure"
11767 #include "confdefs.h"
11769 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11770 #include <sys/types.h>
11771 #include <dirent.h>
11777 /* if transitional largefile support is setup, this is true */
11778 extern struct dirent64 * readdir(DIR *);
11779 struct dirent64 *x = readdir((DIR *)0);
11780 struct dirent *y = readdir((DIR *)0);
11787 rm -f conftest.$ac_objext
11788 if { (eval echo "$as_me:11788: \"$ac_compile\"") >&5
11789 (eval $ac_compile) 2>&5
11791 echo "$as_me:11791: \$? = $ac_status" >&5
11792 (exit $ac_status); } &&
11793 { ac_try='test -s conftest.$ac_objext'
11794 { (eval echo "$as_me:11794: \"$ac_try\"") >&5
11795 (eval $ac_try) 2>&5
11797 echo "$as_me:11797: \$? = $ac_status" >&5
11798 (exit $ac_status); }; }; then
11799 cf_cv_struct_dirent64=yes
11801 echo "$as_me: failed program was:" >&5
11802 cat conftest.$ac_ext >&5
11803 cf_cv_struct_dirent64=no
11805 rm -f conftest.$ac_objext conftest.$ac_ext
11808 echo "$as_me:11808: result: $cf_cv_struct_dirent64" >&5
11809 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11810 test "$cf_cv_struct_dirent64" = yes &&
11811 cat >>confdefs.h <<\EOF
11812 #define HAVE_STRUCT_DIRENT64 1
11817 ### Enable compiling-in rcs id's
11818 echo "$as_me:11818: checking if RCS identifiers should be compiled-in" >&5
11819 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11821 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11822 if test "${with_rcs_ids+set}" = set; then
11823 withval="$with_rcs_ids"
11824 with_rcs_ids=$withval
11828 echo "$as_me:11828: result: $with_rcs_ids" >&5
11829 echo "${ECHO_T}$with_rcs_ids" >&6
11830 test "$with_rcs_ids" = yes &&
11831 cat >>confdefs.h <<\EOF
11832 #define USE_RCS_IDS 1
11835 ###############################################################################
11837 ### Note that some functions (such as const) are normally disabled anyway.
11838 echo "$as_me:11838: checking if you want to build with function extensions" >&5
11839 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11841 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11842 if test "${enable_ext_funcs+set}" = set; then
11843 enableval="$enable_ext_funcs"
11844 with_ext_funcs=$enableval
11848 echo "$as_me:11848: result: $with_ext_funcs" >&5
11849 echo "${ECHO_T}$with_ext_funcs" >&6
11850 if test "$with_ext_funcs" = yes ; then
11851 NCURSES_EXT_FUNCS=1
11853 cat >>confdefs.h <<\EOF
11854 #define HAVE_USE_DEFAULT_COLORS 1
11857 cat >>confdefs.h <<\EOF
11858 #define NCURSES_EXT_FUNCS 1
11862 NCURSES_EXT_FUNCS=0
11865 ### use option --enable-const to turn on use of const beyond that in XSI.
11866 echo "$as_me:11866: checking for extended use of const keyword" >&5
11867 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11869 # Check whether --enable-const or --disable-const was given.
11870 if test "${enable_const+set}" = set; then
11871 enableval="$enable_const"
11872 with_ext_const=$enableval
11876 echo "$as_me:11876: result: $with_ext_const" >&5
11877 echo "${ECHO_T}$with_ext_const" >&6
11878 NCURSES_CONST='/*nothing*/'
11879 if test "$with_ext_const" = yes ; then
11880 NCURSES_CONST=const
11883 ###############################################################################
11884 # These options are relatively safe to experiment with.
11886 echo "$as_me:11886: checking if you want all development code" >&5
11887 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11889 # Check whether --with-develop or --without-develop was given.
11890 if test "${with_develop+set}" = set; then
11891 withval="$with_develop"
11892 with_develop=$withval
11896 echo "$as_me:11896: result: $with_develop" >&5
11897 echo "${ECHO_T}$with_develop" >&6
11899 ###############################################################################
11900 # These are just experimental, probably should not be in a package:
11902 # This is still experimental (20080329), but should ultimately be moved to
11903 # the script-block --with-normal, etc.
11905 echo "$as_me:11905: checking if you want to link with the pthread library" >&5
11906 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11908 # Check whether --with-pthread or --without-pthread was given.
11909 if test "${with_pthread+set}" = set; then
11910 withval="$with_pthread"
11911 with_pthread=$withval
11915 echo "$as_me:11915: result: $with_pthread" >&5
11916 echo "${ECHO_T}$with_pthread" >&6
11918 if test "$with_pthread" != no ; then
11919 echo "$as_me:11919: checking for pthread.h" >&5
11920 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11921 if test "${ac_cv_header_pthread_h+set}" = set; then
11922 echo $ECHO_N "(cached) $ECHO_C" >&6
11924 cat >conftest.$ac_ext <<_ACEOF
11925 #line 11925 "configure"
11926 #include "confdefs.h"
11927 #include <pthread.h>
11929 if { (eval echo "$as_me:11929: \"$ac_cpp conftest.$ac_ext\"") >&5
11930 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11932 egrep -v '^ *\+' conftest.er1 >conftest.err
11934 cat conftest.err >&5
11935 echo "$as_me:11935: \$? = $ac_status" >&5
11936 (exit $ac_status); } >/dev/null; then
11937 if test -s conftest.err; then
11938 ac_cpp_err=$ac_c_preproc_warn_flag
11945 if test -z "$ac_cpp_err"; then
11946 ac_cv_header_pthread_h=yes
11948 echo "$as_me: failed program was:" >&5
11949 cat conftest.$ac_ext >&5
11950 ac_cv_header_pthread_h=no
11952 rm -f conftest.err conftest.$ac_ext
11954 echo "$as_me:11954: result: $ac_cv_header_pthread_h" >&5
11955 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11956 if test $ac_cv_header_pthread_h = yes; then
11958 cat >>confdefs.h <<\EOF
11959 #define HAVE_PTHREADS_H 1
11962 for cf_lib_pthread in pthread c_r
11964 echo "$as_me:11964: checking if we can link with the $cf_lib_pthread library" >&5
11965 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11966 cf_save_LIBS="$LIBS"
11968 cf_add_libs="-l$cf_lib_pthread"
11969 # Filter out duplicates - this happens with badly-designed ".pc" files...
11970 for cf_add_1lib in $LIBS
11972 for cf_add_2lib in $cf_add_libs
11974 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11980 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11982 LIBS="$cf_add_libs"
11984 cat >conftest.$ac_ext <<_ACEOF
11985 #line 11985 "configure"
11986 #include "confdefs.h"
11988 #include <pthread.h>
11994 int rc = pthread_create(0,0,0,0);
11995 int r2 = pthread_mutexattr_settype(0, 0);
12001 rm -f conftest.$ac_objext conftest$ac_exeext
12002 if { (eval echo "$as_me:12002: \"$ac_link\"") >&5
12003 (eval $ac_link) 2>&5
12005 echo "$as_me:12005: \$? = $ac_status" >&5
12006 (exit $ac_status); } &&
12007 { ac_try='test -s conftest$ac_exeext'
12008 { (eval echo "$as_me:12008: \"$ac_try\"") >&5
12009 (eval $ac_try) 2>&5
12011 echo "$as_me:12011: \$? = $ac_status" >&5
12012 (exit $ac_status); }; }; then
12015 echo "$as_me: failed program was:" >&5
12016 cat conftest.$ac_ext >&5
12019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12020 LIBS="$cf_save_LIBS"
12021 echo "$as_me:12021: result: $with_pthread" >&5
12022 echo "${ECHO_T}$with_pthread" >&6
12023 test "$with_pthread" = yes && break
12026 if test "$with_pthread" = yes ; then
12028 cf_add_libs="-l$cf_lib_pthread"
12029 # Filter out duplicates - this happens with badly-designed ".pc" files...
12030 for cf_add_1lib in $LIBS
12032 for cf_add_2lib in $cf_add_libs
12034 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12040 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12042 LIBS="$cf_add_libs"
12044 cat >>confdefs.h <<\EOF
12045 #define HAVE_LIBPTHREADS 1
12049 { { echo "$as_me:12049: error: Cannot link with pthread library" >&5
12050 echo "$as_me: error: Cannot link with pthread library" >&2;}
12051 { (exit 1); exit 1; }; }
12058 echo "$as_me:12058: checking if you want to use weak-symbols for pthreads" >&5
12059 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12061 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12062 if test "${enable_weak_symbols+set}" = set; then
12063 enableval="$enable_weak_symbols"
12064 use_weak_symbols=$withval
12066 use_weak_symbols=no
12068 echo "$as_me:12068: result: $use_weak_symbols" >&5
12069 echo "${ECHO_T}$use_weak_symbols" >&6
12070 if test "$use_weak_symbols" = yes ; then
12072 echo "$as_me:12072: checking if $CC supports weak symbols" >&5
12073 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12074 if test "${cf_cv_weak_symbols+set}" = set; then
12075 echo $ECHO_N "(cached) $ECHO_C" >&6
12078 cat >conftest.$ac_ext <<_ACEOF
12079 #line 12079 "configure"
12080 #include "confdefs.h"
12087 #if defined(__GNUC__)
12088 # if defined __USE_ISOC99
12089 # define _cat_pragma(exp) _Pragma(#exp)
12090 # define _weak_pragma(exp) _cat_pragma(weak name)
12092 # define _weak_pragma(exp)
12094 # define _declare(name) __extension__ extern __typeof__(name) name
12095 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
12098 weak_symbol(fopen);
12104 rm -f conftest.$ac_objext
12105 if { (eval echo "$as_me:12105: \"$ac_compile\"") >&5
12106 (eval $ac_compile) 2>&5
12108 echo "$as_me:12108: \$? = $ac_status" >&5
12109 (exit $ac_status); } &&
12110 { ac_try='test -s conftest.$ac_objext'
12111 { (eval echo "$as_me:12111: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12114 echo "$as_me:12114: \$? = $ac_status" >&5
12115 (exit $ac_status); }; }; then
12116 cf_cv_weak_symbols=yes
12118 echo "$as_me: failed program was:" >&5
12119 cat conftest.$ac_ext >&5
12120 cf_cv_weak_symbols=no
12122 rm -f conftest.$ac_objext conftest.$ac_ext
12125 echo "$as_me:12125: result: $cf_cv_weak_symbols" >&5
12126 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12129 cf_cv_weak_symbols=no
12132 if test $cf_cv_weak_symbols = yes ; then
12134 cat >>confdefs.h <<\EOF
12135 #define USE_WEAK_SYMBOLS 1
12141 if test "$with_pthread" = "yes" ; then
12143 cat >>confdefs.h <<\EOF
12144 #define USE_PTHREADS 1
12147 enable_reentrant=yes
12148 if test $cf_cv_weak_symbols = yes ; then
12153 # OpenSUSE is installing ncurses6, using reentrant option.
12154 echo "$as_me:12154: checking for _nc_TABSIZE" >&5
12155 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
12156 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
12157 echo $ECHO_N "(cached) $ECHO_C" >&6
12159 cat >conftest.$ac_ext <<_ACEOF
12160 #line 12160 "configure"
12161 #include "confdefs.h"
12162 /* System header to define __stub macros and hopefully few prototypes,
12163 which can conflict with char _nc_TABSIZE (); below. */
12164 #include <assert.h>
12165 /* Override any gcc2 internal prototype to avoid an error. */
12169 /* We use char because int might match the return type of a gcc2
12170 builtin and then its argument prototype would still apply. */
12171 char _nc_TABSIZE ();
12177 /* The GNU C library defines this for functions which it implements
12178 to always fail with ENOSYS. Some functions are actually named
12179 something starting with __ and the normal name is an alias. */
12180 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
12183 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12190 rm -f conftest.$ac_objext conftest$ac_exeext
12191 if { (eval echo "$as_me:12191: \"$ac_link\"") >&5
12192 (eval $ac_link) 2>&5
12194 echo "$as_me:12194: \$? = $ac_status" >&5
12195 (exit $ac_status); } &&
12196 { ac_try='test -s conftest$ac_exeext'
12197 { (eval echo "$as_me:12197: \"$ac_try\"") >&5
12198 (eval $ac_try) 2>&5
12200 echo "$as_me:12200: \$? = $ac_status" >&5
12201 (exit $ac_status); }; }; then
12202 ac_cv_func__nc_TABSIZE=yes
12204 echo "$as_me: failed program was:" >&5
12205 cat conftest.$ac_ext >&5
12206 ac_cv_func__nc_TABSIZE=no
12208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12210 echo "$as_me:12210: result: $ac_cv_func__nc_TABSIZE" >&5
12211 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
12212 if test $ac_cv_func__nc_TABSIZE = yes; then
12213 assume_reentrant=yes
12215 assume_reentrant=no
12218 # Reentrant code has to be opaque; there's little advantage to making ncurses
12219 # opaque outside of that, so there is no --enable-opaque option. We can use
12220 # this option without --with-pthreads, but this will be always set for
12222 echo "$as_me:12222: checking if you want experimental reentrant code" >&5
12223 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12225 # Check whether --enable-reentrant or --disable-reentrant was given.
12226 if test "${enable_reentrant+set}" = set; then
12227 enableval="$enable_reentrant"
12228 with_reentrant=$enableval
12230 with_reentrant=$assume_reentrant
12232 echo "$as_me:12232: result: $with_reentrant" >&5
12233 echo "${ECHO_T}$with_reentrant" >&6
12234 if test "$with_reentrant" = yes ; then
12235 cf_cv_enable_reentrant=1
12236 if test $cf_cv_weak_symbols = yes ; then
12238 # remove pthread library from $LIBS
12239 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
12241 elif test "$assume_reentrant" = no ; then
12242 LIB_SUFFIX="t${LIB_SUFFIX}"
12245 cat >>confdefs.h <<\EOF
12246 #define USE_REENTRANT 1
12250 cf_cv_enable_reentrant=0
12253 ### Allow using a different wrap-prefix
12254 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12255 echo "$as_me:12255: checking for prefix used to wrap public variables" >&5
12256 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12258 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12259 if test "${with_wrap_prefix+set}" = set; then
12260 withval="$with_wrap_prefix"
12261 NCURSES_WRAP_PREFIX=$withval
12263 NCURSES_WRAP_PREFIX=_nc_
12265 echo "$as_me:12265: result: $NCURSES_WRAP_PREFIX" >&5
12266 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12268 NCURSES_WRAP_PREFIX=_nc_
12271 cat >>confdefs.h <<EOF
12272 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12275 ###############################################################################
12277 ### use option --disable-echo to suppress full display compiling commands
12279 echo "$as_me:12279: checking if you want to see long compiling messages" >&5
12280 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12282 # Check whether --enable-echo or --disable-echo was given.
12283 if test "${enable_echo+set}" = set; then
12284 enableval="$enable_echo"
12285 test "$enableval" != no && enableval=yes
12286 if test "$enableval" != "yes" ; then
12289 ECHO_LD='@echo linking $@;'
12290 RULE_CC='@echo compiling $<'
12291 SHOW_CC='@echo compiling $@'
12313 echo "$as_me:12313: result: $enableval" >&5
12314 echo "${ECHO_T}$enableval" >&6
12316 ### use option --enable-warnings to turn on all gcc warnings
12317 echo "$as_me:12317: checking if you want to see compiler warnings" >&5
12318 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12320 # Check whether --enable-warnings or --disable-warnings was given.
12321 if test "${enable_warnings+set}" = set; then
12322 enableval="$enable_warnings"
12323 with_warnings=$enableval
12325 echo "$as_me:12325: result: $with_warnings" >&5
12326 echo "${ECHO_T}$with_warnings" >&6
12328 if test "x$with_warnings" = "xyes"; then
12330 ADAFLAGS="$ADAFLAGS -gnatg"
12334 if test "$GCC" = yes ; then
12337 echo "$as_me:12337: checking if this is really Intel C compiler" >&5
12338 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12339 cf_save_CFLAGS="$CFLAGS"
12340 CFLAGS="$CFLAGS -no-gcc"
12341 cat >conftest.$ac_ext <<_ACEOF
12342 #line 12342 "configure"
12343 #include "confdefs.h"
12349 #ifdef __INTEL_COMPILER
12358 rm -f conftest.$ac_objext
12359 if { (eval echo "$as_me:12359: \"$ac_compile\"") >&5
12360 (eval $ac_compile) 2>&5
12362 echo "$as_me:12362: \$? = $ac_status" >&5
12363 (exit $ac_status); } &&
12364 { ac_try='test -s conftest.$ac_objext'
12365 { (eval echo "$as_me:12365: \"$ac_try\"") >&5
12366 (eval $ac_try) 2>&5
12368 echo "$as_me:12368: \$? = $ac_status" >&5
12369 (exit $ac_status); }; }; then
12371 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12374 echo "$as_me: failed program was:" >&5
12375 cat conftest.$ac_ext >&5
12377 rm -f conftest.$ac_objext conftest.$ac_ext
12378 CFLAGS="$cf_save_CFLAGS"
12379 echo "$as_me:12379: result: $INTEL_COMPILER" >&5
12380 echo "${ECHO_T}$INTEL_COMPILER" >&6
12387 if test "$GCC" = yes ; then
12388 echo "$as_me:12388: checking if this is really Clang C compiler" >&5
12389 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12390 cf_save_CFLAGS="$CFLAGS"
12391 CFLAGS="$CFLAGS -Qunused-arguments"
12392 cat >conftest.$ac_ext <<_ACEOF
12393 #line 12393 "configure"
12394 #include "confdefs.h"
12409 rm -f conftest.$ac_objext
12410 if { (eval echo "$as_me:12410: \"$ac_compile\"") >&5
12411 (eval $ac_compile) 2>&5
12413 echo "$as_me:12413: \$? = $ac_status" >&5
12414 (exit $ac_status); } &&
12415 { ac_try='test -s conftest.$ac_objext'
12416 { (eval echo "$as_me:12416: \"$ac_try\"") >&5
12417 (eval $ac_try) 2>&5
12419 echo "$as_me:12419: \$? = $ac_status" >&5
12420 (exit $ac_status); }; }; then
12422 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12425 echo "$as_me: failed program was:" >&5
12426 cat conftest.$ac_ext >&5
12428 rm -f conftest.$ac_objext conftest.$ac_ext
12429 CFLAGS="$cf_save_CFLAGS"
12430 echo "$as_me:12430: result: $CLANG_COMPILER" >&5
12431 echo "${ECHO_T}$CLANG_COMPILER" >&6
12434 cat > conftest.$ac_ext <<EOF
12435 #line 12435 "${as_me:-configure}"
12436 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12439 if test "$INTEL_COMPILER" = yes
12441 # The "-wdXXX" options suppress warnings:
12442 # remark #1419: external declaration in primary source file
12443 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12444 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12445 # remark #193: zero used for undefined preprocessing identifier
12446 # remark #593: variable "curs_sb_left_arrow" was set but never used
12447 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12448 # remark #869: parameter "tw" was never referenced
12449 # remark #981: operands are evaluated in unspecified order
12450 # warning #279: controlling expression is constant
12452 { echo "$as_me:12452: checking for $CC warning options..." >&5
12453 echo "$as_me: checking for $CC warning options..." >&6;}
12454 cf_save_CFLAGS="$CFLAGS"
12455 EXTRA_CFLAGS="-Wall"
12467 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12468 if { (eval echo "$as_me:12468: \"$ac_compile\"") >&5
12469 (eval $ac_compile) 2>&5
12471 echo "$as_me:12471: \$? = $ac_status" >&5
12472 (exit $ac_status); }; then
12473 test -n "$verbose" && echo "$as_me:12473: result: ... -$cf_opt" >&5
12474 echo "${ECHO_T}... -$cf_opt" >&6
12475 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12478 CFLAGS="$cf_save_CFLAGS"
12480 elif test "$GCC" = yes
12482 { echo "$as_me:12482: checking for $CC warning options..." >&5
12483 echo "$as_me: checking for $CC warning options..." >&6;}
12484 cf_save_CFLAGS="$CFLAGS"
12487 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12488 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12489 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12490 for cf_opt in W Wall \
12491 Wbad-function-cast \
12494 Wdeclaration-after-statement \
12497 Wmissing-declarations \
12498 Wmissing-prototypes \
12502 Wstrict-prototypes \
12503 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12505 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12506 if { (eval echo "$as_me:12506: \"$ac_compile\"") >&5
12507 (eval $ac_compile) 2>&5
12509 echo "$as_me:12509: \$? = $ac_status" >&5
12510 (exit $ac_status); }; then
12511 test -n "$verbose" && echo "$as_me:12511: result: ... -$cf_opt" >&5
12512 echo "${ECHO_T}... -$cf_opt" >&6
12515 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12518 case $GCC_VERSION in
12520 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12522 echo "${as_me:-configure}:12522: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12528 case $GCC_VERSION in
12530 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12532 echo "${as_me:-configure}:12532: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12538 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12541 CFLAGS="$cf_save_CFLAGS"
12547 if test "$GCC" = yes
12549 cat > conftest.i <<EOF
12551 #define GCC_PRINTF 0
12554 #define GCC_SCANF 0
12556 #ifndef GCC_NORETURN
12557 #define GCC_NORETURN /* nothing */
12560 #define GCC_UNUSED /* nothing */
12563 if test "$GCC" = yes
12565 { echo "$as_me:12565: checking for $CC __attribute__ directives..." >&5
12566 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12567 cat > conftest.$ac_ext <<EOF
12568 #line 12568 "${as_me:-configure}"
12569 #include "confdefs.h"
12570 #include "conftest.h"
12571 #include "conftest.i"
12573 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12575 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12578 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12580 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12582 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12583 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12584 extern void foo(void) GCC_NORETURN;
12585 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12587 cf_printf_attribute=no
12588 cf_scanf_attribute=no
12589 for cf_attribute in scanf printf unused noreturn
12592 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12594 cf_directive="__attribute__(($cf_attribute))"
12595 echo "checking for $CC $cf_directive" 1>&5
12597 case $cf_attribute in
12599 cf_printf_attribute=yes
12600 cat >conftest.h <<EOF
12601 #define GCC_$cf_ATTRIBUTE 1
12605 cf_scanf_attribute=yes
12606 cat >conftest.h <<EOF
12607 #define GCC_$cf_ATTRIBUTE 1
12611 cat >conftest.h <<EOF
12612 #define GCC_$cf_ATTRIBUTE $cf_directive
12617 if { (eval echo "$as_me:12617: \"$ac_compile\"") >&5
12618 (eval $ac_compile) 2>&5
12620 echo "$as_me:12620: \$? = $ac_status" >&5
12621 (exit $ac_status); }; then
12622 test -n "$verbose" && echo "$as_me:12622: result: ... $cf_attribute" >&5
12623 echo "${ECHO_T}... $cf_attribute" >&6
12624 cat conftest.h >>confdefs.h
12625 case $cf_attribute in
12628 cat >>confdefs.h <<EOF
12629 #define GCC_NORETURN $cf_directive
12634 cf_value='/* nothing */'
12635 if test "$cf_printf_attribute" != no ; then
12636 cf_value='__attribute__((format(printf,fmt,var)))'
12638 cat >>confdefs.h <<\EOF
12639 #define GCC_PRINTF 1
12644 cat >>confdefs.h <<EOF
12645 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12650 cf_value='/* nothing */'
12651 if test "$cf_scanf_attribute" != no ; then
12652 cf_value='__attribute__((format(scanf,fmt,var)))'
12654 cat >>confdefs.h <<\EOF
12655 #define GCC_SCANF 1
12660 cat >>confdefs.h <<EOF
12661 #define GCC_SCANFLIKE(fmt,var) $cf_value
12667 cat >>confdefs.h <<EOF
12668 #define GCC_UNUSED $cf_directive
12676 fgrep define conftest.i >>confdefs.h
12681 ### use option --enable-assertions to turn on generation of assertion code
12682 echo "$as_me:12682: checking if you want to enable runtime assertions" >&5
12683 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12685 # Check whether --enable-assertions or --disable-assertions was given.
12686 if test "${enable_assertions+set}" = set; then
12687 enableval="$enable_assertions"
12688 with_assertions=$enableval
12692 echo "$as_me:12692: result: $with_assertions" >&5
12693 echo "${ECHO_T}$with_assertions" >&6
12696 if test "$with_assertions" = no
12698 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12701 ADAFLAGS="$ADAFLAGS -gnata"
12706 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12708 cat >>confdefs.h <<\EOF
12709 #define HAVE_NC_ALLOC_H 1
12712 ### use option --enable-expanded to generate certain macros as functions
12714 # Check whether --enable-expanded or --disable-expanded was given.
12715 if test "${enable_expanded+set}" = set; then
12716 enableval="$enable_expanded"
12717 test "$enableval" = yes &&
12718 cat >>confdefs.h <<\EOF
12719 #define NCURSES_EXPANDED 1
12724 ### use option --disable-macros to suppress macros in favor of functions
12726 # Check whether --enable-macros or --disable-macros was given.
12727 if test "${enable_macros+set}" = set; then
12728 enableval="$enable_macros"
12729 test "$enableval" = no &&
12730 cat >>confdefs.h <<\EOF
12731 #define NCURSES_NOMACROS 1
12736 # Normally we only add trace() to the debug-library. Allow this to be
12737 # extended to all models of the ncurses library:
12739 case "$CFLAGS $CPPFLAGS" in
12745 echo "$as_me:12745: checking whether to add trace feature to all models" >&5
12746 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12748 # Check whether --with-trace or --without-trace was given.
12749 if test "${with_trace+set}" = set; then
12750 withval="$with_trace"
12751 cf_with_trace=$withval
12753 cf_with_trace=$cf_all_traces
12755 echo "$as_me:12755: result: $cf_with_trace" >&5
12756 echo "${ECHO_T}$cf_with_trace" >&6
12758 if test "$cf_with_trace" = yes ; then
12764 cf_new_extra_cppflags=
12766 for cf_add_cflags in -DTRACE
12768 case $cf_fix_cppflags in
12770 case $cf_add_cflags in
12771 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12772 case $cf_add_cflags in
12774 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12776 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12777 && test -z "${cf_tst_cflags}" \
12778 && cf_fix_cppflags=yes
12780 if test $cf_fix_cppflags = yes ; then
12782 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12783 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12786 elif test "${cf_tst_cflags}" = "\"'" ; then
12788 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12789 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12795 case "$CPPFLAGS" in
12799 case $cf_add_cflags in
12801 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12803 CPPFLAGS=`echo "$CPPFLAGS" | \
12804 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12805 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12810 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12811 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12818 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12819 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12826 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12827 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12829 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12831 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12832 && test -z "${cf_tst_cflags}" \
12833 && cf_fix_cppflags=no
12838 if test -n "$cf_new_cflags" ; then
12840 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12841 CFLAGS="${CFLAGS}$cf_new_cflags"
12845 if test -n "$cf_new_cppflags" ; then
12847 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12848 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12852 if test -n "$cf_new_extra_cppflags" ; then
12854 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12855 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12863 echo "$as_me:12863: checking if we want to use GNAT projects" >&5
12864 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
12866 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
12867 if test "${enable_gnat_projects+set}" = set; then
12868 enableval="$enable_gnat_projects"
12869 test "$enableval" != no && enableval=yes
12870 if test "$enableval" != "yes" ; then
12871 enable_gnat_projects=no
12873 enable_gnat_projects=yes
12877 enable_gnat_projects=yes
12880 echo "$as_me:12880: result: $enable_gnat_projects" >&5
12881 echo "${ECHO_T}$enable_gnat_projects" >&6
12883 ### Checks for libraries.
12884 case $cf_cv_system_name in
12888 echo "$as_me:12888: checking for gettimeofday" >&5
12889 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12890 if test "${ac_cv_func_gettimeofday+set}" = set; then
12891 echo $ECHO_N "(cached) $ECHO_C" >&6
12893 cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896 /* System header to define __stub macros and hopefully few prototypes,
12897 which can conflict with char gettimeofday (); below. */
12898 #include <assert.h>
12899 /* Override any gcc2 internal prototype to avoid an error. */
12903 /* We use char because int might match the return type of a gcc2
12904 builtin and then its argument prototype would still apply. */
12905 char gettimeofday ();
12911 /* The GNU C library defines this for functions which it implements
12912 to always fail with ENOSYS. Some functions are actually named
12913 something starting with __ and the normal name is an alias. */
12914 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12917 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12924 rm -f conftest.$ac_objext conftest$ac_exeext
12925 if { (eval echo "$as_me:12925: \"$ac_link\"") >&5
12926 (eval $ac_link) 2>&5
12928 echo "$as_me:12928: \$? = $ac_status" >&5
12929 (exit $ac_status); } &&
12930 { ac_try='test -s conftest$ac_exeext'
12931 { (eval echo "$as_me:12931: \"$ac_try\"") >&5
12932 (eval $ac_try) 2>&5
12934 echo "$as_me:12934: \$? = $ac_status" >&5
12935 (exit $ac_status); }; }; then
12936 ac_cv_func_gettimeofday=yes
12938 echo "$as_me: failed program was:" >&5
12939 cat conftest.$ac_ext >&5
12940 ac_cv_func_gettimeofday=no
12942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12944 echo "$as_me:12944: result: $ac_cv_func_gettimeofday" >&5
12945 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12946 if test $ac_cv_func_gettimeofday = yes; then
12947 cat >>confdefs.h <<\EOF
12948 #define HAVE_GETTIMEOFDAY 1
12953 echo "$as_me:12953: checking for gettimeofday in -lbsd" >&5
12954 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12955 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12956 echo $ECHO_N "(cached) $ECHO_C" >&6
12958 ac_check_lib_save_LIBS=$LIBS
12960 cat >conftest.$ac_ext <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12964 /* Override any gcc2 internal prototype to avoid an error. */
12968 /* We use char because int might match the return type of a gcc2
12969 builtin and then its argument prototype would still apply. */
12970 char gettimeofday ();
12979 rm -f conftest.$ac_objext conftest$ac_exeext
12980 if { (eval echo "$as_me:12980: \"$ac_link\"") >&5
12981 (eval $ac_link) 2>&5
12983 echo "$as_me:12983: \$? = $ac_status" >&5
12984 (exit $ac_status); } &&
12985 { ac_try='test -s conftest$ac_exeext'
12986 { (eval echo "$as_me:12986: \"$ac_try\"") >&5
12987 (eval $ac_try) 2>&5
12989 echo "$as_me:12989: \$? = $ac_status" >&5
12990 (exit $ac_status); }; }; then
12991 ac_cv_lib_bsd_gettimeofday=yes
12993 echo "$as_me: failed program was:" >&5
12994 cat conftest.$ac_ext >&5
12995 ac_cv_lib_bsd_gettimeofday=no
12997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12998 LIBS=$ac_check_lib_save_LIBS
13000 echo "$as_me:13000: result: $ac_cv_lib_bsd_gettimeofday" >&5
13001 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13002 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13004 cat >>confdefs.h <<\EOF
13005 #define HAVE_GETTIMEOFDAY 1
13015 ### Checks for header files.
13016 echo "$as_me:13016: checking for ANSI C header files" >&5
13017 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13018 if test "${ac_cv_header_stdc+set}" = set; then
13019 echo $ECHO_N "(cached) $ECHO_C" >&6
13021 cat >conftest.$ac_ext <<_ACEOF
13022 #line 13022 "configure"
13023 #include "confdefs.h"
13024 #include <stdlib.h>
13025 #include <stdarg.h>
13026 #include <string.h>
13030 if { (eval echo "$as_me:13030: \"$ac_cpp conftest.$ac_ext\"") >&5
13031 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13033 egrep -v '^ *\+' conftest.er1 >conftest.err
13035 cat conftest.err >&5
13036 echo "$as_me:13036: \$? = $ac_status" >&5
13037 (exit $ac_status); } >/dev/null; then
13038 if test -s conftest.err; then
13039 ac_cpp_err=$ac_c_preproc_warn_flag
13046 if test -z "$ac_cpp_err"; then
13047 ac_cv_header_stdc=yes
13049 echo "$as_me: failed program was:" >&5
13050 cat conftest.$ac_ext >&5
13051 ac_cv_header_stdc=no
13053 rm -f conftest.err conftest.$ac_ext
13055 if test $ac_cv_header_stdc = yes; then
13056 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13057 cat >conftest.$ac_ext <<_ACEOF
13058 #line 13058 "configure"
13059 #include "confdefs.h"
13060 #include <string.h>
13063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13064 egrep "memchr" >/dev/null 2>&1; then
13067 ac_cv_header_stdc=no
13073 if test $ac_cv_header_stdc = yes; then
13074 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13075 cat >conftest.$ac_ext <<_ACEOF
13076 #line 13076 "configure"
13077 #include "confdefs.h"
13078 #include <stdlib.h>
13081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13082 egrep "free" >/dev/null 2>&1; then
13085 ac_cv_header_stdc=no
13091 if test $ac_cv_header_stdc = yes; then
13092 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13093 if test "$cross_compiling" = yes; then
13096 cat >conftest.$ac_ext <<_ACEOF
13097 #line 13097 "configure"
13098 #include "confdefs.h"
13100 #if ((' ' & 0x0FF) == 0x020)
13101 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13102 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13104 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13105 || ('j' <= (c) && (c) <= 'r') \
13106 || ('s' <= (c) && (c) <= 'z'))
13107 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13110 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13115 for (i = 0; i < 256; i++)
13116 if (XOR (islower (i), ISLOWER (i))
13117 || toupper (i) != TOUPPER (i))
13118 $ac_main_return(2);
13119 $ac_main_return (0);
13122 rm -f conftest$ac_exeext
13123 if { (eval echo "$as_me:13123: \"$ac_link\"") >&5
13124 (eval $ac_link) 2>&5
13126 echo "$as_me:13126: \$? = $ac_status" >&5
13127 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13128 { (eval echo "$as_me:13128: \"$ac_try\"") >&5
13129 (eval $ac_try) 2>&5
13131 echo "$as_me:13131: \$? = $ac_status" >&5
13132 (exit $ac_status); }; }; then
13135 echo "$as_me: program exited with status $ac_status" >&5
13136 echo "$as_me: failed program was:" >&5
13137 cat conftest.$ac_ext >&5
13138 ac_cv_header_stdc=no
13140 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13144 echo "$as_me:13144: result: $ac_cv_header_stdc" >&5
13145 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13146 if test $ac_cv_header_stdc = yes; then
13148 cat >>confdefs.h <<\EOF
13149 #define STDC_HEADERS 1
13154 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13156 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13157 inttypes.h stdint.h unistd.h
13159 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13160 echo "$as_me:13160: checking for $ac_header" >&5
13161 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13162 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13163 echo $ECHO_N "(cached) $ECHO_C" >&6
13165 cat >conftest.$ac_ext <<_ACEOF
13166 #line 13166 "configure"
13167 #include "confdefs.h"
13168 $ac_includes_default
13169 #include <$ac_header>
13171 rm -f conftest.$ac_objext
13172 if { (eval echo "$as_me:13172: \"$ac_compile\"") >&5
13173 (eval $ac_compile) 2>&5
13175 echo "$as_me:13175: \$? = $ac_status" >&5
13176 (exit $ac_status); } &&
13177 { ac_try='test -s conftest.$ac_objext'
13178 { (eval echo "$as_me:13178: \"$ac_try\"") >&5
13179 (eval $ac_try) 2>&5
13181 echo "$as_me:13181: \$? = $ac_status" >&5
13182 (exit $ac_status); }; }; then
13183 eval "$as_ac_Header=yes"
13185 echo "$as_me: failed program was:" >&5
13186 cat conftest.$ac_ext >&5
13187 eval "$as_ac_Header=no"
13189 rm -f conftest.$ac_objext conftest.$ac_ext
13191 echo "$as_me:13191: result: `eval echo '${'$as_ac_Header'}'`" >&5
13192 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13193 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13194 cat >>confdefs.h <<EOF
13195 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13201 echo "$as_me:13201: checking for signed char" >&5
13202 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13203 if test "${ac_cv_type_signed_char+set}" = set; then
13204 echo $ECHO_N "(cached) $ECHO_C" >&6
13206 cat >conftest.$ac_ext <<_ACEOF
13207 #line 13207 "configure"
13208 #include "confdefs.h"
13209 $ac_includes_default
13213 if ((signed char *) 0)
13215 if (sizeof (signed char))
13221 rm -f conftest.$ac_objext
13222 if { (eval echo "$as_me:13222: \"$ac_compile\"") >&5
13223 (eval $ac_compile) 2>&5
13225 echo "$as_me:13225: \$? = $ac_status" >&5
13226 (exit $ac_status); } &&
13227 { ac_try='test -s conftest.$ac_objext'
13228 { (eval echo "$as_me:13228: \"$ac_try\"") >&5
13229 (eval $ac_try) 2>&5
13231 echo "$as_me:13231: \$? = $ac_status" >&5
13232 (exit $ac_status); }; }; then
13233 ac_cv_type_signed_char=yes
13235 echo "$as_me: failed program was:" >&5
13236 cat conftest.$ac_ext >&5
13237 ac_cv_type_signed_char=no
13239 rm -f conftest.$ac_objext conftest.$ac_ext
13241 echo "$as_me:13241: result: $ac_cv_type_signed_char" >&5
13242 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13244 echo "$as_me:13244: checking size of signed char" >&5
13245 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13246 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13247 echo $ECHO_N "(cached) $ECHO_C" >&6
13249 if test "$ac_cv_type_signed_char" = yes; then
13250 if test "$cross_compiling" = yes; then
13251 # Depending upon the size, compute the lo and hi bounds.
13252 cat >conftest.$ac_ext <<_ACEOF
13253 #line 13253 "configure"
13254 #include "confdefs.h"
13255 $ac_includes_default
13259 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13264 rm -f conftest.$ac_objext
13265 if { (eval echo "$as_me:13265: \"$ac_compile\"") >&5
13266 (eval $ac_compile) 2>&5
13268 echo "$as_me:13268: \$? = $ac_status" >&5
13269 (exit $ac_status); } &&
13270 { ac_try='test -s conftest.$ac_objext'
13271 { (eval echo "$as_me:13271: \"$ac_try\"") >&5
13272 (eval $ac_try) 2>&5
13274 echo "$as_me:13274: \$? = $ac_status" >&5
13275 (exit $ac_status); }; }; then
13278 cat >conftest.$ac_ext <<_ACEOF
13279 #line 13279 "configure"
13280 #include "confdefs.h"
13281 $ac_includes_default
13285 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13290 rm -f conftest.$ac_objext
13291 if { (eval echo "$as_me:13291: \"$ac_compile\"") >&5
13292 (eval $ac_compile) 2>&5
13294 echo "$as_me:13294: \$? = $ac_status" >&5
13295 (exit $ac_status); } &&
13296 { ac_try='test -s conftest.$ac_objext'
13297 { (eval echo "$as_me:13297: \"$ac_try\"") >&5
13298 (eval $ac_try) 2>&5
13300 echo "$as_me:13300: \$? = $ac_status" >&5
13301 (exit $ac_status); }; }; then
13302 ac_hi=$ac_mid; break
13304 echo "$as_me: failed program was:" >&5
13305 cat conftest.$ac_ext >&5
13306 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13308 rm -f conftest.$ac_objext conftest.$ac_ext
13311 echo "$as_me: failed program was:" >&5
13312 cat conftest.$ac_ext >&5
13315 cat >conftest.$ac_ext <<_ACEOF
13316 #line 13316 "configure"
13317 #include "confdefs.h"
13318 $ac_includes_default
13322 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13327 rm -f conftest.$ac_objext
13328 if { (eval echo "$as_me:13328: \"$ac_compile\"") >&5
13329 (eval $ac_compile) 2>&5
13331 echo "$as_me:13331: \$? = $ac_status" >&5
13332 (exit $ac_status); } &&
13333 { ac_try='test -s conftest.$ac_objext'
13334 { (eval echo "$as_me:13334: \"$ac_try\"") >&5
13335 (eval $ac_try) 2>&5
13337 echo "$as_me:13337: \$? = $ac_status" >&5
13338 (exit $ac_status); }; }; then
13339 ac_lo=$ac_mid; break
13341 echo "$as_me: failed program was:" >&5
13342 cat conftest.$ac_ext >&5
13343 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13345 rm -f conftest.$ac_objext conftest.$ac_ext
13348 rm -f conftest.$ac_objext conftest.$ac_ext
13349 # Binary search between lo and hi bounds.
13350 while test "x$ac_lo" != "x$ac_hi"; do
13351 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13352 cat >conftest.$ac_ext <<_ACEOF
13353 #line 13353 "configure"
13354 #include "confdefs.h"
13355 $ac_includes_default
13359 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13364 rm -f conftest.$ac_objext
13365 if { (eval echo "$as_me:13365: \"$ac_compile\"") >&5
13366 (eval $ac_compile) 2>&5
13368 echo "$as_me:13368: \$? = $ac_status" >&5
13369 (exit $ac_status); } &&
13370 { ac_try='test -s conftest.$ac_objext'
13371 { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372 (eval $ac_try) 2>&5
13374 echo "$as_me:13374: \$? = $ac_status" >&5
13375 (exit $ac_status); }; }; then
13378 echo "$as_me: failed program was:" >&5
13379 cat conftest.$ac_ext >&5
13380 ac_lo=`expr $ac_mid + 1`
13382 rm -f conftest.$ac_objext conftest.$ac_ext
13384 ac_cv_sizeof_signed_char=$ac_lo
13386 if test "$cross_compiling" = yes; then
13387 { { echo "$as_me:13387: error: cannot run test program while cross compiling" >&5
13388 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13389 { (exit 1); exit 1; }; }
13391 cat >conftest.$ac_ext <<_ACEOF
13392 #line 13392 "configure"
13393 #include "confdefs.h"
13394 $ac_includes_default
13398 FILE *f = fopen ("conftest.val", "w");
13400 $ac_main_return (1);
13401 fprintf (f, "%d", (sizeof (signed char)));
13407 rm -f conftest$ac_exeext
13408 if { (eval echo "$as_me:13408: \"$ac_link\"") >&5
13409 (eval $ac_link) 2>&5
13411 echo "$as_me:13411: \$? = $ac_status" >&5
13412 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13413 { (eval echo "$as_me:13413: \"$ac_try\"") >&5
13414 (eval $ac_try) 2>&5
13416 echo "$as_me:13416: \$? = $ac_status" >&5
13417 (exit $ac_status); }; }; then
13418 ac_cv_sizeof_signed_char=`cat conftest.val`
13420 echo "$as_me: program exited with status $ac_status" >&5
13421 echo "$as_me: failed program was:" >&5
13422 cat conftest.$ac_ext >&5
13424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13429 ac_cv_sizeof_signed_char=0
13432 echo "$as_me:13432: result: $ac_cv_sizeof_signed_char" >&5
13433 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13434 cat >>confdefs.h <<EOF
13435 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13438 echo "$as_me:13438: checking for ANSI C header files" >&5
13439 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13440 if test "${ac_cv_header_stdc+set}" = set; then
13441 echo $ECHO_N "(cached) $ECHO_C" >&6
13443 cat >conftest.$ac_ext <<_ACEOF
13444 #line 13444 "configure"
13445 #include "confdefs.h"
13446 #include <stdlib.h>
13447 #include <stdarg.h>
13448 #include <string.h>
13452 if { (eval echo "$as_me:13452: \"$ac_cpp conftest.$ac_ext\"") >&5
13453 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13455 egrep -v '^ *\+' conftest.er1 >conftest.err
13457 cat conftest.err >&5
13458 echo "$as_me:13458: \$? = $ac_status" >&5
13459 (exit $ac_status); } >/dev/null; then
13460 if test -s conftest.err; then
13461 ac_cpp_err=$ac_c_preproc_warn_flag
13468 if test -z "$ac_cpp_err"; then
13469 ac_cv_header_stdc=yes
13471 echo "$as_me: failed program was:" >&5
13472 cat conftest.$ac_ext >&5
13473 ac_cv_header_stdc=no
13475 rm -f conftest.err conftest.$ac_ext
13477 if test $ac_cv_header_stdc = yes; then
13478 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13479 cat >conftest.$ac_ext <<_ACEOF
13480 #line 13480 "configure"
13481 #include "confdefs.h"
13482 #include <string.h>
13485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13486 egrep "memchr" >/dev/null 2>&1; then
13489 ac_cv_header_stdc=no
13495 if test $ac_cv_header_stdc = yes; then
13496 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13497 cat >conftest.$ac_ext <<_ACEOF
13498 #line 13498 "configure"
13499 #include "confdefs.h"
13500 #include <stdlib.h>
13503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13504 egrep "free" >/dev/null 2>&1; then
13507 ac_cv_header_stdc=no
13513 if test $ac_cv_header_stdc = yes; then
13514 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13515 if test "$cross_compiling" = yes; then
13518 cat >conftest.$ac_ext <<_ACEOF
13519 #line 13519 "configure"
13520 #include "confdefs.h"
13522 #if ((' ' & 0x0FF) == 0x020)
13523 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13524 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13526 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13527 || ('j' <= (c) && (c) <= 'r') \
13528 || ('s' <= (c) && (c) <= 'z'))
13529 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13532 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13537 for (i = 0; i < 256; i++)
13538 if (XOR (islower (i), ISLOWER (i))
13539 || toupper (i) != TOUPPER (i))
13540 $ac_main_return(2);
13541 $ac_main_return (0);
13544 rm -f conftest$ac_exeext
13545 if { (eval echo "$as_me:13545: \"$ac_link\"") >&5
13546 (eval $ac_link) 2>&5
13548 echo "$as_me:13548: \$? = $ac_status" >&5
13549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13550 { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551 (eval $ac_try) 2>&5
13553 echo "$as_me:13553: \$? = $ac_status" >&5
13554 (exit $ac_status); }; }; then
13557 echo "$as_me: program exited with status $ac_status" >&5
13558 echo "$as_me: failed program was:" >&5
13559 cat conftest.$ac_ext >&5
13560 ac_cv_header_stdc=no
13562 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13566 echo "$as_me:13566: result: $ac_cv_header_stdc" >&5
13567 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13568 if test $ac_cv_header_stdc = yes; then
13570 cat >>confdefs.h <<\EOF
13571 #define STDC_HEADERS 1
13576 ac_header_dirent=no
13577 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13578 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13579 echo "$as_me:13579: checking for $ac_hdr that defines DIR" >&5
13580 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13581 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13582 echo $ECHO_N "(cached) $ECHO_C" >&6
13584 cat >conftest.$ac_ext <<_ACEOF
13585 #line 13585 "configure"
13586 #include "confdefs.h"
13587 #include <sys/types.h>
13599 rm -f conftest.$ac_objext
13600 if { (eval echo "$as_me:13600: \"$ac_compile\"") >&5
13601 (eval $ac_compile) 2>&5
13603 echo "$as_me:13603: \$? = $ac_status" >&5
13604 (exit $ac_status); } &&
13605 { ac_try='test -s conftest.$ac_objext'
13606 { (eval echo "$as_me:13606: \"$ac_try\"") >&5
13607 (eval $ac_try) 2>&5
13609 echo "$as_me:13609: \$? = $ac_status" >&5
13610 (exit $ac_status); }; }; then
13611 eval "$as_ac_Header=yes"
13613 echo "$as_me: failed program was:" >&5
13614 cat conftest.$ac_ext >&5
13615 eval "$as_ac_Header=no"
13617 rm -f conftest.$ac_objext conftest.$ac_ext
13619 echo "$as_me:13619: result: `eval echo '${'$as_ac_Header'}'`" >&5
13620 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13621 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13622 cat >>confdefs.h <<EOF
13623 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13626 ac_header_dirent=$ac_hdr; break
13630 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13631 if test $ac_header_dirent = dirent.h; then
13632 echo "$as_me:13632: checking for opendir in -ldir" >&5
13633 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13634 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13635 echo $ECHO_N "(cached) $ECHO_C" >&6
13637 ac_check_lib_save_LIBS=$LIBS
13639 cat >conftest.$ac_ext <<_ACEOF
13640 #line 13640 "configure"
13641 #include "confdefs.h"
13643 /* Override any gcc2 internal prototype to avoid an error. */
13647 /* We use char because int might match the return type of a gcc2
13648 builtin and then its argument prototype would still apply. */
13658 rm -f conftest.$ac_objext conftest$ac_exeext
13659 if { (eval echo "$as_me:13659: \"$ac_link\"") >&5
13660 (eval $ac_link) 2>&5
13662 echo "$as_me:13662: \$? = $ac_status" >&5
13663 (exit $ac_status); } &&
13664 { ac_try='test -s conftest$ac_exeext'
13665 { (eval echo "$as_me:13665: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13668 echo "$as_me:13668: \$? = $ac_status" >&5
13669 (exit $ac_status); }; }; then
13670 ac_cv_lib_dir_opendir=yes
13672 echo "$as_me: failed program was:" >&5
13673 cat conftest.$ac_ext >&5
13674 ac_cv_lib_dir_opendir=no
13676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13677 LIBS=$ac_check_lib_save_LIBS
13679 echo "$as_me:13679: result: $ac_cv_lib_dir_opendir" >&5
13680 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13681 if test $ac_cv_lib_dir_opendir = yes; then
13686 echo "$as_me:13686: checking for opendir in -lx" >&5
13687 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13688 if test "${ac_cv_lib_x_opendir+set}" = set; then
13689 echo $ECHO_N "(cached) $ECHO_C" >&6
13691 ac_check_lib_save_LIBS=$LIBS
13693 cat >conftest.$ac_ext <<_ACEOF
13694 #line 13694 "configure"
13695 #include "confdefs.h"
13697 /* Override any gcc2 internal prototype to avoid an error. */
13701 /* We use char because int might match the return type of a gcc2
13702 builtin and then its argument prototype would still apply. */
13712 rm -f conftest.$ac_objext conftest$ac_exeext
13713 if { (eval echo "$as_me:13713: \"$ac_link\"") >&5
13714 (eval $ac_link) 2>&5
13716 echo "$as_me:13716: \$? = $ac_status" >&5
13717 (exit $ac_status); } &&
13718 { ac_try='test -s conftest$ac_exeext'
13719 { (eval echo "$as_me:13719: \"$ac_try\"") >&5
13720 (eval $ac_try) 2>&5
13722 echo "$as_me:13722: \$? = $ac_status" >&5
13723 (exit $ac_status); }; }; then
13724 ac_cv_lib_x_opendir=yes
13726 echo "$as_me: failed program was:" >&5
13727 cat conftest.$ac_ext >&5
13728 ac_cv_lib_x_opendir=no
13730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13731 LIBS=$ac_check_lib_save_LIBS
13733 echo "$as_me:13733: result: $ac_cv_lib_x_opendir" >&5
13734 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13735 if test $ac_cv_lib_x_opendir = yes; then
13741 echo "$as_me:13741: checking whether time.h and sys/time.h may both be included" >&5
13742 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13743 if test "${ac_cv_header_time+set}" = set; then
13744 echo $ECHO_N "(cached) $ECHO_C" >&6
13746 cat >conftest.$ac_ext <<_ACEOF
13747 #line 13747 "configure"
13748 #include "confdefs.h"
13749 #include <sys/types.h>
13750 #include <sys/time.h>
13756 if ((struct tm *) 0)
13762 rm -f conftest.$ac_objext
13763 if { (eval echo "$as_me:13763: \"$ac_compile\"") >&5
13764 (eval $ac_compile) 2>&5
13766 echo "$as_me:13766: \$? = $ac_status" >&5
13767 (exit $ac_status); } &&
13768 { ac_try='test -s conftest.$ac_objext'
13769 { (eval echo "$as_me:13769: \"$ac_try\"") >&5
13770 (eval $ac_try) 2>&5
13772 echo "$as_me:13772: \$? = $ac_status" >&5
13773 (exit $ac_status); }; }; then
13774 ac_cv_header_time=yes
13776 echo "$as_me: failed program was:" >&5
13777 cat conftest.$ac_ext >&5
13778 ac_cv_header_time=no
13780 rm -f conftest.$ac_objext conftest.$ac_ext
13782 echo "$as_me:13782: result: $ac_cv_header_time" >&5
13783 echo "${ECHO_T}$ac_cv_header_time" >&6
13784 if test $ac_cv_header_time = yes; then
13786 cat >>confdefs.h <<\EOF
13787 #define TIME_WITH_SYS_TIME 1
13792 ### checks for compiler characteristics
13794 ac_cpp='$CPP $CPPFLAGS'
13795 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13796 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13797 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13798 ac_main_return=return
13800 echo "$as_me:13800: checking for an ANSI C-conforming const" >&5
13801 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13802 if test "${ac_cv_c_const+set}" = set; then
13803 echo $ECHO_N "(cached) $ECHO_C" >&6
13805 cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13812 /* FIXME: Include the comments suggested by Paul. */
13813 #ifndef __cplusplus
13814 /* Ultrix mips cc rejects this. */
13815 typedef int charset[2];
13817 /* SunOS 4.1.1 cc rejects this. */
13818 char const *const *ccp;
13820 /* NEC SVR4.0.2 mips cc rejects this. */
13821 struct point {int x, y;};
13822 static struct point const zero = {0,0};
13823 /* AIX XL C 1.02.0.0 rejects this.
13824 It does not let you subtract one const X* pointer from another in
13825 an arm of an if-expression whose if-part is not a constant
13827 const char *g = "string";
13828 ccp = &g + (g ? g-g : 0);
13829 /* HPUX 7.0 cc rejects these. */
13832 ccp = (char const *const *) p;
13833 { /* SCO 3.2v4 cc rejects this. */
13835 char const *s = 0 ? (char *) 0 : (char const *) 0;
13839 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13840 int x[] = {25, 17};
13841 const int *foo = &x[0];
13844 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13845 typedef const int *iptr;
13849 { /* AIX XL C 1.02.0.0 rejects this saying
13850 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13851 struct s { int j; const int *ap[3]; };
13852 struct s *b; b->j = 5;
13854 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13855 const int foo = 10;
13863 rm -f conftest.$ac_objext
13864 if { (eval echo "$as_me:13864: \"$ac_compile\"") >&5
13865 (eval $ac_compile) 2>&5
13867 echo "$as_me:13867: \$? = $ac_status" >&5
13868 (exit $ac_status); } &&
13869 { ac_try='test -s conftest.$ac_objext'
13870 { (eval echo "$as_me:13870: \"$ac_try\"") >&5
13871 (eval $ac_try) 2>&5
13873 echo "$as_me:13873: \$? = $ac_status" >&5
13874 (exit $ac_status); }; }; then
13877 echo "$as_me: failed program was:" >&5
13878 cat conftest.$ac_ext >&5
13881 rm -f conftest.$ac_objext conftest.$ac_ext
13883 echo "$as_me:13883: result: $ac_cv_c_const" >&5
13884 echo "${ECHO_T}$ac_cv_c_const" >&6
13885 if test $ac_cv_c_const = no; then
13887 cat >>confdefs.h <<\EOF
13893 ### Checks for external-data
13895 echo "$as_me:13895: checking if data-only library module links" >&5
13896 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13897 if test "${cf_cv_link_dataonly+set}" = set; then
13898 echo $ECHO_N "(cached) $ECHO_C" >&6
13902 cat >conftest.$ac_ext <<EOF
13903 #line 13903 "configure"
13904 int testdata[3] = { 123, 456, 789 };
13906 if { (eval echo "$as_me:13906: \"$ac_compile\"") >&5
13907 (eval $ac_compile) 2>&5
13909 echo "$as_me:13909: \$? = $ac_status" >&5
13910 (exit $ac_status); } ; then
13911 mv conftest.o data.o && \
13912 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13914 rm -f conftest.$ac_ext data.o
13915 cat >conftest.$ac_ext <<EOF
13916 #line 13916 "configure"
13920 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
13922 extern int testdata[3];
13923 return testdata[0] == 123
13924 && testdata[1] == 456
13925 && testdata[2] == 789;
13929 if { (eval echo "$as_me:13929: \"$ac_compile\"") >&5
13930 (eval $ac_compile) 2>&5
13932 echo "$as_me:13932: \$? = $ac_status" >&5
13933 (exit $ac_status); }; then
13934 mv conftest.o func.o && \
13935 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13937 rm -f conftest.$ac_ext func.o
13938 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13939 cf_saveLIBS="$LIBS"
13940 LIBS="conftest.a $LIBS"
13941 if test "$cross_compiling" = yes; then
13942 cf_cv_link_dataonly=unknown
13944 cat >conftest.$ac_ext <<_ACEOF
13945 #line 13945 "configure"
13946 #include "confdefs.h"
13950 extern int testfunc();
13951 ${cf_cv_main_return:-return} (!testfunc());
13955 rm -f conftest$ac_exeext
13956 if { (eval echo "$as_me:13956: \"$ac_link\"") >&5
13957 (eval $ac_link) 2>&5
13959 echo "$as_me:13959: \$? = $ac_status" >&5
13960 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13961 { (eval echo "$as_me:13961: \"$ac_try\"") >&5
13962 (eval $ac_try) 2>&5
13964 echo "$as_me:13964: \$? = $ac_status" >&5
13965 (exit $ac_status); }; }; then
13966 cf_cv_link_dataonly=yes
13968 echo "$as_me: program exited with status $ac_status" >&5
13969 echo "$as_me: failed program was:" >&5
13970 cat conftest.$ac_ext >&5
13971 cf_cv_link_dataonly=no
13973 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13975 LIBS="$cf_saveLIBS"
13979 echo "$as_me:13979: result: $cf_cv_link_dataonly" >&5
13980 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13982 if test "$cf_cv_link_dataonly" = no ; then
13984 cat >>confdefs.h <<\EOF
13985 #define BROKEN_LINKER 1
13991 ### Checks for library functions.
13997 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13998 echo "$as_me:13998: checking for $ac_header" >&5
13999 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14000 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14001 echo $ECHO_N "(cached) $ECHO_C" >&6
14003 cat >conftest.$ac_ext <<_ACEOF
14004 #line 14004 "configure"
14005 #include "confdefs.h"
14006 #include <$ac_header>
14008 if { (eval echo "$as_me:14008: \"$ac_cpp conftest.$ac_ext\"") >&5
14009 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14011 egrep -v '^ *\+' conftest.er1 >conftest.err
14013 cat conftest.err >&5
14014 echo "$as_me:14014: \$? = $ac_status" >&5
14015 (exit $ac_status); } >/dev/null; then
14016 if test -s conftest.err; then
14017 ac_cpp_err=$ac_c_preproc_warn_flag
14024 if test -z "$ac_cpp_err"; then
14025 eval "$as_ac_Header=yes"
14027 echo "$as_me: failed program was:" >&5
14028 cat conftest.$ac_ext >&5
14029 eval "$as_ac_Header=no"
14031 rm -f conftest.err conftest.$ac_ext
14033 echo "$as_me:14033: result: `eval echo '${'$as_ac_Header'}'`" >&5
14034 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14035 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14036 cat >>confdefs.h <<EOF
14037 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14043 echo "$as_me:14043: checking for working mkstemp" >&5
14044 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14045 if test "${cf_cv_func_mkstemp+set}" = set; then
14046 echo $ECHO_N "(cached) $ECHO_C" >&6
14050 if test "$cross_compiling" = yes; then
14051 cf_cv_func_mkstemp=maybe
14053 cat >conftest.$ac_ext <<_ACEOF
14054 #line 14054 "configure"
14055 #include "confdefs.h"
14057 #include <sys/types.h>
14058 #ifdef HAVE_UNISTD_H
14059 #include <unistd.h>
14061 #include <stdlib.h>
14063 #include <string.h>
14064 #include <sys/stat.h>
14067 char *tmpl = "conftestXXXXXX";
14075 for (n = 0; n < 2; ++n) {
14076 strcpy(name[n], tmpl);
14077 if ((fd = mkstemp(name[n])) >= 0) {
14078 if (!strcmp(name[n], tmpl)
14079 || stat(name[n], &sb) != 0
14080 || (sb.st_mode & S_IFMT) != S_IFREG
14081 || (sb.st_mode & 077) != 0) {
14088 && !strcmp(name[0], name[1]))
14090 ${cf_cv_main_return:-return}(result);
14094 rm -f conftest$ac_exeext
14095 if { (eval echo "$as_me:14095: \"$ac_link\"") >&5
14096 (eval $ac_link) 2>&5
14098 echo "$as_me:14098: \$? = $ac_status" >&5
14099 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14100 { (eval echo "$as_me:14100: \"$ac_try\"") >&5
14101 (eval $ac_try) 2>&5
14103 echo "$as_me:14103: \$? = $ac_status" >&5
14104 (exit $ac_status); }; }; then
14105 cf_cv_func_mkstemp=yes
14108 echo "$as_me: program exited with status $ac_status" >&5
14109 echo "$as_me: failed program was:" >&5
14110 cat conftest.$ac_ext >&5
14111 cf_cv_func_mkstemp=no
14114 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14118 echo "$as_me:14118: result: $cf_cv_func_mkstemp" >&5
14119 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14120 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
14121 echo "$as_me:14121: checking for mkstemp" >&5
14122 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14123 if test "${ac_cv_func_mkstemp+set}" = set; then
14124 echo $ECHO_N "(cached) $ECHO_C" >&6
14126 cat >conftest.$ac_ext <<_ACEOF
14127 #line 14127 "configure"
14128 #include "confdefs.h"
14129 /* System header to define __stub macros and hopefully few prototypes,
14130 which can conflict with char mkstemp (); below. */
14131 #include <assert.h>
14132 /* Override any gcc2 internal prototype to avoid an error. */
14136 /* We use char because int might match the return type of a gcc2
14137 builtin and then its argument prototype would still apply. */
14144 /* The GNU C library defines this for functions which it implements
14145 to always fail with ENOSYS. Some functions are actually named
14146 something starting with __ and the normal name is an alias. */
14147 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14150 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14157 rm -f conftest.$ac_objext conftest$ac_exeext
14158 if { (eval echo "$as_me:14158: \"$ac_link\"") >&5
14159 (eval $ac_link) 2>&5
14161 echo "$as_me:14161: \$? = $ac_status" >&5
14162 (exit $ac_status); } &&
14163 { ac_try='test -s conftest$ac_exeext'
14164 { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165 (eval $ac_try) 2>&5
14167 echo "$as_me:14167: \$? = $ac_status" >&5
14168 (exit $ac_status); }; }; then
14169 ac_cv_func_mkstemp=yes
14171 echo "$as_me: failed program was:" >&5
14172 cat conftest.$ac_ext >&5
14173 ac_cv_func_mkstemp=no
14175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14177 echo "$as_me:14177: result: $ac_cv_func_mkstemp" >&5
14178 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14181 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
14183 cat >>confdefs.h <<\EOF
14184 #define HAVE_MKSTEMP 1
14189 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14190 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14191 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14195 if test "$cf_with_ada" != "no" ; then
14197 cf_ada_make=gnatmake
14198 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14199 set dummy $cf_ada_make; ac_word=$2
14200 echo "$as_me:14200: checking for $ac_word" >&5
14201 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14202 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14203 echo $ECHO_N "(cached) $ECHO_C" >&6
14205 if test -n "$gnat_exists"; then
14206 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14208 ac_save_IFS=$IFS; IFS=$ac_path_separator
14210 for ac_dir in $ac_dummy; do
14212 test -z "$ac_dir" && ac_dir=.
14213 $as_executable_p "$ac_dir/$ac_word" || continue
14214 ac_cv_prog_gnat_exists="yes"
14215 echo "$as_me:14215: found $ac_dir/$ac_word" >&5
14219 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14222 gnat_exists=$ac_cv_prog_gnat_exists
14223 if test -n "$gnat_exists"; then
14224 echo "$as_me:14224: result: $gnat_exists" >&5
14225 echo "${ECHO_T}$gnat_exists" >&6
14227 echo "$as_me:14227: result: no" >&5
14228 echo "${ECHO_T}no" >&6
14231 if test "$ac_cv_prog_gnat_exists" = no; then
14233 cf_cv_prog_gnat_correct=no
14236 echo "$as_me:14236: checking for gnat version" >&5
14237 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14238 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
14239 grep '[0-9].[0-9][0-9]*' |\
14240 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14241 echo "$as_me:14241: result: $cf_gnat_version" >&5
14242 echo "${ECHO_T}$cf_gnat_version" >&6
14244 case $cf_gnat_version in
14245 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
14246 cf_cv_prog_gnat_correct=yes
14249 { echo "$as_me:14249: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
14250 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
14251 cf_cv_prog_gnat_correct=no
14255 # Extract the first word of "m4", so it can be a program name with args.
14256 set dummy m4; ac_word=$2
14257 echo "$as_me:14257: checking for $ac_word" >&5
14258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14259 if test "${ac_cv_prog_M4_exists+set}" = set; then
14260 echo $ECHO_N "(cached) $ECHO_C" >&6
14262 if test -n "$M4_exists"; then
14263 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14265 ac_save_IFS=$IFS; IFS=$ac_path_separator
14267 for ac_dir in $ac_dummy; do
14269 test -z "$ac_dir" && ac_dir=.
14270 $as_executable_p "$ac_dir/$ac_word" || continue
14271 ac_cv_prog_M4_exists="yes"
14272 echo "$as_me:14272: found $ac_dir/$ac_word" >&5
14276 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14279 M4_exists=$ac_cv_prog_M4_exists
14280 if test -n "$M4_exists"; then
14281 echo "$as_me:14281: result: $M4_exists" >&5
14282 echo "${ECHO_T}$M4_exists" >&6
14284 echo "$as_me:14284: result: no" >&5
14285 echo "${ECHO_T}no" >&6
14288 if test "$ac_cv_prog_M4_exists" = no; then
14289 cf_cv_prog_gnat_correct=no
14290 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14292 if test "$cf_cv_prog_gnat_correct" = yes; then
14293 echo "$as_me:14293: checking if GNAT works" >&5
14294 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14296 rm -rf conftest* *~conftest*
14297 cat >>conftest.ads <<CF_EOF
14298 procedure conftest;
14300 cat >>conftest.adb <<CF_EOF
14303 procedure conftest is
14305 Text_IO.Put ("Hello World");
14307 GNAT.OS_Lib.OS_Exit (0);
14310 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14311 if ( ./conftest 1>&5 2>&1 ) ; then
14312 cf_cv_prog_gnat_correct=yes
14314 cf_cv_prog_gnat_correct=no
14317 cf_cv_prog_gnat_correct=no
14319 rm -rf conftest* *~conftest*
14321 echo "$as_me:14321: result: $cf_cv_prog_gnat_correct" >&5
14322 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14326 if test "$cf_cv_prog_gnat_correct" = yes; then
14328 echo "$as_me:14328: checking optimization options for ADAFLAGS" >&5
14329 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
14333 ADAFLAGS="$ADAFLAGS -g"
14339 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
14341 ADAFLAGS="$ADAFLAGS $cf_O_flag"
14345 echo "$as_me:14345: result: $ADAFLAGS" >&5
14346 echo "${ECHO_T}$ADAFLAGS" >&6
14348 echo "$as_me:14348: checking if GNATPREP supports -T option" >&5
14349 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
14350 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
14351 echo $ECHO_N "(cached) $ECHO_C" >&6
14354 cf_cv_gnatprep_opt_t=no
14355 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
14358 echo "$as_me:14358: result: $cf_cv_gnatprep_opt_t" >&5
14359 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
14360 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
14362 echo "$as_me:14362: checking if GNAT supports generics" >&5
14363 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
14364 case $cf_gnat_version in
14366 cf_gnat_generics=yes
14369 cf_gnat_generics=no
14372 echo "$as_me:14372: result: $cf_gnat_generics" >&5
14373 echo "${ECHO_T}$cf_gnat_generics" >&6
14375 if test "$cf_gnat_generics" = yes
14377 cf_compile_generics=generics
14378 cf_generic_objects="\${GENOBJS}"
14380 cf_compile_generics=
14381 cf_generic_objects=
14384 echo "$as_me:14384: checking if GNAT supports SIGINT" >&5
14385 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
14386 if test "${cf_cv_gnat_sigint+set}" = set; then
14387 echo $ECHO_N "(cached) $ECHO_C" >&6
14390 rm -rf conftest* *~conftest*
14391 cat >>conftest.ads <<CF_EOF
14392 with Ada.Interrupts.Names;
14394 package ConfTest is
14396 pragma Warnings (Off); -- the next pragma exists since 3.11p
14397 pragma Unreserve_All_Interrupts;
14398 pragma Warnings (On);
14400 protected Process is
14402 function Continue return Boolean;
14403 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
14405 Done : Boolean := False;
14410 cat >>conftest.adb <<CF_EOF
14411 package body ConfTest is
14412 protected body Process is
14417 function Continue return Boolean is
14424 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14425 cf_cv_gnat_sigint=yes
14427 cf_cv_gnat_sigint=no
14429 rm -rf conftest* *~conftest*
14432 echo "$as_me:14432: result: $cf_cv_gnat_sigint" >&5
14433 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
14435 if test $cf_cv_gnat_sigint = yes ; then
14438 USE_GNAT_SIGINT="#"
14441 cf_gnat_libraries=no
14442 cf_gnat_projects=no
14444 if test "$enable_gnat_projects" != no ; then
14445 echo "$as_me:14445: checking if GNAT supports project files" >&5
14446 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
14447 case $cf_gnat_version in
14451 case $cf_cv_system_name in
14455 mkdir conftest.src conftest.bin conftest.lib
14457 rm -rf conftest* *~conftest*
14458 cat >>library.gpr <<CF_EOF
14460 Kind := External ("LIB_KIND");
14461 for Library_Name use "ConfTest";
14462 for Object_Dir use ".";
14463 for Library_ALI_Dir use External("LIBRARY_DIR");
14464 for Library_Version use External ("SONAME");
14465 for Library_Kind use Kind;
14466 for Library_Dir use External("BUILD_DIR");
14467 Source_Dir := External ("SOURCE_DIR");
14468 for Source_Dirs use (Source_Dir);
14471 cat >>confpackage.ads <<CF_EOF
14472 package ConfPackage is
14473 procedure conftest;
14476 cat >>confpackage.adb <<CF_EOF
14478 package body ConfPackage is
14479 procedure conftest is
14481 Text_IO.Put ("Hello World");
14486 if ( $cf_ada_make $ADAFLAGS \
14488 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
14489 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
14490 -XSOURCE_DIR=`pwd` \
14491 -XSONAME=libConfTest.so.1 \
14492 -XLIB_KIND=static 1>&5 2>&1 ) ; then
14493 cf_gnat_projects=yes
14496 if test -f conftest.lib/confpackage.ali
14498 cf_gnat_libraries=yes
14500 rm -rf conftest* *~conftest*
14505 echo "$as_me:14505: result: $cf_gnat_projects" >&5
14506 echo "${ECHO_T}$cf_gnat_projects" >&6
14507 fi # enable_gnat_projects
14509 if test $cf_gnat_projects = yes
14511 echo "$as_me:14511: checking if GNAT supports libraries" >&5
14512 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
14513 echo "$as_me:14513: result: $cf_gnat_libraries" >&5
14514 echo "${ECHO_T}$cf_gnat_libraries" >&6
14517 if test "$cf_gnat_projects" = yes
14519 USE_OLD_MAKERULES="#"
14520 USE_GNAT_PROJECTS=""
14522 USE_OLD_MAKERULES=""
14523 USE_GNAT_PROJECTS="#"
14526 if test "$cf_gnat_libraries" = yes
14528 USE_GNAT_LIBRARIES=""
14530 USE_GNAT_LIBRARIES="#"
14533 echo "$as_me:14533: checking for ada-compiler" >&5
14534 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
14536 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14537 if test "${with_ada_compiler+set}" = set; then
14538 withval="$with_ada_compiler"
14539 cf_ada_compiler=$withval
14541 cf_ada_compiler=gnatmake
14544 echo "$as_me:14544: result: $cf_ada_compiler" >&5
14545 echo "${ECHO_T}$cf_ada_compiler" >&6
14547 cf_ada_package=terminal_interface
14549 echo "$as_me:14549: checking for ada-include" >&5
14550 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
14552 # Check whether --with-ada-include or --without-ada-include was given.
14553 if test "${with_ada_include+set}" = set; then
14554 withval="$with_ada_include"
14557 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
14558 fi; if test -n "$prefix/share/ada/adainclude" ; then
14560 if test "x$prefix" != xNONE; then
14561 cf_path_syntax="$prefix"
14563 cf_path_syntax="$ac_default_prefix"
14566 case ".$withval" in
14567 (.\$\(*\)*|.\'*\'*)
14571 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14573 (.\${*prefix}*|.\${*dir}*)
14574 eval withval="$withval"
14575 case ".$withval" in
14577 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14582 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14585 { { echo "$as_me:14585: error: expected a pathname, not \"$withval\"" >&5
14586 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14587 { (exit 1); exit 1; }; }
14592 eval ADA_INCLUDE="$withval"
14594 echo "$as_me:14594: result: $ADA_INCLUDE" >&5
14595 echo "${ECHO_T}$ADA_INCLUDE" >&6
14597 echo "$as_me:14597: checking for ada-objects" >&5
14598 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
14600 # Check whether --with-ada-objects or --without-ada-objects was given.
14601 if test "${with_ada_objects+set}" = set; then
14602 withval="$with_ada_objects"
14605 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
14606 fi; if test -n "$prefix/lib/ada/adalib" ; then
14608 if test "x$prefix" != xNONE; then
14609 cf_path_syntax="$prefix"
14611 cf_path_syntax="$ac_default_prefix"
14614 case ".$withval" in
14615 (.\$\(*\)*|.\'*\'*)
14619 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14621 (.\${*prefix}*|.\${*dir}*)
14622 eval withval="$withval"
14623 case ".$withval" in
14625 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14630 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14633 { { echo "$as_me:14633: error: expected a pathname, not \"$withval\"" >&5
14634 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14635 { (exit 1); exit 1; }; }
14640 eval ADA_OBJECTS="$withval"
14642 echo "$as_me:14642: result: $ADA_OBJECTS" >&5
14643 echo "${ECHO_T}$ADA_OBJECTS" >&6
14645 echo "$as_me:14645: checking if an Ada95 shared-library should be built" >&5
14646 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
14648 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
14649 if test "${with_ada_sharedlib+set}" = set; then
14650 withval="$with_ada_sharedlib"
14651 with_ada_sharedlib=$withval
14653 with_ada_sharedlib=no
14655 echo "$as_me:14655: result: $with_ada_sharedlib" >&5
14656 echo "${ECHO_T}$with_ada_sharedlib" >&6
14658 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
14659 MAKE_ADA_SHAREDLIB="#"
14661 if test "x$with_ada_sharedlib" != xno
14663 MAKE_ADA_SHAREDLIB=
14664 if test "x$with_ada_sharedlib" != xyes
14666 ADA_SHAREDLIB="$with_ada_sharedlib"
14671 { { echo "$as_me:14671: error: No usable Ada compiler found" >&5
14672 echo "$as_me: error: No usable Ada compiler found" >&2;}
14673 { (exit 1); exit 1; }; }
14676 { { echo "$as_me:14676: error: The Ada compiler is needed for this package" >&5
14677 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
14678 { (exit 1); exit 1; }; }
14681 ################################################################################
14688 ### Construct the list of include-directories to be generated
14690 if test "$srcdir" != "."; then
14691 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14693 CPPFLAGS="-I../include $CPPFLAGS"
14694 if test "$srcdir" != "."; then
14695 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
14697 CPPFLAGS="-I. $CPPFLAGS"
14699 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
14700 if test "$srcdir" != "."; then
14701 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14703 if test "$GCC" != yes; then
14704 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14705 elif test "$includedir" != "/usr/include"; then
14706 if test "$includedir" = '${prefix}/include' ; then
14707 if test x$prefix != x/usr ; then
14708 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14711 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14715 ### Build up pieces for makefile rules
14716 echo "$as_me:14716: checking default library suffix" >&5
14717 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14719 case $DFT_LWR_MODEL in
14720 (libtool) DFT_ARG_SUFFIX='' ;;
14721 (normal) DFT_ARG_SUFFIX='' ;;
14722 (debug) DFT_ARG_SUFFIX='_g' ;;
14723 (profile) DFT_ARG_SUFFIX='_p' ;;
14724 (shared) DFT_ARG_SUFFIX='' ;;
14726 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14727 echo "$as_me:14727: result: $DFT_ARG_SUFFIX" >&5
14728 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14730 echo "$as_me:14730: checking default library-dependency suffix" >&5
14731 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14733 case X$DFT_LWR_MODEL in
14735 DFT_LIB_SUFFIX='.la'
14736 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14739 DFT_LIB_SUFFIX='_g.a'
14740 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14743 DFT_LIB_SUFFIX='_p.a'
14744 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14747 case $cf_cv_system_name in
14749 DFT_LIB_SUFFIX='.so'
14750 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14752 (cygwin*|msys*|mingw*)
14753 DFT_LIB_SUFFIX='.dll'
14754 DFT_DEP_SUFFIX='.dll.a'
14757 DFT_LIB_SUFFIX='.dylib'
14758 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14763 DFT_LIB_SUFFIX='.so'
14764 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14767 DFT_LIB_SUFFIX='.sl'
14768 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14773 DFT_LIB_SUFFIX='.so'
14774 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14779 DFT_LIB_SUFFIX='.a'
14780 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14783 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
14785 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
14786 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
14788 echo "$as_me:14788: result: $DFT_DEP_SUFFIX" >&5
14789 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14791 echo "$as_me:14791: checking default object directory" >&5
14792 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
14794 case $DFT_LWR_MODEL in
14795 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
14796 (normal) DFT_OBJ_SUBDIR='objects' ;;
14797 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
14798 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
14800 case $cf_cv_system_name in
14802 DFT_OBJ_SUBDIR='objects' ;;
14804 DFT_OBJ_SUBDIR='obj_s' ;;
14807 echo "$as_me:14807: result: $DFT_OBJ_SUBDIR" >&5
14808 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
14810 ### Set up low-level terminfo dependencies for makefiles.
14812 if test "$DFT_LWR_MODEL" = shared ; then
14813 case $cf_cv_system_name in
14815 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
14818 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
14823 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
14825 ### Construct the list of subdirectories for which we'll customize makefiles
14826 ### with the appropriate compile-rules.
14828 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
14830 cat >>confdefs.h <<EOF
14831 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
14834 ### Now that we're done running tests, add the compiler-warnings, if any
14839 cf_new_extra_cppflags=
14841 for cf_add_cflags in $EXTRA_CFLAGS
14843 case $cf_fix_cppflags in
14845 case $cf_add_cflags in
14846 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14847 case $cf_add_cflags in
14849 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14851 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14852 && test -z "${cf_tst_cflags}" \
14853 && cf_fix_cppflags=yes
14855 if test $cf_fix_cppflags = yes ; then
14857 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14858 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14861 elif test "${cf_tst_cflags}" = "\"'" ; then
14863 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14864 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14870 case "$CPPFLAGS" in
14874 case $cf_add_cflags in
14876 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14878 CPPFLAGS=`echo "$CPPFLAGS" | \
14879 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14880 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14885 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14886 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14893 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14894 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14901 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14902 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14904 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14906 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14907 && test -z "${cf_tst_cflags}" \
14908 && cf_fix_cppflags=no
14913 if test -n "$cf_new_cflags" ; then
14915 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14916 CFLAGS="${CFLAGS}$cf_new_cflags"
14920 if test -n "$cf_new_cppflags" ; then
14922 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14923 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14927 if test -n "$cf_new_extra_cppflags" ; then
14929 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14930 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14934 ################################################################################
14940 NCURSES_SHLIB2="sh -c"
14942 ADA_SUBDIRS="include gen src doc"
14943 if test "x$cf_with_tests" != "xno" ; then
14944 ADA_SUBDIRS="$ADA_SUBDIRS samples"
14946 for cf_dir in $ADA_SUBDIRS
14948 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
14955 # match layout used by make-tar.sh
14956 ADAHTML_DIR=../doc/ada
14958 if test "x$cross_compiling" = xyes ; then
14959 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
14961 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
14964 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
14965 ac_config_commands="$ac_config_commands default"
14966 cat >confcache <<\_ACEOF
14967 # This file is a shell script that caches the results of configure
14968 # tests run on this system so they can be shared between configure
14969 # scripts and configure runs, see configure's option --config-cache.
14970 # It is not useful on other systems. If it contains results you don't
14971 # want to keep, you may remove or edit it.
14973 # config.status only pays attention to the cache file if you give it
14974 # the --recheck option to rerun configure.
14976 # `ac_cv_env_foo' variables (set or unset) will be overriden when
14977 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14978 # following values.
14982 # The following way of writing the cache mishandles newlines in values,
14983 # but we know of no workaround that is simple, portable, and efficient.
14984 # So, don't put newlines in cache variables' values.
14985 # Ultrix sh set writes to stderr and can't be redirected directly,
14986 # and sets the high bit in the cache file unless we assign to the vars.
14989 case `(ac_space=' '; set | grep ac_space) 2>&1` in
14991 # `set' does not quote correctly, so add quotes (double-quote
14992 # substitution turns \\\\ into \\, and sed turns \\ into \).
14995 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14998 # `set' quotes correctly as required by POSIX, so do not add quotes.
15000 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15007 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15009 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15011 if cmp -s $cache_file confcache; then :; else
15012 if test -w $cache_file; then
15013 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15014 cat confcache >$cache_file
15016 echo "not updating unwritable cache $cache_file"
15021 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15022 # Let make expand exec_prefix.
15023 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15025 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15026 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15027 # trailing colons and then remove the whole line if VPATH becomes empty
15028 # (actually we leave an empty line to preserve line numbers).
15029 if test "x$srcdir" = x.; then
15030 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15031 s/:*\$(srcdir):*/:/;
15032 s/:*\${srcdir}:*/:/;
15034 s/^\([^=]*=[ ]*\):*/\1/;
15040 DEFS=-DHAVE_CONFIG_H
15042 : ${CONFIG_STATUS=./config.status}
15043 ac_clean_files_save=$ac_clean_files
15044 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15045 { echo "$as_me:15045: creating $CONFIG_STATUS" >&5
15046 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15047 cat >$CONFIG_STATUS <<_ACEOF
15049 # Generated automatically by configure.
15050 # Run this file to recreate the current configuration.
15051 # Compiler output produced by configure, useful for debugging
15052 # configure, is in config.log if it exists.
15055 SHELL=\${CONFIG_SHELL-$SHELL}
15056 ac_cs_invocation="\$0 \$@"
15060 cat >>$CONFIG_STATUS <<\_ACEOF
15061 # Be Bourne compatible
15062 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15065 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15069 # Name of the executable.
15070 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15072 if expr a : '\(a\)' >/dev/null 2>&1; then
15078 rm -f conf$$ conf$$.exe conf$$.file
15080 if ln -s conf$$.file conf$$ 2>/dev/null; then
15081 # We could just check for DJGPP; but this test a) works b) is more generic
15082 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15083 if test -f conf$$.exe; then
15084 # Don't use ln at all; we don't have any links
15089 elif ln conf$$.file conf$$ 2>/dev/null; then
15094 rm -f conf$$ conf$$.exe conf$$.file
15096 as_executable_p="test -f"
15098 # Support unset when possible.
15099 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15106 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15107 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15108 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15109 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15110 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15111 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15112 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15113 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15116 # We need space, tab and new line, in precisely that order.
15122 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15128 # Files that config.status was made for.
15129 if test -n "$ac_config_files"; then
15130 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15133 if test -n "$ac_config_headers"; then
15134 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15137 if test -n "$ac_config_links"; then
15138 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15141 if test -n "$ac_config_commands"; then
15142 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15145 cat >>$CONFIG_STATUS <<\EOF
15148 \`$as_me' instantiates files from templates according to the
15149 current configuration.
15151 Usage: $0 [OPTIONS] [FILE]...
15153 -h, --help print this help, then exit
15154 -V, --version print version number, then exit
15155 -d, --debug don't remove temporary files
15156 --recheck update $as_me by reconfiguring in the same conditions
15157 --file=FILE[:TEMPLATE]
15158 instantiate the configuration file FILE
15159 --header=FILE[:TEMPLATE]
15160 instantiate the configuration header FILE
15162 Configuration files:
15165 Configuration headers:
15168 Configuration commands:
15171 Report bugs to <dickey@invisible-island.net>."
15174 cat >>$CONFIG_STATUS <<EOF
15177 configured by $0, generated by GNU Autoconf 2.52.20170501,
15178 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15180 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15181 Free Software Foundation, Inc.
15182 This config.status script is free software; the Free Software Foundation
15183 gives unlimited permission to copy, distribute and modify it."
15188 cat >>$CONFIG_STATUS <<\EOF
15189 # If no file are specified by the user, then we need to provide default
15190 # value. By we need to know if files were specified by the user.
15196 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15197 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15199 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15203 *) # This is not an option, so the user has probably given explicit
15205 ac_need_defaults=false;;
15209 # Handling of the options.
15211 cat >>$CONFIG_STATUS <<EOF
15212 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15213 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15214 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15216 cat >>$CONFIG_STATUS <<\EOF
15217 --version | --vers* | -V )
15218 echo "$ac_cs_version"; exit 0 ;;
15220 # Conflict between --help and --header
15221 { { echo "$as_me:15221: error: ambiguous option: $1
15222 Try \`$0 --help' for more information." >&5
15223 echo "$as_me: error: ambiguous option: $1
15224 Try \`$0 --help' for more information." >&2;}
15225 { (exit 1); exit 1; }; };;
15226 --help | --hel | -h )
15227 echo "$ac_cs_usage"; exit 0 ;;
15228 --debug | --d* | -d )
15230 --file | --fil | --fi | --f )
15232 CONFIG_FILES="$CONFIG_FILES $1"
15233 ac_need_defaults=false;;
15234 --header | --heade | --head | --hea )
15236 CONFIG_HEADERS="$CONFIG_HEADERS $1"
15237 ac_need_defaults=false;;
15239 # This is an error.
15240 -*) { { echo "$as_me:15240: error: unrecognized option: $1
15241 Try \`$0 --help' for more information." >&5
15242 echo "$as_me: error: unrecognized option: $1
15243 Try \`$0 --help' for more information." >&2;}
15244 { (exit 1); exit 1; }; } ;;
15246 *) ac_config_targets="$ac_config_targets $1" ;;
15255 ## ----------------------- ##
15256 ## Running config.status. ##
15257 ## ----------------------- ##
15259 This file was extended by $as_me 2.52.20170501, executed with
15260 CONFIG_FILES = $CONFIG_FILES
15261 CONFIG_HEADERS = $CONFIG_HEADERS
15262 CONFIG_LINKS = $CONFIG_LINKS
15263 CONFIG_COMMANDS = $CONFIG_COMMANDS
15264 > $ac_cs_invocation
15265 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15270 cat >>$CONFIG_STATUS <<EOF
15272 # INIT-COMMANDS section.
15275 ### Special initialization commands, used to pass information from the
15276 ### configuration-run into config.status
15279 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15280 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15281 LIB_NAME="$LIB_NAME"
15282 LIB_PREFIX="$LIB_PREFIX"
15283 LIB_SUFFIX="$LIB_SUFFIX"
15285 NCURSES_MAJOR="$NCURSES_MAJOR"
15286 NCURSES_MINOR="$NCURSES_MINOR"
15287 NCURSES_PATCH="$NCURSES_PATCH"
15288 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
15289 cf_cv_abi_version="$cf_cv_abi_version"
15290 cf_cv_rel_version="$cf_cv_rel_version"
15291 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15292 cf_cv_shared_soname='$cf_cv_shared_soname'
15293 cf_cv_shlib_version="$cf_cv_shlib_version"
15294 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15295 cf_cv_system_name="$cf_cv_system_name"
15301 cat >>$CONFIG_STATUS <<\EOF
15302 for ac_config_target in $ac_config_targets
15304 case "$ac_config_target" in
15305 # Handling of arguments.
15306 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15307 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
15308 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15309 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15310 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15311 *) { { echo "$as_me:15311: error: invalid argument: $ac_config_target" >&5
15312 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15313 { (exit 1); exit 1; }; };;
15317 # If the user did not use the arguments to specify the items to instantiate,
15318 # then the envvar interface is used. Set only those that are not.
15319 # We use the long form for the default assignment because of an extremely
15320 # bizarre bug on SunOS 4.1.3.
15321 if $ac_need_defaults; then
15322 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15323 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15324 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15327 # Create a temporary directory, and hook for its removal unless debugging.
15330 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15331 trap '{ (exit 1); exit 1; }' 1 2 13 15
15334 # Create a (secure) tmp directory for tmp files.
15337 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15338 test -n "$tmp" && test -d "$tmp"
15341 tmp=$TMPDIR/cs$$-$RANDOM
15342 (umask 077 && mkdir $tmp)
15345 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15346 { (exit 1); exit 1; }
15351 cat >>$CONFIG_STATUS <<EOF
15354 # CONFIG_FILES section.
15357 # No need to generate the scripts if there are no CONFIG_FILES.
15358 # This happens for instance when ./config.status config.h
15359 if test -n "\$CONFIG_FILES"; then
15360 # Protect against being on the right side of a sed subst in config.status.
15361 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15362 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15363 s,@SHELL@,$SHELL,;t t
15364 s,@exec_prefix@,$exec_prefix,;t t
15365 s,@prefix@,$prefix,;t t
15366 s,@program_transform_name@,$program_transform_name,;t t
15367 s,@bindir@,$bindir,;t t
15368 s,@sbindir@,$sbindir,;t t
15369 s,@libexecdir@,$libexecdir,;t t
15370 s,@datarootdir@,$datarootdir,;t t
15371 s,@datadir@,$datadir,;t t
15372 s,@sysconfdir@,$sysconfdir,;t t
15373 s,@sharedstatedir@,$sharedstatedir,;t t
15374 s,@localstatedir@,$localstatedir,;t t
15375 s,@libdir@,$libdir,;t t
15376 s,@includedir@,$includedir,;t t
15377 s,@oldincludedir@,$oldincludedir,;t t
15378 s,@infodir@,$infodir,;t t
15379 s,@mandir@,$mandir,;t t
15380 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15381 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15382 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15383 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15384 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15385 s,@build_alias@,$build_alias,;t t
15386 s,@host_alias@,$host_alias,;t t
15387 s,@target_alias@,$target_alias,;t t
15388 s,@ECHO_C@,$ECHO_C,;t t
15389 s,@ECHO_N@,$ECHO_N,;t t
15390 s,@ECHO_T@,$ECHO_T,;t t
15391 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15392 s,@DEFS@,$DEFS,;t t
15393 s,@LIBS@,$LIBS,;t t
15394 s,@top_builddir@,$top_builddir,;t t
15395 s,@build@,$build,;t t
15396 s,@build_cpu@,$build_cpu,;t t
15397 s,@build_vendor@,$build_vendor,;t t
15398 s,@build_os@,$build_os,;t t
15399 s,@host@,$host,;t t
15400 s,@host_cpu@,$host_cpu,;t t
15401 s,@host_vendor@,$host_vendor,;t t
15402 s,@host_os@,$host_os,;t t
15403 s,@target@,$target,;t t
15404 s,@target_cpu@,$target_cpu,;t t
15405 s,@target_vendor@,$target_vendor,;t t
15406 s,@target_os@,$target_os,;t t
15408 s,@CFLAGS@,$CFLAGS,;t t
15409 s,@LDFLAGS@,$LDFLAGS,;t t
15410 s,@CPPFLAGS@,$CPPFLAGS,;t t
15411 s,@ac_ct_CC@,$ac_ct_CC,;t t
15412 s,@EXEEXT@,$EXEEXT,;t t
15413 s,@OBJEXT@,$OBJEXT,;t t
15414 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15417 s,@EGREP@,$EGREP,;t t
15418 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15419 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15420 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15421 s,@LN_S@,$LN_S,;t t
15422 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15423 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15424 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
15425 s,@SET_MAKE@,$SET_MAKE,;t t
15426 s,@CTAGS@,$CTAGS,;t t
15427 s,@ETAGS@,$ETAGS,;t t
15428 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15429 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15430 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15431 s,@RANLIB@,$RANLIB,;t t
15432 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15434 s,@ac_ct_LD@,$ac_ct_LD,;t t
15436 s,@ac_ct_AR@,$ac_ct_AR,;t t
15437 s,@ARFLAGS@,$ARFLAGS,;t t
15438 s,@DESTDIR@,$DESTDIR,;t t
15439 s,@BUILD_CC@,$BUILD_CC,;t t
15440 s,@BUILD_CPP@,$BUILD_CPP,;t t
15441 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15442 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15443 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15444 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15445 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15446 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15447 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15448 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15449 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15450 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
15451 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15452 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15453 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15454 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15455 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15456 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15457 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15458 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15459 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15460 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15461 s,@CC_G_OPT@,$CC_G_OPT,;t t
15462 s,@LD_MODEL@,$LD_MODEL,;t t
15463 s,@shlibdir@,$shlibdir,;t t
15464 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
15465 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15466 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
15467 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15468 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15469 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
15470 s,@LINK_PROGS@,$LINK_PROGS,;t t
15471 s,@LINK_TESTS@,$LINK_TESTS,;t t
15472 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15473 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15474 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15475 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15476 s,@RPATH_LIST@,$RPATH_LIST,;t t
15477 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15478 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15479 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15480 s,@PTHREAD@,$PTHREAD,;t t
15481 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
15482 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15483 s,@ECHO_LT@,$ECHO_LT,;t t
15484 s,@ECHO_LD@,$ECHO_LD,;t t
15485 s,@RULE_CC@,$RULE_CC,;t t
15486 s,@SHOW_CC@,$SHOW_CC,;t t
15487 s,@ECHO_CC@,$ECHO_CC,;t t
15488 s,@ADAFLAGS@,$ADAFLAGS,;t t
15489 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15490 s,@ADA_TRACE@,$ADA_TRACE,;t t
15491 s,@gnat_exists@,$gnat_exists,;t t
15492 s,@M4_exists@,$M4_exists,;t t
15493 s,@cf_ada_make@,$cf_ada_make,;t t
15494 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
15495 s,@cf_compile_generics@,$cf_compile_generics,;t t
15496 s,@cf_generic_objects@,$cf_generic_objects,;t t
15497 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
15498 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
15499 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
15500 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
15501 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15502 s,@cf_ada_package@,$cf_ada_package,;t t
15503 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15504 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15505 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
15506 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
15507 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
15508 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15509 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15510 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15511 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15512 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15513 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
15514 s,@TEST_ARG2@,$TEST_ARG2,;t t
15515 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
15516 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
15517 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15518 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15519 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
15520 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
15521 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
15526 cat >>$CONFIG_STATUS <<\EOF
15527 # Split the substitutions into bite-sized pieces for seds with
15528 # small command number limits, like on Digital OSF/1 and HP-UX.
15529 ac_max_sed_lines=48
15530 ac_sed_frag=1 # Number of current file.
15531 ac_beg=1 # First line for current file.
15532 ac_end=$ac_max_sed_lines # Line after last line for current file.
15535 while $ac_more_lines; do
15536 if test $ac_beg -gt 1; then
15537 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15539 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15541 if test ! -s $tmp/subs.frag; then
15542 ac_more_lines=false
15544 # The purpose of the label and of the branching condition is to
15545 # speed up the sed processing (if there are no `@' at all, there
15546 # is no need to browse any of the substitutions).
15547 # These are the two extra sed commands mentioned above.
15549 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15550 # It is possible to make a multiline substitution using escaped newlines.
15551 # Ensure that we do not split the substitution between script fragments.
15553 ac_END=`expr $ac_end + $ac_max_sed_lines`
15554 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
15555 if test -s $tmp/subs.next; then
15556 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
15557 if test ! -s $tmp/subs.edit; then
15558 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
15559 if test ! -s $tmp/subs.edit; then
15560 if test $ac_beg -gt 1; then
15561 ac_end=`expr $ac_end - 1`
15568 if test -z "$ac_sed_cmds"; then
15569 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15571 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15573 ac_sed_frag=`expr $ac_sed_frag + 1`
15575 ac_end=`expr $ac_end + $ac_max_sed_lines`
15578 if test -z "$ac_sed_cmds"; then
15581 fi # test -n "$CONFIG_FILES"
15584 cat >>$CONFIG_STATUS <<\EOF
15585 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15586 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15588 - | *:- | *:-:* ) # input from stdin
15590 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15591 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15592 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15593 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15594 * ) ac_file_in=$ac_file.in ;;
15597 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15598 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15599 X"$ac_file" : 'X\(//\)[^/]' \| \
15600 X"$ac_file" : 'X\(//\)$' \| \
15601 X"$ac_file" : 'X\(/\)' \| \
15602 . : '\(.\)' 2>/dev/null ||
15604 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15605 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15606 /^X\(\/\/\)$/{ s//\1/; q; }
15607 /^X\(\/\).*/{ s//\1/; q; }
15609 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15610 { case "$ac_dir" in
15611 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15615 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15616 case $as_mkdir_dir in
15617 # Skip DOS drivespec
15618 ?:) as_incr_dir=$as_mkdir_dir ;;
15620 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15621 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15626 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15627 # A "../" for each directory in $ac_dir_suffix.
15628 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15630 ac_dir_suffix= ac_dots=
15635 if test -z "$ac_dots"; then
15638 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15640 [\\/]* | ?:[\\/]* )
15641 ac_srcdir=$srcdir$ac_dir_suffix;
15642 ac_top_srcdir=$srcdir ;;
15643 *) # Relative path.
15644 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15645 ac_top_srcdir=$ac_dots$srcdir ;;
15649 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15650 *) ac_INSTALL=$ac_dots$INSTALL ;;
15653 if test x"$ac_file" != x-; then
15654 { echo "$as_me:15654: creating $ac_file" >&5
15655 echo "$as_me: creating $ac_file" >&6;}
15658 # Let's still pretend it is `configure' which instantiates (i.e., don't
15659 # use $as_me), people would be surprised to read:
15660 # /* config.h. Generated automatically by config.status. */
15661 configure_input="Generated automatically from `echo $ac_file_in |
15662 sed 's,.*/,,'` by configure."
15664 # First look for the input files in the build tree, otherwise in the
15666 ac_file_inputs=`IFS=:
15667 for f in $ac_file_in; do
15669 -) echo $tmp/stdin ;;
15671 # Absolute (can't be DOS-style, as IFS=:)
15672 test -f "$f" || { { echo "$as_me:15672: error: cannot find input file: $f" >&5
15673 echo "$as_me: error: cannot find input file: $f" >&2;}
15674 { (exit 1); exit 1; }; }
15677 if test -f "$f"; then
15680 elif test -f "$srcdir/$f"; then
15685 { { echo "$as_me:15685: error: cannot find input file: $f" >&5
15686 echo "$as_me: error: cannot find input file: $f" >&2;}
15687 { (exit 1); exit 1; }; }
15690 done` || { (exit 1); exit 1; }
15692 cat >>$CONFIG_STATUS <<\EOF
15693 ac_warn_datarootdir=no
15694 if test x"$ac_file" != x-; then
15695 for ac_item in $ac_file_inputs
15697 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
15698 if test -n "$ac_seen"; then
15699 ac_used=`grep '@datarootdir@' $ac_item`
15700 if test -z "$ac_used"; then
15701 { echo "$as_me:15701: WARNING: datarootdir was used implicitly but not set:
15703 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
15705 ac_warn_datarootdir=yes
15708 ac_seen=`grep '${datarootdir}' $ac_item`
15709 if test -n "$ac_seen"; then
15710 { echo "$as_me:15710: WARNING: datarootdir was used explicitly but not set:
15712 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
15714 ac_warn_datarootdir=yes
15719 if test "x$ac_warn_datarootdir" = xyes; then
15720 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
15724 cat >>$CONFIG_STATUS <<EOF
15728 cat >>$CONFIG_STATUS <<\EOF
15730 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15731 s,@configure_input@,$configure_input,;t t
15732 s,@srcdir@,$ac_srcdir,;t t
15733 s,@top_srcdir@,$ac_top_srcdir,;t t
15734 s,@INSTALL@,$ac_INSTALL,;t t
15735 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15737 if test x"$ac_file" != x-; then
15738 cp $tmp/out $ac_file
15740 for ac_name in prefix exec_prefix datarootdir
15742 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
15743 if test -n "$ac_seen"; then
15744 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
15745 if test -z "$ac_init"; then
15746 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
15747 { echo "$as_me:15747: WARNING: Variable $ac_name is used but was not set:
15749 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
15754 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
15755 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
15756 if test -s $tmp/out; then
15757 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
15758 { echo "$as_me:15758: WARNING: Some variables may not be substituted:
15760 echo "$as_me: WARNING: Some variables may not be substituted:
15770 cat >>$CONFIG_STATUS <<\EOF
15773 # CONFIG_HEADER section.
15776 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15777 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15779 # ac_d sets the value in "#define NAME VALUE" lines.
15780 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
15781 ac_dB='[ ].*$,\1#\2'
15784 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15785 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15786 ac_iB='\([ ]\),\1#\2define\3'
15789 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15790 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15791 ac_uB='$,\1#\2define\3'
15795 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
15796 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15798 - | *:- | *:-:* ) # input from stdin
15800 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15801 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15802 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15803 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15804 * ) ac_file_in=$ac_file.in ;;
15807 test x"$ac_file" != x- && { echo "$as_me:15807: creating $ac_file" >&5
15808 echo "$as_me: creating $ac_file" >&6;}
15810 # First look for the input files in the build tree, otherwise in the
15812 ac_file_inputs=`IFS=:
15813 for f in $ac_file_in; do
15815 -) echo $tmp/stdin ;;
15817 # Absolute (can't be DOS-style, as IFS=:)
15818 test -f "$f" || { { echo "$as_me:15818: error: cannot find input file: $f" >&5
15819 echo "$as_me: error: cannot find input file: $f" >&2;}
15820 { (exit 1); exit 1; }; }
15823 if test -f "$f"; then
15826 elif test -f "$srcdir/$f"; then
15831 { { echo "$as_me:15831: error: cannot find input file: $f" >&5
15832 echo "$as_me: error: cannot find input file: $f" >&2;}
15833 { (exit 1); exit 1; }; }
15836 done` || { (exit 1); exit 1; }
15837 # Remove the trailing spaces.
15838 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
15842 # Transform confdefs.h into a list of #define's. We won't use it as a sed
15843 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
15844 # be either 'cat' or 'sort'.
15845 cat confdefs.h | uniq >conftest.vals
15847 # Break up conftest.vals because some shells have a limit on
15848 # the size of here documents, and old seds have small limits too.
15850 rm -f conftest.tail
15851 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
15852 while grep . conftest.vals >/dev/null
15854 # Write chunks of a limited-size here document to conftest.frag.
15855 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
15856 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
15857 echo 'CEOF' >> $CONFIG_STATUS
15858 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15859 rm -f conftest.vals
15860 mv conftest.tail conftest.vals
15862 rm -f conftest.vals
15864 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
15866 echo ' cat >> conftest.edit <<CEOF
15867 /@DEFS@/r conftest.frag
15870 sed -f conftest.edit $tmp/in > $tmp/out
15872 mv $tmp/out $tmp/in
15873 rm -f conftest.edit conftest.frag
15874 ' >> $CONFIG_STATUS
15876 cat >>$CONFIG_STATUS <<\EOF
15877 # Let's still pretend it is `configure' which instantiates (i.e., don't
15878 # use $as_me), people would be surprised to read:
15879 # /* config.h. Generated automatically by config.status. */
15880 if test x"$ac_file" = x-; then
15881 echo "/* Generated automatically by configure. */" >$tmp/config.h
15883 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
15885 cat $tmp/in >>$tmp/config.h
15887 if test x"$ac_file" != x-; then
15888 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
15889 { echo "$as_me:15889: $ac_file is unchanged" >&5
15890 echo "$as_me: $ac_file is unchanged" >&6;}
15892 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15893 X"$ac_file" : 'X\(//\)[^/]' \| \
15894 X"$ac_file" : 'X\(//\)$' \| \
15895 X"$ac_file" : 'X\(/\)' \| \
15896 . : '\(.\)' 2>/dev/null ||
15898 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15899 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15900 /^X\(\/\/\)$/{ s//\1/; q; }
15901 /^X\(\/\).*/{ s//\1/; q; }
15903 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15904 { case "$ac_dir" in
15905 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15909 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15910 case $as_mkdir_dir in
15911 # Skip DOS drivespec
15912 ?:) as_incr_dir=$as_mkdir_dir ;;
15914 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15915 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15922 mv $tmp/config.h $ac_file
15926 rm -f $tmp/config.h
15930 cat >>$CONFIG_STATUS <<\EOF
15932 # CONFIG_COMMANDS section.
15934 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
15935 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
15936 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
15940 if test -z "$USE_OLD_MAKERULES" ; then
15941 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
15948 cat >>$CONFIG_STATUS <<\EOF
15950 { (exit 0); exit 0; }
15952 chmod +x $CONFIG_STATUS
15953 ac_clean_files=$ac_clean_files_save
15955 # configure is writing to config.log, and then calls config.status.
15956 # config.status does its own redirection, appending to config.log.
15957 # Unfortunately, on DOS this fails, as config.log is still kept open
15958 # by configure, so config.status won't be able to write to it; its
15959 # output is simply discarded. So we exec the FD to /dev/null,
15960 # effectively closing config.log, so it can be properly (re)opened and
15961 # appended to by config.status. When coming back to configure, we
15962 # need to make the FD available again.
15963 if test "$no_create" != yes; then
15966 $SHELL $CONFIG_STATUS || ac_cs_success=false
15968 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15969 # would make configure fail if this is the last instruction.
15970 $ac_cs_success || { (exit 1); exit 1; }
15972 ${MAKE:-make} preinstall