2 # From configure.in Revision: 1.78 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
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 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
186 # Identity of this package.
196 # If the previous option needs an argument, assign it.
197 if test -n "$ac_prev"; then
198 eval "$ac_prev=\$ac_option"
203 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205 # Accept the important Cygnus configure options, so we can diagnose typos.
209 -bindir | --bindir | --bindi | --bind | --bin | --bi)
211 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214 -build | --build | --buil | --bui | --bu)
215 ac_prev=build_alias ;;
216 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217 build_alias=$ac_optarg ;;
219 -cache-file | --cache-file | --cache-fil | --cache-fi \
220 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221 ac_prev=cache_file ;;
222 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224 cache_file=$ac_optarg ;;
227 cache_file=config.cache ;;
229 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233 datadir=$ac_optarg ;;
235 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236 | --dataroo | --dataro | --datar)
237 ac_prev=datarootdir ;;
238 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240 datarootdir=$ac_optarg ;;
242 -disable-* | --disable-*)
243 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244 # Reject names that are not valid shell variable names.
245 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247 { (exit 1); exit 1; }; }
248 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249 eval "enable_$ac_feature=no" ;;
251 -enable-* | --enable-*)
252 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253 # Reject names that are not valid shell variable names.
254 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256 { (exit 1); exit 1; }; }
257 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
259 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262 eval "enable_$ac_feature='$ac_optarg'" ;;
264 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266 | --exec | --exe | --ex)
267 ac_prev=exec_prefix ;;
268 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270 | --exec=* | --exe=* | --ex=*)
271 exec_prefix=$ac_optarg ;;
273 -gas | --gas | --ga | --g)
274 # Obsolete; use --with-gas.
277 -help | --help | --hel | --he | -h)
279 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280 ac_init_help=recursive ;;
281 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282 ac_init_help=short ;;
284 -host | --host | --hos | --ho)
285 ac_prev=host_alias ;;
286 -host=* | --host=* | --hos=* | --ho=*)
287 host_alias=$ac_optarg ;;
289 -includedir | --includedir | --includedi | --included | --include \
290 | --includ | --inclu | --incl | --inc)
291 ac_prev=includedir ;;
292 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293 | --includ=* | --inclu=* | --incl=* | --inc=*)
294 includedir=$ac_optarg ;;
296 -infodir | --infodir | --infodi | --infod | --info | --inf)
298 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299 infodir=$ac_optarg ;;
301 -libdir | --libdir | --libdi | --libd)
303 -libdir=* | --libdir=* | --libdi=* | --libd=*)
306 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307 | --libexe | --libex | --libe)
308 ac_prev=libexecdir ;;
309 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310 | --libexe=* | --libex=* | --libe=*)
311 libexecdir=$ac_optarg ;;
313 -localstatedir | --localstatedir | --localstatedi | --localstated \
314 | --localstate | --localstat | --localsta | --localst \
315 | --locals | --local | --loca | --loc | --lo)
316 ac_prev=localstatedir ;;
317 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320 localstatedir=$ac_optarg ;;
322 -runstatedir | --runstatedir | --runstatedi | --runstated \
323 | --runstate | --runstat | --runsta | --runst \
324 | --runs | --run | --ru)
325 ac_prev=runstatedir ;;
326 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328 | --runs=* | --run=* | --ru=*)
329 runstatedir=$ac_optarg ;;
331 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337 # Obsolete; use --without-fp.
340 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350 | --oldin | --oldi | --old | --ol | --o)
351 ac_prev=oldincludedir ;;
352 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355 oldincludedir=$ac_optarg ;;
357 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362 -program-prefix | --program-prefix | --program-prefi | --program-pref \
363 | --program-pre | --program-pr | --program-p)
364 ac_prev=program_prefix ;;
365 -program-prefix=* | --program-prefix=* | --program-prefi=* \
366 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367 program_prefix=$ac_optarg ;;
369 -program-suffix | --program-suffix | --program-suffi | --program-suff \
370 | --program-suf | --program-su | --program-s)
371 ac_prev=program_suffix ;;
372 -program-suffix=* | --program-suffix=* | --program-suffi=* \
373 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374 program_suffix=$ac_optarg ;;
376 -program-transform-name | --program-transform-name \
377 | --program-transform-nam | --program-transform-na \
378 | --program-transform-n | --program-transform- \
379 | --program-transform | --program-transfor \
380 | --program-transfo | --program-transf \
381 | --program-trans | --program-tran \
382 | --progr-tra | --program-tr | --program-t)
383 ac_prev=program_transform_name ;;
384 -program-transform-name=* | --program-transform-name=* \
385 | --program-transform-nam=* | --program-transform-na=* \
386 | --program-transform-n=* | --program-transform-=* \
387 | --program-transform=* | --program-transfor=* \
388 | --program-transfo=* | --program-transf=* \
389 | --program-trans=* | --program-tran=* \
390 | --progr-tra=* | --program-tr=* | --program-t=*)
391 program_transform_name=$ac_optarg ;;
393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394 | -silent | --silent | --silen | --sile | --sil)
397 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401 sbindir=$ac_optarg ;;
403 -sharedstatedir | --sharedstatedir | --sharedstatedi \
404 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405 | --sharedst | --shareds | --shared | --share | --shar \
407 ac_prev=sharedstatedir ;;
408 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412 sharedstatedir=$ac_optarg ;;
414 -site | --site | --sit)
416 -site=* | --site=* | --sit=*)
419 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425 | --syscon | --sysco | --sysc | --sys | --sy)
426 ac_prev=sysconfdir ;;
427 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429 sysconfdir=$ac_optarg ;;
431 -target | --target | --targe | --targ | --tar | --ta | --t)
432 ac_prev=target_alias ;;
433 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434 target_alias=$ac_optarg ;;
436 -v | -verbose | --verbose | --verbos | --verbo | --verb)
439 -version | --version | --versio | --versi | --vers | -V)
443 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444 # Reject names that are not valid shell variable names.
445 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446 { echo "$as_me: error: invalid package name: $ac_package" >&2
447 { (exit 1); exit 1; }; }
448 ac_package=`echo $ac_package| sed 's/-/_/g'`
450 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453 eval "with_$ac_package='$ac_optarg'" ;;
455 -without-* | --without-*)
456 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457 # Reject names that are not valid shell variable names.
458 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459 { echo "$as_me: error: invalid package name: $ac_package" >&2
460 { (exit 1); exit 1; }; }
461 ac_package=`echo $ac_package | sed 's/-/_/g'`
462 eval "with_$ac_package=no" ;;
465 # Obsolete; use --with-x.
468 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469 | --x-incl | --x-inc | --x-in | --x-i)
470 ac_prev=x_includes ;;
471 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473 x_includes=$ac_optarg ;;
475 -x-libraries | --x-libraries | --x-librarie | --x-librari \
476 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477 ac_prev=x_libraries ;;
478 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480 x_libraries=$ac_optarg ;;
482 -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484 { (exit 1); exit 1; }; }
488 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489 # Reject names that are not valid shell variable names.
490 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492 { (exit 1); exit 1; }; }
493 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494 eval "$ac_envvar='$ac_optarg'"
498 # FIXME: should be removed in autoconf 3.0.
499 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
508 if test -n "$ac_prev"; then
509 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510 { echo "$as_me: error: missing argument to $ac_option" >&2
511 { (exit 1); exit 1; }; }
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
517 eval ac_val=$`echo $ac_var`
519 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521 { (exit 1); exit 1; }; };;
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527 localstatedir libdir includedir oldincludedir infodir mandir
529 eval ac_val=$`echo $ac_var`
531 [\\/$]* | ?:[\\/]* ) ;;
532 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533 { (exit 1); exit 1; }; };;
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545 if test "x$build_alias" = x; then
546 cross_compiling=maybe
547 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548 If a cross compiler is detected then cross compile mode will be used." >&2
549 elif test "x$build_alias" != "x$host_alias"; then
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
557 test "$silent" = yes && exec 6>/dev/null
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561 ac_srcdir_defaulted=yes
562 # Try the directory containing this script, then its parent.
564 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567 if test ! -r $srcdir/$ac_unique_file; then
571 ac_srcdir_defaulted=no
573 if test ! -r $srcdir/$ac_unique_file; then
574 if test "$ac_srcdir_defaulted" = yes; then
575 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576 { (exit 1); exit 1; }; }
578 { echo "$as_me: error: cannot find sources in $srcdir" >&2
579 { (exit 1); exit 1; }; }
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
617 # Report the --help message.
619 if test "$ac_init_help" = "long"; then
620 # Omit some internal or obsolete options to make the list less imposing.
621 # This message is too long to be a string in the A/UX 3.1 sh.
623 \`configure' configures this package to adapt to many kinds of systems.
625 Usage: $0 [OPTION]... [VAR=VALUE]...
627 To assign environment variables (e.g., CC, CFLAGS...), specify them as
628 VAR=VALUE. See below for descriptions of some of the useful variables.
630 Defaults for the options are specified in brackets.
633 -h, --help display this help and exit
634 --help=short display options specific to this package
635 --help=recursive display the short help of all the included packages
636 -V, --version display version information and exit
637 -q, --quiet, --silent do not print \`checking...' messages
638 --cache-file=FILE cache test results in FILE [disabled]
639 -C, --config-cache alias for \`--cache-file=config.cache'
640 -n, --no-create do not create output files
641 --srcdir=DIR find the sources in DIR [configure dir or \`..']
646 Installation directories:
647 --prefix=PREFIX install architecture-independent files in PREFIX
649 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
652 By default, \`make install' will install all the files in
653 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
654 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
655 for instance \`--prefix=\$HOME'.
657 For better control, use the options below.
659 Fine tuning of the installation directories:
660 --bindir=DIR user executables [EPREFIX/bin]
661 --sbindir=DIR system admin executables [EPREFIX/sbin]
662 --libexecdir=DIR program executables [EPREFIX/libexec]
663 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
664 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
665 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
666 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
667 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
668 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
669 --libdir=DIR object code libraries [EPREFIX/lib]
670 --includedir=DIR C header files [PREFIX/include]
671 --oldincludedir=DIR C header files for non-gcc [/usr/include]
672 --infodir=DIR info documentation [DATAROOTDIR/info]
673 --mandir=DIR man documentation [DATAROOTDIR/man]
679 --program-prefix=PREFIX prepend PREFIX to installed program names
680 --program-suffix=SUFFIX append SUFFIX to installed program names
681 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
684 --build=BUILD configure for building on BUILD [guessed]
685 --host=HOST build programs to run on HOST [BUILD]
686 --target=TARGET configure for building compilers for TARGET [HOST]
690 if test -n "$ac_init_help"; then
695 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
696 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
699 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
700 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
703 --with-system-type=XXX test: override derived host system-type
704 --disable-stripping do not strip (debug info) installed executables
705 --with-pkg-config{=path} enable/disable use of pkg-config
706 --with-pkg-config-libdir=XXX use given directory for installing pc-files
707 --without-tests suppress build with test-programs
708 --enable-mixed-case tic should assume mixed-case filenames
709 --with-install-prefix prefixes actual install-location ($DESTDIR)
710 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
711 --with-build-cc=XXX the build C compiler ($BUILD_CC)
712 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
713 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
714 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
715 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
716 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
717 Options to Specify the Libraries Built/Used:
718 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
719 --with-curses-dir=DIR directory in which (n)curses is installed
720 --enable-widec compile with wide-char/UTF-8 code
721 --with-lib-prefix override library-prefix
722 --with-shlib-version=X Specify rel or abi version for shared libs
723 --enable-rpath-link link sample programs with rpath option
724 Fine-Tuning Your Configuration:
725 --enable-broken_linker compile with broken-linker support code
726 --disable-largefile omit support for large files
727 --with-rcs-ids compile-in RCS identifiers
729 --disable-ext-funcs disable function-extensions
730 --enable-const compile with extra/non-standard const
732 --without-develop disable development options
734 --with-pthread use POSIX thread library
735 --enable-weak-symbols enable weak-symbols for pthreads
736 --enable-reentrant compile with experimental reentrant code
737 --with-wrap-prefix=XXX override prefix used for public variables
738 Testing/development Options:
739 --disable-echo do not display "compiling" commands
740 --enable-warnings build: turn on GCC compiler warnings
741 --enable-warnings test: turn on gcc compiler warnings
742 --enable-assertions test: turn on generation of assertion code
743 --enable-expanded test: generate functions for certain macros
744 --disable-macros test: use functions rather than macros
745 --with-trace test: add trace() function to all models of ncurses
746 --disable-gnat-projects test: disable GNAT projects even if usable
747 Ada95 Binding Options:
748 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
749 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
750 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
751 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
752 --with-ada-libname=XXX override default Ada library-name
754 Some influential environment variables:
755 CC C compiler command
756 CFLAGS C compiler flags
757 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
758 nonstandard directory <lib dir>
759 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
760 headers in a nonstandard directory <include dir>
763 Use these variables to override the choices made by `configure' or to help
764 it to find libraries and programs with nonstandard names/locations.
769 if test "$ac_init_help" = "recursive"; then
770 # If there are subdirs, report their specific --help.
772 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
774 # A "../" for each directory in /$ac_subdir.
775 ac_dots=`echo $ac_subdir |
776 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
779 .) # No --srcdir option. We are building in place.
780 ac_sub_srcdir=$srcdir ;;
781 [\\/]* | ?:[\\/]* ) # Absolute path.
782 ac_sub_srcdir=$srcdir/$ac_subdir ;;
784 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
787 # Check for guested configure; otherwise get Cygnus style configure.
788 if test -f $ac_sub_srcdir/configure.gnu; then
790 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
791 elif test -f $ac_sub_srcdir/configure; then
793 $SHELL $ac_sub_srcdir/configure --help=recursive
794 elif test -f $ac_sub_srcdir/configure.ac ||
795 test -f $ac_sub_srcdir/configure.in; then
799 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
805 test -n "$ac_init_help" && exit 0
806 if $ac_init_version; then
809 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
810 Free Software Foundation, Inc.
811 This configure script is free software; the Free Software Foundation
812 gives unlimited permission to copy, distribute and modify it.
818 This file contains any messages produced by compilers while
819 running configure, to aid debugging if configure makes a mistake.
821 It was created by $as_me, which was
822 generated by GNU Autoconf 2.52.20200802. Invocation command line was
833 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
834 uname -m = `(uname -m) 2>/dev/null || echo unknown`
835 uname -r = `(uname -r) 2>/dev/null || echo unknown`
836 uname -s = `(uname -s) 2>/dev/null || echo unknown`
837 uname -v = `(uname -v) 2>/dev/null || echo unknown`
839 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
840 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
842 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
843 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
844 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
845 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
846 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
847 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
848 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
862 # Keep a trace of the command line.
863 # Strip out --no-create and --no-recursion so they do not pile up.
864 # Also quote any args containing shell meta-characters.
870 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
871 | --no-cr | --no-c) ;;
872 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
873 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
874 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
875 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
876 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
878 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
881 # Get rid of the leading space.
884 # When interrupted or exit'd, cleanup temporary files, and complete
885 # config.log. We remove comments because anyway the quotes in there
886 # would cause problems or look ugly.
888 # Save into config.log some information that might help in debugging.
890 echo "## ----------------- ##" >&5
891 echo "## Cache variables. ##" >&5
892 echo "## ----------------- ##" >&5
894 # The following way of writing the cache mishandles newlines in values,
897 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
900 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
901 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
905 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
909 sed "/^$/d" confdefs.h >conftest.log
910 if test -s conftest.log; then
912 echo "## ------------ ##" >&5
913 echo "## confdefs.h. ##" >&5
914 echo "## ------------ ##" >&5
919 test "$ac_signal" != 0 &&
920 echo "$as_me: caught signal $ac_signal" >&5
921 echo "$as_me: exit $exit_status" >&5
922 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
925 for ac_signal in 1 2 13 15; do
926 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
930 # confdefs.h avoids OS command line length limits that DEFS can exceed.
931 rm -rf conftest* confdefs.h
932 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
935 # Let the site file select an alternate cache file if it wants to.
936 # Prefer explicitly selected file to automatically selected ones.
937 if test -z "$CONFIG_SITE"; then
938 if test "x$prefix" != xNONE; then
939 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
941 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
944 for ac_site_file in $CONFIG_SITE; do
945 if test -r "$ac_site_file"; then
946 { echo "$as_me:946: loading site script $ac_site_file" >&5
947 echo "$as_me: loading site script $ac_site_file" >&6;}
948 cat "$ac_site_file" >&5
953 if test -r "$cache_file"; then
954 # Some versions of bash will fail to source /dev/null (special
955 # files actually), so we avoid doing that.
956 if test -f "$cache_file"; then
957 { echo "$as_me:957: loading cache $cache_file" >&5
958 echo "$as_me: loading cache $cache_file" >&6;}
960 [\\/]* | ?:[\\/]* ) . $cache_file;;
965 { echo "$as_me:965: creating cache $cache_file" >&5
966 echo "$as_me: creating cache $cache_file" >&6;}
970 # Check that the precious variables saved in the cache have kept the same
972 ac_cache_corrupted=false
973 for ac_var in `(set) 2>&1 |
974 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
975 eval ac_old_set=\$ac_cv_env_${ac_var}_set
976 eval ac_new_set=\$ac_env_${ac_var}_set
977 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
978 eval ac_new_val="\$ac_env_${ac_var}_value"
979 case $ac_old_set,$ac_new_set in
981 { echo "$as_me:981: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
982 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
983 ac_cache_corrupted=: ;;
985 { echo "$as_me:985: error: \`$ac_var' was not set in the previous run" >&5
986 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
987 ac_cache_corrupted=: ;;
990 if test "x$ac_old_val" != "x$ac_new_val"; then
991 { echo "$as_me:991: error: \`$ac_var' has changed since the previous run:" >&5
992 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
993 { echo "$as_me:993: former value: $ac_old_val" >&5
994 echo "$as_me: former value: $ac_old_val" >&2;}
995 { echo "$as_me:995: current value: $ac_new_val" >&5
996 echo "$as_me: current value: $ac_new_val" >&2;}
1000 # Pass precious variables to config.status. It doesn't matter if
1001 # we pass some twice (in addition to the command line arguments).
1002 if test "$ac_new_set" = set; then
1004 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1006 ac_configure_args="$ac_configure_args '$ac_arg'"
1008 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1013 if $ac_cache_corrupted; then
1014 { echo "$as_me:1014: error: changes in the environment can compromise the build" >&5
1015 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1016 { { echo "$as_me:1016: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1017 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1018 { (exit 1); exit 1; }; }
1022 ac_cpp='$CPP $CPPFLAGS'
1023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1026 ac_main_return=return
1028 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1029 *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1031 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1032 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
1034 echo "#! $SHELL" >conftest.sh
1035 echo "exit 0" >>conftest.sh
1036 chmod +x conftest.sh
1037 if { (echo "$as_me:1037: PATH=\".;.\"; conftest.sh") >&5
1038 (PATH=".;."; conftest.sh) 2>&5
1040 echo "$as_me:1040: \$? = $ac_status" >&5
1041 (exit $ac_status); }; then
1042 ac_path_separator=';'
1046 PATH_SEPARATOR="$ac_path_separator"
1049 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1054 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1055 if test -f $ac_dir/install-sh; then
1057 ac_install_sh="$ac_aux_dir/install-sh -c"
1059 elif test -f $ac_dir/install.sh; then
1061 ac_install_sh="$ac_aux_dir/install.sh -c"
1063 elif test -f $ac_dir/shtool; then
1065 ac_install_sh="$ac_aux_dir/shtool install -c"
1069 if test -z "$ac_aux_dir"; then
1070 { { echo "$as_me:1070: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1071 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1072 { (exit 1); exit 1; }; }
1074 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1075 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1076 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1078 # Make sure we can run config.sub.
1079 $ac_config_sub sun4 >/dev/null 2>&1 ||
1080 { { echo "$as_me:1080: error: cannot run $ac_config_sub" >&5
1081 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1082 { (exit 1); exit 1; }; }
1084 echo "$as_me:1084: checking build system type" >&5
1085 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1086 if test "${ac_cv_build+set}" = set; then
1087 echo $ECHO_N "(cached) $ECHO_C" >&6
1089 ac_cv_build_alias=$build_alias
1090 test -z "$ac_cv_build_alias" &&
1091 ac_cv_build_alias=`$ac_config_guess`
1092 test -z "$ac_cv_build_alias" &&
1093 { { echo "$as_me:1093: error: cannot guess build type; you must specify one" >&5
1094 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1095 { (exit 1); exit 1; }; }
1096 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1097 { { echo "$as_me:1097: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1098 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1099 { (exit 1); exit 1; }; }
1102 echo "$as_me:1102: result: $ac_cv_build" >&5
1103 echo "${ECHO_T}$ac_cv_build" >&6
1105 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1106 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1107 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1109 echo "$as_me:1109: checking host system type" >&5
1110 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1111 if test "${ac_cv_host+set}" = set; then
1112 echo $ECHO_N "(cached) $ECHO_C" >&6
1114 ac_cv_host_alias=$host_alias
1115 test -z "$ac_cv_host_alias" &&
1116 ac_cv_host_alias=$ac_cv_build_alias
1117 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1118 { { echo "$as_me:1118: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1119 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1120 { (exit 1); exit 1; }; }
1123 echo "$as_me:1123: result: $ac_cv_host" >&5
1124 echo "${ECHO_T}$ac_cv_host" >&6
1126 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1127 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1128 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1130 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1131 echo "$as_me:1131: checking target system type" >&5
1132 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1133 if test "${ac_cv_target+set}" = set; then
1134 echo $ECHO_N "(cached) $ECHO_C" >&6
1136 ac_cv_target_alias=$target_alias
1137 test "x$ac_cv_target_alias" = "x" &&
1138 ac_cv_target_alias=$ac_cv_host_alias
1139 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1140 { { echo "$as_me:1140: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1141 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1142 { (exit 1); exit 1; }; }
1145 echo "$as_me:1145: result: $ac_cv_target" >&5
1146 echo "${ECHO_T}$ac_cv_target" >&6
1147 target=$ac_cv_target
1148 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1149 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1150 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1152 # The aliases save the names the user supplied, while $host etc.
1153 # will get canonicalized.
1154 test -n "$target_alias" &&
1155 test "$program_prefix$program_suffix$program_transform_name" = \
1157 program_prefix=${target_alias}-
1158 system_name="$host_os"
1160 system_name="`(uname -s -r) 2>/dev/null`"
1161 if test -z "$system_name" ; then
1162 system_name="`(hostname) 2>/dev/null`"
1165 test -n "$system_name" &&
1166 cat >>confdefs.h <<EOF
1167 #define SYSTEM_NAME "$system_name"
1170 if test "${cf_cv_system_name+set}" = set; then
1171 echo $ECHO_N "(cached) $ECHO_C" >&6
1173 cf_cv_system_name="$system_name"
1176 test -z "$system_name" && system_name="$cf_cv_system_name"
1177 test -n "$cf_cv_system_name" && echo "$as_me:1177: result: Configuring for $cf_cv_system_name" >&5
1178 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1180 if test ".$system_name" != ".$cf_cv_system_name" ; then
1181 echo "$as_me:1181: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1182 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1183 { { echo "$as_me:1183: error: \"Please remove config.cache and try again.\"" >&5
1184 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1185 { (exit 1); exit 1; }; }
1188 # Check whether --with-system-type or --without-system-type was given.
1189 if test "${with_system_type+set}" = set; then
1190 withval="$with_system_type"
1191 { echo "$as_me:1191: WARNING: overriding system type to $withval" >&5
1192 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1193 cf_cv_system_name=$withval
1198 ### Save the given $CFLAGS to allow user-override.
1199 cf_user_CFLAGS="$CFLAGS"
1201 ### Default install-location
1203 echo "$as_me:1203: checking for prefix" >&5
1204 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1205 if test "x$prefix" = "xNONE" ; then
1206 case "$cf_cv_system_name" in
1207 # non-vendor systems don't have a conflict
1208 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1211 (*) prefix=$ac_default_prefix
1215 echo "$as_me:1215: result: $prefix" >&5
1216 echo "${ECHO_T}$prefix" >&6
1218 if test "x$prefix" = "xNONE" ; then
1219 echo "$as_me:1219: checking for default include-directory" >&5
1220 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1221 test -n "$verbose" && echo 1>&6
1224 $includedir/ncurses \
1226 $prefix/include/ncurses \
1227 /usr/local/include \
1228 /usr/local/include/ncurses \
1230 /usr/include/ncurses
1232 cf_dir=`eval echo $cf_symbol`
1233 if test -f $cf_dir/curses.h ; then
1234 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1235 includedir="$cf_symbol"
1236 test -n "$verbose" && echo $ac_n " found " 1>&6
1240 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1242 echo "$as_me:1242: result: $includedir" >&5
1243 echo "${ECHO_T}$includedir" >&6
1246 ### Checks for programs.
1249 ac_cpp='$CPP $CPPFLAGS'
1250 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1251 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1252 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1253 ac_main_return=return
1254 if test -n "$ac_tool_prefix"; then
1255 for ac_prog in gnatgcc gcc cc
1257 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1258 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1259 echo "$as_me:1259: checking for $ac_word" >&5
1260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1261 if test "${ac_cv_prog_CC+set}" = set; then
1262 echo $ECHO_N "(cached) $ECHO_C" >&6
1264 if test -n "$CC"; then
1265 ac_cv_prog_CC="$CC" # Let the user override the test.
1267 ac_save_IFS=$IFS; IFS=$ac_path_separator
1269 for ac_dir in $ac_dummy; do
1271 test -z "$ac_dir" && ac_dir=.
1272 $as_executable_p "$ac_dir/$ac_word" || continue
1273 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1274 echo "$as_me:1274: found $ac_dir/$ac_word" >&5
1281 if test -n "$CC"; then
1282 echo "$as_me:1282: result: $CC" >&5
1283 echo "${ECHO_T}$CC" >&6
1285 echo "$as_me:1285: result: no" >&5
1286 echo "${ECHO_T}no" >&6
1289 test -n "$CC" && break
1292 if test -z "$CC"; then
1294 for ac_prog in gnatgcc gcc cc
1296 # Extract the first word of "$ac_prog", so it can be a program name with args.
1297 set dummy $ac_prog; ac_word=$2
1298 echo "$as_me:1298: checking for $ac_word" >&5
1299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1300 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1301 echo $ECHO_N "(cached) $ECHO_C" >&6
1303 if test -n "$ac_ct_CC"; then
1304 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1306 ac_save_IFS=$IFS; IFS=$ac_path_separator
1308 for ac_dir in $ac_dummy; do
1310 test -z "$ac_dir" && ac_dir=.
1311 $as_executable_p "$ac_dir/$ac_word" || continue
1312 ac_cv_prog_ac_ct_CC="$ac_prog"
1313 echo "$as_me:1313: found $ac_dir/$ac_word" >&5
1319 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1320 if test -n "$ac_ct_CC"; then
1321 echo "$as_me:1321: result: $ac_ct_CC" >&5
1322 echo "${ECHO_T}$ac_ct_CC" >&6
1324 echo "$as_me:1324: result: no" >&5
1325 echo "${ECHO_T}no" >&6
1328 test -n "$ac_ct_CC" && break
1334 test -z "$CC" && { { echo "$as_me:1334: error: no acceptable cc found in \$PATH" >&5
1335 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1336 { (exit 1); exit 1; }; }
1338 # Provide some information about the compiler.
1339 echo "$as_me:1339:" \
1340 "checking for C compiler version" >&5
1341 ac_compiler=`set X $ac_compile; echo $2`
1342 { (eval echo "$as_me:1342: \"$ac_compiler --version </dev/null >&5\"") >&5
1343 (eval $ac_compiler --version </dev/null >&5) 2>&5
1345 echo "$as_me:1345: \$? = $ac_status" >&5
1346 (exit $ac_status); }
1347 { (eval echo "$as_me:1347: \"$ac_compiler -v </dev/null >&5\"") >&5
1348 (eval $ac_compiler -v </dev/null >&5) 2>&5
1350 echo "$as_me:1350: \$? = $ac_status" >&5
1351 (exit $ac_status); }
1352 { (eval echo "$as_me:1352: \"$ac_compiler -V </dev/null >&5\"") >&5
1353 (eval $ac_compiler -V </dev/null >&5) 2>&5
1355 echo "$as_me:1355: \$? = $ac_status" >&5
1356 (exit $ac_status); }
1358 cat >conftest.$ac_ext <<_ACEOF
1359 #line 1359 "configure"
1360 #include "confdefs.h"
1370 ac_clean_files_save=$ac_clean_files
1371 ac_clean_files="$ac_clean_files a.out a.exe"
1372 # Try to create an executable without -o first, disregard a.out.
1373 # It will help us diagnose broken compilers, and finding out an intuition
1375 echo "$as_me:1375: checking for C compiler default output" >&5
1376 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1377 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1378 if { (eval echo "$as_me:1378: \"$ac_link_default\"") >&5
1379 (eval $ac_link_default) 2>&5
1381 echo "$as_me:1381: \$? = $ac_status" >&5
1382 (exit $ac_status); }; then
1383 # Find the output, starting from the most likely. This scheme is
1384 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1386 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1387 ls a.out conftest 2>/dev/null;
1388 ls a.* conftest.* 2>/dev/null`; do
1390 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1391 a.out ) # We found the default executable, but exeext='' is most
1394 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1395 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1402 echo "$as_me: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1404 { { echo "$as_me:1404: error: C compiler cannot create executables" >&5
1405 echo "$as_me: error: C compiler cannot create executables" >&2;}
1406 { (exit 77); exit 77; }; }
1409 ac_exeext=$ac_cv_exeext
1410 echo "$as_me:1410: result: $ac_file" >&5
1411 echo "${ECHO_T}$ac_file" >&6
1413 # Check the compiler produces executables we can run. If not, either
1414 # the compiler is broken, or we cross compile.
1415 echo "$as_me:1415: checking whether the C compiler works" >&5
1416 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1417 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1418 # If not cross compiling, check that we can run a simple program.
1419 if test "$cross_compiling" != yes; then
1420 if { ac_try='./$ac_file'
1421 { (eval echo "$as_me:1421: \"$ac_try\"") >&5
1424 echo "$as_me:1424: \$? = $ac_status" >&5
1425 (exit $ac_status); }; }; then
1428 if test "$cross_compiling" = maybe; then
1431 { { echo "$as_me:1431: error: cannot run C compiled programs.
1432 If you meant to cross compile, use \`--host'." >&5
1433 echo "$as_me: error: cannot run C compiled programs.
1434 If you meant to cross compile, use \`--host'." >&2;}
1435 { (exit 1); exit 1; }; }
1439 echo "$as_me:1439: result: yes" >&5
1440 echo "${ECHO_T}yes" >&6
1442 rm -f a.out a.exe conftest$ac_cv_exeext
1443 ac_clean_files=$ac_clean_files_save
1444 # Check the compiler produces executables we can run. If not, either
1445 # the compiler is broken, or we cross compile.
1446 echo "$as_me:1446: checking whether we are cross compiling" >&5
1447 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1448 echo "$as_me:1448: result: $cross_compiling" >&5
1449 echo "${ECHO_T}$cross_compiling" >&6
1451 echo "$as_me:1451: checking for executable suffix" >&5
1452 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1453 if { (eval echo "$as_me:1453: \"$ac_link\"") >&5
1454 (eval $ac_link) 2>&5
1456 echo "$as_me:1456: \$? = $ac_status" >&5
1457 (exit $ac_status); }; then
1458 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1459 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1460 # work properly (i.e., refer to `conftest.exe'), while it won't with
1462 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1464 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1465 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1472 { { echo "$as_me:1472: error: cannot compute EXEEXT: cannot compile and link" >&5
1473 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1474 { (exit 1); exit 1; }; }
1477 rm -f conftest$ac_cv_exeext
1478 echo "$as_me:1478: result: $ac_cv_exeext" >&5
1479 echo "${ECHO_T}$ac_cv_exeext" >&6
1481 rm -f conftest.$ac_ext
1482 EXEEXT=$ac_cv_exeext
1484 echo "$as_me:1484: checking for object suffix" >&5
1485 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1486 if test "${ac_cv_objext+set}" = set; then
1487 echo $ECHO_N "(cached) $ECHO_C" >&6
1489 cat >conftest.$ac_ext <<_ACEOF
1490 #line 1490 "configure"
1491 #include "confdefs.h"
1501 rm -f conftest.o conftest.obj
1502 if { (eval echo "$as_me:1502: \"$ac_compile\"") >&5
1503 (eval $ac_compile) 2>&5
1505 echo "$as_me:1505: \$? = $ac_status" >&5
1506 (exit $ac_status); }; then
1507 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1509 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1510 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1515 echo "$as_me: failed program was:" >&5
1516 cat conftest.$ac_ext >&5
1517 { { echo "$as_me:1517: error: cannot compute OBJEXT: cannot compile" >&5
1518 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1519 { (exit 1); exit 1; }; }
1522 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1524 echo "$as_me:1524: result: $ac_cv_objext" >&5
1525 echo "${ECHO_T}$ac_cv_objext" >&6
1526 OBJEXT=$ac_cv_objext
1528 echo "$as_me:1528: checking whether we are using the GNU C compiler" >&5
1529 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1530 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1531 echo $ECHO_N "(cached) $ECHO_C" >&6
1533 cat >conftest.$ac_ext <<_ACEOF
1534 #line 1534 "configure"
1535 #include "confdefs.h"
1548 rm -f conftest.$ac_objext
1549 if { (eval echo "$as_me:1549: \"$ac_compile\"") >&5
1550 (eval $ac_compile) 2>&5
1552 echo "$as_me:1552: \$? = $ac_status" >&5
1553 (exit $ac_status); } &&
1554 { ac_try='test -s conftest.$ac_objext'
1555 { (eval echo "$as_me:1555: \"$ac_try\"") >&5
1558 echo "$as_me:1558: \$? = $ac_status" >&5
1559 (exit $ac_status); }; }; then
1562 echo "$as_me: failed program was:" >&5
1563 cat conftest.$ac_ext >&5
1566 rm -f conftest.$ac_objext conftest.$ac_ext
1567 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1570 echo "$as_me:1570: result: $ac_cv_c_compiler_gnu" >&5
1571 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1572 GCC=`test $ac_compiler_gnu = yes && echo yes`
1573 ac_test_CFLAGS=${CFLAGS+set}
1574 ac_save_CFLAGS=$CFLAGS
1576 echo "$as_me:1576: checking whether $CC accepts -g" >&5
1577 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1578 if test "${ac_cv_prog_cc_g+set}" = set; then
1579 echo $ECHO_N "(cached) $ECHO_C" >&6
1581 cat >conftest.$ac_ext <<_ACEOF
1582 #line 1582 "configure"
1583 #include "confdefs.h"
1593 rm -f conftest.$ac_objext
1594 if { (eval echo "$as_me:1594: \"$ac_compile\"") >&5
1595 (eval $ac_compile) 2>&5
1597 echo "$as_me:1597: \$? = $ac_status" >&5
1598 (exit $ac_status); } &&
1599 { ac_try='test -s conftest.$ac_objext'
1600 { (eval echo "$as_me:1600: \"$ac_try\"") >&5
1603 echo "$as_me:1603: \$? = $ac_status" >&5
1604 (exit $ac_status); }; }; then
1607 echo "$as_me: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1611 rm -f conftest.$ac_objext conftest.$ac_ext
1613 echo "$as_me:1613: result: $ac_cv_prog_cc_g" >&5
1614 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1615 if test "$ac_test_CFLAGS" = set; then
1616 CFLAGS=$ac_save_CFLAGS
1617 elif test $ac_cv_prog_cc_g = yes; then
1618 if test "$GCC" = yes; then
1624 if test "$GCC" = yes; then
1630 # Some people use a C++ compiler to compile C. Since we use `exit',
1631 # in C++ we need to declare it. In case someone uses the same compiler
1632 # for both compiling C and C++ we need to have the C++ compiler decide
1633 # the declaration of exit, since it's the most demanding environment.
1634 cat >conftest.$ac_ext <<_ACEOF
1639 rm -f conftest.$ac_objext
1640 if { (eval echo "$as_me:1640: \"$ac_compile\"") >&5
1641 (eval $ac_compile) 2>&5
1643 echo "$as_me:1643: \$? = $ac_status" >&5
1644 (exit $ac_status); } &&
1645 { ac_try='test -s conftest.$ac_objext'
1646 { (eval echo "$as_me:1646: \"$ac_try\"") >&5
1649 echo "$as_me:1649: \$? = $ac_status" >&5
1650 (exit $ac_status); }; }; then
1651 for ac_declaration in \
1653 '#include <stdlib.h>' \
1654 'extern "C" void std::exit (int) throw (); using std::exit;' \
1655 'extern "C" void std::exit (int); using std::exit;' \
1656 'extern "C" void exit (int) throw ();' \
1657 'extern "C" void exit (int);' \
1660 cat >conftest.$ac_ext <<_ACEOF
1661 #line 1661 "configure"
1662 #include "confdefs.h"
1673 rm -f conftest.$ac_objext
1674 if { (eval echo "$as_me:1674: \"$ac_compile\"") >&5
1675 (eval $ac_compile) 2>&5
1677 echo "$as_me:1677: \$? = $ac_status" >&5
1678 (exit $ac_status); } &&
1679 { ac_try='test -s conftest.$ac_objext'
1680 { (eval echo "$as_me:1680: \"$ac_try\"") >&5
1683 echo "$as_me:1683: \$? = $ac_status" >&5
1684 (exit $ac_status); }; }; then
1687 echo "$as_me: failed program was:" >&5
1688 cat conftest.$ac_ext >&5
1691 rm -f conftest.$ac_objext conftest.$ac_ext
1692 cat >conftest.$ac_ext <<_ACEOF
1693 #line 1693 "configure"
1694 #include "confdefs.h"
1704 rm -f conftest.$ac_objext
1705 if { (eval echo "$as_me:1705: \"$ac_compile\"") >&5
1706 (eval $ac_compile) 2>&5
1708 echo "$as_me:1708: \$? = $ac_status" >&5
1709 (exit $ac_status); } &&
1710 { ac_try='test -s conftest.$ac_objext'
1711 { (eval echo "$as_me:1711: \"$ac_try\"") >&5
1714 echo "$as_me:1714: \$? = $ac_status" >&5
1715 (exit $ac_status); }; }; then
1718 echo "$as_me: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1721 rm -f conftest.$ac_objext conftest.$ac_ext
1724 if test -n "$ac_declaration"; then
1725 echo '#ifdef __cplusplus' >>confdefs.h
1726 echo $ac_declaration >>confdefs.h
1727 echo '#endif' >>confdefs.h
1731 echo "$as_me: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1734 rm -f conftest.$ac_objext conftest.$ac_ext
1736 ac_cpp='$CPP $CPPFLAGS'
1737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1740 ac_main_return=return
1743 if test "$GCC" = yes ; then
1744 echo "$as_me:1744: checking version of $CC" >&5
1745 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1746 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.].*//'`"
1747 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1748 echo "$as_me:1748: result: $GCC_VERSION" >&5
1749 echo "${ECHO_T}$GCC_VERSION" >&6
1754 if test "$GCC" = yes ; then
1757 echo "$as_me:1757: checking if this is really Intel C compiler" >&5
1758 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1759 cf_save_CFLAGS="$CFLAGS"
1760 CFLAGS="$CFLAGS -no-gcc"
1761 cat >conftest.$ac_ext <<_ACEOF
1762 #line 1762 "configure"
1763 #include "confdefs.h"
1769 #ifdef __INTEL_COMPILER
1778 rm -f conftest.$ac_objext
1779 if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780 (eval $ac_compile) 2>&5
1782 echo "$as_me:1782: \$? = $ac_status" >&5
1783 (exit $ac_status); } &&
1784 { ac_try='test -s conftest.$ac_objext'
1785 { (eval echo "$as_me:1785: \"$ac_try\"") >&5
1788 echo "$as_me:1788: \$? = $ac_status" >&5
1789 (exit $ac_status); }; }; then
1791 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1794 echo "$as_me: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1797 rm -f conftest.$ac_objext conftest.$ac_ext
1798 CFLAGS="$cf_save_CFLAGS"
1799 echo "$as_me:1799: result: $INTEL_COMPILER" >&5
1800 echo "${ECHO_T}$INTEL_COMPILER" >&6
1807 if test "$GCC" = yes ; then
1808 echo "$as_me:1808: checking if this is really Clang C compiler" >&5
1809 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1810 cf_save_CFLAGS="$CFLAGS"
1811 cat >conftest.$ac_ext <<_ACEOF
1812 #line 1812 "configure"
1813 #include "confdefs.h"
1828 rm -f conftest.$ac_objext
1829 if { (eval echo "$as_me:1829: \"$ac_compile\"") >&5
1830 (eval $ac_compile) 2>&5
1832 echo "$as_me:1832: \$? = $ac_status" >&5
1833 (exit $ac_status); } &&
1834 { ac_try='test -s conftest.$ac_objext'
1835 { (eval echo "$as_me:1835: \"$ac_try\"") >&5
1838 echo "$as_me:1838: \$? = $ac_status" >&5
1839 (exit $ac_status); }; }; then
1843 echo "$as_me: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1846 rm -f conftest.$ac_objext conftest.$ac_ext
1847 CFLAGS="$cf_save_CFLAGS"
1848 echo "$as_me:1848: result: $CLANG_COMPILER" >&5
1849 echo "${ECHO_T}$CLANG_COMPILER" >&6
1852 if test "x$CLANG_COMPILER" = "xyes" ; then
1853 for cf_clang_opt in \
1854 -Qunused-arguments \
1855 -Wno-error=implicit-function-declaration
1857 echo "$as_me:1857: checking if option $cf_clang_opt works" >&5
1858 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1859 cf_save_CFLAGS="$CFLAGS"
1860 CFLAGS="$CFLAGS $cf_clang_opt"
1861 cat >conftest.$ac_ext <<_ACEOF
1862 #line 1862 "configure"
1863 #include "confdefs.h"
1875 rm -f conftest.$ac_objext conftest$ac_exeext
1876 if { (eval echo "$as_me:1876: \"$ac_link\"") >&5
1877 (eval $ac_link) 2>&5
1879 echo "$as_me:1879: \$? = $ac_status" >&5
1880 (exit $ac_status); } &&
1881 { ac_try='test -s conftest$ac_exeext'
1882 { (eval echo "$as_me:1882: \"$ac_try\"") >&5
1885 echo "$as_me:1885: \$? = $ac_status" >&5
1886 (exit $ac_status); }; }; then
1890 echo "$as_me: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1896 echo "$as_me:1896: result: $cf_clang_optok" >&5
1897 echo "${ECHO_T}$cf_clang_optok" >&6
1898 CFLAGS="$cf_save_CFLAGS"
1899 if test $cf_clang_optok = yes; then
1900 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
1902 echo "${as_me:-configure}:1902: testing adding option $cf_clang_opt ..." 1>&5
1904 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1905 CFLAGS="${CFLAGS}$cf_clang_opt"
1911 echo "$as_me:1911: checking for $CC option to accept ANSI C" >&5
1912 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1913 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1914 echo $ECHO_N "(cached) $ECHO_C" >&6
1916 ac_cv_prog_cc_stdc=no
1918 cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1923 #include <sys/types.h>
1924 #include <sys/stat.h>
1925 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1926 struct buf { int x; };
1927 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1928 static char *e (p, i)
1934 static char *f (char * (*g) (char **, int), char **p, ...)
1939 s = g (p, va_arg (v,int));
1943 int test (int i, double x);
1944 struct s1 {int (*f) (int a);};
1945 struct s2 {int (*f) (double a);};
1946 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1952 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1957 # Don't try gcc -ansi; that turns off useful extensions and
1958 # breaks some systems' header files.
1959 # AIX -qlanglvl=ansi
1960 # Ultrix and OSF/1 -std1
1961 # HP-UX 10.20 and later -Ae
1962 # HP-UX older versions -Aa -D_HPUX_SOURCE
1963 # SVR4 -Xc -D__EXTENSIONS__
1964 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1966 CC="$ac_save_CC $ac_arg"
1967 rm -f conftest.$ac_objext
1968 if { (eval echo "$as_me:1968: \"$ac_compile\"") >&5
1969 (eval $ac_compile) 2>&5
1971 echo "$as_me:1971: \$? = $ac_status" >&5
1972 (exit $ac_status); } &&
1973 { ac_try='test -s conftest.$ac_objext'
1974 { (eval echo "$as_me:1974: \"$ac_try\"") >&5
1977 echo "$as_me:1977: \$? = $ac_status" >&5
1978 (exit $ac_status); }; }; then
1979 ac_cv_prog_cc_stdc=$ac_arg
1982 echo "$as_me: failed program was:" >&5
1983 cat conftest.$ac_ext >&5
1985 rm -f conftest.$ac_objext
1987 rm -f conftest.$ac_ext conftest.$ac_objext
1992 case "x$ac_cv_prog_cc_stdc" in
1994 echo "$as_me:1994: result: none needed" >&5
1995 echo "${ECHO_T}none needed" >&6 ;;
1997 echo "$as_me:1997: result: $ac_cv_prog_cc_stdc" >&5
1998 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1999 CC="$CC $ac_cv_prog_cc_stdc" ;;
2002 # This should have been defined by AC_PROG_CC
2005 echo "$as_me:2005: checking \$CFLAGS variable" >&5
2006 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2009 echo "$as_me:2009: result: broken" >&5
2010 echo "${ECHO_T}broken" >&6
2011 { echo "$as_me:2011: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2012 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2015 for cf_arg in $cf_flags
2021 cf_new_extra_cppflags=
2023 for cf_add_cflags in $cf_arg
2025 case $cf_fix_cppflags in
2027 case $cf_add_cflags in
2028 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2029 case $cf_add_cflags in
2031 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2033 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2034 && test -z "${cf_tst_cflags}" \
2035 && cf_fix_cppflags=yes
2037 if test $cf_fix_cppflags = yes ; then
2039 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2040 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2043 elif test "${cf_tst_cflags}" = "\"'" ; then
2045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2056 case $cf_add_cflags in
2058 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2060 CPPFLAGS=`echo "$CPPFLAGS" | \
2061 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2062 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2067 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2068 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2075 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2076 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2083 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2084 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2086 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2088 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2089 && test -z "${cf_tst_cflags}" \
2090 && cf_fix_cppflags=no
2095 if test -n "$cf_new_cflags" ; then
2097 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2098 CFLAGS="${CFLAGS}$cf_new_cflags"
2102 if test -n "$cf_new_cppflags" ; then
2104 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2105 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2109 if test -n "$cf_new_extra_cppflags" ; then
2111 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2112 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2119 echo "$as_me:2119: result: ok" >&5
2120 echo "${ECHO_T}ok" >&6
2124 echo "$as_me:2124: checking \$CC variable" >&5
2125 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2128 echo "$as_me:2128: result: broken" >&5
2129 echo "${ECHO_T}broken" >&6
2130 { echo "$as_me:2130: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2131 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2133 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2134 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2136 for cf_arg in $cf_flags
2144 cf_new_extra_cppflags=
2146 for cf_add_cflags in $cf_arg
2148 case $cf_fix_cppflags in
2150 case $cf_add_cflags in
2151 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2152 case $cf_add_cflags in
2154 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2156 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2157 && test -z "${cf_tst_cflags}" \
2158 && cf_fix_cppflags=yes
2160 if test $cf_fix_cppflags = yes ; then
2162 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2163 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2166 elif test "${cf_tst_cflags}" = "\"'" ; then
2168 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2169 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2179 case $cf_add_cflags in
2181 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2183 CPPFLAGS=`echo "$CPPFLAGS" | \
2184 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2185 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2190 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2191 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2198 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2199 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2206 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2207 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2209 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2211 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2212 && test -z "${cf_tst_cflags}" \
2213 && cf_fix_cppflags=no
2218 if test -n "$cf_new_cflags" ; then
2220 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2221 CFLAGS="${CFLAGS}$cf_new_cflags"
2225 if test -n "$cf_new_cppflags" ; then
2227 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2228 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2232 if test -n "$cf_new_extra_cppflags" ; then
2234 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2235 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2247 echo "${as_me:-configure}:2247: testing resulting CC: '$CC' ..." 1>&5
2249 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2251 echo "${as_me:-configure}:2251: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2253 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2255 echo "${as_me:-configure}:2255: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2259 echo "$as_me:2259: result: ok" >&5
2260 echo "${ECHO_T}ok" >&6
2265 ac_cpp='$CPP $CPPFLAGS'
2266 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2267 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2268 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2269 ac_main_return=return
2270 echo "$as_me:2270: checking how to run the C preprocessor" >&5
2271 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2272 # On Suns, sometimes $CPP names a directory.
2273 if test -n "$CPP" && test -d "$CPP"; then
2276 if test -z "$CPP"; then
2277 if test "${ac_cv_prog_CPP+set}" = set; then
2278 echo $ECHO_N "(cached) $ECHO_C" >&6
2280 # Double quotes because CPP needs to be expanded
2281 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2284 for ac_c_preproc_warn_flag in '' yes
2286 # Use a header file that comes with gcc, so configuring glibc
2287 # with a fresh cross-compiler works.
2288 # On the NeXT, cc -E runs the code through the compiler's parser,
2289 # not just through cpp. "Syntax error" is here to catch this case.
2290 cat >conftest.$ac_ext <<_ACEOF
2291 #line 2291 "configure"
2292 #include "confdefs.h"
2296 if { (eval echo "$as_me:2296: \"$ac_cpp conftest.$ac_ext\"") >&5
2297 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2299 egrep -v '^ *\+' conftest.er1 >conftest.err
2301 cat conftest.err >&5
2302 echo "$as_me:2302: \$? = $ac_status" >&5
2303 (exit $ac_status); } >/dev/null; then
2304 if test -s conftest.err; then
2305 ac_cpp_err=$ac_c_preproc_warn_flag
2312 if test -z "$ac_cpp_err"; then
2315 echo "$as_me: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2317 # Broken: fails on valid input.
2320 rm -f conftest.err conftest.$ac_ext
2322 # OK, works on sane cases. Now check whether non-existent headers
2323 # can be detected and how.
2324 cat >conftest.$ac_ext <<_ACEOF
2325 #line 2325 "configure"
2326 #include "confdefs.h"
2327 #include <ac_nonexistent.h>
2329 if { (eval echo "$as_me:2329: \"$ac_cpp conftest.$ac_ext\"") >&5
2330 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2332 egrep -v '^ *\+' conftest.er1 >conftest.err
2334 cat conftest.err >&5
2335 echo "$as_me:2335: \$? = $ac_status" >&5
2336 (exit $ac_status); } >/dev/null; then
2337 if test -s conftest.err; then
2338 ac_cpp_err=$ac_c_preproc_warn_flag
2345 if test -z "$ac_cpp_err"; then
2346 # Broken: success on invalid input.
2349 echo "$as_me: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
2351 # Passes both tests.
2355 rm -f conftest.err conftest.$ac_ext
2358 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2359 rm -f conftest.err conftest.$ac_ext
2360 if $ac_preproc_ok; then
2372 echo "$as_me:2372: result: $CPP" >&5
2373 echo "${ECHO_T}$CPP" >&6
2375 for ac_c_preproc_warn_flag in '' yes
2377 # Use a header file that comes with gcc, so configuring glibc
2378 # with a fresh cross-compiler works.
2379 # On the NeXT, cc -E runs the code through the compiler's parser,
2380 # not just through cpp. "Syntax error" is here to catch this case.
2381 cat >conftest.$ac_ext <<_ACEOF
2382 #line 2382 "configure"
2383 #include "confdefs.h"
2387 if { (eval echo "$as_me:2387: \"$ac_cpp conftest.$ac_ext\"") >&5
2388 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2390 egrep -v '^ *\+' conftest.er1 >conftest.err
2392 cat conftest.err >&5
2393 echo "$as_me:2393: \$? = $ac_status" >&5
2394 (exit $ac_status); } >/dev/null; then
2395 if test -s conftest.err; then
2396 ac_cpp_err=$ac_c_preproc_warn_flag
2403 if test -z "$ac_cpp_err"; then
2406 echo "$as_me: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408 # Broken: fails on valid input.
2411 rm -f conftest.err conftest.$ac_ext
2413 # OK, works on sane cases. Now check whether non-existent headers
2414 # can be detected and how.
2415 cat >conftest.$ac_ext <<_ACEOF
2416 #line 2416 "configure"
2417 #include "confdefs.h"
2418 #include <ac_nonexistent.h>
2420 if { (eval echo "$as_me:2420: \"$ac_cpp conftest.$ac_ext\"") >&5
2421 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2423 egrep -v '^ *\+' conftest.er1 >conftest.err
2425 cat conftest.err >&5
2426 echo "$as_me:2426: \$? = $ac_status" >&5
2427 (exit $ac_status); } >/dev/null; then
2428 if test -s conftest.err; then
2429 ac_cpp_err=$ac_c_preproc_warn_flag
2436 if test -z "$ac_cpp_err"; then
2437 # Broken: success on invalid input.
2440 echo "$as_me: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 # Passes both tests.
2446 rm -f conftest.err conftest.$ac_ext
2449 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2450 rm -f conftest.err conftest.$ac_ext
2451 if $ac_preproc_ok; then
2454 { { echo "$as_me:2454: error: C preprocessor \"$CPP\" fails sanity check" >&5
2455 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2456 { (exit 1); exit 1; }; }
2460 ac_cpp='$CPP $CPPFLAGS'
2461 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2462 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2463 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2464 ac_main_return=return
2466 if test $ac_cv_c_compiler_gnu = yes; then
2467 echo "$as_me:2467: checking whether $CC needs -traditional" >&5
2468 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2469 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2470 echo $ECHO_N "(cached) $ECHO_C" >&6
2472 ac_pattern="Autoconf.*'x'"
2473 cat >conftest.$ac_ext <<_ACEOF
2474 #line 2474 "configure"
2475 #include "confdefs.h"
2477 int Autoconf = TIOCGETP;
2479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2480 egrep "$ac_pattern" >/dev/null 2>&1; then
2481 ac_cv_prog_gcc_traditional=yes
2483 ac_cv_prog_gcc_traditional=no
2487 if test $ac_cv_prog_gcc_traditional = no; then
2488 cat >conftest.$ac_ext <<_ACEOF
2489 #line 2489 "configure"
2490 #include "confdefs.h"
2492 int Autoconf = TCGETA;
2494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495 egrep "$ac_pattern" >/dev/null 2>&1; then
2496 ac_cv_prog_gcc_traditional=yes
2502 echo "$as_me:2502: result: $ac_cv_prog_gcc_traditional" >&5
2503 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2504 if test $ac_cv_prog_gcc_traditional = yes; then
2505 CC="$CC -traditional"
2509 echo "$as_me:2509: checking whether $CC understands -c and -o together" >&5
2510 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2511 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2512 echo $ECHO_N "(cached) $ECHO_C" >&6
2515 cat > conftest.$ac_ext <<CF_EOF
2518 ${cf_cv_main_return:-return}(0);
2521 # We do the test twice because some compilers refuse to overwrite an
2522 # existing .o file with -o, though they will create one.
2523 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2524 if { (eval echo "$as_me:2524: \"$ac_try\"") >&5
2527 echo "$as_me:2527: \$? = $ac_status" >&5
2528 (exit $ac_status); } &&
2529 test -f conftest2.$ac_objext && { (eval echo "$as_me:2529: \"$ac_try\"") >&5
2532 echo "$as_me:2532: \$? = $ac_status" >&5
2533 (exit $ac_status); };
2535 eval cf_cv_prog_CC_c_o=yes
2537 eval cf_cv_prog_CC_c_o=no
2542 if test $cf_cv_prog_CC_c_o = yes; then
2543 echo "$as_me:2543: result: yes" >&5
2544 echo "${ECHO_T}yes" >&6
2546 echo "$as_me:2546: result: no" >&5
2547 echo "${ECHO_T}no" >&6
2550 test "$program_prefix" != NONE &&
2551 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2552 # Use a double $ so make ignores it.
2553 test "$program_suffix" != NONE &&
2554 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2555 # Double any \ or $. echo might interpret backslashes.
2556 # By default was `s,x,x', remove it if useless.
2557 cat <<\_ACEOF >conftest.sed
2558 s/[\\$]/&&/g;s/;s,x,x,$//
2560 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2563 for ac_prog in mawk gawk nawk awk
2565 # Extract the first word of "$ac_prog", so it can be a program name with args.
2566 set dummy $ac_prog; ac_word=$2
2567 echo "$as_me:2567: checking for $ac_word" >&5
2568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2569 if test "${ac_cv_prog_AWK+set}" = set; then
2570 echo $ECHO_N "(cached) $ECHO_C" >&6
2572 if test -n "$AWK"; then
2573 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2575 ac_save_IFS=$IFS; IFS=$ac_path_separator
2577 for ac_dir in $ac_dummy; do
2579 test -z "$ac_dir" && ac_dir=.
2580 $as_executable_p "$ac_dir/$ac_word" || continue
2581 ac_cv_prog_AWK="$ac_prog"
2582 echo "$as_me:2582: found $ac_dir/$ac_word" >&5
2589 if test -n "$AWK"; then
2590 echo "$as_me:2590: result: $AWK" >&5
2591 echo "${ECHO_T}$AWK" >&6
2593 echo "$as_me:2593: result: no" >&5
2594 echo "${ECHO_T}no" >&6
2597 test -n "$AWK" && break
2600 test -z "$AWK" && { { echo "$as_me:2600: error: No awk program found" >&5
2601 echo "$as_me: error: No awk program found" >&2;}
2602 { (exit 1); exit 1; }; }
2604 echo "$as_me:2604: checking for egrep" >&5
2605 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2606 if test "${ac_cv_prog_egrep+set}" = set; then
2607 echo $ECHO_N "(cached) $ECHO_C" >&6
2609 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2610 then ac_cv_prog_egrep='grep -E'
2611 else ac_cv_prog_egrep='egrep'
2614 echo "$as_me:2614: result: $ac_cv_prog_egrep" >&5
2615 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2616 EGREP=$ac_cv_prog_egrep
2618 test -z "$EGREP" && { { echo "$as_me:2618: error: No egrep program found" >&5
2619 echo "$as_me: error: No egrep program found" >&2;}
2620 { (exit 1); exit 1; }; }
2622 # Find a good install program. We prefer a C program (faster),
2623 # so one script is as good as another. But avoid the broken or
2624 # incompatible versions:
2625 # SysV /etc/install, /usr/sbin/install
2626 # SunOS /usr/etc/install
2627 # IRIX /sbin/install
2629 # AmigaOS /C/install, which installs bootblocks on floppy discs
2630 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2631 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2632 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2633 # ./install, which can be erroneously created by make from ./install.sh.
2634 echo "$as_me:2634: checking for a BSD compatible install" >&5
2635 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2636 if test -z "$INSTALL"; then
2637 if test "${ac_cv_path_install+set}" = set; then
2638 echo $ECHO_N "(cached) $ECHO_C" >&6
2640 ac_save_IFS=$IFS; IFS=$ac_path_separator
2641 for ac_dir in $PATH; do
2643 # Account for people who put trailing slashes in PATH elements.
2645 / | ./ | .// | /cC/* \
2646 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2649 # OSF1 and SCO ODT 3.0 have their own names for install.
2650 # Don't use installbsd from OSF since it installs stuff as root
2652 for ac_prog in ginstall scoinst install; do
2653 if $as_executable_p "$ac_dir/$ac_prog"; then
2654 if test $ac_prog = install &&
2655 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2656 # AIX install. It has an incompatible calling convention.
2658 elif test $ac_prog = install &&
2659 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2660 # program-specific install script used by HP pwplus--don't use.
2663 ac_cv_path_install="$ac_dir/$ac_prog -c"
2673 if test "${ac_cv_path_install+set}" = set; then
2674 INSTALL=$ac_cv_path_install
2676 # As a last resort, use the slow shell script. We don't cache a
2677 # path for INSTALL within a source directory, because that will
2678 # break other packages using the cache if that directory is
2679 # removed, or if the path is relative.
2680 INSTALL=$ac_install_sh
2683 echo "$as_me:2683: result: $INSTALL" >&5
2684 echo "${ECHO_T}$INSTALL" >&6
2686 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2687 # It thinks the first close brace ends the variable substitution.
2688 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2690 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2692 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2694 echo "$as_me:2694: checking whether ln -s works" >&5
2695 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2697 if test "$LN_S" = "ln -s"; then
2698 echo "$as_me:2698: result: yes" >&5
2699 echo "${ECHO_T}yes" >&6
2701 echo "$as_me:2701: result: no, using $LN_S" >&5
2702 echo "${ECHO_T}no, using $LN_S" >&6
2705 echo "$as_me:2705: checking if $LN_S -f options work" >&5
2706 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2708 rm -f conf$$.src conf$$dst
2710 echo first >conf$$.src
2711 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2716 rm -f conf$$.dst conf$$src
2717 echo "$as_me:2717: result: $cf_prog_ln_sf" >&5
2718 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2720 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2722 # Find a good install program. We prefer a C program (faster),
2723 # so one script is as good as another. But avoid the broken or
2724 # incompatible versions:
2725 # SysV /etc/install, /usr/sbin/install
2726 # SunOS /usr/etc/install
2727 # IRIX /sbin/install
2729 # AmigaOS /C/install, which installs bootblocks on floppy discs
2730 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2731 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2732 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2733 # ./install, which can be erroneously created by make from ./install.sh.
2734 echo "$as_me:2734: checking for a BSD compatible install" >&5
2735 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2736 if test -z "$INSTALL"; then
2737 if test "${ac_cv_path_install+set}" = set; then
2738 echo $ECHO_N "(cached) $ECHO_C" >&6
2740 ac_save_IFS=$IFS; IFS=$ac_path_separator
2741 for ac_dir in $PATH; do
2743 # Account for people who put trailing slashes in PATH elements.
2745 / | ./ | .// | /cC/* \
2746 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2749 # OSF1 and SCO ODT 3.0 have their own names for install.
2750 # Don't use installbsd from OSF since it installs stuff as root
2752 for ac_prog in ginstall scoinst install; do
2753 if $as_executable_p "$ac_dir/$ac_prog"; then
2754 if test $ac_prog = install &&
2755 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2756 # AIX install. It has an incompatible calling convention.
2758 elif test $ac_prog = install &&
2759 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2760 # program-specific install script used by HP pwplus--don't use.
2763 ac_cv_path_install="$ac_dir/$ac_prog -c"
2773 if test "${ac_cv_path_install+set}" = set; then
2774 INSTALL=$ac_cv_path_install
2776 # As a last resort, use the slow shell script. We don't cache a
2777 # path for INSTALL within a source directory, because that will
2778 # break other packages using the cache if that directory is
2779 # removed, or if the path is relative.
2780 INSTALL=$ac_install_sh
2783 echo "$as_me:2783: result: $INSTALL" >&5
2784 echo "${ECHO_T}$INSTALL" >&6
2786 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2787 # It thinks the first close brace ends the variable substitution.
2788 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2790 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2792 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2798 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2799 test -z "$cf_dir" && cf_dir=.
2800 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2804 echo "$as_me:2804: checking if you want to install stripped executables" >&5
2805 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2807 # Check whether --enable-stripping or --disable-stripping was given.
2808 if test "${enable_stripping+set}" = set; then
2809 enableval="$enable_stripping"
2810 test "$enableval" != no && enableval=yes
2811 if test "$enableval" != "yes" ; then
2821 echo "$as_me:2821: result: $with_stripping" >&5
2822 echo "${ECHO_T}$with_stripping" >&6
2824 if test "$with_stripping" = yes
2831 : ${INSTALL:=install}
2832 echo "$as_me:2832: checking if install accepts -p option" >&5
2833 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2834 if test "${cf_cv_install_p+set}" = set; then
2835 echo $ECHO_N "(cached) $ECHO_C" >&6
2842 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2844 if test -f conftest.out/conftest.in
2846 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2847 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2848 if test -s conftest.err
2863 echo "$as_me:2863: result: $cf_cv_install_p" >&5
2864 echo "${ECHO_T}$cf_cv_install_p" >&6
2866 echo "$as_me:2866: checking if install needs to be told about ownership" >&5
2867 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2868 case `$ac_config_guess` in
2877 echo "$as_me:2877: result: $with_install_o" >&5
2878 echo "${ECHO_T}$with_install_o" >&6
2879 if test "x$with_install_o" = xyes
2881 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'`
2886 echo "$as_me:2886: checking for long file names" >&5
2887 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2888 if test "${ac_cv_sys_long_file_names+set}" = set; then
2889 echo $ECHO_N "(cached) $ECHO_C" >&6
2891 ac_cv_sys_long_file_names=yes
2892 # Test for long file names in all the places we know might matter:
2893 # . the current directory, where building will happen
2894 # $prefix/lib where we will be installing things
2895 # $exec_prefix/lib likewise
2896 # eval it to expand exec_prefix.
2897 # $TMPDIR if set, where it might want to write temporary files
2898 # if $TMPDIR is not set:
2899 # /tmp where it might want to write temporary files
2902 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2905 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2907 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2908 test -d $ac_dir || continue
2909 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2910 ac_xdir=$ac_dir/cf$$
2911 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2912 ac_tf1=$ac_xdir/conftest9012345
2913 ac_tf2=$ac_xdir/conftest9012346
2914 (echo 1 >$ac_tf1) 2>/dev/null
2915 (echo 2 >$ac_tf2) 2>/dev/null
2916 ac_val=`cat $ac_tf1 2>/dev/null`
2917 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2918 ac_cv_sys_long_file_names=no
2919 rm -rf $ac_xdir 2>/dev/null
2922 rm -rf $ac_xdir 2>/dev/null
2925 echo "$as_me:2925: result: $ac_cv_sys_long_file_names" >&5
2926 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2927 if test $ac_cv_sys_long_file_names = yes; then
2929 cat >>confdefs.h <<\EOF
2930 #define HAVE_LONG_FILE_NAMES 1
2935 # if we find pkg-config, check if we should install the ".pc" files.
2937 echo "$as_me:2937: checking if you want to use pkg-config" >&5
2938 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2940 # Check whether --with-pkg-config or --without-pkg-config was given.
2941 if test "${with_pkg_config+set}" = set; then
2942 withval="$with_pkg_config"
2943 cf_pkg_config=$withval
2947 echo "$as_me:2947: result: $cf_pkg_config" >&5
2948 echo "${ECHO_T}$cf_pkg_config" >&6
2950 case $cf_pkg_config in
2956 if test -n "$ac_tool_prefix"; then
2957 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2958 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2959 echo "$as_me:2959: checking for $ac_word" >&5
2960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2961 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2962 echo $ECHO_N "(cached) $ECHO_C" >&6
2966 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2969 ac_save_IFS=$IFS; IFS=$ac_path_separator
2971 for ac_dir in $ac_dummy; do
2973 test -z "$ac_dir" && ac_dir=.
2974 if $as_executable_p "$ac_dir/$ac_word"; then
2975 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2976 echo "$as_me:2976: found $ac_dir/$ac_word" >&5
2984 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2986 if test -n "$PKG_CONFIG"; then
2987 echo "$as_me:2987: result: $PKG_CONFIG" >&5
2988 echo "${ECHO_T}$PKG_CONFIG" >&6
2990 echo "$as_me:2990: result: no" >&5
2991 echo "${ECHO_T}no" >&6
2995 if test -z "$ac_cv_path_PKG_CONFIG"; then
2996 ac_pt_PKG_CONFIG=$PKG_CONFIG
2997 # Extract the first word of "pkg-config", so it can be a program name with args.
2998 set dummy pkg-config; ac_word=$2
2999 echo "$as_me:2999: checking for $ac_word" >&5
3000 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3001 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3002 echo $ECHO_N "(cached) $ECHO_C" >&6
3004 case $ac_pt_PKG_CONFIG in
3006 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3009 ac_save_IFS=$IFS; IFS=$ac_path_separator
3011 for ac_dir in $ac_dummy; do
3013 test -z "$ac_dir" && ac_dir=.
3014 if $as_executable_p "$ac_dir/$ac_word"; then
3015 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3016 echo "$as_me:3016: found $ac_dir/$ac_word" >&5
3021 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3025 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3027 if test -n "$ac_pt_PKG_CONFIG"; then
3028 echo "$as_me:3028: result: $ac_pt_PKG_CONFIG" >&5
3029 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3031 echo "$as_me:3031: result: no" >&5
3032 echo "${ECHO_T}no" >&6
3035 PKG_CONFIG=$ac_pt_PKG_CONFIG
3037 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3046 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3047 if test "$PKG_CONFIG" != none ; then
3049 if test "x$prefix" != xNONE; then
3050 cf_path_syntax="$prefix"
3052 cf_path_syntax="$ac_default_prefix"
3055 case ".$PKG_CONFIG" in
3060 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3062 (.\${*prefix}*|.\${*dir}*)
3063 eval PKG_CONFIG="$PKG_CONFIG"
3064 case ".$PKG_CONFIG" in
3066 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3071 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3074 { { echo "$as_me:3074: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3075 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3076 { (exit 1); exit 1; }; }
3080 elif test "x$cf_pkg_config" != xno ; then
3081 { echo "$as_me:3081: WARNING: pkg-config is not installed" >&5
3082 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3087 echo "$as_me:3087: checking for pkg-config library directory" >&5
3088 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3091 echo "$as_me:3091: checking for $PKG_CONFIG library directory" >&5
3092 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3096 PKG_CONFIG_LIBDIR=no
3098 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3099 if test "${with_pkg_config_libdir+set}" = set; then
3100 withval="$with_pkg_config_libdir"
3101 PKG_CONFIG_LIBDIR=$withval
3103 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3106 case x$PKG_CONFIG_LIBDIR in
3110 # Look for the library directory using the same prefix as the executable
3111 if test "x$PKG_CONFIG" = xnone
3115 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3118 # If you don't like using the default architecture, you have to specify the
3119 # intended library directory and corresponding compiler/linker options.
3121 # This case allows for Debian's 2014-flavor of multiarch, along with the
3122 # most common variations before that point. Some other variants spell the
3123 # directory differently, e.g., "pkg-config", and put it in unusual places.
3124 # pkg-config has always been poorly standardized, which is ironic...
3125 case x`(arch) 2>/dev/null` in
3128 $cf_path/lib/*64-linux-gnu \
3136 $cf_path/lib/*-linux-gnu \
3144 test -n "$verbose" && echo " list..." 1>&6
3146 echo "${as_me:-configure}:3146: testing list... ..." 1>&5
3148 for cf_config in $cf_search_path
3150 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3152 echo "${as_me:-configure}:3152: testing checking $cf_config/pkgconfig ..." 1>&5
3154 if test -d $cf_config/pkgconfig
3156 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3157 echo "$as_me:3157: checking done" >&5
3158 echo $ECHO_N "checking done... $ECHO_C" >&6
3167 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3168 echo "$as_me:3168: result: $PKG_CONFIG_LIBDIR" >&5
3169 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3172 echo "$as_me:3172: checking if you want to build test-programs" >&5
3173 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3175 # Check whether --with-tests or --without-tests was given.
3176 if test "${with_tests+set}" = set; then
3177 withval="$with_tests"
3178 cf_with_tests=$withval
3182 echo "$as_me:3182: result: $cf_with_tests" >&5
3183 echo "${ECHO_T}$cf_with_tests" >&6
3185 echo "$as_me:3185: checking if we should assume mixed-case filenames" >&5
3186 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3188 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3189 if test "${enable_mixed_case+set}" = set; then
3190 enableval="$enable_mixed_case"
3191 enable_mixedcase=$enableval
3193 enable_mixedcase=auto
3195 echo "$as_me:3195: result: $enable_mixedcase" >&5
3196 echo "${ECHO_T}$enable_mixedcase" >&6
3197 if test "$enable_mixedcase" = "auto" ; then
3199 echo "$as_me:3199: checking if filesystem supports mixed-case filenames" >&5
3200 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3201 if test "${cf_cv_mixedcase+set}" = set; then
3202 echo $ECHO_N "(cached) $ECHO_C" >&6
3205 if test "$cross_compiling" = yes ; then
3206 case $target_alias in
3207 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3215 rm -f conftest CONFTEST
3217 if test -f CONFTEST ; then
3222 rm -f conftest CONFTEST
3226 echo "$as_me:3226: result: $cf_cv_mixedcase" >&5
3227 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3228 test "$cf_cv_mixedcase" = yes &&
3229 cat >>confdefs.h <<\EOF
3230 #define MIXEDCASE_FILENAMES 1
3234 cf_cv_mixedcase=$enable_mixedcase
3235 if test "$enable_mixedcase" = "yes" ; then
3236 cat >>confdefs.h <<\EOF
3237 #define MIXEDCASE_FILENAMES 1
3243 # do this after mixed-case option (tags/TAGS is not as important as tic).
3244 echo "$as_me:3244: checking whether ${MAKE-make} sets \${MAKE}" >&5
3245 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3246 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3247 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3248 echo $ECHO_N "(cached) $ECHO_C" >&6
3250 cat >conftest.make <<\EOF
3252 @echo 'ac_maketemp="${MAKE}"'
3254 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3255 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3256 if test -n "$ac_maketemp"; then
3257 eval ac_cv_prog_make_${ac_make}_set=yes
3259 eval ac_cv_prog_make_${ac_make}_set=no
3263 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3264 echo "$as_me:3264: result: yes" >&5
3265 echo "${ECHO_T}yes" >&6
3268 echo "$as_me:3268: result: no" >&5
3269 echo "${ECHO_T}no" >&6
3270 SET_MAKE="MAKE=${MAKE-make}"
3273 for ac_prog in exctags ctags
3275 # Extract the first word of "$ac_prog", so it can be a program name with args.
3276 set dummy $ac_prog; ac_word=$2
3277 echo "$as_me:3277: checking for $ac_word" >&5
3278 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3279 if test "${ac_cv_prog_CTAGS+set}" = set; then
3280 echo $ECHO_N "(cached) $ECHO_C" >&6
3282 if test -n "$CTAGS"; then
3283 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3285 ac_save_IFS=$IFS; IFS=$ac_path_separator
3287 for ac_dir in $ac_dummy; do
3289 test -z "$ac_dir" && ac_dir=.
3290 $as_executable_p "$ac_dir/$ac_word" || continue
3291 ac_cv_prog_CTAGS="$ac_prog"
3292 echo "$as_me:3292: found $ac_dir/$ac_word" >&5
3298 CTAGS=$ac_cv_prog_CTAGS
3299 if test -n "$CTAGS"; then
3300 echo "$as_me:3300: result: $CTAGS" >&5
3301 echo "${ECHO_T}$CTAGS" >&6
3303 echo "$as_me:3303: result: no" >&5
3304 echo "${ECHO_T}no" >&6
3307 test -n "$CTAGS" && break
3310 for ac_prog in exetags etags
3312 # Extract the first word of "$ac_prog", so it can be a program name with args.
3313 set dummy $ac_prog; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_ETAGS+set}" = set; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
3319 if test -n "$ETAGS"; then
3320 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3322 ac_save_IFS=$IFS; IFS=$ac_path_separator
3324 for ac_dir in $ac_dummy; do
3326 test -z "$ac_dir" && ac_dir=.
3327 $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_ETAGS="$ac_prog"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3335 ETAGS=$ac_cv_prog_ETAGS
3336 if test -n "$ETAGS"; then
3337 echo "$as_me:3337: result: $ETAGS" >&5
3338 echo "${ECHO_T}$ETAGS" >&6
3340 echo "$as_me:3340: result: no" >&5
3341 echo "${ECHO_T}no" >&6
3344 test -n "$ETAGS" && break
3347 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3348 set dummy ${CTAGS:-ctags}; ac_word=$2
3349 echo "$as_me:3349: checking for $ac_word" >&5
3350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3351 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3352 echo $ECHO_N "(cached) $ECHO_C" >&6
3354 if test -n "$MAKE_LOWER_TAGS"; then
3355 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3357 ac_save_IFS=$IFS; IFS=$ac_path_separator
3359 for ac_dir in $ac_dummy; do
3361 test -z "$ac_dir" && ac_dir=.
3362 $as_executable_p "$ac_dir/$ac_word" || continue
3363 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3364 echo "$as_me:3364: found $ac_dir/$ac_word" >&5
3368 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3371 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3372 if test -n "$MAKE_LOWER_TAGS"; then
3373 echo "$as_me:3373: result: $MAKE_LOWER_TAGS" >&5
3374 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3376 echo "$as_me:3376: result: no" >&5
3377 echo "${ECHO_T}no" >&6
3380 if test "$cf_cv_mixedcase" = yes ; then
3381 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3382 set dummy ${ETAGS:-etags}; ac_word=$2
3383 echo "$as_me:3383: checking for $ac_word" >&5
3384 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3385 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3386 echo $ECHO_N "(cached) $ECHO_C" >&6
3388 if test -n "$MAKE_UPPER_TAGS"; then
3389 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3391 ac_save_IFS=$IFS; IFS=$ac_path_separator
3393 for ac_dir in $ac_dummy; do
3395 test -z "$ac_dir" && ac_dir=.
3396 $as_executable_p "$ac_dir/$ac_word" || continue
3397 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3398 echo "$as_me:3398: found $ac_dir/$ac_word" >&5
3402 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3405 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3406 if test -n "$MAKE_UPPER_TAGS"; then
3407 echo "$as_me:3407: result: $MAKE_UPPER_TAGS" >&5
3408 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3410 echo "$as_me:3410: result: no" >&5
3411 echo "${ECHO_T}no" >&6
3418 if test "$MAKE_UPPER_TAGS" = yes ; then
3424 if test "$MAKE_LOWER_TAGS" = yes ; then
3430 echo "$as_me:3430: checking for makeflags variable" >&5
3431 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3432 if test "${cf_cv_makeflags+set}" = set; then
3433 echo $ECHO_N "(cached) $ECHO_C" >&6
3437 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3439 cat >cf_makeflags.tmp <<CF_EOF
3442 @ echo '.$cf_option'
3444 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3445 case "$cf_result" in
3447 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3448 case "$cf_result" in
3449 (.*CC=*) cf_cv_makeflags=
3451 (*) cf_cv_makeflags=$cf_option
3460 echo "${as_me:-configure}:3460: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3465 rm -f cf_makeflags.tmp
3468 echo "$as_me:3468: result: $cf_cv_makeflags" >&5
3469 echo "${ECHO_T}$cf_cv_makeflags" >&6
3471 if test -n "$ac_tool_prefix"; then
3472 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3473 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3474 echo "$as_me:3474: checking for $ac_word" >&5
3475 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3476 if test "${ac_cv_prog_RANLIB+set}" = set; then
3477 echo $ECHO_N "(cached) $ECHO_C" >&6
3479 if test -n "$RANLIB"; then
3480 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3482 ac_save_IFS=$IFS; IFS=$ac_path_separator
3484 for ac_dir in $ac_dummy; do
3486 test -z "$ac_dir" && ac_dir=.
3487 $as_executable_p "$ac_dir/$ac_word" || continue
3488 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3489 echo "$as_me:3489: found $ac_dir/$ac_word" >&5
3495 RANLIB=$ac_cv_prog_RANLIB
3496 if test -n "$RANLIB"; then
3497 echo "$as_me:3497: result: $RANLIB" >&5
3498 echo "${ECHO_T}$RANLIB" >&6
3500 echo "$as_me:3500: result: no" >&5
3501 echo "${ECHO_T}no" >&6
3505 if test -z "$ac_cv_prog_RANLIB"; then
3506 ac_ct_RANLIB=$RANLIB
3507 # Extract the first word of "ranlib", so it can be a program name with args.
3508 set dummy ranlib; ac_word=$2
3509 echo "$as_me:3509: checking for $ac_word" >&5
3510 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3511 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3512 echo $ECHO_N "(cached) $ECHO_C" >&6
3514 if test -n "$ac_ct_RANLIB"; then
3515 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3517 ac_save_IFS=$IFS; IFS=$ac_path_separator
3519 for ac_dir in $ac_dummy; do
3521 test -z "$ac_dir" && ac_dir=.
3522 $as_executable_p "$ac_dir/$ac_word" || continue
3523 ac_cv_prog_ac_ct_RANLIB="ranlib"
3524 echo "$as_me:3524: found $ac_dir/$ac_word" >&5
3528 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3531 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3532 if test -n "$ac_ct_RANLIB"; then
3533 echo "$as_me:3533: result: $ac_ct_RANLIB" >&5
3534 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3536 echo "$as_me:3536: result: no" >&5
3537 echo "${ECHO_T}no" >&6
3540 RANLIB=$ac_ct_RANLIB
3542 RANLIB="$ac_cv_prog_RANLIB"
3545 if test -n "$ac_tool_prefix"; then
3546 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3547 set dummy ${ac_tool_prefix}ld; ac_word=$2
3548 echo "$as_me:3548: checking for $ac_word" >&5
3549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3550 if test "${ac_cv_prog_LD+set}" = set; then
3551 echo $ECHO_N "(cached) $ECHO_C" >&6
3553 if test -n "$LD"; then
3554 ac_cv_prog_LD="$LD" # Let the user override the test.
3556 ac_save_IFS=$IFS; IFS=$ac_path_separator
3558 for ac_dir in $ac_dummy; do
3560 test -z "$ac_dir" && ac_dir=.
3561 $as_executable_p "$ac_dir/$ac_word" || continue
3562 ac_cv_prog_LD="${ac_tool_prefix}ld"
3563 echo "$as_me:3563: found $ac_dir/$ac_word" >&5
3570 if test -n "$LD"; then
3571 echo "$as_me:3571: result: $LD" >&5
3572 echo "${ECHO_T}$LD" >&6
3574 echo "$as_me:3574: result: no" >&5
3575 echo "${ECHO_T}no" >&6
3579 if test -z "$ac_cv_prog_LD"; then
3581 # Extract the first word of "ld", so it can be a program name with args.
3582 set dummy ld; ac_word=$2
3583 echo "$as_me:3583: checking for $ac_word" >&5
3584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3586 echo $ECHO_N "(cached) $ECHO_C" >&6
3588 if test -n "$ac_ct_LD"; then
3589 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3591 ac_save_IFS=$IFS; IFS=$ac_path_separator
3593 for ac_dir in $ac_dummy; do
3595 test -z "$ac_dir" && ac_dir=.
3596 $as_executable_p "$ac_dir/$ac_word" || continue
3597 ac_cv_prog_ac_ct_LD="ld"
3598 echo "$as_me:3598: found $ac_dir/$ac_word" >&5
3602 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3605 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3606 if test -n "$ac_ct_LD"; then
3607 echo "$as_me:3607: result: $ac_ct_LD" >&5
3608 echo "${ECHO_T}$ac_ct_LD" >&6
3610 echo "$as_me:3610: result: no" >&5
3611 echo "${ECHO_T}no" >&6
3619 if test -n "$ac_tool_prefix"; then
3620 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3621 set dummy ${ac_tool_prefix}ar; ac_word=$2
3622 echo "$as_me:3622: checking for $ac_word" >&5
3623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3624 if test "${ac_cv_prog_AR+set}" = set; then
3625 echo $ECHO_N "(cached) $ECHO_C" >&6
3627 if test -n "$AR"; then
3628 ac_cv_prog_AR="$AR" # Let the user override the test.
3630 ac_save_IFS=$IFS; IFS=$ac_path_separator
3632 for ac_dir in $ac_dummy; do
3634 test -z "$ac_dir" && ac_dir=.
3635 $as_executable_p "$ac_dir/$ac_word" || continue
3636 ac_cv_prog_AR="${ac_tool_prefix}ar"
3637 echo "$as_me:3637: found $ac_dir/$ac_word" >&5
3644 if test -n "$AR"; then
3645 echo "$as_me:3645: result: $AR" >&5
3646 echo "${ECHO_T}$AR" >&6
3648 echo "$as_me:3648: result: no" >&5
3649 echo "${ECHO_T}no" >&6
3653 if test -z "$ac_cv_prog_AR"; then
3655 # Extract the first word of "ar", so it can be a program name with args.
3656 set dummy ar; ac_word=$2
3657 echo "$as_me:3657: checking for $ac_word" >&5
3658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
3662 if test -n "$ac_ct_AR"; then
3663 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3665 ac_save_IFS=$IFS; IFS=$ac_path_separator
3667 for ac_dir in $ac_dummy; do
3669 test -z "$ac_dir" && ac_dir=.
3670 $as_executable_p "$ac_dir/$ac_word" || continue
3671 ac_cv_prog_ac_ct_AR="ar"
3672 echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3676 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3679 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3680 if test -n "$ac_ct_AR"; then
3681 echo "$as_me:3681: result: $ac_ct_AR" >&5
3682 echo "${ECHO_T}$ac_ct_AR" >&6
3684 echo "$as_me:3684: result: no" >&5
3685 echo "${ECHO_T}no" >&6
3693 if test -n "$ac_tool_prefix"; then
3694 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3695 set dummy ${ac_tool_prefix}ar; ac_word=$2
3696 echo "$as_me:3696: checking for $ac_word" >&5
3697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3698 if test "${ac_cv_prog_AR+set}" = set; then
3699 echo $ECHO_N "(cached) $ECHO_C" >&6
3701 if test -n "$AR"; then
3702 ac_cv_prog_AR="$AR" # Let the user override the test.
3704 ac_save_IFS=$IFS; IFS=$ac_path_separator
3706 for ac_dir in $ac_dummy; do
3708 test -z "$ac_dir" && ac_dir=.
3709 $as_executable_p "$ac_dir/$ac_word" || continue
3710 ac_cv_prog_AR="${ac_tool_prefix}ar"
3711 echo "$as_me:3711: found $ac_dir/$ac_word" >&5
3718 if test -n "$AR"; then
3719 echo "$as_me:3719: result: $AR" >&5
3720 echo "${ECHO_T}$AR" >&6
3722 echo "$as_me:3722: result: no" >&5
3723 echo "${ECHO_T}no" >&6
3727 if test -z "$ac_cv_prog_AR"; then
3729 # Extract the first word of "ar", so it can be a program name with args.
3730 set dummy ar; ac_word=$2
3731 echo "$as_me:3731: checking for $ac_word" >&5
3732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3734 echo $ECHO_N "(cached) $ECHO_C" >&6
3736 if test -n "$ac_ct_AR"; then
3737 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3739 ac_save_IFS=$IFS; IFS=$ac_path_separator
3741 for ac_dir in $ac_dummy; do
3743 test -z "$ac_dir" && ac_dir=.
3744 $as_executable_p "$ac_dir/$ac_word" || continue
3745 ac_cv_prog_ac_ct_AR="ar"
3746 echo "$as_me:3746: found $ac_dir/$ac_word" >&5
3750 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3753 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3754 if test -n "$ac_ct_AR"; then
3755 echo "$as_me:3755: result: $ac_ct_AR" >&5
3756 echo "${ECHO_T}$ac_ct_AR" >&6
3758 echo "$as_me:3758: result: no" >&5
3759 echo "${ECHO_T}no" >&6
3767 echo "$as_me:3767: checking for options to update archives" >&5
3768 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3769 if test "${cf_cv_ar_flags+set}" = set; then
3770 echo $ECHO_N "(cached) $ECHO_C" >&6
3773 case $cf_cv_system_name in
3776 cat >mk_static_lib.sh <<-EOF
3781 exec \$MSVC_BIN -out:"\$out" \$@
3783 chmod +x mk_static_lib.sh
3784 AR=`pwd`/mk_static_lib.sh
3787 cf_cv_ar_flags=unknown
3788 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3791 # check if $ARFLAGS already contains this choice
3792 if test "x$ARFLAGS" != "x" ; then
3793 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3794 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3800 rm -f conftest.$ac_cv_objext
3803 cat >conftest.$ac_ext <<EOF
3804 #line 3804 "configure"
3805 int testdata[3] = { 123, 456, 789 };
3807 if { (eval echo "$as_me:3807: \"$ac_compile\"") >&5
3808 (eval $ac_compile) 2>&5
3810 echo "$as_me:3810: \$? = $ac_status" >&5
3811 (exit $ac_status); } ; then
3812 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3813 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3814 if test -f conftest.a ; then
3815 cf_cv_ar_flags=$cf_ar_flags
3819 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3821 echo "${as_me:-configure}:3821: testing cannot compile test-program ..." 1>&5
3826 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3831 echo "$as_me:3831: result: $cf_cv_ar_flags" >&5
3832 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3834 if test -n "$ARFLAGS" ; then
3835 if test -n "$cf_cv_ar_flags" ; then
3836 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3839 ARFLAGS=$cf_cv_ar_flags
3842 echo "$as_me:3842: checking for PATH separator" >&5
3843 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3844 case $cf_cv_system_name in
3845 (os2*) PATH_SEPARATOR=';' ;;
3846 (*) ${PATH_SEPARATOR:=':'} ;;
3849 echo "$as_me:3849: result: $PATH_SEPARATOR" >&5
3850 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3852 echo "$as_me:3852: checking if you have specified an install-prefix" >&5
3853 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3855 # Check whether --with-install-prefix or --without-install-prefix was given.
3856 if test "${with_install_prefix+set}" = set; then
3857 withval="$with_install_prefix"
3861 (*) DESTDIR="$withval"
3865 echo "$as_me:3865: result: $DESTDIR" >&5
3866 echo "${ECHO_T}$DESTDIR" >&6
3868 ###############################################################################
3870 # If we're cross-compiling, allow the user to override the tools and their
3871 # options. The configure script is oriented toward identifying the host
3872 # compiler, etc., but we need a build compiler to generate parts of the source.
3874 if test "$cross_compiling" = yes ; then
3876 # defaults that we might want to override
3877 : ${BUILD_CFLAGS:=''}
3878 : ${BUILD_CPPFLAGS:=''}
3879 : ${BUILD_LDFLAGS:=''}
3881 : ${BUILD_EXEEXT:='$x'}
3882 : ${BUILD_OBJEXT:='o'}
3884 # Check whether --with-build-cc or --without-build-cc was given.
3885 if test "${with_build_cc+set}" = set; then
3886 withval="$with_build_cc"
3889 for ac_prog in gcc clang c99 c89 cc cl
3891 # Extract the first word of "$ac_prog", so it can be a program name with args.
3892 set dummy $ac_prog; ac_word=$2
3893 echo "$as_me:3893: checking for $ac_word" >&5
3894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3895 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3896 echo $ECHO_N "(cached) $ECHO_C" >&6
3898 if test -n "$BUILD_CC"; then
3899 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3901 ac_save_IFS=$IFS; IFS=$ac_path_separator
3903 for ac_dir in $ac_dummy; do
3905 test -z "$ac_dir" && ac_dir=.
3906 $as_executable_p "$ac_dir/$ac_word" || continue
3907 ac_cv_prog_BUILD_CC="$ac_prog"
3908 echo "$as_me:3908: found $ac_dir/$ac_word" >&5
3914 BUILD_CC=$ac_cv_prog_BUILD_CC
3915 if test -n "$BUILD_CC"; then
3916 echo "$as_me:3916: result: $BUILD_CC" >&5
3917 echo "${ECHO_T}$BUILD_CC" >&6
3919 echo "$as_me:3919: result: no" >&5
3920 echo "${ECHO_T}no" >&6
3923 test -n "$BUILD_CC" && break
3925 test -n "$BUILD_CC" || BUILD_CC="none"
3928 echo "$as_me:3928: checking for native build C compiler" >&5
3929 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3930 echo "$as_me:3930: result: $BUILD_CC" >&5
3931 echo "${ECHO_T}$BUILD_CC" >&6
3933 echo "$as_me:3933: checking for native build C preprocessor" >&5
3934 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3936 # Check whether --with-build-cpp or --without-build-cpp was given.
3937 if test "${with_build_cpp+set}" = set; then
3938 withval="$with_build_cpp"
3939 BUILD_CPP="$withval"
3941 BUILD_CPP='${BUILD_CC} -E'
3943 echo "$as_me:3943: result: $BUILD_CPP" >&5
3944 echo "${ECHO_T}$BUILD_CPP" >&6
3946 echo "$as_me:3946: checking for native build C flags" >&5
3947 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3949 # Check whether --with-build-cflags or --without-build-cflags was given.
3950 if test "${with_build_cflags+set}" = set; then
3951 withval="$with_build_cflags"
3952 BUILD_CFLAGS="$withval"
3954 echo "$as_me:3954: result: $BUILD_CFLAGS" >&5
3955 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3957 echo "$as_me:3957: checking for native build C preprocessor-flags" >&5
3958 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3960 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3961 if test "${with_build_cppflags+set}" = set; then
3962 withval="$with_build_cppflags"
3963 BUILD_CPPFLAGS="$withval"
3965 echo "$as_me:3965: result: $BUILD_CPPFLAGS" >&5
3966 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3968 echo "$as_me:3968: checking for native build linker-flags" >&5
3969 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3971 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3972 if test "${with_build_ldflags+set}" = set; then
3973 withval="$with_build_ldflags"
3974 BUILD_LDFLAGS="$withval"
3976 echo "$as_me:3976: result: $BUILD_LDFLAGS" >&5
3977 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3979 echo "$as_me:3979: checking for native build linker-libraries" >&5
3980 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3982 # Check whether --with-build-libs or --without-build-libs was given.
3983 if test "${with_build_libs+set}" = set; then
3984 withval="$with_build_libs"
3985 BUILD_LIBS="$withval"
3987 echo "$as_me:3987: result: $BUILD_LIBS" >&5
3988 echo "${ECHO_T}$BUILD_LIBS" >&6
3990 # this assumes we're on Unix.
3994 : ${BUILD_CC:='${CC}'}
3996 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3997 { { echo "$as_me:3997: error: Cross-build requires two compilers.
3998 Use --with-build-cc to specify the native compiler." >&5
3999 echo "$as_me: error: Cross-build requires two compilers.
4000 Use --with-build-cc to specify the native compiler." >&2;}
4001 { (exit 1); exit 1; }; }
4005 : ${BUILD_CC:='${CC}'}
4006 : ${BUILD_CPP:='${CPP}'}
4007 : ${BUILD_CFLAGS:='${CFLAGS}'}
4008 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4009 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4010 : ${BUILD_LIBS:='${LIBS}'}
4011 : ${BUILD_EXEEXT:='$x'}
4012 : ${BUILD_OBJEXT:='o'}
4015 ###############################################################################
4017 ### Options to allow the user to specify the set of libraries which are used.
4018 ### Use "--without-normal --with-shared" to allow the default model to be
4019 ### shared, for example.
4022 echo "$as_me:4022: checking if you want to build shared C-objects" >&5
4023 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4025 # Check whether --with-shared or --without-shared was given.
4026 if test "${with_shared+set}" = set; then
4027 withval="$with_shared"
4028 with_shared=$withval
4032 echo "$as_me:4032: result: $with_shared" >&5
4033 echo "${ECHO_T}$with_shared" >&6
4034 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4036 echo "$as_me:4036: checking for specified models" >&5
4037 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4038 test -z "$cf_list_models" && cf_list_models=normal
4039 echo "$as_me:4039: result: $cf_list_models" >&5
4040 echo "${ECHO_T}$cf_list_models" >&6
4042 ### Use the first model as the default, and save its suffix for use in building
4043 ### up test-applications.
4044 echo "$as_me:4044: checking for default model" >&5
4045 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4046 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4047 echo "$as_me:4047: result: $DFT_LWR_MODEL" >&5
4048 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4050 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4052 echo "$as_me:4052: checking for specific curses-directory" >&5
4053 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4055 # Check whether --with-curses-dir or --without-curses-dir was given.
4056 if test "${with_curses_dir+set}" = set; then
4057 withval="$with_curses_dir"
4058 cf_cv_curses_dir=$withval
4062 echo "$as_me:4062: result: $cf_cv_curses_dir" >&5
4063 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4065 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4068 if test "x$prefix" != xNONE; then
4069 cf_path_syntax="$prefix"
4071 cf_path_syntax="$ac_default_prefix"
4079 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4081 (.\${*prefix}*|.\${*dir}*)
4082 eval withval="$withval"
4085 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4090 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4093 { { echo "$as_me:4093: error: expected a pathname, not \"$withval\"" >&5
4094 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4095 { (exit 1); exit 1; }; }
4099 if test -d "$cf_cv_curses_dir"
4102 if test -n "$cf_cv_curses_dir/include" ; then
4103 for cf_add_incdir in $cf_cv_curses_dir/include
4105 while test $cf_add_incdir != /usr/include
4107 if test -d $cf_add_incdir
4110 if test -n "$CFLAGS$CPPFLAGS" ; then
4111 # a loop is needed to ensure we can add subdirs of existing dirs
4112 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4113 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4114 cf_have_incdir=yes; break
4119 if test "$cf_have_incdir" = no ; then
4120 if test "$cf_add_incdir" = /usr/local/include ; then
4121 if test "$GCC" = yes
4123 cf_save_CPPFLAGS=$CPPFLAGS
4125 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4126 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4128 cat >conftest.$ac_ext <<_ACEOF
4129 #line 4129 "configure"
4130 #include "confdefs.h"
4140 rm -f conftest.$ac_objext
4141 if { (eval echo "$as_me:4141: \"$ac_compile\"") >&5
4142 (eval $ac_compile) 2>&5
4144 echo "$as_me:4144: \$? = $ac_status" >&5
4145 (exit $ac_status); } &&
4146 { ac_try='test -s conftest.$ac_objext'
4147 { (eval echo "$as_me:4147: \"$ac_try\"") >&5
4150 echo "$as_me:4150: \$? = $ac_status" >&5
4151 (exit $ac_status); }; }; then
4154 echo "$as_me: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4158 rm -f conftest.$ac_objext conftest.$ac_ext
4159 CPPFLAGS=$cf_save_CPPFLAGS
4164 if test "$cf_have_incdir" = no ; then
4165 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4167 echo "${as_me:-configure}:4167: testing adding $cf_add_incdir to include-path ..." 1>&5
4169 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4171 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4172 test "$cf_top_incdir" = "$cf_add_incdir" && break
4173 cf_add_incdir="$cf_top_incdir"
4184 if test -n "$cf_cv_curses_dir/lib" ; then
4185 for cf_add_libdir in $cf_cv_curses_dir/lib
4187 if test $cf_add_libdir = /usr/lib ; then
4189 elif test -d $cf_add_libdir
4192 if test -n "$LDFLAGS$LIBS" ; then
4193 # a loop is needed to ensure we can add subdirs of existing dirs
4194 for cf_test_libdir in $LDFLAGS $LIBS ; do
4195 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4196 cf_have_libdir=yes; break
4200 if test "$cf_have_libdir" = no ; then
4201 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4203 echo "${as_me:-configure}:4203: testing adding $cf_add_libdir to library-path ..." 1>&5
4205 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4214 cf_ncuconfig_root=ncurses
4215 cf_have_ncuconfig=no
4217 if test "x${PKG_CONFIG:=none}" != xnone; then
4218 echo "$as_me:4218: checking pkg-config for $cf_ncuconfig_root" >&5
4219 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4220 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4221 echo "$as_me:4221: result: yes" >&5
4222 echo "${ECHO_T}yes" >&6
4224 echo "$as_me:4224: checking if the $cf_ncuconfig_root package files work" >&5
4225 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4226 cf_have_ncuconfig=unknown
4228 cf_save_CFLAGS="$CFLAGS"
4229 cf_save_CPPFLAGS="$CPPFLAGS"
4230 cf_save_LIBS="$LIBS"
4232 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
4233 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
4235 # while -W for passing linker flags is prevalent, it is not "standard".
4236 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4237 # incompatible _and_ non-standard -W option which gives an error. Work
4238 # around that pitfall.
4239 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4245 cf_new_extra_cppflags=
4247 for cf_add_cflags in $cf_pkg_cflags
4249 case $cf_fix_cppflags in
4251 case $cf_add_cflags in
4252 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4253 case $cf_add_cflags in
4255 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4257 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4258 && test -z "${cf_tst_cflags}" \
4259 && cf_fix_cppflags=yes
4261 if test $cf_fix_cppflags = yes ; then
4263 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4264 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4267 elif test "${cf_tst_cflags}" = "\"'" ; then
4269 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4270 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4280 case $cf_add_cflags in
4282 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4284 CPPFLAGS=`echo "$CPPFLAGS" | \
4285 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4286 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4291 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4292 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4299 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4300 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4307 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4308 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4310 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4312 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4313 && test -z "${cf_tst_cflags}" \
4314 && cf_fix_cppflags=no
4319 if test -n "$cf_new_cflags" ; then
4321 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4322 CFLAGS="${CFLAGS}$cf_new_cflags"
4326 if test -n "$cf_new_cppflags" ; then
4328 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4329 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4333 if test -n "$cf_new_extra_cppflags" ; then
4335 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4336 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4343 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4345 for cf_add_1lib in $cf_add_0lib; do
4346 for cf_add_2lib in $cf_add_libs; do
4347 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4352 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4356 cat >conftest.$ac_ext <<_ACEOF
4357 #line 4357 "configure"
4358 #include "confdefs.h"
4359 #include <${cf_cv_ncurses_header:-curses.h}>
4363 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4368 rm -f conftest.$ac_objext conftest$ac_exeext
4369 if { (eval echo "$as_me:4369: \"$ac_link\"") >&5
4370 (eval $ac_link) 2>&5
4372 echo "$as_me:4372: \$? = $ac_status" >&5
4373 (exit $ac_status); } &&
4374 { ac_try='test -s conftest$ac_exeext'
4375 { (eval echo "$as_me:4375: \"$ac_try\"") >&5
4378 echo "$as_me:4378: \$? = $ac_status" >&5
4379 (exit $ac_status); }; }; then
4380 if test "$cross_compiling" = yes; then
4381 cf_test_ncuconfig=maybe
4383 cat >conftest.$ac_ext <<_ACEOF
4384 #line 4384 "configure"
4385 #include "confdefs.h"
4386 #include <${cf_cv_ncurses_header:-curses.h}>
4388 { char *xx = curses_version(); return (xx == 0); }
4390 rm -f conftest$ac_exeext
4391 if { (eval echo "$as_me:4391: \"$ac_link\"") >&5
4392 (eval $ac_link) 2>&5
4394 echo "$as_me:4394: \$? = $ac_status" >&5
4395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4396 { (eval echo "$as_me:4396: \"$ac_try\"") >&5
4399 echo "$as_me:4399: \$? = $ac_status" >&5
4400 (exit $ac_status); }; }; then
4401 cf_test_ncuconfig=yes
4403 echo "$as_me: program exited with status $ac_status" >&5
4404 echo "$as_me: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 cf_test_ncuconfig=no
4408 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4411 echo "$as_me: failed program was:" >&5
4412 cat conftest.$ac_ext >&5
4413 cf_test_ncuconfig=no
4415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4417 CFLAGS="$cf_save_CFLAGS"
4418 CPPFLAGS="$cf_save_CPPFLAGS"
4419 LIBS="$cf_save_LIBS"
4421 if test "x$cf_test_ncuconfig" != xyes; then
4422 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4423 cf_pkg_cflags="$cf_temp"
4424 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4425 cf_pkg_libs="$cf_temp"
4433 cf_new_extra_cppflags=
4435 for cf_add_cflags in $cf_pkg_cflags
4437 case $cf_fix_cppflags in
4439 case $cf_add_cflags in
4440 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4441 case $cf_add_cflags in
4443 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4445 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4446 && test -z "${cf_tst_cflags}" \
4447 && cf_fix_cppflags=yes
4449 if test $cf_fix_cppflags = yes ; then
4451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4455 elif test "${cf_tst_cflags}" = "\"'" ; then
4457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4468 case $cf_add_cflags in
4470 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4472 CPPFLAGS=`echo "$CPPFLAGS" | \
4473 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4474 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4479 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4480 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4487 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4488 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4495 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4496 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4498 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4500 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4501 && test -z "${cf_tst_cflags}" \
4502 && cf_fix_cppflags=no
4507 if test -n "$cf_new_cflags" ; then
4509 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4510 CFLAGS="${CFLAGS}$cf_new_cflags"
4514 if test -n "$cf_new_cppflags" ; then
4516 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4517 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4521 if test -n "$cf_new_extra_cppflags" ; then
4523 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4524 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4531 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4533 for cf_add_1lib in $cf_add_0lib; do
4534 for cf_add_2lib in $cf_add_libs; do
4535 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4540 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4544 cat >conftest.$ac_ext <<_ACEOF
4545 #line 4545 "configure"
4546 #include "confdefs.h"
4547 #include <${cf_cv_ncurses_header:-curses.h}>
4551 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4556 rm -f conftest.$ac_objext conftest$ac_exeext
4557 if { (eval echo "$as_me:4557: \"$ac_link\"") >&5
4558 (eval $ac_link) 2>&5
4560 echo "$as_me:4560: \$? = $ac_status" >&5
4561 (exit $ac_status); } &&
4562 { ac_try='test -s conftest$ac_exeext'
4563 { (eval echo "$as_me:4563: \"$ac_try\"") >&5
4566 echo "$as_me:4566: \$? = $ac_status" >&5
4567 (exit $ac_status); }; }; then
4568 if test "$cross_compiling" = yes; then
4569 cf_have_ncuconfig=maybe
4571 cat >conftest.$ac_ext <<_ACEOF
4572 #line 4572 "configure"
4573 #include "confdefs.h"
4574 #include <${cf_cv_ncurses_header:-curses.h}>
4576 { char *xx = curses_version(); return (xx == 0); }
4578 rm -f conftest$ac_exeext
4579 if { (eval echo "$as_me:4579: \"$ac_link\"") >&5
4580 (eval $ac_link) 2>&5
4582 echo "$as_me:4582: \$? = $ac_status" >&5
4583 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4584 { (eval echo "$as_me:4584: \"$ac_try\"") >&5
4587 echo "$as_me:4587: \$? = $ac_status" >&5
4588 (exit $ac_status); }; }; then
4589 cf_have_ncuconfig=yes
4591 echo "$as_me: program exited with status $ac_status" >&5
4592 echo "$as_me: failed program was:" >&5
4593 cat conftest.$ac_ext >&5
4594 cf_have_ncuconfig=no
4596 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4599 echo "$as_me: failed program was:" >&5
4600 cat conftest.$ac_ext >&5
4601 cf_have_ncuconfig=no
4603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4604 echo "$as_me:4604: result: $cf_have_ncuconfig" >&5
4605 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4606 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4607 if test "$cf_have_ncuconfig" != "yes"
4609 CPPFLAGS="$cf_save_CPPFLAGS"
4610 LIBS="$cf_save_LIBS"
4611 NCURSES_CONFIG_PKG=none
4614 cat >>confdefs.h <<\EOF
4618 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4620 echo "$as_me:4620: checking for terminfo header" >&5
4621 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4622 if test "${cf_cv_term_header+set}" = set; then
4623 echo $ECHO_N "(cached) $ECHO_C" >&6
4626 case ${cf_cv_ncurses_header} in
4627 (*/ncurses.h|*/ncursesw.h)
4628 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4631 cf_term_header=term.h
4635 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4637 cat >conftest.$ac_ext <<_ACEOF
4638 #line 4638 "configure"
4639 #include "confdefs.h"
4641 #include <${cf_cv_ncurses_header:-curses.h}>
4647 int x = auto_left_margin; (void)x
4652 rm -f conftest.$ac_objext
4653 if { (eval echo "$as_me:4653: \"$ac_compile\"") >&5
4654 (eval $ac_compile) 2>&5
4656 echo "$as_me:4656: \$? = $ac_status" >&5
4657 (exit $ac_status); } &&
4658 { ac_try='test -s conftest.$ac_objext'
4659 { (eval echo "$as_me:4659: \"$ac_try\"") >&5
4662 echo "$as_me:4662: \$? = $ac_status" >&5
4663 (exit $ac_status); }; }; then
4665 cf_cv_term_header="$cf_test"
4667 echo "$as_me: failed program was:" >&5
4668 cat conftest.$ac_ext >&5
4670 cf_cv_term_header=unknown
4673 rm -f conftest.$ac_objext conftest.$ac_ext
4674 test "$cf_cv_term_header" != unknown && break
4678 echo "$as_me:4678: result: $cf_cv_term_header" >&5
4679 echo "${ECHO_T}$cf_cv_term_header" >&6
4681 # Set definitions to allow ifdef'ing to accommodate subdirectories
4683 case $cf_cv_term_header in
4686 cat >>confdefs.h <<\EOF
4687 #define HAVE_TERM_H 1
4693 case $cf_cv_term_header in
4696 cat >>confdefs.h <<\EOF
4697 #define HAVE_NCURSES_TERM_H 1
4703 cat >>confdefs.h <<\EOF
4704 #define HAVE_NCURSESW_TERM_H 1
4713 echo "$as_me:4713: result: no" >&5
4714 echo "${ECHO_T}no" >&6
4715 NCURSES_CONFIG_PKG=none
4718 NCURSES_CONFIG_PKG=none
4721 if test "x$cf_have_ncuconfig" = "xno"; then
4722 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4724 if test -n "$ac_tool_prefix"; then
4725 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4727 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4728 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4729 echo "$as_me:4729: checking for $ac_word" >&5
4730 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4731 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4732 echo $ECHO_N "(cached) $ECHO_C" >&6
4734 if test -n "$NCURSES_CONFIG"; then
4735 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4737 ac_save_IFS=$IFS; IFS=$ac_path_separator
4739 for ac_dir in $ac_dummy; do
4741 test -z "$ac_dir" && ac_dir=.
4742 $as_executable_p "$ac_dir/$ac_word" || continue
4743 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4744 echo "$as_me:4744: found $ac_dir/$ac_word" >&5
4750 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4751 if test -n "$NCURSES_CONFIG"; then
4752 echo "$as_me:4752: result: $NCURSES_CONFIG" >&5
4753 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4755 echo "$as_me:4755: result: no" >&5
4756 echo "${ECHO_T}no" >&6
4759 test -n "$NCURSES_CONFIG" && break
4762 if test -z "$NCURSES_CONFIG"; then
4763 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4764 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4766 # Extract the first word of "$ac_prog", so it can be a program name with args.
4767 set dummy $ac_prog; ac_word=$2
4768 echo "$as_me:4768: checking for $ac_word" >&5
4769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4770 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4771 echo $ECHO_N "(cached) $ECHO_C" >&6
4773 if test -n "$ac_ct_NCURSES_CONFIG"; then
4774 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4776 ac_save_IFS=$IFS; IFS=$ac_path_separator
4778 for ac_dir in $ac_dummy; do
4780 test -z "$ac_dir" && ac_dir=.
4781 $as_executable_p "$ac_dir/$ac_word" || continue
4782 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4783 echo "$as_me:4783: found $ac_dir/$ac_word" >&5
4789 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4790 if test -n "$ac_ct_NCURSES_CONFIG"; then
4791 echo "$as_me:4791: result: $ac_ct_NCURSES_CONFIG" >&5
4792 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4794 echo "$as_me:4794: result: no" >&5
4795 echo "${ECHO_T}no" >&6
4798 test -n "$ac_ct_NCURSES_CONFIG" && break
4800 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4802 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4805 if test "$NCURSES_CONFIG" != none ; then
4810 cf_new_extra_cppflags=
4812 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4814 case $cf_fix_cppflags in
4816 case $cf_add_cflags in
4817 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4818 case $cf_add_cflags in
4820 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4822 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4823 && test -z "${cf_tst_cflags}" \
4824 && cf_fix_cppflags=yes
4826 if test $cf_fix_cppflags = yes ; then
4828 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4829 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4832 elif test "${cf_tst_cflags}" = "\"'" ; then
4834 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4835 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4845 case $cf_add_cflags in
4847 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4849 CPPFLAGS=`echo "$CPPFLAGS" | \
4850 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4851 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4856 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4857 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4864 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4865 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4872 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4873 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4875 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4877 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4878 && test -z "${cf_tst_cflags}" \
4879 && cf_fix_cppflags=no
4884 if test -n "$cf_new_cflags" ; then
4886 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4887 CFLAGS="${CFLAGS}$cf_new_cflags"
4891 if test -n "$cf_new_cppflags" ; then
4893 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4894 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4898 if test -n "$cf_new_extra_cppflags" ; then
4900 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4901 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4908 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4910 for cf_add_1lib in $cf_add_0lib; do
4911 for cf_add_2lib in $cf_add_libs; do
4912 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4917 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4921 # even with config script, some packages use no-override for curses.h
4923 echo "$as_me:4923: checking if we have identified curses headers" >&5
4924 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4925 if test "${cf_cv_ncurses_header+set}" = set; then
4926 echo $ECHO_N "(cached) $ECHO_C" >&6
4929 cf_cv_ncurses_header=none
4931 ncurses.h ncurses/ncurses.h \
4932 curses.h ncurses/curses.h
4934 cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937 #include <${cf_header}>
4941 initscr(); tgoto("?", 0,0)
4946 rm -f conftest.$ac_objext
4947 if { (eval echo "$as_me:4947: \"$ac_compile\"") >&5
4948 (eval $ac_compile) 2>&5
4950 echo "$as_me:4950: \$? = $ac_status" >&5
4951 (exit $ac_status); } &&
4952 { ac_try='test -s conftest.$ac_objext'
4953 { (eval echo "$as_me:4953: \"$ac_try\"") >&5
4956 echo "$as_me:4956: \$? = $ac_status" >&5
4957 (exit $ac_status); }; }; then
4958 cf_cv_ncurses_header=$cf_header; break
4960 echo "$as_me: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
4963 rm -f conftest.$ac_objext conftest.$ac_ext
4967 echo "$as_me:4967: result: $cf_cv_ncurses_header" >&5
4968 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4970 if test "$cf_cv_ncurses_header" = none ; then
4971 { { echo "$as_me:4971: error: No curses header-files found" >&5
4972 echo "$as_me: error: No curses header-files found" >&2;}
4973 { (exit 1); exit 1; }; }
4976 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4978 for ac_header in $cf_cv_ncurses_header
4980 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4981 echo "$as_me:4981: checking for $ac_header" >&5
4982 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4983 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4984 echo $ECHO_N "(cached) $ECHO_C" >&6
4986 cat >conftest.$ac_ext <<_ACEOF
4987 #line 4987 "configure"
4988 #include "confdefs.h"
4989 #include <$ac_header>
4991 if { (eval echo "$as_me:4991: \"$ac_cpp conftest.$ac_ext\"") >&5
4992 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4994 egrep -v '^ *\+' conftest.er1 >conftest.err
4996 cat conftest.err >&5
4997 echo "$as_me:4997: \$? = $ac_status" >&5
4998 (exit $ac_status); } >/dev/null; then
4999 if test -s conftest.err; then
5000 ac_cpp_err=$ac_c_preproc_warn_flag
5007 if test -z "$ac_cpp_err"; then
5008 eval "$as_ac_Header=yes"
5010 echo "$as_me: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 eval "$as_ac_Header=no"
5014 rm -f conftest.err conftest.$ac_ext
5016 echo "$as_me:5016: result: `eval echo '${'$as_ac_Header'}'`" >&5
5017 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5018 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5019 cat >>confdefs.h <<EOF
5020 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5026 cat >>confdefs.h <<\EOF
5030 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5032 cat >>confdefs.h <<EOF
5033 #define $cf_nculib_ROOT 1
5036 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5040 cf_ncuhdr_root=ncurses
5042 test -n "$cf_cv_curses_dir" && \
5043 test "$cf_cv_curses_dir" != "no" && { \
5045 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5046 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5048 while test $cf_add_incdir != /usr/include
5050 if test -d $cf_add_incdir
5053 if test -n "$CFLAGS$CPPFLAGS" ; then
5054 # a loop is needed to ensure we can add subdirs of existing dirs
5055 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5056 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5057 cf_have_incdir=yes; break
5062 if test "$cf_have_incdir" = no ; then
5063 if test "$cf_add_incdir" = /usr/local/include ; then
5064 if test "$GCC" = yes
5066 cf_save_CPPFLAGS=$CPPFLAGS
5068 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5069 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5071 cat >conftest.$ac_ext <<_ACEOF
5072 #line 5072 "configure"
5073 #include "confdefs.h"
5083 rm -f conftest.$ac_objext
5084 if { (eval echo "$as_me:5084: \"$ac_compile\"") >&5
5085 (eval $ac_compile) 2>&5
5087 echo "$as_me:5087: \$? = $ac_status" >&5
5088 (exit $ac_status); } &&
5089 { ac_try='test -s conftest.$ac_objext'
5090 { (eval echo "$as_me:5090: \"$ac_try\"") >&5
5093 echo "$as_me:5093: \$? = $ac_status" >&5
5094 (exit $ac_status); }; }; then
5097 echo "$as_me: failed program was:" >&5
5098 cat conftest.$ac_ext >&5
5101 rm -f conftest.$ac_objext conftest.$ac_ext
5102 CPPFLAGS=$cf_save_CPPFLAGS
5107 if test "$cf_have_incdir" = no ; then
5108 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5110 echo "${as_me:-configure}:5110: testing adding $cf_add_incdir to include-path ..." 1>&5
5112 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5114 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5115 test "$cf_top_incdir" = "$cf_add_incdir" && break
5116 cf_add_incdir="$cf_top_incdir"
5129 echo "$as_me:5129: checking for $cf_ncuhdr_root header in include-path" >&5
5130 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5131 if test "${cf_cv_ncurses_h+set}" = set; then
5132 echo $ECHO_N "(cached) $ECHO_C" >&6
5135 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5136 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5137 for cf_header in $cf_header_list
5140 cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5144 #include <$cf_header>
5149 #ifdef NCURSES_VERSION
5151 printf("%s\n", NCURSES_VERSION);
5164 rm -f conftest.$ac_objext
5165 if { (eval echo "$as_me:5165: \"$ac_compile\"") >&5
5166 (eval $ac_compile) 2>&5
5168 echo "$as_me:5168: \$? = $ac_status" >&5
5169 (exit $ac_status); } &&
5170 { ac_try='test -s conftest.$ac_objext'
5171 { (eval echo "$as_me:5171: \"$ac_try\"") >&5
5174 echo "$as_me:5174: \$? = $ac_status" >&5
5175 (exit $ac_status); }; }; then
5176 cf_cv_ncurses_h=$cf_header
5179 echo "$as_me: failed program was:" >&5
5180 cat conftest.$ac_ext >&5
5183 rm -f conftest.$ac_objext conftest.$ac_ext
5185 test "$cf_cv_ncurses_h" != no && break
5189 echo "$as_me:5189: result: $cf_cv_ncurses_h" >&5
5190 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5192 if test "$cf_cv_ncurses_h" != no ; then
5193 cf_cv_ncurses_header=$cf_cv_ncurses_h
5196 echo "$as_me:5196: checking for $cf_ncuhdr_root include-path" >&5
5197 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5198 if test "${cf_cv_ncurses_h2+set}" = set; then
5199 echo $ECHO_N "(cached) $ECHO_C" >&6
5202 test -n "$verbose" && echo
5206 # collect the current set of include-directories from compiler flags
5207 cf_header_path_list=""
5208 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5209 for cf_header_path in $CPPFLAGS $CFLAGS
5211 case $cf_header_path in
5213 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5215 test "x$cf_header_path" != "xNONE" && \
5216 test -d "$cf_header_path" && \
5218 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5219 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5220 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5221 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5222 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5223 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"
5226 cf_header_path_list="$cf_header_path_list $cf_search"
5232 # add the variations for the package we are looking for
5236 test "x$prefix" != "xNONE" && \
5237 test -d "$prefix" && \
5239 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5240 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5241 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5242 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5243 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5244 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5247 for cf_subdir_prefix in \
5256 test "x$cf_subdir_prefix" != "x$prefix" && \
5257 test -d "$cf_subdir_prefix" && \
5258 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5259 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5260 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5261 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5262 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5263 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5264 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"
5269 test "$includedir" != NONE && \
5270 test "$includedir" != "/usr/include" && \
5271 test -d "$includedir" && {
5272 test -d $includedir && cf_search="$cf_search $includedir"
5273 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5276 test "$oldincludedir" != NONE && \
5277 test "$oldincludedir" != "/usr/include" && \
5278 test -d "$oldincludedir" && {
5279 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5280 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5283 cf_search="$cf_search $cf_header_path_list"
5285 test -n "$verbose" && echo search path $cf_search
5286 cf_save2_CPPFLAGS="$CPPFLAGS"
5287 for cf_incdir in $cf_search
5290 if test -n "$cf_incdir" ; then
5291 for cf_add_incdir in $cf_incdir
5293 while test $cf_add_incdir != /usr/include
5295 if test -d $cf_add_incdir
5298 if test -n "$CFLAGS$CPPFLAGS" ; then
5299 # a loop is needed to ensure we can add subdirs of existing dirs
5300 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5301 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5302 cf_have_incdir=yes; break
5307 if test "$cf_have_incdir" = no ; then
5308 if test "$cf_add_incdir" = /usr/local/include ; then
5309 if test "$GCC" = yes
5311 cf_save_CPPFLAGS=$CPPFLAGS
5313 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5314 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5316 cat >conftest.$ac_ext <<_ACEOF
5317 #line 5317 "configure"
5318 #include "confdefs.h"
5328 rm -f conftest.$ac_objext
5329 if { (eval echo "$as_me:5329: \"$ac_compile\"") >&5
5330 (eval $ac_compile) 2>&5
5332 echo "$as_me:5332: \$? = $ac_status" >&5
5333 (exit $ac_status); } &&
5334 { ac_try='test -s conftest.$ac_objext'
5335 { (eval echo "$as_me:5335: \"$ac_try\"") >&5
5338 echo "$as_me:5338: \$? = $ac_status" >&5
5339 (exit $ac_status); }; }; then
5342 echo "$as_me: failed program was:" >&5
5343 cat conftest.$ac_ext >&5
5346 rm -f conftest.$ac_objext conftest.$ac_ext
5347 CPPFLAGS=$cf_save_CPPFLAGS
5352 if test "$cf_have_incdir" = no ; then
5353 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5355 echo "${as_me:-configure}:5355: testing adding $cf_add_incdir to include-path ..." 1>&5
5357 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5359 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5360 test "$cf_top_incdir" = "$cf_add_incdir" && break
5361 cf_add_incdir="$cf_top_incdir"
5377 cat >conftest.$ac_ext <<_ACEOF
5378 #line 5378 "configure"
5379 #include "confdefs.h"
5381 #include <$cf_header>
5386 #ifdef NCURSES_VERSION
5388 printf("%s\n", NCURSES_VERSION);
5401 rm -f conftest.$ac_objext
5402 if { (eval echo "$as_me:5402: \"$ac_compile\"") >&5
5403 (eval $ac_compile) 2>&5
5405 echo "$as_me:5405: \$? = $ac_status" >&5
5406 (exit $ac_status); } &&
5407 { ac_try='test -s conftest.$ac_objext'
5408 { (eval echo "$as_me:5408: \"$ac_try\"") >&5
5411 echo "$as_me:5411: \$? = $ac_status" >&5
5412 (exit $ac_status); }; }; then
5413 cf_cv_ncurses_h2=$cf_header
5416 echo "$as_me: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5420 rm -f conftest.$ac_objext conftest.$ac_ext
5422 if test "$cf_cv_ncurses_h2" != no ; then
5423 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5424 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5427 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5429 CPPFLAGS="$cf_save2_CPPFLAGS"
5430 test "$cf_cv_ncurses_h2" != no && break
5432 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5432: error: not found" >&5
5433 echo "$as_me: error: not found" >&2;}
5434 { (exit 1); exit 1; }; }
5437 echo "$as_me:5437: result: $cf_cv_ncurses_h2" >&5
5438 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5440 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5441 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5442 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5443 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5446 if test -n "$cf_1st_incdir" ; then
5447 for cf_add_incdir in $cf_1st_incdir
5449 while test $cf_add_incdir != /usr/include
5451 if test -d $cf_add_incdir
5454 if test -n "$CFLAGS$CPPFLAGS" ; then
5455 # a loop is needed to ensure we can add subdirs of existing dirs
5456 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5457 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5458 cf_have_incdir=yes; break
5463 if test "$cf_have_incdir" = no ; then
5464 if test "$cf_add_incdir" = /usr/local/include ; then
5465 if test "$GCC" = yes
5467 cf_save_CPPFLAGS=$CPPFLAGS
5469 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5470 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5472 cat >conftest.$ac_ext <<_ACEOF
5473 #line 5473 "configure"
5474 #include "confdefs.h"
5484 rm -f conftest.$ac_objext
5485 if { (eval echo "$as_me:5485: \"$ac_compile\"") >&5
5486 (eval $ac_compile) 2>&5
5488 echo "$as_me:5488: \$? = $ac_status" >&5
5489 (exit $ac_status); } &&
5490 { ac_try='test -s conftest.$ac_objext'
5491 { (eval echo "$as_me:5491: \"$ac_try\"") >&5
5494 echo "$as_me:5494: \$? = $ac_status" >&5
5495 (exit $ac_status); }; }; then
5498 echo "$as_me: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5502 rm -f conftest.$ac_objext conftest.$ac_ext
5503 CPPFLAGS=$cf_save_CPPFLAGS
5508 if test "$cf_have_incdir" = no ; then
5509 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5511 echo "${as_me:-configure}:5511: testing adding $cf_add_incdir to include-path ..." 1>&5
5513 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5515 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5516 test "$cf_top_incdir" = "$cf_add_incdir" && break
5517 cf_add_incdir="$cf_top_incdir"
5530 # Set definitions to allow ifdef'ing for ncurses.h
5532 case $cf_cv_ncurses_header in
5535 cat >>confdefs.h <<\EOF
5536 #define HAVE_NCURSES_H 1
5542 case $cf_cv_ncurses_header in
5543 (ncurses/curses.h|ncurses/ncurses.h)
5545 cat >>confdefs.h <<\EOF
5546 #define HAVE_NCURSES_NCURSES_H 1
5550 (ncursesw/curses.h|ncursesw/ncurses.h)
5552 cat >>confdefs.h <<\EOF
5553 #define HAVE_NCURSESW_NCURSES_H 1
5559 echo "$as_me:5559: checking for terminfo header" >&5
5560 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5561 if test "${cf_cv_term_header+set}" = set; then
5562 echo $ECHO_N "(cached) $ECHO_C" >&6
5565 case ${cf_cv_ncurses_header} in
5566 (*/ncurses.h|*/ncursesw.h)
5567 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5570 cf_term_header=term.h
5574 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5576 cat >conftest.$ac_ext <<_ACEOF
5577 #line 5577 "configure"
5578 #include "confdefs.h"
5580 #include <${cf_cv_ncurses_header:-curses.h}>
5586 int x = auto_left_margin; (void)x
5591 rm -f conftest.$ac_objext
5592 if { (eval echo "$as_me:5592: \"$ac_compile\"") >&5
5593 (eval $ac_compile) 2>&5
5595 echo "$as_me:5595: \$? = $ac_status" >&5
5596 (exit $ac_status); } &&
5597 { ac_try='test -s conftest.$ac_objext'
5598 { (eval echo "$as_me:5598: \"$ac_try\"") >&5
5601 echo "$as_me:5601: \$? = $ac_status" >&5
5602 (exit $ac_status); }; }; then
5604 cf_cv_term_header="$cf_test"
5606 echo "$as_me: failed program was:" >&5
5607 cat conftest.$ac_ext >&5
5609 cf_cv_term_header=unknown
5612 rm -f conftest.$ac_objext conftest.$ac_ext
5613 test "$cf_cv_term_header" != unknown && break
5617 echo "$as_me:5617: result: $cf_cv_term_header" >&5
5618 echo "${ECHO_T}$cf_cv_term_header" >&6
5620 # Set definitions to allow ifdef'ing to accommodate subdirectories
5622 case $cf_cv_term_header in
5625 cat >>confdefs.h <<\EOF
5626 #define HAVE_TERM_H 1
5632 case $cf_cv_term_header in
5635 cat >>confdefs.h <<\EOF
5636 #define HAVE_NCURSES_TERM_H 1
5642 cat >>confdefs.h <<\EOF
5643 #define HAVE_NCURSESW_TERM_H 1
5649 # some applications need this, but should check for NCURSES_VERSION
5651 cat >>confdefs.h <<\EOF
5655 echo "$as_me:5655: checking for ncurses version" >&5
5656 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5657 if test "${cf_cv_ncurses_version+set}" = set; then
5658 echo $ECHO_N "(cached) $ECHO_C" >&6
5661 cf_cv_ncurses_version=no
5664 if test "$cross_compiling" = yes; then
5666 # This will not work if the preprocessor splits the line after the
5667 # Autoconf token. The 'unproto' program does that.
5668 cat > conftest.$ac_ext <<EOF
5669 #include <${cf_cv_ncurses_header:-curses.h}>
5671 #ifdef NCURSES_VERSION
5672 Autoconf NCURSES_VERSION
5680 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5681 { (eval echo "$as_me:5681: \"$cf_try\"") >&5
5684 echo "$as_me:5684: \$? = $ac_status" >&5
5685 (exit $ac_status); }
5686 if test -f conftest.out ; then
5687 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5688 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5693 cat >conftest.$ac_ext <<_ACEOF
5694 #line 5694 "configure"
5695 #include "confdefs.h"
5697 #include <${cf_cv_ncurses_header:-curses.h}>
5701 FILE *fp = fopen("$cf_tempfile", "w");
5702 #ifdef NCURSES_VERSION
5703 # ifdef NCURSES_VERSION_PATCH
5704 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5706 fprintf(fp, "%s\n", NCURSES_VERSION);
5710 fprintf(fp, "old\n");
5715 ${cf_cv_main_return:-return}(0);
5718 rm -f conftest$ac_exeext
5719 if { (eval echo "$as_me:5719: \"$ac_link\"") >&5
5720 (eval $ac_link) 2>&5
5722 echo "$as_me:5722: \$? = $ac_status" >&5
5723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5724 { (eval echo "$as_me:5724: \"$ac_try\"") >&5
5727 echo "$as_me:5727: \$? = $ac_status" >&5
5728 (exit $ac_status); }; }; then
5730 cf_cv_ncurses_version=`cat $cf_tempfile`
5732 echo "$as_me: program exited with status $ac_status" >&5
5733 echo "$as_me: failed program was:" >&5
5734 cat conftest.$ac_ext >&5
5736 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5741 echo "$as_me:5741: result: $cf_cv_ncurses_version" >&5
5742 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5743 test "$cf_cv_ncurses_version" = no ||
5744 cat >>confdefs.h <<\EOF
5748 cf_nculib_root=ncurses
5749 # This works, except for the special case where we find gpm, but
5750 # ncurses is in a nonstandard location via $LIBS, and we really want
5753 cf_ncurses_SAVE="$LIBS"
5754 echo "$as_me:5754: checking for Gpm_Open in -lgpm" >&5
5755 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5756 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5757 echo $ECHO_N "(cached) $ECHO_C" >&6
5759 ac_check_lib_save_LIBS=$LIBS
5761 cat >conftest.$ac_ext <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5765 /* Override any gcc2 internal prototype to avoid an error. */
5769 /* We use char because int might match the return type of a gcc2
5770 builtin and then its argument prototype would still apply. */
5780 rm -f conftest.$ac_objext conftest$ac_exeext
5781 if { (eval echo "$as_me:5781: \"$ac_link\"") >&5
5782 (eval $ac_link) 2>&5
5784 echo "$as_me:5784: \$? = $ac_status" >&5
5785 (exit $ac_status); } &&
5786 { ac_try='test -s conftest$ac_exeext'
5787 { (eval echo "$as_me:5787: \"$ac_try\"") >&5
5790 echo "$as_me:5790: \$? = $ac_status" >&5
5791 (exit $ac_status); }; }; then
5792 ac_cv_lib_gpm_Gpm_Open=yes
5794 echo "$as_me: failed program was:" >&5
5795 cat conftest.$ac_ext >&5
5796 ac_cv_lib_gpm_Gpm_Open=no
5798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5799 LIBS=$ac_check_lib_save_LIBS
5801 echo "$as_me:5801: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5802 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5803 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5804 echo "$as_me:5804: checking for initscr in -lgpm" >&5
5805 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5806 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5807 echo $ECHO_N "(cached) $ECHO_C" >&6
5809 ac_check_lib_save_LIBS=$LIBS
5811 cat >conftest.$ac_ext <<_ACEOF
5812 #line 5812 "configure"
5813 #include "confdefs.h"
5815 /* Override any gcc2 internal prototype to avoid an error. */
5819 /* We use char because int might match the return type of a gcc2
5820 builtin and then its argument prototype would still apply. */
5830 rm -f conftest.$ac_objext conftest$ac_exeext
5831 if { (eval echo "$as_me:5831: \"$ac_link\"") >&5
5832 (eval $ac_link) 2>&5
5834 echo "$as_me:5834: \$? = $ac_status" >&5
5835 (exit $ac_status); } &&
5836 { ac_try='test -s conftest$ac_exeext'
5837 { (eval echo "$as_me:5837: \"$ac_try\"") >&5
5840 echo "$as_me:5840: \$? = $ac_status" >&5
5841 (exit $ac_status); }; }; then
5842 ac_cv_lib_gpm_initscr=yes
5844 echo "$as_me: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 ac_cv_lib_gpm_initscr=no
5848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5849 LIBS=$ac_check_lib_save_LIBS
5851 echo "$as_me:5851: result: $ac_cv_lib_gpm_initscr" >&5
5852 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5853 if test $ac_cv_lib_gpm_initscr = yes; then
5854 LIBS="$cf_ncurses_SAVE"
5856 cf_ncurses_LIBS="-lgpm"
5863 # This is only necessary if you are linking against an obsolete
5864 # version of ncurses (but it should do no harm, since it's static).
5865 if test "$cf_nculib_root" = ncurses ; then
5866 echo "$as_me:5866: checking for tgoto in -lmytinfo" >&5
5867 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5868 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5869 echo $ECHO_N "(cached) $ECHO_C" >&6
5871 ac_check_lib_save_LIBS=$LIBS
5872 LIBS="-lmytinfo $LIBS"
5873 cat >conftest.$ac_ext <<_ACEOF
5874 #line 5874 "configure"
5875 #include "confdefs.h"
5877 /* Override any gcc2 internal prototype to avoid an error. */
5881 /* We use char because int might match the return type of a gcc2
5882 builtin and then its argument prototype would still apply. */
5892 rm -f conftest.$ac_objext conftest$ac_exeext
5893 if { (eval echo "$as_me:5893: \"$ac_link\"") >&5
5894 (eval $ac_link) 2>&5
5896 echo "$as_me:5896: \$? = $ac_status" >&5
5897 (exit $ac_status); } &&
5898 { ac_try='test -s conftest$ac_exeext'
5899 { (eval echo "$as_me:5899: \"$ac_try\"") >&5
5902 echo "$as_me:5902: \$? = $ac_status" >&5
5903 (exit $ac_status); }; }; then
5904 ac_cv_lib_mytinfo_tgoto=yes
5906 echo "$as_me: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5908 ac_cv_lib_mytinfo_tgoto=no
5910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5911 LIBS=$ac_check_lib_save_LIBS
5913 echo "$as_me:5913: result: $ac_cv_lib_mytinfo_tgoto" >&5
5914 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5915 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5916 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5926 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5928 for cf_add_1lib in $cf_add_0lib; do
5929 for cf_add_2lib in $cf_add_libs; do
5930 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5935 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5939 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5945 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5947 for cf_add_1lib in $cf_add_0lib; do
5948 for cf_add_2lib in $cf_add_libs; do
5949 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5954 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5960 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5962 echo "$as_me:5962: checking for initscr" >&5
5963 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5964 if test "${ac_cv_func_initscr+set}" = set; then
5965 echo $ECHO_N "(cached) $ECHO_C" >&6
5967 cat >conftest.$ac_ext <<_ACEOF
5968 #line 5968 "configure"
5969 #include "confdefs.h"
5970 #define initscr autoconf_temporary
5971 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5978 /* We use char because int might match the return type of a gcc2
5979 builtin and then its argument prototype would still apply. */
5980 char initscr (void);
5986 /* The GNU C library defines stubs for functions which it implements
5987 to always fail with ENOSYS. Some functions are actually named
5988 something starting with __ and the normal name is an alias. */
5989 #if defined (__stub_initscr) || defined (__stub___initscr)
5990 #error found stub for initscr
5998 rm -f conftest.$ac_objext conftest$ac_exeext
5999 if { (eval echo "$as_me:5999: \"$ac_link\"") >&5
6000 (eval $ac_link) 2>&5
6002 echo "$as_me:6002: \$? = $ac_status" >&5
6003 (exit $ac_status); } &&
6004 { ac_try='test -s conftest$ac_exeext'
6005 { (eval echo "$as_me:6005: \"$ac_try\"") >&5
6008 echo "$as_me:6008: \$? = $ac_status" >&5
6009 (exit $ac_status); }; }; then
6010 ac_cv_func_initscr=yes
6012 echo "$as_me: failed program was:" >&5
6013 cat conftest.$ac_ext >&5
6014 ac_cv_func_initscr=no
6016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6018 echo "$as_me:6018: result: $ac_cv_func_initscr" >&5
6019 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6020 if test $ac_cv_func_initscr = yes; then
6021 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6024 cf_save_LIBS="$LIBS"
6025 echo "$as_me:6025: checking for initscr in -l$cf_nculib_root" >&5
6026 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6027 LIBS="-l$cf_nculib_root $LIBS"
6028 cat >conftest.$ac_ext <<_ACEOF
6029 #line 6029 "configure"
6030 #include "confdefs.h"
6031 #include <${cf_cv_ncurses_header:-curses.h}>
6040 rm -f conftest.$ac_objext conftest$ac_exeext
6041 if { (eval echo "$as_me:6041: \"$ac_link\"") >&5
6042 (eval $ac_link) 2>&5
6044 echo "$as_me:6044: \$? = $ac_status" >&5
6045 (exit $ac_status); } &&
6046 { ac_try='test -s conftest$ac_exeext'
6047 { (eval echo "$as_me:6047: \"$ac_try\"") >&5
6050 echo "$as_me:6050: \$? = $ac_status" >&5
6051 (exit $ac_status); }; }; then
6052 echo "$as_me:6052: result: yes" >&5
6053 echo "${ECHO_T}yes" >&6
6054 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6057 echo "$as_me: failed program was:" >&5
6058 cat conftest.$ac_ext >&5
6059 echo "$as_me:6059: result: no" >&5
6060 echo "${ECHO_T}no" >&6
6063 cf_library_path_list=""
6064 if test -n "${LDFLAGS}${LIBS}" ; then
6065 for cf_library_path in $LDFLAGS $LIBS
6067 case $cf_library_path in
6069 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6071 test "x$cf_library_path" != "xNONE" && \
6072 test -d "$cf_library_path" && \
6074 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6075 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6076 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6077 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6078 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6079 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"
6082 cf_library_path_list="$cf_library_path_list $cf_search"
6090 test "x$prefix" != "xNONE" && \
6091 test -d "$prefix" && \
6093 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6094 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6095 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6096 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6097 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6098 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6101 for cf_subdir_prefix in \
6110 test "x$cf_subdir_prefix" != "x$prefix" && \
6111 test -d "$cf_subdir_prefix" && \
6112 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6113 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6114 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6115 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6116 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6117 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6118 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"
6123 cf_search="$cf_library_path_list $cf_search"
6125 for cf_libdir in $cf_search
6127 echo "$as_me:6127: checking for -l$cf_nculib_root in $cf_libdir" >&5
6128 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6129 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6130 cat >conftest.$ac_ext <<_ACEOF
6131 #line 6131 "configure"
6132 #include "confdefs.h"
6133 #include <${cf_cv_ncurses_header:-curses.h}>
6142 rm -f conftest.$ac_objext conftest$ac_exeext
6143 if { (eval echo "$as_me:6143: \"$ac_link\"") >&5
6144 (eval $ac_link) 2>&5
6146 echo "$as_me:6146: \$? = $ac_status" >&5
6147 (exit $ac_status); } &&
6148 { ac_try='test -s conftest$ac_exeext'
6149 { (eval echo "$as_me:6149: \"$ac_try\"") >&5
6152 echo "$as_me:6152: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6154 echo "$as_me:6154: result: yes" >&5
6155 echo "${ECHO_T}yes" >&6
6156 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6159 echo "$as_me: failed program was:" >&5
6160 cat conftest.$ac_ext >&5
6161 echo "$as_me:6161: result: no" >&5
6162 echo "${ECHO_T}no" >&6
6163 LIBS="$cf_save_LIBS"
6165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6169 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6173 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6175 if test $cf_found_library = no ; then
6176 { { echo "$as_me:6176: error: Cannot link $cf_nculib_root library" >&5
6177 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6178 { (exit 1); exit 1; }; }
6183 if test -n "$cf_ncurses_LIBS" ; then
6184 echo "$as_me:6184: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6185 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6186 cf_ncurses_SAVE="$LIBS"
6187 for p in $cf_ncurses_LIBS ; do
6188 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6189 if test "$q" != "$LIBS" ; then
6193 cat >conftest.$ac_ext <<_ACEOF
6194 #line 6194 "configure"
6195 #include "confdefs.h"
6196 #include <${cf_cv_ncurses_header:-curses.h}>
6200 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6205 rm -f conftest.$ac_objext conftest$ac_exeext
6206 if { (eval echo "$as_me:6206: \"$ac_link\"") >&5
6207 (eval $ac_link) 2>&5
6209 echo "$as_me:6209: \$? = $ac_status" >&5
6210 (exit $ac_status); } &&
6211 { ac_try='test -s conftest$ac_exeext'
6212 { (eval echo "$as_me:6212: \"$ac_try\"") >&5
6215 echo "$as_me:6215: \$? = $ac_status" >&5
6216 (exit $ac_status); }; }; then
6217 echo "$as_me:6217: result: yes" >&5
6218 echo "${ECHO_T}yes" >&6
6220 echo "$as_me: failed program was:" >&5
6221 cat conftest.$ac_ext >&5
6222 echo "$as_me:6222: result: no" >&5
6223 echo "${ECHO_T}no" >&6
6224 LIBS="$cf_ncurses_SAVE"
6226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6229 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6231 cat >>confdefs.h <<EOF
6232 #define $cf_nculib_ROOT 1
6240 echo "$as_me:6240: checking if you want wide-character code" >&5
6241 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6243 # Check whether --enable-widec or --disable-widec was given.
6244 if test "${enable_widec+set}" = set; then
6245 enableval="$enable_widec"
6246 with_widec=$enableval
6250 echo "$as_me:6250: result: $with_widec" >&5
6251 echo "${ECHO_T}$with_widec" >&6
6252 if test "$with_widec" = yes ; then
6254 echo "$as_me:6254: checking for multibyte character support" >&5
6255 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6256 if test "${cf_cv_utf8_lib+set}" = set; then
6257 echo $ECHO_N "(cached) $ECHO_C" >&6
6260 cf_save_LIBS="$LIBS"
6261 cat >conftest.$ac_ext <<_ACEOF
6262 #line 6262 "configure"
6263 #include "confdefs.h"
6274 rm -f conftest.$ac_objext conftest$ac_exeext
6275 if { (eval echo "$as_me:6275: \"$ac_link\"") >&5
6276 (eval $ac_link) 2>&5
6278 echo "$as_me:6278: \$? = $ac_status" >&5
6279 (exit $ac_status); } &&
6280 { ac_try='test -s conftest$ac_exeext'
6281 { (eval echo "$as_me:6281: \"$ac_try\"") >&5
6284 echo "$as_me:6284: \$? = $ac_status" >&5
6285 (exit $ac_status); }; }; then
6288 echo "$as_me: failed program was:" >&5
6289 cat conftest.$ac_ext >&5
6291 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6292 # will be set on completion of the AC_TRY_LINK below.
6293 cf_cv_header_path_utf8=
6294 cf_cv_library_path_utf8=
6296 echo "${as_me:-configure}:6296: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6298 cf_save_LIBS="$LIBS"
6300 cat >conftest.$ac_ext <<_ACEOF
6301 #line 6301 "configure"
6302 #include "confdefs.h"
6304 #include <libutf8.h>
6313 rm -f conftest.$ac_objext conftest$ac_exeext
6314 if { (eval echo "$as_me:6314: \"$ac_link\"") >&5
6315 (eval $ac_link) 2>&5
6317 echo "$as_me:6317: \$? = $ac_status" >&5
6318 (exit $ac_status); } &&
6319 { ac_try='test -s conftest$ac_exeext'
6320 { (eval echo "$as_me:6320: \"$ac_try\"") >&5
6323 echo "$as_me:6323: \$? = $ac_status" >&5
6324 (exit $ac_status); }; }; then
6326 cf_cv_find_linkage_utf8=yes
6327 cf_cv_header_path_utf8=/usr/include
6328 cf_cv_library_path_utf8=/usr/lib
6331 echo "$as_me: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6334 LIBS="-lutf8 $cf_save_LIBS"
6336 cat >conftest.$ac_ext <<_ACEOF
6337 #line 6337 "configure"
6338 #include "confdefs.h"
6340 #include <libutf8.h>
6349 rm -f conftest.$ac_objext conftest$ac_exeext
6350 if { (eval echo "$as_me:6350: \"$ac_link\"") >&5
6351 (eval $ac_link) 2>&5
6353 echo "$as_me:6353: \$? = $ac_status" >&5
6354 (exit $ac_status); } &&
6355 { ac_try='test -s conftest$ac_exeext'
6356 { (eval echo "$as_me:6356: \"$ac_try\"") >&5
6359 echo "$as_me:6359: \$? = $ac_status" >&5
6360 (exit $ac_status); }; }; then
6362 cf_cv_find_linkage_utf8=yes
6363 cf_cv_header_path_utf8=/usr/include
6364 cf_cv_library_path_utf8=/usr/lib
6365 cf_cv_library_file_utf8="-lutf8"
6368 echo "$as_me: failed program was:" >&5
6369 cat conftest.$ac_ext >&5
6371 cf_cv_find_linkage_utf8=no
6372 LIBS="$cf_save_LIBS"
6374 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6376 echo "${as_me:-configure}:6376: testing find linkage for utf8 library ..." 1>&5
6378 echo "${as_me:-configure}:6378: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6380 cf_save_CPPFLAGS="$CPPFLAGS"
6381 cf_test_CPPFLAGS="$CPPFLAGS"
6385 # collect the current set of include-directories from compiler flags
6386 cf_header_path_list=""
6387 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6388 for cf_header_path in $CPPFLAGS $CFLAGS
6390 case $cf_header_path in
6392 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6394 test "x$cf_header_path" != "xNONE" && \
6395 test -d "$cf_header_path" && \
6397 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6398 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6399 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6400 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6401 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6402 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6405 cf_header_path_list="$cf_header_path_list $cf_search"
6411 # add the variations for the package we are looking for
6415 test "x$prefix" != "xNONE" && \
6416 test -d "$prefix" && \
6418 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6419 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6420 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6421 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6422 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6423 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6426 for cf_subdir_prefix in \
6435 test "x$cf_subdir_prefix" != "x$prefix" && \
6436 test -d "$cf_subdir_prefix" && \
6437 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6438 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6439 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6440 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6441 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6442 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6443 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6448 test "$includedir" != NONE && \
6449 test "$includedir" != "/usr/include" && \
6450 test -d "$includedir" && {
6451 test -d $includedir && cf_search="$cf_search $includedir"
6452 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6455 test "$oldincludedir" != NONE && \
6456 test "$oldincludedir" != "/usr/include" && \
6457 test -d "$oldincludedir" && {
6458 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6459 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6462 cf_search="$cf_search $cf_header_path_list"
6464 for cf_cv_header_path_utf8 in $cf_search
6466 if test -d $cf_cv_header_path_utf8 ; then
6467 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6469 echo "${as_me:-configure}:6469: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6471 CPPFLAGS="$cf_save_CPPFLAGS"
6473 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6474 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6476 cat >conftest.$ac_ext <<_ACEOF
6477 #line 6477 "configure"
6478 #include "confdefs.h"
6480 #include <libutf8.h>
6489 rm -f conftest.$ac_objext
6490 if { (eval echo "$as_me:6490: \"$ac_compile\"") >&5
6491 (eval $ac_compile) 2>&5
6493 echo "$as_me:6493: \$? = $ac_status" >&5
6494 (exit $ac_status); } &&
6495 { ac_try='test -s conftest.$ac_objext'
6496 { (eval echo "$as_me:6496: \"$ac_try\"") >&5
6499 echo "$as_me:6499: \$? = $ac_status" >&5
6500 (exit $ac_status); }; }; then
6502 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6504 echo "${as_me:-configure}:6504: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6506 cf_cv_find_linkage_utf8=maybe
6507 cf_test_CPPFLAGS="$CPPFLAGS"
6510 echo "$as_me: failed program was:" >&5
6511 cat conftest.$ac_ext >&5
6513 CPPFLAGS="$cf_save_CPPFLAGS"
6516 rm -f conftest.$ac_objext conftest.$ac_ext
6520 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6522 echo "${as_me:-configure}:6522: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6524 cf_save_LIBS="$LIBS"
6525 cf_save_LDFLAGS="$LDFLAGS"
6527 if test "$cf_cv_find_linkage_utf8" != yes ; then
6530 cf_library_path_list=""
6531 if test -n "${LDFLAGS}${LIBS}" ; then
6532 for cf_library_path in $LDFLAGS $LIBS
6534 case $cf_library_path in
6536 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6538 test "x$cf_library_path" != "xNONE" && \
6539 test -d "$cf_library_path" && \
6541 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6542 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6543 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6544 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6545 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6546 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6549 cf_library_path_list="$cf_library_path_list $cf_search"
6557 test "x$prefix" != "xNONE" && \
6558 test -d "$prefix" && \
6560 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6561 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6562 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6563 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6564 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6565 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6568 for cf_subdir_prefix in \
6577 test "x$cf_subdir_prefix" != "x$prefix" && \
6578 test -d "$cf_subdir_prefix" && \
6579 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6580 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6581 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6582 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6583 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6584 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6585 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6590 cf_search="$cf_library_path_list $cf_search"
6592 for cf_cv_library_path_utf8 in $cf_search
6594 if test -d $cf_cv_library_path_utf8 ; then
6595 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6597 echo "${as_me:-configure}:6597: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6599 CPPFLAGS="$cf_test_CPPFLAGS"
6600 LIBS="-lutf8 $cf_save_LIBS"
6601 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6602 cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6606 #include <libutf8.h>
6615 rm -f conftest.$ac_objext conftest$ac_exeext
6616 if { (eval echo "$as_me:6616: \"$ac_link\"") >&5
6617 (eval $ac_link) 2>&5
6619 echo "$as_me:6619: \$? = $ac_status" >&5
6620 (exit $ac_status); } &&
6621 { ac_try='test -s conftest$ac_exeext'
6622 { (eval echo "$as_me:6622: \"$ac_try\"") >&5
6625 echo "$as_me:6625: \$? = $ac_status" >&5
6626 (exit $ac_status); }; }; then
6628 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6630 echo "${as_me:-configure}:6630: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6632 cf_cv_find_linkage_utf8=yes
6633 cf_cv_library_file_utf8="-lutf8"
6636 echo "$as_me: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6639 CPPFLAGS="$cf_save_CPPFLAGS"
6640 LIBS="$cf_save_LIBS"
6641 LDFLAGS="$cf_save_LDFLAGS"
6644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6647 CPPFLAGS="$cf_save_CPPFLAGS"
6648 LDFLAGS="$cf_save_LDFLAGS"
6652 cf_cv_find_linkage_utf8=no
6656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6659 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6661 LIBS="$cf_save_LIBS"
6663 if test "$cf_cv_find_linkage_utf8" = yes ; then
6664 cf_cv_utf8_lib=add-on
6670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6672 echo "$as_me:6672: result: $cf_cv_utf8_lib" >&5
6673 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6675 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6677 if test "$cf_cv_utf8_lib" = "add-on" ; then
6679 cat >>confdefs.h <<\EOF
6680 #define HAVE_LIBUTF8_H 1
6683 if test -n "$cf_cv_header_path_utf8" ; then
6684 for cf_add_incdir in $cf_cv_header_path_utf8
6686 while test $cf_add_incdir != /usr/include
6688 if test -d $cf_add_incdir
6691 if test -n "$CFLAGS$CPPFLAGS" ; then
6692 # a loop is needed to ensure we can add subdirs of existing dirs
6693 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6694 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6695 cf_have_incdir=yes; break
6700 if test "$cf_have_incdir" = no ; then
6701 if test "$cf_add_incdir" = /usr/local/include ; then
6702 if test "$GCC" = yes
6704 cf_save_CPPFLAGS=$CPPFLAGS
6706 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6707 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6709 cat >conftest.$ac_ext <<_ACEOF
6710 #line 6710 "configure"
6711 #include "confdefs.h"
6721 rm -f conftest.$ac_objext
6722 if { (eval echo "$as_me:6722: \"$ac_compile\"") >&5
6723 (eval $ac_compile) 2>&5
6725 echo "$as_me:6725: \$? = $ac_status" >&5
6726 (exit $ac_status); } &&
6727 { ac_try='test -s conftest.$ac_objext'
6728 { (eval echo "$as_me:6728: \"$ac_try\"") >&5
6731 echo "$as_me:6731: \$? = $ac_status" >&5
6732 (exit $ac_status); }; }; then
6735 echo "$as_me: failed program was:" >&5
6736 cat conftest.$ac_ext >&5
6739 rm -f conftest.$ac_objext conftest.$ac_ext
6740 CPPFLAGS=$cf_save_CPPFLAGS
6745 if test "$cf_have_incdir" = no ; then
6746 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6748 echo "${as_me:-configure}:6748: testing adding $cf_add_incdir to include-path ..." 1>&5
6750 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6752 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6753 test "$cf_top_incdir" = "$cf_add_incdir" && break
6754 cf_add_incdir="$cf_top_incdir"
6765 if test -n "$cf_cv_library_path_utf8" ; then
6766 for cf_add_libdir in $cf_cv_library_path_utf8
6768 if test $cf_add_libdir = /usr/lib ; then
6770 elif test -d $cf_add_libdir
6773 if test -n "$LDFLAGS$LIBS" ; then
6774 # a loop is needed to ensure we can add subdirs of existing dirs
6775 for cf_test_libdir in $LDFLAGS $LIBS ; do
6776 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6777 cf_have_libdir=yes; break
6781 if test "$cf_have_libdir" = no ; then
6782 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6784 echo "${as_me:-configure}:6784: testing adding $cf_add_libdir to library-path ..." 1>&5
6786 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6795 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6797 for cf_add_1lib in $cf_add_0lib; do
6798 for cf_add_2lib in $cf_add_libs; do
6799 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6804 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6810 cf_ncuconfig_root=ncursesw
6811 cf_have_ncuconfig=no
6813 if test "x${PKG_CONFIG:=none}" != xnone; then
6814 echo "$as_me:6814: checking pkg-config for $cf_ncuconfig_root" >&5
6815 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6816 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6817 echo "$as_me:6817: result: yes" >&5
6818 echo "${ECHO_T}yes" >&6
6820 echo "$as_me:6820: checking if the $cf_ncuconfig_root package files work" >&5
6821 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6822 cf_have_ncuconfig=unknown
6824 cf_save_CFLAGS="$CFLAGS"
6825 cf_save_CPPFLAGS="$CPPFLAGS"
6826 cf_save_LIBS="$LIBS"
6828 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
6829 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
6831 # while -W for passing linker flags is prevalent, it is not "standard".
6832 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
6833 # incompatible _and_ non-standard -W option which gives an error. Work
6834 # around that pitfall.
6835 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
6841 cf_new_extra_cppflags=
6843 for cf_add_cflags in $cf_pkg_cflags
6845 case $cf_fix_cppflags in
6847 case $cf_add_cflags in
6848 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6849 case $cf_add_cflags in
6851 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6854 && test -z "${cf_tst_cflags}" \
6855 && cf_fix_cppflags=yes
6857 if test $cf_fix_cppflags = yes ; then
6859 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6860 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6863 elif test "${cf_tst_cflags}" = "\"'" ; then
6865 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6866 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6876 case $cf_add_cflags in
6878 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6880 CPPFLAGS=`echo "$CPPFLAGS" | \
6881 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6882 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6887 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6888 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6895 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6896 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6903 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6904 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6906 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6908 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6909 && test -z "${cf_tst_cflags}" \
6910 && cf_fix_cppflags=no
6915 if test -n "$cf_new_cflags" ; then
6917 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6918 CFLAGS="${CFLAGS}$cf_new_cflags"
6922 if test -n "$cf_new_cppflags" ; then
6924 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6925 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6929 if test -n "$cf_new_extra_cppflags" ; then
6931 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6932 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6939 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6941 for cf_add_1lib in $cf_add_0lib; do
6942 for cf_add_2lib in $cf_add_libs; do
6943 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6948 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6952 cat >conftest.$ac_ext <<_ACEOF
6953 #line 6953 "configure"
6954 #include "confdefs.h"
6955 #include <${cf_cv_ncurses_header:-curses.h}>
6959 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6964 rm -f conftest.$ac_objext conftest$ac_exeext
6965 if { (eval echo "$as_me:6965: \"$ac_link\"") >&5
6966 (eval $ac_link) 2>&5
6968 echo "$as_me:6968: \$? = $ac_status" >&5
6969 (exit $ac_status); } &&
6970 { ac_try='test -s conftest$ac_exeext'
6971 { (eval echo "$as_me:6971: \"$ac_try\"") >&5
6974 echo "$as_me:6974: \$? = $ac_status" >&5
6975 (exit $ac_status); }; }; then
6976 if test "$cross_compiling" = yes; then
6977 cf_test_ncuconfig=maybe
6979 cat >conftest.$ac_ext <<_ACEOF
6980 #line 6980 "configure"
6981 #include "confdefs.h"
6982 #include <${cf_cv_ncurses_header:-curses.h}>
6984 { char *xx = curses_version(); return (xx == 0); }
6986 rm -f conftest$ac_exeext
6987 if { (eval echo "$as_me:6987: \"$ac_link\"") >&5
6988 (eval $ac_link) 2>&5
6990 echo "$as_me:6990: \$? = $ac_status" >&5
6991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6992 { (eval echo "$as_me:6992: \"$ac_try\"") >&5
6995 echo "$as_me:6995: \$? = $ac_status" >&5
6996 (exit $ac_status); }; }; then
6997 cf_test_ncuconfig=yes
6999 echo "$as_me: program exited with status $ac_status" >&5
7000 echo "$as_me: failed program was:" >&5
7001 cat conftest.$ac_ext >&5
7002 cf_test_ncuconfig=no
7004 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7007 echo "$as_me: failed program was:" >&5
7008 cat conftest.$ac_ext >&5
7009 cf_test_ncuconfig=no
7011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7013 CFLAGS="$cf_save_CFLAGS"
7014 CPPFLAGS="$cf_save_CPPFLAGS"
7015 LIBS="$cf_save_LIBS"
7017 if test "x$cf_test_ncuconfig" != xyes; then
7018 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7019 cf_pkg_cflags="$cf_temp"
7020 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7021 cf_pkg_libs="$cf_temp"
7029 cf_new_extra_cppflags=
7031 for cf_add_cflags in $cf_pkg_cflags
7033 case $cf_fix_cppflags in
7035 case $cf_add_cflags in
7036 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7037 case $cf_add_cflags in
7039 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7041 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7042 && test -z "${cf_tst_cflags}" \
7043 && cf_fix_cppflags=yes
7045 if test $cf_fix_cppflags = yes ; then
7047 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7048 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7051 elif test "${cf_tst_cflags}" = "\"'" ; then
7053 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7054 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7064 case $cf_add_cflags in
7066 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7068 CPPFLAGS=`echo "$CPPFLAGS" | \
7069 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7070 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7075 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7076 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7083 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7084 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7091 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7092 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7094 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7096 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7097 && test -z "${cf_tst_cflags}" \
7098 && cf_fix_cppflags=no
7103 if test -n "$cf_new_cflags" ; then
7105 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7106 CFLAGS="${CFLAGS}$cf_new_cflags"
7110 if test -n "$cf_new_cppflags" ; then
7112 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7113 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7117 if test -n "$cf_new_extra_cppflags" ; then
7119 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7120 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7127 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7129 for cf_add_1lib in $cf_add_0lib; do
7130 for cf_add_2lib in $cf_add_libs; do
7131 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7136 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7140 cat >conftest.$ac_ext <<_ACEOF
7141 #line 7141 "configure"
7142 #include "confdefs.h"
7143 #include <${cf_cv_ncurses_header:-curses.h}>
7147 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7152 rm -f conftest.$ac_objext conftest$ac_exeext
7153 if { (eval echo "$as_me:7153: \"$ac_link\"") >&5
7154 (eval $ac_link) 2>&5
7156 echo "$as_me:7156: \$? = $ac_status" >&5
7157 (exit $ac_status); } &&
7158 { ac_try='test -s conftest$ac_exeext'
7159 { (eval echo "$as_me:7159: \"$ac_try\"") >&5
7162 echo "$as_me:7162: \$? = $ac_status" >&5
7163 (exit $ac_status); }; }; then
7164 if test "$cross_compiling" = yes; then
7165 cf_have_ncuconfig=maybe
7167 cat >conftest.$ac_ext <<_ACEOF
7168 #line 7168 "configure"
7169 #include "confdefs.h"
7170 #include <${cf_cv_ncurses_header:-curses.h}>
7172 { char *xx = curses_version(); return (xx == 0); }
7174 rm -f conftest$ac_exeext
7175 if { (eval echo "$as_me:7175: \"$ac_link\"") >&5
7176 (eval $ac_link) 2>&5
7178 echo "$as_me:7178: \$? = $ac_status" >&5
7179 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7180 { (eval echo "$as_me:7180: \"$ac_try\"") >&5
7183 echo "$as_me:7183: \$? = $ac_status" >&5
7184 (exit $ac_status); }; }; then
7185 cf_have_ncuconfig=yes
7187 echo "$as_me: program exited with status $ac_status" >&5
7188 echo "$as_me: failed program was:" >&5
7189 cat conftest.$ac_ext >&5
7190 cf_have_ncuconfig=no
7192 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7195 echo "$as_me: failed program was:" >&5
7196 cat conftest.$ac_ext >&5
7197 cf_have_ncuconfig=no
7199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7200 echo "$as_me:7200: result: $cf_have_ncuconfig" >&5
7201 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7202 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7203 if test "$cf_have_ncuconfig" != "yes"
7205 CPPFLAGS="$cf_save_CPPFLAGS"
7206 LIBS="$cf_save_LIBS"
7207 NCURSES_CONFIG_PKG=none
7210 cat >>confdefs.h <<\EOF
7214 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7216 echo "$as_me:7216: checking for terminfo header" >&5
7217 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7218 if test "${cf_cv_term_header+set}" = set; then
7219 echo $ECHO_N "(cached) $ECHO_C" >&6
7222 case ${cf_cv_ncurses_header} in
7223 (*/ncurses.h|*/ncursesw.h)
7224 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7227 cf_term_header=term.h
7231 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7233 cat >conftest.$ac_ext <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7237 #include <${cf_cv_ncurses_header:-curses.h}>
7243 int x = auto_left_margin; (void)x
7248 rm -f conftest.$ac_objext
7249 if { (eval echo "$as_me:7249: \"$ac_compile\"") >&5
7250 (eval $ac_compile) 2>&5
7252 echo "$as_me:7252: \$? = $ac_status" >&5
7253 (exit $ac_status); } &&
7254 { ac_try='test -s conftest.$ac_objext'
7255 { (eval echo "$as_me:7255: \"$ac_try\"") >&5
7258 echo "$as_me:7258: \$? = $ac_status" >&5
7259 (exit $ac_status); }; }; then
7261 cf_cv_term_header="$cf_test"
7263 echo "$as_me: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7266 cf_cv_term_header=unknown
7269 rm -f conftest.$ac_objext conftest.$ac_ext
7270 test "$cf_cv_term_header" != unknown && break
7274 echo "$as_me:7274: result: $cf_cv_term_header" >&5
7275 echo "${ECHO_T}$cf_cv_term_header" >&6
7277 # Set definitions to allow ifdef'ing to accommodate subdirectories
7279 case $cf_cv_term_header in
7282 cat >>confdefs.h <<\EOF
7283 #define HAVE_TERM_H 1
7289 case $cf_cv_term_header in
7292 cat >>confdefs.h <<\EOF
7293 #define HAVE_NCURSES_TERM_H 1
7299 cat >>confdefs.h <<\EOF
7300 #define HAVE_NCURSESW_TERM_H 1
7309 echo "$as_me:7309: result: no" >&5
7310 echo "${ECHO_T}no" >&6
7311 NCURSES_CONFIG_PKG=none
7314 NCURSES_CONFIG_PKG=none
7317 if test "x$cf_have_ncuconfig" = "xno"; then
7318 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7320 if test -n "$ac_tool_prefix"; then
7321 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7323 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7324 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7325 echo "$as_me:7325: checking for $ac_word" >&5
7326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7327 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7328 echo $ECHO_N "(cached) $ECHO_C" >&6
7330 if test -n "$NCURSES_CONFIG"; then
7331 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7333 ac_save_IFS=$IFS; IFS=$ac_path_separator
7335 for ac_dir in $ac_dummy; do
7337 test -z "$ac_dir" && ac_dir=.
7338 $as_executable_p "$ac_dir/$ac_word" || continue
7339 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7340 echo "$as_me:7340: found $ac_dir/$ac_word" >&5
7346 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7347 if test -n "$NCURSES_CONFIG"; then
7348 echo "$as_me:7348: result: $NCURSES_CONFIG" >&5
7349 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7351 echo "$as_me:7351: result: no" >&5
7352 echo "${ECHO_T}no" >&6
7355 test -n "$NCURSES_CONFIG" && break
7358 if test -z "$NCURSES_CONFIG"; then
7359 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7360 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7362 # Extract the first word of "$ac_prog", so it can be a program name with args.
7363 set dummy $ac_prog; ac_word=$2
7364 echo "$as_me:7364: checking for $ac_word" >&5
7365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7366 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7367 echo $ECHO_N "(cached) $ECHO_C" >&6
7369 if test -n "$ac_ct_NCURSES_CONFIG"; then
7370 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7372 ac_save_IFS=$IFS; IFS=$ac_path_separator
7374 for ac_dir in $ac_dummy; do
7376 test -z "$ac_dir" && ac_dir=.
7377 $as_executable_p "$ac_dir/$ac_word" || continue
7378 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7379 echo "$as_me:7379: found $ac_dir/$ac_word" >&5
7385 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7386 if test -n "$ac_ct_NCURSES_CONFIG"; then
7387 echo "$as_me:7387: result: $ac_ct_NCURSES_CONFIG" >&5
7388 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7390 echo "$as_me:7390: result: no" >&5
7391 echo "${ECHO_T}no" >&6
7394 test -n "$ac_ct_NCURSES_CONFIG" && break
7396 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7398 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7401 if test "$NCURSES_CONFIG" != none ; then
7406 cf_new_extra_cppflags=
7408 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7410 case $cf_fix_cppflags in
7412 case $cf_add_cflags in
7413 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7414 case $cf_add_cflags in
7416 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7418 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7419 && test -z "${cf_tst_cflags}" \
7420 && cf_fix_cppflags=yes
7422 if test $cf_fix_cppflags = yes ; then
7424 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7425 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7428 elif test "${cf_tst_cflags}" = "\"'" ; then
7430 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7431 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7441 case $cf_add_cflags in
7443 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7445 CPPFLAGS=`echo "$CPPFLAGS" | \
7446 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7447 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7452 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7453 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7460 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7461 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7468 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7469 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7471 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7473 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7474 && test -z "${cf_tst_cflags}" \
7475 && cf_fix_cppflags=no
7480 if test -n "$cf_new_cflags" ; then
7482 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7483 CFLAGS="${CFLAGS}$cf_new_cflags"
7487 if test -n "$cf_new_cppflags" ; then
7489 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7490 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7494 if test -n "$cf_new_extra_cppflags" ; then
7496 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7497 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7504 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7506 for cf_add_1lib in $cf_add_0lib; do
7507 for cf_add_2lib in $cf_add_libs; do
7508 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7513 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7517 # even with config script, some packages use no-override for curses.h
7519 echo "$as_me:7519: checking if we have identified curses headers" >&5
7520 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7521 if test "${cf_cv_ncurses_header+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7525 cf_cv_ncurses_header=none
7527 ncurses.h ncursesw/ncurses.h \
7528 curses.h ncursesw/curses.h
7530 cat >conftest.$ac_ext <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533 #include <${cf_header}>
7537 initscr(); tgoto("?", 0,0)
7542 rm -f conftest.$ac_objext
7543 if { (eval echo "$as_me:7543: \"$ac_compile\"") >&5
7544 (eval $ac_compile) 2>&5
7546 echo "$as_me:7546: \$? = $ac_status" >&5
7547 (exit $ac_status); } &&
7548 { ac_try='test -s conftest.$ac_objext'
7549 { (eval echo "$as_me:7549: \"$ac_try\"") >&5
7552 echo "$as_me:7552: \$? = $ac_status" >&5
7553 (exit $ac_status); }; }; then
7554 cf_cv_ncurses_header=$cf_header; break
7556 echo "$as_me: failed program was:" >&5
7557 cat conftest.$ac_ext >&5
7559 rm -f conftest.$ac_objext conftest.$ac_ext
7563 echo "$as_me:7563: result: $cf_cv_ncurses_header" >&5
7564 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7566 if test "$cf_cv_ncurses_header" = none ; then
7567 { { echo "$as_me:7567: error: No curses header-files found" >&5
7568 echo "$as_me: error: No curses header-files found" >&2;}
7569 { (exit 1); exit 1; }; }
7572 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7574 for ac_header in $cf_cv_ncurses_header
7576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7577 echo "$as_me:7577: checking for $ac_header" >&5
7578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7580 echo $ECHO_N "(cached) $ECHO_C" >&6
7582 cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585 #include <$ac_header>
7587 if { (eval echo "$as_me:7587: \"$ac_cpp conftest.$ac_ext\"") >&5
7588 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7590 egrep -v '^ *\+' conftest.er1 >conftest.err
7592 cat conftest.err >&5
7593 echo "$as_me:7593: \$? = $ac_status" >&5
7594 (exit $ac_status); } >/dev/null; then
7595 if test -s conftest.err; then
7596 ac_cpp_err=$ac_c_preproc_warn_flag
7603 if test -z "$ac_cpp_err"; then
7604 eval "$as_ac_Header=yes"
7606 echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 eval "$as_ac_Header=no"
7610 rm -f conftest.err conftest.$ac_ext
7612 echo "$as_me:7612: result: `eval echo '${'$as_ac_Header'}'`" >&5
7613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7615 cat >>confdefs.h <<EOF
7616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7622 cat >>confdefs.h <<\EOF
7626 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7628 cat >>confdefs.h <<EOF
7629 #define $cf_nculib_ROOT 1
7632 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7636 cf_ncuhdr_root=ncursesw
7638 test -n "$cf_cv_curses_dir" && \
7639 test "$cf_cv_curses_dir" != "no" && { \
7641 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7642 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7644 while test $cf_add_incdir != /usr/include
7646 if test -d $cf_add_incdir
7649 if test -n "$CFLAGS$CPPFLAGS" ; then
7650 # a loop is needed to ensure we can add subdirs of existing dirs
7651 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7652 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7653 cf_have_incdir=yes; break
7658 if test "$cf_have_incdir" = no ; then
7659 if test "$cf_add_incdir" = /usr/local/include ; then
7660 if test "$GCC" = yes
7662 cf_save_CPPFLAGS=$CPPFLAGS
7664 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7665 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7667 cat >conftest.$ac_ext <<_ACEOF
7668 #line 7668 "configure"
7669 #include "confdefs.h"
7679 rm -f conftest.$ac_objext
7680 if { (eval echo "$as_me:7680: \"$ac_compile\"") >&5
7681 (eval $ac_compile) 2>&5
7683 echo "$as_me:7683: \$? = $ac_status" >&5
7684 (exit $ac_status); } &&
7685 { ac_try='test -s conftest.$ac_objext'
7686 { (eval echo "$as_me:7686: \"$ac_try\"") >&5
7689 echo "$as_me:7689: \$? = $ac_status" >&5
7690 (exit $ac_status); }; }; then
7693 echo "$as_me: failed program was:" >&5
7694 cat conftest.$ac_ext >&5
7697 rm -f conftest.$ac_objext conftest.$ac_ext
7698 CPPFLAGS=$cf_save_CPPFLAGS
7703 if test "$cf_have_incdir" = no ; then
7704 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7706 echo "${as_me:-configure}:7706: testing adding $cf_add_incdir to include-path ..." 1>&5
7708 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7710 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7711 test "$cf_top_incdir" = "$cf_add_incdir" && break
7712 cf_add_incdir="$cf_top_incdir"
7725 echo "$as_me:7725: checking for $cf_ncuhdr_root header in include-path" >&5
7726 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7727 if test "${cf_cv_ncurses_h+set}" = set; then
7728 echo $ECHO_N "(cached) $ECHO_C" >&6
7731 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7732 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7733 for cf_header in $cf_header_list
7736 cat >conftest.$ac_ext <<_ACEOF
7737 #line 7737 "configure"
7738 #include "confdefs.h"
7740 #define _XOPEN_SOURCE_EXTENDED
7741 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7742 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7744 #include <$cf_header>
7749 #ifdef NCURSES_VERSION
7755 printf("%s\n", NCURSES_VERSION);
7768 rm -f conftest.$ac_objext
7769 if { (eval echo "$as_me:7769: \"$ac_compile\"") >&5
7770 (eval $ac_compile) 2>&5
7772 echo "$as_me:7772: \$? = $ac_status" >&5
7773 (exit $ac_status); } &&
7774 { ac_try='test -s conftest.$ac_objext'
7775 { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit $ac_status); }; }; then
7780 cf_cv_ncurses_h=$cf_header
7783 echo "$as_me: failed program was:" >&5
7784 cat conftest.$ac_ext >&5
7787 rm -f conftest.$ac_objext conftest.$ac_ext
7789 test "$cf_cv_ncurses_h" != no && break
7793 echo "$as_me:7793: result: $cf_cv_ncurses_h" >&5
7794 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7796 if test "$cf_cv_ncurses_h" != no ; then
7797 cf_cv_ncurses_header=$cf_cv_ncurses_h
7800 echo "$as_me:7800: checking for $cf_ncuhdr_root include-path" >&5
7801 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7802 if test "${cf_cv_ncurses_h2+set}" = set; then
7803 echo $ECHO_N "(cached) $ECHO_C" >&6
7806 test -n "$verbose" && echo
7810 # collect the current set of include-directories from compiler flags
7811 cf_header_path_list=""
7812 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7813 for cf_header_path in $CPPFLAGS $CFLAGS
7815 case $cf_header_path in
7817 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7819 test "x$cf_header_path" != "xNONE" && \
7820 test -d "$cf_header_path" && \
7822 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7823 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7824 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7825 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7826 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7827 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"
7830 cf_header_path_list="$cf_header_path_list $cf_search"
7836 # add the variations for the package we are looking for
7840 test "x$prefix" != "xNONE" && \
7841 test -d "$prefix" && \
7843 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7844 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7845 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7846 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7847 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7848 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7851 for cf_subdir_prefix in \
7860 test "x$cf_subdir_prefix" != "x$prefix" && \
7861 test -d "$cf_subdir_prefix" && \
7862 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7863 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7864 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7865 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7866 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7867 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7868 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"
7873 test "$includedir" != NONE && \
7874 test "$includedir" != "/usr/include" && \
7875 test -d "$includedir" && {
7876 test -d $includedir && cf_search="$cf_search $includedir"
7877 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7880 test "$oldincludedir" != NONE && \
7881 test "$oldincludedir" != "/usr/include" && \
7882 test -d "$oldincludedir" && {
7883 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7884 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7887 cf_search="$cf_search $cf_header_path_list"
7889 test -n "$verbose" && echo search path $cf_search
7890 cf_save2_CPPFLAGS="$CPPFLAGS"
7891 for cf_incdir in $cf_search
7894 if test -n "$cf_incdir" ; then
7895 for cf_add_incdir in $cf_incdir
7897 while test $cf_add_incdir != /usr/include
7899 if test -d $cf_add_incdir
7902 if test -n "$CFLAGS$CPPFLAGS" ; then
7903 # a loop is needed to ensure we can add subdirs of existing dirs
7904 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7905 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7906 cf_have_incdir=yes; break
7911 if test "$cf_have_incdir" = no ; then
7912 if test "$cf_add_incdir" = /usr/local/include ; then
7913 if test "$GCC" = yes
7915 cf_save_CPPFLAGS=$CPPFLAGS
7917 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7918 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7920 cat >conftest.$ac_ext <<_ACEOF
7921 #line 7921 "configure"
7922 #include "confdefs.h"
7932 rm -f conftest.$ac_objext
7933 if { (eval echo "$as_me:7933: \"$ac_compile\"") >&5
7934 (eval $ac_compile) 2>&5
7936 echo "$as_me:7936: \$? = $ac_status" >&5
7937 (exit $ac_status); } &&
7938 { ac_try='test -s conftest.$ac_objext'
7939 { (eval echo "$as_me:7939: \"$ac_try\"") >&5
7942 echo "$as_me:7942: \$? = $ac_status" >&5
7943 (exit $ac_status); }; }; then
7946 echo "$as_me: failed program was:" >&5
7947 cat conftest.$ac_ext >&5
7950 rm -f conftest.$ac_objext conftest.$ac_ext
7951 CPPFLAGS=$cf_save_CPPFLAGS
7956 if test "$cf_have_incdir" = no ; then
7957 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7959 echo "${as_me:-configure}:7959: testing adding $cf_add_incdir to include-path ..." 1>&5
7961 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7963 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7964 test "$cf_top_incdir" = "$cf_add_incdir" && break
7965 cf_add_incdir="$cf_top_incdir"
7981 cat >conftest.$ac_ext <<_ACEOF
7982 #line 7982 "configure"
7983 #include "confdefs.h"
7985 #include <$cf_header>
7990 #ifdef NCURSES_VERSION
7992 printf("%s\n", NCURSES_VERSION);
8005 rm -f conftest.$ac_objext
8006 if { (eval echo "$as_me:8006: \"$ac_compile\"") >&5
8007 (eval $ac_compile) 2>&5
8009 echo "$as_me:8009: \$? = $ac_status" >&5
8010 (exit $ac_status); } &&
8011 { ac_try='test -s conftest.$ac_objext'
8012 { (eval echo "$as_me:8012: \"$ac_try\"") >&5
8015 echo "$as_me:8015: \$? = $ac_status" >&5
8016 (exit $ac_status); }; }; then
8017 cf_cv_ncurses_h2=$cf_header
8020 echo "$as_me: failed program was:" >&5
8021 cat conftest.$ac_ext >&5
8024 rm -f conftest.$ac_objext conftest.$ac_ext
8026 if test "$cf_cv_ncurses_h2" != no ; then
8027 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8028 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8031 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8033 CPPFLAGS="$cf_save2_CPPFLAGS"
8034 test "$cf_cv_ncurses_h2" != no && break
8036 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8036: error: not found" >&5
8037 echo "$as_me: error: not found" >&2;}
8038 { (exit 1); exit 1; }; }
8041 echo "$as_me:8041: result: $cf_cv_ncurses_h2" >&5
8042 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8044 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8045 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8046 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8047 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8050 if test -n "$cf_1st_incdir" ; then
8051 for cf_add_incdir in $cf_1st_incdir
8053 while test $cf_add_incdir != /usr/include
8055 if test -d $cf_add_incdir
8058 if test -n "$CFLAGS$CPPFLAGS" ; then
8059 # a loop is needed to ensure we can add subdirs of existing dirs
8060 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8061 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8062 cf_have_incdir=yes; break
8067 if test "$cf_have_incdir" = no ; then
8068 if test "$cf_add_incdir" = /usr/local/include ; then
8069 if test "$GCC" = yes
8071 cf_save_CPPFLAGS=$CPPFLAGS
8073 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8074 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8076 cat >conftest.$ac_ext <<_ACEOF
8077 #line 8077 "configure"
8078 #include "confdefs.h"
8088 rm -f conftest.$ac_objext
8089 if { (eval echo "$as_me:8089: \"$ac_compile\"") >&5
8090 (eval $ac_compile) 2>&5
8092 echo "$as_me:8092: \$? = $ac_status" >&5
8093 (exit $ac_status); } &&
8094 { ac_try='test -s conftest.$ac_objext'
8095 { (eval echo "$as_me:8095: \"$ac_try\"") >&5
8098 echo "$as_me:8098: \$? = $ac_status" >&5
8099 (exit $ac_status); }; }; then
8102 echo "$as_me: failed program was:" >&5
8103 cat conftest.$ac_ext >&5
8106 rm -f conftest.$ac_objext conftest.$ac_ext
8107 CPPFLAGS=$cf_save_CPPFLAGS
8112 if test "$cf_have_incdir" = no ; then
8113 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8115 echo "${as_me:-configure}:8115: testing adding $cf_add_incdir to include-path ..." 1>&5
8117 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8119 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8120 test "$cf_top_incdir" = "$cf_add_incdir" && break
8121 cf_add_incdir="$cf_top_incdir"
8134 # Set definitions to allow ifdef'ing for ncurses.h
8136 case $cf_cv_ncurses_header in
8139 cat >>confdefs.h <<\EOF
8140 #define HAVE_NCURSES_H 1
8146 case $cf_cv_ncurses_header in
8147 (ncurses/curses.h|ncurses/ncurses.h)
8149 cat >>confdefs.h <<\EOF
8150 #define HAVE_NCURSES_NCURSES_H 1
8154 (ncursesw/curses.h|ncursesw/ncurses.h)
8156 cat >>confdefs.h <<\EOF
8157 #define HAVE_NCURSESW_NCURSES_H 1
8163 echo "$as_me:8163: checking for terminfo header" >&5
8164 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8165 if test "${cf_cv_term_header+set}" = set; then
8166 echo $ECHO_N "(cached) $ECHO_C" >&6
8169 case ${cf_cv_ncurses_header} in
8170 (*/ncurses.h|*/ncursesw.h)
8171 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8174 cf_term_header=term.h
8178 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8180 cat >conftest.$ac_ext <<_ACEOF
8181 #line 8181 "configure"
8182 #include "confdefs.h"
8184 #include <${cf_cv_ncurses_header:-curses.h}>
8190 int x = auto_left_margin; (void)x
8195 rm -f conftest.$ac_objext
8196 if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
8197 (eval $ac_compile) 2>&5
8199 echo "$as_me:8199: \$? = $ac_status" >&5
8200 (exit $ac_status); } &&
8201 { ac_try='test -s conftest.$ac_objext'
8202 { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8205 echo "$as_me:8205: \$? = $ac_status" >&5
8206 (exit $ac_status); }; }; then
8208 cf_cv_term_header="$cf_test"
8210 echo "$as_me: failed program was:" >&5
8211 cat conftest.$ac_ext >&5
8213 cf_cv_term_header=unknown
8216 rm -f conftest.$ac_objext conftest.$ac_ext
8217 test "$cf_cv_term_header" != unknown && break
8221 echo "$as_me:8221: result: $cf_cv_term_header" >&5
8222 echo "${ECHO_T}$cf_cv_term_header" >&6
8224 # Set definitions to allow ifdef'ing to accommodate subdirectories
8226 case $cf_cv_term_header in
8229 cat >>confdefs.h <<\EOF
8230 #define HAVE_TERM_H 1
8236 case $cf_cv_term_header in
8239 cat >>confdefs.h <<\EOF
8240 #define HAVE_NCURSES_TERM_H 1
8246 cat >>confdefs.h <<\EOF
8247 #define HAVE_NCURSESW_TERM_H 1
8253 # some applications need this, but should check for NCURSES_VERSION
8255 cat >>confdefs.h <<\EOF
8259 echo "$as_me:8259: checking for ncurses version" >&5
8260 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8261 if test "${cf_cv_ncurses_version+set}" = set; then
8262 echo $ECHO_N "(cached) $ECHO_C" >&6
8265 cf_cv_ncurses_version=no
8268 if test "$cross_compiling" = yes; then
8270 # This will not work if the preprocessor splits the line after the
8271 # Autoconf token. The 'unproto' program does that.
8272 cat > conftest.$ac_ext <<EOF
8273 #include <${cf_cv_ncurses_header:-curses.h}>
8275 #ifdef NCURSES_VERSION
8276 Autoconf NCURSES_VERSION
8284 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8285 { (eval echo "$as_me:8285: \"$cf_try\"") >&5
8288 echo "$as_me:8288: \$? = $ac_status" >&5
8289 (exit $ac_status); }
8290 if test -f conftest.out ; then
8291 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8292 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8297 cat >conftest.$ac_ext <<_ACEOF
8298 #line 8298 "configure"
8299 #include "confdefs.h"
8301 #include <${cf_cv_ncurses_header:-curses.h}>
8305 FILE *fp = fopen("$cf_tempfile", "w");
8306 #ifdef NCURSES_VERSION
8307 # ifdef NCURSES_VERSION_PATCH
8308 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8310 fprintf(fp, "%s\n", NCURSES_VERSION);
8314 fprintf(fp, "old\n");
8319 ${cf_cv_main_return:-return}(0);
8322 rm -f conftest$ac_exeext
8323 if { (eval echo "$as_me:8323: \"$ac_link\"") >&5
8324 (eval $ac_link) 2>&5
8326 echo "$as_me:8326: \$? = $ac_status" >&5
8327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8328 { (eval echo "$as_me:8328: \"$ac_try\"") >&5
8331 echo "$as_me:8331: \$? = $ac_status" >&5
8332 (exit $ac_status); }; }; then
8334 cf_cv_ncurses_version=`cat $cf_tempfile`
8336 echo "$as_me: program exited with status $ac_status" >&5
8337 echo "$as_me: failed program was:" >&5
8338 cat conftest.$ac_ext >&5
8340 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8345 echo "$as_me:8345: result: $cf_cv_ncurses_version" >&5
8346 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8347 test "$cf_cv_ncurses_version" = no ||
8348 cat >>confdefs.h <<\EOF
8352 cf_nculib_root=ncursesw
8353 # This works, except for the special case where we find gpm, but
8354 # ncurses is in a nonstandard location via $LIBS, and we really want
8357 cf_ncurses_SAVE="$LIBS"
8358 echo "$as_me:8358: checking for Gpm_Open in -lgpm" >&5
8359 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8360 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8361 echo $ECHO_N "(cached) $ECHO_C" >&6
8363 ac_check_lib_save_LIBS=$LIBS
8365 cat >conftest.$ac_ext <<_ACEOF
8366 #line 8366 "configure"
8367 #include "confdefs.h"
8369 /* Override any gcc2 internal prototype to avoid an error. */
8373 /* We use char because int might match the return type of a gcc2
8374 builtin and then its argument prototype would still apply. */
8384 rm -f conftest.$ac_objext conftest$ac_exeext
8385 if { (eval echo "$as_me:8385: \"$ac_link\"") >&5
8386 (eval $ac_link) 2>&5
8388 echo "$as_me:8388: \$? = $ac_status" >&5
8389 (exit $ac_status); } &&
8390 { ac_try='test -s conftest$ac_exeext'
8391 { (eval echo "$as_me:8391: \"$ac_try\"") >&5
8394 echo "$as_me:8394: \$? = $ac_status" >&5
8395 (exit $ac_status); }; }; then
8396 ac_cv_lib_gpm_Gpm_Open=yes
8398 echo "$as_me: failed program was:" >&5
8399 cat conftest.$ac_ext >&5
8400 ac_cv_lib_gpm_Gpm_Open=no
8402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8403 LIBS=$ac_check_lib_save_LIBS
8405 echo "$as_me:8405: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8406 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8407 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8408 echo "$as_me:8408: checking for initscr in -lgpm" >&5
8409 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8410 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8411 echo $ECHO_N "(cached) $ECHO_C" >&6
8413 ac_check_lib_save_LIBS=$LIBS
8415 cat >conftest.$ac_ext <<_ACEOF
8416 #line 8416 "configure"
8417 #include "confdefs.h"
8419 /* Override any gcc2 internal prototype to avoid an error. */
8423 /* We use char because int might match the return type of a gcc2
8424 builtin and then its argument prototype would still apply. */
8434 rm -f conftest.$ac_objext conftest$ac_exeext
8435 if { (eval echo "$as_me:8435: \"$ac_link\"") >&5
8436 (eval $ac_link) 2>&5
8438 echo "$as_me:8438: \$? = $ac_status" >&5
8439 (exit $ac_status); } &&
8440 { ac_try='test -s conftest$ac_exeext'
8441 { (eval echo "$as_me:8441: \"$ac_try\"") >&5
8444 echo "$as_me:8444: \$? = $ac_status" >&5
8445 (exit $ac_status); }; }; then
8446 ac_cv_lib_gpm_initscr=yes
8448 echo "$as_me: failed program was:" >&5
8449 cat conftest.$ac_ext >&5
8450 ac_cv_lib_gpm_initscr=no
8452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8453 LIBS=$ac_check_lib_save_LIBS
8455 echo "$as_me:8455: result: $ac_cv_lib_gpm_initscr" >&5
8456 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8457 if test $ac_cv_lib_gpm_initscr = yes; then
8458 LIBS="$cf_ncurses_SAVE"
8460 cf_ncurses_LIBS="-lgpm"
8467 # This is only necessary if you are linking against an obsolete
8468 # version of ncurses (but it should do no harm, since it's static).
8469 if test "$cf_nculib_root" = ncurses ; then
8470 echo "$as_me:8470: checking for tgoto in -lmytinfo" >&5
8471 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8472 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8473 echo $ECHO_N "(cached) $ECHO_C" >&6
8475 ac_check_lib_save_LIBS=$LIBS
8476 LIBS="-lmytinfo $LIBS"
8477 cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8481 /* Override any gcc2 internal prototype to avoid an error. */
8485 /* We use char because int might match the return type of a gcc2
8486 builtin and then its argument prototype would still apply. */
8496 rm -f conftest.$ac_objext conftest$ac_exeext
8497 if { (eval echo "$as_me:8497: \"$ac_link\"") >&5
8498 (eval $ac_link) 2>&5
8500 echo "$as_me:8500: \$? = $ac_status" >&5
8501 (exit $ac_status); } &&
8502 { ac_try='test -s conftest$ac_exeext'
8503 { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8506 echo "$as_me:8506: \$? = $ac_status" >&5
8507 (exit $ac_status); }; }; then
8508 ac_cv_lib_mytinfo_tgoto=yes
8510 echo "$as_me: failed program was:" >&5
8511 cat conftest.$ac_ext >&5
8512 ac_cv_lib_mytinfo_tgoto=no
8514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8515 LIBS=$ac_check_lib_save_LIBS
8517 echo "$as_me:8517: result: $ac_cv_lib_mytinfo_tgoto" >&5
8518 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8519 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8520 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8530 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8532 for cf_add_1lib in $cf_add_0lib; do
8533 for cf_add_2lib in $cf_add_libs; do
8534 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8539 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8543 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8549 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8551 for cf_add_1lib in $cf_add_0lib; do
8552 for cf_add_2lib in $cf_add_libs; do
8553 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8558 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8564 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8566 echo "$as_me:8566: checking for initscr" >&5
8567 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8568 if test "${ac_cv_func_initscr+set}" = set; then
8569 echo $ECHO_N "(cached) $ECHO_C" >&6
8571 cat >conftest.$ac_ext <<_ACEOF
8572 #line 8572 "configure"
8573 #include "confdefs.h"
8574 #define initscr autoconf_temporary
8575 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8582 /* We use char because int might match the return type of a gcc2
8583 builtin and then its argument prototype would still apply. */
8584 char initscr (void);
8590 /* The GNU C library defines stubs for functions which it implements
8591 to always fail with ENOSYS. Some functions are actually named
8592 something starting with __ and the normal name is an alias. */
8593 #if defined (__stub_initscr) || defined (__stub___initscr)
8594 #error found stub for initscr
8602 rm -f conftest.$ac_objext conftest$ac_exeext
8603 if { (eval echo "$as_me:8603: \"$ac_link\"") >&5
8604 (eval $ac_link) 2>&5
8606 echo "$as_me:8606: \$? = $ac_status" >&5
8607 (exit $ac_status); } &&
8608 { ac_try='test -s conftest$ac_exeext'
8609 { (eval echo "$as_me:8609: \"$ac_try\"") >&5
8612 echo "$as_me:8612: \$? = $ac_status" >&5
8613 (exit $ac_status); }; }; then
8614 ac_cv_func_initscr=yes
8616 echo "$as_me: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8618 ac_cv_func_initscr=no
8620 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8622 echo "$as_me:8622: result: $ac_cv_func_initscr" >&5
8623 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8624 if test $ac_cv_func_initscr = yes; then
8625 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8628 cf_save_LIBS="$LIBS"
8629 echo "$as_me:8629: checking for initscr in -l$cf_nculib_root" >&5
8630 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8631 LIBS="-l$cf_nculib_root $LIBS"
8632 cat >conftest.$ac_ext <<_ACEOF
8633 #line 8633 "configure"
8634 #include "confdefs.h"
8635 #include <${cf_cv_ncurses_header:-curses.h}>
8644 rm -f conftest.$ac_objext conftest$ac_exeext
8645 if { (eval echo "$as_me:8645: \"$ac_link\"") >&5
8646 (eval $ac_link) 2>&5
8648 echo "$as_me:8648: \$? = $ac_status" >&5
8649 (exit $ac_status); } &&
8650 { ac_try='test -s conftest$ac_exeext'
8651 { (eval echo "$as_me:8651: \"$ac_try\"") >&5
8654 echo "$as_me:8654: \$? = $ac_status" >&5
8655 (exit $ac_status); }; }; then
8656 echo "$as_me:8656: result: yes" >&5
8657 echo "${ECHO_T}yes" >&6
8658 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8661 echo "$as_me: failed program was:" >&5
8662 cat conftest.$ac_ext >&5
8663 echo "$as_me:8663: result: no" >&5
8664 echo "${ECHO_T}no" >&6
8667 cf_library_path_list=""
8668 if test -n "${LDFLAGS}${LIBS}" ; then
8669 for cf_library_path in $LDFLAGS $LIBS
8671 case $cf_library_path in
8673 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8675 test "x$cf_library_path" != "xNONE" && \
8676 test -d "$cf_library_path" && \
8678 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8679 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8680 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8681 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8682 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8683 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"
8686 cf_library_path_list="$cf_library_path_list $cf_search"
8694 test "x$prefix" != "xNONE" && \
8695 test -d "$prefix" && \
8697 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8698 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8699 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8700 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8701 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8702 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8705 for cf_subdir_prefix in \
8714 test "x$cf_subdir_prefix" != "x$prefix" && \
8715 test -d "$cf_subdir_prefix" && \
8716 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8717 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8718 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8719 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8720 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8721 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8722 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"
8727 cf_search="$cf_library_path_list $cf_search"
8729 for cf_libdir in $cf_search
8731 echo "$as_me:8731: checking for -l$cf_nculib_root in $cf_libdir" >&5
8732 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8733 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8734 cat >conftest.$ac_ext <<_ACEOF
8735 #line 8735 "configure"
8736 #include "confdefs.h"
8737 #include <${cf_cv_ncurses_header:-curses.h}>
8746 rm -f conftest.$ac_objext conftest$ac_exeext
8747 if { (eval echo "$as_me:8747: \"$ac_link\"") >&5
8748 (eval $ac_link) 2>&5
8750 echo "$as_me:8750: \$? = $ac_status" >&5
8751 (exit $ac_status); } &&
8752 { ac_try='test -s conftest$ac_exeext'
8753 { (eval echo "$as_me:8753: \"$ac_try\"") >&5
8756 echo "$as_me:8756: \$? = $ac_status" >&5
8757 (exit $ac_status); }; }; then
8758 echo "$as_me:8758: result: yes" >&5
8759 echo "${ECHO_T}yes" >&6
8760 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8763 echo "$as_me: failed program was:" >&5
8764 cat conftest.$ac_ext >&5
8765 echo "$as_me:8765: result: no" >&5
8766 echo "${ECHO_T}no" >&6
8767 LIBS="$cf_save_LIBS"
8769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8777 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8779 if test $cf_found_library = no ; then
8780 { { echo "$as_me:8780: error: Cannot link $cf_nculib_root library" >&5
8781 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8782 { (exit 1); exit 1; }; }
8787 if test -n "$cf_ncurses_LIBS" ; then
8788 echo "$as_me:8788: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8789 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8790 cf_ncurses_SAVE="$LIBS"
8791 for p in $cf_ncurses_LIBS ; do
8792 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8793 if test "$q" != "$LIBS" ; then
8797 cat >conftest.$ac_ext <<_ACEOF
8798 #line 8798 "configure"
8799 #include "confdefs.h"
8800 #include <${cf_cv_ncurses_header:-curses.h}>
8804 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8809 rm -f conftest.$ac_objext conftest$ac_exeext
8810 if { (eval echo "$as_me:8810: \"$ac_link\"") >&5
8811 (eval $ac_link) 2>&5
8813 echo "$as_me:8813: \$? = $ac_status" >&5
8814 (exit $ac_status); } &&
8815 { ac_try='test -s conftest$ac_exeext'
8816 { (eval echo "$as_me:8816: \"$ac_try\"") >&5
8819 echo "$as_me:8819: \$? = $ac_status" >&5
8820 (exit $ac_status); }; }; then
8821 echo "$as_me:8821: result: yes" >&5
8822 echo "${ECHO_T}yes" >&6
8824 echo "$as_me: failed program was:" >&5
8825 cat conftest.$ac_ext >&5
8826 echo "$as_me:8826: result: no" >&5
8827 echo "${ECHO_T}no" >&6
8828 LIBS="$cf_ncurses_SAVE"
8830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8833 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8835 cat >>confdefs.h <<EOF
8836 #define $cf_nculib_ROOT 1
8846 cf_ncuconfig_root=ncurses
8847 cf_have_ncuconfig=no
8849 if test "x${PKG_CONFIG:=none}" != xnone; then
8850 echo "$as_me:8850: checking pkg-config for $cf_ncuconfig_root" >&5
8851 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8852 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8853 echo "$as_me:8853: result: yes" >&5
8854 echo "${ECHO_T}yes" >&6
8856 echo "$as_me:8856: checking if the $cf_ncuconfig_root package files work" >&5
8857 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8858 cf_have_ncuconfig=unknown
8860 cf_save_CFLAGS="$CFLAGS"
8861 cf_save_CPPFLAGS="$CPPFLAGS"
8862 cf_save_LIBS="$LIBS"
8864 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
8865 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
8867 # while -W for passing linker flags is prevalent, it is not "standard".
8868 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8869 # incompatible _and_ non-standard -W option which gives an error. Work
8870 # around that pitfall.
8871 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8877 cf_new_extra_cppflags=
8879 for cf_add_cflags in $cf_pkg_cflags
8881 case $cf_fix_cppflags in
8883 case $cf_add_cflags in
8884 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8885 case $cf_add_cflags in
8887 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8889 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8890 && test -z "${cf_tst_cflags}" \
8891 && cf_fix_cppflags=yes
8893 if test $cf_fix_cppflags = yes ; then
8895 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8896 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8899 elif test "${cf_tst_cflags}" = "\"'" ; then
8901 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8902 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8912 case $cf_add_cflags in
8914 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8916 CPPFLAGS=`echo "$CPPFLAGS" | \
8917 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8918 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8923 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8924 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8931 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8932 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8939 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8940 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8942 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8944 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8945 && test -z "${cf_tst_cflags}" \
8946 && cf_fix_cppflags=no
8951 if test -n "$cf_new_cflags" ; then
8953 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8954 CFLAGS="${CFLAGS}$cf_new_cflags"
8958 if test -n "$cf_new_cppflags" ; then
8960 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8961 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8965 if test -n "$cf_new_extra_cppflags" ; then
8967 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8968 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8975 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8977 for cf_add_1lib in $cf_add_0lib; do
8978 for cf_add_2lib in $cf_add_libs; do
8979 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8984 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8988 cat >conftest.$ac_ext <<_ACEOF
8989 #line 8989 "configure"
8990 #include "confdefs.h"
8991 #include <${cf_cv_ncurses_header:-curses.h}>
8995 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9000 rm -f conftest.$ac_objext conftest$ac_exeext
9001 if { (eval echo "$as_me:9001: \"$ac_link\"") >&5
9002 (eval $ac_link) 2>&5
9004 echo "$as_me:9004: \$? = $ac_status" >&5
9005 (exit $ac_status); } &&
9006 { ac_try='test -s conftest$ac_exeext'
9007 { (eval echo "$as_me:9007: \"$ac_try\"") >&5
9010 echo "$as_me:9010: \$? = $ac_status" >&5
9011 (exit $ac_status); }; }; then
9012 if test "$cross_compiling" = yes; then
9013 cf_test_ncuconfig=maybe
9015 cat >conftest.$ac_ext <<_ACEOF
9016 #line 9016 "configure"
9017 #include "confdefs.h"
9018 #include <${cf_cv_ncurses_header:-curses.h}>
9020 { char *xx = curses_version(); return (xx == 0); }
9022 rm -f conftest$ac_exeext
9023 if { (eval echo "$as_me:9023: \"$ac_link\"") >&5
9024 (eval $ac_link) 2>&5
9026 echo "$as_me:9026: \$? = $ac_status" >&5
9027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9028 { (eval echo "$as_me:9028: \"$ac_try\"") >&5
9031 echo "$as_me:9031: \$? = $ac_status" >&5
9032 (exit $ac_status); }; }; then
9033 cf_test_ncuconfig=yes
9035 echo "$as_me: program exited with status $ac_status" >&5
9036 echo "$as_me: failed program was:" >&5
9037 cat conftest.$ac_ext >&5
9038 cf_test_ncuconfig=no
9040 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9043 echo "$as_me: failed program was:" >&5
9044 cat conftest.$ac_ext >&5
9045 cf_test_ncuconfig=no
9047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9049 CFLAGS="$cf_save_CFLAGS"
9050 CPPFLAGS="$cf_save_CPPFLAGS"
9051 LIBS="$cf_save_LIBS"
9053 if test "x$cf_test_ncuconfig" != xyes; then
9054 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9055 cf_pkg_cflags="$cf_temp"
9056 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9057 cf_pkg_libs="$cf_temp"
9065 cf_new_extra_cppflags=
9067 for cf_add_cflags in $cf_pkg_cflags
9069 case $cf_fix_cppflags in
9071 case $cf_add_cflags in
9072 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9073 case $cf_add_cflags in
9075 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9077 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9078 && test -z "${cf_tst_cflags}" \
9079 && cf_fix_cppflags=yes
9081 if test $cf_fix_cppflags = yes ; then
9083 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9084 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9087 elif test "${cf_tst_cflags}" = "\"'" ; then
9089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9100 case $cf_add_cflags in
9102 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9104 CPPFLAGS=`echo "$CPPFLAGS" | \
9105 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9106 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9111 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9112 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9119 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9120 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9127 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9128 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9130 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9132 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9133 && test -z "${cf_tst_cflags}" \
9134 && cf_fix_cppflags=no
9139 if test -n "$cf_new_cflags" ; then
9141 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9142 CFLAGS="${CFLAGS}$cf_new_cflags"
9146 if test -n "$cf_new_cppflags" ; then
9148 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9149 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9153 if test -n "$cf_new_extra_cppflags" ; then
9155 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9156 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9163 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9165 for cf_add_1lib in $cf_add_0lib; do
9166 for cf_add_2lib in $cf_add_libs; do
9167 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9172 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9176 cat >conftest.$ac_ext <<_ACEOF
9177 #line 9177 "configure"
9178 #include "confdefs.h"
9179 #include <${cf_cv_ncurses_header:-curses.h}>
9183 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9188 rm -f conftest.$ac_objext conftest$ac_exeext
9189 if { (eval echo "$as_me:9189: \"$ac_link\"") >&5
9190 (eval $ac_link) 2>&5
9192 echo "$as_me:9192: \$? = $ac_status" >&5
9193 (exit $ac_status); } &&
9194 { ac_try='test -s conftest$ac_exeext'
9195 { (eval echo "$as_me:9195: \"$ac_try\"") >&5
9198 echo "$as_me:9198: \$? = $ac_status" >&5
9199 (exit $ac_status); }; }; then
9200 if test "$cross_compiling" = yes; then
9201 cf_have_ncuconfig=maybe
9203 cat >conftest.$ac_ext <<_ACEOF
9204 #line 9204 "configure"
9205 #include "confdefs.h"
9206 #include <${cf_cv_ncurses_header:-curses.h}>
9208 { char *xx = curses_version(); return (xx == 0); }
9210 rm -f conftest$ac_exeext
9211 if { (eval echo "$as_me:9211: \"$ac_link\"") >&5
9212 (eval $ac_link) 2>&5
9214 echo "$as_me:9214: \$? = $ac_status" >&5
9215 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9216 { (eval echo "$as_me:9216: \"$ac_try\"") >&5
9219 echo "$as_me:9219: \$? = $ac_status" >&5
9220 (exit $ac_status); }; }; then
9221 cf_have_ncuconfig=yes
9223 echo "$as_me: program exited with status $ac_status" >&5
9224 echo "$as_me: failed program was:" >&5
9225 cat conftest.$ac_ext >&5
9226 cf_have_ncuconfig=no
9228 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9231 echo "$as_me: failed program was:" >&5
9232 cat conftest.$ac_ext >&5
9233 cf_have_ncuconfig=no
9235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9236 echo "$as_me:9236: result: $cf_have_ncuconfig" >&5
9237 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9238 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9239 if test "$cf_have_ncuconfig" != "yes"
9241 CPPFLAGS="$cf_save_CPPFLAGS"
9242 LIBS="$cf_save_LIBS"
9243 NCURSES_CONFIG_PKG=none
9246 cat >>confdefs.h <<\EOF
9250 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9252 echo "$as_me:9252: checking for terminfo header" >&5
9253 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9254 if test "${cf_cv_term_header+set}" = set; then
9255 echo $ECHO_N "(cached) $ECHO_C" >&6
9258 case ${cf_cv_ncurses_header} in
9259 (*/ncurses.h|*/ncursesw.h)
9260 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9263 cf_term_header=term.h
9267 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9273 #include <${cf_cv_ncurses_header:-curses.h}>
9279 int x = auto_left_margin; (void)x
9284 rm -f conftest.$ac_objext
9285 if { (eval echo "$as_me:9285: \"$ac_compile\"") >&5
9286 (eval $ac_compile) 2>&5
9288 echo "$as_me:9288: \$? = $ac_status" >&5
9289 (exit $ac_status); } &&
9290 { ac_try='test -s conftest.$ac_objext'
9291 { (eval echo "$as_me:9291: \"$ac_try\"") >&5
9294 echo "$as_me:9294: \$? = $ac_status" >&5
9295 (exit $ac_status); }; }; then
9297 cf_cv_term_header="$cf_test"
9299 echo "$as_me: failed program was:" >&5
9300 cat conftest.$ac_ext >&5
9302 cf_cv_term_header=unknown
9305 rm -f conftest.$ac_objext conftest.$ac_ext
9306 test "$cf_cv_term_header" != unknown && break
9310 echo "$as_me:9310: result: $cf_cv_term_header" >&5
9311 echo "${ECHO_T}$cf_cv_term_header" >&6
9313 # Set definitions to allow ifdef'ing to accommodate subdirectories
9315 case $cf_cv_term_header in
9318 cat >>confdefs.h <<\EOF
9319 #define HAVE_TERM_H 1
9325 case $cf_cv_term_header in
9328 cat >>confdefs.h <<\EOF
9329 #define HAVE_NCURSES_TERM_H 1
9335 cat >>confdefs.h <<\EOF
9336 #define HAVE_NCURSESW_TERM_H 1
9345 echo "$as_me:9345: result: no" >&5
9346 echo "${ECHO_T}no" >&6
9347 NCURSES_CONFIG_PKG=none
9350 NCURSES_CONFIG_PKG=none
9353 if test "x$cf_have_ncuconfig" = "xno"; then
9354 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9356 if test -n "$ac_tool_prefix"; then
9357 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9359 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9360 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9361 echo "$as_me:9361: checking for $ac_word" >&5
9362 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9363 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9364 echo $ECHO_N "(cached) $ECHO_C" >&6
9366 if test -n "$NCURSES_CONFIG"; then
9367 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9369 ac_save_IFS=$IFS; IFS=$ac_path_separator
9371 for ac_dir in $ac_dummy; do
9373 test -z "$ac_dir" && ac_dir=.
9374 $as_executable_p "$ac_dir/$ac_word" || continue
9375 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9376 echo "$as_me:9376: found $ac_dir/$ac_word" >&5
9382 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9383 if test -n "$NCURSES_CONFIG"; then
9384 echo "$as_me:9384: result: $NCURSES_CONFIG" >&5
9385 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9387 echo "$as_me:9387: result: no" >&5
9388 echo "${ECHO_T}no" >&6
9391 test -n "$NCURSES_CONFIG" && break
9394 if test -z "$NCURSES_CONFIG"; then
9395 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9396 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9398 # Extract the first word of "$ac_prog", so it can be a program name with args.
9399 set dummy $ac_prog; ac_word=$2
9400 echo "$as_me:9400: checking for $ac_word" >&5
9401 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9402 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9403 echo $ECHO_N "(cached) $ECHO_C" >&6
9405 if test -n "$ac_ct_NCURSES_CONFIG"; then
9406 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9408 ac_save_IFS=$IFS; IFS=$ac_path_separator
9410 for ac_dir in $ac_dummy; do
9412 test -z "$ac_dir" && ac_dir=.
9413 $as_executable_p "$ac_dir/$ac_word" || continue
9414 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9415 echo "$as_me:9415: found $ac_dir/$ac_word" >&5
9421 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9422 if test -n "$ac_ct_NCURSES_CONFIG"; then
9423 echo "$as_me:9423: result: $ac_ct_NCURSES_CONFIG" >&5
9424 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9426 echo "$as_me:9426: result: no" >&5
9427 echo "${ECHO_T}no" >&6
9430 test -n "$ac_ct_NCURSES_CONFIG" && break
9432 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9434 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9437 if test "$NCURSES_CONFIG" != none ; then
9442 cf_new_extra_cppflags=
9444 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9446 case $cf_fix_cppflags in
9448 case $cf_add_cflags in
9449 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9450 case $cf_add_cflags in
9452 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9455 && test -z "${cf_tst_cflags}" \
9456 && cf_fix_cppflags=yes
9458 if test $cf_fix_cppflags = yes ; then
9460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9464 elif test "${cf_tst_cflags}" = "\"'" ; then
9466 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9467 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9477 case $cf_add_cflags in
9479 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9481 CPPFLAGS=`echo "$CPPFLAGS" | \
9482 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9483 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9488 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9489 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9496 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9497 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9504 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9505 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9507 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9509 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9510 && test -z "${cf_tst_cflags}" \
9511 && cf_fix_cppflags=no
9516 if test -n "$cf_new_cflags" ; then
9518 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9519 CFLAGS="${CFLAGS}$cf_new_cflags"
9523 if test -n "$cf_new_cppflags" ; then
9525 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9526 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9530 if test -n "$cf_new_extra_cppflags" ; then
9532 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9533 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9540 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9542 for cf_add_1lib in $cf_add_0lib; do
9543 for cf_add_2lib in $cf_add_libs; do
9544 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9549 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9553 # even with config script, some packages use no-override for curses.h
9555 echo "$as_me:9555: checking if we have identified curses headers" >&5
9556 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9557 if test "${cf_cv_ncurses_header+set}" = set; then
9558 echo $ECHO_N "(cached) $ECHO_C" >&6
9561 cf_cv_ncurses_header=none
9563 ncurses.h ncurses/ncurses.h \
9564 curses.h ncurses/curses.h
9566 cat >conftest.$ac_ext <<_ACEOF
9567 #line 9567 "configure"
9568 #include "confdefs.h"
9569 #include <${cf_header}>
9573 initscr(); tgoto("?", 0,0)
9578 rm -f conftest.$ac_objext
9579 if { (eval echo "$as_me:9579: \"$ac_compile\"") >&5
9580 (eval $ac_compile) 2>&5
9582 echo "$as_me:9582: \$? = $ac_status" >&5
9583 (exit $ac_status); } &&
9584 { ac_try='test -s conftest.$ac_objext'
9585 { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9588 echo "$as_me:9588: \$? = $ac_status" >&5
9589 (exit $ac_status); }; }; then
9590 cf_cv_ncurses_header=$cf_header; break
9592 echo "$as_me: failed program was:" >&5
9593 cat conftest.$ac_ext >&5
9595 rm -f conftest.$ac_objext conftest.$ac_ext
9599 echo "$as_me:9599: result: $cf_cv_ncurses_header" >&5
9600 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9602 if test "$cf_cv_ncurses_header" = none ; then
9603 { { echo "$as_me:9603: error: No curses header-files found" >&5
9604 echo "$as_me: error: No curses header-files found" >&2;}
9605 { (exit 1); exit 1; }; }
9608 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9610 for ac_header in $cf_cv_ncurses_header
9612 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9613 echo "$as_me:9613: checking for $ac_header" >&5
9614 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9615 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9616 echo $ECHO_N "(cached) $ECHO_C" >&6
9618 cat >conftest.$ac_ext <<_ACEOF
9619 #line 9619 "configure"
9620 #include "confdefs.h"
9621 #include <$ac_header>
9623 if { (eval echo "$as_me:9623: \"$ac_cpp conftest.$ac_ext\"") >&5
9624 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9626 egrep -v '^ *\+' conftest.er1 >conftest.err
9628 cat conftest.err >&5
9629 echo "$as_me:9629: \$? = $ac_status" >&5
9630 (exit $ac_status); } >/dev/null; then
9631 if test -s conftest.err; then
9632 ac_cpp_err=$ac_c_preproc_warn_flag
9639 if test -z "$ac_cpp_err"; then
9640 eval "$as_ac_Header=yes"
9642 echo "$as_me: failed program was:" >&5
9643 cat conftest.$ac_ext >&5
9644 eval "$as_ac_Header=no"
9646 rm -f conftest.err conftest.$ac_ext
9648 echo "$as_me:9648: result: `eval echo '${'$as_ac_Header'}'`" >&5
9649 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9650 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9651 cat >>confdefs.h <<EOF
9652 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9658 cat >>confdefs.h <<\EOF
9662 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9664 cat >>confdefs.h <<EOF
9665 #define $cf_nculib_ROOT 1
9668 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9672 cf_ncuhdr_root=ncurses
9674 test -n "$cf_cv_curses_dir" && \
9675 test "$cf_cv_curses_dir" != "no" && { \
9677 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9678 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9680 while test $cf_add_incdir != /usr/include
9682 if test -d $cf_add_incdir
9685 if test -n "$CFLAGS$CPPFLAGS" ; then
9686 # a loop is needed to ensure we can add subdirs of existing dirs
9687 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9688 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9689 cf_have_incdir=yes; break
9694 if test "$cf_have_incdir" = no ; then
9695 if test "$cf_add_incdir" = /usr/local/include ; then
9696 if test "$GCC" = yes
9698 cf_save_CPPFLAGS=$CPPFLAGS
9700 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9701 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9703 cat >conftest.$ac_ext <<_ACEOF
9704 #line 9704 "configure"
9705 #include "confdefs.h"
9715 rm -f conftest.$ac_objext
9716 if { (eval echo "$as_me:9716: \"$ac_compile\"") >&5
9717 (eval $ac_compile) 2>&5
9719 echo "$as_me:9719: \$? = $ac_status" >&5
9720 (exit $ac_status); } &&
9721 { ac_try='test -s conftest.$ac_objext'
9722 { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9725 echo "$as_me:9725: \$? = $ac_status" >&5
9726 (exit $ac_status); }; }; then
9729 echo "$as_me: failed program was:" >&5
9730 cat conftest.$ac_ext >&5
9733 rm -f conftest.$ac_objext conftest.$ac_ext
9734 CPPFLAGS=$cf_save_CPPFLAGS
9739 if test "$cf_have_incdir" = no ; then
9740 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9742 echo "${as_me:-configure}:9742: testing adding $cf_add_incdir to include-path ..." 1>&5
9744 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9746 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9747 test "$cf_top_incdir" = "$cf_add_incdir" && break
9748 cf_add_incdir="$cf_top_incdir"
9761 echo "$as_me:9761: checking for $cf_ncuhdr_root header in include-path" >&5
9762 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9763 if test "${cf_cv_ncurses_h+set}" = set; then
9764 echo $ECHO_N "(cached) $ECHO_C" >&6
9767 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9768 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9769 for cf_header in $cf_header_list
9772 cat >conftest.$ac_ext <<_ACEOF
9773 #line 9773 "configure"
9774 #include "confdefs.h"
9776 #include <$cf_header>
9781 #ifdef NCURSES_VERSION
9783 printf("%s\n", NCURSES_VERSION);
9796 rm -f conftest.$ac_objext
9797 if { (eval echo "$as_me:9797: \"$ac_compile\"") >&5
9798 (eval $ac_compile) 2>&5
9800 echo "$as_me:9800: \$? = $ac_status" >&5
9801 (exit $ac_status); } &&
9802 { ac_try='test -s conftest.$ac_objext'
9803 { (eval echo "$as_me:9803: \"$ac_try\"") >&5
9806 echo "$as_me:9806: \$? = $ac_status" >&5
9807 (exit $ac_status); }; }; then
9808 cf_cv_ncurses_h=$cf_header
9811 echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9815 rm -f conftest.$ac_objext conftest.$ac_ext
9817 test "$cf_cv_ncurses_h" != no && break
9821 echo "$as_me:9821: result: $cf_cv_ncurses_h" >&5
9822 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9824 if test "$cf_cv_ncurses_h" != no ; then
9825 cf_cv_ncurses_header=$cf_cv_ncurses_h
9828 echo "$as_me:9828: checking for $cf_ncuhdr_root include-path" >&5
9829 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9830 if test "${cf_cv_ncurses_h2+set}" = set; then
9831 echo $ECHO_N "(cached) $ECHO_C" >&6
9834 test -n "$verbose" && echo
9838 # collect the current set of include-directories from compiler flags
9839 cf_header_path_list=""
9840 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9841 for cf_header_path in $CPPFLAGS $CFLAGS
9843 case $cf_header_path in
9845 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9847 test "x$cf_header_path" != "xNONE" && \
9848 test -d "$cf_header_path" && \
9850 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9851 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9852 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9853 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9854 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9855 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"
9858 cf_header_path_list="$cf_header_path_list $cf_search"
9864 # add the variations for the package we are looking for
9868 test "x$prefix" != "xNONE" && \
9869 test -d "$prefix" && \
9871 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9872 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9873 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9874 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9875 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9876 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9879 for cf_subdir_prefix in \
9888 test "x$cf_subdir_prefix" != "x$prefix" && \
9889 test -d "$cf_subdir_prefix" && \
9890 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9891 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9892 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9893 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9894 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9895 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9896 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"
9901 test "$includedir" != NONE && \
9902 test "$includedir" != "/usr/include" && \
9903 test -d "$includedir" && {
9904 test -d $includedir && cf_search="$cf_search $includedir"
9905 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9908 test "$oldincludedir" != NONE && \
9909 test "$oldincludedir" != "/usr/include" && \
9910 test -d "$oldincludedir" && {
9911 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9912 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9915 cf_search="$cf_search $cf_header_path_list"
9917 test -n "$verbose" && echo search path $cf_search
9918 cf_save2_CPPFLAGS="$CPPFLAGS"
9919 for cf_incdir in $cf_search
9922 if test -n "$cf_incdir" ; then
9923 for cf_add_incdir in $cf_incdir
9925 while test $cf_add_incdir != /usr/include
9927 if test -d $cf_add_incdir
9930 if test -n "$CFLAGS$CPPFLAGS" ; then
9931 # a loop is needed to ensure we can add subdirs of existing dirs
9932 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9933 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9934 cf_have_incdir=yes; break
9939 if test "$cf_have_incdir" = no ; then
9940 if test "$cf_add_incdir" = /usr/local/include ; then
9941 if test "$GCC" = yes
9943 cf_save_CPPFLAGS=$CPPFLAGS
9945 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9946 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9948 cat >conftest.$ac_ext <<_ACEOF
9949 #line 9949 "configure"
9950 #include "confdefs.h"
9960 rm -f conftest.$ac_objext
9961 if { (eval echo "$as_me:9961: \"$ac_compile\"") >&5
9962 (eval $ac_compile) 2>&5
9964 echo "$as_me:9964: \$? = $ac_status" >&5
9965 (exit $ac_status); } &&
9966 { ac_try='test -s conftest.$ac_objext'
9967 { (eval echo "$as_me:9967: \"$ac_try\"") >&5
9970 echo "$as_me:9970: \$? = $ac_status" >&5
9971 (exit $ac_status); }; }; then
9974 echo "$as_me: failed program was:" >&5
9975 cat conftest.$ac_ext >&5
9978 rm -f conftest.$ac_objext conftest.$ac_ext
9979 CPPFLAGS=$cf_save_CPPFLAGS
9984 if test "$cf_have_incdir" = no ; then
9985 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9987 echo "${as_me:-configure}:9987: testing adding $cf_add_incdir to include-path ..." 1>&5
9989 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9991 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9992 test "$cf_top_incdir" = "$cf_add_incdir" && break
9993 cf_add_incdir="$cf_top_incdir"
10009 cat >conftest.$ac_ext <<_ACEOF
10010 #line 10010 "configure"
10011 #include "confdefs.h"
10013 #include <$cf_header>
10018 #ifdef NCURSES_VERSION
10020 printf("%s\n", NCURSES_VERSION);
10033 rm -f conftest.$ac_objext
10034 if { (eval echo "$as_me:10034: \"$ac_compile\"") >&5
10035 (eval $ac_compile) 2>&5
10037 echo "$as_me:10037: \$? = $ac_status" >&5
10038 (exit $ac_status); } &&
10039 { ac_try='test -s conftest.$ac_objext'
10040 { (eval echo "$as_me:10040: \"$ac_try\"") >&5
10041 (eval $ac_try) 2>&5
10043 echo "$as_me:10043: \$? = $ac_status" >&5
10044 (exit $ac_status); }; }; then
10045 cf_cv_ncurses_h2=$cf_header
10048 echo "$as_me: failed program was:" >&5
10049 cat conftest.$ac_ext >&5
10050 cf_cv_ncurses_h2=no
10052 rm -f conftest.$ac_objext conftest.$ac_ext
10054 if test "$cf_cv_ncurses_h2" != no ; then
10055 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10056 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10059 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10061 CPPFLAGS="$cf_save2_CPPFLAGS"
10062 test "$cf_cv_ncurses_h2" != no && break
10064 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10064: error: not found" >&5
10065 echo "$as_me: error: not found" >&2;}
10066 { (exit 1); exit 1; }; }
10069 echo "$as_me:10069: result: $cf_cv_ncurses_h2" >&5
10070 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10072 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10073 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10074 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10075 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10078 if test -n "$cf_1st_incdir" ; then
10079 for cf_add_incdir in $cf_1st_incdir
10081 while test $cf_add_incdir != /usr/include
10083 if test -d $cf_add_incdir
10086 if test -n "$CFLAGS$CPPFLAGS" ; then
10087 # a loop is needed to ensure we can add subdirs of existing dirs
10088 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10089 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10090 cf_have_incdir=yes; break
10095 if test "$cf_have_incdir" = no ; then
10096 if test "$cf_add_incdir" = /usr/local/include ; then
10097 if test "$GCC" = yes
10099 cf_save_CPPFLAGS=$CPPFLAGS
10101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10102 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10104 cat >conftest.$ac_ext <<_ACEOF
10105 #line 10105 "configure"
10106 #include "confdefs.h"
10116 rm -f conftest.$ac_objext
10117 if { (eval echo "$as_me:10117: \"$ac_compile\"") >&5
10118 (eval $ac_compile) 2>&5
10120 echo "$as_me:10120: \$? = $ac_status" >&5
10121 (exit $ac_status); } &&
10122 { ac_try='test -s conftest.$ac_objext'
10123 { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124 (eval $ac_try) 2>&5
10126 echo "$as_me:10126: \$? = $ac_status" >&5
10127 (exit $ac_status); }; }; then
10130 echo "$as_me: failed program was:" >&5
10131 cat conftest.$ac_ext >&5
10134 rm -f conftest.$ac_objext conftest.$ac_ext
10135 CPPFLAGS=$cf_save_CPPFLAGS
10140 if test "$cf_have_incdir" = no ; then
10141 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10143 echo "${as_me:-configure}:10143: testing adding $cf_add_incdir to include-path ..." 1>&5
10145 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10147 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10148 test "$cf_top_incdir" = "$cf_add_incdir" && break
10149 cf_add_incdir="$cf_top_incdir"
10162 # Set definitions to allow ifdef'ing for ncurses.h
10164 case $cf_cv_ncurses_header in
10167 cat >>confdefs.h <<\EOF
10168 #define HAVE_NCURSES_H 1
10174 case $cf_cv_ncurses_header in
10175 (ncurses/curses.h|ncurses/ncurses.h)
10177 cat >>confdefs.h <<\EOF
10178 #define HAVE_NCURSES_NCURSES_H 1
10182 (ncursesw/curses.h|ncursesw/ncurses.h)
10184 cat >>confdefs.h <<\EOF
10185 #define HAVE_NCURSESW_NCURSES_H 1
10191 echo "$as_me:10191: checking for terminfo header" >&5
10192 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10193 if test "${cf_cv_term_header+set}" = set; then
10194 echo $ECHO_N "(cached) $ECHO_C" >&6
10197 case ${cf_cv_ncurses_header} in
10198 (*/ncurses.h|*/ncursesw.h)
10199 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10202 cf_term_header=term.h
10206 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10208 cat >conftest.$ac_ext <<_ACEOF
10209 #line 10209 "configure"
10210 #include "confdefs.h"
10212 #include <${cf_cv_ncurses_header:-curses.h}>
10213 #include <$cf_test>
10218 int x = auto_left_margin; (void)x
10223 rm -f conftest.$ac_objext
10224 if { (eval echo "$as_me:10224: \"$ac_compile\"") >&5
10225 (eval $ac_compile) 2>&5
10227 echo "$as_me:10227: \$? = $ac_status" >&5
10228 (exit $ac_status); } &&
10229 { ac_try='test -s conftest.$ac_objext'
10230 { (eval echo "$as_me:10230: \"$ac_try\"") >&5
10231 (eval $ac_try) 2>&5
10233 echo "$as_me:10233: \$? = $ac_status" >&5
10234 (exit $ac_status); }; }; then
10236 cf_cv_term_header="$cf_test"
10238 echo "$as_me: failed program was:" >&5
10239 cat conftest.$ac_ext >&5
10241 cf_cv_term_header=unknown
10244 rm -f conftest.$ac_objext conftest.$ac_ext
10245 test "$cf_cv_term_header" != unknown && break
10249 echo "$as_me:10249: result: $cf_cv_term_header" >&5
10250 echo "${ECHO_T}$cf_cv_term_header" >&6
10252 # Set definitions to allow ifdef'ing to accommodate subdirectories
10254 case $cf_cv_term_header in
10257 cat >>confdefs.h <<\EOF
10258 #define HAVE_TERM_H 1
10264 case $cf_cv_term_header in
10267 cat >>confdefs.h <<\EOF
10268 #define HAVE_NCURSES_TERM_H 1
10274 cat >>confdefs.h <<\EOF
10275 #define HAVE_NCURSESW_TERM_H 1
10281 # some applications need this, but should check for NCURSES_VERSION
10283 cat >>confdefs.h <<\EOF
10287 echo "$as_me:10287: checking for ncurses version" >&5
10288 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10289 if test "${cf_cv_ncurses_version+set}" = set; then
10290 echo $ECHO_N "(cached) $ECHO_C" >&6
10293 cf_cv_ncurses_version=no
10296 if test "$cross_compiling" = yes; then
10298 # This will not work if the preprocessor splits the line after the
10299 # Autoconf token. The 'unproto' program does that.
10300 cat > conftest.$ac_ext <<EOF
10301 #include <${cf_cv_ncurses_header:-curses.h}>
10303 #ifdef NCURSES_VERSION
10304 Autoconf NCURSES_VERSION
10312 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10313 { (eval echo "$as_me:10313: \"$cf_try\"") >&5
10314 (eval $cf_try) 2>&5
10316 echo "$as_me:10316: \$? = $ac_status" >&5
10317 (exit $ac_status); }
10318 if test -f conftest.out ; then
10319 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10320 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10325 cat >conftest.$ac_ext <<_ACEOF
10326 #line 10326 "configure"
10327 #include "confdefs.h"
10329 #include <${cf_cv_ncurses_header:-curses.h}>
10333 FILE *fp = fopen("$cf_tempfile", "w");
10334 #ifdef NCURSES_VERSION
10335 # ifdef NCURSES_VERSION_PATCH
10336 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10338 fprintf(fp, "%s\n", NCURSES_VERSION);
10341 # ifdef __NCURSES_H
10342 fprintf(fp, "old\n");
10347 ${cf_cv_main_return:-return}(0);
10350 rm -f conftest$ac_exeext
10351 if { (eval echo "$as_me:10351: \"$ac_link\"") >&5
10352 (eval $ac_link) 2>&5
10354 echo "$as_me:10354: \$? = $ac_status" >&5
10355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10356 { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357 (eval $ac_try) 2>&5
10359 echo "$as_me:10359: \$? = $ac_status" >&5
10360 (exit $ac_status); }; }; then
10362 cf_cv_ncurses_version=`cat $cf_tempfile`
10364 echo "$as_me: program exited with status $ac_status" >&5
10365 echo "$as_me: failed program was:" >&5
10366 cat conftest.$ac_ext >&5
10368 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10373 echo "$as_me:10373: result: $cf_cv_ncurses_version" >&5
10374 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10375 test "$cf_cv_ncurses_version" = no ||
10376 cat >>confdefs.h <<\EOF
10380 cf_nculib_root=ncurses
10381 # This works, except for the special case where we find gpm, but
10382 # ncurses is in a nonstandard location via $LIBS, and we really want
10385 cf_ncurses_SAVE="$LIBS"
10386 echo "$as_me:10386: checking for Gpm_Open in -lgpm" >&5
10387 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10388 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10389 echo $ECHO_N "(cached) $ECHO_C" >&6
10391 ac_check_lib_save_LIBS=$LIBS
10393 cat >conftest.$ac_ext <<_ACEOF
10394 #line 10394 "configure"
10395 #include "confdefs.h"
10397 /* Override any gcc2 internal prototype to avoid an error. */
10401 /* We use char because int might match the return type of a gcc2
10402 builtin and then its argument prototype would still apply. */
10412 rm -f conftest.$ac_objext conftest$ac_exeext
10413 if { (eval echo "$as_me:10413: \"$ac_link\"") >&5
10414 (eval $ac_link) 2>&5
10416 echo "$as_me:10416: \$? = $ac_status" >&5
10417 (exit $ac_status); } &&
10418 { ac_try='test -s conftest$ac_exeext'
10419 { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420 (eval $ac_try) 2>&5
10422 echo "$as_me:10422: \$? = $ac_status" >&5
10423 (exit $ac_status); }; }; then
10424 ac_cv_lib_gpm_Gpm_Open=yes
10426 echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 ac_cv_lib_gpm_Gpm_Open=no
10430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10431 LIBS=$ac_check_lib_save_LIBS
10433 echo "$as_me:10433: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10434 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10435 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10436 echo "$as_me:10436: checking for initscr in -lgpm" >&5
10437 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10438 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10439 echo $ECHO_N "(cached) $ECHO_C" >&6
10441 ac_check_lib_save_LIBS=$LIBS
10443 cat >conftest.$ac_ext <<_ACEOF
10444 #line 10444 "configure"
10445 #include "confdefs.h"
10447 /* Override any gcc2 internal prototype to avoid an error. */
10451 /* We use char because int might match the return type of a gcc2
10452 builtin and then its argument prototype would still apply. */
10462 rm -f conftest.$ac_objext conftest$ac_exeext
10463 if { (eval echo "$as_me:10463: \"$ac_link\"") >&5
10464 (eval $ac_link) 2>&5
10466 echo "$as_me:10466: \$? = $ac_status" >&5
10467 (exit $ac_status); } &&
10468 { ac_try='test -s conftest$ac_exeext'
10469 { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470 (eval $ac_try) 2>&5
10472 echo "$as_me:10472: \$? = $ac_status" >&5
10473 (exit $ac_status); }; }; then
10474 ac_cv_lib_gpm_initscr=yes
10476 echo "$as_me: failed program was:" >&5
10477 cat conftest.$ac_ext >&5
10478 ac_cv_lib_gpm_initscr=no
10480 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10481 LIBS=$ac_check_lib_save_LIBS
10483 echo "$as_me:10483: result: $ac_cv_lib_gpm_initscr" >&5
10484 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10485 if test $ac_cv_lib_gpm_initscr = yes; then
10486 LIBS="$cf_ncurses_SAVE"
10488 cf_ncurses_LIBS="-lgpm"
10495 # This is only necessary if you are linking against an obsolete
10496 # version of ncurses (but it should do no harm, since it's static).
10497 if test "$cf_nculib_root" = ncurses ; then
10498 echo "$as_me:10498: checking for tgoto in -lmytinfo" >&5
10499 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10500 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10501 echo $ECHO_N "(cached) $ECHO_C" >&6
10503 ac_check_lib_save_LIBS=$LIBS
10504 LIBS="-lmytinfo $LIBS"
10505 cat >conftest.$ac_ext <<_ACEOF
10506 #line 10506 "configure"
10507 #include "confdefs.h"
10509 /* Override any gcc2 internal prototype to avoid an error. */
10513 /* We use char because int might match the return type of a gcc2
10514 builtin and then its argument prototype would still apply. */
10524 rm -f conftest.$ac_objext conftest$ac_exeext
10525 if { (eval echo "$as_me:10525: \"$ac_link\"") >&5
10526 (eval $ac_link) 2>&5
10528 echo "$as_me:10528: \$? = $ac_status" >&5
10529 (exit $ac_status); } &&
10530 { ac_try='test -s conftest$ac_exeext'
10531 { (eval echo "$as_me:10531: \"$ac_try\"") >&5
10532 (eval $ac_try) 2>&5
10534 echo "$as_me:10534: \$? = $ac_status" >&5
10535 (exit $ac_status); }; }; then
10536 ac_cv_lib_mytinfo_tgoto=yes
10538 echo "$as_me: failed program was:" >&5
10539 cat conftest.$ac_ext >&5
10540 ac_cv_lib_mytinfo_tgoto=no
10542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10543 LIBS=$ac_check_lib_save_LIBS
10545 echo "$as_me:10545: result: $ac_cv_lib_mytinfo_tgoto" >&5
10546 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10547 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10548 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10555 cf_add_libs="$LIBS"
10558 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10559 # filter duplicates
10560 for cf_add_1lib in $cf_add_0lib; do
10561 for cf_add_2lib in $cf_add_libs; do
10562 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10569 LIBS="$cf_add_libs"
10571 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10574 cf_add_libs="$LIBS"
10577 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10578 # filter duplicates
10579 for cf_add_1lib in $cf_add_0lib; do
10580 for cf_add_2lib in $cf_add_libs; do
10581 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10586 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10588 LIBS="$cf_add_libs"
10592 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10594 echo "$as_me:10594: checking for initscr" >&5
10595 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10596 if test "${ac_cv_func_initscr+set}" = set; then
10597 echo $ECHO_N "(cached) $ECHO_C" >&6
10599 cat >conftest.$ac_ext <<_ACEOF
10600 #line 10600 "configure"
10601 #include "confdefs.h"
10602 #define initscr autoconf_temporary
10603 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10610 /* We use char because int might match the return type of a gcc2
10611 builtin and then its argument prototype would still apply. */
10612 char initscr (void);
10618 /* The GNU C library defines stubs for functions which it implements
10619 to always fail with ENOSYS. Some functions are actually named
10620 something starting with __ and the normal name is an alias. */
10621 #if defined (__stub_initscr) || defined (__stub___initscr)
10622 #error found stub for initscr
10630 rm -f conftest.$ac_objext conftest$ac_exeext
10631 if { (eval echo "$as_me:10631: \"$ac_link\"") >&5
10632 (eval $ac_link) 2>&5
10634 echo "$as_me:10634: \$? = $ac_status" >&5
10635 (exit $ac_status); } &&
10636 { ac_try='test -s conftest$ac_exeext'
10637 { (eval echo "$as_me:10637: \"$ac_try\"") >&5
10638 (eval $ac_try) 2>&5
10640 echo "$as_me:10640: \$? = $ac_status" >&5
10641 (exit $ac_status); }; }; then
10642 ac_cv_func_initscr=yes
10644 echo "$as_me: failed program was:" >&5
10645 cat conftest.$ac_ext >&5
10646 ac_cv_func_initscr=no
10648 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10650 echo "$as_me:10650: result: $ac_cv_func_initscr" >&5
10651 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10652 if test $ac_cv_func_initscr = yes; then
10653 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10656 cf_save_LIBS="$LIBS"
10657 echo "$as_me:10657: checking for initscr in -l$cf_nculib_root" >&5
10658 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10659 LIBS="-l$cf_nculib_root $LIBS"
10660 cat >conftest.$ac_ext <<_ACEOF
10661 #line 10661 "configure"
10662 #include "confdefs.h"
10663 #include <${cf_cv_ncurses_header:-curses.h}>
10672 rm -f conftest.$ac_objext conftest$ac_exeext
10673 if { (eval echo "$as_me:10673: \"$ac_link\"") >&5
10674 (eval $ac_link) 2>&5
10676 echo "$as_me:10676: \$? = $ac_status" >&5
10677 (exit $ac_status); } &&
10678 { ac_try='test -s conftest$ac_exeext'
10679 { (eval echo "$as_me:10679: \"$ac_try\"") >&5
10680 (eval $ac_try) 2>&5
10682 echo "$as_me:10682: \$? = $ac_status" >&5
10683 (exit $ac_status); }; }; then
10684 echo "$as_me:10684: result: yes" >&5
10685 echo "${ECHO_T}yes" >&6
10686 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10689 echo "$as_me: failed program was:" >&5
10690 cat conftest.$ac_ext >&5
10691 echo "$as_me:10691: result: no" >&5
10692 echo "${ECHO_T}no" >&6
10695 cf_library_path_list=""
10696 if test -n "${LDFLAGS}${LIBS}" ; then
10697 for cf_library_path in $LDFLAGS $LIBS
10699 case $cf_library_path in
10701 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10703 test "x$cf_library_path" != "xNONE" && \
10704 test -d "$cf_library_path" && \
10706 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10707 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10708 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10709 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10710 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10711 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"
10714 cf_library_path_list="$cf_library_path_list $cf_search"
10722 test "x$prefix" != "xNONE" && \
10723 test -d "$prefix" && \
10725 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10726 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10727 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10728 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10729 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10730 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10733 for cf_subdir_prefix in \
10742 test "x$cf_subdir_prefix" != "x$prefix" && \
10743 test -d "$cf_subdir_prefix" && \
10744 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10745 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10746 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10747 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10748 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10749 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10750 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"
10755 cf_search="$cf_library_path_list $cf_search"
10757 for cf_libdir in $cf_search
10759 echo "$as_me:10759: checking for -l$cf_nculib_root in $cf_libdir" >&5
10760 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10761 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10762 cat >conftest.$ac_ext <<_ACEOF
10763 #line 10763 "configure"
10764 #include "confdefs.h"
10765 #include <${cf_cv_ncurses_header:-curses.h}>
10774 rm -f conftest.$ac_objext conftest$ac_exeext
10775 if { (eval echo "$as_me:10775: \"$ac_link\"") >&5
10776 (eval $ac_link) 2>&5
10778 echo "$as_me:10778: \$? = $ac_status" >&5
10779 (exit $ac_status); } &&
10780 { ac_try='test -s conftest$ac_exeext'
10781 { (eval echo "$as_me:10781: \"$ac_try\"") >&5
10782 (eval $ac_try) 2>&5
10784 echo "$as_me:10784: \$? = $ac_status" >&5
10785 (exit $ac_status); }; }; then
10786 echo "$as_me:10786: result: yes" >&5
10787 echo "${ECHO_T}yes" >&6
10788 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10791 echo "$as_me: failed program was:" >&5
10792 cat conftest.$ac_ext >&5
10793 echo "$as_me:10793: result: no" >&5
10794 echo "${ECHO_T}no" >&6
10795 LIBS="$cf_save_LIBS"
10797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10805 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10807 if test $cf_found_library = no ; then
10808 { { echo "$as_me:10808: error: Cannot link $cf_nculib_root library" >&5
10809 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10810 { (exit 1); exit 1; }; }
10815 if test -n "$cf_ncurses_LIBS" ; then
10816 echo "$as_me:10816: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10817 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10818 cf_ncurses_SAVE="$LIBS"
10819 for p in $cf_ncurses_LIBS ; do
10820 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10821 if test "$q" != "$LIBS" ; then
10825 cat >conftest.$ac_ext <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10828 #include <${cf_cv_ncurses_header:-curses.h}>
10832 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10837 rm -f conftest.$ac_objext conftest$ac_exeext
10838 if { (eval echo "$as_me:10838: \"$ac_link\"") >&5
10839 (eval $ac_link) 2>&5
10841 echo "$as_me:10841: \$? = $ac_status" >&5
10842 (exit $ac_status); } &&
10843 { ac_try='test -s conftest$ac_exeext'
10844 { (eval echo "$as_me:10844: \"$ac_try\"") >&5
10845 (eval $ac_try) 2>&5
10847 echo "$as_me:10847: \$? = $ac_status" >&5
10848 (exit $ac_status); }; }; then
10849 echo "$as_me:10849: result: yes" >&5
10850 echo "${ECHO_T}yes" >&6
10852 echo "$as_me: failed program was:" >&5
10853 cat conftest.$ac_ext >&5
10854 echo "$as_me:10854: result: no" >&5
10855 echo "${ECHO_T}no" >&6
10856 LIBS="$cf_ncurses_SAVE"
10858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10861 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10863 cat >>confdefs.h <<EOF
10864 #define $cf_nculib_ROOT 1
10869 NCURSES_CONFIG=none
10874 if test "$NCURSES_CONFIG_PKG" != none ; then
10875 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10877 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10878 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10879 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10881 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10882 if test -z "$cf_cv_abi_version"
10884 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10887 elif test "$NCURSES_CONFIG" != none ; then
10889 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10891 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10892 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10893 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10895 # ABI version is not available from headers
10896 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10900 for cf_name in MAJOR MINOR PATCH
10902 cat >conftest.$ac_ext <<CF_EOF
10903 #include <${cf_cv_ncurses_header:-curses.h}>
10904 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10906 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10907 { (eval echo "$as_me:10907: \"$cf_try\"") >&5
10908 (eval $cf_try) 2>&5
10910 echo "$as_me:10910: \$? = $ac_status" >&5
10911 (exit $ac_status); }
10912 if test -f conftest.out ; then
10913 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10914 eval NCURSES_$cf_name=\"$cf_result\"
10915 # cat conftest.$ac_ext
10920 cf_cv_abi_version=${NCURSES_MAJOR}
10924 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10926 cf_cv_timestamp=`date`
10928 echo "$as_me:10928: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10929 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10931 echo "$as_me:10931: checking if you want to have a library-prefix" >&5
10932 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10934 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10935 if test "${with_lib_prefix+set}" = set; then
10936 withval="$with_lib_prefix"
10937 with_lib_prefix=$withval
10939 with_lib_prefix=auto
10941 echo "$as_me:10941: result: $with_lib_prefix" >&5
10942 echo "${ECHO_T}$with_lib_prefix" >&6
10944 if test $with_lib_prefix = auto
10947 case $cf_cv_system_name in
10949 if test "$DFT_LWR_MODEL" = libtool; then
10958 (*) LIB_PREFIX='lib'
10961 cf_prefix=$LIB_PREFIX
10963 elif test $with_lib_prefix = no
10967 LIB_PREFIX=$with_lib_prefix
10972 ###############################################################################
10974 if test X"$CC_G_OPT" = X"" ; then
10976 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10979 echo "$as_me:10979: checking for default loader flags" >&5
10980 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10981 case $DFT_LWR_MODEL in
10982 (normal) LD_MODEL='' ;;
10983 (debug) LD_MODEL=$CC_G_OPT ;;
10984 (profile) LD_MODEL='-pg';;
10985 (shared) LD_MODEL='' ;;
10987 echo "$as_me:10987: result: $LD_MODEL" >&5
10988 echo "${ECHO_T}$LD_MODEL" >&6
10991 if test "x$cf_cv_enable_rpath" != xno
10993 echo "$as_me:10993: checking for an rpath option" >&5
10994 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10995 case $cf_cv_system_name in
10997 if test "$GCC" = yes; then
10998 LD_RPATH_OPT="-Wl,-rpath,"
11000 LD_RPATH_OPT="-rpath "
11003 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11004 LD_RPATH_OPT="-Wl,-rpath,"
11006 (openbsd[2-9].*|mirbsd*)
11007 LD_RPATH_OPT="-Wl,-rpath,"
11010 LD_RPATH_OPT="-rpath "
11013 LD_RPATH_OPT="-Wl,-rpath,"
11016 LD_RPATH_OPT="-rpath "
11024 echo "$as_me:11024: result: $LD_RPATH_OPT" >&5
11025 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11027 case "x$LD_RPATH_OPT" in
11029 echo "$as_me:11029: checking if we need a space after rpath option" >&5
11030 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11031 cf_save_LIBS="$LIBS"
11033 cf_add_libs="$LIBS"
11036 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11037 # filter duplicates
11038 for cf_add_1lib in $cf_add_0lib; do
11039 for cf_add_2lib in $cf_add_libs; do
11040 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11045 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11047 LIBS="$cf_add_libs"
11049 cat >conftest.$ac_ext <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11061 rm -f conftest.$ac_objext conftest$ac_exeext
11062 if { (eval echo "$as_me:11062: \"$ac_link\"") >&5
11063 (eval $ac_link) 2>&5
11065 echo "$as_me:11065: \$? = $ac_status" >&5
11066 (exit $ac_status); } &&
11067 { ac_try='test -s conftest$ac_exeext'
11068 { (eval echo "$as_me:11068: \"$ac_try\"") >&5
11069 (eval $ac_try) 2>&5
11071 echo "$as_me:11071: \$? = $ac_status" >&5
11072 (exit $ac_status); }; }; then
11075 echo "$as_me: failed program was:" >&5
11076 cat conftest.$ac_ext >&5
11079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11080 LIBS="$cf_save_LIBS"
11081 echo "$as_me:11081: result: $cf_rpath_space" >&5
11082 echo "${ECHO_T}$cf_rpath_space" >&6
11083 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11092 INSTALL_LIB="-m 644"
11093 : ${rel_builddir:=.}
11099 cf_cv_do_symlinks=no
11101 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11103 echo "$as_me:11103: checking if release/abi version should be used for shared libs" >&5
11104 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11106 # Check whether --with-shlib-version or --without-shlib-version was given.
11107 if test "${with_shlib_version+set}" = set; then
11108 withval="$with_shlib_version"
11109 test -z "$withval" && withval=auto
11112 cf_cv_shlib_version=auto
11115 cf_cv_shlib_version=$withval
11118 echo "$as_me:11118: result: $withval" >&5
11119 echo "${ECHO_T}$withval" >&6
11120 { { echo "$as_me:11120: error: option value must be one of: rel, abi, or auto" >&5
11121 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11122 { (exit 1); exit 1; }; }
11127 cf_cv_shlib_version=auto
11129 echo "$as_me:11129: result: $cf_cv_shlib_version" >&5
11130 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11132 cf_cv_rm_so_locs=no
11135 # Some less-capable ports of gcc support only -fpic
11139 if test "$GCC" = yes
11143 case $cf_cv_system_name in
11144 (*linux*) # e.g., PGI compiler
11150 if test "$cf_try_fPIC" = yes
11152 echo "$as_me:11152: checking which $CC option to use" >&5
11153 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11154 cf_save_CFLAGS="$CFLAGS"
11155 for CC_SHARED_OPTS in -fPIC -fpic ''
11157 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11158 cat >conftest.$ac_ext <<_ACEOF
11159 #line 11159 "configure"
11160 #include "confdefs.h"
11170 rm -f conftest.$ac_objext
11171 if { (eval echo "$as_me:11171: \"$ac_compile\"") >&5
11172 (eval $ac_compile) 2>&5
11174 echo "$as_me:11174: \$? = $ac_status" >&5
11175 (exit $ac_status); } &&
11176 { ac_try='test -s conftest.$ac_objext'
11177 { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178 (eval $ac_try) 2>&5
11180 echo "$as_me:11180: \$? = $ac_status" >&5
11181 (exit $ac_status); }; }; then
11184 echo "$as_me: failed program was:" >&5
11185 cat conftest.$ac_ext >&5
11187 rm -f conftest.$ac_objext conftest.$ac_ext
11189 echo "$as_me:11189: result: $CC_SHARED_OPTS" >&5
11190 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11191 CFLAGS="$cf_save_CFLAGS"
11194 cf_cv_shlib_version_infix=no
11196 case $cf_cv_system_name in
11197 (aix4.3-9*|aix[5-7]*)
11198 if test "$GCC" = yes; then
11199 CC_SHARED_OPTS='-Wl,-brtl'
11200 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11202 CC_SHARED_OPTS='-brtl'
11203 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11204 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11208 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11212 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11213 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11214 cf_cv_shlib_version=cygdll
11215 cf_cv_shlib_version_infix=cygdll
11218 cat >mk_shared_lib.sh <<-CF_EOF
11221 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11224 Linking shared library
11225 ** SHARED_LIB \$SHARED_LIB
11226 ** IMPORT_LIB \$IMPORT_LIB
11228 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11230 chmod +x mk_shared_lib.sh
11234 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11235 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11236 cf_cv_shlib_version=msysdll
11237 cf_cv_shlib_version_infix=msysdll
11240 cat >mk_shared_lib.sh <<-CF_EOF
11243 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11246 Linking shared library
11247 ** SHARED_LIB \$SHARED_LIB
11248 ** IMPORT_LIB \$IMPORT_LIB
11250 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11252 chmod +x mk_shared_lib.sh
11255 cf_try_cflags="no-cpp-precomp"
11256 CC_SHARED_OPTS="-dynamic"
11257 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11258 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11259 cf_cv_shlib_version_infix=yes
11260 echo "$as_me:11260: checking if ld -search_paths_first works" >&5
11261 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11262 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11263 echo $ECHO_N "(cached) $ECHO_C" >&6
11266 cf_save_LDFLAGS=$LDFLAGS
11267 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11268 cat >conftest.$ac_ext <<_ACEOF
11269 #line 11269 "configure"
11270 #include "confdefs.h"
11280 rm -f conftest.$ac_objext conftest$ac_exeext
11281 if { (eval echo "$as_me:11281: \"$ac_link\"") >&5
11282 (eval $ac_link) 2>&5
11284 echo "$as_me:11284: \$? = $ac_status" >&5
11285 (exit $ac_status); } &&
11286 { ac_try='test -s conftest$ac_exeext'
11287 { (eval echo "$as_me:11287: \"$ac_try\"") >&5
11288 (eval $ac_try) 2>&5
11290 echo "$as_me:11290: \$? = $ac_status" >&5
11291 (exit $ac_status); }; }; then
11292 cf_cv_ldflags_search_paths_first=yes
11294 echo "$as_me: failed program was:" >&5
11295 cat conftest.$ac_ext >&5
11296 cf_cv_ldflags_search_paths_first=no
11298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11299 LDFLAGS=$cf_save_LDFLAGS
11301 echo "$as_me:11301: result: $cf_cv_ldflags_search_paths_first" >&5
11302 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11303 if test $cf_cv_ldflags_search_paths_first = yes; then
11304 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11308 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11309 if test "$GCC" != yes; then
11310 CC_SHARED_OPTS='+Z'
11312 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11313 INSTALL_LIB="-m 555"
11316 # (tested with gcc 2.7.2 -- I don't have c89)
11317 if test "$GCC" = yes; then
11318 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11320 CC_SHARED_OPTS='+Z'
11321 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11323 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11324 # HP-UX shared libraries must be executable, and should be
11325 # readonly to exploit a quirk in the memory manager.
11326 INSTALL_LIB="-m 555"
11329 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11330 if test "$cf_cv_shlib_version" = rel; then
11331 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11333 cf_shared_soname='`basename $@`'
11336 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11339 if test "$cf_cv_enable_rpath" = yes ; then
11340 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11342 # tested with IRIX 5.2 and 'cc'.
11343 if test "$GCC" != yes; then
11344 CC_SHARED_OPTS='-KPIC'
11345 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11347 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11349 cf_cv_rm_so_locs=yes
11351 (linux*|gnu*|k*bsd*-gnu)
11352 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11353 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11354 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11356 if test "$cf_cv_enable_rpath" = yes ; then
11357 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11360 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11361 if test "$cf_cv_shlib_version" = rel; then
11362 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11364 cf_cv_shared_soname='`basename $@`'
11367 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11370 cf_cv_shlib_version=msvcdll
11371 cf_cv_shlib_version_infix=msvcdll
11374 if test "$DFT_LWR_MODEL" = "shared" ; then
11375 LOCAL_LDFLAGS="-link -dll"
11376 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11377 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11380 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11381 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11382 cat >mk_shared_lib.sh <<-CF_EOF
11385 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11390 Linking shared library
11391 ** SHARED LIB \$SHARED_LIB
11392 ** IMPORT_LIB \$IMPORT_LIB
11394 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11395 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11396 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11398 chmod +x mk_shared_lib.sh
11399 cat >mk_prog.sh <<-CF_EOF
11402 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11405 ldopts=("/subsystem:console")
11408 while test \$# -gt 0; do
11411 # ignore -link argument
11414 # ignore runtime-library option
11429 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11432 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11438 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11439 ldopts+=("\${linkarg}")
11447 ldopts+=("-out:\$1")
11456 if [ "\$isdll" -ne 0 ]; then
11457 for lib in \${libs[*]}; do
11458 ldopts+=("\$lib.dll.lib")
11461 for lib in \${libs[*]}; do
11462 ldopts+=("\$lib.lib")
11467 ** ld options: "\${ldopts[@]}"
11469 exec \$LD \${ldopts[@]}
11471 chmod +x mk_prog.sh
11472 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11473 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11476 cf_cv_shlib_version=mingw
11477 cf_cv_shlib_version_infix=mingw
11480 if test "$DFT_LWR_MODEL" = "shared" ; then
11481 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11482 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11483 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11486 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11487 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11488 cat >mk_shared_lib.sh <<-CF_EOF
11491 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11494 Linking shared library
11495 ** SHARED_LIB \$SHARED_LIB
11496 ** IMPORT_LIB \$IMPORT_LIB
11498 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11500 chmod +x mk_shared_lib.sh
11502 (openbsd[2-9].*|mirbsd*)
11503 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11504 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11505 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11507 if test "$cf_cv_enable_rpath" = yes ; then
11508 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11510 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11512 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11513 if test "$cf_cv_shlib_version" = rel; then
11514 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11516 cf_cv_shared_soname='`basename $@`'
11519 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11523 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11527 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11529 (nto-qnx*|openbsd*|freebsd[12].*)
11530 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11531 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11532 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11534 (dragonfly*|freebsd*)
11535 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11536 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11537 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11538 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11539 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11542 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11543 if test "$cf_cv_shlib_version" = rel; then
11544 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11546 cf_cv_shared_soname='`basename $@`'
11549 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11552 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11553 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11554 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11555 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11556 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11557 if test "$cf_cv_shlib_version" = auto; then
11558 if test -f /usr/libexec/ld.elf_so; then
11559 cf_cv_shlib_version=abi
11561 cf_cv_shlib_version=rel
11565 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11566 if test "$cf_cv_shlib_version" = rel; then
11567 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11569 cf_cv_shared_soname='`basename $@`'
11572 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11574 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11578 # tested with OSF/1 V3.2 and 'cc'
11579 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11580 # link with shared libs).
11581 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11584 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11587 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11588 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11589 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11590 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11592 cf_cv_rm_so_locs=yes
11594 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11595 # tested with osr5.0.5
11596 if test "$GCC" != yes; then
11597 CC_SHARED_OPTS='-belf -KPIC'
11599 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11600 if test "$cf_cv_enable_rpath" = yes ; then
11601 # only way is to set LD_RUN_PATH but no switch for it
11604 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11605 LINK_PROGS='LD_RUN_PATH=${libdir}'
11606 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11609 # tested with SunOS 4.1.1 and gcc 2.7.0
11610 if test "$GCC" != yes; then
11611 CC_SHARED_OPTS='-KPIC'
11613 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11614 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11617 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11618 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11619 if test "$DFT_LWR_MODEL" = "shared" ; then
11620 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11621 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11623 if test "$cf_cv_enable_rpath" = yes ; then
11624 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11627 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11628 if test "$cf_cv_shlib_version" = rel; then
11629 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11631 cf_cv_shared_soname='`basename $@`'
11634 if test "$GCC" != yes; then
11635 cf_save_CFLAGS="$CFLAGS"
11636 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11638 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11639 cat >conftest.$ac_ext <<_ACEOF
11640 #line 11640 "configure"
11641 #include "confdefs.h"
11651 rm -f conftest.$ac_objext
11652 if { (eval echo "$as_me:11652: \"$ac_compile\"") >&5
11653 (eval $ac_compile) 2>&5
11655 echo "$as_me:11655: \$? = $ac_status" >&5
11656 (exit $ac_status); } &&
11657 { ac_try='test -s conftest.$ac_objext'
11658 { (eval echo "$as_me:11658: \"$ac_try\"") >&5
11659 (eval $ac_try) 2>&5
11661 echo "$as_me:11661: \$? = $ac_status" >&5
11662 (exit $ac_status); }; }; then
11665 echo "$as_me: failed program was:" >&5
11666 cat conftest.$ac_ext >&5
11668 rm -f conftest.$ac_objext conftest.$ac_ext
11670 CFLAGS="$cf_save_CFLAGS"
11671 CC_SHARED_OPTS=$cf_shared_opts
11672 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11674 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11677 (sysv5uw7*|unix_sv*)
11678 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11679 if test "$GCC" != yes; then
11680 CC_SHARED_OPTS='-KPIC'
11682 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11685 CC_SHARED_OPTS='unknown'
11686 MK_SHARED_LIB='echo unknown'
11690 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11691 case "$cf_cv_shlib_version" in
11693 case "$MK_SHARED_LIB" in
11695 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11698 { echo "$as_me:11698: WARNING: ignored --with-shlib-version" >&5
11699 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11705 if test -n "$cf_try_cflags"
11707 cat > conftest.$ac_ext <<EOF
11708 #line 11708 "${as_me:-configure}"
11710 int main(int argc, char *argv[])
11713 return (argv[argc-1] == 0) ;
11716 cf_save_CFLAGS="$CFLAGS"
11717 for cf_opt in $cf_try_cflags
11719 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11720 echo "$as_me:11720: checking if CFLAGS option -$cf_opt works" >&5
11721 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11722 if { (eval echo "$as_me:11722: \"$ac_compile\"") >&5
11723 (eval $ac_compile) 2>&5
11725 echo "$as_me:11725: \$? = $ac_status" >&5
11726 (exit $ac_status); }; then
11727 echo "$as_me:11727: result: yes" >&5
11728 echo "${ECHO_T}yes" >&6
11729 cf_save_CFLAGS="$CFLAGS"
11731 echo "$as_me:11731: result: no" >&5
11732 echo "${ECHO_T}no" >&6
11735 CFLAGS="$cf_save_CFLAGS"
11738 # RPATH_LIST is a colon-separated list of directories
11739 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11740 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11742 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11744 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11746 echo "${as_me:-configure}:11746: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11748 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11750 echo "${as_me:-configure}:11750: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11752 # The test/sample programs in the original tree link using rpath option.
11753 # Make it optional for packagers.
11754 if test -n "$LOCAL_LDFLAGS"
11756 echo "$as_me:11756: checking if you want to link sample programs with rpath option" >&5
11757 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11759 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11760 if test "${enable_rpath_link+set}" = set; then
11761 enableval="$enable_rpath_link"
11762 with_rpath_link=$enableval
11764 with_rpath_link=yes
11766 echo "$as_me:11766: result: $with_rpath_link" >&5
11767 echo "${ECHO_T}$with_rpath_link" >&6
11768 if test "$with_rpath_link" = no
11775 ###############################################################################
11777 ### use option --enable-broken-linker to force on use of broken-linker support
11779 echo "$as_me:11779: checking if you want broken-linker support code" >&5
11780 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
11782 # Check whether --enable-broken_linker or --disable-broken_linker was given.
11783 if test "${enable_broken_linker+set}" = set; then
11784 enableval="$enable_broken_linker"
11785 with_broken_linker=$enableval
11787 with_broken_linker=no
11789 echo "$as_me:11789: result: $with_broken_linker" >&5
11790 echo "${ECHO_T}$with_broken_linker" >&6
11792 : ${BROKEN_LINKER:=0}
11793 if test "x$with_broken_linker" = xyes ; then
11795 cat >>confdefs.h <<\EOF
11796 #define BROKEN_LINKER 1
11802 # Check to define _XOPEN_SOURCE "automatically"
11804 echo "$as_me:11804: checking if the POSIX test-macros are already defined" >&5
11805 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11806 if test "${cf_cv_posix_visible+set}" = set; then
11807 echo $ECHO_N "(cached) $ECHO_C" >&6
11810 cat >conftest.$ac_ext <<_ACEOF
11811 #line 11811 "configure"
11812 #include "confdefs.h"
11818 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
11819 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
11820 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
11821 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
11822 #error conflicting symbols found
11829 rm -f conftest.$ac_objext
11830 if { (eval echo "$as_me:11830: \"$ac_compile\"") >&5
11831 (eval $ac_compile) 2>&5
11833 echo "$as_me:11833: \$? = $ac_status" >&5
11834 (exit $ac_status); } &&
11835 { ac_try='test -s conftest.$ac_objext'
11836 { (eval echo "$as_me:11836: \"$ac_try\"") >&5
11837 (eval $ac_try) 2>&5
11839 echo "$as_me:11839: \$? = $ac_status" >&5
11840 (exit $ac_status); }; }; then
11841 cf_cv_posix_visible=no
11843 echo "$as_me: failed program was:" >&5
11844 cat conftest.$ac_ext >&5
11845 cf_cv_posix_visible=yes
11847 rm -f conftest.$ac_objext conftest.$ac_ext
11850 echo "$as_me:11850: result: $cf_cv_posix_visible" >&5
11851 echo "${ECHO_T}$cf_cv_posix_visible" >&6
11853 if test "$cf_cv_posix_visible" = no; then
11855 cf_XOPEN_SOURCE=600
11856 cf_POSIX_C_SOURCE=199506L
11861 cf_xopen_source="-D_ALL_SOURCE"
11864 cf_XOPEN_SOURCE=600
11867 cf_xopen_source="-D_APPLE_C_SOURCE"
11870 cf_xopen_source="-D_DARWIN_C_SOURCE"
11873 (freebsd*|dragonfly*|midnightbsd*)
11874 # 5.x headers associate
11875 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
11876 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
11877 cf_POSIX_C_SOURCE=200112L
11878 cf_XOPEN_SOURCE=600
11879 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11882 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
11885 cf_xopen_source="-D_HPUX_SOURCE"
11888 cf_xopen_source="-D_SGI_SOURCE"
11891 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
11893 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
11895 echo "$as_me:11895: checking if this is the GNU C library" >&5
11896 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
11897 if test "${cf_cv_gnu_library+set}" = set; then
11898 echo $ECHO_N "(cached) $ECHO_C" >&6
11901 cat >conftest.$ac_ext <<_ACEOF
11902 #line 11902 "configure"
11903 #include "confdefs.h"
11904 #include <sys/types.h>
11909 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
11911 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
11914 # error not GNU C library
11920 rm -f conftest.$ac_objext
11921 if { (eval echo "$as_me:11921: \"$ac_compile\"") >&5
11922 (eval $ac_compile) 2>&5
11924 echo "$as_me:11924: \$? = $ac_status" >&5
11925 (exit $ac_status); } &&
11926 { ac_try='test -s conftest.$ac_objext'
11927 { (eval echo "$as_me:11927: \"$ac_try\"") >&5
11928 (eval $ac_try) 2>&5
11930 echo "$as_me:11930: \$? = $ac_status" >&5
11931 (exit $ac_status); }; }; then
11932 cf_cv_gnu_library=yes
11934 echo "$as_me: failed program was:" >&5
11935 cat conftest.$ac_ext >&5
11936 cf_cv_gnu_library=no
11938 rm -f conftest.$ac_objext conftest.$ac_ext
11941 echo "$as_me:11941: result: $cf_cv_gnu_library" >&5
11942 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11944 if test x$cf_cv_gnu_library = xyes; then
11946 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11947 # was changed to help a little. newlib incorporated the change about 4
11949 echo "$as_me:11949: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11950 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11951 if test "${cf_cv_gnu_library_219+set}" = set; then
11952 echo $ECHO_N "(cached) $ECHO_C" >&6
11955 cf_save="$CPPFLAGS"
11957 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11958 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11960 cat >conftest.$ac_ext <<_ACEOF
11961 #line 11961 "configure"
11962 #include "confdefs.h"
11963 #include <sys/types.h>
11968 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11970 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11973 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11979 rm -f conftest.$ac_objext
11980 if { (eval echo "$as_me:11980: \"$ac_compile\"") >&5
11981 (eval $ac_compile) 2>&5
11983 echo "$as_me:11983: \$? = $ac_status" >&5
11984 (exit $ac_status); } &&
11985 { ac_try='test -s conftest.$ac_objext'
11986 { (eval echo "$as_me:11986: \"$ac_try\"") >&5
11987 (eval $ac_try) 2>&5
11989 echo "$as_me:11989: \$? = $ac_status" >&5
11990 (exit $ac_status); }; }; then
11991 cf_cv_gnu_library_219=yes
11993 echo "$as_me: failed program was:" >&5
11994 cat conftest.$ac_ext >&5
11995 cf_cv_gnu_library_219=no
11997 rm -f conftest.$ac_objext conftest.$ac_ext
11998 CPPFLAGS="$cf_save"
12001 echo "$as_me:12001: result: $cf_cv_gnu_library_219" >&5
12002 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12004 if test "x$cf_cv_gnu_library_219" = xyes; then
12005 cf_save="$CPPFLAGS"
12006 echo "$as_me:12006: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12007 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12008 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12009 echo $ECHO_N "(cached) $ECHO_C" >&6
12015 cf_new_extra_cppflags=
12017 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12019 case $cf_fix_cppflags in
12021 case $cf_add_cflags in
12022 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12023 case $cf_add_cflags in
12025 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12027 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12028 && test -z "${cf_tst_cflags}" \
12029 && cf_fix_cppflags=yes
12031 if test $cf_fix_cppflags = yes ; then
12033 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12034 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12037 elif test "${cf_tst_cflags}" = "\"'" ; then
12039 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12040 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12046 case "$CPPFLAGS" in
12050 case $cf_add_cflags in
12052 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12054 CPPFLAGS=`echo "$CPPFLAGS" | \
12055 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12056 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12061 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12062 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12069 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12070 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12077 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12078 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12080 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12082 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12083 && test -z "${cf_tst_cflags}" \
12084 && cf_fix_cppflags=no
12089 if test -n "$cf_new_cflags" ; then
12091 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12092 CFLAGS="${CFLAGS}$cf_new_cflags"
12096 if test -n "$cf_new_cppflags" ; then
12098 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12099 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12103 if test -n "$cf_new_extra_cppflags" ; then
12105 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12106 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12110 cat >conftest.$ac_ext <<_ACEOF
12111 #line 12111 "configure"
12112 #include "confdefs.h"
12114 #include <limits.h>
12115 #include <sys/types.h>
12121 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12124 # error GNU C library is too old
12130 rm -f conftest.$ac_objext
12131 if { (eval echo "$as_me:12131: \"$ac_compile\"") >&5
12132 (eval $ac_compile) 2>&5
12134 echo "$as_me:12134: \$? = $ac_status" >&5
12135 (exit $ac_status); } &&
12136 { ac_try='test -s conftest.$ac_objext'
12137 { (eval echo "$as_me:12137: \"$ac_try\"") >&5
12138 (eval $ac_try) 2>&5
12140 echo "$as_me:12140: \$? = $ac_status" >&5
12141 (exit $ac_status); }; }; then
12142 cf_cv_gnu_dftsrc_219=yes
12144 echo "$as_me: failed program was:" >&5
12145 cat conftest.$ac_ext >&5
12146 cf_cv_gnu_dftsrc_219=no
12148 rm -f conftest.$ac_objext conftest.$ac_ext
12151 echo "$as_me:12151: result: $cf_cv_gnu_dftsrc_219" >&5
12152 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12153 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12155 cf_cv_gnu_dftsrc_219=maybe
12158 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12160 echo "$as_me:12160: checking if we must define _GNU_SOURCE" >&5
12161 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12162 if test "${cf_cv_gnu_source+set}" = set; then
12163 echo $ECHO_N "(cached) $ECHO_C" >&6
12166 cat >conftest.$ac_ext <<_ACEOF
12167 #line 12167 "configure"
12168 #include "confdefs.h"
12169 #include <sys/types.h>
12174 #ifndef _XOPEN_SOURCE
12175 #error expected _XOPEN_SOURCE to be defined
12181 rm -f conftest.$ac_objext
12182 if { (eval echo "$as_me:12182: \"$ac_compile\"") >&5
12183 (eval $ac_compile) 2>&5
12185 echo "$as_me:12185: \$? = $ac_status" >&5
12186 (exit $ac_status); } &&
12187 { ac_try='test -s conftest.$ac_objext'
12188 { (eval echo "$as_me:12188: \"$ac_try\"") >&5
12189 (eval $ac_try) 2>&5
12191 echo "$as_me:12191: \$? = $ac_status" >&5
12192 (exit $ac_status); }; }; then
12193 cf_cv_gnu_source=no
12195 echo "$as_me: failed program was:" >&5
12196 cat conftest.$ac_ext >&5
12197 cf_save="$CPPFLAGS"
12202 cf_new_extra_cppflags=
12204 for cf_add_cflags in -D_GNU_SOURCE
12206 case $cf_fix_cppflags in
12208 case $cf_add_cflags in
12209 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12210 case $cf_add_cflags in
12212 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12215 && test -z "${cf_tst_cflags}" \
12216 && cf_fix_cppflags=yes
12218 if test $cf_fix_cppflags = yes ; then
12220 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12221 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12224 elif test "${cf_tst_cflags}" = "\"'" ; then
12226 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12227 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12233 case "$CPPFLAGS" in
12237 case $cf_add_cflags in
12239 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12241 CPPFLAGS=`echo "$CPPFLAGS" | \
12242 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12243 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12248 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12249 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12256 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12257 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12264 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12265 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12267 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12269 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12270 && test -z "${cf_tst_cflags}" \
12271 && cf_fix_cppflags=no
12276 if test -n "$cf_new_cflags" ; then
12278 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12279 CFLAGS="${CFLAGS}$cf_new_cflags"
12283 if test -n "$cf_new_cppflags" ; then
12285 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12286 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12290 if test -n "$cf_new_extra_cppflags" ; then
12292 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12293 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12297 cat >conftest.$ac_ext <<_ACEOF
12298 #line 12298 "configure"
12299 #include "confdefs.h"
12300 #include <sys/types.h>
12305 #ifdef _XOPEN_SOURCE
12306 #error expected _XOPEN_SOURCE to be undefined
12312 rm -f conftest.$ac_objext
12313 if { (eval echo "$as_me:12313: \"$ac_compile\"") >&5
12314 (eval $ac_compile) 2>&5
12316 echo "$as_me:12316: \$? = $ac_status" >&5
12317 (exit $ac_status); } &&
12318 { ac_try='test -s conftest.$ac_objext'
12319 { (eval echo "$as_me:12319: \"$ac_try\"") >&5
12320 (eval $ac_try) 2>&5
12322 echo "$as_me:12322: \$? = $ac_status" >&5
12323 (exit $ac_status); }; }; then
12324 cf_cv_gnu_source=no
12326 echo "$as_me: failed program was:" >&5
12327 cat conftest.$ac_ext >&5
12328 cf_cv_gnu_source=yes
12330 rm -f conftest.$ac_objext conftest.$ac_ext
12331 CPPFLAGS="$cf_save"
12334 rm -f conftest.$ac_objext conftest.$ac_ext
12337 echo "$as_me:12337: result: $cf_cv_gnu_source" >&5
12338 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12340 if test "$cf_cv_gnu_source" = yes
12342 echo "$as_me:12342: checking if we should also define _DEFAULT_SOURCE" >&5
12343 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12344 if test "${cf_cv_default_source+set}" = set; then
12345 echo $ECHO_N "(cached) $ECHO_C" >&6
12348 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12349 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12351 cat >conftest.$ac_ext <<_ACEOF
12352 #line 12352 "configure"
12353 #include "confdefs.h"
12354 #include <sys/types.h>
12359 #ifdef _DEFAULT_SOURCE
12360 #error expected _DEFAULT_SOURCE to be undefined
12366 rm -f conftest.$ac_objext
12367 if { (eval echo "$as_me:12367: \"$ac_compile\"") >&5
12368 (eval $ac_compile) 2>&5
12370 echo "$as_me:12370: \$? = $ac_status" >&5
12371 (exit $ac_status); } &&
12372 { ac_try='test -s conftest.$ac_objext'
12373 { (eval echo "$as_me:12373: \"$ac_try\"") >&5
12374 (eval $ac_try) 2>&5
12376 echo "$as_me:12376: \$? = $ac_status" >&5
12377 (exit $ac_status); }; }; then
12378 cf_cv_default_source=no
12380 echo "$as_me: failed program was:" >&5
12381 cat conftest.$ac_ext >&5
12382 cf_cv_default_source=yes
12384 rm -f conftest.$ac_objext conftest.$ac_ext
12387 echo "$as_me:12387: result: $cf_cv_default_source" >&5
12388 echo "${ECHO_T}$cf_cv_default_source" >&6
12389 if test "$cf_cv_default_source" = yes
12392 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12393 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12403 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12406 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12409 if test "$cf_cv_posix_visible" = no; then
12411 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12413 cf_save_CFLAGS="$CFLAGS"
12414 cf_save_CPPFLAGS="$CPPFLAGS"
12416 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12417 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12418 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12420 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12421 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12422 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12424 echo "$as_me:12424: checking if we should define _POSIX_C_SOURCE" >&5
12425 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12426 if test "${cf_cv_posix_c_source+set}" = set; then
12427 echo $ECHO_N "(cached) $ECHO_C" >&6
12430 echo "${as_me:-configure}:12430: testing if the symbol is already defined go no further ..." 1>&5
12432 cat >conftest.$ac_ext <<_ACEOF
12433 #line 12433 "configure"
12434 #include "confdefs.h"
12435 #include <sys/types.h>
12440 #ifndef _POSIX_C_SOURCE
12447 rm -f conftest.$ac_objext
12448 if { (eval echo "$as_me:12448: \"$ac_compile\"") >&5
12449 (eval $ac_compile) 2>&5
12451 echo "$as_me:12451: \$? = $ac_status" >&5
12452 (exit $ac_status); } &&
12453 { ac_try='test -s conftest.$ac_objext'
12454 { (eval echo "$as_me:12454: \"$ac_try\"") >&5
12455 (eval $ac_try) 2>&5
12457 echo "$as_me:12457: \$? = $ac_status" >&5
12458 (exit $ac_status); }; }; then
12459 cf_cv_posix_c_source=no
12461 echo "$as_me: failed program was:" >&5
12462 cat conftest.$ac_ext >&5
12463 cf_want_posix_source=no
12464 case .$cf_POSIX_C_SOURCE in
12466 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12469 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12470 cf_want_posix_source=yes
12473 cf_want_posix_source=yes
12476 if test "$cf_want_posix_source" = yes ; then
12477 cat >conftest.$ac_ext <<_ACEOF
12478 #line 12478 "configure"
12479 #include "confdefs.h"
12480 #include <sys/types.h>
12485 #ifdef _POSIX_SOURCE
12492 rm -f conftest.$ac_objext
12493 if { (eval echo "$as_me:12493: \"$ac_compile\"") >&5
12494 (eval $ac_compile) 2>&5
12496 echo "$as_me:12496: \$? = $ac_status" >&5
12497 (exit $ac_status); } &&
12498 { ac_try='test -s conftest.$ac_objext'
12499 { (eval echo "$as_me:12499: \"$ac_try\"") >&5
12500 (eval $ac_try) 2>&5
12502 echo "$as_me:12502: \$? = $ac_status" >&5
12503 (exit $ac_status); }; }; then
12506 echo "$as_me: failed program was:" >&5
12507 cat conftest.$ac_ext >&5
12508 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12510 rm -f conftest.$ac_objext conftest.$ac_ext
12513 echo "${as_me:-configure}:12513: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12515 CFLAGS="$cf_trim_CFLAGS"
12516 CPPFLAGS="$cf_trim_CPPFLAGS"
12518 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12519 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12521 echo "${as_me:-configure}:12521: testing if the second compile does not leave our definition intact error ..." 1>&5
12523 cat >conftest.$ac_ext <<_ACEOF
12524 #line 12524 "configure"
12525 #include "confdefs.h"
12526 #include <sys/types.h>
12531 #ifndef _POSIX_C_SOURCE
12538 rm -f conftest.$ac_objext
12539 if { (eval echo "$as_me:12539: \"$ac_compile\"") >&5
12540 (eval $ac_compile) 2>&5
12542 echo "$as_me:12542: \$? = $ac_status" >&5
12543 (exit $ac_status); } &&
12544 { ac_try='test -s conftest.$ac_objext'
12545 { (eval echo "$as_me:12545: \"$ac_try\"") >&5
12546 (eval $ac_try) 2>&5
12548 echo "$as_me:12548: \$? = $ac_status" >&5
12549 (exit $ac_status); }; }; then
12552 echo "$as_me: failed program was:" >&5
12553 cat conftest.$ac_ext >&5
12554 cf_cv_posix_c_source=no
12556 rm -f conftest.$ac_objext conftest.$ac_ext
12557 CFLAGS="$cf_save_CFLAGS"
12558 CPPFLAGS="$cf_save_CPPFLAGS"
12561 rm -f conftest.$ac_objext conftest.$ac_ext
12564 echo "$as_me:12564: result: $cf_cv_posix_c_source" >&5
12565 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12567 if test "$cf_cv_posix_c_source" != no ; then
12568 CFLAGS="$cf_trim_CFLAGS"
12569 CPPFLAGS="$cf_trim_CPPFLAGS"
12574 cf_new_extra_cppflags=
12576 for cf_add_cflags in $cf_cv_posix_c_source
12578 case $cf_fix_cppflags in
12580 case $cf_add_cflags in
12581 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12582 case $cf_add_cflags in
12584 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12586 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12587 && test -z "${cf_tst_cflags}" \
12588 && cf_fix_cppflags=yes
12590 if test $cf_fix_cppflags = yes ; then
12592 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12593 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12596 elif test "${cf_tst_cflags}" = "\"'" ; then
12598 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12599 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12605 case "$CPPFLAGS" in
12609 case $cf_add_cflags in
12611 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12613 CPPFLAGS=`echo "$CPPFLAGS" | \
12614 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12615 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12620 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12621 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12628 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12629 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12639 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12641 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12642 && test -z "${cf_tst_cflags}" \
12643 && cf_fix_cppflags=no
12648 if test -n "$cf_new_cflags" ; then
12650 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12651 CFLAGS="${CFLAGS}$cf_new_cflags"
12655 if test -n "$cf_new_cppflags" ; then
12657 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12658 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12662 if test -n "$cf_new_extra_cppflags" ; then
12664 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12665 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12671 fi # cf_cv_posix_visible
12675 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12678 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12679 cf_xopen_source="-D_BSD_SOURCE"
12680 cf_XOPEN_SOURCE=600
12683 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12686 cf_xopen_source="-D_OSF_SOURCE"
12689 cf_xopen_source="-D_QNX_SOURCE"
12692 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12695 cf_xopen_source="-D__EXTENSIONS__"
12696 cf_cv_xopen_source=broken
12698 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12704 echo "$as_me:12704: checking if we should define _XOPEN_SOURCE" >&5
12705 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12706 if test "${cf_cv_xopen_source+set}" = set; then
12707 echo $ECHO_N "(cached) $ECHO_C" >&6
12710 cat >conftest.$ac_ext <<_ACEOF
12711 #line 12711 "configure"
12712 #include "confdefs.h"
12714 #include <stdlib.h>
12715 #include <string.h>
12716 #include <sys/types.h>
12722 #ifndef _XOPEN_SOURCE
12729 rm -f conftest.$ac_objext
12730 if { (eval echo "$as_me:12730: \"$ac_compile\"") >&5
12731 (eval $ac_compile) 2>&5
12733 echo "$as_me:12733: \$? = $ac_status" >&5
12734 (exit $ac_status); } &&
12735 { ac_try='test -s conftest.$ac_objext'
12736 { (eval echo "$as_me:12736: \"$ac_try\"") >&5
12737 (eval $ac_try) 2>&5
12739 echo "$as_me:12739: \$? = $ac_status" >&5
12740 (exit $ac_status); }; }; then
12741 cf_cv_xopen_source=no
12743 echo "$as_me: failed program was:" >&5
12744 cat conftest.$ac_ext >&5
12745 cf_save="$CPPFLAGS"
12747 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12748 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12750 cat >conftest.$ac_ext <<_ACEOF
12751 #line 12751 "configure"
12752 #include "confdefs.h"
12754 #include <stdlib.h>
12755 #include <string.h>
12756 #include <sys/types.h>
12762 #ifdef _XOPEN_SOURCE
12769 rm -f conftest.$ac_objext
12770 if { (eval echo "$as_me:12770: \"$ac_compile\"") >&5
12771 (eval $ac_compile) 2>&5
12773 echo "$as_me:12773: \$? = $ac_status" >&5
12774 (exit $ac_status); } &&
12775 { ac_try='test -s conftest.$ac_objext'
12776 { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777 (eval $ac_try) 2>&5
12779 echo "$as_me:12779: \$? = $ac_status" >&5
12780 (exit $ac_status); }; }; then
12781 cf_cv_xopen_source=no
12783 echo "$as_me: failed program was:" >&5
12784 cat conftest.$ac_ext >&5
12785 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12787 rm -f conftest.$ac_objext conftest.$ac_ext
12788 CPPFLAGS="$cf_save"
12791 rm -f conftest.$ac_objext conftest.$ac_ext
12794 echo "$as_me:12794: result: $cf_cv_xopen_source" >&5
12795 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12797 if test "$cf_cv_xopen_source" != no ; then
12799 CFLAGS=`echo "$CFLAGS" | \
12800 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12801 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12803 CPPFLAGS=`echo "$CPPFLAGS" | \
12804 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12805 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12807 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12812 cf_new_extra_cppflags=
12814 for cf_add_cflags in $cf_temp_xopen_source
12816 case $cf_fix_cppflags in
12818 case $cf_add_cflags in
12819 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12820 case $cf_add_cflags in
12822 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12824 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12825 && test -z "${cf_tst_cflags}" \
12826 && cf_fix_cppflags=yes
12828 if test $cf_fix_cppflags = yes ; then
12830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12834 elif test "${cf_tst_cflags}" = "\"'" ; then
12836 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12837 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12843 case "$CPPFLAGS" in
12847 case $cf_add_cflags in
12849 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12851 CPPFLAGS=`echo "$CPPFLAGS" | \
12852 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12853 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12858 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12859 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12866 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12867 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12874 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12875 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12877 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12879 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12880 && test -z "${cf_tst_cflags}" \
12881 && cf_fix_cppflags=no
12886 if test -n "$cf_new_cflags" ; then
12888 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12889 CFLAGS="${CFLAGS}$cf_new_cflags"
12893 if test -n "$cf_new_cppflags" ; then
12895 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12896 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12900 if test -n "$cf_new_extra_cppflags" ; then
12902 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12903 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12909 if test "$cf_cv_posix_visible" = no; then
12911 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12913 cf_save_CFLAGS="$CFLAGS"
12914 cf_save_CPPFLAGS="$CPPFLAGS"
12916 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12917 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12918 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12920 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12921 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12922 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12924 echo "$as_me:12924: checking if we should define _POSIX_C_SOURCE" >&5
12925 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12926 if test "${cf_cv_posix_c_source+set}" = set; then
12927 echo $ECHO_N "(cached) $ECHO_C" >&6
12930 echo "${as_me:-configure}:12930: testing if the symbol is already defined go no further ..." 1>&5
12932 cat >conftest.$ac_ext <<_ACEOF
12933 #line 12933 "configure"
12934 #include "confdefs.h"
12935 #include <sys/types.h>
12940 #ifndef _POSIX_C_SOURCE
12947 rm -f conftest.$ac_objext
12948 if { (eval echo "$as_me:12948: \"$ac_compile\"") >&5
12949 (eval $ac_compile) 2>&5
12951 echo "$as_me:12951: \$? = $ac_status" >&5
12952 (exit $ac_status); } &&
12953 { ac_try='test -s conftest.$ac_objext'
12954 { (eval echo "$as_me:12954: \"$ac_try\"") >&5
12955 (eval $ac_try) 2>&5
12957 echo "$as_me:12957: \$? = $ac_status" >&5
12958 (exit $ac_status); }; }; then
12959 cf_cv_posix_c_source=no
12961 echo "$as_me: failed program was:" >&5
12962 cat conftest.$ac_ext >&5
12963 cf_want_posix_source=no
12964 case .$cf_POSIX_C_SOURCE in
12966 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12969 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12970 cf_want_posix_source=yes
12973 cf_want_posix_source=yes
12976 if test "$cf_want_posix_source" = yes ; then
12977 cat >conftest.$ac_ext <<_ACEOF
12978 #line 12978 "configure"
12979 #include "confdefs.h"
12980 #include <sys/types.h>
12985 #ifdef _POSIX_SOURCE
12992 rm -f conftest.$ac_objext
12993 if { (eval echo "$as_me:12993: \"$ac_compile\"") >&5
12994 (eval $ac_compile) 2>&5
12996 echo "$as_me:12996: \$? = $ac_status" >&5
12997 (exit $ac_status); } &&
12998 { ac_try='test -s conftest.$ac_objext'
12999 { (eval echo "$as_me:12999: \"$ac_try\"") >&5
13000 (eval $ac_try) 2>&5
13002 echo "$as_me:13002: \$? = $ac_status" >&5
13003 (exit $ac_status); }; }; then
13006 echo "$as_me: failed program was:" >&5
13007 cat conftest.$ac_ext >&5
13008 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13010 rm -f conftest.$ac_objext conftest.$ac_ext
13013 echo "${as_me:-configure}:13013: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13015 CFLAGS="$cf_trim_CFLAGS"
13016 CPPFLAGS="$cf_trim_CPPFLAGS"
13018 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13019 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13021 echo "${as_me:-configure}:13021: testing if the second compile does not leave our definition intact error ..." 1>&5
13023 cat >conftest.$ac_ext <<_ACEOF
13024 #line 13024 "configure"
13025 #include "confdefs.h"
13026 #include <sys/types.h>
13031 #ifndef _POSIX_C_SOURCE
13038 rm -f conftest.$ac_objext
13039 if { (eval echo "$as_me:13039: \"$ac_compile\"") >&5
13040 (eval $ac_compile) 2>&5
13042 echo "$as_me:13042: \$? = $ac_status" >&5
13043 (exit $ac_status); } &&
13044 { ac_try='test -s conftest.$ac_objext'
13045 { (eval echo "$as_me:13045: \"$ac_try\"") >&5
13046 (eval $ac_try) 2>&5
13048 echo "$as_me:13048: \$? = $ac_status" >&5
13049 (exit $ac_status); }; }; then
13052 echo "$as_me: failed program was:" >&5
13053 cat conftest.$ac_ext >&5
13054 cf_cv_posix_c_source=no
13056 rm -f conftest.$ac_objext conftest.$ac_ext
13057 CFLAGS="$cf_save_CFLAGS"
13058 CPPFLAGS="$cf_save_CPPFLAGS"
13061 rm -f conftest.$ac_objext conftest.$ac_ext
13064 echo "$as_me:13064: result: $cf_cv_posix_c_source" >&5
13065 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13067 if test "$cf_cv_posix_c_source" != no ; then
13068 CFLAGS="$cf_trim_CFLAGS"
13069 CPPFLAGS="$cf_trim_CPPFLAGS"
13074 cf_new_extra_cppflags=
13076 for cf_add_cflags in $cf_cv_posix_c_source
13078 case $cf_fix_cppflags in
13080 case $cf_add_cflags in
13081 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13082 case $cf_add_cflags in
13084 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13086 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13087 && test -z "${cf_tst_cflags}" \
13088 && cf_fix_cppflags=yes
13090 if test $cf_fix_cppflags = yes ; then
13092 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13093 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13096 elif test "${cf_tst_cflags}" = "\"'" ; then
13098 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13099 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13105 case "$CPPFLAGS" in
13109 case $cf_add_cflags in
13111 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13113 CPPFLAGS=`echo "$CPPFLAGS" | \
13114 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13115 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13120 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13121 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13128 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13129 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13136 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13137 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13139 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13141 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13142 && test -z "${cf_tst_cflags}" \
13143 && cf_fix_cppflags=no
13148 if test -n "$cf_new_cflags" ; then
13150 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13151 CFLAGS="${CFLAGS}$cf_new_cflags"
13155 if test -n "$cf_new_cppflags" ; then
13157 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13158 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13162 if test -n "$cf_new_extra_cppflags" ; then
13164 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13165 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13171 fi # cf_cv_posix_visible
13176 if test -n "$cf_xopen_source" ; then
13181 cf_new_extra_cppflags=
13183 for cf_add_cflags in $cf_xopen_source
13185 case $cf_fix_cppflags in
13187 case $cf_add_cflags in
13188 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13189 case $cf_add_cflags in
13191 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13193 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13194 && test -z "${cf_tst_cflags}" \
13195 && cf_fix_cppflags=yes
13197 if test $cf_fix_cppflags = yes ; then
13199 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13200 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13203 elif test "${cf_tst_cflags}" = "\"'" ; then
13205 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13206 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13212 case "$CPPFLAGS" in
13216 case $cf_add_cflags in
13218 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13220 CPPFLAGS=`echo "$CPPFLAGS" | \
13221 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13222 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13227 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13228 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13235 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13236 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13243 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13244 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13246 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13248 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13249 && test -z "${cf_tst_cflags}" \
13250 && cf_fix_cppflags=no
13255 if test -n "$cf_new_cflags" ; then
13256 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13258 echo "${as_me:-configure}:13258: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13260 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13261 CFLAGS="${CFLAGS}$cf_new_cflags"
13265 if test -n "$cf_new_cppflags" ; then
13266 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13268 echo "${as_me:-configure}:13268: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13270 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13271 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13275 if test -n "$cf_new_extra_cppflags" ; then
13276 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13278 echo "${as_me:-configure}:13278: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13280 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13281 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13287 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13288 echo "$as_me:13288: checking if _XOPEN_SOURCE really is set" >&5
13289 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13290 cat >conftest.$ac_ext <<_ACEOF
13291 #line 13291 "configure"
13292 #include "confdefs.h"
13293 #include <stdlib.h>
13298 #ifndef _XOPEN_SOURCE
13305 rm -f conftest.$ac_objext
13306 if { (eval echo "$as_me:13306: \"$ac_compile\"") >&5
13307 (eval $ac_compile) 2>&5
13309 echo "$as_me:13309: \$? = $ac_status" >&5
13310 (exit $ac_status); } &&
13311 { ac_try='test -s conftest.$ac_objext'
13312 { (eval echo "$as_me:13312: \"$ac_try\"") >&5
13313 (eval $ac_try) 2>&5
13315 echo "$as_me:13315: \$? = $ac_status" >&5
13316 (exit $ac_status); }; }; then
13317 cf_XOPEN_SOURCE_set=yes
13319 echo "$as_me: failed program was:" >&5
13320 cat conftest.$ac_ext >&5
13321 cf_XOPEN_SOURCE_set=no
13323 rm -f conftest.$ac_objext conftest.$ac_ext
13324 echo "$as_me:13324: result: $cf_XOPEN_SOURCE_set" >&5
13325 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13326 if test $cf_XOPEN_SOURCE_set = yes
13328 cat >conftest.$ac_ext <<_ACEOF
13329 #line 13329 "configure"
13330 #include "confdefs.h"
13331 #include <stdlib.h>
13336 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13343 rm -f conftest.$ac_objext
13344 if { (eval echo "$as_me:13344: \"$ac_compile\"") >&5
13345 (eval $ac_compile) 2>&5
13347 echo "$as_me:13347: \$? = $ac_status" >&5
13348 (exit $ac_status); } &&
13349 { ac_try='test -s conftest.$ac_objext'
13350 { (eval echo "$as_me:13350: \"$ac_try\"") >&5
13351 (eval $ac_try) 2>&5
13353 echo "$as_me:13353: \$? = $ac_status" >&5
13354 (exit $ac_status); }; }; then
13355 cf_XOPEN_SOURCE_set_ok=yes
13357 echo "$as_me: failed program was:" >&5
13358 cat conftest.$ac_ext >&5
13359 cf_XOPEN_SOURCE_set_ok=no
13361 rm -f conftest.$ac_objext conftest.$ac_ext
13362 if test $cf_XOPEN_SOURCE_set_ok = no
13364 { echo "$as_me:13364: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13365 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13369 echo "$as_me:13369: checking if we should define _XOPEN_SOURCE" >&5
13370 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13371 if test "${cf_cv_xopen_source+set}" = set; then
13372 echo $ECHO_N "(cached) $ECHO_C" >&6
13375 cat >conftest.$ac_ext <<_ACEOF
13376 #line 13376 "configure"
13377 #include "confdefs.h"
13379 #include <stdlib.h>
13380 #include <string.h>
13381 #include <sys/types.h>
13387 #ifndef _XOPEN_SOURCE
13394 rm -f conftest.$ac_objext
13395 if { (eval echo "$as_me:13395: \"$ac_compile\"") >&5
13396 (eval $ac_compile) 2>&5
13398 echo "$as_me:13398: \$? = $ac_status" >&5
13399 (exit $ac_status); } &&
13400 { ac_try='test -s conftest.$ac_objext'
13401 { (eval echo "$as_me:13401: \"$ac_try\"") >&5
13402 (eval $ac_try) 2>&5
13404 echo "$as_me:13404: \$? = $ac_status" >&5
13405 (exit $ac_status); }; }; then
13406 cf_cv_xopen_source=no
13408 echo "$as_me: failed program was:" >&5
13409 cat conftest.$ac_ext >&5
13410 cf_save="$CPPFLAGS"
13412 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13413 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13415 cat >conftest.$ac_ext <<_ACEOF
13416 #line 13416 "configure"
13417 #include "confdefs.h"
13419 #include <stdlib.h>
13420 #include <string.h>
13421 #include <sys/types.h>
13427 #ifdef _XOPEN_SOURCE
13434 rm -f conftest.$ac_objext
13435 if { (eval echo "$as_me:13435: \"$ac_compile\"") >&5
13436 (eval $ac_compile) 2>&5
13438 echo "$as_me:13438: \$? = $ac_status" >&5
13439 (exit $ac_status); } &&
13440 { ac_try='test -s conftest.$ac_objext'
13441 { (eval echo "$as_me:13441: \"$ac_try\"") >&5
13442 (eval $ac_try) 2>&5
13444 echo "$as_me:13444: \$? = $ac_status" >&5
13445 (exit $ac_status); }; }; then
13446 cf_cv_xopen_source=no
13448 echo "$as_me: failed program was:" >&5
13449 cat conftest.$ac_ext >&5
13450 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13452 rm -f conftest.$ac_objext conftest.$ac_ext
13453 CPPFLAGS="$cf_save"
13456 rm -f conftest.$ac_objext conftest.$ac_ext
13459 echo "$as_me:13459: result: $cf_cv_xopen_source" >&5
13460 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13462 if test "$cf_cv_xopen_source" != no ; then
13464 CFLAGS=`echo "$CFLAGS" | \
13465 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13466 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13468 CPPFLAGS=`echo "$CPPFLAGS" | \
13469 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13470 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13472 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13477 cf_new_extra_cppflags=
13479 for cf_add_cflags in $cf_temp_xopen_source
13481 case $cf_fix_cppflags in
13483 case $cf_add_cflags in
13484 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13485 case $cf_add_cflags in
13487 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13489 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13490 && test -z "${cf_tst_cflags}" \
13491 && cf_fix_cppflags=yes
13493 if test $cf_fix_cppflags = yes ; then
13495 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13496 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13499 elif test "${cf_tst_cflags}" = "\"'" ; then
13501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13508 case "$CPPFLAGS" in
13512 case $cf_add_cflags in
13514 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13516 CPPFLAGS=`echo "$CPPFLAGS" | \
13517 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13518 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13523 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13524 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13531 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13532 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13539 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13540 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13542 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13544 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13545 && test -z "${cf_tst_cflags}" \
13546 && cf_fix_cppflags=no
13551 if test -n "$cf_new_cflags" ; then
13553 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13554 CFLAGS="${CFLAGS}$cf_new_cflags"
13558 if test -n "$cf_new_cppflags" ; then
13560 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13561 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13565 if test -n "$cf_new_extra_cppflags" ; then
13567 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13568 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13576 fi # cf_cv_posix_visible
13578 # Check whether --enable-largefile or --disable-largefile was given.
13579 if test "${enable_largefile+set}" = set; then
13580 enableval="$enable_largefile"
13583 if test "$enable_largefile" != no; then
13585 echo "$as_me:13585: checking for special C compiler options needed for large files" >&5
13586 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13587 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13588 echo $ECHO_N "(cached) $ECHO_C" >&6
13590 ac_cv_sys_largefile_CC=no
13591 if test "$GCC" != yes; then
13594 # IRIX 6.2 and later do not support large files by default,
13595 # so use the C compiler's -n32 option if that helps.
13596 cat >conftest.$ac_ext <<_ACEOF
13597 #line 13597 "configure"
13598 #include "confdefs.h"
13599 #include <sys/types.h>
13600 /* Check that off_t can represent 2**63 - 1 correctly.
13601 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13602 since some C++ compilers masquerading as C compilers
13603 incorrectly reject 9223372036854775807. */
13604 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13605 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13606 && LARGE_OFF_T % 2147483647 == 1)
13616 rm -f conftest.$ac_objext
13617 if { (eval echo "$as_me:13617: \"$ac_compile\"") >&5
13618 (eval $ac_compile) 2>&5
13620 echo "$as_me:13620: \$? = $ac_status" >&5
13621 (exit $ac_status); } &&
13622 { ac_try='test -s conftest.$ac_objext'
13623 { (eval echo "$as_me:13623: \"$ac_try\"") >&5
13624 (eval $ac_try) 2>&5
13626 echo "$as_me:13626: \$? = $ac_status" >&5
13627 (exit $ac_status); }; }; then
13630 echo "$as_me: failed program was:" >&5
13631 cat conftest.$ac_ext >&5
13633 rm -f conftest.$ac_objext
13635 rm -f conftest.$ac_objext
13636 if { (eval echo "$as_me:13636: \"$ac_compile\"") >&5
13637 (eval $ac_compile) 2>&5
13639 echo "$as_me:13639: \$? = $ac_status" >&5
13640 (exit $ac_status); } &&
13641 { ac_try='test -s conftest.$ac_objext'
13642 { (eval echo "$as_me:13642: \"$ac_try\"") >&5
13643 (eval $ac_try) 2>&5
13645 echo "$as_me:13645: \$? = $ac_status" >&5
13646 (exit $ac_status); }; }; then
13647 ac_cv_sys_largefile_CC=' -n32'; break
13649 echo "$as_me: failed program was:" >&5
13650 cat conftest.$ac_ext >&5
13652 rm -f conftest.$ac_objext
13656 rm -f conftest.$ac_ext
13659 echo "$as_me:13659: result: $ac_cv_sys_largefile_CC" >&5
13660 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13661 if test "$ac_cv_sys_largefile_CC" != no; then
13662 CC=$CC$ac_cv_sys_largefile_CC
13665 echo "$as_me:13665: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13666 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13667 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13668 echo $ECHO_N "(cached) $ECHO_C" >&6
13671 ac_cv_sys_file_offset_bits=no
13672 cat >conftest.$ac_ext <<_ACEOF
13673 #line 13673 "configure"
13674 #include "confdefs.h"
13675 #include <sys/types.h>
13676 /* Check that off_t can represent 2**63 - 1 correctly.
13677 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13678 since some C++ compilers masquerading as C compilers
13679 incorrectly reject 9223372036854775807. */
13680 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13681 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13682 && LARGE_OFF_T % 2147483647 == 1)
13692 rm -f conftest.$ac_objext
13693 if { (eval echo "$as_me:13693: \"$ac_compile\"") >&5
13694 (eval $ac_compile) 2>&5
13696 echo "$as_me:13696: \$? = $ac_status" >&5
13697 (exit $ac_status); } &&
13698 { ac_try='test -s conftest.$ac_objext'
13699 { (eval echo "$as_me:13699: \"$ac_try\"") >&5
13700 (eval $ac_try) 2>&5
13702 echo "$as_me:13702: \$? = $ac_status" >&5
13703 (exit $ac_status); }; }; then
13706 echo "$as_me: failed program was:" >&5
13707 cat conftest.$ac_ext >&5
13709 rm -f conftest.$ac_objext conftest.$ac_ext
13710 cat >conftest.$ac_ext <<_ACEOF
13711 #line 13711 "configure"
13712 #include "confdefs.h"
13713 #define _FILE_OFFSET_BITS 64
13714 #include <sys/types.h>
13715 /* Check that off_t can represent 2**63 - 1 correctly.
13716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13717 since some C++ compilers masquerading as C compilers
13718 incorrectly reject 9223372036854775807. */
13719 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13721 && LARGE_OFF_T % 2147483647 == 1)
13731 rm -f conftest.$ac_objext
13732 if { (eval echo "$as_me:13732: \"$ac_compile\"") >&5
13733 (eval $ac_compile) 2>&5
13735 echo "$as_me:13735: \$? = $ac_status" >&5
13736 (exit $ac_status); } &&
13737 { ac_try='test -s conftest.$ac_objext'
13738 { (eval echo "$as_me:13738: \"$ac_try\"") >&5
13739 (eval $ac_try) 2>&5
13741 echo "$as_me:13741: \$? = $ac_status" >&5
13742 (exit $ac_status); }; }; then
13743 ac_cv_sys_file_offset_bits=64; break
13745 echo "$as_me: failed program was:" >&5
13746 cat conftest.$ac_ext >&5
13748 rm -f conftest.$ac_objext conftest.$ac_ext
13752 echo "$as_me:13752: result: $ac_cv_sys_file_offset_bits" >&5
13753 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13754 if test "$ac_cv_sys_file_offset_bits" != no; then
13756 cat >>confdefs.h <<EOF
13757 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13762 echo "$as_me:13762: checking for _LARGE_FILES value needed for large files" >&5
13763 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13764 if test "${ac_cv_sys_large_files+set}" = set; then
13765 echo $ECHO_N "(cached) $ECHO_C" >&6
13768 ac_cv_sys_large_files=no
13769 cat >conftest.$ac_ext <<_ACEOF
13770 #line 13770 "configure"
13771 #include "confdefs.h"
13772 #include <sys/types.h>
13773 /* Check that off_t can represent 2**63 - 1 correctly.
13774 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13775 since some C++ compilers masquerading as C compilers
13776 incorrectly reject 9223372036854775807. */
13777 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13778 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13779 && LARGE_OFF_T % 2147483647 == 1)
13789 rm -f conftest.$ac_objext
13790 if { (eval echo "$as_me:13790: \"$ac_compile\"") >&5
13791 (eval $ac_compile) 2>&5
13793 echo "$as_me:13793: \$? = $ac_status" >&5
13794 (exit $ac_status); } &&
13795 { ac_try='test -s conftest.$ac_objext'
13796 { (eval echo "$as_me:13796: \"$ac_try\"") >&5
13797 (eval $ac_try) 2>&5
13799 echo "$as_me:13799: \$? = $ac_status" >&5
13800 (exit $ac_status); }; }; then
13803 echo "$as_me: failed program was:" >&5
13804 cat conftest.$ac_ext >&5
13806 rm -f conftest.$ac_objext conftest.$ac_ext
13807 cat >conftest.$ac_ext <<_ACEOF
13808 #line 13808 "configure"
13809 #include "confdefs.h"
13810 #define _LARGE_FILES 1
13811 #include <sys/types.h>
13812 /* Check that off_t can represent 2**63 - 1 correctly.
13813 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13814 since some C++ compilers masquerading as C compilers
13815 incorrectly reject 9223372036854775807. */
13816 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13817 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13818 && LARGE_OFF_T % 2147483647 == 1)
13828 rm -f conftest.$ac_objext
13829 if { (eval echo "$as_me:13829: \"$ac_compile\"") >&5
13830 (eval $ac_compile) 2>&5
13832 echo "$as_me:13832: \$? = $ac_status" >&5
13833 (exit $ac_status); } &&
13834 { ac_try='test -s conftest.$ac_objext'
13835 { (eval echo "$as_me:13835: \"$ac_try\"") >&5
13836 (eval $ac_try) 2>&5
13838 echo "$as_me:13838: \$? = $ac_status" >&5
13839 (exit $ac_status); }; }; then
13840 ac_cv_sys_large_files=1; break
13842 echo "$as_me: failed program was:" >&5
13843 cat conftest.$ac_ext >&5
13845 rm -f conftest.$ac_objext conftest.$ac_ext
13849 echo "$as_me:13849: result: $ac_cv_sys_large_files" >&5
13850 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13851 if test "$ac_cv_sys_large_files" != no; then
13853 cat >>confdefs.h <<EOF
13854 #define _LARGE_FILES $ac_cv_sys_large_files
13861 if test "$enable_largefile" != no ; then
13862 echo "$as_me:13862: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13863 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13864 if test "${ac_cv_sys_largefile_source+set}" = set; then
13865 echo $ECHO_N "(cached) $ECHO_C" >&6
13868 ac_cv_sys_largefile_source=no
13869 cat >conftest.$ac_ext <<_ACEOF
13870 #line 13870 "configure"
13871 #include "confdefs.h"
13881 rm -f conftest.$ac_objext
13882 if { (eval echo "$as_me:13882: \"$ac_compile\"") >&5
13883 (eval $ac_compile) 2>&5
13885 echo "$as_me:13885: \$? = $ac_status" >&5
13886 (exit $ac_status); } &&
13887 { ac_try='test -s conftest.$ac_objext'
13888 { (eval echo "$as_me:13888: \"$ac_try\"") >&5
13889 (eval $ac_try) 2>&5
13891 echo "$as_me:13891: \$? = $ac_status" >&5
13892 (exit $ac_status); }; }; then
13895 echo "$as_me: failed program was:" >&5
13896 cat conftest.$ac_ext >&5
13898 rm -f conftest.$ac_objext conftest.$ac_ext
13899 cat >conftest.$ac_ext <<_ACEOF
13900 #line 13900 "configure"
13901 #include "confdefs.h"
13902 #define _LARGEFILE_SOURCE 1
13912 rm -f conftest.$ac_objext
13913 if { (eval echo "$as_me:13913: \"$ac_compile\"") >&5
13914 (eval $ac_compile) 2>&5
13916 echo "$as_me:13916: \$? = $ac_status" >&5
13917 (exit $ac_status); } &&
13918 { ac_try='test -s conftest.$ac_objext'
13919 { (eval echo "$as_me:13919: \"$ac_try\"") >&5
13920 (eval $ac_try) 2>&5
13922 echo "$as_me:13922: \$? = $ac_status" >&5
13923 (exit $ac_status); }; }; then
13924 ac_cv_sys_largefile_source=1; break
13926 echo "$as_me: failed program was:" >&5
13927 cat conftest.$ac_ext >&5
13929 rm -f conftest.$ac_objext conftest.$ac_ext
13933 echo "$as_me:13933: result: $ac_cv_sys_largefile_source" >&5
13934 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13935 if test "$ac_cv_sys_largefile_source" != no; then
13937 cat >>confdefs.h <<EOF
13938 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13944 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13945 # in glibc 2.1.3, but that breaks too many other things.
13946 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13947 echo "$as_me:13947: checking for fseeko" >&5
13948 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13949 if test "${ac_cv_func_fseeko+set}" = set; then
13950 echo $ECHO_N "(cached) $ECHO_C" >&6
13952 cat >conftest.$ac_ext <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13959 return fseeko && fseeko (stdin, 0, 0);
13964 rm -f conftest.$ac_objext conftest$ac_exeext
13965 if { (eval echo "$as_me:13965: \"$ac_link\"") >&5
13966 (eval $ac_link) 2>&5
13968 echo "$as_me:13968: \$? = $ac_status" >&5
13969 (exit $ac_status); } &&
13970 { ac_try='test -s conftest$ac_exeext'
13971 { (eval echo "$as_me:13971: \"$ac_try\"") >&5
13972 (eval $ac_try) 2>&5
13974 echo "$as_me:13974: \$? = $ac_status" >&5
13975 (exit $ac_status); }; }; then
13976 ac_cv_func_fseeko=yes
13978 echo "$as_me: failed program was:" >&5
13979 cat conftest.$ac_ext >&5
13980 ac_cv_func_fseeko=no
13982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13984 echo "$as_me:13984: result: $ac_cv_func_fseeko" >&5
13985 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13986 if test $ac_cv_func_fseeko = yes; then
13988 cat >>confdefs.h <<\EOF
13989 #define HAVE_FSEEKO 1
13994 # Normally we would collect these definitions in the config.h,
13995 # but (like _XOPEN_SOURCE), some environments rely on having these
13996 # defined before any of the system headers are included. Another
13997 # case comes up with C++, e.g., on AIX the compiler compiles the
13998 # header files by themselves before looking at the body files it is
13999 # told to compile. For ncurses, those header files do not include
14001 if test "$ac_cv_sys_large_files" != no
14004 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14005 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14008 if test "$ac_cv_sys_largefile_source" != no
14011 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14012 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14015 if test "$ac_cv_sys_file_offset_bits" != no
14018 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14019 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14023 echo "$as_me:14023: checking whether to use struct dirent64" >&5
14024 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14025 if test "${cf_cv_struct_dirent64+set}" = set; then
14026 echo $ECHO_N "(cached) $ECHO_C" >&6
14029 cat >conftest.$ac_ext <<_ACEOF
14030 #line 14030 "configure"
14031 #include "confdefs.h"
14033 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14034 #include <sys/types.h>
14035 #include <dirent.h>
14041 /* if transitional largefile support is setup, this is true */
14042 extern struct dirent64 * readdir(DIR *);
14043 struct dirent64 *x = readdir((DIR *)0);
14044 struct dirent *y = readdir((DIR *)0);
14052 rm -f conftest.$ac_objext
14053 if { (eval echo "$as_me:14053: \"$ac_compile\"") >&5
14054 (eval $ac_compile) 2>&5
14056 echo "$as_me:14056: \$? = $ac_status" >&5
14057 (exit $ac_status); } &&
14058 { ac_try='test -s conftest.$ac_objext'
14059 { (eval echo "$as_me:14059: \"$ac_try\"") >&5
14060 (eval $ac_try) 2>&5
14062 echo "$as_me:14062: \$? = $ac_status" >&5
14063 (exit $ac_status); }; }; then
14064 cf_cv_struct_dirent64=yes
14066 echo "$as_me: failed program was:" >&5
14067 cat conftest.$ac_ext >&5
14068 cf_cv_struct_dirent64=no
14070 rm -f conftest.$ac_objext conftest.$ac_ext
14073 echo "$as_me:14073: result: $cf_cv_struct_dirent64" >&5
14074 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14075 test "$cf_cv_struct_dirent64" = yes &&
14076 cat >>confdefs.h <<\EOF
14077 #define HAVE_STRUCT_DIRENT64 1
14082 ### Enable compiling-in rcs id's
14083 echo "$as_me:14083: checking if RCS identifiers should be compiled-in" >&5
14084 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14086 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14087 if test "${with_rcs_ids+set}" = set; then
14088 withval="$with_rcs_ids"
14089 with_rcs_ids=$withval
14093 echo "$as_me:14093: result: $with_rcs_ids" >&5
14094 echo "${ECHO_T}$with_rcs_ids" >&6
14095 test "$with_rcs_ids" = yes &&
14096 cat >>confdefs.h <<\EOF
14097 #define USE_RCS_IDS 1
14100 ###############################################################################
14102 ### Note that some functions (such as const) are normally disabled anyway.
14103 echo "$as_me:14103: checking if you want to build with function extensions" >&5
14104 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14106 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14107 if test "${enable_ext_funcs+set}" = set; then
14108 enableval="$enable_ext_funcs"
14109 with_ext_funcs=$enableval
14113 echo "$as_me:14113: result: $with_ext_funcs" >&5
14114 echo "${ECHO_T}$with_ext_funcs" >&6
14115 if test "$with_ext_funcs" = yes ; then
14116 NCURSES_EXT_FUNCS=1
14118 cat >>confdefs.h <<\EOF
14119 #define HAVE_USE_DEFAULT_COLORS 1
14122 cat >>confdefs.h <<\EOF
14123 #define NCURSES_EXT_FUNCS 1
14127 NCURSES_EXT_FUNCS=0
14130 ### use option --enable-const to turn on use of const beyond that in XSI.
14131 echo "$as_me:14131: checking for extended use of const keyword" >&5
14132 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14134 # Check whether --enable-const or --disable-const was given.
14135 if test "${enable_const+set}" = set; then
14136 enableval="$enable_const"
14137 with_ext_const=$enableval
14141 echo "$as_me:14141: result: $with_ext_const" >&5
14142 echo "${ECHO_T}$with_ext_const" >&6
14143 NCURSES_CONST='/*nothing*/'
14144 if test "$with_ext_const" = yes ; then
14145 NCURSES_CONST=const
14148 ###############################################################################
14149 # These options are relatively safe to experiment with.
14151 echo "$as_me:14151: checking if you want all development code" >&5
14152 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14154 # Check whether --with-develop or --without-develop was given.
14155 if test "${with_develop+set}" = set; then
14156 withval="$with_develop"
14157 with_develop=$withval
14161 echo "$as_me:14161: result: $with_develop" >&5
14162 echo "${ECHO_T}$with_develop" >&6
14164 ###############################################################################
14165 # These are just experimental, probably should not be in a package:
14167 # This is still experimental (20080329), but should ultimately be moved to
14168 # the script-block --with-normal, etc.
14170 echo "$as_me:14170: checking if you want to link with the pthread library" >&5
14171 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14173 # Check whether --with-pthread or --without-pthread was given.
14174 if test "${with_pthread+set}" = set; then
14175 withval="$with_pthread"
14176 with_pthread=$withval
14180 echo "$as_me:14180: result: $with_pthread" >&5
14181 echo "${ECHO_T}$with_pthread" >&6
14183 if test "$with_pthread" != no ; then
14184 echo "$as_me:14184: checking for pthread.h" >&5
14185 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14186 if test "${ac_cv_header_pthread_h+set}" = set; then
14187 echo $ECHO_N "(cached) $ECHO_C" >&6
14189 cat >conftest.$ac_ext <<_ACEOF
14190 #line 14190 "configure"
14191 #include "confdefs.h"
14192 #include <pthread.h>
14194 if { (eval echo "$as_me:14194: \"$ac_cpp conftest.$ac_ext\"") >&5
14195 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14197 egrep -v '^ *\+' conftest.er1 >conftest.err
14199 cat conftest.err >&5
14200 echo "$as_me:14200: \$? = $ac_status" >&5
14201 (exit $ac_status); } >/dev/null; then
14202 if test -s conftest.err; then
14203 ac_cpp_err=$ac_c_preproc_warn_flag
14210 if test -z "$ac_cpp_err"; then
14211 ac_cv_header_pthread_h=yes
14213 echo "$as_me: failed program was:" >&5
14214 cat conftest.$ac_ext >&5
14215 ac_cv_header_pthread_h=no
14217 rm -f conftest.err conftest.$ac_ext
14219 echo "$as_me:14219: result: $ac_cv_header_pthread_h" >&5
14220 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14221 if test $ac_cv_header_pthread_h = yes; then
14223 cat >>confdefs.h <<\EOF
14224 #define HAVE_PTHREADS_H 1
14227 for cf_lib_pthread in pthread c_r
14229 echo "$as_me:14229: checking if we can link with the $cf_lib_pthread library" >&5
14230 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14231 cf_save_LIBS="$LIBS"
14233 cf_add_libs="$LIBS"
14236 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14237 # filter duplicates
14238 for cf_add_1lib in $cf_add_0lib; do
14239 for cf_add_2lib in $cf_add_libs; do
14240 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14245 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14247 LIBS="$cf_add_libs"
14249 cat >conftest.$ac_ext <<_ACEOF
14250 #line 14250 "configure"
14251 #include "confdefs.h"
14253 #include <pthread.h>
14259 int rc = pthread_create(0,0,0,0);
14260 int r2 = pthread_mutexattr_settype(0, 0);
14266 rm -f conftest.$ac_objext conftest$ac_exeext
14267 if { (eval echo "$as_me:14267: \"$ac_link\"") >&5
14268 (eval $ac_link) 2>&5
14270 echo "$as_me:14270: \$? = $ac_status" >&5
14271 (exit $ac_status); } &&
14272 { ac_try='test -s conftest$ac_exeext'
14273 { (eval echo "$as_me:14273: \"$ac_try\"") >&5
14274 (eval $ac_try) 2>&5
14276 echo "$as_me:14276: \$? = $ac_status" >&5
14277 (exit $ac_status); }; }; then
14280 echo "$as_me: failed program was:" >&5
14281 cat conftest.$ac_ext >&5
14284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14285 LIBS="$cf_save_LIBS"
14286 echo "$as_me:14286: result: $with_pthread" >&5
14287 echo "${ECHO_T}$with_pthread" >&6
14288 test "$with_pthread" = yes && break
14291 if test "$with_pthread" = yes ; then
14293 cf_add_libs="$LIBS"
14296 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14297 # filter duplicates
14298 for cf_add_1lib in $cf_add_0lib; do
14299 for cf_add_2lib in $cf_add_libs; do
14300 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14305 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14307 LIBS="$cf_add_libs"
14309 cat >>confdefs.h <<\EOF
14310 #define HAVE_LIBPTHREADS 1
14314 { { echo "$as_me:14314: error: Cannot link with pthread library" >&5
14315 echo "$as_me: error: Cannot link with pthread library" >&2;}
14316 { (exit 1); exit 1; }; }
14323 echo "$as_me:14323: checking if you want to use weak-symbols for pthreads" >&5
14324 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14326 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14327 if test "${enable_weak_symbols+set}" = set; then
14328 enableval="$enable_weak_symbols"
14329 use_weak_symbols=$withval
14331 use_weak_symbols=no
14333 echo "$as_me:14333: result: $use_weak_symbols" >&5
14334 echo "${ECHO_T}$use_weak_symbols" >&6
14335 if test "$use_weak_symbols" = yes ; then
14337 echo "$as_me:14337: checking if $CC supports weak symbols" >&5
14338 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14339 if test "${cf_cv_weak_symbols+set}" = set; then
14340 echo $ECHO_N "(cached) $ECHO_C" >&6
14343 cat >conftest.$ac_ext <<_ACEOF
14344 #line 14344 "configure"
14345 #include "confdefs.h"
14352 #if defined(__GNUC__)
14353 # if defined __USE_ISOC99
14354 # define _cat_pragma(exp) _Pragma(#exp)
14355 # define _weak_pragma(exp) _cat_pragma(weak name)
14357 # define _weak_pragma(exp)
14359 # define _declare(name) __extension__ extern __typeof__(name) name
14360 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14363 weak_symbol(fopen);
14369 rm -f conftest.$ac_objext
14370 if { (eval echo "$as_me:14370: \"$ac_compile\"") >&5
14371 (eval $ac_compile) 2>&5
14373 echo "$as_me:14373: \$? = $ac_status" >&5
14374 (exit $ac_status); } &&
14375 { ac_try='test -s conftest.$ac_objext'
14376 { (eval echo "$as_me:14376: \"$ac_try\"") >&5
14377 (eval $ac_try) 2>&5
14379 echo "$as_me:14379: \$? = $ac_status" >&5
14380 (exit $ac_status); }; }; then
14381 cf_cv_weak_symbols=yes
14383 echo "$as_me: failed program was:" >&5
14384 cat conftest.$ac_ext >&5
14385 cf_cv_weak_symbols=no
14387 rm -f conftest.$ac_objext conftest.$ac_ext
14390 echo "$as_me:14390: result: $cf_cv_weak_symbols" >&5
14391 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14394 cf_cv_weak_symbols=no
14397 if test $cf_cv_weak_symbols = yes ; then
14399 cat >>confdefs.h <<\EOF
14400 #define USE_WEAK_SYMBOLS 1
14406 if test "$with_pthread" = "yes" ; then
14408 cat >>confdefs.h <<\EOF
14409 #define USE_PTHREADS 1
14412 enable_reentrant=yes
14413 if test $cf_cv_weak_symbols = yes ; then
14418 # OpenSUSE is installing ncurses6, using reentrant option.
14419 echo "$as_me:14419: checking for _nc_TABSIZE" >&5
14420 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14421 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14422 echo $ECHO_N "(cached) $ECHO_C" >&6
14424 cat >conftest.$ac_ext <<_ACEOF
14425 #line 14425 "configure"
14426 #include "confdefs.h"
14427 #define _nc_TABSIZE autoconf_temporary
14428 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14435 /* We use char because int might match the return type of a gcc2
14436 builtin and then its argument prototype would still apply. */
14437 char _nc_TABSIZE (void);
14443 /* The GNU C library defines stubs for functions which it implements
14444 to always fail with ENOSYS. Some functions are actually named
14445 something starting with __ and the normal name is an alias. */
14446 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14447 #error found stub for _nc_TABSIZE
14450 return _nc_TABSIZE ();
14455 rm -f conftest.$ac_objext conftest$ac_exeext
14456 if { (eval echo "$as_me:14456: \"$ac_link\"") >&5
14457 (eval $ac_link) 2>&5
14459 echo "$as_me:14459: \$? = $ac_status" >&5
14460 (exit $ac_status); } &&
14461 { ac_try='test -s conftest$ac_exeext'
14462 { (eval echo "$as_me:14462: \"$ac_try\"") >&5
14463 (eval $ac_try) 2>&5
14465 echo "$as_me:14465: \$? = $ac_status" >&5
14466 (exit $ac_status); }; }; then
14467 ac_cv_func__nc_TABSIZE=yes
14469 echo "$as_me: failed program was:" >&5
14470 cat conftest.$ac_ext >&5
14471 ac_cv_func__nc_TABSIZE=no
14473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14475 echo "$as_me:14475: result: $ac_cv_func__nc_TABSIZE" >&5
14476 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14477 if test $ac_cv_func__nc_TABSIZE = yes; then
14478 assume_reentrant=yes
14480 assume_reentrant=no
14483 # Reentrant code has to be opaque; there's little advantage to making ncurses
14484 # opaque outside of that, so there is no --enable-opaque option. We can use
14485 # this option without --with-pthreads, but this will be always set for
14487 echo "$as_me:14487: checking if you want experimental reentrant code" >&5
14488 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14490 # Check whether --enable-reentrant or --disable-reentrant was given.
14491 if test "${enable_reentrant+set}" = set; then
14492 enableval="$enable_reentrant"
14493 with_reentrant=$enableval
14495 with_reentrant=$assume_reentrant
14497 echo "$as_me:14497: result: $with_reentrant" >&5
14498 echo "${ECHO_T}$with_reentrant" >&6
14499 if test "$with_reentrant" = yes ; then
14500 cf_cv_enable_reentrant=1
14501 if test $cf_cv_weak_symbols = yes ; then
14503 # remove pthread library from $LIBS
14504 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14506 elif test "$assume_reentrant" = no ; then
14507 LIB_SUFFIX="t${LIB_SUFFIX}"
14510 cat >>confdefs.h <<\EOF
14511 #define USE_REENTRANT 1
14515 cf_cv_enable_reentrant=0
14518 ### Allow using a different wrap-prefix
14519 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14520 echo "$as_me:14520: checking for prefix used to wrap public variables" >&5
14521 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14523 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14524 if test "${with_wrap_prefix+set}" = set; then
14525 withval="$with_wrap_prefix"
14526 NCURSES_WRAP_PREFIX=$withval
14528 NCURSES_WRAP_PREFIX=_nc_
14530 echo "$as_me:14530: result: $NCURSES_WRAP_PREFIX" >&5
14531 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14533 NCURSES_WRAP_PREFIX=_nc_
14536 cat >>confdefs.h <<EOF
14537 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14540 ###############################################################################
14542 ### use option --disable-echo to suppress full display compiling commands
14544 echo "$as_me:14544: checking if you want to see long compiling messages" >&5
14545 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14547 # Check whether --enable-echo or --disable-echo was given.
14548 if test "${enable_echo+set}" = set; then
14549 enableval="$enable_echo"
14550 test "$enableval" != no && enableval=yes
14551 if test "$enableval" != "yes" ; then
14554 ECHO_LD='@echo linking $@;'
14555 RULE_CC='@echo compiling $<'
14556 SHOW_CC='@echo compiling $@'
14578 echo "$as_me:14578: result: $enableval" >&5
14579 echo "${ECHO_T}$enableval" >&6
14581 ### use option --enable-warnings to turn on all gcc warnings
14582 echo "$as_me:14582: checking if you want to see compiler warnings" >&5
14583 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14585 # Check whether --enable-warnings or --disable-warnings was given.
14586 if test "${enable_warnings+set}" = set; then
14587 enableval="$enable_warnings"
14588 with_warnings=$enableval
14590 echo "$as_me:14590: result: $with_warnings" >&5
14591 echo "${ECHO_T}$with_warnings" >&6
14593 if ( test "$GCC" = yes || test "$GXX" = yes )
14596 if ( test "$GCC" = yes || test "$GXX" = yes )
14600 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14602 echo "${as_me:-configure}:14602: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14605 for cf_temp_scan in $CFLAGS
14607 case "x$cf_temp_scan" in
14610 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14611 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14616 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14617 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14622 CFLAGS="$cf_temp_flags"
14623 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14625 echo "${as_me:-configure}:14625: testing ... fixed $CFLAGS ..." 1>&5
14627 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14629 echo "${as_me:-configure}:14629: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14635 if ( test "$GCC" = yes || test "$GXX" = yes )
14639 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14641 echo "${as_me:-configure}:14641: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14644 for cf_temp_scan in $CPPFLAGS
14646 case "x$cf_temp_scan" in
14649 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14650 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14655 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14656 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14661 CPPFLAGS="$cf_temp_flags"
14662 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14664 echo "${as_me:-configure}:14664: testing ... fixed $CPPFLAGS ..." 1>&5
14666 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14668 echo "${as_me:-configure}:14668: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14674 if ( test "$GCC" = yes || test "$GXX" = yes )
14678 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
14680 echo "${as_me:-configure}:14680: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
14683 for cf_temp_scan in $LDFLAGS
14685 case "x$cf_temp_scan" in
14688 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14689 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14694 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14695 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14700 LDFLAGS="$cf_temp_flags"
14701 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
14703 echo "${as_me:-configure}:14703: testing ... fixed $LDFLAGS ..." 1>&5
14705 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14707 echo "${as_me:-configure}:14707: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14713 echo "$as_me:14713: checking if you want to turn on gcc warnings" >&5
14714 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
14716 # Check whether --enable-warnings or --disable-warnings was given.
14717 if test "${enable_warnings+set}" = set; then
14718 enableval="$enable_warnings"
14719 test "$enableval" != yes && enableval=no
14720 if test "$enableval" != "no" ; then
14730 echo "$as_me:14730: result: $with_warnings" >&5
14731 echo "${ECHO_T}$with_warnings" >&6
14732 if test "$with_warnings" = "yes"
14735 if test "x$have_x" = xyes; then
14737 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
14738 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
14739 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
14740 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14741 for cf_X_CFLAGS in $X_CFLAGS
14743 case "x$cf_X_CFLAGS" in
14745 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14748 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14753 cat >conftest.$ac_ext <<_ACEOF
14754 #line 14754 "configure"
14755 #include "confdefs.h"
14757 #include <stdlib.h>
14758 #include <X11/Intrinsic.h>
14763 String foo = malloc(1); (void)foo
14768 rm -f conftest.$ac_objext
14769 if { (eval echo "$as_me:14769: \"$ac_compile\"") >&5
14770 (eval $ac_compile) 2>&5
14772 echo "$as_me:14772: \$? = $ac_status" >&5
14773 (exit $ac_status); } &&
14774 { ac_try='test -s conftest.$ac_objext'
14775 { (eval echo "$as_me:14775: \"$ac_try\"") >&5
14776 (eval $ac_try) 2>&5
14778 echo "$as_me:14778: \$? = $ac_status" >&5
14779 (exit $ac_status); }; }; then
14781 echo "$as_me:14781: checking for X11/Xt const-feature" >&5
14782 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
14783 if test "${cf_cv_const_x_string+set}" = set; then
14784 echo $ECHO_N "(cached) $ECHO_C" >&6
14787 cat >conftest.$ac_ext <<_ACEOF
14788 #line 14788 "configure"
14789 #include "confdefs.h"
14791 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
14792 #undef XTSTRINGDEFINES /* X11R5 and later */
14793 #include <stdlib.h>
14794 #include <X11/Intrinsic.h>
14799 String foo = malloc(1); *foo = 0
14804 rm -f conftest.$ac_objext
14805 if { (eval echo "$as_me:14805: \"$ac_compile\"") >&5
14806 (eval $ac_compile) 2>&5
14808 echo "$as_me:14808: \$? = $ac_status" >&5
14809 (exit $ac_status); } &&
14810 { ac_try='test -s conftest.$ac_objext'
14811 { (eval echo "$as_me:14811: \"$ac_try\"") >&5
14812 (eval $ac_try) 2>&5
14814 echo "$as_me:14814: \$? = $ac_status" >&5
14815 (exit $ac_status); }; }; then
14817 cf_cv_const_x_string=no
14820 echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14823 cf_cv_const_x_string=yes
14826 rm -f conftest.$ac_objext conftest.$ac_ext
14829 echo "$as_me:14829: result: $cf_cv_const_x_string" >&5
14830 echo "${ECHO_T}$cf_cv_const_x_string" >&6
14832 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
14833 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
14834 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
14836 case $cf_cv_const_x_string in
14839 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14840 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
14845 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14846 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
14852 echo "$as_me: failed program was:" >&5
14853 cat conftest.$ac_ext >&5
14855 rm -f conftest.$ac_objext conftest.$ac_ext
14857 cat > conftest.$ac_ext <<EOF
14858 #line 14858 "${as_me:-configure}"
14859 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14861 if test "$INTEL_COMPILER" = yes
14863 # The "-wdXXX" options suppress warnings:
14864 # remark #1419: external declaration in primary source file
14865 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14866 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14867 # remark #193: zero used for undefined preprocessing identifier
14868 # remark #593: variable "curs_sb_left_arrow" was set but never used
14869 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14870 # remark #869: parameter "tw" was never referenced
14871 # remark #981: operands are evaluated in unspecified order
14872 # warning #279: controlling expression is constant
14874 { echo "$as_me:14874: checking for $CC warning options..." >&5
14875 echo "$as_me: checking for $CC warning options..." >&6;}
14876 cf_save_CFLAGS="$CFLAGS"
14877 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
14889 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14890 if { (eval echo "$as_me:14890: \"$ac_compile\"") >&5
14891 (eval $ac_compile) 2>&5
14893 echo "$as_me:14893: \$? = $ac_status" >&5
14894 (exit $ac_status); }; then
14895 test -n "$verbose" && echo "$as_me:14895: result: ... -$cf_opt" >&5
14896 echo "${ECHO_T}... -$cf_opt" >&6
14897 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14900 CFLAGS="$cf_save_CFLAGS"
14901 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
14903 { echo "$as_me:14903: checking for $CC warning options..." >&5
14904 echo "$as_me: checking for $CC warning options..." >&6;}
14905 cf_save_CFLAGS="$CFLAGS"
14907 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14908 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14909 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14910 for cf_opt in W Wall \
14911 Wbad-function-cast \
14914 Wdeclaration-after-statement \
14917 Wmissing-declarations \
14918 Wmissing-prototypes \
14922 Wstrict-prototypes \
14923 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
14925 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14926 if { (eval echo "$as_me:14926: \"$ac_compile\"") >&5
14927 (eval $ac_compile) 2>&5
14929 echo "$as_me:14929: \$? = $ac_status" >&5
14930 (exit $ac_status); }; then
14931 test -n "$verbose" && echo "$as_me:14931: result: ... -$cf_opt" >&5
14932 echo "${ECHO_T}... -$cf_opt" >&6
14935 case $GCC_VERSION in
14937 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
14939 echo "${as_me:-configure}:14939: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14945 case $GCC_VERSION in
14947 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
14949 echo "${as_me:-configure}:14949: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14955 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14958 CFLAGS="$cf_save_CFLAGS"
14964 if ( test "$GCC" = yes || test "$GXX" = yes )
14966 cat > conftest.i <<EOF
14968 #define GCC_PRINTF 0
14971 #define GCC_SCANF 0
14973 #ifndef GCC_NORETURN
14974 #define GCC_NORETURN /* nothing */
14977 #define GCC_UNUSED /* nothing */
14980 if test "$GCC" = yes
14982 { echo "$as_me:14982: checking for $CC __attribute__ directives..." >&5
14983 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14984 cat > conftest.$ac_ext <<EOF
14985 #line 14985 "${as_me:-configure}"
14986 #include "confdefs.h"
14987 #include "conftest.h"
14988 #include "conftest.i"
14990 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14992 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14995 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
14997 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
14999 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15000 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15001 extern void foo(void) GCC_NORETURN;
15002 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15004 cf_printf_attribute=no
15005 cf_scanf_attribute=no
15006 for cf_attribute in scanf printf unused noreturn
15009 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15011 cf_directive="__attribute__(($cf_attribute))"
15012 echo "checking for $CC $cf_directive" 1>&5
15014 case $cf_attribute in
15016 cf_printf_attribute=yes
15017 cat >conftest.h <<EOF
15018 #define GCC_$cf_ATTRIBUTE 1
15022 cf_scanf_attribute=yes
15023 cat >conftest.h <<EOF
15024 #define GCC_$cf_ATTRIBUTE 1
15028 cat >conftest.h <<EOF
15029 #define GCC_$cf_ATTRIBUTE $cf_directive
15034 if { (eval echo "$as_me:15034: \"$ac_compile\"") >&5
15035 (eval $ac_compile) 2>&5
15037 echo "$as_me:15037: \$? = $ac_status" >&5
15038 (exit $ac_status); }; then
15039 test -n "$verbose" && echo "$as_me:15039: result: ... $cf_attribute" >&5
15040 echo "${ECHO_T}... $cf_attribute" >&6
15041 cat conftest.h >>confdefs.h
15042 case $cf_attribute in
15045 cat >>confdefs.h <<EOF
15046 #define GCC_NORETURN $cf_directive
15051 cf_value='/* nothing */'
15052 if test "$cf_printf_attribute" != no ; then
15053 cf_value='__attribute__((format(printf,fmt,var)))'
15055 cat >>confdefs.h <<\EOF
15056 #define GCC_PRINTF 1
15061 cat >>confdefs.h <<EOF
15062 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15067 cf_value='/* nothing */'
15068 if test "$cf_scanf_attribute" != no ; then
15069 cf_value='__attribute__((format(scanf,fmt,var)))'
15071 cat >>confdefs.h <<\EOF
15072 #define GCC_SCANF 1
15077 cat >>confdefs.h <<EOF
15078 #define GCC_SCANFLIKE(fmt,var) $cf_value
15084 cat >>confdefs.h <<EOF
15085 #define GCC_UNUSED $cf_directive
15093 fgrep define conftest.i >>confdefs.h
15100 if test "x$with_warnings" = "xyes"; then
15102 ADAFLAGS="$ADAFLAGS -gnatg"
15106 ### use option --enable-assertions to turn on generation of assertion code
15107 echo "$as_me:15107: checking if you want to enable runtime assertions" >&5
15108 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15110 # Check whether --enable-assertions or --disable-assertions was given.
15111 if test "${enable_assertions+set}" = set; then
15112 enableval="$enable_assertions"
15113 with_assertions=$enableval
15117 echo "$as_me:15117: result: $with_assertions" >&5
15118 echo "${ECHO_T}$with_assertions" >&6
15121 if test "$with_assertions" = no
15123 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15126 ADAFLAGS="$ADAFLAGS -gnata"
15131 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15133 cat >>confdefs.h <<\EOF
15134 #define HAVE_NC_ALLOC_H 1
15137 ### use option --enable-expanded to generate certain macros as functions
15139 # Check whether --enable-expanded or --disable-expanded was given.
15140 if test "${enable_expanded+set}" = set; then
15141 enableval="$enable_expanded"
15142 test "$enableval" = yes &&
15143 cat >>confdefs.h <<\EOF
15144 #define NCURSES_EXPANDED 1
15149 ### use option --disable-macros to suppress macros in favor of functions
15151 # Check whether --enable-macros or --disable-macros was given.
15152 if test "${enable_macros+set}" = set; then
15153 enableval="$enable_macros"
15154 test "$enableval" = no &&
15155 cat >>confdefs.h <<\EOF
15156 #define NCURSES_NOMACROS 1
15161 # Normally we only add trace() to the debug-library. Allow this to be
15162 # extended to all models of the ncurses library:
15164 case "$CFLAGS $CPPFLAGS" in
15170 echo "$as_me:15170: checking whether to add trace feature to all models" >&5
15171 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15173 # Check whether --with-trace or --without-trace was given.
15174 if test "${with_trace+set}" = set; then
15175 withval="$with_trace"
15176 cf_with_trace=$withval
15178 cf_with_trace=$cf_all_traces
15180 echo "$as_me:15180: result: $cf_with_trace" >&5
15181 echo "${ECHO_T}$cf_with_trace" >&6
15183 if test "$cf_with_trace" = yes ; then
15189 cf_new_extra_cppflags=
15191 for cf_add_cflags in -DTRACE
15193 case $cf_fix_cppflags in
15195 case $cf_add_cflags in
15196 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15197 case $cf_add_cflags in
15199 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15201 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15202 && test -z "${cf_tst_cflags}" \
15203 && cf_fix_cppflags=yes
15205 if test $cf_fix_cppflags = yes ; then
15207 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15208 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15211 elif test "${cf_tst_cflags}" = "\"'" ; then
15213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15220 case "$CPPFLAGS" in
15224 case $cf_add_cflags in
15226 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15228 CPPFLAGS=`echo "$CPPFLAGS" | \
15229 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15230 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15235 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15236 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15243 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15244 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15251 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15252 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15254 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15256 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15257 && test -z "${cf_tst_cflags}" \
15258 && cf_fix_cppflags=no
15263 if test -n "$cf_new_cflags" ; then
15265 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15266 CFLAGS="${CFLAGS}$cf_new_cflags"
15270 if test -n "$cf_new_cppflags" ; then
15272 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15273 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15277 if test -n "$cf_new_extra_cppflags" ; then
15279 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15280 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15288 echo "$as_me:15288: checking if we want to use GNAT projects" >&5
15289 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15291 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15292 if test "${enable_gnat_projects+set}" = set; then
15293 enableval="$enable_gnat_projects"
15294 test "$enableval" != no && enableval=yes
15295 if test "$enableval" != "yes" ; then
15296 enable_gnat_projects=no
15298 enable_gnat_projects=yes
15302 enable_gnat_projects=yes
15305 echo "$as_me:15305: result: $enable_gnat_projects" >&5
15306 echo "${ECHO_T}$enable_gnat_projects" >&6
15308 ### Checks for libraries.
15309 case $cf_cv_system_name in
15313 echo "$as_me:15313: checking for gettimeofday" >&5
15314 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15315 if test "${ac_cv_func_gettimeofday+set}" = set; then
15316 echo $ECHO_N "(cached) $ECHO_C" >&6
15318 cat >conftest.$ac_ext <<_ACEOF
15319 #line 15319 "configure"
15320 #include "confdefs.h"
15321 #define gettimeofday autoconf_temporary
15322 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15323 #undef gettimeofday
15329 /* We use char because int might match the return type of a gcc2
15330 builtin and then its argument prototype would still apply. */
15331 char gettimeofday (void);
15337 /* The GNU C library defines stubs for functions which it implements
15338 to always fail with ENOSYS. Some functions are actually named
15339 something starting with __ and the normal name is an alias. */
15340 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15341 #error found stub for gettimeofday
15344 return gettimeofday ();
15349 rm -f conftest.$ac_objext conftest$ac_exeext
15350 if { (eval echo "$as_me:15350: \"$ac_link\"") >&5
15351 (eval $ac_link) 2>&5
15353 echo "$as_me:15353: \$? = $ac_status" >&5
15354 (exit $ac_status); } &&
15355 { ac_try='test -s conftest$ac_exeext'
15356 { (eval echo "$as_me:15356: \"$ac_try\"") >&5
15357 (eval $ac_try) 2>&5
15359 echo "$as_me:15359: \$? = $ac_status" >&5
15360 (exit $ac_status); }; }; then
15361 ac_cv_func_gettimeofday=yes
15363 echo "$as_me: failed program was:" >&5
15364 cat conftest.$ac_ext >&5
15365 ac_cv_func_gettimeofday=no
15367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15369 echo "$as_me:15369: result: $ac_cv_func_gettimeofday" >&5
15370 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15371 if test $ac_cv_func_gettimeofday = yes; then
15372 cat >>confdefs.h <<\EOF
15373 #define HAVE_GETTIMEOFDAY 1
15378 echo "$as_me:15378: checking for gettimeofday in -lbsd" >&5
15379 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15380 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
15383 ac_check_lib_save_LIBS=$LIBS
15385 cat >conftest.$ac_ext <<_ACEOF
15386 #line 15386 "configure"
15387 #include "confdefs.h"
15389 /* Override any gcc2 internal prototype to avoid an error. */
15393 /* We use char because int might match the return type of a gcc2
15394 builtin and then its argument prototype would still apply. */
15395 char gettimeofday ();
15404 rm -f conftest.$ac_objext conftest$ac_exeext
15405 if { (eval echo "$as_me:15405: \"$ac_link\"") >&5
15406 (eval $ac_link) 2>&5
15408 echo "$as_me:15408: \$? = $ac_status" >&5
15409 (exit $ac_status); } &&
15410 { ac_try='test -s conftest$ac_exeext'
15411 { (eval echo "$as_me:15411: \"$ac_try\"") >&5
15412 (eval $ac_try) 2>&5
15414 echo "$as_me:15414: \$? = $ac_status" >&5
15415 (exit $ac_status); }; }; then
15416 ac_cv_lib_bsd_gettimeofday=yes
15418 echo "$as_me: failed program was:" >&5
15419 cat conftest.$ac_ext >&5
15420 ac_cv_lib_bsd_gettimeofday=no
15422 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15423 LIBS=$ac_check_lib_save_LIBS
15425 echo "$as_me:15425: result: $ac_cv_lib_bsd_gettimeofday" >&5
15426 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15427 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15429 cat >>confdefs.h <<\EOF
15430 #define HAVE_GETTIMEOFDAY 1
15440 ### Checks for header files.
15441 echo "$as_me:15441: checking for ANSI C header files" >&5
15442 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15443 if test "${ac_cv_header_stdc+set}" = set; then
15444 echo $ECHO_N "(cached) $ECHO_C" >&6
15446 cat >conftest.$ac_ext <<_ACEOF
15447 #line 15447 "configure"
15448 #include "confdefs.h"
15449 #include <stdlib.h>
15450 #include <stdarg.h>
15451 #include <string.h>
15455 if { (eval echo "$as_me:15455: \"$ac_cpp conftest.$ac_ext\"") >&5
15456 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15458 egrep -v '^ *\+' conftest.er1 >conftest.err
15460 cat conftest.err >&5
15461 echo "$as_me:15461: \$? = $ac_status" >&5
15462 (exit $ac_status); } >/dev/null; then
15463 if test -s conftest.err; then
15464 ac_cpp_err=$ac_c_preproc_warn_flag
15471 if test -z "$ac_cpp_err"; then
15472 ac_cv_header_stdc=yes
15474 echo "$as_me: failed program was:" >&5
15475 cat conftest.$ac_ext >&5
15476 ac_cv_header_stdc=no
15478 rm -f conftest.err conftest.$ac_ext
15480 if test $ac_cv_header_stdc = yes; then
15481 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15482 cat >conftest.$ac_ext <<_ACEOF
15483 #line 15483 "configure"
15484 #include "confdefs.h"
15485 #include <string.h>
15488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15489 egrep "memchr" >/dev/null 2>&1; then
15492 ac_cv_header_stdc=no
15498 if test $ac_cv_header_stdc = yes; then
15499 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15500 cat >conftest.$ac_ext <<_ACEOF
15501 #line 15501 "configure"
15502 #include "confdefs.h"
15503 #include <stdlib.h>
15506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15507 egrep "free" >/dev/null 2>&1; then
15510 ac_cv_header_stdc=no
15516 if test $ac_cv_header_stdc = yes; then
15517 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15518 if test "$cross_compiling" = yes; then
15521 cat >conftest.$ac_ext <<_ACEOF
15522 #line 15522 "configure"
15523 #include "confdefs.h"
15525 #if ((' ' & 0x0FF) == 0x020)
15526 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15527 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15529 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15530 || ('j' <= (c) && (c) <= 'r') \
15531 || ('s' <= (c) && (c) <= 'z'))
15532 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15535 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15540 for (i = 0; i < 256; i++)
15541 if (XOR (islower (i), ISLOWER (i))
15542 || toupper (i) != TOUPPER (i))
15543 $ac_main_return(2);
15544 $ac_main_return (0);
15547 rm -f conftest$ac_exeext
15548 if { (eval echo "$as_me:15548: \"$ac_link\"") >&5
15549 (eval $ac_link) 2>&5
15551 echo "$as_me:15551: \$? = $ac_status" >&5
15552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15553 { (eval echo "$as_me:15553: \"$ac_try\"") >&5
15554 (eval $ac_try) 2>&5
15556 echo "$as_me:15556: \$? = $ac_status" >&5
15557 (exit $ac_status); }; }; then
15560 echo "$as_me: program exited with status $ac_status" >&5
15561 echo "$as_me: failed program was:" >&5
15562 cat conftest.$ac_ext >&5
15563 ac_cv_header_stdc=no
15565 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15569 echo "$as_me:15569: result: $ac_cv_header_stdc" >&5
15570 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15571 if test $ac_cv_header_stdc = yes; then
15573 cat >>confdefs.h <<\EOF
15574 #define STDC_HEADERS 1
15579 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15581 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15582 inttypes.h stdint.h unistd.h
15584 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15585 echo "$as_me:15585: checking for $ac_header" >&5
15586 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15588 echo $ECHO_N "(cached) $ECHO_C" >&6
15590 cat >conftest.$ac_ext <<_ACEOF
15591 #line 15591 "configure"
15592 #include "confdefs.h"
15593 $ac_includes_default
15594 #include <$ac_header>
15596 rm -f conftest.$ac_objext
15597 if { (eval echo "$as_me:15597: \"$ac_compile\"") >&5
15598 (eval $ac_compile) 2>&5
15600 echo "$as_me:15600: \$? = $ac_status" >&5
15601 (exit $ac_status); } &&
15602 { ac_try='test -s conftest.$ac_objext'
15603 { (eval echo "$as_me:15603: \"$ac_try\"") >&5
15604 (eval $ac_try) 2>&5
15606 echo "$as_me:15606: \$? = $ac_status" >&5
15607 (exit $ac_status); }; }; then
15608 eval "$as_ac_Header=yes"
15610 echo "$as_me: failed program was:" >&5
15611 cat conftest.$ac_ext >&5
15612 eval "$as_ac_Header=no"
15614 rm -f conftest.$ac_objext conftest.$ac_ext
15616 echo "$as_me:15616: result: `eval echo '${'$as_ac_Header'}'`" >&5
15617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15618 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15619 cat >>confdefs.h <<EOF
15620 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15626 echo "$as_me:15626: checking for signed char" >&5
15627 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15628 if test "${ac_cv_type_signed_char+set}" = set; then
15629 echo $ECHO_N "(cached) $ECHO_C" >&6
15631 cat >conftest.$ac_ext <<_ACEOF
15632 #line 15632 "configure"
15633 #include "confdefs.h"
15634 $ac_includes_default
15638 if ((signed char *) 0)
15640 if (sizeof (signed char))
15646 rm -f conftest.$ac_objext
15647 if { (eval echo "$as_me:15647: \"$ac_compile\"") >&5
15648 (eval $ac_compile) 2>&5
15650 echo "$as_me:15650: \$? = $ac_status" >&5
15651 (exit $ac_status); } &&
15652 { ac_try='test -s conftest.$ac_objext'
15653 { (eval echo "$as_me:15653: \"$ac_try\"") >&5
15654 (eval $ac_try) 2>&5
15656 echo "$as_me:15656: \$? = $ac_status" >&5
15657 (exit $ac_status); }; }; then
15658 ac_cv_type_signed_char=yes
15660 echo "$as_me: failed program was:" >&5
15661 cat conftest.$ac_ext >&5
15662 ac_cv_type_signed_char=no
15664 rm -f conftest.$ac_objext conftest.$ac_ext
15666 echo "$as_me:15666: result: $ac_cv_type_signed_char" >&5
15667 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15669 echo "$as_me:15669: checking size of signed char" >&5
15670 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15671 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15672 echo $ECHO_N "(cached) $ECHO_C" >&6
15674 if test "$ac_cv_type_signed_char" = yes; then
15675 if test "$cross_compiling" = yes; then
15676 # Depending upon the size, compute the lo and hi bounds.
15677 cat >conftest.$ac_ext <<_ACEOF
15678 #line 15678 "configure"
15679 #include "confdefs.h"
15680 $ac_includes_default
15684 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15689 rm -f conftest.$ac_objext
15690 if { (eval echo "$as_me:15690: \"$ac_compile\"") >&5
15691 (eval $ac_compile) 2>&5
15693 echo "$as_me:15693: \$? = $ac_status" >&5
15694 (exit $ac_status); } &&
15695 { ac_try='test -s conftest.$ac_objext'
15696 { (eval echo "$as_me:15696: \"$ac_try\"") >&5
15697 (eval $ac_try) 2>&5
15699 echo "$as_me:15699: \$? = $ac_status" >&5
15700 (exit $ac_status); }; }; then
15703 cat >conftest.$ac_ext <<_ACEOF
15704 #line 15704 "configure"
15705 #include "confdefs.h"
15706 $ac_includes_default
15710 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15715 rm -f conftest.$ac_objext
15716 if { (eval echo "$as_me:15716: \"$ac_compile\"") >&5
15717 (eval $ac_compile) 2>&5
15719 echo "$as_me:15719: \$? = $ac_status" >&5
15720 (exit $ac_status); } &&
15721 { ac_try='test -s conftest.$ac_objext'
15722 { (eval echo "$as_me:15722: \"$ac_try\"") >&5
15723 (eval $ac_try) 2>&5
15725 echo "$as_me:15725: \$? = $ac_status" >&5
15726 (exit $ac_status); }; }; then
15727 ac_hi=$ac_mid; break
15729 echo "$as_me: failed program was:" >&5
15730 cat conftest.$ac_ext >&5
15731 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
15733 rm -f conftest.$ac_objext conftest.$ac_ext
15736 echo "$as_me: failed program was:" >&5
15737 cat conftest.$ac_ext >&5
15740 cat >conftest.$ac_ext <<_ACEOF
15741 #line 15741 "configure"
15742 #include "confdefs.h"
15743 $ac_includes_default
15747 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15752 rm -f conftest.$ac_objext
15753 if { (eval echo "$as_me:15753: \"$ac_compile\"") >&5
15754 (eval $ac_compile) 2>&5
15756 echo "$as_me:15756: \$? = $ac_status" >&5
15757 (exit $ac_status); } &&
15758 { ac_try='test -s conftest.$ac_objext'
15759 { (eval echo "$as_me:15759: \"$ac_try\"") >&5
15760 (eval $ac_try) 2>&5
15762 echo "$as_me:15762: \$? = $ac_status" >&5
15763 (exit $ac_status); }; }; then
15764 ac_lo=$ac_mid; break
15766 echo "$as_me: failed program was:" >&5
15767 cat conftest.$ac_ext >&5
15768 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
15770 rm -f conftest.$ac_objext conftest.$ac_ext
15773 rm -f conftest.$ac_objext conftest.$ac_ext
15774 # Binary search between lo and hi bounds.
15775 while test "x$ac_lo" != "x$ac_hi"; do
15776 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15777 cat >conftest.$ac_ext <<_ACEOF
15778 #line 15778 "configure"
15779 #include "confdefs.h"
15780 $ac_includes_default
15784 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15789 rm -f conftest.$ac_objext
15790 if { (eval echo "$as_me:15790: \"$ac_compile\"") >&5
15791 (eval $ac_compile) 2>&5
15793 echo "$as_me:15793: \$? = $ac_status" >&5
15794 (exit $ac_status); } &&
15795 { ac_try='test -s conftest.$ac_objext'
15796 { (eval echo "$as_me:15796: \"$ac_try\"") >&5
15797 (eval $ac_try) 2>&5
15799 echo "$as_me:15799: \$? = $ac_status" >&5
15800 (exit $ac_status); }; }; then
15803 echo "$as_me: failed program was:" >&5
15804 cat conftest.$ac_ext >&5
15805 ac_lo=`expr $ac_mid + 1`
15807 rm -f conftest.$ac_objext conftest.$ac_ext
15809 ac_cv_sizeof_signed_char=$ac_lo
15811 if test "$cross_compiling" = yes; then
15812 { { echo "$as_me:15812: error: cannot run test program while cross compiling" >&5
15813 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15814 { (exit 1); exit 1; }; }
15816 cat >conftest.$ac_ext <<_ACEOF
15817 #line 15817 "configure"
15818 #include "confdefs.h"
15819 $ac_includes_default
15823 FILE *f = fopen ("conftest.val", "w");
15825 $ac_main_return (1);
15826 fprintf (f, "%d", (sizeof (signed char)));
15832 rm -f conftest$ac_exeext
15833 if { (eval echo "$as_me:15833: \"$ac_link\"") >&5
15834 (eval $ac_link) 2>&5
15836 echo "$as_me:15836: \$? = $ac_status" >&5
15837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15838 { (eval echo "$as_me:15838: \"$ac_try\"") >&5
15839 (eval $ac_try) 2>&5
15841 echo "$as_me:15841: \$? = $ac_status" >&5
15842 (exit $ac_status); }; }; then
15843 ac_cv_sizeof_signed_char=`cat conftest.val`
15845 echo "$as_me: program exited with status $ac_status" >&5
15846 echo "$as_me: failed program was:" >&5
15847 cat conftest.$ac_ext >&5
15849 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15854 ac_cv_sizeof_signed_char=0
15857 echo "$as_me:15857: result: $ac_cv_sizeof_signed_char" >&5
15858 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15859 cat >>confdefs.h <<EOF
15860 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15863 echo "$as_me:15863: checking for ANSI C header files" >&5
15864 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15865 if test "${ac_cv_header_stdc+set}" = set; then
15866 echo $ECHO_N "(cached) $ECHO_C" >&6
15868 cat >conftest.$ac_ext <<_ACEOF
15869 #line 15869 "configure"
15870 #include "confdefs.h"
15871 #include <stdlib.h>
15872 #include <stdarg.h>
15873 #include <string.h>
15877 if { (eval echo "$as_me:15877: \"$ac_cpp conftest.$ac_ext\"") >&5
15878 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15880 egrep -v '^ *\+' conftest.er1 >conftest.err
15882 cat conftest.err >&5
15883 echo "$as_me:15883: \$? = $ac_status" >&5
15884 (exit $ac_status); } >/dev/null; then
15885 if test -s conftest.err; then
15886 ac_cpp_err=$ac_c_preproc_warn_flag
15893 if test -z "$ac_cpp_err"; then
15894 ac_cv_header_stdc=yes
15896 echo "$as_me: failed program was:" >&5
15897 cat conftest.$ac_ext >&5
15898 ac_cv_header_stdc=no
15900 rm -f conftest.err conftest.$ac_ext
15902 if test $ac_cv_header_stdc = yes; then
15903 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15904 cat >conftest.$ac_ext <<_ACEOF
15905 #line 15905 "configure"
15906 #include "confdefs.h"
15907 #include <string.h>
15910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15911 egrep "memchr" >/dev/null 2>&1; then
15914 ac_cv_header_stdc=no
15920 if test $ac_cv_header_stdc = yes; then
15921 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15922 cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15925 #include <stdlib.h>
15928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15929 egrep "free" >/dev/null 2>&1; then
15932 ac_cv_header_stdc=no
15938 if test $ac_cv_header_stdc = yes; then
15939 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15940 if test "$cross_compiling" = yes; then
15943 cat >conftest.$ac_ext <<_ACEOF
15944 #line 15944 "configure"
15945 #include "confdefs.h"
15947 #if ((' ' & 0x0FF) == 0x020)
15948 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15949 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15951 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15952 || ('j' <= (c) && (c) <= 'r') \
15953 || ('s' <= (c) && (c) <= 'z'))
15954 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15957 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15962 for (i = 0; i < 256; i++)
15963 if (XOR (islower (i), ISLOWER (i))
15964 || toupper (i) != TOUPPER (i))
15965 $ac_main_return(2);
15966 $ac_main_return (0);
15969 rm -f conftest$ac_exeext
15970 if { (eval echo "$as_me:15970: \"$ac_link\"") >&5
15971 (eval $ac_link) 2>&5
15973 echo "$as_me:15973: \$? = $ac_status" >&5
15974 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15975 { (eval echo "$as_me:15975: \"$ac_try\"") >&5
15976 (eval $ac_try) 2>&5
15978 echo "$as_me:15978: \$? = $ac_status" >&5
15979 (exit $ac_status); }; }; then
15982 echo "$as_me: program exited with status $ac_status" >&5
15983 echo "$as_me: failed program was:" >&5
15984 cat conftest.$ac_ext >&5
15985 ac_cv_header_stdc=no
15987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15991 echo "$as_me:15991: result: $ac_cv_header_stdc" >&5
15992 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15993 if test $ac_cv_header_stdc = yes; then
15995 cat >>confdefs.h <<\EOF
15996 #define STDC_HEADERS 1
16001 ac_header_dirent=no
16002 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16003 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16004 echo "$as_me:16004: checking for $ac_hdr that defines DIR" >&5
16005 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16006 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16007 echo $ECHO_N "(cached) $ECHO_C" >&6
16009 cat >conftest.$ac_ext <<_ACEOF
16010 #line 16010 "configure"
16011 #include "confdefs.h"
16012 #include <sys/types.h>
16024 rm -f conftest.$ac_objext
16025 if { (eval echo "$as_me:16025: \"$ac_compile\"") >&5
16026 (eval $ac_compile) 2>&5
16028 echo "$as_me:16028: \$? = $ac_status" >&5
16029 (exit $ac_status); } &&
16030 { ac_try='test -s conftest.$ac_objext'
16031 { (eval echo "$as_me:16031: \"$ac_try\"") >&5
16032 (eval $ac_try) 2>&5
16034 echo "$as_me:16034: \$? = $ac_status" >&5
16035 (exit $ac_status); }; }; then
16036 eval "$as_ac_Header=yes"
16038 echo "$as_me: failed program was:" >&5
16039 cat conftest.$ac_ext >&5
16040 eval "$as_ac_Header=no"
16042 rm -f conftest.$ac_objext conftest.$ac_ext
16044 echo "$as_me:16044: result: `eval echo '${'$as_ac_Header'}'`" >&5
16045 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16046 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16047 cat >>confdefs.h <<EOF
16048 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16051 ac_header_dirent=$ac_hdr; break
16055 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16056 if test $ac_header_dirent = dirent.h; then
16057 echo "$as_me:16057: checking for opendir in -ldir" >&5
16058 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16059 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16060 echo $ECHO_N "(cached) $ECHO_C" >&6
16062 ac_check_lib_save_LIBS=$LIBS
16064 cat >conftest.$ac_ext <<_ACEOF
16065 #line 16065 "configure"
16066 #include "confdefs.h"
16068 /* Override any gcc2 internal prototype to avoid an error. */
16072 /* We use char because int might match the return type of a gcc2
16073 builtin and then its argument prototype would still apply. */
16083 rm -f conftest.$ac_objext conftest$ac_exeext
16084 if { (eval echo "$as_me:16084: \"$ac_link\"") >&5
16085 (eval $ac_link) 2>&5
16087 echo "$as_me:16087: \$? = $ac_status" >&5
16088 (exit $ac_status); } &&
16089 { ac_try='test -s conftest$ac_exeext'
16090 { (eval echo "$as_me:16090: \"$ac_try\"") >&5
16091 (eval $ac_try) 2>&5
16093 echo "$as_me:16093: \$? = $ac_status" >&5
16094 (exit $ac_status); }; }; then
16095 ac_cv_lib_dir_opendir=yes
16097 echo "$as_me: failed program was:" >&5
16098 cat conftest.$ac_ext >&5
16099 ac_cv_lib_dir_opendir=no
16101 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16102 LIBS=$ac_check_lib_save_LIBS
16104 echo "$as_me:16104: result: $ac_cv_lib_dir_opendir" >&5
16105 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16106 if test $ac_cv_lib_dir_opendir = yes; then
16111 echo "$as_me:16111: checking for opendir in -lx" >&5
16112 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16113 if test "${ac_cv_lib_x_opendir+set}" = set; then
16114 echo $ECHO_N "(cached) $ECHO_C" >&6
16116 ac_check_lib_save_LIBS=$LIBS
16118 cat >conftest.$ac_ext <<_ACEOF
16119 #line 16119 "configure"
16120 #include "confdefs.h"
16122 /* Override any gcc2 internal prototype to avoid an error. */
16126 /* We use char because int might match the return type of a gcc2
16127 builtin and then its argument prototype would still apply. */
16137 rm -f conftest.$ac_objext conftest$ac_exeext
16138 if { (eval echo "$as_me:16138: \"$ac_link\"") >&5
16139 (eval $ac_link) 2>&5
16141 echo "$as_me:16141: \$? = $ac_status" >&5
16142 (exit $ac_status); } &&
16143 { ac_try='test -s conftest$ac_exeext'
16144 { (eval echo "$as_me:16144: \"$ac_try\"") >&5
16145 (eval $ac_try) 2>&5
16147 echo "$as_me:16147: \$? = $ac_status" >&5
16148 (exit $ac_status); }; }; then
16149 ac_cv_lib_x_opendir=yes
16151 echo "$as_me: failed program was:" >&5
16152 cat conftest.$ac_ext >&5
16153 ac_cv_lib_x_opendir=no
16155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16156 LIBS=$ac_check_lib_save_LIBS
16158 echo "$as_me:16158: result: $ac_cv_lib_x_opendir" >&5
16159 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16160 if test $ac_cv_lib_x_opendir = yes; then
16166 echo "$as_me:16166: checking whether time.h and sys/time.h may both be included" >&5
16167 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16168 if test "${ac_cv_header_time+set}" = set; then
16169 echo $ECHO_N "(cached) $ECHO_C" >&6
16171 cat >conftest.$ac_ext <<_ACEOF
16172 #line 16172 "configure"
16173 #include "confdefs.h"
16174 #include <sys/types.h>
16175 #include <sys/time.h>
16181 if ((struct tm *) 0)
16187 rm -f conftest.$ac_objext
16188 if { (eval echo "$as_me:16188: \"$ac_compile\"") >&5
16189 (eval $ac_compile) 2>&5
16191 echo "$as_me:16191: \$? = $ac_status" >&5
16192 (exit $ac_status); } &&
16193 { ac_try='test -s conftest.$ac_objext'
16194 { (eval echo "$as_me:16194: \"$ac_try\"") >&5
16195 (eval $ac_try) 2>&5
16197 echo "$as_me:16197: \$? = $ac_status" >&5
16198 (exit $ac_status); }; }; then
16199 ac_cv_header_time=yes
16201 echo "$as_me: failed program was:" >&5
16202 cat conftest.$ac_ext >&5
16203 ac_cv_header_time=no
16205 rm -f conftest.$ac_objext conftest.$ac_ext
16207 echo "$as_me:16207: result: $ac_cv_header_time" >&5
16208 echo "${ECHO_T}$ac_cv_header_time" >&6
16209 if test $ac_cv_header_time = yes; then
16211 cat >>confdefs.h <<\EOF
16212 #define TIME_WITH_SYS_TIME 1
16217 ### checks for compiler characteristics
16219 ac_cpp='$CPP $CPPFLAGS'
16220 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16221 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16222 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16223 ac_main_return=return
16225 echo "$as_me:16225: checking for an ANSI C-conforming const" >&5
16226 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16227 if test "${ac_cv_c_const+set}" = set; then
16228 echo $ECHO_N "(cached) $ECHO_C" >&6
16230 cat >conftest.$ac_ext <<_ACEOF
16231 #line 16231 "configure"
16232 #include "confdefs.h"
16237 /* FIXME: Include the comments suggested by Paul. */
16238 #ifndef __cplusplus
16239 /* Ultrix mips cc rejects this. */
16240 typedef int charset[2];
16242 /* SunOS 4.1.1 cc rejects this. */
16243 char const *const *ccp;
16245 /* NEC SVR4.0.2 mips cc rejects this. */
16246 struct point {int x, y;};
16247 static struct point const zero = {0,0};
16248 /* AIX XL C 1.02.0.0 rejects this.
16249 It does not let you subtract one const X* pointer from another in
16250 an arm of an if-expression whose if-part is not a constant
16252 const char *g = "string";
16253 ccp = &g + (g ? g-g : 0);
16254 /* HPUX 7.0 cc rejects these. */
16257 ccp = (char const *const *) p;
16258 { /* SCO 3.2v4 cc rejects this. */
16260 char const *s = 0 ? (char *) 0 : (char const *) 0;
16264 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16265 int x[] = {25, 17};
16266 const int *foo = &x[0];
16269 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16270 typedef const int *iptr;
16274 { /* AIX XL C 1.02.0.0 rejects this saying
16275 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16276 struct s { int j; const int *ap[3]; };
16277 struct s *b; b->j = 5;
16279 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16280 const int foo = 10;
16288 rm -f conftest.$ac_objext
16289 if { (eval echo "$as_me:16289: \"$ac_compile\"") >&5
16290 (eval $ac_compile) 2>&5
16292 echo "$as_me:16292: \$? = $ac_status" >&5
16293 (exit $ac_status); } &&
16294 { ac_try='test -s conftest.$ac_objext'
16295 { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16298 echo "$as_me:16298: \$? = $ac_status" >&5
16299 (exit $ac_status); }; }; then
16302 echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16306 rm -f conftest.$ac_objext conftest.$ac_ext
16308 echo "$as_me:16308: result: $ac_cv_c_const" >&5
16309 echo "${ECHO_T}$ac_cv_c_const" >&6
16310 if test $ac_cv_c_const = no; then
16312 cat >>confdefs.h <<\EOF
16318 ### Checks for external-data
16320 echo "$as_me:16320: checking if data-only library module links" >&5
16321 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16322 if test "${cf_cv_link_dataonly+set}" = set; then
16323 echo $ECHO_N "(cached) $ECHO_C" >&6
16327 cat >conftest.$ac_ext <<EOF
16328 #line 16328 "configure"
16329 int testdata[3] = { 123, 456, 789 };
16331 if { (eval echo "$as_me:16331: \"$ac_compile\"") >&5
16332 (eval $ac_compile) 2>&5
16334 echo "$as_me:16334: \$? = $ac_status" >&5
16335 (exit $ac_status); } ; then
16336 mv conftest.o data.o && \
16337 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16339 rm -f conftest.$ac_ext data.o
16340 cat >conftest.$ac_ext <<EOF
16341 #line 16341 "configure"
16345 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16347 extern int testdata[3];
16348 return testdata[0] == 123
16349 && testdata[1] == 456
16350 && testdata[2] == 789;
16354 if { (eval echo "$as_me:16354: \"$ac_compile\"") >&5
16355 (eval $ac_compile) 2>&5
16357 echo "$as_me:16357: \$? = $ac_status" >&5
16358 (exit $ac_status); }; then
16359 mv conftest.o func.o && \
16360 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16362 rm -f conftest.$ac_ext func.o
16363 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16364 cf_saveLIBS="$LIBS"
16365 LIBS="conftest.a $LIBS"
16366 if test "$cross_compiling" = yes; then
16367 cf_cv_link_dataonly=unknown
16369 cat >conftest.$ac_ext <<_ACEOF
16370 #line 16370 "configure"
16371 #include "confdefs.h"
16375 extern int testfunc();
16376 ${cf_cv_main_return:-return} (!testfunc());
16380 rm -f conftest$ac_exeext
16381 if { (eval echo "$as_me:16381: \"$ac_link\"") >&5
16382 (eval $ac_link) 2>&5
16384 echo "$as_me:16384: \$? = $ac_status" >&5
16385 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16386 { (eval echo "$as_me:16386: \"$ac_try\"") >&5
16387 (eval $ac_try) 2>&5
16389 echo "$as_me:16389: \$? = $ac_status" >&5
16390 (exit $ac_status); }; }; then
16391 cf_cv_link_dataonly=yes
16393 echo "$as_me: program exited with status $ac_status" >&5
16394 echo "$as_me: failed program was:" >&5
16395 cat conftest.$ac_ext >&5
16396 cf_cv_link_dataonly=no
16398 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16400 LIBS="$cf_saveLIBS"
16404 echo "$as_me:16404: result: $cf_cv_link_dataonly" >&5
16405 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16407 if test "$cf_cv_link_dataonly" = no ; then
16409 cat >>confdefs.h <<\EOF
16410 #define BROKEN_LINKER 1
16416 ### Checks for library functions.
16422 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16423 echo "$as_me:16423: checking for $ac_header" >&5
16424 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16425 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16426 echo $ECHO_N "(cached) $ECHO_C" >&6
16428 cat >conftest.$ac_ext <<_ACEOF
16429 #line 16429 "configure"
16430 #include "confdefs.h"
16431 #include <$ac_header>
16433 if { (eval echo "$as_me:16433: \"$ac_cpp conftest.$ac_ext\"") >&5
16434 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16436 egrep -v '^ *\+' conftest.er1 >conftest.err
16438 cat conftest.err >&5
16439 echo "$as_me:16439: \$? = $ac_status" >&5
16440 (exit $ac_status); } >/dev/null; then
16441 if test -s conftest.err; then
16442 ac_cpp_err=$ac_c_preproc_warn_flag
16449 if test -z "$ac_cpp_err"; then
16450 eval "$as_ac_Header=yes"
16452 echo "$as_me: failed program was:" >&5
16453 cat conftest.$ac_ext >&5
16454 eval "$as_ac_Header=no"
16456 rm -f conftest.err conftest.$ac_ext
16458 echo "$as_me:16458: result: `eval echo '${'$as_ac_Header'}'`" >&5
16459 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16460 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16461 cat >>confdefs.h <<EOF
16462 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16468 echo "$as_me:16468: checking for working mkstemp" >&5
16469 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16470 if test "${cf_cv_func_mkstemp+set}" = set; then
16471 echo $ECHO_N "(cached) $ECHO_C" >&6
16475 if test "$cross_compiling" = yes; then
16476 cf_cv_func_mkstemp=maybe
16478 cat >conftest.$ac_ext <<_ACEOF
16479 #line 16479 "configure"
16480 #include "confdefs.h"
16482 #include <sys/types.h>
16483 #ifdef HAVE_UNISTD_H
16484 #include <unistd.h>
16486 #include <stdlib.h>
16488 #include <string.h>
16489 #include <sys/stat.h>
16492 char *tmpl = "conftestXXXXXX";
16500 for (n = 0; n < 2; ++n) {
16501 strcpy(name[n], tmpl);
16502 if ((fd = mkstemp(name[n])) >= 0) {
16503 if (!strcmp(name[n], tmpl)
16504 || stat(name[n], &sb) != 0
16505 || (sb.st_mode & S_IFMT) != S_IFREG
16506 || (sb.st_mode & 077) != 0) {
16513 && !strcmp(name[0], name[1]))
16515 ${cf_cv_main_return:-return}(result);
16519 rm -f conftest$ac_exeext
16520 if { (eval echo "$as_me:16520: \"$ac_link\"") >&5
16521 (eval $ac_link) 2>&5
16523 echo "$as_me:16523: \$? = $ac_status" >&5
16524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16525 { (eval echo "$as_me:16525: \"$ac_try\"") >&5
16526 (eval $ac_try) 2>&5
16528 echo "$as_me:16528: \$? = $ac_status" >&5
16529 (exit $ac_status); }; }; then
16530 cf_cv_func_mkstemp=yes
16533 echo "$as_me: program exited with status $ac_status" >&5
16534 echo "$as_me: failed program was:" >&5
16535 cat conftest.$ac_ext >&5
16536 cf_cv_func_mkstemp=no
16539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16543 echo "$as_me:16543: result: $cf_cv_func_mkstemp" >&5
16544 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16545 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16546 echo "$as_me:16546: checking for mkstemp" >&5
16547 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16548 if test "${ac_cv_func_mkstemp+set}" = set; then
16549 echo $ECHO_N "(cached) $ECHO_C" >&6
16551 cat >conftest.$ac_ext <<_ACEOF
16552 #line 16552 "configure"
16553 #include "confdefs.h"
16554 #define mkstemp autoconf_temporary
16555 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16562 /* We use char because int might match the return type of a gcc2
16563 builtin and then its argument prototype would still apply. */
16564 char mkstemp (void);
16570 /* The GNU C library defines stubs for functions which it implements
16571 to always fail with ENOSYS. Some functions are actually named
16572 something starting with __ and the normal name is an alias. */
16573 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16574 #error found stub for mkstemp
16582 rm -f conftest.$ac_objext conftest$ac_exeext
16583 if { (eval echo "$as_me:16583: \"$ac_link\"") >&5
16584 (eval $ac_link) 2>&5
16586 echo "$as_me:16586: \$? = $ac_status" >&5
16587 (exit $ac_status); } &&
16588 { ac_try='test -s conftest$ac_exeext'
16589 { (eval echo "$as_me:16589: \"$ac_try\"") >&5
16590 (eval $ac_try) 2>&5
16592 echo "$as_me:16592: \$? = $ac_status" >&5
16593 (exit $ac_status); }; }; then
16594 ac_cv_func_mkstemp=yes
16596 echo "$as_me: failed program was:" >&5
16597 cat conftest.$ac_ext >&5
16598 ac_cv_func_mkstemp=no
16600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16602 echo "$as_me:16602: result: $ac_cv_func_mkstemp" >&5
16603 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16606 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16608 cat >>confdefs.h <<\EOF
16609 #define HAVE_MKSTEMP 1
16614 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16615 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16616 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16620 if test "$cf_with_ada" != "no" ; then
16622 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16625 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16627 unset ac_cv_path_cf_TEMP_gnat
16629 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16630 set dummy $cf_prog_gnat; ac_word=$2
16631 echo "$as_me:16631: checking for $ac_word" >&5
16632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16633 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16634 echo $ECHO_N "(cached) $ECHO_C" >&6
16636 case $cf_TEMP_gnat in
16638 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16641 ac_save_IFS=$IFS; IFS=$ac_path_separator
16643 for ac_dir in $ac_dummy; do
16645 test -z "$ac_dir" && ac_dir=.
16646 if $as_executable_p "$ac_dir/$ac_word"; then
16647 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16648 echo "$as_me:16648: found $ac_dir/$ac_word" >&5
16653 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16657 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16659 if test -n "$cf_TEMP_gnat"; then
16660 echo "$as_me:16660: result: $cf_TEMP_gnat" >&5
16661 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16663 echo "$as_me:16663: result: no" >&5
16664 echo "${ECHO_T}no" >&6
16667 eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
16669 if test "x$cf_TEMP_gnat" != xno; then
16670 unset cf_cv_gnat_version
16673 echo "$as_me:16673: checking for $cf_prog_gnat version" >&5
16674 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16675 if test "${cf_cv_gnat_version+set}" = set; then
16676 echo $ECHO_N "(cached) $ECHO_C" >&6
16679 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
16680 grep '[0-9].[0-9][0-9]*' |\
16681 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16684 echo "$as_me:16684: result: $cf_cv_gnat_version" >&5
16685 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16686 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16687 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
16690 eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
16693 unset cf_cv_gnat_version
16694 unset ac_cv_path_cf_TEMP_gnat
16697 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
16699 cf_cv_prog_gnat_correct=no
16701 cf_ada_make=gnatmake
16702 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
16703 # gprconfig is newer than gnatmake; we can continue...
16706 rm -rf conftest* *~conftest*
16707 if mkdir conftest.src
16711 for cf_gprconfig in Ada C
16713 echo "$as_me:16713: checking for gprconfig name for $cf_gprconfig" >&5
16714 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
16715 if test $cf_gprconfig = C
16717 for cf_gprconfig_param in \
16718 $cf_gprconfig,,,,GNATGCC \
16719 $cf_gprconfig,,,,GCC \
16722 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16723 test -n "$cf_gprconfig_value" && break
16726 cf_gprconfig_param=$cf_gprconfig
16727 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16729 if test -n "$cf_gprconfig_value"
16731 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
16732 echo "$as_me:16732: result: $cf_gprconfig_value" >&5
16733 echo "${ECHO_T}$cf_gprconfig_value" >&6
16735 echo "$as_me:16735: result: missing" >&5
16736 echo "${ECHO_T}missing" >&6
16742 rm -rf conftest* *~conftest*
16745 if test "x$cf_ada_config" != "x#"
16748 echo "$as_me:16748: checking for gnat version" >&5
16749 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16750 if test "${cf_cv_gnat_version+set}" = set; then
16751 echo $ECHO_N "(cached) $ECHO_C" >&6
16754 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
16755 grep '[0-9].[0-9][0-9]*' |\
16756 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16759 echo "$as_me:16759: result: $cf_cv_gnat_version" >&5
16760 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16761 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16763 case $cf_cv_gnat_version in
16764 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16765 cf_cv_prog_gnat_correct=yes
16768 { echo "$as_me:16768: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
16769 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
16770 cf_cv_prog_gnat_correct=no
16774 # Extract the first word of "m4", so it can be a program name with args.
16775 set dummy m4; ac_word=$2
16776 echo "$as_me:16776: checking for $ac_word" >&5
16777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16778 if test "${ac_cv_prog_M4_exists+set}" = set; then
16779 echo $ECHO_N "(cached) $ECHO_C" >&6
16781 if test -n "$M4_exists"; then
16782 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16784 ac_save_IFS=$IFS; IFS=$ac_path_separator
16786 for ac_dir in $ac_dummy; do
16788 test -z "$ac_dir" && ac_dir=.
16789 $as_executable_p "$ac_dir/$ac_word" || continue
16790 ac_cv_prog_M4_exists="yes"
16791 echo "$as_me:16791: found $ac_dir/$ac_word" >&5
16795 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16798 M4_exists=$ac_cv_prog_M4_exists
16799 if test -n "$M4_exists"; then
16800 echo "$as_me:16800: result: $M4_exists" >&5
16801 echo "${ECHO_T}$M4_exists" >&6
16803 echo "$as_me:16803: result: no" >&5
16804 echo "${ECHO_T}no" >&6
16807 if test "$ac_cv_prog_M4_exists" = no; then
16808 cf_cv_prog_gnat_correct=no
16809 { echo "$as_me:16809: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
16810 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
16812 if test "$cf_cv_prog_gnat_correct" = yes; then
16813 echo "$as_me:16813: checking if GNAT works" >&5
16814 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16816 rm -rf conftest* *~conftest*
16817 cat >>conftest.ads <<CF_EOF
16818 procedure conftest;
16820 cat >>conftest.adb <<CF_EOF
16823 procedure conftest is
16825 Text_IO.Put ("Hello World");
16827 GNAT.OS_Lib.OS_Exit (0);
16830 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16831 if ( ./conftest 1>&5 2>&1 ) ; then
16832 cf_cv_prog_gnat_correct=yes
16834 cf_cv_prog_gnat_correct=no
16837 cf_cv_prog_gnat_correct=no
16839 rm -rf conftest* *~conftest*
16841 echo "$as_me:16841: result: $cf_cv_prog_gnat_correct" >&5
16842 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16845 cf_cv_prog_gnat_correct=no
16849 if test "$cf_cv_prog_gnat_correct" = yes; then
16851 echo "$as_me:16851: checking optimization options for ADAFLAGS" >&5
16852 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
16856 ADAFLAGS="$ADAFLAGS -g"
16862 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
16864 ADAFLAGS="$ADAFLAGS $cf_O_flag"
16868 echo "$as_me:16868: result: $ADAFLAGS" >&5
16869 echo "${ECHO_T}$ADAFLAGS" >&6
16871 echo "$as_me:16871: checking if GNATPREP supports -T option" >&5
16872 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
16873 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
16874 echo $ECHO_N "(cached) $ECHO_C" >&6
16877 cf_cv_gnatprep_opt_t=no
16878 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
16881 echo "$as_me:16881: result: $cf_cv_gnatprep_opt_t" >&5
16882 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
16883 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
16885 echo "$as_me:16885: checking if GNAT supports generics" >&5
16886 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
16887 case $cf_cv_gnat_version in
16888 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16889 cf_gnat_generics=yes
16892 cf_gnat_generics=no
16895 echo "$as_me:16895: result: $cf_gnat_generics" >&5
16896 echo "${ECHO_T}$cf_gnat_generics" >&6
16898 if test "$cf_gnat_generics" = yes
16900 cf_compile_generics=generics
16901 cf_generic_objects="\${GENOBJS}"
16903 cf_compile_generics=
16904 cf_generic_objects=
16907 echo "$as_me:16907: checking if GNAT supports SIGINT" >&5
16908 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
16909 if test "${cf_cv_gnat_sigint+set}" = set; then
16910 echo $ECHO_N "(cached) $ECHO_C" >&6
16913 rm -rf conftest* *~conftest*
16914 cat >>conftest.ads <<CF_EOF
16915 with Ada.Interrupts.Names;
16917 package ConfTest is
16919 pragma Warnings (Off); -- the next pragma exists since 3.11p
16920 pragma Unreserve_All_Interrupts;
16921 pragma Warnings (On);
16923 protected Process is
16925 function Continue return Boolean;
16926 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
16928 Done : Boolean := False;
16933 cat >>conftest.adb <<CF_EOF
16934 package body ConfTest is
16935 protected body Process is
16940 function Continue return Boolean is
16947 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16948 cf_cv_gnat_sigint=yes
16950 cf_cv_gnat_sigint=no
16952 rm -rf conftest* *~conftest*
16955 echo "$as_me:16955: result: $cf_cv_gnat_sigint" >&5
16956 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
16958 if test $cf_cv_gnat_sigint = yes ; then
16961 USE_GNAT_SIGINT="#"
16964 cf_gnat_libraries=no
16965 cf_gnat_projects=no
16967 if test "$enable_gnat_projects" != no ; then
16968 echo "$as_me:16968: checking if GNAT supports project files" >&5
16969 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
16970 case $cf_cv_gnat_version in
16974 case $cf_cv_system_name in
16978 rm -rf conftest* *~conftest*
16979 if mkdir conftest.src conftest.bin conftest.lib
16982 rm -rf conftest* *~conftest*
16983 cat >>library.gpr <<CF_EOF
16985 Kind := External ("LIB_KIND");
16986 for Library_Name use "ConfTest";
16987 for Object_Dir use ".";
16988 for Library_ALI_Dir use External("LIBRARY_DIR");
16989 for Library_Version use External ("SONAME");
16990 for Library_Kind use Kind;
16991 for Library_Dir use External("BUILD_DIR");
16992 Source_Dir := External ("SOURCE_DIR");
16993 for Source_Dirs use (Source_Dir);
16996 cat >>confpackage.ads <<CF_EOF
16997 package ConfPackage is
16998 procedure conftest;
17001 cat >>confpackage.adb <<CF_EOF
17003 package body ConfPackage is
17004 procedure conftest is
17006 Text_IO.Put ("Hello World");
17011 if ( $cf_ada_make $ADAFLAGS \
17013 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
17014 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
17015 -XSOURCE_DIR=`pwd` \
17016 -XSONAME=libConfTest.so.1 \
17017 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17018 cf_gnat_projects=yes
17022 if test -f conftest.lib/confpackage.ali
17024 cf_gnat_libraries=yes
17026 rm -rf conftest* *~conftest*
17031 echo "$as_me:17031: result: $cf_gnat_projects" >&5
17032 echo "${ECHO_T}$cf_gnat_projects" >&6
17033 fi # enable_gnat_projects
17035 if test $cf_gnat_projects = yes
17037 echo "$as_me:17037: checking if GNAT supports libraries" >&5
17038 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17039 echo "$as_me:17039: result: $cf_gnat_libraries" >&5
17040 echo "${ECHO_T}$cf_gnat_libraries" >&6
17043 if test "$cf_gnat_projects" = yes
17045 USE_OLD_MAKERULES="#"
17046 USE_GNAT_PROJECTS=""
17048 USE_OLD_MAKERULES=""
17049 USE_GNAT_PROJECTS="#"
17052 if test "$cf_gnat_libraries" = yes
17054 USE_GNAT_LIBRARIES=""
17056 USE_GNAT_LIBRARIES="#"
17059 echo "$as_me:17059: checking for ada-compiler" >&5
17060 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17062 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17063 if test "${with_ada_compiler+set}" = set; then
17064 withval="$with_ada_compiler"
17065 cf_ada_compiler=$withval
17067 cf_ada_compiler=gnatmake
17070 echo "$as_me:17070: result: $cf_ada_compiler" >&5
17071 echo "${ECHO_T}$cf_ada_compiler" >&6
17073 cf_ada_package=terminal_interface
17075 echo "$as_me:17075: checking for ada-include" >&5
17076 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17078 # Check whether --with-ada-include or --without-ada-include was given.
17079 if test "${with_ada_include+set}" = set; then
17080 withval="$with_ada_include"
17083 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17084 fi; if test -n "$prefix/share/ada/adainclude" ; then
17086 if test "x$prefix" != xNONE; then
17087 cf_path_syntax="$prefix"
17089 cf_path_syntax="$ac_default_prefix"
17092 case ".$withval" in
17093 (.\$\(*\)*|.\'*\'*)
17097 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17099 (.\${*prefix}*|.\${*dir}*)
17100 eval withval="$withval"
17101 case ".$withval" in
17103 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17108 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17111 { { echo "$as_me:17111: error: expected a pathname, not \"$withval\"" >&5
17112 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17113 { (exit 1); exit 1; }; }
17118 eval ADA_INCLUDE="$withval"
17120 echo "$as_me:17120: result: $ADA_INCLUDE" >&5
17121 echo "${ECHO_T}$ADA_INCLUDE" >&6
17123 echo "$as_me:17123: checking for ada-objects" >&5
17124 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17126 # Check whether --with-ada-objects or --without-ada-objects was given.
17127 if test "${with_ada_objects+set}" = set; then
17128 withval="$with_ada_objects"
17131 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17132 fi; if test -n "$prefix/lib/ada/adalib" ; then
17134 if test "x$prefix" != xNONE; then
17135 cf_path_syntax="$prefix"
17137 cf_path_syntax="$ac_default_prefix"
17140 case ".$withval" in
17141 (.\$\(*\)*|.\'*\'*)
17145 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17147 (.\${*prefix}*|.\${*dir}*)
17148 eval withval="$withval"
17149 case ".$withval" in
17151 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17156 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17159 { { echo "$as_me:17159: error: expected a pathname, not \"$withval\"" >&5
17160 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17161 { (exit 1); exit 1; }; }
17166 eval ADA_OBJECTS="$withval"
17168 echo "$as_me:17168: result: $ADA_OBJECTS" >&5
17169 echo "${ECHO_T}$ADA_OBJECTS" >&6
17171 echo "$as_me:17171: checking if an Ada95 shared-library should be built" >&5
17172 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17174 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17175 if test "${with_ada_sharedlib+set}" = set; then
17176 withval="$with_ada_sharedlib"
17177 with_ada_sharedlib=$withval
17179 with_ada_sharedlib=no
17181 echo "$as_me:17181: result: $with_ada_sharedlib" >&5
17182 echo "${ECHO_T}$with_ada_sharedlib" >&6
17184 if test "x$with_ada_sharedlib" != xno
17186 if test "x$cf_gnat_projects" != xyes
17188 { echo "$as_me:17188: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17189 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17190 with_ada_sharedlib=no
17194 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17195 MAKE_ADA_SHAREDLIB="#"
17197 if test "x$with_ada_sharedlib" != xno
17199 MAKE_ADA_SHAREDLIB=
17200 if test "x$with_ada_sharedlib" != xyes
17202 ADA_SHAREDLIB="$with_ada_sharedlib"
17206 # allow the Ada binding to be renamed
17208 echo "$as_me:17208: checking for ada-libname" >&5
17209 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17211 # Check whether --with-ada-libname or --without-ada-libname was given.
17212 if test "${with_ada_libname+set}" = set; then
17213 withval="$with_ada_libname"
17214 ADA_LIBNAME=$withval
17216 ADA_LIBNAME=AdaCurses
17218 case "x$ADA_LIBNAME" in
17220 ADA_LIBNAME=AdaCurses
17224 echo "$as_me:17224: result: $ADA_LIBNAME" >&5
17225 echo "${ECHO_T}$ADA_LIBNAME" >&6
17228 { { echo "$as_me:17228: error: No usable Ada compiler found" >&5
17229 echo "$as_me: error: No usable Ada compiler found" >&2;}
17230 { (exit 1); exit 1; }; }
17233 { { echo "$as_me:17233: error: The Ada compiler is needed for this package" >&5
17234 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17235 { (exit 1); exit 1; }; }
17238 ################################################################################
17245 ### Construct the list of include-directories to be generated
17247 if test "$srcdir" != "."; then
17248 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17250 CPPFLAGS="-I../include $CPPFLAGS"
17251 if test "$srcdir" != "."; then
17252 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17254 CPPFLAGS="-I. $CPPFLAGS"
17256 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17257 if test "$srcdir" != "."; then
17258 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17260 if test "$GCC" != yes; then
17261 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17262 elif test "$includedir" != "/usr/include"; then
17263 if test "$includedir" = '${prefix}/include' ; then
17264 if test x$prefix != x/usr ; then
17265 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17268 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17272 ### Build up pieces for makefile rules
17273 echo "$as_me:17273: checking default library suffix" >&5
17274 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17276 case $DFT_LWR_MODEL in
17277 (libtool) DFT_ARG_SUFFIX='' ;;
17278 (normal) DFT_ARG_SUFFIX='' ;;
17279 (debug) DFT_ARG_SUFFIX='_g' ;;
17280 (profile) DFT_ARG_SUFFIX='_p' ;;
17281 (shared) DFT_ARG_SUFFIX='' ;;
17283 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17284 echo "$as_me:17284: result: $DFT_ARG_SUFFIX" >&5
17285 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17287 echo "$as_me:17287: checking default library-dependency suffix" >&5
17288 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17290 case X$DFT_LWR_MODEL in
17292 DFT_LIB_SUFFIX='.la'
17293 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17296 case $cf_cv_system_name in
17298 DFT_LIB_SUFFIX='_g.lib'
17301 DFT_LIB_SUFFIX='_g.a'
17304 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17307 case $cf_cv_system_name in
17309 DFT_LIB_SUFFIX='_p.lib'
17312 DFT_LIB_SUFFIX='_p.a'
17315 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17318 case $cf_cv_system_name in
17320 DFT_LIB_SUFFIX='.so'
17321 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17324 DFT_LIB_SUFFIX='.dll'
17325 DFT_DEP_SUFFIX='.dll.lib'
17327 (cygwin*|msys*|mingw*)
17328 DFT_LIB_SUFFIX='.dll'
17329 DFT_DEP_SUFFIX='.dll.a'
17332 DFT_LIB_SUFFIX='.dylib'
17333 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17338 DFT_LIB_SUFFIX='.so'
17339 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17342 DFT_LIB_SUFFIX='.sl'
17343 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17348 DFT_LIB_SUFFIX='.so'
17349 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17356 DFT_LIB_SUFFIX='.lib'
17359 DFT_LIB_SUFFIX='.a'
17362 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17365 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17367 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17368 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17370 echo "$as_me:17370: result: $DFT_DEP_SUFFIX" >&5
17371 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17373 echo "$as_me:17373: checking default object directory" >&5
17374 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17376 case $DFT_LWR_MODEL in
17377 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17378 (normal) DFT_OBJ_SUBDIR='objects' ;;
17379 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17380 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17382 case $cf_cv_system_name in
17384 DFT_OBJ_SUBDIR='objects' ;;
17386 DFT_OBJ_SUBDIR='obj_s' ;;
17389 echo "$as_me:17389: result: $DFT_OBJ_SUBDIR" >&5
17390 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17392 ### Set up low-level terminfo dependencies for makefiles.
17394 if test "$DFT_LWR_MODEL" = shared ; then
17395 case $cf_cv_system_name in
17397 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17400 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17405 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17407 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17409 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17411 ### Construct the list of subdirectories for which we'll customize makefiles
17412 ### with the appropriate compile-rules.
17414 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17416 cat >>confdefs.h <<EOF
17417 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17420 ################################################################################
17426 NCURSES_SHLIB2="sh -c"
17428 ADA_SUBDIRS="include gen src doc"
17429 if test "x$cf_with_tests" != "xno" ; then
17430 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17432 for cf_dir in $ADA_SUBDIRS
17434 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17441 # match layout used by make-tar.sh
17442 ADAHTML_DIR=../doc/ada
17444 if test "x$cross_compiling" = xyes ; then
17445 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17447 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17450 ac_config_files="$ac_config_files $SUB_MAKEFILES src/library.gpr:src/library.gpr.in doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in Makefile"
17451 ac_config_commands="$ac_config_commands default"
17452 cat >confcache <<\_ACEOF
17453 # This file is a shell script that caches the results of configure
17454 # tests run on this system so they can be shared between configure
17455 # scripts and configure runs, see configure's option --config-cache.
17456 # It is not useful on other systems. If it contains results you don't
17457 # want to keep, you may remove or edit it.
17459 # config.status only pays attention to the cache file if you give it
17460 # the --recheck option to rerun configure.
17462 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17463 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17464 # following values.
17468 # The following way of writing the cache mishandles newlines in values,
17469 # but we know of no workaround that is simple, portable, and efficient.
17470 # So, don't put newlines in cache variables' values.
17471 # Ultrix sh set writes to stderr and can't be redirected directly,
17472 # and sets the high bit in the cache file unless we assign to the vars.
17475 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17477 # `set' does not quote correctly, so add quotes (double-quote
17478 # substitution turns \\\\ into \\, and sed turns \\ into \).
17481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17484 # `set' quotes correctly as required by POSIX, so do not add quotes.
17486 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17493 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17495 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17497 if cmp -s $cache_file confcache; then :; else
17498 if test -w $cache_file; then
17499 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17500 cat confcache >$cache_file
17502 echo "not updating unwritable cache $cache_file"
17507 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17508 # Let make expand exec_prefix.
17509 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17511 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17512 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17513 # trailing colons and then remove the whole line if VPATH becomes empty
17514 # (actually we leave an empty line to preserve line numbers).
17515 if test "x$srcdir" = x.; then
17516 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17517 s/:*\$(srcdir):*/:/;
17518 s/:*\${srcdir}:*/:/;
17520 s/^\([^=]*=[ ]*\):*/\1/;
17526 DEFS=-DHAVE_CONFIG_H
17528 : ${CONFIG_STATUS=./config.status}
17529 ac_clean_files_save=$ac_clean_files
17530 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17531 { echo "$as_me:17531: creating $CONFIG_STATUS" >&5
17532 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17533 cat >$CONFIG_STATUS <<_ACEOF
17535 # Generated automatically by configure.
17536 # Run this file to recreate the current configuration.
17537 # Compiler output produced by configure, useful for debugging
17538 # configure, is in config.log if it exists.
17541 SHELL=\${CONFIG_SHELL-$SHELL}
17542 ac_cs_invocation="\$0 \$@"
17544 CLICOLOR_FORCE= GREP_OPTIONS=
17545 unset CLICOLOR_FORCE GREP_OPTIONS
17548 cat >>$CONFIG_STATUS <<\_ACEOF
17549 # Be Bourne compatible
17550 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17553 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17557 # Name of the executable.
17558 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17560 if expr a : '\(a\)' >/dev/null 2>&1; then
17566 rm -f conf$$ conf$$.exe conf$$.file
17568 if ln -s conf$$.file conf$$ 2>/dev/null; then
17569 # We could just check for DJGPP; but this test a) works b) is more generic
17570 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17571 if test -f conf$$.exe; then
17572 # Don't use ln at all; we don't have any links
17577 elif ln conf$$.file conf$$ 2>/dev/null; then
17582 rm -f conf$$ conf$$.exe conf$$.file
17584 as_executable_p="test -f"
17586 # Support unset when possible.
17587 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17594 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17595 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17596 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17597 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17598 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17599 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17600 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17601 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17604 # We need space, tab and new line, in precisely that order.
17610 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17616 # Files that config.status was made for.
17617 if test -n "$ac_config_files"; then
17618 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17621 if test -n "$ac_config_headers"; then
17622 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17625 if test -n "$ac_config_links"; then
17626 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17629 if test -n "$ac_config_commands"; then
17630 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17633 cat >>$CONFIG_STATUS <<\EOF
17636 \`$as_me' instantiates files from templates according to the
17637 current configuration.
17639 Usage: $0 [OPTIONS] [FILE]...
17641 -h, --help print this help, then exit
17642 -V, --version print version number, then exit
17643 -d, --debug don't remove temporary files
17644 --recheck update $as_me by reconfiguring in the same conditions
17645 --file=FILE[:TEMPLATE]
17646 instantiate the configuration file FILE
17647 --header=FILE[:TEMPLATE]
17648 instantiate the configuration header FILE
17650 Configuration files:
17653 Configuration headers:
17656 Configuration commands:
17659 Report bugs to <dickey@invisible-island.net>."
17662 cat >>$CONFIG_STATUS <<EOF
17665 configured by $0, generated by GNU Autoconf 2.52.20200802,
17666 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17668 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17669 Free Software Foundation, Inc.
17670 This config.status script is free software; the Free Software Foundation
17671 gives unlimited permission to copy, distribute and modify it."
17676 cat >>$CONFIG_STATUS <<\EOF
17677 # If no file are specified by the user, then we need to provide default
17678 # value. By we need to know if files were specified by the user.
17684 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17685 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17687 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17691 *) # This is not an option, so the user has probably given explicit
17693 ac_need_defaults=false;;
17697 # Handling of the options.
17699 cat >>$CONFIG_STATUS <<EOF
17700 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17701 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17702 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17704 cat >>$CONFIG_STATUS <<\EOF
17705 --version | --vers* | -V )
17706 echo "$ac_cs_version"; exit 0 ;;
17708 # Conflict between --help and --header
17709 { { echo "$as_me:17709: error: ambiguous option: $1
17710 Try \`$0 --help' for more information." >&5
17711 echo "$as_me: error: ambiguous option: $1
17712 Try \`$0 --help' for more information." >&2;}
17713 { (exit 1); exit 1; }; };;
17714 --help | --hel | -h )
17715 echo "$ac_cs_usage"; exit 0 ;;
17716 --debug | --d* | -d )
17718 --file | --fil | --fi | --f )
17720 CONFIG_FILES="$CONFIG_FILES $1"
17721 ac_need_defaults=false;;
17722 --header | --heade | --head | --hea )
17724 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17725 ac_need_defaults=false;;
17727 # This is an error.
17728 -*) { { echo "$as_me:17728: error: unrecognized option: $1
17729 Try \`$0 --help' for more information." >&5
17730 echo "$as_me: error: unrecognized option: $1
17731 Try \`$0 --help' for more information." >&2;}
17732 { (exit 1); exit 1; }; } ;;
17734 *) ac_config_targets="$ac_config_targets $1" ;;
17743 ## ----------------------- ##
17744 ## Running config.status. ##
17745 ## ----------------------- ##
17747 This file was extended by $as_me 2.52.20200802, executed with
17748 CONFIG_FILES = $CONFIG_FILES
17749 CONFIG_HEADERS = $CONFIG_HEADERS
17750 CONFIG_LINKS = $CONFIG_LINKS
17751 CONFIG_COMMANDS = $CONFIG_COMMANDS
17752 > $ac_cs_invocation
17753 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17758 cat >>$CONFIG_STATUS <<EOF
17760 # INIT-COMMANDS section.
17763 ### Special initialization commands, used to pass information from the
17764 ### configuration-run into config.status
17767 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17768 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17769 LIB_NAME="$LIB_NAME"
17770 LIB_PREFIX="$LIB_PREFIX"
17771 LIB_SUFFIX="$LIB_SUFFIX"
17773 NCURSES_MAJOR="$NCURSES_MAJOR"
17774 NCURSES_MINOR="$NCURSES_MINOR"
17775 NCURSES_PATCH="$NCURSES_PATCH"
17776 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
17777 cf_cv_abi_version="$cf_cv_abi_version"
17778 cf_cv_rel_version="$cf_cv_rel_version"
17779 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17780 cf_cv_shared_soname='$cf_cv_shared_soname'
17781 cf_cv_shlib_version="$cf_cv_shlib_version"
17782 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17783 cf_cv_system_name="$cf_cv_system_name"
17789 cat >>$CONFIG_STATUS <<\EOF
17790 for ac_config_target in $ac_config_targets
17792 case "$ac_config_target" in
17793 # Handling of arguments.
17794 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17795 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
17796 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
17797 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17798 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17799 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17800 *) { { echo "$as_me:17800: error: invalid argument: $ac_config_target" >&5
17801 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17802 { (exit 1); exit 1; }; };;
17806 # If the user did not use the arguments to specify the items to instantiate,
17807 # then the envvar interface is used. Set only those that are not.
17808 # We use the long form for the default assignment because of an extremely
17809 # bizarre bug on SunOS 4.1.3.
17810 if $ac_need_defaults; then
17811 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17812 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17813 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17816 # Create a temporary directory, and hook for its removal unless debugging.
17819 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17820 trap '{ (exit 1); exit 1; }' 1 2 13 15
17823 # Create a (secure) tmp directory for tmp files.
17826 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17827 test -n "$tmp" && test -d "$tmp"
17830 tmp=$TMPDIR/cs$$-$RANDOM
17831 (umask 077 && mkdir $tmp)
17834 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17835 { (exit 1); exit 1; }
17840 cat >>$CONFIG_STATUS <<EOF
17843 # CONFIG_FILES section.
17846 # No need to generate the scripts if there are no CONFIG_FILES.
17847 # This happens for instance when ./config.status config.h
17848 if test -n "\$CONFIG_FILES"; then
17849 # Protect against being on the right side of a sed subst in config.status.
17850 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17851 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17852 s,@SHELL@,$SHELL,;t t
17853 s,@exec_prefix@,$exec_prefix,;t t
17854 s,@prefix@,$prefix,;t t
17855 s,@program_transform_name@,$program_transform_name,;t t
17856 s,@bindir@,$bindir,;t t
17857 s,@sbindir@,$sbindir,;t t
17858 s,@libexecdir@,$libexecdir,;t t
17859 s,@datarootdir@,$datarootdir,;t t
17860 s,@datadir@,$datadir,;t t
17861 s,@sysconfdir@,$sysconfdir,;t t
17862 s,@sharedstatedir@,$sharedstatedir,;t t
17863 s,@localstatedir@,$localstatedir,;t t
17864 s,@runstatedir@,$runstatedir,;t t
17865 s,@libdir@,$libdir,;t t
17866 s,@includedir@,$includedir,;t t
17867 s,@oldincludedir@,$oldincludedir,;t t
17868 s,@infodir@,$infodir,;t t
17869 s,@mandir@,$mandir,;t t
17870 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17871 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17872 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17873 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17874 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17875 s,@build_alias@,$build_alias,;t t
17876 s,@host_alias@,$host_alias,;t t
17877 s,@target_alias@,$target_alias,;t t
17878 s,@ECHO_C@,$ECHO_C,;t t
17879 s,@ECHO_N@,$ECHO_N,;t t
17880 s,@ECHO_T@,$ECHO_T,;t t
17881 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17882 s,@DEFS@,$DEFS,;t t
17883 s,@LIBS@,$LIBS,;t t
17884 s,@top_builddir@,$top_builddir,;t t
17885 s,@build@,$build,;t t
17886 s,@build_cpu@,$build_cpu,;t t
17887 s,@build_vendor@,$build_vendor,;t t
17888 s,@build_os@,$build_os,;t t
17889 s,@host@,$host,;t t
17890 s,@host_cpu@,$host_cpu,;t t
17891 s,@host_vendor@,$host_vendor,;t t
17892 s,@host_os@,$host_os,;t t
17893 s,@target@,$target,;t t
17894 s,@target_cpu@,$target_cpu,;t t
17895 s,@target_vendor@,$target_vendor,;t t
17896 s,@target_os@,$target_os,;t t
17898 s,@CFLAGS@,$CFLAGS,;t t
17899 s,@LDFLAGS@,$LDFLAGS,;t t
17900 s,@CPPFLAGS@,$CPPFLAGS,;t t
17901 s,@ac_ct_CC@,$ac_ct_CC,;t t
17902 s,@EXEEXT@,$EXEEXT,;t t
17903 s,@OBJEXT@,$OBJEXT,;t t
17904 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17907 s,@EGREP@,$EGREP,;t t
17908 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17909 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17910 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17911 s,@LN_S@,$LN_S,;t t
17912 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
17913 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
17914 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17915 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17916 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17917 s,@SET_MAKE@,$SET_MAKE,;t t
17918 s,@CTAGS@,$CTAGS,;t t
17919 s,@ETAGS@,$ETAGS,;t t
17920 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17921 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17922 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17923 s,@RANLIB@,$RANLIB,;t t
17924 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17926 s,@ac_ct_LD@,$ac_ct_LD,;t t
17928 s,@ac_ct_AR@,$ac_ct_AR,;t t
17929 s,@ARFLAGS@,$ARFLAGS,;t t
17930 s,@DESTDIR@,$DESTDIR,;t t
17931 s,@BUILD_CC@,$BUILD_CC,;t t
17932 s,@BUILD_CPP@,$BUILD_CPP,;t t
17933 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17934 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17935 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17936 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17937 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17938 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17939 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17940 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17941 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17942 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17943 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17944 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17945 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17946 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17947 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17948 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17949 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17950 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17951 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17952 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17953 s,@CC_G_OPT@,$CC_G_OPT,;t t
17954 s,@LD_MODEL@,$LD_MODEL,;t t
17955 s,@shlibdir@,$shlibdir,;t t
17956 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
17957 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17958 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17959 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17960 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17961 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
17962 s,@LINK_PROGS@,$LINK_PROGS,;t t
17963 s,@LINK_TESTS@,$LINK_TESTS,;t t
17964 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17965 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17966 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17967 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17968 s,@RPATH_LIST@,$RPATH_LIST,;t t
17969 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17970 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17971 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17972 s,@PTHREAD@,$PTHREAD,;t t
17973 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17974 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17975 s,@ECHO_LT@,$ECHO_LT,;t t
17976 s,@ECHO_LD@,$ECHO_LD,;t t
17977 s,@RULE_CC@,$RULE_CC,;t t
17978 s,@SHOW_CC@,$SHOW_CC,;t t
17979 s,@ECHO_CC@,$ECHO_CC,;t t
17980 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17981 s,@ADAFLAGS@,$ADAFLAGS,;t t
17982 s,@ADA_TRACE@,$ADA_TRACE,;t t
17983 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
17984 s,@M4_exists@,$M4_exists,;t t
17985 s,@cf_ada_make@,$cf_ada_make,;t t
17986 s,@cf_ada_config@,$cf_ada_config,;t t
17987 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
17988 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
17989 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
17990 s,@cf_compile_generics@,$cf_compile_generics,;t t
17991 s,@cf_generic_objects@,$cf_generic_objects,;t t
17992 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
17993 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
17994 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
17995 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
17996 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17997 s,@cf_ada_package@,$cf_ada_package,;t t
17998 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17999 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18000 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18001 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18002 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18003 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18004 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18005 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18006 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18007 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18008 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18009 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18010 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18011 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18012 s,@TEST_ARG2@,$TEST_ARG2,;t t
18013 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18014 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18015 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18016 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18017 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18018 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18019 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18024 cat >>$CONFIG_STATUS <<\EOF
18025 # Split the substitutions into bite-sized pieces for seds with
18026 # small command number limits, like on Digital OSF/1 and HP-UX.
18027 ac_max_sed_lines=48
18028 ac_sed_frag=1 # Number of current file.
18029 ac_beg=1 # First line for current file.
18030 ac_end=$ac_max_sed_lines # Line after last line for current file.
18033 while $ac_more_lines; do
18034 if test $ac_beg -gt 1; then
18035 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18037 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18039 if test ! -s $tmp/subs.frag; then
18040 ac_more_lines=false
18042 # The purpose of the label and of the branching condition is to
18043 # speed up the sed processing (if there are no `@' at all, there
18044 # is no need to browse any of the substitutions).
18045 # These are the two extra sed commands mentioned above.
18047 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18048 # It is possible to make a multiline substitution using escaped newlines.
18049 # Ensure that we do not split the substitution between script fragments.
18051 ac_END=`expr $ac_end + $ac_max_sed_lines`
18052 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18053 if test -s $tmp/subs.next; then
18054 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18055 if test ! -s $tmp/subs.edit; then
18056 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18057 if test ! -s $tmp/subs.edit; then
18058 if test $ac_beg -gt 1; then
18059 ac_end=`expr $ac_end - 1`
18066 if test -z "$ac_sed_cmds"; then
18067 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18069 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18071 ac_sed_frag=`expr $ac_sed_frag + 1`
18073 ac_end=`expr $ac_end + $ac_max_sed_lines`
18076 if test -z "$ac_sed_cmds"; then
18079 fi # test -n "$CONFIG_FILES"
18082 cat >>$CONFIG_STATUS <<\EOF
18083 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18084 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18086 - | *:- | *:-:* ) # input from stdin
18088 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18089 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18090 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18091 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18092 * ) ac_file_in=$ac_file.in ;;
18095 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18096 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18097 X"$ac_file" : 'X\(//\)[^/]' \| \
18098 X"$ac_file" : 'X\(//\)$' \| \
18099 X"$ac_file" : 'X\(/\)' \| \
18100 . : '\(.\)' 2>/dev/null ||
18102 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18103 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18104 /^X\(\/\/\)$/{ s//\1/; q; }
18105 /^X\(\/\).*/{ s//\1/; q; }
18107 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18108 { case "$ac_dir" in
18109 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18113 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18114 case $as_mkdir_dir in
18115 # Skip DOS drivespec
18116 ?:) as_incr_dir=$as_mkdir_dir ;;
18118 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18119 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18124 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18125 # A "../" for each directory in $ac_dir_suffix.
18126 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18128 ac_dir_suffix= ac_dots=
18133 if test -z "$ac_dots"; then
18136 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18138 [\\/]* | ?:[\\/]* )
18139 ac_srcdir=$srcdir$ac_dir_suffix;
18140 ac_top_srcdir=$srcdir ;;
18141 *) # Relative path.
18142 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18143 ac_top_srcdir=$ac_dots$srcdir ;;
18147 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18148 *) ac_INSTALL=$ac_dots$INSTALL ;;
18151 if test x"$ac_file" != x-; then
18152 { echo "$as_me:18152: creating $ac_file" >&5
18153 echo "$as_me: creating $ac_file" >&6;}
18156 # Let's still pretend it is `configure' which instantiates (i.e., don't
18157 # use $as_me), people would be surprised to read:
18158 # /* config.h. Generated automatically by config.status. */
18159 configure_input="Generated automatically from `echo $ac_file_in |
18160 sed 's,.*/,,'` by configure."
18162 # First look for the input files in the build tree, otherwise in the
18164 ac_file_inputs=`IFS=:
18165 for f in $ac_file_in; do
18167 -) echo $tmp/stdin ;;
18169 # Absolute (can't be DOS-style, as IFS=:)
18170 test -f "$f" || { { echo "$as_me:18170: error: cannot find input file: $f" >&5
18171 echo "$as_me: error: cannot find input file: $f" >&2;}
18172 { (exit 1); exit 1; }; }
18175 if test -f "$f"; then
18178 elif test -f "$srcdir/$f"; then
18183 { { echo "$as_me:18183: error: cannot find input file: $f" >&5
18184 echo "$as_me: error: cannot find input file: $f" >&2;}
18185 { (exit 1); exit 1; }; }
18188 done` || { (exit 1); exit 1; }
18190 cat >>$CONFIG_STATUS <<\EOF
18191 ac_warn_datarootdir=no
18192 if test x"$ac_file" != x-; then
18193 for ac_item in $ac_file_inputs
18195 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18196 if test -n "$ac_seen"; then
18197 ac_used=`grep '@datarootdir@' $ac_item`
18198 if test -z "$ac_used"; then
18199 { echo "$as_me:18199: WARNING: datarootdir was used implicitly but not set:
18201 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18203 ac_warn_datarootdir=yes
18206 ac_seen=`grep '${datarootdir}' $ac_item`
18207 if test -n "$ac_seen"; then
18208 { echo "$as_me:18208: WARNING: datarootdir was used explicitly but not set:
18210 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18212 ac_warn_datarootdir=yes
18217 if test "x$ac_warn_datarootdir" = xyes; then
18218 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18222 cat >>$CONFIG_STATUS <<EOF
18226 cat >>$CONFIG_STATUS <<\EOF
18228 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18229 s,@configure_input@,$configure_input,;t t
18230 s,@srcdir@,$ac_srcdir,;t t
18231 s,@top_srcdir@,$ac_top_srcdir,;t t
18232 s,@INSTALL@,$ac_INSTALL,;t t
18233 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18235 if test x"$ac_file" != x-; then
18236 cp $tmp/out $ac_file
18238 for ac_name in prefix exec_prefix datarootdir
18240 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18241 if test -n "$ac_seen"; then
18242 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18243 if test -z "$ac_init"; then
18244 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18245 { echo "$as_me:18245: WARNING: Variable $ac_name is used but was not set:
18247 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18252 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18253 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18254 if test -s $tmp/out; then
18255 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18256 { echo "$as_me:18256: WARNING: Some variables may not be substituted:
18258 echo "$as_me: WARNING: Some variables may not be substituted:
18268 cat >>$CONFIG_STATUS <<\EOF
18271 # CONFIG_HEADER section.
18274 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18275 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18277 # ac_d sets the value in "#define NAME VALUE" lines.
18278 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18279 ac_dB='[ ].*$,\1#\2'
18282 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18283 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18284 ac_iB='\([ ]\),\1#\2define\3'
18287 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18288 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18289 ac_uB='$,\1#\2define\3'
18293 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18294 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18296 - | *:- | *:-:* ) # input from stdin
18298 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18299 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18300 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18301 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18302 * ) ac_file_in=$ac_file.in ;;
18305 test x"$ac_file" != x- && { echo "$as_me:18305: creating $ac_file" >&5
18306 echo "$as_me: creating $ac_file" >&6;}
18308 # First look for the input files in the build tree, otherwise in the
18310 ac_file_inputs=`IFS=:
18311 for f in $ac_file_in; do
18313 -) echo $tmp/stdin ;;
18315 # Absolute (can't be DOS-style, as IFS=:)
18316 test -f "$f" || { { echo "$as_me:18316: error: cannot find input file: $f" >&5
18317 echo "$as_me: error: cannot find input file: $f" >&2;}
18318 { (exit 1); exit 1; }; }
18321 if test -f "$f"; then
18324 elif test -f "$srcdir/$f"; then
18329 { { echo "$as_me:18329: error: cannot find input file: $f" >&5
18330 echo "$as_me: error: cannot find input file: $f" >&2;}
18331 { (exit 1); exit 1; }; }
18334 done` || { (exit 1); exit 1; }
18335 # Remove the trailing spaces.
18336 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18340 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18341 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18342 # be either 'cat' or 'sort'.
18343 cat confdefs.h | uniq >conftest.vals
18345 # Break up conftest.vals because some shells have a limit on
18346 # the size of here documents, and old seds have small limits too.
18348 rm -f conftest.tail
18349 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18350 while grep . conftest.vals >/dev/null
18352 # Write chunks of a limited-size here document to conftest.frag.
18353 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18354 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18355 echo 'CEOF' >> $CONFIG_STATUS
18356 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18357 rm -f conftest.vals
18358 mv conftest.tail conftest.vals
18360 rm -f conftest.vals
18362 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18364 echo ' cat >> conftest.edit <<CEOF
18365 /@DEFS@/r conftest.frag
18368 sed -f conftest.edit $tmp/in > $tmp/out
18370 mv $tmp/out $tmp/in
18371 rm -f conftest.edit conftest.frag
18372 ' >> $CONFIG_STATUS
18374 cat >>$CONFIG_STATUS <<\EOF
18375 # Let's still pretend it is `configure' which instantiates (i.e., don't
18376 # use $as_me), people would be surprised to read:
18377 # /* config.h. Generated automatically by config.status. */
18378 if test x"$ac_file" = x-; then
18379 echo "/* Generated automatically by configure. */" >$tmp/config.h
18381 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18383 cat $tmp/in >>$tmp/config.h
18385 if test x"$ac_file" != x-; then
18386 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18387 { echo "$as_me:18387: $ac_file is unchanged" >&5
18388 echo "$as_me: $ac_file is unchanged" >&6;}
18390 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18391 X"$ac_file" : 'X\(//\)[^/]' \| \
18392 X"$ac_file" : 'X\(//\)$' \| \
18393 X"$ac_file" : 'X\(/\)' \| \
18394 . : '\(.\)' 2>/dev/null ||
18396 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18397 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18398 /^X\(\/\/\)$/{ s//\1/; q; }
18399 /^X\(\/\).*/{ s//\1/; q; }
18401 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18402 { case "$ac_dir" in
18403 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18407 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18408 case $as_mkdir_dir in
18409 # Skip DOS drivespec
18410 ?:) as_incr_dir=$as_mkdir_dir ;;
18412 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18413 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18420 mv $tmp/config.h $ac_file
18424 rm -f $tmp/config.h
18428 cat >>$CONFIG_STATUS <<\EOF
18430 # CONFIG_COMMANDS section.
18432 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18433 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18434 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18438 if test -z "$USE_OLD_MAKERULES" ; then
18439 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18446 cat >>$CONFIG_STATUS <<\EOF
18448 { (exit 0); exit 0; }
18450 chmod +x $CONFIG_STATUS
18451 ac_clean_files=$ac_clean_files_save
18453 # configure is writing to config.log, and then calls config.status.
18454 # config.status does its own redirection, appending to config.log.
18455 # Unfortunately, on DOS this fails, as config.log is still kept open
18456 # by configure, so config.status won't be able to write to it; its
18457 # output is simply discarded. So we exec the FD to /dev/null,
18458 # effectively closing config.log, so it can be properly (re)opened and
18459 # appended to by config.status. When coming back to configure, we
18460 # need to make the FD available again.
18461 if test "$no_create" != yes; then
18464 $SHELL $CONFIG_STATUS || ac_cs_success=false
18466 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18467 # would make configure fail if this is the last instruction.
18468 $ac_cs_success || { (exit 1); exit 1; }
18470 ${MAKE:-make} preinstall