2 # From configure.in Revision: 1.66 .
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 (debug info) 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 \$CFLAGS variable" >&5
1834 echo $ECHO_N "checking \$CFLAGS 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 uses the CFLAGS variable to hold CPPFLAGS options" >&5
1840 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
1843 for cf_arg in $cf_flags
1849 cf_new_extra_cppflags=
1851 for cf_add_cflags in $cf_arg
1853 case $cf_fix_cppflags in
1855 case $cf_add_cflags in
1856 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1857 case $cf_add_cflags in
1859 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1861 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1862 && test -z "${cf_tst_cflags}" \
1863 && cf_fix_cppflags=yes
1865 if test $cf_fix_cppflags = yes ; then
1867 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1868 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1871 elif test "${cf_tst_cflags}" = "\"'" ; then
1873 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1874 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1884 case $cf_add_cflags in
1886 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1888 CPPFLAGS=`echo "$CPPFLAGS" | \
1889 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1890 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1895 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
1896 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
1903 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
1904 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
1911 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1912 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1914 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1916 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1917 && test -z "${cf_tst_cflags}" \
1918 && cf_fix_cppflags=no
1923 if test -n "$cf_new_cflags" ; then
1925 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1926 CFLAGS="${CFLAGS}$cf_new_cflags"
1930 if test -n "$cf_new_cppflags" ; then
1932 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
1933 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
1937 if test -n "$cf_new_extra_cppflags" ; then
1939 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
1940 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
1947 echo "$as_me:1947: result: ok" >&5
1948 echo "${ECHO_T}ok" >&6
1952 echo "$as_me:1952: checking \$CC variable" >&5
1953 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
1956 echo "$as_me:1956: result: broken" >&5
1957 echo "${ECHO_T}broken" >&6
1958 { echo "$as_me:1958: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
1959 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
1961 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
1962 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
1964 for cf_arg in $cf_flags
1972 cf_new_extra_cppflags=
1974 for cf_add_cflags in $cf_arg
1976 case $cf_fix_cppflags in
1978 case $cf_add_cflags in
1979 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
1980 case $cf_add_cflags in
1982 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1984 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
1985 && test -z "${cf_tst_cflags}" \
1986 && cf_fix_cppflags=yes
1988 if test $cf_fix_cppflags = yes ; then
1990 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1991 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
1994 elif test "${cf_tst_cflags}" = "\"'" ; then
1996 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
1997 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2007 case $cf_add_cflags in
2009 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2011 CPPFLAGS=`echo "$CPPFLAGS" | \
2012 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2013 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2018 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2019 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2026 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2027 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2034 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2035 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2037 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2039 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2040 && test -z "${cf_tst_cflags}" \
2041 && cf_fix_cppflags=no
2046 if test -n "$cf_new_cflags" ; then
2048 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2049 CFLAGS="${CFLAGS}$cf_new_cflags"
2053 if test -n "$cf_new_cppflags" ; then
2055 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2056 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2060 if test -n "$cf_new_extra_cppflags" ; then
2062 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2063 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2073 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2075 echo "${as_me:-configure}:2075: testing resulting CC: '$CC' ..." 1>&5
2077 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2079 echo "${as_me:-configure}:2079: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2081 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2083 echo "${as_me:-configure}:2083: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2087 echo "$as_me:2087: result: ok" >&5
2088 echo "${ECHO_T}ok" >&6
2093 ac_cpp='$CPP $CPPFLAGS'
2094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2097 ac_main_return=return
2098 echo "$as_me:2098: checking how to run the C preprocessor" >&5
2099 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2100 # On Suns, sometimes $CPP names a directory.
2101 if test -n "$CPP" && test -d "$CPP"; then
2104 if test -z "$CPP"; then
2105 if test "${ac_cv_prog_CPP+set}" = set; then
2106 echo $ECHO_N "(cached) $ECHO_C" >&6
2108 # Double quotes because CPP needs to be expanded
2109 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2112 for ac_c_preproc_warn_flag in '' yes
2114 # Use a header file that comes with gcc, so configuring glibc
2115 # with a fresh cross-compiler works.
2116 # On the NeXT, cc -E runs the code through the compiler's parser,
2117 # not just through cpp. "Syntax error" is here to catch this case.
2118 cat >conftest.$ac_ext <<_ACEOF
2119 #line 2119 "configure"
2120 #include "confdefs.h"
2124 if { (eval echo "$as_me:2124: \"$ac_cpp conftest.$ac_ext\"") >&5
2125 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2127 egrep -v '^ *\+' conftest.er1 >conftest.err
2129 cat conftest.err >&5
2130 echo "$as_me:2130: \$? = $ac_status" >&5
2131 (exit $ac_status); } >/dev/null; then
2132 if test -s conftest.err; then
2133 ac_cpp_err=$ac_c_preproc_warn_flag
2140 if test -z "$ac_cpp_err"; then
2143 echo "$as_me: failed program was:" >&5
2144 cat conftest.$ac_ext >&5
2145 # Broken: fails on valid input.
2148 rm -f conftest.err conftest.$ac_ext
2150 # OK, works on sane cases. Now check whether non-existent headers
2151 # can be detected and how.
2152 cat >conftest.$ac_ext <<_ACEOF
2153 #line 2153 "configure"
2154 #include "confdefs.h"
2155 #include <ac_nonexistent.h>
2157 if { (eval echo "$as_me:2157: \"$ac_cpp conftest.$ac_ext\"") >&5
2158 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2160 egrep -v '^ *\+' conftest.er1 >conftest.err
2162 cat conftest.err >&5
2163 echo "$as_me:2163: \$? = $ac_status" >&5
2164 (exit $ac_status); } >/dev/null; then
2165 if test -s conftest.err; then
2166 ac_cpp_err=$ac_c_preproc_warn_flag
2173 if test -z "$ac_cpp_err"; then
2174 # Broken: success on invalid input.
2177 echo "$as_me: failed program was:" >&5
2178 cat conftest.$ac_ext >&5
2179 # Passes both tests.
2183 rm -f conftest.err conftest.$ac_ext
2186 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2187 rm -f conftest.err conftest.$ac_ext
2188 if $ac_preproc_ok; then
2200 echo "$as_me:2200: result: $CPP" >&5
2201 echo "${ECHO_T}$CPP" >&6
2203 for ac_c_preproc_warn_flag in '' yes
2205 # Use a header file that comes with gcc, so configuring glibc
2206 # with a fresh cross-compiler works.
2207 # On the NeXT, cc -E runs the code through the compiler's parser,
2208 # not just through cpp. "Syntax error" is here to catch this case.
2209 cat >conftest.$ac_ext <<_ACEOF
2210 #line 2210 "configure"
2211 #include "confdefs.h"
2215 if { (eval echo "$as_me:2215: \"$ac_cpp conftest.$ac_ext\"") >&5
2216 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2218 egrep -v '^ *\+' conftest.er1 >conftest.err
2220 cat conftest.err >&5
2221 echo "$as_me:2221: \$? = $ac_status" >&5
2222 (exit $ac_status); } >/dev/null; then
2223 if test -s conftest.err; then
2224 ac_cpp_err=$ac_c_preproc_warn_flag
2231 if test -z "$ac_cpp_err"; then
2234 echo "$as_me: failed program was:" >&5
2235 cat conftest.$ac_ext >&5
2236 # Broken: fails on valid input.
2239 rm -f conftest.err conftest.$ac_ext
2241 # OK, works on sane cases. Now check whether non-existent headers
2242 # can be detected and how.
2243 cat >conftest.$ac_ext <<_ACEOF
2244 #line 2244 "configure"
2245 #include "confdefs.h"
2246 #include <ac_nonexistent.h>
2248 if { (eval echo "$as_me:2248: \"$ac_cpp conftest.$ac_ext\"") >&5
2249 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2251 egrep -v '^ *\+' conftest.er1 >conftest.err
2253 cat conftest.err >&5
2254 echo "$as_me:2254: \$? = $ac_status" >&5
2255 (exit $ac_status); } >/dev/null; then
2256 if test -s conftest.err; then
2257 ac_cpp_err=$ac_c_preproc_warn_flag
2264 if test -z "$ac_cpp_err"; then
2265 # Broken: success on invalid input.
2268 echo "$as_me: failed program was:" >&5
2269 cat conftest.$ac_ext >&5
2270 # Passes both tests.
2274 rm -f conftest.err conftest.$ac_ext
2277 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2278 rm -f conftest.err conftest.$ac_ext
2279 if $ac_preproc_ok; then
2282 { { echo "$as_me:2282: error: C preprocessor \"$CPP\" fails sanity check" >&5
2283 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2284 { (exit 1); exit 1; }; }
2288 ac_cpp='$CPP $CPPFLAGS'
2289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2292 ac_main_return=return
2294 if test $ac_cv_c_compiler_gnu = yes; then
2295 echo "$as_me:2295: checking whether $CC needs -traditional" >&5
2296 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2297 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2298 echo $ECHO_N "(cached) $ECHO_C" >&6
2300 ac_pattern="Autoconf.*'x'"
2301 cat >conftest.$ac_ext <<_ACEOF
2302 #line 2302 "configure"
2303 #include "confdefs.h"
2305 int Autoconf = TIOCGETP;
2307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2308 egrep "$ac_pattern" >/dev/null 2>&1; then
2309 ac_cv_prog_gcc_traditional=yes
2311 ac_cv_prog_gcc_traditional=no
2315 if test $ac_cv_prog_gcc_traditional = no; then
2316 cat >conftest.$ac_ext <<_ACEOF
2317 #line 2317 "configure"
2318 #include "confdefs.h"
2320 int Autoconf = TCGETA;
2322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2323 egrep "$ac_pattern" >/dev/null 2>&1; then
2324 ac_cv_prog_gcc_traditional=yes
2330 echo "$as_me:2330: result: $ac_cv_prog_gcc_traditional" >&5
2331 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2332 if test $ac_cv_prog_gcc_traditional = yes; then
2333 CC="$CC -traditional"
2337 echo "$as_me:2337: checking whether $CC understands -c and -o together" >&5
2338 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2339 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2340 echo $ECHO_N "(cached) $ECHO_C" >&6
2343 cat > conftest.$ac_ext <<CF_EOF
2346 ${cf_cv_main_return:-return}(0);
2349 # We do the test twice because some compilers refuse to overwrite an
2350 # existing .o file with -o, though they will create one.
2351 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2352 if { (eval echo "$as_me:2352: \"$ac_try\"") >&5
2355 echo "$as_me:2355: \$? = $ac_status" >&5
2356 (exit $ac_status); } &&
2357 test -f conftest2.$ac_objext && { (eval echo "$as_me:2357: \"$ac_try\"") >&5
2360 echo "$as_me:2360: \$? = $ac_status" >&5
2361 (exit $ac_status); };
2363 eval cf_cv_prog_CC_c_o=yes
2365 eval cf_cv_prog_CC_c_o=no
2370 if test $cf_cv_prog_CC_c_o = yes; then
2371 echo "$as_me:2371: result: yes" >&5
2372 echo "${ECHO_T}yes" >&6
2374 echo "$as_me:2374: result: no" >&5
2375 echo "${ECHO_T}no" >&6
2378 test "$program_prefix" != NONE &&
2379 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2380 # Use a double $ so make ignores it.
2381 test "$program_suffix" != NONE &&
2382 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2383 # Double any \ or $. echo might interpret backslashes.
2384 # By default was `s,x,x', remove it if useless.
2385 cat <<\_ACEOF >conftest.sed
2386 s/[\\$]/&&/g;s/;s,x,x,$//
2388 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2391 for ac_prog in mawk gawk nawk awk
2393 # Extract the first word of "$ac_prog", so it can be a program name with args.
2394 set dummy $ac_prog; ac_word=$2
2395 echo "$as_me:2395: checking for $ac_word" >&5
2396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2397 if test "${ac_cv_prog_AWK+set}" = set; then
2398 echo $ECHO_N "(cached) $ECHO_C" >&6
2400 if test -n "$AWK"; then
2401 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2403 ac_save_IFS=$IFS; IFS=$ac_path_separator
2405 for ac_dir in $ac_dummy; do
2407 test -z "$ac_dir" && ac_dir=.
2408 $as_executable_p "$ac_dir/$ac_word" || continue
2409 ac_cv_prog_AWK="$ac_prog"
2410 echo "$as_me:2410: found $ac_dir/$ac_word" >&5
2417 if test -n "$AWK"; then
2418 echo "$as_me:2418: result: $AWK" >&5
2419 echo "${ECHO_T}$AWK" >&6
2421 echo "$as_me:2421: result: no" >&5
2422 echo "${ECHO_T}no" >&6
2425 test -n "$AWK" && break
2428 test -z "$AWK" && { { echo "$as_me:2428: error: No awk program found" >&5
2429 echo "$as_me: error: No awk program found" >&2;}
2430 { (exit 1); exit 1; }; }
2432 echo "$as_me:2432: checking for egrep" >&5
2433 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2434 if test "${ac_cv_prog_egrep+set}" = set; then
2435 echo $ECHO_N "(cached) $ECHO_C" >&6
2437 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2438 then ac_cv_prog_egrep='grep -E'
2439 else ac_cv_prog_egrep='egrep'
2442 echo "$as_me:2442: result: $ac_cv_prog_egrep" >&5
2443 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2444 EGREP=$ac_cv_prog_egrep
2446 test -z "$EGREP" && { { echo "$as_me:2446: error: No egrep program found" >&5
2447 echo "$as_me: error: No egrep program found" >&2;}
2448 { (exit 1); exit 1; }; }
2450 # Find a good install program. We prefer a C program (faster),
2451 # so one script is as good as another. But avoid the broken or
2452 # incompatible versions:
2453 # SysV /etc/install, /usr/sbin/install
2454 # SunOS /usr/etc/install
2455 # IRIX /sbin/install
2457 # AmigaOS /C/install, which installs bootblocks on floppy discs
2458 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2459 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2460 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2461 # ./install, which can be erroneously created by make from ./install.sh.
2462 echo "$as_me:2462: checking for a BSD compatible install" >&5
2463 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2464 if test -z "$INSTALL"; then
2465 if test "${ac_cv_path_install+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
2468 ac_save_IFS=$IFS; IFS=$ac_path_separator
2469 for ac_dir in $PATH; do
2471 # Account for people who put trailing slashes in PATH elements.
2473 / | ./ | .// | /cC/* \
2474 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2477 # OSF1 and SCO ODT 3.0 have their own names for install.
2478 # Don't use installbsd from OSF since it installs stuff as root
2480 for ac_prog in ginstall scoinst install; do
2481 if $as_executable_p "$ac_dir/$ac_prog"; then
2482 if test $ac_prog = install &&
2483 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2484 # AIX install. It has an incompatible calling convention.
2486 elif test $ac_prog = install &&
2487 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2488 # program-specific install script used by HP pwplus--don't use.
2491 ac_cv_path_install="$ac_dir/$ac_prog -c"
2501 if test "${ac_cv_path_install+set}" = set; then
2502 INSTALL=$ac_cv_path_install
2504 # As a last resort, use the slow shell script. We don't cache a
2505 # path for INSTALL within a source directory, because that will
2506 # break other packages using the cache if that directory is
2507 # removed, or if the path is relative.
2508 INSTALL=$ac_install_sh
2511 echo "$as_me:2511: result: $INSTALL" >&5
2512 echo "${ECHO_T}$INSTALL" >&6
2514 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2515 # It thinks the first close brace ends the variable substitution.
2516 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2518 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2520 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2522 echo "$as_me:2522: checking whether ln -s works" >&5
2523 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2525 if test "$LN_S" = "ln -s"; then
2526 echo "$as_me:2526: result: yes" >&5
2527 echo "${ECHO_T}yes" >&6
2529 echo "$as_me:2529: result: no, using $LN_S" >&5
2530 echo "${ECHO_T}no, using $LN_S" >&6
2533 echo "$as_me:2533: checking if $LN_S -f options work" >&5
2534 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2536 rm -f conf$$.src conf$$dst
2538 echo first >conf$$.src
2539 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2544 rm -f conf$$.dst conf$$src
2545 echo "$as_me:2545: result: $cf_prog_ln_sf" >&5
2546 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2548 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2550 # Find a good install program. We prefer a C program (faster),
2551 # so one script is as good as another. But avoid the broken or
2552 # incompatible versions:
2553 # SysV /etc/install, /usr/sbin/install
2554 # SunOS /usr/etc/install
2555 # IRIX /sbin/install
2557 # AmigaOS /C/install, which installs bootblocks on floppy discs
2558 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2559 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2560 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2561 # ./install, which can be erroneously created by make from ./install.sh.
2562 echo "$as_me:2562: checking for a BSD compatible install" >&5
2563 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2564 if test -z "$INSTALL"; then
2565 if test "${ac_cv_path_install+set}" = set; then
2566 echo $ECHO_N "(cached) $ECHO_C" >&6
2568 ac_save_IFS=$IFS; IFS=$ac_path_separator
2569 for ac_dir in $PATH; do
2571 # Account for people who put trailing slashes in PATH elements.
2573 / | ./ | .// | /cC/* \
2574 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2577 # OSF1 and SCO ODT 3.0 have their own names for install.
2578 # Don't use installbsd from OSF since it installs stuff as root
2580 for ac_prog in ginstall scoinst install; do
2581 if $as_executable_p "$ac_dir/$ac_prog"; then
2582 if test $ac_prog = install &&
2583 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2584 # AIX install. It has an incompatible calling convention.
2586 elif test $ac_prog = install &&
2587 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2588 # program-specific install script used by HP pwplus--don't use.
2591 ac_cv_path_install="$ac_dir/$ac_prog -c"
2601 if test "${ac_cv_path_install+set}" = set; then
2602 INSTALL=$ac_cv_path_install
2604 # As a last resort, use the slow shell script. We don't cache a
2605 # path for INSTALL within a source directory, because that will
2606 # break other packages using the cache if that directory is
2607 # removed, or if the path is relative.
2608 INSTALL=$ac_install_sh
2611 echo "$as_me:2611: result: $INSTALL" >&5
2612 echo "${ECHO_T}$INSTALL" >&6
2614 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2615 # It thinks the first close brace ends the variable substitution.
2616 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2618 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2620 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2626 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2627 test -z "$cf_dir" && cf_dir=.
2628 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2632 echo "$as_me:2632: checking if you want to install stripped executables" >&5
2633 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2635 # Check whether --enable-stripping or --disable-stripping was given.
2636 if test "${enable_stripping+set}" = set; then
2637 enableval="$enable_stripping"
2638 test "$enableval" != no && enableval=yes
2639 if test "$enableval" != "yes" ; then
2649 echo "$as_me:2649: result: $with_stripping" >&5
2650 echo "${ECHO_T}$with_stripping" >&6
2652 if test "$with_stripping" = yes
2659 : ${INSTALL:=install}
2660 echo "$as_me:2660: checking if install accepts -p option" >&5
2661 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2662 if test "${cf_cv_install_p+set}" = set; then
2663 echo $ECHO_N "(cached) $ECHO_C" >&6
2670 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2672 if test -f conftest.out/conftest.in
2674 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2675 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2676 if test -s conftest.err
2691 echo "$as_me:2691: result: $cf_cv_install_p" >&5
2692 echo "${ECHO_T}$cf_cv_install_p" >&6
2694 echo "$as_me:2694: checking if install needs to be told about ownership" >&5
2695 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2696 case `$ac_config_guess` in
2705 echo "$as_me:2705: result: $with_install_o" >&5
2706 echo "${ECHO_T}$with_install_o" >&6
2707 if test "x$with_install_o" = xyes
2709 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'`
2714 echo "$as_me:2714: checking for long file names" >&5
2715 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2716 if test "${ac_cv_sys_long_file_names+set}" = set; then
2717 echo $ECHO_N "(cached) $ECHO_C" >&6
2719 ac_cv_sys_long_file_names=yes
2720 # Test for long file names in all the places we know might matter:
2721 # . the current directory, where building will happen
2722 # $prefix/lib where we will be installing things
2723 # $exec_prefix/lib likewise
2724 # eval it to expand exec_prefix.
2725 # $TMPDIR if set, where it might want to write temporary files
2726 # if $TMPDIR is not set:
2727 # /tmp where it might want to write temporary files
2730 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2733 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2735 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2736 test -d $ac_dir || continue
2737 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2738 ac_xdir=$ac_dir/cf$$
2739 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2740 ac_tf1=$ac_xdir/conftest9012345
2741 ac_tf2=$ac_xdir/conftest9012346
2742 (echo 1 >$ac_tf1) 2>/dev/null
2743 (echo 2 >$ac_tf2) 2>/dev/null
2744 ac_val=`cat $ac_tf1 2>/dev/null`
2745 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2746 ac_cv_sys_long_file_names=no
2747 rm -rf $ac_xdir 2>/dev/null
2750 rm -rf $ac_xdir 2>/dev/null
2753 echo "$as_me:2753: result: $ac_cv_sys_long_file_names" >&5
2754 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2755 if test $ac_cv_sys_long_file_names = yes; then
2757 cat >>confdefs.h <<\EOF
2758 #define HAVE_LONG_FILE_NAMES 1
2763 # if we find pkg-config, check if we should install the ".pc" files.
2765 echo "$as_me:2765: checking if you want to use pkg-config" >&5
2766 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2768 # Check whether --with-pkg-config or --without-pkg-config was given.
2769 if test "${with_pkg_config+set}" = set; then
2770 withval="$with_pkg_config"
2771 cf_pkg_config=$withval
2775 echo "$as_me:2775: result: $cf_pkg_config" >&5
2776 echo "${ECHO_T}$cf_pkg_config" >&6
2778 case $cf_pkg_config in
2784 if test -n "$ac_tool_prefix"; then
2785 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2786 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2787 echo "$as_me:2787: checking for $ac_word" >&5
2788 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2789 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2790 echo $ECHO_N "(cached) $ECHO_C" >&6
2794 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2797 ac_save_IFS=$IFS; IFS=$ac_path_separator
2799 for ac_dir in $ac_dummy; do
2801 test -z "$ac_dir" && ac_dir=.
2802 if $as_executable_p "$ac_dir/$ac_word"; then
2803 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2804 echo "$as_me:2804: found $ac_dir/$ac_word" >&5
2812 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2814 if test -n "$PKG_CONFIG"; then
2815 echo "$as_me:2815: result: $PKG_CONFIG" >&5
2816 echo "${ECHO_T}$PKG_CONFIG" >&6
2818 echo "$as_me:2818: result: no" >&5
2819 echo "${ECHO_T}no" >&6
2823 if test -z "$ac_cv_path_PKG_CONFIG"; then
2824 ac_pt_PKG_CONFIG=$PKG_CONFIG
2825 # Extract the first word of "pkg-config", so it can be a program name with args.
2826 set dummy pkg-config; ac_word=$2
2827 echo "$as_me:2827: checking for $ac_word" >&5
2828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2829 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2830 echo $ECHO_N "(cached) $ECHO_C" >&6
2832 case $ac_pt_PKG_CONFIG in
2834 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
2837 ac_save_IFS=$IFS; IFS=$ac_path_separator
2839 for ac_dir in $ac_dummy; do
2841 test -z "$ac_dir" && ac_dir=.
2842 if $as_executable_p "$ac_dir/$ac_word"; then
2843 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
2844 echo "$as_me:2844: found $ac_dir/$ac_word" >&5
2849 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
2853 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
2855 if test -n "$ac_pt_PKG_CONFIG"; then
2856 echo "$as_me:2856: result: $ac_pt_PKG_CONFIG" >&5
2857 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
2859 echo "$as_me:2859: result: no" >&5
2860 echo "${ECHO_T}no" >&6
2863 PKG_CONFIG=$ac_pt_PKG_CONFIG
2865 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
2874 test -z "$PKG_CONFIG" && PKG_CONFIG=none
2875 if test "$PKG_CONFIG" != none ; then
2877 if test "x$prefix" != xNONE; then
2878 cf_path_syntax="$prefix"
2880 cf_path_syntax="$ac_default_prefix"
2883 case ".$PKG_CONFIG" in
2888 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
2890 (.\${*prefix}*|.\${*dir}*)
2891 eval PKG_CONFIG="$PKG_CONFIG"
2892 case ".$PKG_CONFIG" in
2894 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2899 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
2902 { { echo "$as_me:2902: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
2903 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
2904 { (exit 1); exit 1; }; }
2908 elif test "x$cf_pkg_config" != xno ; then
2909 { echo "$as_me:2909: WARNING: pkg-config is not installed" >&5
2910 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
2915 echo "$as_me:2915: checking for pkg-config library directory" >&5
2916 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
2919 echo "$as_me:2919: checking for $PKG_CONFIG library directory" >&5
2920 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
2924 PKG_CONFIG_LIBDIR=no
2926 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
2927 if test "${with_pkg_config_libdir+set}" = set; then
2928 withval="$with_pkg_config_libdir"
2929 PKG_CONFIG_LIBDIR=$withval
2931 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
2934 case x$PKG_CONFIG_LIBDIR in
2938 # Look for the library directory using the same prefix as the executable
2939 if test "x$PKG_CONFIG" = xnone
2943 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
2946 # If you don't like using the default architecture, you have to specify the
2947 # intended library directory and corresponding compiler/linker options.
2949 # This case allows for Debian's 2014-flavor of multiarch, along with the
2950 # most common variations before that point. Some other variants spell the
2951 # directory differently, e.g., "pkg-config", and put it in unusual places.
2952 # pkg-config has always been poorly standardized, which is ironic...
2953 case x`(arch) 2>/dev/null` in
2956 $cf_path/lib/*64-linux-gnu \
2964 $cf_path/lib/*-linux-gnu \
2972 test -n "$verbose" && echo " list..." 1>&6
2974 echo "${as_me:-configure}:2974: testing list... ..." 1>&5
2976 for cf_config in $cf_search_path
2978 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
2980 echo "${as_me:-configure}:2980: testing checking $cf_config/pkgconfig ..." 1>&5
2982 if test -d $cf_config/pkgconfig
2984 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
2985 echo "$as_me:2985: checking done" >&5
2986 echo $ECHO_N "checking done... $ECHO_C" >&6
2995 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
2996 echo "$as_me:2996: result: $PKG_CONFIG_LIBDIR" >&5
2997 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3000 echo "$as_me:3000: checking if you want to build test-programs" >&5
3001 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3003 # Check whether --with-tests or --without-tests was given.
3004 if test "${with_tests+set}" = set; then
3005 withval="$with_tests"
3006 cf_with_tests=$withval
3010 echo "$as_me:3010: result: $cf_with_tests" >&5
3011 echo "${ECHO_T}$cf_with_tests" >&6
3013 echo "$as_me:3013: checking if we should assume mixed-case filenames" >&5
3014 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3016 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3017 if test "${enable_mixed_case+set}" = set; then
3018 enableval="$enable_mixed_case"
3019 enable_mixedcase=$enableval
3021 enable_mixedcase=auto
3023 echo "$as_me:3023: result: $enable_mixedcase" >&5
3024 echo "${ECHO_T}$enable_mixedcase" >&6
3025 if test "$enable_mixedcase" = "auto" ; then
3027 echo "$as_me:3027: checking if filesystem supports mixed-case filenames" >&5
3028 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3029 if test "${cf_cv_mixedcase+set}" = set; then
3030 echo $ECHO_N "(cached) $ECHO_C" >&6
3033 if test "$cross_compiling" = yes ; then
3034 case $target_alias in
3035 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3043 rm -f conftest CONFTEST
3045 if test -f CONFTEST ; then
3050 rm -f conftest CONFTEST
3054 echo "$as_me:3054: result: $cf_cv_mixedcase" >&5
3055 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3056 test "$cf_cv_mixedcase" = yes &&
3057 cat >>confdefs.h <<\EOF
3058 #define MIXEDCASE_FILENAMES 1
3062 cf_cv_mixedcase=$enable_mixedcase
3063 if test "$enable_mixedcase" = "yes" ; then
3064 cat >>confdefs.h <<\EOF
3065 #define MIXEDCASE_FILENAMES 1
3071 # do this after mixed-case option (tags/TAGS is not as important as tic).
3072 echo "$as_me:3072: checking whether ${MAKE-make} sets \${MAKE}" >&5
3073 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3074 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3075 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3076 echo $ECHO_N "(cached) $ECHO_C" >&6
3078 cat >conftest.make <<\EOF
3080 @echo 'ac_maketemp="${MAKE}"'
3082 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3083 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3084 if test -n "$ac_maketemp"; then
3085 eval ac_cv_prog_make_${ac_make}_set=yes
3087 eval ac_cv_prog_make_${ac_make}_set=no
3091 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3092 echo "$as_me:3092: result: yes" >&5
3093 echo "${ECHO_T}yes" >&6
3096 echo "$as_me:3096: result: no" >&5
3097 echo "${ECHO_T}no" >&6
3098 SET_MAKE="MAKE=${MAKE-make}"
3101 for ac_prog in exctags ctags
3103 # Extract the first word of "$ac_prog", so it can be a program name with args.
3104 set dummy $ac_prog; ac_word=$2
3105 echo "$as_me:3105: checking for $ac_word" >&5
3106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3107 if test "${ac_cv_prog_CTAGS+set}" = set; then
3108 echo $ECHO_N "(cached) $ECHO_C" >&6
3110 if test -n "$CTAGS"; then
3111 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3113 ac_save_IFS=$IFS; IFS=$ac_path_separator
3115 for ac_dir in $ac_dummy; do
3117 test -z "$ac_dir" && ac_dir=.
3118 $as_executable_p "$ac_dir/$ac_word" || continue
3119 ac_cv_prog_CTAGS="$ac_prog"
3120 echo "$as_me:3120: found $ac_dir/$ac_word" >&5
3126 CTAGS=$ac_cv_prog_CTAGS
3127 if test -n "$CTAGS"; then
3128 echo "$as_me:3128: result: $CTAGS" >&5
3129 echo "${ECHO_T}$CTAGS" >&6
3131 echo "$as_me:3131: result: no" >&5
3132 echo "${ECHO_T}no" >&6
3135 test -n "$CTAGS" && break
3138 for ac_prog in exetags etags
3140 # Extract the first word of "$ac_prog", so it can be a program name with args.
3141 set dummy $ac_prog; ac_word=$2
3142 echo "$as_me:3142: checking for $ac_word" >&5
3143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3144 if test "${ac_cv_prog_ETAGS+set}" = set; then
3145 echo $ECHO_N "(cached) $ECHO_C" >&6
3147 if test -n "$ETAGS"; then
3148 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3150 ac_save_IFS=$IFS; IFS=$ac_path_separator
3152 for ac_dir in $ac_dummy; do
3154 test -z "$ac_dir" && ac_dir=.
3155 $as_executable_p "$ac_dir/$ac_word" || continue
3156 ac_cv_prog_ETAGS="$ac_prog"
3157 echo "$as_me:3157: found $ac_dir/$ac_word" >&5
3163 ETAGS=$ac_cv_prog_ETAGS
3164 if test -n "$ETAGS"; then
3165 echo "$as_me:3165: result: $ETAGS" >&5
3166 echo "${ECHO_T}$ETAGS" >&6
3168 echo "$as_me:3168: result: no" >&5
3169 echo "${ECHO_T}no" >&6
3172 test -n "$ETAGS" && break
3175 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3176 set dummy ${CTAGS:-ctags}; ac_word=$2
3177 echo "$as_me:3177: checking for $ac_word" >&5
3178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3179 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3180 echo $ECHO_N "(cached) $ECHO_C" >&6
3182 if test -n "$MAKE_LOWER_TAGS"; then
3183 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3185 ac_save_IFS=$IFS; IFS=$ac_path_separator
3187 for ac_dir in $ac_dummy; do
3189 test -z "$ac_dir" && ac_dir=.
3190 $as_executable_p "$ac_dir/$ac_word" || continue
3191 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3192 echo "$as_me:3192: found $ac_dir/$ac_word" >&5
3196 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3199 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3200 if test -n "$MAKE_LOWER_TAGS"; then
3201 echo "$as_me:3201: result: $MAKE_LOWER_TAGS" >&5
3202 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3204 echo "$as_me:3204: result: no" >&5
3205 echo "${ECHO_T}no" >&6
3208 if test "$cf_cv_mixedcase" = yes ; then
3209 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3210 set dummy ${ETAGS:-etags}; ac_word=$2
3211 echo "$as_me:3211: checking for $ac_word" >&5
3212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3213 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3214 echo $ECHO_N "(cached) $ECHO_C" >&6
3216 if test -n "$MAKE_UPPER_TAGS"; then
3217 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3219 ac_save_IFS=$IFS; IFS=$ac_path_separator
3221 for ac_dir in $ac_dummy; do
3223 test -z "$ac_dir" && ac_dir=.
3224 $as_executable_p "$ac_dir/$ac_word" || continue
3225 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3226 echo "$as_me:3226: found $ac_dir/$ac_word" >&5
3230 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3233 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3234 if test -n "$MAKE_UPPER_TAGS"; then
3235 echo "$as_me:3235: result: $MAKE_UPPER_TAGS" >&5
3236 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3238 echo "$as_me:3238: result: no" >&5
3239 echo "${ECHO_T}no" >&6
3246 if test "$MAKE_UPPER_TAGS" = yes ; then
3252 if test "$MAKE_LOWER_TAGS" = yes ; then
3258 echo "$as_me:3258: checking for makeflags variable" >&5
3259 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3260 if test "${cf_cv_makeflags+set}" = set; then
3261 echo $ECHO_N "(cached) $ECHO_C" >&6
3265 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3267 cat >cf_makeflags.tmp <<CF_EOF
3270 @ echo '.$cf_option'
3272 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3273 case "$cf_result" in
3275 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3276 case "$cf_result" in
3277 (.*CC=*) cf_cv_makeflags=
3279 (*) cf_cv_makeflags=$cf_option
3288 echo "${as_me:-configure}:3288: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3293 rm -f cf_makeflags.tmp
3296 echo "$as_me:3296: result: $cf_cv_makeflags" >&5
3297 echo "${ECHO_T}$cf_cv_makeflags" >&6
3299 if test -n "$ac_tool_prefix"; then
3300 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3301 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3302 echo "$as_me:3302: checking for $ac_word" >&5
3303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3304 if test "${ac_cv_prog_RANLIB+set}" = set; then
3305 echo $ECHO_N "(cached) $ECHO_C" >&6
3307 if test -n "$RANLIB"; then
3308 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3310 ac_save_IFS=$IFS; IFS=$ac_path_separator
3312 for ac_dir in $ac_dummy; do
3314 test -z "$ac_dir" && ac_dir=.
3315 $as_executable_p "$ac_dir/$ac_word" || continue
3316 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3317 echo "$as_me:3317: found $ac_dir/$ac_word" >&5
3323 RANLIB=$ac_cv_prog_RANLIB
3324 if test -n "$RANLIB"; then
3325 echo "$as_me:3325: result: $RANLIB" >&5
3326 echo "${ECHO_T}$RANLIB" >&6
3328 echo "$as_me:3328: result: no" >&5
3329 echo "${ECHO_T}no" >&6
3333 if test -z "$ac_cv_prog_RANLIB"; then
3334 ac_ct_RANLIB=$RANLIB
3335 # Extract the first word of "ranlib", so it can be a program name with args.
3336 set dummy ranlib; ac_word=$2
3337 echo "$as_me:3337: checking for $ac_word" >&5
3338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3339 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
3342 if test -n "$ac_ct_RANLIB"; then
3343 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3345 ac_save_IFS=$IFS; IFS=$ac_path_separator
3347 for ac_dir in $ac_dummy; do
3349 test -z "$ac_dir" && ac_dir=.
3350 $as_executable_p "$ac_dir/$ac_word" || continue
3351 ac_cv_prog_ac_ct_RANLIB="ranlib"
3352 echo "$as_me:3352: found $ac_dir/$ac_word" >&5
3356 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3359 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3360 if test -n "$ac_ct_RANLIB"; then
3361 echo "$as_me:3361: result: $ac_ct_RANLIB" >&5
3362 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3364 echo "$as_me:3364: result: no" >&5
3365 echo "${ECHO_T}no" >&6
3368 RANLIB=$ac_ct_RANLIB
3370 RANLIB="$ac_cv_prog_RANLIB"
3373 if test -n "$ac_tool_prefix"; then
3374 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3375 set dummy ${ac_tool_prefix}ld; ac_word=$2
3376 echo "$as_me:3376: checking for $ac_word" >&5
3377 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3378 if test "${ac_cv_prog_LD+set}" = set; then
3379 echo $ECHO_N "(cached) $ECHO_C" >&6
3381 if test -n "$LD"; then
3382 ac_cv_prog_LD="$LD" # Let the user override the test.
3384 ac_save_IFS=$IFS; IFS=$ac_path_separator
3386 for ac_dir in $ac_dummy; do
3388 test -z "$ac_dir" && ac_dir=.
3389 $as_executable_p "$ac_dir/$ac_word" || continue
3390 ac_cv_prog_LD="${ac_tool_prefix}ld"
3391 echo "$as_me:3391: found $ac_dir/$ac_word" >&5
3398 if test -n "$LD"; then
3399 echo "$as_me:3399: result: $LD" >&5
3400 echo "${ECHO_T}$LD" >&6
3402 echo "$as_me:3402: result: no" >&5
3403 echo "${ECHO_T}no" >&6
3407 if test -z "$ac_cv_prog_LD"; then
3409 # Extract the first word of "ld", so it can be a program name with args.
3410 set dummy ld; ac_word=$2
3411 echo "$as_me:3411: checking for $ac_word" >&5
3412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3413 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3414 echo $ECHO_N "(cached) $ECHO_C" >&6
3416 if test -n "$ac_ct_LD"; then
3417 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3419 ac_save_IFS=$IFS; IFS=$ac_path_separator
3421 for ac_dir in $ac_dummy; do
3423 test -z "$ac_dir" && ac_dir=.
3424 $as_executable_p "$ac_dir/$ac_word" || continue
3425 ac_cv_prog_ac_ct_LD="ld"
3426 echo "$as_me:3426: found $ac_dir/$ac_word" >&5
3430 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3433 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3434 if test -n "$ac_ct_LD"; then
3435 echo "$as_me:3435: result: $ac_ct_LD" >&5
3436 echo "${ECHO_T}$ac_ct_LD" >&6
3438 echo "$as_me:3438: result: no" >&5
3439 echo "${ECHO_T}no" >&6
3447 if test -n "$ac_tool_prefix"; then
3448 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3449 set dummy ${ac_tool_prefix}ar; ac_word=$2
3450 echo "$as_me:3450: checking for $ac_word" >&5
3451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3452 if test "${ac_cv_prog_AR+set}" = set; then
3453 echo $ECHO_N "(cached) $ECHO_C" >&6
3455 if test -n "$AR"; then
3456 ac_cv_prog_AR="$AR" # Let the user override the test.
3458 ac_save_IFS=$IFS; IFS=$ac_path_separator
3460 for ac_dir in $ac_dummy; do
3462 test -z "$ac_dir" && ac_dir=.
3463 $as_executable_p "$ac_dir/$ac_word" || continue
3464 ac_cv_prog_AR="${ac_tool_prefix}ar"
3465 echo "$as_me:3465: found $ac_dir/$ac_word" >&5
3472 if test -n "$AR"; then
3473 echo "$as_me:3473: result: $AR" >&5
3474 echo "${ECHO_T}$AR" >&6
3476 echo "$as_me:3476: result: no" >&5
3477 echo "${ECHO_T}no" >&6
3481 if test -z "$ac_cv_prog_AR"; then
3483 # Extract the first word of "ar", so it can be a program name with args.
3484 set dummy ar; ac_word=$2
3485 echo "$as_me:3485: checking for $ac_word" >&5
3486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3487 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3488 echo $ECHO_N "(cached) $ECHO_C" >&6
3490 if test -n "$ac_ct_AR"; then
3491 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3493 ac_save_IFS=$IFS; IFS=$ac_path_separator
3495 for ac_dir in $ac_dummy; do
3497 test -z "$ac_dir" && ac_dir=.
3498 $as_executable_p "$ac_dir/$ac_word" || continue
3499 ac_cv_prog_ac_ct_AR="ar"
3500 echo "$as_me:3500: found $ac_dir/$ac_word" >&5
3504 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3507 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3508 if test -n "$ac_ct_AR"; then
3509 echo "$as_me:3509: result: $ac_ct_AR" >&5
3510 echo "${ECHO_T}$ac_ct_AR" >&6
3512 echo "$as_me:3512: result: no" >&5
3513 echo "${ECHO_T}no" >&6
3521 if test -n "$ac_tool_prefix"; then
3522 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3523 set dummy ${ac_tool_prefix}ar; ac_word=$2
3524 echo "$as_me:3524: checking for $ac_word" >&5
3525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3526 if test "${ac_cv_prog_AR+set}" = set; then
3527 echo $ECHO_N "(cached) $ECHO_C" >&6
3529 if test -n "$AR"; then
3530 ac_cv_prog_AR="$AR" # Let the user override the test.
3532 ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 for ac_dir in $ac_dummy; do
3536 test -z "$ac_dir" && ac_dir=.
3537 $as_executable_p "$ac_dir/$ac_word" || continue
3538 ac_cv_prog_AR="${ac_tool_prefix}ar"
3539 echo "$as_me:3539: found $ac_dir/$ac_word" >&5
3546 if test -n "$AR"; then
3547 echo "$as_me:3547: result: $AR" >&5
3548 echo "${ECHO_T}$AR" >&6
3550 echo "$as_me:3550: result: no" >&5
3551 echo "${ECHO_T}no" >&6
3555 if test -z "$ac_cv_prog_AR"; then
3557 # Extract the first word of "ar", so it can be a program name with args.
3558 set dummy ar; ac_word=$2
3559 echo "$as_me:3559: checking for $ac_word" >&5
3560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3561 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3562 echo $ECHO_N "(cached) $ECHO_C" >&6
3564 if test -n "$ac_ct_AR"; then
3565 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3567 ac_save_IFS=$IFS; IFS=$ac_path_separator
3569 for ac_dir in $ac_dummy; do
3571 test -z "$ac_dir" && ac_dir=.
3572 $as_executable_p "$ac_dir/$ac_word" || continue
3573 ac_cv_prog_ac_ct_AR="ar"
3574 echo "$as_me:3574: found $ac_dir/$ac_word" >&5
3578 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3581 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3582 if test -n "$ac_ct_AR"; then
3583 echo "$as_me:3583: result: $ac_ct_AR" >&5
3584 echo "${ECHO_T}$ac_ct_AR" >&6
3586 echo "$as_me:3586: result: no" >&5
3587 echo "${ECHO_T}no" >&6
3595 echo "$as_me:3595: checking for options to update archives" >&5
3596 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3597 if test "${cf_cv_ar_flags+set}" = set; then
3598 echo $ECHO_N "(cached) $ECHO_C" >&6
3601 cf_cv_ar_flags=unknown
3602 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3605 # check if $ARFLAGS already contains this choice
3606 if test "x$ARFLAGS" != "x" ; then
3607 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3608 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3614 rm -f conftest.$ac_cv_objext
3617 cat >conftest.$ac_ext <<EOF
3618 #line 3618 "configure"
3619 int testdata[3] = { 123, 456, 789 };
3621 if { (eval echo "$as_me:3621: \"$ac_compile\"") >&5
3622 (eval $ac_compile) 2>&5
3624 echo "$as_me:3624: \$? = $ac_status" >&5
3625 (exit $ac_status); } ; then
3626 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3627 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3628 if test -f conftest.a ; then
3629 cf_cv_ar_flags=$cf_ar_flags
3633 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3635 echo "${as_me:-configure}:3635: testing cannot compile test-program ..." 1>&5
3640 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3643 echo "$as_me:3643: result: $cf_cv_ar_flags" >&5
3644 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3646 if test -n "$ARFLAGS" ; then
3647 if test -n "$cf_cv_ar_flags" ; then
3648 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3651 ARFLAGS=$cf_cv_ar_flags
3654 echo "$as_me:3654: checking for PATH separator" >&5
3655 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3656 case $cf_cv_system_name in
3657 (os2*) PATH_SEPARATOR=';' ;;
3658 (*) ${PATH_SEPARATOR:=':'} ;;
3661 echo "$as_me:3661: result: $PATH_SEPARATOR" >&5
3662 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3664 echo "$as_me:3664: checking if you have specified an install-prefix" >&5
3665 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3667 # Check whether --with-install-prefix or --without-install-prefix was given.
3668 if test "${with_install_prefix+set}" = set; then
3669 withval="$with_install_prefix"
3673 (*) DESTDIR="$withval"
3677 echo "$as_me:3677: result: $DESTDIR" >&5
3678 echo "${ECHO_T}$DESTDIR" >&6
3680 ###############################################################################
3682 # If we're cross-compiling, allow the user to override the tools and their
3683 # options. The configure script is oriented toward identifying the host
3684 # compiler, etc., but we need a build compiler to generate parts of the source.
3686 if test "$cross_compiling" = yes ; then
3688 # defaults that we might want to override
3689 : ${BUILD_CFLAGS:=''}
3690 : ${BUILD_CPPFLAGS:=''}
3691 : ${BUILD_LDFLAGS:=''}
3693 : ${BUILD_EXEEXT:='$x'}
3694 : ${BUILD_OBJEXT:='o'}
3696 # Check whether --with-build-cc or --without-build-cc was given.
3697 if test "${with_build_cc+set}" = set; then
3698 withval="$with_build_cc"
3701 for ac_prog in gcc clang c99 c89 cc cl
3703 # Extract the first word of "$ac_prog", so it can be a program name with args.
3704 set dummy $ac_prog; ac_word=$2
3705 echo "$as_me:3705: checking for $ac_word" >&5
3706 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3707 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3708 echo $ECHO_N "(cached) $ECHO_C" >&6
3710 if test -n "$BUILD_CC"; then
3711 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3713 ac_save_IFS=$IFS; IFS=$ac_path_separator
3715 for ac_dir in $ac_dummy; do
3717 test -z "$ac_dir" && ac_dir=.
3718 $as_executable_p "$ac_dir/$ac_word" || continue
3719 ac_cv_prog_BUILD_CC="$ac_prog"
3720 echo "$as_me:3720: found $ac_dir/$ac_word" >&5
3726 BUILD_CC=$ac_cv_prog_BUILD_CC
3727 if test -n "$BUILD_CC"; then
3728 echo "$as_me:3728: result: $BUILD_CC" >&5
3729 echo "${ECHO_T}$BUILD_CC" >&6
3731 echo "$as_me:3731: result: no" >&5
3732 echo "${ECHO_T}no" >&6
3735 test -n "$BUILD_CC" && break
3737 test -n "$BUILD_CC" || BUILD_CC="none"
3740 echo "$as_me:3740: checking for native build C compiler" >&5
3741 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3742 echo "$as_me:3742: result: $BUILD_CC" >&5
3743 echo "${ECHO_T}$BUILD_CC" >&6
3745 echo "$as_me:3745: checking for native build C preprocessor" >&5
3746 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3748 # Check whether --with-build-cpp or --without-build-cpp was given.
3749 if test "${with_build_cpp+set}" = set; then
3750 withval="$with_build_cpp"
3751 BUILD_CPP="$withval"
3753 BUILD_CPP='${BUILD_CC} -E'
3755 echo "$as_me:3755: result: $BUILD_CPP" >&5
3756 echo "${ECHO_T}$BUILD_CPP" >&6
3758 echo "$as_me:3758: checking for native build C flags" >&5
3759 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3761 # Check whether --with-build-cflags or --without-build-cflags was given.
3762 if test "${with_build_cflags+set}" = set; then
3763 withval="$with_build_cflags"
3764 BUILD_CFLAGS="$withval"
3766 echo "$as_me:3766: result: $BUILD_CFLAGS" >&5
3767 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3769 echo "$as_me:3769: checking for native build C preprocessor-flags" >&5
3770 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3772 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3773 if test "${with_build_cppflags+set}" = set; then
3774 withval="$with_build_cppflags"
3775 BUILD_CPPFLAGS="$withval"
3777 echo "$as_me:3777: result: $BUILD_CPPFLAGS" >&5
3778 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3780 echo "$as_me:3780: checking for native build linker-flags" >&5
3781 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3783 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3784 if test "${with_build_ldflags+set}" = set; then
3785 withval="$with_build_ldflags"
3786 BUILD_LDFLAGS="$withval"
3788 echo "$as_me:3788: result: $BUILD_LDFLAGS" >&5
3789 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3791 echo "$as_me:3791: checking for native build linker-libraries" >&5
3792 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3794 # Check whether --with-build-libs or --without-build-libs was given.
3795 if test "${with_build_libs+set}" = set; then
3796 withval="$with_build_libs"
3797 BUILD_LIBS="$withval"
3799 echo "$as_me:3799: result: $BUILD_LIBS" >&5
3800 echo "${ECHO_T}$BUILD_LIBS" >&6
3802 # this assumes we're on Unix.
3806 : ${BUILD_CC:='${CC}'}
3808 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3809 { { echo "$as_me:3809: error: Cross-build requires two compilers.
3810 Use --with-build-cc to specify the native compiler." >&5
3811 echo "$as_me: error: Cross-build requires two compilers.
3812 Use --with-build-cc to specify the native compiler." >&2;}
3813 { (exit 1); exit 1; }; }
3817 : ${BUILD_CC:='${CC}'}
3818 : ${BUILD_CPP:='${CPP}'}
3819 : ${BUILD_CFLAGS:='${CFLAGS}'}
3820 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3821 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
3822 : ${BUILD_LIBS:='${LIBS}'}
3823 : ${BUILD_EXEEXT:='$x'}
3824 : ${BUILD_OBJEXT:='o'}
3827 ###############################################################################
3829 ### Options to allow the user to specify the set of libraries which are used.
3830 ### Use "--without-normal --with-shared" to allow the default model to be
3831 ### shared, for example.
3834 echo "$as_me:3834: checking if you want to build shared C-objects" >&5
3835 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
3837 # Check whether --with-shared or --without-shared was given.
3838 if test "${with_shared+set}" = set; then
3839 withval="$with_shared"
3840 with_shared=$withval
3844 echo "$as_me:3844: result: $with_shared" >&5
3845 echo "${ECHO_T}$with_shared" >&6
3846 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
3848 echo "$as_me:3848: checking for specified models" >&5
3849 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
3850 test -z "$cf_list_models" && cf_list_models=normal
3851 echo "$as_me:3851: result: $cf_list_models" >&5
3852 echo "${ECHO_T}$cf_list_models" >&6
3854 ### Use the first model as the default, and save its suffix for use in building
3855 ### up test-applications.
3856 echo "$as_me:3856: checking for default model" >&5
3857 echo $ECHO_N "checking for default model... $ECHO_C" >&6
3858 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
3859 echo "$as_me:3859: result: $DFT_LWR_MODEL" >&5
3860 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
3862 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3864 echo "$as_me:3864: checking for specific curses-directory" >&5
3865 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
3867 # Check whether --with-curses-dir or --without-curses-dir was given.
3868 if test "${with_curses_dir+set}" = set; then
3869 withval="$with_curses_dir"
3870 cf_cv_curses_dir=$withval
3874 echo "$as_me:3874: result: $cf_cv_curses_dir" >&5
3875 echo "${ECHO_T}$cf_cv_curses_dir" >&6
3877 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3880 if test "x$prefix" != xNONE; then
3881 cf_path_syntax="$prefix"
3883 cf_path_syntax="$ac_default_prefix"
3891 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3893 (.\${*prefix}*|.\${*dir}*)
3894 eval withval="$withval"
3897 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3902 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
3905 { { echo "$as_me:3905: error: expected a pathname, not \"$withval\"" >&5
3906 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
3907 { (exit 1); exit 1; }; }
3911 if test -d "$cf_cv_curses_dir"
3914 if test -n "$cf_cv_curses_dir/include" ; then
3915 for cf_add_incdir in $cf_cv_curses_dir/include
3917 while test $cf_add_incdir != /usr/include
3919 if test -d $cf_add_incdir
3922 if test -n "$CFLAGS$CPPFLAGS" ; then
3923 # a loop is needed to ensure we can add subdirs of existing dirs
3924 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3925 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3926 cf_have_incdir=yes; break
3931 if test "$cf_have_incdir" = no ; then
3932 if test "$cf_add_incdir" = /usr/local/include ; then
3933 if test "$GCC" = yes
3935 cf_save_CPPFLAGS=$CPPFLAGS
3937 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3938 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
3940 cat >conftest.$ac_ext <<_ACEOF
3941 #line 3941 "configure"
3942 #include "confdefs.h"
3952 rm -f conftest.$ac_objext
3953 if { (eval echo "$as_me:3953: \"$ac_compile\"") >&5
3954 (eval $ac_compile) 2>&5
3956 echo "$as_me:3956: \$? = $ac_status" >&5
3957 (exit $ac_status); } &&
3958 { ac_try='test -s conftest.$ac_objext'
3959 { (eval echo "$as_me:3959: \"$ac_try\"") >&5
3962 echo "$as_me:3962: \$? = $ac_status" >&5
3963 (exit $ac_status); }; }; then
3966 echo "$as_me: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3970 rm -f conftest.$ac_objext conftest.$ac_ext
3971 CPPFLAGS=$cf_save_CPPFLAGS
3976 if test "$cf_have_incdir" = no ; then
3977 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3979 echo "${as_me:-configure}:3979: testing adding $cf_add_incdir to include-path ..." 1>&5
3981 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3983 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3984 test "$cf_top_incdir" = "$cf_add_incdir" && break
3985 cf_add_incdir="$cf_top_incdir"
3996 if test -n "$cf_cv_curses_dir/lib" ; then
3997 for cf_add_libdir in $cf_cv_curses_dir/lib
3999 if test $cf_add_libdir = /usr/lib ; then
4001 elif test -d $cf_add_libdir
4004 if test -n "$LDFLAGS$LIBS" ; then
4005 # a loop is needed to ensure we can add subdirs of existing dirs
4006 for cf_test_libdir in $LDFLAGS $LIBS ; do
4007 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4008 cf_have_libdir=yes; break
4012 if test "$cf_have_libdir" = no ; then
4013 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4015 echo "${as_me:-configure}:4015: testing adding $cf_add_libdir to library-path ..." 1>&5
4017 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4026 cf_ncuconfig_root=ncurses
4027 cf_have_ncuconfig=no
4029 if test "x${PKG_CONFIG:=none}" != xnone; then
4030 echo "$as_me:4030: checking pkg-config for $cf_ncuconfig_root" >&5
4031 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4032 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4033 echo "$as_me:4033: result: yes" >&5
4034 echo "${ECHO_T}yes" >&6
4036 echo "$as_me:4036: checking if the $cf_ncuconfig_root package files work" >&5
4037 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4038 cf_have_ncuconfig=unknown
4040 cf_save_CPPFLAGS="$CPPFLAGS"
4041 cf_save_LIBS="$LIBS"
4046 cf_new_extra_cppflags=
4048 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
4050 case $cf_fix_cppflags in
4052 case $cf_add_cflags in
4053 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4054 case $cf_add_cflags in
4056 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4058 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4059 && test -z "${cf_tst_cflags}" \
4060 && cf_fix_cppflags=yes
4062 if test $cf_fix_cppflags = yes ; then
4064 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4065 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4068 elif test "${cf_tst_cflags}" = "\"'" ; then
4070 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4071 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4081 case $cf_add_cflags in
4083 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4085 CPPFLAGS=`echo "$CPPFLAGS" | \
4086 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4087 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4092 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4093 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4100 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4101 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4108 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4109 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4111 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4113 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4114 && test -z "${cf_tst_cflags}" \
4115 && cf_fix_cppflags=no
4120 if test -n "$cf_new_cflags" ; then
4122 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4123 CFLAGS="${CFLAGS}$cf_new_cflags"
4127 if test -n "$cf_new_cppflags" ; then
4129 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4130 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4134 if test -n "$cf_new_extra_cppflags" ; then
4136 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4137 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4141 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4142 # Filter out duplicates - this happens with badly-designed ".pc" files...
4143 for cf_add_1lib in $LIBS
4145 for cf_add_2lib in $cf_add_libs
4147 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4153 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4157 cat >conftest.$ac_ext <<_ACEOF
4158 #line 4158 "configure"
4159 #include "confdefs.h"
4160 #include <${cf_cv_ncurses_header:-curses.h}>
4164 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4169 rm -f conftest.$ac_objext conftest$ac_exeext
4170 if { (eval echo "$as_me:4170: \"$ac_link\"") >&5
4171 (eval $ac_link) 2>&5
4173 echo "$as_me:4173: \$? = $ac_status" >&5
4174 (exit $ac_status); } &&
4175 { ac_try='test -s conftest$ac_exeext'
4176 { (eval echo "$as_me:4176: \"$ac_try\"") >&5
4179 echo "$as_me:4179: \$? = $ac_status" >&5
4180 (exit $ac_status); }; }; then
4181 if test "$cross_compiling" = yes; then
4182 cf_have_ncuconfig=maybe
4184 cat >conftest.$ac_ext <<_ACEOF
4185 #line 4185 "configure"
4186 #include "confdefs.h"
4187 #include <${cf_cv_ncurses_header:-curses.h}>
4189 { char *xx = curses_version(); return (xx == 0); }
4191 rm -f conftest$ac_exeext
4192 if { (eval echo "$as_me:4192: \"$ac_link\"") >&5
4193 (eval $ac_link) 2>&5
4195 echo "$as_me:4195: \$? = $ac_status" >&5
4196 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4197 { (eval echo "$as_me:4197: \"$ac_try\"") >&5
4200 echo "$as_me:4200: \$? = $ac_status" >&5
4201 (exit $ac_status); }; }; then
4202 cf_have_ncuconfig=yes
4204 echo "$as_me: program exited with status $ac_status" >&5
4205 echo "$as_me: failed program was:" >&5
4206 cat conftest.$ac_ext >&5
4207 cf_have_ncuconfig=no
4209 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4212 echo "$as_me: failed program was:" >&5
4213 cat conftest.$ac_ext >&5
4214 cf_have_ncuconfig=no
4216 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4217 echo "$as_me:4217: result: $cf_have_ncuconfig" >&5
4218 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4219 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4220 if test "$cf_have_ncuconfig" != "yes"
4222 CPPFLAGS="$cf_save_CPPFLAGS"
4223 LIBS="$cf_save_LIBS"
4224 NCURSES_CONFIG_PKG=none
4227 cat >>confdefs.h <<\EOF
4231 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4233 echo "$as_me:4233: checking for terminfo header" >&5
4234 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4235 if test "${cf_cv_term_header+set}" = set; then
4236 echo $ECHO_N "(cached) $ECHO_C" >&6
4239 case ${cf_cv_ncurses_header} in
4240 (*/ncurses.h|*/ncursesw.h)
4241 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4244 cf_term_header=term.h
4248 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4250 cat >conftest.$ac_ext <<_ACEOF
4251 #line 4251 "configure"
4252 #include "confdefs.h"
4254 #include <${cf_cv_ncurses_header:-curses.h}>
4260 int x = auto_left_margin
4265 rm -f conftest.$ac_objext
4266 if { (eval echo "$as_me:4266: \"$ac_compile\"") >&5
4267 (eval $ac_compile) 2>&5
4269 echo "$as_me:4269: \$? = $ac_status" >&5
4270 (exit $ac_status); } &&
4271 { ac_try='test -s conftest.$ac_objext'
4272 { (eval echo "$as_me:4272: \"$ac_try\"") >&5
4275 echo "$as_me:4275: \$? = $ac_status" >&5
4276 (exit $ac_status); }; }; then
4278 cf_cv_term_header="$cf_test"
4280 echo "$as_me: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
4283 cf_cv_term_header=unknown
4286 rm -f conftest.$ac_objext conftest.$ac_ext
4287 test "$cf_cv_term_header" != unknown && break
4291 echo "$as_me:4291: result: $cf_cv_term_header" >&5
4292 echo "${ECHO_T}$cf_cv_term_header" >&6
4294 # Set definitions to allow ifdef'ing to accommodate subdirectories
4296 case $cf_cv_term_header in
4299 cat >>confdefs.h <<\EOF
4300 #define HAVE_TERM_H 1
4306 case $cf_cv_term_header in
4309 cat >>confdefs.h <<\EOF
4310 #define HAVE_NCURSES_TERM_H 1
4316 cat >>confdefs.h <<\EOF
4317 #define HAVE_NCURSESW_TERM_H 1
4326 echo "$as_me:4326: result: no" >&5
4327 echo "${ECHO_T}no" >&6
4328 NCURSES_CONFIG_PKG=none
4331 NCURSES_CONFIG_PKG=none
4334 if test "x$cf_have_ncuconfig" = "xno"; then
4335 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4337 if test -n "$ac_tool_prefix"; then
4338 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4340 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4341 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4342 echo "$as_me:4342: checking for $ac_word" >&5
4343 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4344 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4345 echo $ECHO_N "(cached) $ECHO_C" >&6
4347 if test -n "$NCURSES_CONFIG"; then
4348 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4350 ac_save_IFS=$IFS; IFS=$ac_path_separator
4352 for ac_dir in $ac_dummy; do
4354 test -z "$ac_dir" && ac_dir=.
4355 $as_executable_p "$ac_dir/$ac_word" || continue
4356 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4357 echo "$as_me:4357: found $ac_dir/$ac_word" >&5
4363 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4364 if test -n "$NCURSES_CONFIG"; then
4365 echo "$as_me:4365: result: $NCURSES_CONFIG" >&5
4366 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4368 echo "$as_me:4368: result: no" >&5
4369 echo "${ECHO_T}no" >&6
4372 test -n "$NCURSES_CONFIG" && break
4375 if test -z "$NCURSES_CONFIG"; then
4376 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4377 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4379 # Extract the first word of "$ac_prog", so it can be a program name with args.
4380 set dummy $ac_prog; ac_word=$2
4381 echo "$as_me:4381: checking for $ac_word" >&5
4382 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4383 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4384 echo $ECHO_N "(cached) $ECHO_C" >&6
4386 if test -n "$ac_ct_NCURSES_CONFIG"; then
4387 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4389 ac_save_IFS=$IFS; IFS=$ac_path_separator
4391 for ac_dir in $ac_dummy; do
4393 test -z "$ac_dir" && ac_dir=.
4394 $as_executable_p "$ac_dir/$ac_word" || continue
4395 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4396 echo "$as_me:4396: found $ac_dir/$ac_word" >&5
4402 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4403 if test -n "$ac_ct_NCURSES_CONFIG"; then
4404 echo "$as_me:4404: result: $ac_ct_NCURSES_CONFIG" >&5
4405 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4407 echo "$as_me:4407: result: no" >&5
4408 echo "${ECHO_T}no" >&6
4411 test -n "$ac_ct_NCURSES_CONFIG" && break
4413 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4415 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4418 if test "$NCURSES_CONFIG" != none ; then
4423 cf_new_extra_cppflags=
4425 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4427 case $cf_fix_cppflags in
4429 case $cf_add_cflags in
4430 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4431 case $cf_add_cflags in
4433 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4435 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4436 && test -z "${cf_tst_cflags}" \
4437 && cf_fix_cppflags=yes
4439 if test $cf_fix_cppflags = yes ; then
4441 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4442 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4445 elif test "${cf_tst_cflags}" = "\"'" ; then
4447 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4448 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4458 case $cf_add_cflags in
4460 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4462 CPPFLAGS=`echo "$CPPFLAGS" | \
4463 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4464 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4469 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4470 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4477 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4478 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4485 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4486 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4488 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4490 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4491 && test -z "${cf_tst_cflags}" \
4492 && cf_fix_cppflags=no
4497 if test -n "$cf_new_cflags" ; then
4499 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4500 CFLAGS="${CFLAGS}$cf_new_cflags"
4504 if test -n "$cf_new_cppflags" ; then
4506 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4507 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4511 if test -n "$cf_new_extra_cppflags" ; then
4513 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4514 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4518 cf_add_libs="`$NCURSES_CONFIG --libs`"
4519 # Filter out duplicates - this happens with badly-designed ".pc" files...
4520 for cf_add_1lib in $LIBS
4522 for cf_add_2lib in $cf_add_libs
4524 if test "x$cf_add_1lib" = "x$cf_add_2lib"
4530 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
4534 # even with config script, some packages use no-override for curses.h
4536 echo "$as_me:4536: checking if we have identified curses headers" >&5
4537 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4538 if test "${cf_cv_ncurses_header+set}" = set; then
4539 echo $ECHO_N "(cached) $ECHO_C" >&6
4542 cf_cv_ncurses_header=none
4544 ncurses.h ncurses/ncurses.h \
4545 curses.h ncurses/curses.h
4547 cat >conftest.$ac_ext <<_ACEOF
4548 #line 4548 "configure"
4549 #include "confdefs.h"
4550 #include <${cf_header}>
4554 initscr(); tgoto("?", 0,0)
4559 rm -f conftest.$ac_objext
4560 if { (eval echo "$as_me:4560: \"$ac_compile\"") >&5
4561 (eval $ac_compile) 2>&5
4563 echo "$as_me:4563: \$? = $ac_status" >&5
4564 (exit $ac_status); } &&
4565 { ac_try='test -s conftest.$ac_objext'
4566 { (eval echo "$as_me:4566: \"$ac_try\"") >&5
4569 echo "$as_me:4569: \$? = $ac_status" >&5
4570 (exit $ac_status); }; }; then
4571 cf_cv_ncurses_header=$cf_header; break
4573 echo "$as_me: failed program was:" >&5
4574 cat conftest.$ac_ext >&5
4576 rm -f conftest.$ac_objext conftest.$ac_ext
4580 echo "$as_me:4580: result: $cf_cv_ncurses_header" >&5
4581 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4583 if test "$cf_cv_ncurses_header" = none ; then
4584 { { echo "$as_me:4584: error: No curses header-files found" >&5
4585 echo "$as_me: error: No curses header-files found" >&2;}
4586 { (exit 1); exit 1; }; }
4589 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4591 for ac_header in $cf_cv_ncurses_header
4593 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4594 echo "$as_me:4594: checking for $ac_header" >&5
4595 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4596 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4597 echo $ECHO_N "(cached) $ECHO_C" >&6
4599 cat >conftest.$ac_ext <<_ACEOF
4600 #line 4600 "configure"
4601 #include "confdefs.h"
4602 #include <$ac_header>
4604 if { (eval echo "$as_me:4604: \"$ac_cpp conftest.$ac_ext\"") >&5
4605 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4607 egrep -v '^ *\+' conftest.er1 >conftest.err
4609 cat conftest.err >&5
4610 echo "$as_me:4610: \$? = $ac_status" >&5
4611 (exit $ac_status); } >/dev/null; then
4612 if test -s conftest.err; then
4613 ac_cpp_err=$ac_c_preproc_warn_flag
4620 if test -z "$ac_cpp_err"; then
4621 eval "$as_ac_Header=yes"
4623 echo "$as_me: failed program was:" >&5
4624 cat conftest.$ac_ext >&5
4625 eval "$as_ac_Header=no"
4627 rm -f conftest.err conftest.$ac_ext
4629 echo "$as_me:4629: result: `eval echo '${'$as_ac_Header'}'`" >&5
4630 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4631 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4632 cat >>confdefs.h <<EOF
4633 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4639 cat >>confdefs.h <<\EOF
4643 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4645 cat >>confdefs.h <<EOF
4646 #define $cf_nculib_ROOT 1
4649 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4653 cf_ncuhdr_root=ncurses
4655 test -n "$cf_cv_curses_dir" && \
4656 test "$cf_cv_curses_dir" != "no" && { \
4658 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4659 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
4661 while test $cf_add_incdir != /usr/include
4663 if test -d $cf_add_incdir
4666 if test -n "$CFLAGS$CPPFLAGS" ; then
4667 # a loop is needed to ensure we can add subdirs of existing dirs
4668 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4669 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4670 cf_have_incdir=yes; break
4675 if test "$cf_have_incdir" = no ; then
4676 if test "$cf_add_incdir" = /usr/local/include ; then
4677 if test "$GCC" = yes
4679 cf_save_CPPFLAGS=$CPPFLAGS
4681 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4682 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4684 cat >conftest.$ac_ext <<_ACEOF
4685 #line 4685 "configure"
4686 #include "confdefs.h"
4696 rm -f conftest.$ac_objext
4697 if { (eval echo "$as_me:4697: \"$ac_compile\"") >&5
4698 (eval $ac_compile) 2>&5
4700 echo "$as_me:4700: \$? = $ac_status" >&5
4701 (exit $ac_status); } &&
4702 { ac_try='test -s conftest.$ac_objext'
4703 { (eval echo "$as_me:4703: \"$ac_try\"") >&5
4706 echo "$as_me:4706: \$? = $ac_status" >&5
4707 (exit $ac_status); }; }; then
4710 echo "$as_me: failed program was:" >&5
4711 cat conftest.$ac_ext >&5
4714 rm -f conftest.$ac_objext conftest.$ac_ext
4715 CPPFLAGS=$cf_save_CPPFLAGS
4720 if test "$cf_have_incdir" = no ; then
4721 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4723 echo "${as_me:-configure}:4723: testing adding $cf_add_incdir to include-path ..." 1>&5
4725 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4727 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4728 test "$cf_top_incdir" = "$cf_add_incdir" && break
4729 cf_add_incdir="$cf_top_incdir"
4742 echo "$as_me:4742: checking for $cf_ncuhdr_root header in include-path" >&5
4743 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
4744 if test "${cf_cv_ncurses_h+set}" = set; then
4745 echo $ECHO_N "(cached) $ECHO_C" >&6
4748 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4749 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4750 for cf_header in $cf_header_list
4753 cat >conftest.$ac_ext <<_ACEOF
4754 #line 4754 "configure"
4755 #include "confdefs.h"
4757 #include <$cf_header>
4762 #ifdef NCURSES_VERSION
4764 printf("%s\n", NCURSES_VERSION);
4777 rm -f conftest.$ac_objext
4778 if { (eval echo "$as_me:4778: \"$ac_compile\"") >&5
4779 (eval $ac_compile) 2>&5
4781 echo "$as_me:4781: \$? = $ac_status" >&5
4782 (exit $ac_status); } &&
4783 { ac_try='test -s conftest.$ac_objext'
4784 { (eval echo "$as_me:4784: \"$ac_try\"") >&5
4787 echo "$as_me:4787: \$? = $ac_status" >&5
4788 (exit $ac_status); }; }; then
4789 cf_cv_ncurses_h=$cf_header
4792 echo "$as_me: failed program was:" >&5
4793 cat conftest.$ac_ext >&5
4796 rm -f conftest.$ac_objext conftest.$ac_ext
4798 test "$cf_cv_ncurses_h" != no && break
4802 echo "$as_me:4802: result: $cf_cv_ncurses_h" >&5
4803 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
4805 if test "$cf_cv_ncurses_h" != no ; then
4806 cf_cv_ncurses_header=$cf_cv_ncurses_h
4809 echo "$as_me:4809: checking for $cf_ncuhdr_root include-path" >&5
4810 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
4811 if test "${cf_cv_ncurses_h2+set}" = set; then
4812 echo $ECHO_N "(cached) $ECHO_C" >&6
4815 test -n "$verbose" && echo
4819 # collect the current set of include-directories from compiler flags
4820 cf_header_path_list=""
4821 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4822 for cf_header_path in $CPPFLAGS $CFLAGS
4824 case $cf_header_path in
4826 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4828 test "x$cf_header_path" != "xNONE" && \
4829 test -d "$cf_header_path" && \
4831 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4832 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4833 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4834 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4835 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4836 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"
4839 cf_header_path_list="$cf_header_path_list $cf_search"
4845 # add the variations for the package we are looking for
4849 test "x$prefix" != "xNONE" && \
4850 test -d "$prefix" && \
4852 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4853 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4854 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4855 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4856 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4857 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4860 for cf_subdir_prefix in \
4869 test "x$cf_subdir_prefix" != "x$prefix" && \
4870 test -d "$cf_subdir_prefix" && \
4871 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
4872 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
4873 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
4874 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
4875 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
4876 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
4877 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"
4882 test "$includedir" != NONE && \
4883 test "$includedir" != "/usr/include" && \
4884 test -d "$includedir" && {
4885 test -d $includedir && cf_search="$cf_search $includedir"
4886 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4889 test "$oldincludedir" != NONE && \
4890 test "$oldincludedir" != "/usr/include" && \
4891 test -d "$oldincludedir" && {
4892 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4893 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4896 cf_search="$cf_search $cf_header_path_list"
4898 test -n "$verbose" && echo search path $cf_search
4899 cf_save2_CPPFLAGS="$CPPFLAGS"
4900 for cf_incdir in $cf_search
4903 if test -n "$cf_incdir" ; then
4904 for cf_add_incdir in $cf_incdir
4906 while test $cf_add_incdir != /usr/include
4908 if test -d $cf_add_incdir
4911 if test -n "$CFLAGS$CPPFLAGS" ; then
4912 # a loop is needed to ensure we can add subdirs of existing dirs
4913 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4914 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4915 cf_have_incdir=yes; break
4920 if test "$cf_have_incdir" = no ; then
4921 if test "$cf_add_incdir" = /usr/local/include ; then
4922 if test "$GCC" = yes
4924 cf_save_CPPFLAGS=$CPPFLAGS
4926 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4927 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4929 cat >conftest.$ac_ext <<_ACEOF
4930 #line 4930 "configure"
4931 #include "confdefs.h"
4941 rm -f conftest.$ac_objext
4942 if { (eval echo "$as_me:4942: \"$ac_compile\"") >&5
4943 (eval $ac_compile) 2>&5
4945 echo "$as_me:4945: \$? = $ac_status" >&5
4946 (exit $ac_status); } &&
4947 { ac_try='test -s conftest.$ac_objext'
4948 { (eval echo "$as_me:4948: \"$ac_try\"") >&5
4951 echo "$as_me:4951: \$? = $ac_status" >&5
4952 (exit $ac_status); }; }; then
4955 echo "$as_me: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4959 rm -f conftest.$ac_objext conftest.$ac_ext
4960 CPPFLAGS=$cf_save_CPPFLAGS
4965 if test "$cf_have_incdir" = no ; then
4966 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4968 echo "${as_me:-configure}:4968: testing adding $cf_add_incdir to include-path ..." 1>&5
4970 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4972 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4973 test "$cf_top_incdir" = "$cf_add_incdir" && break
4974 cf_add_incdir="$cf_top_incdir"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4994 #include <$cf_header>
4999 #ifdef NCURSES_VERSION
5001 printf("%s\n", NCURSES_VERSION);
5014 rm -f conftest.$ac_objext
5015 if { (eval echo "$as_me:5015: \"$ac_compile\"") >&5
5016 (eval $ac_compile) 2>&5
5018 echo "$as_me:5018: \$? = $ac_status" >&5
5019 (exit $ac_status); } &&
5020 { ac_try='test -s conftest.$ac_objext'
5021 { (eval echo "$as_me:5021: \"$ac_try\"") >&5
5024 echo "$as_me:5024: \$? = $ac_status" >&5
5025 (exit $ac_status); }; }; then
5026 cf_cv_ncurses_h2=$cf_header
5029 echo "$as_me: failed program was:" >&5
5030 cat conftest.$ac_ext >&5
5033 rm -f conftest.$ac_objext conftest.$ac_ext
5035 if test "$cf_cv_ncurses_h2" != no ; then
5036 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5037 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5040 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5042 CPPFLAGS="$cf_save2_CPPFLAGS"
5043 test "$cf_cv_ncurses_h2" != no && break
5045 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5045: error: not found" >&5
5046 echo "$as_me: error: not found" >&2;}
5047 { (exit 1); exit 1; }; }
5050 echo "$as_me:5050: result: $cf_cv_ncurses_h2" >&5
5051 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5053 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5054 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5055 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5056 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5059 if test -n "$cf_1st_incdir" ; then
5060 for cf_add_incdir in $cf_1st_incdir
5062 while test $cf_add_incdir != /usr/include
5064 if test -d $cf_add_incdir
5067 if test -n "$CFLAGS$CPPFLAGS" ; then
5068 # a loop is needed to ensure we can add subdirs of existing dirs
5069 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5070 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5071 cf_have_incdir=yes; break
5076 if test "$cf_have_incdir" = no ; then
5077 if test "$cf_add_incdir" = /usr/local/include ; then
5078 if test "$GCC" = yes
5080 cf_save_CPPFLAGS=$CPPFLAGS
5082 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5083 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5085 cat >conftest.$ac_ext <<_ACEOF
5086 #line 5086 "configure"
5087 #include "confdefs.h"
5097 rm -f conftest.$ac_objext
5098 if { (eval echo "$as_me:5098: \"$ac_compile\"") >&5
5099 (eval $ac_compile) 2>&5
5101 echo "$as_me:5101: \$? = $ac_status" >&5
5102 (exit $ac_status); } &&
5103 { ac_try='test -s conftest.$ac_objext'
5104 { (eval echo "$as_me:5104: \"$ac_try\"") >&5
5107 echo "$as_me:5107: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
5111 echo "$as_me: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5115 rm -f conftest.$ac_objext conftest.$ac_ext
5116 CPPFLAGS=$cf_save_CPPFLAGS
5121 if test "$cf_have_incdir" = no ; then
5122 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5124 echo "${as_me:-configure}:5124: testing adding $cf_add_incdir to include-path ..." 1>&5
5126 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5128 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5129 test "$cf_top_incdir" = "$cf_add_incdir" && break
5130 cf_add_incdir="$cf_top_incdir"
5143 # Set definitions to allow ifdef'ing for ncurses.h
5145 case $cf_cv_ncurses_header in
5148 cat >>confdefs.h <<\EOF
5149 #define HAVE_NCURSES_H 1
5155 case $cf_cv_ncurses_header in
5156 (ncurses/curses.h|ncurses/ncurses.h)
5158 cat >>confdefs.h <<\EOF
5159 #define HAVE_NCURSES_NCURSES_H 1
5163 (ncursesw/curses.h|ncursesw/ncurses.h)
5165 cat >>confdefs.h <<\EOF
5166 #define HAVE_NCURSESW_NCURSES_H 1
5172 echo "$as_me:5172: checking for terminfo header" >&5
5173 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5174 if test "${cf_cv_term_header+set}" = set; then
5175 echo $ECHO_N "(cached) $ECHO_C" >&6
5178 case ${cf_cv_ncurses_header} in
5179 (*/ncurses.h|*/ncursesw.h)
5180 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5183 cf_term_header=term.h
5187 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5189 cat >conftest.$ac_ext <<_ACEOF
5190 #line 5190 "configure"
5191 #include "confdefs.h"
5193 #include <${cf_cv_ncurses_header:-curses.h}>
5199 int x = auto_left_margin
5204 rm -f conftest.$ac_objext
5205 if { (eval echo "$as_me:5205: \"$ac_compile\"") >&5
5206 (eval $ac_compile) 2>&5
5208 echo "$as_me:5208: \$? = $ac_status" >&5
5209 (exit $ac_status); } &&
5210 { ac_try='test -s conftest.$ac_objext'
5211 { (eval echo "$as_me:5211: \"$ac_try\"") >&5
5214 echo "$as_me:5214: \$? = $ac_status" >&5
5215 (exit $ac_status); }; }; then
5217 cf_cv_term_header="$cf_test"
5219 echo "$as_me: failed program was:" >&5
5220 cat conftest.$ac_ext >&5
5222 cf_cv_term_header=unknown
5225 rm -f conftest.$ac_objext conftest.$ac_ext
5226 test "$cf_cv_term_header" != unknown && break
5230 echo "$as_me:5230: result: $cf_cv_term_header" >&5
5231 echo "${ECHO_T}$cf_cv_term_header" >&6
5233 # Set definitions to allow ifdef'ing to accommodate subdirectories
5235 case $cf_cv_term_header in
5238 cat >>confdefs.h <<\EOF
5239 #define HAVE_TERM_H 1
5245 case $cf_cv_term_header in
5248 cat >>confdefs.h <<\EOF
5249 #define HAVE_NCURSES_TERM_H 1
5255 cat >>confdefs.h <<\EOF
5256 #define HAVE_NCURSESW_TERM_H 1
5262 # some applications need this, but should check for NCURSES_VERSION
5264 cat >>confdefs.h <<\EOF
5268 echo "$as_me:5268: checking for ncurses version" >&5
5269 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5270 if test "${cf_cv_ncurses_version+set}" = set; then
5271 echo $ECHO_N "(cached) $ECHO_C" >&6
5274 cf_cv_ncurses_version=no
5277 if test "$cross_compiling" = yes; then
5279 # This will not work if the preprocessor splits the line after the
5280 # Autoconf token. The 'unproto' program does that.
5281 cat > conftest.$ac_ext <<EOF
5282 #include <${cf_cv_ncurses_header:-curses.h}>
5284 #ifdef NCURSES_VERSION
5285 Autoconf NCURSES_VERSION
5293 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5294 { (eval echo "$as_me:5294: \"$cf_try\"") >&5
5297 echo "$as_me:5297: \$? = $ac_status" >&5
5298 (exit $ac_status); }
5299 if test -f conftest.out ; then
5300 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5301 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5306 cat >conftest.$ac_ext <<_ACEOF
5307 #line 5307 "configure"
5308 #include "confdefs.h"
5310 #include <${cf_cv_ncurses_header:-curses.h}>
5314 FILE *fp = fopen("$cf_tempfile", "w");
5315 #ifdef NCURSES_VERSION
5316 # ifdef NCURSES_VERSION_PATCH
5317 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5319 fprintf(fp, "%s\n", NCURSES_VERSION);
5323 fprintf(fp, "old\n");
5328 ${cf_cv_main_return:-return}(0);
5331 rm -f conftest$ac_exeext
5332 if { (eval echo "$as_me:5332: \"$ac_link\"") >&5
5333 (eval $ac_link) 2>&5
5335 echo "$as_me:5335: \$? = $ac_status" >&5
5336 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5337 { (eval echo "$as_me:5337: \"$ac_try\"") >&5
5340 echo "$as_me:5340: \$? = $ac_status" >&5
5341 (exit $ac_status); }; }; then
5343 cf_cv_ncurses_version=`cat $cf_tempfile`
5345 echo "$as_me: program exited with status $ac_status" >&5
5346 echo "$as_me: failed program was:" >&5
5347 cat conftest.$ac_ext >&5
5349 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5354 echo "$as_me:5354: result: $cf_cv_ncurses_version" >&5
5355 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5356 test "$cf_cv_ncurses_version" = no ||
5357 cat >>confdefs.h <<\EOF
5361 cf_nculib_root=ncurses
5362 # This works, except for the special case where we find gpm, but
5363 # ncurses is in a nonstandard location via $LIBS, and we really want
5366 cf_ncurses_SAVE="$LIBS"
5367 echo "$as_me:5367: checking for Gpm_Open in -lgpm" >&5
5368 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5369 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5370 echo $ECHO_N "(cached) $ECHO_C" >&6
5372 ac_check_lib_save_LIBS=$LIBS
5374 cat >conftest.$ac_ext <<_ACEOF
5375 #line 5375 "configure"
5376 #include "confdefs.h"
5378 /* Override any gcc2 internal prototype to avoid an error. */
5382 /* We use char because int might match the return type of a gcc2
5383 builtin and then its argument prototype would still apply. */
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 ac_cv_lib_gpm_Gpm_Open=yes
5407 echo "$as_me: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5409 ac_cv_lib_gpm_Gpm_Open=no
5411 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5412 LIBS=$ac_check_lib_save_LIBS
5414 echo "$as_me:5414: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5415 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5416 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5417 echo "$as_me:5417: checking for initscr in -lgpm" >&5
5418 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5419 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5420 echo $ECHO_N "(cached) $ECHO_C" >&6
5422 ac_check_lib_save_LIBS=$LIBS
5424 cat >conftest.$ac_ext <<_ACEOF
5425 #line 5425 "configure"
5426 #include "confdefs.h"
5428 /* Override any gcc2 internal prototype to avoid an error. */
5432 /* We use char because int might match the return type of a gcc2
5433 builtin and then its argument prototype would still apply. */
5443 rm -f conftest.$ac_objext conftest$ac_exeext
5444 if { (eval echo "$as_me:5444: \"$ac_link\"") >&5
5445 (eval $ac_link) 2>&5
5447 echo "$as_me:5447: \$? = $ac_status" >&5
5448 (exit $ac_status); } &&
5449 { ac_try='test -s conftest$ac_exeext'
5450 { (eval echo "$as_me:5450: \"$ac_try\"") >&5
5453 echo "$as_me:5453: \$? = $ac_status" >&5
5454 (exit $ac_status); }; }; then
5455 ac_cv_lib_gpm_initscr=yes
5457 echo "$as_me: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 ac_cv_lib_gpm_initscr=no
5461 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5462 LIBS=$ac_check_lib_save_LIBS
5464 echo "$as_me:5464: result: $ac_cv_lib_gpm_initscr" >&5
5465 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5466 if test $ac_cv_lib_gpm_initscr = yes; then
5467 LIBS="$cf_ncurses_SAVE"
5469 cf_ncurses_LIBS="-lgpm"
5476 # This is only necessary if you are linking against an obsolete
5477 # version of ncurses (but it should do no harm, since it's static).
5478 if test "$cf_nculib_root" = ncurses ; then
5479 echo "$as_me:5479: checking for tgoto in -lmytinfo" >&5
5480 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5481 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5482 echo $ECHO_N "(cached) $ECHO_C" >&6
5484 ac_check_lib_save_LIBS=$LIBS
5485 LIBS="-lmytinfo $LIBS"
5486 cat >conftest.$ac_ext <<_ACEOF
5487 #line 5487 "configure"
5488 #include "confdefs.h"
5490 /* Override any gcc2 internal prototype to avoid an error. */
5494 /* We use char because int might match the return type of a gcc2
5495 builtin and then its argument prototype would still apply. */
5505 rm -f conftest.$ac_objext conftest$ac_exeext
5506 if { (eval echo "$as_me:5506: \"$ac_link\"") >&5
5507 (eval $ac_link) 2>&5
5509 echo "$as_me:5509: \$? = $ac_status" >&5
5510 (exit $ac_status); } &&
5511 { ac_try='test -s conftest$ac_exeext'
5512 { (eval echo "$as_me:5512: \"$ac_try\"") >&5
5515 echo "$as_me:5515: \$? = $ac_status" >&5
5516 (exit $ac_status); }; }; then
5517 ac_cv_lib_mytinfo_tgoto=yes
5519 echo "$as_me: failed program was:" >&5
5520 cat conftest.$ac_ext >&5
5521 ac_cv_lib_mytinfo_tgoto=no
5523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5524 LIBS=$ac_check_lib_save_LIBS
5526 echo "$as_me:5526: result: $ac_cv_lib_mytinfo_tgoto" >&5
5527 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5528 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5529 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5536 cf_add_libs="$cf_ncurses_LIBS"
5537 # Filter out duplicates - this happens with badly-designed ".pc" files...
5538 for cf_add_1lib in $LIBS
5540 for cf_add_2lib in $cf_add_libs
5542 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5548 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5552 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5555 cf_add_libs="-l$cf_nculib_root"
5556 # Filter out duplicates - this happens with badly-designed ".pc" files...
5557 for cf_add_1lib in $LIBS
5559 for cf_add_2lib in $cf_add_libs
5561 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5573 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5575 echo "$as_me:5575: checking for initscr" >&5
5576 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5577 if test "${ac_cv_func_initscr+set}" = set; then
5578 echo $ECHO_N "(cached) $ECHO_C" >&6
5580 cat >conftest.$ac_ext <<_ACEOF
5581 #line 5581 "configure"
5582 #include "confdefs.h"
5583 /* System header to define __stub macros and hopefully few prototypes,
5584 which can conflict with char initscr (); below. */
5586 /* Override any gcc2 internal prototype to avoid an error. */
5590 /* We use char because int might match the return type of a gcc2
5591 builtin and then its argument prototype would still apply. */
5598 /* The GNU C library defines this for functions which it implements
5599 to always fail with ENOSYS. Some functions are actually named
5600 something starting with __ and the normal name is an alias. */
5601 #if defined (__stub_initscr) || defined (__stub___initscr)
5604 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
5613 (eval $ac_link) 2>&5
5615 echo "$as_me:5615: \$? = $ac_status" >&5
5616 (exit $ac_status); } &&
5617 { ac_try='test -s conftest$ac_exeext'
5618 { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5621 echo "$as_me:5621: \$? = $ac_status" >&5
5622 (exit $ac_status); }; }; then
5623 ac_cv_func_initscr=yes
5625 echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 ac_cv_func_initscr=no
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5631 echo "$as_me:5631: result: $ac_cv_func_initscr" >&5
5632 echo "${ECHO_T}$ac_cv_func_initscr" >&6
5633 if test $ac_cv_func_initscr = yes; then
5634 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5637 cf_save_LIBS="$LIBS"
5638 echo "$as_me:5638: checking for initscr in -l$cf_nculib_root" >&5
5639 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
5640 LIBS="-l$cf_nculib_root $LIBS"
5641 cat >conftest.$ac_ext <<_ACEOF
5642 #line 5642 "configure"
5643 #include "confdefs.h"
5644 #include <${cf_cv_ncurses_header:-curses.h}>
5653 rm -f conftest.$ac_objext conftest$ac_exeext
5654 if { (eval echo "$as_me:5654: \"$ac_link\"") >&5
5655 (eval $ac_link) 2>&5
5657 echo "$as_me:5657: \$? = $ac_status" >&5
5658 (exit $ac_status); } &&
5659 { ac_try='test -s conftest$ac_exeext'
5660 { (eval echo "$as_me:5660: \"$ac_try\"") >&5
5663 echo "$as_me:5663: \$? = $ac_status" >&5
5664 (exit $ac_status); }; }; then
5665 echo "$as_me:5665: result: yes" >&5
5666 echo "${ECHO_T}yes" >&6
5667 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5670 echo "$as_me: failed program was:" >&5
5671 cat conftest.$ac_ext >&5
5672 echo "$as_me:5672: result: no" >&5
5673 echo "${ECHO_T}no" >&6
5676 cf_library_path_list=""
5677 if test -n "${LDFLAGS}${LIBS}" ; then
5678 for cf_library_path in $LDFLAGS $LIBS
5680 case $cf_library_path in
5682 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5684 test "x$cf_library_path" != "xNONE" && \
5685 test -d "$cf_library_path" && \
5687 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5688 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5689 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5690 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5691 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5692 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"
5695 cf_library_path_list="$cf_library_path_list $cf_search"
5703 test "x$prefix" != "xNONE" && \
5704 test -d "$prefix" && \
5706 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5707 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5708 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5709 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5710 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5711 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5714 for cf_subdir_prefix in \
5723 test "x$cf_subdir_prefix" != "x$prefix" && \
5724 test -d "$cf_subdir_prefix" && \
5725 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5726 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
5727 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
5728 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
5729 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
5730 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
5731 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"
5736 cf_search="$cf_library_path_list $cf_search"
5738 for cf_libdir in $cf_search
5740 echo "$as_me:5740: checking for -l$cf_nculib_root in $cf_libdir" >&5
5741 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
5742 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5743 cat >conftest.$ac_ext <<_ACEOF
5744 #line 5744 "configure"
5745 #include "confdefs.h"
5746 #include <${cf_cv_ncurses_header:-curses.h}>
5755 rm -f conftest.$ac_objext conftest$ac_exeext
5756 if { (eval echo "$as_me:5756: \"$ac_link\"") >&5
5757 (eval $ac_link) 2>&5
5759 echo "$as_me:5759: \$? = $ac_status" >&5
5760 (exit $ac_status); } &&
5761 { ac_try='test -s conftest$ac_exeext'
5762 { (eval echo "$as_me:5762: \"$ac_try\"") >&5
5765 echo "$as_me:5765: \$? = $ac_status" >&5
5766 (exit $ac_status); }; }; then
5767 echo "$as_me:5767: result: yes" >&5
5768 echo "${ECHO_T}yes" >&6
5769 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5772 echo "$as_me: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
5774 echo "$as_me:5774: result: no" >&5
5775 echo "${ECHO_T}no" >&6
5776 LIBS="$cf_save_LIBS"
5778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5786 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5788 if test $cf_found_library = no ; then
5789 { { echo "$as_me:5789: error: Cannot link $cf_nculib_root library" >&5
5790 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
5791 { (exit 1); exit 1; }; }
5796 if test -n "$cf_ncurses_LIBS" ; then
5797 echo "$as_me:5797: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5798 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
5799 cf_ncurses_SAVE="$LIBS"
5800 for p in $cf_ncurses_LIBS ; do
5801 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5802 if test "$q" != "$LIBS" ; then
5806 cat >conftest.$ac_ext <<_ACEOF
5807 #line 5807 "configure"
5808 #include "confdefs.h"
5809 #include <${cf_cv_ncurses_header:-curses.h}>
5813 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5818 rm -f conftest.$ac_objext conftest$ac_exeext
5819 if { (eval echo "$as_me:5819: \"$ac_link\"") >&5
5820 (eval $ac_link) 2>&5
5822 echo "$as_me:5822: \$? = $ac_status" >&5
5823 (exit $ac_status); } &&
5824 { ac_try='test -s conftest$ac_exeext'
5825 { (eval echo "$as_me:5825: \"$ac_try\"") >&5
5828 echo "$as_me:5828: \$? = $ac_status" >&5
5829 (exit $ac_status); }; }; then
5830 echo "$as_me:5830: result: yes" >&5
5831 echo "${ECHO_T}yes" >&6
5833 echo "$as_me: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
5835 echo "$as_me:5835: result: no" >&5
5836 echo "${ECHO_T}no" >&6
5837 LIBS="$cf_ncurses_SAVE"
5839 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5842 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5844 cat >>confdefs.h <<EOF
5845 #define $cf_nculib_ROOT 1
5853 echo "$as_me:5853: checking if you want wide-character code" >&5
5854 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
5856 # Check whether --enable-widec or --disable-widec was given.
5857 if test "${enable_widec+set}" = set; then
5858 enableval="$enable_widec"
5859 with_widec=$enableval
5863 echo "$as_me:5863: result: $with_widec" >&5
5864 echo "${ECHO_T}$with_widec" >&6
5865 if test "$with_widec" = yes ; then
5867 echo "$as_me:5867: checking for multibyte character support" >&5
5868 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
5869 if test "${cf_cv_utf8_lib+set}" = set; then
5870 echo $ECHO_N "(cached) $ECHO_C" >&6
5873 cf_save_LIBS="$LIBS"
5874 cat >conftest.$ac_ext <<_ACEOF
5875 #line 5875 "configure"
5876 #include "confdefs.h"
5887 rm -f conftest.$ac_objext conftest$ac_exeext
5888 if { (eval echo "$as_me:5888: \"$ac_link\"") >&5
5889 (eval $ac_link) 2>&5
5891 echo "$as_me:5891: \$? = $ac_status" >&5
5892 (exit $ac_status); } &&
5893 { ac_try='test -s conftest$ac_exeext'
5894 { (eval echo "$as_me:5894: \"$ac_try\"") >&5
5897 echo "$as_me:5897: \$? = $ac_status" >&5
5898 (exit $ac_status); }; }; then
5901 echo "$as_me: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5904 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
5905 # will be set on completion of the AC_TRY_LINK below.
5906 cf_cv_header_path_utf8=
5907 cf_cv_library_path_utf8=
5909 echo "${as_me:-configure}:5909: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
5911 cf_save_LIBS="$LIBS"
5913 cat >conftest.$ac_ext <<_ACEOF
5914 #line 5914 "configure"
5915 #include "confdefs.h"
5917 #include <libutf8.h>
5926 rm -f conftest.$ac_objext conftest$ac_exeext
5927 if { (eval echo "$as_me:5927: \"$ac_link\"") >&5
5928 (eval $ac_link) 2>&5
5930 echo "$as_me:5930: \$? = $ac_status" >&5
5931 (exit $ac_status); } &&
5932 { ac_try='test -s conftest$ac_exeext'
5933 { (eval echo "$as_me:5933: \"$ac_try\"") >&5
5936 echo "$as_me:5936: \$? = $ac_status" >&5
5937 (exit $ac_status); }; }; then
5939 cf_cv_find_linkage_utf8=yes
5940 cf_cv_header_path_utf8=/usr/include
5941 cf_cv_library_path_utf8=/usr/lib
5944 echo "$as_me: failed program was:" >&5
5945 cat conftest.$ac_ext >&5
5947 LIBS="-lutf8 $cf_save_LIBS"
5949 cat >conftest.$ac_ext <<_ACEOF
5950 #line 5950 "configure"
5951 #include "confdefs.h"
5953 #include <libutf8.h>
5962 rm -f conftest.$ac_objext conftest$ac_exeext
5963 if { (eval echo "$as_me:5963: \"$ac_link\"") >&5
5964 (eval $ac_link) 2>&5
5966 echo "$as_me:5966: \$? = $ac_status" >&5
5967 (exit $ac_status); } &&
5968 { ac_try='test -s conftest$ac_exeext'
5969 { (eval echo "$as_me:5969: \"$ac_try\"") >&5
5972 echo "$as_me:5972: \$? = $ac_status" >&5
5973 (exit $ac_status); }; }; then
5975 cf_cv_find_linkage_utf8=yes
5976 cf_cv_header_path_utf8=/usr/include
5977 cf_cv_library_path_utf8=/usr/lib
5978 cf_cv_library_file_utf8="-lutf8"
5981 echo "$as_me: failed program was:" >&5
5982 cat conftest.$ac_ext >&5
5984 cf_cv_find_linkage_utf8=no
5985 LIBS="$cf_save_LIBS"
5987 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5989 echo "${as_me:-configure}:5989: testing find linkage for utf8 library ..." 1>&5
5991 echo "${as_me:-configure}:5991: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5993 cf_save_CPPFLAGS="$CPPFLAGS"
5994 cf_test_CPPFLAGS="$CPPFLAGS"
5998 # collect the current set of include-directories from compiler flags
5999 cf_header_path_list=""
6000 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6001 for cf_header_path in $CPPFLAGS $CFLAGS
6003 case $cf_header_path in
6005 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6007 test "x$cf_header_path" != "xNONE" && \
6008 test -d "$cf_header_path" && \
6010 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6011 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6012 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6013 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6014 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6015 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6018 cf_header_path_list="$cf_header_path_list $cf_search"
6024 # add the variations for the package we are looking for
6028 test "x$prefix" != "xNONE" && \
6029 test -d "$prefix" && \
6031 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6032 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6033 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6034 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6035 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6036 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6039 for cf_subdir_prefix in \
6048 test "x$cf_subdir_prefix" != "x$prefix" && \
6049 test -d "$cf_subdir_prefix" && \
6050 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6051 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6052 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6053 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6054 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6055 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6056 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6061 test "$includedir" != NONE && \
6062 test "$includedir" != "/usr/include" && \
6063 test -d "$includedir" && {
6064 test -d $includedir && cf_search="$cf_search $includedir"
6065 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6068 test "$oldincludedir" != NONE && \
6069 test "$oldincludedir" != "/usr/include" && \
6070 test -d "$oldincludedir" && {
6071 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6072 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6075 cf_search="$cf_search $cf_header_path_list"
6077 for cf_cv_header_path_utf8 in $cf_search
6079 if test -d $cf_cv_header_path_utf8 ; then
6080 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6082 echo "${as_me:-configure}:6082: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6084 CPPFLAGS="$cf_save_CPPFLAGS"
6086 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6087 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6089 cat >conftest.$ac_ext <<_ACEOF
6090 #line 6090 "configure"
6091 #include "confdefs.h"
6093 #include <libutf8.h>
6102 rm -f conftest.$ac_objext
6103 if { (eval echo "$as_me:6103: \"$ac_compile\"") >&5
6104 (eval $ac_compile) 2>&5
6106 echo "$as_me:6106: \$? = $ac_status" >&5
6107 (exit $ac_status); } &&
6108 { ac_try='test -s conftest.$ac_objext'
6109 { (eval echo "$as_me:6109: \"$ac_try\"") >&5
6112 echo "$as_me:6112: \$? = $ac_status" >&5
6113 (exit $ac_status); }; }; then
6115 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6117 echo "${as_me:-configure}:6117: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6119 cf_cv_find_linkage_utf8=maybe
6120 cf_test_CPPFLAGS="$CPPFLAGS"
6123 echo "$as_me: failed program was:" >&5
6124 cat conftest.$ac_ext >&5
6126 CPPFLAGS="$cf_save_CPPFLAGS"
6129 rm -f conftest.$ac_objext conftest.$ac_ext
6133 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6135 echo "${as_me:-configure}:6135: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6137 cf_save_LIBS="$LIBS"
6138 cf_save_LDFLAGS="$LDFLAGS"
6140 if test "$cf_cv_find_linkage_utf8" != yes ; then
6143 cf_library_path_list=""
6144 if test -n "${LDFLAGS}${LIBS}" ; then
6145 for cf_library_path in $LDFLAGS $LIBS
6147 case $cf_library_path in
6149 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6151 test "x$cf_library_path" != "xNONE" && \
6152 test -d "$cf_library_path" && \
6154 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6155 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6156 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6157 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6158 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6159 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6162 cf_library_path_list="$cf_library_path_list $cf_search"
6170 test "x$prefix" != "xNONE" && \
6171 test -d "$prefix" && \
6173 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6174 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6175 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6176 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6177 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6178 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6181 for cf_subdir_prefix in \
6190 test "x$cf_subdir_prefix" != "x$prefix" && \
6191 test -d "$cf_subdir_prefix" && \
6192 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6193 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6194 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6195 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6196 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6197 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6198 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6203 cf_search="$cf_library_path_list $cf_search"
6205 for cf_cv_library_path_utf8 in $cf_search
6207 if test -d $cf_cv_library_path_utf8 ; then
6208 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6210 echo "${as_me:-configure}:6210: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6212 CPPFLAGS="$cf_test_CPPFLAGS"
6213 LIBS="-lutf8 $cf_save_LIBS"
6214 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6215 cat >conftest.$ac_ext <<_ACEOF
6216 #line 6216 "configure"
6217 #include "confdefs.h"
6219 #include <libutf8.h>
6228 rm -f conftest.$ac_objext conftest$ac_exeext
6229 if { (eval echo "$as_me:6229: \"$ac_link\"") >&5
6230 (eval $ac_link) 2>&5
6232 echo "$as_me:6232: \$? = $ac_status" >&5
6233 (exit $ac_status); } &&
6234 { ac_try='test -s conftest$ac_exeext'
6235 { (eval echo "$as_me:6235: \"$ac_try\"") >&5
6238 echo "$as_me:6238: \$? = $ac_status" >&5
6239 (exit $ac_status); }; }; then
6241 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6243 echo "${as_me:-configure}:6243: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6245 cf_cv_find_linkage_utf8=yes
6246 cf_cv_library_file_utf8="-lutf8"
6249 echo "$as_me: failed program was:" >&5
6250 cat conftest.$ac_ext >&5
6252 CPPFLAGS="$cf_save_CPPFLAGS"
6253 LIBS="$cf_save_LIBS"
6254 LDFLAGS="$cf_save_LDFLAGS"
6257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6260 CPPFLAGS="$cf_save_CPPFLAGS"
6261 LDFLAGS="$cf_save_LDFLAGS"
6265 cf_cv_find_linkage_utf8=no
6269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6272 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6274 LIBS="$cf_save_LIBS"
6276 if test "$cf_cv_find_linkage_utf8" = yes ; then
6277 cf_cv_utf8_lib=add-on
6283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6285 echo "$as_me:6285: result: $cf_cv_utf8_lib" >&5
6286 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6288 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6290 if test "$cf_cv_utf8_lib" = "add-on" ; then
6292 cat >>confdefs.h <<\EOF
6293 #define HAVE_LIBUTF8_H 1
6296 if test -n "$cf_cv_header_path_utf8" ; then
6297 for cf_add_incdir in $cf_cv_header_path_utf8
6299 while test $cf_add_incdir != /usr/include
6301 if test -d $cf_add_incdir
6304 if test -n "$CFLAGS$CPPFLAGS" ; then
6305 # a loop is needed to ensure we can add subdirs of existing dirs
6306 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6307 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6308 cf_have_incdir=yes; break
6313 if test "$cf_have_incdir" = no ; then
6314 if test "$cf_add_incdir" = /usr/local/include ; then
6315 if test "$GCC" = yes
6317 cf_save_CPPFLAGS=$CPPFLAGS
6319 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6320 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6322 cat >conftest.$ac_ext <<_ACEOF
6323 #line 6323 "configure"
6324 #include "confdefs.h"
6334 rm -f conftest.$ac_objext
6335 if { (eval echo "$as_me:6335: \"$ac_compile\"") >&5
6336 (eval $ac_compile) 2>&5
6338 echo "$as_me:6338: \$? = $ac_status" >&5
6339 (exit $ac_status); } &&
6340 { ac_try='test -s conftest.$ac_objext'
6341 { (eval echo "$as_me:6341: \"$ac_try\"") >&5
6344 echo "$as_me:6344: \$? = $ac_status" >&5
6345 (exit $ac_status); }; }; then
6348 echo "$as_me: failed program was:" >&5
6349 cat conftest.$ac_ext >&5
6352 rm -f conftest.$ac_objext conftest.$ac_ext
6353 CPPFLAGS=$cf_save_CPPFLAGS
6358 if test "$cf_have_incdir" = no ; then
6359 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6361 echo "${as_me:-configure}:6361: testing adding $cf_add_incdir to include-path ..." 1>&5
6363 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6365 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6366 test "$cf_top_incdir" = "$cf_add_incdir" && break
6367 cf_add_incdir="$cf_top_incdir"
6378 if test -n "$cf_cv_library_path_utf8" ; then
6379 for cf_add_libdir in $cf_cv_library_path_utf8
6381 if test $cf_add_libdir = /usr/lib ; then
6383 elif test -d $cf_add_libdir
6386 if test -n "$LDFLAGS$LIBS" ; then
6387 # a loop is needed to ensure we can add subdirs of existing dirs
6388 for cf_test_libdir in $LDFLAGS $LIBS ; do
6389 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6390 cf_have_libdir=yes; break
6394 if test "$cf_have_libdir" = no ; then
6395 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6397 echo "${as_me:-configure}:6397: testing adding $cf_add_libdir to library-path ..." 1>&5
6399 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6405 cf_add_libs="$cf_cv_library_file_utf8"
6406 # Filter out duplicates - this happens with badly-designed ".pc" files...
6407 for cf_add_1lib in $LIBS
6409 for cf_add_2lib in $cf_add_libs
6411 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6417 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6423 cf_ncuconfig_root=ncursesw
6424 cf_have_ncuconfig=no
6426 if test "x${PKG_CONFIG:=none}" != xnone; then
6427 echo "$as_me:6427: checking pkg-config for $cf_ncuconfig_root" >&5
6428 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6429 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6430 echo "$as_me:6430: result: yes" >&5
6431 echo "${ECHO_T}yes" >&6
6433 echo "$as_me:6433: checking if the $cf_ncuconfig_root package files work" >&5
6434 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6435 cf_have_ncuconfig=unknown
6437 cf_save_CPPFLAGS="$CPPFLAGS"
6438 cf_save_LIBS="$LIBS"
6443 cf_new_extra_cppflags=
6445 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
6447 case $cf_fix_cppflags in
6449 case $cf_add_cflags in
6450 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6451 case $cf_add_cflags in
6453 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6455 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6456 && test -z "${cf_tst_cflags}" \
6457 && cf_fix_cppflags=yes
6459 if test $cf_fix_cppflags = yes ; then
6461 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6462 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6465 elif test "${cf_tst_cflags}" = "\"'" ; then
6467 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6468 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6478 case $cf_add_cflags in
6480 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6482 CPPFLAGS=`echo "$CPPFLAGS" | \
6483 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6484 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6489 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6490 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6497 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6498 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6505 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6506 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6508 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6510 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6511 && test -z "${cf_tst_cflags}" \
6512 && cf_fix_cppflags=no
6517 if test -n "$cf_new_cflags" ; then
6519 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6520 CFLAGS="${CFLAGS}$cf_new_cflags"
6524 if test -n "$cf_new_cppflags" ; then
6526 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6527 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6531 if test -n "$cf_new_extra_cppflags" ; then
6533 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6534 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6538 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
6539 # Filter out duplicates - this happens with badly-designed ".pc" files...
6540 for cf_add_1lib in $LIBS
6542 for cf_add_2lib in $cf_add_libs
6544 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6550 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6554 cat >conftest.$ac_ext <<_ACEOF
6555 #line 6555 "configure"
6556 #include "confdefs.h"
6557 #include <${cf_cv_ncurses_header:-curses.h}>
6561 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6566 rm -f conftest.$ac_objext conftest$ac_exeext
6567 if { (eval echo "$as_me:6567: \"$ac_link\"") >&5
6568 (eval $ac_link) 2>&5
6570 echo "$as_me:6570: \$? = $ac_status" >&5
6571 (exit $ac_status); } &&
6572 { ac_try='test -s conftest$ac_exeext'
6573 { (eval echo "$as_me:6573: \"$ac_try\"") >&5
6576 echo "$as_me:6576: \$? = $ac_status" >&5
6577 (exit $ac_status); }; }; then
6578 if test "$cross_compiling" = yes; then
6579 cf_have_ncuconfig=maybe
6581 cat >conftest.$ac_ext <<_ACEOF
6582 #line 6582 "configure"
6583 #include "confdefs.h"
6584 #include <${cf_cv_ncurses_header:-curses.h}>
6586 { char *xx = curses_version(); return (xx == 0); }
6588 rm -f conftest$ac_exeext
6589 if { (eval echo "$as_me:6589: \"$ac_link\"") >&5
6590 (eval $ac_link) 2>&5
6592 echo "$as_me:6592: \$? = $ac_status" >&5
6593 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6594 { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6597 echo "$as_me:6597: \$? = $ac_status" >&5
6598 (exit $ac_status); }; }; then
6599 cf_have_ncuconfig=yes
6601 echo "$as_me: program exited with status $ac_status" >&5
6602 echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 cf_have_ncuconfig=no
6606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6609 echo "$as_me: failed program was:" >&5
6610 cat conftest.$ac_ext >&5
6611 cf_have_ncuconfig=no
6613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6614 echo "$as_me:6614: result: $cf_have_ncuconfig" >&5
6615 echo "${ECHO_T}$cf_have_ncuconfig" >&6
6616 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
6617 if test "$cf_have_ncuconfig" != "yes"
6619 CPPFLAGS="$cf_save_CPPFLAGS"
6620 LIBS="$cf_save_LIBS"
6621 NCURSES_CONFIG_PKG=none
6624 cat >>confdefs.h <<\EOF
6628 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
6630 echo "$as_me:6630: checking for terminfo header" >&5
6631 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6632 if test "${cf_cv_term_header+set}" = set; then
6633 echo $ECHO_N "(cached) $ECHO_C" >&6
6636 case ${cf_cv_ncurses_header} in
6637 (*/ncurses.h|*/ncursesw.h)
6638 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6641 cf_term_header=term.h
6645 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6647 cat >conftest.$ac_ext <<_ACEOF
6648 #line 6648 "configure"
6649 #include "confdefs.h"
6651 #include <${cf_cv_ncurses_header:-curses.h}>
6657 int x = auto_left_margin
6662 rm -f conftest.$ac_objext
6663 if { (eval echo "$as_me:6663: \"$ac_compile\"") >&5
6664 (eval $ac_compile) 2>&5
6666 echo "$as_me:6666: \$? = $ac_status" >&5
6667 (exit $ac_status); } &&
6668 { ac_try='test -s conftest.$ac_objext'
6669 { (eval echo "$as_me:6669: \"$ac_try\"") >&5
6672 echo "$as_me:6672: \$? = $ac_status" >&5
6673 (exit $ac_status); }; }; then
6675 cf_cv_term_header="$cf_test"
6677 echo "$as_me: failed program was:" >&5
6678 cat conftest.$ac_ext >&5
6680 cf_cv_term_header=unknown
6683 rm -f conftest.$ac_objext conftest.$ac_ext
6684 test "$cf_cv_term_header" != unknown && break
6688 echo "$as_me:6688: result: $cf_cv_term_header" >&5
6689 echo "${ECHO_T}$cf_cv_term_header" >&6
6691 # Set definitions to allow ifdef'ing to accommodate subdirectories
6693 case $cf_cv_term_header in
6696 cat >>confdefs.h <<\EOF
6697 #define HAVE_TERM_H 1
6703 case $cf_cv_term_header in
6706 cat >>confdefs.h <<\EOF
6707 #define HAVE_NCURSES_TERM_H 1
6713 cat >>confdefs.h <<\EOF
6714 #define HAVE_NCURSESW_TERM_H 1
6723 echo "$as_me:6723: result: no" >&5
6724 echo "${ECHO_T}no" >&6
6725 NCURSES_CONFIG_PKG=none
6728 NCURSES_CONFIG_PKG=none
6731 if test "x$cf_have_ncuconfig" = "xno"; then
6732 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
6734 if test -n "$ac_tool_prefix"; then
6735 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6737 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6738 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6739 echo "$as_me:6739: checking for $ac_word" >&5
6740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6741 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6742 echo $ECHO_N "(cached) $ECHO_C" >&6
6744 if test -n "$NCURSES_CONFIG"; then
6745 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6747 ac_save_IFS=$IFS; IFS=$ac_path_separator
6749 for ac_dir in $ac_dummy; do
6751 test -z "$ac_dir" && ac_dir=.
6752 $as_executable_p "$ac_dir/$ac_word" || continue
6753 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6754 echo "$as_me:6754: found $ac_dir/$ac_word" >&5
6760 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6761 if test -n "$NCURSES_CONFIG"; then
6762 echo "$as_me:6762: result: $NCURSES_CONFIG" >&5
6763 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6765 echo "$as_me:6765: result: no" >&5
6766 echo "${ECHO_T}no" >&6
6769 test -n "$NCURSES_CONFIG" && break
6772 if test -z "$NCURSES_CONFIG"; then
6773 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6774 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6776 # Extract the first word of "$ac_prog", so it can be a program name with args.
6777 set dummy $ac_prog; ac_word=$2
6778 echo "$as_me:6778: checking for $ac_word" >&5
6779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6780 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6781 echo $ECHO_N "(cached) $ECHO_C" >&6
6783 if test -n "$ac_ct_NCURSES_CONFIG"; then
6784 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6786 ac_save_IFS=$IFS; IFS=$ac_path_separator
6788 for ac_dir in $ac_dummy; do
6790 test -z "$ac_dir" && ac_dir=.
6791 $as_executable_p "$ac_dir/$ac_word" || continue
6792 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6793 echo "$as_me:6793: found $ac_dir/$ac_word" >&5
6799 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6800 if test -n "$ac_ct_NCURSES_CONFIG"; then
6801 echo "$as_me:6801: result: $ac_ct_NCURSES_CONFIG" >&5
6802 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6804 echo "$as_me:6804: result: no" >&5
6805 echo "${ECHO_T}no" >&6
6808 test -n "$ac_ct_NCURSES_CONFIG" && break
6810 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6812 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6815 if test "$NCURSES_CONFIG" != none ; then
6820 cf_new_extra_cppflags=
6822 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
6824 case $cf_fix_cppflags in
6826 case $cf_add_cflags in
6827 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6828 case $cf_add_cflags in
6830 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6833 && test -z "${cf_tst_cflags}" \
6834 && cf_fix_cppflags=yes
6836 if test $cf_fix_cppflags = yes ; then
6838 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6839 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6842 elif test "${cf_tst_cflags}" = "\"'" ; then
6844 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6845 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6855 case $cf_add_cflags in
6857 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6859 CPPFLAGS=`echo "$CPPFLAGS" | \
6860 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6861 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6866 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6867 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6874 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6875 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6882 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6883 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6885 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6887 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6888 && test -z "${cf_tst_cflags}" \
6889 && cf_fix_cppflags=no
6894 if test -n "$cf_new_cflags" ; then
6896 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6897 CFLAGS="${CFLAGS}$cf_new_cflags"
6901 if test -n "$cf_new_cppflags" ; then
6903 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6904 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6908 if test -n "$cf_new_extra_cppflags" ; then
6910 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6911 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6915 cf_add_libs="`$NCURSES_CONFIG --libs`"
6916 # Filter out duplicates - this happens with badly-designed ".pc" files...
6917 for cf_add_1lib in $LIBS
6919 for cf_add_2lib in $cf_add_libs
6921 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6927 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6931 # even with config script, some packages use no-override for curses.h
6933 echo "$as_me:6933: checking if we have identified curses headers" >&5
6934 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6935 if test "${cf_cv_ncurses_header+set}" = set; then
6936 echo $ECHO_N "(cached) $ECHO_C" >&6
6939 cf_cv_ncurses_header=none
6941 ncurses.h ncursesw/ncurses.h \
6942 curses.h ncursesw/curses.h
6944 cat >conftest.$ac_ext <<_ACEOF
6945 #line 6945 "configure"
6946 #include "confdefs.h"
6947 #include <${cf_header}>
6951 initscr(); tgoto("?", 0,0)
6956 rm -f conftest.$ac_objext
6957 if { (eval echo "$as_me:6957: \"$ac_compile\"") >&5
6958 (eval $ac_compile) 2>&5
6960 echo "$as_me:6960: \$? = $ac_status" >&5
6961 (exit $ac_status); } &&
6962 { ac_try='test -s conftest.$ac_objext'
6963 { (eval echo "$as_me:6963: \"$ac_try\"") >&5
6966 echo "$as_me:6966: \$? = $ac_status" >&5
6967 (exit $ac_status); }; }; then
6968 cf_cv_ncurses_header=$cf_header; break
6970 echo "$as_me: failed program was:" >&5
6971 cat conftest.$ac_ext >&5
6973 rm -f conftest.$ac_objext conftest.$ac_ext
6977 echo "$as_me:6977: result: $cf_cv_ncurses_header" >&5
6978 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6980 if test "$cf_cv_ncurses_header" = none ; then
6981 { { echo "$as_me:6981: error: No curses header-files found" >&5
6982 echo "$as_me: error: No curses header-files found" >&2;}
6983 { (exit 1); exit 1; }; }
6986 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6988 for ac_header in $cf_cv_ncurses_header
6990 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6991 echo "$as_me:6991: checking for $ac_header" >&5
6992 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6993 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6994 echo $ECHO_N "(cached) $ECHO_C" >&6
6996 cat >conftest.$ac_ext <<_ACEOF
6997 #line 6997 "configure"
6998 #include "confdefs.h"
6999 #include <$ac_header>
7001 if { (eval echo "$as_me:7001: \"$ac_cpp conftest.$ac_ext\"") >&5
7002 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7004 egrep -v '^ *\+' conftest.er1 >conftest.err
7006 cat conftest.err >&5
7007 echo "$as_me:7007: \$? = $ac_status" >&5
7008 (exit $ac_status); } >/dev/null; then
7009 if test -s conftest.err; then
7010 ac_cpp_err=$ac_c_preproc_warn_flag
7017 if test -z "$ac_cpp_err"; then
7018 eval "$as_ac_Header=yes"
7020 echo "$as_me: failed program was:" >&5
7021 cat conftest.$ac_ext >&5
7022 eval "$as_ac_Header=no"
7024 rm -f conftest.err conftest.$ac_ext
7026 echo "$as_me:7026: result: `eval echo '${'$as_ac_Header'}'`" >&5
7027 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7028 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7029 cat >>confdefs.h <<EOF
7030 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7036 cat >>confdefs.h <<\EOF
7040 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7042 cat >>confdefs.h <<EOF
7043 #define $cf_nculib_ROOT 1
7046 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7050 cf_ncuhdr_root=ncursesw
7052 test -n "$cf_cv_curses_dir" && \
7053 test "$cf_cv_curses_dir" != "no" && { \
7055 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7056 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7058 while test $cf_add_incdir != /usr/include
7060 if test -d $cf_add_incdir
7063 if test -n "$CFLAGS$CPPFLAGS" ; then
7064 # a loop is needed to ensure we can add subdirs of existing dirs
7065 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7066 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7067 cf_have_incdir=yes; break
7072 if test "$cf_have_incdir" = no ; then
7073 if test "$cf_add_incdir" = /usr/local/include ; then
7074 if test "$GCC" = yes
7076 cf_save_CPPFLAGS=$CPPFLAGS
7078 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7079 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7081 cat >conftest.$ac_ext <<_ACEOF
7082 #line 7082 "configure"
7083 #include "confdefs.h"
7093 rm -f conftest.$ac_objext
7094 if { (eval echo "$as_me:7094: \"$ac_compile\"") >&5
7095 (eval $ac_compile) 2>&5
7097 echo "$as_me:7097: \$? = $ac_status" >&5
7098 (exit $ac_status); } &&
7099 { ac_try='test -s conftest.$ac_objext'
7100 { (eval echo "$as_me:7100: \"$ac_try\"") >&5
7103 echo "$as_me:7103: \$? = $ac_status" >&5
7104 (exit $ac_status); }; }; then
7107 echo "$as_me: failed program was:" >&5
7108 cat conftest.$ac_ext >&5
7111 rm -f conftest.$ac_objext conftest.$ac_ext
7112 CPPFLAGS=$cf_save_CPPFLAGS
7117 if test "$cf_have_incdir" = no ; then
7118 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7120 echo "${as_me:-configure}:7120: testing adding $cf_add_incdir to include-path ..." 1>&5
7122 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7124 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7125 test "$cf_top_incdir" = "$cf_add_incdir" && break
7126 cf_add_incdir="$cf_top_incdir"
7139 echo "$as_me:7139: checking for $cf_ncuhdr_root header in include-path" >&5
7140 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7141 if test "${cf_cv_ncurses_h+set}" = set; then
7142 echo $ECHO_N "(cached) $ECHO_C" >&6
7145 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7146 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7147 for cf_header in $cf_header_list
7150 cat >conftest.$ac_ext <<_ACEOF
7151 #line 7151 "configure"
7152 #include "confdefs.h"
7154 #define _XOPEN_SOURCE_EXTENDED
7155 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7156 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7158 #include <$cf_header>
7163 #ifdef NCURSES_VERSION
7169 printf("%s\n", NCURSES_VERSION);
7182 rm -f conftest.$ac_objext
7183 if { (eval echo "$as_me:7183: \"$ac_compile\"") >&5
7184 (eval $ac_compile) 2>&5
7186 echo "$as_me:7186: \$? = $ac_status" >&5
7187 (exit $ac_status); } &&
7188 { ac_try='test -s conftest.$ac_objext'
7189 { (eval echo "$as_me:7189: \"$ac_try\"") >&5
7192 echo "$as_me:7192: \$? = $ac_status" >&5
7193 (exit $ac_status); }; }; then
7194 cf_cv_ncurses_h=$cf_header
7197 echo "$as_me: failed program was:" >&5
7198 cat conftest.$ac_ext >&5
7201 rm -f conftest.$ac_objext conftest.$ac_ext
7203 test "$cf_cv_ncurses_h" != no && break
7207 echo "$as_me:7207: result: $cf_cv_ncurses_h" >&5
7208 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7210 if test "$cf_cv_ncurses_h" != no ; then
7211 cf_cv_ncurses_header=$cf_cv_ncurses_h
7214 echo "$as_me:7214: checking for $cf_ncuhdr_root include-path" >&5
7215 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7216 if test "${cf_cv_ncurses_h2+set}" = set; then
7217 echo $ECHO_N "(cached) $ECHO_C" >&6
7220 test -n "$verbose" && echo
7224 # collect the current set of include-directories from compiler flags
7225 cf_header_path_list=""
7226 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7227 for cf_header_path in $CPPFLAGS $CFLAGS
7229 case $cf_header_path in
7231 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7233 test "x$cf_header_path" != "xNONE" && \
7234 test -d "$cf_header_path" && \
7236 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7237 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7238 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7239 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7240 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7241 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"
7244 cf_header_path_list="$cf_header_path_list $cf_search"
7250 # add the variations for the package we are looking for
7254 test "x$prefix" != "xNONE" && \
7255 test -d "$prefix" && \
7257 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7258 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7259 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7260 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7261 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7262 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7265 for cf_subdir_prefix in \
7274 test "x$cf_subdir_prefix" != "x$prefix" && \
7275 test -d "$cf_subdir_prefix" && \
7276 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7277 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7278 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7279 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7280 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7281 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7282 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"
7287 test "$includedir" != NONE && \
7288 test "$includedir" != "/usr/include" && \
7289 test -d "$includedir" && {
7290 test -d $includedir && cf_search="$cf_search $includedir"
7291 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7294 test "$oldincludedir" != NONE && \
7295 test "$oldincludedir" != "/usr/include" && \
7296 test -d "$oldincludedir" && {
7297 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7298 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7301 cf_search="$cf_search $cf_header_path_list"
7303 test -n "$verbose" && echo search path $cf_search
7304 cf_save2_CPPFLAGS="$CPPFLAGS"
7305 for cf_incdir in $cf_search
7308 if test -n "$cf_incdir" ; then
7309 for cf_add_incdir in $cf_incdir
7311 while test $cf_add_incdir != /usr/include
7313 if test -d $cf_add_incdir
7316 if test -n "$CFLAGS$CPPFLAGS" ; then
7317 # a loop is needed to ensure we can add subdirs of existing dirs
7318 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7319 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7320 cf_have_incdir=yes; break
7325 if test "$cf_have_incdir" = no ; then
7326 if test "$cf_add_incdir" = /usr/local/include ; then
7327 if test "$GCC" = yes
7329 cf_save_CPPFLAGS=$CPPFLAGS
7331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7332 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7334 cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7346 rm -f conftest.$ac_objext
7347 if { (eval echo "$as_me:7347: \"$ac_compile\"") >&5
7348 (eval $ac_compile) 2>&5
7350 echo "$as_me:7350: \$? = $ac_status" >&5
7351 (exit $ac_status); } &&
7352 { ac_try='test -s conftest.$ac_objext'
7353 { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7356 echo "$as_me:7356: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7360 echo "$as_me: failed program was:" >&5
7361 cat conftest.$ac_ext >&5
7364 rm -f conftest.$ac_objext conftest.$ac_ext
7365 CPPFLAGS=$cf_save_CPPFLAGS
7370 if test "$cf_have_incdir" = no ; then
7371 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7373 echo "${as_me:-configure}:7373: testing adding $cf_add_incdir to include-path ..." 1>&5
7375 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7377 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7378 test "$cf_top_incdir" = "$cf_add_incdir" && break
7379 cf_add_incdir="$cf_top_incdir"
7395 cat >conftest.$ac_ext <<_ACEOF
7396 #line 7396 "configure"
7397 #include "confdefs.h"
7399 #include <$cf_header>
7404 #ifdef NCURSES_VERSION
7406 printf("%s\n", NCURSES_VERSION);
7419 rm -f conftest.$ac_objext
7420 if { (eval echo "$as_me:7420: \"$ac_compile\"") >&5
7421 (eval $ac_compile) 2>&5
7423 echo "$as_me:7423: \$? = $ac_status" >&5
7424 (exit $ac_status); } &&
7425 { ac_try='test -s conftest.$ac_objext'
7426 { (eval echo "$as_me:7426: \"$ac_try\"") >&5
7429 echo "$as_me:7429: \$? = $ac_status" >&5
7430 (exit $ac_status); }; }; then
7431 cf_cv_ncurses_h2=$cf_header
7434 echo "$as_me: failed program was:" >&5
7435 cat conftest.$ac_ext >&5
7438 rm -f conftest.$ac_objext conftest.$ac_ext
7440 if test "$cf_cv_ncurses_h2" != no ; then
7441 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7442 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7445 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7447 CPPFLAGS="$cf_save2_CPPFLAGS"
7448 test "$cf_cv_ncurses_h2" != no && break
7450 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7450: error: not found" >&5
7451 echo "$as_me: error: not found" >&2;}
7452 { (exit 1); exit 1; }; }
7455 echo "$as_me:7455: result: $cf_cv_ncurses_h2" >&5
7456 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7458 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7459 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7460 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7461 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7464 if test -n "$cf_1st_incdir" ; then
7465 for cf_add_incdir in $cf_1st_incdir
7467 while test $cf_add_incdir != /usr/include
7469 if test -d $cf_add_incdir
7472 if test -n "$CFLAGS$CPPFLAGS" ; then
7473 # a loop is needed to ensure we can add subdirs of existing dirs
7474 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7475 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7476 cf_have_incdir=yes; break
7481 if test "$cf_have_incdir" = no ; then
7482 if test "$cf_add_incdir" = /usr/local/include ; then
7483 if test "$GCC" = yes
7485 cf_save_CPPFLAGS=$CPPFLAGS
7487 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7488 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7490 cat >conftest.$ac_ext <<_ACEOF
7491 #line 7491 "configure"
7492 #include "confdefs.h"
7502 rm -f conftest.$ac_objext
7503 if { (eval echo "$as_me:7503: \"$ac_compile\"") >&5
7504 (eval $ac_compile) 2>&5
7506 echo "$as_me:7506: \$? = $ac_status" >&5
7507 (exit $ac_status); } &&
7508 { ac_try='test -s conftest.$ac_objext'
7509 { (eval echo "$as_me:7509: \"$ac_try\"") >&5
7512 echo "$as_me:7512: \$? = $ac_status" >&5
7513 (exit $ac_status); }; }; then
7516 echo "$as_me: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7520 rm -f conftest.$ac_objext conftest.$ac_ext
7521 CPPFLAGS=$cf_save_CPPFLAGS
7526 if test "$cf_have_incdir" = no ; then
7527 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7529 echo "${as_me:-configure}:7529: testing adding $cf_add_incdir to include-path ..." 1>&5
7531 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7533 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7534 test "$cf_top_incdir" = "$cf_add_incdir" && break
7535 cf_add_incdir="$cf_top_incdir"
7548 # Set definitions to allow ifdef'ing for ncurses.h
7550 case $cf_cv_ncurses_header in
7553 cat >>confdefs.h <<\EOF
7554 #define HAVE_NCURSES_H 1
7560 case $cf_cv_ncurses_header in
7561 (ncurses/curses.h|ncurses/ncurses.h)
7563 cat >>confdefs.h <<\EOF
7564 #define HAVE_NCURSES_NCURSES_H 1
7568 (ncursesw/curses.h|ncursesw/ncurses.h)
7570 cat >>confdefs.h <<\EOF
7571 #define HAVE_NCURSESW_NCURSES_H 1
7577 echo "$as_me:7577: checking for terminfo header" >&5
7578 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7579 if test "${cf_cv_term_header+set}" = set; then
7580 echo $ECHO_N "(cached) $ECHO_C" >&6
7583 case ${cf_cv_ncurses_header} in
7584 (*/ncurses.h|*/ncursesw.h)
7585 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7588 cf_term_header=term.h
7592 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7594 cat >conftest.$ac_ext <<_ACEOF
7595 #line 7595 "configure"
7596 #include "confdefs.h"
7598 #include <${cf_cv_ncurses_header:-curses.h}>
7604 int x = auto_left_margin
7609 rm -f conftest.$ac_objext
7610 if { (eval echo "$as_me:7610: \"$ac_compile\"") >&5
7611 (eval $ac_compile) 2>&5
7613 echo "$as_me:7613: \$? = $ac_status" >&5
7614 (exit $ac_status); } &&
7615 { ac_try='test -s conftest.$ac_objext'
7616 { (eval echo "$as_me:7616: \"$ac_try\"") >&5
7619 echo "$as_me:7619: \$? = $ac_status" >&5
7620 (exit $ac_status); }; }; then
7622 cf_cv_term_header="$cf_test"
7624 echo "$as_me: failed program was:" >&5
7625 cat conftest.$ac_ext >&5
7627 cf_cv_term_header=unknown
7630 rm -f conftest.$ac_objext conftest.$ac_ext
7631 test "$cf_cv_term_header" != unknown && break
7635 echo "$as_me:7635: result: $cf_cv_term_header" >&5
7636 echo "${ECHO_T}$cf_cv_term_header" >&6
7638 # Set definitions to allow ifdef'ing to accommodate subdirectories
7640 case $cf_cv_term_header in
7643 cat >>confdefs.h <<\EOF
7644 #define HAVE_TERM_H 1
7650 case $cf_cv_term_header in
7653 cat >>confdefs.h <<\EOF
7654 #define HAVE_NCURSES_TERM_H 1
7660 cat >>confdefs.h <<\EOF
7661 #define HAVE_NCURSESW_TERM_H 1
7667 # some applications need this, but should check for NCURSES_VERSION
7669 cat >>confdefs.h <<\EOF
7673 echo "$as_me:7673: checking for ncurses version" >&5
7674 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7675 if test "${cf_cv_ncurses_version+set}" = set; then
7676 echo $ECHO_N "(cached) $ECHO_C" >&6
7679 cf_cv_ncurses_version=no
7682 if test "$cross_compiling" = yes; then
7684 # This will not work if the preprocessor splits the line after the
7685 # Autoconf token. The 'unproto' program does that.
7686 cat > conftest.$ac_ext <<EOF
7687 #include <${cf_cv_ncurses_header:-curses.h}>
7689 #ifdef NCURSES_VERSION
7690 Autoconf NCURSES_VERSION
7698 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7699 { (eval echo "$as_me:7699: \"$cf_try\"") >&5
7702 echo "$as_me:7702: \$? = $ac_status" >&5
7703 (exit $ac_status); }
7704 if test -f conftest.out ; then
7705 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7706 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7711 cat >conftest.$ac_ext <<_ACEOF
7712 #line 7712 "configure"
7713 #include "confdefs.h"
7715 #include <${cf_cv_ncurses_header:-curses.h}>
7719 FILE *fp = fopen("$cf_tempfile", "w");
7720 #ifdef NCURSES_VERSION
7721 # ifdef NCURSES_VERSION_PATCH
7722 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7724 fprintf(fp, "%s\n", NCURSES_VERSION);
7728 fprintf(fp, "old\n");
7733 ${cf_cv_main_return:-return}(0);
7736 rm -f conftest$ac_exeext
7737 if { (eval echo "$as_me:7737: \"$ac_link\"") >&5
7738 (eval $ac_link) 2>&5
7740 echo "$as_me:7740: \$? = $ac_status" >&5
7741 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7742 { (eval echo "$as_me:7742: \"$ac_try\"") >&5
7745 echo "$as_me:7745: \$? = $ac_status" >&5
7746 (exit $ac_status); }; }; then
7748 cf_cv_ncurses_version=`cat $cf_tempfile`
7750 echo "$as_me: program exited with status $ac_status" >&5
7751 echo "$as_me: failed program was:" >&5
7752 cat conftest.$ac_ext >&5
7754 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7759 echo "$as_me:7759: result: $cf_cv_ncurses_version" >&5
7760 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7761 test "$cf_cv_ncurses_version" = no ||
7762 cat >>confdefs.h <<\EOF
7766 cf_nculib_root=ncursesw
7767 # This works, except for the special case where we find gpm, but
7768 # ncurses is in a nonstandard location via $LIBS, and we really want
7771 cf_ncurses_SAVE="$LIBS"
7772 echo "$as_me:7772: checking for Gpm_Open in -lgpm" >&5
7773 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7774 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7775 echo $ECHO_N "(cached) $ECHO_C" >&6
7777 ac_check_lib_save_LIBS=$LIBS
7779 cat >conftest.$ac_ext <<_ACEOF
7780 #line 7780 "configure"
7781 #include "confdefs.h"
7783 /* Override any gcc2 internal prototype to avoid an error. */
7787 /* We use char because int might match the return type of a gcc2
7788 builtin and then its argument prototype would still apply. */
7798 rm -f conftest.$ac_objext conftest$ac_exeext
7799 if { (eval echo "$as_me:7799: \"$ac_link\"") >&5
7800 (eval $ac_link) 2>&5
7802 echo "$as_me:7802: \$? = $ac_status" >&5
7803 (exit $ac_status); } &&
7804 { ac_try='test -s conftest$ac_exeext'
7805 { (eval echo "$as_me:7805: \"$ac_try\"") >&5
7808 echo "$as_me:7808: \$? = $ac_status" >&5
7809 (exit $ac_status); }; }; then
7810 ac_cv_lib_gpm_Gpm_Open=yes
7812 echo "$as_me: failed program was:" >&5
7813 cat conftest.$ac_ext >&5
7814 ac_cv_lib_gpm_Gpm_Open=no
7816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7817 LIBS=$ac_check_lib_save_LIBS
7819 echo "$as_me:7819: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7820 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7821 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7822 echo "$as_me:7822: checking for initscr in -lgpm" >&5
7823 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7824 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7825 echo $ECHO_N "(cached) $ECHO_C" >&6
7827 ac_check_lib_save_LIBS=$LIBS
7829 cat >conftest.$ac_ext <<_ACEOF
7830 #line 7830 "configure"
7831 #include "confdefs.h"
7833 /* Override any gcc2 internal prototype to avoid an error. */
7837 /* We use char because int might match the return type of a gcc2
7838 builtin and then its argument prototype would still apply. */
7848 rm -f conftest.$ac_objext conftest$ac_exeext
7849 if { (eval echo "$as_me:7849: \"$ac_link\"") >&5
7850 (eval $ac_link) 2>&5
7852 echo "$as_me:7852: \$? = $ac_status" >&5
7853 (exit $ac_status); } &&
7854 { ac_try='test -s conftest$ac_exeext'
7855 { (eval echo "$as_me:7855: \"$ac_try\"") >&5
7858 echo "$as_me:7858: \$? = $ac_status" >&5
7859 (exit $ac_status); }; }; then
7860 ac_cv_lib_gpm_initscr=yes
7862 echo "$as_me: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7864 ac_cv_lib_gpm_initscr=no
7866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7867 LIBS=$ac_check_lib_save_LIBS
7869 echo "$as_me:7869: result: $ac_cv_lib_gpm_initscr" >&5
7870 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7871 if test $ac_cv_lib_gpm_initscr = yes; then
7872 LIBS="$cf_ncurses_SAVE"
7874 cf_ncurses_LIBS="-lgpm"
7881 # This is only necessary if you are linking against an obsolete
7882 # version of ncurses (but it should do no harm, since it's static).
7883 if test "$cf_nculib_root" = ncurses ; then
7884 echo "$as_me:7884: checking for tgoto in -lmytinfo" >&5
7885 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7886 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7887 echo $ECHO_N "(cached) $ECHO_C" >&6
7889 ac_check_lib_save_LIBS=$LIBS
7890 LIBS="-lmytinfo $LIBS"
7891 cat >conftest.$ac_ext <<_ACEOF
7892 #line 7892 "configure"
7893 #include "confdefs.h"
7895 /* Override any gcc2 internal prototype to avoid an error. */
7899 /* We use char because int might match the return type of a gcc2
7900 builtin and then its argument prototype would still apply. */
7910 rm -f conftest.$ac_objext conftest$ac_exeext
7911 if { (eval echo "$as_me:7911: \"$ac_link\"") >&5
7912 (eval $ac_link) 2>&5
7914 echo "$as_me:7914: \$? = $ac_status" >&5
7915 (exit $ac_status); } &&
7916 { ac_try='test -s conftest$ac_exeext'
7917 { (eval echo "$as_me:7917: \"$ac_try\"") >&5
7920 echo "$as_me:7920: \$? = $ac_status" >&5
7921 (exit $ac_status); }; }; then
7922 ac_cv_lib_mytinfo_tgoto=yes
7924 echo "$as_me: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7926 ac_cv_lib_mytinfo_tgoto=no
7928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7929 LIBS=$ac_check_lib_save_LIBS
7931 echo "$as_me:7931: result: $ac_cv_lib_mytinfo_tgoto" >&5
7932 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7933 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7934 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7941 cf_add_libs="$cf_ncurses_LIBS"
7942 # Filter out duplicates - this happens with badly-designed ".pc" files...
7943 for cf_add_1lib in $LIBS
7945 for cf_add_2lib in $cf_add_libs
7947 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7953 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7957 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7960 cf_add_libs="-l$cf_nculib_root"
7961 # Filter out duplicates - this happens with badly-designed ".pc" files...
7962 for cf_add_1lib in $LIBS
7964 for cf_add_2lib in $cf_add_libs
7966 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7972 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7978 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7980 echo "$as_me:7980: checking for initscr" >&5
7981 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7982 if test "${ac_cv_func_initscr+set}" = set; then
7983 echo $ECHO_N "(cached) $ECHO_C" >&6
7985 cat >conftest.$ac_ext <<_ACEOF
7986 #line 7986 "configure"
7987 #include "confdefs.h"
7988 /* System header to define __stub macros and hopefully few prototypes,
7989 which can conflict with char initscr (); below. */
7991 /* Override any gcc2 internal prototype to avoid an error. */
7995 /* We use char because int might match the return type of a gcc2
7996 builtin and then its argument prototype would still apply. */
8003 /* The GNU C library defines this for functions which it implements
8004 to always fail with ENOSYS. Some functions are actually named
8005 something starting with __ and the normal name is an alias. */
8006 #if defined (__stub_initscr) || defined (__stub___initscr)
8009 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8016 rm -f conftest.$ac_objext conftest$ac_exeext
8017 if { (eval echo "$as_me:8017: \"$ac_link\"") >&5
8018 (eval $ac_link) 2>&5
8020 echo "$as_me:8020: \$? = $ac_status" >&5
8021 (exit $ac_status); } &&
8022 { ac_try='test -s conftest$ac_exeext'
8023 { (eval echo "$as_me:8023: \"$ac_try\"") >&5
8026 echo "$as_me:8026: \$? = $ac_status" >&5
8027 (exit $ac_status); }; }; then
8028 ac_cv_func_initscr=yes
8030 echo "$as_me: failed program was:" >&5
8031 cat conftest.$ac_ext >&5
8032 ac_cv_func_initscr=no
8034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8036 echo "$as_me:8036: result: $ac_cv_func_initscr" >&5
8037 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8038 if test $ac_cv_func_initscr = yes; then
8039 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8042 cf_save_LIBS="$LIBS"
8043 echo "$as_me:8043: checking for initscr in -l$cf_nculib_root" >&5
8044 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8045 LIBS="-l$cf_nculib_root $LIBS"
8046 cat >conftest.$ac_ext <<_ACEOF
8047 #line 8047 "configure"
8048 #include "confdefs.h"
8049 #include <${cf_cv_ncurses_header:-curses.h}>
8058 rm -f conftest.$ac_objext conftest$ac_exeext
8059 if { (eval echo "$as_me:8059: \"$ac_link\"") >&5
8060 (eval $ac_link) 2>&5
8062 echo "$as_me:8062: \$? = $ac_status" >&5
8063 (exit $ac_status); } &&
8064 { ac_try='test -s conftest$ac_exeext'
8065 { (eval echo "$as_me:8065: \"$ac_try\"") >&5
8068 echo "$as_me:8068: \$? = $ac_status" >&5
8069 (exit $ac_status); }; }; then
8070 echo "$as_me:8070: result: yes" >&5
8071 echo "${ECHO_T}yes" >&6
8072 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8075 echo "$as_me: failed program was:" >&5
8076 cat conftest.$ac_ext >&5
8077 echo "$as_me:8077: result: no" >&5
8078 echo "${ECHO_T}no" >&6
8081 cf_library_path_list=""
8082 if test -n "${LDFLAGS}${LIBS}" ; then
8083 for cf_library_path in $LDFLAGS $LIBS
8085 case $cf_library_path in
8087 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8089 test "x$cf_library_path" != "xNONE" && \
8090 test -d "$cf_library_path" && \
8092 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8093 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8094 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8095 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8096 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8097 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"
8100 cf_library_path_list="$cf_library_path_list $cf_search"
8108 test "x$prefix" != "xNONE" && \
8109 test -d "$prefix" && \
8111 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8112 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8113 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8114 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8115 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8116 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8119 for cf_subdir_prefix in \
8128 test "x$cf_subdir_prefix" != "x$prefix" && \
8129 test -d "$cf_subdir_prefix" && \
8130 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8131 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8132 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8133 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8134 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8135 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8136 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"
8141 cf_search="$cf_library_path_list $cf_search"
8143 for cf_libdir in $cf_search
8145 echo "$as_me:8145: checking for -l$cf_nculib_root in $cf_libdir" >&5
8146 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8147 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8148 cat >conftest.$ac_ext <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151 #include <${cf_cv_ncurses_header:-curses.h}>
8160 rm -f conftest.$ac_objext conftest$ac_exeext
8161 if { (eval echo "$as_me:8161: \"$ac_link\"") >&5
8162 (eval $ac_link) 2>&5
8164 echo "$as_me:8164: \$? = $ac_status" >&5
8165 (exit $ac_status); } &&
8166 { ac_try='test -s conftest$ac_exeext'
8167 { (eval echo "$as_me:8167: \"$ac_try\"") >&5
8170 echo "$as_me:8170: \$? = $ac_status" >&5
8171 (exit $ac_status); }; }; then
8172 echo "$as_me:8172: result: yes" >&5
8173 echo "${ECHO_T}yes" >&6
8174 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8177 echo "$as_me: failed program was:" >&5
8178 cat conftest.$ac_ext >&5
8179 echo "$as_me:8179: result: no" >&5
8180 echo "${ECHO_T}no" >&6
8181 LIBS="$cf_save_LIBS"
8183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8191 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8193 if test $cf_found_library = no ; then
8194 { { echo "$as_me:8194: error: Cannot link $cf_nculib_root library" >&5
8195 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8196 { (exit 1); exit 1; }; }
8201 if test -n "$cf_ncurses_LIBS" ; then
8202 echo "$as_me:8202: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8203 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8204 cf_ncurses_SAVE="$LIBS"
8205 for p in $cf_ncurses_LIBS ; do
8206 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8207 if test "$q" != "$LIBS" ; then
8211 cat >conftest.$ac_ext <<_ACEOF
8212 #line 8212 "configure"
8213 #include "confdefs.h"
8214 #include <${cf_cv_ncurses_header:-curses.h}>
8218 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8223 rm -f conftest.$ac_objext conftest$ac_exeext
8224 if { (eval echo "$as_me:8224: \"$ac_link\"") >&5
8225 (eval $ac_link) 2>&5
8227 echo "$as_me:8227: \$? = $ac_status" >&5
8228 (exit $ac_status); } &&
8229 { ac_try='test -s conftest$ac_exeext'
8230 { (eval echo "$as_me:8230: \"$ac_try\"") >&5
8233 echo "$as_me:8233: \$? = $ac_status" >&5
8234 (exit $ac_status); }; }; then
8235 echo "$as_me:8235: result: yes" >&5
8236 echo "${ECHO_T}yes" >&6
8238 echo "$as_me: failed program was:" >&5
8239 cat conftest.$ac_ext >&5
8240 echo "$as_me:8240: result: no" >&5
8241 echo "${ECHO_T}no" >&6
8242 LIBS="$cf_ncurses_SAVE"
8244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8247 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8249 cat >>confdefs.h <<EOF
8250 #define $cf_nculib_ROOT 1
8260 cf_ncuconfig_root=ncurses
8261 cf_have_ncuconfig=no
8263 if test "x${PKG_CONFIG:=none}" != xnone; then
8264 echo "$as_me:8264: checking pkg-config for $cf_ncuconfig_root" >&5
8265 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8266 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8267 echo "$as_me:8267: result: yes" >&5
8268 echo "${ECHO_T}yes" >&6
8270 echo "$as_me:8270: checking if the $cf_ncuconfig_root package files work" >&5
8271 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8272 cf_have_ncuconfig=unknown
8274 cf_save_CPPFLAGS="$CPPFLAGS"
8275 cf_save_LIBS="$LIBS"
8280 cf_new_extra_cppflags=
8282 for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
8284 case $cf_fix_cppflags in
8286 case $cf_add_cflags in
8287 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8288 case $cf_add_cflags in
8290 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8292 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8293 && test -z "${cf_tst_cflags}" \
8294 && cf_fix_cppflags=yes
8296 if test $cf_fix_cppflags = yes ; then
8298 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8299 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8302 elif test "${cf_tst_cflags}" = "\"'" ; then
8304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8315 case $cf_add_cflags in
8317 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8319 CPPFLAGS=`echo "$CPPFLAGS" | \
8320 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8321 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8326 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8327 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8334 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8335 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8342 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8343 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8345 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8347 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8348 && test -z "${cf_tst_cflags}" \
8349 && cf_fix_cppflags=no
8354 if test -n "$cf_new_cflags" ; then
8356 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8357 CFLAGS="${CFLAGS}$cf_new_cflags"
8361 if test -n "$cf_new_cppflags" ; then
8363 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8364 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8368 if test -n "$cf_new_extra_cppflags" ; then
8370 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8371 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8375 cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8376 # Filter out duplicates - this happens with badly-designed ".pc" files...
8377 for cf_add_1lib in $LIBS
8379 for cf_add_2lib in $cf_add_libs
8381 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8387 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8391 cat >conftest.$ac_ext <<_ACEOF
8392 #line 8392 "configure"
8393 #include "confdefs.h"
8394 #include <${cf_cv_ncurses_header:-curses.h}>
8398 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8403 rm -f conftest.$ac_objext conftest$ac_exeext
8404 if { (eval echo "$as_me:8404: \"$ac_link\"") >&5
8405 (eval $ac_link) 2>&5
8407 echo "$as_me:8407: \$? = $ac_status" >&5
8408 (exit $ac_status); } &&
8409 { ac_try='test -s conftest$ac_exeext'
8410 { (eval echo "$as_me:8410: \"$ac_try\"") >&5
8413 echo "$as_me:8413: \$? = $ac_status" >&5
8414 (exit $ac_status); }; }; then
8415 if test "$cross_compiling" = yes; then
8416 cf_have_ncuconfig=maybe
8418 cat >conftest.$ac_ext <<_ACEOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8421 #include <${cf_cv_ncurses_header:-curses.h}>
8423 { char *xx = curses_version(); return (xx == 0); }
8425 rm -f conftest$ac_exeext
8426 if { (eval echo "$as_me:8426: \"$ac_link\"") >&5
8427 (eval $ac_link) 2>&5
8429 echo "$as_me:8429: \$? = $ac_status" >&5
8430 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8431 { (eval echo "$as_me:8431: \"$ac_try\"") >&5
8434 echo "$as_me:8434: \$? = $ac_status" >&5
8435 (exit $ac_status); }; }; then
8436 cf_have_ncuconfig=yes
8438 echo "$as_me: program exited with status $ac_status" >&5
8439 echo "$as_me: failed program was:" >&5
8440 cat conftest.$ac_ext >&5
8441 cf_have_ncuconfig=no
8443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8446 echo "$as_me: failed program was:" >&5
8447 cat conftest.$ac_ext >&5
8448 cf_have_ncuconfig=no
8450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8451 echo "$as_me:8451: result: $cf_have_ncuconfig" >&5
8452 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8453 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8454 if test "$cf_have_ncuconfig" != "yes"
8456 CPPFLAGS="$cf_save_CPPFLAGS"
8457 LIBS="$cf_save_LIBS"
8458 NCURSES_CONFIG_PKG=none
8461 cat >>confdefs.h <<\EOF
8465 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8467 echo "$as_me:8467: checking for terminfo header" >&5
8468 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8469 if test "${cf_cv_term_header+set}" = set; then
8470 echo $ECHO_N "(cached) $ECHO_C" >&6
8473 case ${cf_cv_ncurses_header} in
8474 (*/ncurses.h|*/ncursesw.h)
8475 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8478 cf_term_header=term.h
8482 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8484 cat >conftest.$ac_ext <<_ACEOF
8485 #line 8485 "configure"
8486 #include "confdefs.h"
8488 #include <${cf_cv_ncurses_header:-curses.h}>
8494 int x = auto_left_margin
8499 rm -f conftest.$ac_objext
8500 if { (eval echo "$as_me:8500: \"$ac_compile\"") >&5
8501 (eval $ac_compile) 2>&5
8503 echo "$as_me:8503: \$? = $ac_status" >&5
8504 (exit $ac_status); } &&
8505 { ac_try='test -s conftest.$ac_objext'
8506 { (eval echo "$as_me:8506: \"$ac_try\"") >&5
8509 echo "$as_me:8509: \$? = $ac_status" >&5
8510 (exit $ac_status); }; }; then
8512 cf_cv_term_header="$cf_test"
8514 echo "$as_me: failed program was:" >&5
8515 cat conftest.$ac_ext >&5
8517 cf_cv_term_header=unknown
8520 rm -f conftest.$ac_objext conftest.$ac_ext
8521 test "$cf_cv_term_header" != unknown && break
8525 echo "$as_me:8525: result: $cf_cv_term_header" >&5
8526 echo "${ECHO_T}$cf_cv_term_header" >&6
8528 # Set definitions to allow ifdef'ing to accommodate subdirectories
8530 case $cf_cv_term_header in
8533 cat >>confdefs.h <<\EOF
8534 #define HAVE_TERM_H 1
8540 case $cf_cv_term_header in
8543 cat >>confdefs.h <<\EOF
8544 #define HAVE_NCURSES_TERM_H 1
8550 cat >>confdefs.h <<\EOF
8551 #define HAVE_NCURSESW_TERM_H 1
8560 echo "$as_me:8560: result: no" >&5
8561 echo "${ECHO_T}no" >&6
8562 NCURSES_CONFIG_PKG=none
8565 NCURSES_CONFIG_PKG=none
8568 if test "x$cf_have_ncuconfig" = "xno"; then
8569 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8571 if test -n "$ac_tool_prefix"; then
8572 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8575 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8576 echo "$as_me:8576: checking for $ac_word" >&5
8577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8578 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8579 echo $ECHO_N "(cached) $ECHO_C" >&6
8581 if test -n "$NCURSES_CONFIG"; then
8582 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8584 ac_save_IFS=$IFS; IFS=$ac_path_separator
8586 for ac_dir in $ac_dummy; do
8588 test -z "$ac_dir" && ac_dir=.
8589 $as_executable_p "$ac_dir/$ac_word" || continue
8590 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8591 echo "$as_me:8591: found $ac_dir/$ac_word" >&5
8597 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8598 if test -n "$NCURSES_CONFIG"; then
8599 echo "$as_me:8599: result: $NCURSES_CONFIG" >&5
8600 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8602 echo "$as_me:8602: result: no" >&5
8603 echo "${ECHO_T}no" >&6
8606 test -n "$NCURSES_CONFIG" && break
8609 if test -z "$NCURSES_CONFIG"; then
8610 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8611 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8613 # Extract the first word of "$ac_prog", so it can be a program name with args.
8614 set dummy $ac_prog; ac_word=$2
8615 echo "$as_me:8615: checking for $ac_word" >&5
8616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8617 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8618 echo $ECHO_N "(cached) $ECHO_C" >&6
8620 if test -n "$ac_ct_NCURSES_CONFIG"; then
8621 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8623 ac_save_IFS=$IFS; IFS=$ac_path_separator
8625 for ac_dir in $ac_dummy; do
8627 test -z "$ac_dir" && ac_dir=.
8628 $as_executable_p "$ac_dir/$ac_word" || continue
8629 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8630 echo "$as_me:8630: found $ac_dir/$ac_word" >&5
8636 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8637 if test -n "$ac_ct_NCURSES_CONFIG"; then
8638 echo "$as_me:8638: result: $ac_ct_NCURSES_CONFIG" >&5
8639 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8641 echo "$as_me:8641: result: no" >&5
8642 echo "${ECHO_T}no" >&6
8645 test -n "$ac_ct_NCURSES_CONFIG" && break
8647 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8649 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8652 if test "$NCURSES_CONFIG" != none ; then
8657 cf_new_extra_cppflags=
8659 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
8661 case $cf_fix_cppflags in
8663 case $cf_add_cflags in
8664 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8665 case $cf_add_cflags in
8667 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8669 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8670 && test -z "${cf_tst_cflags}" \
8671 && cf_fix_cppflags=yes
8673 if test $cf_fix_cppflags = yes ; then
8675 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8676 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8679 elif test "${cf_tst_cflags}" = "\"'" ; then
8681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8692 case $cf_add_cflags in
8694 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8696 CPPFLAGS=`echo "$CPPFLAGS" | \
8697 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8698 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8703 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8704 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8711 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8712 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8719 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8720 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8722 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8724 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8725 && test -z "${cf_tst_cflags}" \
8726 && cf_fix_cppflags=no
8731 if test -n "$cf_new_cflags" ; then
8733 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8734 CFLAGS="${CFLAGS}$cf_new_cflags"
8738 if test -n "$cf_new_cppflags" ; then
8740 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8741 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8745 if test -n "$cf_new_extra_cppflags" ; then
8747 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8748 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8752 cf_add_libs="`$NCURSES_CONFIG --libs`"
8753 # Filter out duplicates - this happens with badly-designed ".pc" files...
8754 for cf_add_1lib in $LIBS
8756 for cf_add_2lib in $cf_add_libs
8758 if test "x$cf_add_1lib" = "x$cf_add_2lib"
8764 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
8768 # even with config script, some packages use no-override for curses.h
8770 echo "$as_me:8770: checking if we have identified curses headers" >&5
8771 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8772 if test "${cf_cv_ncurses_header+set}" = set; then
8773 echo $ECHO_N "(cached) $ECHO_C" >&6
8776 cf_cv_ncurses_header=none
8778 ncurses.h ncurses/ncurses.h \
8779 curses.h ncurses/curses.h
8781 cat >conftest.$ac_ext <<_ACEOF
8782 #line 8782 "configure"
8783 #include "confdefs.h"
8784 #include <${cf_header}>
8788 initscr(); tgoto("?", 0,0)
8793 rm -f conftest.$ac_objext
8794 if { (eval echo "$as_me:8794: \"$ac_compile\"") >&5
8795 (eval $ac_compile) 2>&5
8797 echo "$as_me:8797: \$? = $ac_status" >&5
8798 (exit $ac_status); } &&
8799 { ac_try='test -s conftest.$ac_objext'
8800 { (eval echo "$as_me:8800: \"$ac_try\"") >&5
8803 echo "$as_me:8803: \$? = $ac_status" >&5
8804 (exit $ac_status); }; }; then
8805 cf_cv_ncurses_header=$cf_header; break
8807 echo "$as_me: failed program was:" >&5
8808 cat conftest.$ac_ext >&5
8810 rm -f conftest.$ac_objext conftest.$ac_ext
8814 echo "$as_me:8814: result: $cf_cv_ncurses_header" >&5
8815 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8817 if test "$cf_cv_ncurses_header" = none ; then
8818 { { echo "$as_me:8818: error: No curses header-files found" >&5
8819 echo "$as_me: error: No curses header-files found" >&2;}
8820 { (exit 1); exit 1; }; }
8823 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8825 for ac_header in $cf_cv_ncurses_header
8827 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8828 echo "$as_me:8828: checking for $ac_header" >&5
8829 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8830 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8831 echo $ECHO_N "(cached) $ECHO_C" >&6
8833 cat >conftest.$ac_ext <<_ACEOF
8834 #line 8834 "configure"
8835 #include "confdefs.h"
8836 #include <$ac_header>
8838 if { (eval echo "$as_me:8838: \"$ac_cpp conftest.$ac_ext\"") >&5
8839 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8841 egrep -v '^ *\+' conftest.er1 >conftest.err
8843 cat conftest.err >&5
8844 echo "$as_me:8844: \$? = $ac_status" >&5
8845 (exit $ac_status); } >/dev/null; then
8846 if test -s conftest.err; then
8847 ac_cpp_err=$ac_c_preproc_warn_flag
8854 if test -z "$ac_cpp_err"; then
8855 eval "$as_ac_Header=yes"
8857 echo "$as_me: failed program was:" >&5
8858 cat conftest.$ac_ext >&5
8859 eval "$as_ac_Header=no"
8861 rm -f conftest.err conftest.$ac_ext
8863 echo "$as_me:8863: result: `eval echo '${'$as_ac_Header'}'`" >&5
8864 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8865 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8866 cat >>confdefs.h <<EOF
8867 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8873 cat >>confdefs.h <<\EOF
8877 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8879 cat >>confdefs.h <<EOF
8880 #define $cf_nculib_ROOT 1
8883 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8887 cf_ncuhdr_root=ncurses
8889 test -n "$cf_cv_curses_dir" && \
8890 test "$cf_cv_curses_dir" != "no" && { \
8892 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8893 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8895 while test $cf_add_incdir != /usr/include
8897 if test -d $cf_add_incdir
8900 if test -n "$CFLAGS$CPPFLAGS" ; then
8901 # a loop is needed to ensure we can add subdirs of existing dirs
8902 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8903 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8904 cf_have_incdir=yes; break
8909 if test "$cf_have_incdir" = no ; then
8910 if test "$cf_add_incdir" = /usr/local/include ; then
8911 if test "$GCC" = yes
8913 cf_save_CPPFLAGS=$CPPFLAGS
8915 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8916 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8918 cat >conftest.$ac_ext <<_ACEOF
8919 #line 8919 "configure"
8920 #include "confdefs.h"
8930 rm -f conftest.$ac_objext
8931 if { (eval echo "$as_me:8931: \"$ac_compile\"") >&5
8932 (eval $ac_compile) 2>&5
8934 echo "$as_me:8934: \$? = $ac_status" >&5
8935 (exit $ac_status); } &&
8936 { ac_try='test -s conftest.$ac_objext'
8937 { (eval echo "$as_me:8937: \"$ac_try\"") >&5
8940 echo "$as_me:8940: \$? = $ac_status" >&5
8941 (exit $ac_status); }; }; then
8944 echo "$as_me: failed program was:" >&5
8945 cat conftest.$ac_ext >&5
8948 rm -f conftest.$ac_objext conftest.$ac_ext
8949 CPPFLAGS=$cf_save_CPPFLAGS
8954 if test "$cf_have_incdir" = no ; then
8955 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8957 echo "${as_me:-configure}:8957: testing adding $cf_add_incdir to include-path ..." 1>&5
8959 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8961 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8962 test "$cf_top_incdir" = "$cf_add_incdir" && break
8963 cf_add_incdir="$cf_top_incdir"
8976 echo "$as_me:8976: checking for $cf_ncuhdr_root header in include-path" >&5
8977 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8978 if test "${cf_cv_ncurses_h+set}" = set; then
8979 echo $ECHO_N "(cached) $ECHO_C" >&6
8982 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8983 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8984 for cf_header in $cf_header_list
8987 cat >conftest.$ac_ext <<_ACEOF
8988 #line 8988 "configure"
8989 #include "confdefs.h"
8991 #include <$cf_header>
8996 #ifdef NCURSES_VERSION
8998 printf("%s\n", NCURSES_VERSION);
9011 rm -f conftest.$ac_objext
9012 if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
9013 (eval $ac_compile) 2>&5
9015 echo "$as_me:9015: \$? = $ac_status" >&5
9016 (exit $ac_status); } &&
9017 { ac_try='test -s conftest.$ac_objext'
9018 { (eval echo "$as_me:9018: \"$ac_try\"") >&5
9021 echo "$as_me:9021: \$? = $ac_status" >&5
9022 (exit $ac_status); }; }; then
9023 cf_cv_ncurses_h=$cf_header
9026 echo "$as_me: failed program was:" >&5
9027 cat conftest.$ac_ext >&5
9030 rm -f conftest.$ac_objext conftest.$ac_ext
9032 test "$cf_cv_ncurses_h" != no && break
9036 echo "$as_me:9036: result: $cf_cv_ncurses_h" >&5
9037 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9039 if test "$cf_cv_ncurses_h" != no ; then
9040 cf_cv_ncurses_header=$cf_cv_ncurses_h
9043 echo "$as_me:9043: checking for $cf_ncuhdr_root include-path" >&5
9044 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9045 if test "${cf_cv_ncurses_h2+set}" = set; then
9046 echo $ECHO_N "(cached) $ECHO_C" >&6
9049 test -n "$verbose" && echo
9053 # collect the current set of include-directories from compiler flags
9054 cf_header_path_list=""
9055 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9056 for cf_header_path in $CPPFLAGS $CFLAGS
9058 case $cf_header_path in
9060 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9062 test "x$cf_header_path" != "xNONE" && \
9063 test -d "$cf_header_path" && \
9065 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9066 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9067 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9068 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9069 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9070 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"
9073 cf_header_path_list="$cf_header_path_list $cf_search"
9079 # add the variations for the package we are looking for
9083 test "x$prefix" != "xNONE" && \
9084 test -d "$prefix" && \
9086 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9087 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9088 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9089 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9090 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9091 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9094 for cf_subdir_prefix in \
9103 test "x$cf_subdir_prefix" != "x$prefix" && \
9104 test -d "$cf_subdir_prefix" && \
9105 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9106 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9107 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9108 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9109 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9110 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9111 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"
9116 test "$includedir" != NONE && \
9117 test "$includedir" != "/usr/include" && \
9118 test -d "$includedir" && {
9119 test -d $includedir && cf_search="$cf_search $includedir"
9120 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9123 test "$oldincludedir" != NONE && \
9124 test "$oldincludedir" != "/usr/include" && \
9125 test -d "$oldincludedir" && {
9126 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9127 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9130 cf_search="$cf_search $cf_header_path_list"
9132 test -n "$verbose" && echo search path $cf_search
9133 cf_save2_CPPFLAGS="$CPPFLAGS"
9134 for cf_incdir in $cf_search
9137 if test -n "$cf_incdir" ; then
9138 for cf_add_incdir in $cf_incdir
9140 while test $cf_add_incdir != /usr/include
9142 if test -d $cf_add_incdir
9145 if test -n "$CFLAGS$CPPFLAGS" ; then
9146 # a loop is needed to ensure we can add subdirs of existing dirs
9147 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9148 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9149 cf_have_incdir=yes; break
9154 if test "$cf_have_incdir" = no ; then
9155 if test "$cf_add_incdir" = /usr/local/include ; then
9156 if test "$GCC" = yes
9158 cf_save_CPPFLAGS=$CPPFLAGS
9160 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9161 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9163 cat >conftest.$ac_ext <<_ACEOF
9164 #line 9164 "configure"
9165 #include "confdefs.h"
9175 rm -f conftest.$ac_objext
9176 if { (eval echo "$as_me:9176: \"$ac_compile\"") >&5
9177 (eval $ac_compile) 2>&5
9179 echo "$as_me:9179: \$? = $ac_status" >&5
9180 (exit $ac_status); } &&
9181 { ac_try='test -s conftest.$ac_objext'
9182 { (eval echo "$as_me:9182: \"$ac_try\"") >&5
9185 echo "$as_me:9185: \$? = $ac_status" >&5
9186 (exit $ac_status); }; }; then
9189 echo "$as_me: failed program was:" >&5
9190 cat conftest.$ac_ext >&5
9193 rm -f conftest.$ac_objext conftest.$ac_ext
9194 CPPFLAGS=$cf_save_CPPFLAGS
9199 if test "$cf_have_incdir" = no ; then
9200 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9202 echo "${as_me:-configure}:9202: testing adding $cf_add_incdir to include-path ..." 1>&5
9204 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9206 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9207 test "$cf_top_incdir" = "$cf_add_incdir" && break
9208 cf_add_incdir="$cf_top_incdir"
9224 cat >conftest.$ac_ext <<_ACEOF
9225 #line 9225 "configure"
9226 #include "confdefs.h"
9228 #include <$cf_header>
9233 #ifdef NCURSES_VERSION
9235 printf("%s\n", NCURSES_VERSION);
9248 rm -f conftest.$ac_objext
9249 if { (eval echo "$as_me:9249: \"$ac_compile\"") >&5
9250 (eval $ac_compile) 2>&5
9252 echo "$as_me:9252: \$? = $ac_status" >&5
9253 (exit $ac_status); } &&
9254 { ac_try='test -s conftest.$ac_objext'
9255 { (eval echo "$as_me:9255: \"$ac_try\"") >&5
9258 echo "$as_me:9258: \$? = $ac_status" >&5
9259 (exit $ac_status); }; }; then
9260 cf_cv_ncurses_h2=$cf_header
9263 echo "$as_me: failed program was:" >&5
9264 cat conftest.$ac_ext >&5
9267 rm -f conftest.$ac_objext conftest.$ac_ext
9269 if test "$cf_cv_ncurses_h2" != no ; then
9270 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9271 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9274 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9276 CPPFLAGS="$cf_save2_CPPFLAGS"
9277 test "$cf_cv_ncurses_h2" != no && break
9279 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9279: error: not found" >&5
9280 echo "$as_me: error: not found" >&2;}
9281 { (exit 1); exit 1; }; }
9284 echo "$as_me:9284: result: $cf_cv_ncurses_h2" >&5
9285 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9287 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9288 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9289 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9290 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9293 if test -n "$cf_1st_incdir" ; then
9294 for cf_add_incdir in $cf_1st_incdir
9296 while test $cf_add_incdir != /usr/include
9298 if test -d $cf_add_incdir
9301 if test -n "$CFLAGS$CPPFLAGS" ; then
9302 # a loop is needed to ensure we can add subdirs of existing dirs
9303 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9304 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9305 cf_have_incdir=yes; break
9310 if test "$cf_have_incdir" = no ; then
9311 if test "$cf_add_incdir" = /usr/local/include ; then
9312 if test "$GCC" = yes
9314 cf_save_CPPFLAGS=$CPPFLAGS
9316 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9317 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9319 cat >conftest.$ac_ext <<_ACEOF
9320 #line 9320 "configure"
9321 #include "confdefs.h"
9331 rm -f conftest.$ac_objext
9332 if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5
9333 (eval $ac_compile) 2>&5
9335 echo "$as_me:9335: \$? = $ac_status" >&5
9336 (exit $ac_status); } &&
9337 { ac_try='test -s conftest.$ac_objext'
9338 { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9341 echo "$as_me:9341: \$? = $ac_status" >&5
9342 (exit $ac_status); }; }; then
9345 echo "$as_me: failed program was:" >&5
9346 cat conftest.$ac_ext >&5
9349 rm -f conftest.$ac_objext conftest.$ac_ext
9350 CPPFLAGS=$cf_save_CPPFLAGS
9355 if test "$cf_have_incdir" = no ; then
9356 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9358 echo "${as_me:-configure}:9358: testing adding $cf_add_incdir to include-path ..." 1>&5
9360 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9362 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9363 test "$cf_top_incdir" = "$cf_add_incdir" && break
9364 cf_add_incdir="$cf_top_incdir"
9377 # Set definitions to allow ifdef'ing for ncurses.h
9379 case $cf_cv_ncurses_header in
9382 cat >>confdefs.h <<\EOF
9383 #define HAVE_NCURSES_H 1
9389 case $cf_cv_ncurses_header in
9390 (ncurses/curses.h|ncurses/ncurses.h)
9392 cat >>confdefs.h <<\EOF
9393 #define HAVE_NCURSES_NCURSES_H 1
9397 (ncursesw/curses.h|ncursesw/ncurses.h)
9399 cat >>confdefs.h <<\EOF
9400 #define HAVE_NCURSESW_NCURSES_H 1
9406 echo "$as_me:9406: checking for terminfo header" >&5
9407 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9408 if test "${cf_cv_term_header+set}" = set; then
9409 echo $ECHO_N "(cached) $ECHO_C" >&6
9412 case ${cf_cv_ncurses_header} in
9413 (*/ncurses.h|*/ncursesw.h)
9414 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9417 cf_term_header=term.h
9421 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9423 cat >conftest.$ac_ext <<_ACEOF
9424 #line 9424 "configure"
9425 #include "confdefs.h"
9427 #include <${cf_cv_ncurses_header:-curses.h}>
9433 int x = auto_left_margin
9438 rm -f conftest.$ac_objext
9439 if { (eval echo "$as_me:9439: \"$ac_compile\"") >&5
9440 (eval $ac_compile) 2>&5
9442 echo "$as_me:9442: \$? = $ac_status" >&5
9443 (exit $ac_status); } &&
9444 { ac_try='test -s conftest.$ac_objext'
9445 { (eval echo "$as_me:9445: \"$ac_try\"") >&5
9448 echo "$as_me:9448: \$? = $ac_status" >&5
9449 (exit $ac_status); }; }; then
9451 cf_cv_term_header="$cf_test"
9453 echo "$as_me: failed program was:" >&5
9454 cat conftest.$ac_ext >&5
9456 cf_cv_term_header=unknown
9459 rm -f conftest.$ac_objext conftest.$ac_ext
9460 test "$cf_cv_term_header" != unknown && break
9464 echo "$as_me:9464: result: $cf_cv_term_header" >&5
9465 echo "${ECHO_T}$cf_cv_term_header" >&6
9467 # Set definitions to allow ifdef'ing to accommodate subdirectories
9469 case $cf_cv_term_header in
9472 cat >>confdefs.h <<\EOF
9473 #define HAVE_TERM_H 1
9479 case $cf_cv_term_header in
9482 cat >>confdefs.h <<\EOF
9483 #define HAVE_NCURSES_TERM_H 1
9489 cat >>confdefs.h <<\EOF
9490 #define HAVE_NCURSESW_TERM_H 1
9496 # some applications need this, but should check for NCURSES_VERSION
9498 cat >>confdefs.h <<\EOF
9502 echo "$as_me:9502: checking for ncurses version" >&5
9503 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9504 if test "${cf_cv_ncurses_version+set}" = set; then
9505 echo $ECHO_N "(cached) $ECHO_C" >&6
9508 cf_cv_ncurses_version=no
9511 if test "$cross_compiling" = yes; then
9513 # This will not work if the preprocessor splits the line after the
9514 # Autoconf token. The 'unproto' program does that.
9515 cat > conftest.$ac_ext <<EOF
9516 #include <${cf_cv_ncurses_header:-curses.h}>
9518 #ifdef NCURSES_VERSION
9519 Autoconf NCURSES_VERSION
9527 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9528 { (eval echo "$as_me:9528: \"$cf_try\"") >&5
9531 echo "$as_me:9531: \$? = $ac_status" >&5
9532 (exit $ac_status); }
9533 if test -f conftest.out ; then
9534 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9535 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9540 cat >conftest.$ac_ext <<_ACEOF
9541 #line 9541 "configure"
9542 #include "confdefs.h"
9544 #include <${cf_cv_ncurses_header:-curses.h}>
9548 FILE *fp = fopen("$cf_tempfile", "w");
9549 #ifdef NCURSES_VERSION
9550 # ifdef NCURSES_VERSION_PATCH
9551 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9553 fprintf(fp, "%s\n", NCURSES_VERSION);
9557 fprintf(fp, "old\n");
9562 ${cf_cv_main_return:-return}(0);
9565 rm -f conftest$ac_exeext
9566 if { (eval echo "$as_me:9566: \"$ac_link\"") >&5
9567 (eval $ac_link) 2>&5
9569 echo "$as_me:9569: \$? = $ac_status" >&5
9570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9571 { (eval echo "$as_me:9571: \"$ac_try\"") >&5
9574 echo "$as_me:9574: \$? = $ac_status" >&5
9575 (exit $ac_status); }; }; then
9577 cf_cv_ncurses_version=`cat $cf_tempfile`
9579 echo "$as_me: program exited with status $ac_status" >&5
9580 echo "$as_me: failed program was:" >&5
9581 cat conftest.$ac_ext >&5
9583 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9588 echo "$as_me:9588: result: $cf_cv_ncurses_version" >&5
9589 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9590 test "$cf_cv_ncurses_version" = no ||
9591 cat >>confdefs.h <<\EOF
9595 cf_nculib_root=ncurses
9596 # This works, except for the special case where we find gpm, but
9597 # ncurses is in a nonstandard location via $LIBS, and we really want
9600 cf_ncurses_SAVE="$LIBS"
9601 echo "$as_me:9601: checking for Gpm_Open in -lgpm" >&5
9602 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9603 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9604 echo $ECHO_N "(cached) $ECHO_C" >&6
9606 ac_check_lib_save_LIBS=$LIBS
9608 cat >conftest.$ac_ext <<_ACEOF
9609 #line 9609 "configure"
9610 #include "confdefs.h"
9612 /* Override any gcc2 internal prototype to avoid an error. */
9616 /* We use char because int might match the return type of a gcc2
9617 builtin and then its argument prototype would still apply. */
9627 rm -f conftest.$ac_objext conftest$ac_exeext
9628 if { (eval echo "$as_me:9628: \"$ac_link\"") >&5
9629 (eval $ac_link) 2>&5
9631 echo "$as_me:9631: \$? = $ac_status" >&5
9632 (exit $ac_status); } &&
9633 { ac_try='test -s conftest$ac_exeext'
9634 { (eval echo "$as_me:9634: \"$ac_try\"") >&5
9637 echo "$as_me:9637: \$? = $ac_status" >&5
9638 (exit $ac_status); }; }; then
9639 ac_cv_lib_gpm_Gpm_Open=yes
9641 echo "$as_me: failed program was:" >&5
9642 cat conftest.$ac_ext >&5
9643 ac_cv_lib_gpm_Gpm_Open=no
9645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9646 LIBS=$ac_check_lib_save_LIBS
9648 echo "$as_me:9648: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9649 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9650 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9651 echo "$as_me:9651: checking for initscr in -lgpm" >&5
9652 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9653 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9654 echo $ECHO_N "(cached) $ECHO_C" >&6
9656 ac_check_lib_save_LIBS=$LIBS
9658 cat >conftest.$ac_ext <<_ACEOF
9659 #line 9659 "configure"
9660 #include "confdefs.h"
9662 /* Override any gcc2 internal prototype to avoid an error. */
9666 /* We use char because int might match the return type of a gcc2
9667 builtin and then its argument prototype would still apply. */
9677 rm -f conftest.$ac_objext conftest$ac_exeext
9678 if { (eval echo "$as_me:9678: \"$ac_link\"") >&5
9679 (eval $ac_link) 2>&5
9681 echo "$as_me:9681: \$? = $ac_status" >&5
9682 (exit $ac_status); } &&
9683 { ac_try='test -s conftest$ac_exeext'
9684 { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9687 echo "$as_me:9687: \$? = $ac_status" >&5
9688 (exit $ac_status); }; }; then
9689 ac_cv_lib_gpm_initscr=yes
9691 echo "$as_me: failed program was:" >&5
9692 cat conftest.$ac_ext >&5
9693 ac_cv_lib_gpm_initscr=no
9695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9696 LIBS=$ac_check_lib_save_LIBS
9698 echo "$as_me:9698: result: $ac_cv_lib_gpm_initscr" >&5
9699 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9700 if test $ac_cv_lib_gpm_initscr = yes; then
9701 LIBS="$cf_ncurses_SAVE"
9703 cf_ncurses_LIBS="-lgpm"
9710 # This is only necessary if you are linking against an obsolete
9711 # version of ncurses (but it should do no harm, since it's static).
9712 if test "$cf_nculib_root" = ncurses ; then
9713 echo "$as_me:9713: checking for tgoto in -lmytinfo" >&5
9714 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9715 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9716 echo $ECHO_N "(cached) $ECHO_C" >&6
9718 ac_check_lib_save_LIBS=$LIBS
9719 LIBS="-lmytinfo $LIBS"
9720 cat >conftest.$ac_ext <<_ACEOF
9721 #line 9721 "configure"
9722 #include "confdefs.h"
9724 /* Override any gcc2 internal prototype to avoid an error. */
9728 /* We use char because int might match the return type of a gcc2
9729 builtin and then its argument prototype would still apply. */
9739 rm -f conftest.$ac_objext conftest$ac_exeext
9740 if { (eval echo "$as_me:9740: \"$ac_link\"") >&5
9741 (eval $ac_link) 2>&5
9743 echo "$as_me:9743: \$? = $ac_status" >&5
9744 (exit $ac_status); } &&
9745 { ac_try='test -s conftest$ac_exeext'
9746 { (eval echo "$as_me:9746: \"$ac_try\"") >&5
9749 echo "$as_me:9749: \$? = $ac_status" >&5
9750 (exit $ac_status); }; }; then
9751 ac_cv_lib_mytinfo_tgoto=yes
9753 echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 ac_cv_lib_mytinfo_tgoto=no
9757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9758 LIBS=$ac_check_lib_save_LIBS
9760 echo "$as_me:9760: result: $ac_cv_lib_mytinfo_tgoto" >&5
9761 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9762 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9763 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9770 cf_add_libs="$cf_ncurses_LIBS"
9771 # Filter out duplicates - this happens with badly-designed ".pc" files...
9772 for cf_add_1lib in $LIBS
9774 for cf_add_2lib in $cf_add_libs
9776 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9782 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9786 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9789 cf_add_libs="-l$cf_nculib_root"
9790 # Filter out duplicates - this happens with badly-designed ".pc" files...
9791 for cf_add_1lib in $LIBS
9793 for cf_add_2lib in $cf_add_libs
9795 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9801 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9807 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9809 echo "$as_me:9809: checking for initscr" >&5
9810 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9811 if test "${ac_cv_func_initscr+set}" = set; then
9812 echo $ECHO_N "(cached) $ECHO_C" >&6
9814 cat >conftest.$ac_ext <<_ACEOF
9815 #line 9815 "configure"
9816 #include "confdefs.h"
9817 /* System header to define __stub macros and hopefully few prototypes,
9818 which can conflict with char initscr (); below. */
9820 /* Override any gcc2 internal prototype to avoid an error. */
9824 /* We use char because int might match the return type of a gcc2
9825 builtin and then its argument prototype would still apply. */
9832 /* The GNU C library defines this for functions which it implements
9833 to always fail with ENOSYS. Some functions are actually named
9834 something starting with __ and the normal name is an alias. */
9835 #if defined (__stub_initscr) || defined (__stub___initscr)
9838 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9845 rm -f conftest.$ac_objext conftest$ac_exeext
9846 if { (eval echo "$as_me:9846: \"$ac_link\"") >&5
9847 (eval $ac_link) 2>&5
9849 echo "$as_me:9849: \$? = $ac_status" >&5
9850 (exit $ac_status); } &&
9851 { ac_try='test -s conftest$ac_exeext'
9852 { (eval echo "$as_me:9852: \"$ac_try\"") >&5
9855 echo "$as_me:9855: \$? = $ac_status" >&5
9856 (exit $ac_status); }; }; then
9857 ac_cv_func_initscr=yes
9859 echo "$as_me: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9861 ac_cv_func_initscr=no
9863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9865 echo "$as_me:9865: result: $ac_cv_func_initscr" >&5
9866 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9867 if test $ac_cv_func_initscr = yes; then
9868 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9871 cf_save_LIBS="$LIBS"
9872 echo "$as_me:9872: checking for initscr in -l$cf_nculib_root" >&5
9873 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9874 LIBS="-l$cf_nculib_root $LIBS"
9875 cat >conftest.$ac_ext <<_ACEOF
9876 #line 9876 "configure"
9877 #include "confdefs.h"
9878 #include <${cf_cv_ncurses_header:-curses.h}>
9887 rm -f conftest.$ac_objext conftest$ac_exeext
9888 if { (eval echo "$as_me:9888: \"$ac_link\"") >&5
9889 (eval $ac_link) 2>&5
9891 echo "$as_me:9891: \$? = $ac_status" >&5
9892 (exit $ac_status); } &&
9893 { ac_try='test -s conftest$ac_exeext'
9894 { (eval echo "$as_me:9894: \"$ac_try\"") >&5
9897 echo "$as_me:9897: \$? = $ac_status" >&5
9898 (exit $ac_status); }; }; then
9899 echo "$as_me:9899: result: yes" >&5
9900 echo "${ECHO_T}yes" >&6
9901 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9904 echo "$as_me: failed program was:" >&5
9905 cat conftest.$ac_ext >&5
9906 echo "$as_me:9906: result: no" >&5
9907 echo "${ECHO_T}no" >&6
9910 cf_library_path_list=""
9911 if test -n "${LDFLAGS}${LIBS}" ; then
9912 for cf_library_path in $LDFLAGS $LIBS
9914 case $cf_library_path in
9916 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9918 test "x$cf_library_path" != "xNONE" && \
9919 test -d "$cf_library_path" && \
9921 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9922 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9923 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9924 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9925 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9926 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"
9929 cf_library_path_list="$cf_library_path_list $cf_search"
9937 test "x$prefix" != "xNONE" && \
9938 test -d "$prefix" && \
9940 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9941 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9942 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9943 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9944 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9945 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9948 for cf_subdir_prefix in \
9957 test "x$cf_subdir_prefix" != "x$prefix" && \
9958 test -d "$cf_subdir_prefix" && \
9959 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9960 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9961 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
9962 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9963 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9964 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9965 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"
9970 cf_search="$cf_library_path_list $cf_search"
9972 for cf_libdir in $cf_search
9974 echo "$as_me:9974: checking for -l$cf_nculib_root in $cf_libdir" >&5
9975 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9976 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9977 cat >conftest.$ac_ext <<_ACEOF
9978 #line 9978 "configure"
9979 #include "confdefs.h"
9980 #include <${cf_cv_ncurses_header:-curses.h}>
9989 rm -f conftest.$ac_objext conftest$ac_exeext
9990 if { (eval echo "$as_me:9990: \"$ac_link\"") >&5
9991 (eval $ac_link) 2>&5
9993 echo "$as_me:9993: \$? = $ac_status" >&5
9994 (exit $ac_status); } &&
9995 { ac_try='test -s conftest$ac_exeext'
9996 { (eval echo "$as_me:9996: \"$ac_try\"") >&5
9999 echo "$as_me:9999: \$? = $ac_status" >&5
10000 (exit $ac_status); }; }; then
10001 echo "$as_me:10001: result: yes" >&5
10002 echo "${ECHO_T}yes" >&6
10003 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10006 echo "$as_me: failed program was:" >&5
10007 cat conftest.$ac_ext >&5
10008 echo "$as_me:10008: result: no" >&5
10009 echo "${ECHO_T}no" >&6
10010 LIBS="$cf_save_LIBS"
10012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10020 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10022 if test $cf_found_library = no ; then
10023 { { echo "$as_me:10023: error: Cannot link $cf_nculib_root library" >&5
10024 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10025 { (exit 1); exit 1; }; }
10030 if test -n "$cf_ncurses_LIBS" ; then
10031 echo "$as_me:10031: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10032 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10033 cf_ncurses_SAVE="$LIBS"
10034 for p in $cf_ncurses_LIBS ; do
10035 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10036 if test "$q" != "$LIBS" ; then
10040 cat >conftest.$ac_ext <<_ACEOF
10041 #line 10041 "configure"
10042 #include "confdefs.h"
10043 #include <${cf_cv_ncurses_header:-curses.h}>
10047 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10052 rm -f conftest.$ac_objext conftest$ac_exeext
10053 if { (eval echo "$as_me:10053: \"$ac_link\"") >&5
10054 (eval $ac_link) 2>&5
10056 echo "$as_me:10056: \$? = $ac_status" >&5
10057 (exit $ac_status); } &&
10058 { ac_try='test -s conftest$ac_exeext'
10059 { (eval echo "$as_me:10059: \"$ac_try\"") >&5
10060 (eval $ac_try) 2>&5
10062 echo "$as_me:10062: \$? = $ac_status" >&5
10063 (exit $ac_status); }; }; then
10064 echo "$as_me:10064: result: yes" >&5
10065 echo "${ECHO_T}yes" >&6
10067 echo "$as_me: failed program was:" >&5
10068 cat conftest.$ac_ext >&5
10069 echo "$as_me:10069: result: no" >&5
10070 echo "${ECHO_T}no" >&6
10071 LIBS="$cf_ncurses_SAVE"
10073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10076 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10078 cat >>confdefs.h <<EOF
10079 #define $cf_nculib_ROOT 1
10084 NCURSES_CONFIG=none
10089 if test "$NCURSES_CONFIG_PKG" != none ; then
10090 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10092 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10093 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10094 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10096 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10097 if test -z "$cf_cv_abi_version"
10099 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10102 elif test "$NCURSES_CONFIG" != none ; then
10104 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10106 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10107 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10108 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10110 # ABI version is not available from headers
10111 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10115 for cf_name in MAJOR MINOR PATCH
10117 cat >conftest.$ac_ext <<CF_EOF
10118 #include <${cf_cv_ncurses_header:-curses.h}>
10119 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10121 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10122 { (eval echo "$as_me:10122: \"$cf_try\"") >&5
10123 (eval $cf_try) 2>&5
10125 echo "$as_me:10125: \$? = $ac_status" >&5
10126 (exit $ac_status); }
10127 if test -f conftest.out ; then
10128 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10129 eval NCURSES_$cf_name=\"$cf_result\"
10130 # cat conftest.$ac_ext
10135 cf_cv_abi_version=${NCURSES_MAJOR}
10139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10141 cf_cv_timestamp=`date`
10143 echo "$as_me:10143: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10144 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10146 echo "$as_me:10146: checking if you want to have a library-prefix" >&5
10147 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10149 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10150 if test "${with_lib_prefix+set}" = set; then
10151 withval="$with_lib_prefix"
10152 with_lib_prefix=$withval
10154 with_lib_prefix=auto
10156 echo "$as_me:10156: result: $with_lib_prefix" >&5
10157 echo "${ECHO_T}$with_lib_prefix" >&6
10159 if test $with_lib_prefix = auto
10162 case $cf_cv_system_name in
10164 if test "$DFT_LWR_MODEL" = libtool; then
10170 (*) LIB_PREFIX='lib'
10173 cf_prefix=$LIB_PREFIX
10175 elif test $with_lib_prefix = no
10179 LIB_PREFIX=$with_lib_prefix
10184 ###############################################################################
10186 if test X"$CC_G_OPT" = X"" ; then
10188 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10191 echo "$as_me:10191: checking for default loader flags" >&5
10192 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10193 case $DFT_LWR_MODEL in
10194 (normal) LD_MODEL='' ;;
10195 (debug) LD_MODEL=$CC_G_OPT ;;
10196 (profile) LD_MODEL='-pg';;
10197 (shared) LD_MODEL='' ;;
10199 echo "$as_me:10199: result: $LD_MODEL" >&5
10200 echo "${ECHO_T}$LD_MODEL" >&6
10203 if test "x$cf_cv_enable_rpath" != xno
10205 echo "$as_me:10205: checking for an rpath option" >&5
10206 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10207 case $cf_cv_system_name in
10209 if test "$GCC" = yes; then
10210 LD_RPATH_OPT="-Wl,-rpath,"
10212 LD_RPATH_OPT="-rpath "
10215 (linux*|gnu*|k*bsd*-gnu|freebsd*)
10216 LD_RPATH_OPT="-Wl,-rpath,"
10218 (openbsd[2-9].*|mirbsd*)
10219 LD_RPATH_OPT="-Wl,-rpath,"
10222 LD_RPATH_OPT="-rpath "
10225 LD_RPATH_OPT="-Wl,-rpath,"
10228 LD_RPATH_OPT="-rpath "
10236 echo "$as_me:10236: result: $LD_RPATH_OPT" >&5
10237 echo "${ECHO_T}$LD_RPATH_OPT" >&6
10239 case "x$LD_RPATH_OPT" in
10241 echo "$as_me:10241: checking if we need a space after rpath option" >&5
10242 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
10243 cf_save_LIBS="$LIBS"
10245 cf_add_libs="${LD_RPATH_OPT}$libdir"
10246 # Filter out duplicates - this happens with badly-designed ".pc" files...
10247 for cf_add_1lib in $LIBS
10249 for cf_add_2lib in $cf_add_libs
10251 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10257 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10259 LIBS="$cf_add_libs"
10261 cat >conftest.$ac_ext <<_ACEOF
10262 #line 10262 "configure"
10263 #include "confdefs.h"
10273 rm -f conftest.$ac_objext conftest$ac_exeext
10274 if { (eval echo "$as_me:10274: \"$ac_link\"") >&5
10275 (eval $ac_link) 2>&5
10277 echo "$as_me:10277: \$? = $ac_status" >&5
10278 (exit $ac_status); } &&
10279 { ac_try='test -s conftest$ac_exeext'
10280 { (eval echo "$as_me:10280: \"$ac_try\"") >&5
10281 (eval $ac_try) 2>&5
10283 echo "$as_me:10283: \$? = $ac_status" >&5
10284 (exit $ac_status); }; }; then
10287 echo "$as_me: failed program was:" >&5
10288 cat conftest.$ac_ext >&5
10291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10292 LIBS="$cf_save_LIBS"
10293 echo "$as_me:10293: result: $cf_rpath_space" >&5
10294 echo "${ECHO_T}$cf_rpath_space" >&6
10295 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
10304 INSTALL_LIB="-m 644"
10305 : ${rel_builddir:=.}
10311 cf_cv_do_symlinks=no
10313 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
10315 echo "$as_me:10315: checking if release/abi version should be used for shared libs" >&5
10316 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
10318 # Check whether --with-shlib-version or --without-shlib-version was given.
10319 if test "${with_shlib_version+set}" = set; then
10320 withval="$with_shlib_version"
10321 test -z "$withval" && withval=auto
10324 cf_cv_shlib_version=auto
10327 cf_cv_shlib_version=$withval
10330 echo "$as_me:10330: result: $withval" >&5
10331 echo "${ECHO_T}$withval" >&6
10332 { { echo "$as_me:10332: error: option value must be one of: rel, abi, or auto" >&5
10333 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
10334 { (exit 1); exit 1; }; }
10339 cf_cv_shlib_version=auto
10341 echo "$as_me:10341: result: $cf_cv_shlib_version" >&5
10342 echo "${ECHO_T}$cf_cv_shlib_version" >&6
10344 cf_cv_rm_so_locs=no
10347 # Some less-capable ports of gcc support only -fpic
10351 if test "$GCC" = yes
10355 case $cf_cv_system_name in
10356 (*linux*) # e.g., PGI compiler
10362 if test "$cf_try_fPIC" = yes
10364 echo "$as_me:10364: checking which $CC option to use" >&5
10365 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
10366 cf_save_CFLAGS="$CFLAGS"
10367 for CC_SHARED_OPTS in -fPIC -fpic ''
10369 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
10370 cat >conftest.$ac_ext <<_ACEOF
10371 #line 10371 "configure"
10372 #include "confdefs.h"
10382 rm -f conftest.$ac_objext
10383 if { (eval echo "$as_me:10383: \"$ac_compile\"") >&5
10384 (eval $ac_compile) 2>&5
10386 echo "$as_me:10386: \$? = $ac_status" >&5
10387 (exit $ac_status); } &&
10388 { ac_try='test -s conftest.$ac_objext'
10389 { (eval echo "$as_me:10389: \"$ac_try\"") >&5
10390 (eval $ac_try) 2>&5
10392 echo "$as_me:10392: \$? = $ac_status" >&5
10393 (exit $ac_status); }; }; then
10396 echo "$as_me: failed program was:" >&5
10397 cat conftest.$ac_ext >&5
10399 rm -f conftest.$ac_objext conftest.$ac_ext
10401 echo "$as_me:10401: result: $CC_SHARED_OPTS" >&5
10402 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
10403 CFLAGS="$cf_save_CFLAGS"
10406 cf_cv_shlib_version_infix=no
10408 case $cf_cv_system_name in
10409 (aix4.3-9*|aix[5-7]*)
10410 if test "$GCC" = yes; then
10411 CC_SHARED_OPTS='-Wl,-brtl'
10412 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10414 CC_SHARED_OPTS='-brtl'
10415 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
10416 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
10420 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
10424 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10425 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10426 cf_cv_shlib_version=cygdll
10427 cf_cv_shlib_version_infix=cygdll
10430 cat >mk_shared_lib.sh <<-CF_EOF
10433 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10436 Linking shared library
10437 ** SHARED_LIB \$SHARED_LIB
10438 ** IMPORT_LIB \$IMPORT_LIB
10440 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10442 chmod +x mk_shared_lib.sh
10446 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10447 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10448 cf_cv_shlib_version=msysdll
10449 cf_cv_shlib_version_infix=msysdll
10452 cat >mk_shared_lib.sh <<-CF_EOF
10455 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
10458 Linking shared library
10459 ** SHARED_LIB \$SHARED_LIB
10460 ** IMPORT_LIB \$IMPORT_LIB
10462 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10464 chmod +x mk_shared_lib.sh
10467 cf_try_cflags="no-cpp-precomp"
10468 CC_SHARED_OPTS="-dynamic"
10469 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
10470 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
10471 cf_cv_shlib_version_infix=yes
10472 echo "$as_me:10472: checking if ld -search_paths_first works" >&5
10473 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
10474 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
10475 echo $ECHO_N "(cached) $ECHO_C" >&6
10478 cf_save_LDFLAGS=$LDFLAGS
10479 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10480 cat >conftest.$ac_ext <<_ACEOF
10481 #line 10481 "configure"
10482 #include "confdefs.h"
10492 rm -f conftest.$ac_objext conftest$ac_exeext
10493 if { (eval echo "$as_me:10493: \"$ac_link\"") >&5
10494 (eval $ac_link) 2>&5
10496 echo "$as_me:10496: \$? = $ac_status" >&5
10497 (exit $ac_status); } &&
10498 { ac_try='test -s conftest$ac_exeext'
10499 { (eval echo "$as_me:10499: \"$ac_try\"") >&5
10500 (eval $ac_try) 2>&5
10502 echo "$as_me:10502: \$? = $ac_status" >&5
10503 (exit $ac_status); }; }; then
10504 cf_cv_ldflags_search_paths_first=yes
10506 echo "$as_me: failed program was:" >&5
10507 cat conftest.$ac_ext >&5
10508 cf_cv_ldflags_search_paths_first=no
10510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10511 LDFLAGS=$cf_save_LDFLAGS
10513 echo "$as_me:10513: result: $cf_cv_ldflags_search_paths_first" >&5
10514 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
10515 if test $cf_cv_ldflags_search_paths_first = yes; then
10516 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
10520 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
10521 if test "$GCC" != yes; then
10522 CC_SHARED_OPTS='+Z'
10524 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
10525 INSTALL_LIB="-m 555"
10528 # (tested with gcc 2.7.2 -- I don't have c89)
10529 if test "$GCC" = yes; then
10530 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
10532 CC_SHARED_OPTS='+Z'
10533 LD_SHARED_OPTS='-Wl,+b,${libdir}'
10535 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
10536 # HP-UX shared libraries must be executable, and should be
10537 # readonly to exploit a quirk in the memory manager.
10538 INSTALL_LIB="-m 555"
10541 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10542 if test "$cf_cv_shlib_version" = rel; then
10543 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10545 cf_shared_soname='`basename $@`'
10548 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
10551 if test "$cf_cv_enable_rpath" = yes ; then
10552 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10554 # tested with IRIX 5.2 and 'cc'.
10555 if test "$GCC" != yes; then
10556 CC_SHARED_OPTS='-KPIC'
10557 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
10559 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
10561 cf_cv_rm_so_locs=yes
10563 (linux*|gnu*|k*bsd*-gnu)
10564 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10565 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10566 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10568 if test "$cf_cv_enable_rpath" = yes ; then
10569 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10572 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10573 if test "$cf_cv_shlib_version" = rel; then
10574 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10576 cf_cv_shared_soname='`basename $@`'
10579 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10582 cf_cv_shlib_version=mingw
10583 cf_cv_shlib_version_infix=mingw
10586 if test "$DFT_LWR_MODEL" = "shared" ; then
10587 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
10588 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10589 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
10592 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
10593 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
10594 cat >mk_shared_lib.sh <<-CF_EOF
10597 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
10600 Linking shared library
10601 ** SHARED_LIB \$SHARED_LIB
10602 ** IMPORT_LIB \$IMPORT_LIB
10604 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
10606 chmod +x mk_shared_lib.sh
10608 (openbsd[2-9].*|mirbsd*)
10609 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10610 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10611 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10613 if test "$cf_cv_enable_rpath" = yes ; then
10614 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10616 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10618 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10619 if test "$cf_cv_shlib_version" = rel; then
10620 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10622 cf_cv_shared_soname='`basename $@`'
10625 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10627 (nto-qnx*|openbsd*|freebsd[12].*)
10628 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10629 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
10630 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10632 (dragonfly*|freebsd*)
10633 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10634 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10635 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10636 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
10637 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10640 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10641 if test "$cf_cv_shlib_version" = rel; then
10642 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10644 cf_cv_shared_soname='`basename $@`'
10647 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
10650 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
10651 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
10652 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
10653 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10654 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
10655 if test "$cf_cv_shlib_version" = auto; then
10656 if test -f /usr/libexec/ld.elf_so; then
10657 cf_cv_shlib_version=abi
10659 cf_cv_shlib_version=rel
10663 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10664 if test "$cf_cv_shlib_version" = rel; then
10665 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10667 cf_cv_shared_soname='`basename $@`'
10670 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
10672 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
10676 # tested with OSF/1 V3.2 and 'cc'
10677 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
10678 # link with shared libs).
10679 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
10682 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
10685 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
10686 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
10687 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
10688 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10690 cf_cv_rm_so_locs=yes
10692 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
10693 # tested with osr5.0.5
10694 if test "$GCC" != yes; then
10695 CC_SHARED_OPTS='-belf -KPIC'
10697 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
10698 if test "$cf_cv_enable_rpath" = yes ; then
10699 # only way is to set LD_RUN_PATH but no switch for it
10702 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10703 LINK_PROGS='LD_RUN_PATH=${libdir}'
10704 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
10707 # tested with SunOS 4.1.1 and gcc 2.7.0
10708 if test "$GCC" != yes; then
10709 CC_SHARED_OPTS='-KPIC'
10711 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
10712 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10715 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
10716 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
10717 if test "$DFT_LWR_MODEL" = "shared" ; then
10718 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
10719 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
10721 if test "$cf_cv_enable_rpath" = yes ; then
10722 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
10725 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
10726 if test "$cf_cv_shlib_version" = rel; then
10727 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
10729 cf_cv_shared_soname='`basename $@`'
10732 if test "$GCC" != yes; then
10733 cf_save_CFLAGS="$CFLAGS"
10734 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
10736 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
10737 cat >conftest.$ac_ext <<_ACEOF
10738 #line 10738 "configure"
10739 #include "confdefs.h"
10749 rm -f conftest.$ac_objext
10750 if { (eval echo "$as_me:10750: \"$ac_compile\"") >&5
10751 (eval $ac_compile) 2>&5
10753 echo "$as_me:10753: \$? = $ac_status" >&5
10754 (exit $ac_status); } &&
10755 { ac_try='test -s conftest.$ac_objext'
10756 { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757 (eval $ac_try) 2>&5
10759 echo "$as_me:10759: \$? = $ac_status" >&5
10760 (exit $ac_status); }; }; then
10763 echo "$as_me: failed program was:" >&5
10764 cat conftest.$ac_ext >&5
10766 rm -f conftest.$ac_objext conftest.$ac_ext
10768 CFLAGS="$cf_save_CFLAGS"
10769 CC_SHARED_OPTS=$cf_shared_opts
10770 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
10772 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
10775 (sysv5uw7*|unix_sv*)
10776 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
10777 if test "$GCC" != yes; then
10778 CC_SHARED_OPTS='-KPIC'
10780 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
10783 CC_SHARED_OPTS='unknown'
10784 MK_SHARED_LIB='echo unknown'
10788 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
10789 case "$cf_cv_shlib_version" in
10791 case "$MK_SHARED_LIB" in
10793 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
10796 { echo "$as_me:10796: WARNING: ignored --with-shlib-version" >&5
10797 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
10803 if test -n "$cf_try_cflags"
10805 cat > conftest.$ac_ext <<EOF
10806 #line 10806 "${as_me:-configure}"
10808 int main(int argc, char *argv[])
10811 return (argv[argc-1] == 0) ;
10814 cf_save_CFLAGS="$CFLAGS"
10815 for cf_opt in $cf_try_cflags
10817 CFLAGS="$cf_save_CFLAGS -$cf_opt"
10818 echo "$as_me:10818: checking if CFLAGS option -$cf_opt works" >&5
10819 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
10820 if { (eval echo "$as_me:10820: \"$ac_compile\"") >&5
10821 (eval $ac_compile) 2>&5
10823 echo "$as_me:10823: \$? = $ac_status" >&5
10824 (exit $ac_status); }; then
10825 echo "$as_me:10825: result: yes" >&5
10826 echo "${ECHO_T}yes" >&6
10827 cf_save_CFLAGS="$CFLAGS"
10829 echo "$as_me:10829: result: no" >&5
10830 echo "${ECHO_T}no" >&6
10833 CFLAGS="$cf_save_CFLAGS"
10836 # RPATH_LIST is a colon-separated list of directories
10837 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
10838 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
10840 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
10842 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
10844 echo "${as_me:-configure}:10844: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
10846 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
10848 echo "${as_me:-configure}:10848: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
10850 # The test/sample programs in the original tree link using rpath option.
10851 # Make it optional for packagers.
10852 if test -n "$LOCAL_LDFLAGS"
10854 echo "$as_me:10854: checking if you want to link sample programs with rpath option" >&5
10855 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
10857 # Check whether --enable-rpath-link or --disable-rpath-link was given.
10858 if test "${enable_rpath_link+set}" = set; then
10859 enableval="$enable_rpath_link"
10860 with_rpath_link=$enableval
10862 with_rpath_link=yes
10864 echo "$as_me:10864: result: $with_rpath_link" >&5
10865 echo "${ECHO_T}$with_rpath_link" >&6
10866 if test "$with_rpath_link" = no
10873 ###############################################################################
10875 ### use option --enable-broken-linker to force on use of broken-linker support
10876 echo "$as_me:10876: checking if you want broken-linker support code" >&5
10877 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10879 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10880 if test "${enable_broken_linker+set}" = set; then
10881 enableval="$enable_broken_linker"
10882 with_broken_linker=$enableval
10884 with_broken_linker=${BROKEN_LINKER:-no}
10886 echo "$as_me:10886: result: $with_broken_linker" >&5
10887 echo "${ECHO_T}$with_broken_linker" >&6
10890 if test "$with_broken_linker" = yes ; then
10891 cat >>confdefs.h <<\EOF
10892 #define BROKEN_LINKER 1
10896 elif test "$DFT_LWR_MODEL" = shared ; then
10897 case $cf_cv_system_name in
10899 cat >>confdefs.h <<\EOF
10900 #define BROKEN_LINKER 1
10904 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
10906 echo "${as_me:-configure}:10906: testing cygwin linker is broken anyway ..." 1>&5
10912 # Check to define _XOPEN_SOURCE "automatically"
10914 cf_XOPEN_SOURCE=600
10915 cf_POSIX_C_SOURCE=199506L
10920 cf_xopen_source="-D_ALL_SOURCE"
10923 cf_XOPEN_SOURCE=600
10926 cf_xopen_source="-D_APPLE_C_SOURCE"
10929 cf_xopen_source="-D_DARWIN_C_SOURCE"
10932 (freebsd*|dragonfly*)
10933 # 5.x headers associate
10934 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10935 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10936 cf_POSIX_C_SOURCE=200112L
10937 cf_XOPEN_SOURCE=600
10938 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10941 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10944 cf_xopen_source="-D_HPUX_SOURCE"
10947 cf_xopen_source="-D_SGI_SOURCE"
10950 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
10952 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10954 echo "$as_me:10954: checking if this is the GNU C library" >&5
10955 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10956 if test "${cf_cv_gnu_library+set}" = set; then
10957 echo $ECHO_N "(cached) $ECHO_C" >&6
10960 cat >conftest.$ac_ext <<_ACEOF
10961 #line 10961 "configure"
10962 #include "confdefs.h"
10963 #include <sys/types.h>
10968 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10971 # error not GNU C library
10977 rm -f conftest.$ac_objext
10978 if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
10979 (eval $ac_compile) 2>&5
10981 echo "$as_me:10981: \$? = $ac_status" >&5
10982 (exit $ac_status); } &&
10983 { ac_try='test -s conftest.$ac_objext'
10984 { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985 (eval $ac_try) 2>&5
10987 echo "$as_me:10987: \$? = $ac_status" >&5
10988 (exit $ac_status); }; }; then
10989 cf_cv_gnu_library=yes
10991 echo "$as_me: failed program was:" >&5
10992 cat conftest.$ac_ext >&5
10993 cf_cv_gnu_library=no
10995 rm -f conftest.$ac_objext conftest.$ac_ext
10998 echo "$as_me:10998: result: $cf_cv_gnu_library" >&5
10999 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11001 if test x$cf_cv_gnu_library = xyes; then
11003 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11004 # was changed to help a little...
11005 echo "$as_me:11005: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11006 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11007 if test "${cf_cv_gnu_library_219+set}" = set; then
11008 echo $ECHO_N "(cached) $ECHO_C" >&6
11011 cf_save="$CPPFLAGS"
11013 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11014 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11016 cat >conftest.$ac_ext <<_ACEOF
11017 #line 11017 "configure"
11018 #include "confdefs.h"
11019 #include <sys/types.h>
11024 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11027 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11033 rm -f conftest.$ac_objext
11034 if { (eval echo "$as_me:11034: \"$ac_compile\"") >&5
11035 (eval $ac_compile) 2>&5
11037 echo "$as_me:11037: \$? = $ac_status" >&5
11038 (exit $ac_status); } &&
11039 { ac_try='test -s conftest.$ac_objext'
11040 { (eval echo "$as_me:11040: \"$ac_try\"") >&5
11041 (eval $ac_try) 2>&5
11043 echo "$as_me:11043: \$? = $ac_status" >&5
11044 (exit $ac_status); }; }; then
11045 cf_cv_gnu_library_219=yes
11047 echo "$as_me: failed program was:" >&5
11048 cat conftest.$ac_ext >&5
11049 cf_cv_gnu_library_219=no
11051 rm -f conftest.$ac_objext conftest.$ac_ext
11052 CPPFLAGS="$cf_save"
11055 echo "$as_me:11055: result: $cf_cv_gnu_library_219" >&5
11056 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
11058 if test "x$cf_cv_gnu_library_219" = xyes; then
11059 cf_save="$CPPFLAGS"
11060 echo "$as_me:11060: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
11061 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
11062 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
11063 echo $ECHO_N "(cached) $ECHO_C" >&6
11069 cf_new_extra_cppflags=
11071 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
11073 case $cf_fix_cppflags in
11075 case $cf_add_cflags in
11076 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11077 case $cf_add_cflags in
11079 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11081 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11082 && test -z "${cf_tst_cflags}" \
11083 && cf_fix_cppflags=yes
11085 if test $cf_fix_cppflags = yes ; then
11087 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11088 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11091 elif test "${cf_tst_cflags}" = "\"'" ; then
11093 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11094 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11100 case "$CPPFLAGS" in
11104 case $cf_add_cflags in
11106 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11108 CPPFLAGS=`echo "$CPPFLAGS" | \
11109 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11110 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11115 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11116 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11123 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11124 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11131 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11132 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11134 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11136 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11137 && test -z "${cf_tst_cflags}" \
11138 && cf_fix_cppflags=no
11143 if test -n "$cf_new_cflags" ; then
11145 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11146 CFLAGS="${CFLAGS}$cf_new_cflags"
11150 if test -n "$cf_new_cppflags" ; then
11152 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11153 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11157 if test -n "$cf_new_extra_cppflags" ; then
11159 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11160 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11164 cat >conftest.$ac_ext <<_ACEOF
11165 #line 11165 "configure"
11166 #include "confdefs.h"
11168 #include <limits.h>
11169 #include <sys/types.h>
11175 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11178 # error GNU C library is too old
11184 rm -f conftest.$ac_objext
11185 if { (eval echo "$as_me:11185: \"$ac_compile\"") >&5
11186 (eval $ac_compile) 2>&5
11188 echo "$as_me:11188: \$? = $ac_status" >&5
11189 (exit $ac_status); } &&
11190 { ac_try='test -s conftest.$ac_objext'
11191 { (eval echo "$as_me:11191: \"$ac_try\"") >&5
11192 (eval $ac_try) 2>&5
11194 echo "$as_me:11194: \$? = $ac_status" >&5
11195 (exit $ac_status); }; }; then
11196 cf_cv_gnu_dftsrc_219=yes
11198 echo "$as_me: failed program was:" >&5
11199 cat conftest.$ac_ext >&5
11200 cf_cv_gnu_dftsrc_219=no
11202 rm -f conftest.$ac_objext conftest.$ac_ext
11205 echo "$as_me:11205: result: $cf_cv_gnu_dftsrc_219" >&5
11206 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11207 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11209 cf_cv_gnu_dftsrc_219=maybe
11212 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11214 echo "$as_me:11214: checking if we must define _GNU_SOURCE" >&5
11215 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11216 if test "${cf_cv_gnu_source+set}" = set; then
11217 echo $ECHO_N "(cached) $ECHO_C" >&6
11220 cat >conftest.$ac_ext <<_ACEOF
11221 #line 11221 "configure"
11222 #include "confdefs.h"
11223 #include <sys/types.h>
11228 #ifndef _XOPEN_SOURCE
11229 #error expected _XOPEN_SOURCE to be defined
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_cv_gnu_source=no
11249 echo "$as_me: failed program was:" >&5
11250 cat conftest.$ac_ext >&5
11251 cf_save="$CPPFLAGS"
11256 cf_new_extra_cppflags=
11258 for cf_add_cflags in -D_GNU_SOURCE
11260 case $cf_fix_cppflags in
11262 case $cf_add_cflags in
11263 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11264 case $cf_add_cflags in
11266 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11268 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11269 && test -z "${cf_tst_cflags}" \
11270 && cf_fix_cppflags=yes
11272 if test $cf_fix_cppflags = yes ; then
11274 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11275 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11278 elif test "${cf_tst_cflags}" = "\"'" ; then
11280 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11281 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11287 case "$CPPFLAGS" in
11291 case $cf_add_cflags in
11293 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11295 CPPFLAGS=`echo "$CPPFLAGS" | \
11296 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11297 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11302 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11303 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11310 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11311 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11318 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11319 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11321 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11323 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11324 && test -z "${cf_tst_cflags}" \
11325 && cf_fix_cppflags=no
11330 if test -n "$cf_new_cflags" ; then
11332 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11333 CFLAGS="${CFLAGS}$cf_new_cflags"
11337 if test -n "$cf_new_cppflags" ; then
11339 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11340 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11344 if test -n "$cf_new_extra_cppflags" ; then
11346 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11347 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11351 cat >conftest.$ac_ext <<_ACEOF
11352 #line 11352 "configure"
11353 #include "confdefs.h"
11354 #include <sys/types.h>
11359 #ifdef _XOPEN_SOURCE
11360 #error expected _XOPEN_SOURCE to be undefined
11366 rm -f conftest.$ac_objext
11367 if { (eval echo "$as_me:11367: \"$ac_compile\"") >&5
11368 (eval $ac_compile) 2>&5
11370 echo "$as_me:11370: \$? = $ac_status" >&5
11371 (exit $ac_status); } &&
11372 { ac_try='test -s conftest.$ac_objext'
11373 { (eval echo "$as_me:11373: \"$ac_try\"") >&5
11374 (eval $ac_try) 2>&5
11376 echo "$as_me:11376: \$? = $ac_status" >&5
11377 (exit $ac_status); }; }; then
11378 cf_cv_gnu_source=no
11380 echo "$as_me: failed program was:" >&5
11381 cat conftest.$ac_ext >&5
11382 cf_cv_gnu_source=yes
11384 rm -f conftest.$ac_objext conftest.$ac_ext
11385 CPPFLAGS="$cf_save"
11388 rm -f conftest.$ac_objext conftest.$ac_ext
11391 echo "$as_me:11391: result: $cf_cv_gnu_source" >&5
11392 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11394 if test "$cf_cv_gnu_source" = yes
11396 echo "$as_me:11396: checking if we should also define _DEFAULT_SOURCE" >&5
11397 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11398 if test "${cf_cv_default_source+set}" = set; then
11399 echo $ECHO_N "(cached) $ECHO_C" >&6
11402 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11403 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11405 cat >conftest.$ac_ext <<_ACEOF
11406 #line 11406 "configure"
11407 #include "confdefs.h"
11408 #include <sys/types.h>
11413 #ifdef _DEFAULT_SOURCE
11414 #error expected _DEFAULT_SOURCE to be undefined
11420 rm -f conftest.$ac_objext
11421 if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5
11422 (eval $ac_compile) 2>&5
11424 echo "$as_me:11424: \$? = $ac_status" >&5
11425 (exit $ac_status); } &&
11426 { ac_try='test -s conftest.$ac_objext'
11427 { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428 (eval $ac_try) 2>&5
11430 echo "$as_me:11430: \$? = $ac_status" >&5
11431 (exit $ac_status); }; }; then
11432 cf_cv_default_source=no
11434 echo "$as_me: failed program was:" >&5
11435 cat conftest.$ac_ext >&5
11436 cf_cv_default_source=yes
11438 rm -f conftest.$ac_objext conftest.$ac_ext
11441 echo "$as_me:11441: result: $cf_cv_default_source" >&5
11442 echo "${ECHO_T}$cf_cv_default_source" >&6
11443 if test "$cf_cv_default_source" = yes
11446 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11447 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11457 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11460 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11463 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11465 cf_save_CFLAGS="$CFLAGS"
11466 cf_save_CPPFLAGS="$CPPFLAGS"
11468 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11469 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11470 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11472 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11473 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11474 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11476 echo "$as_me:11476: checking if we should define _POSIX_C_SOURCE" >&5
11477 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11478 if test "${cf_cv_posix_c_source+set}" = set; then
11479 echo $ECHO_N "(cached) $ECHO_C" >&6
11482 echo "${as_me:-configure}:11482: testing if the symbol is already defined go no further ..." 1>&5
11484 cat >conftest.$ac_ext <<_ACEOF
11485 #line 11485 "configure"
11486 #include "confdefs.h"
11487 #include <sys/types.h>
11492 #ifndef _POSIX_C_SOURCE
11499 rm -f conftest.$ac_objext
11500 if { (eval echo "$as_me:11500: \"$ac_compile\"") >&5
11501 (eval $ac_compile) 2>&5
11503 echo "$as_me:11503: \$? = $ac_status" >&5
11504 (exit $ac_status); } &&
11505 { ac_try='test -s conftest.$ac_objext'
11506 { (eval echo "$as_me:11506: \"$ac_try\"") >&5
11507 (eval $ac_try) 2>&5
11509 echo "$as_me:11509: \$? = $ac_status" >&5
11510 (exit $ac_status); }; }; then
11511 cf_cv_posix_c_source=no
11513 echo "$as_me: failed program was:" >&5
11514 cat conftest.$ac_ext >&5
11515 cf_want_posix_source=no
11516 case .$cf_POSIX_C_SOURCE in
11518 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11521 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11522 cf_want_posix_source=yes
11525 cf_want_posix_source=yes
11528 if test "$cf_want_posix_source" = yes ; then
11529 cat >conftest.$ac_ext <<_ACEOF
11530 #line 11530 "configure"
11531 #include "confdefs.h"
11532 #include <sys/types.h>
11537 #ifdef _POSIX_SOURCE
11544 rm -f conftest.$ac_objext
11545 if { (eval echo "$as_me:11545: \"$ac_compile\"") >&5
11546 (eval $ac_compile) 2>&5
11548 echo "$as_me:11548: \$? = $ac_status" >&5
11549 (exit $ac_status); } &&
11550 { ac_try='test -s conftest.$ac_objext'
11551 { (eval echo "$as_me:11551: \"$ac_try\"") >&5
11552 (eval $ac_try) 2>&5
11554 echo "$as_me:11554: \$? = $ac_status" >&5
11555 (exit $ac_status); }; }; then
11558 echo "$as_me: failed program was:" >&5
11559 cat conftest.$ac_ext >&5
11560 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11562 rm -f conftest.$ac_objext conftest.$ac_ext
11565 echo "${as_me:-configure}:11565: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11567 CFLAGS="$cf_trim_CFLAGS"
11568 CPPFLAGS="$cf_trim_CPPFLAGS"
11570 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11571 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11573 echo "${as_me:-configure}:11573: testing if the second compile does not leave our definition intact error ..." 1>&5
11575 cat >conftest.$ac_ext <<_ACEOF
11576 #line 11576 "configure"
11577 #include "confdefs.h"
11578 #include <sys/types.h>
11583 #ifndef _POSIX_C_SOURCE
11590 rm -f conftest.$ac_objext
11591 if { (eval echo "$as_me:11591: \"$ac_compile\"") >&5
11592 (eval $ac_compile) 2>&5
11594 echo "$as_me:11594: \$? = $ac_status" >&5
11595 (exit $ac_status); } &&
11596 { ac_try='test -s conftest.$ac_objext'
11597 { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598 (eval $ac_try) 2>&5
11600 echo "$as_me:11600: \$? = $ac_status" >&5
11601 (exit $ac_status); }; }; then
11604 echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 cf_cv_posix_c_source=no
11608 rm -f conftest.$ac_objext conftest.$ac_ext
11609 CFLAGS="$cf_save_CFLAGS"
11610 CPPFLAGS="$cf_save_CPPFLAGS"
11613 rm -f conftest.$ac_objext conftest.$ac_ext
11616 echo "$as_me:11616: result: $cf_cv_posix_c_source" >&5
11617 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11619 if test "$cf_cv_posix_c_source" != no ; then
11620 CFLAGS="$cf_trim_CFLAGS"
11621 CPPFLAGS="$cf_trim_CPPFLAGS"
11626 cf_new_extra_cppflags=
11628 for cf_add_cflags in $cf_cv_posix_c_source
11630 case $cf_fix_cppflags in
11632 case $cf_add_cflags in
11633 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11634 case $cf_add_cflags in
11636 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11639 && test -z "${cf_tst_cflags}" \
11640 && cf_fix_cppflags=yes
11642 if test $cf_fix_cppflags = yes ; then
11644 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11645 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11648 elif test "${cf_tst_cflags}" = "\"'" ; then
11650 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11651 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11657 case "$CPPFLAGS" in
11661 case $cf_add_cflags in
11663 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11665 CPPFLAGS=`echo "$CPPFLAGS" | \
11666 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11667 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11672 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11673 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11680 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11681 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11688 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11689 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11691 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11693 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11694 && test -z "${cf_tst_cflags}" \
11695 && cf_fix_cppflags=no
11700 if test -n "$cf_new_cflags" ; then
11702 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11703 CFLAGS="${CFLAGS}$cf_new_cflags"
11707 if test -n "$cf_new_cppflags" ; then
11709 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11710 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11714 if test -n "$cf_new_extra_cppflags" ; then
11716 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11717 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11725 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11728 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11729 cf_xopen_source="-D_BSD_SOURCE"
11730 cf_XOPEN_SOURCE=600
11733 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11736 cf_xopen_source="-D_OSF_SOURCE"
11739 cf_xopen_source="-D_QNX_SOURCE"
11742 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11745 cf_xopen_source="-D__EXTENSIONS__"
11746 cf_cv_xopen_source=broken
11748 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11754 echo "$as_me:11754: checking if we should define _XOPEN_SOURCE" >&5
11755 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11756 if test "${cf_cv_xopen_source+set}" = set; then
11757 echo $ECHO_N "(cached) $ECHO_C" >&6
11760 cat >conftest.$ac_ext <<_ACEOF
11761 #line 11761 "configure"
11762 #include "confdefs.h"
11764 #include <stdlib.h>
11765 #include <string.h>
11766 #include <sys/types.h>
11772 #ifndef _XOPEN_SOURCE
11779 rm -f conftest.$ac_objext
11780 if { (eval echo "$as_me:11780: \"$ac_compile\"") >&5
11781 (eval $ac_compile) 2>&5
11783 echo "$as_me:11783: \$? = $ac_status" >&5
11784 (exit $ac_status); } &&
11785 { ac_try='test -s conftest.$ac_objext'
11786 { (eval echo "$as_me:11786: \"$ac_try\"") >&5
11787 (eval $ac_try) 2>&5
11789 echo "$as_me:11789: \$? = $ac_status" >&5
11790 (exit $ac_status); }; }; then
11791 cf_cv_xopen_source=no
11793 echo "$as_me: failed program was:" >&5
11794 cat conftest.$ac_ext >&5
11795 cf_save="$CPPFLAGS"
11797 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11798 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11800 cat >conftest.$ac_ext <<_ACEOF
11801 #line 11801 "configure"
11802 #include "confdefs.h"
11804 #include <stdlib.h>
11805 #include <string.h>
11806 #include <sys/types.h>
11812 #ifdef _XOPEN_SOURCE
11819 rm -f conftest.$ac_objext
11820 if { (eval echo "$as_me:11820: \"$ac_compile\"") >&5
11821 (eval $ac_compile) 2>&5
11823 echo "$as_me:11823: \$? = $ac_status" >&5
11824 (exit $ac_status); } &&
11825 { ac_try='test -s conftest.$ac_objext'
11826 { (eval echo "$as_me:11826: \"$ac_try\"") >&5
11827 (eval $ac_try) 2>&5
11829 echo "$as_me:11829: \$? = $ac_status" >&5
11830 (exit $ac_status); }; }; then
11831 cf_cv_xopen_source=no
11833 echo "$as_me: failed program was:" >&5
11834 cat conftest.$ac_ext >&5
11835 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11837 rm -f conftest.$ac_objext conftest.$ac_ext
11838 CPPFLAGS="$cf_save"
11841 rm -f conftest.$ac_objext conftest.$ac_ext
11844 echo "$as_me:11844: result: $cf_cv_xopen_source" >&5
11845 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11847 if test "$cf_cv_xopen_source" != no ; then
11849 CFLAGS=`echo "$CFLAGS" | \
11850 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11851 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11853 CPPFLAGS=`echo "$CPPFLAGS" | \
11854 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11855 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
11857 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11862 cf_new_extra_cppflags=
11864 for cf_add_cflags in $cf_temp_xopen_source
11866 case $cf_fix_cppflags in
11868 case $cf_add_cflags in
11869 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11870 case $cf_add_cflags in
11872 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11874 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11875 && test -z "${cf_tst_cflags}" \
11876 && cf_fix_cppflags=yes
11878 if test $cf_fix_cppflags = yes ; then
11880 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11881 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11884 elif test "${cf_tst_cflags}" = "\"'" ; then
11886 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11887 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11893 case "$CPPFLAGS" in
11897 case $cf_add_cflags in
11899 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11901 CPPFLAGS=`echo "$CPPFLAGS" | \
11902 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11903 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11908 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11909 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11916 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11917 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11924 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11925 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11927 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11929 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11930 && test -z "${cf_tst_cflags}" \
11931 && cf_fix_cppflags=no
11936 if test -n "$cf_new_cflags" ; then
11938 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11939 CFLAGS="${CFLAGS}$cf_new_cflags"
11943 if test -n "$cf_new_cppflags" ; then
11945 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11946 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11950 if test -n "$cf_new_extra_cppflags" ; then
11952 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11953 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11959 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11961 cf_save_CFLAGS="$CFLAGS"
11962 cf_save_CPPFLAGS="$CPPFLAGS"
11964 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11965 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11966 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11968 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11969 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
11970 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
11972 echo "$as_me:11972: checking if we should define _POSIX_C_SOURCE" >&5
11973 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11974 if test "${cf_cv_posix_c_source+set}" = set; then
11975 echo $ECHO_N "(cached) $ECHO_C" >&6
11978 echo "${as_me:-configure}:11978: testing if the symbol is already defined go no further ..." 1>&5
11980 cat >conftest.$ac_ext <<_ACEOF
11981 #line 11981 "configure"
11982 #include "confdefs.h"
11983 #include <sys/types.h>
11988 #ifndef _POSIX_C_SOURCE
11995 rm -f conftest.$ac_objext
11996 if { (eval echo "$as_me:11996: \"$ac_compile\"") >&5
11997 (eval $ac_compile) 2>&5
11999 echo "$as_me:11999: \$? = $ac_status" >&5
12000 (exit $ac_status); } &&
12001 { ac_try='test -s conftest.$ac_objext'
12002 { (eval echo "$as_me:12002: \"$ac_try\"") >&5
12003 (eval $ac_try) 2>&5
12005 echo "$as_me:12005: \$? = $ac_status" >&5
12006 (exit $ac_status); }; }; then
12007 cf_cv_posix_c_source=no
12009 echo "$as_me: failed program was:" >&5
12010 cat conftest.$ac_ext >&5
12011 cf_want_posix_source=no
12012 case .$cf_POSIX_C_SOURCE in
12014 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12017 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12018 cf_want_posix_source=yes
12021 cf_want_posix_source=yes
12024 if test "$cf_want_posix_source" = yes ; then
12025 cat >conftest.$ac_ext <<_ACEOF
12026 #line 12026 "configure"
12027 #include "confdefs.h"
12028 #include <sys/types.h>
12033 #ifdef _POSIX_SOURCE
12040 rm -f conftest.$ac_objext
12041 if { (eval echo "$as_me:12041: \"$ac_compile\"") >&5
12042 (eval $ac_compile) 2>&5
12044 echo "$as_me:12044: \$? = $ac_status" >&5
12045 (exit $ac_status); } &&
12046 { ac_try='test -s conftest.$ac_objext'
12047 { (eval echo "$as_me:12047: \"$ac_try\"") >&5
12048 (eval $ac_try) 2>&5
12050 echo "$as_me:12050: \$? = $ac_status" >&5
12051 (exit $ac_status); }; }; then
12054 echo "$as_me: failed program was:" >&5
12055 cat conftest.$ac_ext >&5
12056 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12058 rm -f conftest.$ac_objext conftest.$ac_ext
12061 echo "${as_me:-configure}:12061: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12063 CFLAGS="$cf_trim_CFLAGS"
12064 CPPFLAGS="$cf_trim_CPPFLAGS"
12066 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12067 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12069 echo "${as_me:-configure}:12069: testing if the second compile does not leave our definition intact error ..." 1>&5
12071 cat >conftest.$ac_ext <<_ACEOF
12072 #line 12072 "configure"
12073 #include "confdefs.h"
12074 #include <sys/types.h>
12079 #ifndef _POSIX_C_SOURCE
12086 rm -f conftest.$ac_objext
12087 if { (eval echo "$as_me:12087: \"$ac_compile\"") >&5
12088 (eval $ac_compile) 2>&5
12090 echo "$as_me:12090: \$? = $ac_status" >&5
12091 (exit $ac_status); } &&
12092 { ac_try='test -s conftest.$ac_objext'
12093 { (eval echo "$as_me:12093: \"$ac_try\"") >&5
12094 (eval $ac_try) 2>&5
12096 echo "$as_me:12096: \$? = $ac_status" >&5
12097 (exit $ac_status); }; }; then
12100 echo "$as_me: failed program was:" >&5
12101 cat conftest.$ac_ext >&5
12102 cf_cv_posix_c_source=no
12104 rm -f conftest.$ac_objext conftest.$ac_ext
12105 CFLAGS="$cf_save_CFLAGS"
12106 CPPFLAGS="$cf_save_CPPFLAGS"
12109 rm -f conftest.$ac_objext conftest.$ac_ext
12112 echo "$as_me:12112: result: $cf_cv_posix_c_source" >&5
12113 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12115 if test "$cf_cv_posix_c_source" != no ; then
12116 CFLAGS="$cf_trim_CFLAGS"
12117 CPPFLAGS="$cf_trim_CPPFLAGS"
12122 cf_new_extra_cppflags=
12124 for cf_add_cflags in $cf_cv_posix_c_source
12126 case $cf_fix_cppflags in
12128 case $cf_add_cflags in
12129 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12130 case $cf_add_cflags in
12132 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12134 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12135 && test -z "${cf_tst_cflags}" \
12136 && cf_fix_cppflags=yes
12138 if test $cf_fix_cppflags = yes ; then
12140 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12141 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12144 elif test "${cf_tst_cflags}" = "\"'" ; then
12146 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12147 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12153 case "$CPPFLAGS" in
12157 case $cf_add_cflags in
12159 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12161 CPPFLAGS=`echo "$CPPFLAGS" | \
12162 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12163 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12168 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12169 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12176 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12177 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12184 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12185 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12187 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12189 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12190 && test -z "${cf_tst_cflags}" \
12191 && cf_fix_cppflags=no
12196 if test -n "$cf_new_cflags" ; then
12198 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12199 CFLAGS="${CFLAGS}$cf_new_cflags"
12203 if test -n "$cf_new_cppflags" ; then
12205 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12206 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12210 if test -n "$cf_new_extra_cppflags" ; then
12212 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12213 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12222 if test -n "$cf_xopen_source" ; then
12227 cf_new_extra_cppflags=
12229 for cf_add_cflags in $cf_xopen_source
12231 case $cf_fix_cppflags in
12233 case $cf_add_cflags in
12234 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12235 case $cf_add_cflags in
12237 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12239 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12240 && test -z "${cf_tst_cflags}" \
12241 && cf_fix_cppflags=yes
12243 if test $cf_fix_cppflags = yes ; then
12245 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12246 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12249 elif test "${cf_tst_cflags}" = "\"'" ; then
12251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12258 case "$CPPFLAGS" in
12262 case $cf_add_cflags in
12264 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12266 CPPFLAGS=`echo "$CPPFLAGS" | \
12267 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12268 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12273 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12274 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12281 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12282 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12292 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12294 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12295 && test -z "${cf_tst_cflags}" \
12296 && cf_fix_cppflags=no
12301 if test -n "$cf_new_cflags" ; then
12302 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12304 echo "${as_me:-configure}:12304: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12306 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12307 CFLAGS="${CFLAGS}$cf_new_cflags"
12311 if test -n "$cf_new_cppflags" ; then
12312 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12314 echo "${as_me:-configure}:12314: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12316 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12317 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12321 if test -n "$cf_new_extra_cppflags" ; then
12322 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12324 echo "${as_me:-configure}:12324: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12326 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12327 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12333 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12334 echo "$as_me:12334: checking if _XOPEN_SOURCE really is set" >&5
12335 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12336 cat >conftest.$ac_ext <<_ACEOF
12337 #line 12337 "configure"
12338 #include "confdefs.h"
12339 #include <stdlib.h>
12344 #ifndef _XOPEN_SOURCE
12351 rm -f conftest.$ac_objext
12352 if { (eval echo "$as_me:12352: \"$ac_compile\"") >&5
12353 (eval $ac_compile) 2>&5
12355 echo "$as_me:12355: \$? = $ac_status" >&5
12356 (exit $ac_status); } &&
12357 { ac_try='test -s conftest.$ac_objext'
12358 { (eval echo "$as_me:12358: \"$ac_try\"") >&5
12359 (eval $ac_try) 2>&5
12361 echo "$as_me:12361: \$? = $ac_status" >&5
12362 (exit $ac_status); }; }; then
12363 cf_XOPEN_SOURCE_set=yes
12365 echo "$as_me: failed program was:" >&5
12366 cat conftest.$ac_ext >&5
12367 cf_XOPEN_SOURCE_set=no
12369 rm -f conftest.$ac_objext conftest.$ac_ext
12370 echo "$as_me:12370: result: $cf_XOPEN_SOURCE_set" >&5
12371 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12372 if test $cf_XOPEN_SOURCE_set = yes
12374 cat >conftest.$ac_ext <<_ACEOF
12375 #line 12375 "configure"
12376 #include "confdefs.h"
12377 #include <stdlib.h>
12382 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12389 rm -f conftest.$ac_objext
12390 if { (eval echo "$as_me:12390: \"$ac_compile\"") >&5
12391 (eval $ac_compile) 2>&5
12393 echo "$as_me:12393: \$? = $ac_status" >&5
12394 (exit $ac_status); } &&
12395 { ac_try='test -s conftest.$ac_objext'
12396 { (eval echo "$as_me:12396: \"$ac_try\"") >&5
12397 (eval $ac_try) 2>&5
12399 echo "$as_me:12399: \$? = $ac_status" >&5
12400 (exit $ac_status); }; }; then
12401 cf_XOPEN_SOURCE_set_ok=yes
12403 echo "$as_me: failed program was:" >&5
12404 cat conftest.$ac_ext >&5
12405 cf_XOPEN_SOURCE_set_ok=no
12407 rm -f conftest.$ac_objext conftest.$ac_ext
12408 if test $cf_XOPEN_SOURCE_set_ok = no
12410 { echo "$as_me:12410: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12411 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12415 echo "$as_me:12415: checking if we should define _XOPEN_SOURCE" >&5
12416 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12417 if test "${cf_cv_xopen_source+set}" = set; then
12418 echo $ECHO_N "(cached) $ECHO_C" >&6
12421 cat >conftest.$ac_ext <<_ACEOF
12422 #line 12422 "configure"
12423 #include "confdefs.h"
12425 #include <stdlib.h>
12426 #include <string.h>
12427 #include <sys/types.h>
12433 #ifndef _XOPEN_SOURCE
12440 rm -f conftest.$ac_objext
12441 if { (eval echo "$as_me:12441: \"$ac_compile\"") >&5
12442 (eval $ac_compile) 2>&5
12444 echo "$as_me:12444: \$? = $ac_status" >&5
12445 (exit $ac_status); } &&
12446 { ac_try='test -s conftest.$ac_objext'
12447 { (eval echo "$as_me:12447: \"$ac_try\"") >&5
12448 (eval $ac_try) 2>&5
12450 echo "$as_me:12450: \$? = $ac_status" >&5
12451 (exit $ac_status); }; }; then
12452 cf_cv_xopen_source=no
12454 echo "$as_me: failed program was:" >&5
12455 cat conftest.$ac_ext >&5
12456 cf_save="$CPPFLAGS"
12458 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12459 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12461 cat >conftest.$ac_ext <<_ACEOF
12462 #line 12462 "configure"
12463 #include "confdefs.h"
12465 #include <stdlib.h>
12466 #include <string.h>
12467 #include <sys/types.h>
12473 #ifdef _XOPEN_SOURCE
12480 rm -f conftest.$ac_objext
12481 if { (eval echo "$as_me:12481: \"$ac_compile\"") >&5
12482 (eval $ac_compile) 2>&5
12484 echo "$as_me:12484: \$? = $ac_status" >&5
12485 (exit $ac_status); } &&
12486 { ac_try='test -s conftest.$ac_objext'
12487 { (eval echo "$as_me:12487: \"$ac_try\"") >&5
12488 (eval $ac_try) 2>&5
12490 echo "$as_me:12490: \$? = $ac_status" >&5
12491 (exit $ac_status); }; }; then
12492 cf_cv_xopen_source=no
12494 echo "$as_me: failed program was:" >&5
12495 cat conftest.$ac_ext >&5
12496 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12498 rm -f conftest.$ac_objext conftest.$ac_ext
12499 CPPFLAGS="$cf_save"
12502 rm -f conftest.$ac_objext conftest.$ac_ext
12505 echo "$as_me:12505: result: $cf_cv_xopen_source" >&5
12506 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12508 if test "$cf_cv_xopen_source" != no ; then
12510 CFLAGS=`echo "$CFLAGS" | \
12511 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12512 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12514 CPPFLAGS=`echo "$CPPFLAGS" | \
12515 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12516 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12518 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12523 cf_new_extra_cppflags=
12525 for cf_add_cflags in $cf_temp_xopen_source
12527 case $cf_fix_cppflags in
12529 case $cf_add_cflags in
12530 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12531 case $cf_add_cflags in
12533 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12535 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12536 && test -z "${cf_tst_cflags}" \
12537 && cf_fix_cppflags=yes
12539 if test $cf_fix_cppflags = yes ; then
12541 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12542 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12545 elif test "${cf_tst_cflags}" = "\"'" ; then
12547 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12548 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12554 case "$CPPFLAGS" in
12558 case $cf_add_cflags in
12560 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12562 CPPFLAGS=`echo "$CPPFLAGS" | \
12563 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12564 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12569 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12570 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12577 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12578 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12585 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12586 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12588 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12590 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12591 && test -z "${cf_tst_cflags}" \
12592 && cf_fix_cppflags=no
12597 if test -n "$cf_new_cflags" ; then
12599 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12600 CFLAGS="${CFLAGS}$cf_new_cflags"
12604 if test -n "$cf_new_cppflags" ; then
12606 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12607 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12611 if test -n "$cf_new_extra_cppflags" ; then
12613 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12614 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12623 # Check whether --enable-largefile or --disable-largefile was given.
12624 if test "${enable_largefile+set}" = set; then
12625 enableval="$enable_largefile"
12628 if test "$enable_largefile" != no; then
12630 echo "$as_me:12630: checking for special C compiler options needed for large files" >&5
12631 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12632 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12633 echo $ECHO_N "(cached) $ECHO_C" >&6
12635 ac_cv_sys_largefile_CC=no
12636 if test "$GCC" != yes; then
12639 # IRIX 6.2 and later do not support large files by default,
12640 # so use the C compiler's -n32 option if that helps.
12641 cat >conftest.$ac_ext <<_ACEOF
12642 #line 12642 "configure"
12643 #include "confdefs.h"
12644 #include <sys/types.h>
12645 /* Check that off_t can represent 2**63 - 1 correctly.
12646 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12647 since some C++ compilers masquerading as C compilers
12648 incorrectly reject 9223372036854775807. */
12649 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12650 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12651 && LARGE_OFF_T % 2147483647 == 1)
12661 rm -f conftest.$ac_objext
12662 if { (eval echo "$as_me:12662: \"$ac_compile\"") >&5
12663 (eval $ac_compile) 2>&5
12665 echo "$as_me:12665: \$? = $ac_status" >&5
12666 (exit $ac_status); } &&
12667 { ac_try='test -s conftest.$ac_objext'
12668 { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669 (eval $ac_try) 2>&5
12671 echo "$as_me:12671: \$? = $ac_status" >&5
12672 (exit $ac_status); }; }; then
12675 echo "$as_me: failed program was:" >&5
12676 cat conftest.$ac_ext >&5
12678 rm -f conftest.$ac_objext
12680 rm -f conftest.$ac_objext
12681 if { (eval echo "$as_me:12681: \"$ac_compile\"") >&5
12682 (eval $ac_compile) 2>&5
12684 echo "$as_me:12684: \$? = $ac_status" >&5
12685 (exit $ac_status); } &&
12686 { ac_try='test -s conftest.$ac_objext'
12687 { (eval echo "$as_me:12687: \"$ac_try\"") >&5
12688 (eval $ac_try) 2>&5
12690 echo "$as_me:12690: \$? = $ac_status" >&5
12691 (exit $ac_status); }; }; then
12692 ac_cv_sys_largefile_CC=' -n32'; break
12694 echo "$as_me: failed program was:" >&5
12695 cat conftest.$ac_ext >&5
12697 rm -f conftest.$ac_objext
12701 rm -f conftest.$ac_ext
12704 echo "$as_me:12704: result: $ac_cv_sys_largefile_CC" >&5
12705 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12706 if test "$ac_cv_sys_largefile_CC" != no; then
12707 CC=$CC$ac_cv_sys_largefile_CC
12710 echo "$as_me:12710: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12711 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12712 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12713 echo $ECHO_N "(cached) $ECHO_C" >&6
12716 ac_cv_sys_file_offset_bits=no
12717 cat >conftest.$ac_ext <<_ACEOF
12718 #line 12718 "configure"
12719 #include "confdefs.h"
12720 #include <sys/types.h>
12721 /* Check that off_t can represent 2**63 - 1 correctly.
12722 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12723 since some C++ compilers masquerading as C compilers
12724 incorrectly reject 9223372036854775807. */
12725 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12726 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12727 && LARGE_OFF_T % 2147483647 == 1)
12737 rm -f conftest.$ac_objext
12738 if { (eval echo "$as_me:12738: \"$ac_compile\"") >&5
12739 (eval $ac_compile) 2>&5
12741 echo "$as_me:12741: \$? = $ac_status" >&5
12742 (exit $ac_status); } &&
12743 { ac_try='test -s conftest.$ac_objext'
12744 { (eval echo "$as_me:12744: \"$ac_try\"") >&5
12745 (eval $ac_try) 2>&5
12747 echo "$as_me:12747: \$? = $ac_status" >&5
12748 (exit $ac_status); }; }; then
12751 echo "$as_me: failed program was:" >&5
12752 cat conftest.$ac_ext >&5
12754 rm -f conftest.$ac_objext conftest.$ac_ext
12755 cat >conftest.$ac_ext <<_ACEOF
12756 #line 12756 "configure"
12757 #include "confdefs.h"
12758 #define _FILE_OFFSET_BITS 64
12759 #include <sys/types.h>
12760 /* Check that off_t can represent 2**63 - 1 correctly.
12761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12762 since some C++ compilers masquerading as C compilers
12763 incorrectly reject 9223372036854775807. */
12764 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12766 && LARGE_OFF_T % 2147483647 == 1)
12776 rm -f conftest.$ac_objext
12777 if { (eval echo "$as_me:12777: \"$ac_compile\"") >&5
12778 (eval $ac_compile) 2>&5
12780 echo "$as_me:12780: \$? = $ac_status" >&5
12781 (exit $ac_status); } &&
12782 { ac_try='test -s conftest.$ac_objext'
12783 { (eval echo "$as_me:12783: \"$ac_try\"") >&5
12784 (eval $ac_try) 2>&5
12786 echo "$as_me:12786: \$? = $ac_status" >&5
12787 (exit $ac_status); }; }; then
12788 ac_cv_sys_file_offset_bits=64; break
12790 echo "$as_me: failed program was:" >&5
12791 cat conftest.$ac_ext >&5
12793 rm -f conftest.$ac_objext conftest.$ac_ext
12797 echo "$as_me:12797: result: $ac_cv_sys_file_offset_bits" >&5
12798 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12799 if test "$ac_cv_sys_file_offset_bits" != no; then
12801 cat >>confdefs.h <<EOF
12802 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12807 echo "$as_me:12807: checking for _LARGE_FILES value needed for large files" >&5
12808 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12809 if test "${ac_cv_sys_large_files+set}" = set; then
12810 echo $ECHO_N "(cached) $ECHO_C" >&6
12813 ac_cv_sys_large_files=no
12814 cat >conftest.$ac_ext <<_ACEOF
12815 #line 12815 "configure"
12816 #include "confdefs.h"
12817 #include <sys/types.h>
12818 /* Check that off_t can represent 2**63 - 1 correctly.
12819 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12820 since some C++ compilers masquerading as C compilers
12821 incorrectly reject 9223372036854775807. */
12822 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12823 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12824 && LARGE_OFF_T % 2147483647 == 1)
12834 rm -f conftest.$ac_objext
12835 if { (eval echo "$as_me:12835: \"$ac_compile\"") >&5
12836 (eval $ac_compile) 2>&5
12838 echo "$as_me:12838: \$? = $ac_status" >&5
12839 (exit $ac_status); } &&
12840 { ac_try='test -s conftest.$ac_objext'
12841 { (eval echo "$as_me:12841: \"$ac_try\"") >&5
12842 (eval $ac_try) 2>&5
12844 echo "$as_me:12844: \$? = $ac_status" >&5
12845 (exit $ac_status); }; }; then
12848 echo "$as_me: failed program was:" >&5
12849 cat conftest.$ac_ext >&5
12851 rm -f conftest.$ac_objext conftest.$ac_ext
12852 cat >conftest.$ac_ext <<_ACEOF
12853 #line 12853 "configure"
12854 #include "confdefs.h"
12855 #define _LARGE_FILES 1
12856 #include <sys/types.h>
12857 /* Check that off_t can represent 2**63 - 1 correctly.
12858 We can't simply define LARGE_OFF_T to be 9223372036854775807,
12859 since some C++ compilers masquerading as C compilers
12860 incorrectly reject 9223372036854775807. */
12861 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12862 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12863 && LARGE_OFF_T % 2147483647 == 1)
12873 rm -f conftest.$ac_objext
12874 if { (eval echo "$as_me:12874: \"$ac_compile\"") >&5
12875 (eval $ac_compile) 2>&5
12877 echo "$as_me:12877: \$? = $ac_status" >&5
12878 (exit $ac_status); } &&
12879 { ac_try='test -s conftest.$ac_objext'
12880 { (eval echo "$as_me:12880: \"$ac_try\"") >&5
12881 (eval $ac_try) 2>&5
12883 echo "$as_me:12883: \$? = $ac_status" >&5
12884 (exit $ac_status); }; }; then
12885 ac_cv_sys_large_files=1; break
12887 echo "$as_me: failed program was:" >&5
12888 cat conftest.$ac_ext >&5
12890 rm -f conftest.$ac_objext conftest.$ac_ext
12894 echo "$as_me:12894: result: $ac_cv_sys_large_files" >&5
12895 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12896 if test "$ac_cv_sys_large_files" != no; then
12898 cat >>confdefs.h <<EOF
12899 #define _LARGE_FILES $ac_cv_sys_large_files
12906 if test "$enable_largefile" != no ; then
12907 echo "$as_me:12907: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12908 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12909 if test "${ac_cv_sys_largefile_source+set}" = set; then
12910 echo $ECHO_N "(cached) $ECHO_C" >&6
12913 ac_cv_sys_largefile_source=no
12914 cat >conftest.$ac_ext <<_ACEOF
12915 #line 12915 "configure"
12916 #include "confdefs.h"
12926 rm -f conftest.$ac_objext
12927 if { (eval echo "$as_me:12927: \"$ac_compile\"") >&5
12928 (eval $ac_compile) 2>&5
12930 echo "$as_me:12930: \$? = $ac_status" >&5
12931 (exit $ac_status); } &&
12932 { ac_try='test -s conftest.$ac_objext'
12933 { (eval echo "$as_me:12933: \"$ac_try\"") >&5
12934 (eval $ac_try) 2>&5
12936 echo "$as_me:12936: \$? = $ac_status" >&5
12937 (exit $ac_status); }; }; then
12940 echo "$as_me: failed program was:" >&5
12941 cat conftest.$ac_ext >&5
12943 rm -f conftest.$ac_objext conftest.$ac_ext
12944 cat >conftest.$ac_ext <<_ACEOF
12945 #line 12945 "configure"
12946 #include "confdefs.h"
12947 #define _LARGEFILE_SOURCE 1
12957 rm -f conftest.$ac_objext
12958 if { (eval echo "$as_me:12958: \"$ac_compile\"") >&5
12959 (eval $ac_compile) 2>&5
12961 echo "$as_me:12961: \$? = $ac_status" >&5
12962 (exit $ac_status); } &&
12963 { ac_try='test -s conftest.$ac_objext'
12964 { (eval echo "$as_me:12964: \"$ac_try\"") >&5
12965 (eval $ac_try) 2>&5
12967 echo "$as_me:12967: \$? = $ac_status" >&5
12968 (exit $ac_status); }; }; then
12969 ac_cv_sys_largefile_source=1; break
12971 echo "$as_me: failed program was:" >&5
12972 cat conftest.$ac_ext >&5
12974 rm -f conftest.$ac_objext conftest.$ac_ext
12978 echo "$as_me:12978: result: $ac_cv_sys_largefile_source" >&5
12979 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12980 if test "$ac_cv_sys_largefile_source" != no; then
12982 cat >>confdefs.h <<EOF
12983 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12989 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12990 # in glibc 2.1.3, but that breaks too many other things.
12991 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12992 echo "$as_me:12992: checking for fseeko" >&5
12993 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12994 if test "${ac_cv_func_fseeko+set}" = set; then
12995 echo $ECHO_N "(cached) $ECHO_C" >&6
12997 cat >conftest.$ac_ext <<_ACEOF
12998 #line 12998 "configure"
12999 #include "confdefs.h"
13004 return fseeko && fseeko (stdin, 0, 0);
13009 rm -f conftest.$ac_objext conftest$ac_exeext
13010 if { (eval echo "$as_me:13010: \"$ac_link\"") >&5
13011 (eval $ac_link) 2>&5
13013 echo "$as_me:13013: \$? = $ac_status" >&5
13014 (exit $ac_status); } &&
13015 { ac_try='test -s conftest$ac_exeext'
13016 { (eval echo "$as_me:13016: \"$ac_try\"") >&5
13017 (eval $ac_try) 2>&5
13019 echo "$as_me:13019: \$? = $ac_status" >&5
13020 (exit $ac_status); }; }; then
13021 ac_cv_func_fseeko=yes
13023 echo "$as_me: failed program was:" >&5
13024 cat conftest.$ac_ext >&5
13025 ac_cv_func_fseeko=no
13027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13029 echo "$as_me:13029: result: $ac_cv_func_fseeko" >&5
13030 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13031 if test $ac_cv_func_fseeko = yes; then
13033 cat >>confdefs.h <<\EOF
13034 #define HAVE_FSEEKO 1
13039 # Normally we would collect these definitions in the config.h,
13040 # but (like _XOPEN_SOURCE), some environments rely on having these
13041 # defined before any of the system headers are included. Another
13042 # case comes up with C++, e.g., on AIX the compiler compiles the
13043 # header files by themselves before looking at the body files it is
13044 # told to compile. For ncurses, those header files do not include
13046 if test "$ac_cv_sys_large_files" != no
13049 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13050 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13053 if test "$ac_cv_sys_largefile_source" != no
13056 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13057 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13060 if test "$ac_cv_sys_file_offset_bits" != no
13063 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13064 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13068 echo "$as_me:13068: checking whether to use struct dirent64" >&5
13069 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13070 if test "${cf_cv_struct_dirent64+set}" = set; then
13071 echo $ECHO_N "(cached) $ECHO_C" >&6
13074 cat >conftest.$ac_ext <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13078 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13079 #include <sys/types.h>
13080 #include <dirent.h>
13086 /* if transitional largefile support is setup, this is true */
13087 extern struct dirent64 * readdir(DIR *);
13088 struct dirent64 *x = readdir((DIR *)0);
13089 struct dirent *y = readdir((DIR *)0);
13096 rm -f conftest.$ac_objext
13097 if { (eval echo "$as_me:13097: \"$ac_compile\"") >&5
13098 (eval $ac_compile) 2>&5
13100 echo "$as_me:13100: \$? = $ac_status" >&5
13101 (exit $ac_status); } &&
13102 { ac_try='test -s conftest.$ac_objext'
13103 { (eval echo "$as_me:13103: \"$ac_try\"") >&5
13104 (eval $ac_try) 2>&5
13106 echo "$as_me:13106: \$? = $ac_status" >&5
13107 (exit $ac_status); }; }; then
13108 cf_cv_struct_dirent64=yes
13110 echo "$as_me: failed program was:" >&5
13111 cat conftest.$ac_ext >&5
13112 cf_cv_struct_dirent64=no
13114 rm -f conftest.$ac_objext conftest.$ac_ext
13117 echo "$as_me:13117: result: $cf_cv_struct_dirent64" >&5
13118 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13119 test "$cf_cv_struct_dirent64" = yes &&
13120 cat >>confdefs.h <<\EOF
13121 #define HAVE_STRUCT_DIRENT64 1
13126 ### Enable compiling-in rcs id's
13127 echo "$as_me:13127: checking if RCS identifiers should be compiled-in" >&5
13128 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13130 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13131 if test "${with_rcs_ids+set}" = set; then
13132 withval="$with_rcs_ids"
13133 with_rcs_ids=$withval
13137 echo "$as_me:13137: result: $with_rcs_ids" >&5
13138 echo "${ECHO_T}$with_rcs_ids" >&6
13139 test "$with_rcs_ids" = yes &&
13140 cat >>confdefs.h <<\EOF
13141 #define USE_RCS_IDS 1
13144 ###############################################################################
13146 ### Note that some functions (such as const) are normally disabled anyway.
13147 echo "$as_me:13147: checking if you want to build with function extensions" >&5
13148 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13150 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13151 if test "${enable_ext_funcs+set}" = set; then
13152 enableval="$enable_ext_funcs"
13153 with_ext_funcs=$enableval
13157 echo "$as_me:13157: result: $with_ext_funcs" >&5
13158 echo "${ECHO_T}$with_ext_funcs" >&6
13159 if test "$with_ext_funcs" = yes ; then
13160 NCURSES_EXT_FUNCS=1
13162 cat >>confdefs.h <<\EOF
13163 #define HAVE_USE_DEFAULT_COLORS 1
13166 cat >>confdefs.h <<\EOF
13167 #define NCURSES_EXT_FUNCS 1
13171 NCURSES_EXT_FUNCS=0
13174 ### use option --enable-const to turn on use of const beyond that in XSI.
13175 echo "$as_me:13175: checking for extended use of const keyword" >&5
13176 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13178 # Check whether --enable-const or --disable-const was given.
13179 if test "${enable_const+set}" = set; then
13180 enableval="$enable_const"
13181 with_ext_const=$enableval
13185 echo "$as_me:13185: result: $with_ext_const" >&5
13186 echo "${ECHO_T}$with_ext_const" >&6
13187 NCURSES_CONST='/*nothing*/'
13188 if test "$with_ext_const" = yes ; then
13189 NCURSES_CONST=const
13192 ###############################################################################
13193 # These options are relatively safe to experiment with.
13195 echo "$as_me:13195: checking if you want all development code" >&5
13196 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13198 # Check whether --with-develop or --without-develop was given.
13199 if test "${with_develop+set}" = set; then
13200 withval="$with_develop"
13201 with_develop=$withval
13205 echo "$as_me:13205: result: $with_develop" >&5
13206 echo "${ECHO_T}$with_develop" >&6
13208 ###############################################################################
13209 # These are just experimental, probably should not be in a package:
13211 # This is still experimental (20080329), but should ultimately be moved to
13212 # the script-block --with-normal, etc.
13214 echo "$as_me:13214: checking if you want to link with the pthread library" >&5
13215 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13217 # Check whether --with-pthread or --without-pthread was given.
13218 if test "${with_pthread+set}" = set; then
13219 withval="$with_pthread"
13220 with_pthread=$withval
13224 echo "$as_me:13224: result: $with_pthread" >&5
13225 echo "${ECHO_T}$with_pthread" >&6
13227 if test "$with_pthread" != no ; then
13228 echo "$as_me:13228: checking for pthread.h" >&5
13229 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13230 if test "${ac_cv_header_pthread_h+set}" = set; then
13231 echo $ECHO_N "(cached) $ECHO_C" >&6
13233 cat >conftest.$ac_ext <<_ACEOF
13234 #line 13234 "configure"
13235 #include "confdefs.h"
13236 #include <pthread.h>
13238 if { (eval echo "$as_me:13238: \"$ac_cpp conftest.$ac_ext\"") >&5
13239 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13241 egrep -v '^ *\+' conftest.er1 >conftest.err
13243 cat conftest.err >&5
13244 echo "$as_me:13244: \$? = $ac_status" >&5
13245 (exit $ac_status); } >/dev/null; then
13246 if test -s conftest.err; then
13247 ac_cpp_err=$ac_c_preproc_warn_flag
13254 if test -z "$ac_cpp_err"; then
13255 ac_cv_header_pthread_h=yes
13257 echo "$as_me: failed program was:" >&5
13258 cat conftest.$ac_ext >&5
13259 ac_cv_header_pthread_h=no
13261 rm -f conftest.err conftest.$ac_ext
13263 echo "$as_me:13263: result: $ac_cv_header_pthread_h" >&5
13264 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13265 if test $ac_cv_header_pthread_h = yes; then
13267 cat >>confdefs.h <<\EOF
13268 #define HAVE_PTHREADS_H 1
13271 for cf_lib_pthread in pthread c_r
13273 echo "$as_me:13273: checking if we can link with the $cf_lib_pthread library" >&5
13274 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13275 cf_save_LIBS="$LIBS"
13277 cf_add_libs="-l$cf_lib_pthread"
13278 # Filter out duplicates - this happens with badly-designed ".pc" files...
13279 for cf_add_1lib in $LIBS
13281 for cf_add_2lib in $cf_add_libs
13283 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13289 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13291 LIBS="$cf_add_libs"
13293 cat >conftest.$ac_ext <<_ACEOF
13294 #line 13294 "configure"
13295 #include "confdefs.h"
13297 #include <pthread.h>
13303 int rc = pthread_create(0,0,0,0);
13304 int r2 = pthread_mutexattr_settype(0, 0);
13310 rm -f conftest.$ac_objext conftest$ac_exeext
13311 if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
13312 (eval $ac_link) 2>&5
13314 echo "$as_me:13314: \$? = $ac_status" >&5
13315 (exit $ac_status); } &&
13316 { ac_try='test -s conftest$ac_exeext'
13317 { (eval echo "$as_me:13317: \"$ac_try\"") >&5
13318 (eval $ac_try) 2>&5
13320 echo "$as_me:13320: \$? = $ac_status" >&5
13321 (exit $ac_status); }; }; then
13324 echo "$as_me: failed program was:" >&5
13325 cat conftest.$ac_ext >&5
13328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13329 LIBS="$cf_save_LIBS"
13330 echo "$as_me:13330: result: $with_pthread" >&5
13331 echo "${ECHO_T}$with_pthread" >&6
13332 test "$with_pthread" = yes && break
13335 if test "$with_pthread" = yes ; then
13337 cf_add_libs="-l$cf_lib_pthread"
13338 # Filter out duplicates - this happens with badly-designed ".pc" files...
13339 for cf_add_1lib in $LIBS
13341 for cf_add_2lib in $cf_add_libs
13343 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13349 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13351 LIBS="$cf_add_libs"
13353 cat >>confdefs.h <<\EOF
13354 #define HAVE_LIBPTHREADS 1
13358 { { echo "$as_me:13358: error: Cannot link with pthread library" >&5
13359 echo "$as_me: error: Cannot link with pthread library" >&2;}
13360 { (exit 1); exit 1; }; }
13367 echo "$as_me:13367: checking if you want to use weak-symbols for pthreads" >&5
13368 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13370 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13371 if test "${enable_weak_symbols+set}" = set; then
13372 enableval="$enable_weak_symbols"
13373 use_weak_symbols=$withval
13375 use_weak_symbols=no
13377 echo "$as_me:13377: result: $use_weak_symbols" >&5
13378 echo "${ECHO_T}$use_weak_symbols" >&6
13379 if test "$use_weak_symbols" = yes ; then
13381 echo "$as_me:13381: checking if $CC supports weak symbols" >&5
13382 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13383 if test "${cf_cv_weak_symbols+set}" = set; then
13384 echo $ECHO_N "(cached) $ECHO_C" >&6
13387 cat >conftest.$ac_ext <<_ACEOF
13388 #line 13388 "configure"
13389 #include "confdefs.h"
13396 #if defined(__GNUC__)
13397 # if defined __USE_ISOC99
13398 # define _cat_pragma(exp) _Pragma(#exp)
13399 # define _weak_pragma(exp) _cat_pragma(weak name)
13401 # define _weak_pragma(exp)
13403 # define _declare(name) __extension__ extern __typeof__(name) name
13404 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
13407 weak_symbol(fopen);
13413 rm -f conftest.$ac_objext
13414 if { (eval echo "$as_me:13414: \"$ac_compile\"") >&5
13415 (eval $ac_compile) 2>&5
13417 echo "$as_me:13417: \$? = $ac_status" >&5
13418 (exit $ac_status); } &&
13419 { ac_try='test -s conftest.$ac_objext'
13420 { (eval echo "$as_me:13420: \"$ac_try\"") >&5
13421 (eval $ac_try) 2>&5
13423 echo "$as_me:13423: \$? = $ac_status" >&5
13424 (exit $ac_status); }; }; then
13425 cf_cv_weak_symbols=yes
13427 echo "$as_me: failed program was:" >&5
13428 cat conftest.$ac_ext >&5
13429 cf_cv_weak_symbols=no
13431 rm -f conftest.$ac_objext conftest.$ac_ext
13434 echo "$as_me:13434: result: $cf_cv_weak_symbols" >&5
13435 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13438 cf_cv_weak_symbols=no
13441 if test $cf_cv_weak_symbols = yes ; then
13443 cat >>confdefs.h <<\EOF
13444 #define USE_WEAK_SYMBOLS 1
13450 if test "$with_pthread" = "yes" ; then
13452 cat >>confdefs.h <<\EOF
13453 #define USE_PTHREADS 1
13456 enable_reentrant=yes
13457 if test $cf_cv_weak_symbols = yes ; then
13462 # OpenSUSE is installing ncurses6, using reentrant option.
13463 echo "$as_me:13463: checking for _nc_TABSIZE" >&5
13464 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
13465 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
13466 echo $ECHO_N "(cached) $ECHO_C" >&6
13468 cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471 /* System header to define __stub macros and hopefully few prototypes,
13472 which can conflict with char _nc_TABSIZE (); below. */
13473 #include <assert.h>
13474 /* Override any gcc2 internal prototype to avoid an error. */
13478 /* We use char because int might match the return type of a gcc2
13479 builtin and then its argument prototype would still apply. */
13480 char _nc_TABSIZE ();
13486 /* The GNU C library defines this for functions which it implements
13487 to always fail with ENOSYS. Some functions are actually named
13488 something starting with __ and the normal name is an alias. */
13489 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
13492 f = _nc_TABSIZE; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13499 rm -f conftest.$ac_objext conftest$ac_exeext
13500 if { (eval echo "$as_me:13500: \"$ac_link\"") >&5
13501 (eval $ac_link) 2>&5
13503 echo "$as_me:13503: \$? = $ac_status" >&5
13504 (exit $ac_status); } &&
13505 { ac_try='test -s conftest$ac_exeext'
13506 { (eval echo "$as_me:13506: \"$ac_try\"") >&5
13507 (eval $ac_try) 2>&5
13509 echo "$as_me:13509: \$? = $ac_status" >&5
13510 (exit $ac_status); }; }; then
13511 ac_cv_func__nc_TABSIZE=yes
13513 echo "$as_me: failed program was:" >&5
13514 cat conftest.$ac_ext >&5
13515 ac_cv_func__nc_TABSIZE=no
13517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13519 echo "$as_me:13519: result: $ac_cv_func__nc_TABSIZE" >&5
13520 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
13521 if test $ac_cv_func__nc_TABSIZE = yes; then
13522 assume_reentrant=yes
13524 assume_reentrant=no
13527 # Reentrant code has to be opaque; there's little advantage to making ncurses
13528 # opaque outside of that, so there is no --enable-opaque option. We can use
13529 # this option without --with-pthreads, but this will be always set for
13531 echo "$as_me:13531: checking if you want experimental reentrant code" >&5
13532 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
13534 # Check whether --enable-reentrant or --disable-reentrant was given.
13535 if test "${enable_reentrant+set}" = set; then
13536 enableval="$enable_reentrant"
13537 with_reentrant=$enableval
13539 with_reentrant=$assume_reentrant
13541 echo "$as_me:13541: result: $with_reentrant" >&5
13542 echo "${ECHO_T}$with_reentrant" >&6
13543 if test "$with_reentrant" = yes ; then
13544 cf_cv_enable_reentrant=1
13545 if test $cf_cv_weak_symbols = yes ; then
13547 # remove pthread library from $LIBS
13548 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
13550 elif test "$assume_reentrant" = no ; then
13551 LIB_SUFFIX="t${LIB_SUFFIX}"
13554 cat >>confdefs.h <<\EOF
13555 #define USE_REENTRANT 1
13559 cf_cv_enable_reentrant=0
13562 ### Allow using a different wrap-prefix
13563 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13564 echo "$as_me:13564: checking for prefix used to wrap public variables" >&5
13565 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13567 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13568 if test "${with_wrap_prefix+set}" = set; then
13569 withval="$with_wrap_prefix"
13570 NCURSES_WRAP_PREFIX=$withval
13572 NCURSES_WRAP_PREFIX=_nc_
13574 echo "$as_me:13574: result: $NCURSES_WRAP_PREFIX" >&5
13575 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13577 NCURSES_WRAP_PREFIX=_nc_
13580 cat >>confdefs.h <<EOF
13581 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13584 ###############################################################################
13586 ### use option --disable-echo to suppress full display compiling commands
13588 echo "$as_me:13588: checking if you want to see long compiling messages" >&5
13589 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13591 # Check whether --enable-echo or --disable-echo was given.
13592 if test "${enable_echo+set}" = set; then
13593 enableval="$enable_echo"
13594 test "$enableval" != no && enableval=yes
13595 if test "$enableval" != "yes" ; then
13598 ECHO_LD='@echo linking $@;'
13599 RULE_CC='@echo compiling $<'
13600 SHOW_CC='@echo compiling $@'
13622 echo "$as_me:13622: result: $enableval" >&5
13623 echo "${ECHO_T}$enableval" >&6
13625 ### use option --enable-warnings to turn on all gcc warnings
13626 echo "$as_me:13626: checking if you want to see compiler warnings" >&5
13627 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13629 # Check whether --enable-warnings or --disable-warnings was given.
13630 if test "${enable_warnings+set}" = set; then
13631 enableval="$enable_warnings"
13632 with_warnings=$enableval
13634 echo "$as_me:13634: result: $with_warnings" >&5
13635 echo "${ECHO_T}$with_warnings" >&6
13637 if test "x$with_warnings" = "xyes"; then
13639 ADAFLAGS="$ADAFLAGS -gnatg"
13643 if test "$GCC" = yes ; then
13646 echo "$as_me:13646: checking if this is really Intel C compiler" >&5
13647 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13648 cf_save_CFLAGS="$CFLAGS"
13649 CFLAGS="$CFLAGS -no-gcc"
13650 cat >conftest.$ac_ext <<_ACEOF
13651 #line 13651 "configure"
13652 #include "confdefs.h"
13658 #ifdef __INTEL_COMPILER
13667 rm -f conftest.$ac_objext
13668 if { (eval echo "$as_me:13668: \"$ac_compile\"") >&5
13669 (eval $ac_compile) 2>&5
13671 echo "$as_me:13671: \$? = $ac_status" >&5
13672 (exit $ac_status); } &&
13673 { ac_try='test -s conftest.$ac_objext'
13674 { (eval echo "$as_me:13674: \"$ac_try\"") >&5
13675 (eval $ac_try) 2>&5
13677 echo "$as_me:13677: \$? = $ac_status" >&5
13678 (exit $ac_status); }; }; then
13680 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13683 echo "$as_me: failed program was:" >&5
13684 cat conftest.$ac_ext >&5
13686 rm -f conftest.$ac_objext conftest.$ac_ext
13687 CFLAGS="$cf_save_CFLAGS"
13688 echo "$as_me:13688: result: $INTEL_COMPILER" >&5
13689 echo "${ECHO_T}$INTEL_COMPILER" >&6
13696 if test "$GCC" = yes ; then
13697 echo "$as_me:13697: checking if this is really Clang C compiler" >&5
13698 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13699 cf_save_CFLAGS="$CFLAGS"
13700 CFLAGS="$CFLAGS -Qunused-arguments"
13701 cat >conftest.$ac_ext <<_ACEOF
13702 #line 13702 "configure"
13703 #include "confdefs.h"
13718 rm -f conftest.$ac_objext
13719 if { (eval echo "$as_me:13719: \"$ac_compile\"") >&5
13720 (eval $ac_compile) 2>&5
13722 echo "$as_me:13722: \$? = $ac_status" >&5
13723 (exit $ac_status); } &&
13724 { ac_try='test -s conftest.$ac_objext'
13725 { (eval echo "$as_me:13725: \"$ac_try\"") >&5
13726 (eval $ac_try) 2>&5
13728 echo "$as_me:13728: \$? = $ac_status" >&5
13729 (exit $ac_status); }; }; then
13731 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13734 echo "$as_me: failed program was:" >&5
13735 cat conftest.$ac_ext >&5
13737 rm -f conftest.$ac_objext conftest.$ac_ext
13738 CFLAGS="$cf_save_CFLAGS"
13739 echo "$as_me:13739: result: $CLANG_COMPILER" >&5
13740 echo "${ECHO_T}$CLANG_COMPILER" >&6
13743 cat > conftest.$ac_ext <<EOF
13744 #line 13744 "${as_me:-configure}"
13745 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13748 if test "$INTEL_COMPILER" = yes
13750 # The "-wdXXX" options suppress warnings:
13751 # remark #1419: external declaration in primary source file
13752 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13753 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13754 # remark #193: zero used for undefined preprocessing identifier
13755 # remark #593: variable "curs_sb_left_arrow" was set but never used
13756 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13757 # remark #869: parameter "tw" was never referenced
13758 # remark #981: operands are evaluated in unspecified order
13759 # warning #279: controlling expression is constant
13761 { echo "$as_me:13761: checking for $CC warning options..." >&5
13762 echo "$as_me: checking for $CC warning options..." >&6;}
13763 cf_save_CFLAGS="$CFLAGS"
13764 EXTRA_CFLAGS="-Wall"
13776 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13777 if { (eval echo "$as_me:13777: \"$ac_compile\"") >&5
13778 (eval $ac_compile) 2>&5
13780 echo "$as_me:13780: \$? = $ac_status" >&5
13781 (exit $ac_status); }; then
13782 test -n "$verbose" && echo "$as_me:13782: result: ... -$cf_opt" >&5
13783 echo "${ECHO_T}... -$cf_opt" >&6
13784 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13787 CFLAGS="$cf_save_CFLAGS"
13789 elif test "$GCC" = yes
13791 { echo "$as_me:13791: checking for $CC warning options..." >&5
13792 echo "$as_me: checking for $CC warning options..." >&6;}
13793 cf_save_CFLAGS="$CFLAGS"
13796 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13797 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13798 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13799 for cf_opt in W Wall \
13800 Wbad-function-cast \
13803 Wdeclaration-after-statement \
13806 Wmissing-declarations \
13807 Wmissing-prototypes \
13811 Wstrict-prototypes \
13812 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13814 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13815 if { (eval echo "$as_me:13815: \"$ac_compile\"") >&5
13816 (eval $ac_compile) 2>&5
13818 echo "$as_me:13818: \$? = $ac_status" >&5
13819 (exit $ac_status); }; then
13820 test -n "$verbose" && echo "$as_me:13820: result: ... -$cf_opt" >&5
13821 echo "${ECHO_T}... -$cf_opt" >&6
13825 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13826 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
13830 case $GCC_VERSION in
13832 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13834 echo "${as_me:-configure}:13834: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13840 case $GCC_VERSION in
13842 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
13844 echo "${as_me:-configure}:13844: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13850 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13853 CFLAGS="$cf_save_CFLAGS"
13859 if test "$GCC" = yes
13861 cat > conftest.i <<EOF
13863 #define GCC_PRINTF 0
13866 #define GCC_SCANF 0
13868 #ifndef GCC_NORETURN
13869 #define GCC_NORETURN /* nothing */
13872 #define GCC_UNUSED /* nothing */
13875 if test "$GCC" = yes
13877 { echo "$as_me:13877: checking for $CC __attribute__ directives..." >&5
13878 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13879 cat > conftest.$ac_ext <<EOF
13880 #line 13880 "${as_me:-configure}"
13881 #include "confdefs.h"
13882 #include "conftest.h"
13883 #include "conftest.i"
13885 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13887 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13890 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
13892 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
13894 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13895 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13896 extern void foo(void) GCC_NORETURN;
13897 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13899 cf_printf_attribute=no
13900 cf_scanf_attribute=no
13901 for cf_attribute in scanf printf unused noreturn
13904 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13906 cf_directive="__attribute__(($cf_attribute))"
13907 echo "checking for $CC $cf_directive" 1>&5
13909 case $cf_attribute in
13911 cf_printf_attribute=yes
13912 cat >conftest.h <<EOF
13913 #define GCC_$cf_ATTRIBUTE 1
13917 cf_scanf_attribute=yes
13918 cat >conftest.h <<EOF
13919 #define GCC_$cf_ATTRIBUTE 1
13923 cat >conftest.h <<EOF
13924 #define GCC_$cf_ATTRIBUTE $cf_directive
13929 if { (eval echo "$as_me:13929: \"$ac_compile\"") >&5
13930 (eval $ac_compile) 2>&5
13932 echo "$as_me:13932: \$? = $ac_status" >&5
13933 (exit $ac_status); }; then
13934 test -n "$verbose" && echo "$as_me:13934: result: ... $cf_attribute" >&5
13935 echo "${ECHO_T}... $cf_attribute" >&6
13936 cat conftest.h >>confdefs.h
13937 case $cf_attribute in
13940 cat >>confdefs.h <<EOF
13941 #define GCC_NORETURN $cf_directive
13946 cf_value='/* nothing */'
13947 if test "$cf_printf_attribute" != no ; then
13948 cf_value='__attribute__((format(printf,fmt,var)))'
13950 cat >>confdefs.h <<\EOF
13951 #define GCC_PRINTF 1
13956 cat >>confdefs.h <<EOF
13957 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13962 cf_value='/* nothing */'
13963 if test "$cf_scanf_attribute" != no ; then
13964 cf_value='__attribute__((format(scanf,fmt,var)))'
13966 cat >>confdefs.h <<\EOF
13967 #define GCC_SCANF 1
13972 cat >>confdefs.h <<EOF
13973 #define GCC_SCANFLIKE(fmt,var) $cf_value
13979 cat >>confdefs.h <<EOF
13980 #define GCC_UNUSED $cf_directive
13988 fgrep define conftest.i >>confdefs.h
13993 ### use option --enable-assertions to turn on generation of assertion code
13994 echo "$as_me:13994: checking if you want to enable runtime assertions" >&5
13995 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13997 # Check whether --enable-assertions or --disable-assertions was given.
13998 if test "${enable_assertions+set}" = set; then
13999 enableval="$enable_assertions"
14000 with_assertions=$enableval
14004 echo "$as_me:14004: result: $with_assertions" >&5
14005 echo "${ECHO_T}$with_assertions" >&6
14008 if test "$with_assertions" = no
14010 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14013 ADAFLAGS="$ADAFLAGS -gnata"
14018 ### use option --disable-leaks to suppress "permanent" leaks, for testing
14020 cat >>confdefs.h <<\EOF
14021 #define HAVE_NC_ALLOC_H 1
14024 ### use option --enable-expanded to generate certain macros as functions
14026 # Check whether --enable-expanded or --disable-expanded was given.
14027 if test "${enable_expanded+set}" = set; then
14028 enableval="$enable_expanded"
14029 test "$enableval" = yes &&
14030 cat >>confdefs.h <<\EOF
14031 #define NCURSES_EXPANDED 1
14036 ### use option --disable-macros to suppress macros in favor of functions
14038 # Check whether --enable-macros or --disable-macros was given.
14039 if test "${enable_macros+set}" = set; then
14040 enableval="$enable_macros"
14041 test "$enableval" = no &&
14042 cat >>confdefs.h <<\EOF
14043 #define NCURSES_NOMACROS 1
14048 # Normally we only add trace() to the debug-library. Allow this to be
14049 # extended to all models of the ncurses library:
14051 case "$CFLAGS $CPPFLAGS" in
14057 echo "$as_me:14057: checking whether to add trace feature to all models" >&5
14058 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14060 # Check whether --with-trace or --without-trace was given.
14061 if test "${with_trace+set}" = set; then
14062 withval="$with_trace"
14063 cf_with_trace=$withval
14065 cf_with_trace=$cf_all_traces
14067 echo "$as_me:14067: result: $cf_with_trace" >&5
14068 echo "${ECHO_T}$cf_with_trace" >&6
14070 if test "$cf_with_trace" = yes ; then
14076 cf_new_extra_cppflags=
14078 for cf_add_cflags in -DTRACE
14080 case $cf_fix_cppflags in
14082 case $cf_add_cflags in
14083 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14084 case $cf_add_cflags in
14086 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14088 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14089 && test -z "${cf_tst_cflags}" \
14090 && cf_fix_cppflags=yes
14092 if test $cf_fix_cppflags = yes ; then
14094 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14095 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14098 elif test "${cf_tst_cflags}" = "\"'" ; then
14100 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14101 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14107 case "$CPPFLAGS" in
14111 case $cf_add_cflags in
14113 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14115 CPPFLAGS=`echo "$CPPFLAGS" | \
14116 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14117 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14122 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14123 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14130 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14131 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14138 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14139 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14141 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14143 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14144 && test -z "${cf_tst_cflags}" \
14145 && cf_fix_cppflags=no
14150 if test -n "$cf_new_cflags" ; then
14152 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14153 CFLAGS="${CFLAGS}$cf_new_cflags"
14157 if test -n "$cf_new_cppflags" ; then
14159 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14160 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14164 if test -n "$cf_new_extra_cppflags" ; then
14166 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14167 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14175 echo "$as_me:14175: checking if we want to use GNAT projects" >&5
14176 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14178 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14179 if test "${enable_gnat_projects+set}" = set; then
14180 enableval="$enable_gnat_projects"
14181 test "$enableval" != no && enableval=yes
14182 if test "$enableval" != "yes" ; then
14183 enable_gnat_projects=no
14185 enable_gnat_projects=yes
14189 enable_gnat_projects=yes
14192 echo "$as_me:14192: result: $enable_gnat_projects" >&5
14193 echo "${ECHO_T}$enable_gnat_projects" >&6
14195 ### Checks for libraries.
14196 case $cf_cv_system_name in
14200 echo "$as_me:14200: checking for gettimeofday" >&5
14201 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14202 if test "${ac_cv_func_gettimeofday+set}" = set; then
14203 echo $ECHO_N "(cached) $ECHO_C" >&6
14205 cat >conftest.$ac_ext <<_ACEOF
14206 #line 14206 "configure"
14207 #include "confdefs.h"
14208 /* System header to define __stub macros and hopefully few prototypes,
14209 which can conflict with char gettimeofday (); below. */
14210 #include <assert.h>
14211 /* Override any gcc2 internal prototype to avoid an error. */
14215 /* We use char because int might match the return type of a gcc2
14216 builtin and then its argument prototype would still apply. */
14217 char gettimeofday ();
14223 /* The GNU C library defines this for functions which it implements
14224 to always fail with ENOSYS. Some functions are actually named
14225 something starting with __ and the normal name is an alias. */
14226 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14229 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14236 rm -f conftest.$ac_objext conftest$ac_exeext
14237 if { (eval echo "$as_me:14237: \"$ac_link\"") >&5
14238 (eval $ac_link) 2>&5
14240 echo "$as_me:14240: \$? = $ac_status" >&5
14241 (exit $ac_status); } &&
14242 { ac_try='test -s conftest$ac_exeext'
14243 { (eval echo "$as_me:14243: \"$ac_try\"") >&5
14244 (eval $ac_try) 2>&5
14246 echo "$as_me:14246: \$? = $ac_status" >&5
14247 (exit $ac_status); }; }; then
14248 ac_cv_func_gettimeofday=yes
14250 echo "$as_me: failed program was:" >&5
14251 cat conftest.$ac_ext >&5
14252 ac_cv_func_gettimeofday=no
14254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14256 echo "$as_me:14256: result: $ac_cv_func_gettimeofday" >&5
14257 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14258 if test $ac_cv_func_gettimeofday = yes; then
14259 cat >>confdefs.h <<\EOF
14260 #define HAVE_GETTIMEOFDAY 1
14265 echo "$as_me:14265: checking for gettimeofday in -lbsd" >&5
14266 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14267 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14268 echo $ECHO_N "(cached) $ECHO_C" >&6
14270 ac_check_lib_save_LIBS=$LIBS
14272 cat >conftest.$ac_ext <<_ACEOF
14273 #line 14273 "configure"
14274 #include "confdefs.h"
14276 /* Override any gcc2 internal prototype to avoid an error. */
14280 /* We use char because int might match the return type of a gcc2
14281 builtin and then its argument prototype would still apply. */
14282 char gettimeofday ();
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_lib_bsd_gettimeofday=yes
14305 echo "$as_me: failed program was:" >&5
14306 cat conftest.$ac_ext >&5
14307 ac_cv_lib_bsd_gettimeofday=no
14309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14310 LIBS=$ac_check_lib_save_LIBS
14312 echo "$as_me:14312: result: $ac_cv_lib_bsd_gettimeofday" >&5
14313 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14314 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14316 cat >>confdefs.h <<\EOF
14317 #define HAVE_GETTIMEOFDAY 1
14327 ### Checks for header files.
14328 echo "$as_me:14328: checking for ANSI C header files" >&5
14329 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14330 if test "${ac_cv_header_stdc+set}" = set; then
14331 echo $ECHO_N "(cached) $ECHO_C" >&6
14333 cat >conftest.$ac_ext <<_ACEOF
14334 #line 14334 "configure"
14335 #include "confdefs.h"
14336 #include <stdlib.h>
14337 #include <stdarg.h>
14338 #include <string.h>
14342 if { (eval echo "$as_me:14342: \"$ac_cpp conftest.$ac_ext\"") >&5
14343 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14345 egrep -v '^ *\+' conftest.er1 >conftest.err
14347 cat conftest.err >&5
14348 echo "$as_me:14348: \$? = $ac_status" >&5
14349 (exit $ac_status); } >/dev/null; then
14350 if test -s conftest.err; then
14351 ac_cpp_err=$ac_c_preproc_warn_flag
14358 if test -z "$ac_cpp_err"; then
14359 ac_cv_header_stdc=yes
14361 echo "$as_me: failed program was:" >&5
14362 cat conftest.$ac_ext >&5
14363 ac_cv_header_stdc=no
14365 rm -f conftest.err conftest.$ac_ext
14367 if test $ac_cv_header_stdc = yes; then
14368 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14369 cat >conftest.$ac_ext <<_ACEOF
14370 #line 14370 "configure"
14371 #include "confdefs.h"
14372 #include <string.h>
14375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14376 egrep "memchr" >/dev/null 2>&1; then
14379 ac_cv_header_stdc=no
14385 if test $ac_cv_header_stdc = yes; then
14386 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14387 cat >conftest.$ac_ext <<_ACEOF
14388 #line 14388 "configure"
14389 #include "confdefs.h"
14390 #include <stdlib.h>
14393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14394 egrep "free" >/dev/null 2>&1; then
14397 ac_cv_header_stdc=no
14403 if test $ac_cv_header_stdc = yes; then
14404 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14405 if test "$cross_compiling" = yes; then
14408 cat >conftest.$ac_ext <<_ACEOF
14409 #line 14409 "configure"
14410 #include "confdefs.h"
14412 #if ((' ' & 0x0FF) == 0x020)
14413 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14414 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14416 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14417 || ('j' <= (c) && (c) <= 'r') \
14418 || ('s' <= (c) && (c) <= 'z'))
14419 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14422 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14427 for (i = 0; i < 256; i++)
14428 if (XOR (islower (i), ISLOWER (i))
14429 || toupper (i) != TOUPPER (i))
14430 $ac_main_return(2);
14431 $ac_main_return (0);
14434 rm -f conftest$ac_exeext
14435 if { (eval echo "$as_me:14435: \"$ac_link\"") >&5
14436 (eval $ac_link) 2>&5
14438 echo "$as_me:14438: \$? = $ac_status" >&5
14439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14440 { (eval echo "$as_me:14440: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14443 echo "$as_me:14443: \$? = $ac_status" >&5
14444 (exit $ac_status); }; }; then
14447 echo "$as_me: program exited with status $ac_status" >&5
14448 echo "$as_me: failed program was:" >&5
14449 cat conftest.$ac_ext >&5
14450 ac_cv_header_stdc=no
14452 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14456 echo "$as_me:14456: result: $ac_cv_header_stdc" >&5
14457 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14458 if test $ac_cv_header_stdc = yes; then
14460 cat >>confdefs.h <<\EOF
14461 #define STDC_HEADERS 1
14466 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14468 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14469 inttypes.h stdint.h unistd.h
14471 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14472 echo "$as_me:14472: checking for $ac_header" >&5
14473 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14474 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14475 echo $ECHO_N "(cached) $ECHO_C" >&6
14477 cat >conftest.$ac_ext <<_ACEOF
14478 #line 14478 "configure"
14479 #include "confdefs.h"
14480 $ac_includes_default
14481 #include <$ac_header>
14483 rm -f conftest.$ac_objext
14484 if { (eval echo "$as_me:14484: \"$ac_compile\"") >&5
14485 (eval $ac_compile) 2>&5
14487 echo "$as_me:14487: \$? = $ac_status" >&5
14488 (exit $ac_status); } &&
14489 { ac_try='test -s conftest.$ac_objext'
14490 { (eval echo "$as_me:14490: \"$ac_try\"") >&5
14491 (eval $ac_try) 2>&5
14493 echo "$as_me:14493: \$? = $ac_status" >&5
14494 (exit $ac_status); }; }; then
14495 eval "$as_ac_Header=yes"
14497 echo "$as_me: failed program was:" >&5
14498 cat conftest.$ac_ext >&5
14499 eval "$as_ac_Header=no"
14501 rm -f conftest.$ac_objext conftest.$ac_ext
14503 echo "$as_me:14503: result: `eval echo '${'$as_ac_Header'}'`" >&5
14504 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14505 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14506 cat >>confdefs.h <<EOF
14507 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14513 echo "$as_me:14513: checking for signed char" >&5
14514 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14515 if test "${ac_cv_type_signed_char+set}" = set; then
14516 echo $ECHO_N "(cached) $ECHO_C" >&6
14518 cat >conftest.$ac_ext <<_ACEOF
14519 #line 14519 "configure"
14520 #include "confdefs.h"
14521 $ac_includes_default
14525 if ((signed char *) 0)
14527 if (sizeof (signed char))
14533 rm -f conftest.$ac_objext
14534 if { (eval echo "$as_me:14534: \"$ac_compile\"") >&5
14535 (eval $ac_compile) 2>&5
14537 echo "$as_me:14537: \$? = $ac_status" >&5
14538 (exit $ac_status); } &&
14539 { ac_try='test -s conftest.$ac_objext'
14540 { (eval echo "$as_me:14540: \"$ac_try\"") >&5
14541 (eval $ac_try) 2>&5
14543 echo "$as_me:14543: \$? = $ac_status" >&5
14544 (exit $ac_status); }; }; then
14545 ac_cv_type_signed_char=yes
14547 echo "$as_me: failed program was:" >&5
14548 cat conftest.$ac_ext >&5
14549 ac_cv_type_signed_char=no
14551 rm -f conftest.$ac_objext conftest.$ac_ext
14553 echo "$as_me:14553: result: $ac_cv_type_signed_char" >&5
14554 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14556 echo "$as_me:14556: checking size of signed char" >&5
14557 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14558 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14559 echo $ECHO_N "(cached) $ECHO_C" >&6
14561 if test "$ac_cv_type_signed_char" = yes; then
14562 if test "$cross_compiling" = yes; then
14563 # Depending upon the size, compute the lo and hi bounds.
14564 cat >conftest.$ac_ext <<_ACEOF
14565 #line 14565 "configure"
14566 #include "confdefs.h"
14567 $ac_includes_default
14571 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14576 rm -f conftest.$ac_objext
14577 if { (eval echo "$as_me:14577: \"$ac_compile\"") >&5
14578 (eval $ac_compile) 2>&5
14580 echo "$as_me:14580: \$? = $ac_status" >&5
14581 (exit $ac_status); } &&
14582 { ac_try='test -s conftest.$ac_objext'
14583 { (eval echo "$as_me:14583: \"$ac_try\"") >&5
14584 (eval $ac_try) 2>&5
14586 echo "$as_me:14586: \$? = $ac_status" >&5
14587 (exit $ac_status); }; }; then
14590 cat >conftest.$ac_ext <<_ACEOF
14591 #line 14591 "configure"
14592 #include "confdefs.h"
14593 $ac_includes_default
14597 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14602 rm -f conftest.$ac_objext
14603 if { (eval echo "$as_me:14603: \"$ac_compile\"") >&5
14604 (eval $ac_compile) 2>&5
14606 echo "$as_me:14606: \$? = $ac_status" >&5
14607 (exit $ac_status); } &&
14608 { ac_try='test -s conftest.$ac_objext'
14609 { (eval echo "$as_me:14609: \"$ac_try\"") >&5
14610 (eval $ac_try) 2>&5
14612 echo "$as_me:14612: \$? = $ac_status" >&5
14613 (exit $ac_status); }; }; then
14614 ac_hi=$ac_mid; break
14616 echo "$as_me: failed program was:" >&5
14617 cat conftest.$ac_ext >&5
14618 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
14620 rm -f conftest.$ac_objext conftest.$ac_ext
14623 echo "$as_me: failed program was:" >&5
14624 cat conftest.$ac_ext >&5
14627 cat >conftest.$ac_ext <<_ACEOF
14628 #line 14628 "configure"
14629 #include "confdefs.h"
14630 $ac_includes_default
14634 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14639 rm -f conftest.$ac_objext
14640 if { (eval echo "$as_me:14640: \"$ac_compile\"") >&5
14641 (eval $ac_compile) 2>&5
14643 echo "$as_me:14643: \$? = $ac_status" >&5
14644 (exit $ac_status); } &&
14645 { ac_try='test -s conftest.$ac_objext'
14646 { (eval echo "$as_me:14646: \"$ac_try\"") >&5
14647 (eval $ac_try) 2>&5
14649 echo "$as_me:14649: \$? = $ac_status" >&5
14650 (exit $ac_status); }; }; then
14651 ac_lo=$ac_mid; break
14653 echo "$as_me: failed program was:" >&5
14654 cat conftest.$ac_ext >&5
14655 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
14657 rm -f conftest.$ac_objext conftest.$ac_ext
14660 rm -f conftest.$ac_objext conftest.$ac_ext
14661 # Binary search between lo and hi bounds.
14662 while test "x$ac_lo" != "x$ac_hi"; do
14663 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14664 cat >conftest.$ac_ext <<_ACEOF
14665 #line 14665 "configure"
14666 #include "confdefs.h"
14667 $ac_includes_default
14671 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14676 rm -f conftest.$ac_objext
14677 if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5
14678 (eval $ac_compile) 2>&5
14680 echo "$as_me:14680: \$? = $ac_status" >&5
14681 (exit $ac_status); } &&
14682 { ac_try='test -s conftest.$ac_objext'
14683 { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684 (eval $ac_try) 2>&5
14686 echo "$as_me:14686: \$? = $ac_status" >&5
14687 (exit $ac_status); }; }; then
14690 echo "$as_me: failed program was:" >&5
14691 cat conftest.$ac_ext >&5
14692 ac_lo=`expr $ac_mid + 1`
14694 rm -f conftest.$ac_objext conftest.$ac_ext
14696 ac_cv_sizeof_signed_char=$ac_lo
14698 if test "$cross_compiling" = yes; then
14699 { { echo "$as_me:14699: error: cannot run test program while cross compiling" >&5
14700 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14701 { (exit 1); exit 1; }; }
14703 cat >conftest.$ac_ext <<_ACEOF
14704 #line 14704 "configure"
14705 #include "confdefs.h"
14706 $ac_includes_default
14710 FILE *f = fopen ("conftest.val", "w");
14712 $ac_main_return (1);
14713 fprintf (f, "%d", (sizeof (signed char)));
14719 rm -f conftest$ac_exeext
14720 if { (eval echo "$as_me:14720: \"$ac_link\"") >&5
14721 (eval $ac_link) 2>&5
14723 echo "$as_me:14723: \$? = $ac_status" >&5
14724 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14725 { (eval echo "$as_me:14725: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14728 echo "$as_me:14728: \$? = $ac_status" >&5
14729 (exit $ac_status); }; }; then
14730 ac_cv_sizeof_signed_char=`cat conftest.val`
14732 echo "$as_me: program exited with status $ac_status" >&5
14733 echo "$as_me: failed program was:" >&5
14734 cat conftest.$ac_ext >&5
14736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14741 ac_cv_sizeof_signed_char=0
14744 echo "$as_me:14744: result: $ac_cv_sizeof_signed_char" >&5
14745 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14746 cat >>confdefs.h <<EOF
14747 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14750 echo "$as_me:14750: checking for ANSI C header files" >&5
14751 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14752 if test "${ac_cv_header_stdc+set}" = set; then
14753 echo $ECHO_N "(cached) $ECHO_C" >&6
14755 cat >conftest.$ac_ext <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758 #include <stdlib.h>
14759 #include <stdarg.h>
14760 #include <string.h>
14764 if { (eval echo "$as_me:14764: \"$ac_cpp conftest.$ac_ext\"") >&5
14765 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14767 egrep -v '^ *\+' conftest.er1 >conftest.err
14769 cat conftest.err >&5
14770 echo "$as_me:14770: \$? = $ac_status" >&5
14771 (exit $ac_status); } >/dev/null; then
14772 if test -s conftest.err; then
14773 ac_cpp_err=$ac_c_preproc_warn_flag
14780 if test -z "$ac_cpp_err"; then
14781 ac_cv_header_stdc=yes
14783 echo "$as_me: failed program was:" >&5
14784 cat conftest.$ac_ext >&5
14785 ac_cv_header_stdc=no
14787 rm -f conftest.err conftest.$ac_ext
14789 if test $ac_cv_header_stdc = yes; then
14790 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14791 cat >conftest.$ac_ext <<_ACEOF
14792 #line 14792 "configure"
14793 #include "confdefs.h"
14794 #include <string.h>
14797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14798 egrep "memchr" >/dev/null 2>&1; then
14801 ac_cv_header_stdc=no
14807 if test $ac_cv_header_stdc = yes; then
14808 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14809 cat >conftest.$ac_ext <<_ACEOF
14810 #line 14810 "configure"
14811 #include "confdefs.h"
14812 #include <stdlib.h>
14815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14816 egrep "free" >/dev/null 2>&1; then
14819 ac_cv_header_stdc=no
14825 if test $ac_cv_header_stdc = yes; then
14826 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14827 if test "$cross_compiling" = yes; then
14830 cat >conftest.$ac_ext <<_ACEOF
14831 #line 14831 "configure"
14832 #include "confdefs.h"
14834 #if ((' ' & 0x0FF) == 0x020)
14835 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14836 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14838 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14839 || ('j' <= (c) && (c) <= 'r') \
14840 || ('s' <= (c) && (c) <= 'z'))
14841 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14844 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14849 for (i = 0; i < 256; i++)
14850 if (XOR (islower (i), ISLOWER (i))
14851 || toupper (i) != TOUPPER (i))
14852 $ac_main_return(2);
14853 $ac_main_return (0);
14856 rm -f conftest$ac_exeext
14857 if { (eval echo "$as_me:14857: \"$ac_link\"") >&5
14858 (eval $ac_link) 2>&5
14860 echo "$as_me:14860: \$? = $ac_status" >&5
14861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14862 { (eval echo "$as_me:14862: \"$ac_try\"") >&5
14863 (eval $ac_try) 2>&5
14865 echo "$as_me:14865: \$? = $ac_status" >&5
14866 (exit $ac_status); }; }; then
14869 echo "$as_me: program exited with status $ac_status" >&5
14870 echo "$as_me: failed program was:" >&5
14871 cat conftest.$ac_ext >&5
14872 ac_cv_header_stdc=no
14874 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14878 echo "$as_me:14878: result: $ac_cv_header_stdc" >&5
14879 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14880 if test $ac_cv_header_stdc = yes; then
14882 cat >>confdefs.h <<\EOF
14883 #define STDC_HEADERS 1
14888 ac_header_dirent=no
14889 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14890 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14891 echo "$as_me:14891: checking for $ac_hdr that defines DIR" >&5
14892 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14893 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14894 echo $ECHO_N "(cached) $ECHO_C" >&6
14896 cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14899 #include <sys/types.h>
14911 rm -f conftest.$ac_objext
14912 if { (eval echo "$as_me:14912: \"$ac_compile\"") >&5
14913 (eval $ac_compile) 2>&5
14915 echo "$as_me:14915: \$? = $ac_status" >&5
14916 (exit $ac_status); } &&
14917 { ac_try='test -s conftest.$ac_objext'
14918 { (eval echo "$as_me:14918: \"$ac_try\"") >&5
14919 (eval $ac_try) 2>&5
14921 echo "$as_me:14921: \$? = $ac_status" >&5
14922 (exit $ac_status); }; }; then
14923 eval "$as_ac_Header=yes"
14925 echo "$as_me: failed program was:" >&5
14926 cat conftest.$ac_ext >&5
14927 eval "$as_ac_Header=no"
14929 rm -f conftest.$ac_objext conftest.$ac_ext
14931 echo "$as_me:14931: result: `eval echo '${'$as_ac_Header'}'`" >&5
14932 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14933 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14934 cat >>confdefs.h <<EOF
14935 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14938 ac_header_dirent=$ac_hdr; break
14942 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14943 if test $ac_header_dirent = dirent.h; then
14944 echo "$as_me:14944: checking for opendir in -ldir" >&5
14945 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14946 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14947 echo $ECHO_N "(cached) $ECHO_C" >&6
14949 ac_check_lib_save_LIBS=$LIBS
14951 cat >conftest.$ac_ext <<_ACEOF
14952 #line 14952 "configure"
14953 #include "confdefs.h"
14955 /* Override any gcc2 internal prototype to avoid an error. */
14959 /* We use char because int might match the return type of a gcc2
14960 builtin and then its argument prototype would still apply. */
14970 rm -f conftest.$ac_objext conftest$ac_exeext
14971 if { (eval echo "$as_me:14971: \"$ac_link\"") >&5
14972 (eval $ac_link) 2>&5
14974 echo "$as_me:14974: \$? = $ac_status" >&5
14975 (exit $ac_status); } &&
14976 { ac_try='test -s conftest$ac_exeext'
14977 { (eval echo "$as_me:14977: \"$ac_try\"") >&5
14978 (eval $ac_try) 2>&5
14980 echo "$as_me:14980: \$? = $ac_status" >&5
14981 (exit $ac_status); }; }; then
14982 ac_cv_lib_dir_opendir=yes
14984 echo "$as_me: failed program was:" >&5
14985 cat conftest.$ac_ext >&5
14986 ac_cv_lib_dir_opendir=no
14988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14989 LIBS=$ac_check_lib_save_LIBS
14991 echo "$as_me:14991: result: $ac_cv_lib_dir_opendir" >&5
14992 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14993 if test $ac_cv_lib_dir_opendir = yes; then
14998 echo "$as_me:14998: checking for opendir in -lx" >&5
14999 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15000 if test "${ac_cv_lib_x_opendir+set}" = set; then
15001 echo $ECHO_N "(cached) $ECHO_C" >&6
15003 ac_check_lib_save_LIBS=$LIBS
15005 cat >conftest.$ac_ext <<_ACEOF
15006 #line 15006 "configure"
15007 #include "confdefs.h"
15009 /* Override any gcc2 internal prototype to avoid an error. */
15013 /* We use char because int might match the return type of a gcc2
15014 builtin and then its argument prototype would still apply. */
15024 rm -f conftest.$ac_objext conftest$ac_exeext
15025 if { (eval echo "$as_me:15025: \"$ac_link\"") >&5
15026 (eval $ac_link) 2>&5
15028 echo "$as_me:15028: \$? = $ac_status" >&5
15029 (exit $ac_status); } &&
15030 { ac_try='test -s conftest$ac_exeext'
15031 { (eval echo "$as_me:15031: \"$ac_try\"") >&5
15032 (eval $ac_try) 2>&5
15034 echo "$as_me:15034: \$? = $ac_status" >&5
15035 (exit $ac_status); }; }; then
15036 ac_cv_lib_x_opendir=yes
15038 echo "$as_me: failed program was:" >&5
15039 cat conftest.$ac_ext >&5
15040 ac_cv_lib_x_opendir=no
15042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15043 LIBS=$ac_check_lib_save_LIBS
15045 echo "$as_me:15045: result: $ac_cv_lib_x_opendir" >&5
15046 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15047 if test $ac_cv_lib_x_opendir = yes; then
15053 echo "$as_me:15053: checking whether time.h and sys/time.h may both be included" >&5
15054 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15055 if test "${ac_cv_header_time+set}" = set; then
15056 echo $ECHO_N "(cached) $ECHO_C" >&6
15058 cat >conftest.$ac_ext <<_ACEOF
15059 #line 15059 "configure"
15060 #include "confdefs.h"
15061 #include <sys/types.h>
15062 #include <sys/time.h>
15068 if ((struct tm *) 0)
15074 rm -f conftest.$ac_objext
15075 if { (eval echo "$as_me:15075: \"$ac_compile\"") >&5
15076 (eval $ac_compile) 2>&5
15078 echo "$as_me:15078: \$? = $ac_status" >&5
15079 (exit $ac_status); } &&
15080 { ac_try='test -s conftest.$ac_objext'
15081 { (eval echo "$as_me:15081: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15084 echo "$as_me:15084: \$? = $ac_status" >&5
15085 (exit $ac_status); }; }; then
15086 ac_cv_header_time=yes
15088 echo "$as_me: failed program was:" >&5
15089 cat conftest.$ac_ext >&5
15090 ac_cv_header_time=no
15092 rm -f conftest.$ac_objext conftest.$ac_ext
15094 echo "$as_me:15094: result: $ac_cv_header_time" >&5
15095 echo "${ECHO_T}$ac_cv_header_time" >&6
15096 if test $ac_cv_header_time = yes; then
15098 cat >>confdefs.h <<\EOF
15099 #define TIME_WITH_SYS_TIME 1
15104 ### checks for compiler characteristics
15106 ac_cpp='$CPP $CPPFLAGS'
15107 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15108 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15109 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15110 ac_main_return=return
15112 echo "$as_me:15112: checking for an ANSI C-conforming const" >&5
15113 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15114 if test "${ac_cv_c_const+set}" = set; then
15115 echo $ECHO_N "(cached) $ECHO_C" >&6
15117 cat >conftest.$ac_ext <<_ACEOF
15118 #line 15118 "configure"
15119 #include "confdefs.h"
15124 /* FIXME: Include the comments suggested by Paul. */
15125 #ifndef __cplusplus
15126 /* Ultrix mips cc rejects this. */
15127 typedef int charset[2];
15129 /* SunOS 4.1.1 cc rejects this. */
15130 char const *const *ccp;
15132 /* NEC SVR4.0.2 mips cc rejects this. */
15133 struct point {int x, y;};
15134 static struct point const zero = {0,0};
15135 /* AIX XL C 1.02.0.0 rejects this.
15136 It does not let you subtract one const X* pointer from another in
15137 an arm of an if-expression whose if-part is not a constant
15139 const char *g = "string";
15140 ccp = &g + (g ? g-g : 0);
15141 /* HPUX 7.0 cc rejects these. */
15144 ccp = (char const *const *) p;
15145 { /* SCO 3.2v4 cc rejects this. */
15147 char const *s = 0 ? (char *) 0 : (char const *) 0;
15151 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15152 int x[] = {25, 17};
15153 const int *foo = &x[0];
15156 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15157 typedef const int *iptr;
15161 { /* AIX XL C 1.02.0.0 rejects this saying
15162 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15163 struct s { int j; const int *ap[3]; };
15164 struct s *b; b->j = 5;
15166 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15167 const int foo = 10;
15175 rm -f conftest.$ac_objext
15176 if { (eval echo "$as_me:15176: \"$ac_compile\"") >&5
15177 (eval $ac_compile) 2>&5
15179 echo "$as_me:15179: \$? = $ac_status" >&5
15180 (exit $ac_status); } &&
15181 { ac_try='test -s conftest.$ac_objext'
15182 { (eval echo "$as_me:15182: \"$ac_try\"") >&5
15183 (eval $ac_try) 2>&5
15185 echo "$as_me:15185: \$? = $ac_status" >&5
15186 (exit $ac_status); }; }; then
15189 echo "$as_me: failed program was:" >&5
15190 cat conftest.$ac_ext >&5
15193 rm -f conftest.$ac_objext conftest.$ac_ext
15195 echo "$as_me:15195: result: $ac_cv_c_const" >&5
15196 echo "${ECHO_T}$ac_cv_c_const" >&6
15197 if test $ac_cv_c_const = no; then
15199 cat >>confdefs.h <<\EOF
15205 ### Checks for external-data
15207 echo "$as_me:15207: checking if data-only library module links" >&5
15208 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15209 if test "${cf_cv_link_dataonly+set}" = set; then
15210 echo $ECHO_N "(cached) $ECHO_C" >&6
15214 cat >conftest.$ac_ext <<EOF
15215 #line 15215 "configure"
15216 int testdata[3] = { 123, 456, 789 };
15218 if { (eval echo "$as_me:15218: \"$ac_compile\"") >&5
15219 (eval $ac_compile) 2>&5
15221 echo "$as_me:15221: \$? = $ac_status" >&5
15222 (exit $ac_status); } ; then
15223 mv conftest.o data.o && \
15224 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15226 rm -f conftest.$ac_ext data.o
15227 cat >conftest.$ac_ext <<EOF
15228 #line 15228 "configure"
15232 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
15234 extern int testdata[3];
15235 return testdata[0] == 123
15236 && testdata[1] == 456
15237 && testdata[2] == 789;
15241 if { (eval echo "$as_me:15241: \"$ac_compile\"") >&5
15242 (eval $ac_compile) 2>&5
15244 echo "$as_me:15244: \$? = $ac_status" >&5
15245 (exit $ac_status); }; then
15246 mv conftest.o func.o && \
15247 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15249 rm -f conftest.$ac_ext func.o
15250 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15251 cf_saveLIBS="$LIBS"
15252 LIBS="conftest.a $LIBS"
15253 if test "$cross_compiling" = yes; then
15254 cf_cv_link_dataonly=unknown
15256 cat >conftest.$ac_ext <<_ACEOF
15257 #line 15257 "configure"
15258 #include "confdefs.h"
15262 extern int testfunc();
15263 ${cf_cv_main_return:-return} (!testfunc());
15267 rm -f conftest$ac_exeext
15268 if { (eval echo "$as_me:15268: \"$ac_link\"") >&5
15269 (eval $ac_link) 2>&5
15271 echo "$as_me:15271: \$? = $ac_status" >&5
15272 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15273 { (eval echo "$as_me:15273: \"$ac_try\"") >&5
15274 (eval $ac_try) 2>&5
15276 echo "$as_me:15276: \$? = $ac_status" >&5
15277 (exit $ac_status); }; }; then
15278 cf_cv_link_dataonly=yes
15280 echo "$as_me: program exited with status $ac_status" >&5
15281 echo "$as_me: failed program was:" >&5
15282 cat conftest.$ac_ext >&5
15283 cf_cv_link_dataonly=no
15285 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15287 LIBS="$cf_saveLIBS"
15291 echo "$as_me:15291: result: $cf_cv_link_dataonly" >&5
15292 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15294 if test "$cf_cv_link_dataonly" = no ; then
15296 cat >>confdefs.h <<\EOF
15297 #define BROKEN_LINKER 1
15303 ### Checks for library functions.
15309 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15310 echo "$as_me:15310: checking for $ac_header" >&5
15311 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15312 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15313 echo $ECHO_N "(cached) $ECHO_C" >&6
15315 cat >conftest.$ac_ext <<_ACEOF
15316 #line 15316 "configure"
15317 #include "confdefs.h"
15318 #include <$ac_header>
15320 if { (eval echo "$as_me:15320: \"$ac_cpp conftest.$ac_ext\"") >&5
15321 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15323 egrep -v '^ *\+' conftest.er1 >conftest.err
15325 cat conftest.err >&5
15326 echo "$as_me:15326: \$? = $ac_status" >&5
15327 (exit $ac_status); } >/dev/null; then
15328 if test -s conftest.err; then
15329 ac_cpp_err=$ac_c_preproc_warn_flag
15336 if test -z "$ac_cpp_err"; then
15337 eval "$as_ac_Header=yes"
15339 echo "$as_me: failed program was:" >&5
15340 cat conftest.$ac_ext >&5
15341 eval "$as_ac_Header=no"
15343 rm -f conftest.err conftest.$ac_ext
15345 echo "$as_me:15345: result: `eval echo '${'$as_ac_Header'}'`" >&5
15346 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15347 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15348 cat >>confdefs.h <<EOF
15349 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15355 echo "$as_me:15355: checking for working mkstemp" >&5
15356 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15357 if test "${cf_cv_func_mkstemp+set}" = set; then
15358 echo $ECHO_N "(cached) $ECHO_C" >&6
15362 if test "$cross_compiling" = yes; then
15363 cf_cv_func_mkstemp=maybe
15365 cat >conftest.$ac_ext <<_ACEOF
15366 #line 15366 "configure"
15367 #include "confdefs.h"
15369 #include <sys/types.h>
15370 #ifdef HAVE_UNISTD_H
15371 #include <unistd.h>
15373 #include <stdlib.h>
15375 #include <string.h>
15376 #include <sys/stat.h>
15379 char *tmpl = "conftestXXXXXX";
15387 for (n = 0; n < 2; ++n) {
15388 strcpy(name[n], tmpl);
15389 if ((fd = mkstemp(name[n])) >= 0) {
15390 if (!strcmp(name[n], tmpl)
15391 || stat(name[n], &sb) != 0
15392 || (sb.st_mode & S_IFMT) != S_IFREG
15393 || (sb.st_mode & 077) != 0) {
15400 && !strcmp(name[0], name[1]))
15402 ${cf_cv_main_return:-return}(result);
15406 rm -f conftest$ac_exeext
15407 if { (eval echo "$as_me:15407: \"$ac_link\"") >&5
15408 (eval $ac_link) 2>&5
15410 echo "$as_me:15410: \$? = $ac_status" >&5
15411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15412 { (eval echo "$as_me:15412: \"$ac_try\"") >&5
15413 (eval $ac_try) 2>&5
15415 echo "$as_me:15415: \$? = $ac_status" >&5
15416 (exit $ac_status); }; }; then
15417 cf_cv_func_mkstemp=yes
15420 echo "$as_me: program exited with status $ac_status" >&5
15421 echo "$as_me: failed program was:" >&5
15422 cat conftest.$ac_ext >&5
15423 cf_cv_func_mkstemp=no
15426 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15430 echo "$as_me:15430: result: $cf_cv_func_mkstemp" >&5
15431 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15432 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
15433 echo "$as_me:15433: checking for mkstemp" >&5
15434 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15435 if test "${ac_cv_func_mkstemp+set}" = set; then
15436 echo $ECHO_N "(cached) $ECHO_C" >&6
15438 cat >conftest.$ac_ext <<_ACEOF
15439 #line 15439 "configure"
15440 #include "confdefs.h"
15441 /* System header to define __stub macros and hopefully few prototypes,
15442 which can conflict with char mkstemp (); below. */
15443 #include <assert.h>
15444 /* Override any gcc2 internal prototype to avoid an error. */
15448 /* We use char because int might match the return type of a gcc2
15449 builtin and then its argument prototype would still apply. */
15456 /* The GNU C library defines this for functions which it implements
15457 to always fail with ENOSYS. Some functions are actually named
15458 something starting with __ and the normal name is an alias. */
15459 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15462 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15469 rm -f conftest.$ac_objext conftest$ac_exeext
15470 if { (eval echo "$as_me:15470: \"$ac_link\"") >&5
15471 (eval $ac_link) 2>&5
15473 echo "$as_me:15473: \$? = $ac_status" >&5
15474 (exit $ac_status); } &&
15475 { ac_try='test -s conftest$ac_exeext'
15476 { (eval echo "$as_me:15476: \"$ac_try\"") >&5
15477 (eval $ac_try) 2>&5
15479 echo "$as_me:15479: \$? = $ac_status" >&5
15480 (exit $ac_status); }; }; then
15481 ac_cv_func_mkstemp=yes
15483 echo "$as_me: failed program was:" >&5
15484 cat conftest.$ac_ext >&5
15485 ac_cv_func_mkstemp=no
15487 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15489 echo "$as_me:15489: result: $ac_cv_func_mkstemp" >&5
15490 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15493 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15495 cat >>confdefs.h <<\EOF
15496 #define HAVE_MKSTEMP 1
15501 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15502 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15503 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15507 if test "$cf_with_ada" != "no" ; then
15509 cf_ada_make=gnatmake
15511 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
15512 set dummy $cf_ada_make; ac_word=$2
15513 echo "$as_me:15513: checking for $ac_word" >&5
15514 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15515 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
15516 echo $ECHO_N "(cached) $ECHO_C" >&6
15518 if test -n "$gnatmake_exists"; then
15519 ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
15521 ac_save_IFS=$IFS; IFS=$ac_path_separator
15523 for ac_dir in $ac_dummy; do
15525 test -z "$ac_dir" && ac_dir=.
15526 $as_executable_p "$ac_dir/$ac_word" || continue
15527 ac_cv_prog_gnatmake_exists="yes"
15528 echo "$as_me:15528: found $ac_dir/$ac_word" >&5
15532 test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
15535 gnatmake_exists=$ac_cv_prog_gnatmake_exists
15536 if test -n "$gnatmake_exists"; then
15537 echo "$as_me:15537: result: $gnatmake_exists" >&5
15538 echo "${ECHO_T}$gnatmake_exists" >&6
15540 echo "$as_me:15540: result: no" >&5
15541 echo "${ECHO_T}no" >&6
15544 if test "$ac_cv_prog_gnatmake_exists" = no; then
15546 cf_cv_prog_gnat_correct=no
15548 # Extract the first word of "gprconfig", so it can be a program name with args.
15549 set dummy gprconfig; ac_word=$2
15550 echo "$as_me:15550: checking for $ac_word" >&5
15551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15552 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
15553 echo $ECHO_N "(cached) $ECHO_C" >&6
15555 if test -n "$gprconfig_exists"; then
15556 ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
15558 ac_save_IFS=$IFS; IFS=$ac_path_separator
15560 for ac_dir in $ac_dummy; do
15562 test -z "$ac_dir" && ac_dir=.
15563 $as_executable_p "$ac_dir/$ac_word" || continue
15564 ac_cv_prog_gprconfig_exists="yes"
15565 echo "$as_me:15565: found $ac_dir/$ac_word" >&5
15569 test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
15572 gprconfig_exists=$ac_cv_prog_gprconfig_exists
15573 if test -n "$gprconfig_exists"; then
15574 echo "$as_me:15574: result: $gprconfig_exists" >&5
15575 echo "${ECHO_T}$gprconfig_exists" >&6
15577 echo "$as_me:15577: result: no" >&5
15578 echo "${ECHO_T}no" >&6
15581 if test "$ac_cv_prog_gprconfig_exists" = yes
15583 rm -rf conftest* *~conftest*
15584 if mkdir conftest.src
15588 for cf_gprconfig in Ada C
15590 echo "$as_me:15590: checking for gprconfig name for $cf_gprconfig" >&5
15591 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
15592 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
15593 if test -n "$cf_gprconfig_value"
15595 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
15596 echo "$as_me:15596: result: $cf_gprconfig_value" >&5
15597 echo "${ECHO_T}$cf_gprconfig_value" >&6
15599 echo "$as_me:15599: result: missing" >&5
15600 echo "${ECHO_T}missing" >&6
15606 rm -rf conftest* *~conftest*
15609 # gprconfig is newer than gnatmake; we can continue...
15612 if test "x$cf_ada_config" != "x#"
15615 echo "$as_me:15615: checking for gnat version" >&5
15616 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
15617 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
15618 grep '[0-9].[0-9][0-9]*' |\
15619 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
15620 echo "$as_me:15620: result: $cf_gnat_version" >&5
15621 echo "${ECHO_T}$cf_gnat_version" >&6
15623 case $cf_gnat_version in
15624 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
15625 cf_cv_prog_gnat_correct=yes
15628 { echo "$as_me:15628: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
15629 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
15630 cf_cv_prog_gnat_correct=no
15634 # Extract the first word of "m4", so it can be a program name with args.
15635 set dummy m4; ac_word=$2
15636 echo "$as_me:15636: checking for $ac_word" >&5
15637 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15638 if test "${ac_cv_prog_M4_exists+set}" = set; then
15639 echo $ECHO_N "(cached) $ECHO_C" >&6
15641 if test -n "$M4_exists"; then
15642 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
15644 ac_save_IFS=$IFS; IFS=$ac_path_separator
15646 for ac_dir in $ac_dummy; do
15648 test -z "$ac_dir" && ac_dir=.
15649 $as_executable_p "$ac_dir/$ac_word" || continue
15650 ac_cv_prog_M4_exists="yes"
15651 echo "$as_me:15651: found $ac_dir/$ac_word" >&5
15655 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
15658 M4_exists=$ac_cv_prog_M4_exists
15659 if test -n "$M4_exists"; then
15660 echo "$as_me:15660: result: $M4_exists" >&5
15661 echo "${ECHO_T}$M4_exists" >&6
15663 echo "$as_me:15663: result: no" >&5
15664 echo "${ECHO_T}no" >&6
15667 if test "$ac_cv_prog_M4_exists" = no; then
15668 cf_cv_prog_gnat_correct=no
15669 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
15671 if test "$cf_cv_prog_gnat_correct" = yes; then
15672 echo "$as_me:15672: checking if GNAT works" >&5
15673 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
15675 rm -rf conftest* *~conftest*
15676 cat >>conftest.ads <<CF_EOF
15677 procedure conftest;
15679 cat >>conftest.adb <<CF_EOF
15682 procedure conftest is
15684 Text_IO.Put ("Hello World");
15686 GNAT.OS_Lib.OS_Exit (0);
15689 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15690 if ( ./conftest 1>&5 2>&1 ) ; then
15691 cf_cv_prog_gnat_correct=yes
15693 cf_cv_prog_gnat_correct=no
15696 cf_cv_prog_gnat_correct=no
15698 rm -rf conftest* *~conftest*
15700 echo "$as_me:15700: result: $cf_cv_prog_gnat_correct" >&5
15701 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
15704 cf_cv_prog_gnat_correct=no
15708 if test "$cf_cv_prog_gnat_correct" = yes; then
15710 echo "$as_me:15710: checking optimization options for ADAFLAGS" >&5
15711 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
15715 ADAFLAGS="$ADAFLAGS -g"
15721 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
15723 ADAFLAGS="$ADAFLAGS $cf_O_flag"
15727 echo "$as_me:15727: result: $ADAFLAGS" >&5
15728 echo "${ECHO_T}$ADAFLAGS" >&6
15730 echo "$as_me:15730: checking if GNATPREP supports -T option" >&5
15731 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
15732 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
15733 echo $ECHO_N "(cached) $ECHO_C" >&6
15736 cf_cv_gnatprep_opt_t=no
15737 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
15740 echo "$as_me:15740: result: $cf_cv_gnatprep_opt_t" >&5
15741 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
15742 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
15744 echo "$as_me:15744: checking if GNAT supports generics" >&5
15745 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
15746 case $cf_gnat_version in
15748 cf_gnat_generics=yes
15751 cf_gnat_generics=no
15754 echo "$as_me:15754: result: $cf_gnat_generics" >&5
15755 echo "${ECHO_T}$cf_gnat_generics" >&6
15757 if test "$cf_gnat_generics" = yes
15759 cf_compile_generics=generics
15760 cf_generic_objects="\${GENOBJS}"
15762 cf_compile_generics=
15763 cf_generic_objects=
15766 echo "$as_me:15766: checking if GNAT supports SIGINT" >&5
15767 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
15768 if test "${cf_cv_gnat_sigint+set}" = set; then
15769 echo $ECHO_N "(cached) $ECHO_C" >&6
15772 rm -rf conftest* *~conftest*
15773 cat >>conftest.ads <<CF_EOF
15774 with Ada.Interrupts.Names;
15776 package ConfTest is
15778 pragma Warnings (Off); -- the next pragma exists since 3.11p
15779 pragma Unreserve_All_Interrupts;
15780 pragma Warnings (On);
15782 protected Process is
15784 function Continue return Boolean;
15785 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
15787 Done : Boolean := False;
15792 cat >>conftest.adb <<CF_EOF
15793 package body ConfTest is
15794 protected body Process is
15799 function Continue return Boolean is
15806 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
15807 cf_cv_gnat_sigint=yes
15809 cf_cv_gnat_sigint=no
15811 rm -rf conftest* *~conftest*
15814 echo "$as_me:15814: result: $cf_cv_gnat_sigint" >&5
15815 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
15817 if test $cf_cv_gnat_sigint = yes ; then
15820 USE_GNAT_SIGINT="#"
15823 cf_gnat_libraries=no
15824 cf_gnat_projects=no
15826 if test "$enable_gnat_projects" != no ; then
15827 echo "$as_me:15827: checking if GNAT supports project files" >&5
15828 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
15829 case $cf_gnat_version in
15833 case $cf_cv_system_name in
15837 rm -rf conftest* *~conftest*
15838 if mkdir conftest.src conftest.bin conftest.lib
15841 rm -rf conftest* *~conftest*
15842 cat >>library.gpr <<CF_EOF
15844 Kind := External ("LIB_KIND");
15845 for Library_Name use "ConfTest";
15846 for Object_Dir use ".";
15847 for Library_ALI_Dir use External("LIBRARY_DIR");
15848 for Library_Version use External ("SONAME");
15849 for Library_Kind use Kind;
15850 for Library_Dir use External("BUILD_DIR");
15851 Source_Dir := External ("SOURCE_DIR");
15852 for Source_Dirs use (Source_Dir);
15855 cat >>confpackage.ads <<CF_EOF
15856 package ConfPackage is
15857 procedure conftest;
15860 cat >>confpackage.adb <<CF_EOF
15862 package body ConfPackage is
15863 procedure conftest is
15865 Text_IO.Put ("Hello World");
15870 if ( $cf_ada_make $ADAFLAGS \
15872 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
15873 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
15874 -XSOURCE_DIR=`pwd` \
15875 -XSONAME=libConfTest.so.1 \
15876 -XLIB_KIND=static 1>&5 2>&1 ) ; then
15877 cf_gnat_projects=yes
15881 if test -f conftest.lib/confpackage.ali
15883 cf_gnat_libraries=yes
15885 rm -rf conftest* *~conftest*
15890 echo "$as_me:15890: result: $cf_gnat_projects" >&5
15891 echo "${ECHO_T}$cf_gnat_projects" >&6
15892 fi # enable_gnat_projects
15894 if test $cf_gnat_projects = yes
15896 echo "$as_me:15896: checking if GNAT supports libraries" >&5
15897 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
15898 echo "$as_me:15898: result: $cf_gnat_libraries" >&5
15899 echo "${ECHO_T}$cf_gnat_libraries" >&6
15902 if test "$cf_gnat_projects" = yes
15904 USE_OLD_MAKERULES="#"
15905 USE_GNAT_PROJECTS=""
15907 USE_OLD_MAKERULES=""
15908 USE_GNAT_PROJECTS="#"
15911 if test "$cf_gnat_libraries" = yes
15913 USE_GNAT_LIBRARIES=""
15915 USE_GNAT_LIBRARIES="#"
15918 echo "$as_me:15918: checking for ada-compiler" >&5
15919 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
15921 # Check whether --with-ada-compiler or --without-ada-compiler was given.
15922 if test "${with_ada_compiler+set}" = set; then
15923 withval="$with_ada_compiler"
15924 cf_ada_compiler=$withval
15926 cf_ada_compiler=gnatmake
15929 echo "$as_me:15929: result: $cf_ada_compiler" >&5
15930 echo "${ECHO_T}$cf_ada_compiler" >&6
15932 cf_ada_package=terminal_interface
15934 echo "$as_me:15934: checking for ada-include" >&5
15935 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
15937 # Check whether --with-ada-include or --without-ada-include was given.
15938 if test "${with_ada_include+set}" = set; then
15939 withval="$with_ada_include"
15942 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
15943 fi; if test -n "$prefix/share/ada/adainclude" ; then
15945 if test "x$prefix" != xNONE; then
15946 cf_path_syntax="$prefix"
15948 cf_path_syntax="$ac_default_prefix"
15951 case ".$withval" in
15952 (.\$\(*\)*|.\'*\'*)
15956 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
15958 (.\${*prefix}*|.\${*dir}*)
15959 eval withval="$withval"
15960 case ".$withval" in
15962 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15967 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
15970 { { echo "$as_me:15970: error: expected a pathname, not \"$withval\"" >&5
15971 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
15972 { (exit 1); exit 1; }; }
15977 eval ADA_INCLUDE="$withval"
15979 echo "$as_me:15979: result: $ADA_INCLUDE" >&5
15980 echo "${ECHO_T}$ADA_INCLUDE" >&6
15982 echo "$as_me:15982: checking for ada-objects" >&5
15983 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
15985 # Check whether --with-ada-objects or --without-ada-objects was given.
15986 if test "${with_ada_objects+set}" = set; then
15987 withval="$with_ada_objects"
15990 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
15991 fi; if test -n "$prefix/lib/ada/adalib" ; then
15993 if test "x$prefix" != xNONE; then
15994 cf_path_syntax="$prefix"
15996 cf_path_syntax="$ac_default_prefix"
15999 case ".$withval" in
16000 (.\$\(*\)*|.\'*\'*)
16004 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
16006 (.\${*prefix}*|.\${*dir}*)
16007 eval withval="$withval"
16008 case ".$withval" in
16010 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16015 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16018 { { echo "$as_me:16018: error: expected a pathname, not \"$withval\"" >&5
16019 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16020 { (exit 1); exit 1; }; }
16025 eval ADA_OBJECTS="$withval"
16027 echo "$as_me:16027: result: $ADA_OBJECTS" >&5
16028 echo "${ECHO_T}$ADA_OBJECTS" >&6
16030 echo "$as_me:16030: checking if an Ada95 shared-library should be built" >&5
16031 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
16033 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
16034 if test "${with_ada_sharedlib+set}" = set; then
16035 withval="$with_ada_sharedlib"
16036 with_ada_sharedlib=$withval
16038 with_ada_sharedlib=no
16040 echo "$as_me:16040: result: $with_ada_sharedlib" >&5
16041 echo "${ECHO_T}$with_ada_sharedlib" >&6
16043 if test "x$with_ada_sharedlib" != xno
16045 if test "x$cf_gnat_projects" != xyes
16047 { echo "$as_me:16047: WARNING: disabling shared-library since GNAT projects are not supported" >&5
16048 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
16049 with_ada_sharedlib=no
16053 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
16054 MAKE_ADA_SHAREDLIB="#"
16056 if test "x$with_ada_sharedlib" != xno
16058 MAKE_ADA_SHAREDLIB=
16059 if test "x$with_ada_sharedlib" != xyes
16061 ADA_SHAREDLIB="$with_ada_sharedlib"
16066 { { echo "$as_me:16066: error: No usable Ada compiler found" >&5
16067 echo "$as_me: error: No usable Ada compiler found" >&2;}
16068 { (exit 1); exit 1; }; }
16071 { { echo "$as_me:16071: error: The Ada compiler is needed for this package" >&5
16072 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
16073 { (exit 1); exit 1; }; }
16076 ################################################################################
16083 ### Construct the list of include-directories to be generated
16085 if test "$srcdir" != "."; then
16086 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16088 CPPFLAGS="-I../include $CPPFLAGS"
16089 if test "$srcdir" != "."; then
16090 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
16092 CPPFLAGS="-I. $CPPFLAGS"
16094 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
16095 if test "$srcdir" != "."; then
16096 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16098 if test "$GCC" != yes; then
16099 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16100 elif test "$includedir" != "/usr/include"; then
16101 if test "$includedir" = '${prefix}/include' ; then
16102 if test x$prefix != x/usr ; then
16103 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16106 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16110 ### Build up pieces for makefile rules
16111 echo "$as_me:16111: checking default library suffix" >&5
16112 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16114 case $DFT_LWR_MODEL in
16115 (libtool) DFT_ARG_SUFFIX='' ;;
16116 (normal) DFT_ARG_SUFFIX='' ;;
16117 (debug) DFT_ARG_SUFFIX='_g' ;;
16118 (profile) DFT_ARG_SUFFIX='_p' ;;
16119 (shared) DFT_ARG_SUFFIX='' ;;
16121 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16122 echo "$as_me:16122: result: $DFT_ARG_SUFFIX" >&5
16123 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16125 echo "$as_me:16125: checking default library-dependency suffix" >&5
16126 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16128 case X$DFT_LWR_MODEL in
16130 DFT_LIB_SUFFIX='.la'
16131 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16134 DFT_LIB_SUFFIX='_g.a'
16135 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16138 DFT_LIB_SUFFIX='_p.a'
16139 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16142 case $cf_cv_system_name in
16144 DFT_LIB_SUFFIX='.so'
16145 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16147 (cygwin*|msys*|mingw*)
16148 DFT_LIB_SUFFIX='.dll'
16149 DFT_DEP_SUFFIX='.dll.a'
16152 DFT_LIB_SUFFIX='.dylib'
16153 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16158 DFT_LIB_SUFFIX='.so'
16159 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16162 DFT_LIB_SUFFIX='.sl'
16163 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16168 DFT_LIB_SUFFIX='.so'
16169 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16174 DFT_LIB_SUFFIX='.a'
16175 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16178 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
16180 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
16181 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
16183 echo "$as_me:16183: result: $DFT_DEP_SUFFIX" >&5
16184 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16186 echo "$as_me:16186: checking default object directory" >&5
16187 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16189 case $DFT_LWR_MODEL in
16190 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
16191 (normal) DFT_OBJ_SUBDIR='objects' ;;
16192 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
16193 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
16195 case $cf_cv_system_name in
16197 DFT_OBJ_SUBDIR='objects' ;;
16199 DFT_OBJ_SUBDIR='obj_s' ;;
16202 echo "$as_me:16202: result: $DFT_OBJ_SUBDIR" >&5
16203 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16205 ### Set up low-level terminfo dependencies for makefiles.
16207 if test "$DFT_LWR_MODEL" = shared ; then
16208 case $cf_cv_system_name in
16210 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16213 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
16218 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
16220 ### Construct the list of subdirectories for which we'll customize makefiles
16221 ### with the appropriate compile-rules.
16223 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
16225 cat >>confdefs.h <<EOF
16226 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
16229 ### Now that we're done running tests, add the compiler-warnings, if any
16234 cf_new_extra_cppflags=
16236 for cf_add_cflags in $EXTRA_CFLAGS
16238 case $cf_fix_cppflags in
16240 case $cf_add_cflags in
16241 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16242 case $cf_add_cflags in
16244 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16246 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16247 && test -z "${cf_tst_cflags}" \
16248 && cf_fix_cppflags=yes
16250 if test $cf_fix_cppflags = yes ; then
16252 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16253 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16256 elif test "${cf_tst_cflags}" = "\"'" ; then
16258 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16259 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16265 case "$CPPFLAGS" in
16269 case $cf_add_cflags in
16271 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16273 CPPFLAGS=`echo "$CPPFLAGS" | \
16274 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16275 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16280 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16281 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16288 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16289 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16299 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16301 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16302 && test -z "${cf_tst_cflags}" \
16303 && cf_fix_cppflags=no
16308 if test -n "$cf_new_cflags" ; then
16310 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16311 CFLAGS="${CFLAGS}$cf_new_cflags"
16315 if test -n "$cf_new_cppflags" ; then
16317 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16318 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16322 if test -n "$cf_new_extra_cppflags" ; then
16324 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16325 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16329 ################################################################################
16335 NCURSES_SHLIB2="sh -c"
16337 ADA_SUBDIRS="include gen src doc"
16338 if test "x$cf_with_tests" != "xno" ; then
16339 ADA_SUBDIRS="$ADA_SUBDIRS samples"
16341 for cf_dir in $ADA_SUBDIRS
16343 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16350 # match layout used by make-tar.sh
16351 ADAHTML_DIR=../doc/ada
16353 if test "x$cross_compiling" = xyes ; then
16354 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
16356 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
16359 ac_config_files="$ac_config_files $SUB_MAKEFILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
16360 ac_config_commands="$ac_config_commands default"
16361 cat >confcache <<\_ACEOF
16362 # This file is a shell script that caches the results of configure
16363 # tests run on this system so they can be shared between configure
16364 # scripts and configure runs, see configure's option --config-cache.
16365 # It is not useful on other systems. If it contains results you don't
16366 # want to keep, you may remove or edit it.
16368 # config.status only pays attention to the cache file if you give it
16369 # the --recheck option to rerun configure.
16371 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16372 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16373 # following values.
16377 # The following way of writing the cache mishandles newlines in values,
16378 # but we know of no workaround that is simple, portable, and efficient.
16379 # So, don't put newlines in cache variables' values.
16380 # Ultrix sh set writes to stderr and can't be redirected directly,
16381 # and sets the high bit in the cache file unless we assign to the vars.
16384 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16386 # `set' does not quote correctly, so add quotes (double-quote
16387 # substitution turns \\\\ into \\, and sed turns \\ into \).
16390 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16393 # `set' quotes correctly as required by POSIX, so do not add quotes.
16395 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16402 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16404 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16406 if cmp -s $cache_file confcache; then :; else
16407 if test -w $cache_file; then
16408 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16409 cat confcache >$cache_file
16411 echo "not updating unwritable cache $cache_file"
16416 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16417 # Let make expand exec_prefix.
16418 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16420 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16421 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16422 # trailing colons and then remove the whole line if VPATH becomes empty
16423 # (actually we leave an empty line to preserve line numbers).
16424 if test "x$srcdir" = x.; then
16425 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16426 s/:*\$(srcdir):*/:/;
16427 s/:*\${srcdir}:*/:/;
16429 s/^\([^=]*=[ ]*\):*/\1/;
16435 DEFS=-DHAVE_CONFIG_H
16437 : ${CONFIG_STATUS=./config.status}
16438 ac_clean_files_save=$ac_clean_files
16439 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16440 { echo "$as_me:16440: creating $CONFIG_STATUS" >&5
16441 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16442 cat >$CONFIG_STATUS <<_ACEOF
16444 # Generated automatically by configure.
16445 # Run this file to recreate the current configuration.
16446 # Compiler output produced by configure, useful for debugging
16447 # configure, is in config.log if it exists.
16450 SHELL=\${CONFIG_SHELL-$SHELL}
16451 ac_cs_invocation="\$0 \$@"
16455 cat >>$CONFIG_STATUS <<\_ACEOF
16456 # Be Bourne compatible
16457 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16460 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16464 # Name of the executable.
16465 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16467 if expr a : '\(a\)' >/dev/null 2>&1; then
16473 rm -f conf$$ conf$$.exe conf$$.file
16475 if ln -s conf$$.file conf$$ 2>/dev/null; then
16476 # We could just check for DJGPP; but this test a) works b) is more generic
16477 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16478 if test -f conf$$.exe; then
16479 # Don't use ln at all; we don't have any links
16484 elif ln conf$$.file conf$$ 2>/dev/null; then
16489 rm -f conf$$ conf$$.exe conf$$.file
16491 as_executable_p="test -f"
16493 # Support unset when possible.
16494 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16501 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16502 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16503 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16504 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16505 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16506 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16507 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16508 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16511 # We need space, tab and new line, in precisely that order.
16517 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16523 # Files that config.status was made for.
16524 if test -n "$ac_config_files"; then
16525 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16528 if test -n "$ac_config_headers"; then
16529 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16532 if test -n "$ac_config_links"; then
16533 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16536 if test -n "$ac_config_commands"; then
16537 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16540 cat >>$CONFIG_STATUS <<\EOF
16543 \`$as_me' instantiates files from templates according to the
16544 current configuration.
16546 Usage: $0 [OPTIONS] [FILE]...
16548 -h, --help print this help, then exit
16549 -V, --version print version number, then exit
16550 -d, --debug don't remove temporary files
16551 --recheck update $as_me by reconfiguring in the same conditions
16552 --file=FILE[:TEMPLATE]
16553 instantiate the configuration file FILE
16554 --header=FILE[:TEMPLATE]
16555 instantiate the configuration header FILE
16557 Configuration files:
16560 Configuration headers:
16563 Configuration commands:
16566 Report bugs to <dickey@invisible-island.net>."
16569 cat >>$CONFIG_STATUS <<EOF
16572 configured by $0, generated by GNU Autoconf 2.52.20170501,
16573 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16575 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16576 Free Software Foundation, Inc.
16577 This config.status script is free software; the Free Software Foundation
16578 gives unlimited permission to copy, distribute and modify it."
16583 cat >>$CONFIG_STATUS <<\EOF
16584 # If no file are specified by the user, then we need to provide default
16585 # value. By we need to know if files were specified by the user.
16591 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16592 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16594 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16598 *) # This is not an option, so the user has probably given explicit
16600 ac_need_defaults=false;;
16604 # Handling of the options.
16606 cat >>$CONFIG_STATUS <<EOF
16607 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16608 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16609 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16611 cat >>$CONFIG_STATUS <<\EOF
16612 --version | --vers* | -V )
16613 echo "$ac_cs_version"; exit 0 ;;
16615 # Conflict between --help and --header
16616 { { echo "$as_me:16616: error: ambiguous option: $1
16617 Try \`$0 --help' for more information." >&5
16618 echo "$as_me: error: ambiguous option: $1
16619 Try \`$0 --help' for more information." >&2;}
16620 { (exit 1); exit 1; }; };;
16621 --help | --hel | -h )
16622 echo "$ac_cs_usage"; exit 0 ;;
16623 --debug | --d* | -d )
16625 --file | --fil | --fi | --f )
16627 CONFIG_FILES="$CONFIG_FILES $1"
16628 ac_need_defaults=false;;
16629 --header | --heade | --head | --hea )
16631 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16632 ac_need_defaults=false;;
16634 # This is an error.
16635 -*) { { echo "$as_me:16635: error: unrecognized option: $1
16636 Try \`$0 --help' for more information." >&5
16637 echo "$as_me: error: unrecognized option: $1
16638 Try \`$0 --help' for more information." >&2;}
16639 { (exit 1); exit 1; }; } ;;
16641 *) ac_config_targets="$ac_config_targets $1" ;;
16650 ## ----------------------- ##
16651 ## Running config.status. ##
16652 ## ----------------------- ##
16654 This file was extended by $as_me 2.52.20170501, executed with
16655 CONFIG_FILES = $CONFIG_FILES
16656 CONFIG_HEADERS = $CONFIG_HEADERS
16657 CONFIG_LINKS = $CONFIG_LINKS
16658 CONFIG_COMMANDS = $CONFIG_COMMANDS
16659 > $ac_cs_invocation
16660 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16665 cat >>$CONFIG_STATUS <<EOF
16667 # INIT-COMMANDS section.
16670 ### Special initialization commands, used to pass information from the
16671 ### configuration-run into config.status
16674 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
16675 DFT_LWR_MODEL="$DFT_LWR_MODEL"
16676 LIB_NAME="$LIB_NAME"
16677 LIB_PREFIX="$LIB_PREFIX"
16678 LIB_SUFFIX="$LIB_SUFFIX"
16680 NCURSES_MAJOR="$NCURSES_MAJOR"
16681 NCURSES_MINOR="$NCURSES_MINOR"
16682 NCURSES_PATCH="$NCURSES_PATCH"
16683 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
16684 cf_cv_abi_version="$cf_cv_abi_version"
16685 cf_cv_rel_version="$cf_cv_rel_version"
16686 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
16687 cf_cv_shared_soname='$cf_cv_shared_soname'
16688 cf_cv_shlib_version="$cf_cv_shlib_version"
16689 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
16690 cf_cv_system_name="$cf_cv_system_name"
16696 cat >>$CONFIG_STATUS <<\EOF
16697 for ac_config_target in $ac_config_targets
16699 case "$ac_config_target" in
16700 # Handling of arguments.
16701 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
16702 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
16703 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16704 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16705 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
16706 *) { { echo "$as_me:16706: error: invalid argument: $ac_config_target" >&5
16707 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16708 { (exit 1); exit 1; }; };;
16712 # If the user did not use the arguments to specify the items to instantiate,
16713 # then the envvar interface is used. Set only those that are not.
16714 # We use the long form for the default assignment because of an extremely
16715 # bizarre bug on SunOS 4.1.3.
16716 if $ac_need_defaults; then
16717 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16718 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16719 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16722 # Create a temporary directory, and hook for its removal unless debugging.
16725 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16726 trap '{ (exit 1); exit 1; }' 1 2 13 15
16729 # Create a (secure) tmp directory for tmp files.
16732 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16733 test -n "$tmp" && test -d "$tmp"
16736 tmp=$TMPDIR/cs$$-$RANDOM
16737 (umask 077 && mkdir $tmp)
16740 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16741 { (exit 1); exit 1; }
16746 cat >>$CONFIG_STATUS <<EOF
16749 # CONFIG_FILES section.
16752 # No need to generate the scripts if there are no CONFIG_FILES.
16753 # This happens for instance when ./config.status config.h
16754 if test -n "\$CONFIG_FILES"; then
16755 # Protect against being on the right side of a sed subst in config.status.
16756 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16757 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16758 s,@SHELL@,$SHELL,;t t
16759 s,@exec_prefix@,$exec_prefix,;t t
16760 s,@prefix@,$prefix,;t t
16761 s,@program_transform_name@,$program_transform_name,;t t
16762 s,@bindir@,$bindir,;t t
16763 s,@sbindir@,$sbindir,;t t
16764 s,@libexecdir@,$libexecdir,;t t
16765 s,@datarootdir@,$datarootdir,;t t
16766 s,@datadir@,$datadir,;t t
16767 s,@sysconfdir@,$sysconfdir,;t t
16768 s,@sharedstatedir@,$sharedstatedir,;t t
16769 s,@localstatedir@,$localstatedir,;t t
16770 s,@libdir@,$libdir,;t t
16771 s,@includedir@,$includedir,;t t
16772 s,@oldincludedir@,$oldincludedir,;t t
16773 s,@infodir@,$infodir,;t t
16774 s,@mandir@,$mandir,;t t
16775 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16776 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16777 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16778 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16779 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16780 s,@build_alias@,$build_alias,;t t
16781 s,@host_alias@,$host_alias,;t t
16782 s,@target_alias@,$target_alias,;t t
16783 s,@ECHO_C@,$ECHO_C,;t t
16784 s,@ECHO_N@,$ECHO_N,;t t
16785 s,@ECHO_T@,$ECHO_T,;t t
16786 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16787 s,@DEFS@,$DEFS,;t t
16788 s,@LIBS@,$LIBS,;t t
16789 s,@top_builddir@,$top_builddir,;t t
16790 s,@build@,$build,;t t
16791 s,@build_cpu@,$build_cpu,;t t
16792 s,@build_vendor@,$build_vendor,;t t
16793 s,@build_os@,$build_os,;t t
16794 s,@host@,$host,;t t
16795 s,@host_cpu@,$host_cpu,;t t
16796 s,@host_vendor@,$host_vendor,;t t
16797 s,@host_os@,$host_os,;t t
16798 s,@target@,$target,;t t
16799 s,@target_cpu@,$target_cpu,;t t
16800 s,@target_vendor@,$target_vendor,;t t
16801 s,@target_os@,$target_os,;t t
16803 s,@CFLAGS@,$CFLAGS,;t t
16804 s,@LDFLAGS@,$LDFLAGS,;t t
16805 s,@CPPFLAGS@,$CPPFLAGS,;t t
16806 s,@ac_ct_CC@,$ac_ct_CC,;t t
16807 s,@EXEEXT@,$EXEEXT,;t t
16808 s,@OBJEXT@,$OBJEXT,;t t
16809 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16812 s,@EGREP@,$EGREP,;t t
16813 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16814 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16815 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16816 s,@LN_S@,$LN_S,;t t
16817 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
16818 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
16819 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16820 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16821 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
16822 s,@SET_MAKE@,$SET_MAKE,;t t
16823 s,@CTAGS@,$CTAGS,;t t
16824 s,@ETAGS@,$ETAGS,;t t
16825 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16826 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16827 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
16828 s,@RANLIB@,$RANLIB,;t t
16829 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
16831 s,@ac_ct_LD@,$ac_ct_LD,;t t
16833 s,@ac_ct_AR@,$ac_ct_AR,;t t
16834 s,@ARFLAGS@,$ARFLAGS,;t t
16835 s,@DESTDIR@,$DESTDIR,;t t
16836 s,@BUILD_CC@,$BUILD_CC,;t t
16837 s,@BUILD_CPP@,$BUILD_CPP,;t t
16838 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
16839 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
16840 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
16841 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
16842 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
16843 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
16844 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16845 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16846 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16847 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16848 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
16849 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
16850 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
16851 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16852 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16853 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
16854 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
16855 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
16856 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16857 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16858 s,@CC_G_OPT@,$CC_G_OPT,;t t
16859 s,@LD_MODEL@,$LD_MODEL,;t t
16860 s,@shlibdir@,$shlibdir,;t t
16861 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
16862 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16863 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
16864 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16865 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16866 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
16867 s,@LINK_PROGS@,$LINK_PROGS,;t t
16868 s,@LINK_TESTS@,$LINK_TESTS,;t t
16869 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16870 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16871 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16872 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16873 s,@RPATH_LIST@,$RPATH_LIST,;t t
16874 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16875 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16876 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16877 s,@PTHREAD@,$PTHREAD,;t t
16878 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
16879 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16880 s,@ECHO_LT@,$ECHO_LT,;t t
16881 s,@ECHO_LD@,$ECHO_LD,;t t
16882 s,@RULE_CC@,$RULE_CC,;t t
16883 s,@SHOW_CC@,$SHOW_CC,;t t
16884 s,@ECHO_CC@,$ECHO_CC,;t t
16885 s,@ADAFLAGS@,$ADAFLAGS,;t t
16886 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16887 s,@ADA_TRACE@,$ADA_TRACE,;t t
16888 s,@gnatmake_exists@,$gnatmake_exists,;t t
16889 s,@gprconfig_exists@,$gprconfig_exists,;t t
16890 s,@M4_exists@,$M4_exists,;t t
16891 s,@cf_ada_make@,$cf_ada_make,;t t
16892 s,@cf_ada_config@,$cf_ada_config,;t t
16893 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
16894 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
16895 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
16896 s,@cf_compile_generics@,$cf_compile_generics,;t t
16897 s,@cf_generic_objects@,$cf_generic_objects,;t t
16898 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
16899 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
16900 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
16901 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
16902 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16903 s,@cf_ada_package@,$cf_ada_package,;t t
16904 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16905 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16906 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
16907 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
16908 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
16909 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16910 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16911 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16912 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16913 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16914 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
16915 s,@TEST_ARG2@,$TEST_ARG2,;t t
16916 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
16917 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
16918 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16919 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16920 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
16921 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
16922 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
16927 cat >>$CONFIG_STATUS <<\EOF
16928 # Split the substitutions into bite-sized pieces for seds with
16929 # small command number limits, like on Digital OSF/1 and HP-UX.
16930 ac_max_sed_lines=48
16931 ac_sed_frag=1 # Number of current file.
16932 ac_beg=1 # First line for current file.
16933 ac_end=$ac_max_sed_lines # Line after last line for current file.
16936 while $ac_more_lines; do
16937 if test $ac_beg -gt 1; then
16938 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16940 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16942 if test ! -s $tmp/subs.frag; then
16943 ac_more_lines=false
16945 # The purpose of the label and of the branching condition is to
16946 # speed up the sed processing (if there are no `@' at all, there
16947 # is no need to browse any of the substitutions).
16948 # These are the two extra sed commands mentioned above.
16950 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16951 # It is possible to make a multiline substitution using escaped newlines.
16952 # Ensure that we do not split the substitution between script fragments.
16954 ac_END=`expr $ac_end + $ac_max_sed_lines`
16955 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
16956 if test -s $tmp/subs.next; then
16957 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
16958 if test ! -s $tmp/subs.edit; then
16959 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
16960 if test ! -s $tmp/subs.edit; then
16961 if test $ac_beg -gt 1; then
16962 ac_end=`expr $ac_end - 1`
16969 if test -z "$ac_sed_cmds"; then
16970 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16972 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16974 ac_sed_frag=`expr $ac_sed_frag + 1`
16976 ac_end=`expr $ac_end + $ac_max_sed_lines`
16979 if test -z "$ac_sed_cmds"; then
16982 fi # test -n "$CONFIG_FILES"
16985 cat >>$CONFIG_STATUS <<\EOF
16986 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16987 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16989 - | *:- | *:-:* ) # input from stdin
16991 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16992 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16993 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16994 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16995 * ) ac_file_in=$ac_file.in ;;
16998 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16999 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17000 X"$ac_file" : 'X\(//\)[^/]' \| \
17001 X"$ac_file" : 'X\(//\)$' \| \
17002 X"$ac_file" : 'X\(/\)' \| \
17003 . : '\(.\)' 2>/dev/null ||
17005 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17006 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17007 /^X\(\/\/\)$/{ s//\1/; q; }
17008 /^X\(\/\).*/{ s//\1/; q; }
17010 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17011 { case "$ac_dir" in
17012 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17016 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17017 case $as_mkdir_dir in
17018 # Skip DOS drivespec
17019 ?:) as_incr_dir=$as_mkdir_dir ;;
17021 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17022 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17027 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17028 # A "../" for each directory in $ac_dir_suffix.
17029 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17031 ac_dir_suffix= ac_dots=
17036 if test -z "$ac_dots"; then
17039 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17041 [\\/]* | ?:[\\/]* )
17042 ac_srcdir=$srcdir$ac_dir_suffix;
17043 ac_top_srcdir=$srcdir ;;
17044 *) # Relative path.
17045 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17046 ac_top_srcdir=$ac_dots$srcdir ;;
17050 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17051 *) ac_INSTALL=$ac_dots$INSTALL ;;
17054 if test x"$ac_file" != x-; then
17055 { echo "$as_me:17055: creating $ac_file" >&5
17056 echo "$as_me: creating $ac_file" >&6;}
17059 # Let's still pretend it is `configure' which instantiates (i.e., don't
17060 # use $as_me), people would be surprised to read:
17061 # /* config.h. Generated automatically by config.status. */
17062 configure_input="Generated automatically from `echo $ac_file_in |
17063 sed 's,.*/,,'` by configure."
17065 # First look for the input files in the build tree, otherwise in the
17067 ac_file_inputs=`IFS=:
17068 for f in $ac_file_in; do
17070 -) echo $tmp/stdin ;;
17072 # Absolute (can't be DOS-style, as IFS=:)
17073 test -f "$f" || { { echo "$as_me:17073: error: cannot find input file: $f" >&5
17074 echo "$as_me: error: cannot find input file: $f" >&2;}
17075 { (exit 1); exit 1; }; }
17078 if test -f "$f"; then
17081 elif test -f "$srcdir/$f"; then
17086 { { echo "$as_me:17086: error: cannot find input file: $f" >&5
17087 echo "$as_me: error: cannot find input file: $f" >&2;}
17088 { (exit 1); exit 1; }; }
17091 done` || { (exit 1); exit 1; }
17093 cat >>$CONFIG_STATUS <<\EOF
17094 ac_warn_datarootdir=no
17095 if test x"$ac_file" != x-; then
17096 for ac_item in $ac_file_inputs
17098 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
17099 if test -n "$ac_seen"; then
17100 ac_used=`grep '@datarootdir@' $ac_item`
17101 if test -z "$ac_used"; then
17102 { echo "$as_me:17102: WARNING: datarootdir was used implicitly but not set:
17104 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
17106 ac_warn_datarootdir=yes
17109 ac_seen=`grep '${datarootdir}' $ac_item`
17110 if test -n "$ac_seen"; then
17111 { echo "$as_me:17111: WARNING: datarootdir was used explicitly but not set:
17113 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
17115 ac_warn_datarootdir=yes
17120 if test "x$ac_warn_datarootdir" = xyes; then
17121 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
17125 cat >>$CONFIG_STATUS <<EOF
17129 cat >>$CONFIG_STATUS <<\EOF
17131 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17132 s,@configure_input@,$configure_input,;t t
17133 s,@srcdir@,$ac_srcdir,;t t
17134 s,@top_srcdir@,$ac_top_srcdir,;t t
17135 s,@INSTALL@,$ac_INSTALL,;t t
17136 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17138 if test x"$ac_file" != x-; then
17139 cp $tmp/out $ac_file
17141 for ac_name in prefix exec_prefix datarootdir
17143 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
17144 if test -n "$ac_seen"; then
17145 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
17146 if test -z "$ac_init"; then
17147 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
17148 { echo "$as_me:17148: WARNING: Variable $ac_name is used but was not set:
17150 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
17155 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
17156 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
17157 if test -s $tmp/out; then
17158 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
17159 { echo "$as_me:17159: WARNING: Some variables may not be substituted:
17161 echo "$as_me: WARNING: Some variables may not be substituted:
17171 cat >>$CONFIG_STATUS <<\EOF
17174 # CONFIG_HEADER section.
17177 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17178 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17180 # ac_d sets the value in "#define NAME VALUE" lines.
17181 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17182 ac_dB='[ ].*$,\1#\2'
17185 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17186 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17187 ac_iB='\([ ]\),\1#\2define\3'
17190 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17191 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17192 ac_uB='$,\1#\2define\3'
17196 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17197 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17199 - | *:- | *:-:* ) # input from stdin
17201 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17202 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17203 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17204 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17205 * ) ac_file_in=$ac_file.in ;;
17208 test x"$ac_file" != x- && { echo "$as_me:17208: creating $ac_file" >&5
17209 echo "$as_me: creating $ac_file" >&6;}
17211 # First look for the input files in the build tree, otherwise in the
17213 ac_file_inputs=`IFS=:
17214 for f in $ac_file_in; do
17216 -) echo $tmp/stdin ;;
17218 # Absolute (can't be DOS-style, as IFS=:)
17219 test -f "$f" || { { echo "$as_me:17219: error: cannot find input file: $f" >&5
17220 echo "$as_me: error: cannot find input file: $f" >&2;}
17221 { (exit 1); exit 1; }; }
17224 if test -f "$f"; then
17227 elif test -f "$srcdir/$f"; then
17232 { { echo "$as_me:17232: error: cannot find input file: $f" >&5
17233 echo "$as_me: error: cannot find input file: $f" >&2;}
17234 { (exit 1); exit 1; }; }
17237 done` || { (exit 1); exit 1; }
17238 # Remove the trailing spaces.
17239 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17243 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17244 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17245 # be either 'cat' or 'sort'.
17246 cat confdefs.h | uniq >conftest.vals
17248 # Break up conftest.vals because some shells have a limit on
17249 # the size of here documents, and old seds have small limits too.
17251 rm -f conftest.tail
17252 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17253 while grep . conftest.vals >/dev/null
17255 # Write chunks of a limited-size here document to conftest.frag.
17256 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17257 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17258 echo 'CEOF' >> $CONFIG_STATUS
17259 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17260 rm -f conftest.vals
17261 mv conftest.tail conftest.vals
17263 rm -f conftest.vals
17265 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17267 echo ' cat >> conftest.edit <<CEOF
17268 /@DEFS@/r conftest.frag
17271 sed -f conftest.edit $tmp/in > $tmp/out
17273 mv $tmp/out $tmp/in
17274 rm -f conftest.edit conftest.frag
17275 ' >> $CONFIG_STATUS
17277 cat >>$CONFIG_STATUS <<\EOF
17278 # Let's still pretend it is `configure' which instantiates (i.e., don't
17279 # use $as_me), people would be surprised to read:
17280 # /* config.h. Generated automatically by config.status. */
17281 if test x"$ac_file" = x-; then
17282 echo "/* Generated automatically by configure. */" >$tmp/config.h
17284 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17286 cat $tmp/in >>$tmp/config.h
17288 if test x"$ac_file" != x-; then
17289 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17290 { echo "$as_me:17290: $ac_file is unchanged" >&5
17291 echo "$as_me: $ac_file is unchanged" >&6;}
17293 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17294 X"$ac_file" : 'X\(//\)[^/]' \| \
17295 X"$ac_file" : 'X\(//\)$' \| \
17296 X"$ac_file" : 'X\(/\)' \| \
17297 . : '\(.\)' 2>/dev/null ||
17299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17300 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17301 /^X\(\/\/\)$/{ s//\1/; q; }
17302 /^X\(\/\).*/{ s//\1/; q; }
17304 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17305 { case "$ac_dir" in
17306 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17310 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17311 case $as_mkdir_dir in
17312 # Skip DOS drivespec
17313 ?:) as_incr_dir=$as_mkdir_dir ;;
17315 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17316 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17323 mv $tmp/config.h $ac_file
17327 rm -f $tmp/config.h
17331 cat >>$CONFIG_STATUS <<\EOF
17333 # CONFIG_COMMANDS section.
17335 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17336 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17337 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17341 if test -z "$USE_OLD_MAKERULES" ; then
17342 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
17349 cat >>$CONFIG_STATUS <<\EOF
17351 { (exit 0); exit 0; }
17353 chmod +x $CONFIG_STATUS
17354 ac_clean_files=$ac_clean_files_save
17356 # configure is writing to config.log, and then calls config.status.
17357 # config.status does its own redirection, appending to config.log.
17358 # Unfortunately, on DOS this fails, as config.log is still kept open
17359 # by configure, so config.status won't be able to write to it; its
17360 # output is simply discarded. So we exec the FD to /dev/null,
17361 # effectively closing config.log, so it can be properly (re)opened and
17362 # appended to by config.status. When coming back to configure, we
17363 # need to make the FD available again.
17364 if test "$no_create" != yes; then
17367 $SHELL $CONFIG_STATUS || ac_cs_success=false
17369 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17370 # would make configure fail if this is the last instruction.
17371 $ac_cs_success || { (exit 1); exit 1; }
17373 ${MAKE:-make} preinstall