2 # From configure.in Revision: 1.65 .
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]
692 --with-system-type=XXX test: override derived host system-type
693 --disable-stripping do not strip installed executables
694 --with-pkg-config{=path} enable/disable use of pkg-config
695 --with-pkg-config-libdir=XXX use given directory for installing pc-files
696 --without-tests suppress build with test-programs
697 --enable-mixed-case tic should assume mixed-case filenames
698 --with-install-prefix prefixes actual install-location ($DESTDIR)
699 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
700 --with-build-cc=XXX the build C compiler ($BUILD_CC)
701 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
702 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
703 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
704 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
705 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
706 Options to Specify the Libraries Built/Used:
707 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
708 --with-curses-dir=DIR directory in which (n)curses is installed
709 --enable-widec compile with wide-char/UTF-8 code
710 --with-lib-prefix override library-prefix
711 --with-shlib-version=X Specify rel or abi version for shared libs
712 --enable-rpath-link link sample programs with rpath option
713 Fine-Tuning Your Configuration:
714 --enable-broken_linker compile with broken-linker support code
715 --disable-largefile omit support for large files
716 --with-rcs-ids compile-in RCS identifiers
718 --disable-ext-funcs disable function-extensions
719 --enable-const compile with extra/non-standard const
721 --without-develop disable development options
723 --with-pthread use POSIX thread library
724 --enable-weak-symbols enable weak-symbols for pthreads
725 --enable-reentrant compile with experimental reentrant code
726 --with-wrap-prefix=XXX override prefix used for public variables
727 Testing/development Options:
728 --disable-echo do not display "compiling" commands
729 --enable-warnings build: turn on GCC compiler warnings
730 --enable-assertions test: turn on generation of assertion code
731 --enable-expanded test: generate functions for certain macros
732 --disable-macros test: use functions rather than macros
733 --with-trace test: add trace() function to all models of ncurses
734 --disable-gnat-projects test: disable GNAT projects even if usable
735 Ada95 Binding Options:
736 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
737 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
738 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
739 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
741 Some influential environment variables:
742 CC C compiler command
743 CFLAGS C compiler flags
744 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
745 nonstandard directory <lib dir>
746 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
747 headers in a nonstandard directory <include dir>
750 Use these variables to override the choices made by `configure' or to help
751 it to find libraries and programs with nonstandard names/locations.
756 if test "$ac_init_help" = "recursive"; then
757 # If there are subdirs, report their specific --help.
759 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
761 # A "../" for each directory in /$ac_subdir.
762 ac_dots=`echo $ac_subdir |
763 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
766 .) # No --srcdir option. We are building in place.
767 ac_sub_srcdir=$srcdir ;;
768 [\\/]* | ?:[\\/]* ) # Absolute path.
769 ac_sub_srcdir=$srcdir/$ac_subdir ;;
771 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
774 # Check for guested configure; otherwise get Cygnus style configure.
775 if test -f $ac_sub_srcdir/configure.gnu; then
777 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
778 elif test -f $ac_sub_srcdir/configure; then
780 $SHELL $ac_sub_srcdir/configure --help=recursive
781 elif test -f $ac_sub_srcdir/configure.ac ||
782 test -f $ac_sub_srcdir/configure.in; then
786 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
792 test -n "$ac_init_help" && exit 0
793 if $ac_init_version; then
796 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
797 Free Software Foundation, Inc.
798 This configure script is free software; the Free Software Foundation
799 gives unlimited permission to copy, distribute and modify it.
805 This file contains any messages produced by compilers while
806 running configure, to aid debugging if configure makes a mistake.
808 It was created by $as_me, which was
809 generated by GNU Autoconf 2.52.20170501. Invocation command line was
820 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
821 uname -m = `(uname -m) 2>/dev/null || echo unknown`
822 uname -r = `(uname -r) 2>/dev/null || echo unknown`
823 uname -s = `(uname -s) 2>/dev/null || echo unknown`
824 uname -v = `(uname -v) 2>/dev/null || echo unknown`
826 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
827 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
829 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
830 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
831 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
832 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
833 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
834 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
835 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
849 # Keep a trace of the command line.
850 # Strip out --no-create and --no-recursion so they do not pile up.
851 # Also quote any args containing shell meta-characters.
857 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
858 | --no-cr | --no-c) ;;
859 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
860 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
861 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
862 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
863 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
865 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
868 # Get rid of the leading space.
871 # When interrupted or exit'd, cleanup temporary files, and complete
872 # config.log. We remove comments because anyway the quotes in there
873 # would cause problems or look ugly.
875 # Save into config.log some information that might help in debugging.
877 echo "## ----------------- ##" >&5
878 echo "## Cache variables. ##" >&5
879 echo "## ----------------- ##" >&5
881 # The following way of writing the cache mishandles newlines in values,
884 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
887 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
888 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
892 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
896 sed "/^$/d" confdefs.h >conftest.log
897 if test -s conftest.log; then
899 echo "## ------------ ##" >&5
900 echo "## confdefs.h. ##" >&5
901 echo "## ------------ ##" >&5
906 test "$ac_signal" != 0 &&
907 echo "$as_me: caught signal $ac_signal" >&5
908 echo "$as_me: exit $exit_status" >&5
909 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
912 for ac_signal in 1 2 13 15; do
913 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
917 # confdefs.h avoids OS command line length limits that DEFS can exceed.
918 rm -rf conftest* confdefs.h
919 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
922 # Let the site file select an alternate cache file if it wants to.
923 # Prefer explicitly selected file to automatically selected ones.
924 if test -z "$CONFIG_SITE"; then
925 if test "x$prefix" != xNONE; then
926 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
928 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
931 for ac_site_file in $CONFIG_SITE; do
932 if test -r "$ac_site_file"; then
933 { echo "$as_me:933: loading site script $ac_site_file" >&5
934 echo "$as_me: loading site script $ac_site_file" >&6;}
935 cat "$ac_site_file" >&5
940 if test -r "$cache_file"; then
941 # Some versions of bash will fail to source /dev/null (special
942 # files actually), so we avoid doing that.
943 if test -f "$cache_file"; then
944 { echo "$as_me:944: loading cache $cache_file" >&5
945 echo "$as_me: loading cache $cache_file" >&6;}
947 [\\/]* | ?:[\\/]* ) . $cache_file;;
952 { echo "$as_me:952: creating cache $cache_file" >&5
953 echo "$as_me: creating cache $cache_file" >&6;}
957 # Check that the precious variables saved in the cache have kept the same
959 ac_cache_corrupted=false
960 for ac_var in `(set) 2>&1 |
961 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
962 eval ac_old_set=\$ac_cv_env_${ac_var}_set
963 eval ac_new_set=\$ac_env_${ac_var}_set
964 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
965 eval ac_new_val="\$ac_env_${ac_var}_value"
966 case $ac_old_set,$ac_new_set in
968 { echo "$as_me:968: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
969 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
970 ac_cache_corrupted=: ;;
972 { echo "$as_me:972: error: \`$ac_var' was not set in the previous run" >&5
973 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
974 ac_cache_corrupted=: ;;
977 if test "x$ac_old_val" != "x$ac_new_val"; then
978 { echo "$as_me:978: error: \`$ac_var' has changed since the previous run:" >&5
979 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
980 { echo "$as_me:980: former value: $ac_old_val" >&5
981 echo "$as_me: former value: $ac_old_val" >&2;}
982 { echo "$as_me:982: current value: $ac_new_val" >&5
983 echo "$as_me: current value: $ac_new_val" >&2;}
987 # Pass precious variables to config.status. It doesn't matter if
988 # we pass some twice (in addition to the command line arguments).
989 if test "$ac_new_set" = set; then
991 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
992 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
993 ac_configure_args="$ac_configure_args '$ac_arg'"
995 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1000 if $ac_cache_corrupted; then
1001 { echo "$as_me:1001: error: changes in the environment can compromise the build" >&5
1002 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1003 { { echo "$as_me:1003: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1004 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1005 { (exit 1); exit 1; }; }
1009 ac_cpp='$CPP $CPPFLAGS'
1010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1013 ac_main_return=return
1015 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1016 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1018 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1019 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1021 echo "#! $SHELL" >conftest.sh
1022 echo "exit 0" >>conftest.sh
1023 chmod +x conftest.sh
1024 if { (echo "$as_me:1024: PATH=\".;.\"; conftest.sh") >&5
1025 (PATH=".;."; conftest.sh) 2>&5
1027 echo "$as_me:1027: \$? = $ac_status" >&5
1028 (exit $ac_status); }; then
1029 ac_path_separator=';'
1033 PATH_SEPARATOR="$ac_path_separator"
1036 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1041 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1042 if test -f $ac_dir/install-sh; then
1044 ac_install_sh="$ac_aux_dir/install-sh -c"
1046 elif test -f $ac_dir/install.sh; then
1048 ac_install_sh="$ac_aux_dir/install.sh -c"
1050 elif test -f $ac_dir/shtool; then
1052 ac_install_sh="$ac_aux_dir/shtool install -c"
1056 if test -z "$ac_aux_dir"; then
1057 { { echo "$as_me:1057: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1058 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1059 { (exit 1); exit 1; }; }
1061 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1062 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1063 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1065 # Make sure we can run config.sub.
1066 $ac_config_sub sun4 >/dev/null 2>&1 ||
1067 { { echo "$as_me:1067: error: cannot run $ac_config_sub" >&5
1068 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1069 { (exit 1); exit 1; }; }
1071 echo "$as_me:1071: checking build system type" >&5
1072 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1073 if test "${ac_cv_build+set}" = set; then
1074 echo $ECHO_N "(cached) $ECHO_C" >&6
1076 ac_cv_build_alias=$build_alias
1077 test -z "$ac_cv_build_alias" &&
1078 ac_cv_build_alias=`$ac_config_guess`
1079 test -z "$ac_cv_build_alias" &&
1080 { { echo "$as_me:1080: error: cannot guess build type; you must specify one" >&5
1081 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1082 { (exit 1); exit 1; }; }
1083 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1084 { { echo "$as_me:1084: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1085 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1086 { (exit 1); exit 1; }; }
1089 echo "$as_me:1089: result: $ac_cv_build" >&5
1090 echo "${ECHO_T}$ac_cv_build" >&6
1092 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1093 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1094 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1096 echo "$as_me:1096: checking host system type" >&5
1097 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1098 if test "${ac_cv_host+set}" = set; then
1099 echo $ECHO_N "(cached) $ECHO_C" >&6
1101 ac_cv_host_alias=$host_alias
1102 test -z "$ac_cv_host_alias" &&
1103 ac_cv_host_alias=$ac_cv_build_alias
1104 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1105 { { echo "$as_me:1105: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1106 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1107 { (exit 1); exit 1; }; }
1110 echo "$as_me:1110: result: $ac_cv_host" >&5
1111 echo "${ECHO_T}$ac_cv_host" >&6
1113 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1114 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1115 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1118 echo "$as_me:1118: checking target system type" >&5
1119 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1120 if test "${ac_cv_target+set}" = set; then
1121 echo $ECHO_N "(cached) $ECHO_C" >&6
1123 ac_cv_target_alias=$target_alias
1124 test "x$ac_cv_target_alias" = "x" &&
1125 ac_cv_target_alias=$ac_cv_host_alias
1126 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1127 { { echo "$as_me:1127: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1128 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1129 { (exit 1); exit 1; }; }
1132 echo "$as_me:1132: result: $ac_cv_target" >&5
1133 echo "${ECHO_T}$ac_cv_target" >&6
1134 target=$ac_cv_target
1135 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1136 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1137 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1139 # The aliases save the names the user supplied, while $host etc.
1140 # will get canonicalized.
1141 test -n "$target_alias" &&
1142 test "$program_prefix$program_suffix$program_transform_name" = \
1144 program_prefix=${target_alias}-
1145 system_name="$host_os"
1147 system_name="`(uname -s -r) 2>/dev/null`"
1148 if test -z "$system_name" ; then
1149 system_name="`(hostname) 2>/dev/null`"
1152 test -n "$system_name" &&
1153 cat >>confdefs.h <<EOF
1154 #define SYSTEM_NAME "$system_name"
1157 if test "${cf_cv_system_name+set}" = set; then
1158 echo $ECHO_N "(cached) $ECHO_C" >&6
1160 cf_cv_system_name="$system_name"
1163 test -z "$system_name" && system_name="$cf_cv_system_name"
1164 test -n "$cf_cv_system_name" && echo "$as_me:1164: result: Configuring for $cf_cv_system_name" >&5
1165 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1167 if test ".$system_name" != ".$cf_cv_system_name" ; then
1168 echo "$as_me:1168: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1169 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1170 { { echo "$as_me:1170: error: \"Please remove config.cache and try again.\"" >&5
1171 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1172 { (exit 1); exit 1; }; }
1175 # Check whether --with-system-type or --without-system-type was given.
1176 if test "${with_system_type+set}" = set; then
1177 withval="$with_system_type"
1178 { echo "$as_me:1178: WARNING: overriding system type to $withval" >&5
1179 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1180 cf_cv_system_name=$withval
1185 ### Save the given $CFLAGS to allow user-override.
1186 cf_user_CFLAGS="$CFLAGS"
1188 ### Default install-location
1190 echo "$as_me:1190: checking for prefix" >&5
1191 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1192 if test "x$prefix" = "xNONE" ; then
1193 case "$cf_cv_system_name" in
1194 # non-vendor systems don't have a conflict
1195 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1198 (*) prefix=$ac_default_prefix
1202 echo "$as_me:1202: result: $prefix" >&5
1203 echo "${ECHO_T}$prefix" >&6
1205 if test "x$prefix" = "xNONE" ; then
1206 echo "$as_me:1206: checking for default include-directory" >&5
1207 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1208 test -n "$verbose" && echo 1>&6
1211 $includedir/ncurses \
1213 $prefix/include/ncurses \
1214 /usr/local/include \
1215 /usr/local/include/ncurses \
1217 /usr/include/ncurses
1219 cf_dir=`eval echo $cf_symbol`
1220 if test -f $cf_dir/curses.h ; then
1221 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1222 includedir="$cf_symbol"
1223 test -n "$verbose" && echo $ac_n " found " 1>&6
1227 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1229 echo "$as_me:1229: result: $includedir" >&5
1230 echo "${ECHO_T}$includedir" >&6
1233 ### Checks for programs.
1236 ac_cpp='$CPP $CPPFLAGS'
1237 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1238 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1239 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1240 ac_main_return=return
1241 if test -n "$ac_tool_prefix"; then
1242 for ac_prog in gnatgcc gcc cc
1244 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1245 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1246 echo "$as_me:1246: checking for $ac_word" >&5
1247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1248 if test "${ac_cv_prog_CC+set}" = set; then
1249 echo $ECHO_N "(cached) $ECHO_C" >&6
1251 if test -n "$CC"; then
1252 ac_cv_prog_CC="$CC" # Let the user override the test.
1254 ac_save_IFS=$IFS; IFS=$ac_path_separator
1256 for ac_dir in $ac_dummy; do
1258 test -z "$ac_dir" && ac_dir=.
1259 $as_executable_p "$ac_dir/$ac_word" || continue
1260 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1261 echo "$as_me:1261: found $ac_dir/$ac_word" >&5
1268 if test -n "$CC"; then
1269 echo "$as_me:1269: result: $CC" >&5
1270 echo "${ECHO_T}$CC" >&6
1272 echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1276 test -n "$CC" && break
1279 if test -z "$CC"; then
1281 for ac_prog in gnatgcc gcc cc
1283 # Extract the first word of "$ac_prog", so it can be a program name with args.
1284 set dummy $ac_prog; ac_word=$2
1285 echo "$as_me:1285: checking for $ac_word" >&5
1286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1287 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1288 echo $ECHO_N "(cached) $ECHO_C" >&6
1290 if test -n "$ac_ct_CC"; then
1291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1293 ac_save_IFS=$IFS; IFS=$ac_path_separator
1295 for ac_dir in $ac_dummy; do
1297 test -z "$ac_dir" && ac_dir=.
1298 $as_executable_p "$ac_dir/$ac_word" || continue
1299 ac_cv_prog_ac_ct_CC="$ac_prog"
1300 echo "$as_me:1300: found $ac_dir/$ac_word" >&5
1306 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1307 if test -n "$ac_ct_CC"; then
1308 echo "$as_me:1308: result: $ac_ct_CC" >&5
1309 echo "${ECHO_T}$ac_ct_CC" >&6
1311 echo "$as_me:1311: result: no" >&5
1312 echo "${ECHO_T}no" >&6
1315 test -n "$ac_ct_CC" && break
1321 test -z "$CC" && { { echo "$as_me:1321: error: no acceptable cc found in \$PATH" >&5
1322 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1323 { (exit 1); exit 1; }; }
1325 # Provide some information about the compiler.
1326 echo "$as_me:1326:" \
1327 "checking for C compiler version" >&5
1328 ac_compiler=`set X $ac_compile; echo $2`
1329 { (eval echo "$as_me:1329: \"$ac_compiler --version </dev/null >&5\"") >&5
1330 (eval $ac_compiler --version </dev/null >&5) 2>&5
1332 echo "$as_me:1332: \$? = $ac_status" >&5
1333 (exit $ac_status); }
1334 { (eval echo "$as_me:1334: \"$ac_compiler -v </dev/null >&5\"") >&5
1335 (eval $ac_compiler -v </dev/null >&5) 2>&5
1337 echo "$as_me:1337: \$? = $ac_status" >&5
1338 (exit $ac_status); }
1339 { (eval echo "$as_me:1339: \"$ac_compiler -V </dev/null >&5\"") >&5
1340 (eval $ac_compiler -V </dev/null >&5) 2>&5
1342 echo "$as_me:1342: \$? = $ac_status" >&5
1343 (exit $ac_status); }
1345 cat >conftest.$ac_ext <<_ACEOF
1346 #line 1346 "configure"
1347 #include "confdefs.h"
1357 ac_clean_files_save=$ac_clean_files
1358 ac_clean_files="$ac_clean_files a.out a.exe"
1359 # Try to create an executable without -o first, disregard a.out.
1360 # It will help us diagnose broken compilers, and finding out an intuition
1362 echo "$as_me:1362: checking for C compiler default output" >&5
1363 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1364 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1365 if { (eval echo "$as_me:1365: \"$ac_link_default\"") >&5
1366 (eval $ac_link_default) 2>&5
1368 echo "$as_me:1368: \$? = $ac_status" >&5
1369 (exit $ac_status); }; then
1370 # Find the output, starting from the most likely. This scheme is
1371 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1373 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1374 ls a.out conftest 2>/dev/null;
1375 ls a.* conftest.* 2>/dev/null`; do
1377 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1378 a.out ) # We found the default executable, but exeext='' is most
1381 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1382 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1389 echo "$as_me: failed program was:" >&5
1390 cat conftest.$ac_ext >&5
1391 { { echo "$as_me:1391: error: C compiler cannot create executables" >&5
1392 echo "$as_me: error: C compiler cannot create executables" >&2;}
1393 { (exit 77); exit 77; }; }
1396 ac_exeext=$ac_cv_exeext
1397 echo "$as_me:1397: result: $ac_file" >&5
1398 echo "${ECHO_T}$ac_file" >&6
1400 # Check the compiler produces executables we can run. If not, either
1401 # the compiler is broken, or we cross compile.
1402 echo "$as_me:1402: checking whether the C compiler works" >&5
1403 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1404 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1405 # If not cross compiling, check that we can run a simple program.
1406 if test "$cross_compiling" != yes; then
1407 if { ac_try='./$ac_file'
1408 { (eval echo "$as_me:1408: \"$ac_try\"") >&5
1411 echo "$as_me:1411: \$? = $ac_status" >&5
1412 (exit $ac_status); }; }; then
1415 if test "$cross_compiling" = maybe; then
1418 { { echo "$as_me:1418: error: cannot run C compiled programs.
1419 If you meant to cross compile, use \`--host'." >&5
1420 echo "$as_me: error: cannot run C compiled programs.
1421 If you meant to cross compile, use \`--host'." >&2;}
1422 { (exit 1); exit 1; }; }
1426 echo "$as_me:1426: result: yes" >&5
1427 echo "${ECHO_T}yes" >&6
1429 rm -f a.out a.exe conftest$ac_cv_exeext
1430 ac_clean_files=$ac_clean_files_save
1431 # Check the compiler produces executables we can run. If not, either
1432 # the compiler is broken, or we cross compile.
1433 echo "$as_me:1433: checking whether we are cross compiling" >&5
1434 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1435 echo "$as_me:1435: result: $cross_compiling" >&5
1436 echo "${ECHO_T}$cross_compiling" >&6
1438 echo "$as_me:1438: checking for executable suffix" >&5
1439 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1440 if { (eval echo "$as_me:1440: \"$ac_link\"") >&5
1441 (eval $ac_link) 2>&5
1443 echo "$as_me:1443: \$? = $ac_status" >&5
1444 (exit $ac_status); }; then
1445 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1446 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1447 # work properly (i.e., refer to `conftest.exe'), while it won't with
1449 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1451 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1452 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1459 { { echo "$as_me:1459: error: cannot compute EXEEXT: cannot compile and link" >&5
1460 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1461 { (exit 1); exit 1; }; }
1464 rm -f conftest$ac_cv_exeext
1465 echo "$as_me:1465: result: $ac_cv_exeext" >&5
1466 echo "${ECHO_T}$ac_cv_exeext" >&6
1468 rm -f conftest.$ac_ext
1469 EXEEXT=$ac_cv_exeext
1471 echo "$as_me:1471: checking for object suffix" >&5
1472 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1473 if test "${ac_cv_objext+set}" = set; then
1474 echo $ECHO_N "(cached) $ECHO_C" >&6
1476 cat >conftest.$ac_ext <<_ACEOF
1477 #line 1477 "configure"
1478 #include "confdefs.h"
1488 rm -f conftest.o conftest.obj
1489 if { (eval echo "$as_me:1489: \"$ac_compile\"") >&5
1490 (eval $ac_compile) 2>&5
1492 echo "$as_me:1492: \$? = $ac_status" >&5
1493 (exit $ac_status); }; then
1494 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1496 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1497 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1502 echo "$as_me: failed program was:" >&5
1503 cat conftest.$ac_ext >&5
1504 { { echo "$as_me:1504: error: cannot compute OBJEXT: cannot compile" >&5
1505 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1506 { (exit 1); exit 1; }; }
1509 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1511 echo "$as_me:1511: result: $ac_cv_objext" >&5
1512 echo "${ECHO_T}$ac_cv_objext" >&6
1513 OBJEXT=$ac_cv_objext
1515 echo "$as_me:1515: checking whether we are using the GNU C compiler" >&5
1516 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1517 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1518 echo $ECHO_N "(cached) $ECHO_C" >&6
1520 cat >conftest.$ac_ext <<_ACEOF
1521 #line 1521 "configure"
1522 #include "confdefs.h"
1535 rm -f conftest.$ac_objext
1536 if { (eval echo "$as_me:1536: \"$ac_compile\"") >&5
1537 (eval $ac_compile) 2>&5
1539 echo "$as_me:1539: \$? = $ac_status" >&5
1540 (exit $ac_status); } &&
1541 { ac_try='test -s conftest.$ac_objext'
1542 { (eval echo "$as_me:1542: \"$ac_try\"") >&5
1545 echo "$as_me:1545: \$? = $ac_status" >&5
1546 (exit $ac_status); }; }; then
1549 echo "$as_me: failed program was:" >&5
1550 cat conftest.$ac_ext >&5
1553 rm -f conftest.$ac_objext conftest.$ac_ext
1554 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1557 echo "$as_me:1557: result: $ac_cv_c_compiler_gnu" >&5
1558 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1559 GCC=`test $ac_compiler_gnu = yes && echo yes`
1560 ac_test_CFLAGS=${CFLAGS+set}
1561 ac_save_CFLAGS=$CFLAGS
1563 echo "$as_me:1563: checking whether $CC accepts -g" >&5
1564 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1565 if test "${ac_cv_prog_cc_g+set}" = set; then
1566 echo $ECHO_N "(cached) $ECHO_C" >&6
1568 cat >conftest.$ac_ext <<_ACEOF
1569 #line 1569 "configure"
1570 #include "confdefs.h"
1580 rm -f conftest.$ac_objext
1581 if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5
1582 (eval $ac_compile) 2>&5
1584 echo "$as_me:1584: \$? = $ac_status" >&5
1585 (exit $ac_status); } &&
1586 { ac_try='test -s conftest.$ac_objext'
1587 { (eval echo "$as_me:1587: \"$ac_try\"") >&5
1590 echo "$as_me:1590: \$? = $ac_status" >&5
1591 (exit $ac_status); }; }; then
1594 echo "$as_me: failed program was:" >&5
1595 cat conftest.$ac_ext >&5
1598 rm -f conftest.$ac_objext conftest.$ac_ext
1600 echo "$as_me:1600: result: $ac_cv_prog_cc_g" >&5
1601 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1602 if test "$ac_test_CFLAGS" = set; then
1603 CFLAGS=$ac_save_CFLAGS
1604 elif test $ac_cv_prog_cc_g = yes; then
1605 if test "$GCC" = yes; then
1611 if test "$GCC" = yes; then
1617 # Some people use a C++ compiler to compile C. Since we use `exit',
1618 # in C++ we need to declare it. In case someone uses the same compiler
1619 # for both compiling C and C++ we need to have the C++ compiler decide
1620 # the declaration of exit, since it's the most demanding environment.
1621 cat >conftest.$ac_ext <<_ACEOF
1626 rm -f conftest.$ac_objext
1627 if { (eval echo "$as_me:1627: \"$ac_compile\"") >&5
1628 (eval $ac_compile) 2>&5
1630 echo "$as_me:1630: \$? = $ac_status" >&5
1631 (exit $ac_status); } &&
1632 { ac_try='test -s conftest.$ac_objext'
1633 { (eval echo "$as_me:1633: \"$ac_try\"") >&5
1636 echo "$as_me:1636: \$? = $ac_status" >&5
1637 (exit $ac_status); }; }; then
1638 for ac_declaration in \
1640 '#include <stdlib.h>' \
1641 'extern "C" void std::exit (int) throw (); using std::exit;' \
1642 'extern "C" void std::exit (int); using std::exit;' \
1643 'extern "C" void exit (int) throw ();' \
1644 'extern "C" void exit (int);' \
1647 cat >conftest.$ac_ext <<_ACEOF
1648 #line 1648 "configure"
1649 #include "confdefs.h"
1660 rm -f conftest.$ac_objext
1661 if { (eval echo "$as_me:1661: \"$ac_compile\"") >&5
1662 (eval $ac_compile) 2>&5
1664 echo "$as_me:1664: \$? = $ac_status" >&5
1665 (exit $ac_status); } &&
1666 { ac_try='test -s conftest.$ac_objext'
1667 { (eval echo "$as_me:1667: \"$ac_try\"") >&5
1670 echo "$as_me:1670: \$? = $ac_status" >&5
1671 (exit $ac_status); }; }; then
1674 echo "$as_me: failed program was:" >&5
1675 cat conftest.$ac_ext >&5
1678 rm -f conftest.$ac_objext conftest.$ac_ext
1679 cat >conftest.$ac_ext <<_ACEOF
1680 #line 1680 "configure"
1681 #include "confdefs.h"
1691 rm -f conftest.$ac_objext
1692 if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5
1693 (eval $ac_compile) 2>&5
1695 echo "$as_me:1695: \$? = $ac_status" >&5
1696 (exit $ac_status); } &&
1697 { ac_try='test -s conftest.$ac_objext'
1698 { (eval echo "$as_me:1698: \"$ac_try\"") >&5
1701 echo "$as_me:1701: \$? = $ac_status" >&5
1702 (exit $ac_status); }; }; then
1705 echo "$as_me: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1708 rm -f conftest.$ac_objext conftest.$ac_ext
1711 if test -n "$ac_declaration"; then
1712 echo '#ifdef __cplusplus' >>confdefs.h
1713 echo $ac_declaration >>confdefs.h
1714 echo '#endif' >>confdefs.h
1718 echo "$as_me: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1721 rm -f conftest.$ac_objext conftest.$ac_ext
1723 ac_cpp='$CPP $CPPFLAGS'
1724 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1725 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1726 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1727 ac_main_return=return
1730 if test "$GCC" = yes ; then
1731 echo "$as_me:1731: checking version of $CC" >&5
1732 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1733 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.].*//'`"
1734 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1735 echo "$as_me:1735: result: $GCC_VERSION" >&5
1736 echo "${ECHO_T}$GCC_VERSION" >&6
1739 echo "$as_me:1739: checking for $CC option to accept ANSI C" >&5
1740 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1741 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1742 echo $ECHO_N "(cached) $ECHO_C" >&6
1744 ac_cv_prog_cc_stdc=no
1746 cat >conftest.$ac_ext <<_ACEOF
1747 #line 1747 "configure"
1748 #include "confdefs.h"
1751 #include <sys/types.h>
1752 #include <sys/stat.h>
1753 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1754 struct buf { int x; };
1755 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1756 static char *e (p, i)
1762 static char *f (char * (*g) (char **, int), char **p, ...)
1767 s = g (p, va_arg (v,int));
1771 int test (int i, double x);
1772 struct s1 {int (*f) (int a);};
1773 struct s2 {int (*f) (double a);};
1774 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1780 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1785 # Don't try gcc -ansi; that turns off useful extensions and
1786 # breaks some systems' header files.
1787 # AIX -qlanglvl=ansi
1788 # Ultrix and OSF/1 -std1
1789 # HP-UX 10.20 and later -Ae
1790 # HP-UX older versions -Aa -D_HPUX_SOURCE
1791 # SVR4 -Xc -D__EXTENSIONS__
1792 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1794 CC="$ac_save_CC $ac_arg"
1795 rm -f conftest.$ac_objext
1796 if { (eval echo "$as_me:1796: \"$ac_compile\"") >&5
1797 (eval $ac_compile) 2>&5
1799 echo "$as_me:1799: \$? = $ac_status" >&5
1800 (exit $ac_status); } &&
1801 { ac_try='test -s conftest.$ac_objext'
1802 { (eval echo "$as_me:1802: \"$ac_try\"") >&5
1805 echo "$as_me:1805: \$? = $ac_status" >&5
1806 (exit $ac_status); }; }; then
1807 ac_cv_prog_cc_stdc=$ac_arg
1810 echo "$as_me: failed program was:" >&5
1811 cat conftest.$ac_ext >&5
1813 rm -f conftest.$ac_objext
1815 rm -f conftest.$ac_ext conftest.$ac_objext
1820 case "x$ac_cv_prog_cc_stdc" in
1822 echo "$as_me:1822: result: none needed" >&5
1823 echo "${ECHO_T}none needed" >&6 ;;
1825 echo "$as_me:1825: result: $ac_cv_prog_cc_stdc" >&5
1826 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1827 CC="$CC $ac_cv_prog_cc_stdc" ;;
1830 # This should have been defined by AC_PROG_CC
1833 echo "$as_me:1833: checking \$CC variable" >&5
1834 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1837 echo "$as_me:1837: result: broken" >&5
1838 echo "${ECHO_T}broken" >&6
1839 { echo "$as_me:1839: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1840 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1842 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1843 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1845 for cf_arg in $cf_flags
1853 cf_new_extra_cppflags=
1855 for cf_add_cflags in $cf_arg
1857 case $cf_fix_cppflags in
1859 case $cf_add_cflags in
1860 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1861 case $cf_add_cflags in
1863 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1865 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1866 && test -z "${cf_tst_cflags}" \
1867 && cf_fix_cppflags=yes
1869 if test $cf_fix_cppflags = yes ; then
1871 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1872 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1875 elif test "${cf_tst_cflags}" = "\"'" ; then
1877 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1878 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1888 case $cf_add_cflags in
1890 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1892 CPPFLAGS=`echo "$CPPFLAGS" | \
1893 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1894 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1899 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1900 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1907 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1908 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1915 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1916 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1918 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1920 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1921 && test -z "${cf_tst_cflags}" \
1922 && cf_fix_cppflags=no
1927 if test -n "$cf_new_cflags" ; then
1929 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1930 CFLAGS="${CFLAGS}$cf_new_cflags"
1934 if test -n "$cf_new_cppflags" ; then
1936 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1937 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1941 if test -n "$cf_new_extra_cppflags" ; then
1943 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1944 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1954 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
1956 echo "${as_me:-configure}:1956: testing resulting CC: '$CC' ..." 1>&5
1958 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
1960 echo "${as_me:-configure}:1960: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
1962 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
1964 echo "${as_me:-configure}:1964: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
1968 echo "$as_me:1968: result: ok" >&5
1969 echo "${ECHO_T}ok" >&6
1974 ac_cpp='$CPP $CPPFLAGS'
1975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1978 ac_main_return=return
1979 echo "$as_me:1979: checking how to run the C preprocessor" >&5
1980 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1981 # On Suns, sometimes $CPP names a directory.
1982 if test -n "$CPP" && test -d "$CPP"; then
1985 if test -z "$CPP"; then
1986 if test "${ac_cv_prog_CPP+set}" = set; then
1987 echo $ECHO_N "(cached) $ECHO_C" >&6
1989 # Double quotes because CPP needs to be expanded
1990 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1993 for ac_c_preproc_warn_flag in '' yes
1995 # Use a header file that comes with gcc, so configuring glibc
1996 # with a fresh cross-compiler works.
1997 # On the NeXT, cc -E runs the code through the compiler's parser,
1998 # not just through cpp. "Syntax error" is here to catch this case.
1999 cat >conftest.$ac_ext <<_ACEOF
2000 #line 2000 "configure"
2001 #include "confdefs.h"
2005 if { (eval echo "$as_me:2005: \"$ac_cpp conftest.$ac_ext\"") >&5
2006 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2008 egrep -v '^ *\+' conftest.er1 >conftest.err
2010 cat conftest.err >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit $ac_status); } >/dev/null; then
2013 if test -s conftest.err; then
2014 ac_cpp_err=$ac_c_preproc_warn_flag
2021 if test -z "$ac_cpp_err"; then
2024 echo "$as_me: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 # Broken: fails on valid input.
2029 rm -f conftest.err conftest.$ac_ext
2031 # OK, works on sane cases. Now check whether non-existent headers
2032 # can be detected and how.
2033 cat >conftest.$ac_ext <<_ACEOF
2034 #line 2034 "configure"
2035 #include "confdefs.h"
2036 #include <ac_nonexistent.h>
2038 if { (eval echo "$as_me:2038: \"$ac_cpp conftest.$ac_ext\"") >&5
2039 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2041 egrep -v '^ *\+' conftest.er1 >conftest.err
2043 cat conftest.err >&5
2044 echo "$as_me:2044: \$? = $ac_status" >&5
2045 (exit $ac_status); } >/dev/null; then
2046 if test -s conftest.err; then
2047 ac_cpp_err=$ac_c_preproc_warn_flag
2054 if test -z "$ac_cpp_err"; then
2055 # Broken: success on invalid input.
2058 echo "$as_me: failed program was:" >&5
2059 cat conftest.$ac_ext >&5
2060 # Passes both tests.
2064 rm -f conftest.err conftest.$ac_ext
2067 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2068 rm -f conftest.err conftest.$ac_ext
2069 if $ac_preproc_ok; then
2081 echo "$as_me:2081: result: $CPP" >&5
2082 echo "${ECHO_T}$CPP" >&6
2084 for ac_c_preproc_warn_flag in '' yes
2086 # Use a header file that comes with gcc, so configuring glibc
2087 # with a fresh cross-compiler works.
2088 # On the NeXT, cc -E runs the code through the compiler's parser,
2089 # not just through cpp. "Syntax error" is here to catch this case.
2090 cat >conftest.$ac_ext <<_ACEOF
2091 #line 2091 "configure"
2092 #include "confdefs.h"
2096 if { (eval echo "$as_me:2096: \"$ac_cpp conftest.$ac_ext\"") >&5
2097 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2099 egrep -v '^ *\+' conftest.er1 >conftest.err
2101 cat conftest.err >&5
2102 echo "$as_me:2102: \$? = $ac_status" >&5
2103 (exit $ac_status); } >/dev/null; then
2104 if test -s conftest.err; then
2105 ac_cpp_err=$ac_c_preproc_warn_flag
2112 if test -z "$ac_cpp_err"; then
2115 echo "$as_me: failed program was:" >&5
2116 cat conftest.$ac_ext >&5
2117 # Broken: fails on valid input.
2120 rm -f conftest.err conftest.$ac_ext
2122 # OK, works on sane cases. Now check whether non-existent headers
2123 # can be detected and how.
2124 cat >conftest.$ac_ext <<_ACEOF
2125 #line 2125 "configure"
2126 #include "confdefs.h"
2127 #include <ac_nonexistent.h>
2129 if { (eval echo "$as_me:2129: \"$ac_cpp conftest.$ac_ext\"") >&5
2130 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2132 egrep -v '^ *\+' conftest.er1 >conftest.err
2134 cat conftest.err >&5
2135 echo "$as_me:2135: \$? = $ac_status" >&5
2136 (exit $ac_status); } >/dev/null; then
2137 if test -s conftest.err; then
2138 ac_cpp_err=$ac_c_preproc_warn_flag
2145 if test -z "$ac_cpp_err"; then
2146 # Broken: success on invalid input.
2149 echo "$as_me: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
2151 # Passes both tests.
2155 rm -f conftest.err conftest.$ac_ext
2158 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2159 rm -f conftest.err conftest.$ac_ext
2160 if $ac_preproc_ok; then
2163 { { echo "$as_me:2163: error: C preprocessor \"$CPP\" fails sanity check" >&5
2164 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2165 { (exit 1); exit 1; }; }
2169 ac_cpp='$CPP $CPPFLAGS'
2170 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2171 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2172 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2173 ac_main_return=return
2175 if test $ac_cv_c_compiler_gnu = yes; then
2176 echo "$as_me:2176: checking whether $CC needs -traditional" >&5
2177 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2178 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2179 echo $ECHO_N "(cached) $ECHO_C" >&6
2181 ac_pattern="Autoconf.*'x'"
2182 cat >conftest.$ac_ext <<_ACEOF
2183 #line 2183 "configure"
2184 #include "confdefs.h"
2186 int Autoconf = TIOCGETP;
2188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2189 egrep "$ac_pattern" >/dev/null 2>&1; then
2190 ac_cv_prog_gcc_traditional=yes
2192 ac_cv_prog_gcc_traditional=no
2196 if test $ac_cv_prog_gcc_traditional = no; then
2197 cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2201 int Autoconf = TCGETA;
2203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2204 egrep "$ac_pattern" >/dev/null 2>&1; then
2205 ac_cv_prog_gcc_traditional=yes
2211 echo "$as_me:2211: result: $ac_cv_prog_gcc_traditional" >&5
2212 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2213 if test $ac_cv_prog_gcc_traditional = yes; then
2214 CC="$CC -traditional"
2218 echo "$as_me:2218: checking whether $CC understands -c and -o together" >&5
2219 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2220 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2221 echo $ECHO_N "(cached) $ECHO_C" >&6
2224 cat > conftest.$ac_ext <<CF_EOF
2227 ${cf_cv_main_return:-return}(0);
2230 # We do the test twice because some compilers refuse to overwrite an
2231 # existing .o file with -o, though they will create one.
2232 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2233 if { (eval echo "$as_me:2233: \"$ac_try\"") >&5
2236 echo "$as_me:2236: \$? = $ac_status" >&5
2237 (exit $ac_status); } &&
2238 test -f conftest2.$ac_objext && { (eval echo "$as_me:2238: \"$ac_try\"") >&5
2241 echo "$as_me:2241: \$? = $ac_status" >&5
2242 (exit $ac_status); };
2244 eval cf_cv_prog_CC_c_o=yes
2246 eval cf_cv_prog_CC_c_o=no
2251 if test $cf_cv_prog_CC_c_o = yes; then
2252 echo "$as_me:2252: result: yes" >&5
2253 echo "${ECHO_T}yes" >&6
2255 echo "$as_me:2255: result: no" >&5
2256 echo "${ECHO_T}no" >&6
2259 test "$program_prefix" != NONE &&
2260 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2261 # Use a double $ so make ignores it.
2262 test "$program_suffix" != NONE &&
2263 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2264 # Double any \ or $. echo might interpret backslashes.
2265 # By default was `s,x,x', remove it if useless.
2266 cat <<\_ACEOF >conftest.sed
2267 s/[\\$]/&&/g;s/;s,x,x,$//
2269 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2272 for ac_prog in mawk gawk nawk awk
2274 # Extract the first word of "$ac_prog", so it can be a program name with args.
2275 set dummy $ac_prog; ac_word=$2
2276 echo "$as_me:2276: checking for $ac_word" >&5
2277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2278 if test "${ac_cv_prog_AWK+set}" = set; then
2279 echo $ECHO_N "(cached) $ECHO_C" >&6
2281 if test -n "$AWK"; then
2282 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2284 ac_save_IFS=$IFS; IFS=$ac_path_separator
2286 for ac_dir in $ac_dummy; do
2288 test -z "$ac_dir" && ac_dir=.
2289 $as_executable_p "$ac_dir/$ac_word" || continue
2290 ac_cv_prog_AWK="$ac_prog"
2291 echo "$as_me:2291: found $ac_dir/$ac_word" >&5
2298 if test -n "$AWK"; then
2299 echo "$as_me:2299: result: $AWK" >&5
2300 echo "${ECHO_T}$AWK" >&6
2302 echo "$as_me:2302: result: no" >&5
2303 echo "${ECHO_T}no" >&6
2306 test -n "$AWK" && break
2309 test -z "$AWK" && { { echo "$as_me:2309: error: No awk program found" >&5
2310 echo "$as_me: error: No awk program found" >&2;}
2311 { (exit 1); exit 1; }; }
2313 echo "$as_me:2313: checking for egrep" >&5
2314 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2315 if test "${ac_cv_prog_egrep+set}" = set; then
2316 echo $ECHO_N "(cached) $ECHO_C" >&6
2318 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2319 then ac_cv_prog_egrep='grep -E'
2320 else ac_cv_prog_egrep='egrep'
2323 echo "$as_me:2323: result: $ac_cv_prog_egrep" >&5
2324 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2325 EGREP=$ac_cv_prog_egrep
2327 test -z "$EGREP" && { { echo "$as_me:2327: error: No egrep program found" >&5
2328 echo "$as_me: error: No egrep program found" >&2;}
2329 { (exit 1); exit 1; }; }
2331 # Find a good install program. We prefer a C program (faster),
2332 # so one script is as good as another. But avoid the broken or
2333 # incompatible versions:
2334 # SysV /etc/install, /usr/sbin/install
2335 # SunOS /usr/etc/install
2336 # IRIX /sbin/install
2338 # AmigaOS /C/install, which installs bootblocks on floppy discs
2339 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2340 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2341 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2342 # ./install, which can be erroneously created by make from ./install.sh.
2343 echo "$as_me:2343: checking for a BSD compatible install" >&5
2344 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2345 if test -z "$INSTALL"; then
2346 if test "${ac_cv_path_install+set}" = set; then
2347 echo $ECHO_N "(cached) $ECHO_C" >&6
2349 ac_save_IFS=$IFS; IFS=$ac_path_separator
2350 for ac_dir in $PATH; do
2352 # Account for people who put trailing slashes in PATH elements.
2354 / | ./ | .// | /cC/* \
2355 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2358 # OSF1 and SCO ODT 3.0 have their own names for install.
2359 # Don't use installbsd from OSF since it installs stuff as root
2361 for ac_prog in ginstall scoinst install; do
2362 if $as_executable_p "$ac_dir/$ac_prog"; then
2363 if test $ac_prog = install &&
2364 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2365 # AIX install. It has an incompatible calling convention.
2367 elif test $ac_prog = install &&
2368 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2369 # program-specific install script used by HP pwplus--don't use.
2372 ac_cv_path_install="$ac_dir/$ac_prog -c"
2382 if test "${ac_cv_path_install+set}" = set; then
2383 INSTALL=$ac_cv_path_install
2385 # As a last resort, use the slow shell script. We don't cache a
2386 # path for INSTALL within a source directory, because that will
2387 # break other packages using the cache if that directory is
2388 # removed, or if the path is relative.
2389 INSTALL=$ac_install_sh
2392 echo "$as_me:2392: result: $INSTALL" >&5
2393 echo "${ECHO_T}$INSTALL" >&6
2395 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2396 # It thinks the first close brace ends the variable substitution.
2397 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2399 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2401 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2403 echo "$as_me:2403: checking whether ln -s works" >&5
2404 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2406 if test "$LN_S" = "ln -s"; then
2407 echo "$as_me:2407: result: yes" >&5
2408 echo "${ECHO_T}yes" >&6
2410 echo "$as_me:2410: result: no, using $LN_S" >&5
2411 echo "${ECHO_T}no, using $LN_S" >&6
2414 echo "$as_me:2414: checking if $LN_S -f options work" >&5
2415 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2417 rm -f conf$$.src conf$$dst
2419 echo first >conf$$.src
2420 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2425 rm -f conf$$.dst conf$$src
2426 echo "$as_me:2426: result: $cf_prog_ln_sf" >&5
2427 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2429 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2431 # Find a good install program. We prefer a C program (faster),
2432 # so one script is as good as another. But avoid the broken or
2433 # incompatible versions:
2434 # SysV /etc/install, /usr/sbin/install
2435 # SunOS /usr/etc/install
2436 # IRIX /sbin/install
2438 # AmigaOS /C/install, which installs bootblocks on floppy discs
2439 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2440 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2441 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2442 # ./install, which can be erroneously created by make from ./install.sh.
2443 echo "$as_me:2443: checking for a BSD compatible install" >&5
2444 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2445 if test -z "$INSTALL"; then
2446 if test "${ac_cv_path_install+set}" = set; then
2447 echo $ECHO_N "(cached) $ECHO_C" >&6
2449 ac_save_IFS=$IFS; IFS=$ac_path_separator
2450 for ac_dir in $PATH; do
2452 # Account for people who put trailing slashes in PATH elements.
2454 / | ./ | .// | /cC/* \
2455 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2458 # OSF1 and SCO ODT 3.0 have their own names for install.
2459 # Don't use installbsd from OSF since it installs stuff as root
2461 for ac_prog in ginstall scoinst install; do
2462 if $as_executable_p "$ac_dir/$ac_prog"; then
2463 if test $ac_prog = install &&
2464 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2465 # AIX install. It has an incompatible calling convention.
2467 elif test $ac_prog = install &&
2468 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2469 # program-specific install script used by HP pwplus--don't use.
2472 ac_cv_path_install="$ac_dir/$ac_prog -c"
2482 if test "${ac_cv_path_install+set}" = set; then
2483 INSTALL=$ac_cv_path_install
2485 # As a last resort, use the slow shell script. We don't cache a
2486 # path for INSTALL within a source directory, because that will
2487 # break other packages using the cache if that directory is
2488 # removed, or if the path is relative.
2489 INSTALL=$ac_install_sh
2492 echo "$as_me:2492: result: $INSTALL" >&5
2493 echo "${ECHO_T}$INSTALL" >&6
2495 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2496 # It thinks the first close brace ends the variable substitution.
2497 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2499 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2501 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2507 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2508 test -z "$cf_dir" && cf_dir=.
2509 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2513 echo "$as_me:2513: checking if you want to install stripped executables" >&5
2514 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2516 # Check whether --enable-stripping or --disable-stripping was given.
2517 if test "${enable_stripping+set}" = set; then
2518 enableval="$enable_stripping"
2519 test "$enableval" != no && enableval=yes
2520 if test "$enableval" != "yes" ; then
2530 echo "$as_me:2530: result: $with_stripping" >&5
2531 echo "${ECHO_T}$with_stripping" >&6
2533 if test "$with_stripping" = yes
2540 echo "$as_me:2540: checking if install needs to be told about ownership" >&5
2541 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2542 case `$ac_config_guess` in
2551 echo "$as_me:2551: result: $with_install_o" >&5
2552 echo "${ECHO_T}$with_install_o" >&6
2553 if test "x$with_install_o" = xyes
2555 INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
2560 echo "$as_me:2560: checking for long file names" >&5
2561 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2562 if test "${ac_cv_sys_long_file_names+set}" = set; then
2563 echo $ECHO_N "(cached) $ECHO_C" >&6
2565 ac_cv_sys_long_file_names=yes
2566 # Test for long file names in all the places we know might matter:
2567 # . the current directory, where building will happen
2568 # $prefix/lib where we will be installing things
2569 # $exec_prefix/lib likewise
2570 # eval it to expand exec_prefix.
2571 # $TMPDIR if set, where it might want to write temporary files
2572 # if $TMPDIR is not set:
2573 # /tmp where it might want to write temporary files
2576 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2579 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2581 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2582 test -d $ac_dir || continue
2583 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2584 ac_xdir=$ac_dir/cf$$
2585 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2586 ac_tf1=$ac_xdir/conftest9012345
2587 ac_tf2=$ac_xdir/conftest9012346
2588 (echo 1 >$ac_tf1) 2>/dev/null
2589 (echo 2 >$ac_tf2) 2>/dev/null
2590 ac_val=`cat $ac_tf1 2>/dev/null`
2591 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2592 ac_cv_sys_long_file_names=no
2593 rm -rf $ac_xdir 2>/dev/null
2596 rm -rf $ac_xdir 2>/dev/null
2599 echo "$as_me:2599: result: $ac_cv_sys_long_file_names" >&5
2600 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2601 if test $ac_cv_sys_long_file_names = yes; then
2603 cat >>confdefs.h <<\EOF
2604 #define HAVE_LONG_FILE_NAMES 1
2609 # if we find pkg-config, check if we should install the ".pc" files.
2611 echo "$as_me:2611: checking if you want to use pkg-config" >&5
2612 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2614 # Check whether --with-pkg-config or --without-pkg-config was given.
2615 if test "${with_pkg_config+set}" = set; then
2616 withval="$with_pkg_config"
2617 cf_pkg_config=$withval
2621 echo "$as_me:2621: result: $cf_pkg_config" >&5
2622 echo "${ECHO_T}$cf_pkg_config" >&6
2624 case $cf_pkg_config in
2630 if test -n "$ac_tool_prefix"; then
2631 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2632 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2633 echo "$as_me:2633: checking for $ac_word" >&5
2634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2635 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2636 echo $ECHO_N "(cached) $ECHO_C" >&6
2640 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2643 ac_save_IFS=$IFS; IFS=$ac_path_separator
2645 for ac_dir in $ac_dummy; do
2647 test -z "$ac_dir" && ac_dir=.
2648 if $as_executable_p "$ac_dir/$ac_word"; then
2649 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2650 echo "$as_me:2650: found $ac_dir/$ac_word" >&5
2658 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2660 if test -n "$PKG_CONFIG"; then
2661 echo "$as_me:2661: result: $PKG_CONFIG" >&5
2662 echo "${ECHO_T}$PKG_CONFIG" >&6
2664 echo "$as_me:2664: result: no" >&5
2665 echo "${ECHO_T}no" >&6
2669 if test -z "$ac_cv_path_PKG_CONFIG"; then
2670 ac_pt_PKG_CONFIG=$PKG_CONFIG
2671 # Extract the first word of "pkg-config", so it can be a program name with args.
2672 set dummy pkg-config; ac_word=$2
2673 echo "$as_me:2673: checking for $ac_word" >&5
2674 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2675 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2676 echo $ECHO_N "(cached) $ECHO_C" >&6
2678 case $ac_pt_PKG_CONFIG in
2680 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2683 ac_save_IFS=$IFS; IFS=$ac_path_separator
2685 for ac_dir in $ac_dummy; do
2687 test -z "$ac_dir" && ac_dir=.
2688 if $as_executable_p "$ac_dir/$ac_word"; then
2689 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2690 echo "$as_me:2690: found $ac_dir/$ac_word" >&5
2695 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2699 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2701 if test -n "$ac_pt_PKG_CONFIG"; then
2702 echo "$as_me:2702: result: $ac_pt_PKG_CONFIG" >&5
2703 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2705 echo "$as_me:2705: result: no" >&5
2706 echo "${ECHO_T}no" >&6
2709 PKG_CONFIG=$ac_pt_PKG_CONFIG
2711 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2720 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2721 if test "$PKG_CONFIG" != none ; then
2723 if test "x$prefix" != xNONE; then
2724 cf_path_syntax="$prefix"
2726 cf_path_syntax="$ac_default_prefix"
2729 case ".$PKG_CONFIG" in
2734 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2736 (.\${*prefix}*|.\${*dir}*)
2737 eval PKG_CONFIG="$PKG_CONFIG"
2738 case ".$PKG_CONFIG" in
2740 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2745 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2748 { { echo "$as_me:2748: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2749 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2750 { (exit 1); exit 1; }; }
2754 elif test "x$cf_pkg_config" != xno ; then
2755 { echo "$as_me:2755: WARNING: pkg-config is not installed" >&5
2756 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2761 echo "$as_me:2761: checking for pkg-config library directory" >&5
2762 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2765 echo "$as_me:2765: checking for $PKG_CONFIG library directory" >&5
2766 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2770 PKG_CONFIG_LIBDIR=no
2772 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2773 if test "${with_pkg_config_libdir+set}" = set; then
2774 withval="$with_pkg_config_libdir"
2775 PKG_CONFIG_LIBDIR=$withval
2777 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2780 case x$PKG_CONFIG_LIBDIR in
2784 # Look for the library directory using the same prefix as the executable
2785 if test "x$PKG_CONFIG" = xnone
2789 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2792 # If you don't like using the default architecture, you have to specify the
2793 # intended library directory and corresponding compiler/linker options.
2795 # This case allows for Debian's 2014-flavor of multiarch, along with the
2796 # most common variations before that point. Some other variants spell the
2797 # directory differently, e.g., "pkg-config", and put it in unusual places.
2798 # pkg-config has always been poorly standardized, which is ironic...
2799 case x`(arch) 2>/dev/null` in
2802 $cf_path/lib/*64-linux-gnu \
2810 $cf_path/lib/*-linux-gnu \
2818 test -n "$verbose" && echo " list..." 1>&6
2820 echo "${as_me:-configure}:2820: testing list... ..." 1>&5
2822 for cf_config in $cf_search_path
2824 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2826 echo "${as_me:-configure}:2826: testing checking $cf_config/pkgconfig ..." 1>&5
2828 if test -d $cf_config/pkgconfig
2830 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2831 echo "$as_me:2831: checking done" >&5
2832 echo $ECHO_N "checking done... $ECHO_C" >&6
2841 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2842 echo "$as_me:2842: result: $PKG_CONFIG_LIBDIR" >&5
2843 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
2846 echo "$as_me:2846: checking if you want to build test-programs" >&5
2847 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2849 # Check whether --with-tests or --without-tests was given.
2850 if test "${with_tests+set}" = set; then
2851 withval="$with_tests"
2852 cf_with_tests=$withval
2856 echo "$as_me:2856: result: $cf_with_tests" >&5
2857 echo "${ECHO_T}$cf_with_tests" >&6
2859 echo "$as_me:2859: checking if we should assume mixed-case filenames" >&5
2860 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
2862 # Check whether --enable-mixed-case or --disable-mixed-case was given.
2863 if test "${enable_mixed_case+set}" = set; then
2864 enableval="$enable_mixed_case"
2865 enable_mixedcase=$enableval
2867 enable_mixedcase=auto
2869 echo "$as_me:2869: result: $enable_mixedcase" >&5
2870 echo "${ECHO_T}$enable_mixedcase" >&6
2871 if test "$enable_mixedcase" = "auto" ; then
2873 echo "$as_me:2873: checking if filesystem supports mixed-case filenames" >&5
2874 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2875 if test "${cf_cv_mixedcase+set}" = set; then
2876 echo $ECHO_N "(cached) $ECHO_C" >&6
2879 if test "$cross_compiling" = yes ; then
2880 case $target_alias in
2881 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
2889 rm -f conftest CONFTEST
2891 if test -f CONFTEST ; then
2896 rm -f conftest CONFTEST
2900 echo "$as_me:2900: result: $cf_cv_mixedcase" >&5
2901 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2902 test "$cf_cv_mixedcase" = yes &&
2903 cat >>confdefs.h <<\EOF
2904 #define MIXEDCASE_FILENAMES 1
2908 cf_cv_mixedcase=$enable_mixedcase
2909 if test "$enable_mixedcase" = "yes" ; then
2910 cat >>confdefs.h <<\EOF
2911 #define MIXEDCASE_FILENAMES 1
2917 # do this after mixed-case option (tags/TAGS is not as important as tic).
2918 echo "$as_me:2918: checking whether ${MAKE-make} sets \${MAKE}" >&5
2919 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2920 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2921 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2922 echo $ECHO_N "(cached) $ECHO_C" >&6
2924 cat >conftest.make <<\EOF
2926 @echo 'ac_maketemp="${MAKE}"'
2928 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2929 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2930 if test -n "$ac_maketemp"; then
2931 eval ac_cv_prog_make_${ac_make}_set=yes
2933 eval ac_cv_prog_make_${ac_make}_set=no
2937 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2938 echo "$as_me:2938: result: yes" >&5
2939 echo "${ECHO_T}yes" >&6
2942 echo "$as_me:2942: result: no" >&5
2943 echo "${ECHO_T}no" >&6
2944 SET_MAKE="MAKE=${MAKE-make}"
2947 for ac_prog in exctags ctags
2949 # Extract the first word of "$ac_prog", so it can be a program name with args.
2950 set dummy $ac_prog; ac_word=$2
2951 echo "$as_me:2951: checking for $ac_word" >&5
2952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2953 if test "${ac_cv_prog_CTAGS+set}" = set; then
2954 echo $ECHO_N "(cached) $ECHO_C" >&6
2956 if test -n "$CTAGS"; then
2957 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2959 ac_save_IFS=$IFS; IFS=$ac_path_separator
2961 for ac_dir in $ac_dummy; do
2963 test -z "$ac_dir" && ac_dir=.
2964 $as_executable_p "$ac_dir/$ac_word" || continue
2965 ac_cv_prog_CTAGS="$ac_prog"
2966 echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2972 CTAGS=$ac_cv_prog_CTAGS
2973 if test -n "$CTAGS"; then
2974 echo "$as_me:2974: result: $CTAGS" >&5
2975 echo "${ECHO_T}$CTAGS" >&6
2977 echo "$as_me:2977: result: no" >&5
2978 echo "${ECHO_T}no" >&6
2981 test -n "$CTAGS" && break
2984 for ac_prog in exetags etags
2986 # Extract the first word of "$ac_prog", so it can be a program name with args.
2987 set dummy $ac_prog; ac_word=$2
2988 echo "$as_me:2988: checking for $ac_word" >&5
2989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2990 if test "${ac_cv_prog_ETAGS+set}" = set; then
2991 echo $ECHO_N "(cached) $ECHO_C" >&6
2993 if test -n "$ETAGS"; then
2994 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2996 ac_save_IFS=$IFS; IFS=$ac_path_separator
2998 for ac_dir in $ac_dummy; do
3000 test -z "$ac_dir" && ac_dir=.
3001 $as_executable_p "$ac_dir/$ac_word" || continue
3002 ac_cv_prog_ETAGS="$ac_prog"
3003 echo "$as_me:3003: found $ac_dir/$ac_word" >&5
3009 ETAGS=$ac_cv_prog_ETAGS
3010 if test -n "$ETAGS"; then
3011 echo "$as_me:3011: result: $ETAGS" >&5
3012 echo "${ECHO_T}$ETAGS" >&6
3014 echo "$as_me:3014: result: no" >&5
3015 echo "${ECHO_T}no" >&6
3018 test -n "$ETAGS" && break
3021 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3022 set dummy ${CTAGS:-ctags}; ac_word=$2
3023 echo "$as_me:3023: checking for $ac_word" >&5
3024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3025 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3026 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if test -n "$MAKE_LOWER_TAGS"; then
3029 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3031 ac_save_IFS=$IFS; IFS=$ac_path_separator
3033 for ac_dir in $ac_dummy; do
3035 test -z "$ac_dir" && ac_dir=.
3036 $as_executable_p "$ac_dir/$ac_word" || continue
3037 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3038 echo "$as_me:3038: found $ac_dir/$ac_word" >&5
3042 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3045 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3046 if test -n "$MAKE_LOWER_TAGS"; then
3047 echo "$as_me:3047: result: $MAKE_LOWER_TAGS" >&5
3048 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3050 echo "$as_me:3050: result: no" >&5
3051 echo "${ECHO_T}no" >&6
3054 if test "$cf_cv_mixedcase" = yes ; then
3055 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3056 set dummy ${ETAGS:-etags}; ac_word=$2
3057 echo "$as_me:3057: checking for $ac_word" >&5
3058 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3059 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3060 echo $ECHO_N "(cached) $ECHO_C" >&6
3062 if test -n "$MAKE_UPPER_TAGS"; then
3063 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3065 ac_save_IFS=$IFS; IFS=$ac_path_separator
3067 for ac_dir in $ac_dummy; do
3069 test -z "$ac_dir" && ac_dir=.
3070 $as_executable_p "$ac_dir/$ac_word" || continue
3071 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3072 echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3076 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3079 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3080 if test -n "$MAKE_UPPER_TAGS"; then
3081 echo "$as_me:3081: result: $MAKE_UPPER_TAGS" >&5
3082 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3084 echo "$as_me:3084: result: no" >&5
3085 echo "${ECHO_T}no" >&6
3092 if test "$MAKE_UPPER_TAGS" = yes ; then
3098 if test "$MAKE_LOWER_TAGS" = yes ; then
3104 echo "$as_me:3104: checking for makeflags variable" >&5
3105 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3106 if test "${cf_cv_makeflags+set}" = set; then
3107 echo $ECHO_N "(cached) $ECHO_C" >&6
3111 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3113 cat >cf_makeflags.tmp <<CF_EOF
3116 @ echo '.$cf_option'
3118 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3119 case "$cf_result" in
3121 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3122 case "$cf_result" in
3123 (.*CC=*) cf_cv_makeflags=
3125 (*) cf_cv_makeflags=$cf_option
3131 (*) echo "given option \"$cf_option\", no match \"$cf_result\""
3135 rm -f cf_makeflags.tmp
3138 echo "$as_me:3138: result: $cf_cv_makeflags" >&5
3139 echo "${ECHO_T}$cf_cv_makeflags" >&6
3141 if test -n "$ac_tool_prefix"; then
3142 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3143 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3144 echo "$as_me:3144: checking for $ac_word" >&5
3145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3146 if test "${ac_cv_prog_RANLIB+set}" = set; then
3147 echo $ECHO_N "(cached) $ECHO_C" >&6
3149 if test -n "$RANLIB"; then
3150 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3152 ac_save_IFS=$IFS; IFS=$ac_path_separator
3154 for ac_dir in $ac_dummy; do
3156 test -z "$ac_dir" && ac_dir=.
3157 $as_executable_p "$ac_dir/$ac_word" || continue
3158 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3159 echo "$as_me:3159: found $ac_dir/$ac_word" >&5
3165 RANLIB=$ac_cv_prog_RANLIB
3166 if test -n "$RANLIB"; then
3167 echo "$as_me:3167: result: $RANLIB" >&5
3168 echo "${ECHO_T}$RANLIB" >&6
3170 echo "$as_me:3170: result: no" >&5
3171 echo "${ECHO_T}no" >&6
3175 if test -z "$ac_cv_prog_RANLIB"; then
3176 ac_ct_RANLIB=$RANLIB
3177 # Extract the first word of "ranlib", so it can be a program name with args.
3178 set dummy ranlib; ac_word=$2
3179 echo "$as_me:3179: checking for $ac_word" >&5
3180 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3181 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3182 echo $ECHO_N "(cached) $ECHO_C" >&6
3184 if test -n "$ac_ct_RANLIB"; then
3185 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3187 ac_save_IFS=$IFS; IFS=$ac_path_separator
3189 for ac_dir in $ac_dummy; do
3191 test -z "$ac_dir" && ac_dir=.
3192 $as_executable_p "$ac_dir/$ac_word" || continue
3193 ac_cv_prog_ac_ct_RANLIB="ranlib"
3194 echo "$as_me:3194: found $ac_dir/$ac_word" >&5
3198 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3201 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3202 if test -n "$ac_ct_RANLIB"; then
3203 echo "$as_me:3203: result: $ac_ct_RANLIB" >&5
3204 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3206 echo "$as_me:3206: result: no" >&5
3207 echo "${ECHO_T}no" >&6
3210 RANLIB=$ac_ct_RANLIB
3212 RANLIB="$ac_cv_prog_RANLIB"
3215 if test -n "$ac_tool_prefix"; then
3216 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3217 set dummy ${ac_tool_prefix}ld; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_prog_LD+set}" = set; then
3221 echo $ECHO_N "(cached) $ECHO_C" >&6
3223 if test -n "$LD"; then
3224 ac_cv_prog_LD="$LD" # Let the user override the test.
3226 ac_save_IFS=$IFS; IFS=$ac_path_separator
3228 for ac_dir in $ac_dummy; do
3230 test -z "$ac_dir" && ac_dir=.
3231 $as_executable_p "$ac_dir/$ac_word" || continue
3232 ac_cv_prog_LD="${ac_tool_prefix}ld"
3233 echo "$as_me:3233: found $ac_dir/$ac_word" >&5
3240 if test -n "$LD"; then
3241 echo "$as_me:3241: result: $LD" >&5
3242 echo "${ECHO_T}$LD" >&6
3244 echo "$as_me:3244: result: no" >&5
3245 echo "${ECHO_T}no" >&6
3249 if test -z "$ac_cv_prog_LD"; then
3251 # Extract the first word of "ld", so it can be a program name with args.
3252 set dummy ld; ac_word=$2
3253 echo "$as_me:3253: checking for $ac_word" >&5
3254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3256 echo $ECHO_N "(cached) $ECHO_C" >&6
3258 if test -n "$ac_ct_LD"; then
3259 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3261 ac_save_IFS=$IFS; IFS=$ac_path_separator
3263 for ac_dir in $ac_dummy; do
3265 test -z "$ac_dir" && ac_dir=.
3266 $as_executable_p "$ac_dir/$ac_word" || continue
3267 ac_cv_prog_ac_ct_LD="ld"
3268 echo "$as_me:3268: found $ac_dir/$ac_word" >&5
3272 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3275 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3276 if test -n "$ac_ct_LD"; then
3277 echo "$as_me:3277: result: $ac_ct_LD" >&5
3278 echo "${ECHO_T}$ac_ct_LD" >&6
3280 echo "$as_me:3280: result: no" >&5
3281 echo "${ECHO_T}no" >&6
3289 if test -n "$ac_tool_prefix"; then
3290 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3291 set dummy ${ac_tool_prefix}ar; ac_word=$2
3292 echo "$as_me:3292: checking for $ac_word" >&5
3293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3294 if test "${ac_cv_prog_AR+set}" = set; then
3295 echo $ECHO_N "(cached) $ECHO_C" >&6
3297 if test -n "$AR"; then
3298 ac_cv_prog_AR="$AR" # Let the user override the test.
3300 ac_save_IFS=$IFS; IFS=$ac_path_separator
3302 for ac_dir in $ac_dummy; do
3304 test -z "$ac_dir" && ac_dir=.
3305 $as_executable_p "$ac_dir/$ac_word" || continue
3306 ac_cv_prog_AR="${ac_tool_prefix}ar"
3307 echo "$as_me:3307: found $ac_dir/$ac_word" >&5
3314 if test -n "$AR"; then
3315 echo "$as_me:3315: result: $AR" >&5
3316 echo "${ECHO_T}$AR" >&6
3318 echo "$as_me:3318: result: no" >&5
3319 echo "${ECHO_T}no" >&6
3323 if test -z "$ac_cv_prog_AR"; then
3325 # Extract the first word of "ar", so it can be a program name with args.
3326 set dummy ar; ac_word=$2
3327 echo "$as_me:3327: checking for $ac_word" >&5
3328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3329 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3330 echo $ECHO_N "(cached) $ECHO_C" >&6
3332 if test -n "$ac_ct_AR"; then
3333 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3335 ac_save_IFS=$IFS; IFS=$ac_path_separator
3337 for ac_dir in $ac_dummy; do
3339 test -z "$ac_dir" && ac_dir=.
3340 $as_executable_p "$ac_dir/$ac_word" || continue
3341 ac_cv_prog_ac_ct_AR="ar"
3342 echo "$as_me:3342: found $ac_dir/$ac_word" >&5
3346 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3349 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3350 if test -n "$ac_ct_AR"; then
3351 echo "$as_me:3351: result: $ac_ct_AR" >&5
3352 echo "${ECHO_T}$ac_ct_AR" >&6
3354 echo "$as_me:3354: result: no" >&5
3355 echo "${ECHO_T}no" >&6
3363 if test -n "$ac_tool_prefix"; then
3364 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3365 set dummy ${ac_tool_prefix}ar; ac_word=$2
3366 echo "$as_me:3366: checking for $ac_word" >&5
3367 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3368 if test "${ac_cv_prog_AR+set}" = set; then
3369 echo $ECHO_N "(cached) $ECHO_C" >&6
3371 if test -n "$AR"; then
3372 ac_cv_prog_AR="$AR" # Let the user override the test.
3374 ac_save_IFS=$IFS; IFS=$ac_path_separator
3376 for ac_dir in $ac_dummy; do
3378 test -z "$ac_dir" && ac_dir=.
3379 $as_executable_p "$ac_dir/$ac_word" || continue
3380 ac_cv_prog_AR="${ac_tool_prefix}ar"
3381 echo "$as_me:3381: found $ac_dir/$ac_word" >&5
3388 if test -n "$AR"; then
3389 echo "$as_me:3389: result: $AR" >&5
3390 echo "${ECHO_T}$AR" >&6
3392 echo "$as_me:3392: result: no" >&5
3393 echo "${ECHO_T}no" >&6
3397 if test -z "$ac_cv_prog_AR"; then
3399 # Extract the first word of "ar", so it can be a program name with args.
3400 set dummy ar; ac_word=$2
3401 echo "$as_me:3401: checking for $ac_word" >&5
3402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3403 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3404 echo $ECHO_N "(cached) $ECHO_C" >&6
3406 if test -n "$ac_ct_AR"; then
3407 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3409 ac_save_IFS=$IFS; IFS=$ac_path_separator
3411 for ac_dir in $ac_dummy; do
3413 test -z "$ac_dir" && ac_dir=.
3414 $as_executable_p "$ac_dir/$ac_word" || continue
3415 ac_cv_prog_ac_ct_AR="ar"
3416 echo "$as_me:3416: found $ac_dir/$ac_word" >&5
3420 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3423 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3424 if test -n "$ac_ct_AR"; then
3425 echo "$as_me:3425: result: $ac_ct_AR" >&5
3426 echo "${ECHO_T}$ac_ct_AR" >&6
3428 echo "$as_me:3428: result: no" >&5
3429 echo "${ECHO_T}no" >&6
3437 echo "$as_me:3437: checking for options to update archives" >&5
3438 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3439 if test "${cf_cv_ar_flags+set}" = set; then
3440 echo $ECHO_N "(cached) $ECHO_C" >&6
3443 cf_cv_ar_flags=unknown
3444 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3447 # check if $ARFLAGS already contains this choice
3448 if test "x$ARFLAGS" != "x" ; then
3449 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3450 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3456 rm -f conftest.$ac_cv_objext
3459 cat >conftest.$ac_ext <<EOF
3460 #line 3460 "configure"
3461 int testdata[3] = { 123, 456, 789 };
3463 if { (eval echo "$as_me:3463: \"$ac_compile\"") >&5
3464 (eval $ac_compile) 2>&5
3466 echo "$as_me:3466: \$? = $ac_status" >&5
3467 (exit $ac_status); } ; then
3468 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3469 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3470 if test -f conftest.a ; then
3471 cf_cv_ar_flags=$cf_ar_flags
3475 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3477 echo "${as_me:-configure}:3477: testing cannot compile test-program ..." 1>&5
3482 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3485 echo "$as_me:3485: result: $cf_cv_ar_flags" >&5
3486 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3488 if test -n "$ARFLAGS" ; then
3489 if test -n "$cf_cv_ar_flags" ; then
3490 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3493 ARFLAGS=$cf_cv_ar_flags
3496 echo "$as_me:3496: checking for PATH separator" >&5
3497 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3498 case $cf_cv_system_name in
3499 (os2*) PATH_SEPARATOR=';' ;;
3500 (*) ${PATH_SEPARATOR:=':'} ;;
3503 echo "$as_me:3503: result: $PATH_SEPARATOR" >&5
3504 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3506 echo "$as_me:3506: checking if you have specified an install-prefix" >&5
3507 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3509 # Check whether --with-install-prefix or --without-install-prefix was given.
3510 if test "${with_install_prefix+set}" = set; then
3511 withval="$with_install_prefix"
3515 (*) DESTDIR="$withval"
3519 echo "$as_me:3519: result: $DESTDIR" >&5
3520 echo "${ECHO_T}$DESTDIR" >&6
3522 ###############################################################################
3524 # If we're cross-compiling, allow the user to override the tools and their
3525 # options. The configure script is oriented toward identifying the host
3526 # compiler, etc., but we need a build compiler to generate parts of the source.
3528 if test "$cross_compiling" = yes ; then
3530 # defaults that we might want to override
3531 : ${BUILD_CFLAGS:=''}
3532 : ${BUILD_CPPFLAGS:=''}
3533 : ${BUILD_LDFLAGS:=''}
3535 : ${BUILD_EXEEXT:='$x'}
3536 : ${BUILD_OBJEXT:='o'}
3538 # Check whether --with-build-cc or --without-build-cc was given.
3539 if test "${with_build_cc+set}" = set; then
3540 withval="$with_build_cc"
3543 for ac_prog in gcc clang c99 c89 cc cl
3545 # Extract the first word of "$ac_prog", so it can be a program name with args.
3546 set dummy $ac_prog; ac_word=$2
3547 echo "$as_me:3547: checking for $ac_word" >&5
3548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3549 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3550 echo $ECHO_N "(cached) $ECHO_C" >&6
3552 if test -n "$BUILD_CC"; then
3553 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3555 ac_save_IFS=$IFS; IFS=$ac_path_separator
3557 for ac_dir in $ac_dummy; do
3559 test -z "$ac_dir" && ac_dir=.
3560 $as_executable_p "$ac_dir/$ac_word" || continue
3561 ac_cv_prog_BUILD_CC="$ac_prog"
3562 echo "$as_me:3562: found $ac_dir/$ac_word" >&5
3568 BUILD_CC=$ac_cv_prog_BUILD_CC
3569 if test -n "$BUILD_CC"; then
3570 echo "$as_me:3570: result: $BUILD_CC" >&5
3571 echo "${ECHO_T}$BUILD_CC" >&6
3573 echo "$as_me:3573: result: no" >&5
3574 echo "${ECHO_T}no" >&6
3577 test -n "$BUILD_CC" && break
3579 test -n "$BUILD_CC" || BUILD_CC="none"
3582 echo "$as_me:3582: checking for native build C compiler" >&5
3583 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3584 echo "$as_me:3584: result: $BUILD_CC" >&5
3585 echo "${ECHO_T}$BUILD_CC" >&6
3587 echo "$as_me:3587: checking for native build C preprocessor" >&5
3588 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3590 # Check whether --with-build-cpp or --without-build-cpp was given.
3591 if test "${with_build_cpp+set}" = set; then
3592 withval="$with_build_cpp"
3593 BUILD_CPP="$withval"
3595 BUILD_CPP='${BUILD_CC} -E'
3597 echo "$as_me:3597: result: $BUILD_CPP" >&5
3598 echo "${ECHO_T}$BUILD_CPP" >&6
3600 echo "$as_me:3600: checking for native build C flags" >&5
3601 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3603 # Check whether --with-build-cflags or --without-build-cflags was given.
3604 if test "${with_build_cflags+set}" = set; then
3605 withval="$with_build_cflags"
3606 BUILD_CFLAGS="$withval"
3608 echo "$as_me:3608: result: $BUILD_CFLAGS" >&5
3609 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3611 echo "$as_me:3611: checking for native build C preprocessor-flags" >&5
3612 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3614 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3615 if test "${with_build_cppflags+set}" = set; then
3616 withval="$with_build_cppflags"
3617 BUILD_CPPFLAGS="$withval"
3619 echo "$as_me:3619: result: $BUILD_CPPFLAGS" >&5
3620 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3622 echo "$as_me:3622: checking for native build linker-flags" >&5
3623 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3625 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3626 if test "${with_build_ldflags+set}" = set; then
3627 withval="$with_build_ldflags"
3628 BUILD_LDFLAGS="$withval"
3630 echo "$as_me:3630: result: $BUILD_LDFLAGS" >&5
3631 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3633 echo "$as_me:3633: checking for native build linker-libraries" >&5
3634 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3636 # Check whether --with-build-libs or --without-build-libs was given.
3637 if test "${with_build_libs+set}" = set; then
3638 withval="$with_build_libs"
3639 BUILD_LIBS="$withval"
3641 echo "$as_me:3641: result: $BUILD_LIBS" >&5
3642 echo "${ECHO_T}$BUILD_LIBS" >&6
3644 # this assumes we're on Unix.
3648 : ${BUILD_CC:='${CC}'}
3650 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3651 { { echo "$as_me:3651: error: Cross-build requires two compilers.
3652 Use --with-build-cc to specify the native compiler." >&5
3653 echo "$as_me: error: Cross-build requires two compilers.
3654 Use --with-build-cc to specify the native compiler." >&2;}
3655 { (exit 1); exit 1; }; }
3659 : ${BUILD_CC:='${CC}'}
3660 : ${BUILD_CPP:='${CPP}'}
3661 : ${BUILD_CFLAGS:='${CFLAGS}'}
3662 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3663 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3664 : ${BUILD_LIBS:='${LIBS}'}
3665 : ${BUILD_EXEEXT:='$x'}
3666 : ${BUILD_OBJEXT:='o'}
3669 ###############################################################################
3671 ### Options to allow the user to specify the set of libraries which are used.
3672 ### Use "--without-normal --with-shared" to allow the default model to be
3673 ### shared, for example.
3676 echo "$as_me:3676: checking if you want to build shared C-objects" >&5
3677 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3679 # Check whether --with-shared or --without-shared was given.
3680 if test "${with_shared+set}" = set; then
3681 withval="$with_shared"
3682 with_shared=$withval
3686 echo "$as_me:3686: result: $with_shared" >&5
3687 echo "${ECHO_T}$with_shared" >&6
3688 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3690 echo "$as_me:3690: checking for specified models" >&5
3691 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3692 test -z "$cf_list_models" && cf_list_models=normal
3693 echo "$as_me:3693: result: $cf_list_models" >&5
3694 echo "${ECHO_T}$cf_list_models" >&6
3696 ### Use the first model as the default, and save its suffix for use in building
3697 ### up test-applications.
3698 echo "$as_me:3698: checking for default model" >&5
3699 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3700 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3701 echo "$as_me:3701: result: $DFT_LWR_MODEL" >&5
3702 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3704 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3706 echo "$as_me:3706: checking for specific curses-directory" >&5
3707 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3709 # Check whether --with-curses-dir or --without-curses-dir was given.
3710 if test "${with_curses_dir+set}" = set; then
3711 withval="$with_curses_dir"
3712 cf_cv_curses_dir=$withval
3716 echo "$as_me:3716: result: $cf_cv_curses_dir" >&5
3717 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3719 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3722 if test "x$prefix" != xNONE; then
3723 cf_path_syntax="$prefix"
3725 cf_path_syntax="$ac_default_prefix"
3733 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3735 (.\${*prefix}*|.\${*dir}*)
3736 eval withval="$withval"
3739 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3744 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3747 { { echo "$as_me:3747: error: expected a pathname, not \"$withval\"" >&5
3748 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3749 { (exit 1); exit 1; }; }
3753 if test -d "$cf_cv_curses_dir"
3756 if test -n "$cf_cv_curses_dir/include" ; then
3757 for cf_add_incdir in $cf_cv_curses_dir/include
3759 while test $cf_add_incdir != /usr/include
3761 if test -d $cf_add_incdir
3764 if test -n "$CFLAGS$CPPFLAGS" ; then
3765 # a loop is needed to ensure we can add subdirs of existing dirs
3766 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3767 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3768 cf_have_incdir=yes; break
3773 if test "$cf_have_incdir" = no ; then
3774 if test "$cf_add_incdir" = /usr/local/include ; then
3775 if test "$GCC" = yes
3777 cf_save_CPPFLAGS=$CPPFLAGS
3778 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3779 cat >conftest.$ac_ext <<_ACEOF
3780 #line 3780 "configure"
3781 #include "confdefs.h"
3791 rm -f conftest.$ac_objext
3792 if { (eval echo "$as_me:3792: \"$ac_compile\"") >&5
3793 (eval $ac_compile) 2>&5
3795 echo "$as_me:3795: \$? = $ac_status" >&5
3796 (exit $ac_status); } &&
3797 { ac_try='test -s conftest.$ac_objext'
3798 { (eval echo "$as_me:3798: \"$ac_try\"") >&5
3801 echo "$as_me:3801: \$? = $ac_status" >&5
3802 (exit $ac_status); }; }; then
3805 echo "$as_me: failed program was:" >&5
3806 cat conftest.$ac_ext >&5
3809 rm -f conftest.$ac_objext conftest.$ac_ext
3810 CPPFLAGS=$cf_save_CPPFLAGS
3815 if test "$cf_have_incdir" = no ; then
3816 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3818 echo "${as_me:-configure}:3818: testing adding $cf_add_incdir to include-path ..." 1>&5
3820 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3822 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3823 test "$cf_top_incdir" = "$cf_add_incdir" && break
3824 cf_add_incdir="$cf_top_incdir"
3835 if test -n "$cf_cv_curses_dir/lib" ; then
3836 for cf_add_libdir in $cf_cv_curses_dir/lib
3838 if test $cf_add_libdir = /usr/lib ; then
3840 elif test -d $cf_add_libdir
3843 if test -n "$LDFLAGS$LIBS" ; then
3844 # a loop is needed to ensure we can add subdirs of existing dirs
3845 for cf_test_libdir in $LDFLAGS $LIBS ; do
3846 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3847 cf_have_libdir=yes; break
3851 if test "$cf_have_libdir" = no ; then
3852 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3854 echo "${as_me:-configure}:3854: testing adding $cf_add_libdir to library-path ..." 1>&5
3856 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3865 cf_ncuconfig_root=ncurses
3866 cf_have_ncuconfig=no
3868 if test "x${PKG_CONFIG:=none}" != xnone; then
3869 echo "$as_me:3869: checking pkg-config for $cf_ncuconfig_root" >&5
3870 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
3871 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
3872 echo "$as_me:3872: result: yes" >&5
3873 echo "${ECHO_T}yes" >&6
3875 echo "$as_me:3875: checking if the $cf_ncuconfig_root package files work" >&5
3876 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
3877 cf_have_ncuconfig=unknown
3879 cf_save_CPPFLAGS="$CPPFLAGS"
3880 cf_save_LIBS="$LIBS"
3882 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
3884 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
3885 # Filter out duplicates - this happens with badly-designed ".pc" files...
3886 for cf_add_1lib in $LIBS
3888 for cf_add_2lib in $cf_add_libs
3890 if test "x$cf_add_1lib" = "x$cf_add_2lib"
3896 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
3900 cat >conftest.$ac_ext <<_ACEOF
3901 #line 3901 "configure"
3902 #include "confdefs.h"
3903 #include <${cf_cv_ncurses_header:-curses.h}>
3907 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3912 rm -f conftest.$ac_objext conftest$ac_exeext
3913 if { (eval echo "$as_me:3913: \"$ac_link\"") >&5
3914 (eval $ac_link) 2>&5
3916 echo "$as_me:3916: \$? = $ac_status" >&5
3917 (exit $ac_status); } &&
3918 { ac_try='test -s conftest$ac_exeext'
3919 { (eval echo "$as_me:3919: \"$ac_try\"") >&5
3922 echo "$as_me:3922: \$? = $ac_status" >&5
3923 (exit $ac_status); }; }; then
3924 if test "$cross_compiling" = yes; then
3925 cf_have_ncuconfig=maybe
3927 cat >conftest.$ac_ext <<_ACEOF
3928 #line 3928 "configure"
3929 #include "confdefs.h"
3930 #include <${cf_cv_ncurses_header:-curses.h}>
3932 { char *xx = curses_version(); return (xx == 0); }
3934 rm -f conftest$ac_exeext
3935 if { (eval echo "$as_me:3935: \"$ac_link\"") >&5
3936 (eval $ac_link) 2>&5
3938 echo "$as_me:3938: \$? = $ac_status" >&5
3939 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3940 { (eval echo "$as_me:3940: \"$ac_try\"") >&5
3943 echo "$as_me:3943: \$? = $ac_status" >&5
3944 (exit $ac_status); }; }; then
3945 cf_have_ncuconfig=yes
3947 echo "$as_me: program exited with status $ac_status" >&5
3948 echo "$as_me: failed program was:" >&5
3949 cat conftest.$ac_ext >&5
3950 cf_have_ncuconfig=no
3952 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3955 echo "$as_me: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
3957 cf_have_ncuconfig=no
3959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3960 echo "$as_me:3960: result: $cf_have_ncuconfig" >&5
3961 echo "${ECHO_T}$cf_have_ncuconfig" >&6
3962 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
3963 if test "$cf_have_ncuconfig" != "yes"
3965 CPPFLAGS="$cf_save_CPPFLAGS"
3966 LIBS="$cf_save_LIBS"
3967 NCURSES_CONFIG_PKG=none
3970 cat >>confdefs.h <<\EOF
3974 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
3976 echo "$as_me:3976: checking for terminfo header" >&5
3977 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
3978 if test "${cf_cv_term_header+set}" = set; then
3979 echo $ECHO_N "(cached) $ECHO_C" >&6
3982 case ${cf_cv_ncurses_header} in
3983 (*/ncurses.h|*/ncursesw.h)
3984 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3987 cf_term_header=term.h
3991 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3993 cat >conftest.$ac_ext <<_ACEOF
3994 #line 3994 "configure"
3995 #include "confdefs.h"
3997 #include <${cf_cv_ncurses_header:-curses.h}>
4003 int x = auto_left_margin
4008 rm -f conftest.$ac_objext
4009 if { (eval echo "$as_me:4009: \"$ac_compile\"") >&5
4010 (eval $ac_compile) 2>&5
4012 echo "$as_me:4012: \$? = $ac_status" >&5
4013 (exit $ac_status); } &&
4014 { ac_try='test -s conftest.$ac_objext'
4015 { (eval echo "$as_me:4015: \"$ac_try\"") >&5
4018 echo "$as_me:4018: \$? = $ac_status" >&5
4019 (exit $ac_status); }; }; then
4021 cf_cv_term_header="$cf_test"
4023 echo "$as_me: failed program was:" >&5
4024 cat conftest.$ac_ext >&5
4026 cf_cv_term_header=unknown
4029 rm -f conftest.$ac_objext conftest.$ac_ext
4030 test "$cf_cv_term_header" != unknown && break
4034 echo "$as_me:4034: result: $cf_cv_term_header" >&5
4035 echo "${ECHO_T}$cf_cv_term_header" >&6
4037 # Set definitions to allow ifdef'ing to accommodate subdirectories
4039 case $cf_cv_term_header in
4042 cat >>confdefs.h <<\EOF
4043 #define HAVE_TERM_H 1
4049 case $cf_cv_term_header in
4052 cat >>confdefs.h <<\EOF
4053 #define HAVE_NCURSES_TERM_H 1
4059 cat >>confdefs.h <<\EOF
4060 #define HAVE_NCURSESW_TERM_H 1
4069 echo "$as_me:4069: result: no" >&5
4070 echo "${ECHO_T}no" >&6
4071 NCURSES_CONFIG_PKG=none
4074 NCURSES_CONFIG_PKG=none
4077 if test "x$cf_have_ncuconfig" = "xno"; then
4078 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4080 if test -n "$ac_tool_prefix"; then
4081 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4083 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4084 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4085 echo "$as_me:4085: checking for $ac_word" >&5
4086 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4087 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4088 echo $ECHO_N "(cached) $ECHO_C" >&6
4090 if test -n "$NCURSES_CONFIG"; then
4091 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4093 ac_save_IFS=$IFS; IFS=$ac_path_separator
4095 for ac_dir in $ac_dummy; do
4097 test -z "$ac_dir" && ac_dir=.
4098 $as_executable_p "$ac_dir/$ac_word" || continue
4099 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4100 echo "$as_me:4100: found $ac_dir/$ac_word" >&5
4106 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4107 if test -n "$NCURSES_CONFIG"; then
4108 echo "$as_me:4108: result: $NCURSES_CONFIG" >&5
4109 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4111 echo "$as_me:4111: result: no" >&5
4112 echo "${ECHO_T}no" >&6
4115 test -n "$NCURSES_CONFIG" && break
4118 if test -z "$NCURSES_CONFIG"; then
4119 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4120 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4122 # Extract the first word of "$ac_prog", so it can be a program name with args.
4123 set dummy $ac_prog; ac_word=$2
4124 echo "$as_me:4124: checking for $ac_word" >&5
4125 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4126 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4127 echo $ECHO_N "(cached) $ECHO_C" >&6
4129 if test -n "$ac_ct_NCURSES_CONFIG"; then
4130 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4132 ac_save_IFS=$IFS; IFS=$ac_path_separator
4134 for ac_dir in $ac_dummy; do
4136 test -z "$ac_dir" && ac_dir=.
4137 $as_executable_p "$ac_dir/$ac_word" || continue
4138 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4139 echo "$as_me:4139: found $ac_dir/$ac_word" >&5
4145 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4146 if test -n "$ac_ct_NCURSES_CONFIG"; then
4147 echo "$as_me:4147: result: $ac_ct_NCURSES_CONFIG" >&5
4148 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4150 echo "$as_me:4150: result: no" >&5
4151 echo "${ECHO_T}no" >&6
4154 test -n "$ac_ct_NCURSES_CONFIG" && break
4156 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4158 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4161 if test "$NCURSES_CONFIG" != none ; then
4163 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4165 cf_add_libs="`$NCURSES_CONFIG --libs`"
4166 # Filter out duplicates - this happens with badly-designed ".pc" files...
4167 for cf_add_1lib in $LIBS
4169 for cf_add_2lib in $cf_add_libs
4171 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4177 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4181 # even with config script, some packages use no-override for curses.h
4183 echo "$as_me:4183: checking if we have identified curses headers" >&5
4184 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4185 if test "${cf_cv_ncurses_header+set}" = set; then
4186 echo $ECHO_N "(cached) $ECHO_C" >&6
4189 cf_cv_ncurses_header=none
4191 ncurses.h ncurses/ncurses.h \
4192 curses.h ncurses/curses.h
4194 cat >conftest.$ac_ext <<_ACEOF
4195 #line 4195 "configure"
4196 #include "confdefs.h"
4197 #include <${cf_header}>
4201 initscr(); tgoto("?", 0,0)
4206 rm -f conftest.$ac_objext
4207 if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
4208 (eval $ac_compile) 2>&5
4210 echo "$as_me:4210: \$? = $ac_status" >&5
4211 (exit $ac_status); } &&
4212 { ac_try='test -s conftest.$ac_objext'
4213 { (eval echo "$as_me:4213: \"$ac_try\"") >&5
4216 echo "$as_me:4216: \$? = $ac_status" >&5
4217 (exit $ac_status); }; }; then
4218 cf_cv_ncurses_header=$cf_header; break
4220 echo "$as_me: failed program was:" >&5
4221 cat conftest.$ac_ext >&5
4223 rm -f conftest.$ac_objext conftest.$ac_ext
4227 echo "$as_me:4227: result: $cf_cv_ncurses_header" >&5
4228 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4230 if test "$cf_cv_ncurses_header" = none ; then
4231 { { echo "$as_me:4231: error: No curses header-files found" >&5
4232 echo "$as_me: error: No curses header-files found" >&2;}
4233 { (exit 1); exit 1; }; }
4236 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4238 for ac_header in $cf_cv_ncurses_header
4240 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4241 echo "$as_me:4241: checking for $ac_header" >&5
4242 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4244 echo $ECHO_N "(cached) $ECHO_C" >&6
4246 cat >conftest.$ac_ext <<_ACEOF
4247 #line 4247 "configure"
4248 #include "confdefs.h"
4249 #include <$ac_header>
4251 if { (eval echo "$as_me:4251: \"$ac_cpp conftest.$ac_ext\"") >&5
4252 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4254 egrep -v '^ *\+' conftest.er1 >conftest.err
4256 cat conftest.err >&5
4257 echo "$as_me:4257: \$? = $ac_status" >&5
4258 (exit $ac_status); } >/dev/null; then
4259 if test -s conftest.err; then
4260 ac_cpp_err=$ac_c_preproc_warn_flag
4267 if test -z "$ac_cpp_err"; then
4268 eval "$as_ac_Header=yes"
4270 echo "$as_me: failed program was:" >&5
4271 cat conftest.$ac_ext >&5
4272 eval "$as_ac_Header=no"
4274 rm -f conftest.err conftest.$ac_ext
4276 echo "$as_me:4276: result: `eval echo '${'$as_ac_Header'}'`" >&5
4277 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4278 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4279 cat >>confdefs.h <<EOF
4280 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4286 cat >>confdefs.h <<\EOF
4290 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4292 cat >>confdefs.h <<EOF
4293 #define $cf_nculib_ROOT 1
4296 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4300 cf_ncuhdr_root=ncurses
4302 test -n "$cf_cv_curses_dir" && \
4303 test "$cf_cv_curses_dir" != "no" && { \
4305 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4306 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4308 while test $cf_add_incdir != /usr/include
4310 if test -d $cf_add_incdir
4313 if test -n "$CFLAGS$CPPFLAGS" ; then
4314 # a loop is needed to ensure we can add subdirs of existing dirs
4315 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4316 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4317 cf_have_incdir=yes; break
4322 if test "$cf_have_incdir" = no ; then
4323 if test "$cf_add_incdir" = /usr/local/include ; then
4324 if test "$GCC" = yes
4326 cf_save_CPPFLAGS=$CPPFLAGS
4327 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4328 cat >conftest.$ac_ext <<_ACEOF
4329 #line 4329 "configure"
4330 #include "confdefs.h"
4340 rm -f conftest.$ac_objext
4341 if { (eval echo "$as_me:4341: \"$ac_compile\"") >&5
4342 (eval $ac_compile) 2>&5
4344 echo "$as_me:4344: \$? = $ac_status" >&5
4345 (exit $ac_status); } &&
4346 { ac_try='test -s conftest.$ac_objext'
4347 { (eval echo "$as_me:4347: \"$ac_try\"") >&5
4350 echo "$as_me:4350: \$? = $ac_status" >&5
4351 (exit $ac_status); }; }; then
4354 echo "$as_me: failed program was:" >&5
4355 cat conftest.$ac_ext >&5
4358 rm -f conftest.$ac_objext conftest.$ac_ext
4359 CPPFLAGS=$cf_save_CPPFLAGS
4364 if test "$cf_have_incdir" = no ; then
4365 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4367 echo "${as_me:-configure}:4367: testing adding $cf_add_incdir to include-path ..." 1>&5
4369 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4371 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4372 test "$cf_top_incdir" = "$cf_add_incdir" && break
4373 cf_add_incdir="$cf_top_incdir"
4386 echo "$as_me:4386: checking for $cf_ncuhdr_root header in include-path" >&5
4387 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4388 if test "${cf_cv_ncurses_h+set}" = set; then
4389 echo $ECHO_N "(cached) $ECHO_C" >&6
4392 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4393 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4394 for cf_header in $cf_header_list
4397 cat >conftest.$ac_ext <<_ACEOF
4398 #line 4398 "configure"
4399 #include "confdefs.h"
4401 #include <$cf_header>
4406 #ifdef NCURSES_VERSION
4408 printf("%s\n", NCURSES_VERSION);
4421 rm -f conftest.$ac_objext
4422 if { (eval echo "$as_me:4422: \"$ac_compile\"") >&5
4423 (eval $ac_compile) 2>&5
4425 echo "$as_me:4425: \$? = $ac_status" >&5
4426 (exit $ac_status); } &&
4427 { ac_try='test -s conftest.$ac_objext'
4428 { (eval echo "$as_me:4428: \"$ac_try\"") >&5
4431 echo "$as_me:4431: \$? = $ac_status" >&5
4432 (exit $ac_status); }; }; then
4433 cf_cv_ncurses_h=$cf_header
4436 echo "$as_me: failed program was:" >&5
4437 cat conftest.$ac_ext >&5
4440 rm -f conftest.$ac_objext conftest.$ac_ext
4442 test "$cf_cv_ncurses_h" != no && break
4446 echo "$as_me:4446: result: $cf_cv_ncurses_h" >&5
4447 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4449 if test "$cf_cv_ncurses_h" != no ; then
4450 cf_cv_ncurses_header=$cf_cv_ncurses_h
4453 echo "$as_me:4453: checking for $cf_ncuhdr_root include-path" >&5
4454 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4455 if test "${cf_cv_ncurses_h2+set}" = set; then
4456 echo $ECHO_N "(cached) $ECHO_C" >&6
4459 test -n "$verbose" && echo
4463 # collect the current set of include-directories from compiler flags
4464 cf_header_path_list=""
4465 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4466 for cf_header_path in $CPPFLAGS $CFLAGS
4468 case $cf_header_path in
4470 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4472 test "x$cf_header_path" != "xNONE" && \
4473 test -d "$cf_header_path" && \
4475 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4476 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4477 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4478 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4479 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4480 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"
4483 cf_header_path_list="$cf_header_path_list $cf_search"
4489 # add the variations for the package we are looking for
4493 test "x$prefix" != "xNONE" && \
4494 test -d "$prefix" && \
4496 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4497 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4498 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4499 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4500 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4501 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4504 for cf_subdir_prefix in \
4513 test "x$cf_subdir_prefix" != "x$prefix" && \
4514 test -d "$cf_subdir_prefix" && \
4515 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4516 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4517 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4518 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4519 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4520 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4521 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"
4526 test "$includedir" != NONE && \
4527 test "$includedir" != "/usr/include" && \
4528 test -d "$includedir" && {
4529 test -d $includedir && cf_search="$cf_search $includedir"
4530 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4533 test "$oldincludedir" != NONE && \
4534 test "$oldincludedir" != "/usr/include" && \
4535 test -d "$oldincludedir" && {
4536 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4537 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4540 cf_search="$cf_search $cf_header_path_list"
4542 test -n "$verbose" && echo search path $cf_search
4543 cf_save2_CPPFLAGS="$CPPFLAGS"
4544 for cf_incdir in $cf_search
4547 if test -n "$cf_incdir" ; then
4548 for cf_add_incdir in $cf_incdir
4550 while test $cf_add_incdir != /usr/include
4552 if test -d $cf_add_incdir
4555 if test -n "$CFLAGS$CPPFLAGS" ; then
4556 # a loop is needed to ensure we can add subdirs of existing dirs
4557 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4558 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4559 cf_have_incdir=yes; break
4564 if test "$cf_have_incdir" = no ; then
4565 if test "$cf_add_incdir" = /usr/local/include ; then
4566 if test "$GCC" = yes
4568 cf_save_CPPFLAGS=$CPPFLAGS
4569 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4570 cat >conftest.$ac_ext <<_ACEOF
4571 #line 4571 "configure"
4572 #include "confdefs.h"
4582 rm -f conftest.$ac_objext
4583 if { (eval echo "$as_me:4583: \"$ac_compile\"") >&5
4584 (eval $ac_compile) 2>&5
4586 echo "$as_me:4586: \$? = $ac_status" >&5
4587 (exit $ac_status); } &&
4588 { ac_try='test -s conftest.$ac_objext'
4589 { (eval echo "$as_me:4589: \"$ac_try\"") >&5
4592 echo "$as_me:4592: \$? = $ac_status" >&5
4593 (exit $ac_status); }; }; then
4596 echo "$as_me: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
4600 rm -f conftest.$ac_objext conftest.$ac_ext
4601 CPPFLAGS=$cf_save_CPPFLAGS
4606 if test "$cf_have_incdir" = no ; then
4607 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4609 echo "${as_me:-configure}:4609: testing adding $cf_add_incdir to include-path ..." 1>&5
4611 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4613 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4614 test "$cf_top_incdir" = "$cf_add_incdir" && break
4615 cf_add_incdir="$cf_top_incdir"
4631 cat >conftest.$ac_ext <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4635 #include <$cf_header>
4640 #ifdef NCURSES_VERSION
4642 printf("%s\n", NCURSES_VERSION);
4655 rm -f conftest.$ac_objext
4656 if { (eval echo "$as_me:4656: \"$ac_compile\"") >&5
4657 (eval $ac_compile) 2>&5
4659 echo "$as_me:4659: \$? = $ac_status" >&5
4660 (exit $ac_status); } &&
4661 { ac_try='test -s conftest.$ac_objext'
4662 { (eval echo "$as_me:4662: \"$ac_try\"") >&5
4665 echo "$as_me:4665: \$? = $ac_status" >&5
4666 (exit $ac_status); }; }; then
4667 cf_cv_ncurses_h2=$cf_header
4670 echo "$as_me: failed program was:" >&5
4671 cat conftest.$ac_ext >&5
4674 rm -f conftest.$ac_objext conftest.$ac_ext
4676 if test "$cf_cv_ncurses_h2" != no ; then
4677 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4678 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4681 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4683 CPPFLAGS="$cf_save2_CPPFLAGS"
4684 test "$cf_cv_ncurses_h2" != no && break
4686 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:4686: error: not found" >&5
4687 echo "$as_me: error: not found" >&2;}
4688 { (exit 1); exit 1; }; }
4691 echo "$as_me:4691: result: $cf_cv_ncurses_h2" >&5
4692 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
4694 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4695 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4696 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4697 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4700 if test -n "$cf_1st_incdir" ; then
4701 for cf_add_incdir in $cf_1st_incdir
4703 while test $cf_add_incdir != /usr/include
4705 if test -d $cf_add_incdir
4708 if test -n "$CFLAGS$CPPFLAGS" ; then
4709 # a loop is needed to ensure we can add subdirs of existing dirs
4710 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4711 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4712 cf_have_incdir=yes; break
4717 if test "$cf_have_incdir" = no ; then
4718 if test "$cf_add_incdir" = /usr/local/include ; then
4719 if test "$GCC" = yes
4721 cf_save_CPPFLAGS=$CPPFLAGS
4722 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4723 cat >conftest.$ac_ext <<_ACEOF
4724 #line 4724 "configure"
4725 #include "confdefs.h"
4735 rm -f conftest.$ac_objext
4736 if { (eval echo "$as_me:4736: \"$ac_compile\"") >&5
4737 (eval $ac_compile) 2>&5
4739 echo "$as_me:4739: \$? = $ac_status" >&5
4740 (exit $ac_status); } &&
4741 { ac_try='test -s conftest.$ac_objext'
4742 { (eval echo "$as_me:4742: \"$ac_try\"") >&5
4745 echo "$as_me:4745: \$? = $ac_status" >&5
4746 (exit $ac_status); }; }; then
4749 echo "$as_me: failed program was:" >&5
4750 cat conftest.$ac_ext >&5
4753 rm -f conftest.$ac_objext conftest.$ac_ext
4754 CPPFLAGS=$cf_save_CPPFLAGS
4759 if test "$cf_have_incdir" = no ; then
4760 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4762 echo "${as_me:-configure}:4762: testing adding $cf_add_incdir to include-path ..." 1>&5
4764 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4766 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4767 test "$cf_top_incdir" = "$cf_add_incdir" && break
4768 cf_add_incdir="$cf_top_incdir"
4781 # Set definitions to allow ifdef'ing for ncurses.h
4783 case $cf_cv_ncurses_header in
4786 cat >>confdefs.h <<\EOF
4787 #define HAVE_NCURSES_H 1
4793 case $cf_cv_ncurses_header in
4794 (ncurses/curses.h|ncurses/ncurses.h)
4796 cat >>confdefs.h <<\EOF
4797 #define HAVE_NCURSES_NCURSES_H 1
4801 (ncursesw/curses.h|ncursesw/ncurses.h)
4803 cat >>confdefs.h <<\EOF
4804 #define HAVE_NCURSESW_NCURSES_H 1
4810 echo "$as_me:4810: checking for terminfo header" >&5
4811 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4812 if test "${cf_cv_term_header+set}" = set; then
4813 echo $ECHO_N "(cached) $ECHO_C" >&6
4816 case ${cf_cv_ncurses_header} in
4817 (*/ncurses.h|*/ncursesw.h)
4818 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4821 cf_term_header=term.h
4825 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4827 cat >conftest.$ac_ext <<_ACEOF
4828 #line 4828 "configure"
4829 #include "confdefs.h"
4831 #include <${cf_cv_ncurses_header:-curses.h}>
4837 int x = auto_left_margin
4842 rm -f conftest.$ac_objext
4843 if { (eval echo "$as_me:4843: \"$ac_compile\"") >&5
4844 (eval $ac_compile) 2>&5
4846 echo "$as_me:4846: \$? = $ac_status" >&5
4847 (exit $ac_status); } &&
4848 { ac_try='test -s conftest.$ac_objext'
4849 { (eval echo "$as_me:4849: \"$ac_try\"") >&5
4852 echo "$as_me:4852: \$? = $ac_status" >&5
4853 (exit $ac_status); }; }; then
4855 cf_cv_term_header="$cf_test"
4857 echo "$as_me: failed program was:" >&5
4858 cat conftest.$ac_ext >&5
4860 cf_cv_term_header=unknown
4863 rm -f conftest.$ac_objext conftest.$ac_ext
4864 test "$cf_cv_term_header" != unknown && break
4868 echo "$as_me:4868: result: $cf_cv_term_header" >&5
4869 echo "${ECHO_T}$cf_cv_term_header" >&6
4871 # Set definitions to allow ifdef'ing to accommodate subdirectories
4873 case $cf_cv_term_header in
4876 cat >>confdefs.h <<\EOF
4877 #define HAVE_TERM_H 1
4883 case $cf_cv_term_header in
4886 cat >>confdefs.h <<\EOF
4887 #define HAVE_NCURSES_TERM_H 1
4893 cat >>confdefs.h <<\EOF
4894 #define HAVE_NCURSESW_TERM_H 1
4900 # some applications need this, but should check for NCURSES_VERSION
4902 cat >>confdefs.h <<\EOF
4906 echo "$as_me:4906: checking for ncurses version" >&5
4907 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
4908 if test "${cf_cv_ncurses_version+set}" = set; then
4909 echo $ECHO_N "(cached) $ECHO_C" >&6
4912 cf_cv_ncurses_version=no
4915 if test "$cross_compiling" = yes; then
4917 # This will not work if the preprocessor splits the line after the
4918 # Autoconf token. The 'unproto' program does that.
4919 cat > conftest.$ac_ext <<EOF
4920 #include <${cf_cv_ncurses_header:-curses.h}>
4922 #ifdef NCURSES_VERSION
4923 Autoconf NCURSES_VERSION
4931 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4932 { (eval echo "$as_me:4932: \"$cf_try\"") >&5
4935 echo "$as_me:4935: \$? = $ac_status" >&5
4936 (exit $ac_status); }
4937 if test -f conftest.out ; then
4938 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4939 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4944 cat >conftest.$ac_ext <<_ACEOF
4945 #line 4945 "configure"
4946 #include "confdefs.h"
4948 #include <${cf_cv_ncurses_header:-curses.h}>
4952 FILE *fp = fopen("$cf_tempfile", "w");
4953 #ifdef NCURSES_VERSION
4954 # ifdef NCURSES_VERSION_PATCH
4955 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4957 fprintf(fp, "%s\n", NCURSES_VERSION);
4961 fprintf(fp, "old\n");
4966 ${cf_cv_main_return:-return}(0);
4969 rm -f conftest$ac_exeext
4970 if { (eval echo "$as_me:4970: \"$ac_link\"") >&5
4971 (eval $ac_link) 2>&5
4973 echo "$as_me:4973: \$? = $ac_status" >&5
4974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4975 { (eval echo "$as_me:4975: \"$ac_try\"") >&5
4978 echo "$as_me:4978: \$? = $ac_status" >&5
4979 (exit $ac_status); }; }; then
4981 cf_cv_ncurses_version=`cat $cf_tempfile`
4983 echo "$as_me: program exited with status $ac_status" >&5
4984 echo "$as_me: failed program was:" >&5
4985 cat conftest.$ac_ext >&5
4987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4992 echo "$as_me:4992: result: $cf_cv_ncurses_version" >&5
4993 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
4994 test "$cf_cv_ncurses_version" = no ||
4995 cat >>confdefs.h <<\EOF
4999 cf_nculib_root=ncurses
5000 # This works, except for the special case where we find gpm, but
5001 # ncurses is in a nonstandard location via $LIBS, and we really want
5004 cf_ncurses_SAVE="$LIBS"
5005 echo "$as_me:5005: checking for Gpm_Open in -lgpm" >&5
5006 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5007 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5008 echo $ECHO_N "(cached) $ECHO_C" >&6
5010 ac_check_lib_save_LIBS=$LIBS
5012 cat >conftest.$ac_ext <<_ACEOF
5013 #line 5013 "configure"
5014 #include "confdefs.h"
5016 /* Override any gcc2 internal prototype to avoid an error. */
5020 /* We use char because int might match the return type of a gcc2
5021 builtin and then its argument prototype would still apply. */
5031 rm -f conftest.$ac_objext conftest$ac_exeext
5032 if { (eval echo "$as_me:5032: \"$ac_link\"") >&5
5033 (eval $ac_link) 2>&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit $ac_status); } &&
5037 { ac_try='test -s conftest$ac_exeext'
5038 { (eval echo "$as_me:5038: \"$ac_try\"") >&5
5041 echo "$as_me:5041: \$? = $ac_status" >&5
5042 (exit $ac_status); }; }; then
5043 ac_cv_lib_gpm_Gpm_Open=yes
5045 echo "$as_me: failed program was:" >&5
5046 cat conftest.$ac_ext >&5
5047 ac_cv_lib_gpm_Gpm_Open=no
5049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5050 LIBS=$ac_check_lib_save_LIBS
5052 echo "$as_me:5052: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5053 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5054 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5055 echo "$as_me:5055: checking for initscr in -lgpm" >&5
5056 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5057 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5058 echo $ECHO_N "(cached) $ECHO_C" >&6
5060 ac_check_lib_save_LIBS=$LIBS
5062 cat >conftest.$ac_ext <<_ACEOF
5063 #line 5063 "configure"
5064 #include "confdefs.h"
5066 /* Override any gcc2 internal prototype to avoid an error. */
5070 /* We use char because int might match the return type of a gcc2
5071 builtin and then its argument prototype would still apply. */
5081 rm -f conftest.$ac_objext conftest$ac_exeext
5082 if { (eval echo "$as_me:5082: \"$ac_link\"") >&5
5083 (eval $ac_link) 2>&5
5085 echo "$as_me:5085: \$? = $ac_status" >&5
5086 (exit $ac_status); } &&
5087 { ac_try='test -s conftest$ac_exeext'
5088 { (eval echo "$as_me:5088: \"$ac_try\"") >&5
5091 echo "$as_me:5091: \$? = $ac_status" >&5
5092 (exit $ac_status); }; }; then
5093 ac_cv_lib_gpm_initscr=yes
5095 echo "$as_me: failed program was:" >&5
5096 cat conftest.$ac_ext >&5
5097 ac_cv_lib_gpm_initscr=no
5099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5100 LIBS=$ac_check_lib_save_LIBS
5102 echo "$as_me:5102: result: $ac_cv_lib_gpm_initscr" >&5
5103 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5104 if test $ac_cv_lib_gpm_initscr = yes; then
5105 LIBS="$cf_ncurses_SAVE"
5107 cf_ncurses_LIBS="-lgpm"
5114 # This is only necessary if you are linking against an obsolete
5115 # version of ncurses (but it should do no harm, since it's static).
5116 if test "$cf_nculib_root" = ncurses ; then
5117 echo "$as_me:5117: checking for tgoto in -lmytinfo" >&5
5118 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5119 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5120 echo $ECHO_N "(cached) $ECHO_C" >&6
5122 ac_check_lib_save_LIBS=$LIBS
5123 LIBS="-lmytinfo $LIBS"
5124 cat >conftest.$ac_ext <<_ACEOF
5125 #line 5125 "configure"
5126 #include "confdefs.h"
5128 /* Override any gcc2 internal prototype to avoid an error. */
5132 /* We use char because int might match the return type of a gcc2
5133 builtin and then its argument prototype would still apply. */
5143 rm -f conftest.$ac_objext conftest$ac_exeext
5144 if { (eval echo "$as_me:5144: \"$ac_link\"") >&5
5145 (eval $ac_link) 2>&5
5147 echo "$as_me:5147: \$? = $ac_status" >&5
5148 (exit $ac_status); } &&
5149 { ac_try='test -s conftest$ac_exeext'
5150 { (eval echo "$as_me:5150: \"$ac_try\"") >&5
5153 echo "$as_me:5153: \$? = $ac_status" >&5
5154 (exit $ac_status); }; }; then
5155 ac_cv_lib_mytinfo_tgoto=yes
5157 echo "$as_me: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5159 ac_cv_lib_mytinfo_tgoto=no
5161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5162 LIBS=$ac_check_lib_save_LIBS
5164 echo "$as_me:5164: result: $ac_cv_lib_mytinfo_tgoto" >&5
5165 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5166 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5167 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5174 cf_add_libs="$cf_ncurses_LIBS"
5175 # Filter out duplicates - this happens with badly-designed ".pc" files...
5176 for cf_add_1lib in $LIBS
5178 for cf_add_2lib in $cf_add_libs
5180 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5186 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5190 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5193 cf_add_libs="-l$cf_nculib_root"
5194 # Filter out duplicates - this happens with badly-designed ".pc" files...
5195 for cf_add_1lib in $LIBS
5197 for cf_add_2lib in $cf_add_libs
5199 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5205 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5211 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5213 echo "$as_me:5213: checking for initscr" >&5
5214 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5215 if test "${ac_cv_func_initscr+set}" = set; then
5216 echo $ECHO_N "(cached) $ECHO_C" >&6
5218 cat >conftest.$ac_ext <<_ACEOF
5219 #line 5219 "configure"
5220 #include "confdefs.h"
5221 /* System header to define __stub macros and hopefully few prototypes,
5222 which can conflict with char initscr (); below. */
5224 /* Override any gcc2 internal prototype to avoid an error. */
5228 /* We use char because int might match the return type of a gcc2
5229 builtin and then its argument prototype would still apply. */
5236 /* The GNU C library defines this for functions which it implements
5237 to always fail with ENOSYS. Some functions are actually named
5238 something starting with __ and the normal name is an alias. */
5239 #if defined (__stub_initscr) || defined (__stub___initscr)
5242 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5249 rm -f conftest.$ac_objext conftest$ac_exeext
5250 if { (eval echo "$as_me:5250: \"$ac_link\"") >&5
5251 (eval $ac_link) 2>&5
5253 echo "$as_me:5253: \$? = $ac_status" >&5
5254 (exit $ac_status); } &&
5255 { ac_try='test -s conftest$ac_exeext'
5256 { (eval echo "$as_me:5256: \"$ac_try\"") >&5
5259 echo "$as_me:5259: \$? = $ac_status" >&5
5260 (exit $ac_status); }; }; then
5261 ac_cv_func_initscr=yes
5263 echo "$as_me: failed program was:" >&5
5264 cat conftest.$ac_ext >&5
5265 ac_cv_func_initscr=no
5267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5269 echo "$as_me:5269: result: $ac_cv_func_initscr" >&5
5270 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5271 if test $ac_cv_func_initscr = yes; then
5272 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5275 cf_save_LIBS="$LIBS"
5276 echo "$as_me:5276: checking for initscr in -l$cf_nculib_root" >&5
5277 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5278 LIBS="-l$cf_nculib_root $LIBS"
5279 cat >conftest.$ac_ext <<_ACEOF
5280 #line 5280 "configure"
5281 #include "confdefs.h"
5282 #include <${cf_cv_ncurses_header:-curses.h}>
5291 rm -f conftest.$ac_objext conftest$ac_exeext
5292 if { (eval echo "$as_me:5292: \"$ac_link\"") >&5
5293 (eval $ac_link) 2>&5
5295 echo "$as_me:5295: \$? = $ac_status" >&5
5296 (exit $ac_status); } &&
5297 { ac_try='test -s conftest$ac_exeext'
5298 { (eval echo "$as_me:5298: \"$ac_try\"") >&5
5301 echo "$as_me:5301: \$? = $ac_status" >&5
5302 (exit $ac_status); }; }; then
5303 echo "$as_me:5303: result: yes" >&5
5304 echo "${ECHO_T}yes" >&6
5305 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5308 echo "$as_me: failed program was:" >&5
5309 cat conftest.$ac_ext >&5
5310 echo "$as_me:5310: result: no" >&5
5311 echo "${ECHO_T}no" >&6
5314 cf_library_path_list=""
5315 if test -n "${LDFLAGS}${LIBS}" ; then
5316 for cf_library_path in $LDFLAGS $LIBS
5318 case $cf_library_path in
5320 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5322 test "x$cf_library_path" != "xNONE" && \
5323 test -d "$cf_library_path" && \
5325 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5326 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5327 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5328 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5329 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5330 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"
5333 cf_library_path_list="$cf_library_path_list $cf_search"
5341 test "x$prefix" != "xNONE" && \
5342 test -d "$prefix" && \
5344 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5345 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5346 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5347 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5348 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5349 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5352 for cf_subdir_prefix in \
5361 test "x$cf_subdir_prefix" != "x$prefix" && \
5362 test -d "$cf_subdir_prefix" && \
5363 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5364 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5365 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5366 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5367 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5368 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5369 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"
5374 cf_search="$cf_library_path_list $cf_search"
5376 for cf_libdir in $cf_search
5378 echo "$as_me:5378: checking for -l$cf_nculib_root in $cf_libdir" >&5
5379 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5380 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5381 cat >conftest.$ac_ext <<_ACEOF
5382 #line 5382 "configure"
5383 #include "confdefs.h"
5384 #include <${cf_cv_ncurses_header:-curses.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
5405 echo "$as_me:5405: result: yes" >&5
5406 echo "${ECHO_T}yes" >&6
5407 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5410 echo "$as_me: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 echo "$as_me:5412: result: no" >&5
5413 echo "${ECHO_T}no" >&6
5414 LIBS="$cf_save_LIBS"
5416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5424 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5426 if test $cf_found_library = no ; then
5427 { { echo "$as_me:5427: error: Cannot link $cf_nculib_root library" >&5
5428 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5429 { (exit 1); exit 1; }; }
5434 if test -n "$cf_ncurses_LIBS" ; then
5435 echo "$as_me:5435: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5436 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5437 cf_ncurses_SAVE="$LIBS"
5438 for p in $cf_ncurses_LIBS ; do
5439 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5440 if test "$q" != "$LIBS" ; then
5444 cat >conftest.$ac_ext <<_ACEOF
5445 #line 5445 "configure"
5446 #include "confdefs.h"
5447 #include <${cf_cv_ncurses_header:-curses.h}>
5451 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5456 rm -f conftest.$ac_objext conftest$ac_exeext
5457 if { (eval echo "$as_me:5457: \"$ac_link\"") >&5
5458 (eval $ac_link) 2>&5
5460 echo "$as_me:5460: \$? = $ac_status" >&5
5461 (exit $ac_status); } &&
5462 { ac_try='test -s conftest$ac_exeext'
5463 { (eval echo "$as_me:5463: \"$ac_try\"") >&5
5466 echo "$as_me:5466: \$? = $ac_status" >&5
5467 (exit $ac_status); }; }; then
5468 echo "$as_me:5468: result: yes" >&5
5469 echo "${ECHO_T}yes" >&6
5471 echo "$as_me: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
5473 echo "$as_me:5473: result: no" >&5
5474 echo "${ECHO_T}no" >&6
5475 LIBS="$cf_ncurses_SAVE"
5477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5480 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5482 cat >>confdefs.h <<EOF
5483 #define $cf_nculib_ROOT 1
5491 echo "$as_me:5491: checking if you want wide-character code" >&5
5492 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5494 # Check whether --enable-widec or --disable-widec was given.
5495 if test "${enable_widec+set}" = set; then
5496 enableval="$enable_widec"
5497 with_widec=$enableval
5501 echo "$as_me:5501: result: $with_widec" >&5
5502 echo "${ECHO_T}$with_widec" >&6
5503 if test "$with_widec" = yes ; then
5505 echo "$as_me:5505: checking for multibyte character support" >&5
5506 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5507 if test "${cf_cv_utf8_lib+set}" = set; then
5508 echo $ECHO_N "(cached) $ECHO_C" >&6
5511 cf_save_LIBS="$LIBS"
5512 cat >conftest.$ac_ext <<_ACEOF
5513 #line 5513 "configure"
5514 #include "confdefs.h"
5525 rm -f conftest.$ac_objext conftest$ac_exeext
5526 if { (eval echo "$as_me:5526: \"$ac_link\"") >&5
5527 (eval $ac_link) 2>&5
5529 echo "$as_me:5529: \$? = $ac_status" >&5
5530 (exit $ac_status); } &&
5531 { ac_try='test -s conftest$ac_exeext'
5532 { (eval echo "$as_me:5532: \"$ac_try\"") >&5
5535 echo "$as_me:5535: \$? = $ac_status" >&5
5536 (exit $ac_status); }; }; then
5539 echo "$as_me: failed program was:" >&5
5540 cat conftest.$ac_ext >&5
5542 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5543 # will be set on completion of the AC_TRY_LINK below.
5544 cf_cv_header_path_utf8=
5545 cf_cv_library_path_utf8=
5547 echo "${as_me:-configure}:5547: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5549 cf_save_LIBS="$LIBS"
5551 cat >conftest.$ac_ext <<_ACEOF
5552 #line 5552 "configure"
5553 #include "confdefs.h"
5555 #include <libutf8.h>
5564 rm -f conftest.$ac_objext conftest$ac_exeext
5565 if { (eval echo "$as_me:5565: \"$ac_link\"") >&5
5566 (eval $ac_link) 2>&5
5568 echo "$as_me:5568: \$? = $ac_status" >&5
5569 (exit $ac_status); } &&
5570 { ac_try='test -s conftest$ac_exeext'
5571 { (eval echo "$as_me:5571: \"$ac_try\"") >&5
5574 echo "$as_me:5574: \$? = $ac_status" >&5
5575 (exit $ac_status); }; }; then
5577 cf_cv_find_linkage_utf8=yes
5578 cf_cv_header_path_utf8=/usr/include
5579 cf_cv_library_path_utf8=/usr/lib
5582 echo "$as_me: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5585 LIBS="-lutf8 $cf_save_LIBS"
5587 cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5591 #include <libutf8.h>
5600 rm -f conftest.$ac_objext conftest$ac_exeext
5601 if { (eval echo "$as_me:5601: \"$ac_link\"") >&5
5602 (eval $ac_link) 2>&5
5604 echo "$as_me:5604: \$? = $ac_status" >&5
5605 (exit $ac_status); } &&
5606 { ac_try='test -s conftest$ac_exeext'
5607 { (eval echo "$as_me:5607: \"$ac_try\"") >&5
5610 echo "$as_me:5610: \$? = $ac_status" >&5
5611 (exit $ac_status); }; }; then
5613 cf_cv_find_linkage_utf8=yes
5614 cf_cv_header_path_utf8=/usr/include
5615 cf_cv_library_path_utf8=/usr/lib
5616 cf_cv_library_file_utf8="-lutf8"
5619 echo "$as_me: failed program was:" >&5
5620 cat conftest.$ac_ext >&5
5622 cf_cv_find_linkage_utf8=no
5623 LIBS="$cf_save_LIBS"
5625 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5627 echo "${as_me:-configure}:5627: testing find linkage for utf8 library ..." 1>&5
5629 echo "${as_me:-configure}:5629: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5631 cf_save_CPPFLAGS="$CPPFLAGS"
5632 cf_test_CPPFLAGS="$CPPFLAGS"
5636 # collect the current set of include-directories from compiler flags
5637 cf_header_path_list=""
5638 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5639 for cf_header_path in $CPPFLAGS $CFLAGS
5641 case $cf_header_path in
5643 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5645 test "x$cf_header_path" != "xNONE" && \
5646 test -d "$cf_header_path" && \
5648 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5649 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5650 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5651 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5652 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5653 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5656 cf_header_path_list="$cf_header_path_list $cf_search"
5662 # add the variations for the package we are looking for
5666 test "x$prefix" != "xNONE" && \
5667 test -d "$prefix" && \
5669 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5670 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5671 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5672 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5673 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5674 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5677 for cf_subdir_prefix in \
5686 test "x$cf_subdir_prefix" != "x$prefix" && \
5687 test -d "$cf_subdir_prefix" && \
5688 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5689 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5690 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5691 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
5692 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
5693 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
5694 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
5699 test "$includedir" != NONE && \
5700 test "$includedir" != "/usr/include" && \
5701 test -d "$includedir" && {
5702 test -d $includedir && cf_search="$cf_search $includedir"
5703 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5706 test "$oldincludedir" != NONE && \
5707 test "$oldincludedir" != "/usr/include" && \
5708 test -d "$oldincludedir" && {
5709 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5710 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5713 cf_search="$cf_search $cf_header_path_list"
5715 for cf_cv_header_path_utf8 in $cf_search
5717 if test -d $cf_cv_header_path_utf8 ; then
5718 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5720 echo "${as_me:-configure}:5720: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5722 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5723 cat >conftest.$ac_ext <<_ACEOF
5724 #line 5724 "configure"
5725 #include "confdefs.h"
5727 #include <libutf8.h>
5736 rm -f conftest.$ac_objext
5737 if { (eval echo "$as_me:5737: \"$ac_compile\"") >&5
5738 (eval $ac_compile) 2>&5
5740 echo "$as_me:5740: \$? = $ac_status" >&5
5741 (exit $ac_status); } &&
5742 { ac_try='test -s conftest.$ac_objext'
5743 { (eval echo "$as_me:5743: \"$ac_try\"") >&5
5746 echo "$as_me:5746: \$? = $ac_status" >&5
5747 (exit $ac_status); }; }; then
5749 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5751 echo "${as_me:-configure}:5751: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5753 cf_cv_find_linkage_utf8=maybe
5754 cf_test_CPPFLAGS="$CPPFLAGS"
5757 echo "$as_me: failed program was:" >&5
5758 cat conftest.$ac_ext >&5
5760 CPPFLAGS="$cf_save_CPPFLAGS"
5763 rm -f conftest.$ac_objext conftest.$ac_ext
5767 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5769 echo "${as_me:-configure}:5769: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5771 cf_save_LIBS="$LIBS"
5772 cf_save_LDFLAGS="$LDFLAGS"
5774 if test "$cf_cv_find_linkage_utf8" != yes ; then
5777 cf_library_path_list=""
5778 if test -n "${LDFLAGS}${LIBS}" ; then
5779 for cf_library_path in $LDFLAGS $LIBS
5781 case $cf_library_path in
5783 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5785 test "x$cf_library_path" != "xNONE" && \
5786 test -d "$cf_library_path" && \
5788 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5789 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5790 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5791 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5792 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5793 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5796 cf_library_path_list="$cf_library_path_list $cf_search"
5804 test "x$prefix" != "xNONE" && \
5805 test -d "$prefix" && \
5807 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5808 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5809 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5810 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5811 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5812 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5815 for cf_subdir_prefix in \
5824 test "x$cf_subdir_prefix" != "x$prefix" && \
5825 test -d "$cf_subdir_prefix" && \
5826 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5827 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5828 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5829 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
5830 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
5831 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
5832 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
5837 cf_search="$cf_library_path_list $cf_search"
5839 for cf_cv_library_path_utf8 in $cf_search
5841 if test -d $cf_cv_library_path_utf8 ; then
5842 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5844 echo "${as_me:-configure}:5844: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5846 CPPFLAGS="$cf_test_CPPFLAGS"
5847 LIBS="-lutf8 $cf_save_LIBS"
5848 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5849 cat >conftest.$ac_ext <<_ACEOF
5850 #line 5850 "configure"
5851 #include "confdefs.h"
5853 #include <libutf8.h>
5862 rm -f conftest.$ac_objext conftest$ac_exeext
5863 if { (eval echo "$as_me:5863: \"$ac_link\"") >&5
5864 (eval $ac_link) 2>&5
5866 echo "$as_me:5866: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
5868 { ac_try='test -s conftest$ac_exeext'
5869 { (eval echo "$as_me:5869: \"$ac_try\"") >&5
5872 echo "$as_me:5872: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
5875 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5877 echo "${as_me:-configure}:5877: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5879 cf_cv_find_linkage_utf8=yes
5880 cf_cv_library_file_utf8="-lutf8"
5883 echo "$as_me: failed program was:" >&5
5884 cat conftest.$ac_ext >&5
5886 CPPFLAGS="$cf_save_CPPFLAGS"
5887 LIBS="$cf_save_LIBS"
5888 LDFLAGS="$cf_save_LDFLAGS"
5891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5894 CPPFLAGS="$cf_save_CPPFLAGS"
5895 LDFLAGS="$cf_save_LDFLAGS"
5899 cf_cv_find_linkage_utf8=no
5903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5908 LIBS="$cf_save_LIBS"
5910 if test "$cf_cv_find_linkage_utf8" = yes ; then
5911 cf_cv_utf8_lib=add-on
5917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5919 echo "$as_me:5919: result: $cf_cv_utf8_lib" >&5
5920 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
5922 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5924 if test "$cf_cv_utf8_lib" = "add-on" ; then
5926 cat >>confdefs.h <<\EOF
5927 #define HAVE_LIBUTF8_H 1
5930 if test -n "$cf_cv_header_path_utf8" ; then
5931 for cf_add_incdir in $cf_cv_header_path_utf8
5933 while test $cf_add_incdir != /usr/include
5935 if test -d $cf_add_incdir
5938 if test -n "$CFLAGS$CPPFLAGS" ; then
5939 # a loop is needed to ensure we can add subdirs of existing dirs
5940 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5941 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5942 cf_have_incdir=yes; break
5947 if test "$cf_have_incdir" = no ; then
5948 if test "$cf_add_incdir" = /usr/local/include ; then
5949 if test "$GCC" = yes
5951 cf_save_CPPFLAGS=$CPPFLAGS
5952 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5953 cat >conftest.$ac_ext <<_ACEOF
5954 #line 5954 "configure"
5955 #include "confdefs.h"
5965 rm -f conftest.$ac_objext
5966 if { (eval echo "$as_me:5966: \"$ac_compile\"") >&5
5967 (eval $ac_compile) 2>&5
5969 echo "$as_me:5969: \$? = $ac_status" >&5
5970 (exit $ac_status); } &&
5971 { ac_try='test -s conftest.$ac_objext'
5972 { (eval echo "$as_me:5972: \"$ac_try\"") >&5
5975 echo "$as_me:5975: \$? = $ac_status" >&5
5976 (exit $ac_status); }; }; then
5979 echo "$as_me: failed program was:" >&5
5980 cat conftest.$ac_ext >&5
5983 rm -f conftest.$ac_objext conftest.$ac_ext
5984 CPPFLAGS=$cf_save_CPPFLAGS
5989 if test "$cf_have_incdir" = no ; then
5990 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5992 echo "${as_me:-configure}:5992: testing adding $cf_add_incdir to include-path ..." 1>&5
5994 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5996 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5997 test "$cf_top_incdir" = "$cf_add_incdir" && break
5998 cf_add_incdir="$cf_top_incdir"
6009 if test -n "$cf_cv_library_path_utf8" ; then
6010 for cf_add_libdir in $cf_cv_library_path_utf8
6012 if test $cf_add_libdir = /usr/lib ; then
6014 elif test -d $cf_add_libdir
6017 if test -n "$LDFLAGS$LIBS" ; then
6018 # a loop is needed to ensure we can add subdirs of existing dirs
6019 for cf_test_libdir in $LDFLAGS $LIBS ; do
6020 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6021 cf_have_libdir=yes; break
6025 if test "$cf_have_libdir" = no ; then
6026 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6028 echo "${as_me:-configure}:6028: testing adding $cf_add_libdir to library-path ..." 1>&5
6030 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6036 cf_add_libs="$cf_cv_library_file_utf8"
6037 # Filter out duplicates - this happens with badly-designed ".pc" files...
6038 for cf_add_1lib in $LIBS
6040 for cf_add_2lib in $cf_add_libs
6042 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6048 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6054 cf_ncuconfig_root=ncursesw
6055 cf_have_ncuconfig=no
6057 if test "x${PKG_CONFIG:=none}" != xnone; then
6058 echo "$as_me:6058: checking pkg-config for $cf_ncuconfig_root" >&5
6059 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6060 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6061 echo "$as_me:6061: result: yes" >&5
6062 echo "${ECHO_T}yes" >&6
6064 echo "$as_me:6064: checking if the $cf_ncuconfig_root package files work" >&5
6065 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6066 cf_have_ncuconfig=unknown
6068 cf_save_CPPFLAGS="$CPPFLAGS"
6069 cf_save_LIBS="$LIBS"
6071 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
6073 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6074 # Filter out duplicates - this happens with badly-designed ".pc" files...
6075 for cf_add_1lib in $LIBS
6077 for cf_add_2lib in $cf_add_libs
6079 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6085 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6089 cat >conftest.$ac_ext <<_ACEOF
6090 #line 6090 "configure"
6091 #include "confdefs.h"
6092 #include <${cf_cv_ncurses_header:-curses.h}>
6096 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6101 rm -f conftest.$ac_objext conftest$ac_exeext
6102 if { (eval echo "$as_me:6102: \"$ac_link\"") >&5
6103 (eval $ac_link) 2>&5
6105 echo "$as_me:6105: \$? = $ac_status" >&5
6106 (exit $ac_status); } &&
6107 { ac_try='test -s conftest$ac_exeext'
6108 { (eval echo "$as_me:6108: \"$ac_try\"") >&5
6111 echo "$as_me:6111: \$? = $ac_status" >&5
6112 (exit $ac_status); }; }; then
6113 if test "$cross_compiling" = yes; then
6114 cf_have_ncuconfig=maybe
6116 cat >conftest.$ac_ext <<_ACEOF
6117 #line 6117 "configure"
6118 #include "confdefs.h"
6119 #include <${cf_cv_ncurses_header:-curses.h}>
6121 { char *xx = curses_version(); return (xx == 0); }
6123 rm -f conftest$ac_exeext
6124 if { (eval echo "$as_me:6124: \"$ac_link\"") >&5
6125 (eval $ac_link) 2>&5
6127 echo "$as_me:6127: \$? = $ac_status" >&5
6128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6129 { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6132 echo "$as_me:6132: \$? = $ac_status" >&5
6133 (exit $ac_status); }; }; then
6134 cf_have_ncuconfig=yes
6136 echo "$as_me: program exited with status $ac_status" >&5
6137 echo "$as_me: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6139 cf_have_ncuconfig=no
6141 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6144 echo "$as_me: failed program was:" >&5
6145 cat conftest.$ac_ext >&5
6146 cf_have_ncuconfig=no
6148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6149 echo "$as_me:6149: result: $cf_have_ncuconfig" >&5
6150 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6151 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6152 if test "$cf_have_ncuconfig" != "yes"
6154 CPPFLAGS="$cf_save_CPPFLAGS"
6155 LIBS="$cf_save_LIBS"
6156 NCURSES_CONFIG_PKG=none
6159 cat >>confdefs.h <<\EOF
6163 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6165 echo "$as_me:6165: checking for terminfo header" >&5
6166 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6167 if test "${cf_cv_term_header+set}" = set; then
6168 echo $ECHO_N "(cached) $ECHO_C" >&6
6171 case ${cf_cv_ncurses_header} in
6172 (*/ncurses.h|*/ncursesw.h)
6173 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6176 cf_term_header=term.h
6180 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6182 cat >conftest.$ac_ext <<_ACEOF
6183 #line 6183 "configure"
6184 #include "confdefs.h"
6186 #include <${cf_cv_ncurses_header:-curses.h}>
6192 int x = auto_left_margin
6197 rm -f conftest.$ac_objext
6198 if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5
6199 (eval $ac_compile) 2>&5
6201 echo "$as_me:6201: \$? = $ac_status" >&5
6202 (exit $ac_status); } &&
6203 { ac_try='test -s conftest.$ac_objext'
6204 { (eval echo "$as_me:6204: \"$ac_try\"") >&5
6207 echo "$as_me:6207: \$? = $ac_status" >&5
6208 (exit $ac_status); }; }; then
6210 cf_cv_term_header="$cf_test"
6212 echo "$as_me: failed program was:" >&5
6213 cat conftest.$ac_ext >&5
6215 cf_cv_term_header=unknown
6218 rm -f conftest.$ac_objext conftest.$ac_ext
6219 test "$cf_cv_term_header" != unknown && break
6223 echo "$as_me:6223: result: $cf_cv_term_header" >&5
6224 echo "${ECHO_T}$cf_cv_term_header" >&6
6226 # Set definitions to allow ifdef'ing to accommodate subdirectories
6228 case $cf_cv_term_header in
6231 cat >>confdefs.h <<\EOF
6232 #define HAVE_TERM_H 1
6238 case $cf_cv_term_header in
6241 cat >>confdefs.h <<\EOF
6242 #define HAVE_NCURSES_TERM_H 1
6248 cat >>confdefs.h <<\EOF
6249 #define HAVE_NCURSESW_TERM_H 1
6258 echo "$as_me:6258: result: no" >&5
6259 echo "${ECHO_T}no" >&6
6260 NCURSES_CONFIG_PKG=none
6263 NCURSES_CONFIG_PKG=none
6266 if test "x$cf_have_ncuconfig" = "xno"; then
6267 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6269 if test -n "$ac_tool_prefix"; then
6270 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6272 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6273 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6274 echo "$as_me:6274: checking for $ac_word" >&5
6275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6276 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6277 echo $ECHO_N "(cached) $ECHO_C" >&6
6279 if test -n "$NCURSES_CONFIG"; then
6280 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6282 ac_save_IFS=$IFS; IFS=$ac_path_separator
6284 for ac_dir in $ac_dummy; do
6286 test -z "$ac_dir" && ac_dir=.
6287 $as_executable_p "$ac_dir/$ac_word" || continue
6288 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6289 echo "$as_me:6289: found $ac_dir/$ac_word" >&5
6295 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6296 if test -n "$NCURSES_CONFIG"; then
6297 echo "$as_me:6297: result: $NCURSES_CONFIG" >&5
6298 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6300 echo "$as_me:6300: result: no" >&5
6301 echo "${ECHO_T}no" >&6
6304 test -n "$NCURSES_CONFIG" && break
6307 if test -z "$NCURSES_CONFIG"; then
6308 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6309 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6311 # Extract the first word of "$ac_prog", so it can be a program name with args.
6312 set dummy $ac_prog; ac_word=$2
6313 echo "$as_me:6313: checking for $ac_word" >&5
6314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6315 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6316 echo $ECHO_N "(cached) $ECHO_C" >&6
6318 if test -n "$ac_ct_NCURSES_CONFIG"; then
6319 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6321 ac_save_IFS=$IFS; IFS=$ac_path_separator
6323 for ac_dir in $ac_dummy; do
6325 test -z "$ac_dir" && ac_dir=.
6326 $as_executable_p "$ac_dir/$ac_word" || continue
6327 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6328 echo "$as_me:6328: found $ac_dir/$ac_word" >&5
6334 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6335 if test -n "$ac_ct_NCURSES_CONFIG"; then
6336 echo "$as_me:6336: result: $ac_ct_NCURSES_CONFIG" >&5
6337 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6339 echo "$as_me:6339: result: no" >&5
6340 echo "${ECHO_T}no" >&6
6343 test -n "$ac_ct_NCURSES_CONFIG" && break
6345 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6347 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6350 if test "$NCURSES_CONFIG" != none ; then
6352 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6354 cf_add_libs="`$NCURSES_CONFIG --libs`"
6355 # Filter out duplicates - this happens with badly-designed ".pc" files...
6356 for cf_add_1lib in $LIBS
6358 for cf_add_2lib in $cf_add_libs
6360 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6366 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6370 # even with config script, some packages use no-override for curses.h
6372 echo "$as_me:6372: checking if we have identified curses headers" >&5
6373 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6374 if test "${cf_cv_ncurses_header+set}" = set; then
6375 echo $ECHO_N "(cached) $ECHO_C" >&6
6378 cf_cv_ncurses_header=none
6380 ncurses.h ncursesw/ncurses.h \
6381 curses.h ncursesw/curses.h
6383 cat >conftest.$ac_ext <<_ACEOF
6384 #line 6384 "configure"
6385 #include "confdefs.h"
6386 #include <${cf_header}>
6390 initscr(); tgoto("?", 0,0)
6395 rm -f conftest.$ac_objext
6396 if { (eval echo "$as_me:6396: \"$ac_compile\"") >&5
6397 (eval $ac_compile) 2>&5
6399 echo "$as_me:6399: \$? = $ac_status" >&5
6400 (exit $ac_status); } &&
6401 { ac_try='test -s conftest.$ac_objext'
6402 { (eval echo "$as_me:6402: \"$ac_try\"") >&5
6405 echo "$as_me:6405: \$? = $ac_status" >&5
6406 (exit $ac_status); }; }; then
6407 cf_cv_ncurses_header=$cf_header; break
6409 echo "$as_me: failed program was:" >&5
6410 cat conftest.$ac_ext >&5
6412 rm -f conftest.$ac_objext conftest.$ac_ext
6416 echo "$as_me:6416: result: $cf_cv_ncurses_header" >&5
6417 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6419 if test "$cf_cv_ncurses_header" = none ; then
6420 { { echo "$as_me:6420: error: No curses header-files found" >&5
6421 echo "$as_me: error: No curses header-files found" >&2;}
6422 { (exit 1); exit 1; }; }
6425 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6427 for ac_header in $cf_cv_ncurses_header
6429 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6430 echo "$as_me:6430: checking for $ac_header" >&5
6431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6433 echo $ECHO_N "(cached) $ECHO_C" >&6
6435 cat >conftest.$ac_ext <<_ACEOF
6436 #line 6436 "configure"
6437 #include "confdefs.h"
6438 #include <$ac_header>
6440 if { (eval echo "$as_me:6440: \"$ac_cpp conftest.$ac_ext\"") >&5
6441 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6443 egrep -v '^ *\+' conftest.er1 >conftest.err
6445 cat conftest.err >&5
6446 echo "$as_me:6446: \$? = $ac_status" >&5
6447 (exit $ac_status); } >/dev/null; then
6448 if test -s conftest.err; then
6449 ac_cpp_err=$ac_c_preproc_warn_flag
6456 if test -z "$ac_cpp_err"; then
6457 eval "$as_ac_Header=yes"
6459 echo "$as_me: failed program was:" >&5
6460 cat conftest.$ac_ext >&5
6461 eval "$as_ac_Header=no"
6463 rm -f conftest.err conftest.$ac_ext
6465 echo "$as_me:6465: result: `eval echo '${'$as_ac_Header'}'`" >&5
6466 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6467 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6468 cat >>confdefs.h <<EOF
6469 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6475 cat >>confdefs.h <<\EOF
6479 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6481 cat >>confdefs.h <<EOF
6482 #define $cf_nculib_ROOT 1
6485 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6489 cf_ncuhdr_root=ncursesw
6491 test -n "$cf_cv_curses_dir" && \
6492 test "$cf_cv_curses_dir" != "no" && { \
6494 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6495 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6497 while test $cf_add_incdir != /usr/include
6499 if test -d $cf_add_incdir
6502 if test -n "$CFLAGS$CPPFLAGS" ; then
6503 # a loop is needed to ensure we can add subdirs of existing dirs
6504 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6505 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6506 cf_have_incdir=yes; break
6511 if test "$cf_have_incdir" = no ; then
6512 if test "$cf_add_incdir" = /usr/local/include ; then
6513 if test "$GCC" = yes
6515 cf_save_CPPFLAGS=$CPPFLAGS
6516 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6517 cat >conftest.$ac_ext <<_ACEOF
6518 #line 6518 "configure"
6519 #include "confdefs.h"
6529 rm -f conftest.$ac_objext
6530 if { (eval echo "$as_me:6530: \"$ac_compile\"") >&5
6531 (eval $ac_compile) 2>&5
6533 echo "$as_me:6533: \$? = $ac_status" >&5
6534 (exit $ac_status); } &&
6535 { ac_try='test -s conftest.$ac_objext'
6536 { (eval echo "$as_me:6536: \"$ac_try\"") >&5
6539 echo "$as_me:6539: \$? = $ac_status" >&5
6540 (exit $ac_status); }; }; then
6543 echo "$as_me: failed program was:" >&5
6544 cat conftest.$ac_ext >&5
6547 rm -f conftest.$ac_objext conftest.$ac_ext
6548 CPPFLAGS=$cf_save_CPPFLAGS
6553 if test "$cf_have_incdir" = no ; then
6554 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6556 echo "${as_me:-configure}:6556: testing adding $cf_add_incdir to include-path ..." 1>&5
6558 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6560 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6561 test "$cf_top_incdir" = "$cf_add_incdir" && break
6562 cf_add_incdir="$cf_top_incdir"
6575 echo "$as_me:6575: checking for $cf_ncuhdr_root header in include-path" >&5
6576 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6577 if test "${cf_cv_ncurses_h+set}" = set; then
6578 echo $ECHO_N "(cached) $ECHO_C" >&6
6581 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6582 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6583 for cf_header in $cf_header_list
6586 cat >conftest.$ac_ext <<_ACEOF
6587 #line 6587 "configure"
6588 #include "confdefs.h"
6590 #define _XOPEN_SOURCE_EXTENDED
6591 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
6592 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
6594 #include <$cf_header>
6599 #ifdef NCURSES_VERSION
6605 printf("%s\n", NCURSES_VERSION);
6618 rm -f conftest.$ac_objext
6619 if { (eval echo "$as_me:6619: \"$ac_compile\"") >&5
6620 (eval $ac_compile) 2>&5
6622 echo "$as_me:6622: \$? = $ac_status" >&5
6623 (exit $ac_status); } &&
6624 { ac_try='test -s conftest.$ac_objext'
6625 { (eval echo "$as_me:6625: \"$ac_try\"") >&5
6628 echo "$as_me:6628: \$? = $ac_status" >&5
6629 (exit $ac_status); }; }; then
6630 cf_cv_ncurses_h=$cf_header
6633 echo "$as_me: failed program was:" >&5
6634 cat conftest.$ac_ext >&5
6637 rm -f conftest.$ac_objext conftest.$ac_ext
6639 test "$cf_cv_ncurses_h" != no && break
6643 echo "$as_me:6643: result: $cf_cv_ncurses_h" >&5
6644 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6646 if test "$cf_cv_ncurses_h" != no ; then
6647 cf_cv_ncurses_header=$cf_cv_ncurses_h
6650 echo "$as_me:6650: checking for $cf_ncuhdr_root include-path" >&5
6651 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6652 if test "${cf_cv_ncurses_h2+set}" = set; then
6653 echo $ECHO_N "(cached) $ECHO_C" >&6
6656 test -n "$verbose" && echo
6660 # collect the current set of include-directories from compiler flags
6661 cf_header_path_list=""
6662 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6663 for cf_header_path in $CPPFLAGS $CFLAGS
6665 case $cf_header_path in
6667 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6669 test "x$cf_header_path" != "xNONE" && \
6670 test -d "$cf_header_path" && \
6672 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6673 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6674 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6675 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6676 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6677 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"
6680 cf_header_path_list="$cf_header_path_list $cf_search"
6686 # add the variations for the package we are looking for
6690 test "x$prefix" != "xNONE" && \
6691 test -d "$prefix" && \
6693 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6694 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6695 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6696 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6697 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6698 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6701 for cf_subdir_prefix in \
6710 test "x$cf_subdir_prefix" != "x$prefix" && \
6711 test -d "$cf_subdir_prefix" && \
6712 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6713 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6714 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6715 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
6716 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
6717 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
6718 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"
6723 test "$includedir" != NONE && \
6724 test "$includedir" != "/usr/include" && \
6725 test -d "$includedir" && {
6726 test -d $includedir && cf_search="$cf_search $includedir"
6727 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6730 test "$oldincludedir" != NONE && \
6731 test "$oldincludedir" != "/usr/include" && \
6732 test -d "$oldincludedir" && {
6733 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6734 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6737 cf_search="$cf_search $cf_header_path_list"
6739 test -n "$verbose" && echo search path $cf_search
6740 cf_save2_CPPFLAGS="$CPPFLAGS"
6741 for cf_incdir in $cf_search
6744 if test -n "$cf_incdir" ; then
6745 for cf_add_incdir in $cf_incdir
6747 while test $cf_add_incdir != /usr/include
6749 if test -d $cf_add_incdir
6752 if test -n "$CFLAGS$CPPFLAGS" ; then
6753 # a loop is needed to ensure we can add subdirs of existing dirs
6754 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6755 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6756 cf_have_incdir=yes; break
6761 if test "$cf_have_incdir" = no ; then
6762 if test "$cf_add_incdir" = /usr/local/include ; then
6763 if test "$GCC" = yes
6765 cf_save_CPPFLAGS=$CPPFLAGS
6766 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6767 cat >conftest.$ac_ext <<_ACEOF
6768 #line 6768 "configure"
6769 #include "confdefs.h"
6779 rm -f conftest.$ac_objext
6780 if { (eval echo "$as_me:6780: \"$ac_compile\"") >&5
6781 (eval $ac_compile) 2>&5
6783 echo "$as_me:6783: \$? = $ac_status" >&5
6784 (exit $ac_status); } &&
6785 { ac_try='test -s conftest.$ac_objext'
6786 { (eval echo "$as_me:6786: \"$ac_try\"") >&5
6789 echo "$as_me:6789: \$? = $ac_status" >&5
6790 (exit $ac_status); }; }; then
6793 echo "$as_me: failed program was:" >&5
6794 cat conftest.$ac_ext >&5
6797 rm -f conftest.$ac_objext conftest.$ac_ext
6798 CPPFLAGS=$cf_save_CPPFLAGS
6803 if test "$cf_have_incdir" = no ; then
6804 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6806 echo "${as_me:-configure}:6806: testing adding $cf_add_incdir to include-path ..." 1>&5
6808 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6810 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6811 test "$cf_top_incdir" = "$cf_add_incdir" && break
6812 cf_add_incdir="$cf_top_incdir"
6828 cat >conftest.$ac_ext <<_ACEOF
6829 #line 6829 "configure"
6830 #include "confdefs.h"
6832 #include <$cf_header>
6837 #ifdef NCURSES_VERSION
6839 printf("%s\n", NCURSES_VERSION);
6852 rm -f conftest.$ac_objext
6853 if { (eval echo "$as_me:6853: \"$ac_compile\"") >&5
6854 (eval $ac_compile) 2>&5
6856 echo "$as_me:6856: \$? = $ac_status" >&5
6857 (exit $ac_status); } &&
6858 { ac_try='test -s conftest.$ac_objext'
6859 { (eval echo "$as_me:6859: \"$ac_try\"") >&5
6862 echo "$as_me:6862: \$? = $ac_status" >&5
6863 (exit $ac_status); }; }; then
6864 cf_cv_ncurses_h2=$cf_header
6867 echo "$as_me: failed program was:" >&5
6868 cat conftest.$ac_ext >&5
6871 rm -f conftest.$ac_objext conftest.$ac_ext
6873 if test "$cf_cv_ncurses_h2" != no ; then
6874 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6875 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6878 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6880 CPPFLAGS="$cf_save2_CPPFLAGS"
6881 test "$cf_cv_ncurses_h2" != no && break
6883 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6883: error: not found" >&5
6884 echo "$as_me: error: not found" >&2;}
6885 { (exit 1); exit 1; }; }
6888 echo "$as_me:6888: result: $cf_cv_ncurses_h2" >&5
6889 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6891 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6892 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6893 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6894 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6897 if test -n "$cf_1st_incdir" ; then
6898 for cf_add_incdir in $cf_1st_incdir
6900 while test $cf_add_incdir != /usr/include
6902 if test -d $cf_add_incdir
6905 if test -n "$CFLAGS$CPPFLAGS" ; then
6906 # a loop is needed to ensure we can add subdirs of existing dirs
6907 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6908 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6909 cf_have_incdir=yes; break
6914 if test "$cf_have_incdir" = no ; then
6915 if test "$cf_add_incdir" = /usr/local/include ; then
6916 if test "$GCC" = yes
6918 cf_save_CPPFLAGS=$CPPFLAGS
6919 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6920 cat >conftest.$ac_ext <<_ACEOF
6921 #line 6921 "configure"
6922 #include "confdefs.h"
6932 rm -f conftest.$ac_objext
6933 if { (eval echo "$as_me:6933: \"$ac_compile\"") >&5
6934 (eval $ac_compile) 2>&5
6936 echo "$as_me:6936: \$? = $ac_status" >&5
6937 (exit $ac_status); } &&
6938 { ac_try='test -s conftest.$ac_objext'
6939 { (eval echo "$as_me:6939: \"$ac_try\"") >&5
6942 echo "$as_me:6942: \$? = $ac_status" >&5
6943 (exit $ac_status); }; }; then
6946 echo "$as_me: failed program was:" >&5
6947 cat conftest.$ac_ext >&5
6950 rm -f conftest.$ac_objext conftest.$ac_ext
6951 CPPFLAGS=$cf_save_CPPFLAGS
6956 if test "$cf_have_incdir" = no ; then
6957 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6959 echo "${as_me:-configure}:6959: testing adding $cf_add_incdir to include-path ..." 1>&5
6961 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6963 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6964 test "$cf_top_incdir" = "$cf_add_incdir" && break
6965 cf_add_incdir="$cf_top_incdir"
6978 # Set definitions to allow ifdef'ing for ncurses.h
6980 case $cf_cv_ncurses_header in
6983 cat >>confdefs.h <<\EOF
6984 #define HAVE_NCURSES_H 1
6990 case $cf_cv_ncurses_header in
6991 (ncurses/curses.h|ncurses/ncurses.h)
6993 cat >>confdefs.h <<\EOF
6994 #define HAVE_NCURSES_NCURSES_H 1
6998 (ncursesw/curses.h|ncursesw/ncurses.h)
7000 cat >>confdefs.h <<\EOF
7001 #define HAVE_NCURSESW_NCURSES_H 1
7007 echo "$as_me:7007: checking for terminfo header" >&5
7008 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7009 if test "${cf_cv_term_header+set}" = set; then
7010 echo $ECHO_N "(cached) $ECHO_C" >&6
7013 case ${cf_cv_ncurses_header} in
7014 (*/ncurses.h|*/ncursesw.h)
7015 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7018 cf_term_header=term.h
7022 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7024 cat >conftest.$ac_ext <<_ACEOF
7025 #line 7025 "configure"
7026 #include "confdefs.h"
7028 #include <${cf_cv_ncurses_header:-curses.h}>
7034 int x = auto_left_margin
7039 rm -f conftest.$ac_objext
7040 if { (eval echo "$as_me:7040: \"$ac_compile\"") >&5
7041 (eval $ac_compile) 2>&5
7043 echo "$as_me:7043: \$? = $ac_status" >&5
7044 (exit $ac_status); } &&
7045 { ac_try='test -s conftest.$ac_objext'
7046 { (eval echo "$as_me:7046: \"$ac_try\"") >&5
7049 echo "$as_me:7049: \$? = $ac_status" >&5
7050 (exit $ac_status); }; }; then
7052 cf_cv_term_header="$cf_test"
7054 echo "$as_me: failed program was:" >&5
7055 cat conftest.$ac_ext >&5
7057 cf_cv_term_header=unknown
7060 rm -f conftest.$ac_objext conftest.$ac_ext
7061 test "$cf_cv_term_header" != unknown && break
7065 echo "$as_me:7065: result: $cf_cv_term_header" >&5
7066 echo "${ECHO_T}$cf_cv_term_header" >&6
7068 # Set definitions to allow ifdef'ing to accommodate subdirectories
7070 case $cf_cv_term_header in
7073 cat >>confdefs.h <<\EOF
7074 #define HAVE_TERM_H 1
7080 case $cf_cv_term_header in
7083 cat >>confdefs.h <<\EOF
7084 #define HAVE_NCURSES_TERM_H 1
7090 cat >>confdefs.h <<\EOF
7091 #define HAVE_NCURSESW_TERM_H 1
7097 # some applications need this, but should check for NCURSES_VERSION
7099 cat >>confdefs.h <<\EOF
7103 echo "$as_me:7103: checking for ncurses version" >&5
7104 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7105 if test "${cf_cv_ncurses_version+set}" = set; then
7106 echo $ECHO_N "(cached) $ECHO_C" >&6
7109 cf_cv_ncurses_version=no
7112 if test "$cross_compiling" = yes; then
7114 # This will not work if the preprocessor splits the line after the
7115 # Autoconf token. The 'unproto' program does that.
7116 cat > conftest.$ac_ext <<EOF
7117 #include <${cf_cv_ncurses_header:-curses.h}>
7119 #ifdef NCURSES_VERSION
7120 Autoconf NCURSES_VERSION
7128 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7129 { (eval echo "$as_me:7129: \"$cf_try\"") >&5
7132 echo "$as_me:7132: \$? = $ac_status" >&5
7133 (exit $ac_status); }
7134 if test -f conftest.out ; then
7135 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7136 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7141 cat >conftest.$ac_ext <<_ACEOF
7142 #line 7142 "configure"
7143 #include "confdefs.h"
7145 #include <${cf_cv_ncurses_header:-curses.h}>
7149 FILE *fp = fopen("$cf_tempfile", "w");
7150 #ifdef NCURSES_VERSION
7151 # ifdef NCURSES_VERSION_PATCH
7152 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7154 fprintf(fp, "%s\n", NCURSES_VERSION);
7158 fprintf(fp, "old\n");
7163 ${cf_cv_main_return:-return}(0);
7166 rm -f conftest$ac_exeext
7167 if { (eval echo "$as_me:7167: \"$ac_link\"") >&5
7168 (eval $ac_link) 2>&5
7170 echo "$as_me:7170: \$? = $ac_status" >&5
7171 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7172 { (eval echo "$as_me:7172: \"$ac_try\"") >&5
7175 echo "$as_me:7175: \$? = $ac_status" >&5
7176 (exit $ac_status); }; }; then
7178 cf_cv_ncurses_version=`cat $cf_tempfile`
7180 echo "$as_me: program exited with status $ac_status" >&5
7181 echo "$as_me: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7184 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7189 echo "$as_me:7189: result: $cf_cv_ncurses_version" >&5
7190 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7191 test "$cf_cv_ncurses_version" = no ||
7192 cat >>confdefs.h <<\EOF
7196 cf_nculib_root=ncursesw
7197 # This works, except for the special case where we find gpm, but
7198 # ncurses is in a nonstandard location via $LIBS, and we really want
7201 cf_ncurses_SAVE="$LIBS"
7202 echo "$as_me:7202: checking for Gpm_Open in -lgpm" >&5
7203 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7204 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7205 echo $ECHO_N "(cached) $ECHO_C" >&6
7207 ac_check_lib_save_LIBS=$LIBS
7209 cat >conftest.$ac_ext <<_ACEOF
7210 #line 7210 "configure"
7211 #include "confdefs.h"
7213 /* Override any gcc2 internal prototype to avoid an error. */
7217 /* We use char because int might match the return type of a gcc2
7218 builtin and then its argument prototype would still apply. */
7228 rm -f conftest.$ac_objext conftest$ac_exeext
7229 if { (eval echo "$as_me:7229: \"$ac_link\"") >&5
7230 (eval $ac_link) 2>&5
7232 echo "$as_me:7232: \$? = $ac_status" >&5
7233 (exit $ac_status); } &&
7234 { ac_try='test -s conftest$ac_exeext'
7235 { (eval echo "$as_me:7235: \"$ac_try\"") >&5
7238 echo "$as_me:7238: \$? = $ac_status" >&5
7239 (exit $ac_status); }; }; then
7240 ac_cv_lib_gpm_Gpm_Open=yes
7242 echo "$as_me: failed program was:" >&5
7243 cat conftest.$ac_ext >&5
7244 ac_cv_lib_gpm_Gpm_Open=no
7246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7247 LIBS=$ac_check_lib_save_LIBS
7249 echo "$as_me:7249: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7250 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7251 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7252 echo "$as_me:7252: checking for initscr in -lgpm" >&5
7253 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7254 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7255 echo $ECHO_N "(cached) $ECHO_C" >&6
7257 ac_check_lib_save_LIBS=$LIBS
7259 cat >conftest.$ac_ext <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7263 /* Override any gcc2 internal prototype to avoid an error. */
7267 /* We use char because int might match the return type of a gcc2
7268 builtin and then its argument prototype would still apply. */
7278 rm -f conftest.$ac_objext conftest$ac_exeext
7279 if { (eval echo "$as_me:7279: \"$ac_link\"") >&5
7280 (eval $ac_link) 2>&5
7282 echo "$as_me:7282: \$? = $ac_status" >&5
7283 (exit $ac_status); } &&
7284 { ac_try='test -s conftest$ac_exeext'
7285 { (eval echo "$as_me:7285: \"$ac_try\"") >&5
7288 echo "$as_me:7288: \$? = $ac_status" >&5
7289 (exit $ac_status); }; }; then
7290 ac_cv_lib_gpm_initscr=yes
7292 echo "$as_me: failed program was:" >&5
7293 cat conftest.$ac_ext >&5
7294 ac_cv_lib_gpm_initscr=no
7296 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7297 LIBS=$ac_check_lib_save_LIBS
7299 echo "$as_me:7299: result: $ac_cv_lib_gpm_initscr" >&5
7300 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7301 if test $ac_cv_lib_gpm_initscr = yes; then
7302 LIBS="$cf_ncurses_SAVE"
7304 cf_ncurses_LIBS="-lgpm"
7311 # This is only necessary if you are linking against an obsolete
7312 # version of ncurses (but it should do no harm, since it's static).
7313 if test "$cf_nculib_root" = ncurses ; then
7314 echo "$as_me:7314: checking for tgoto in -lmytinfo" >&5
7315 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7316 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7317 echo $ECHO_N "(cached) $ECHO_C" >&6
7319 ac_check_lib_save_LIBS=$LIBS
7320 LIBS="-lmytinfo $LIBS"
7321 cat >conftest.$ac_ext <<_ACEOF
7322 #line 7322 "configure"
7323 #include "confdefs.h"
7325 /* Override any gcc2 internal prototype to avoid an error. */
7329 /* We use char because int might match the return type of a gcc2
7330 builtin and then its argument prototype would still apply. */
7340 rm -f conftest.$ac_objext conftest$ac_exeext
7341 if { (eval echo "$as_me:7341: \"$ac_link\"") >&5
7342 (eval $ac_link) 2>&5
7344 echo "$as_me:7344: \$? = $ac_status" >&5
7345 (exit $ac_status); } &&
7346 { ac_try='test -s conftest$ac_exeext'
7347 { (eval echo "$as_me:7347: \"$ac_try\"") >&5
7350 echo "$as_me:7350: \$? = $ac_status" >&5
7351 (exit $ac_status); }; }; then
7352 ac_cv_lib_mytinfo_tgoto=yes
7354 echo "$as_me: failed program was:" >&5
7355 cat conftest.$ac_ext >&5
7356 ac_cv_lib_mytinfo_tgoto=no
7358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7359 LIBS=$ac_check_lib_save_LIBS
7361 echo "$as_me:7361: result: $ac_cv_lib_mytinfo_tgoto" >&5
7362 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7363 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7364 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7371 cf_add_libs="$cf_ncurses_LIBS"
7372 # Filter out duplicates - this happens with badly-designed ".pc" files...
7373 for cf_add_1lib in $LIBS
7375 for cf_add_2lib in $cf_add_libs
7377 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7383 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7387 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7390 cf_add_libs="-l$cf_nculib_root"
7391 # Filter out duplicates - this happens with badly-designed ".pc" files...
7392 for cf_add_1lib in $LIBS
7394 for cf_add_2lib in $cf_add_libs
7396 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7402 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7408 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7410 echo "$as_me:7410: checking for initscr" >&5
7411 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7412 if test "${ac_cv_func_initscr+set}" = set; then
7413 echo $ECHO_N "(cached) $ECHO_C" >&6
7415 cat >conftest.$ac_ext <<_ACEOF
7416 #line 7416 "configure"
7417 #include "confdefs.h"
7418 /* System header to define __stub macros and hopefully few prototypes,
7419 which can conflict with char initscr (); below. */
7421 /* Override any gcc2 internal prototype to avoid an error. */
7425 /* We use char because int might match the return type of a gcc2
7426 builtin and then its argument prototype would still apply. */
7433 /* The GNU C library defines this for functions which it implements
7434 to always fail with ENOSYS. Some functions are actually named
7435 something starting with __ and the normal name is an alias. */
7436 #if defined (__stub_initscr) || defined (__stub___initscr)
7439 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7446 rm -f conftest.$ac_objext conftest$ac_exeext
7447 if { (eval echo "$as_me:7447: \"$ac_link\"") >&5
7448 (eval $ac_link) 2>&5
7450 echo "$as_me:7450: \$? = $ac_status" >&5
7451 (exit $ac_status); } &&
7452 { ac_try='test -s conftest$ac_exeext'
7453 { (eval echo "$as_me:7453: \"$ac_try\"") >&5
7456 echo "$as_me:7456: \$? = $ac_status" >&5
7457 (exit $ac_status); }; }; then
7458 ac_cv_func_initscr=yes
7460 echo "$as_me: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7462 ac_cv_func_initscr=no
7464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7466 echo "$as_me:7466: result: $ac_cv_func_initscr" >&5
7467 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7468 if test $ac_cv_func_initscr = yes; then
7469 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7472 cf_save_LIBS="$LIBS"
7473 echo "$as_me:7473: checking for initscr in -l$cf_nculib_root" >&5
7474 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7475 LIBS="-l$cf_nculib_root $LIBS"
7476 cat >conftest.$ac_ext <<_ACEOF
7477 #line 7477 "configure"
7478 #include "confdefs.h"
7479 #include <${cf_cv_ncurses_header:-curses.h}>
7488 rm -f conftest.$ac_objext conftest$ac_exeext
7489 if { (eval echo "$as_me:7489: \"$ac_link\"") >&5
7490 (eval $ac_link) 2>&5
7492 echo "$as_me:7492: \$? = $ac_status" >&5
7493 (exit $ac_status); } &&
7494 { ac_try='test -s conftest$ac_exeext'
7495 { (eval echo "$as_me:7495: \"$ac_try\"") >&5
7498 echo "$as_me:7498: \$? = $ac_status" >&5
7499 (exit $ac_status); }; }; then
7500 echo "$as_me:7500: result: yes" >&5
7501 echo "${ECHO_T}yes" >&6
7502 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7505 echo "$as_me: failed program was:" >&5
7506 cat conftest.$ac_ext >&5
7507 echo "$as_me:7507: result: no" >&5
7508 echo "${ECHO_T}no" >&6
7511 cf_library_path_list=""
7512 if test -n "${LDFLAGS}${LIBS}" ; then
7513 for cf_library_path in $LDFLAGS $LIBS
7515 case $cf_library_path in
7517 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7519 test "x$cf_library_path" != "xNONE" && \
7520 test -d "$cf_library_path" && \
7522 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7523 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7524 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7525 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7526 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7527 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"
7530 cf_library_path_list="$cf_library_path_list $cf_search"
7538 test "x$prefix" != "xNONE" && \
7539 test -d "$prefix" && \
7541 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7542 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7543 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7544 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7545 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7546 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7549 for cf_subdir_prefix in \
7558 test "x$cf_subdir_prefix" != "x$prefix" && \
7559 test -d "$cf_subdir_prefix" && \
7560 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7561 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7562 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
7563 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
7564 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
7565 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
7566 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"
7571 cf_search="$cf_library_path_list $cf_search"
7573 for cf_libdir in $cf_search
7575 echo "$as_me:7575: checking for -l$cf_nculib_root in $cf_libdir" >&5
7576 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7577 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7578 cat >conftest.$ac_ext <<_ACEOF
7579 #line 7579 "configure"
7580 #include "confdefs.h"
7581 #include <${cf_cv_ncurses_header:-curses.h}>
7590 rm -f conftest.$ac_objext conftest$ac_exeext
7591 if { (eval echo "$as_me:7591: \"$ac_link\"") >&5
7592 (eval $ac_link) 2>&5
7594 echo "$as_me:7594: \$? = $ac_status" >&5
7595 (exit $ac_status); } &&
7596 { ac_try='test -s conftest$ac_exeext'
7597 { (eval echo "$as_me:7597: \"$ac_try\"") >&5
7600 echo "$as_me:7600: \$? = $ac_status" >&5
7601 (exit $ac_status); }; }; then
7602 echo "$as_me:7602: result: yes" >&5
7603 echo "${ECHO_T}yes" >&6
7604 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7607 echo "$as_me: failed program was:" >&5
7608 cat conftest.$ac_ext >&5
7609 echo "$as_me:7609: result: no" >&5
7610 echo "${ECHO_T}no" >&6
7611 LIBS="$cf_save_LIBS"
7613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7621 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7623 if test $cf_found_library = no ; then
7624 { { echo "$as_me:7624: error: Cannot link $cf_nculib_root library" >&5
7625 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7626 { (exit 1); exit 1; }; }
7631 if test -n "$cf_ncurses_LIBS" ; then
7632 echo "$as_me:7632: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7633 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7634 cf_ncurses_SAVE="$LIBS"
7635 for p in $cf_ncurses_LIBS ; do
7636 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7637 if test "$q" != "$LIBS" ; then
7641 cat >conftest.$ac_ext <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7644 #include <${cf_cv_ncurses_header:-curses.h}>
7648 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7653 rm -f conftest.$ac_objext conftest$ac_exeext
7654 if { (eval echo "$as_me:7654: \"$ac_link\"") >&5
7655 (eval $ac_link) 2>&5
7657 echo "$as_me:7657: \$? = $ac_status" >&5
7658 (exit $ac_status); } &&
7659 { ac_try='test -s conftest$ac_exeext'
7660 { (eval echo "$as_me:7660: \"$ac_try\"") >&5
7663 echo "$as_me:7663: \$? = $ac_status" >&5
7664 (exit $ac_status); }; }; then
7665 echo "$as_me:7665: result: yes" >&5
7666 echo "${ECHO_T}yes" >&6
7668 echo "$as_me: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7670 echo "$as_me:7670: result: no" >&5
7671 echo "${ECHO_T}no" >&6
7672 LIBS="$cf_ncurses_SAVE"
7674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7677 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7679 cat >>confdefs.h <<EOF
7680 #define $cf_nculib_ROOT 1
7690 cf_ncuconfig_root=ncurses
7691 cf_have_ncuconfig=no
7693 if test "x${PKG_CONFIG:=none}" != xnone; then
7694 echo "$as_me:7694: checking pkg-config for $cf_ncuconfig_root" >&5
7695 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7696 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7697 echo "$as_me:7697: result: yes" >&5
7698 echo "${ECHO_T}yes" >&6
7700 echo "$as_me:7700: checking if the $cf_ncuconfig_root package files work" >&5
7701 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7702 cf_have_ncuconfig=unknown
7704 cf_save_CPPFLAGS="$CPPFLAGS"
7705 cf_save_LIBS="$LIBS"
7707 CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7709 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7710 # Filter out duplicates - this happens with badly-designed ".pc" files...
7711 for cf_add_1lib in $LIBS
7713 for cf_add_2lib in $cf_add_libs
7715 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7721 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7725 cat >conftest.$ac_ext <<_ACEOF
7726 #line 7726 "configure"
7727 #include "confdefs.h"
7728 #include <${cf_cv_ncurses_header:-curses.h}>
7732 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7737 rm -f conftest.$ac_objext conftest$ac_exeext
7738 if { (eval echo "$as_me:7738: \"$ac_link\"") >&5
7739 (eval $ac_link) 2>&5
7741 echo "$as_me:7741: \$? = $ac_status" >&5
7742 (exit $ac_status); } &&
7743 { ac_try='test -s conftest$ac_exeext'
7744 { (eval echo "$as_me:7744: \"$ac_try\"") >&5
7747 echo "$as_me:7747: \$? = $ac_status" >&5
7748 (exit $ac_status); }; }; then
7749 if test "$cross_compiling" = yes; then
7750 cf_have_ncuconfig=maybe
7752 cat >conftest.$ac_ext <<_ACEOF
7753 #line 7753 "configure"
7754 #include "confdefs.h"
7755 #include <${cf_cv_ncurses_header:-curses.h}>
7757 { char *xx = curses_version(); return (xx == 0); }
7759 rm -f conftest$ac_exeext
7760 if { (eval echo "$as_me:7760: \"$ac_link\"") >&5
7761 (eval $ac_link) 2>&5
7763 echo "$as_me:7763: \$? = $ac_status" >&5
7764 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7765 { (eval echo "$as_me:7765: \"$ac_try\"") >&5
7768 echo "$as_me:7768: \$? = $ac_status" >&5
7769 (exit $ac_status); }; }; then
7770 cf_have_ncuconfig=yes
7772 echo "$as_me: program exited with status $ac_status" >&5
7773 echo "$as_me: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 cf_have_ncuconfig=no
7777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7780 echo "$as_me: failed program was:" >&5
7781 cat conftest.$ac_ext >&5
7782 cf_have_ncuconfig=no
7784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7785 echo "$as_me:7785: result: $cf_have_ncuconfig" >&5
7786 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7787 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7788 if test "$cf_have_ncuconfig" != "yes"
7790 CPPFLAGS="$cf_save_CPPFLAGS"
7791 LIBS="$cf_save_LIBS"
7792 NCURSES_CONFIG_PKG=none
7795 cat >>confdefs.h <<\EOF
7799 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7801 echo "$as_me:7801: checking for terminfo header" >&5
7802 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7803 if test "${cf_cv_term_header+set}" = set; then
7804 echo $ECHO_N "(cached) $ECHO_C" >&6
7807 case ${cf_cv_ncurses_header} in
7808 (*/ncurses.h|*/ncursesw.h)
7809 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7812 cf_term_header=term.h
7816 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7818 cat >conftest.$ac_ext <<_ACEOF
7819 #line 7819 "configure"
7820 #include "confdefs.h"
7822 #include <${cf_cv_ncurses_header:-curses.h}>
7828 int x = auto_left_margin
7833 rm -f conftest.$ac_objext
7834 if { (eval echo "$as_me:7834: \"$ac_compile\"") >&5
7835 (eval $ac_compile) 2>&5
7837 echo "$as_me:7837: \$? = $ac_status" >&5
7838 (exit $ac_status); } &&
7839 { ac_try='test -s conftest.$ac_objext'
7840 { (eval echo "$as_me:7840: \"$ac_try\"") >&5
7843 echo "$as_me:7843: \$? = $ac_status" >&5
7844 (exit $ac_status); }; }; then
7846 cf_cv_term_header="$cf_test"
7848 echo "$as_me: failed program was:" >&5
7849 cat conftest.$ac_ext >&5
7851 cf_cv_term_header=unknown
7854 rm -f conftest.$ac_objext conftest.$ac_ext
7855 test "$cf_cv_term_header" != unknown && break
7859 echo "$as_me:7859: result: $cf_cv_term_header" >&5
7860 echo "${ECHO_T}$cf_cv_term_header" >&6
7862 # Set definitions to allow ifdef'ing to accommodate subdirectories
7864 case $cf_cv_term_header in
7867 cat >>confdefs.h <<\EOF
7868 #define HAVE_TERM_H 1
7874 case $cf_cv_term_header in
7877 cat >>confdefs.h <<\EOF
7878 #define HAVE_NCURSES_TERM_H 1
7884 cat >>confdefs.h <<\EOF
7885 #define HAVE_NCURSESW_TERM_H 1
7894 echo "$as_me:7894: result: no" >&5
7895 echo "${ECHO_T}no" >&6
7896 NCURSES_CONFIG_PKG=none
7899 NCURSES_CONFIG_PKG=none
7902 if test "x$cf_have_ncuconfig" = "xno"; then
7903 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7905 if test -n "$ac_tool_prefix"; then
7906 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7909 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7910 echo "$as_me:7910: checking for $ac_word" >&5
7911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7912 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7913 echo $ECHO_N "(cached) $ECHO_C" >&6
7915 if test -n "$NCURSES_CONFIG"; then
7916 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7918 ac_save_IFS=$IFS; IFS=$ac_path_separator
7920 for ac_dir in $ac_dummy; do
7922 test -z "$ac_dir" && ac_dir=.
7923 $as_executable_p "$ac_dir/$ac_word" || continue
7924 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7925 echo "$as_me:7925: found $ac_dir/$ac_word" >&5
7931 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7932 if test -n "$NCURSES_CONFIG"; then
7933 echo "$as_me:7933: result: $NCURSES_CONFIG" >&5
7934 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7936 echo "$as_me:7936: result: no" >&5
7937 echo "${ECHO_T}no" >&6
7940 test -n "$NCURSES_CONFIG" && break
7943 if test -z "$NCURSES_CONFIG"; then
7944 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7945 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7947 # Extract the first word of "$ac_prog", so it can be a program name with args.
7948 set dummy $ac_prog; ac_word=$2
7949 echo "$as_me:7949: checking for $ac_word" >&5
7950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7951 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7952 echo $ECHO_N "(cached) $ECHO_C" >&6
7954 if test -n "$ac_ct_NCURSES_CONFIG"; then
7955 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7957 ac_save_IFS=$IFS; IFS=$ac_path_separator
7959 for ac_dir in $ac_dummy; do
7961 test -z "$ac_dir" && ac_dir=.
7962 $as_executable_p "$ac_dir/$ac_word" || continue
7963 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7964 echo "$as_me:7964: found $ac_dir/$ac_word" >&5
7970 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7971 if test -n "$ac_ct_NCURSES_CONFIG"; then
7972 echo "$as_me:7972: result: $ac_ct_NCURSES_CONFIG" >&5
7973 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7975 echo "$as_me:7975: result: no" >&5
7976 echo "${ECHO_T}no" >&6
7979 test -n "$ac_ct_NCURSES_CONFIG" && break
7981 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7983 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7986 if test "$NCURSES_CONFIG" != none ; then
7988 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
7990 cf_add_libs="`$NCURSES_CONFIG --libs`"
7991 # Filter out duplicates - this happens with badly-designed ".pc" files...
7992 for cf_add_1lib in $LIBS
7994 for cf_add_2lib in $cf_add_libs
7996 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8002 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8006 # even with config script, some packages use no-override for curses.h
8008 echo "$as_me:8008: checking if we have identified curses headers" >&5
8009 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8010 if test "${cf_cv_ncurses_header+set}" = set; then
8011 echo $ECHO_N "(cached) $ECHO_C" >&6
8014 cf_cv_ncurses_header=none
8016 ncurses.h ncurses/ncurses.h \
8017 curses.h ncurses/curses.h
8019 cat >conftest.$ac_ext <<_ACEOF
8020 #line 8020 "configure"
8021 #include "confdefs.h"
8022 #include <${cf_header}>
8026 initscr(); tgoto("?", 0,0)
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
8043 cf_cv_ncurses_header=$cf_header; break
8045 echo "$as_me: failed program was:" >&5
8046 cat conftest.$ac_ext >&5
8048 rm -f conftest.$ac_objext conftest.$ac_ext
8052 echo "$as_me:8052: result: $cf_cv_ncurses_header" >&5
8053 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8055 if test "$cf_cv_ncurses_header" = none ; then
8056 { { echo "$as_me:8056: error: No curses header-files found" >&5
8057 echo "$as_me: error: No curses header-files found" >&2;}
8058 { (exit 1); exit 1; }; }
8061 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8063 for ac_header in $cf_cv_ncurses_header
8065 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8066 echo "$as_me:8066: checking for $ac_header" >&5
8067 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8068 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8069 echo $ECHO_N "(cached) $ECHO_C" >&6
8071 cat >conftest.$ac_ext <<_ACEOF
8072 #line 8072 "configure"
8073 #include "confdefs.h"
8074 #include <$ac_header>
8076 if { (eval echo "$as_me:8076: \"$ac_cpp conftest.$ac_ext\"") >&5
8077 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8079 egrep -v '^ *\+' conftest.er1 >conftest.err
8081 cat conftest.err >&5
8082 echo "$as_me:8082: \$? = $ac_status" >&5
8083 (exit $ac_status); } >/dev/null; then
8084 if test -s conftest.err; then
8085 ac_cpp_err=$ac_c_preproc_warn_flag
8092 if test -z "$ac_cpp_err"; then
8093 eval "$as_ac_Header=yes"
8095 echo "$as_me: failed program was:" >&5
8096 cat conftest.$ac_ext >&5
8097 eval "$as_ac_Header=no"
8099 rm -f conftest.err conftest.$ac_ext
8101 echo "$as_me:8101: result: `eval echo '${'$as_ac_Header'}'`" >&5
8102 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8103 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8104 cat >>confdefs.h <<EOF
8105 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8111 cat >>confdefs.h <<\EOF
8115 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8117 cat >>confdefs.h <<EOF
8118 #define $cf_nculib_ROOT 1
8121 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8125 cf_ncuhdr_root=ncurses
8127 test -n "$cf_cv_curses_dir" && \
8128 test "$cf_cv_curses_dir" != "no" && { \
8130 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8131 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8133 while test $cf_add_incdir != /usr/include
8135 if test -d $cf_add_incdir
8138 if test -n "$CFLAGS$CPPFLAGS" ; then
8139 # a loop is needed to ensure we can add subdirs of existing dirs
8140 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8141 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8142 cf_have_incdir=yes; break
8147 if test "$cf_have_incdir" = no ; then
8148 if test "$cf_add_incdir" = /usr/local/include ; then
8149 if test "$GCC" = yes
8151 cf_save_CPPFLAGS=$CPPFLAGS
8152 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8153 cat >conftest.$ac_ext <<_ACEOF
8154 #line 8154 "configure"
8155 #include "confdefs.h"
8165 rm -f conftest.$ac_objext
8166 if { (eval echo "$as_me:8166: \"$ac_compile\"") >&5
8167 (eval $ac_compile) 2>&5
8169 echo "$as_me:8169: \$? = $ac_status" >&5
8170 (exit $ac_status); } &&
8171 { ac_try='test -s conftest.$ac_objext'
8172 { (eval echo "$as_me:8172: \"$ac_try\"") >&5
8175 echo "$as_me:8175: \$? = $ac_status" >&5
8176 (exit $ac_status); }; }; then
8179 echo "$as_me: failed program was:" >&5
8180 cat conftest.$ac_ext >&5
8183 rm -f conftest.$ac_objext conftest.$ac_ext
8184 CPPFLAGS=$cf_save_CPPFLAGS
8189 if test "$cf_have_incdir" = no ; then
8190 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8192 echo "${as_me:-configure}:8192: testing adding $cf_add_incdir to include-path ..." 1>&5
8194 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8196 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8197 test "$cf_top_incdir" = "$cf_add_incdir" && break
8198 cf_add_incdir="$cf_top_incdir"
8211 echo "$as_me:8211: checking for $cf_ncuhdr_root header in include-path" >&5
8212 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8213 if test "${cf_cv_ncurses_h+set}" = set; then
8214 echo $ECHO_N "(cached) $ECHO_C" >&6
8217 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8218 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8219 for cf_header in $cf_header_list
8222 cat >conftest.$ac_ext <<_ACEOF
8223 #line 8223 "configure"
8224 #include "confdefs.h"
8226 #include <$cf_header>
8231 #ifdef NCURSES_VERSION
8233 printf("%s\n", NCURSES_VERSION);
8246 rm -f conftest.$ac_objext
8247 if { (eval echo "$as_me:8247: \"$ac_compile\"") >&5
8248 (eval $ac_compile) 2>&5
8250 echo "$as_me:8250: \$? = $ac_status" >&5
8251 (exit $ac_status); } &&
8252 { ac_try='test -s conftest.$ac_objext'
8253 { (eval echo "$as_me:8253: \"$ac_try\"") >&5
8256 echo "$as_me:8256: \$? = $ac_status" >&5
8257 (exit $ac_status); }; }; then
8258 cf_cv_ncurses_h=$cf_header
8261 echo "$as_me: failed program was:" >&5
8262 cat conftest.$ac_ext >&5
8265 rm -f conftest.$ac_objext conftest.$ac_ext
8267 test "$cf_cv_ncurses_h" != no && break
8271 echo "$as_me:8271: result: $cf_cv_ncurses_h" >&5
8272 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8274 if test "$cf_cv_ncurses_h" != no ; then
8275 cf_cv_ncurses_header=$cf_cv_ncurses_h
8278 echo "$as_me:8278: checking for $cf_ncuhdr_root include-path" >&5
8279 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8280 if test "${cf_cv_ncurses_h2+set}" = set; then
8281 echo $ECHO_N "(cached) $ECHO_C" >&6
8284 test -n "$verbose" && echo
8288 # collect the current set of include-directories from compiler flags
8289 cf_header_path_list=""
8290 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8291 for cf_header_path in $CPPFLAGS $CFLAGS
8293 case $cf_header_path in
8295 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8297 test "x$cf_header_path" != "xNONE" && \
8298 test -d "$cf_header_path" && \
8300 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8301 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8302 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8303 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8304 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8305 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"
8308 cf_header_path_list="$cf_header_path_list $cf_search"
8314 # add the variations for the package we are looking for
8318 test "x$prefix" != "xNONE" && \
8319 test -d "$prefix" && \
8321 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8322 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8323 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8324 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8325 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8326 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8329 for cf_subdir_prefix in \
8338 test "x$cf_subdir_prefix" != "x$prefix" && \
8339 test -d "$cf_subdir_prefix" && \
8340 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8341 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8342 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
8343 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8344 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8345 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8346 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"
8351 test "$includedir" != NONE && \
8352 test "$includedir" != "/usr/include" && \
8353 test -d "$includedir" && {
8354 test -d $includedir && cf_search="$cf_search $includedir"
8355 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8358 test "$oldincludedir" != NONE && \
8359 test "$oldincludedir" != "/usr/include" && \
8360 test -d "$oldincludedir" && {
8361 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8362 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8365 cf_search="$cf_search $cf_header_path_list"
8367 test -n "$verbose" && echo search path $cf_search
8368 cf_save2_CPPFLAGS="$CPPFLAGS"
8369 for cf_incdir in $cf_search
8372 if test -n "$cf_incdir" ; then
8373 for cf_add_incdir in $cf_incdir
8375 while test $cf_add_incdir != /usr/include
8377 if test -d $cf_add_incdir
8380 if test -n "$CFLAGS$CPPFLAGS" ; then
8381 # a loop is needed to ensure we can add subdirs of existing dirs
8382 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8383 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8384 cf_have_incdir=yes; break
8389 if test "$cf_have_incdir" = no ; then
8390 if test "$cf_add_incdir" = /usr/local/include ; then
8391 if test "$GCC" = yes
8393 cf_save_CPPFLAGS=$CPPFLAGS
8394 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8395 cat >conftest.$ac_ext <<_ACEOF
8396 #line 8396 "configure"
8397 #include "confdefs.h"
8407 rm -f conftest.$ac_objext
8408 if { (eval echo "$as_me:8408: \"$ac_compile\"") >&5
8409 (eval $ac_compile) 2>&5
8411 echo "$as_me:8411: \$? = $ac_status" >&5
8412 (exit $ac_status); } &&
8413 { ac_try='test -s conftest.$ac_objext'
8414 { (eval echo "$as_me:8414: \"$ac_try\"") >&5
8417 echo "$as_me:8417: \$? = $ac_status" >&5
8418 (exit $ac_status); }; }; then
8421 echo "$as_me: failed program was:" >&5
8422 cat conftest.$ac_ext >&5
8425 rm -f conftest.$ac_objext conftest.$ac_ext
8426 CPPFLAGS=$cf_save_CPPFLAGS
8431 if test "$cf_have_incdir" = no ; then
8432 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8434 echo "${as_me:-configure}:8434: testing adding $cf_add_incdir to include-path ..." 1>&5
8436 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8438 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8439 test "$cf_top_incdir" = "$cf_add_incdir" && break
8440 cf_add_incdir="$cf_top_incdir"
8456 cat >conftest.$ac_ext <<_ACEOF
8457 #line 8457 "configure"
8458 #include "confdefs.h"
8460 #include <$cf_header>
8465 #ifdef NCURSES_VERSION
8467 printf("%s\n", NCURSES_VERSION);
8480 rm -f conftest.$ac_objext
8481 if { (eval echo "$as_me:8481: \"$ac_compile\"") >&5
8482 (eval $ac_compile) 2>&5
8484 echo "$as_me:8484: \$? = $ac_status" >&5
8485 (exit $ac_status); } &&
8486 { ac_try='test -s conftest.$ac_objext'
8487 { (eval echo "$as_me:8487: \"$ac_try\"") >&5
8490 echo "$as_me:8490: \$? = $ac_status" >&5
8491 (exit $ac_status); }; }; then
8492 cf_cv_ncurses_h2=$cf_header
8495 echo "$as_me: failed program was:" >&5
8496 cat conftest.$ac_ext >&5
8499 rm -f conftest.$ac_objext conftest.$ac_ext
8501 if test "$cf_cv_ncurses_h2" != no ; then
8502 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8503 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8506 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8508 CPPFLAGS="$cf_save2_CPPFLAGS"
8509 test "$cf_cv_ncurses_h2" != no && break
8511 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8511: error: not found" >&5
8512 echo "$as_me: error: not found" >&2;}
8513 { (exit 1); exit 1; }; }
8516 echo "$as_me:8516: result: $cf_cv_ncurses_h2" >&5
8517 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8519 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8520 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8521 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8522 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8525 if test -n "$cf_1st_incdir" ; then
8526 for cf_add_incdir in $cf_1st_incdir
8528 while test $cf_add_incdir != /usr/include
8530 if test -d $cf_add_incdir
8533 if test -n "$CFLAGS$CPPFLAGS" ; then
8534 # a loop is needed to ensure we can add subdirs of existing dirs
8535 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8536 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8537 cf_have_incdir=yes; break
8542 if test "$cf_have_incdir" = no ; then
8543 if test "$cf_add_incdir" = /usr/local/include ; then
8544 if test "$GCC" = yes
8546 cf_save_CPPFLAGS=$CPPFLAGS
8547 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8548 cat >conftest.$ac_ext <<_ACEOF
8549 #line 8549 "configure"
8550 #include "confdefs.h"
8560 rm -f conftest.$ac_objext
8561 if { (eval echo "$as_me:8561: \"$ac_compile\"") >&5
8562 (eval $ac_compile) 2>&5
8564 echo "$as_me:8564: \$? = $ac_status" >&5
8565 (exit $ac_status); } &&
8566 { ac_try='test -s conftest.$ac_objext'
8567 { (eval echo "$as_me:8567: \"$ac_try\"") >&5
8570 echo "$as_me:8570: \$? = $ac_status" >&5
8571 (exit $ac_status); }; }; then
8574 echo "$as_me: failed program was:" >&5
8575 cat conftest.$ac_ext >&5
8578 rm -f conftest.$ac_objext conftest.$ac_ext
8579 CPPFLAGS=$cf_save_CPPFLAGS
8584 if test "$cf_have_incdir" = no ; then
8585 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8587 echo "${as_me:-configure}:8587: testing adding $cf_add_incdir to include-path ..." 1>&5
8589 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8591 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8592 test "$cf_top_incdir" = "$cf_add_incdir" && break
8593 cf_add_incdir="$cf_top_incdir"
8606 # Set definitions to allow ifdef'ing for ncurses.h
8608 case $cf_cv_ncurses_header in
8611 cat >>confdefs.h <<\EOF
8612 #define HAVE_NCURSES_H 1
8618 case $cf_cv_ncurses_header in
8619 (ncurses/curses.h|ncurses/ncurses.h)
8621 cat >>confdefs.h <<\EOF
8622 #define HAVE_NCURSES_NCURSES_H 1
8626 (ncursesw/curses.h|ncursesw/ncurses.h)
8628 cat >>confdefs.h <<\EOF
8629 #define HAVE_NCURSESW_NCURSES_H 1
8635 echo "$as_me:8635: checking for terminfo header" >&5
8636 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8637 if test "${cf_cv_term_header+set}" = set; then
8638 echo $ECHO_N "(cached) $ECHO_C" >&6
8641 case ${cf_cv_ncurses_header} in
8642 (*/ncurses.h|*/ncursesw.h)
8643 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8646 cf_term_header=term.h
8650 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8652 cat >conftest.$ac_ext <<_ACEOF
8653 #line 8653 "configure"
8654 #include "confdefs.h"
8656 #include <${cf_cv_ncurses_header:-curses.h}>
8662 int x = auto_left_margin
8667 rm -f conftest.$ac_objext
8668 if { (eval echo "$as_me:8668: \"$ac_compile\"") >&5
8669 (eval $ac_compile) 2>&5
8671 echo "$as_me:8671: \$? = $ac_status" >&5
8672 (exit $ac_status); } &&
8673 { ac_try='test -s conftest.$ac_objext'
8674 { (eval echo "$as_me:8674: \"$ac_try\"") >&5
8677 echo "$as_me:8677: \$? = $ac_status" >&5
8678 (exit $ac_status); }; }; then
8680 cf_cv_term_header="$cf_test"
8682 echo "$as_me: failed program was:" >&5
8683 cat conftest.$ac_ext >&5
8685 cf_cv_term_header=unknown
8688 rm -f conftest.$ac_objext conftest.$ac_ext
8689 test "$cf_cv_term_header" != unknown && break
8693 echo "$as_me:8693: result: $cf_cv_term_header" >&5
8694 echo "${ECHO_T}$cf_cv_term_header" >&6
8696 # Set definitions to allow ifdef'ing to accommodate subdirectories
8698 case $cf_cv_term_header in
8701 cat >>confdefs.h <<\EOF
8702 #define HAVE_TERM_H 1
8708 case $cf_cv_term_header in
8711 cat >>confdefs.h <<\EOF
8712 #define HAVE_NCURSES_TERM_H 1
8718 cat >>confdefs.h <<\EOF
8719 #define HAVE_NCURSESW_TERM_H 1
8725 # some applications need this, but should check for NCURSES_VERSION
8727 cat >>confdefs.h <<\EOF
8731 echo "$as_me:8731: checking for ncurses version" >&5
8732 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8733 if test "${cf_cv_ncurses_version+set}" = set; then
8734 echo $ECHO_N "(cached) $ECHO_C" >&6
8737 cf_cv_ncurses_version=no
8740 if test "$cross_compiling" = yes; then
8742 # This will not work if the preprocessor splits the line after the
8743 # Autoconf token. The 'unproto' program does that.
8744 cat > conftest.$ac_ext <<EOF
8745 #include <${cf_cv_ncurses_header:-curses.h}>
8747 #ifdef NCURSES_VERSION
8748 Autoconf NCURSES_VERSION
8756 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8757 { (eval echo "$as_me:8757: \"$cf_try\"") >&5
8760 echo "$as_me:8760: \$? = $ac_status" >&5
8761 (exit $ac_status); }
8762 if test -f conftest.out ; then
8763 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8764 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8769 cat >conftest.$ac_ext <<_ACEOF
8770 #line 8770 "configure"
8771 #include "confdefs.h"
8773 #include <${cf_cv_ncurses_header:-curses.h}>
8777 FILE *fp = fopen("$cf_tempfile", "w");
8778 #ifdef NCURSES_VERSION
8779 # ifdef NCURSES_VERSION_PATCH
8780 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8782 fprintf(fp, "%s\n", NCURSES_VERSION);
8786 fprintf(fp, "old\n");
8791 ${cf_cv_main_return:-return}(0);
8794 rm -f conftest$ac_exeext
8795 if { (eval echo "$as_me:8795: \"$ac_link\"") >&5
8796 (eval $ac_link) 2>&5
8798 echo "$as_me:8798: \$? = $ac_status" >&5
8799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8800 { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8803 echo "$as_me:8803: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
8806 cf_cv_ncurses_version=`cat $cf_tempfile`
8808 echo "$as_me: program exited with status $ac_status" >&5
8809 echo "$as_me: failed program was:" >&5
8810 cat conftest.$ac_ext >&5
8812 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8817 echo "$as_me:8817: result: $cf_cv_ncurses_version" >&5
8818 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8819 test "$cf_cv_ncurses_version" = no ||
8820 cat >>confdefs.h <<\EOF
8824 cf_nculib_root=ncurses
8825 # This works, except for the special case where we find gpm, but
8826 # ncurses is in a nonstandard location via $LIBS, and we really want
8829 cf_ncurses_SAVE="$LIBS"
8830 echo "$as_me:8830: checking for Gpm_Open in -lgpm" >&5
8831 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8832 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8833 echo $ECHO_N "(cached) $ECHO_C" >&6
8835 ac_check_lib_save_LIBS=$LIBS
8837 cat >conftest.$ac_ext <<_ACEOF
8838 #line 8838 "configure"
8839 #include "confdefs.h"
8841 /* Override any gcc2 internal prototype to avoid an error. */
8845 /* We use char because int might match the return type of a gcc2
8846 builtin and then its argument prototype would still apply. */
8856 rm -f conftest.$ac_objext conftest$ac_exeext
8857 if { (eval echo "$as_me:8857: \"$ac_link\"") >&5
8858 (eval $ac_link) 2>&5
8860 echo "$as_me:8860: \$? = $ac_status" >&5
8861 (exit $ac_status); } &&
8862 { ac_try='test -s conftest$ac_exeext'
8863 { (eval echo "$as_me:8863: \"$ac_try\"") >&5
8866 echo "$as_me:8866: \$? = $ac_status" >&5
8867 (exit $ac_status); }; }; then
8868 ac_cv_lib_gpm_Gpm_Open=yes
8870 echo "$as_me: failed program was:" >&5
8871 cat conftest.$ac_ext >&5
8872 ac_cv_lib_gpm_Gpm_Open=no
8874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8875 LIBS=$ac_check_lib_save_LIBS
8877 echo "$as_me:8877: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8878 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8879 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8880 echo "$as_me:8880: checking for initscr in -lgpm" >&5
8881 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8882 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8883 echo $ECHO_N "(cached) $ECHO_C" >&6
8885 ac_check_lib_save_LIBS=$LIBS
8887 cat >conftest.$ac_ext <<_ACEOF
8888 #line 8888 "configure"
8889 #include "confdefs.h"
8891 /* Override any gcc2 internal prototype to avoid an error. */
8895 /* We use char because int might match the return type of a gcc2
8896 builtin and then its argument prototype would still apply. */
8906 rm -f conftest.$ac_objext conftest$ac_exeext
8907 if { (eval echo "$as_me:8907: \"$ac_link\"") >&5
8908 (eval $ac_link) 2>&5
8910 echo "$as_me:8910: \$? = $ac_status" >&5
8911 (exit $ac_status); } &&
8912 { ac_try='test -s conftest$ac_exeext'
8913 { (eval echo "$as_me:8913: \"$ac_try\"") >&5
8916 echo "$as_me:8916: \$? = $ac_status" >&5
8917 (exit $ac_status); }; }; then
8918 ac_cv_lib_gpm_initscr=yes
8920 echo "$as_me: failed program was:" >&5
8921 cat conftest.$ac_ext >&5
8922 ac_cv_lib_gpm_initscr=no
8924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8925 LIBS=$ac_check_lib_save_LIBS
8927 echo "$as_me:8927: result: $ac_cv_lib_gpm_initscr" >&5
8928 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8929 if test $ac_cv_lib_gpm_initscr = yes; then
8930 LIBS="$cf_ncurses_SAVE"
8932 cf_ncurses_LIBS="-lgpm"
8939 # This is only necessary if you are linking against an obsolete
8940 # version of ncurses (but it should do no harm, since it's static).
8941 if test "$cf_nculib_root" = ncurses ; then
8942 echo "$as_me:8942: checking for tgoto in -lmytinfo" >&5
8943 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8944 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8945 echo $ECHO_N "(cached) $ECHO_C" >&6
8947 ac_check_lib_save_LIBS=$LIBS
8948 LIBS="-lmytinfo $LIBS"
8949 cat >conftest.$ac_ext <<_ACEOF
8950 #line 8950 "configure"
8951 #include "confdefs.h"
8953 /* Override any gcc2 internal prototype to avoid an error. */
8957 /* We use char because int might match the return type of a gcc2
8958 builtin and then its argument prototype would still apply. */
8968 rm -f conftest.$ac_objext conftest$ac_exeext
8969 if { (eval echo "$as_me:8969: \"$ac_link\"") >&5
8970 (eval $ac_link) 2>&5
8972 echo "$as_me:8972: \$? = $ac_status" >&5
8973 (exit $ac_status); } &&
8974 { ac_try='test -s conftest$ac_exeext'
8975 { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8978 echo "$as_me:8978: \$? = $ac_status" >&5
8979 (exit $ac_status); }; }; then
8980 ac_cv_lib_mytinfo_tgoto=yes
8982 echo "$as_me: failed program was:" >&5
8983 cat conftest.$ac_ext >&5
8984 ac_cv_lib_mytinfo_tgoto=no
8986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8987 LIBS=$ac_check_lib_save_LIBS
8989 echo "$as_me:8989: result: $ac_cv_lib_mytinfo_tgoto" >&5
8990 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8991 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8992 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8999 cf_add_libs="$cf_ncurses_LIBS"
9000 # Filter out duplicates - this happens with badly-designed ".pc" files...
9001 for cf_add_1lib in $LIBS
9003 for cf_add_2lib in $cf_add_libs
9005 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9011 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9015 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9018 cf_add_libs="-l$cf_nculib_root"
9019 # Filter out duplicates - this happens with badly-designed ".pc" files...
9020 for cf_add_1lib in $LIBS
9022 for cf_add_2lib in $cf_add_libs
9024 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9030 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9036 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9038 echo "$as_me:9038: checking for initscr" >&5
9039 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9040 if test "${ac_cv_func_initscr+set}" = set; then
9041 echo $ECHO_N "(cached) $ECHO_C" >&6
9043 cat >conftest.$ac_ext <<_ACEOF
9044 #line 9044 "configure"
9045 #include "confdefs.h"
9046 /* System header to define __stub macros and hopefully few prototypes,
9047 which can conflict with char initscr (); below. */
9049 /* Override any gcc2 internal prototype to avoid an error. */
9053 /* We use char because int might match the return type of a gcc2
9054 builtin and then its argument prototype would still apply. */
9061 /* The GNU C library defines this for functions which it implements
9062 to always fail with ENOSYS. Some functions are actually named
9063 something starting with __ and the normal name is an alias. */
9064 #if defined (__stub_initscr) || defined (__stub___initscr)
9067 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9074 rm -f conftest.$ac_objext conftest$ac_exeext
9075 if { (eval echo "$as_me:9075: \"$ac_link\"") >&5
9076 (eval $ac_link) 2>&5
9078 echo "$as_me:9078: \$? = $ac_status" >&5
9079 (exit $ac_status); } &&
9080 { ac_try='test -s conftest$ac_exeext'
9081 { (eval echo "$as_me:9081: \"$ac_try\"") >&5
9084 echo "$as_me:9084: \$? = $ac_status" >&5
9085 (exit $ac_status); }; }; then
9086 ac_cv_func_initscr=yes
9088 echo "$as_me: failed program was:" >&5
9089 cat conftest.$ac_ext >&5
9090 ac_cv_func_initscr=no
9092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9094 echo "$as_me:9094: result: $ac_cv_func_initscr" >&5
9095 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9096 if test $ac_cv_func_initscr = yes; then
9097 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9100 cf_save_LIBS="$LIBS"
9101 echo "$as_me:9101: checking for initscr in -l$cf_nculib_root" >&5
9102 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9103 LIBS="-l$cf_nculib_root $LIBS"
9104 cat >conftest.$ac_ext <<_ACEOF
9105 #line 9105 "configure"
9106 #include "confdefs.h"
9107 #include <${cf_cv_ncurses_header:-curses.h}>
9116 rm -f conftest.$ac_objext conftest$ac_exeext
9117 if { (eval echo "$as_me:9117: \"$ac_link\"") >&5
9118 (eval $ac_link) 2>&5
9120 echo "$as_me:9120: \$? = $ac_status" >&5
9121 (exit $ac_status); } &&
9122 { ac_try='test -s conftest$ac_exeext'
9123 { (eval echo "$as_me:9123: \"$ac_try\"") >&5
9126 echo "$as_me:9126: \$? = $ac_status" >&5
9127 (exit $ac_status); }; }; then
9128 echo "$as_me:9128: result: yes" >&5
9129 echo "${ECHO_T}yes" >&6
9130 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9133 echo "$as_me: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9135 echo "$as_me:9135: result: no" >&5
9136 echo "${ECHO_T}no" >&6
9139 cf_library_path_list=""
9140 if test -n "${LDFLAGS}${LIBS}" ; then
9141 for cf_library_path in $LDFLAGS $LIBS
9143 case $cf_library_path in
9145 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9147 test "x$cf_library_path" != "xNONE" && \
9148 test -d "$cf_library_path" && \
9150 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9151 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9152 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9153 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9154 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9155 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"
9158 cf_library_path_list="$cf_library_path_list $cf_search"
9166 test "x$prefix" != "xNONE" && \
9167 test -d "$prefix" && \
9169 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9170 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9171 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9172 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9173 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9174 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9177 for cf_subdir_prefix in \
9186 test "x$cf_subdir_prefix" != "x$prefix" && \
9187 test -d "$cf_subdir_prefix" && \
9188 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9189 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9190 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9191 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9192 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9193 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9194 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"
9199 cf_search="$cf_library_path_list $cf_search"
9201 for cf_libdir in $cf_search
9203 echo "$as_me:9203: checking for -l$cf_nculib_root in $cf_libdir" >&5
9204 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9205 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9206 cat >conftest.$ac_ext <<_ACEOF
9207 #line 9207 "configure"
9208 #include "confdefs.h"
9209 #include <${cf_cv_ncurses_header:-curses.h}>
9218 rm -f conftest.$ac_objext conftest$ac_exeext
9219 if { (eval echo "$as_me:9219: \"$ac_link\"") >&5
9220 (eval $ac_link) 2>&5
9222 echo "$as_me:9222: \$? = $ac_status" >&5
9223 (exit $ac_status); } &&
9224 { ac_try='test -s conftest$ac_exeext'
9225 { (eval echo "$as_me:9225: \"$ac_try\"") >&5
9228 echo "$as_me:9228: \$? = $ac_status" >&5
9229 (exit $ac_status); }; }; then
9230 echo "$as_me:9230: result: yes" >&5
9231 echo "${ECHO_T}yes" >&6
9232 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9235 echo "$as_me: failed program was:" >&5
9236 cat conftest.$ac_ext >&5
9237 echo "$as_me:9237: result: no" >&5
9238 echo "${ECHO_T}no" >&6
9239 LIBS="$cf_save_LIBS"
9241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9249 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9251 if test $cf_found_library = no ; then
9252 { { echo "$as_me:9252: error: Cannot link $cf_nculib_root library" >&5
9253 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9254 { (exit 1); exit 1; }; }
9259 if test -n "$cf_ncurses_LIBS" ; then
9260 echo "$as_me:9260: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9261 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9262 cf_ncurses_SAVE="$LIBS"
9263 for p in $cf_ncurses_LIBS ; do
9264 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9265 if test "$q" != "$LIBS" ; then
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9272 #include <${cf_cv_ncurses_header:-curses.h}>
9276 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9281 rm -f conftest.$ac_objext conftest$ac_exeext
9282 if { (eval echo "$as_me:9282: \"$ac_link\"") >&5
9283 (eval $ac_link) 2>&5
9285 echo "$as_me:9285: \$? = $ac_status" >&5
9286 (exit $ac_status); } &&
9287 { ac_try='test -s conftest$ac_exeext'
9288 { (eval echo "$as_me:9288: \"$ac_try\"") >&5
9291 echo "$as_me:9291: \$? = $ac_status" >&5
9292 (exit $ac_status); }; }; then
9293 echo "$as_me:9293: result: yes" >&5
9294 echo "${ECHO_T}yes" >&6
9296 echo "$as_me: failed program was:" >&5
9297 cat conftest.$ac_ext >&5
9298 echo "$as_me:9298: result: no" >&5
9299 echo "${ECHO_T}no" >&6
9300 LIBS="$cf_ncurses_SAVE"
9302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9305 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9307 cat >>confdefs.h <<EOF
9308 #define $cf_nculib_ROOT 1
9318 if test "$NCURSES_CONFIG_PKG" != none ; then
9319 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
9321 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9322 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9323 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9325 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
9326 if test -z "$cf_cv_abi_version"
9328 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
9331 elif test "$NCURSES_CONFIG" != none ; then
9333 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
9335 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
9336 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
9337 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
9339 # ABI version is not available from headers
9340 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
9344 for cf_name in MAJOR MINOR PATCH
9346 cat >conftest.$ac_ext <<CF_EOF
9347 #include <${cf_cv_ncurses_header:-curses.h}>
9348 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
9350 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
9351 { (eval echo "$as_me:9351: \"$cf_try\"") >&5
9354 echo "$as_me:9354: \$? = $ac_status" >&5
9355 (exit $ac_status); }
9356 if test -f conftest.out ; then
9357 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
9358 eval NCURSES_$cf_name=\"$cf_result\"
9359 # cat conftest.$ac_ext
9364 cf_cv_abi_version=${NCURSES_MAJOR}
9368 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
9370 cf_cv_timestamp=`date`
9372 echo "$as_me:9372: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
9373 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
9375 echo "$as_me:9375: checking if you want to have a library-prefix" >&5
9376 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
9378 # Check whether --with-lib-prefix or --without-lib-prefix was given.
9379 if test "${with_lib_prefix+set}" = set; then
9380 withval="$with_lib_prefix"
9381 with_lib_prefix=$withval
9383 with_lib_prefix=auto
9385 echo "$as_me:9385: result: $with_lib_prefix" >&5
9386 echo "${ECHO_T}$with_lib_prefix" >&6
9388 if test $with_lib_prefix = auto
9391 case $cf_cv_system_name in
9393 if test "$DFT_LWR_MODEL" = libtool; then
9399 (*) LIB_PREFIX='lib'
9402 cf_prefix=$LIB_PREFIX
9404 elif test $with_lib_prefix = no
9408 LIB_PREFIX=$with_lib_prefix
9413 ###############################################################################
9415 if test X"$CC_G_OPT" = X"" ; then
9417 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
9420 echo "$as_me:9420: checking for default loader flags" >&5
9421 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
9422 case $DFT_LWR_MODEL in
9423 (normal) LD_MODEL='' ;;
9424 (debug) LD_MODEL=$CC_G_OPT ;;
9425 (profile) LD_MODEL='-pg';;
9426 (shared) LD_MODEL='' ;;
9428 echo "$as_me:9428: result: $LD_MODEL" >&5
9429 echo "${ECHO_T}$LD_MODEL" >&6
9432 echo "$as_me:9432: checking for an rpath option" >&5
9433 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
9434 case $cf_cv_system_name in
9436 if test "$GCC" = yes; then
9437 LD_RPATH_OPT="-Wl,-rpath,"
9439 LD_RPATH_OPT="-rpath "
9442 (linux*|gnu*|k*bsd*-gnu|freebsd*)
9443 LD_RPATH_OPT="-Wl,-rpath,"
9445 (openbsd[2-9].*|mirbsd*)
9446 LD_RPATH_OPT="-Wl,-rpath,"
9449 LD_RPATH_OPT="-rpath "
9452 LD_RPATH_OPT="-Wl,-rpath,"
9455 LD_RPATH_OPT="-rpath "
9463 echo "$as_me:9463: result: $LD_RPATH_OPT" >&5
9464 echo "${ECHO_T}$LD_RPATH_OPT" >&6
9466 case "x$LD_RPATH_OPT" in
9468 echo "$as_me:9468: checking if we need a space after rpath option" >&5
9469 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
9470 cf_save_LIBS="$LIBS"
9472 cf_add_libs="${LD_RPATH_OPT}$libdir"
9473 # Filter out duplicates - this happens with badly-designed ".pc" files...
9474 for cf_add_1lib in $LIBS
9476 for cf_add_2lib in $cf_add_libs
9478 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9484 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9488 cat >conftest.$ac_ext <<_ACEOF
9489 #line 9489 "configure"
9490 #include "confdefs.h"
9500 rm -f conftest.$ac_objext conftest$ac_exeext
9501 if { (eval echo "$as_me:9501: \"$ac_link\"") >&5
9502 (eval $ac_link) 2>&5
9504 echo "$as_me:9504: \$? = $ac_status" >&5
9505 (exit $ac_status); } &&
9506 { ac_try='test -s conftest$ac_exeext'
9507 { (eval echo "$as_me:9507: \"$ac_try\"") >&5
9510 echo "$as_me:9510: \$? = $ac_status" >&5
9511 (exit $ac_status); }; }; then
9514 echo "$as_me: failed program was:" >&5
9515 cat conftest.$ac_ext >&5
9518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9519 LIBS="$cf_save_LIBS"
9520 echo "$as_me:9520: result: $cf_rpath_space" >&5
9521 echo "${ECHO_T}$cf_rpath_space" >&6
9522 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
9530 INSTALL_LIB="-m 644"
9531 : ${rel_builddir:=.}
9537 cf_cv_do_symlinks=no
9539 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
9541 echo "$as_me:9541: checking if release/abi version should be used for shared libs" >&5
9542 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
9544 # Check whether --with-shlib-version or --without-shlib-version was given.
9545 if test "${with_shlib_version+set}" = set; then
9546 withval="$with_shlib_version"
9547 test -z "$withval" && withval=auto
9550 cf_cv_shlib_version=auto
9553 cf_cv_shlib_version=$withval
9556 echo "$as_me:9556: result: $withval" >&5
9557 echo "${ECHO_T}$withval" >&6
9558 { { echo "$as_me:9558: error: option value must be one of: rel, abi, or auto" >&5
9559 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
9560 { (exit 1); exit 1; }; }
9565 cf_cv_shlib_version=auto
9567 echo "$as_me:9567: result: $cf_cv_shlib_version" >&5
9568 echo "${ECHO_T}$cf_cv_shlib_version" >&6
9573 # Some less-capable ports of gcc support only -fpic
9577 if test "$GCC" = yes
9581 case $cf_cv_system_name in
9582 (*linux*) # e.g., PGI compiler
9588 if test "$cf_try_fPIC" = yes
9590 echo "$as_me:9590: checking which $CC option to use" >&5
9591 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
9592 cf_save_CFLAGS="$CFLAGS"
9593 for CC_SHARED_OPTS in -fPIC -fpic ''
9595 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
9596 cat >conftest.$ac_ext <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9608 rm -f conftest.$ac_objext
9609 if { (eval echo "$as_me:9609: \"$ac_compile\"") >&5
9610 (eval $ac_compile) 2>&5
9612 echo "$as_me:9612: \$? = $ac_status" >&5
9613 (exit $ac_status); } &&
9614 { ac_try='test -s conftest.$ac_objext'
9615 { (eval echo "$as_me:9615: \"$ac_try\"") >&5
9618 echo "$as_me:9618: \$? = $ac_status" >&5
9619 (exit $ac_status); }; }; then
9622 echo "$as_me: failed program was:" >&5
9623 cat conftest.$ac_ext >&5
9625 rm -f conftest.$ac_objext conftest.$ac_ext
9627 echo "$as_me:9627: result: $CC_SHARED_OPTS" >&5
9628 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
9629 CFLAGS="$cf_save_CFLAGS"
9632 cf_cv_shlib_version_infix=no
9634 case $cf_cv_system_name in
9635 (aix4.3-9*|aix[5-7]*)
9636 if test "$GCC" = yes; then
9637 CC_SHARED_OPTS='-Wl,-brtl'
9638 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9640 CC_SHARED_OPTS='-brtl'
9641 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
9642 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
9646 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
9650 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9651 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9652 cf_cv_shlib_version=cygdll
9653 cf_cv_shlib_version_infix=cygdll
9656 cat >mk_shared_lib.sh <<-CF_EOF
9659 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9662 Linking shared library
9663 ** SHARED_LIB \$SHARED_LIB
9664 ** IMPORT_LIB \$IMPORT_LIB
9666 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9668 chmod +x mk_shared_lib.sh
9672 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9673 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9674 cf_cv_shlib_version=msysdll
9675 cf_cv_shlib_version_infix=msysdll
9678 cat >mk_shared_lib.sh <<-CF_EOF
9681 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
9684 Linking shared library
9685 ** SHARED_LIB \$SHARED_LIB
9686 ** IMPORT_LIB \$IMPORT_LIB
9688 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9690 chmod +x mk_shared_lib.sh
9693 cf_try_cflags="no-cpp-precomp"
9694 CC_SHARED_OPTS="-dynamic"
9695 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
9696 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
9697 cf_cv_shlib_version_infix=yes
9698 echo "$as_me:9698: checking if ld -search_paths_first works" >&5
9699 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
9700 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
9701 echo $ECHO_N "(cached) $ECHO_C" >&6
9704 cf_save_LDFLAGS=$LDFLAGS
9705 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9706 cat >conftest.$ac_ext <<_ACEOF
9707 #line 9707 "configure"
9708 #include "confdefs.h"
9718 rm -f conftest.$ac_objext conftest$ac_exeext
9719 if { (eval echo "$as_me:9719: \"$ac_link\"") >&5
9720 (eval $ac_link) 2>&5
9722 echo "$as_me:9722: \$? = $ac_status" >&5
9723 (exit $ac_status); } &&
9724 { ac_try='test -s conftest$ac_exeext'
9725 { (eval echo "$as_me:9725: \"$ac_try\"") >&5
9728 echo "$as_me:9728: \$? = $ac_status" >&5
9729 (exit $ac_status); }; }; then
9730 cf_cv_ldflags_search_paths_first=yes
9732 echo "$as_me: failed program was:" >&5
9733 cat conftest.$ac_ext >&5
9734 cf_cv_ldflags_search_paths_first=no
9736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9737 LDFLAGS=$cf_save_LDFLAGS
9739 echo "$as_me:9739: result: $cf_cv_ldflags_search_paths_first" >&5
9740 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
9741 if test $cf_cv_ldflags_search_paths_first = yes; then
9742 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
9746 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
9747 if test "$GCC" != yes; then
9750 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
9751 INSTALL_LIB="-m 555"
9754 # (tested with gcc 2.7.2 -- I don't have c89)
9755 if test "$GCC" = yes; then
9756 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
9759 LD_SHARED_OPTS='-Wl,+b,${libdir}'
9761 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
9762 # HP-UX shared libraries must be executable, and should be
9763 # readonly to exploit a quirk in the memory manager.
9764 INSTALL_LIB="-m 555"
9767 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9768 if test "$cf_cv_shlib_version" = rel; then
9769 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9771 cf_shared_soname='`basename $@`'
9774 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
9777 if test "$cf_cv_enable_rpath" = yes ; then
9778 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9780 # tested with IRIX 5.2 and 'cc'.
9781 if test "$GCC" != yes; then
9782 CC_SHARED_OPTS='-KPIC'
9783 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
9785 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
9787 cf_cv_rm_so_locs=yes
9789 (linux*|gnu*|k*bsd*-gnu)
9790 if test "$DFT_LWR_MODEL" = "shared" ; then
9791 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9792 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9794 if test "$cf_cv_enable_rpath" = yes ; then
9795 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9798 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9799 if test "$cf_cv_shlib_version" = rel; then
9800 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9802 cf_cv_shared_soname='`basename $@`'
9805 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9808 cf_cv_shlib_version=mingw
9809 cf_cv_shlib_version_infix=mingw
9812 if test "$DFT_LWR_MODEL" = "shared" ; then
9813 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
9814 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9815 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
9818 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
9819 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
9820 cat >mk_shared_lib.sh <<-CF_EOF
9823 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
9826 Linking shared library
9827 ** SHARED_LIB \$SHARED_LIB
9828 ** IMPORT_LIB \$IMPORT_LIB
9830 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
9832 chmod +x mk_shared_lib.sh
9834 (openbsd[2-9].*|mirbsd*)
9835 if test "$DFT_LWR_MODEL" = "shared" ; then
9836 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9837 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9839 if test "$cf_cv_enable_rpath" = yes ; then
9840 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9842 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9844 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9845 if test "$cf_cv_shlib_version" = rel; then
9846 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9848 cf_cv_shared_soname='`basename $@`'
9851 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9853 (nto-qnx*|openbsd*|freebsd[12].*)
9854 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9855 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
9856 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9858 (dragonfly*|freebsd*)
9859 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9860 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9861 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9862 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
9863 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9866 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9867 if test "$cf_cv_shlib_version" = rel; then
9868 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9870 cf_cv_shared_soname='`basename $@`'
9873 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
9876 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
9877 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
9878 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
9879 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9880 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
9881 if test "$cf_cv_shlib_version" = auto; then
9882 if test -f /usr/libexec/ld.elf_so; then
9883 cf_cv_shlib_version=abi
9885 cf_cv_shlib_version=rel
9889 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9890 if test "$cf_cv_shlib_version" = rel; then
9891 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9893 cf_cv_shared_soname='`basename $@`'
9896 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
9898 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
9902 # tested with OSF/1 V3.2 and 'cc'
9903 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
9904 # link with shared libs).
9905 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
9908 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
9911 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
9912 if test "$DFT_LWR_MODEL" = "shared" ; then
9913 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
9914 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9916 cf_cv_rm_so_locs=yes
9918 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
9919 # tested with osr5.0.5
9920 if test "$GCC" != yes; then
9921 CC_SHARED_OPTS='-belf -KPIC'
9923 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
9924 if test "$cf_cv_enable_rpath" = yes ; then
9925 # only way is to set LD_RUN_PATH but no switch for it
9928 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9929 LINK_PROGS='LD_RUN_PATH=${libdir}'
9930 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
9933 # tested with SunOS 4.1.1 and gcc 2.7.0
9934 if test "$GCC" != yes; then
9935 CC_SHARED_OPTS='-KPIC'
9937 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
9938 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9941 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
9942 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
9943 if test "$DFT_LWR_MODEL" = "shared" ; then
9944 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
9945 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
9947 if test "$cf_cv_enable_rpath" = yes ; then
9948 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
9951 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
9952 if test "$cf_cv_shlib_version" = rel; then
9953 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
9955 cf_cv_shared_soname='`basename $@`'
9958 if test "$GCC" != yes; then
9959 cf_save_CFLAGS="$CFLAGS"
9960 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
9962 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
9963 cat >conftest.$ac_ext <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9975 rm -f conftest.$ac_objext
9976 if { (eval echo "$as_me:9976: \"$ac_compile\"") >&5
9977 (eval $ac_compile) 2>&5
9979 echo "$as_me:9979: \$? = $ac_status" >&5
9980 (exit $ac_status); } &&
9981 { ac_try='test -s conftest.$ac_objext'
9982 { (eval echo "$as_me:9982: \"$ac_try\"") >&5
9985 echo "$as_me:9985: \$? = $ac_status" >&5
9986 (exit $ac_status); }; }; then
9989 echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9992 rm -f conftest.$ac_objext conftest.$ac_ext
9994 CFLAGS="$cf_save_CFLAGS"
9995 CC_SHARED_OPTS=$cf_shared_opts
9996 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
9998 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10001 (sysv5uw7*|unix_sv*)
10002 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10003 if test "$GCC" != yes; then
10004 CC_SHARED_OPTS='-KPIC'
10006 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
10009 CC_SHARED_OPTS='unknown'
10010 MK_SHARED_LIB='echo unknown'
10014 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10015 case "$cf_cv_shlib_version" in
10017 case "$MK_SHARED_LIB" in
10019 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10022 { echo "$as_me:10022: WARNING: ignored --with-shlib-version" >&5
10023 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10029 if test -n "$cf_try_cflags"
10031 cat > conftest.$ac_ext <<EOF
10032 #line 10032 "${as_me:-configure}"
10034 int main(int argc, char *argv[])
10037 return (argv[argc-1] == 0) ;
10040 cf_save_CFLAGS="$CFLAGS"
10041 for cf_opt in $cf_try_cflags
10043 CFLAGS="$cf_save_CFLAGS -$cf_opt"
10044 echo "$as_me:10044: checking if CFLAGS option -$cf_opt works" >&5
10045 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10046 if { (eval echo "$as_me:10046: \"$ac_compile\"") >&5
10047 (eval $ac_compile) 2>&5
10049 echo "$as_me:10049: \$? = $ac_status" >&5
10050 (exit $ac_status); }; then
10051 echo "$as_me:10051: result: yes" >&5
10052 echo "${ECHO_T}yes" >&6
10053 cf_save_CFLAGS="$CFLAGS"
10055 echo "$as_me:10055: result: no" >&5
10056 echo "${ECHO_T}no" >&6
10059 CFLAGS="$cf_save_CFLAGS"
10062 # RPATH_LIST is a colon-separated list of directories
10063 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10064 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10066 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10068 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10070 echo "${as_me:-configure}:10070: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10072 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
10074 echo "${as_me:-configure}:10074: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
10076 # The test/sample programs in the original tree link using rpath option.
10077 # Make it optional for packagers.
10078 if test -n "$LOCAL_LDFLAGS"
10080 echo "$as_me:10080: checking if you want to link sample programs with rpath option" >&5
10081 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
10083 # Check whether --enable-rpath-link or --disable-rpath-link was given.
10084 if test "${enable_rpath_link+set}" = set; then
10085 enableval="$enable_rpath_link"
10086 with_rpath_link=$enableval
10088 with_rpath_link=yes
10090 echo "$as_me:10090: result: $with_rpath_link" >&5
10091 echo "${ECHO_T}$with_rpath_link" >&6
10092 if test "$with_rpath_link" = no
10099 ###############################################################################
10101 ### use option --enable-broken-linker to force on use of broken-linker support
10102 echo "$as_me:10102: checking if you want broken-linker support code" >&5
10103 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10105 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10106 if test "${enable_broken_linker+set}" = set; then
10107 enableval="$enable_broken_linker"
10108 with_broken_linker=$enableval
10110 with_broken_linker=${BROKEN_LINKER:-no}
10112 echo "$as_me:10112: result: $with_broken_linker" >&5
10113 echo "${ECHO_T}$with_broken_linker" >&6
10116 if test "$with_broken_linker" = yes ; then
10117 cat >>confdefs.h <<\EOF
10118 #define BROKEN_LINKER 1
10122 elif test "$DFT_LWR_MODEL" = shared ; then
10123 case $cf_cv_system_name in
10125 cat >>confdefs.h <<\EOF
10126 #define BROKEN_LINKER 1
10130 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
10132 echo "${as_me:-configure}:10132: testing cygwin linker is broken anyway ..." 1>&5
10138 # Check to define _XOPEN_SOURCE "automatically"
10140 cf_XOPEN_SOURCE=500
10141 cf_POSIX_C_SOURCE=199506L
10146 cf_xopen_source="-D_ALL_SOURCE"
10149 cf_XOPEN_SOURCE=600
10152 cf_xopen_source="-D_APPLE_C_SOURCE"
10155 cf_xopen_source="-D_DARWIN_C_SOURCE"
10158 (freebsd*|dragonfly*)
10159 # 5.x headers associate
10160 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10161 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10162 cf_POSIX_C_SOURCE=200112L
10163 cf_XOPEN_SOURCE=600
10164 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10167 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10170 cf_xopen_source="-D_HPUX_SOURCE"
10173 cf_xopen_source="-D_SGI_SOURCE"
10176 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10178 echo "$as_me:10178: checking if we must define _GNU_SOURCE" >&5
10179 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10180 if test "${cf_cv_gnu_source+set}" = set; then
10181 echo $ECHO_N "(cached) $ECHO_C" >&6
10184 cat >conftest.$ac_ext <<_ACEOF
10185 #line 10185 "configure"
10186 #include "confdefs.h"
10187 #include <sys/types.h>
10192 #ifndef _XOPEN_SOURCE
10199 rm -f conftest.$ac_objext
10200 if { (eval echo "$as_me:10200: \"$ac_compile\"") >&5
10201 (eval $ac_compile) 2>&5
10203 echo "$as_me:10203: \$? = $ac_status" >&5
10204 (exit $ac_status); } &&
10205 { ac_try='test -s conftest.$ac_objext'
10206 { (eval echo "$as_me:10206: \"$ac_try\"") >&5
10207 (eval $ac_try) 2>&5
10209 echo "$as_me:10209: \$? = $ac_status" >&5
10210 (exit $ac_status); }; }; then
10211 cf_cv_gnu_source=no
10213 echo "$as_me: failed program was:" >&5
10214 cat conftest.$ac_ext >&5
10215 cf_save="$CPPFLAGS"
10216 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
10217 cat >conftest.$ac_ext <<_ACEOF
10218 #line 10218 "configure"
10219 #include "confdefs.h"
10220 #include <sys/types.h>
10225 #ifdef _XOPEN_SOURCE
10232 rm -f conftest.$ac_objext
10233 if { (eval echo "$as_me:10233: \"$ac_compile\"") >&5
10234 (eval $ac_compile) 2>&5
10236 echo "$as_me:10236: \$? = $ac_status" >&5
10237 (exit $ac_status); } &&
10238 { ac_try='test -s conftest.$ac_objext'
10239 { (eval echo "$as_me:10239: \"$ac_try\"") >&5
10240 (eval $ac_try) 2>&5
10242 echo "$as_me:10242: \$? = $ac_status" >&5
10243 (exit $ac_status); }; }; then
10244 cf_cv_gnu_source=no
10246 echo "$as_me: failed program was:" >&5
10247 cat conftest.$ac_ext >&5
10248 cf_cv_gnu_source=yes
10250 rm -f conftest.$ac_objext conftest.$ac_ext
10251 CPPFLAGS="$cf_save"
10254 rm -f conftest.$ac_objext conftest.$ac_ext
10257 echo "$as_me:10257: result: $cf_cv_gnu_source" >&5
10258 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10260 if test "$cf_cv_gnu_source" = yes
10262 echo "$as_me:10262: checking if we should also define _DEFAULT_SOURCE" >&5
10263 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10264 if test "${cf_cv_default_source+set}" = set; then
10265 echo $ECHO_N "(cached) $ECHO_C" >&6
10268 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
10269 cat >conftest.$ac_ext <<_ACEOF
10270 #line 10270 "configure"
10271 #include "confdefs.h"
10272 #include <sys/types.h>
10277 #ifdef _DEFAULT_SOURCE
10284 rm -f conftest.$ac_objext
10285 if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5
10286 (eval $ac_compile) 2>&5
10288 echo "$as_me:10288: \$? = $ac_status" >&5
10289 (exit $ac_status); } &&
10290 { ac_try='test -s conftest.$ac_objext'
10291 { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292 (eval $ac_try) 2>&5
10294 echo "$as_me:10294: \$? = $ac_status" >&5
10295 (exit $ac_status); }; }; then
10296 cf_cv_default_source=no
10298 echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10300 cf_cv_default_source=yes
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10305 echo "$as_me:10305: result: $cf_cv_default_source" >&5
10306 echo "${ECHO_T}$cf_cv_default_source" >&6
10307 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
10312 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10315 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10318 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10320 cf_save_CFLAGS="$CFLAGS"
10321 cf_save_CPPFLAGS="$CPPFLAGS"
10323 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10324 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10325 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10327 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10328 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10329 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10331 echo "$as_me:10331: checking if we should define _POSIX_C_SOURCE" >&5
10332 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10333 if test "${cf_cv_posix_c_source+set}" = set; then
10334 echo $ECHO_N "(cached) $ECHO_C" >&6
10337 echo "${as_me:-configure}:10337: testing if the symbol is already defined go no further ..." 1>&5
10339 cat >conftest.$ac_ext <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342 #include <sys/types.h>
10347 #ifndef _POSIX_C_SOURCE
10354 rm -f conftest.$ac_objext
10355 if { (eval echo "$as_me:10355: \"$ac_compile\"") >&5
10356 (eval $ac_compile) 2>&5
10358 echo "$as_me:10358: \$? = $ac_status" >&5
10359 (exit $ac_status); } &&
10360 { ac_try='test -s conftest.$ac_objext'
10361 { (eval echo "$as_me:10361: \"$ac_try\"") >&5
10362 (eval $ac_try) 2>&5
10364 echo "$as_me:10364: \$? = $ac_status" >&5
10365 (exit $ac_status); }; }; then
10366 cf_cv_posix_c_source=no
10368 echo "$as_me: failed program was:" >&5
10369 cat conftest.$ac_ext >&5
10370 cf_want_posix_source=no
10371 case .$cf_POSIX_C_SOURCE in
10373 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10376 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10377 cf_want_posix_source=yes
10380 cf_want_posix_source=yes
10383 if test "$cf_want_posix_source" = yes ; then
10384 cat >conftest.$ac_ext <<_ACEOF
10385 #line 10385 "configure"
10386 #include "confdefs.h"
10387 #include <sys/types.h>
10392 #ifdef _POSIX_SOURCE
10399 rm -f conftest.$ac_objext
10400 if { (eval echo "$as_me:10400: \"$ac_compile\"") >&5
10401 (eval $ac_compile) 2>&5
10403 echo "$as_me:10403: \$? = $ac_status" >&5
10404 (exit $ac_status); } &&
10405 { ac_try='test -s conftest.$ac_objext'
10406 { (eval echo "$as_me:10406: \"$ac_try\"") >&5
10407 (eval $ac_try) 2>&5
10409 echo "$as_me:10409: \$? = $ac_status" >&5
10410 (exit $ac_status); }; }; then
10413 echo "$as_me: failed program was:" >&5
10414 cat conftest.$ac_ext >&5
10415 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10417 rm -f conftest.$ac_objext conftest.$ac_ext
10420 echo "${as_me:-configure}:10420: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10422 CFLAGS="$cf_trim_CFLAGS"
10423 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10425 echo "${as_me:-configure}:10425: testing if the second compile does not leave our definition intact error ..." 1>&5
10427 cat >conftest.$ac_ext <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #include <sys/types.h>
10435 #ifndef _POSIX_C_SOURCE
10442 rm -f conftest.$ac_objext
10443 if { (eval echo "$as_me:10443: \"$ac_compile\"") >&5
10444 (eval $ac_compile) 2>&5
10446 echo "$as_me:10446: \$? = $ac_status" >&5
10447 (exit $ac_status); } &&
10448 { ac_try='test -s conftest.$ac_objext'
10449 { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450 (eval $ac_try) 2>&5
10452 echo "$as_me:10452: \$? = $ac_status" >&5
10453 (exit $ac_status); }; }; then
10456 echo "$as_me: failed program was:" >&5
10457 cat conftest.$ac_ext >&5
10458 cf_cv_posix_c_source=no
10460 rm -f conftest.$ac_objext conftest.$ac_ext
10461 CFLAGS="$cf_save_CFLAGS"
10462 CPPFLAGS="$cf_save_CPPFLAGS"
10465 rm -f conftest.$ac_objext conftest.$ac_ext
10468 echo "$as_me:10468: result: $cf_cv_posix_c_source" >&5
10469 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10471 if test "$cf_cv_posix_c_source" != no ; then
10472 CFLAGS="$cf_trim_CFLAGS"
10473 CPPFLAGS="$cf_trim_CPPFLAGS"
10478 cf_new_extra_cppflags=
10480 for cf_add_cflags in $cf_cv_posix_c_source
10482 case $cf_fix_cppflags in
10484 case $cf_add_cflags in
10485 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10486 case $cf_add_cflags in
10488 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10490 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10491 && test -z "${cf_tst_cflags}" \
10492 && cf_fix_cppflags=yes
10494 if test $cf_fix_cppflags = yes ; then
10496 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10497 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10500 elif test "${cf_tst_cflags}" = "\"'" ; then
10502 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10503 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10509 case "$CPPFLAGS" in
10513 case $cf_add_cflags in
10515 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10517 CPPFLAGS=`echo "$CPPFLAGS" | \
10518 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10519 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10524 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10525 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10532 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10533 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10540 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10541 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10543 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10545 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10546 && test -z "${cf_tst_cflags}" \
10547 && cf_fix_cppflags=no
10552 if test -n "$cf_new_cflags" ; then
10554 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10555 CFLAGS="${CFLAGS}$cf_new_cflags"
10559 if test -n "$cf_new_cppflags" ; then
10561 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10562 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10566 if test -n "$cf_new_extra_cppflags" ; then
10568 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10569 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10577 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10580 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10581 cf_xopen_source="-D_BSD_SOURCE"
10582 cf_XOPEN_SOURCE=600
10585 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10588 cf_xopen_source="-D_OSF_SOURCE"
10591 cf_xopen_source="-D_QNX_SOURCE"
10594 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10597 cf_xopen_source="-D__EXTENSIONS__"
10598 cf_cv_xopen_source=broken
10600 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10606 echo "$as_me:10606: checking if we should define _XOPEN_SOURCE" >&5
10607 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10608 if test "${cf_cv_xopen_source+set}" = set; then
10609 echo $ECHO_N "(cached) $ECHO_C" >&6
10612 cat >conftest.$ac_ext <<_ACEOF
10613 #line 10613 "configure"
10614 #include "confdefs.h"
10616 #include <stdlib.h>
10617 #include <string.h>
10618 #include <sys/types.h>
10624 #ifndef _XOPEN_SOURCE
10631 rm -f conftest.$ac_objext
10632 if { (eval echo "$as_me:10632: \"$ac_compile\"") >&5
10633 (eval $ac_compile) 2>&5
10635 echo "$as_me:10635: \$? = $ac_status" >&5
10636 (exit $ac_status); } &&
10637 { ac_try='test -s conftest.$ac_objext'
10638 { (eval echo "$as_me:10638: \"$ac_try\"") >&5
10639 (eval $ac_try) 2>&5
10641 echo "$as_me:10641: \$? = $ac_status" >&5
10642 (exit $ac_status); }; }; then
10643 cf_cv_xopen_source=no
10645 echo "$as_me: failed program was:" >&5
10646 cat conftest.$ac_ext >&5
10647 cf_save="$CPPFLAGS"
10648 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10649 cat >conftest.$ac_ext <<_ACEOF
10650 #line 10650 "configure"
10651 #include "confdefs.h"
10653 #include <stdlib.h>
10654 #include <string.h>
10655 #include <sys/types.h>
10661 #ifdef _XOPEN_SOURCE
10668 rm -f conftest.$ac_objext
10669 if { (eval echo "$as_me:10669: \"$ac_compile\"") >&5
10670 (eval $ac_compile) 2>&5
10672 echo "$as_me:10672: \$? = $ac_status" >&5
10673 (exit $ac_status); } &&
10674 { ac_try='test -s conftest.$ac_objext'
10675 { (eval echo "$as_me:10675: \"$ac_try\"") >&5
10676 (eval $ac_try) 2>&5
10678 echo "$as_me:10678: \$? = $ac_status" >&5
10679 (exit $ac_status); }; }; then
10680 cf_cv_xopen_source=no
10682 echo "$as_me: failed program was:" >&5
10683 cat conftest.$ac_ext >&5
10684 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10686 rm -f conftest.$ac_objext conftest.$ac_ext
10687 CPPFLAGS="$cf_save"
10690 rm -f conftest.$ac_objext conftest.$ac_ext
10693 echo "$as_me:10693: result: $cf_cv_xopen_source" >&5
10694 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10696 if test "$cf_cv_xopen_source" != no ; then
10698 CFLAGS=`echo "$CFLAGS" | \
10699 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10700 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10702 CPPFLAGS=`echo "$CPPFLAGS" | \
10703 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10704 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
10706 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10711 cf_new_extra_cppflags=
10713 for cf_add_cflags in $cf_temp_xopen_source
10715 case $cf_fix_cppflags in
10717 case $cf_add_cflags in
10718 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10719 case $cf_add_cflags in
10721 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10723 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10724 && test -z "${cf_tst_cflags}" \
10725 && cf_fix_cppflags=yes
10727 if test $cf_fix_cppflags = yes ; then
10729 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10730 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10733 elif test "${cf_tst_cflags}" = "\"'" ; then
10735 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10736 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10742 case "$CPPFLAGS" in
10746 case $cf_add_cflags in
10748 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10750 CPPFLAGS=`echo "$CPPFLAGS" | \
10751 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10752 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10757 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10758 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10765 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10766 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10773 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10774 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10776 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10778 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10779 && test -z "${cf_tst_cflags}" \
10780 && cf_fix_cppflags=no
10785 if test -n "$cf_new_cflags" ; then
10787 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10788 CFLAGS="${CFLAGS}$cf_new_cflags"
10792 if test -n "$cf_new_cppflags" ; then
10794 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10795 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10799 if test -n "$cf_new_extra_cppflags" ; then
10801 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10802 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10808 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10810 cf_save_CFLAGS="$CFLAGS"
10811 cf_save_CPPFLAGS="$CPPFLAGS"
10813 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10814 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10815 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10817 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10818 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
10819 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
10821 echo "$as_me:10821: checking if we should define _POSIX_C_SOURCE" >&5
10822 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10823 if test "${cf_cv_posix_c_source+set}" = set; then
10824 echo $ECHO_N "(cached) $ECHO_C" >&6
10827 echo "${as_me:-configure}:10827: testing if the symbol is already defined go no further ..." 1>&5
10829 cat >conftest.$ac_ext <<_ACEOF
10830 #line 10830 "configure"
10831 #include "confdefs.h"
10832 #include <sys/types.h>
10837 #ifndef _POSIX_C_SOURCE
10844 rm -f conftest.$ac_objext
10845 if { (eval echo "$as_me:10845: \"$ac_compile\"") >&5
10846 (eval $ac_compile) 2>&5
10848 echo "$as_me:10848: \$? = $ac_status" >&5
10849 (exit $ac_status); } &&
10850 { ac_try='test -s conftest.$ac_objext'
10851 { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852 (eval $ac_try) 2>&5
10854 echo "$as_me:10854: \$? = $ac_status" >&5
10855 (exit $ac_status); }; }; then
10856 cf_cv_posix_c_source=no
10858 echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 cf_want_posix_source=no
10861 case .$cf_POSIX_C_SOURCE in
10863 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10866 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10867 cf_want_posix_source=yes
10870 cf_want_posix_source=yes
10873 if test "$cf_want_posix_source" = yes ; then
10874 cat >conftest.$ac_ext <<_ACEOF
10875 #line 10875 "configure"
10876 #include "confdefs.h"
10877 #include <sys/types.h>
10882 #ifdef _POSIX_SOURCE
10889 rm -f conftest.$ac_objext
10890 if { (eval echo "$as_me:10890: \"$ac_compile\"") >&5
10891 (eval $ac_compile) 2>&5
10893 echo "$as_me:10893: \$? = $ac_status" >&5
10894 (exit $ac_status); } &&
10895 { ac_try='test -s conftest.$ac_objext'
10896 { (eval echo "$as_me:10896: \"$ac_try\"") >&5
10897 (eval $ac_try) 2>&5
10899 echo "$as_me:10899: \$? = $ac_status" >&5
10900 (exit $ac_status); }; }; then
10903 echo "$as_me: failed program was:" >&5
10904 cat conftest.$ac_ext >&5
10905 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10907 rm -f conftest.$ac_objext conftest.$ac_ext
10910 echo "${as_me:-configure}:10910: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10912 CFLAGS="$cf_trim_CFLAGS"
10913 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
10915 echo "${as_me:-configure}:10915: testing if the second compile does not leave our definition intact error ..." 1>&5
10917 cat >conftest.$ac_ext <<_ACEOF
10918 #line 10918 "configure"
10919 #include "confdefs.h"
10920 #include <sys/types.h>
10925 #ifndef _POSIX_C_SOURCE
10932 rm -f conftest.$ac_objext
10933 if { (eval echo "$as_me:10933: \"$ac_compile\"") >&5
10934 (eval $ac_compile) 2>&5
10936 echo "$as_me:10936: \$? = $ac_status" >&5
10937 (exit $ac_status); } &&
10938 { ac_try='test -s conftest.$ac_objext'
10939 { (eval echo "$as_me:10939: \"$ac_try\"") >&5
10940 (eval $ac_try) 2>&5
10942 echo "$as_me:10942: \$? = $ac_status" >&5
10943 (exit $ac_status); }; }; then
10946 echo "$as_me: failed program was:" >&5
10947 cat conftest.$ac_ext >&5
10948 cf_cv_posix_c_source=no
10950 rm -f conftest.$ac_objext conftest.$ac_ext
10951 CFLAGS="$cf_save_CFLAGS"
10952 CPPFLAGS="$cf_save_CPPFLAGS"
10955 rm -f conftest.$ac_objext conftest.$ac_ext
10958 echo "$as_me:10958: result: $cf_cv_posix_c_source" >&5
10959 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10961 if test "$cf_cv_posix_c_source" != no ; then
10962 CFLAGS="$cf_trim_CFLAGS"
10963 CPPFLAGS="$cf_trim_CPPFLAGS"
10968 cf_new_extra_cppflags=
10970 for cf_add_cflags in $cf_cv_posix_c_source
10972 case $cf_fix_cppflags in
10974 case $cf_add_cflags in
10975 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10976 case $cf_add_cflags in
10978 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10980 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10981 && test -z "${cf_tst_cflags}" \
10982 && cf_fix_cppflags=yes
10984 if test $cf_fix_cppflags = yes ; then
10986 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10987 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10990 elif test "${cf_tst_cflags}" = "\"'" ; then
10992 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10993 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10999 case "$CPPFLAGS" in
11003 case $cf_add_cflags in
11005 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11007 CPPFLAGS=`echo "$CPPFLAGS" | \
11008 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11009 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11014 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11015 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11022 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11023 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11033 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11035 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11036 && test -z "${cf_tst_cflags}" \
11037 && cf_fix_cppflags=no
11042 if test -n "$cf_new_cflags" ; then
11044 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11045 CFLAGS="${CFLAGS}$cf_new_cflags"
11049 if test -n "$cf_new_cppflags" ; then
11051 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11052 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11056 if test -n "$cf_new_extra_cppflags" ; then
11058 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11059 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11068 if test -n "$cf_xopen_source" ; then
11073 cf_new_extra_cppflags=
11075 for cf_add_cflags in $cf_xopen_source
11077 case $cf_fix_cppflags in
11079 case $cf_add_cflags in
11080 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11081 case $cf_add_cflags in
11083 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11086 && test -z "${cf_tst_cflags}" \
11087 && cf_fix_cppflags=yes
11089 if test $cf_fix_cppflags = yes ; then
11091 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11092 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11095 elif test "${cf_tst_cflags}" = "\"'" ; then
11097 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11098 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11104 case "$CPPFLAGS" in
11108 case $cf_add_cflags in
11110 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11112 CPPFLAGS=`echo "$CPPFLAGS" | \
11113 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11114 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11119 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11120 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11127 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11128 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11135 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11136 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11138 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11140 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11141 && test -z "${cf_tst_cflags}" \
11142 && cf_fix_cppflags=no
11147 if test -n "$cf_new_cflags" ; then
11148 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11150 echo "${as_me:-configure}:11150: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11152 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11153 CFLAGS="${CFLAGS}$cf_new_cflags"
11157 if test -n "$cf_new_cppflags" ; then
11158 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11160 echo "${as_me:-configure}:11160: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11162 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11163 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11167 if test -n "$cf_new_extra_cppflags" ; then
11168 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11170 echo "${as_me:-configure}:11170: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11172 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11173 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11179 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11180 echo "$as_me:11180: checking if _XOPEN_SOURCE really is set" >&5
11181 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11182 cat >conftest.$ac_ext <<_ACEOF
11183 #line 11183 "configure"
11184 #include "confdefs.h"
11185 #include <stdlib.h>
11190 #ifndef _XOPEN_SOURCE
11197 rm -f conftest.$ac_objext
11198 if { (eval echo "$as_me:11198: \"$ac_compile\"") >&5
11199 (eval $ac_compile) 2>&5
11201 echo "$as_me:11201: \$? = $ac_status" >&5
11202 (exit $ac_status); } &&
11203 { ac_try='test -s conftest.$ac_objext'
11204 { (eval echo "$as_me:11204: \"$ac_try\"") >&5
11205 (eval $ac_try) 2>&5
11207 echo "$as_me:11207: \$? = $ac_status" >&5
11208 (exit $ac_status); }; }; then
11209 cf_XOPEN_SOURCE_set=yes
11211 echo "$as_me: failed program was:" >&5
11212 cat conftest.$ac_ext >&5
11213 cf_XOPEN_SOURCE_set=no
11215 rm -f conftest.$ac_objext conftest.$ac_ext
11216 echo "$as_me:11216: result: $cf_XOPEN_SOURCE_set" >&5
11217 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11218 if test $cf_XOPEN_SOURCE_set = yes
11220 cat >conftest.$ac_ext <<_ACEOF
11221 #line 11221 "configure"
11222 #include "confdefs.h"
11223 #include <stdlib.h>
11228 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11235 rm -f conftest.$ac_objext
11236 if { (eval echo "$as_me:11236: \"$ac_compile\"") >&5
11237 (eval $ac_compile) 2>&5
11239 echo "$as_me:11239: \$? = $ac_status" >&5
11240 (exit $ac_status); } &&
11241 { ac_try='test -s conftest.$ac_objext'
11242 { (eval echo "$as_me:11242: \"$ac_try\"") >&5
11243 (eval $ac_try) 2>&5
11245 echo "$as_me:11245: \$? = $ac_status" >&5
11246 (exit $ac_status); }; }; then
11247 cf_XOPEN_SOURCE_set_ok=yes
11249 echo "$as_me: failed program was:" >&5
11250 cat conftest.$ac_ext >&5
11251 cf_XOPEN_SOURCE_set_ok=no
11253 rm -f conftest.$ac_objext conftest.$ac_ext
11254 if test $cf_XOPEN_SOURCE_set_ok = no
11256 { echo "$as_me:11256: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11257 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11261 echo "$as_me:11261: checking if we should define _XOPEN_SOURCE" >&5
11262 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11263 if test "${cf_cv_xopen_source+set}" = set; then
11264 echo $ECHO_N "(cached) $ECHO_C" >&6
11267 cat >conftest.$ac_ext <<_ACEOF
11268 #line 11268 "configure"
11269 #include "confdefs.h"
11271 #include <stdlib.h>
11272 #include <string.h>
11273 #include <sys/types.h>
11279 #ifndef _XOPEN_SOURCE
11286 rm -f conftest.$ac_objext
11287 if { (eval echo "$as_me:11287: \"$ac_compile\"") >&5
11288 (eval $ac_compile) 2>&5
11290 echo "$as_me:11290: \$? = $ac_status" >&5
11291 (exit $ac_status); } &&
11292 { ac_try='test -s conftest.$ac_objext'
11293 { (eval echo "$as_me:11293: \"$ac_try\"") >&5
11294 (eval $ac_try) 2>&5
11296 echo "$as_me:11296: \$? = $ac_status" >&5
11297 (exit $ac_status); }; }; then
11298 cf_cv_xopen_source=no
11300 echo "$as_me: failed program was:" >&5
11301 cat conftest.$ac_ext >&5
11302 cf_save="$CPPFLAGS"
11303 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11304 cat >conftest.$ac_ext <<_ACEOF
11305 #line 11305 "configure"
11306 #include "confdefs.h"
11308 #include <stdlib.h>
11309 #include <string.h>
11310 #include <sys/types.h>
11316 #ifdef _XOPEN_SOURCE
11323 rm -f conftest.$ac_objext
11324 if { (eval echo "$as_me:11324: \"$ac_compile\"") >&5
11325 (eval $ac_compile) 2>&5
11327 echo "$as_me:11327: \$? = $ac_status" >&5
11328 (exit $ac_status); } &&
11329 { ac_try='test -s conftest.$ac_objext'
11330 { (eval echo "$as_me:11330: \"$ac_try\"") >&5
11331 (eval $ac_try) 2>&5
11333 echo "$as_me:11333: \$? = $ac_status" >&5
11334 (exit $ac_status); }; }; then
11335 cf_cv_xopen_source=no
11337 echo "$as_me: failed program was:" >&5
11338 cat conftest.$ac_ext >&5
11339 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11341 rm -f conftest.$ac_objext conftest.$ac_ext
11342 CPPFLAGS="$cf_save"
11345 rm -f conftest.$ac_objext conftest.$ac_ext
11348 echo "$as_me:11348: result: $cf_cv_xopen_source" >&5
11349 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11351 if test "$cf_cv_xopen_source" != no ; then
11353 CFLAGS=`echo "$CFLAGS" | \
11354 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11355 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11357 CPPFLAGS=`echo "$CPPFLAGS" | \
11358 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11359 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11361 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11366 cf_new_extra_cppflags=
11368 for cf_add_cflags in $cf_temp_xopen_source
11370 case $cf_fix_cppflags in
11372 case $cf_add_cflags in
11373 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11374 case $cf_add_cflags in
11376 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11379 && test -z "${cf_tst_cflags}" \
11380 && cf_fix_cppflags=yes
11382 if test $cf_fix_cppflags = yes ; then
11384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11388 elif test "${cf_tst_cflags}" = "\"'" ; then
11390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11397 case "$CPPFLAGS" in
11401 case $cf_add_cflags in
11403 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11405 CPPFLAGS=`echo "$CPPFLAGS" | \
11406 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11407 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11412 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11413 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11420 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11421 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11431 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11434 && test -z "${cf_tst_cflags}" \
11435 && cf_fix_cppflags=no
11440 if test -n "$cf_new_cflags" ; then
11442 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11443 CFLAGS="${CFLAGS}$cf_new_cflags"
11447 if test -n "$cf_new_cppflags" ; then
11449 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11450 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11454 if test -n "$cf_new_extra_cppflags" ; then
11456 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11457 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11466 # Check whether --enable-largefile or --disable-largefile was given.
11467 if test "${enable_largefile+set}" = set; then
11468 enableval="$enable_largefile"
11471 if test "$enable_largefile" != no; then
11473 echo "$as_me:11473: checking for special C compiler options needed for large files" >&5
11474 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11475 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11476 echo $ECHO_N "(cached) $ECHO_C" >&6
11478 ac_cv_sys_largefile_CC=no
11479 if test "$GCC" != yes; then
11482 # IRIX 6.2 and later do not support large files by default,
11483 # so use the C compiler's -n32 option if that helps.
11484 cat >conftest.$ac_ext <<_ACEOF
11485 #line 11485 "configure"
11486 #include "confdefs.h"
11487 #include <sys/types.h>
11488 /* Check that off_t can represent 2**63 - 1 correctly.
11489 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11490 since some C++ compilers masquerading as C compilers
11491 incorrectly reject 9223372036854775807. */
11492 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11493 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11494 && LARGE_OFF_T % 2147483647 == 1)
11504 rm -f conftest.$ac_objext
11505 if { (eval echo "$as_me:11505: \"$ac_compile\"") >&5
11506 (eval $ac_compile) 2>&5
11508 echo "$as_me:11508: \$? = $ac_status" >&5
11509 (exit $ac_status); } &&
11510 { ac_try='test -s conftest.$ac_objext'
11511 { (eval echo "$as_me:11511: \"$ac_try\"") >&5
11512 (eval $ac_try) 2>&5
11514 echo "$as_me:11514: \$? = $ac_status" >&5
11515 (exit $ac_status); }; }; then
11518 echo "$as_me: failed program was:" >&5
11519 cat conftest.$ac_ext >&5
11521 rm -f conftest.$ac_objext
11523 rm -f conftest.$ac_objext
11524 if { (eval echo "$as_me:11524: \"$ac_compile\"") >&5
11525 (eval $ac_compile) 2>&5
11527 echo "$as_me:11527: \$? = $ac_status" >&5
11528 (exit $ac_status); } &&
11529 { ac_try='test -s conftest.$ac_objext'
11530 { (eval echo "$as_me:11530: \"$ac_try\"") >&5
11531 (eval $ac_try) 2>&5
11533 echo "$as_me:11533: \$? = $ac_status" >&5
11534 (exit $ac_status); }; }; then
11535 ac_cv_sys_largefile_CC=' -n32'; break
11537 echo "$as_me: failed program was:" >&5
11538 cat conftest.$ac_ext >&5
11540 rm -f conftest.$ac_objext
11544 rm -f conftest.$ac_ext
11547 echo "$as_me:11547: result: $ac_cv_sys_largefile_CC" >&5
11548 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11549 if test "$ac_cv_sys_largefile_CC" != no; then
11550 CC=$CC$ac_cv_sys_largefile_CC
11553 echo "$as_me:11553: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11554 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11555 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11556 echo $ECHO_N "(cached) $ECHO_C" >&6
11559 ac_cv_sys_file_offset_bits=no
11560 cat >conftest.$ac_ext <<_ACEOF
11561 #line 11561 "configure"
11562 #include "confdefs.h"
11563 #include <sys/types.h>
11564 /* Check that off_t can represent 2**63 - 1 correctly.
11565 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11566 since some C++ compilers masquerading as C compilers
11567 incorrectly reject 9223372036854775807. */
11568 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11569 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11570 && LARGE_OFF_T % 2147483647 == 1)
11580 rm -f conftest.$ac_objext
11581 if { (eval echo "$as_me:11581: \"$ac_compile\"") >&5
11582 (eval $ac_compile) 2>&5
11584 echo "$as_me:11584: \$? = $ac_status" >&5
11585 (exit $ac_status); } &&
11586 { ac_try='test -s conftest.$ac_objext'
11587 { (eval echo "$as_me:11587: \"$ac_try\"") >&5
11588 (eval $ac_try) 2>&5
11590 echo "$as_me:11590: \$? = $ac_status" >&5
11591 (exit $ac_status); }; }; then
11594 echo "$as_me: failed program was:" >&5
11595 cat conftest.$ac_ext >&5
11597 rm -f conftest.$ac_objext conftest.$ac_ext
11598 cat >conftest.$ac_ext <<_ACEOF
11599 #line 11599 "configure"
11600 #include "confdefs.h"
11601 #define _FILE_OFFSET_BITS 64
11602 #include <sys/types.h>
11603 /* Check that off_t can represent 2**63 - 1 correctly.
11604 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11605 since some C++ compilers masquerading as C compilers
11606 incorrectly reject 9223372036854775807. */
11607 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11608 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11609 && LARGE_OFF_T % 2147483647 == 1)
11619 rm -f conftest.$ac_objext
11620 if { (eval echo "$as_me:11620: \"$ac_compile\"") >&5
11621 (eval $ac_compile) 2>&5
11623 echo "$as_me:11623: \$? = $ac_status" >&5
11624 (exit $ac_status); } &&
11625 { ac_try='test -s conftest.$ac_objext'
11626 { (eval echo "$as_me:11626: \"$ac_try\"") >&5
11627 (eval $ac_try) 2>&5
11629 echo "$as_me:11629: \$? = $ac_status" >&5
11630 (exit $ac_status); }; }; then
11631 ac_cv_sys_file_offset_bits=64; break
11633 echo "$as_me: failed program was:" >&5
11634 cat conftest.$ac_ext >&5
11636 rm -f conftest.$ac_objext conftest.$ac_ext
11640 echo "$as_me:11640: result: $ac_cv_sys_file_offset_bits" >&5
11641 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11642 if test "$ac_cv_sys_file_offset_bits" != no; then
11644 cat >>confdefs.h <<EOF
11645 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11650 echo "$as_me:11650: checking for _LARGE_FILES value needed for large files" >&5
11651 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11652 if test "${ac_cv_sys_large_files+set}" = set; then
11653 echo $ECHO_N "(cached) $ECHO_C" >&6
11656 ac_cv_sys_large_files=no
11657 cat >conftest.$ac_ext <<_ACEOF
11658 #line 11658 "configure"
11659 #include "confdefs.h"
11660 #include <sys/types.h>
11661 /* Check that off_t can represent 2**63 - 1 correctly.
11662 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11663 since some C++ compilers masquerading as C compilers
11664 incorrectly reject 9223372036854775807. */
11665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11666 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11667 && LARGE_OFF_T % 2147483647 == 1)
11677 rm -f conftest.$ac_objext
11678 if { (eval echo "$as_me:11678: \"$ac_compile\"") >&5
11679 (eval $ac_compile) 2>&5
11681 echo "$as_me:11681: \$? = $ac_status" >&5
11682 (exit $ac_status); } &&
11683 { ac_try='test -s conftest.$ac_objext'
11684 { (eval echo "$as_me:11684: \"$ac_try\"") >&5
11685 (eval $ac_try) 2>&5
11687 echo "$as_me:11687: \$? = $ac_status" >&5
11688 (exit $ac_status); }; }; then
11691 echo "$as_me: failed program was:" >&5
11692 cat conftest.$ac_ext >&5
11694 rm -f conftest.$ac_objext conftest.$ac_ext
11695 cat >conftest.$ac_ext <<_ACEOF
11696 #line 11696 "configure"
11697 #include "confdefs.h"
11698 #define _LARGE_FILES 1
11699 #include <sys/types.h>
11700 /* Check that off_t can represent 2**63 - 1 correctly.
11701 We can't simply define LARGE_OFF_T to be 9223372036854775807,
11702 since some C++ compilers masquerading as C compilers
11703 incorrectly reject 9223372036854775807. */
11704 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11705 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11706 && LARGE_OFF_T % 2147483647 == 1)
11716 rm -f conftest.$ac_objext
11717 if { (eval echo "$as_me:11717: \"$ac_compile\"") >&5
11718 (eval $ac_compile) 2>&5
11720 echo "$as_me:11720: \$? = $ac_status" >&5
11721 (exit $ac_status); } &&
11722 { ac_try='test -s conftest.$ac_objext'
11723 { (eval echo "$as_me:11723: \"$ac_try\"") >&5
11724 (eval $ac_try) 2>&5
11726 echo "$as_me:11726: \$? = $ac_status" >&5
11727 (exit $ac_status); }; }; then
11728 ac_cv_sys_large_files=1; break
11730 echo "$as_me: failed program was:" >&5
11731 cat conftest.$ac_ext >&5
11733 rm -f conftest.$ac_objext conftest.$ac_ext
11737 echo "$as_me:11737: result: $ac_cv_sys_large_files" >&5
11738 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11739 if test "$ac_cv_sys_large_files" != no; then
11741 cat >>confdefs.h <<EOF
11742 #define _LARGE_FILES $ac_cv_sys_large_files
11749 if test "$enable_largefile" != no ; then
11750 echo "$as_me:11750: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11751 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11752 if test "${ac_cv_sys_largefile_source+set}" = set; then
11753 echo $ECHO_N "(cached) $ECHO_C" >&6
11756 ac_cv_sys_largefile_source=no
11757 cat >conftest.$ac_ext <<_ACEOF
11758 #line 11758 "configure"
11759 #include "confdefs.h"
11769 rm -f conftest.$ac_objext
11770 if { (eval echo "$as_me:11770: \"$ac_compile\"") >&5
11771 (eval $ac_compile) 2>&5
11773 echo "$as_me:11773: \$? = $ac_status" >&5
11774 (exit $ac_status); } &&
11775 { ac_try='test -s conftest.$ac_objext'
11776 { (eval echo "$as_me:11776: \"$ac_try\"") >&5
11777 (eval $ac_try) 2>&5
11779 echo "$as_me:11779: \$? = $ac_status" >&5
11780 (exit $ac_status); }; }; then
11783 echo "$as_me: failed program was:" >&5
11784 cat conftest.$ac_ext >&5
11786 rm -f conftest.$ac_objext conftest.$ac_ext
11787 cat >conftest.$ac_ext <<_ACEOF
11788 #line 11788 "configure"
11789 #include "confdefs.h"
11790 #define _LARGEFILE_SOURCE 1
11800 rm -f conftest.$ac_objext
11801 if { (eval echo "$as_me:11801: \"$ac_compile\"") >&5
11802 (eval $ac_compile) 2>&5
11804 echo "$as_me:11804: \$? = $ac_status" >&5
11805 (exit $ac_status); } &&
11806 { ac_try='test -s conftest.$ac_objext'
11807 { (eval echo "$as_me:11807: \"$ac_try\"") >&5
11808 (eval $ac_try) 2>&5
11810 echo "$as_me:11810: \$? = $ac_status" >&5
11811 (exit $ac_status); }; }; then
11812 ac_cv_sys_largefile_source=1; break
11814 echo "$as_me: failed program was:" >&5
11815 cat conftest.$ac_ext >&5
11817 rm -f conftest.$ac_objext conftest.$ac_ext
11821 echo "$as_me:11821: result: $ac_cv_sys_largefile_source" >&5
11822 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11823 if test "$ac_cv_sys_largefile_source" != no; then
11825 cat >>confdefs.h <<EOF
11826 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11832 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11833 # in glibc 2.1.3, but that breaks too many other things.
11834 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11835 echo "$as_me:11835: checking for fseeko" >&5
11836 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11837 if test "${ac_cv_func_fseeko+set}" = set; then
11838 echo $ECHO_N "(cached) $ECHO_C" >&6
11840 cat >conftest.$ac_ext <<_ACEOF
11841 #line 11841 "configure"
11842 #include "confdefs.h"
11847 return fseeko && fseeko (stdin, 0, 0);
11852 rm -f conftest.$ac_objext conftest$ac_exeext
11853 if { (eval echo "$as_me:11853: \"$ac_link\"") >&5
11854 (eval $ac_link) 2>&5
11856 echo "$as_me:11856: \$? = $ac_status" >&5
11857 (exit $ac_status); } &&
11858 { ac_try='test -s conftest$ac_exeext'
11859 { (eval echo "$as_me:11859: \"$ac_try\"") >&5
11860 (eval $ac_try) 2>&5
11862 echo "$as_me:11862: \$? = $ac_status" >&5
11863 (exit $ac_status); }; }; then
11864 ac_cv_func_fseeko=yes
11866 echo "$as_me: failed program was:" >&5
11867 cat conftest.$ac_ext >&5
11868 ac_cv_func_fseeko=no
11870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11872 echo "$as_me:11872: result: $ac_cv_func_fseeko" >&5
11873 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11874 if test $ac_cv_func_fseeko = yes; then
11876 cat >>confdefs.h <<\EOF
11877 #define HAVE_FSEEKO 1
11882 # Normally we would collect these definitions in the config.h,
11883 # but (like _XOPEN_SOURCE), some environments rely on having these
11884 # defined before any of the system headers are included. Another
11885 # case comes up with C++, e.g., on AIX the compiler compiles the
11886 # header files by themselves before looking at the body files it is
11887 # told to compile. For ncurses, those header files do not include
11889 test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11890 test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11891 test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11893 echo "$as_me:11893: checking whether to use struct dirent64" >&5
11894 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11895 if test "${cf_cv_struct_dirent64+set}" = set; then
11896 echo $ECHO_N "(cached) $ECHO_C" >&6
11899 cat >conftest.$ac_ext <<_ACEOF
11900 #line 11900 "configure"
11901 #include "confdefs.h"
11903 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11904 #include <sys/types.h>
11905 #include <dirent.h>
11911 /* if transitional largefile support is setup, this is true */
11912 extern struct dirent64 * readdir(DIR *);
11913 struct dirent64 *x = readdir((DIR *)0);
11914 struct dirent *y = readdir((DIR *)0);
11921 rm -f conftest.$ac_objext
11922 if { (eval echo "$as_me:11922: \"$ac_compile\"") >&5
11923 (eval $ac_compile) 2>&5
11925 echo "$as_me:11925: \$? = $ac_status" >&5
11926 (exit $ac_status); } &&
11927 { ac_try='test -s conftest.$ac_objext'
11928 { (eval echo "$as_me:11928: \"$ac_try\"") >&5
11929 (eval $ac_try) 2>&5
11931 echo "$as_me:11931: \$? = $ac_status" >&5
11932 (exit $ac_status); }; }; then
11933 cf_cv_struct_dirent64=yes
11935 echo "$as_me: failed program was:" >&5
11936 cat conftest.$ac_ext >&5
11937 cf_cv_struct_dirent64=no
11939 rm -f conftest.$ac_objext conftest.$ac_ext
11942 echo "$as_me:11942: result: $cf_cv_struct_dirent64" >&5
11943 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11944 test "$cf_cv_struct_dirent64" = yes &&
11945 cat >>confdefs.h <<\EOF
11946 #define HAVE_STRUCT_DIRENT64 1
11951 ### Enable compiling-in rcs id's
11952 echo "$as_me:11952: checking if RCS identifiers should be compiled-in" >&5
11953 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11955 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11956 if test "${with_rcs_ids+set}" = set; then
11957 withval="$with_rcs_ids"
11958 with_rcs_ids=$withval
11962 echo "$as_me:11962: result: $with_rcs_ids" >&5
11963 echo "${ECHO_T}$with_rcs_ids" >&6
11964 test "$with_rcs_ids" = yes &&
11965 cat >>confdefs.h <<\EOF
11966 #define USE_RCS_IDS 1
11969 ###############################################################################
11971 ### Note that some functions (such as const) are normally disabled anyway.
11972 echo "$as_me:11972: checking if you want to build with function extensions" >&5
11973 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11975 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11976 if test "${enable_ext_funcs+set}" = set; then
11977 enableval="$enable_ext_funcs"
11978 with_ext_funcs=$enableval
11982 echo "$as_me:11982: result: $with_ext_funcs" >&5
11983 echo "${ECHO_T}$with_ext_funcs" >&6
11984 if test "$with_ext_funcs" = yes ; then
11985 NCURSES_EXT_FUNCS=1
11987 cat >>confdefs.h <<\EOF
11988 #define HAVE_USE_DEFAULT_COLORS 1
11991 cat >>confdefs.h <<\EOF
11992 #define NCURSES_EXT_FUNCS 1
11996 NCURSES_EXT_FUNCS=0
11999 ### use option --enable-const to turn on use of const beyond that in XSI.
12000 echo "$as_me:12000: checking for extended use of const keyword" >&5
12001 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12003 # Check whether --enable-const or --disable-const was given.
12004 if test "${enable_const+set}" = set; then
12005 enableval="$enable_const"
12006 with_ext_const=$enableval
12010 echo "$as_me:12010: result: $with_ext_const" >&5
12011 echo "${ECHO_T}$with_ext_const" >&6
12012 NCURSES_CONST='/*nothing*/'
12013 if test "$with_ext_const" = yes ; then
12014 NCURSES_CONST=const
12017 ###############################################################################
12018 # These options are relatively safe to experiment with.
12020 echo "$as_me:12020: checking if you want all development code" >&5
12021 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12023 # Check whether --with-develop or --without-develop was given.
12024 if test "${with_develop+set}" = set; then
12025 withval="$with_develop"
12026 with_develop=$withval
12030 echo "$as_me:12030: result: $with_develop" >&5
12031 echo "${ECHO_T}$with_develop" >&6
12033 ###############################################################################
12034 # These are just experimental, probably should not be in a package:
12036 # This is still experimental (20080329), but should ultimately be moved to
12037 # the script-block --with-normal, etc.
12039 echo "$as_me:12039: checking if you want to link with the pthread library" >&5
12040 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12042 # Check whether --with-pthread or --without-pthread was given.
12043 if test "${with_pthread+set}" = set; then
12044 withval="$with_pthread"
12045 with_pthread=$withval
12049 echo "$as_me:12049: result: $with_pthread" >&5
12050 echo "${ECHO_T}$with_pthread" >&6
12052 if test "$with_pthread" != no ; then
12053 echo "$as_me:12053: checking for pthread.h" >&5
12054 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12055 if test "${ac_cv_header_pthread_h+set}" = set; then
12056 echo $ECHO_N "(cached) $ECHO_C" >&6
12058 cat >conftest.$ac_ext <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061 #include <pthread.h>
12063 if { (eval echo "$as_me:12063: \"$ac_cpp conftest.$ac_ext\"") >&5
12064 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12066 egrep -v '^ *\+' conftest.er1 >conftest.err
12068 cat conftest.err >&5
12069 echo "$as_me:12069: \$? = $ac_status" >&5
12070 (exit $ac_status); } >/dev/null; then
12071 if test -s conftest.err; then
12072 ac_cpp_err=$ac_c_preproc_warn_flag
12079 if test -z "$ac_cpp_err"; then
12080 ac_cv_header_pthread_h=yes
12082 echo "$as_me: failed program was:" >&5
12083 cat conftest.$ac_ext >&5
12084 ac_cv_header_pthread_h=no
12086 rm -f conftest.err conftest.$ac_ext
12088 echo "$as_me:12088: result: $ac_cv_header_pthread_h" >&5
12089 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12090 if test $ac_cv_header_pthread_h = yes; then
12092 cat >>confdefs.h <<\EOF
12093 #define HAVE_PTHREADS_H 1
12096 for cf_lib_pthread in pthread c_r
12098 echo "$as_me:12098: checking if we can link with the $cf_lib_pthread library" >&5
12099 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12100 cf_save_LIBS="$LIBS"
12102 cf_add_libs="-l$cf_lib_pthread"
12103 # Filter out duplicates - this happens with badly-designed ".pc" files...
12104 for cf_add_1lib in $LIBS
12106 for cf_add_2lib in $cf_add_libs
12108 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12114 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12116 LIBS="$cf_add_libs"
12118 cat >conftest.$ac_ext <<_ACEOF
12119 #line 12119 "configure"
12120 #include "confdefs.h"
12122 #include <pthread.h>
12128 int rc = pthread_create(0,0,0,0);
12129 int r2 = pthread_mutexattr_settype(0, 0);
12135 rm -f conftest.$ac_objext conftest$ac_exeext
12136 if { (eval echo "$as_me:12136: \"$ac_link\"") >&5
12137 (eval $ac_link) 2>&5
12139 echo "$as_me:12139: \$? = $ac_status" >&5
12140 (exit $ac_status); } &&
12141 { ac_try='test -s conftest$ac_exeext'
12142 { (eval echo "$as_me:12142: \"$ac_try\"") >&5
12143 (eval $ac_try) 2>&5
12145 echo "$as_me:12145: \$? = $ac_status" >&5
12146 (exit $ac_status); }; }; then
12149 echo "$as_me: failed program was:" >&5
12150 cat conftest.$ac_ext >&5
12153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12154 LIBS="$cf_save_LIBS"
12155 echo "$as_me:12155: result: $with_pthread" >&5
12156 echo "${ECHO_T}$with_pthread" >&6
12157 test "$with_pthread" = yes && break
12160 if test "$with_pthread" = yes ; then
12162 cf_add_libs="-l$cf_lib_pthread"
12163 # Filter out duplicates - this happens with badly-designed ".pc" files...
12164 for cf_add_1lib in $LIBS
12166 for cf_add_2lib in $cf_add_libs
12168 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12174 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12176 LIBS="$cf_add_libs"
12178 cat >>confdefs.h <<\EOF
12179 #define HAVE_LIBPTHREADS 1
12183 { { echo "$as_me:12183: error: Cannot link with pthread library" >&5
12184 echo "$as_me: error: Cannot link with pthread library" >&2;}
12185 { (exit 1); exit 1; }; }
12192 echo "$as_me:12192: checking if you want to use weak-symbols for pthreads" >&5
12193 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12195 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12196 if test "${enable_weak_symbols+set}" = set; then
12197 enableval="$enable_weak_symbols"
12198 use_weak_symbols=$withval
12200 use_weak_symbols=no
12202 echo "$as_me:12202: result: $use_weak_symbols" >&5
12203 echo "${ECHO_T}$use_weak_symbols" >&6
12204 if test "$use_weak_symbols" = yes ; then
12206 echo "$as_me:12206: checking if $CC supports weak symbols" >&5
12207 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12208 if test "${cf_cv_weak_symbols+set}" = set; then
12209 echo $ECHO_N "(cached) $ECHO_C" >&6
12212 cat >conftest.$ac_ext <<_ACEOF
12213 #line 12213 "configure"
12214 #include "confdefs.h"
12221 #if defined(__GNUC__)
12222 # if defined __USE_ISOC99
12223 # define _cat_pragma(exp) _Pragma(#exp)
12224 # define _weak_pragma(exp) _cat_pragma(weak name)
12226 # define _weak_pragma(exp)
12228 # define _declare(name) __extension__ extern __typeof__(name) name
12229 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
12232 weak_symbol(fopen);
12238 rm -f conftest.$ac_objext
12239 if { (eval echo "$as_me:12239: \"$ac_compile\"") >&5
12240 (eval $ac_compile) 2>&5
12242 echo "$as_me:12242: \$? = $ac_status" >&5
12243 (exit $ac_status); } &&
12244 { ac_try='test -s conftest.$ac_objext'
12245 { (eval echo "$as_me:12245: \"$ac_try\"") >&5
12246 (eval $ac_try) 2>&5
12248 echo "$as_me:12248: \$? = $ac_status" >&5
12249 (exit $ac_status); }; }; then
12250 cf_cv_weak_symbols=yes
12252 echo "$as_me: failed program was:" >&5
12253 cat conftest.$ac_ext >&5
12254 cf_cv_weak_symbols=no
12256 rm -f conftest.$ac_objext conftest.$ac_ext
12259 echo "$as_me:12259: result: $cf_cv_weak_symbols" >&5
12260 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12263 cf_cv_weak_symbols=no
12266 if test $cf_cv_weak_symbols = yes ; then
12268 cat >>confdefs.h <<\EOF
12269 #define USE_WEAK_SYMBOLS 1
12275 if test "$with_pthread" = "yes" ; then
12277 cat >>confdefs.h <<\EOF
12278 #define USE_PTHREADS 1
12281 enable_reentrant=yes
12282 if test $cf_cv_weak_symbols = yes ; then
12287 # OpenSUSE is installing ncurses6, using reentrant option.
12288 echo "$as_me:12288: checking for _nc_TABSIZE" >&5
12289 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
12290 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
12291 echo $ECHO_N "(cached) $ECHO_C" >&6
12293 cat >conftest.$ac_ext <<_ACEOF
12294 #line 12294 "configure"
12295 #include "confdefs.h"
12296 /* System header to define __stub macros and hopefully few prototypes,
12297 which can conflict with char _nc_TABSIZE (); below. */
12298 #include <assert.h>
12299 /* Override any gcc2 internal prototype to avoid an error. */
12303 /* We use char because int might match the return type of a gcc2
12304 builtin and then its argument prototype would still apply. */
12305 char _nc_TABSIZE ();
12311 /* The GNU C library defines this for functions which it implements
12312 to always fail with ENOSYS. Some functions are actually named
12313 something starting with __ and the normal name is an alias. */
12314 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
12317 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12324 rm -f conftest.$ac_objext conftest$ac_exeext
12325 if { (eval echo "$as_me:12325: \"$ac_link\"") >&5
12326 (eval $ac_link) 2>&5
12328 echo "$as_me:12328: \$? = $ac_status" >&5
12329 (exit $ac_status); } &&
12330 { ac_try='test -s conftest$ac_exeext'
12331 { (eval echo "$as_me:12331: \"$ac_try\"") >&5
12332 (eval $ac_try) 2>&5
12334 echo "$as_me:12334: \$? = $ac_status" >&5
12335 (exit $ac_status); }; }; then
12336 ac_cv_func__nc_TABSIZE=yes
12338 echo "$as_me: failed program was:" >&5
12339 cat conftest.$ac_ext >&5
12340 ac_cv_func__nc_TABSIZE=no
12342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12344 echo "$as_me:12344: result: $ac_cv_func__nc_TABSIZE" >&5
12345 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
12346 if test $ac_cv_func__nc_TABSIZE = yes; then
12347 assume_reentrant=yes
12349 assume_reentrant=no
12352 # Reentrant code has to be opaque; there's little advantage to making ncurses
12353 # opaque outside of that, so there is no --enable-opaque option. We can use
12354 # this option without --with-pthreads, but this will be always set for
12356 echo "$as_me:12356: checking if you want experimental reentrant code" >&5
12357 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12359 # Check whether --enable-reentrant or --disable-reentrant was given.
12360 if test "${enable_reentrant+set}" = set; then
12361 enableval="$enable_reentrant"
12362 with_reentrant=$enableval
12364 with_reentrant=$assume_reentrant
12366 echo "$as_me:12366: result: $with_reentrant" >&5
12367 echo "${ECHO_T}$with_reentrant" >&6
12368 if test "$with_reentrant" = yes ; then
12369 cf_cv_enable_reentrant=1
12370 if test $cf_cv_weak_symbols = yes ; then
12372 # remove pthread library from $LIBS
12373 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
12375 elif test "$assume_reentrant" = no ; then
12376 LIB_SUFFIX="t${LIB_SUFFIX}"
12379 cat >>confdefs.h <<\EOF
12380 #define USE_REENTRANT 1
12384 cf_cv_enable_reentrant=0
12387 ### Allow using a different wrap-prefix
12388 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12389 echo "$as_me:12389: checking for prefix used to wrap public variables" >&5
12390 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12392 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12393 if test "${with_wrap_prefix+set}" = set; then
12394 withval="$with_wrap_prefix"
12395 NCURSES_WRAP_PREFIX=$withval
12397 NCURSES_WRAP_PREFIX=_nc_
12399 echo "$as_me:12399: result: $NCURSES_WRAP_PREFIX" >&5
12400 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12402 NCURSES_WRAP_PREFIX=_nc_
12405 cat >>confdefs.h <<EOF
12406 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12409 ###############################################################################
12411 ### use option --disable-echo to suppress full display compiling commands
12413 echo "$as_me:12413: checking if you want to see long compiling messages" >&5
12414 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12416 # Check whether --enable-echo or --disable-echo was given.
12417 if test "${enable_echo+set}" = set; then
12418 enableval="$enable_echo"
12419 test "$enableval" != no && enableval=yes
12420 if test "$enableval" != "yes" ; then
12423 ECHO_LD='@echo linking $@;'
12424 RULE_CC='@echo compiling $<'
12425 SHOW_CC='@echo compiling $@'
12447 echo "$as_me:12447: result: $enableval" >&5
12448 echo "${ECHO_T}$enableval" >&6
12450 ### use option --enable-warnings to turn on all gcc warnings
12451 echo "$as_me:12451: checking if you want to see compiler warnings" >&5
12452 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12454 # Check whether --enable-warnings or --disable-warnings was given.
12455 if test "${enable_warnings+set}" = set; then
12456 enableval="$enable_warnings"
12457 with_warnings=$enableval
12459 echo "$as_me:12459: result: $with_warnings" >&5
12460 echo "${ECHO_T}$with_warnings" >&6
12462 if test "x$with_warnings" = "xyes"; then
12464 ADAFLAGS="$ADAFLAGS -gnatg"
12468 if test "$GCC" = yes ; then
12471 echo "$as_me:12471: checking if this is really Intel C compiler" >&5
12472 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12473 cf_save_CFLAGS="$CFLAGS"
12474 CFLAGS="$CFLAGS -no-gcc"
12475 cat >conftest.$ac_ext <<_ACEOF
12476 #line 12476 "configure"
12477 #include "confdefs.h"
12483 #ifdef __INTEL_COMPILER
12492 rm -f conftest.$ac_objext
12493 if { (eval echo "$as_me:12493: \"$ac_compile\"") >&5
12494 (eval $ac_compile) 2>&5
12496 echo "$as_me:12496: \$? = $ac_status" >&5
12497 (exit $ac_status); } &&
12498 { ac_try='test -s conftest.$ac_objext'
12499 { (eval echo "$as_me:12499: \"$ac_try\"") >&5
12500 (eval $ac_try) 2>&5
12502 echo "$as_me:12502: \$? = $ac_status" >&5
12503 (exit $ac_status); }; }; then
12505 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12508 echo "$as_me: failed program was:" >&5
12509 cat conftest.$ac_ext >&5
12511 rm -f conftest.$ac_objext conftest.$ac_ext
12512 CFLAGS="$cf_save_CFLAGS"
12513 echo "$as_me:12513: result: $INTEL_COMPILER" >&5
12514 echo "${ECHO_T}$INTEL_COMPILER" >&6
12521 if test "$GCC" = yes ; then
12522 echo "$as_me:12522: checking if this is really Clang C compiler" >&5
12523 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12524 cf_save_CFLAGS="$CFLAGS"
12525 CFLAGS="$CFLAGS -Qunused-arguments"
12526 cat >conftest.$ac_ext <<_ACEOF
12527 #line 12527 "configure"
12528 #include "confdefs.h"
12543 rm -f conftest.$ac_objext
12544 if { (eval echo "$as_me:12544: \"$ac_compile\"") >&5
12545 (eval $ac_compile) 2>&5
12547 echo "$as_me:12547: \$? = $ac_status" >&5
12548 (exit $ac_status); } &&
12549 { ac_try='test -s conftest.$ac_objext'
12550 { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551 (eval $ac_try) 2>&5
12553 echo "$as_me:12553: \$? = $ac_status" >&5
12554 (exit $ac_status); }; }; then
12556 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12559 echo "$as_me: failed program was:" >&5
12560 cat conftest.$ac_ext >&5
12562 rm -f conftest.$ac_objext conftest.$ac_ext
12563 CFLAGS="$cf_save_CFLAGS"
12564 echo "$as_me:12564: result: $CLANG_COMPILER" >&5
12565 echo "${ECHO_T}$CLANG_COMPILER" >&6
12568 cat > conftest.$ac_ext <<EOF
12569 #line 12569 "${as_me:-configure}"
12570 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12573 if test "$INTEL_COMPILER" = yes
12575 # The "-wdXXX" options suppress warnings:
12576 # remark #1419: external declaration in primary source file
12577 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12578 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12579 # remark #193: zero used for undefined preprocessing identifier
12580 # remark #593: variable "curs_sb_left_arrow" was set but never used
12581 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12582 # remark #869: parameter "tw" was never referenced
12583 # remark #981: operands are evaluated in unspecified order
12584 # warning #279: controlling expression is constant
12586 { echo "$as_me:12586: checking for $CC warning options..." >&5
12587 echo "$as_me: checking for $CC warning options..." >&6;}
12588 cf_save_CFLAGS="$CFLAGS"
12589 EXTRA_CFLAGS="-Wall"
12601 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12602 if { (eval echo "$as_me:12602: \"$ac_compile\"") >&5
12603 (eval $ac_compile) 2>&5
12605 echo "$as_me:12605: \$? = $ac_status" >&5
12606 (exit $ac_status); }; then
12607 test -n "$verbose" && echo "$as_me:12607: result: ... -$cf_opt" >&5
12608 echo "${ECHO_T}... -$cf_opt" >&6
12609 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12612 CFLAGS="$cf_save_CFLAGS"
12614 elif test "$GCC" = yes
12616 { echo "$as_me:12616: checking for $CC warning options..." >&5
12617 echo "$as_me: checking for $CC warning options..." >&6;}
12618 cf_save_CFLAGS="$CFLAGS"
12621 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12622 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12623 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12624 for cf_opt in W Wall \
12625 Wbad-function-cast \
12628 Wdeclaration-after-statement \
12631 Wmissing-declarations \
12632 Wmissing-prototypes \
12636 Wstrict-prototypes \
12637 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12639 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12640 if { (eval echo "$as_me:12640: \"$ac_compile\"") >&5
12641 (eval $ac_compile) 2>&5
12643 echo "$as_me:12643: \$? = $ac_status" >&5
12644 (exit $ac_status); }; then
12645 test -n "$verbose" && echo "$as_me:12645: result: ... -$cf_opt" >&5
12646 echo "${ECHO_T}... -$cf_opt" >&6
12649 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12652 case $GCC_VERSION in
12654 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12656 echo "${as_me:-configure}:12656: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12662 case $GCC_VERSION in
12664 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
12666 echo "${as_me:-configure}:12666: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12672 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12675 CFLAGS="$cf_save_CFLAGS"
12681 if test "$GCC" = yes
12683 cat > conftest.i <<EOF
12685 #define GCC_PRINTF 0
12688 #define GCC_SCANF 0
12690 #ifndef GCC_NORETURN
12691 #define GCC_NORETURN /* nothing */
12694 #define GCC_UNUSED /* nothing */
12697 if test "$GCC" = yes
12699 { echo "$as_me:12699: checking for $CC __attribute__ directives..." >&5
12700 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12701 cat > conftest.$ac_ext <<EOF
12702 #line 12702 "${as_me:-configure}"
12703 #include "confdefs.h"
12704 #include "conftest.h"
12705 #include "conftest.i"
12707 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12709 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12712 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
12714 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
12716 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12717 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12718 extern void foo(void) GCC_NORETURN;
12719 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12721 cf_printf_attribute=no
12722 cf_scanf_attribute=no
12723 for cf_attribute in scanf printf unused noreturn
12726 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12728 cf_directive="__attribute__(($cf_attribute))"
12729 echo "checking for $CC $cf_directive" 1>&5
12731 case $cf_attribute in
12733 cf_printf_attribute=yes
12734 cat >conftest.h <<EOF
12735 #define GCC_$cf_ATTRIBUTE 1
12739 cf_scanf_attribute=yes
12740 cat >conftest.h <<EOF
12741 #define GCC_$cf_ATTRIBUTE 1
12745 cat >conftest.h <<EOF
12746 #define GCC_$cf_ATTRIBUTE $cf_directive
12751 if { (eval echo "$as_me:12751: \"$ac_compile\"") >&5
12752 (eval $ac_compile) 2>&5
12754 echo "$as_me:12754: \$? = $ac_status" >&5
12755 (exit $ac_status); }; then
12756 test -n "$verbose" && echo "$as_me:12756: result: ... $cf_attribute" >&5
12757 echo "${ECHO_T}... $cf_attribute" >&6
12758 cat conftest.h >>confdefs.h
12759 case $cf_attribute in
12762 cat >>confdefs.h <<EOF
12763 #define GCC_NORETURN $cf_directive
12768 cf_value='/* nothing */'
12769 if test "$cf_printf_attribute" != no ; then
12770 cf_value='__attribute__((format(printf,fmt,var)))'
12772 cat >>confdefs.h <<\EOF
12773 #define GCC_PRINTF 1
12778 cat >>confdefs.h <<EOF
12779 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12784 cf_value='/* nothing */'
12785 if test "$cf_scanf_attribute" != no ; then
12786 cf_value='__attribute__((format(scanf,fmt,var)))'
12788 cat >>confdefs.h <<\EOF
12789 #define GCC_SCANF 1
12794 cat >>confdefs.h <<EOF
12795 #define GCC_SCANFLIKE(fmt,var) $cf_value
12801 cat >>confdefs.h <<EOF
12802 #define GCC_UNUSED $cf_directive
12810 fgrep define conftest.i >>confdefs.h
12815 ### use option --enable-assertions to turn on generation of assertion code
12816 echo "$as_me:12816: checking if you want to enable runtime assertions" >&5
12817 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12819 # Check whether --enable-assertions or --disable-assertions was given.
12820 if test "${enable_assertions+set}" = set; then
12821 enableval="$enable_assertions"
12822 with_assertions=$enableval
12826 echo "$as_me:12826: result: $with_assertions" >&5
12827 echo "${ECHO_T}$with_assertions" >&6
12830 if test "$with_assertions" = no
12832 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12835 ADAFLAGS="$ADAFLAGS -gnata"
12840 ### use option --disable-leaks to suppress "permanent" leaks, for testing
12842 cat >>confdefs.h <<\EOF
12843 #define HAVE_NC_ALLOC_H 1
12846 ### use option --enable-expanded to generate certain macros as functions
12848 # Check whether --enable-expanded or --disable-expanded was given.
12849 if test "${enable_expanded+set}" = set; then
12850 enableval="$enable_expanded"
12851 test "$enableval" = yes &&
12852 cat >>confdefs.h <<\EOF
12853 #define NCURSES_EXPANDED 1
12858 ### use option --disable-macros to suppress macros in favor of functions
12860 # Check whether --enable-macros or --disable-macros was given.
12861 if test "${enable_macros+set}" = set; then
12862 enableval="$enable_macros"
12863 test "$enableval" = no &&
12864 cat >>confdefs.h <<\EOF
12865 #define NCURSES_NOMACROS 1
12870 # Normally we only add trace() to the debug-library. Allow this to be
12871 # extended to all models of the ncurses library:
12873 case "$CFLAGS $CPPFLAGS" in
12879 echo "$as_me:12879: checking whether to add trace feature to all models" >&5
12880 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12882 # Check whether --with-trace or --without-trace was given.
12883 if test "${with_trace+set}" = set; then
12884 withval="$with_trace"
12885 cf_with_trace=$withval
12887 cf_with_trace=$cf_all_traces
12889 echo "$as_me:12889: result: $cf_with_trace" >&5
12890 echo "${ECHO_T}$cf_with_trace" >&6
12892 if test "$cf_with_trace" = yes ; then
12898 cf_new_extra_cppflags=
12900 for cf_add_cflags in -DTRACE
12902 case $cf_fix_cppflags in
12904 case $cf_add_cflags in
12905 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12906 case $cf_add_cflags in
12908 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12910 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12911 && test -z "${cf_tst_cflags}" \
12912 && cf_fix_cppflags=yes
12914 if test $cf_fix_cppflags = yes ; then
12916 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12917 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12920 elif test "${cf_tst_cflags}" = "\"'" ; then
12922 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12923 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12929 case "$CPPFLAGS" in
12933 case $cf_add_cflags in
12935 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12937 CPPFLAGS=`echo "$CPPFLAGS" | \
12938 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12939 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12944 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12945 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12952 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12953 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12960 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12961 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12963 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12965 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12966 && test -z "${cf_tst_cflags}" \
12967 && cf_fix_cppflags=no
12972 if test -n "$cf_new_cflags" ; then
12974 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12975 CFLAGS="${CFLAGS}$cf_new_cflags"
12979 if test -n "$cf_new_cppflags" ; then
12981 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12982 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12986 if test -n "$cf_new_extra_cppflags" ; then
12988 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12989 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12997 echo "$as_me:12997: checking if we want to use GNAT projects" >&5
12998 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13000 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13001 if test "${enable_gnat_projects+set}" = set; then
13002 enableval="$enable_gnat_projects"
13003 test "$enableval" != no && enableval=yes
13004 if test "$enableval" != "yes" ; then
13005 enable_gnat_projects=no
13007 enable_gnat_projects=yes
13011 enable_gnat_projects=yes
13014 echo "$as_me:13014: result: $enable_gnat_projects" >&5
13015 echo "${ECHO_T}$enable_gnat_projects" >&6
13017 ### Checks for libraries.
13018 case $cf_cv_system_name in
13022 echo "$as_me:13022: checking for gettimeofday" >&5
13023 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13024 if test "${ac_cv_func_gettimeofday+set}" = set; then
13025 echo $ECHO_N "(cached) $ECHO_C" >&6
13027 cat >conftest.$ac_ext <<_ACEOF
13028 #line 13028 "configure"
13029 #include "confdefs.h"
13030 /* System header to define __stub macros and hopefully few prototypes,
13031 which can conflict with char gettimeofday (); below. */
13032 #include <assert.h>
13033 /* Override any gcc2 internal prototype to avoid an error. */
13037 /* We use char because int might match the return type of a gcc2
13038 builtin and then its argument prototype would still apply. */
13039 char gettimeofday ();
13045 /* The GNU C library defines this for functions which it implements
13046 to always fail with ENOSYS. Some functions are actually named
13047 something starting with __ and the normal name is an alias. */
13048 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13051 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13058 rm -f conftest.$ac_objext conftest$ac_exeext
13059 if { (eval echo "$as_me:13059: \"$ac_link\"") >&5
13060 (eval $ac_link) 2>&5
13062 echo "$as_me:13062: \$? = $ac_status" >&5
13063 (exit $ac_status); } &&
13064 { ac_try='test -s conftest$ac_exeext'
13065 { (eval echo "$as_me:13065: \"$ac_try\"") >&5
13066 (eval $ac_try) 2>&5
13068 echo "$as_me:13068: \$? = $ac_status" >&5
13069 (exit $ac_status); }; }; then
13070 ac_cv_func_gettimeofday=yes
13072 echo "$as_me: failed program was:" >&5
13073 cat conftest.$ac_ext >&5
13074 ac_cv_func_gettimeofday=no
13076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13078 echo "$as_me:13078: result: $ac_cv_func_gettimeofday" >&5
13079 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13080 if test $ac_cv_func_gettimeofday = yes; then
13081 cat >>confdefs.h <<\EOF
13082 #define HAVE_GETTIMEOFDAY 1
13087 echo "$as_me:13087: checking for gettimeofday in -lbsd" >&5
13088 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13089 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13090 echo $ECHO_N "(cached) $ECHO_C" >&6
13092 ac_check_lib_save_LIBS=$LIBS
13094 cat >conftest.$ac_ext <<_ACEOF
13095 #line 13095 "configure"
13096 #include "confdefs.h"
13098 /* Override any gcc2 internal prototype to avoid an error. */
13102 /* We use char because int might match the return type of a gcc2
13103 builtin and then its argument prototype would still apply. */
13104 char gettimeofday ();
13113 rm -f conftest.$ac_objext conftest$ac_exeext
13114 if { (eval echo "$as_me:13114: \"$ac_link\"") >&5
13115 (eval $ac_link) 2>&5
13117 echo "$as_me:13117: \$? = $ac_status" >&5
13118 (exit $ac_status); } &&
13119 { ac_try='test -s conftest$ac_exeext'
13120 { (eval echo "$as_me:13120: \"$ac_try\"") >&5
13121 (eval $ac_try) 2>&5
13123 echo "$as_me:13123: \$? = $ac_status" >&5
13124 (exit $ac_status); }; }; then
13125 ac_cv_lib_bsd_gettimeofday=yes
13127 echo "$as_me: failed program was:" >&5
13128 cat conftest.$ac_ext >&5
13129 ac_cv_lib_bsd_gettimeofday=no
13131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13132 LIBS=$ac_check_lib_save_LIBS
13134 echo "$as_me:13134: result: $ac_cv_lib_bsd_gettimeofday" >&5
13135 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13136 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13138 cat >>confdefs.h <<\EOF
13139 #define HAVE_GETTIMEOFDAY 1
13149 ### Checks for header files.
13150 echo "$as_me:13150: checking for ANSI C header files" >&5
13151 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13152 if test "${ac_cv_header_stdc+set}" = set; then
13153 echo $ECHO_N "(cached) $ECHO_C" >&6
13155 cat >conftest.$ac_ext <<_ACEOF
13156 #line 13156 "configure"
13157 #include "confdefs.h"
13158 #include <stdlib.h>
13159 #include <stdarg.h>
13160 #include <string.h>
13164 if { (eval echo "$as_me:13164: \"$ac_cpp conftest.$ac_ext\"") >&5
13165 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13167 egrep -v '^ *\+' conftest.er1 >conftest.err
13169 cat conftest.err >&5
13170 echo "$as_me:13170: \$? = $ac_status" >&5
13171 (exit $ac_status); } >/dev/null; then
13172 if test -s conftest.err; then
13173 ac_cpp_err=$ac_c_preproc_warn_flag
13180 if test -z "$ac_cpp_err"; then
13181 ac_cv_header_stdc=yes
13183 echo "$as_me: failed program was:" >&5
13184 cat conftest.$ac_ext >&5
13185 ac_cv_header_stdc=no
13187 rm -f conftest.err conftest.$ac_ext
13189 if test $ac_cv_header_stdc = yes; then
13190 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13191 cat >conftest.$ac_ext <<_ACEOF
13192 #line 13192 "configure"
13193 #include "confdefs.h"
13194 #include <string.h>
13197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13198 egrep "memchr" >/dev/null 2>&1; then
13201 ac_cv_header_stdc=no
13207 if test $ac_cv_header_stdc = yes; then
13208 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13209 cat >conftest.$ac_ext <<_ACEOF
13210 #line 13210 "configure"
13211 #include "confdefs.h"
13212 #include <stdlib.h>
13215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13216 egrep "free" >/dev/null 2>&1; then
13219 ac_cv_header_stdc=no
13225 if test $ac_cv_header_stdc = yes; then
13226 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13227 if test "$cross_compiling" = yes; then
13230 cat >conftest.$ac_ext <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13234 #if ((' ' & 0x0FF) == 0x020)
13235 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13236 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13238 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13239 || ('j' <= (c) && (c) <= 'r') \
13240 || ('s' <= (c) && (c) <= 'z'))
13241 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13244 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13249 for (i = 0; i < 256; i++)
13250 if (XOR (islower (i), ISLOWER (i))
13251 || toupper (i) != TOUPPER (i))
13252 $ac_main_return(2);
13253 $ac_main_return (0);
13256 rm -f conftest$ac_exeext
13257 if { (eval echo "$as_me:13257: \"$ac_link\"") >&5
13258 (eval $ac_link) 2>&5
13260 echo "$as_me:13260: \$? = $ac_status" >&5
13261 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13262 { (eval echo "$as_me:13262: \"$ac_try\"") >&5
13263 (eval $ac_try) 2>&5
13265 echo "$as_me:13265: \$? = $ac_status" >&5
13266 (exit $ac_status); }; }; then
13269 echo "$as_me: program exited with status $ac_status" >&5
13270 echo "$as_me: failed program was:" >&5
13271 cat conftest.$ac_ext >&5
13272 ac_cv_header_stdc=no
13274 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13278 echo "$as_me:13278: result: $ac_cv_header_stdc" >&5
13279 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13280 if test $ac_cv_header_stdc = yes; then
13282 cat >>confdefs.h <<\EOF
13283 #define STDC_HEADERS 1
13288 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13290 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13291 inttypes.h stdint.h unistd.h
13293 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13294 echo "$as_me:13294: checking for $ac_header" >&5
13295 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13296 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13297 echo $ECHO_N "(cached) $ECHO_C" >&6
13299 cat >conftest.$ac_ext <<_ACEOF
13300 #line 13300 "configure"
13301 #include "confdefs.h"
13302 $ac_includes_default
13303 #include <$ac_header>
13305 rm -f conftest.$ac_objext
13306 if { (eval echo "$as_me:13306: \"$ac_compile\"") >&5
13307 (eval $ac_compile) 2>&5
13309 echo "$as_me:13309: \$? = $ac_status" >&5
13310 (exit $ac_status); } &&
13311 { ac_try='test -s conftest.$ac_objext'
13312 { (eval echo "$as_me:13312: \"$ac_try\"") >&5
13313 (eval $ac_try) 2>&5
13315 echo "$as_me:13315: \$? = $ac_status" >&5
13316 (exit $ac_status); }; }; then
13317 eval "$as_ac_Header=yes"
13319 echo "$as_me: failed program was:" >&5
13320 cat conftest.$ac_ext >&5
13321 eval "$as_ac_Header=no"
13323 rm -f conftest.$ac_objext conftest.$ac_ext
13325 echo "$as_me:13325: result: `eval echo '${'$as_ac_Header'}'`" >&5
13326 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13327 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13328 cat >>confdefs.h <<EOF
13329 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13335 echo "$as_me:13335: checking for signed char" >&5
13336 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13337 if test "${ac_cv_type_signed_char+set}" = set; then
13338 echo $ECHO_N "(cached) $ECHO_C" >&6
13340 cat >conftest.$ac_ext <<_ACEOF
13341 #line 13341 "configure"
13342 #include "confdefs.h"
13343 $ac_includes_default
13347 if ((signed char *) 0)
13349 if (sizeof (signed char))
13355 rm -f conftest.$ac_objext
13356 if { (eval echo "$as_me:13356: \"$ac_compile\"") >&5
13357 (eval $ac_compile) 2>&5
13359 echo "$as_me:13359: \$? = $ac_status" >&5
13360 (exit $ac_status); } &&
13361 { ac_try='test -s conftest.$ac_objext'
13362 { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363 (eval $ac_try) 2>&5
13365 echo "$as_me:13365: \$? = $ac_status" >&5
13366 (exit $ac_status); }; }; then
13367 ac_cv_type_signed_char=yes
13369 echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371 ac_cv_type_signed_char=no
13373 rm -f conftest.$ac_objext conftest.$ac_ext
13375 echo "$as_me:13375: result: $ac_cv_type_signed_char" >&5
13376 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13378 echo "$as_me:13378: checking size of signed char" >&5
13379 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13380 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13381 echo $ECHO_N "(cached) $ECHO_C" >&6
13383 if test "$ac_cv_type_signed_char" = yes; then
13384 if test "$cross_compiling" = yes; then
13385 # Depending upon the size, compute the lo and hi bounds.
13386 cat >conftest.$ac_ext <<_ACEOF
13387 #line 13387 "configure"
13388 #include "confdefs.h"
13389 $ac_includes_default
13393 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13398 rm -f conftest.$ac_objext
13399 if { (eval echo "$as_me:13399: \"$ac_compile\"") >&5
13400 (eval $ac_compile) 2>&5
13402 echo "$as_me:13402: \$? = $ac_status" >&5
13403 (exit $ac_status); } &&
13404 { ac_try='test -s conftest.$ac_objext'
13405 { (eval echo "$as_me:13405: \"$ac_try\"") >&5
13406 (eval $ac_try) 2>&5
13408 echo "$as_me:13408: \$? = $ac_status" >&5
13409 (exit $ac_status); }; }; then
13412 cat >conftest.$ac_ext <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13415 $ac_includes_default
13419 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13424 rm -f conftest.$ac_objext
13425 if { (eval echo "$as_me:13425: \"$ac_compile\"") >&5
13426 (eval $ac_compile) 2>&5
13428 echo "$as_me:13428: \$? = $ac_status" >&5
13429 (exit $ac_status); } &&
13430 { ac_try='test -s conftest.$ac_objext'
13431 { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432 (eval $ac_try) 2>&5
13434 echo "$as_me:13434: \$? = $ac_status" >&5
13435 (exit $ac_status); }; }; then
13436 ac_hi=$ac_mid; break
13438 echo "$as_me: failed program was:" >&5
13439 cat conftest.$ac_ext >&5
13440 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13442 rm -f conftest.$ac_objext conftest.$ac_ext
13445 echo "$as_me: failed program was:" >&5
13446 cat conftest.$ac_ext >&5
13449 cat >conftest.$ac_ext <<_ACEOF
13450 #line 13450 "configure"
13451 #include "confdefs.h"
13452 $ac_includes_default
13456 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13461 rm -f conftest.$ac_objext
13462 if { (eval echo "$as_me:13462: \"$ac_compile\"") >&5
13463 (eval $ac_compile) 2>&5
13465 echo "$as_me:13465: \$? = $ac_status" >&5
13466 (exit $ac_status); } &&
13467 { ac_try='test -s conftest.$ac_objext'
13468 { (eval echo "$as_me:13468: \"$ac_try\"") >&5
13469 (eval $ac_try) 2>&5
13471 echo "$as_me:13471: \$? = $ac_status" >&5
13472 (exit $ac_status); }; }; then
13473 ac_lo=$ac_mid; break
13475 echo "$as_me: failed program was:" >&5
13476 cat conftest.$ac_ext >&5
13477 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13479 rm -f conftest.$ac_objext conftest.$ac_ext
13482 rm -f conftest.$ac_objext conftest.$ac_ext
13483 # Binary search between lo and hi bounds.
13484 while test "x$ac_lo" != "x$ac_hi"; do
13485 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13486 cat >conftest.$ac_ext <<_ACEOF
13487 #line 13487 "configure"
13488 #include "confdefs.h"
13489 $ac_includes_default
13493 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13498 rm -f conftest.$ac_objext
13499 if { (eval echo "$as_me:13499: \"$ac_compile\"") >&5
13500 (eval $ac_compile) 2>&5
13502 echo "$as_me:13502: \$? = $ac_status" >&5
13503 (exit $ac_status); } &&
13504 { ac_try='test -s conftest.$ac_objext'
13505 { (eval echo "$as_me:13505: \"$ac_try\"") >&5
13506 (eval $ac_try) 2>&5
13508 echo "$as_me:13508: \$? = $ac_status" >&5
13509 (exit $ac_status); }; }; then
13512 echo "$as_me: failed program was:" >&5
13513 cat conftest.$ac_ext >&5
13514 ac_lo=`expr $ac_mid + 1`
13516 rm -f conftest.$ac_objext conftest.$ac_ext
13518 ac_cv_sizeof_signed_char=$ac_lo
13520 if test "$cross_compiling" = yes; then
13521 { { echo "$as_me:13521: error: cannot run test program while cross compiling" >&5
13522 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13523 { (exit 1); exit 1; }; }
13525 cat >conftest.$ac_ext <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528 $ac_includes_default
13532 FILE *f = fopen ("conftest.val", "w");
13534 $ac_main_return (1);
13535 fprintf (f, "%d", (sizeof (signed char)));
13541 rm -f conftest$ac_exeext
13542 if { (eval echo "$as_me:13542: \"$ac_link\"") >&5
13543 (eval $ac_link) 2>&5
13545 echo "$as_me:13545: \$? = $ac_status" >&5
13546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13547 { (eval echo "$as_me:13547: \"$ac_try\"") >&5
13548 (eval $ac_try) 2>&5
13550 echo "$as_me:13550: \$? = $ac_status" >&5
13551 (exit $ac_status); }; }; then
13552 ac_cv_sizeof_signed_char=`cat conftest.val`
13554 echo "$as_me: program exited with status $ac_status" >&5
13555 echo "$as_me: failed program was:" >&5
13556 cat conftest.$ac_ext >&5
13558 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13563 ac_cv_sizeof_signed_char=0
13566 echo "$as_me:13566: result: $ac_cv_sizeof_signed_char" >&5
13567 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13568 cat >>confdefs.h <<EOF
13569 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13572 echo "$as_me:13572: checking for ANSI C header files" >&5
13573 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13574 if test "${ac_cv_header_stdc+set}" = set; then
13575 echo $ECHO_N "(cached) $ECHO_C" >&6
13577 cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580 #include <stdlib.h>
13581 #include <stdarg.h>
13582 #include <string.h>
13586 if { (eval echo "$as_me:13586: \"$ac_cpp conftest.$ac_ext\"") >&5
13587 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13589 egrep -v '^ *\+' conftest.er1 >conftest.err
13591 cat conftest.err >&5
13592 echo "$as_me:13592: \$? = $ac_status" >&5
13593 (exit $ac_status); } >/dev/null; then
13594 if test -s conftest.err; then
13595 ac_cpp_err=$ac_c_preproc_warn_flag
13602 if test -z "$ac_cpp_err"; then
13603 ac_cv_header_stdc=yes
13605 echo "$as_me: failed program was:" >&5
13606 cat conftest.$ac_ext >&5
13607 ac_cv_header_stdc=no
13609 rm -f conftest.err conftest.$ac_ext
13611 if test $ac_cv_header_stdc = yes; then
13612 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13613 cat >conftest.$ac_ext <<_ACEOF
13614 #line 13614 "configure"
13615 #include "confdefs.h"
13616 #include <string.h>
13619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13620 egrep "memchr" >/dev/null 2>&1; then
13623 ac_cv_header_stdc=no
13629 if test $ac_cv_header_stdc = yes; then
13630 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13631 cat >conftest.$ac_ext <<_ACEOF
13632 #line 13632 "configure"
13633 #include "confdefs.h"
13634 #include <stdlib.h>
13637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13638 egrep "free" >/dev/null 2>&1; then
13641 ac_cv_header_stdc=no
13647 if test $ac_cv_header_stdc = yes; then
13648 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13649 if test "$cross_compiling" = yes; then
13652 cat >conftest.$ac_ext <<_ACEOF
13653 #line 13653 "configure"
13654 #include "confdefs.h"
13656 #if ((' ' & 0x0FF) == 0x020)
13657 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13658 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13660 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13661 || ('j' <= (c) && (c) <= 'r') \
13662 || ('s' <= (c) && (c) <= 'z'))
13663 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13666 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13671 for (i = 0; i < 256; i++)
13672 if (XOR (islower (i), ISLOWER (i))
13673 || toupper (i) != TOUPPER (i))
13674 $ac_main_return(2);
13675 $ac_main_return (0);
13678 rm -f conftest$ac_exeext
13679 if { (eval echo "$as_me:13679: \"$ac_link\"") >&5
13680 (eval $ac_link) 2>&5
13682 echo "$as_me:13682: \$? = $ac_status" >&5
13683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13684 { (eval echo "$as_me:13684: \"$ac_try\"") >&5
13685 (eval $ac_try) 2>&5
13687 echo "$as_me:13687: \$? = $ac_status" >&5
13688 (exit $ac_status); }; }; then
13691 echo "$as_me: program exited with status $ac_status" >&5
13692 echo "$as_me: failed program was:" >&5
13693 cat conftest.$ac_ext >&5
13694 ac_cv_header_stdc=no
13696 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13700 echo "$as_me:13700: result: $ac_cv_header_stdc" >&5
13701 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13702 if test $ac_cv_header_stdc = yes; then
13704 cat >>confdefs.h <<\EOF
13705 #define STDC_HEADERS 1
13710 ac_header_dirent=no
13711 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13712 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13713 echo "$as_me:13713: checking for $ac_hdr that defines DIR" >&5
13714 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13715 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13716 echo $ECHO_N "(cached) $ECHO_C" >&6
13718 cat >conftest.$ac_ext <<_ACEOF
13719 #line 13719 "configure"
13720 #include "confdefs.h"
13721 #include <sys/types.h>
13733 rm -f conftest.$ac_objext
13734 if { (eval echo "$as_me:13734: \"$ac_compile\"") >&5
13735 (eval $ac_compile) 2>&5
13737 echo "$as_me:13737: \$? = $ac_status" >&5
13738 (exit $ac_status); } &&
13739 { ac_try='test -s conftest.$ac_objext'
13740 { (eval echo "$as_me:13740: \"$ac_try\"") >&5
13741 (eval $ac_try) 2>&5
13743 echo "$as_me:13743: \$? = $ac_status" >&5
13744 (exit $ac_status); }; }; then
13745 eval "$as_ac_Header=yes"
13747 echo "$as_me: failed program was:" >&5
13748 cat conftest.$ac_ext >&5
13749 eval "$as_ac_Header=no"
13751 rm -f conftest.$ac_objext conftest.$ac_ext
13753 echo "$as_me:13753: result: `eval echo '${'$as_ac_Header'}'`" >&5
13754 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13755 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13756 cat >>confdefs.h <<EOF
13757 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13760 ac_header_dirent=$ac_hdr; break
13764 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13765 if test $ac_header_dirent = dirent.h; then
13766 echo "$as_me:13766: checking for opendir in -ldir" >&5
13767 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13768 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13769 echo $ECHO_N "(cached) $ECHO_C" >&6
13771 ac_check_lib_save_LIBS=$LIBS
13773 cat >conftest.$ac_ext <<_ACEOF
13774 #line 13774 "configure"
13775 #include "confdefs.h"
13777 /* Override any gcc2 internal prototype to avoid an error. */
13781 /* We use char because int might match the return type of a gcc2
13782 builtin and then its argument prototype would still apply. */
13792 rm -f conftest.$ac_objext conftest$ac_exeext
13793 if { (eval echo "$as_me:13793: \"$ac_link\"") >&5
13794 (eval $ac_link) 2>&5
13796 echo "$as_me:13796: \$? = $ac_status" >&5
13797 (exit $ac_status); } &&
13798 { ac_try='test -s conftest$ac_exeext'
13799 { (eval echo "$as_me:13799: \"$ac_try\"") >&5
13800 (eval $ac_try) 2>&5
13802 echo "$as_me:13802: \$? = $ac_status" >&5
13803 (exit $ac_status); }; }; then
13804 ac_cv_lib_dir_opendir=yes
13806 echo "$as_me: failed program was:" >&5
13807 cat conftest.$ac_ext >&5
13808 ac_cv_lib_dir_opendir=no
13810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13811 LIBS=$ac_check_lib_save_LIBS
13813 echo "$as_me:13813: result: $ac_cv_lib_dir_opendir" >&5
13814 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13815 if test $ac_cv_lib_dir_opendir = yes; then
13820 echo "$as_me:13820: checking for opendir in -lx" >&5
13821 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13822 if test "${ac_cv_lib_x_opendir+set}" = set; then
13823 echo $ECHO_N "(cached) $ECHO_C" >&6
13825 ac_check_lib_save_LIBS=$LIBS
13827 cat >conftest.$ac_ext <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13831 /* Override any gcc2 internal prototype to avoid an error. */
13835 /* We use char because int might match the return type of a gcc2
13836 builtin and then its argument prototype would still apply. */
13846 rm -f conftest.$ac_objext conftest$ac_exeext
13847 if { (eval echo "$as_me:13847: \"$ac_link\"") >&5
13848 (eval $ac_link) 2>&5
13850 echo "$as_me:13850: \$? = $ac_status" >&5
13851 (exit $ac_status); } &&
13852 { ac_try='test -s conftest$ac_exeext'
13853 { (eval echo "$as_me:13853: \"$ac_try\"") >&5
13854 (eval $ac_try) 2>&5
13856 echo "$as_me:13856: \$? = $ac_status" >&5
13857 (exit $ac_status); }; }; then
13858 ac_cv_lib_x_opendir=yes
13860 echo "$as_me: failed program was:" >&5
13861 cat conftest.$ac_ext >&5
13862 ac_cv_lib_x_opendir=no
13864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13865 LIBS=$ac_check_lib_save_LIBS
13867 echo "$as_me:13867: result: $ac_cv_lib_x_opendir" >&5
13868 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13869 if test $ac_cv_lib_x_opendir = yes; then
13875 echo "$as_me:13875: checking whether time.h and sys/time.h may both be included" >&5
13876 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13877 if test "${ac_cv_header_time+set}" = set; then
13878 echo $ECHO_N "(cached) $ECHO_C" >&6
13880 cat >conftest.$ac_ext <<_ACEOF
13881 #line 13881 "configure"
13882 #include "confdefs.h"
13883 #include <sys/types.h>
13884 #include <sys/time.h>
13890 if ((struct tm *) 0)
13896 rm -f conftest.$ac_objext
13897 if { (eval echo "$as_me:13897: \"$ac_compile\"") >&5
13898 (eval $ac_compile) 2>&5
13900 echo "$as_me:13900: \$? = $ac_status" >&5
13901 (exit $ac_status); } &&
13902 { ac_try='test -s conftest.$ac_objext'
13903 { (eval echo "$as_me:13903: \"$ac_try\"") >&5
13904 (eval $ac_try) 2>&5
13906 echo "$as_me:13906: \$? = $ac_status" >&5
13907 (exit $ac_status); }; }; then
13908 ac_cv_header_time=yes
13910 echo "$as_me: failed program was:" >&5
13911 cat conftest.$ac_ext >&5
13912 ac_cv_header_time=no
13914 rm -f conftest.$ac_objext conftest.$ac_ext
13916 echo "$as_me:13916: result: $ac_cv_header_time" >&5
13917 echo "${ECHO_T}$ac_cv_header_time" >&6
13918 if test $ac_cv_header_time = yes; then
13920 cat >>confdefs.h <<\EOF
13921 #define TIME_WITH_SYS_TIME 1
13926 ### checks for compiler characteristics
13928 ac_cpp='$CPP $CPPFLAGS'
13929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13932 ac_main_return=return
13934 echo "$as_me:13934: checking for an ANSI C-conforming const" >&5
13935 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13936 if test "${ac_cv_c_const+set}" = set; then
13937 echo $ECHO_N "(cached) $ECHO_C" >&6
13939 cat >conftest.$ac_ext <<_ACEOF
13940 #line 13940 "configure"
13941 #include "confdefs.h"
13946 /* FIXME: Include the comments suggested by Paul. */
13947 #ifndef __cplusplus
13948 /* Ultrix mips cc rejects this. */
13949 typedef int charset[2];
13951 /* SunOS 4.1.1 cc rejects this. */
13952 char const *const *ccp;
13954 /* NEC SVR4.0.2 mips cc rejects this. */
13955 struct point {int x, y;};
13956 static struct point const zero = {0,0};
13957 /* AIX XL C 1.02.0.0 rejects this.
13958 It does not let you subtract one const X* pointer from another in
13959 an arm of an if-expression whose if-part is not a constant
13961 const char *g = "string";
13962 ccp = &g + (g ? g-g : 0);
13963 /* HPUX 7.0 cc rejects these. */
13966 ccp = (char const *const *) p;
13967 { /* SCO 3.2v4 cc rejects this. */
13969 char const *s = 0 ? (char *) 0 : (char const *) 0;
13973 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13974 int x[] = {25, 17};
13975 const int *foo = &x[0];
13978 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13979 typedef const int *iptr;
13983 { /* AIX XL C 1.02.0.0 rejects this saying
13984 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13985 struct s { int j; const int *ap[3]; };
13986 struct s *b; b->j = 5;
13988 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13989 const int foo = 10;
13997 rm -f conftest.$ac_objext
13998 if { (eval echo "$as_me:13998: \"$ac_compile\"") >&5
13999 (eval $ac_compile) 2>&5
14001 echo "$as_me:14001: \$? = $ac_status" >&5
14002 (exit $ac_status); } &&
14003 { ac_try='test -s conftest.$ac_objext'
14004 { (eval echo "$as_me:14004: \"$ac_try\"") >&5
14005 (eval $ac_try) 2>&5
14007 echo "$as_me:14007: \$? = $ac_status" >&5
14008 (exit $ac_status); }; }; then
14011 echo "$as_me: failed program was:" >&5
14012 cat conftest.$ac_ext >&5
14015 rm -f conftest.$ac_objext conftest.$ac_ext
14017 echo "$as_me:14017: result: $ac_cv_c_const" >&5
14018 echo "${ECHO_T}$ac_cv_c_const" >&6
14019 if test $ac_cv_c_const = no; then
14021 cat >>confdefs.h <<\EOF
14027 ### Checks for external-data
14029 echo "$as_me:14029: checking if data-only library module links" >&5
14030 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14031 if test "${cf_cv_link_dataonly+set}" = set; then
14032 echo $ECHO_N "(cached) $ECHO_C" >&6
14036 cat >conftest.$ac_ext <<EOF
14037 #line 14037 "configure"
14038 int testdata[3] = { 123, 456, 789 };
14040 if { (eval echo "$as_me:14040: \"$ac_compile\"") >&5
14041 (eval $ac_compile) 2>&5
14043 echo "$as_me:14043: \$? = $ac_status" >&5
14044 (exit $ac_status); } ; then
14045 mv conftest.o data.o && \
14046 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14048 rm -f conftest.$ac_ext data.o
14049 cat >conftest.$ac_ext <<EOF
14050 #line 14050 "configure"
14054 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
14056 extern int testdata[3];
14057 return testdata[0] == 123
14058 && testdata[1] == 456
14059 && testdata[2] == 789;
14063 if { (eval echo "$as_me:14063: \"$ac_compile\"") >&5
14064 (eval $ac_compile) 2>&5
14066 echo "$as_me:14066: \$? = $ac_status" >&5
14067 (exit $ac_status); }; then
14068 mv conftest.o func.o && \
14069 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14071 rm -f conftest.$ac_ext func.o
14072 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14073 cf_saveLIBS="$LIBS"
14074 LIBS="conftest.a $LIBS"
14075 if test "$cross_compiling" = yes; then
14076 cf_cv_link_dataonly=unknown
14078 cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14084 extern int testfunc();
14085 ${cf_cv_main_return:-return} (!testfunc());
14089 rm -f conftest$ac_exeext
14090 if { (eval echo "$as_me:14090: \"$ac_link\"") >&5
14091 (eval $ac_link) 2>&5
14093 echo "$as_me:14093: \$? = $ac_status" >&5
14094 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14095 { (eval echo "$as_me:14095: \"$ac_try\"") >&5
14096 (eval $ac_try) 2>&5
14098 echo "$as_me:14098: \$? = $ac_status" >&5
14099 (exit $ac_status); }; }; then
14100 cf_cv_link_dataonly=yes
14102 echo "$as_me: program exited with status $ac_status" >&5
14103 echo "$as_me: failed program was:" >&5
14104 cat conftest.$ac_ext >&5
14105 cf_cv_link_dataonly=no
14107 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14109 LIBS="$cf_saveLIBS"
14113 echo "$as_me:14113: result: $cf_cv_link_dataonly" >&5
14114 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14116 if test "$cf_cv_link_dataonly" = no ; then
14118 cat >>confdefs.h <<\EOF
14119 #define BROKEN_LINKER 1
14125 ### Checks for library functions.
14131 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14132 echo "$as_me:14132: checking for $ac_header" >&5
14133 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14134 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14135 echo $ECHO_N "(cached) $ECHO_C" >&6
14137 cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140 #include <$ac_header>
14142 if { (eval echo "$as_me:14142: \"$ac_cpp conftest.$ac_ext\"") >&5
14143 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14145 egrep -v '^ *\+' conftest.er1 >conftest.err
14147 cat conftest.err >&5
14148 echo "$as_me:14148: \$? = $ac_status" >&5
14149 (exit $ac_status); } >/dev/null; then
14150 if test -s conftest.err; then
14151 ac_cpp_err=$ac_c_preproc_warn_flag
14158 if test -z "$ac_cpp_err"; then
14159 eval "$as_ac_Header=yes"
14161 echo "$as_me: failed program was:" >&5
14162 cat conftest.$ac_ext >&5
14163 eval "$as_ac_Header=no"
14165 rm -f conftest.err conftest.$ac_ext
14167 echo "$as_me:14167: result: `eval echo '${'$as_ac_Header'}'`" >&5
14168 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14169 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14170 cat >>confdefs.h <<EOF
14171 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14177 echo "$as_me:14177: checking for working mkstemp" >&5
14178 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14179 if test "${cf_cv_func_mkstemp+set}" = set; then
14180 echo $ECHO_N "(cached) $ECHO_C" >&6
14184 if test "$cross_compiling" = yes; then
14185 cf_cv_func_mkstemp=maybe
14187 cat >conftest.$ac_ext <<_ACEOF
14188 #line 14188 "configure"
14189 #include "confdefs.h"
14191 #include <sys/types.h>
14192 #ifdef HAVE_UNISTD_H
14193 #include <unistd.h>
14195 #include <stdlib.h>
14197 #include <string.h>
14198 #include <sys/stat.h>
14201 char *tmpl = "conftestXXXXXX";
14209 for (n = 0; n < 2; ++n) {
14210 strcpy(name[n], tmpl);
14211 if ((fd = mkstemp(name[n])) >= 0) {
14212 if (!strcmp(name[n], tmpl)
14213 || stat(name[n], &sb) != 0
14214 || (sb.st_mode & S_IFMT) != S_IFREG
14215 || (sb.st_mode & 077) != 0) {
14222 && !strcmp(name[0], name[1]))
14224 ${cf_cv_main_return:-return}(result);
14228 rm -f conftest$ac_exeext
14229 if { (eval echo "$as_me:14229: \"$ac_link\"") >&5
14230 (eval $ac_link) 2>&5
14232 echo "$as_me:14232: \$? = $ac_status" >&5
14233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14234 { (eval echo "$as_me:14234: \"$ac_try\"") >&5
14235 (eval $ac_try) 2>&5
14237 echo "$as_me:14237: \$? = $ac_status" >&5
14238 (exit $ac_status); }; }; then
14239 cf_cv_func_mkstemp=yes
14242 echo "$as_me: program exited with status $ac_status" >&5
14243 echo "$as_me: failed program was:" >&5
14244 cat conftest.$ac_ext >&5
14245 cf_cv_func_mkstemp=no
14248 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14252 echo "$as_me:14252: result: $cf_cv_func_mkstemp" >&5
14253 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14254 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
14255 echo "$as_me:14255: checking for mkstemp" >&5
14256 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14257 if test "${ac_cv_func_mkstemp+set}" = set; then
14258 echo $ECHO_N "(cached) $ECHO_C" >&6
14260 cat >conftest.$ac_ext <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263 /* System header to define __stub macros and hopefully few prototypes,
14264 which can conflict with char mkstemp (); below. */
14265 #include <assert.h>
14266 /* Override any gcc2 internal prototype to avoid an error. */
14270 /* We use char because int might match the return type of a gcc2
14271 builtin and then its argument prototype would still apply. */
14278 /* The GNU C library defines this for functions which it implements
14279 to always fail with ENOSYS. Some functions are actually named
14280 something starting with __ and the normal name is an alias. */
14281 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14284 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14291 rm -f conftest.$ac_objext conftest$ac_exeext
14292 if { (eval echo "$as_me:14292: \"$ac_link\"") >&5
14293 (eval $ac_link) 2>&5
14295 echo "$as_me:14295: \$? = $ac_status" >&5
14296 (exit $ac_status); } &&
14297 { ac_try='test -s conftest$ac_exeext'
14298 { (eval echo "$as_me:14298: \"$ac_try\"") >&5
14299 (eval $ac_try) 2>&5
14301 echo "$as_me:14301: \$? = $ac_status" >&5
14302 (exit $ac_status); }; }; then
14303 ac_cv_func_mkstemp=yes
14305 echo "$as_me: failed program was:" >&5
14306 cat conftest.$ac_ext >&5
14307 ac_cv_func_mkstemp=no
14309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14311 echo "$as_me:14311: result: $ac_cv_func_mkstemp" >&5
14312 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14315 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
14317 cat >>confdefs.h <<\EOF
14318 #define HAVE_MKSTEMP 1
14323 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14324 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14325 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14329 if test "$cf_with_ada" != "no" ; then
14331 cf_ada_make=gnatmake
14333 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14334 set dummy $cf_ada_make; ac_word=$2
14335 echo "$as_me:14335: checking for $ac_word" >&5
14336 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14337 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
14338 echo $ECHO_N "(cached) $ECHO_C" >&6
14340 if test -n "$gnatmake_exists"; then
14341 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
14343 ac_save_IFS=$IFS; IFS=$ac_path_separator
14345 for ac_dir in $ac_dummy; do
14347 test -z "$ac_dir" && ac_dir=.
14348 $as_executable_p "$ac_dir/$ac_word" || continue
14349 ac_cv_prog_gnatmake_exists="yes"
14350 echo "$as_me:14350: found $ac_dir/$ac_word" >&5
14354 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
14357 gnatmake_exists=$ac_cv_prog_gnatmake_exists
14358 if test -n "$gnatmake_exists"; then
14359 echo "$as_me:14359: result: $gnatmake_exists" >&5
14360 echo "${ECHO_T}$gnatmake_exists" >&6
14362 echo "$as_me:14362: result: no" >&5
14363 echo "${ECHO_T}no" >&6
14366 if test "$ac_cv_prog_gnatmake_exists" = no; then
14368 cf_cv_prog_gnat_correct=no
14370 # Extract the first word of "gprconfig", so it can be a program name with args.
14371 set dummy gprconfig; ac_word=$2
14372 echo "$as_me:14372: checking for $ac_word" >&5
14373 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14374 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
14375 echo $ECHO_N "(cached) $ECHO_C" >&6
14377 if test -n "$gprconfig_exists"; then
14378 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
14380 ac_save_IFS=$IFS; IFS=$ac_path_separator
14382 for ac_dir in $ac_dummy; do
14384 test -z "$ac_dir" && ac_dir=.
14385 $as_executable_p "$ac_dir/$ac_word" || continue
14386 ac_cv_prog_gprconfig_exists="yes"
14387 echo "$as_me:14387: found $ac_dir/$ac_word" >&5
14391 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
14394 gprconfig_exists=$ac_cv_prog_gprconfig_exists
14395 if test -n "$gprconfig_exists"; then
14396 echo "$as_me:14396: result: $gprconfig_exists" >&5
14397 echo "${ECHO_T}$gprconfig_exists" >&6
14399 echo "$as_me:14399: result: no" >&5
14400 echo "${ECHO_T}no" >&6
14403 if test "$ac_cv_prog_gprconfig_exists" = yes
14405 rm -rf conftest* *~conftest*
14406 if mkdir conftest.src
14410 for cf_gprconfig in Ada C
14412 echo "$as_me:14412: checking for gprconfig name for $cf_gprconfig" >&5
14413 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
14414 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
14415 if test -n "$cf_gprconfig_value"
14417 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
14418 echo "$as_me:14418: result: $cf_gprconfig_value" >&5
14419 echo "${ECHO_T}$cf_gprconfig_value" >&6
14421 echo "$as_me:14421: result: missing" >&5
14422 echo "${ECHO_T}missing" >&6
14428 rm -rf conftest* *~conftest*
14431 # gprconfig is newer than gnatmake; we can continue...
14434 if test "x$cf_ada_config" != "x#"
14437 echo "$as_me:14437: checking for gnat version" >&5
14438 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14439 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
14440 grep '[0-9].[0-9][0-9]*' |\
14441 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14442 echo "$as_me:14442: result: $cf_gnat_version" >&5
14443 echo "${ECHO_T}$cf_gnat_version" >&6
14445 case $cf_gnat_version in
14446 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
14447 cf_cv_prog_gnat_correct=yes
14450 { echo "$as_me:14450: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
14451 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
14452 cf_cv_prog_gnat_correct=no
14456 # Extract the first word of "m4", so it can be a program name with args.
14457 set dummy m4; ac_word=$2
14458 echo "$as_me:14458: checking for $ac_word" >&5
14459 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14460 if test "${ac_cv_prog_M4_exists+set}" = set; then
14461 echo $ECHO_N "(cached) $ECHO_C" >&6
14463 if test -n "$M4_exists"; then
14464 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14466 ac_save_IFS=$IFS; IFS=$ac_path_separator
14468 for ac_dir in $ac_dummy; do
14470 test -z "$ac_dir" && ac_dir=.
14471 $as_executable_p "$ac_dir/$ac_word" || continue
14472 ac_cv_prog_M4_exists="yes"
14473 echo "$as_me:14473: found $ac_dir/$ac_word" >&5
14477 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14480 M4_exists=$ac_cv_prog_M4_exists
14481 if test -n "$M4_exists"; then
14482 echo "$as_me:14482: result: $M4_exists" >&5
14483 echo "${ECHO_T}$M4_exists" >&6
14485 echo "$as_me:14485: result: no" >&5
14486 echo "${ECHO_T}no" >&6
14489 if test "$ac_cv_prog_M4_exists" = no; then
14490 cf_cv_prog_gnat_correct=no
14491 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14493 if test "$cf_cv_prog_gnat_correct" = yes; then
14494 echo "$as_me:14494: checking if GNAT works" >&5
14495 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14497 rm -rf conftest* *~conftest*
14498 cat >>conftest.ads <<CF_EOF
14499 procedure conftest;
14501 cat >>conftest.adb <<CF_EOF
14504 procedure conftest is
14506 Text_IO.Put ("Hello World");
14508 GNAT.OS_Lib.OS_Exit (0);
14511 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14512 if ( ./conftest 1>&5 2>&1 ) ; then
14513 cf_cv_prog_gnat_correct=yes
14515 cf_cv_prog_gnat_correct=no
14518 cf_cv_prog_gnat_correct=no
14520 rm -rf conftest* *~conftest*
14522 echo "$as_me:14522: result: $cf_cv_prog_gnat_correct" >&5
14523 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14526 cf_cv_prog_gnat_correct=no
14530 if test "$cf_cv_prog_gnat_correct" = yes; then
14532 echo "$as_me:14532: checking optimization options for ADAFLAGS" >&5
14533 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
14537 ADAFLAGS="$ADAFLAGS -g"
14543 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
14545 ADAFLAGS="$ADAFLAGS $cf_O_flag"
14549 echo "$as_me:14549: result: $ADAFLAGS" >&5
14550 echo "${ECHO_T}$ADAFLAGS" >&6
14552 echo "$as_me:14552: checking if GNATPREP supports -T option" >&5
14553 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
14554 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
14555 echo $ECHO_N "(cached) $ECHO_C" >&6
14558 cf_cv_gnatprep_opt_t=no
14559 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
14562 echo "$as_me:14562: result: $cf_cv_gnatprep_opt_t" >&5
14563 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
14564 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
14566 echo "$as_me:14566: checking if GNAT supports generics" >&5
14567 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
14568 case $cf_gnat_version in
14570 cf_gnat_generics=yes
14573 cf_gnat_generics=no
14576 echo "$as_me:14576: result: $cf_gnat_generics" >&5
14577 echo "${ECHO_T}$cf_gnat_generics" >&6
14579 if test "$cf_gnat_generics" = yes
14581 cf_compile_generics=generics
14582 cf_generic_objects="\${GENOBJS}"
14584 cf_compile_generics=
14585 cf_generic_objects=
14588 echo "$as_me:14588: checking if GNAT supports SIGINT" >&5
14589 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
14590 if test "${cf_cv_gnat_sigint+set}" = set; then
14591 echo $ECHO_N "(cached) $ECHO_C" >&6
14594 rm -rf conftest* *~conftest*
14595 cat >>conftest.ads <<CF_EOF
14596 with Ada.Interrupts.Names;
14598 package ConfTest is
14600 pragma Warnings (Off); -- the next pragma exists since 3.11p
14601 pragma Unreserve_All_Interrupts;
14602 pragma Warnings (On);
14604 protected Process is
14606 function Continue return Boolean;
14607 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
14609 Done : Boolean := False;
14614 cat >>conftest.adb <<CF_EOF
14615 package body ConfTest is
14616 protected body Process is
14621 function Continue return Boolean is
14628 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14629 cf_cv_gnat_sigint=yes
14631 cf_cv_gnat_sigint=no
14633 rm -rf conftest* *~conftest*
14636 echo "$as_me:14636: result: $cf_cv_gnat_sigint" >&5
14637 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
14639 if test $cf_cv_gnat_sigint = yes ; then
14642 USE_GNAT_SIGINT="#"
14645 cf_gnat_libraries=no
14646 cf_gnat_projects=no
14648 if test "$enable_gnat_projects" != no ; then
14649 echo "$as_me:14649: checking if GNAT supports project files" >&5
14650 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
14651 case $cf_gnat_version in
14655 case $cf_cv_system_name in
14659 rm -rf conftest* *~conftest*
14660 if mkdir conftest.src conftest.bin conftest.lib
14663 rm -rf conftest* *~conftest*
14664 cat >>library.gpr <<CF_EOF
14666 Kind := External ("LIB_KIND");
14667 for Library_Name use "ConfTest";
14668 for Object_Dir use ".";
14669 for Library_ALI_Dir use External("LIBRARY_DIR");
14670 for Library_Version use External ("SONAME");
14671 for Library_Kind use Kind;
14672 for Library_Dir use External("BUILD_DIR");
14673 Source_Dir := External ("SOURCE_DIR");
14674 for Source_Dirs use (Source_Dir);
14677 cat >>confpackage.ads <<CF_EOF
14678 package ConfPackage is
14679 procedure conftest;
14682 cat >>confpackage.adb <<CF_EOF
14684 package body ConfPackage is
14685 procedure conftest is
14687 Text_IO.Put ("Hello World");
14692 if ( $cf_ada_make $ADAFLAGS \
14694 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
14695 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
14696 -XSOURCE_DIR=`pwd` \
14697 -XSONAME=libConfTest.so.1 \
14698 -XLIB_KIND=static 1>&5 2>&1 ) ; then
14699 cf_gnat_projects=yes
14703 if test -f conftest.lib/confpackage.ali
14705 cf_gnat_libraries=yes
14707 rm -rf conftest* *~conftest*
14712 echo "$as_me:14712: result: $cf_gnat_projects" >&5
14713 echo "${ECHO_T}$cf_gnat_projects" >&6
14714 fi # enable_gnat_projects
14716 if test $cf_gnat_projects = yes
14718 echo "$as_me:14718: checking if GNAT supports libraries" >&5
14719 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
14720 echo "$as_me:14720: result: $cf_gnat_libraries" >&5
14721 echo "${ECHO_T}$cf_gnat_libraries" >&6
14724 if test "$cf_gnat_projects" = yes
14726 USE_OLD_MAKERULES="#"
14727 USE_GNAT_PROJECTS=""
14729 USE_OLD_MAKERULES=""
14730 USE_GNAT_PROJECTS="#"
14733 if test "$cf_gnat_libraries" = yes
14735 USE_GNAT_LIBRARIES=""
14737 USE_GNAT_LIBRARIES="#"
14740 echo "$as_me:14740: checking for ada-compiler" >&5
14741 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
14743 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14744 if test "${with_ada_compiler+set}" = set; then
14745 withval="$with_ada_compiler"
14746 cf_ada_compiler=$withval
14748 cf_ada_compiler=gnatmake
14751 echo "$as_me:14751: result: $cf_ada_compiler" >&5
14752 echo "${ECHO_T}$cf_ada_compiler" >&6
14754 cf_ada_package=terminal_interface
14756 echo "$as_me:14756: checking for ada-include" >&5
14757 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
14759 # Check whether --with-ada-include or --without-ada-include was given.
14760 if test "${with_ada_include+set}" = set; then
14761 withval="$with_ada_include"
14764 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
14765 fi; if test -n "$prefix/share/ada/adainclude" ; then
14767 if test "x$prefix" != xNONE; then
14768 cf_path_syntax="$prefix"
14770 cf_path_syntax="$ac_default_prefix"
14773 case ".$withval" in
14774 (.\$\(*\)*|.\'*\'*)
14778 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14780 (.\${*prefix}*|.\${*dir}*)
14781 eval withval="$withval"
14782 case ".$withval" in
14784 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14789 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14792 { { echo "$as_me:14792: error: expected a pathname, not \"$withval\"" >&5
14793 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14794 { (exit 1); exit 1; }; }
14799 eval ADA_INCLUDE="$withval"
14801 echo "$as_me:14801: result: $ADA_INCLUDE" >&5
14802 echo "${ECHO_T}$ADA_INCLUDE" >&6
14804 echo "$as_me:14804: checking for ada-objects" >&5
14805 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
14807 # Check whether --with-ada-objects or --without-ada-objects was given.
14808 if test "${with_ada_objects+set}" = set; then
14809 withval="$with_ada_objects"
14812 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
14813 fi; if test -n "$prefix/lib/ada/adalib" ; then
14815 if test "x$prefix" != xNONE; then
14816 cf_path_syntax="$prefix"
14818 cf_path_syntax="$ac_default_prefix"
14821 case ".$withval" in
14822 (.\$\(*\)*|.\'*\'*)
14826 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14828 (.\${*prefix}*|.\${*dir}*)
14829 eval withval="$withval"
14830 case ".$withval" in
14832 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14837 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14840 { { echo "$as_me:14840: error: expected a pathname, not \"$withval\"" >&5
14841 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14842 { (exit 1); exit 1; }; }
14847 eval ADA_OBJECTS="$withval"
14849 echo "$as_me:14849: result: $ADA_OBJECTS" >&5
14850 echo "${ECHO_T}$ADA_OBJECTS" >&6
14852 echo "$as_me:14852: checking if an Ada95 shared-library should be built" >&5
14853 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
14855 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
14856 if test "${with_ada_sharedlib+set}" = set; then
14857 withval="$with_ada_sharedlib"
14858 with_ada_sharedlib=$withval
14860 with_ada_sharedlib=no
14862 echo "$as_me:14862: result: $with_ada_sharedlib" >&5
14863 echo "${ECHO_T}$with_ada_sharedlib" >&6
14865 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
14866 MAKE_ADA_SHAREDLIB="#"
14868 if test "x$with_ada_sharedlib" != xno
14870 MAKE_ADA_SHAREDLIB=
14871 if test "x$with_ada_sharedlib" != xyes
14873 ADA_SHAREDLIB="$with_ada_sharedlib"
14878 { { echo "$as_me:14878: error: No usable Ada compiler found" >&5
14879 echo "$as_me: error: No usable Ada compiler found" >&2;}
14880 { (exit 1); exit 1; }; }
14883 { { echo "$as_me:14883: error: The Ada compiler is needed for this package" >&5
14884 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
14885 { (exit 1); exit 1; }; }
14888 ################################################################################
14895 ### Construct the list of include-directories to be generated
14897 if test "$srcdir" != "."; then
14898 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
14900 CPPFLAGS="-I../include $CPPFLAGS"
14901 if test "$srcdir" != "."; then
14902 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
14904 CPPFLAGS="-I. $CPPFLAGS"
14906 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
14907 if test "$srcdir" != "."; then
14908 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
14910 if test "$GCC" != yes; then
14911 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14912 elif test "$includedir" != "/usr/include"; then
14913 if test "$includedir" = '${prefix}/include' ; then
14914 if test x$prefix != x/usr ; then
14915 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14918 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
14922 ### Build up pieces for makefile rules
14923 echo "$as_me:14923: checking default library suffix" >&5
14924 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
14926 case $DFT_LWR_MODEL in
14927 (libtool) DFT_ARG_SUFFIX='' ;;
14928 (normal) DFT_ARG_SUFFIX='' ;;
14929 (debug) DFT_ARG_SUFFIX='_g' ;;
14930 (profile) DFT_ARG_SUFFIX='_p' ;;
14931 (shared) DFT_ARG_SUFFIX='' ;;
14933 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
14934 echo "$as_me:14934: result: $DFT_ARG_SUFFIX" >&5
14935 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
14937 echo "$as_me:14937: checking default library-dependency suffix" >&5
14938 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
14940 case X$DFT_LWR_MODEL in
14942 DFT_LIB_SUFFIX='.la'
14943 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14946 DFT_LIB_SUFFIX='_g.a'
14947 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14950 DFT_LIB_SUFFIX='_p.a'
14951 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14954 case $cf_cv_system_name in
14956 DFT_LIB_SUFFIX='.so'
14957 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14959 (cygwin*|msys*|mingw*)
14960 DFT_LIB_SUFFIX='.dll'
14961 DFT_DEP_SUFFIX='.dll.a'
14964 DFT_LIB_SUFFIX='.dylib'
14965 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14970 DFT_LIB_SUFFIX='.so'
14971 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14974 DFT_LIB_SUFFIX='.sl'
14975 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14980 DFT_LIB_SUFFIX='.so'
14981 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14986 DFT_LIB_SUFFIX='.a'
14987 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
14990 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
14992 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
14993 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
14995 echo "$as_me:14995: result: $DFT_DEP_SUFFIX" >&5
14996 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
14998 echo "$as_me:14998: checking default object directory" >&5
14999 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15001 case $DFT_LWR_MODEL in
15002 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
15003 (normal) DFT_OBJ_SUBDIR='objects' ;;
15004 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
15005 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
15007 case $cf_cv_system_name in
15009 DFT_OBJ_SUBDIR='objects' ;;
15011 DFT_OBJ_SUBDIR='obj_s' ;;
15014 echo "$as_me:15014: result: $DFT_OBJ_SUBDIR" >&5
15015 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15017 ### Set up low-level terminfo dependencies for makefiles.
15019 if test "$DFT_LWR_MODEL" = shared ; then
15020 case $cf_cv_system_name in
15022 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
15025 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
15030 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
15032 ### Construct the list of subdirectories for which we'll customize makefiles
15033 ### with the appropriate compile-rules.
15035 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
15037 cat >>confdefs.h <<EOF
15038 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
15041 ### Now that we're done running tests, add the compiler-warnings, if any
15046 cf_new_extra_cppflags=
15048 for cf_add_cflags in $EXTRA_CFLAGS
15050 case $cf_fix_cppflags in
15052 case $cf_add_cflags in
15053 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15054 case $cf_add_cflags in
15056 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15059 && test -z "${cf_tst_cflags}" \
15060 && cf_fix_cppflags=yes
15062 if test $cf_fix_cppflags = yes ; then
15064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15068 elif test "${cf_tst_cflags}" = "\"'" ; then
15070 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15071 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15077 case "$CPPFLAGS" in
15081 case $cf_add_cflags in
15083 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15085 CPPFLAGS=`echo "$CPPFLAGS" | \
15086 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15087 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15092 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15093 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15100 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15101 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15108 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15109 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15111 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15113 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15114 && test -z "${cf_tst_cflags}" \
15115 && cf_fix_cppflags=no
15120 if test -n "$cf_new_cflags" ; then
15122 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15123 CFLAGS="${CFLAGS}$cf_new_cflags"
15127 if test -n "$cf_new_cppflags" ; then
15129 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15130 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15134 if test -n "$cf_new_extra_cppflags" ; then
15136 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15137 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15141 ################################################################################
15147 NCURSES_SHLIB2="sh -c"
15149 ADA_SUBDIRS="include gen src doc"
15150 if test "x$cf_with_tests" != "xno" ; then
15151 ADA_SUBDIRS="$ADA_SUBDIRS samples"
15153 for cf_dir in $ADA_SUBDIRS
15155 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15162 # match layout used by make-tar.sh
15163 ADAHTML_DIR=../doc/ada
15165 if test "x$cross_compiling" = xyes ; then
15166 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
15168 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
15171 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
15172 ac_config_commands="$ac_config_commands default"
15173 cat >confcache <<\_ACEOF
15174 # This file is a shell script that caches the results of configure
15175 # tests run on this system so they can be shared between configure
15176 # scripts and configure runs, see configure's option --config-cache.
15177 # It is not useful on other systems. If it contains results you don't
15178 # want to keep, you may remove or edit it.
15180 # config.status only pays attention to the cache file if you give it
15181 # the --recheck option to rerun configure.
15183 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15184 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15185 # following values.
15189 # The following way of writing the cache mishandles newlines in values,
15190 # but we know of no workaround that is simple, portable, and efficient.
15191 # So, don't put newlines in cache variables' values.
15192 # Ultrix sh set writes to stderr and can't be redirected directly,
15193 # and sets the high bit in the cache file unless we assign to the vars.
15196 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15198 # `set' does not quote correctly, so add quotes (double-quote
15199 # substitution turns \\\\ into \\, and sed turns \\ into \).
15202 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15205 # `set' quotes correctly as required by POSIX, so do not add quotes.
15207 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15214 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15216 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15218 if cmp -s $cache_file confcache; then :; else
15219 if test -w $cache_file; then
15220 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15221 cat confcache >$cache_file
15223 echo "not updating unwritable cache $cache_file"
15228 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15229 # Let make expand exec_prefix.
15230 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15232 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15233 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15234 # trailing colons and then remove the whole line if VPATH becomes empty
15235 # (actually we leave an empty line to preserve line numbers).
15236 if test "x$srcdir" = x.; then
15237 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15238 s/:*\$(srcdir):*/:/;
15239 s/:*\${srcdir}:*/:/;
15241 s/^\([^=]*=[ ]*\):*/\1/;
15247 DEFS=-DHAVE_CONFIG_H
15249 : ${CONFIG_STATUS=./config.status}
15250 ac_clean_files_save=$ac_clean_files
15251 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15252 { echo "$as_me:15252: creating $CONFIG_STATUS" >&5
15253 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15254 cat >$CONFIG_STATUS <<_ACEOF
15256 # Generated automatically by configure.
15257 # Run this file to recreate the current configuration.
15258 # Compiler output produced by configure, useful for debugging
15259 # configure, is in config.log if it exists.
15262 SHELL=\${CONFIG_SHELL-$SHELL}
15263 ac_cs_invocation="\$0 \$@"
15267 cat >>$CONFIG_STATUS <<\_ACEOF
15268 # Be Bourne compatible
15269 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15272 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15276 # Name of the executable.
15277 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15279 if expr a : '\(a\)' >/dev/null 2>&1; then
15285 rm -f conf$$ conf$$.exe conf$$.file
15287 if ln -s conf$$.file conf$$ 2>/dev/null; then
15288 # We could just check for DJGPP; but this test a) works b) is more generic
15289 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15290 if test -f conf$$.exe; then
15291 # Don't use ln at all; we don't have any links
15296 elif ln conf$$.file conf$$ 2>/dev/null; then
15301 rm -f conf$$ conf$$.exe conf$$.file
15303 as_executable_p="test -f"
15305 # Support unset when possible.
15306 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15313 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15314 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15315 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15316 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15317 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15318 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15319 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15320 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15323 # We need space, tab and new line, in precisely that order.
15329 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15335 # Files that config.status was made for.
15336 if test -n "$ac_config_files"; then
15337 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15340 if test -n "$ac_config_headers"; then
15341 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15344 if test -n "$ac_config_links"; then
15345 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15348 if test -n "$ac_config_commands"; then
15349 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15352 cat >>$CONFIG_STATUS <<\EOF
15355 \`$as_me' instantiates files from templates according to the
15356 current configuration.
15358 Usage: $0 [OPTIONS] [FILE]...
15360 -h, --help print this help, then exit
15361 -V, --version print version number, then exit
15362 -d, --debug don't remove temporary files
15363 --recheck update $as_me by reconfiguring in the same conditions
15364 --file=FILE[:TEMPLATE]
15365 instantiate the configuration file FILE
15366 --header=FILE[:TEMPLATE]
15367 instantiate the configuration header FILE
15369 Configuration files:
15372 Configuration headers:
15375 Configuration commands:
15378 Report bugs to <dickey@invisible-island.net>."
15381 cat >>$CONFIG_STATUS <<EOF
15384 configured by $0, generated by GNU Autoconf 2.52.20170501,
15385 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15387 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15388 Free Software Foundation, Inc.
15389 This config.status script is free software; the Free Software Foundation
15390 gives unlimited permission to copy, distribute and modify it."
15395 cat >>$CONFIG_STATUS <<\EOF
15396 # If no file are specified by the user, then we need to provide default
15397 # value. By we need to know if files were specified by the user.
15403 ac_option=`expr "x$1" : 'x\([^=]*\)='`
15404 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15406 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15410 *) # This is not an option, so the user has probably given explicit
15412 ac_need_defaults=false;;
15416 # Handling of the options.
15418 cat >>$CONFIG_STATUS <<EOF
15419 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15420 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15421 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15423 cat >>$CONFIG_STATUS <<\EOF
15424 --version | --vers* | -V )
15425 echo "$ac_cs_version"; exit 0 ;;
15427 # Conflict between --help and --header
15428 { { echo "$as_me:15428: error: ambiguous option: $1
15429 Try \`$0 --help' for more information." >&5
15430 echo "$as_me: error: ambiguous option: $1
15431 Try \`$0 --help' for more information." >&2;}
15432 { (exit 1); exit 1; }; };;
15433 --help | --hel | -h )
15434 echo "$ac_cs_usage"; exit 0 ;;
15435 --debug | --d* | -d )
15437 --file | --fil | --fi | --f )
15439 CONFIG_FILES="$CONFIG_FILES $1"
15440 ac_need_defaults=false;;
15441 --header | --heade | --head | --hea )
15443 CONFIG_HEADERS="$CONFIG_HEADERS $1"
15444 ac_need_defaults=false;;
15446 # This is an error.
15447 -*) { { echo "$as_me:15447: error: unrecognized option: $1
15448 Try \`$0 --help' for more information." >&5
15449 echo "$as_me: error: unrecognized option: $1
15450 Try \`$0 --help' for more information." >&2;}
15451 { (exit 1); exit 1; }; } ;;
15453 *) ac_config_targets="$ac_config_targets $1" ;;
15462 ## ----------------------- ##
15463 ## Running config.status. ##
15464 ## ----------------------- ##
15466 This file was extended by $as_me 2.52.20170501, executed with
15467 CONFIG_FILES = $CONFIG_FILES
15468 CONFIG_HEADERS = $CONFIG_HEADERS
15469 CONFIG_LINKS = $CONFIG_LINKS
15470 CONFIG_COMMANDS = $CONFIG_COMMANDS
15471 > $ac_cs_invocation
15472 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15477 cat >>$CONFIG_STATUS <<EOF
15479 # INIT-COMMANDS section.
15482 ### Special initialization commands, used to pass information from the
15483 ### configuration-run into config.status
15486 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15487 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15488 LIB_NAME="$LIB_NAME"
15489 LIB_PREFIX="$LIB_PREFIX"
15490 LIB_SUFFIX="$LIB_SUFFIX"
15492 NCURSES_MAJOR="$NCURSES_MAJOR"
15493 NCURSES_MINOR="$NCURSES_MINOR"
15494 NCURSES_PATCH="$NCURSES_PATCH"
15495 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
15496 cf_cv_abi_version="$cf_cv_abi_version"
15497 cf_cv_rel_version="$cf_cv_rel_version"
15498 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15499 cf_cv_shared_soname='$cf_cv_shared_soname'
15500 cf_cv_shlib_version="$cf_cv_shlib_version"
15501 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15502 cf_cv_system_name="$cf_cv_system_name"
15508 cat >>$CONFIG_STATUS <<\EOF
15509 for ac_config_target in $ac_config_targets
15511 case "$ac_config_target" in
15512 # Handling of arguments.
15513 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15514 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
15515 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15516 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15517 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15518 *) { { echo "$as_me:15518: error: invalid argument: $ac_config_target" >&5
15519 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15520 { (exit 1); exit 1; }; };;
15524 # If the user did not use the arguments to specify the items to instantiate,
15525 # then the envvar interface is used. Set only those that are not.
15526 # We use the long form for the default assignment because of an extremely
15527 # bizarre bug on SunOS 4.1.3.
15528 if $ac_need_defaults; then
15529 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15530 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15531 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15534 # Create a temporary directory, and hook for its removal unless debugging.
15537 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15538 trap '{ (exit 1); exit 1; }' 1 2 13 15
15541 # Create a (secure) tmp directory for tmp files.
15544 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15545 test -n "$tmp" && test -d "$tmp"
15548 tmp=$TMPDIR/cs$$-$RANDOM
15549 (umask 077 && mkdir $tmp)
15552 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15553 { (exit 1); exit 1; }
15558 cat >>$CONFIG_STATUS <<EOF
15561 # CONFIG_FILES section.
15564 # No need to generate the scripts if there are no CONFIG_FILES.
15565 # This happens for instance when ./config.status config.h
15566 if test -n "\$CONFIG_FILES"; then
15567 # Protect against being on the right side of a sed subst in config.status.
15568 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15569 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15570 s,@SHELL@,$SHELL,;t t
15571 s,@exec_prefix@,$exec_prefix,;t t
15572 s,@prefix@,$prefix,;t t
15573 s,@program_transform_name@,$program_transform_name,;t t
15574 s,@bindir@,$bindir,;t t
15575 s,@sbindir@,$sbindir,;t t
15576 s,@libexecdir@,$libexecdir,;t t
15577 s,@datarootdir@,$datarootdir,;t t
15578 s,@datadir@,$datadir,;t t
15579 s,@sysconfdir@,$sysconfdir,;t t
15580 s,@sharedstatedir@,$sharedstatedir,;t t
15581 s,@localstatedir@,$localstatedir,;t t
15582 s,@libdir@,$libdir,;t t
15583 s,@includedir@,$includedir,;t t
15584 s,@oldincludedir@,$oldincludedir,;t t
15585 s,@infodir@,$infodir,;t t
15586 s,@mandir@,$mandir,;t t
15587 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15588 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15589 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15590 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15591 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15592 s,@build_alias@,$build_alias,;t t
15593 s,@host_alias@,$host_alias,;t t
15594 s,@target_alias@,$target_alias,;t t
15595 s,@ECHO_C@,$ECHO_C,;t t
15596 s,@ECHO_N@,$ECHO_N,;t t
15597 s,@ECHO_T@,$ECHO_T,;t t
15598 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15599 s,@DEFS@,$DEFS,;t t
15600 s,@LIBS@,$LIBS,;t t
15601 s,@top_builddir@,$top_builddir,;t t
15602 s,@build@,$build,;t t
15603 s,@build_cpu@,$build_cpu,;t t
15604 s,@build_vendor@,$build_vendor,;t t
15605 s,@build_os@,$build_os,;t t
15606 s,@host@,$host,;t t
15607 s,@host_cpu@,$host_cpu,;t t
15608 s,@host_vendor@,$host_vendor,;t t
15609 s,@host_os@,$host_os,;t t
15610 s,@target@,$target,;t t
15611 s,@target_cpu@,$target_cpu,;t t
15612 s,@target_vendor@,$target_vendor,;t t
15613 s,@target_os@,$target_os,;t t
15615 s,@CFLAGS@,$CFLAGS,;t t
15616 s,@LDFLAGS@,$LDFLAGS,;t t
15617 s,@CPPFLAGS@,$CPPFLAGS,;t t
15618 s,@ac_ct_CC@,$ac_ct_CC,;t t
15619 s,@EXEEXT@,$EXEEXT,;t t
15620 s,@OBJEXT@,$OBJEXT,;t t
15621 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15624 s,@EGREP@,$EGREP,;t t
15625 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15626 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15627 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15628 s,@LN_S@,$LN_S,;t t
15629 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
15630 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
15631 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
15632 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
15633 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
15634 s,@SET_MAKE@,$SET_MAKE,;t t
15635 s,@CTAGS@,$CTAGS,;t t
15636 s,@ETAGS@,$ETAGS,;t t
15637 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15638 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15639 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15640 s,@RANLIB@,$RANLIB,;t t
15641 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15643 s,@ac_ct_LD@,$ac_ct_LD,;t t
15645 s,@ac_ct_AR@,$ac_ct_AR,;t t
15646 s,@ARFLAGS@,$ARFLAGS,;t t
15647 s,@DESTDIR@,$DESTDIR,;t t
15648 s,@BUILD_CC@,$BUILD_CC,;t t
15649 s,@BUILD_CPP@,$BUILD_CPP,;t t
15650 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15651 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15652 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15653 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15654 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15655 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15656 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15657 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15658 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
15659 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
15660 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15661 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15662 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15663 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15664 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15665 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15666 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15667 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15668 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15669 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15670 s,@CC_G_OPT@,$CC_G_OPT,;t t
15671 s,@LD_MODEL@,$LD_MODEL,;t t
15672 s,@shlibdir@,$shlibdir,;t t
15673 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
15674 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15675 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
15676 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15677 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15678 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
15679 s,@LINK_PROGS@,$LINK_PROGS,;t t
15680 s,@LINK_TESTS@,$LINK_TESTS,;t t
15681 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15682 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15683 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15684 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15685 s,@RPATH_LIST@,$RPATH_LIST,;t t
15686 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15687 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15688 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15689 s,@PTHREAD@,$PTHREAD,;t t
15690 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
15691 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
15692 s,@ECHO_LT@,$ECHO_LT,;t t
15693 s,@ECHO_LD@,$ECHO_LD,;t t
15694 s,@RULE_CC@,$RULE_CC,;t t
15695 s,@SHOW_CC@,$SHOW_CC,;t t
15696 s,@ECHO_CC@,$ECHO_CC,;t t
15697 s,@ADAFLAGS@,$ADAFLAGS,;t t
15698 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15699 s,@ADA_TRACE@,$ADA_TRACE,;t t
15700 s,@gnatmake_exists@,$gnatmake_exists,;t t
15701 s,@gprconfig_exists@,$gprconfig_exists,;t t
15702 s,@M4_exists@,$M4_exists,;t t
15703 s,@cf_ada_make@,$cf_ada_make,;t t
15704 s,@cf_ada_config@,$cf_ada_config,;t t
15705 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
15706 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
15707 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
15708 s,@cf_compile_generics@,$cf_compile_generics,;t t
15709 s,@cf_generic_objects@,$cf_generic_objects,;t t
15710 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
15711 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
15712 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
15713 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
15714 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
15715 s,@cf_ada_package@,$cf_ada_package,;t t
15716 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
15717 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
15718 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
15719 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
15720 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
15721 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
15722 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
15723 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
15724 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
15725 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
15726 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
15727 s,@TEST_ARG2@,$TEST_ARG2,;t t
15728 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
15729 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
15730 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
15731 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
15732 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
15733 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
15734 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
15739 cat >>$CONFIG_STATUS <<\EOF
15740 # Split the substitutions into bite-sized pieces for seds with
15741 # small command number limits, like on Digital OSF/1 and HP-UX.
15742 ac_max_sed_lines=48
15743 ac_sed_frag=1 # Number of current file.
15744 ac_beg=1 # First line for current file.
15745 ac_end=$ac_max_sed_lines # Line after last line for current file.
15748 while $ac_more_lines; do
15749 if test $ac_beg -gt 1; then
15750 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15752 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
15754 if test ! -s $tmp/subs.frag; then
15755 ac_more_lines=false
15757 # The purpose of the label and of the branching condition is to
15758 # speed up the sed processing (if there are no `@' at all, there
15759 # is no need to browse any of the substitutions).
15760 # These are the two extra sed commands mentioned above.
15762 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
15763 # It is possible to make a multiline substitution using escaped newlines.
15764 # Ensure that we do not split the substitution between script fragments.
15766 ac_END=`expr $ac_end + $ac_max_sed_lines`
15767 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
15768 if test -s $tmp/subs.next; then
15769 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
15770 if test ! -s $tmp/subs.edit; then
15771 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
15772 if test ! -s $tmp/subs.edit; then
15773 if test $ac_beg -gt 1; then
15774 ac_end=`expr $ac_end - 1`
15781 if test -z "$ac_sed_cmds"; then
15782 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
15784 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
15786 ac_sed_frag=`expr $ac_sed_frag + 1`
15788 ac_end=`expr $ac_end + $ac_max_sed_lines`
15791 if test -z "$ac_sed_cmds"; then
15794 fi # test -n "$CONFIG_FILES"
15797 cat >>$CONFIG_STATUS <<\EOF
15798 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
15799 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15801 - | *:- | *:-:* ) # input from stdin
15803 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15804 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15805 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
15806 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
15807 * ) ac_file_in=$ac_file.in ;;
15810 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
15811 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15812 X"$ac_file" : 'X\(//\)[^/]' \| \
15813 X"$ac_file" : 'X\(//\)$' \| \
15814 X"$ac_file" : 'X\(/\)' \| \
15815 . : '\(.\)' 2>/dev/null ||
15817 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
15818 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
15819 /^X\(\/\/\)$/{ s//\1/; q; }
15820 /^X\(\/\).*/{ s//\1/; q; }
15822 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15823 { case "$ac_dir" in
15824 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
15828 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
15829 case $as_mkdir_dir in
15830 # Skip DOS drivespec
15831 ?:) as_incr_dir=$as_mkdir_dir ;;
15833 as_incr_dir=$as_incr_dir/$as_mkdir_dir
15834 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
15839 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
15840 # A "../" for each directory in $ac_dir_suffix.
15841 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
15843 ac_dir_suffix= ac_dots=
15848 if test -z "$ac_dots"; then
15851 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
15853 [\\/]* | ?:[\\/]* )
15854 ac_srcdir=$srcdir$ac_dir_suffix;
15855 ac_top_srcdir=$srcdir ;;
15856 *) # Relative path.
15857 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
15858 ac_top_srcdir=$ac_dots$srcdir ;;
15862 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15863 *) ac_INSTALL=$ac_dots$INSTALL ;;
15866 if test x"$ac_file" != x-; then
15867 { echo "$as_me:15867: creating $ac_file" >&5
15868 echo "$as_me: creating $ac_file" >&6;}
15871 # Let's still pretend it is `configure' which instantiates (i.e., don't
15872 # use $as_me), people would be surprised to read:
15873 # /* config.h. Generated automatically by config.status. */
15874 configure_input="Generated automatically from `echo $ac_file_in |
15875 sed 's,.*/,,'` by configure."
15877 # First look for the input files in the build tree, otherwise in the
15879 ac_file_inputs=`IFS=:
15880 for f in $ac_file_in; do
15882 -) echo $tmp/stdin ;;
15884 # Absolute (can't be DOS-style, as IFS=:)
15885 test -f "$f" || { { echo "$as_me:15885: error: cannot find input file: $f" >&5
15886 echo "$as_me: error: cannot find input file: $f" >&2;}
15887 { (exit 1); exit 1; }; }
15890 if test -f "$f"; then
15893 elif test -f "$srcdir/$f"; then
15898 { { echo "$as_me:15898: error: cannot find input file: $f" >&5
15899 echo "$as_me: error: cannot find input file: $f" >&2;}
15900 { (exit 1); exit 1; }; }
15903 done` || { (exit 1); exit 1; }
15905 cat >>$CONFIG_STATUS <<\EOF
15906 ac_warn_datarootdir=no
15907 if test x"$ac_file" != x-; then
15908 for ac_item in $ac_file_inputs
15910 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
15911 if test -n "$ac_seen"; then
15912 ac_used=`grep '@datarootdir@' $ac_item`
15913 if test -z "$ac_used"; then
15914 { echo "$as_me:15914: WARNING: datarootdir was used implicitly but not set:
15916 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
15918 ac_warn_datarootdir=yes
15921 ac_seen=`grep '${datarootdir}' $ac_item`
15922 if test -n "$ac_seen"; then
15923 { echo "$as_me:15923: WARNING: datarootdir was used explicitly but not set:
15925 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
15927 ac_warn_datarootdir=yes
15932 if test "x$ac_warn_datarootdir" = xyes; then
15933 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
15937 cat >>$CONFIG_STATUS <<EOF
15941 cat >>$CONFIG_STATUS <<\EOF
15943 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15944 s,@configure_input@,$configure_input,;t t
15945 s,@srcdir@,$ac_srcdir,;t t
15946 s,@top_srcdir@,$ac_top_srcdir,;t t
15947 s,@INSTALL@,$ac_INSTALL,;t t
15948 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
15950 if test x"$ac_file" != x-; then
15951 cp $tmp/out $ac_file
15953 for ac_name in prefix exec_prefix datarootdir
15955 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
15956 if test -n "$ac_seen"; then
15957 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
15958 if test -z "$ac_init"; then
15959 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
15960 { echo "$as_me:15960: WARNING: Variable $ac_name is used but was not set:
15962 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
15967 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
15968 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
15969 if test -s $tmp/out; then
15970 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
15971 { echo "$as_me:15971: WARNING: Some variables may not be substituted:
15973 echo "$as_me: WARNING: Some variables may not be substituted:
15983 cat >>$CONFIG_STATUS <<\EOF
15986 # CONFIG_HEADER section.
15989 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15990 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15992 # ac_d sets the value in "#define NAME VALUE" lines.
15993 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
15994 ac_dB='[ ].*$,\1#\2'
15997 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15998 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
15999 ac_iB='\([ ]\),\1#\2define\3'
16002 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16003 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16004 ac_uB='$,\1#\2define\3'
16008 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16009 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16011 - | *:- | *:-:* ) # input from stdin
16013 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16014 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16015 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16016 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16017 * ) ac_file_in=$ac_file.in ;;
16020 test x"$ac_file" != x- && { echo "$as_me:16020: creating $ac_file" >&5
16021 echo "$as_me: creating $ac_file" >&6;}
16023 # First look for the input files in the build tree, otherwise in the
16025 ac_file_inputs=`IFS=:
16026 for f in $ac_file_in; do
16028 -) echo $tmp/stdin ;;
16030 # Absolute (can't be DOS-style, as IFS=:)
16031 test -f "$f" || { { echo "$as_me:16031: error: cannot find input file: $f" >&5
16032 echo "$as_me: error: cannot find input file: $f" >&2;}
16033 { (exit 1); exit 1; }; }
16036 if test -f "$f"; then
16039 elif test -f "$srcdir/$f"; then
16044 { { echo "$as_me:16044: error: cannot find input file: $f" >&5
16045 echo "$as_me: error: cannot find input file: $f" >&2;}
16046 { (exit 1); exit 1; }; }
16049 done` || { (exit 1); exit 1; }
16050 # Remove the trailing spaces.
16051 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
16055 # Transform confdefs.h into a list of #define's. We won't use it as a sed
16056 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
16057 # be either 'cat' or 'sort'.
16058 cat confdefs.h | uniq >conftest.vals
16060 # Break up conftest.vals because some shells have a limit on
16061 # the size of here documents, and old seds have small limits too.
16063 rm -f conftest.tail
16064 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
16065 while grep . conftest.vals >/dev/null
16067 # Write chunks of a limited-size here document to conftest.frag.
16068 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16069 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16070 echo 'CEOF' >> $CONFIG_STATUS
16071 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16072 rm -f conftest.vals
16073 mv conftest.tail conftest.vals
16075 rm -f conftest.vals
16077 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16079 echo ' cat >> conftest.edit <<CEOF
16080 /@DEFS@/r conftest.frag
16083 sed -f conftest.edit $tmp/in > $tmp/out
16085 mv $tmp/out $tmp/in
16086 rm -f conftest.edit conftest.frag
16087 ' >> $CONFIG_STATUS
16089 cat >>$CONFIG_STATUS <<\EOF
16090 # Let's still pretend it is `configure' which instantiates (i.e., don't
16091 # use $as_me), people would be surprised to read:
16092 # /* config.h. Generated automatically by config.status. */
16093 if test x"$ac_file" = x-; then
16094 echo "/* Generated automatically by configure. */" >$tmp/config.h
16096 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
16098 cat $tmp/in >>$tmp/config.h
16100 if test x"$ac_file" != x-; then
16101 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16102 { echo "$as_me:16102: $ac_file is unchanged" >&5
16103 echo "$as_me: $ac_file is unchanged" >&6;}
16105 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16106 X"$ac_file" : 'X\(//\)[^/]' \| \
16107 X"$ac_file" : 'X\(//\)$' \| \
16108 X"$ac_file" : 'X\(/\)' \| \
16109 . : '\(.\)' 2>/dev/null ||
16111 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16112 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16113 /^X\(\/\/\)$/{ s//\1/; q; }
16114 /^X\(\/\).*/{ s//\1/; q; }
16116 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16117 { case "$ac_dir" in
16118 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16122 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16123 case $as_mkdir_dir in
16124 # Skip DOS drivespec
16125 ?:) as_incr_dir=$as_mkdir_dir ;;
16127 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16128 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16135 mv $tmp/config.h $ac_file
16139 rm -f $tmp/config.h
16143 cat >>$CONFIG_STATUS <<\EOF
16145 # CONFIG_COMMANDS section.
16147 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16148 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16149 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16153 if test -z "$USE_OLD_MAKERULES" ; then
16154 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
16161 cat >>$CONFIG_STATUS <<\EOF
16163 { (exit 0); exit 0; }
16165 chmod +x $CONFIG_STATUS
16166 ac_clean_files=$ac_clean_files_save
16168 # configure is writing to config.log, and then calls config.status.
16169 # config.status does its own redirection, appending to config.log.
16170 # Unfortunately, on DOS this fails, as config.log is still kept open
16171 # by configure, so config.status won't be able to write to it; its
16172 # output is simply discarded. So we exec the FD to /dev/null,
16173 # effectively closing config.log, so it can be properly (re)opened and
16174 # appended to by config.status. When coming back to configure, we
16175 # need to make the FD available again.
16176 if test "$no_create" != yes; then
16179 $SHELL $CONFIG_STATUS || ac_cs_success=false
16181 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16182 # would make configure fail if this is the last instruction.
16183 $ac_cs_success || { (exit 1); exit 1; }
16185 ${MAKE:-make} preinstall