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 cat >conftest.$ac_ext <<_ACEOF
1860 #line 1860 "configure"
1861 #include "confdefs.h"
1873 rm -f conftest.$ac_objext conftest$ac_exeext
1874 if { (eval echo "$as_me:1874: \"$ac_link\"") >&5
1875 (eval $ac_link) 2>&5
1877 echo "$as_me:1877: \$? = $ac_status" >&5
1878 (exit $ac_status); } &&
1879 { ac_try='test -s conftest$ac_exeext'
1880 { (eval echo "$as_me:1880: \"$ac_try\"") >&5
1883 echo "$as_me:1883: \$? = $ac_status" >&5
1884 (exit $ac_status); }; }; then
1888 echo "$as_me: failed program was:" >&5
1889 cat conftest.$ac_ext >&5
1893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1894 echo "$as_me:1894: result: $cf_clang_optok" >&5
1895 echo "${ECHO_T}$cf_clang_optok" >&6
1896 if test $cf_clang_optok = yes; then
1897 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
1899 echo "${as_me:-configure}:1899: testing adding option $cf_clang_opt ..." 1>&5
1901 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
1902 CFLAGS="${CFLAGS}$cf_clang_opt"
1908 echo "$as_me:1908: checking for $CC option to accept ANSI C" >&5
1909 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1910 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1911 echo $ECHO_N "(cached) $ECHO_C" >&6
1913 ac_cv_prog_cc_stdc=no
1915 cat >conftest.$ac_ext <<_ACEOF
1916 #line 1916 "configure"
1917 #include "confdefs.h"
1920 #include <sys/types.h>
1921 #include <sys/stat.h>
1922 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1923 struct buf { int x; };
1924 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1925 static char *e (p, i)
1931 static char *f (char * (*g) (char **, int), char **p, ...)
1936 s = g (p, va_arg (v,int));
1940 int test (int i, double x);
1941 struct s1 {int (*f) (int a);};
1942 struct s2 {int (*f) (double a);};
1943 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1949 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1954 # Don't try gcc -ansi; that turns off useful extensions and
1955 # breaks some systems' header files.
1956 # AIX -qlanglvl=ansi
1957 # Ultrix and OSF/1 -std1
1958 # HP-UX 10.20 and later -Ae
1959 # HP-UX older versions -Aa -D_HPUX_SOURCE
1960 # SVR4 -Xc -D__EXTENSIONS__
1961 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1963 CC="$ac_save_CC $ac_arg"
1964 rm -f conftest.$ac_objext
1965 if { (eval echo "$as_me:1965: \"$ac_compile\"") >&5
1966 (eval $ac_compile) 2>&5
1968 echo "$as_me:1968: \$? = $ac_status" >&5
1969 (exit $ac_status); } &&
1970 { ac_try='test -s conftest.$ac_objext'
1971 { (eval echo "$as_me:1971: \"$ac_try\"") >&5
1974 echo "$as_me:1974: \$? = $ac_status" >&5
1975 (exit $ac_status); }; }; then
1976 ac_cv_prog_cc_stdc=$ac_arg
1979 echo "$as_me: failed program was:" >&5
1980 cat conftest.$ac_ext >&5
1982 rm -f conftest.$ac_objext
1984 rm -f conftest.$ac_ext conftest.$ac_objext
1989 case "x$ac_cv_prog_cc_stdc" in
1991 echo "$as_me:1991: result: none needed" >&5
1992 echo "${ECHO_T}none needed" >&6 ;;
1994 echo "$as_me:1994: result: $ac_cv_prog_cc_stdc" >&5
1995 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
1996 CC="$CC $ac_cv_prog_cc_stdc" ;;
1999 # This should have been defined by AC_PROG_CC
2002 echo "$as_me:2002: checking \$CFLAGS variable" >&5
2003 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2006 echo "$as_me:2006: result: broken" >&5
2007 echo "${ECHO_T}broken" >&6
2008 { echo "$as_me:2008: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2009 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2012 for cf_arg in $cf_flags
2018 cf_new_extra_cppflags=
2020 for cf_add_cflags in $cf_arg
2022 case $cf_fix_cppflags in
2024 case $cf_add_cflags in
2025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2026 case $cf_add_cflags in
2028 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2031 && test -z "${cf_tst_cflags}" \
2032 && cf_fix_cppflags=yes
2034 if test $cf_fix_cppflags = yes ; then
2036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2040 elif test "${cf_tst_cflags}" = "\"'" ; then
2042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2053 case $cf_add_cflags in
2055 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2057 CPPFLAGS=`echo "$CPPFLAGS" | \
2058 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2059 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2064 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2065 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2072 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2073 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2083 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2086 && test -z "${cf_tst_cflags}" \
2087 && cf_fix_cppflags=no
2092 if test -n "$cf_new_cflags" ; then
2094 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2095 CFLAGS="${CFLAGS}$cf_new_cflags"
2099 if test -n "$cf_new_cppflags" ; then
2101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2102 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2106 if test -n "$cf_new_extra_cppflags" ; then
2108 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2109 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2116 echo "$as_me:2116: result: ok" >&5
2117 echo "${ECHO_T}ok" >&6
2121 echo "$as_me:2121: checking \$CC variable" >&5
2122 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2125 echo "$as_me:2125: result: broken" >&5
2126 echo "${ECHO_T}broken" >&6
2127 { echo "$as_me:2127: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2128 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2130 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2131 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2133 for cf_arg in $cf_flags
2141 cf_new_extra_cppflags=
2143 for cf_add_cflags in $cf_arg
2145 case $cf_fix_cppflags in
2147 case $cf_add_cflags in
2148 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2149 case $cf_add_cflags in
2151 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2153 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2154 && test -z "${cf_tst_cflags}" \
2155 && cf_fix_cppflags=yes
2157 if test $cf_fix_cppflags = yes ; then
2159 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2160 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2163 elif test "${cf_tst_cflags}" = "\"'" ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2176 case $cf_add_cflags in
2178 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2180 CPPFLAGS=`echo "$CPPFLAGS" | \
2181 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2182 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2187 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2188 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2195 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2196 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2203 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2204 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2206 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2208 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2209 && test -z "${cf_tst_cflags}" \
2210 && cf_fix_cppflags=no
2215 if test -n "$cf_new_cflags" ; then
2217 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2218 CFLAGS="${CFLAGS}$cf_new_cflags"
2222 if test -n "$cf_new_cppflags" ; then
2224 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2225 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2229 if test -n "$cf_new_extra_cppflags" ; then
2231 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2232 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2242 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2244 echo "${as_me:-configure}:2244: testing resulting CC: '$CC' ..." 1>&5
2246 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2248 echo "${as_me:-configure}:2248: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2250 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2252 echo "${as_me:-configure}:2252: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2256 echo "$as_me:2256: result: ok" >&5
2257 echo "${ECHO_T}ok" >&6
2262 ac_cpp='$CPP $CPPFLAGS'
2263 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2264 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2265 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2266 ac_main_return=return
2267 echo "$as_me:2267: checking how to run the C preprocessor" >&5
2268 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2269 # On Suns, sometimes $CPP names a directory.
2270 if test -n "$CPP" && test -d "$CPP"; then
2273 if test -z "$CPP"; then
2274 if test "${ac_cv_prog_CPP+set}" = set; then
2275 echo $ECHO_N "(cached) $ECHO_C" >&6
2277 # Double quotes because CPP needs to be expanded
2278 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2281 for ac_c_preproc_warn_flag in '' yes
2283 # Use a header file that comes with gcc, so configuring glibc
2284 # with a fresh cross-compiler works.
2285 # On the NeXT, cc -E runs the code through the compiler's parser,
2286 # not just through cpp. "Syntax error" is here to catch this case.
2287 cat >conftest.$ac_ext <<_ACEOF
2288 #line 2288 "configure"
2289 #include "confdefs.h"
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2296 egrep -v '^ *\+' conftest.er1 >conftest.err
2298 cat conftest.err >&5
2299 echo "$as_me:2299: \$? = $ac_status" >&5
2300 (exit $ac_status); } >/dev/null; then
2301 if test -s conftest.err; then
2302 ac_cpp_err=$ac_c_preproc_warn_flag
2309 if test -z "$ac_cpp_err"; then
2312 echo "$as_me: failed program was:" >&5
2313 cat conftest.$ac_ext >&5
2314 # Broken: fails on valid input.
2317 rm -f conftest.err conftest.$ac_ext
2319 # OK, works on sane cases. Now check whether non-existent headers
2320 # can be detected and how.
2321 cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2324 #include <ac_nonexistent.h>
2326 if { (eval echo "$as_me:2326: \"$ac_cpp conftest.$ac_ext\"") >&5
2327 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2329 egrep -v '^ *\+' conftest.er1 >conftest.err
2331 cat conftest.err >&5
2332 echo "$as_me:2332: \$? = $ac_status" >&5
2333 (exit $ac_status); } >/dev/null; then
2334 if test -s conftest.err; then
2335 ac_cpp_err=$ac_c_preproc_warn_flag
2342 if test -z "$ac_cpp_err"; then
2343 # Broken: success on invalid input.
2346 echo "$as_me: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348 # Passes both tests.
2352 rm -f conftest.err conftest.$ac_ext
2355 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2356 rm -f conftest.err conftest.$ac_ext
2357 if $ac_preproc_ok; then
2369 echo "$as_me:2369: result: $CPP" >&5
2370 echo "${ECHO_T}$CPP" >&6
2372 for ac_c_preproc_warn_flag in '' yes
2374 # Use a header file that comes with gcc, so configuring glibc
2375 # with a fresh cross-compiler works.
2376 # On the NeXT, cc -E runs the code through the compiler's parser,
2377 # not just through cpp. "Syntax error" is here to catch this case.
2378 cat >conftest.$ac_ext <<_ACEOF
2379 #line 2379 "configure"
2380 #include "confdefs.h"
2384 if { (eval echo "$as_me:2384: \"$ac_cpp conftest.$ac_ext\"") >&5
2385 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2387 egrep -v '^ *\+' conftest.er1 >conftest.err
2389 cat conftest.err >&5
2390 echo "$as_me:2390: \$? = $ac_status" >&5
2391 (exit $ac_status); } >/dev/null; then
2392 if test -s conftest.err; then
2393 ac_cpp_err=$ac_c_preproc_warn_flag
2400 if test -z "$ac_cpp_err"; then
2403 echo "$as_me: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 # Broken: fails on valid input.
2408 rm -f conftest.err conftest.$ac_ext
2410 # OK, works on sane cases. Now check whether non-existent headers
2411 # can be detected and how.
2412 cat >conftest.$ac_ext <<_ACEOF
2413 #line 2413 "configure"
2414 #include "confdefs.h"
2415 #include <ac_nonexistent.h>
2417 if { (eval echo "$as_me:2417: \"$ac_cpp conftest.$ac_ext\"") >&5
2418 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2420 egrep -v '^ *\+' conftest.er1 >conftest.err
2422 cat conftest.err >&5
2423 echo "$as_me:2423: \$? = $ac_status" >&5
2424 (exit $ac_status); } >/dev/null; then
2425 if test -s conftest.err; then
2426 ac_cpp_err=$ac_c_preproc_warn_flag
2433 if test -z "$ac_cpp_err"; then
2434 # Broken: success on invalid input.
2437 echo "$as_me: failed program was:" >&5
2438 cat conftest.$ac_ext >&5
2439 # Passes both tests.
2443 rm -f conftest.err conftest.$ac_ext
2446 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2447 rm -f conftest.err conftest.$ac_ext
2448 if $ac_preproc_ok; then
2451 { { echo "$as_me:2451: error: C preprocessor \"$CPP\" fails sanity check" >&5
2452 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2453 { (exit 1); exit 1; }; }
2457 ac_cpp='$CPP $CPPFLAGS'
2458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2461 ac_main_return=return
2463 if test $ac_cv_c_compiler_gnu = yes; then
2464 echo "$as_me:2464: checking whether $CC needs -traditional" >&5
2465 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2466 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2467 echo $ECHO_N "(cached) $ECHO_C" >&6
2469 ac_pattern="Autoconf.*'x'"
2470 cat >conftest.$ac_ext <<_ACEOF
2471 #line 2471 "configure"
2472 #include "confdefs.h"
2474 int Autoconf = TIOCGETP;
2476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2477 egrep "$ac_pattern" >/dev/null 2>&1; then
2478 ac_cv_prog_gcc_traditional=yes
2480 ac_cv_prog_gcc_traditional=no
2484 if test $ac_cv_prog_gcc_traditional = no; then
2485 cat >conftest.$ac_ext <<_ACEOF
2486 #line 2486 "configure"
2487 #include "confdefs.h"
2489 int Autoconf = TCGETA;
2491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2492 egrep "$ac_pattern" >/dev/null 2>&1; then
2493 ac_cv_prog_gcc_traditional=yes
2499 echo "$as_me:2499: result: $ac_cv_prog_gcc_traditional" >&5
2500 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2501 if test $ac_cv_prog_gcc_traditional = yes; then
2502 CC="$CC -traditional"
2506 echo "$as_me:2506: checking whether $CC understands -c and -o together" >&5
2507 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2508 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2509 echo $ECHO_N "(cached) $ECHO_C" >&6
2512 cat > conftest.$ac_ext <<CF_EOF
2515 ${cf_cv_main_return:-return}(0);
2518 # We do the test twice because some compilers refuse to overwrite an
2519 # existing .o file with -o, though they will create one.
2520 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2521 if { (eval echo "$as_me:2521: \"$ac_try\"") >&5
2524 echo "$as_me:2524: \$? = $ac_status" >&5
2525 (exit $ac_status); } &&
2526 test -f conftest2.$ac_objext && { (eval echo "$as_me:2526: \"$ac_try\"") >&5
2529 echo "$as_me:2529: \$? = $ac_status" >&5
2530 (exit $ac_status); };
2532 eval cf_cv_prog_CC_c_o=yes
2534 eval cf_cv_prog_CC_c_o=no
2539 if test $cf_cv_prog_CC_c_o = yes; then
2540 echo "$as_me:2540: result: yes" >&5
2541 echo "${ECHO_T}yes" >&6
2543 echo "$as_me:2543: result: no" >&5
2544 echo "${ECHO_T}no" >&6
2547 test "$program_prefix" != NONE &&
2548 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2549 # Use a double $ so make ignores it.
2550 test "$program_suffix" != NONE &&
2551 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2552 # Double any \ or $. echo might interpret backslashes.
2553 # By default was `s,x,x', remove it if useless.
2554 cat <<\_ACEOF >conftest.sed
2555 s/[\\$]/&&/g;s/;s,x,x,$//
2557 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2560 for ac_prog in mawk gawk nawk awk
2562 # Extract the first word of "$ac_prog", so it can be a program name with args.
2563 set dummy $ac_prog; ac_word=$2
2564 echo "$as_me:2564: checking for $ac_word" >&5
2565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2566 if test "${ac_cv_prog_AWK+set}" = set; then
2567 echo $ECHO_N "(cached) $ECHO_C" >&6
2569 if test -n "$AWK"; then
2570 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2572 ac_save_IFS=$IFS; IFS=$ac_path_separator
2574 for ac_dir in $ac_dummy; do
2576 test -z "$ac_dir" && ac_dir=.
2577 $as_executable_p "$ac_dir/$ac_word" || continue
2578 ac_cv_prog_AWK="$ac_prog"
2579 echo "$as_me:2579: found $ac_dir/$ac_word" >&5
2586 if test -n "$AWK"; then
2587 echo "$as_me:2587: result: $AWK" >&5
2588 echo "${ECHO_T}$AWK" >&6
2590 echo "$as_me:2590: result: no" >&5
2591 echo "${ECHO_T}no" >&6
2594 test -n "$AWK" && break
2597 test -z "$AWK" && { { echo "$as_me:2597: error: No awk program found" >&5
2598 echo "$as_me: error: No awk program found" >&2;}
2599 { (exit 1); exit 1; }; }
2601 echo "$as_me:2601: checking for egrep" >&5
2602 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2603 if test "${ac_cv_prog_egrep+set}" = set; then
2604 echo $ECHO_N "(cached) $ECHO_C" >&6
2606 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2607 then ac_cv_prog_egrep='grep -E'
2608 else ac_cv_prog_egrep='egrep'
2611 echo "$as_me:2611: result: $ac_cv_prog_egrep" >&5
2612 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2613 EGREP=$ac_cv_prog_egrep
2615 test -z "$EGREP" && { { echo "$as_me:2615: error: No egrep program found" >&5
2616 echo "$as_me: error: No egrep program found" >&2;}
2617 { (exit 1); exit 1; }; }
2619 # Find a good install program. We prefer a C program (faster),
2620 # so one script is as good as another. But avoid the broken or
2621 # incompatible versions:
2622 # SysV /etc/install, /usr/sbin/install
2623 # SunOS /usr/etc/install
2624 # IRIX /sbin/install
2626 # AmigaOS /C/install, which installs bootblocks on floppy discs
2627 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2628 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2629 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2630 # ./install, which can be erroneously created by make from ./install.sh.
2631 echo "$as_me:2631: checking for a BSD compatible install" >&5
2632 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2633 if test -z "$INSTALL"; then
2634 if test "${ac_cv_path_install+set}" = set; then
2635 echo $ECHO_N "(cached) $ECHO_C" >&6
2637 ac_save_IFS=$IFS; IFS=$ac_path_separator
2638 for ac_dir in $PATH; do
2640 # Account for people who put trailing slashes in PATH elements.
2642 / | ./ | .// | /cC/* \
2643 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2646 # OSF1 and SCO ODT 3.0 have their own names for install.
2647 # Don't use installbsd from OSF since it installs stuff as root
2649 for ac_prog in ginstall scoinst install; do
2650 if $as_executable_p "$ac_dir/$ac_prog"; then
2651 if test $ac_prog = install &&
2652 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2653 # AIX install. It has an incompatible calling convention.
2655 elif test $ac_prog = install &&
2656 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2657 # program-specific install script used by HP pwplus--don't use.
2660 ac_cv_path_install="$ac_dir/$ac_prog -c"
2670 if test "${ac_cv_path_install+set}" = set; then
2671 INSTALL=$ac_cv_path_install
2673 # As a last resort, use the slow shell script. We don't cache a
2674 # path for INSTALL within a source directory, because that will
2675 # break other packages using the cache if that directory is
2676 # removed, or if the path is relative.
2677 INSTALL=$ac_install_sh
2680 echo "$as_me:2680: result: $INSTALL" >&5
2681 echo "${ECHO_T}$INSTALL" >&6
2683 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2684 # It thinks the first close brace ends the variable substitution.
2685 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2687 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2689 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2691 echo "$as_me:2691: checking whether ln -s works" >&5
2692 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2694 if test "$LN_S" = "ln -s"; then
2695 echo "$as_me:2695: result: yes" >&5
2696 echo "${ECHO_T}yes" >&6
2698 echo "$as_me:2698: result: no, using $LN_S" >&5
2699 echo "${ECHO_T}no, using $LN_S" >&6
2702 echo "$as_me:2702: checking if $LN_S -f options work" >&5
2703 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2705 rm -f conf$$.src conf$$dst
2707 echo first >conf$$.src
2708 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2713 rm -f conf$$.dst conf$$src
2714 echo "$as_me:2714: result: $cf_prog_ln_sf" >&5
2715 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2717 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2719 # Find a good install program. We prefer a C program (faster),
2720 # so one script is as good as another. But avoid the broken or
2721 # incompatible versions:
2722 # SysV /etc/install, /usr/sbin/install
2723 # SunOS /usr/etc/install
2724 # IRIX /sbin/install
2726 # AmigaOS /C/install, which installs bootblocks on floppy discs
2727 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2728 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2729 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2730 # ./install, which can be erroneously created by make from ./install.sh.
2731 echo "$as_me:2731: checking for a BSD compatible install" >&5
2732 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2733 if test -z "$INSTALL"; then
2734 if test "${ac_cv_path_install+set}" = set; then
2735 echo $ECHO_N "(cached) $ECHO_C" >&6
2737 ac_save_IFS=$IFS; IFS=$ac_path_separator
2738 for ac_dir in $PATH; do
2740 # Account for people who put trailing slashes in PATH elements.
2742 / | ./ | .// | /cC/* \
2743 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2746 # OSF1 and SCO ODT 3.0 have their own names for install.
2747 # Don't use installbsd from OSF since it installs stuff as root
2749 for ac_prog in ginstall scoinst install; do
2750 if $as_executable_p "$ac_dir/$ac_prog"; then
2751 if test $ac_prog = install &&
2752 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2753 # AIX install. It has an incompatible calling convention.
2755 elif test $ac_prog = install &&
2756 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2757 # program-specific install script used by HP pwplus--don't use.
2760 ac_cv_path_install="$ac_dir/$ac_prog -c"
2770 if test "${ac_cv_path_install+set}" = set; then
2771 INSTALL=$ac_cv_path_install
2773 # As a last resort, use the slow shell script. We don't cache a
2774 # path for INSTALL within a source directory, because that will
2775 # break other packages using the cache if that directory is
2776 # removed, or if the path is relative.
2777 INSTALL=$ac_install_sh
2780 echo "$as_me:2780: result: $INSTALL" >&5
2781 echo "${ECHO_T}$INSTALL" >&6
2783 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2784 # It thinks the first close brace ends the variable substitution.
2785 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2787 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2789 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2795 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2796 test -z "$cf_dir" && cf_dir=.
2797 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2801 echo "$as_me:2801: checking if you want to install stripped executables" >&5
2802 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2804 # Check whether --enable-stripping or --disable-stripping was given.
2805 if test "${enable_stripping+set}" = set; then
2806 enableval="$enable_stripping"
2807 test "$enableval" != no && enableval=yes
2808 if test "$enableval" != "yes" ; then
2818 echo "$as_me:2818: result: $with_stripping" >&5
2819 echo "${ECHO_T}$with_stripping" >&6
2821 if test "$with_stripping" = yes
2828 : ${INSTALL:=install}
2829 echo "$as_me:2829: checking if install accepts -p option" >&5
2830 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2831 if test "${cf_cv_install_p+set}" = set; then
2832 echo $ECHO_N "(cached) $ECHO_C" >&6
2839 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2841 if test -f conftest.out/conftest.in
2843 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2844 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2845 if test -s conftest.err
2860 echo "$as_me:2860: result: $cf_cv_install_p" >&5
2861 echo "${ECHO_T}$cf_cv_install_p" >&6
2863 echo "$as_me:2863: checking if install needs to be told about ownership" >&5
2864 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2865 case `$ac_config_guess` in
2874 echo "$as_me:2874: result: $with_install_o" >&5
2875 echo "${ECHO_T}$with_install_o" >&6
2876 if test "x$with_install_o" = xyes
2878 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'`
2883 echo "$as_me:2883: checking for long file names" >&5
2884 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
2885 if test "${ac_cv_sys_long_file_names+set}" = set; then
2886 echo $ECHO_N "(cached) $ECHO_C" >&6
2888 ac_cv_sys_long_file_names=yes
2889 # Test for long file names in all the places we know might matter:
2890 # . the current directory, where building will happen
2891 # $prefix/lib where we will be installing things
2892 # $exec_prefix/lib likewise
2893 # eval it to expand exec_prefix.
2894 # $TMPDIR if set, where it might want to write temporary files
2895 # if $TMPDIR is not set:
2896 # /tmp where it might want to write temporary files
2899 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2902 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2904 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2905 test -d $ac_dir || continue
2906 test -w $ac_dir || continue # It is less confusing to not echo anything here.
2907 ac_xdir=$ac_dir/cf$$
2908 (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
2909 ac_tf1=$ac_xdir/conftest9012345
2910 ac_tf2=$ac_xdir/conftest9012346
2911 (echo 1 >$ac_tf1) 2>/dev/null
2912 (echo 2 >$ac_tf2) 2>/dev/null
2913 ac_val=`cat $ac_tf1 2>/dev/null`
2914 if test ! -f $ac_tf1 || test "$ac_val" != 1; then
2915 ac_cv_sys_long_file_names=no
2916 rm -rf $ac_xdir 2>/dev/null
2919 rm -rf $ac_xdir 2>/dev/null
2922 echo "$as_me:2922: result: $ac_cv_sys_long_file_names" >&5
2923 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
2924 if test $ac_cv_sys_long_file_names = yes; then
2926 cat >>confdefs.h <<\EOF
2927 #define HAVE_LONG_FILE_NAMES 1
2932 # if we find pkg-config, check if we should install the ".pc" files.
2934 echo "$as_me:2934: checking if you want to use pkg-config" >&5
2935 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
2937 # Check whether --with-pkg-config or --without-pkg-config was given.
2938 if test "${with_pkg_config+set}" = set; then
2939 withval="$with_pkg_config"
2940 cf_pkg_config=$withval
2944 echo "$as_me:2944: result: $cf_pkg_config" >&5
2945 echo "${ECHO_T}$cf_pkg_config" >&6
2947 case $cf_pkg_config in
2953 if test -n "$ac_tool_prefix"; then
2954 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
2955 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
2956 echo "$as_me:2956: checking for $ac_word" >&5
2957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2958 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
2959 echo $ECHO_N "(cached) $ECHO_C" >&6
2963 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
2966 ac_save_IFS=$IFS; IFS=$ac_path_separator
2968 for ac_dir in $ac_dummy; do
2970 test -z "$ac_dir" && ac_dir=.
2971 if $as_executable_p "$ac_dir/$ac_word"; then
2972 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
2973 echo "$as_me:2973: found $ac_dir/$ac_word" >&5
2981 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
2983 if test -n "$PKG_CONFIG"; then
2984 echo "$as_me:2984: result: $PKG_CONFIG" >&5
2985 echo "${ECHO_T}$PKG_CONFIG" >&6
2987 echo "$as_me:2987: result: no" >&5
2988 echo "${ECHO_T}no" >&6
2992 if test -z "$ac_cv_path_PKG_CONFIG"; then
2993 ac_pt_PKG_CONFIG=$PKG_CONFIG
2994 # Extract the first word of "pkg-config", so it can be a program name with args.
2995 set dummy pkg-config; ac_word=$2
2996 echo "$as_me:2996: checking for $ac_word" >&5
2997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2998 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
2999 echo $ECHO_N "(cached) $ECHO_C" >&6
3001 case $ac_pt_PKG_CONFIG in
3003 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3006 ac_save_IFS=$IFS; IFS=$ac_path_separator
3008 for ac_dir in $ac_dummy; do
3010 test -z "$ac_dir" && ac_dir=.
3011 if $as_executable_p "$ac_dir/$ac_word"; then
3012 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3013 echo "$as_me:3013: found $ac_dir/$ac_word" >&5
3018 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3022 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3024 if test -n "$ac_pt_PKG_CONFIG"; then
3025 echo "$as_me:3025: result: $ac_pt_PKG_CONFIG" >&5
3026 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3028 echo "$as_me:3028: result: no" >&5
3029 echo "${ECHO_T}no" >&6
3032 PKG_CONFIG=$ac_pt_PKG_CONFIG
3034 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3043 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3044 if test "$PKG_CONFIG" != none ; then
3046 if test "x$prefix" != xNONE; then
3047 cf_path_syntax="$prefix"
3049 cf_path_syntax="$ac_default_prefix"
3052 case ".$PKG_CONFIG" in
3057 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3059 (.\${*prefix}*|.\${*dir}*)
3060 eval PKG_CONFIG="$PKG_CONFIG"
3061 case ".$PKG_CONFIG" in
3063 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3068 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3071 { { echo "$as_me:3071: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3072 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3073 { (exit 1); exit 1; }; }
3077 elif test "x$cf_pkg_config" != xno ; then
3078 { echo "$as_me:3078: WARNING: pkg-config is not installed" >&5
3079 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3084 echo "$as_me:3084: checking for pkg-config library directory" >&5
3085 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3088 echo "$as_me:3088: checking for $PKG_CONFIG library directory" >&5
3089 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3093 PKG_CONFIG_LIBDIR=no
3095 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3096 if test "${with_pkg_config_libdir+set}" = set; then
3097 withval="$with_pkg_config_libdir"
3098 PKG_CONFIG_LIBDIR=$withval
3100 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3103 case x$PKG_CONFIG_LIBDIR in
3107 # Look for the library directory using the same prefix as the executable
3108 if test "x$PKG_CONFIG" = xnone
3112 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3115 # If you don't like using the default architecture, you have to specify the
3116 # intended library directory and corresponding compiler/linker options.
3118 # This case allows for Debian's 2014-flavor of multiarch, along with the
3119 # most common variations before that point. Some other variants spell the
3120 # directory differently, e.g., "pkg-config", and put it in unusual places.
3121 # pkg-config has always been poorly standardized, which is ironic...
3122 case x`(arch) 2>/dev/null` in
3125 $cf_path/lib/*64-linux-gnu \
3133 $cf_path/lib/*-linux-gnu \
3141 test -n "$verbose" && echo " list..." 1>&6
3143 echo "${as_me:-configure}:3143: testing list... ..." 1>&5
3145 for cf_config in $cf_search_path
3147 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3149 echo "${as_me:-configure}:3149: testing checking $cf_config/pkgconfig ..." 1>&5
3151 if test -d $cf_config/pkgconfig
3153 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3154 echo "$as_me:3154: checking done" >&5
3155 echo $ECHO_N "checking done... $ECHO_C" >&6
3164 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3165 echo "$as_me:3165: result: $PKG_CONFIG_LIBDIR" >&5
3166 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3169 echo "$as_me:3169: checking if you want to build test-programs" >&5
3170 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3172 # Check whether --with-tests or --without-tests was given.
3173 if test "${with_tests+set}" = set; then
3174 withval="$with_tests"
3175 cf_with_tests=$withval
3179 echo "$as_me:3179: result: $cf_with_tests" >&5
3180 echo "${ECHO_T}$cf_with_tests" >&6
3182 echo "$as_me:3182: checking if we should assume mixed-case filenames" >&5
3183 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3185 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3186 if test "${enable_mixed_case+set}" = set; then
3187 enableval="$enable_mixed_case"
3188 enable_mixedcase=$enableval
3190 enable_mixedcase=auto
3192 echo "$as_me:3192: result: $enable_mixedcase" >&5
3193 echo "${ECHO_T}$enable_mixedcase" >&6
3194 if test "$enable_mixedcase" = "auto" ; then
3196 echo "$as_me:3196: checking if filesystem supports mixed-case filenames" >&5
3197 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3198 if test "${cf_cv_mixedcase+set}" = set; then
3199 echo $ECHO_N "(cached) $ECHO_C" >&6
3202 if test "$cross_compiling" = yes ; then
3203 case $target_alias in
3204 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3212 rm -f conftest CONFTEST
3214 if test -f CONFTEST ; then
3219 rm -f conftest CONFTEST
3223 echo "$as_me:3223: result: $cf_cv_mixedcase" >&5
3224 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3225 test "$cf_cv_mixedcase" = yes &&
3226 cat >>confdefs.h <<\EOF
3227 #define MIXEDCASE_FILENAMES 1
3231 cf_cv_mixedcase=$enable_mixedcase
3232 if test "$enable_mixedcase" = "yes" ; then
3233 cat >>confdefs.h <<\EOF
3234 #define MIXEDCASE_FILENAMES 1
3240 # do this after mixed-case option (tags/TAGS is not as important as tic).
3241 echo "$as_me:3241: checking whether ${MAKE-make} sets \${MAKE}" >&5
3242 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3243 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3244 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3245 echo $ECHO_N "(cached) $ECHO_C" >&6
3247 cat >conftest.make <<\EOF
3249 @echo 'ac_maketemp="${MAKE}"'
3251 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3252 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3253 if test -n "$ac_maketemp"; then
3254 eval ac_cv_prog_make_${ac_make}_set=yes
3256 eval ac_cv_prog_make_${ac_make}_set=no
3260 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3261 echo "$as_me:3261: result: yes" >&5
3262 echo "${ECHO_T}yes" >&6
3265 echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 SET_MAKE="MAKE=${MAKE-make}"
3270 for ac_prog in exctags ctags
3272 # Extract the first word of "$ac_prog", so it can be a program name with args.
3273 set dummy $ac_prog; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_prog_CTAGS+set}" = set; then
3277 echo $ECHO_N "(cached) $ECHO_C" >&6
3279 if test -n "$CTAGS"; then
3280 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3282 ac_save_IFS=$IFS; IFS=$ac_path_separator
3284 for ac_dir in $ac_dummy; do
3286 test -z "$ac_dir" && ac_dir=.
3287 $as_executable_p "$ac_dir/$ac_word" || continue
3288 ac_cv_prog_CTAGS="$ac_prog"
3289 echo "$as_me:3289: found $ac_dir/$ac_word" >&5
3295 CTAGS=$ac_cv_prog_CTAGS
3296 if test -n "$CTAGS"; then
3297 echo "$as_me:3297: result: $CTAGS" >&5
3298 echo "${ECHO_T}$CTAGS" >&6
3300 echo "$as_me:3300: result: no" >&5
3301 echo "${ECHO_T}no" >&6
3304 test -n "$CTAGS" && break
3307 for ac_prog in exetags etags
3309 # Extract the first word of "$ac_prog", so it can be a program name with args.
3310 set dummy $ac_prog; ac_word=$2
3311 echo "$as_me:3311: checking for $ac_word" >&5
3312 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3313 if test "${ac_cv_prog_ETAGS+set}" = set; then
3314 echo $ECHO_N "(cached) $ECHO_C" >&6
3316 if test -n "$ETAGS"; then
3317 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3319 ac_save_IFS=$IFS; IFS=$ac_path_separator
3321 for ac_dir in $ac_dummy; do
3323 test -z "$ac_dir" && ac_dir=.
3324 $as_executable_p "$ac_dir/$ac_word" || continue
3325 ac_cv_prog_ETAGS="$ac_prog"
3326 echo "$as_me:3326: found $ac_dir/$ac_word" >&5
3332 ETAGS=$ac_cv_prog_ETAGS
3333 if test -n "$ETAGS"; then
3334 echo "$as_me:3334: result: $ETAGS" >&5
3335 echo "${ECHO_T}$ETAGS" >&6
3337 echo "$as_me:3337: result: no" >&5
3338 echo "${ECHO_T}no" >&6
3341 test -n "$ETAGS" && break
3344 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3345 set dummy ${CTAGS:-ctags}; ac_word=$2
3346 echo "$as_me:3346: checking for $ac_word" >&5
3347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3349 echo $ECHO_N "(cached) $ECHO_C" >&6
3351 if test -n "$MAKE_LOWER_TAGS"; then
3352 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3354 ac_save_IFS=$IFS; IFS=$ac_path_separator
3356 for ac_dir in $ac_dummy; do
3358 test -z "$ac_dir" && ac_dir=.
3359 $as_executable_p "$ac_dir/$ac_word" || continue
3360 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3361 echo "$as_me:3361: found $ac_dir/$ac_word" >&5
3365 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3368 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3369 if test -n "$MAKE_LOWER_TAGS"; then
3370 echo "$as_me:3370: result: $MAKE_LOWER_TAGS" >&5
3371 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3373 echo "$as_me:3373: result: no" >&5
3374 echo "${ECHO_T}no" >&6
3377 if test "$cf_cv_mixedcase" = yes ; then
3378 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3379 set dummy ${ETAGS:-etags}; ac_word=$2
3380 echo "$as_me:3380: checking for $ac_word" >&5
3381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3382 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
3385 if test -n "$MAKE_UPPER_TAGS"; then
3386 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3388 ac_save_IFS=$IFS; IFS=$ac_path_separator
3390 for ac_dir in $ac_dummy; do
3392 test -z "$ac_dir" && ac_dir=.
3393 $as_executable_p "$ac_dir/$ac_word" || continue
3394 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3395 echo "$as_me:3395: found $ac_dir/$ac_word" >&5
3399 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3402 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3403 if test -n "$MAKE_UPPER_TAGS"; then
3404 echo "$as_me:3404: result: $MAKE_UPPER_TAGS" >&5
3405 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3407 echo "$as_me:3407: result: no" >&5
3408 echo "${ECHO_T}no" >&6
3415 if test "$MAKE_UPPER_TAGS" = yes ; then
3421 if test "$MAKE_LOWER_TAGS" = yes ; then
3427 echo "$as_me:3427: checking for makeflags variable" >&5
3428 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3429 if test "${cf_cv_makeflags+set}" = set; then
3430 echo $ECHO_N "(cached) $ECHO_C" >&6
3434 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3436 cat >cf_makeflags.tmp <<CF_EOF
3439 @ echo '.$cf_option'
3441 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
3442 case "$cf_result" in
3444 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3445 case "$cf_result" in
3446 (.*CC=*) cf_cv_makeflags=
3448 (*) cf_cv_makeflags=$cf_option
3457 echo "${as_me:-configure}:3457: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3462 rm -f cf_makeflags.tmp
3465 echo "$as_me:3465: result: $cf_cv_makeflags" >&5
3466 echo "${ECHO_T}$cf_cv_makeflags" >&6
3468 if test -n "$ac_tool_prefix"; then
3469 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3470 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3471 echo "$as_me:3471: checking for $ac_word" >&5
3472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3473 if test "${ac_cv_prog_RANLIB+set}" = set; then
3474 echo $ECHO_N "(cached) $ECHO_C" >&6
3476 if test -n "$RANLIB"; then
3477 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3479 ac_save_IFS=$IFS; IFS=$ac_path_separator
3481 for ac_dir in $ac_dummy; do
3483 test -z "$ac_dir" && ac_dir=.
3484 $as_executable_p "$ac_dir/$ac_word" || continue
3485 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3486 echo "$as_me:3486: found $ac_dir/$ac_word" >&5
3492 RANLIB=$ac_cv_prog_RANLIB
3493 if test -n "$RANLIB"; then
3494 echo "$as_me:3494: result: $RANLIB" >&5
3495 echo "${ECHO_T}$RANLIB" >&6
3497 echo "$as_me:3497: result: no" >&5
3498 echo "${ECHO_T}no" >&6
3502 if test -z "$ac_cv_prog_RANLIB"; then
3503 ac_ct_RANLIB=$RANLIB
3504 # Extract the first word of "ranlib", so it can be a program name with args.
3505 set dummy ranlib; ac_word=$2
3506 echo "$as_me:3506: checking for $ac_word" >&5
3507 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3508 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3509 echo $ECHO_N "(cached) $ECHO_C" >&6
3511 if test -n "$ac_ct_RANLIB"; then
3512 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3514 ac_save_IFS=$IFS; IFS=$ac_path_separator
3516 for ac_dir in $ac_dummy; do
3518 test -z "$ac_dir" && ac_dir=.
3519 $as_executable_p "$ac_dir/$ac_word" || continue
3520 ac_cv_prog_ac_ct_RANLIB="ranlib"
3521 echo "$as_me:3521: found $ac_dir/$ac_word" >&5
3525 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3528 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3529 if test -n "$ac_ct_RANLIB"; then
3530 echo "$as_me:3530: result: $ac_ct_RANLIB" >&5
3531 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3533 echo "$as_me:3533: result: no" >&5
3534 echo "${ECHO_T}no" >&6
3537 RANLIB=$ac_ct_RANLIB
3539 RANLIB="$ac_cv_prog_RANLIB"
3542 if test -n "$ac_tool_prefix"; then
3543 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3544 set dummy ${ac_tool_prefix}ld; ac_word=$2
3545 echo "$as_me:3545: checking for $ac_word" >&5
3546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3547 if test "${ac_cv_prog_LD+set}" = set; then
3548 echo $ECHO_N "(cached) $ECHO_C" >&6
3550 if test -n "$LD"; then
3551 ac_cv_prog_LD="$LD" # Let the user override the test.
3553 ac_save_IFS=$IFS; IFS=$ac_path_separator
3555 for ac_dir in $ac_dummy; do
3557 test -z "$ac_dir" && ac_dir=.
3558 $as_executable_p "$ac_dir/$ac_word" || continue
3559 ac_cv_prog_LD="${ac_tool_prefix}ld"
3560 echo "$as_me:3560: found $ac_dir/$ac_word" >&5
3567 if test -n "$LD"; then
3568 echo "$as_me:3568: result: $LD" >&5
3569 echo "${ECHO_T}$LD" >&6
3571 echo "$as_me:3571: result: no" >&5
3572 echo "${ECHO_T}no" >&6
3576 if test -z "$ac_cv_prog_LD"; then
3578 # Extract the first word of "ld", so it can be a program name with args.
3579 set dummy ld; ac_word=$2
3580 echo "$as_me:3580: checking for $ac_word" >&5
3581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3582 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3583 echo $ECHO_N "(cached) $ECHO_C" >&6
3585 if test -n "$ac_ct_LD"; then
3586 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3588 ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 for ac_dir in $ac_dummy; do
3592 test -z "$ac_dir" && ac_dir=.
3593 $as_executable_p "$ac_dir/$ac_word" || continue
3594 ac_cv_prog_ac_ct_LD="ld"
3595 echo "$as_me:3595: found $ac_dir/$ac_word" >&5
3599 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3602 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3603 if test -n "$ac_ct_LD"; then
3604 echo "$as_me:3604: result: $ac_ct_LD" >&5
3605 echo "${ECHO_T}$ac_ct_LD" >&6
3607 echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3616 if test -n "$ac_tool_prefix"; then
3617 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3618 set dummy ${ac_tool_prefix}ar; ac_word=$2
3619 echo "$as_me:3619: checking for $ac_word" >&5
3620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3621 if test "${ac_cv_prog_AR+set}" = set; then
3622 echo $ECHO_N "(cached) $ECHO_C" >&6
3624 if test -n "$AR"; then
3625 ac_cv_prog_AR="$AR" # Let the user override the test.
3627 ac_save_IFS=$IFS; IFS=$ac_path_separator
3629 for ac_dir in $ac_dummy; do
3631 test -z "$ac_dir" && ac_dir=.
3632 $as_executable_p "$ac_dir/$ac_word" || continue
3633 ac_cv_prog_AR="${ac_tool_prefix}ar"
3634 echo "$as_me:3634: found $ac_dir/$ac_word" >&5
3641 if test -n "$AR"; then
3642 echo "$as_me:3642: result: $AR" >&5
3643 echo "${ECHO_T}$AR" >&6
3645 echo "$as_me:3645: result: no" >&5
3646 echo "${ECHO_T}no" >&6
3650 if test -z "$ac_cv_prog_AR"; then
3652 # Extract the first word of "ar", so it can be a program name with args.
3653 set dummy ar; ac_word=$2
3654 echo "$as_me:3654: checking for $ac_word" >&5
3655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3656 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3657 echo $ECHO_N "(cached) $ECHO_C" >&6
3659 if test -n "$ac_ct_AR"; then
3660 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3662 ac_save_IFS=$IFS; IFS=$ac_path_separator
3664 for ac_dir in $ac_dummy; do
3666 test -z "$ac_dir" && ac_dir=.
3667 $as_executable_p "$ac_dir/$ac_word" || continue
3668 ac_cv_prog_ac_ct_AR="ar"
3669 echo "$as_me:3669: found $ac_dir/$ac_word" >&5
3673 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3676 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3677 if test -n "$ac_ct_AR"; then
3678 echo "$as_me:3678: result: $ac_ct_AR" >&5
3679 echo "${ECHO_T}$ac_ct_AR" >&6
3681 echo "$as_me:3681: result: no" >&5
3682 echo "${ECHO_T}no" >&6
3690 if test -n "$ac_tool_prefix"; then
3691 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3692 set dummy ${ac_tool_prefix}ar; ac_word=$2
3693 echo "$as_me:3693: checking for $ac_word" >&5
3694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3695 if test "${ac_cv_prog_AR+set}" = set; then
3696 echo $ECHO_N "(cached) $ECHO_C" >&6
3698 if test -n "$AR"; then
3699 ac_cv_prog_AR="$AR" # Let the user override the test.
3701 ac_save_IFS=$IFS; IFS=$ac_path_separator
3703 for ac_dir in $ac_dummy; do
3705 test -z "$ac_dir" && ac_dir=.
3706 $as_executable_p "$ac_dir/$ac_word" || continue
3707 ac_cv_prog_AR="${ac_tool_prefix}ar"
3708 echo "$as_me:3708: found $ac_dir/$ac_word" >&5
3715 if test -n "$AR"; then
3716 echo "$as_me:3716: result: $AR" >&5
3717 echo "${ECHO_T}$AR" >&6
3719 echo "$as_me:3719: result: no" >&5
3720 echo "${ECHO_T}no" >&6
3724 if test -z "$ac_cv_prog_AR"; then
3726 # Extract the first word of "ar", so it can be a program name with args.
3727 set dummy ar; ac_word=$2
3728 echo "$as_me:3728: checking for $ac_word" >&5
3729 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3730 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3731 echo $ECHO_N "(cached) $ECHO_C" >&6
3733 if test -n "$ac_ct_AR"; then
3734 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3736 ac_save_IFS=$IFS; IFS=$ac_path_separator
3738 for ac_dir in $ac_dummy; do
3740 test -z "$ac_dir" && ac_dir=.
3741 $as_executable_p "$ac_dir/$ac_word" || continue
3742 ac_cv_prog_ac_ct_AR="ar"
3743 echo "$as_me:3743: found $ac_dir/$ac_word" >&5
3747 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3750 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3751 if test -n "$ac_ct_AR"; then
3752 echo "$as_me:3752: result: $ac_ct_AR" >&5
3753 echo "${ECHO_T}$ac_ct_AR" >&6
3755 echo "$as_me:3755: result: no" >&5
3756 echo "${ECHO_T}no" >&6
3764 echo "$as_me:3764: checking for options to update archives" >&5
3765 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3766 if test "${cf_cv_ar_flags+set}" = set; then
3767 echo $ECHO_N "(cached) $ECHO_C" >&6
3770 case $cf_cv_system_name in
3773 cat >mk_static_lib.sh <<-EOF
3778 exec \$MSVC_BIN -out:"\$out" \$@
3780 chmod +x mk_static_lib.sh
3781 AR=`pwd`/mk_static_lib.sh
3784 cf_cv_ar_flags=unknown
3785 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3788 # check if $ARFLAGS already contains this choice
3789 if test "x$ARFLAGS" != "x" ; then
3790 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3791 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3797 rm -f conftest.$ac_cv_objext
3800 cat >conftest.$ac_ext <<EOF
3801 #line 3801 "configure"
3802 int testdata[3] = { 123, 456, 789 };
3804 if { (eval echo "$as_me:3804: \"$ac_compile\"") >&5
3805 (eval $ac_compile) 2>&5
3807 echo "$as_me:3807: \$? = $ac_status" >&5
3808 (exit $ac_status); } ; then
3809 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3810 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
3811 if test -f conftest.a ; then
3812 cf_cv_ar_flags=$cf_ar_flags
3816 test -n "$verbose" && echo " cannot compile test-program" 1>&6
3818 echo "${as_me:-configure}:3818: testing cannot compile test-program ..." 1>&5
3823 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
3828 echo "$as_me:3828: result: $cf_cv_ar_flags" >&5
3829 echo "${ECHO_T}$cf_cv_ar_flags" >&6
3831 if test -n "$ARFLAGS" ; then
3832 if test -n "$cf_cv_ar_flags" ; then
3833 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3836 ARFLAGS=$cf_cv_ar_flags
3839 echo "$as_me:3839: checking for PATH separator" >&5
3840 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
3841 case $cf_cv_system_name in
3842 (os2*) PATH_SEPARATOR=';' ;;
3843 (*) ${PATH_SEPARATOR:=':'} ;;
3846 echo "$as_me:3846: result: $PATH_SEPARATOR" >&5
3847 echo "${ECHO_T}$PATH_SEPARATOR" >&6
3849 echo "$as_me:3849: checking if you have specified an install-prefix" >&5
3850 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3852 # Check whether --with-install-prefix or --without-install-prefix was given.
3853 if test "${with_install_prefix+set}" = set; then
3854 withval="$with_install_prefix"
3858 (*) DESTDIR="$withval"
3862 echo "$as_me:3862: result: $DESTDIR" >&5
3863 echo "${ECHO_T}$DESTDIR" >&6
3865 ###############################################################################
3867 # If we're cross-compiling, allow the user to override the tools and their
3868 # options. The configure script is oriented toward identifying the host
3869 # compiler, etc., but we need a build compiler to generate parts of the source.
3871 if test "$cross_compiling" = yes ; then
3873 # defaults that we might want to override
3874 : ${BUILD_CFLAGS:=''}
3875 : ${BUILD_CPPFLAGS:=''}
3876 : ${BUILD_LDFLAGS:=''}
3878 : ${BUILD_EXEEXT:='$x'}
3879 : ${BUILD_OBJEXT:='o'}
3881 # Check whether --with-build-cc or --without-build-cc was given.
3882 if test "${with_build_cc+set}" = set; then
3883 withval="$with_build_cc"
3886 for ac_prog in gcc clang c99 c89 cc cl
3888 # Extract the first word of "$ac_prog", so it can be a program name with args.
3889 set dummy $ac_prog; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3893 echo $ECHO_N "(cached) $ECHO_C" >&6
3895 if test -n "$BUILD_CC"; then
3896 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3898 ac_save_IFS=$IFS; IFS=$ac_path_separator
3900 for ac_dir in $ac_dummy; do
3902 test -z "$ac_dir" && ac_dir=.
3903 $as_executable_p "$ac_dir/$ac_word" || continue
3904 ac_cv_prog_BUILD_CC="$ac_prog"
3905 echo "$as_me:3905: found $ac_dir/$ac_word" >&5
3911 BUILD_CC=$ac_cv_prog_BUILD_CC
3912 if test -n "$BUILD_CC"; then
3913 echo "$as_me:3913: result: $BUILD_CC" >&5
3914 echo "${ECHO_T}$BUILD_CC" >&6
3916 echo "$as_me:3916: result: no" >&5
3917 echo "${ECHO_T}no" >&6
3920 test -n "$BUILD_CC" && break
3922 test -n "$BUILD_CC" || BUILD_CC="none"
3925 echo "$as_me:3925: checking for native build C compiler" >&5
3926 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3927 echo "$as_me:3927: result: $BUILD_CC" >&5
3928 echo "${ECHO_T}$BUILD_CC" >&6
3930 echo "$as_me:3930: checking for native build C preprocessor" >&5
3931 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3933 # Check whether --with-build-cpp or --without-build-cpp was given.
3934 if test "${with_build_cpp+set}" = set; then
3935 withval="$with_build_cpp"
3936 BUILD_CPP="$withval"
3938 BUILD_CPP='${BUILD_CC} -E'
3940 echo "$as_me:3940: result: $BUILD_CPP" >&5
3941 echo "${ECHO_T}$BUILD_CPP" >&6
3943 echo "$as_me:3943: checking for native build C flags" >&5
3944 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3946 # Check whether --with-build-cflags or --without-build-cflags was given.
3947 if test "${with_build_cflags+set}" = set; then
3948 withval="$with_build_cflags"
3949 BUILD_CFLAGS="$withval"
3951 echo "$as_me:3951: result: $BUILD_CFLAGS" >&5
3952 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3954 echo "$as_me:3954: checking for native build C preprocessor-flags" >&5
3955 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3957 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3958 if test "${with_build_cppflags+set}" = set; then
3959 withval="$with_build_cppflags"
3960 BUILD_CPPFLAGS="$withval"
3962 echo "$as_me:3962: result: $BUILD_CPPFLAGS" >&5
3963 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3965 echo "$as_me:3965: checking for native build linker-flags" >&5
3966 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3968 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3969 if test "${with_build_ldflags+set}" = set; then
3970 withval="$with_build_ldflags"
3971 BUILD_LDFLAGS="$withval"
3973 echo "$as_me:3973: result: $BUILD_LDFLAGS" >&5
3974 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3976 echo "$as_me:3976: checking for native build linker-libraries" >&5
3977 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3979 # Check whether --with-build-libs or --without-build-libs was given.
3980 if test "${with_build_libs+set}" = set; then
3981 withval="$with_build_libs"
3982 BUILD_LIBS="$withval"
3984 echo "$as_me:3984: result: $BUILD_LIBS" >&5
3985 echo "${ECHO_T}$BUILD_LIBS" >&6
3987 # this assumes we're on Unix.
3991 : ${BUILD_CC:='${CC}'}
3993 if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3994 { { echo "$as_me:3994: error: Cross-build requires two compilers.
3995 Use --with-build-cc to specify the native compiler." >&5
3996 echo "$as_me: error: Cross-build requires two compilers.
3997 Use --with-build-cc to specify the native compiler." >&2;}
3998 { (exit 1); exit 1; }; }
4002 : ${BUILD_CC:='${CC}'}
4003 : ${BUILD_CPP:='${CPP}'}
4004 : ${BUILD_CFLAGS:='${CFLAGS}'}
4005 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4006 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4007 : ${BUILD_LIBS:='${LIBS}'}
4008 : ${BUILD_EXEEXT:='$x'}
4009 : ${BUILD_OBJEXT:='o'}
4012 ###############################################################################
4014 ### Options to allow the user to specify the set of libraries which are used.
4015 ### Use "--without-normal --with-shared" to allow the default model to be
4016 ### shared, for example.
4019 echo "$as_me:4019: checking if you want to build shared C-objects" >&5
4020 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4022 # Check whether --with-shared or --without-shared was given.
4023 if test "${with_shared+set}" = set; then
4024 withval="$with_shared"
4025 with_shared=$withval
4029 echo "$as_me:4029: result: $with_shared" >&5
4030 echo "${ECHO_T}$with_shared" >&6
4031 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4033 echo "$as_me:4033: checking for specified models" >&5
4034 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4035 test -z "$cf_list_models" && cf_list_models=normal
4036 echo "$as_me:4036: result: $cf_list_models" >&5
4037 echo "${ECHO_T}$cf_list_models" >&6
4039 ### Use the first model as the default, and save its suffix for use in building
4040 ### up test-applications.
4041 echo "$as_me:4041: checking for default model" >&5
4042 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4043 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4044 echo "$as_me:4044: result: $DFT_LWR_MODEL" >&5
4045 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4047 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4049 echo "$as_me:4049: checking for specific curses-directory" >&5
4050 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4052 # Check whether --with-curses-dir or --without-curses-dir was given.
4053 if test "${with_curses_dir+set}" = set; then
4054 withval="$with_curses_dir"
4055 cf_cv_curses_dir=$withval
4059 echo "$as_me:4059: result: $cf_cv_curses_dir" >&5
4060 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4062 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4065 if test "x$prefix" != xNONE; then
4066 cf_path_syntax="$prefix"
4068 cf_path_syntax="$ac_default_prefix"
4076 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4078 (.\${*prefix}*|.\${*dir}*)
4079 eval withval="$withval"
4082 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4087 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
4090 { { echo "$as_me:4090: error: expected a pathname, not \"$withval\"" >&5
4091 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4092 { (exit 1); exit 1; }; }
4096 if test -d "$cf_cv_curses_dir"
4099 if test -n "$cf_cv_curses_dir/include" ; then
4100 for cf_add_incdir in $cf_cv_curses_dir/include
4102 while test $cf_add_incdir != /usr/include
4104 if test -d $cf_add_incdir
4107 if test -n "$CFLAGS$CPPFLAGS" ; then
4108 # a loop is needed to ensure we can add subdirs of existing dirs
4109 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4110 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4111 cf_have_incdir=yes; break
4116 if test "$cf_have_incdir" = no ; then
4117 if test "$cf_add_incdir" = /usr/local/include ; then
4118 if test "$GCC" = yes
4120 cf_save_CPPFLAGS=$CPPFLAGS
4122 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4123 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4125 cat >conftest.$ac_ext <<_ACEOF
4126 #line 4126 "configure"
4127 #include "confdefs.h"
4137 rm -f conftest.$ac_objext
4138 if { (eval echo "$as_me:4138: \"$ac_compile\"") >&5
4139 (eval $ac_compile) 2>&5
4141 echo "$as_me:4141: \$? = $ac_status" >&5
4142 (exit $ac_status); } &&
4143 { ac_try='test -s conftest.$ac_objext'
4144 { (eval echo "$as_me:4144: \"$ac_try\"") >&5
4147 echo "$as_me:4147: \$? = $ac_status" >&5
4148 (exit $ac_status); }; }; then
4151 echo "$as_me: failed program was:" >&5
4152 cat conftest.$ac_ext >&5
4155 rm -f conftest.$ac_objext conftest.$ac_ext
4156 CPPFLAGS=$cf_save_CPPFLAGS
4161 if test "$cf_have_incdir" = no ; then
4162 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4164 echo "${as_me:-configure}:4164: testing adding $cf_add_incdir to include-path ..." 1>&5
4166 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4168 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4169 test "$cf_top_incdir" = "$cf_add_incdir" && break
4170 cf_add_incdir="$cf_top_incdir"
4181 if test -n "$cf_cv_curses_dir/lib" ; then
4182 for cf_add_libdir in $cf_cv_curses_dir/lib
4184 if test $cf_add_libdir = /usr/lib ; then
4186 elif test -d $cf_add_libdir
4189 if test -n "$LDFLAGS$LIBS" ; then
4190 # a loop is needed to ensure we can add subdirs of existing dirs
4191 for cf_test_libdir in $LDFLAGS $LIBS ; do
4192 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4193 cf_have_libdir=yes; break
4197 if test "$cf_have_libdir" = no ; then
4198 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4200 echo "${as_me:-configure}:4200: testing adding $cf_add_libdir to library-path ..." 1>&5
4202 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4211 cf_ncuconfig_root=ncurses
4212 cf_have_ncuconfig=no
4214 if test "x${PKG_CONFIG:=none}" != xnone; then
4215 echo "$as_me:4215: checking pkg-config for $cf_ncuconfig_root" >&5
4216 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4217 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4218 echo "$as_me:4218: result: yes" >&5
4219 echo "${ECHO_T}yes" >&6
4221 echo "$as_me:4221: checking if the $cf_ncuconfig_root package files work" >&5
4222 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4223 cf_have_ncuconfig=unknown
4225 cf_save_CFLAGS="$CFLAGS"
4226 cf_save_CPPFLAGS="$CPPFLAGS"
4227 cf_save_LIBS="$LIBS"
4229 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
4230 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
4232 # while -W for passing linker flags is prevalent, it is not "standard".
4233 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4234 # incompatible _and_ non-standard -W option which gives an error. Work
4235 # around that pitfall.
4236 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4242 cf_new_extra_cppflags=
4244 for cf_add_cflags in $cf_pkg_cflags
4246 case $cf_fix_cppflags in
4248 case $cf_add_cflags in
4249 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4250 case $cf_add_cflags in
4252 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4254 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4255 && test -z "${cf_tst_cflags}" \
4256 && cf_fix_cppflags=yes
4258 if test $cf_fix_cppflags = yes ; then
4260 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4261 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4264 elif test "${cf_tst_cflags}" = "\"'" ; then
4266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4277 case $cf_add_cflags in
4279 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4281 CPPFLAGS=`echo "$CPPFLAGS" | \
4282 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4283 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4288 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4289 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4296 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4297 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4304 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4305 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4307 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4309 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4310 && test -z "${cf_tst_cflags}" \
4311 && cf_fix_cppflags=no
4316 if test -n "$cf_new_cflags" ; then
4318 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4319 CFLAGS="${CFLAGS}$cf_new_cflags"
4323 if test -n "$cf_new_cppflags" ; then
4325 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4326 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4330 if test -n "$cf_new_extra_cppflags" ; then
4332 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4333 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4340 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4342 for cf_add_1lib in $cf_add_0lib; do
4343 for cf_add_2lib in $cf_add_libs; do
4344 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4349 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4353 cat >conftest.$ac_ext <<_ACEOF
4354 #line 4354 "configure"
4355 #include "confdefs.h"
4356 #include <${cf_cv_ncurses_header:-curses.h}>
4360 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4365 rm -f conftest.$ac_objext conftest$ac_exeext
4366 if { (eval echo "$as_me:4366: \"$ac_link\"") >&5
4367 (eval $ac_link) 2>&5
4369 echo "$as_me:4369: \$? = $ac_status" >&5
4370 (exit $ac_status); } &&
4371 { ac_try='test -s conftest$ac_exeext'
4372 { (eval echo "$as_me:4372: \"$ac_try\"") >&5
4375 echo "$as_me:4375: \$? = $ac_status" >&5
4376 (exit $ac_status); }; }; then
4377 if test "$cross_compiling" = yes; then
4378 cf_test_ncuconfig=maybe
4380 cat >conftest.$ac_ext <<_ACEOF
4381 #line 4381 "configure"
4382 #include "confdefs.h"
4383 #include <${cf_cv_ncurses_header:-curses.h}>
4385 { char *xx = curses_version(); return (xx == 0); }
4387 rm -f conftest$ac_exeext
4388 if { (eval echo "$as_me:4388: \"$ac_link\"") >&5
4389 (eval $ac_link) 2>&5
4391 echo "$as_me:4391: \$? = $ac_status" >&5
4392 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4393 { (eval echo "$as_me:4393: \"$ac_try\"") >&5
4396 echo "$as_me:4396: \$? = $ac_status" >&5
4397 (exit $ac_status); }; }; then
4398 cf_test_ncuconfig=yes
4400 echo "$as_me: program exited with status $ac_status" >&5
4401 echo "$as_me: failed program was:" >&5
4402 cat conftest.$ac_ext >&5
4403 cf_test_ncuconfig=no
4405 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4408 echo "$as_me: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4410 cf_test_ncuconfig=no
4412 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4414 CFLAGS="$cf_save_CFLAGS"
4415 CPPFLAGS="$cf_save_CPPFLAGS"
4416 LIBS="$cf_save_LIBS"
4418 if test "x$cf_test_ncuconfig" != xyes; then
4419 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4420 cf_pkg_cflags="$cf_temp"
4421 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4422 cf_pkg_libs="$cf_temp"
4430 cf_new_extra_cppflags=
4432 for cf_add_cflags in $cf_pkg_cflags
4434 case $cf_fix_cppflags in
4436 case $cf_add_cflags in
4437 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4438 case $cf_add_cflags in
4440 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4442 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4443 && test -z "${cf_tst_cflags}" \
4444 && cf_fix_cppflags=yes
4446 if test $cf_fix_cppflags = yes ; then
4448 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4449 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4452 elif test "${cf_tst_cflags}" = "\"'" ; then
4454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4465 case $cf_add_cflags in
4467 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4469 CPPFLAGS=`echo "$CPPFLAGS" | \
4470 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4471 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4476 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4477 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4484 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4485 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4495 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4497 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4498 && test -z "${cf_tst_cflags}" \
4499 && cf_fix_cppflags=no
4504 if test -n "$cf_new_cflags" ; then
4506 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4507 CFLAGS="${CFLAGS}$cf_new_cflags"
4511 if test -n "$cf_new_cppflags" ; then
4513 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4514 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4518 if test -n "$cf_new_extra_cppflags" ; then
4520 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4521 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4528 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4530 for cf_add_1lib in $cf_add_0lib; do
4531 for cf_add_2lib in $cf_add_libs; do
4532 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4537 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4541 cat >conftest.$ac_ext <<_ACEOF
4542 #line 4542 "configure"
4543 #include "confdefs.h"
4544 #include <${cf_cv_ncurses_header:-curses.h}>
4548 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4553 rm -f conftest.$ac_objext conftest$ac_exeext
4554 if { (eval echo "$as_me:4554: \"$ac_link\"") >&5
4555 (eval $ac_link) 2>&5
4557 echo "$as_me:4557: \$? = $ac_status" >&5
4558 (exit $ac_status); } &&
4559 { ac_try='test -s conftest$ac_exeext'
4560 { (eval echo "$as_me:4560: \"$ac_try\"") >&5
4563 echo "$as_me:4563: \$? = $ac_status" >&5
4564 (exit $ac_status); }; }; then
4565 if test "$cross_compiling" = yes; then
4566 cf_have_ncuconfig=maybe
4568 cat >conftest.$ac_ext <<_ACEOF
4569 #line 4569 "configure"
4570 #include "confdefs.h"
4571 #include <${cf_cv_ncurses_header:-curses.h}>
4573 { char *xx = curses_version(); return (xx == 0); }
4575 rm -f conftest$ac_exeext
4576 if { (eval echo "$as_me:4576: \"$ac_link\"") >&5
4577 (eval $ac_link) 2>&5
4579 echo "$as_me:4579: \$? = $ac_status" >&5
4580 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4581 { (eval echo "$as_me:4581: \"$ac_try\"") >&5
4584 echo "$as_me:4584: \$? = $ac_status" >&5
4585 (exit $ac_status); }; }; then
4586 cf_have_ncuconfig=yes
4588 echo "$as_me: program exited with status $ac_status" >&5
4589 echo "$as_me: failed program was:" >&5
4590 cat conftest.$ac_ext >&5
4591 cf_have_ncuconfig=no
4593 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4596 echo "$as_me: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
4598 cf_have_ncuconfig=no
4600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4601 echo "$as_me:4601: result: $cf_have_ncuconfig" >&5
4602 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4603 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4604 if test "$cf_have_ncuconfig" != "yes"
4606 CPPFLAGS="$cf_save_CPPFLAGS"
4607 LIBS="$cf_save_LIBS"
4608 NCURSES_CONFIG_PKG=none
4611 cat >>confdefs.h <<\EOF
4615 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4617 echo "$as_me:4617: checking for terminfo header" >&5
4618 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4619 if test "${cf_cv_term_header+set}" = set; then
4620 echo $ECHO_N "(cached) $ECHO_C" >&6
4623 case ${cf_cv_ncurses_header} in
4624 (*/ncurses.h|*/ncursesw.h)
4625 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4628 cf_term_header=term.h
4632 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4634 cat >conftest.$ac_ext <<_ACEOF
4635 #line 4635 "configure"
4636 #include "confdefs.h"
4638 #include <${cf_cv_ncurses_header:-curses.h}>
4644 int x = auto_left_margin; (void)x
4649 rm -f conftest.$ac_objext
4650 if { (eval echo "$as_me:4650: \"$ac_compile\"") >&5
4651 (eval $ac_compile) 2>&5
4653 echo "$as_me:4653: \$? = $ac_status" >&5
4654 (exit $ac_status); } &&
4655 { ac_try='test -s conftest.$ac_objext'
4656 { (eval echo "$as_me:4656: \"$ac_try\"") >&5
4659 echo "$as_me:4659: \$? = $ac_status" >&5
4660 (exit $ac_status); }; }; then
4662 cf_cv_term_header="$cf_test"
4664 echo "$as_me: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4667 cf_cv_term_header=unknown
4670 rm -f conftest.$ac_objext conftest.$ac_ext
4671 test "$cf_cv_term_header" != unknown && break
4675 echo "$as_me:4675: result: $cf_cv_term_header" >&5
4676 echo "${ECHO_T}$cf_cv_term_header" >&6
4678 # Set definitions to allow ifdef'ing to accommodate subdirectories
4680 case $cf_cv_term_header in
4683 cat >>confdefs.h <<\EOF
4684 #define HAVE_TERM_H 1
4690 case $cf_cv_term_header in
4693 cat >>confdefs.h <<\EOF
4694 #define HAVE_NCURSES_TERM_H 1
4700 cat >>confdefs.h <<\EOF
4701 #define HAVE_NCURSESW_TERM_H 1
4710 echo "$as_me:4710: result: no" >&5
4711 echo "${ECHO_T}no" >&6
4712 NCURSES_CONFIG_PKG=none
4715 NCURSES_CONFIG_PKG=none
4718 if test "x$cf_have_ncuconfig" = "xno"; then
4719 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4721 if test -n "$ac_tool_prefix"; then
4722 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4724 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4725 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4726 echo "$as_me:4726: checking for $ac_word" >&5
4727 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4728 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4729 echo $ECHO_N "(cached) $ECHO_C" >&6
4731 if test -n "$NCURSES_CONFIG"; then
4732 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4734 ac_save_IFS=$IFS; IFS=$ac_path_separator
4736 for ac_dir in $ac_dummy; do
4738 test -z "$ac_dir" && ac_dir=.
4739 $as_executable_p "$ac_dir/$ac_word" || continue
4740 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4741 echo "$as_me:4741: found $ac_dir/$ac_word" >&5
4747 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4748 if test -n "$NCURSES_CONFIG"; then
4749 echo "$as_me:4749: result: $NCURSES_CONFIG" >&5
4750 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4752 echo "$as_me:4752: result: no" >&5
4753 echo "${ECHO_T}no" >&6
4756 test -n "$NCURSES_CONFIG" && break
4759 if test -z "$NCURSES_CONFIG"; then
4760 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4761 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4763 # Extract the first word of "$ac_prog", so it can be a program name with args.
4764 set dummy $ac_prog; ac_word=$2
4765 echo "$as_me:4765: checking for $ac_word" >&5
4766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4767 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4768 echo $ECHO_N "(cached) $ECHO_C" >&6
4770 if test -n "$ac_ct_NCURSES_CONFIG"; then
4771 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4773 ac_save_IFS=$IFS; IFS=$ac_path_separator
4775 for ac_dir in $ac_dummy; do
4777 test -z "$ac_dir" && ac_dir=.
4778 $as_executable_p "$ac_dir/$ac_word" || continue
4779 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4780 echo "$as_me:4780: found $ac_dir/$ac_word" >&5
4786 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4787 if test -n "$ac_ct_NCURSES_CONFIG"; then
4788 echo "$as_me:4788: result: $ac_ct_NCURSES_CONFIG" >&5
4789 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4791 echo "$as_me:4791: result: no" >&5
4792 echo "${ECHO_T}no" >&6
4795 test -n "$ac_ct_NCURSES_CONFIG" && break
4797 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4799 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4802 if test "$NCURSES_CONFIG" != none ; then
4807 cf_new_extra_cppflags=
4809 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
4811 case $cf_fix_cppflags in
4813 case $cf_add_cflags in
4814 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4815 case $cf_add_cflags in
4817 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4819 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4820 && test -z "${cf_tst_cflags}" \
4821 && cf_fix_cppflags=yes
4823 if test $cf_fix_cppflags = yes ; then
4825 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4826 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4829 elif test "${cf_tst_cflags}" = "\"'" ; then
4831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4842 case $cf_add_cflags in
4844 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4846 CPPFLAGS=`echo "$CPPFLAGS" | \
4847 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4848 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4853 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4854 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4861 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4862 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4869 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4870 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4872 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4874 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4875 && test -z "${cf_tst_cflags}" \
4876 && cf_fix_cppflags=no
4881 if test -n "$cf_new_cflags" ; then
4883 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4884 CFLAGS="${CFLAGS}$cf_new_cflags"
4888 if test -n "$cf_new_cppflags" ; then
4890 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4891 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4895 if test -n "$cf_new_extra_cppflags" ; then
4897 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4898 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4905 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4907 for cf_add_1lib in $cf_add_0lib; do
4908 for cf_add_2lib in $cf_add_libs; do
4909 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4914 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4918 # even with config script, some packages use no-override for curses.h
4920 echo "$as_me:4920: checking if we have identified curses headers" >&5
4921 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
4922 if test "${cf_cv_ncurses_header+set}" = set; then
4923 echo $ECHO_N "(cached) $ECHO_C" >&6
4926 cf_cv_ncurses_header=none
4928 ncurses.h ncurses/ncurses.h \
4929 curses.h ncurses/curses.h
4931 cat >conftest.$ac_ext <<_ACEOF
4932 #line 4932 "configure"
4933 #include "confdefs.h"
4934 #include <${cf_header}>
4938 initscr(); tgoto("?", 0,0)
4943 rm -f conftest.$ac_objext
4944 if { (eval echo "$as_me:4944: \"$ac_compile\"") >&5
4945 (eval $ac_compile) 2>&5
4947 echo "$as_me:4947: \$? = $ac_status" >&5
4948 (exit $ac_status); } &&
4949 { ac_try='test -s conftest.$ac_objext'
4950 { (eval echo "$as_me:4950: \"$ac_try\"") >&5
4953 echo "$as_me:4953: \$? = $ac_status" >&5
4954 (exit $ac_status); }; }; then
4955 cf_cv_ncurses_header=$cf_header; break
4957 echo "$as_me: failed program was:" >&5
4958 cat conftest.$ac_ext >&5
4960 rm -f conftest.$ac_objext conftest.$ac_ext
4964 echo "$as_me:4964: result: $cf_cv_ncurses_header" >&5
4965 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
4967 if test "$cf_cv_ncurses_header" = none ; then
4968 { { echo "$as_me:4968: error: No curses header-files found" >&5
4969 echo "$as_me: error: No curses header-files found" >&2;}
4970 { (exit 1); exit 1; }; }
4973 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
4975 for ac_header in $cf_cv_ncurses_header
4977 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4978 echo "$as_me:4978: checking for $ac_header" >&5
4979 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4980 if eval "test \"\${$as_ac_Header+set}\" = set"; then
4981 echo $ECHO_N "(cached) $ECHO_C" >&6
4983 cat >conftest.$ac_ext <<_ACEOF
4984 #line 4984 "configure"
4985 #include "confdefs.h"
4986 #include <$ac_header>
4988 if { (eval echo "$as_me:4988: \"$ac_cpp conftest.$ac_ext\"") >&5
4989 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4991 egrep -v '^ *\+' conftest.er1 >conftest.err
4993 cat conftest.err >&5
4994 echo "$as_me:4994: \$? = $ac_status" >&5
4995 (exit $ac_status); } >/dev/null; then
4996 if test -s conftest.err; then
4997 ac_cpp_err=$ac_c_preproc_warn_flag
5004 if test -z "$ac_cpp_err"; then
5005 eval "$as_ac_Header=yes"
5007 echo "$as_me: failed program was:" >&5
5008 cat conftest.$ac_ext >&5
5009 eval "$as_ac_Header=no"
5011 rm -f conftest.err conftest.$ac_ext
5013 echo "$as_me:5013: result: `eval echo '${'$as_ac_Header'}'`" >&5
5014 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5015 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5016 cat >>confdefs.h <<EOF
5017 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5023 cat >>confdefs.h <<\EOF
5027 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5029 cat >>confdefs.h <<EOF
5030 #define $cf_nculib_ROOT 1
5033 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5037 cf_ncuhdr_root=ncurses
5039 test -n "$cf_cv_curses_dir" && \
5040 test "$cf_cv_curses_dir" != "no" && { \
5042 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5043 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5045 while test $cf_add_incdir != /usr/include
5047 if test -d $cf_add_incdir
5050 if test -n "$CFLAGS$CPPFLAGS" ; then
5051 # a loop is needed to ensure we can add subdirs of existing dirs
5052 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5053 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5054 cf_have_incdir=yes; break
5059 if test "$cf_have_incdir" = no ; then
5060 if test "$cf_add_incdir" = /usr/local/include ; then
5061 if test "$GCC" = yes
5063 cf_save_CPPFLAGS=$CPPFLAGS
5065 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5066 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5068 cat >conftest.$ac_ext <<_ACEOF
5069 #line 5069 "configure"
5070 #include "confdefs.h"
5080 rm -f conftest.$ac_objext
5081 if { (eval echo "$as_me:5081: \"$ac_compile\"") >&5
5082 (eval $ac_compile) 2>&5
5084 echo "$as_me:5084: \$? = $ac_status" >&5
5085 (exit $ac_status); } &&
5086 { ac_try='test -s conftest.$ac_objext'
5087 { (eval echo "$as_me:5087: \"$ac_try\"") >&5
5090 echo "$as_me:5090: \$? = $ac_status" >&5
5091 (exit $ac_status); }; }; then
5094 echo "$as_me: failed program was:" >&5
5095 cat conftest.$ac_ext >&5
5098 rm -f conftest.$ac_objext conftest.$ac_ext
5099 CPPFLAGS=$cf_save_CPPFLAGS
5104 if test "$cf_have_incdir" = no ; then
5105 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5107 echo "${as_me:-configure}:5107: testing adding $cf_add_incdir to include-path ..." 1>&5
5109 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5111 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5112 test "$cf_top_incdir" = "$cf_add_incdir" && break
5113 cf_add_incdir="$cf_top_incdir"
5126 echo "$as_me:5126: checking for $cf_ncuhdr_root header in include-path" >&5
5127 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5128 if test "${cf_cv_ncurses_h+set}" = set; then
5129 echo $ECHO_N "(cached) $ECHO_C" >&6
5132 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5133 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5134 for cf_header in $cf_header_list
5137 cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5141 #include <$cf_header>
5146 #ifdef NCURSES_VERSION
5148 printf("%s\n", NCURSES_VERSION);
5161 rm -f conftest.$ac_objext
5162 if { (eval echo "$as_me:5162: \"$ac_compile\"") >&5
5163 (eval $ac_compile) 2>&5
5165 echo "$as_me:5165: \$? = $ac_status" >&5
5166 (exit $ac_status); } &&
5167 { ac_try='test -s conftest.$ac_objext'
5168 { (eval echo "$as_me:5168: \"$ac_try\"") >&5
5171 echo "$as_me:5171: \$? = $ac_status" >&5
5172 (exit $ac_status); }; }; then
5173 cf_cv_ncurses_h=$cf_header
5176 echo "$as_me: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
5180 rm -f conftest.$ac_objext conftest.$ac_ext
5182 test "$cf_cv_ncurses_h" != no && break
5186 echo "$as_me:5186: result: $cf_cv_ncurses_h" >&5
5187 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5189 if test "$cf_cv_ncurses_h" != no ; then
5190 cf_cv_ncurses_header=$cf_cv_ncurses_h
5193 echo "$as_me:5193: checking for $cf_ncuhdr_root include-path" >&5
5194 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5195 if test "${cf_cv_ncurses_h2+set}" = set; then
5196 echo $ECHO_N "(cached) $ECHO_C" >&6
5199 test -n "$verbose" && echo
5203 # collect the current set of include-directories from compiler flags
5204 cf_header_path_list=""
5205 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5206 for cf_header_path in $CPPFLAGS $CFLAGS
5208 case $cf_header_path in
5210 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5212 test "x$cf_header_path" != "xNONE" && \
5213 test -d "$cf_header_path" && \
5215 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5216 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5217 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5218 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5219 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5220 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"
5223 cf_header_path_list="$cf_header_path_list $cf_search"
5229 # add the variations for the package we are looking for
5233 test "x$prefix" != "xNONE" && \
5234 test -d "$prefix" && \
5236 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5237 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5238 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5239 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5240 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5241 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5244 for cf_subdir_prefix in \
5253 test "x$cf_subdir_prefix" != "x$prefix" && \
5254 test -d "$cf_subdir_prefix" && \
5255 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
5256 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5257 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
5258 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5259 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5260 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5261 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"
5266 test "$includedir" != NONE && \
5267 test "$includedir" != "/usr/include" && \
5268 test -d "$includedir" && {
5269 test -d $includedir && cf_search="$cf_search $includedir"
5270 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5273 test "$oldincludedir" != NONE && \
5274 test "$oldincludedir" != "/usr/include" && \
5275 test -d "$oldincludedir" && {
5276 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5277 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5280 cf_search="$cf_search $cf_header_path_list"
5282 test -n "$verbose" && echo search path $cf_search
5283 cf_save2_CPPFLAGS="$CPPFLAGS"
5284 for cf_incdir in $cf_search
5287 if test -n "$cf_incdir" ; then
5288 for cf_add_incdir in $cf_incdir
5290 while test $cf_add_incdir != /usr/include
5292 if test -d $cf_add_incdir
5295 if test -n "$CFLAGS$CPPFLAGS" ; then
5296 # a loop is needed to ensure we can add subdirs of existing dirs
5297 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5298 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5299 cf_have_incdir=yes; break
5304 if test "$cf_have_incdir" = no ; then
5305 if test "$cf_add_incdir" = /usr/local/include ; then
5306 if test "$GCC" = yes
5308 cf_save_CPPFLAGS=$CPPFLAGS
5310 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5311 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5313 cat >conftest.$ac_ext <<_ACEOF
5314 #line 5314 "configure"
5315 #include "confdefs.h"
5325 rm -f conftest.$ac_objext
5326 if { (eval echo "$as_me:5326: \"$ac_compile\"") >&5
5327 (eval $ac_compile) 2>&5
5329 echo "$as_me:5329: \$? = $ac_status" >&5
5330 (exit $ac_status); } &&
5331 { ac_try='test -s conftest.$ac_objext'
5332 { (eval echo "$as_me:5332: \"$ac_try\"") >&5
5335 echo "$as_me:5335: \$? = $ac_status" >&5
5336 (exit $ac_status); }; }; then
5339 echo "$as_me: failed program was:" >&5
5340 cat conftest.$ac_ext >&5
5343 rm -f conftest.$ac_objext conftest.$ac_ext
5344 CPPFLAGS=$cf_save_CPPFLAGS
5349 if test "$cf_have_incdir" = no ; then
5350 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5352 echo "${as_me:-configure}:5352: testing adding $cf_add_incdir to include-path ..." 1>&5
5354 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5356 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5357 test "$cf_top_incdir" = "$cf_add_incdir" && break
5358 cf_add_incdir="$cf_top_incdir"
5374 cat >conftest.$ac_ext <<_ACEOF
5375 #line 5375 "configure"
5376 #include "confdefs.h"
5378 #include <$cf_header>
5383 #ifdef NCURSES_VERSION
5385 printf("%s\n", NCURSES_VERSION);
5398 rm -f conftest.$ac_objext
5399 if { (eval echo "$as_me:5399: \"$ac_compile\"") >&5
5400 (eval $ac_compile) 2>&5
5402 echo "$as_me:5402: \$? = $ac_status" >&5
5403 (exit $ac_status); } &&
5404 { ac_try='test -s conftest.$ac_objext'
5405 { (eval echo "$as_me:5405: \"$ac_try\"") >&5
5408 echo "$as_me:5408: \$? = $ac_status" >&5
5409 (exit $ac_status); }; }; then
5410 cf_cv_ncurses_h2=$cf_header
5413 echo "$as_me: failed program was:" >&5
5414 cat conftest.$ac_ext >&5
5417 rm -f conftest.$ac_objext conftest.$ac_ext
5419 if test "$cf_cv_ncurses_h2" != no ; then
5420 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5421 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5424 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5426 CPPFLAGS="$cf_save2_CPPFLAGS"
5427 test "$cf_cv_ncurses_h2" != no && break
5429 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5429: error: not found" >&5
5430 echo "$as_me: error: not found" >&2;}
5431 { (exit 1); exit 1; }; }
5434 echo "$as_me:5434: result: $cf_cv_ncurses_h2" >&5
5435 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5437 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5438 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5439 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5440 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5443 if test -n "$cf_1st_incdir" ; then
5444 for cf_add_incdir in $cf_1st_incdir
5446 while test $cf_add_incdir != /usr/include
5448 if test -d $cf_add_incdir
5451 if test -n "$CFLAGS$CPPFLAGS" ; then
5452 # a loop is needed to ensure we can add subdirs of existing dirs
5453 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5454 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5455 cf_have_incdir=yes; break
5460 if test "$cf_have_incdir" = no ; then
5461 if test "$cf_add_incdir" = /usr/local/include ; then
5462 if test "$GCC" = yes
5464 cf_save_CPPFLAGS=$CPPFLAGS
5466 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5467 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5469 cat >conftest.$ac_ext <<_ACEOF
5470 #line 5470 "configure"
5471 #include "confdefs.h"
5481 rm -f conftest.$ac_objext
5482 if { (eval echo "$as_me:5482: \"$ac_compile\"") >&5
5483 (eval $ac_compile) 2>&5
5485 echo "$as_me:5485: \$? = $ac_status" >&5
5486 (exit $ac_status); } &&
5487 { ac_try='test -s conftest.$ac_objext'
5488 { (eval echo "$as_me:5488: \"$ac_try\"") >&5
5491 echo "$as_me:5491: \$? = $ac_status" >&5
5492 (exit $ac_status); }; }; then
5495 echo "$as_me: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5499 rm -f conftest.$ac_objext conftest.$ac_ext
5500 CPPFLAGS=$cf_save_CPPFLAGS
5505 if test "$cf_have_incdir" = no ; then
5506 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5508 echo "${as_me:-configure}:5508: testing adding $cf_add_incdir to include-path ..." 1>&5
5510 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5512 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5513 test "$cf_top_incdir" = "$cf_add_incdir" && break
5514 cf_add_incdir="$cf_top_incdir"
5527 # Set definitions to allow ifdef'ing for ncurses.h
5529 case $cf_cv_ncurses_header in
5532 cat >>confdefs.h <<\EOF
5533 #define HAVE_NCURSES_H 1
5539 case $cf_cv_ncurses_header in
5540 (ncurses/curses.h|ncurses/ncurses.h)
5542 cat >>confdefs.h <<\EOF
5543 #define HAVE_NCURSES_NCURSES_H 1
5547 (ncursesw/curses.h|ncursesw/ncurses.h)
5549 cat >>confdefs.h <<\EOF
5550 #define HAVE_NCURSESW_NCURSES_H 1
5556 echo "$as_me:5556: checking for terminfo header" >&5
5557 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5558 if test "${cf_cv_term_header+set}" = set; then
5559 echo $ECHO_N "(cached) $ECHO_C" >&6
5562 case ${cf_cv_ncurses_header} in
5563 (*/ncurses.h|*/ncursesw.h)
5564 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5567 cf_term_header=term.h
5571 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5573 cat >conftest.$ac_ext <<_ACEOF
5574 #line 5574 "configure"
5575 #include "confdefs.h"
5577 #include <${cf_cv_ncurses_header:-curses.h}>
5583 int x = auto_left_margin; (void)x
5588 rm -f conftest.$ac_objext
5589 if { (eval echo "$as_me:5589: \"$ac_compile\"") >&5
5590 (eval $ac_compile) 2>&5
5592 echo "$as_me:5592: \$? = $ac_status" >&5
5593 (exit $ac_status); } &&
5594 { ac_try='test -s conftest.$ac_objext'
5595 { (eval echo "$as_me:5595: \"$ac_try\"") >&5
5598 echo "$as_me:5598: \$? = $ac_status" >&5
5599 (exit $ac_status); }; }; then
5601 cf_cv_term_header="$cf_test"
5603 echo "$as_me: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5606 cf_cv_term_header=unknown
5609 rm -f conftest.$ac_objext conftest.$ac_ext
5610 test "$cf_cv_term_header" != unknown && break
5614 echo "$as_me:5614: result: $cf_cv_term_header" >&5
5615 echo "${ECHO_T}$cf_cv_term_header" >&6
5617 # Set definitions to allow ifdef'ing to accommodate subdirectories
5619 case $cf_cv_term_header in
5622 cat >>confdefs.h <<\EOF
5623 #define HAVE_TERM_H 1
5629 case $cf_cv_term_header in
5632 cat >>confdefs.h <<\EOF
5633 #define HAVE_NCURSES_TERM_H 1
5639 cat >>confdefs.h <<\EOF
5640 #define HAVE_NCURSESW_TERM_H 1
5646 # some applications need this, but should check for NCURSES_VERSION
5648 cat >>confdefs.h <<\EOF
5652 echo "$as_me:5652: checking for ncurses version" >&5
5653 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5654 if test "${cf_cv_ncurses_version+set}" = set; then
5655 echo $ECHO_N "(cached) $ECHO_C" >&6
5658 cf_cv_ncurses_version=no
5661 if test "$cross_compiling" = yes; then
5663 # This will not work if the preprocessor splits the line after the
5664 # Autoconf token. The 'unproto' program does that.
5665 cat > conftest.$ac_ext <<EOF
5666 #include <${cf_cv_ncurses_header:-curses.h}>
5668 #ifdef NCURSES_VERSION
5669 Autoconf NCURSES_VERSION
5677 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5678 { (eval echo "$as_me:5678: \"$cf_try\"") >&5
5681 echo "$as_me:5681: \$? = $ac_status" >&5
5682 (exit $ac_status); }
5683 if test -f conftest.out ; then
5684 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5685 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5690 cat >conftest.$ac_ext <<_ACEOF
5691 #line 5691 "configure"
5692 #include "confdefs.h"
5694 #include <${cf_cv_ncurses_header:-curses.h}>
5698 FILE *fp = fopen("$cf_tempfile", "w");
5699 #ifdef NCURSES_VERSION
5700 # ifdef NCURSES_VERSION_PATCH
5701 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5703 fprintf(fp, "%s\n", NCURSES_VERSION);
5707 fprintf(fp, "old\n");
5712 ${cf_cv_main_return:-return}(0);
5715 rm -f conftest$ac_exeext
5716 if { (eval echo "$as_me:5716: \"$ac_link\"") >&5
5717 (eval $ac_link) 2>&5
5719 echo "$as_me:5719: \$? = $ac_status" >&5
5720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5721 { (eval echo "$as_me:5721: \"$ac_try\"") >&5
5724 echo "$as_me:5724: \$? = $ac_status" >&5
5725 (exit $ac_status); }; }; then
5727 cf_cv_ncurses_version=`cat $cf_tempfile`
5729 echo "$as_me: program exited with status $ac_status" >&5
5730 echo "$as_me: failed program was:" >&5
5731 cat conftest.$ac_ext >&5
5733 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5738 echo "$as_me:5738: result: $cf_cv_ncurses_version" >&5
5739 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5740 test "$cf_cv_ncurses_version" = no ||
5741 cat >>confdefs.h <<\EOF
5745 cf_nculib_root=ncurses
5746 # This works, except for the special case where we find gpm, but
5747 # ncurses is in a nonstandard location via $LIBS, and we really want
5750 cf_ncurses_SAVE="$LIBS"
5751 echo "$as_me:5751: checking for Gpm_Open in -lgpm" >&5
5752 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5753 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5754 echo $ECHO_N "(cached) $ECHO_C" >&6
5756 ac_check_lib_save_LIBS=$LIBS
5758 cat >conftest.$ac_ext <<_ACEOF
5759 #line 5759 "configure"
5760 #include "confdefs.h"
5762 /* Override any gcc2 internal prototype to avoid an error. */
5766 /* We use char because int might match the return type of a gcc2
5767 builtin and then its argument prototype would still apply. */
5777 rm -f conftest.$ac_objext conftest$ac_exeext
5778 if { (eval echo "$as_me:5778: \"$ac_link\"") >&5
5779 (eval $ac_link) 2>&5
5781 echo "$as_me:5781: \$? = $ac_status" >&5
5782 (exit $ac_status); } &&
5783 { ac_try='test -s conftest$ac_exeext'
5784 { (eval echo "$as_me:5784: \"$ac_try\"") >&5
5787 echo "$as_me:5787: \$? = $ac_status" >&5
5788 (exit $ac_status); }; }; then
5789 ac_cv_lib_gpm_Gpm_Open=yes
5791 echo "$as_me: failed program was:" >&5
5792 cat conftest.$ac_ext >&5
5793 ac_cv_lib_gpm_Gpm_Open=no
5795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5796 LIBS=$ac_check_lib_save_LIBS
5798 echo "$as_me:5798: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5799 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5800 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5801 echo "$as_me:5801: checking for initscr in -lgpm" >&5
5802 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5803 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5804 echo $ECHO_N "(cached) $ECHO_C" >&6
5806 ac_check_lib_save_LIBS=$LIBS
5808 cat >conftest.$ac_ext <<_ACEOF
5809 #line 5809 "configure"
5810 #include "confdefs.h"
5812 /* Override any gcc2 internal prototype to avoid an error. */
5816 /* We use char because int might match the return type of a gcc2
5817 builtin and then its argument prototype would still apply. */
5827 rm -f conftest.$ac_objext conftest$ac_exeext
5828 if { (eval echo "$as_me:5828: \"$ac_link\"") >&5
5829 (eval $ac_link) 2>&5
5831 echo "$as_me:5831: \$? = $ac_status" >&5
5832 (exit $ac_status); } &&
5833 { ac_try='test -s conftest$ac_exeext'
5834 { (eval echo "$as_me:5834: \"$ac_try\"") >&5
5837 echo "$as_me:5837: \$? = $ac_status" >&5
5838 (exit $ac_status); }; }; then
5839 ac_cv_lib_gpm_initscr=yes
5841 echo "$as_me: failed program was:" >&5
5842 cat conftest.$ac_ext >&5
5843 ac_cv_lib_gpm_initscr=no
5845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5846 LIBS=$ac_check_lib_save_LIBS
5848 echo "$as_me:5848: result: $ac_cv_lib_gpm_initscr" >&5
5849 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
5850 if test $ac_cv_lib_gpm_initscr = yes; then
5851 LIBS="$cf_ncurses_SAVE"
5853 cf_ncurses_LIBS="-lgpm"
5860 # This is only necessary if you are linking against an obsolete
5861 # version of ncurses (but it should do no harm, since it's static).
5862 if test "$cf_nculib_root" = ncurses ; then
5863 echo "$as_me:5863: checking for tgoto in -lmytinfo" >&5
5864 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5865 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5866 echo $ECHO_N "(cached) $ECHO_C" >&6
5868 ac_check_lib_save_LIBS=$LIBS
5869 LIBS="-lmytinfo $LIBS"
5870 cat >conftest.$ac_ext <<_ACEOF
5871 #line 5871 "configure"
5872 #include "confdefs.h"
5874 /* Override any gcc2 internal prototype to avoid an error. */
5878 /* We use char because int might match the return type of a gcc2
5879 builtin and then its argument prototype would still apply. */
5889 rm -f conftest.$ac_objext conftest$ac_exeext
5890 if { (eval echo "$as_me:5890: \"$ac_link\"") >&5
5891 (eval $ac_link) 2>&5
5893 echo "$as_me:5893: \$? = $ac_status" >&5
5894 (exit $ac_status); } &&
5895 { ac_try='test -s conftest$ac_exeext'
5896 { (eval echo "$as_me:5896: \"$ac_try\"") >&5
5899 echo "$as_me:5899: \$? = $ac_status" >&5
5900 (exit $ac_status); }; }; then
5901 ac_cv_lib_mytinfo_tgoto=yes
5903 echo "$as_me: failed program was:" >&5
5904 cat conftest.$ac_ext >&5
5905 ac_cv_lib_mytinfo_tgoto=no
5907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5908 LIBS=$ac_check_lib_save_LIBS
5910 echo "$as_me:5910: result: $ac_cv_lib_mytinfo_tgoto" >&5
5911 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5912 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5913 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5923 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5925 for cf_add_1lib in $cf_add_0lib; do
5926 for cf_add_2lib in $cf_add_libs; do
5927 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5932 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5936 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5942 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5944 for cf_add_1lib in $cf_add_0lib; do
5945 for cf_add_2lib in $cf_add_libs; do
5946 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5951 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5957 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5959 echo "$as_me:5959: checking for initscr" >&5
5960 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
5961 if test "${ac_cv_func_initscr+set}" = set; then
5962 echo $ECHO_N "(cached) $ECHO_C" >&6
5964 cat >conftest.$ac_ext <<_ACEOF
5965 #line 5965 "configure"
5966 #include "confdefs.h"
5967 #define initscr autoconf_temporary
5968 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
5975 /* We use char because int might match the return type of a gcc2
5976 builtin and then its argument prototype would still apply. */
5977 char initscr (void);
5983 /* The GNU C library defines stubs for functions which it implements
5984 to always fail with ENOSYS. Some functions are actually named
5985 something starting with __ and the normal name is an alias. */
5986 #if defined (__stub_initscr) || defined (__stub___initscr)
5987 #error found stub for initscr
5995 rm -f conftest.$ac_objext conftest$ac_exeext
5996 if { (eval echo "$as_me:5996: \"$ac_link\"") >&5
5997 (eval $ac_link) 2>&5
5999 echo "$as_me:5999: \$? = $ac_status" >&5
6000 (exit $ac_status); } &&
6001 { ac_try='test -s conftest$ac_exeext'
6002 { (eval echo "$as_me:6002: \"$ac_try\"") >&5
6005 echo "$as_me:6005: \$? = $ac_status" >&5
6006 (exit $ac_status); }; }; then
6007 ac_cv_func_initscr=yes
6009 echo "$as_me: failed program was:" >&5
6010 cat conftest.$ac_ext >&5
6011 ac_cv_func_initscr=no
6013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6015 echo "$as_me:6015: result: $ac_cv_func_initscr" >&5
6016 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6017 if test $ac_cv_func_initscr = yes; then
6018 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6021 cf_save_LIBS="$LIBS"
6022 echo "$as_me:6022: checking for initscr in -l$cf_nculib_root" >&5
6023 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6024 LIBS="-l$cf_nculib_root $LIBS"
6025 cat >conftest.$ac_ext <<_ACEOF
6026 #line 6026 "configure"
6027 #include "confdefs.h"
6028 #include <${cf_cv_ncurses_header:-curses.h}>
6037 rm -f conftest.$ac_objext conftest$ac_exeext
6038 if { (eval echo "$as_me:6038: \"$ac_link\"") >&5
6039 (eval $ac_link) 2>&5
6041 echo "$as_me:6041: \$? = $ac_status" >&5
6042 (exit $ac_status); } &&
6043 { ac_try='test -s conftest$ac_exeext'
6044 { (eval echo "$as_me:6044: \"$ac_try\"") >&5
6047 echo "$as_me:6047: \$? = $ac_status" >&5
6048 (exit $ac_status); }; }; then
6049 echo "$as_me:6049: result: yes" >&5
6050 echo "${ECHO_T}yes" >&6
6051 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6054 echo "$as_me: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6056 echo "$as_me:6056: result: no" >&5
6057 echo "${ECHO_T}no" >&6
6060 cf_library_path_list=""
6061 if test -n "${LDFLAGS}${LIBS}" ; then
6062 for cf_library_path in $LDFLAGS $LIBS
6064 case $cf_library_path in
6066 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6068 test "x$cf_library_path" != "xNONE" && \
6069 test -d "$cf_library_path" && \
6071 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6072 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6073 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6074 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6075 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6076 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"
6079 cf_library_path_list="$cf_library_path_list $cf_search"
6087 test "x$prefix" != "xNONE" && \
6088 test -d "$prefix" && \
6090 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6091 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6092 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6093 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6094 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6095 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6098 for cf_subdir_prefix in \
6107 test "x$cf_subdir_prefix" != "x$prefix" && \
6108 test -d "$cf_subdir_prefix" && \
6109 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6110 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6111 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6112 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6113 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6114 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6115 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"
6120 cf_search="$cf_library_path_list $cf_search"
6122 for cf_libdir in $cf_search
6124 echo "$as_me:6124: checking for -l$cf_nculib_root in $cf_libdir" >&5
6125 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6126 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6127 cat >conftest.$ac_ext <<_ACEOF
6128 #line 6128 "configure"
6129 #include "confdefs.h"
6130 #include <${cf_cv_ncurses_header:-curses.h}>
6139 rm -f conftest.$ac_objext conftest$ac_exeext
6140 if { (eval echo "$as_me:6140: \"$ac_link\"") >&5
6141 (eval $ac_link) 2>&5
6143 echo "$as_me:6143: \$? = $ac_status" >&5
6144 (exit $ac_status); } &&
6145 { ac_try='test -s conftest$ac_exeext'
6146 { (eval echo "$as_me:6146: \"$ac_try\"") >&5
6149 echo "$as_me:6149: \$? = $ac_status" >&5
6150 (exit $ac_status); }; }; then
6151 echo "$as_me:6151: result: yes" >&5
6152 echo "${ECHO_T}yes" >&6
6153 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6156 echo "$as_me: failed program was:" >&5
6157 cat conftest.$ac_ext >&5
6158 echo "$as_me:6158: result: no" >&5
6159 echo "${ECHO_T}no" >&6
6160 LIBS="$cf_save_LIBS"
6162 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6170 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6172 if test $cf_found_library = no ; then
6173 { { echo "$as_me:6173: error: Cannot link $cf_nculib_root library" >&5
6174 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6175 { (exit 1); exit 1; }; }
6180 if test -n "$cf_ncurses_LIBS" ; then
6181 echo "$as_me:6181: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6182 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6183 cf_ncurses_SAVE="$LIBS"
6184 for p in $cf_ncurses_LIBS ; do
6185 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6186 if test "$q" != "$LIBS" ; then
6190 cat >conftest.$ac_ext <<_ACEOF
6191 #line 6191 "configure"
6192 #include "confdefs.h"
6193 #include <${cf_cv_ncurses_header:-curses.h}>
6197 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6202 rm -f conftest.$ac_objext conftest$ac_exeext
6203 if { (eval echo "$as_me:6203: \"$ac_link\"") >&5
6204 (eval $ac_link) 2>&5
6206 echo "$as_me:6206: \$? = $ac_status" >&5
6207 (exit $ac_status); } &&
6208 { ac_try='test -s conftest$ac_exeext'
6209 { (eval echo "$as_me:6209: \"$ac_try\"") >&5
6212 echo "$as_me:6212: \$? = $ac_status" >&5
6213 (exit $ac_status); }; }; then
6214 echo "$as_me:6214: result: yes" >&5
6215 echo "${ECHO_T}yes" >&6
6217 echo "$as_me: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6219 echo "$as_me:6219: result: no" >&5
6220 echo "${ECHO_T}no" >&6
6221 LIBS="$cf_ncurses_SAVE"
6223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6226 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6228 cat >>confdefs.h <<EOF
6229 #define $cf_nculib_ROOT 1
6237 echo "$as_me:6237: checking if you want wide-character code" >&5
6238 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6240 # Check whether --enable-widec or --disable-widec was given.
6241 if test "${enable_widec+set}" = set; then
6242 enableval="$enable_widec"
6243 with_widec=$enableval
6247 echo "$as_me:6247: result: $with_widec" >&5
6248 echo "${ECHO_T}$with_widec" >&6
6249 if test "$with_widec" = yes ; then
6251 echo "$as_me:6251: checking for multibyte character support" >&5
6252 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6253 if test "${cf_cv_utf8_lib+set}" = set; then
6254 echo $ECHO_N "(cached) $ECHO_C" >&6
6257 cf_save_LIBS="$LIBS"
6258 cat >conftest.$ac_ext <<_ACEOF
6259 #line 6259 "configure"
6260 #include "confdefs.h"
6271 rm -f conftest.$ac_objext conftest$ac_exeext
6272 if { (eval echo "$as_me:6272: \"$ac_link\"") >&5
6273 (eval $ac_link) 2>&5
6275 echo "$as_me:6275: \$? = $ac_status" >&5
6276 (exit $ac_status); } &&
6277 { ac_try='test -s conftest$ac_exeext'
6278 { (eval echo "$as_me:6278: \"$ac_try\"") >&5
6281 echo "$as_me:6281: \$? = $ac_status" >&5
6282 (exit $ac_status); }; }; then
6285 echo "$as_me: failed program was:" >&5
6286 cat conftest.$ac_ext >&5
6288 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6289 # will be set on completion of the AC_TRY_LINK below.
6290 cf_cv_header_path_utf8=
6291 cf_cv_library_path_utf8=
6293 echo "${as_me:-configure}:6293: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6295 cf_save_LIBS="$LIBS"
6297 cat >conftest.$ac_ext <<_ACEOF
6298 #line 6298 "configure"
6299 #include "confdefs.h"
6301 #include <libutf8.h>
6310 rm -f conftest.$ac_objext conftest$ac_exeext
6311 if { (eval echo "$as_me:6311: \"$ac_link\"") >&5
6312 (eval $ac_link) 2>&5
6314 echo "$as_me:6314: \$? = $ac_status" >&5
6315 (exit $ac_status); } &&
6316 { ac_try='test -s conftest$ac_exeext'
6317 { (eval echo "$as_me:6317: \"$ac_try\"") >&5
6320 echo "$as_me:6320: \$? = $ac_status" >&5
6321 (exit $ac_status); }; }; then
6323 cf_cv_find_linkage_utf8=yes
6324 cf_cv_header_path_utf8=/usr/include
6325 cf_cv_library_path_utf8=/usr/lib
6328 echo "$as_me: failed program was:" >&5
6329 cat conftest.$ac_ext >&5
6331 LIBS="-lutf8 $cf_save_LIBS"
6333 cat >conftest.$ac_ext <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6337 #include <libutf8.h>
6346 rm -f conftest.$ac_objext conftest$ac_exeext
6347 if { (eval echo "$as_me:6347: \"$ac_link\"") >&5
6348 (eval $ac_link) 2>&5
6350 echo "$as_me:6350: \$? = $ac_status" >&5
6351 (exit $ac_status); } &&
6352 { ac_try='test -s conftest$ac_exeext'
6353 { (eval echo "$as_me:6353: \"$ac_try\"") >&5
6356 echo "$as_me:6356: \$? = $ac_status" >&5
6357 (exit $ac_status); }; }; then
6359 cf_cv_find_linkage_utf8=yes
6360 cf_cv_header_path_utf8=/usr/include
6361 cf_cv_library_path_utf8=/usr/lib
6362 cf_cv_library_file_utf8="-lutf8"
6365 echo "$as_me: failed program was:" >&5
6366 cat conftest.$ac_ext >&5
6368 cf_cv_find_linkage_utf8=no
6369 LIBS="$cf_save_LIBS"
6371 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6373 echo "${as_me:-configure}:6373: testing find linkage for utf8 library ..." 1>&5
6375 echo "${as_me:-configure}:6375: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6377 cf_save_CPPFLAGS="$CPPFLAGS"
6378 cf_test_CPPFLAGS="$CPPFLAGS"
6382 # collect the current set of include-directories from compiler flags
6383 cf_header_path_list=""
6384 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6385 for cf_header_path in $CPPFLAGS $CFLAGS
6387 case $cf_header_path in
6389 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6391 test "x$cf_header_path" != "xNONE" && \
6392 test -d "$cf_header_path" && \
6394 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6395 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6396 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
6397 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
6398 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
6399 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6402 cf_header_path_list="$cf_header_path_list $cf_search"
6408 # add the variations for the package we are looking for
6412 test "x$prefix" != "xNONE" && \
6413 test -d "$prefix" && \
6415 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6416 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6417 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
6418 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
6419 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
6420 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
6423 for cf_subdir_prefix in \
6432 test "x$cf_subdir_prefix" != "x$prefix" && \
6433 test -d "$cf_subdir_prefix" && \
6434 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6435 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6436 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
6437 test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6438 test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6439 test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6440 test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6445 test "$includedir" != NONE && \
6446 test "$includedir" != "/usr/include" && \
6447 test -d "$includedir" && {
6448 test -d $includedir && cf_search="$cf_search $includedir"
6449 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
6452 test "$oldincludedir" != NONE && \
6453 test "$oldincludedir" != "/usr/include" && \
6454 test -d "$oldincludedir" && {
6455 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6456 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
6459 cf_search="$cf_search $cf_header_path_list"
6461 for cf_cv_header_path_utf8 in $cf_search
6463 if test -d $cf_cv_header_path_utf8 ; then
6464 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6466 echo "${as_me:-configure}:6466: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6468 CPPFLAGS="$cf_save_CPPFLAGS"
6470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6471 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6473 cat >conftest.$ac_ext <<_ACEOF
6474 #line 6474 "configure"
6475 #include "confdefs.h"
6477 #include <libutf8.h>
6486 rm -f conftest.$ac_objext
6487 if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5
6488 (eval $ac_compile) 2>&5
6490 echo "$as_me:6490: \$? = $ac_status" >&5
6491 (exit $ac_status); } &&
6492 { ac_try='test -s conftest.$ac_objext'
6493 { (eval echo "$as_me:6493: \"$ac_try\"") >&5
6496 echo "$as_me:6496: \$? = $ac_status" >&5
6497 (exit $ac_status); }; }; then
6499 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6501 echo "${as_me:-configure}:6501: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6503 cf_cv_find_linkage_utf8=maybe
6504 cf_test_CPPFLAGS="$CPPFLAGS"
6507 echo "$as_me: failed program was:" >&5
6508 cat conftest.$ac_ext >&5
6510 CPPFLAGS="$cf_save_CPPFLAGS"
6513 rm -f conftest.$ac_objext conftest.$ac_ext
6517 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6519 echo "${as_me:-configure}:6519: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6521 cf_save_LIBS="$LIBS"
6522 cf_save_LDFLAGS="$LDFLAGS"
6524 if test "$cf_cv_find_linkage_utf8" != yes ; then
6527 cf_library_path_list=""
6528 if test -n "${LDFLAGS}${LIBS}" ; then
6529 for cf_library_path in $LDFLAGS $LIBS
6531 case $cf_library_path in
6533 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6535 test "x$cf_library_path" != "xNONE" && \
6536 test -d "$cf_library_path" && \
6538 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6539 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6540 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
6541 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6542 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
6543 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6546 cf_library_path_list="$cf_library_path_list $cf_search"
6554 test "x$prefix" != "xNONE" && \
6555 test -d "$prefix" && \
6557 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6558 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6559 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
6560 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
6561 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
6562 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
6565 for cf_subdir_prefix in \
6574 test "x$cf_subdir_prefix" != "x$prefix" && \
6575 test -d "$cf_subdir_prefix" && \
6576 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
6577 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6578 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
6579 test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6580 test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6581 test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6582 test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6587 cf_search="$cf_library_path_list $cf_search"
6589 for cf_cv_library_path_utf8 in $cf_search
6591 if test -d $cf_cv_library_path_utf8 ; then
6592 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6594 echo "${as_me:-configure}:6594: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6596 CPPFLAGS="$cf_test_CPPFLAGS"
6597 LIBS="-lutf8 $cf_save_LIBS"
6598 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6599 cat >conftest.$ac_ext <<_ACEOF
6600 #line 6600 "configure"
6601 #include "confdefs.h"
6603 #include <libutf8.h>
6612 rm -f conftest.$ac_objext conftest$ac_exeext
6613 if { (eval echo "$as_me:6613: \"$ac_link\"") >&5
6614 (eval $ac_link) 2>&5
6616 echo "$as_me:6616: \$? = $ac_status" >&5
6617 (exit $ac_status); } &&
6618 { ac_try='test -s conftest$ac_exeext'
6619 { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6622 echo "$as_me:6622: \$? = $ac_status" >&5
6623 (exit $ac_status); }; }; then
6625 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6627 echo "${as_me:-configure}:6627: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6629 cf_cv_find_linkage_utf8=yes
6630 cf_cv_library_file_utf8="-lutf8"
6633 echo "$as_me: failed program was:" >&5
6634 cat conftest.$ac_ext >&5
6636 CPPFLAGS="$cf_save_CPPFLAGS"
6637 LIBS="$cf_save_LIBS"
6638 LDFLAGS="$cf_save_LDFLAGS"
6641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6644 CPPFLAGS="$cf_save_CPPFLAGS"
6645 LDFLAGS="$cf_save_LDFLAGS"
6649 cf_cv_find_linkage_utf8=no
6653 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6658 LIBS="$cf_save_LIBS"
6660 if test "$cf_cv_find_linkage_utf8" = yes ; then
6661 cf_cv_utf8_lib=add-on
6667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6669 echo "$as_me:6669: result: $cf_cv_utf8_lib" >&5
6670 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6672 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6674 if test "$cf_cv_utf8_lib" = "add-on" ; then
6676 cat >>confdefs.h <<\EOF
6677 #define HAVE_LIBUTF8_H 1
6680 if test -n "$cf_cv_header_path_utf8" ; then
6681 for cf_add_incdir in $cf_cv_header_path_utf8
6683 while test $cf_add_incdir != /usr/include
6685 if test -d $cf_add_incdir
6688 if test -n "$CFLAGS$CPPFLAGS" ; then
6689 # a loop is needed to ensure we can add subdirs of existing dirs
6690 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6691 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6692 cf_have_incdir=yes; break
6697 if test "$cf_have_incdir" = no ; then
6698 if test "$cf_add_incdir" = /usr/local/include ; then
6699 if test "$GCC" = yes
6701 cf_save_CPPFLAGS=$CPPFLAGS
6703 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6704 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6706 cat >conftest.$ac_ext <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6718 rm -f conftest.$ac_objext
6719 if { (eval echo "$as_me:6719: \"$ac_compile\"") >&5
6720 (eval $ac_compile) 2>&5
6722 echo "$as_me:6722: \$? = $ac_status" >&5
6723 (exit $ac_status); } &&
6724 { ac_try='test -s conftest.$ac_objext'
6725 { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6728 echo "$as_me:6728: \$? = $ac_status" >&5
6729 (exit $ac_status); }; }; then
6732 echo "$as_me: failed program was:" >&5
6733 cat conftest.$ac_ext >&5
6736 rm -f conftest.$ac_objext conftest.$ac_ext
6737 CPPFLAGS=$cf_save_CPPFLAGS
6742 if test "$cf_have_incdir" = no ; then
6743 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6745 echo "${as_me:-configure}:6745: testing adding $cf_add_incdir to include-path ..." 1>&5
6747 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6749 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6750 test "$cf_top_incdir" = "$cf_add_incdir" && break
6751 cf_add_incdir="$cf_top_incdir"
6762 if test -n "$cf_cv_library_path_utf8" ; then
6763 for cf_add_libdir in $cf_cv_library_path_utf8
6765 if test $cf_add_libdir = /usr/lib ; then
6767 elif test -d $cf_add_libdir
6770 if test -n "$LDFLAGS$LIBS" ; then
6771 # a loop is needed to ensure we can add subdirs of existing dirs
6772 for cf_test_libdir in $LDFLAGS $LIBS ; do
6773 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6774 cf_have_libdir=yes; break
6778 if test "$cf_have_libdir" = no ; then
6779 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6781 echo "${as_me:-configure}:6781: testing adding $cf_add_libdir to library-path ..." 1>&5
6783 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6792 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6794 for cf_add_1lib in $cf_add_0lib; do
6795 for cf_add_2lib in $cf_add_libs; do
6796 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6801 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6807 cf_ncuconfig_root=ncursesw
6808 cf_have_ncuconfig=no
6810 if test "x${PKG_CONFIG:=none}" != xnone; then
6811 echo "$as_me:6811: checking pkg-config for $cf_ncuconfig_root" >&5
6812 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
6813 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
6814 echo "$as_me:6814: result: yes" >&5
6815 echo "${ECHO_T}yes" >&6
6817 echo "$as_me:6817: checking if the $cf_ncuconfig_root package files work" >&5
6818 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
6819 cf_have_ncuconfig=unknown
6821 cf_save_CFLAGS="$CFLAGS"
6822 cf_save_CPPFLAGS="$CPPFLAGS"
6823 cf_save_LIBS="$LIBS"
6825 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
6826 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
6828 # while -W for passing linker flags is prevalent, it is not "standard".
6829 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
6830 # incompatible _and_ non-standard -W option which gives an error. Work
6831 # around that pitfall.
6832 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
6838 cf_new_extra_cppflags=
6840 for cf_add_cflags in $cf_pkg_cflags
6842 case $cf_fix_cppflags in
6844 case $cf_add_cflags in
6845 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6846 case $cf_add_cflags in
6848 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6850 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6851 && test -z "${cf_tst_cflags}" \
6852 && cf_fix_cppflags=yes
6854 if test $cf_fix_cppflags = yes ; then
6856 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6857 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6860 elif test "${cf_tst_cflags}" = "\"'" ; then
6862 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6863 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6873 case $cf_add_cflags in
6875 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6877 CPPFLAGS=`echo "$CPPFLAGS" | \
6878 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
6879 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
6884 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6885 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6892 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6893 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6900 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6901 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6903 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6905 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6906 && test -z "${cf_tst_cflags}" \
6907 && cf_fix_cppflags=no
6912 if test -n "$cf_new_cflags" ; then
6914 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6915 CFLAGS="${CFLAGS}$cf_new_cflags"
6919 if test -n "$cf_new_cppflags" ; then
6921 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6922 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6926 if test -n "$cf_new_extra_cppflags" ; then
6928 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6929 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6936 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6938 for cf_add_1lib in $cf_add_0lib; do
6939 for cf_add_2lib in $cf_add_libs; do
6940 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6945 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6949 cat >conftest.$ac_ext <<_ACEOF
6950 #line 6950 "configure"
6951 #include "confdefs.h"
6952 #include <${cf_cv_ncurses_header:-curses.h}>
6956 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6961 rm -f conftest.$ac_objext conftest$ac_exeext
6962 if { (eval echo "$as_me:6962: \"$ac_link\"") >&5
6963 (eval $ac_link) 2>&5
6965 echo "$as_me:6965: \$? = $ac_status" >&5
6966 (exit $ac_status); } &&
6967 { ac_try='test -s conftest$ac_exeext'
6968 { (eval echo "$as_me:6968: \"$ac_try\"") >&5
6971 echo "$as_me:6971: \$? = $ac_status" >&5
6972 (exit $ac_status); }; }; then
6973 if test "$cross_compiling" = yes; then
6974 cf_test_ncuconfig=maybe
6976 cat >conftest.$ac_ext <<_ACEOF
6977 #line 6977 "configure"
6978 #include "confdefs.h"
6979 #include <${cf_cv_ncurses_header:-curses.h}>
6981 { char *xx = curses_version(); return (xx == 0); }
6983 rm -f conftest$ac_exeext
6984 if { (eval echo "$as_me:6984: \"$ac_link\"") >&5
6985 (eval $ac_link) 2>&5
6987 echo "$as_me:6987: \$? = $ac_status" >&5
6988 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6989 { (eval echo "$as_me:6989: \"$ac_try\"") >&5
6992 echo "$as_me:6992: \$? = $ac_status" >&5
6993 (exit $ac_status); }; }; then
6994 cf_test_ncuconfig=yes
6996 echo "$as_me: program exited with status $ac_status" >&5
6997 echo "$as_me: failed program was:" >&5
6998 cat conftest.$ac_ext >&5
6999 cf_test_ncuconfig=no
7001 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7004 echo "$as_me: failed program was:" >&5
7005 cat conftest.$ac_ext >&5
7006 cf_test_ncuconfig=no
7008 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7010 CFLAGS="$cf_save_CFLAGS"
7011 CPPFLAGS="$cf_save_CPPFLAGS"
7012 LIBS="$cf_save_LIBS"
7014 if test "x$cf_test_ncuconfig" != xyes; then
7015 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7016 cf_pkg_cflags="$cf_temp"
7017 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7018 cf_pkg_libs="$cf_temp"
7026 cf_new_extra_cppflags=
7028 for cf_add_cflags in $cf_pkg_cflags
7030 case $cf_fix_cppflags in
7032 case $cf_add_cflags in
7033 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7034 case $cf_add_cflags in
7036 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7038 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7039 && test -z "${cf_tst_cflags}" \
7040 && cf_fix_cppflags=yes
7042 if test $cf_fix_cppflags = yes ; then
7044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7048 elif test "${cf_tst_cflags}" = "\"'" ; then
7050 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7051 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7061 case $cf_add_cflags in
7063 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7065 CPPFLAGS=`echo "$CPPFLAGS" | \
7066 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7067 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7072 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7073 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7080 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7081 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7088 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7089 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7091 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7093 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7094 && test -z "${cf_tst_cflags}" \
7095 && cf_fix_cppflags=no
7100 if test -n "$cf_new_cflags" ; then
7102 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7103 CFLAGS="${CFLAGS}$cf_new_cflags"
7107 if test -n "$cf_new_cppflags" ; then
7109 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7110 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7114 if test -n "$cf_new_extra_cppflags" ; then
7116 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7117 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7124 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7126 for cf_add_1lib in $cf_add_0lib; do
7127 for cf_add_2lib in $cf_add_libs; do
7128 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7133 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7137 cat >conftest.$ac_ext <<_ACEOF
7138 #line 7138 "configure"
7139 #include "confdefs.h"
7140 #include <${cf_cv_ncurses_header:-curses.h}>
7144 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7149 rm -f conftest.$ac_objext conftest$ac_exeext
7150 if { (eval echo "$as_me:7150: \"$ac_link\"") >&5
7151 (eval $ac_link) 2>&5
7153 echo "$as_me:7153: \$? = $ac_status" >&5
7154 (exit $ac_status); } &&
7155 { ac_try='test -s conftest$ac_exeext'
7156 { (eval echo "$as_me:7156: \"$ac_try\"") >&5
7159 echo "$as_me:7159: \$? = $ac_status" >&5
7160 (exit $ac_status); }; }; then
7161 if test "$cross_compiling" = yes; then
7162 cf_have_ncuconfig=maybe
7164 cat >conftest.$ac_ext <<_ACEOF
7165 #line 7165 "configure"
7166 #include "confdefs.h"
7167 #include <${cf_cv_ncurses_header:-curses.h}>
7169 { char *xx = curses_version(); return (xx == 0); }
7171 rm -f conftest$ac_exeext
7172 if { (eval echo "$as_me:7172: \"$ac_link\"") >&5
7173 (eval $ac_link) 2>&5
7175 echo "$as_me:7175: \$? = $ac_status" >&5
7176 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7177 { (eval echo "$as_me:7177: \"$ac_try\"") >&5
7180 echo "$as_me:7180: \$? = $ac_status" >&5
7181 (exit $ac_status); }; }; then
7182 cf_have_ncuconfig=yes
7184 echo "$as_me: program exited with status $ac_status" >&5
7185 echo "$as_me: failed program was:" >&5
7186 cat conftest.$ac_ext >&5
7187 cf_have_ncuconfig=no
7189 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7192 echo "$as_me: failed program was:" >&5
7193 cat conftest.$ac_ext >&5
7194 cf_have_ncuconfig=no
7196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7197 echo "$as_me:7197: result: $cf_have_ncuconfig" >&5
7198 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7199 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7200 if test "$cf_have_ncuconfig" != "yes"
7202 CPPFLAGS="$cf_save_CPPFLAGS"
7203 LIBS="$cf_save_LIBS"
7204 NCURSES_CONFIG_PKG=none
7207 cat >>confdefs.h <<\EOF
7211 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7213 echo "$as_me:7213: checking for terminfo header" >&5
7214 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7215 if test "${cf_cv_term_header+set}" = set; then
7216 echo $ECHO_N "(cached) $ECHO_C" >&6
7219 case ${cf_cv_ncurses_header} in
7220 (*/ncurses.h|*/ncursesw.h)
7221 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7224 cf_term_header=term.h
7228 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7230 cat >conftest.$ac_ext <<_ACEOF
7231 #line 7231 "configure"
7232 #include "confdefs.h"
7234 #include <${cf_cv_ncurses_header:-curses.h}>
7240 int x = auto_left_margin; (void)x
7245 rm -f conftest.$ac_objext
7246 if { (eval echo "$as_me:7246: \"$ac_compile\"") >&5
7247 (eval $ac_compile) 2>&5
7249 echo "$as_me:7249: \$? = $ac_status" >&5
7250 (exit $ac_status); } &&
7251 { ac_try='test -s conftest.$ac_objext'
7252 { (eval echo "$as_me:7252: \"$ac_try\"") >&5
7255 echo "$as_me:7255: \$? = $ac_status" >&5
7256 (exit $ac_status); }; }; then
7258 cf_cv_term_header="$cf_test"
7260 echo "$as_me: failed program was:" >&5
7261 cat conftest.$ac_ext >&5
7263 cf_cv_term_header=unknown
7266 rm -f conftest.$ac_objext conftest.$ac_ext
7267 test "$cf_cv_term_header" != unknown && break
7271 echo "$as_me:7271: result: $cf_cv_term_header" >&5
7272 echo "${ECHO_T}$cf_cv_term_header" >&6
7274 # Set definitions to allow ifdef'ing to accommodate subdirectories
7276 case $cf_cv_term_header in
7279 cat >>confdefs.h <<\EOF
7280 #define HAVE_TERM_H 1
7286 case $cf_cv_term_header in
7289 cat >>confdefs.h <<\EOF
7290 #define HAVE_NCURSES_TERM_H 1
7296 cat >>confdefs.h <<\EOF
7297 #define HAVE_NCURSESW_TERM_H 1
7306 echo "$as_me:7306: result: no" >&5
7307 echo "${ECHO_T}no" >&6
7308 NCURSES_CONFIG_PKG=none
7311 NCURSES_CONFIG_PKG=none
7314 if test "x$cf_have_ncuconfig" = "xno"; then
7315 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7317 if test -n "$ac_tool_prefix"; then
7318 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7320 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7321 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7322 echo "$as_me:7322: checking for $ac_word" >&5
7323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7324 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7325 echo $ECHO_N "(cached) $ECHO_C" >&6
7327 if test -n "$NCURSES_CONFIG"; then
7328 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7330 ac_save_IFS=$IFS; IFS=$ac_path_separator
7332 for ac_dir in $ac_dummy; do
7334 test -z "$ac_dir" && ac_dir=.
7335 $as_executable_p "$ac_dir/$ac_word" || continue
7336 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7337 echo "$as_me:7337: found $ac_dir/$ac_word" >&5
7343 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7344 if test -n "$NCURSES_CONFIG"; then
7345 echo "$as_me:7345: result: $NCURSES_CONFIG" >&5
7346 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7348 echo "$as_me:7348: result: no" >&5
7349 echo "${ECHO_T}no" >&6
7352 test -n "$NCURSES_CONFIG" && break
7355 if test -z "$NCURSES_CONFIG"; then
7356 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7357 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7359 # Extract the first word of "$ac_prog", so it can be a program name with args.
7360 set dummy $ac_prog; ac_word=$2
7361 echo "$as_me:7361: checking for $ac_word" >&5
7362 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7363 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7364 echo $ECHO_N "(cached) $ECHO_C" >&6
7366 if test -n "$ac_ct_NCURSES_CONFIG"; then
7367 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7369 ac_save_IFS=$IFS; IFS=$ac_path_separator
7371 for ac_dir in $ac_dummy; do
7373 test -z "$ac_dir" && ac_dir=.
7374 $as_executable_p "$ac_dir/$ac_word" || continue
7375 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7376 echo "$as_me:7376: found $ac_dir/$ac_word" >&5
7382 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7383 if test -n "$ac_ct_NCURSES_CONFIG"; then
7384 echo "$as_me:7384: result: $ac_ct_NCURSES_CONFIG" >&5
7385 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7387 echo "$as_me:7387: result: no" >&5
7388 echo "${ECHO_T}no" >&6
7391 test -n "$ac_ct_NCURSES_CONFIG" && break
7393 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7395 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7398 if test "$NCURSES_CONFIG" != none ; then
7403 cf_new_extra_cppflags=
7405 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7407 case $cf_fix_cppflags in
7409 case $cf_add_cflags in
7410 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7411 case $cf_add_cflags in
7413 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7415 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7416 && test -z "${cf_tst_cflags}" \
7417 && cf_fix_cppflags=yes
7419 if test $cf_fix_cppflags = yes ; then
7421 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7422 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7425 elif test "${cf_tst_cflags}" = "\"'" ; then
7427 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7428 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7438 case $cf_add_cflags in
7440 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7442 CPPFLAGS=`echo "$CPPFLAGS" | \
7443 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7444 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7449 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7450 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7457 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7458 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7465 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7466 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7468 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7470 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7471 && test -z "${cf_tst_cflags}" \
7472 && cf_fix_cppflags=no
7477 if test -n "$cf_new_cflags" ; then
7479 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7480 CFLAGS="${CFLAGS}$cf_new_cflags"
7484 if test -n "$cf_new_cppflags" ; then
7486 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7487 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7491 if test -n "$cf_new_extra_cppflags" ; then
7493 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7494 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7501 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7503 for cf_add_1lib in $cf_add_0lib; do
7504 for cf_add_2lib in $cf_add_libs; do
7505 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7510 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7514 # even with config script, some packages use no-override for curses.h
7516 echo "$as_me:7516: checking if we have identified curses headers" >&5
7517 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7518 if test "${cf_cv_ncurses_header+set}" = set; then
7519 echo $ECHO_N "(cached) $ECHO_C" >&6
7522 cf_cv_ncurses_header=none
7524 ncurses.h ncursesw/ncurses.h \
7525 curses.h ncursesw/curses.h
7527 cat >conftest.$ac_ext <<_ACEOF
7528 #line 7528 "configure"
7529 #include "confdefs.h"
7530 #include <${cf_header}>
7534 initscr(); tgoto("?", 0,0)
7539 rm -f conftest.$ac_objext
7540 if { (eval echo "$as_me:7540: \"$ac_compile\"") >&5
7541 (eval $ac_compile) 2>&5
7543 echo "$as_me:7543: \$? = $ac_status" >&5
7544 (exit $ac_status); } &&
7545 { ac_try='test -s conftest.$ac_objext'
7546 { (eval echo "$as_me:7546: \"$ac_try\"") >&5
7549 echo "$as_me:7549: \$? = $ac_status" >&5
7550 (exit $ac_status); }; }; then
7551 cf_cv_ncurses_header=$cf_header; break
7553 echo "$as_me: failed program was:" >&5
7554 cat conftest.$ac_ext >&5
7556 rm -f conftest.$ac_objext conftest.$ac_ext
7560 echo "$as_me:7560: result: $cf_cv_ncurses_header" >&5
7561 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7563 if test "$cf_cv_ncurses_header" = none ; then
7564 { { echo "$as_me:7564: error: No curses header-files found" >&5
7565 echo "$as_me: error: No curses header-files found" >&2;}
7566 { (exit 1); exit 1; }; }
7569 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7571 for ac_header in $cf_cv_ncurses_header
7573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7574 echo "$as_me:7574: checking for $ac_header" >&5
7575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7577 echo $ECHO_N "(cached) $ECHO_C" >&6
7579 cat >conftest.$ac_ext <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582 #include <$ac_header>
7584 if { (eval echo "$as_me:7584: \"$ac_cpp conftest.$ac_ext\"") >&5
7585 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7587 egrep -v '^ *\+' conftest.er1 >conftest.err
7589 cat conftest.err >&5
7590 echo "$as_me:7590: \$? = $ac_status" >&5
7591 (exit $ac_status); } >/dev/null; then
7592 if test -s conftest.err; then
7593 ac_cpp_err=$ac_c_preproc_warn_flag
7600 if test -z "$ac_cpp_err"; then
7601 eval "$as_ac_Header=yes"
7603 echo "$as_me: failed program was:" >&5
7604 cat conftest.$ac_ext >&5
7605 eval "$as_ac_Header=no"
7607 rm -f conftest.err conftest.$ac_ext
7609 echo "$as_me:7609: result: `eval echo '${'$as_ac_Header'}'`" >&5
7610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7612 cat >>confdefs.h <<EOF
7613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7619 cat >>confdefs.h <<\EOF
7623 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7625 cat >>confdefs.h <<EOF
7626 #define $cf_nculib_ROOT 1
7629 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
7633 cf_ncuhdr_root=ncursesw
7635 test -n "$cf_cv_curses_dir" && \
7636 test "$cf_cv_curses_dir" != "no" && { \
7638 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7639 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7641 while test $cf_add_incdir != /usr/include
7643 if test -d $cf_add_incdir
7646 if test -n "$CFLAGS$CPPFLAGS" ; then
7647 # a loop is needed to ensure we can add subdirs of existing dirs
7648 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7649 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7650 cf_have_incdir=yes; break
7655 if test "$cf_have_incdir" = no ; then
7656 if test "$cf_add_incdir" = /usr/local/include ; then
7657 if test "$GCC" = yes
7659 cf_save_CPPFLAGS=$CPPFLAGS
7661 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7662 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7664 cat >conftest.$ac_ext <<_ACEOF
7665 #line 7665 "configure"
7666 #include "confdefs.h"
7676 rm -f conftest.$ac_objext
7677 if { (eval echo "$as_me:7677: \"$ac_compile\"") >&5
7678 (eval $ac_compile) 2>&5
7680 echo "$as_me:7680: \$? = $ac_status" >&5
7681 (exit $ac_status); } &&
7682 { ac_try='test -s conftest.$ac_objext'
7683 { (eval echo "$as_me:7683: \"$ac_try\"") >&5
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7690 echo "$as_me: failed program was:" >&5
7691 cat conftest.$ac_ext >&5
7694 rm -f conftest.$ac_objext conftest.$ac_ext
7695 CPPFLAGS=$cf_save_CPPFLAGS
7700 if test "$cf_have_incdir" = no ; then
7701 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7703 echo "${as_me:-configure}:7703: testing adding $cf_add_incdir to include-path ..." 1>&5
7705 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7707 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7708 test "$cf_top_incdir" = "$cf_add_incdir" && break
7709 cf_add_incdir="$cf_top_incdir"
7722 echo "$as_me:7722: checking for $cf_ncuhdr_root header in include-path" >&5
7723 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7724 if test "${cf_cv_ncurses_h+set}" = set; then
7725 echo $ECHO_N "(cached) $ECHO_C" >&6
7728 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7729 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
7730 for cf_header in $cf_header_list
7733 cat >conftest.$ac_ext <<_ACEOF
7734 #line 7734 "configure"
7735 #include "confdefs.h"
7737 #define _XOPEN_SOURCE_EXTENDED
7738 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7739 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7741 #include <$cf_header>
7746 #ifdef NCURSES_VERSION
7752 printf("%s\n", NCURSES_VERSION);
7765 rm -f conftest.$ac_objext
7766 if { (eval echo "$as_me:7766: \"$ac_compile\"") >&5
7767 (eval $ac_compile) 2>&5
7769 echo "$as_me:7769: \$? = $ac_status" >&5
7770 (exit $ac_status); } &&
7771 { ac_try='test -s conftest.$ac_objext'
7772 { (eval echo "$as_me:7772: \"$ac_try\"") >&5
7775 echo "$as_me:7775: \$? = $ac_status" >&5
7776 (exit $ac_status); }; }; then
7777 cf_cv_ncurses_h=$cf_header
7780 echo "$as_me: failed program was:" >&5
7781 cat conftest.$ac_ext >&5
7784 rm -f conftest.$ac_objext conftest.$ac_ext
7786 test "$cf_cv_ncurses_h" != no && break
7790 echo "$as_me:7790: result: $cf_cv_ncurses_h" >&5
7791 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
7793 if test "$cf_cv_ncurses_h" != no ; then
7794 cf_cv_ncurses_header=$cf_cv_ncurses_h
7797 echo "$as_me:7797: checking for $cf_ncuhdr_root include-path" >&5
7798 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
7799 if test "${cf_cv_ncurses_h2+set}" = set; then
7800 echo $ECHO_N "(cached) $ECHO_C" >&6
7803 test -n "$verbose" && echo
7807 # collect the current set of include-directories from compiler flags
7808 cf_header_path_list=""
7809 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7810 for cf_header_path in $CPPFLAGS $CFLAGS
7812 case $cf_header_path in
7814 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7816 test "x$cf_header_path" != "xNONE" && \
7817 test -d "$cf_header_path" && \
7819 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7820 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7821 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
7822 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
7823 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
7824 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"
7827 cf_header_path_list="$cf_header_path_list $cf_search"
7833 # add the variations for the package we are looking for
7837 test "x$prefix" != "xNONE" && \
7838 test -d "$prefix" && \
7840 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7841 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7842 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
7843 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
7844 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
7845 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
7848 for cf_subdir_prefix in \
7857 test "x$cf_subdir_prefix" != "x$prefix" && \
7858 test -d "$cf_subdir_prefix" && \
7859 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
7860 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
7861 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
7862 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
7863 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
7864 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
7865 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"
7870 test "$includedir" != NONE && \
7871 test "$includedir" != "/usr/include" && \
7872 test -d "$includedir" && {
7873 test -d $includedir && cf_search="$cf_search $includedir"
7874 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
7877 test "$oldincludedir" != NONE && \
7878 test "$oldincludedir" != "/usr/include" && \
7879 test -d "$oldincludedir" && {
7880 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7881 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
7884 cf_search="$cf_search $cf_header_path_list"
7886 test -n "$verbose" && echo search path $cf_search
7887 cf_save2_CPPFLAGS="$CPPFLAGS"
7888 for cf_incdir in $cf_search
7891 if test -n "$cf_incdir" ; then
7892 for cf_add_incdir in $cf_incdir
7894 while test $cf_add_incdir != /usr/include
7896 if test -d $cf_add_incdir
7899 if test -n "$CFLAGS$CPPFLAGS" ; then
7900 # a loop is needed to ensure we can add subdirs of existing dirs
7901 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7902 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7903 cf_have_incdir=yes; break
7908 if test "$cf_have_incdir" = no ; then
7909 if test "$cf_add_incdir" = /usr/local/include ; then
7910 if test "$GCC" = yes
7912 cf_save_CPPFLAGS=$CPPFLAGS
7914 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7915 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7917 cat >conftest.$ac_ext <<_ACEOF
7918 #line 7918 "configure"
7919 #include "confdefs.h"
7929 rm -f conftest.$ac_objext
7930 if { (eval echo "$as_me:7930: \"$ac_compile\"") >&5
7931 (eval $ac_compile) 2>&5
7933 echo "$as_me:7933: \$? = $ac_status" >&5
7934 (exit $ac_status); } &&
7935 { ac_try='test -s conftest.$ac_objext'
7936 { (eval echo "$as_me:7936: \"$ac_try\"") >&5
7939 echo "$as_me:7939: \$? = $ac_status" >&5
7940 (exit $ac_status); }; }; then
7943 echo "$as_me: failed program was:" >&5
7944 cat conftest.$ac_ext >&5
7947 rm -f conftest.$ac_objext conftest.$ac_ext
7948 CPPFLAGS=$cf_save_CPPFLAGS
7953 if test "$cf_have_incdir" = no ; then
7954 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7956 echo "${as_me:-configure}:7956: testing adding $cf_add_incdir to include-path ..." 1>&5
7958 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7960 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7961 test "$cf_top_incdir" = "$cf_add_incdir" && break
7962 cf_add_incdir="$cf_top_incdir"
7978 cat >conftest.$ac_ext <<_ACEOF
7979 #line 7979 "configure"
7980 #include "confdefs.h"
7982 #include <$cf_header>
7987 #ifdef NCURSES_VERSION
7989 printf("%s\n", NCURSES_VERSION);
8002 rm -f conftest.$ac_objext
8003 if { (eval echo "$as_me:8003: \"$ac_compile\"") >&5
8004 (eval $ac_compile) 2>&5
8006 echo "$as_me:8006: \$? = $ac_status" >&5
8007 (exit $ac_status); } &&
8008 { ac_try='test -s conftest.$ac_objext'
8009 { (eval echo "$as_me:8009: \"$ac_try\"") >&5
8012 echo "$as_me:8012: \$? = $ac_status" >&5
8013 (exit $ac_status); }; }; then
8014 cf_cv_ncurses_h2=$cf_header
8017 echo "$as_me: failed program was:" >&5
8018 cat conftest.$ac_ext >&5
8021 rm -f conftest.$ac_objext conftest.$ac_ext
8023 if test "$cf_cv_ncurses_h2" != no ; then
8024 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8025 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8028 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8030 CPPFLAGS="$cf_save2_CPPFLAGS"
8031 test "$cf_cv_ncurses_h2" != no && break
8033 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8033: error: not found" >&5
8034 echo "$as_me: error: not found" >&2;}
8035 { (exit 1); exit 1; }; }
8038 echo "$as_me:8038: result: $cf_cv_ncurses_h2" >&5
8039 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8041 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8042 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8043 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8044 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8047 if test -n "$cf_1st_incdir" ; then
8048 for cf_add_incdir in $cf_1st_incdir
8050 while test $cf_add_incdir != /usr/include
8052 if test -d $cf_add_incdir
8055 if test -n "$CFLAGS$CPPFLAGS" ; then
8056 # a loop is needed to ensure we can add subdirs of existing dirs
8057 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8058 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8059 cf_have_incdir=yes; break
8064 if test "$cf_have_incdir" = no ; then
8065 if test "$cf_add_incdir" = /usr/local/include ; then
8066 if test "$GCC" = yes
8068 cf_save_CPPFLAGS=$CPPFLAGS
8070 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8071 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8073 cat >conftest.$ac_ext <<_ACEOF
8074 #line 8074 "configure"
8075 #include "confdefs.h"
8085 rm -f conftest.$ac_objext
8086 if { (eval echo "$as_me:8086: \"$ac_compile\"") >&5
8087 (eval $ac_compile) 2>&5
8089 echo "$as_me:8089: \$? = $ac_status" >&5
8090 (exit $ac_status); } &&
8091 { ac_try='test -s conftest.$ac_objext'
8092 { (eval echo "$as_me:8092: \"$ac_try\"") >&5
8095 echo "$as_me:8095: \$? = $ac_status" >&5
8096 (exit $ac_status); }; }; then
8099 echo "$as_me: failed program was:" >&5
8100 cat conftest.$ac_ext >&5
8103 rm -f conftest.$ac_objext conftest.$ac_ext
8104 CPPFLAGS=$cf_save_CPPFLAGS
8109 if test "$cf_have_incdir" = no ; then
8110 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8112 echo "${as_me:-configure}:8112: testing adding $cf_add_incdir to include-path ..." 1>&5
8114 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8116 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8117 test "$cf_top_incdir" = "$cf_add_incdir" && break
8118 cf_add_incdir="$cf_top_incdir"
8131 # Set definitions to allow ifdef'ing for ncurses.h
8133 case $cf_cv_ncurses_header in
8136 cat >>confdefs.h <<\EOF
8137 #define HAVE_NCURSES_H 1
8143 case $cf_cv_ncurses_header in
8144 (ncurses/curses.h|ncurses/ncurses.h)
8146 cat >>confdefs.h <<\EOF
8147 #define HAVE_NCURSES_NCURSES_H 1
8151 (ncursesw/curses.h|ncursesw/ncurses.h)
8153 cat >>confdefs.h <<\EOF
8154 #define HAVE_NCURSESW_NCURSES_H 1
8160 echo "$as_me:8160: checking for terminfo header" >&5
8161 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8162 if test "${cf_cv_term_header+set}" = set; then
8163 echo $ECHO_N "(cached) $ECHO_C" >&6
8166 case ${cf_cv_ncurses_header} in
8167 (*/ncurses.h|*/ncursesw.h)
8168 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8171 cf_term_header=term.h
8175 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8177 cat >conftest.$ac_ext <<_ACEOF
8178 #line 8178 "configure"
8179 #include "confdefs.h"
8181 #include <${cf_cv_ncurses_header:-curses.h}>
8187 int x = auto_left_margin; (void)x
8192 rm -f conftest.$ac_objext
8193 if { (eval echo "$as_me:8193: \"$ac_compile\"") >&5
8194 (eval $ac_compile) 2>&5
8196 echo "$as_me:8196: \$? = $ac_status" >&5
8197 (exit $ac_status); } &&
8198 { ac_try='test -s conftest.$ac_objext'
8199 { (eval echo "$as_me:8199: \"$ac_try\"") >&5
8202 echo "$as_me:8202: \$? = $ac_status" >&5
8203 (exit $ac_status); }; }; then
8205 cf_cv_term_header="$cf_test"
8207 echo "$as_me: failed program was:" >&5
8208 cat conftest.$ac_ext >&5
8210 cf_cv_term_header=unknown
8213 rm -f conftest.$ac_objext conftest.$ac_ext
8214 test "$cf_cv_term_header" != unknown && break
8218 echo "$as_me:8218: result: $cf_cv_term_header" >&5
8219 echo "${ECHO_T}$cf_cv_term_header" >&6
8221 # Set definitions to allow ifdef'ing to accommodate subdirectories
8223 case $cf_cv_term_header in
8226 cat >>confdefs.h <<\EOF
8227 #define HAVE_TERM_H 1
8233 case $cf_cv_term_header in
8236 cat >>confdefs.h <<\EOF
8237 #define HAVE_NCURSES_TERM_H 1
8243 cat >>confdefs.h <<\EOF
8244 #define HAVE_NCURSESW_TERM_H 1
8250 # some applications need this, but should check for NCURSES_VERSION
8252 cat >>confdefs.h <<\EOF
8256 echo "$as_me:8256: checking for ncurses version" >&5
8257 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8258 if test "${cf_cv_ncurses_version+set}" = set; then
8259 echo $ECHO_N "(cached) $ECHO_C" >&6
8262 cf_cv_ncurses_version=no
8265 if test "$cross_compiling" = yes; then
8267 # This will not work if the preprocessor splits the line after the
8268 # Autoconf token. The 'unproto' program does that.
8269 cat > conftest.$ac_ext <<EOF
8270 #include <${cf_cv_ncurses_header:-curses.h}>
8272 #ifdef NCURSES_VERSION
8273 Autoconf NCURSES_VERSION
8281 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8282 { (eval echo "$as_me:8282: \"$cf_try\"") >&5
8285 echo "$as_me:8285: \$? = $ac_status" >&5
8286 (exit $ac_status); }
8287 if test -f conftest.out ; then
8288 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
8289 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8294 cat >conftest.$ac_ext <<_ACEOF
8295 #line 8295 "configure"
8296 #include "confdefs.h"
8298 #include <${cf_cv_ncurses_header:-curses.h}>
8302 FILE *fp = fopen("$cf_tempfile", "w");
8303 #ifdef NCURSES_VERSION
8304 # ifdef NCURSES_VERSION_PATCH
8305 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8307 fprintf(fp, "%s\n", NCURSES_VERSION);
8311 fprintf(fp, "old\n");
8316 ${cf_cv_main_return:-return}(0);
8319 rm -f conftest$ac_exeext
8320 if { (eval echo "$as_me:8320: \"$ac_link\"") >&5
8321 (eval $ac_link) 2>&5
8323 echo "$as_me:8323: \$? = $ac_status" >&5
8324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8325 { (eval echo "$as_me:8325: \"$ac_try\"") >&5
8328 echo "$as_me:8328: \$? = $ac_status" >&5
8329 (exit $ac_status); }; }; then
8331 cf_cv_ncurses_version=`cat $cf_tempfile`
8333 echo "$as_me: program exited with status $ac_status" >&5
8334 echo "$as_me: failed program was:" >&5
8335 cat conftest.$ac_ext >&5
8337 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8342 echo "$as_me:8342: result: $cf_cv_ncurses_version" >&5
8343 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8344 test "$cf_cv_ncurses_version" = no ||
8345 cat >>confdefs.h <<\EOF
8349 cf_nculib_root=ncursesw
8350 # This works, except for the special case where we find gpm, but
8351 # ncurses is in a nonstandard location via $LIBS, and we really want
8354 cf_ncurses_SAVE="$LIBS"
8355 echo "$as_me:8355: checking for Gpm_Open in -lgpm" >&5
8356 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8357 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8358 echo $ECHO_N "(cached) $ECHO_C" >&6
8360 ac_check_lib_save_LIBS=$LIBS
8362 cat >conftest.$ac_ext <<_ACEOF
8363 #line 8363 "configure"
8364 #include "confdefs.h"
8366 /* Override any gcc2 internal prototype to avoid an error. */
8370 /* We use char because int might match the return type of a gcc2
8371 builtin and then its argument prototype would still apply. */
8381 rm -f conftest.$ac_objext conftest$ac_exeext
8382 if { (eval echo "$as_me:8382: \"$ac_link\"") >&5
8383 (eval $ac_link) 2>&5
8385 echo "$as_me:8385: \$? = $ac_status" >&5
8386 (exit $ac_status); } &&
8387 { ac_try='test -s conftest$ac_exeext'
8388 { (eval echo "$as_me:8388: \"$ac_try\"") >&5
8391 echo "$as_me:8391: \$? = $ac_status" >&5
8392 (exit $ac_status); }; }; then
8393 ac_cv_lib_gpm_Gpm_Open=yes
8395 echo "$as_me: failed program was:" >&5
8396 cat conftest.$ac_ext >&5
8397 ac_cv_lib_gpm_Gpm_Open=no
8399 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8400 LIBS=$ac_check_lib_save_LIBS
8402 echo "$as_me:8402: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8403 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8404 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
8405 echo "$as_me:8405: checking for initscr in -lgpm" >&5
8406 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8407 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8408 echo $ECHO_N "(cached) $ECHO_C" >&6
8410 ac_check_lib_save_LIBS=$LIBS
8412 cat >conftest.$ac_ext <<_ACEOF
8413 #line 8413 "configure"
8414 #include "confdefs.h"
8416 /* Override any gcc2 internal prototype to avoid an error. */
8420 /* We use char because int might match the return type of a gcc2
8421 builtin and then its argument prototype would still apply. */
8431 rm -f conftest.$ac_objext conftest$ac_exeext
8432 if { (eval echo "$as_me:8432: \"$ac_link\"") >&5
8433 (eval $ac_link) 2>&5
8435 echo "$as_me:8435: \$? = $ac_status" >&5
8436 (exit $ac_status); } &&
8437 { ac_try='test -s conftest$ac_exeext'
8438 { (eval echo "$as_me:8438: \"$ac_try\"") >&5
8441 echo "$as_me:8441: \$? = $ac_status" >&5
8442 (exit $ac_status); }; }; then
8443 ac_cv_lib_gpm_initscr=yes
8445 echo "$as_me: failed program was:" >&5
8446 cat conftest.$ac_ext >&5
8447 ac_cv_lib_gpm_initscr=no
8449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8450 LIBS=$ac_check_lib_save_LIBS
8452 echo "$as_me:8452: result: $ac_cv_lib_gpm_initscr" >&5
8453 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8454 if test $ac_cv_lib_gpm_initscr = yes; then
8455 LIBS="$cf_ncurses_SAVE"
8457 cf_ncurses_LIBS="-lgpm"
8464 # This is only necessary if you are linking against an obsolete
8465 # version of ncurses (but it should do no harm, since it's static).
8466 if test "$cf_nculib_root" = ncurses ; then
8467 echo "$as_me:8467: checking for tgoto in -lmytinfo" >&5
8468 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8469 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8470 echo $ECHO_N "(cached) $ECHO_C" >&6
8472 ac_check_lib_save_LIBS=$LIBS
8473 LIBS="-lmytinfo $LIBS"
8474 cat >conftest.$ac_ext <<_ACEOF
8475 #line 8475 "configure"
8476 #include "confdefs.h"
8478 /* Override any gcc2 internal prototype to avoid an error. */
8482 /* We use char because int might match the return type of a gcc2
8483 builtin and then its argument prototype would still apply. */
8493 rm -f conftest.$ac_objext conftest$ac_exeext
8494 if { (eval echo "$as_me:8494: \"$ac_link\"") >&5
8495 (eval $ac_link) 2>&5
8497 echo "$as_me:8497: \$? = $ac_status" >&5
8498 (exit $ac_status); } &&
8499 { ac_try='test -s conftest$ac_exeext'
8500 { (eval echo "$as_me:8500: \"$ac_try\"") >&5
8503 echo "$as_me:8503: \$? = $ac_status" >&5
8504 (exit $ac_status); }; }; then
8505 ac_cv_lib_mytinfo_tgoto=yes
8507 echo "$as_me: failed program was:" >&5
8508 cat conftest.$ac_ext >&5
8509 ac_cv_lib_mytinfo_tgoto=no
8511 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8512 LIBS=$ac_check_lib_save_LIBS
8514 echo "$as_me:8514: result: $ac_cv_lib_mytinfo_tgoto" >&5
8515 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8516 if test $ac_cv_lib_mytinfo_tgoto = yes; then
8517 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8527 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8529 for cf_add_1lib in $cf_add_0lib; do
8530 for cf_add_2lib in $cf_add_libs; do
8531 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8536 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8540 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
8546 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8548 for cf_add_1lib in $cf_add_0lib; do
8549 for cf_add_2lib in $cf_add_libs; do
8550 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8555 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8561 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
8563 echo "$as_me:8563: checking for initscr" >&5
8564 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8565 if test "${ac_cv_func_initscr+set}" = set; then
8566 echo $ECHO_N "(cached) $ECHO_C" >&6
8568 cat >conftest.$ac_ext <<_ACEOF
8569 #line 8569 "configure"
8570 #include "confdefs.h"
8571 #define initscr autoconf_temporary
8572 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8579 /* We use char because int might match the return type of a gcc2
8580 builtin and then its argument prototype would still apply. */
8581 char initscr (void);
8587 /* The GNU C library defines stubs for functions which it implements
8588 to always fail with ENOSYS. Some functions are actually named
8589 something starting with __ and the normal name is an alias. */
8590 #if defined (__stub_initscr) || defined (__stub___initscr)
8591 #error found stub for initscr
8599 rm -f conftest.$ac_objext conftest$ac_exeext
8600 if { (eval echo "$as_me:8600: \"$ac_link\"") >&5
8601 (eval $ac_link) 2>&5
8603 echo "$as_me:8603: \$? = $ac_status" >&5
8604 (exit $ac_status); } &&
8605 { ac_try='test -s conftest$ac_exeext'
8606 { (eval echo "$as_me:8606: \"$ac_try\"") >&5
8609 echo "$as_me:8609: \$? = $ac_status" >&5
8610 (exit $ac_status); }; }; then
8611 ac_cv_func_initscr=yes
8613 echo "$as_me: failed program was:" >&5
8614 cat conftest.$ac_ext >&5
8615 ac_cv_func_initscr=no
8617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8619 echo "$as_me:8619: result: $ac_cv_func_initscr" >&5
8620 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8621 if test $ac_cv_func_initscr = yes; then
8622 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8625 cf_save_LIBS="$LIBS"
8626 echo "$as_me:8626: checking for initscr in -l$cf_nculib_root" >&5
8627 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8628 LIBS="-l$cf_nculib_root $LIBS"
8629 cat >conftest.$ac_ext <<_ACEOF
8630 #line 8630 "configure"
8631 #include "confdefs.h"
8632 #include <${cf_cv_ncurses_header:-curses.h}>
8641 rm -f conftest.$ac_objext conftest$ac_exeext
8642 if { (eval echo "$as_me:8642: \"$ac_link\"") >&5
8643 (eval $ac_link) 2>&5
8645 echo "$as_me:8645: \$? = $ac_status" >&5
8646 (exit $ac_status); } &&
8647 { ac_try='test -s conftest$ac_exeext'
8648 { (eval echo "$as_me:8648: \"$ac_try\"") >&5
8651 echo "$as_me:8651: \$? = $ac_status" >&5
8652 (exit $ac_status); }; }; then
8653 echo "$as_me:8653: result: yes" >&5
8654 echo "${ECHO_T}yes" >&6
8655 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8658 echo "$as_me: failed program was:" >&5
8659 cat conftest.$ac_ext >&5
8660 echo "$as_me:8660: result: no" >&5
8661 echo "${ECHO_T}no" >&6
8664 cf_library_path_list=""
8665 if test -n "${LDFLAGS}${LIBS}" ; then
8666 for cf_library_path in $LDFLAGS $LIBS
8668 case $cf_library_path in
8670 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8672 test "x$cf_library_path" != "xNONE" && \
8673 test -d "$cf_library_path" && \
8675 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8676 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8677 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8678 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8679 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8680 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"
8683 cf_library_path_list="$cf_library_path_list $cf_search"
8691 test "x$prefix" != "xNONE" && \
8692 test -d "$prefix" && \
8694 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8695 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8696 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8697 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8698 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8699 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8702 for cf_subdir_prefix in \
8711 test "x$cf_subdir_prefix" != "x$prefix" && \
8712 test -d "$cf_subdir_prefix" && \
8713 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
8714 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8715 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
8716 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8717 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8718 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8719 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"
8724 cf_search="$cf_library_path_list $cf_search"
8726 for cf_libdir in $cf_search
8728 echo "$as_me:8728: checking for -l$cf_nculib_root in $cf_libdir" >&5
8729 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8730 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8731 cat >conftest.$ac_ext <<_ACEOF
8732 #line 8732 "configure"
8733 #include "confdefs.h"
8734 #include <${cf_cv_ncurses_header:-curses.h}>
8743 rm -f conftest.$ac_objext conftest$ac_exeext
8744 if { (eval echo "$as_me:8744: \"$ac_link\"") >&5
8745 (eval $ac_link) 2>&5
8747 echo "$as_me:8747: \$? = $ac_status" >&5
8748 (exit $ac_status); } &&
8749 { ac_try='test -s conftest$ac_exeext'
8750 { (eval echo "$as_me:8750: \"$ac_try\"") >&5
8753 echo "$as_me:8753: \$? = $ac_status" >&5
8754 (exit $ac_status); }; }; then
8755 echo "$as_me:8755: result: yes" >&5
8756 echo "${ECHO_T}yes" >&6
8757 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
8760 echo "$as_me: failed program was:" >&5
8761 cat conftest.$ac_ext >&5
8762 echo "$as_me:8762: result: no" >&5
8763 echo "${ECHO_T}no" >&6
8764 LIBS="$cf_save_LIBS"
8766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8770 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8774 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
8776 if test $cf_found_library = no ; then
8777 { { echo "$as_me:8777: error: Cannot link $cf_nculib_root library" >&5
8778 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
8779 { (exit 1); exit 1; }; }
8784 if test -n "$cf_ncurses_LIBS" ; then
8785 echo "$as_me:8785: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
8786 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
8787 cf_ncurses_SAVE="$LIBS"
8788 for p in $cf_ncurses_LIBS ; do
8789 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
8790 if test "$q" != "$LIBS" ; then
8794 cat >conftest.$ac_ext <<_ACEOF
8795 #line 8795 "configure"
8796 #include "confdefs.h"
8797 #include <${cf_cv_ncurses_header:-curses.h}>
8801 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8806 rm -f conftest.$ac_objext conftest$ac_exeext
8807 if { (eval echo "$as_me:8807: \"$ac_link\"") >&5
8808 (eval $ac_link) 2>&5
8810 echo "$as_me:8810: \$? = $ac_status" >&5
8811 (exit $ac_status); } &&
8812 { ac_try='test -s conftest$ac_exeext'
8813 { (eval echo "$as_me:8813: \"$ac_try\"") >&5
8816 echo "$as_me:8816: \$? = $ac_status" >&5
8817 (exit $ac_status); }; }; then
8818 echo "$as_me:8818: result: yes" >&5
8819 echo "${ECHO_T}yes" >&6
8821 echo "$as_me: failed program was:" >&5
8822 cat conftest.$ac_ext >&5
8823 echo "$as_me:8823: result: no" >&5
8824 echo "${ECHO_T}no" >&6
8825 LIBS="$cf_ncurses_SAVE"
8827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8830 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8832 cat >>confdefs.h <<EOF
8833 #define $cf_nculib_ROOT 1
8843 cf_ncuconfig_root=ncurses
8844 cf_have_ncuconfig=no
8846 if test "x${PKG_CONFIG:=none}" != xnone; then
8847 echo "$as_me:8847: checking pkg-config for $cf_ncuconfig_root" >&5
8848 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8849 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8850 echo "$as_me:8850: result: yes" >&5
8851 echo "${ECHO_T}yes" >&6
8853 echo "$as_me:8853: checking if the $cf_ncuconfig_root package files work" >&5
8854 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8855 cf_have_ncuconfig=unknown
8857 cf_save_CFLAGS="$CFLAGS"
8858 cf_save_CPPFLAGS="$CPPFLAGS"
8859 cf_save_LIBS="$LIBS"
8861 cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
8862 cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
8864 # while -W for passing linker flags is prevalent, it is not "standard".
8865 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8866 # incompatible _and_ non-standard -W option which gives an error. Work
8867 # around that pitfall.
8868 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8874 cf_new_extra_cppflags=
8876 for cf_add_cflags in $cf_pkg_cflags
8878 case $cf_fix_cppflags in
8880 case $cf_add_cflags in
8881 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8882 case $cf_add_cflags in
8884 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8886 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8887 && test -z "${cf_tst_cflags}" \
8888 && cf_fix_cppflags=yes
8890 if test $cf_fix_cppflags = yes ; then
8892 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8893 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8896 elif test "${cf_tst_cflags}" = "\"'" ; then
8898 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8899 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8909 case $cf_add_cflags in
8911 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8913 CPPFLAGS=`echo "$CPPFLAGS" | \
8914 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8915 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8920 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8921 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8928 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8929 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8936 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8937 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8939 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8941 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8942 && test -z "${cf_tst_cflags}" \
8943 && cf_fix_cppflags=no
8948 if test -n "$cf_new_cflags" ; then
8950 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8951 CFLAGS="${CFLAGS}$cf_new_cflags"
8955 if test -n "$cf_new_cppflags" ; then
8957 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8958 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8962 if test -n "$cf_new_extra_cppflags" ; then
8964 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8965 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8972 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8974 for cf_add_1lib in $cf_add_0lib; do
8975 for cf_add_2lib in $cf_add_libs; do
8976 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8981 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8985 cat >conftest.$ac_ext <<_ACEOF
8986 #line 8986 "configure"
8987 #include "confdefs.h"
8988 #include <${cf_cv_ncurses_header:-curses.h}>
8992 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
8997 rm -f conftest.$ac_objext conftest$ac_exeext
8998 if { (eval echo "$as_me:8998: \"$ac_link\"") >&5
8999 (eval $ac_link) 2>&5
9001 echo "$as_me:9001: \$? = $ac_status" >&5
9002 (exit $ac_status); } &&
9003 { ac_try='test -s conftest$ac_exeext'
9004 { (eval echo "$as_me:9004: \"$ac_try\"") >&5
9007 echo "$as_me:9007: \$? = $ac_status" >&5
9008 (exit $ac_status); }; }; then
9009 if test "$cross_compiling" = yes; then
9010 cf_test_ncuconfig=maybe
9012 cat >conftest.$ac_ext <<_ACEOF
9013 #line 9013 "configure"
9014 #include "confdefs.h"
9015 #include <${cf_cv_ncurses_header:-curses.h}>
9017 { char *xx = curses_version(); return (xx == 0); }
9019 rm -f conftest$ac_exeext
9020 if { (eval echo "$as_me:9020: \"$ac_link\"") >&5
9021 (eval $ac_link) 2>&5
9023 echo "$as_me:9023: \$? = $ac_status" >&5
9024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9025 { (eval echo "$as_me:9025: \"$ac_try\"") >&5
9028 echo "$as_me:9028: \$? = $ac_status" >&5
9029 (exit $ac_status); }; }; then
9030 cf_test_ncuconfig=yes
9032 echo "$as_me: program exited with status $ac_status" >&5
9033 echo "$as_me: failed program was:" >&5
9034 cat conftest.$ac_ext >&5
9035 cf_test_ncuconfig=no
9037 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9040 echo "$as_me: failed program was:" >&5
9041 cat conftest.$ac_ext >&5
9042 cf_test_ncuconfig=no
9044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9046 CFLAGS="$cf_save_CFLAGS"
9047 CPPFLAGS="$cf_save_CPPFLAGS"
9048 LIBS="$cf_save_LIBS"
9050 if test "x$cf_test_ncuconfig" != xyes; then
9051 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9052 cf_pkg_cflags="$cf_temp"
9053 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9054 cf_pkg_libs="$cf_temp"
9062 cf_new_extra_cppflags=
9064 for cf_add_cflags in $cf_pkg_cflags
9066 case $cf_fix_cppflags in
9068 case $cf_add_cflags in
9069 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9070 case $cf_add_cflags in
9072 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9074 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9075 && test -z "${cf_tst_cflags}" \
9076 && cf_fix_cppflags=yes
9078 if test $cf_fix_cppflags = yes ; then
9080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9084 elif test "${cf_tst_cflags}" = "\"'" ; then
9086 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9087 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9097 case $cf_add_cflags in
9099 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9101 CPPFLAGS=`echo "$CPPFLAGS" | \
9102 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9103 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9108 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9109 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9116 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9117 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9124 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9125 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9127 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9129 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9130 && test -z "${cf_tst_cflags}" \
9131 && cf_fix_cppflags=no
9136 if test -n "$cf_new_cflags" ; then
9138 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9139 CFLAGS="${CFLAGS}$cf_new_cflags"
9143 if test -n "$cf_new_cppflags" ; then
9145 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9146 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9150 if test -n "$cf_new_extra_cppflags" ; then
9152 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9153 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9160 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9162 for cf_add_1lib in $cf_add_0lib; do
9163 for cf_add_2lib in $cf_add_libs; do
9164 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9169 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9173 cat >conftest.$ac_ext <<_ACEOF
9174 #line 9174 "configure"
9175 #include "confdefs.h"
9176 #include <${cf_cv_ncurses_header:-curses.h}>
9180 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9185 rm -f conftest.$ac_objext conftest$ac_exeext
9186 if { (eval echo "$as_me:9186: \"$ac_link\"") >&5
9187 (eval $ac_link) 2>&5
9189 echo "$as_me:9189: \$? = $ac_status" >&5
9190 (exit $ac_status); } &&
9191 { ac_try='test -s conftest$ac_exeext'
9192 { (eval echo "$as_me:9192: \"$ac_try\"") >&5
9195 echo "$as_me:9195: \$? = $ac_status" >&5
9196 (exit $ac_status); }; }; then
9197 if test "$cross_compiling" = yes; then
9198 cf_have_ncuconfig=maybe
9200 cat >conftest.$ac_ext <<_ACEOF
9201 #line 9201 "configure"
9202 #include "confdefs.h"
9203 #include <${cf_cv_ncurses_header:-curses.h}>
9205 { char *xx = curses_version(); return (xx == 0); }
9207 rm -f conftest$ac_exeext
9208 if { (eval echo "$as_me:9208: \"$ac_link\"") >&5
9209 (eval $ac_link) 2>&5
9211 echo "$as_me:9211: \$? = $ac_status" >&5
9212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9213 { (eval echo "$as_me:9213: \"$ac_try\"") >&5
9216 echo "$as_me:9216: \$? = $ac_status" >&5
9217 (exit $ac_status); }; }; then
9218 cf_have_ncuconfig=yes
9220 echo "$as_me: program exited with status $ac_status" >&5
9221 echo "$as_me: failed program was:" >&5
9222 cat conftest.$ac_ext >&5
9223 cf_have_ncuconfig=no
9225 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9228 echo "$as_me: failed program was:" >&5
9229 cat conftest.$ac_ext >&5
9230 cf_have_ncuconfig=no
9232 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9233 echo "$as_me:9233: result: $cf_have_ncuconfig" >&5
9234 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9235 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9236 if test "$cf_have_ncuconfig" != "yes"
9238 CPPFLAGS="$cf_save_CPPFLAGS"
9239 LIBS="$cf_save_LIBS"
9240 NCURSES_CONFIG_PKG=none
9243 cat >>confdefs.h <<\EOF
9247 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9249 echo "$as_me:9249: checking for terminfo header" >&5
9250 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9251 if test "${cf_cv_term_header+set}" = set; then
9252 echo $ECHO_N "(cached) $ECHO_C" >&6
9255 case ${cf_cv_ncurses_header} in
9256 (*/ncurses.h|*/ncursesw.h)
9257 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9260 cf_term_header=term.h
9264 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9266 cat >conftest.$ac_ext <<_ACEOF
9267 #line 9267 "configure"
9268 #include "confdefs.h"
9270 #include <${cf_cv_ncurses_header:-curses.h}>
9276 int x = auto_left_margin; (void)x
9281 rm -f conftest.$ac_objext
9282 if { (eval echo "$as_me:9282: \"$ac_compile\"") >&5
9283 (eval $ac_compile) 2>&5
9285 echo "$as_me:9285: \$? = $ac_status" >&5
9286 (exit $ac_status); } &&
9287 { ac_try='test -s conftest.$ac_objext'
9288 { (eval echo "$as_me:9288: \"$ac_try\"") >&5
9291 echo "$as_me:9291: \$? = $ac_status" >&5
9292 (exit $ac_status); }; }; then
9294 cf_cv_term_header="$cf_test"
9296 echo "$as_me: failed program was:" >&5
9297 cat conftest.$ac_ext >&5
9299 cf_cv_term_header=unknown
9302 rm -f conftest.$ac_objext conftest.$ac_ext
9303 test "$cf_cv_term_header" != unknown && break
9307 echo "$as_me:9307: result: $cf_cv_term_header" >&5
9308 echo "${ECHO_T}$cf_cv_term_header" >&6
9310 # Set definitions to allow ifdef'ing to accommodate subdirectories
9312 case $cf_cv_term_header in
9315 cat >>confdefs.h <<\EOF
9316 #define HAVE_TERM_H 1
9322 case $cf_cv_term_header in
9325 cat >>confdefs.h <<\EOF
9326 #define HAVE_NCURSES_TERM_H 1
9332 cat >>confdefs.h <<\EOF
9333 #define HAVE_NCURSESW_TERM_H 1
9342 echo "$as_me:9342: result: no" >&5
9343 echo "${ECHO_T}no" >&6
9344 NCURSES_CONFIG_PKG=none
9347 NCURSES_CONFIG_PKG=none
9350 if test "x$cf_have_ncuconfig" = "xno"; then
9351 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9353 if test -n "$ac_tool_prefix"; then
9354 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9356 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9357 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9358 echo "$as_me:9358: checking for $ac_word" >&5
9359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9360 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9361 echo $ECHO_N "(cached) $ECHO_C" >&6
9363 if test -n "$NCURSES_CONFIG"; then
9364 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9366 ac_save_IFS=$IFS; IFS=$ac_path_separator
9368 for ac_dir in $ac_dummy; do
9370 test -z "$ac_dir" && ac_dir=.
9371 $as_executable_p "$ac_dir/$ac_word" || continue
9372 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9373 echo "$as_me:9373: found $ac_dir/$ac_word" >&5
9379 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9380 if test -n "$NCURSES_CONFIG"; then
9381 echo "$as_me:9381: result: $NCURSES_CONFIG" >&5
9382 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9384 echo "$as_me:9384: result: no" >&5
9385 echo "${ECHO_T}no" >&6
9388 test -n "$NCURSES_CONFIG" && break
9391 if test -z "$NCURSES_CONFIG"; then
9392 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9393 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9395 # Extract the first word of "$ac_prog", so it can be a program name with args.
9396 set dummy $ac_prog; ac_word=$2
9397 echo "$as_me:9397: checking for $ac_word" >&5
9398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9399 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9400 echo $ECHO_N "(cached) $ECHO_C" >&6
9402 if test -n "$ac_ct_NCURSES_CONFIG"; then
9403 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9405 ac_save_IFS=$IFS; IFS=$ac_path_separator
9407 for ac_dir in $ac_dummy; do
9409 test -z "$ac_dir" && ac_dir=.
9410 $as_executable_p "$ac_dir/$ac_word" || continue
9411 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9412 echo "$as_me:9412: found $ac_dir/$ac_word" >&5
9418 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9419 if test -n "$ac_ct_NCURSES_CONFIG"; then
9420 echo "$as_me:9420: result: $ac_ct_NCURSES_CONFIG" >&5
9421 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9423 echo "$as_me:9423: result: no" >&5
9424 echo "${ECHO_T}no" >&6
9427 test -n "$ac_ct_NCURSES_CONFIG" && break
9429 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9431 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9434 if test "$NCURSES_CONFIG" != none ; then
9439 cf_new_extra_cppflags=
9441 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9443 case $cf_fix_cppflags in
9445 case $cf_add_cflags in
9446 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9447 case $cf_add_cflags in
9449 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9451 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9452 && test -z "${cf_tst_cflags}" \
9453 && cf_fix_cppflags=yes
9455 if test $cf_fix_cppflags = yes ; then
9457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9461 elif test "${cf_tst_cflags}" = "\"'" ; then
9463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9474 case $cf_add_cflags in
9476 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9478 CPPFLAGS=`echo "$CPPFLAGS" | \
9479 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9480 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9485 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9486 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9493 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9494 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9504 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9506 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9507 && test -z "${cf_tst_cflags}" \
9508 && cf_fix_cppflags=no
9513 if test -n "$cf_new_cflags" ; then
9515 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9516 CFLAGS="${CFLAGS}$cf_new_cflags"
9520 if test -n "$cf_new_cppflags" ; then
9522 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9523 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9527 if test -n "$cf_new_extra_cppflags" ; then
9529 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9530 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9537 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9539 for cf_add_1lib in $cf_add_0lib; do
9540 for cf_add_2lib in $cf_add_libs; do
9541 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9546 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9550 # even with config script, some packages use no-override for curses.h
9552 echo "$as_me:9552: checking if we have identified curses headers" >&5
9553 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9554 if test "${cf_cv_ncurses_header+set}" = set; then
9555 echo $ECHO_N "(cached) $ECHO_C" >&6
9558 cf_cv_ncurses_header=none
9560 ncurses.h ncurses/ncurses.h \
9561 curses.h ncurses/curses.h
9563 cat >conftest.$ac_ext <<_ACEOF
9564 #line 9564 "configure"
9565 #include "confdefs.h"
9566 #include <${cf_header}>
9570 initscr(); tgoto("?", 0,0)
9575 rm -f conftest.$ac_objext
9576 if { (eval echo "$as_me:9576: \"$ac_compile\"") >&5
9577 (eval $ac_compile) 2>&5
9579 echo "$as_me:9579: \$? = $ac_status" >&5
9580 (exit $ac_status); } &&
9581 { ac_try='test -s conftest.$ac_objext'
9582 { (eval echo "$as_me:9582: \"$ac_try\"") >&5
9585 echo "$as_me:9585: \$? = $ac_status" >&5
9586 (exit $ac_status); }; }; then
9587 cf_cv_ncurses_header=$cf_header; break
9589 echo "$as_me: failed program was:" >&5
9590 cat conftest.$ac_ext >&5
9592 rm -f conftest.$ac_objext conftest.$ac_ext
9596 echo "$as_me:9596: result: $cf_cv_ncurses_header" >&5
9597 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9599 if test "$cf_cv_ncurses_header" = none ; then
9600 { { echo "$as_me:9600: error: No curses header-files found" >&5
9601 echo "$as_me: error: No curses header-files found" >&2;}
9602 { (exit 1); exit 1; }; }
9605 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9607 for ac_header in $cf_cv_ncurses_header
9609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9610 echo "$as_me:9610: checking for $ac_header" >&5
9611 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9613 echo $ECHO_N "(cached) $ECHO_C" >&6
9615 cat >conftest.$ac_ext <<_ACEOF
9616 #line 9616 "configure"
9617 #include "confdefs.h"
9618 #include <$ac_header>
9620 if { (eval echo "$as_me:9620: \"$ac_cpp conftest.$ac_ext\"") >&5
9621 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9623 egrep -v '^ *\+' conftest.er1 >conftest.err
9625 cat conftest.err >&5
9626 echo "$as_me:9626: \$? = $ac_status" >&5
9627 (exit $ac_status); } >/dev/null; then
9628 if test -s conftest.err; then
9629 ac_cpp_err=$ac_c_preproc_warn_flag
9636 if test -z "$ac_cpp_err"; then
9637 eval "$as_ac_Header=yes"
9639 echo "$as_me: failed program was:" >&5
9640 cat conftest.$ac_ext >&5
9641 eval "$as_ac_Header=no"
9643 rm -f conftest.err conftest.$ac_ext
9645 echo "$as_me:9645: result: `eval echo '${'$as_ac_Header'}'`" >&5
9646 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9647 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9648 cat >>confdefs.h <<EOF
9649 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9655 cat >>confdefs.h <<\EOF
9659 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9661 cat >>confdefs.h <<EOF
9662 #define $cf_nculib_ROOT 1
9665 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
9669 cf_ncuhdr_root=ncurses
9671 test -n "$cf_cv_curses_dir" && \
9672 test "$cf_cv_curses_dir" != "no" && { \
9674 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9675 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9677 while test $cf_add_incdir != /usr/include
9679 if test -d $cf_add_incdir
9682 if test -n "$CFLAGS$CPPFLAGS" ; then
9683 # a loop is needed to ensure we can add subdirs of existing dirs
9684 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9685 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9686 cf_have_incdir=yes; break
9691 if test "$cf_have_incdir" = no ; then
9692 if test "$cf_add_incdir" = /usr/local/include ; then
9693 if test "$GCC" = yes
9695 cf_save_CPPFLAGS=$CPPFLAGS
9697 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9698 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9700 cat >conftest.$ac_ext <<_ACEOF
9701 #line 9701 "configure"
9702 #include "confdefs.h"
9712 rm -f conftest.$ac_objext
9713 if { (eval echo "$as_me:9713: \"$ac_compile\"") >&5
9714 (eval $ac_compile) 2>&5
9716 echo "$as_me:9716: \$? = $ac_status" >&5
9717 (exit $ac_status); } &&
9718 { ac_try='test -s conftest.$ac_objext'
9719 { (eval echo "$as_me:9719: \"$ac_try\"") >&5
9722 echo "$as_me:9722: \$? = $ac_status" >&5
9723 (exit $ac_status); }; }; then
9726 echo "$as_me: failed program was:" >&5
9727 cat conftest.$ac_ext >&5
9730 rm -f conftest.$ac_objext conftest.$ac_ext
9731 CPPFLAGS=$cf_save_CPPFLAGS
9736 if test "$cf_have_incdir" = no ; then
9737 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9739 echo "${as_me:-configure}:9739: testing adding $cf_add_incdir to include-path ..." 1>&5
9741 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9743 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9744 test "$cf_top_incdir" = "$cf_add_incdir" && break
9745 cf_add_incdir="$cf_top_incdir"
9758 echo "$as_me:9758: checking for $cf_ncuhdr_root header in include-path" >&5
9759 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9760 if test "${cf_cv_ncurses_h+set}" = set; then
9761 echo $ECHO_N "(cached) $ECHO_C" >&6
9764 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9765 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
9766 for cf_header in $cf_header_list
9769 cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9773 #include <$cf_header>
9778 #ifdef NCURSES_VERSION
9780 printf("%s\n", NCURSES_VERSION);
9793 rm -f conftest.$ac_objext
9794 if { (eval echo "$as_me:9794: \"$ac_compile\"") >&5
9795 (eval $ac_compile) 2>&5
9797 echo "$as_me:9797: \$? = $ac_status" >&5
9798 (exit $ac_status); } &&
9799 { ac_try='test -s conftest.$ac_objext'
9800 { (eval echo "$as_me:9800: \"$ac_try\"") >&5
9803 echo "$as_me:9803: \$? = $ac_status" >&5
9804 (exit $ac_status); }; }; then
9805 cf_cv_ncurses_h=$cf_header
9808 echo "$as_me: failed program was:" >&5
9809 cat conftest.$ac_ext >&5
9812 rm -f conftest.$ac_objext conftest.$ac_ext
9814 test "$cf_cv_ncurses_h" != no && break
9818 echo "$as_me:9818: result: $cf_cv_ncurses_h" >&5
9819 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9821 if test "$cf_cv_ncurses_h" != no ; then
9822 cf_cv_ncurses_header=$cf_cv_ncurses_h
9825 echo "$as_me:9825: checking for $cf_ncuhdr_root include-path" >&5
9826 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9827 if test "${cf_cv_ncurses_h2+set}" = set; then
9828 echo $ECHO_N "(cached) $ECHO_C" >&6
9831 test -n "$verbose" && echo
9835 # collect the current set of include-directories from compiler flags
9836 cf_header_path_list=""
9837 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9838 for cf_header_path in $CPPFLAGS $CFLAGS
9840 case $cf_header_path in
9842 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9844 test "x$cf_header_path" != "xNONE" && \
9845 test -d "$cf_header_path" && \
9847 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9848 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
9849 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9850 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9851 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9852 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"
9855 cf_header_path_list="$cf_header_path_list $cf_search"
9861 # add the variations for the package we are looking for
9865 test "x$prefix" != "xNONE" && \
9866 test -d "$prefix" && \
9868 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9869 test -d $prefix/include && cf_search="$cf_search $prefix/include"
9870 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9871 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9872 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9873 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9876 for cf_subdir_prefix in \
9885 test "x$cf_subdir_prefix" != "x$prefix" && \
9886 test -d "$cf_subdir_prefix" && \
9887 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9888 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9889 test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
9890 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9891 test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9892 test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9893 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"
9898 test "$includedir" != NONE && \
9899 test "$includedir" != "/usr/include" && \
9900 test -d "$includedir" && {
9901 test -d $includedir && cf_search="$cf_search $includedir"
9902 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9905 test "$oldincludedir" != NONE && \
9906 test "$oldincludedir" != "/usr/include" && \
9907 test -d "$oldincludedir" && {
9908 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
9909 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9912 cf_search="$cf_search $cf_header_path_list"
9914 test -n "$verbose" && echo search path $cf_search
9915 cf_save2_CPPFLAGS="$CPPFLAGS"
9916 for cf_incdir in $cf_search
9919 if test -n "$cf_incdir" ; then
9920 for cf_add_incdir in $cf_incdir
9922 while test $cf_add_incdir != /usr/include
9924 if test -d $cf_add_incdir
9927 if test -n "$CFLAGS$CPPFLAGS" ; then
9928 # a loop is needed to ensure we can add subdirs of existing dirs
9929 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9930 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9931 cf_have_incdir=yes; break
9936 if test "$cf_have_incdir" = no ; then
9937 if test "$cf_add_incdir" = /usr/local/include ; then
9938 if test "$GCC" = yes
9940 cf_save_CPPFLAGS=$CPPFLAGS
9942 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9943 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9945 cat >conftest.$ac_ext <<_ACEOF
9946 #line 9946 "configure"
9947 #include "confdefs.h"
9957 rm -f conftest.$ac_objext
9958 if { (eval echo "$as_me:9958: \"$ac_compile\"") >&5
9959 (eval $ac_compile) 2>&5
9961 echo "$as_me:9961: \$? = $ac_status" >&5
9962 (exit $ac_status); } &&
9963 { ac_try='test -s conftest.$ac_objext'
9964 { (eval echo "$as_me:9964: \"$ac_try\"") >&5
9967 echo "$as_me:9967: \$? = $ac_status" >&5
9968 (exit $ac_status); }; }; then
9971 echo "$as_me: failed program was:" >&5
9972 cat conftest.$ac_ext >&5
9975 rm -f conftest.$ac_objext conftest.$ac_ext
9976 CPPFLAGS=$cf_save_CPPFLAGS
9981 if test "$cf_have_incdir" = no ; then
9982 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9984 echo "${as_me:-configure}:9984: testing adding $cf_add_incdir to include-path ..." 1>&5
9986 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9988 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9989 test "$cf_top_incdir" = "$cf_add_incdir" && break
9990 cf_add_incdir="$cf_top_incdir"
10006 cat >conftest.$ac_ext <<_ACEOF
10007 #line 10007 "configure"
10008 #include "confdefs.h"
10010 #include <$cf_header>
10015 #ifdef NCURSES_VERSION
10017 printf("%s\n", NCURSES_VERSION);
10030 rm -f conftest.$ac_objext
10031 if { (eval echo "$as_me:10031: \"$ac_compile\"") >&5
10032 (eval $ac_compile) 2>&5
10034 echo "$as_me:10034: \$? = $ac_status" >&5
10035 (exit $ac_status); } &&
10036 { ac_try='test -s conftest.$ac_objext'
10037 { (eval echo "$as_me:10037: \"$ac_try\"") >&5
10038 (eval $ac_try) 2>&5
10040 echo "$as_me:10040: \$? = $ac_status" >&5
10041 (exit $ac_status); }; }; then
10042 cf_cv_ncurses_h2=$cf_header
10045 echo "$as_me: failed program was:" >&5
10046 cat conftest.$ac_ext >&5
10047 cf_cv_ncurses_h2=no
10049 rm -f conftest.$ac_objext conftest.$ac_ext
10051 if test "$cf_cv_ncurses_h2" != no ; then
10052 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10053 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
10056 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10058 CPPFLAGS="$cf_save2_CPPFLAGS"
10059 test "$cf_cv_ncurses_h2" != no && break
10061 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10061: error: not found" >&5
10062 echo "$as_me: error: not found" >&2;}
10063 { (exit 1); exit 1; }; }
10066 echo "$as_me:10066: result: $cf_cv_ncurses_h2" >&5
10067 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10069 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
10070 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
10071 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
10072 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
10075 if test -n "$cf_1st_incdir" ; then
10076 for cf_add_incdir in $cf_1st_incdir
10078 while test $cf_add_incdir != /usr/include
10080 if test -d $cf_add_incdir
10083 if test -n "$CFLAGS$CPPFLAGS" ; then
10084 # a loop is needed to ensure we can add subdirs of existing dirs
10085 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10086 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10087 cf_have_incdir=yes; break
10092 if test "$cf_have_incdir" = no ; then
10093 if test "$cf_add_incdir" = /usr/local/include ; then
10094 if test "$GCC" = yes
10096 cf_save_CPPFLAGS=$CPPFLAGS
10098 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10099 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10101 cat >conftest.$ac_ext <<_ACEOF
10102 #line 10102 "configure"
10103 #include "confdefs.h"
10113 rm -f conftest.$ac_objext
10114 if { (eval echo "$as_me:10114: \"$ac_compile\"") >&5
10115 (eval $ac_compile) 2>&5
10117 echo "$as_me:10117: \$? = $ac_status" >&5
10118 (exit $ac_status); } &&
10119 { ac_try='test -s conftest.$ac_objext'
10120 { (eval echo "$as_me:10120: \"$ac_try\"") >&5
10121 (eval $ac_try) 2>&5
10123 echo "$as_me:10123: \$? = $ac_status" >&5
10124 (exit $ac_status); }; }; then
10127 echo "$as_me: failed program was:" >&5
10128 cat conftest.$ac_ext >&5
10131 rm -f conftest.$ac_objext conftest.$ac_ext
10132 CPPFLAGS=$cf_save_CPPFLAGS
10137 if test "$cf_have_incdir" = no ; then
10138 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10140 echo "${as_me:-configure}:10140: testing adding $cf_add_incdir to include-path ..." 1>&5
10142 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10144 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10145 test "$cf_top_incdir" = "$cf_add_incdir" && break
10146 cf_add_incdir="$cf_top_incdir"
10159 # Set definitions to allow ifdef'ing for ncurses.h
10161 case $cf_cv_ncurses_header in
10164 cat >>confdefs.h <<\EOF
10165 #define HAVE_NCURSES_H 1
10171 case $cf_cv_ncurses_header in
10172 (ncurses/curses.h|ncurses/ncurses.h)
10174 cat >>confdefs.h <<\EOF
10175 #define HAVE_NCURSES_NCURSES_H 1
10179 (ncursesw/curses.h|ncursesw/ncurses.h)
10181 cat >>confdefs.h <<\EOF
10182 #define HAVE_NCURSESW_NCURSES_H 1
10188 echo "$as_me:10188: checking for terminfo header" >&5
10189 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10190 if test "${cf_cv_term_header+set}" = set; then
10191 echo $ECHO_N "(cached) $ECHO_C" >&6
10194 case ${cf_cv_ncurses_header} in
10195 (*/ncurses.h|*/ncursesw.h)
10196 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10199 cf_term_header=term.h
10203 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10205 cat >conftest.$ac_ext <<_ACEOF
10206 #line 10206 "configure"
10207 #include "confdefs.h"
10209 #include <${cf_cv_ncurses_header:-curses.h}>
10210 #include <$cf_test>
10215 int x = auto_left_margin; (void)x
10220 rm -f conftest.$ac_objext
10221 if { (eval echo "$as_me:10221: \"$ac_compile\"") >&5
10222 (eval $ac_compile) 2>&5
10224 echo "$as_me:10224: \$? = $ac_status" >&5
10225 (exit $ac_status); } &&
10226 { ac_try='test -s conftest.$ac_objext'
10227 { (eval echo "$as_me:10227: \"$ac_try\"") >&5
10228 (eval $ac_try) 2>&5
10230 echo "$as_me:10230: \$? = $ac_status" >&5
10231 (exit $ac_status); }; }; then
10233 cf_cv_term_header="$cf_test"
10235 echo "$as_me: failed program was:" >&5
10236 cat conftest.$ac_ext >&5
10238 cf_cv_term_header=unknown
10241 rm -f conftest.$ac_objext conftest.$ac_ext
10242 test "$cf_cv_term_header" != unknown && break
10246 echo "$as_me:10246: result: $cf_cv_term_header" >&5
10247 echo "${ECHO_T}$cf_cv_term_header" >&6
10249 # Set definitions to allow ifdef'ing to accommodate subdirectories
10251 case $cf_cv_term_header in
10254 cat >>confdefs.h <<\EOF
10255 #define HAVE_TERM_H 1
10261 case $cf_cv_term_header in
10264 cat >>confdefs.h <<\EOF
10265 #define HAVE_NCURSES_TERM_H 1
10271 cat >>confdefs.h <<\EOF
10272 #define HAVE_NCURSESW_TERM_H 1
10278 # some applications need this, but should check for NCURSES_VERSION
10280 cat >>confdefs.h <<\EOF
10284 echo "$as_me:10284: checking for ncurses version" >&5
10285 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10286 if test "${cf_cv_ncurses_version+set}" = set; then
10287 echo $ECHO_N "(cached) $ECHO_C" >&6
10290 cf_cv_ncurses_version=no
10293 if test "$cross_compiling" = yes; then
10295 # This will not work if the preprocessor splits the line after the
10296 # Autoconf token. The 'unproto' program does that.
10297 cat > conftest.$ac_ext <<EOF
10298 #include <${cf_cv_ncurses_header:-curses.h}>
10300 #ifdef NCURSES_VERSION
10301 Autoconf NCURSES_VERSION
10309 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10310 { (eval echo "$as_me:10310: \"$cf_try\"") >&5
10311 (eval $cf_try) 2>&5
10313 echo "$as_me:10313: \$? = $ac_status" >&5
10314 (exit $ac_status); }
10315 if test -f conftest.out ; then
10316 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
10317 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10322 cat >conftest.$ac_ext <<_ACEOF
10323 #line 10323 "configure"
10324 #include "confdefs.h"
10326 #include <${cf_cv_ncurses_header:-curses.h}>
10330 FILE *fp = fopen("$cf_tempfile", "w");
10331 #ifdef NCURSES_VERSION
10332 # ifdef NCURSES_VERSION_PATCH
10333 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10335 fprintf(fp, "%s\n", NCURSES_VERSION);
10338 # ifdef __NCURSES_H
10339 fprintf(fp, "old\n");
10344 ${cf_cv_main_return:-return}(0);
10347 rm -f conftest$ac_exeext
10348 if { (eval echo "$as_me:10348: \"$ac_link\"") >&5
10349 (eval $ac_link) 2>&5
10351 echo "$as_me:10351: \$? = $ac_status" >&5
10352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10353 { (eval echo "$as_me:10353: \"$ac_try\"") >&5
10354 (eval $ac_try) 2>&5
10356 echo "$as_me:10356: \$? = $ac_status" >&5
10357 (exit $ac_status); }; }; then
10359 cf_cv_ncurses_version=`cat $cf_tempfile`
10361 echo "$as_me: program exited with status $ac_status" >&5
10362 echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10365 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10370 echo "$as_me:10370: result: $cf_cv_ncurses_version" >&5
10371 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10372 test "$cf_cv_ncurses_version" = no ||
10373 cat >>confdefs.h <<\EOF
10377 cf_nculib_root=ncurses
10378 # This works, except for the special case where we find gpm, but
10379 # ncurses is in a nonstandard location via $LIBS, and we really want
10382 cf_ncurses_SAVE="$LIBS"
10383 echo "$as_me:10383: checking for Gpm_Open in -lgpm" >&5
10384 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10385 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10386 echo $ECHO_N "(cached) $ECHO_C" >&6
10388 ac_check_lib_save_LIBS=$LIBS
10390 cat >conftest.$ac_ext <<_ACEOF
10391 #line 10391 "configure"
10392 #include "confdefs.h"
10394 /* Override any gcc2 internal prototype to avoid an error. */
10398 /* We use char because int might match the return type of a gcc2
10399 builtin and then its argument prototype would still apply. */
10409 rm -f conftest.$ac_objext conftest$ac_exeext
10410 if { (eval echo "$as_me:10410: \"$ac_link\"") >&5
10411 (eval $ac_link) 2>&5
10413 echo "$as_me:10413: \$? = $ac_status" >&5
10414 (exit $ac_status); } &&
10415 { ac_try='test -s conftest$ac_exeext'
10416 { (eval echo "$as_me:10416: \"$ac_try\"") >&5
10417 (eval $ac_try) 2>&5
10419 echo "$as_me:10419: \$? = $ac_status" >&5
10420 (exit $ac_status); }; }; then
10421 ac_cv_lib_gpm_Gpm_Open=yes
10423 echo "$as_me: failed program was:" >&5
10424 cat conftest.$ac_ext >&5
10425 ac_cv_lib_gpm_Gpm_Open=no
10427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10428 LIBS=$ac_check_lib_save_LIBS
10430 echo "$as_me:10430: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10431 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10432 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
10433 echo "$as_me:10433: checking for initscr in -lgpm" >&5
10434 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10435 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10436 echo $ECHO_N "(cached) $ECHO_C" >&6
10438 ac_check_lib_save_LIBS=$LIBS
10440 cat >conftest.$ac_ext <<_ACEOF
10441 #line 10441 "configure"
10442 #include "confdefs.h"
10444 /* Override any gcc2 internal prototype to avoid an error. */
10448 /* We use char because int might match the return type of a gcc2
10449 builtin and then its argument prototype would still apply. */
10459 rm -f conftest.$ac_objext conftest$ac_exeext
10460 if { (eval echo "$as_me:10460: \"$ac_link\"") >&5
10461 (eval $ac_link) 2>&5
10463 echo "$as_me:10463: \$? = $ac_status" >&5
10464 (exit $ac_status); } &&
10465 { ac_try='test -s conftest$ac_exeext'
10466 { (eval echo "$as_me:10466: \"$ac_try\"") >&5
10467 (eval $ac_try) 2>&5
10469 echo "$as_me:10469: \$? = $ac_status" >&5
10470 (exit $ac_status); }; }; then
10471 ac_cv_lib_gpm_initscr=yes
10473 echo "$as_me: failed program was:" >&5
10474 cat conftest.$ac_ext >&5
10475 ac_cv_lib_gpm_initscr=no
10477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10478 LIBS=$ac_check_lib_save_LIBS
10480 echo "$as_me:10480: result: $ac_cv_lib_gpm_initscr" >&5
10481 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10482 if test $ac_cv_lib_gpm_initscr = yes; then
10483 LIBS="$cf_ncurses_SAVE"
10485 cf_ncurses_LIBS="-lgpm"
10492 # This is only necessary if you are linking against an obsolete
10493 # version of ncurses (but it should do no harm, since it's static).
10494 if test "$cf_nculib_root" = ncurses ; then
10495 echo "$as_me:10495: checking for tgoto in -lmytinfo" >&5
10496 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10497 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10498 echo $ECHO_N "(cached) $ECHO_C" >&6
10500 ac_check_lib_save_LIBS=$LIBS
10501 LIBS="-lmytinfo $LIBS"
10502 cat >conftest.$ac_ext <<_ACEOF
10503 #line 10503 "configure"
10504 #include "confdefs.h"
10506 /* Override any gcc2 internal prototype to avoid an error. */
10510 /* We use char because int might match the return type of a gcc2
10511 builtin and then its argument prototype would still apply. */
10521 rm -f conftest.$ac_objext conftest$ac_exeext
10522 if { (eval echo "$as_me:10522: \"$ac_link\"") >&5
10523 (eval $ac_link) 2>&5
10525 echo "$as_me:10525: \$? = $ac_status" >&5
10526 (exit $ac_status); } &&
10527 { ac_try='test -s conftest$ac_exeext'
10528 { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529 (eval $ac_try) 2>&5
10531 echo "$as_me:10531: \$? = $ac_status" >&5
10532 (exit $ac_status); }; }; then
10533 ac_cv_lib_mytinfo_tgoto=yes
10535 echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 ac_cv_lib_mytinfo_tgoto=no
10539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10540 LIBS=$ac_check_lib_save_LIBS
10542 echo "$as_me:10542: result: $ac_cv_lib_mytinfo_tgoto" >&5
10543 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10544 if test $ac_cv_lib_mytinfo_tgoto = yes; then
10545 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10552 cf_add_libs="$LIBS"
10555 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10556 # filter duplicates
10557 for cf_add_1lib in $cf_add_0lib; do
10558 for cf_add_2lib in $cf_add_libs; do
10559 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10564 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10566 LIBS="$cf_add_libs"
10568 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
10571 cf_add_libs="$LIBS"
10574 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10575 # filter duplicates
10576 for cf_add_1lib in $cf_add_0lib; do
10577 for cf_add_2lib in $cf_add_libs; do
10578 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10583 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10585 LIBS="$cf_add_libs"
10589 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
10591 echo "$as_me:10591: checking for initscr" >&5
10592 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10593 if test "${ac_cv_func_initscr+set}" = set; then
10594 echo $ECHO_N "(cached) $ECHO_C" >&6
10596 cat >conftest.$ac_ext <<_ACEOF
10597 #line 10597 "configure"
10598 #include "confdefs.h"
10599 #define initscr autoconf_temporary
10600 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10607 /* We use char because int might match the return type of a gcc2
10608 builtin and then its argument prototype would still apply. */
10609 char initscr (void);
10615 /* The GNU C library defines stubs for functions which it implements
10616 to always fail with ENOSYS. Some functions are actually named
10617 something starting with __ and the normal name is an alias. */
10618 #if defined (__stub_initscr) || defined (__stub___initscr)
10619 #error found stub for initscr
10627 rm -f conftest.$ac_objext conftest$ac_exeext
10628 if { (eval echo "$as_me:10628: \"$ac_link\"") >&5
10629 (eval $ac_link) 2>&5
10631 echo "$as_me:10631: \$? = $ac_status" >&5
10632 (exit $ac_status); } &&
10633 { ac_try='test -s conftest$ac_exeext'
10634 { (eval echo "$as_me:10634: \"$ac_try\"") >&5
10635 (eval $ac_try) 2>&5
10637 echo "$as_me:10637: \$? = $ac_status" >&5
10638 (exit $ac_status); }; }; then
10639 ac_cv_func_initscr=yes
10641 echo "$as_me: failed program was:" >&5
10642 cat conftest.$ac_ext >&5
10643 ac_cv_func_initscr=no
10645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10647 echo "$as_me:10647: result: $ac_cv_func_initscr" >&5
10648 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10649 if test $ac_cv_func_initscr = yes; then
10650 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10653 cf_save_LIBS="$LIBS"
10654 echo "$as_me:10654: checking for initscr in -l$cf_nculib_root" >&5
10655 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10656 LIBS="-l$cf_nculib_root $LIBS"
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10660 #include <${cf_cv_ncurses_header:-curses.h}>
10669 rm -f conftest.$ac_objext conftest$ac_exeext
10670 if { (eval echo "$as_me:10670: \"$ac_link\"") >&5
10671 (eval $ac_link) 2>&5
10673 echo "$as_me:10673: \$? = $ac_status" >&5
10674 (exit $ac_status); } &&
10675 { ac_try='test -s conftest$ac_exeext'
10676 { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677 (eval $ac_try) 2>&5
10679 echo "$as_me:10679: \$? = $ac_status" >&5
10680 (exit $ac_status); }; }; then
10681 echo "$as_me:10681: result: yes" >&5
10682 echo "${ECHO_T}yes" >&6
10683 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10686 echo "$as_me: failed program was:" >&5
10687 cat conftest.$ac_ext >&5
10688 echo "$as_me:10688: result: no" >&5
10689 echo "${ECHO_T}no" >&6
10692 cf_library_path_list=""
10693 if test -n "${LDFLAGS}${LIBS}" ; then
10694 for cf_library_path in $LDFLAGS $LIBS
10696 case $cf_library_path in
10698 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10700 test "x$cf_library_path" != "xNONE" && \
10701 test -d "$cf_library_path" && \
10703 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10704 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
10705 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10706 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10707 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10708 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"
10711 cf_library_path_list="$cf_library_path_list $cf_search"
10719 test "x$prefix" != "xNONE" && \
10720 test -d "$prefix" && \
10722 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10723 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
10724 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10725 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10726 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10727 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10730 for cf_subdir_prefix in \
10739 test "x$cf_subdir_prefix" != "x$prefix" && \
10740 test -d "$cf_subdir_prefix" && \
10741 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10742 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10743 test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
10744 test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10745 test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10746 test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10747 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"
10752 cf_search="$cf_library_path_list $cf_search"
10754 for cf_libdir in $cf_search
10756 echo "$as_me:10756: checking for -l$cf_nculib_root in $cf_libdir" >&5
10757 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10758 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10759 cat >conftest.$ac_ext <<_ACEOF
10760 #line 10760 "configure"
10761 #include "confdefs.h"
10762 #include <${cf_cv_ncurses_header:-curses.h}>
10771 rm -f conftest.$ac_objext conftest$ac_exeext
10772 if { (eval echo "$as_me:10772: \"$ac_link\"") >&5
10773 (eval $ac_link) 2>&5
10775 echo "$as_me:10775: \$? = $ac_status" >&5
10776 (exit $ac_status); } &&
10777 { ac_try='test -s conftest$ac_exeext'
10778 { (eval echo "$as_me:10778: \"$ac_try\"") >&5
10779 (eval $ac_try) 2>&5
10781 echo "$as_me:10781: \$? = $ac_status" >&5
10782 (exit $ac_status); }; }; then
10783 echo "$as_me:10783: result: yes" >&5
10784 echo "${ECHO_T}yes" >&6
10785 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
10788 echo "$as_me: failed program was:" >&5
10789 cat conftest.$ac_ext >&5
10790 echo "$as_me:10790: result: no" >&5
10791 echo "${ECHO_T}no" >&6
10792 LIBS="$cf_save_LIBS"
10794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10802 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
10804 if test $cf_found_library = no ; then
10805 { { echo "$as_me:10805: error: Cannot link $cf_nculib_root library" >&5
10806 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10807 { (exit 1); exit 1; }; }
10812 if test -n "$cf_ncurses_LIBS" ; then
10813 echo "$as_me:10813: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10814 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10815 cf_ncurses_SAVE="$LIBS"
10816 for p in $cf_ncurses_LIBS ; do
10817 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
10818 if test "$q" != "$LIBS" ; then
10822 cat >conftest.$ac_ext <<_ACEOF
10823 #line 10823 "configure"
10824 #include "confdefs.h"
10825 #include <${cf_cv_ncurses_header:-curses.h}>
10829 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
10834 rm -f conftest.$ac_objext conftest$ac_exeext
10835 if { (eval echo "$as_me:10835: \"$ac_link\"") >&5
10836 (eval $ac_link) 2>&5
10838 echo "$as_me:10838: \$? = $ac_status" >&5
10839 (exit $ac_status); } &&
10840 { ac_try='test -s conftest$ac_exeext'
10841 { (eval echo "$as_me:10841: \"$ac_try\"") >&5
10842 (eval $ac_try) 2>&5
10844 echo "$as_me:10844: \$? = $ac_status" >&5
10845 (exit $ac_status); }; }; then
10846 echo "$as_me:10846: result: yes" >&5
10847 echo "${ECHO_T}yes" >&6
10849 echo "$as_me: failed program was:" >&5
10850 cat conftest.$ac_ext >&5
10851 echo "$as_me:10851: result: no" >&5
10852 echo "${ECHO_T}no" >&6
10853 LIBS="$cf_ncurses_SAVE"
10855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10858 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10860 cat >>confdefs.h <<EOF
10861 #define $cf_nculib_ROOT 1
10866 NCURSES_CONFIG=none
10871 if test "$NCURSES_CONFIG_PKG" != none ; then
10872 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
10874 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10875 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10876 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10878 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
10879 if test -z "$cf_cv_abi_version"
10881 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
10884 elif test "$NCURSES_CONFIG" != none ; then
10886 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
10888 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
10889 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
10890 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
10892 # ABI version is not available from headers
10893 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
10897 for cf_name in MAJOR MINOR PATCH
10899 cat >conftest.$ac_ext <<CF_EOF
10900 #include <${cf_cv_ncurses_header:-curses.h}>
10901 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
10903 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
10904 { (eval echo "$as_me:10904: \"$cf_try\"") >&5
10905 (eval $cf_try) 2>&5
10907 echo "$as_me:10907: \$? = $ac_status" >&5
10908 (exit $ac_status); }
10909 if test -f conftest.out ; then
10910 cf_result=`cat conftest.out | sed -e "s/^.*AUTOCONF_$cf_name[ ][ ]*//"`
10911 eval NCURSES_$cf_name=\"$cf_result\"
10912 # cat conftest.$ac_ext
10917 cf_cv_abi_version=${NCURSES_MAJOR}
10921 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
10923 cf_cv_timestamp=`date`
10925 echo "$as_me:10925: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
10926 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
10928 echo "$as_me:10928: checking if you want to have a library-prefix" >&5
10929 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
10931 # Check whether --with-lib-prefix or --without-lib-prefix was given.
10932 if test "${with_lib_prefix+set}" = set; then
10933 withval="$with_lib_prefix"
10934 with_lib_prefix=$withval
10936 with_lib_prefix=auto
10938 echo "$as_me:10938: result: $with_lib_prefix" >&5
10939 echo "${ECHO_T}$with_lib_prefix" >&6
10941 if test $with_lib_prefix = auto
10944 case $cf_cv_system_name in
10946 if test "$DFT_LWR_MODEL" = libtool; then
10955 (*) LIB_PREFIX='lib'
10958 cf_prefix=$LIB_PREFIX
10960 elif test $with_lib_prefix = no
10964 LIB_PREFIX=$with_lib_prefix
10969 ###############################################################################
10971 if test X"$CC_G_OPT" = X"" ; then
10973 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
10976 echo "$as_me:10976: checking for default loader flags" >&5
10977 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
10978 case $DFT_LWR_MODEL in
10979 (normal) LD_MODEL='' ;;
10980 (debug) LD_MODEL=$CC_G_OPT ;;
10981 (profile) LD_MODEL='-pg';;
10982 (shared) LD_MODEL='' ;;
10984 echo "$as_me:10984: result: $LD_MODEL" >&5
10985 echo "${ECHO_T}$LD_MODEL" >&6
10988 if test "x$cf_cv_enable_rpath" != xno
10990 echo "$as_me:10990: checking for an rpath option" >&5
10991 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
10992 case $cf_cv_system_name in
10994 if test "$GCC" = yes; then
10995 LD_RPATH_OPT="-Wl,-rpath,"
10997 LD_RPATH_OPT="-rpath "
11000 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11001 LD_RPATH_OPT="-Wl,-rpath,"
11003 (openbsd[2-9].*|mirbsd*)
11004 LD_RPATH_OPT="-Wl,-rpath,"
11007 LD_RPATH_OPT="-rpath "
11010 LD_RPATH_OPT="-Wl,-rpath,"
11013 LD_RPATH_OPT="-rpath "
11021 echo "$as_me:11021: result: $LD_RPATH_OPT" >&5
11022 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11024 case "x$LD_RPATH_OPT" in
11026 echo "$as_me:11026: checking if we need a space after rpath option" >&5
11027 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11028 cf_save_LIBS="$LIBS"
11030 cf_add_libs="$LIBS"
11033 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11034 # filter duplicates
11035 for cf_add_1lib in $cf_add_0lib; do
11036 for cf_add_2lib in $cf_add_libs; do
11037 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11042 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11044 LIBS="$cf_add_libs"
11046 cat >conftest.$ac_ext <<_ACEOF
11047 #line 11047 "configure"
11048 #include "confdefs.h"
11058 rm -f conftest.$ac_objext conftest$ac_exeext
11059 if { (eval echo "$as_me:11059: \"$ac_link\"") >&5
11060 (eval $ac_link) 2>&5
11062 echo "$as_me:11062: \$? = $ac_status" >&5
11063 (exit $ac_status); } &&
11064 { ac_try='test -s conftest$ac_exeext'
11065 { (eval echo "$as_me:11065: \"$ac_try\"") >&5
11066 (eval $ac_try) 2>&5
11068 echo "$as_me:11068: \$? = $ac_status" >&5
11069 (exit $ac_status); }; }; then
11072 echo "$as_me: failed program was:" >&5
11073 cat conftest.$ac_ext >&5
11076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11077 LIBS="$cf_save_LIBS"
11078 echo "$as_me:11078: result: $cf_rpath_space" >&5
11079 echo "${ECHO_T}$cf_rpath_space" >&6
11080 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11089 INSTALL_LIB="-m 644"
11090 : ${rel_builddir:=.}
11096 cf_cv_do_symlinks=no
11098 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11100 echo "$as_me:11100: checking if release/abi version should be used for shared libs" >&5
11101 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11103 # Check whether --with-shlib-version or --without-shlib-version was given.
11104 if test "${with_shlib_version+set}" = set; then
11105 withval="$with_shlib_version"
11106 test -z "$withval" && withval=auto
11109 cf_cv_shlib_version=auto
11112 cf_cv_shlib_version=$withval
11115 echo "$as_me:11115: result: $withval" >&5
11116 echo "${ECHO_T}$withval" >&6
11117 { { echo "$as_me:11117: error: option value must be one of: rel, abi, or auto" >&5
11118 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11119 { (exit 1); exit 1; }; }
11124 cf_cv_shlib_version=auto
11126 echo "$as_me:11126: result: $cf_cv_shlib_version" >&5
11127 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11129 cf_cv_rm_so_locs=no
11132 # Some less-capable ports of gcc support only -fpic
11136 if test "$GCC" = yes
11140 case $cf_cv_system_name in
11141 (*linux*) # e.g., PGI compiler
11147 if test "$cf_try_fPIC" = yes
11149 echo "$as_me:11149: checking which $CC option to use" >&5
11150 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11151 cf_save_CFLAGS="$CFLAGS"
11152 for CC_SHARED_OPTS in -fPIC -fpic ''
11154 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11155 cat >conftest.$ac_ext <<_ACEOF
11156 #line 11156 "configure"
11157 #include "confdefs.h"
11167 rm -f conftest.$ac_objext
11168 if { (eval echo "$as_me:11168: \"$ac_compile\"") >&5
11169 (eval $ac_compile) 2>&5
11171 echo "$as_me:11171: \$? = $ac_status" >&5
11172 (exit $ac_status); } &&
11173 { ac_try='test -s conftest.$ac_objext'
11174 { (eval echo "$as_me:11174: \"$ac_try\"") >&5
11175 (eval $ac_try) 2>&5
11177 echo "$as_me:11177: \$? = $ac_status" >&5
11178 (exit $ac_status); }; }; then
11181 echo "$as_me: failed program was:" >&5
11182 cat conftest.$ac_ext >&5
11184 rm -f conftest.$ac_objext conftest.$ac_ext
11186 echo "$as_me:11186: result: $CC_SHARED_OPTS" >&5
11187 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11188 CFLAGS="$cf_save_CFLAGS"
11191 cf_cv_shlib_version_infix=no
11193 case $cf_cv_system_name in
11194 (aix4.3-9*|aix[5-7]*)
11195 if test "$GCC" = yes; then
11196 CC_SHARED_OPTS='-Wl,-brtl'
11197 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11199 CC_SHARED_OPTS='-brtl'
11200 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11201 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11205 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11209 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11210 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11211 cf_cv_shlib_version=cygdll
11212 cf_cv_shlib_version_infix=cygdll
11215 cat >mk_shared_lib.sh <<-CF_EOF
11218 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11221 Linking shared library
11222 ** SHARED_LIB \$SHARED_LIB
11223 ** IMPORT_LIB \$IMPORT_LIB
11225 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11227 chmod +x mk_shared_lib.sh
11231 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11232 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11233 cf_cv_shlib_version=msysdll
11234 cf_cv_shlib_version_infix=msysdll
11237 cat >mk_shared_lib.sh <<-CF_EOF
11240 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11243 Linking shared library
11244 ** SHARED_LIB \$SHARED_LIB
11245 ** IMPORT_LIB \$IMPORT_LIB
11247 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11249 chmod +x mk_shared_lib.sh
11252 cf_try_cflags="no-cpp-precomp"
11253 CC_SHARED_OPTS="-dynamic"
11254 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11255 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11256 cf_cv_shlib_version_infix=yes
11257 echo "$as_me:11257: checking if ld -search_paths_first works" >&5
11258 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11259 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11260 echo $ECHO_N "(cached) $ECHO_C" >&6
11263 cf_save_LDFLAGS=$LDFLAGS
11264 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11265 cat >conftest.$ac_ext <<_ACEOF
11266 #line 11266 "configure"
11267 #include "confdefs.h"
11277 rm -f conftest.$ac_objext conftest$ac_exeext
11278 if { (eval echo "$as_me:11278: \"$ac_link\"") >&5
11279 (eval $ac_link) 2>&5
11281 echo "$as_me:11281: \$? = $ac_status" >&5
11282 (exit $ac_status); } &&
11283 { ac_try='test -s conftest$ac_exeext'
11284 { (eval echo "$as_me:11284: \"$ac_try\"") >&5
11285 (eval $ac_try) 2>&5
11287 echo "$as_me:11287: \$? = $ac_status" >&5
11288 (exit $ac_status); }; }; then
11289 cf_cv_ldflags_search_paths_first=yes
11291 echo "$as_me: failed program was:" >&5
11292 cat conftest.$ac_ext >&5
11293 cf_cv_ldflags_search_paths_first=no
11295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11296 LDFLAGS=$cf_save_LDFLAGS
11298 echo "$as_me:11298: result: $cf_cv_ldflags_search_paths_first" >&5
11299 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11300 if test $cf_cv_ldflags_search_paths_first = yes; then
11301 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11305 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11306 if test "$GCC" != yes; then
11307 CC_SHARED_OPTS='+Z'
11309 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11310 INSTALL_LIB="-m 555"
11313 # (tested with gcc 2.7.2 -- I don't have c89)
11314 if test "$GCC" = yes; then
11315 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11317 CC_SHARED_OPTS='+Z'
11318 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11320 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11321 # HP-UX shared libraries must be executable, and should be
11322 # readonly to exploit a quirk in the memory manager.
11323 INSTALL_LIB="-m 555"
11326 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11327 if test "$cf_cv_shlib_version" = rel; then
11328 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11330 cf_shared_soname='`basename $@`'
11333 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11336 if test "$cf_cv_enable_rpath" = yes ; then
11337 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11339 # tested with IRIX 5.2 and 'cc'.
11340 if test "$GCC" != yes; then
11341 CC_SHARED_OPTS='-KPIC'
11342 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11344 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11346 cf_cv_rm_so_locs=yes
11348 (linux*|gnu*|k*bsd*-gnu)
11349 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11350 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11351 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11353 if test "$cf_cv_enable_rpath" = yes ; then
11354 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11357 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11358 if test "$cf_cv_shlib_version" = rel; then
11359 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11361 cf_cv_shared_soname='`basename $@`'
11364 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11367 cf_cv_shlib_version=msvcdll
11368 cf_cv_shlib_version_infix=msvcdll
11371 if test "$DFT_LWR_MODEL" = "shared" ; then
11372 LOCAL_LDFLAGS="-link -dll"
11373 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11374 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11377 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11378 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11379 cat >mk_shared_lib.sh <<-CF_EOF
11382 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11387 Linking shared library
11388 ** SHARED LIB \$SHARED_LIB
11389 ** IMPORT_LIB \$IMPORT_LIB
11391 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11392 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11393 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11395 chmod +x mk_shared_lib.sh
11396 cat >mk_prog.sh <<-CF_EOF
11399 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11402 ldopts=("/subsystem:console")
11405 while test \$# -gt 0; do
11408 # ignore -link argument
11411 # ignore runtime-library option
11426 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11429 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11435 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11436 ldopts+=("\${linkarg}")
11444 ldopts+=("-out:\$1")
11453 if [ "\$isdll" -ne 0 ]; then
11454 for lib in \${libs[*]}; do
11455 ldopts+=("\$lib.dll.lib")
11458 for lib in \${libs[*]}; do
11459 ldopts+=("\$lib.lib")
11464 ** ld options: "\${ldopts[@]}"
11466 exec \$LD \${ldopts[@]}
11468 chmod +x mk_prog.sh
11469 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11470 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11473 cf_cv_shlib_version=mingw
11474 cf_cv_shlib_version_infix=mingw
11477 if test "$DFT_LWR_MODEL" = "shared" ; then
11478 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11479 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11480 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11483 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11484 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11485 cat >mk_shared_lib.sh <<-CF_EOF
11488 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11491 Linking shared library
11492 ** SHARED_LIB \$SHARED_LIB
11493 ** IMPORT_LIB \$IMPORT_LIB
11495 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11497 chmod +x mk_shared_lib.sh
11499 (openbsd[2-9].*|mirbsd*)
11500 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11501 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11502 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11504 if test "$cf_cv_enable_rpath" = yes ; then
11505 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11507 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11509 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11510 if test "$cf_cv_shlib_version" = rel; then
11511 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11513 cf_cv_shared_soname='`basename $@`'
11516 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11520 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11524 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11526 (nto-qnx*|openbsd*|freebsd[12].*)
11527 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11528 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11529 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11531 (dragonfly*|freebsd*)
11532 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11533 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11534 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11535 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11536 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11539 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11540 if test "$cf_cv_shlib_version" = rel; then
11541 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11543 cf_cv_shared_soname='`basename $@`'
11546 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11549 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11550 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11551 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11552 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11553 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11554 if test "$cf_cv_shlib_version" = auto; then
11555 if test -f /usr/libexec/ld.elf_so; then
11556 cf_cv_shlib_version=abi
11558 cf_cv_shlib_version=rel
11562 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11563 if test "$cf_cv_shlib_version" = rel; then
11564 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11566 cf_cv_shared_soname='`basename $@`'
11569 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11571 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11575 # tested with OSF/1 V3.2 and 'cc'
11576 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11577 # link with shared libs).
11578 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11581 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11584 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11585 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11586 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11587 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11589 cf_cv_rm_so_locs=yes
11591 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11592 # tested with osr5.0.5
11593 if test "$GCC" != yes; then
11594 CC_SHARED_OPTS='-belf -KPIC'
11596 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11597 if test "$cf_cv_enable_rpath" = yes ; then
11598 # only way is to set LD_RUN_PATH but no switch for it
11601 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11602 LINK_PROGS='LD_RUN_PATH=${libdir}'
11603 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11606 # tested with SunOS 4.1.1 and gcc 2.7.0
11607 if test "$GCC" != yes; then
11608 CC_SHARED_OPTS='-KPIC'
11610 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11611 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11614 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11615 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11616 if test "$DFT_LWR_MODEL" = "shared" ; then
11617 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11618 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11620 if test "$cf_cv_enable_rpath" = yes ; then
11621 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11624 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11625 if test "$cf_cv_shlib_version" = rel; then
11626 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11628 cf_cv_shared_soname='`basename $@`'
11631 if test "$GCC" != yes; then
11632 cf_save_CFLAGS="$CFLAGS"
11633 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11635 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11636 cat >conftest.$ac_ext <<_ACEOF
11637 #line 11637 "configure"
11638 #include "confdefs.h"
11648 rm -f conftest.$ac_objext
11649 if { (eval echo "$as_me:11649: \"$ac_compile\"") >&5
11650 (eval $ac_compile) 2>&5
11652 echo "$as_me:11652: \$? = $ac_status" >&5
11653 (exit $ac_status); } &&
11654 { ac_try='test -s conftest.$ac_objext'
11655 { (eval echo "$as_me:11655: \"$ac_try\"") >&5
11656 (eval $ac_try) 2>&5
11658 echo "$as_me:11658: \$? = $ac_status" >&5
11659 (exit $ac_status); }; }; then
11662 echo "$as_me: failed program was:" >&5
11663 cat conftest.$ac_ext >&5
11665 rm -f conftest.$ac_objext conftest.$ac_ext
11667 CFLAGS="$cf_save_CFLAGS"
11668 CC_SHARED_OPTS=$cf_shared_opts
11669 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11671 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11674 (sysv5uw7*|unix_sv*)
11675 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11676 if test "$GCC" != yes; then
11677 CC_SHARED_OPTS='-KPIC'
11679 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11682 CC_SHARED_OPTS='unknown'
11683 MK_SHARED_LIB='echo unknown'
11687 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11688 case "$cf_cv_shlib_version" in
11690 case "$MK_SHARED_LIB" in
11692 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11695 { echo "$as_me:11695: WARNING: ignored --with-shlib-version" >&5
11696 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11702 if test -n "$cf_try_cflags"
11704 cat > conftest.$ac_ext <<EOF
11705 #line 11705 "${as_me:-configure}"
11707 int main(int argc, char *argv[])
11710 return (argv[argc-1] == 0) ;
11713 cf_save_CFLAGS="$CFLAGS"
11714 for cf_opt in $cf_try_cflags
11716 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11717 echo "$as_me:11717: checking if CFLAGS option -$cf_opt works" >&5
11718 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11719 if { (eval echo "$as_me:11719: \"$ac_compile\"") >&5
11720 (eval $ac_compile) 2>&5
11722 echo "$as_me:11722: \$? = $ac_status" >&5
11723 (exit $ac_status); }; then
11724 echo "$as_me:11724: result: yes" >&5
11725 echo "${ECHO_T}yes" >&6
11726 cf_save_CFLAGS="$CFLAGS"
11728 echo "$as_me:11728: result: no" >&5
11729 echo "${ECHO_T}no" >&6
11732 CFLAGS="$cf_save_CFLAGS"
11735 # RPATH_LIST is a colon-separated list of directories
11736 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11737 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11739 test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11741 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11743 echo "${as_me:-configure}:11743: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11745 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11747 echo "${as_me:-configure}:11747: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11749 # The test/sample programs in the original tree link using rpath option.
11750 # Make it optional for packagers.
11751 if test -n "$LOCAL_LDFLAGS"
11753 echo "$as_me:11753: checking if you want to link sample programs with rpath option" >&5
11754 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11756 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11757 if test "${enable_rpath_link+set}" = set; then
11758 enableval="$enable_rpath_link"
11759 with_rpath_link=$enableval
11761 with_rpath_link=yes
11763 echo "$as_me:11763: result: $with_rpath_link" >&5
11764 echo "${ECHO_T}$with_rpath_link" >&6
11765 if test "$with_rpath_link" = no
11772 ###############################################################################
11774 ### use option --enable-broken-linker to force on use of broken-linker support
11776 echo "$as_me:11776: checking if you want broken-linker support code" >&5
11777 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
11779 # Check whether --enable-broken_linker or --disable-broken_linker was given.
11780 if test "${enable_broken_linker+set}" = set; then
11781 enableval="$enable_broken_linker"
11782 with_broken_linker=$enableval
11784 with_broken_linker=no
11786 echo "$as_me:11786: result: $with_broken_linker" >&5
11787 echo "${ECHO_T}$with_broken_linker" >&6
11789 : ${BROKEN_LINKER:=0}
11790 if test "x$with_broken_linker" = xyes ; then
11792 cat >>confdefs.h <<\EOF
11793 #define BROKEN_LINKER 1
11799 # Check to define _XOPEN_SOURCE "automatically"
11801 echo "$as_me:11801: checking if the POSIX test-macros are already defined" >&5
11802 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11803 if test "${cf_cv_posix_visible+set}" = set; then
11804 echo $ECHO_N "(cached) $ECHO_C" >&6
11807 cat >conftest.$ac_ext <<_ACEOF
11808 #line 11808 "configure"
11809 #include "confdefs.h"
11815 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
11816 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
11817 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
11818 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
11819 #error conflicting symbols found
11826 rm -f conftest.$ac_objext
11827 if { (eval echo "$as_me:11827: \"$ac_compile\"") >&5
11828 (eval $ac_compile) 2>&5
11830 echo "$as_me:11830: \$? = $ac_status" >&5
11831 (exit $ac_status); } &&
11832 { ac_try='test -s conftest.$ac_objext'
11833 { (eval echo "$as_me:11833: \"$ac_try\"") >&5
11834 (eval $ac_try) 2>&5
11836 echo "$as_me:11836: \$? = $ac_status" >&5
11837 (exit $ac_status); }; }; then
11838 cf_cv_posix_visible=no
11840 echo "$as_me: failed program was:" >&5
11841 cat conftest.$ac_ext >&5
11842 cf_cv_posix_visible=yes
11844 rm -f conftest.$ac_objext conftest.$ac_ext
11847 echo "$as_me:11847: result: $cf_cv_posix_visible" >&5
11848 echo "${ECHO_T}$cf_cv_posix_visible" >&6
11850 if test "$cf_cv_posix_visible" = no; then
11852 cf_XOPEN_SOURCE=600
11853 cf_POSIX_C_SOURCE=199506L
11858 cf_xopen_source="-D_ALL_SOURCE"
11861 cf_XOPEN_SOURCE=600
11864 cf_xopen_source="-D_APPLE_C_SOURCE"
11867 cf_xopen_source="-D_DARWIN_C_SOURCE"
11870 (freebsd*|dragonfly*|midnightbsd*)
11871 # 5.x headers associate
11872 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
11873 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
11874 cf_POSIX_C_SOURCE=200112L
11875 cf_XOPEN_SOURCE=600
11876 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11879 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
11882 cf_xopen_source="-D_HPUX_SOURCE"
11885 cf_xopen_source="-D_SGI_SOURCE"
11888 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
11890 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
11892 echo "$as_me:11892: checking if this is the GNU C library" >&5
11893 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
11894 if test "${cf_cv_gnu_library+set}" = set; then
11895 echo $ECHO_N "(cached) $ECHO_C" >&6
11898 cat >conftest.$ac_ext <<_ACEOF
11899 #line 11899 "configure"
11900 #include "confdefs.h"
11901 #include <sys/types.h>
11906 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
11908 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
11911 # error not GNU C library
11917 rm -f conftest.$ac_objext
11918 if { (eval echo "$as_me:11918: \"$ac_compile\"") >&5
11919 (eval $ac_compile) 2>&5
11921 echo "$as_me:11921: \$? = $ac_status" >&5
11922 (exit $ac_status); } &&
11923 { ac_try='test -s conftest.$ac_objext'
11924 { (eval echo "$as_me:11924: \"$ac_try\"") >&5
11925 (eval $ac_try) 2>&5
11927 echo "$as_me:11927: \$? = $ac_status" >&5
11928 (exit $ac_status); }; }; then
11929 cf_cv_gnu_library=yes
11931 echo "$as_me: failed program was:" >&5
11932 cat conftest.$ac_ext >&5
11933 cf_cv_gnu_library=no
11935 rm -f conftest.$ac_objext conftest.$ac_ext
11938 echo "$as_me:11938: result: $cf_cv_gnu_library" >&5
11939 echo "${ECHO_T}$cf_cv_gnu_library" >&6
11941 if test x$cf_cv_gnu_library = xyes; then
11943 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11944 # was changed to help a little. newlib incorporated the change about 4
11946 echo "$as_me:11946: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11947 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11948 if test "${cf_cv_gnu_library_219+set}" = set; then
11949 echo $ECHO_N "(cached) $ECHO_C" >&6
11952 cf_save="$CPPFLAGS"
11954 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11955 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11957 cat >conftest.$ac_ext <<_ACEOF
11958 #line 11958 "configure"
11959 #include "confdefs.h"
11960 #include <sys/types.h>
11965 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11967 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11970 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11976 rm -f conftest.$ac_objext
11977 if { (eval echo "$as_me:11977: \"$ac_compile\"") >&5
11978 (eval $ac_compile) 2>&5
11980 echo "$as_me:11980: \$? = $ac_status" >&5
11981 (exit $ac_status); } &&
11982 { ac_try='test -s conftest.$ac_objext'
11983 { (eval echo "$as_me:11983: \"$ac_try\"") >&5
11984 (eval $ac_try) 2>&5
11986 echo "$as_me:11986: \$? = $ac_status" >&5
11987 (exit $ac_status); }; }; then
11988 cf_cv_gnu_library_219=yes
11990 echo "$as_me: failed program was:" >&5
11991 cat conftest.$ac_ext >&5
11992 cf_cv_gnu_library_219=no
11994 rm -f conftest.$ac_objext conftest.$ac_ext
11995 CPPFLAGS="$cf_save"
11998 echo "$as_me:11998: result: $cf_cv_gnu_library_219" >&5
11999 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12001 if test "x$cf_cv_gnu_library_219" = xyes; then
12002 cf_save="$CPPFLAGS"
12003 echo "$as_me:12003: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12004 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12005 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12006 echo $ECHO_N "(cached) $ECHO_C" >&6
12012 cf_new_extra_cppflags=
12014 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12016 case $cf_fix_cppflags in
12018 case $cf_add_cflags in
12019 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12020 case $cf_add_cflags in
12022 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12024 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12025 && test -z "${cf_tst_cflags}" \
12026 && cf_fix_cppflags=yes
12028 if test $cf_fix_cppflags = yes ; then
12030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12034 elif test "${cf_tst_cflags}" = "\"'" ; then
12036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12043 case "$CPPFLAGS" in
12047 case $cf_add_cflags in
12049 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12051 CPPFLAGS=`echo "$CPPFLAGS" | \
12052 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12053 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12058 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12059 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12066 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12067 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12074 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12075 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12077 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12079 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12080 && test -z "${cf_tst_cflags}" \
12081 && cf_fix_cppflags=no
12086 if test -n "$cf_new_cflags" ; then
12088 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12089 CFLAGS="${CFLAGS}$cf_new_cflags"
12093 if test -n "$cf_new_cppflags" ; then
12095 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12096 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12100 if test -n "$cf_new_extra_cppflags" ; then
12102 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12103 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12107 cat >conftest.$ac_ext <<_ACEOF
12108 #line 12108 "configure"
12109 #include "confdefs.h"
12111 #include <limits.h>
12112 #include <sys/types.h>
12118 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12121 # error GNU C library is too old
12127 rm -f conftest.$ac_objext
12128 if { (eval echo "$as_me:12128: \"$ac_compile\"") >&5
12129 (eval $ac_compile) 2>&5
12131 echo "$as_me:12131: \$? = $ac_status" >&5
12132 (exit $ac_status); } &&
12133 { ac_try='test -s conftest.$ac_objext'
12134 { (eval echo "$as_me:12134: \"$ac_try\"") >&5
12135 (eval $ac_try) 2>&5
12137 echo "$as_me:12137: \$? = $ac_status" >&5
12138 (exit $ac_status); }; }; then
12139 cf_cv_gnu_dftsrc_219=yes
12141 echo "$as_me: failed program was:" >&5
12142 cat conftest.$ac_ext >&5
12143 cf_cv_gnu_dftsrc_219=no
12145 rm -f conftest.$ac_objext conftest.$ac_ext
12148 echo "$as_me:12148: result: $cf_cv_gnu_dftsrc_219" >&5
12149 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12150 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12152 cf_cv_gnu_dftsrc_219=maybe
12155 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12157 echo "$as_me:12157: checking if we must define _GNU_SOURCE" >&5
12158 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12159 if test "${cf_cv_gnu_source+set}" = set; then
12160 echo $ECHO_N "(cached) $ECHO_C" >&6
12163 cat >conftest.$ac_ext <<_ACEOF
12164 #line 12164 "configure"
12165 #include "confdefs.h"
12166 #include <sys/types.h>
12171 #ifndef _XOPEN_SOURCE
12172 #error expected _XOPEN_SOURCE to be defined
12178 rm -f conftest.$ac_objext
12179 if { (eval echo "$as_me:12179: \"$ac_compile\"") >&5
12180 (eval $ac_compile) 2>&5
12182 echo "$as_me:12182: \$? = $ac_status" >&5
12183 (exit $ac_status); } &&
12184 { ac_try='test -s conftest.$ac_objext'
12185 { (eval echo "$as_me:12185: \"$ac_try\"") >&5
12186 (eval $ac_try) 2>&5
12188 echo "$as_me:12188: \$? = $ac_status" >&5
12189 (exit $ac_status); }; }; then
12190 cf_cv_gnu_source=no
12192 echo "$as_me: failed program was:" >&5
12193 cat conftest.$ac_ext >&5
12194 cf_save="$CPPFLAGS"
12199 cf_new_extra_cppflags=
12201 for cf_add_cflags in -D_GNU_SOURCE
12203 case $cf_fix_cppflags in
12205 case $cf_add_cflags in
12206 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12207 case $cf_add_cflags in
12209 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12211 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12212 && test -z "${cf_tst_cflags}" \
12213 && cf_fix_cppflags=yes
12215 if test $cf_fix_cppflags = yes ; then
12217 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12218 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12221 elif test "${cf_tst_cflags}" = "\"'" ; then
12223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12230 case "$CPPFLAGS" in
12234 case $cf_add_cflags in
12236 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12238 CPPFLAGS=`echo "$CPPFLAGS" | \
12239 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12240 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12245 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12246 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12253 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12254 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12261 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12262 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12264 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12266 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12267 && test -z "${cf_tst_cflags}" \
12268 && cf_fix_cppflags=no
12273 if test -n "$cf_new_cflags" ; then
12275 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12276 CFLAGS="${CFLAGS}$cf_new_cflags"
12280 if test -n "$cf_new_cppflags" ; then
12282 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12283 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12287 if test -n "$cf_new_extra_cppflags" ; then
12289 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12290 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12294 cat >conftest.$ac_ext <<_ACEOF
12295 #line 12295 "configure"
12296 #include "confdefs.h"
12297 #include <sys/types.h>
12302 #ifdef _XOPEN_SOURCE
12303 #error expected _XOPEN_SOURCE to be undefined
12309 rm -f conftest.$ac_objext
12310 if { (eval echo "$as_me:12310: \"$ac_compile\"") >&5
12311 (eval $ac_compile) 2>&5
12313 echo "$as_me:12313: \$? = $ac_status" >&5
12314 (exit $ac_status); } &&
12315 { ac_try='test -s conftest.$ac_objext'
12316 { (eval echo "$as_me:12316: \"$ac_try\"") >&5
12317 (eval $ac_try) 2>&5
12319 echo "$as_me:12319: \$? = $ac_status" >&5
12320 (exit $ac_status); }; }; then
12321 cf_cv_gnu_source=no
12323 echo "$as_me: failed program was:" >&5
12324 cat conftest.$ac_ext >&5
12325 cf_cv_gnu_source=yes
12327 rm -f conftest.$ac_objext conftest.$ac_ext
12328 CPPFLAGS="$cf_save"
12331 rm -f conftest.$ac_objext conftest.$ac_ext
12334 echo "$as_me:12334: result: $cf_cv_gnu_source" >&5
12335 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12337 if test "$cf_cv_gnu_source" = yes
12339 echo "$as_me:12339: checking if we should also define _DEFAULT_SOURCE" >&5
12340 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12341 if test "${cf_cv_default_source+set}" = set; then
12342 echo $ECHO_N "(cached) $ECHO_C" >&6
12345 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12346 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12348 cat >conftest.$ac_ext <<_ACEOF
12349 #line 12349 "configure"
12350 #include "confdefs.h"
12351 #include <sys/types.h>
12356 #ifdef _DEFAULT_SOURCE
12357 #error expected _DEFAULT_SOURCE to be undefined
12363 rm -f conftest.$ac_objext
12364 if { (eval echo "$as_me:12364: \"$ac_compile\"") >&5
12365 (eval $ac_compile) 2>&5
12367 echo "$as_me:12367: \$? = $ac_status" >&5
12368 (exit $ac_status); } &&
12369 { ac_try='test -s conftest.$ac_objext'
12370 { (eval echo "$as_me:12370: \"$ac_try\"") >&5
12371 (eval $ac_try) 2>&5
12373 echo "$as_me:12373: \$? = $ac_status" >&5
12374 (exit $ac_status); }; }; then
12375 cf_cv_default_source=no
12377 echo "$as_me: failed program was:" >&5
12378 cat conftest.$ac_ext >&5
12379 cf_cv_default_source=yes
12381 rm -f conftest.$ac_objext conftest.$ac_ext
12384 echo "$as_me:12384: result: $cf_cv_default_source" >&5
12385 echo "${ECHO_T}$cf_cv_default_source" >&6
12386 if test "$cf_cv_default_source" = yes
12389 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12390 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12400 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12403 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12406 if test "$cf_cv_posix_visible" = no; then
12408 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12410 cf_save_CFLAGS="$CFLAGS"
12411 cf_save_CPPFLAGS="$CPPFLAGS"
12413 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12414 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12415 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12417 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12418 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12419 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12421 echo "$as_me:12421: checking if we should define _POSIX_C_SOURCE" >&5
12422 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12423 if test "${cf_cv_posix_c_source+set}" = set; then
12424 echo $ECHO_N "(cached) $ECHO_C" >&6
12427 echo "${as_me:-configure}:12427: testing if the symbol is already defined go no further ..." 1>&5
12429 cat >conftest.$ac_ext <<_ACEOF
12430 #line 12430 "configure"
12431 #include "confdefs.h"
12432 #include <sys/types.h>
12437 #ifndef _POSIX_C_SOURCE
12444 rm -f conftest.$ac_objext
12445 if { (eval echo "$as_me:12445: \"$ac_compile\"") >&5
12446 (eval $ac_compile) 2>&5
12448 echo "$as_me:12448: \$? = $ac_status" >&5
12449 (exit $ac_status); } &&
12450 { ac_try='test -s conftest.$ac_objext'
12451 { (eval echo "$as_me:12451: \"$ac_try\"") >&5
12452 (eval $ac_try) 2>&5
12454 echo "$as_me:12454: \$? = $ac_status" >&5
12455 (exit $ac_status); }; }; then
12456 cf_cv_posix_c_source=no
12458 echo "$as_me: failed program was:" >&5
12459 cat conftest.$ac_ext >&5
12460 cf_want_posix_source=no
12461 case .$cf_POSIX_C_SOURCE in
12463 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12466 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12467 cf_want_posix_source=yes
12470 cf_want_posix_source=yes
12473 if test "$cf_want_posix_source" = yes ; then
12474 cat >conftest.$ac_ext <<_ACEOF
12475 #line 12475 "configure"
12476 #include "confdefs.h"
12477 #include <sys/types.h>
12482 #ifdef _POSIX_SOURCE
12489 rm -f conftest.$ac_objext
12490 if { (eval echo "$as_me:12490: \"$ac_compile\"") >&5
12491 (eval $ac_compile) 2>&5
12493 echo "$as_me:12493: \$? = $ac_status" >&5
12494 (exit $ac_status); } &&
12495 { ac_try='test -s conftest.$ac_objext'
12496 { (eval echo "$as_me:12496: \"$ac_try\"") >&5
12497 (eval $ac_try) 2>&5
12499 echo "$as_me:12499: \$? = $ac_status" >&5
12500 (exit $ac_status); }; }; then
12503 echo "$as_me: failed program was:" >&5
12504 cat conftest.$ac_ext >&5
12505 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12507 rm -f conftest.$ac_objext conftest.$ac_ext
12510 echo "${as_me:-configure}:12510: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12512 CFLAGS="$cf_trim_CFLAGS"
12513 CPPFLAGS="$cf_trim_CPPFLAGS"
12515 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12516 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12518 echo "${as_me:-configure}:12518: testing if the second compile does not leave our definition intact error ..." 1>&5
12520 cat >conftest.$ac_ext <<_ACEOF
12521 #line 12521 "configure"
12522 #include "confdefs.h"
12523 #include <sys/types.h>
12528 #ifndef _POSIX_C_SOURCE
12535 rm -f conftest.$ac_objext
12536 if { (eval echo "$as_me:12536: \"$ac_compile\"") >&5
12537 (eval $ac_compile) 2>&5
12539 echo "$as_me:12539: \$? = $ac_status" >&5
12540 (exit $ac_status); } &&
12541 { ac_try='test -s conftest.$ac_objext'
12542 { (eval echo "$as_me:12542: \"$ac_try\"") >&5
12543 (eval $ac_try) 2>&5
12545 echo "$as_me:12545: \$? = $ac_status" >&5
12546 (exit $ac_status); }; }; then
12549 echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 cf_cv_posix_c_source=no
12553 rm -f conftest.$ac_objext conftest.$ac_ext
12554 CFLAGS="$cf_save_CFLAGS"
12555 CPPFLAGS="$cf_save_CPPFLAGS"
12558 rm -f conftest.$ac_objext conftest.$ac_ext
12561 echo "$as_me:12561: result: $cf_cv_posix_c_source" >&5
12562 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12564 if test "$cf_cv_posix_c_source" != no ; then
12565 CFLAGS="$cf_trim_CFLAGS"
12566 CPPFLAGS="$cf_trim_CPPFLAGS"
12571 cf_new_extra_cppflags=
12573 for cf_add_cflags in $cf_cv_posix_c_source
12575 case $cf_fix_cppflags in
12577 case $cf_add_cflags in
12578 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12579 case $cf_add_cflags in
12581 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12583 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12584 && test -z "${cf_tst_cflags}" \
12585 && cf_fix_cppflags=yes
12587 if test $cf_fix_cppflags = yes ; then
12589 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12590 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12593 elif test "${cf_tst_cflags}" = "\"'" ; then
12595 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12596 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12602 case "$CPPFLAGS" in
12606 case $cf_add_cflags in
12608 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12610 CPPFLAGS=`echo "$CPPFLAGS" | \
12611 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12612 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12617 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12618 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12625 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12626 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12636 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12638 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12639 && test -z "${cf_tst_cflags}" \
12640 && cf_fix_cppflags=no
12645 if test -n "$cf_new_cflags" ; then
12647 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12648 CFLAGS="${CFLAGS}$cf_new_cflags"
12652 if test -n "$cf_new_cppflags" ; then
12654 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12655 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12659 if test -n "$cf_new_extra_cppflags" ; then
12661 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12662 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12668 fi # cf_cv_posix_visible
12672 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12675 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12676 cf_xopen_source="-D_BSD_SOURCE"
12677 cf_XOPEN_SOURCE=600
12680 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12683 cf_xopen_source="-D_OSF_SOURCE"
12686 cf_xopen_source="-D_QNX_SOURCE"
12689 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12692 cf_xopen_source="-D__EXTENSIONS__"
12693 cf_cv_xopen_source=broken
12695 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12701 echo "$as_me:12701: checking if we should define _XOPEN_SOURCE" >&5
12702 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12703 if test "${cf_cv_xopen_source+set}" = set; then
12704 echo $ECHO_N "(cached) $ECHO_C" >&6
12707 cat >conftest.$ac_ext <<_ACEOF
12708 #line 12708 "configure"
12709 #include "confdefs.h"
12711 #include <stdlib.h>
12712 #include <string.h>
12713 #include <sys/types.h>
12719 #ifndef _XOPEN_SOURCE
12726 rm -f conftest.$ac_objext
12727 if { (eval echo "$as_me:12727: \"$ac_compile\"") >&5
12728 (eval $ac_compile) 2>&5
12730 echo "$as_me:12730: \$? = $ac_status" >&5
12731 (exit $ac_status); } &&
12732 { ac_try='test -s conftest.$ac_objext'
12733 { (eval echo "$as_me:12733: \"$ac_try\"") >&5
12734 (eval $ac_try) 2>&5
12736 echo "$as_me:12736: \$? = $ac_status" >&5
12737 (exit $ac_status); }; }; then
12738 cf_cv_xopen_source=no
12740 echo "$as_me: failed program was:" >&5
12741 cat conftest.$ac_ext >&5
12742 cf_save="$CPPFLAGS"
12744 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12745 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12747 cat >conftest.$ac_ext <<_ACEOF
12748 #line 12748 "configure"
12749 #include "confdefs.h"
12751 #include <stdlib.h>
12752 #include <string.h>
12753 #include <sys/types.h>
12759 #ifdef _XOPEN_SOURCE
12766 rm -f conftest.$ac_objext
12767 if { (eval echo "$as_me:12767: \"$ac_compile\"") >&5
12768 (eval $ac_compile) 2>&5
12770 echo "$as_me:12770: \$? = $ac_status" >&5
12771 (exit $ac_status); } &&
12772 { ac_try='test -s conftest.$ac_objext'
12773 { (eval echo "$as_me:12773: \"$ac_try\"") >&5
12774 (eval $ac_try) 2>&5
12776 echo "$as_me:12776: \$? = $ac_status" >&5
12777 (exit $ac_status); }; }; then
12778 cf_cv_xopen_source=no
12780 echo "$as_me: failed program was:" >&5
12781 cat conftest.$ac_ext >&5
12782 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12784 rm -f conftest.$ac_objext conftest.$ac_ext
12785 CPPFLAGS="$cf_save"
12788 rm -f conftest.$ac_objext conftest.$ac_ext
12791 echo "$as_me:12791: result: $cf_cv_xopen_source" >&5
12792 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12794 if test "$cf_cv_xopen_source" != no ; then
12796 CFLAGS=`echo "$CFLAGS" | \
12797 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12798 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12800 CPPFLAGS=`echo "$CPPFLAGS" | \
12801 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12802 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
12804 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12809 cf_new_extra_cppflags=
12811 for cf_add_cflags in $cf_temp_xopen_source
12813 case $cf_fix_cppflags in
12815 case $cf_add_cflags in
12816 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12817 case $cf_add_cflags in
12819 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12821 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12822 && test -z "${cf_tst_cflags}" \
12823 && cf_fix_cppflags=yes
12825 if test $cf_fix_cppflags = yes ; then
12827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12831 elif test "${cf_tst_cflags}" = "\"'" ; then
12833 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12834 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12840 case "$CPPFLAGS" in
12844 case $cf_add_cflags in
12846 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12848 CPPFLAGS=`echo "$CPPFLAGS" | \
12849 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12850 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12855 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12856 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12863 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12864 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12871 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12872 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12874 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12876 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12877 && test -z "${cf_tst_cflags}" \
12878 && cf_fix_cppflags=no
12883 if test -n "$cf_new_cflags" ; then
12885 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12886 CFLAGS="${CFLAGS}$cf_new_cflags"
12890 if test -n "$cf_new_cppflags" ; then
12892 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12893 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12897 if test -n "$cf_new_extra_cppflags" ; then
12899 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12900 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12906 if test "$cf_cv_posix_visible" = no; then
12908 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12910 cf_save_CFLAGS="$CFLAGS"
12911 cf_save_CPPFLAGS="$CPPFLAGS"
12913 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12914 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12915 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12917 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12918 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12919 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12921 echo "$as_me:12921: checking if we should define _POSIX_C_SOURCE" >&5
12922 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12923 if test "${cf_cv_posix_c_source+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12927 echo "${as_me:-configure}:12927: testing if the symbol is already defined go no further ..." 1>&5
12929 cat >conftest.$ac_ext <<_ACEOF
12930 #line 12930 "configure"
12931 #include "confdefs.h"
12932 #include <sys/types.h>
12937 #ifndef _POSIX_C_SOURCE
12944 rm -f conftest.$ac_objext
12945 if { (eval echo "$as_me:12945: \"$ac_compile\"") >&5
12946 (eval $ac_compile) 2>&5
12948 echo "$as_me:12948: \$? = $ac_status" >&5
12949 (exit $ac_status); } &&
12950 { ac_try='test -s conftest.$ac_objext'
12951 { (eval echo "$as_me:12951: \"$ac_try\"") >&5
12952 (eval $ac_try) 2>&5
12954 echo "$as_me:12954: \$? = $ac_status" >&5
12955 (exit $ac_status); }; }; then
12956 cf_cv_posix_c_source=no
12958 echo "$as_me: failed program was:" >&5
12959 cat conftest.$ac_ext >&5
12960 cf_want_posix_source=no
12961 case .$cf_POSIX_C_SOURCE in
12963 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12966 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12967 cf_want_posix_source=yes
12970 cf_want_posix_source=yes
12973 if test "$cf_want_posix_source" = yes ; then
12974 cat >conftest.$ac_ext <<_ACEOF
12975 #line 12975 "configure"
12976 #include "confdefs.h"
12977 #include <sys/types.h>
12982 #ifdef _POSIX_SOURCE
12989 rm -f conftest.$ac_objext
12990 if { (eval echo "$as_me:12990: \"$ac_compile\"") >&5
12991 (eval $ac_compile) 2>&5
12993 echo "$as_me:12993: \$? = $ac_status" >&5
12994 (exit $ac_status); } &&
12995 { ac_try='test -s conftest.$ac_objext'
12996 { (eval echo "$as_me:12996: \"$ac_try\"") >&5
12997 (eval $ac_try) 2>&5
12999 echo "$as_me:12999: \$? = $ac_status" >&5
13000 (exit $ac_status); }; }; then
13003 echo "$as_me: failed program was:" >&5
13004 cat conftest.$ac_ext >&5
13005 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13007 rm -f conftest.$ac_objext conftest.$ac_ext
13010 echo "${as_me:-configure}:13010: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13012 CFLAGS="$cf_trim_CFLAGS"
13013 CPPFLAGS="$cf_trim_CPPFLAGS"
13015 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13016 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13018 echo "${as_me:-configure}:13018: testing if the second compile does not leave our definition intact error ..." 1>&5
13020 cat >conftest.$ac_ext <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023 #include <sys/types.h>
13028 #ifndef _POSIX_C_SOURCE
13035 rm -f conftest.$ac_objext
13036 if { (eval echo "$as_me:13036: \"$ac_compile\"") >&5
13037 (eval $ac_compile) 2>&5
13039 echo "$as_me:13039: \$? = $ac_status" >&5
13040 (exit $ac_status); } &&
13041 { ac_try='test -s conftest.$ac_objext'
13042 { (eval echo "$as_me:13042: \"$ac_try\"") >&5
13043 (eval $ac_try) 2>&5
13045 echo "$as_me:13045: \$? = $ac_status" >&5
13046 (exit $ac_status); }; }; then
13049 echo "$as_me: failed program was:" >&5
13050 cat conftest.$ac_ext >&5
13051 cf_cv_posix_c_source=no
13053 rm -f conftest.$ac_objext conftest.$ac_ext
13054 CFLAGS="$cf_save_CFLAGS"
13055 CPPFLAGS="$cf_save_CPPFLAGS"
13058 rm -f conftest.$ac_objext conftest.$ac_ext
13061 echo "$as_me:13061: result: $cf_cv_posix_c_source" >&5
13062 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13064 if test "$cf_cv_posix_c_source" != no ; then
13065 CFLAGS="$cf_trim_CFLAGS"
13066 CPPFLAGS="$cf_trim_CPPFLAGS"
13071 cf_new_extra_cppflags=
13073 for cf_add_cflags in $cf_cv_posix_c_source
13075 case $cf_fix_cppflags in
13077 case $cf_add_cflags in
13078 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13079 case $cf_add_cflags in
13081 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13083 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13084 && test -z "${cf_tst_cflags}" \
13085 && cf_fix_cppflags=yes
13087 if test $cf_fix_cppflags = yes ; then
13089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13093 elif test "${cf_tst_cflags}" = "\"'" ; then
13095 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13096 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13102 case "$CPPFLAGS" in
13106 case $cf_add_cflags in
13108 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13110 CPPFLAGS=`echo "$CPPFLAGS" | \
13111 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13112 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13117 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13118 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13125 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13126 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13133 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13134 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13136 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13138 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13139 && test -z "${cf_tst_cflags}" \
13140 && cf_fix_cppflags=no
13145 if test -n "$cf_new_cflags" ; then
13147 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13148 CFLAGS="${CFLAGS}$cf_new_cflags"
13152 if test -n "$cf_new_cppflags" ; then
13154 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13155 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13159 if test -n "$cf_new_extra_cppflags" ; then
13161 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13162 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13168 fi # cf_cv_posix_visible
13173 if test -n "$cf_xopen_source" ; then
13178 cf_new_extra_cppflags=
13180 for cf_add_cflags in $cf_xopen_source
13182 case $cf_fix_cppflags in
13184 case $cf_add_cflags in
13185 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13186 case $cf_add_cflags in
13188 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13190 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13191 && test -z "${cf_tst_cflags}" \
13192 && cf_fix_cppflags=yes
13194 if test $cf_fix_cppflags = yes ; then
13196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13200 elif test "${cf_tst_cflags}" = "\"'" ; then
13202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13209 case "$CPPFLAGS" in
13213 case $cf_add_cflags in
13215 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13217 CPPFLAGS=`echo "$CPPFLAGS" | \
13218 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13219 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13224 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13225 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13232 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13233 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13243 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13245 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13246 && test -z "${cf_tst_cflags}" \
13247 && cf_fix_cppflags=no
13252 if test -n "$cf_new_cflags" ; then
13253 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13255 echo "${as_me:-configure}:13255: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13257 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13258 CFLAGS="${CFLAGS}$cf_new_cflags"
13262 if test -n "$cf_new_cppflags" ; then
13263 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13265 echo "${as_me:-configure}:13265: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13267 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13268 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13272 if test -n "$cf_new_extra_cppflags" ; then
13273 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13275 echo "${as_me:-configure}:13275: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13277 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13278 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13284 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13285 echo "$as_me:13285: checking if _XOPEN_SOURCE really is set" >&5
13286 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13287 cat >conftest.$ac_ext <<_ACEOF
13288 #line 13288 "configure"
13289 #include "confdefs.h"
13290 #include <stdlib.h>
13295 #ifndef _XOPEN_SOURCE
13302 rm -f conftest.$ac_objext
13303 if { (eval echo "$as_me:13303: \"$ac_compile\"") >&5
13304 (eval $ac_compile) 2>&5
13306 echo "$as_me:13306: \$? = $ac_status" >&5
13307 (exit $ac_status); } &&
13308 { ac_try='test -s conftest.$ac_objext'
13309 { (eval echo "$as_me:13309: \"$ac_try\"") >&5
13310 (eval $ac_try) 2>&5
13312 echo "$as_me:13312: \$? = $ac_status" >&5
13313 (exit $ac_status); }; }; then
13314 cf_XOPEN_SOURCE_set=yes
13316 echo "$as_me: failed program was:" >&5
13317 cat conftest.$ac_ext >&5
13318 cf_XOPEN_SOURCE_set=no
13320 rm -f conftest.$ac_objext conftest.$ac_ext
13321 echo "$as_me:13321: result: $cf_XOPEN_SOURCE_set" >&5
13322 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13323 if test $cf_XOPEN_SOURCE_set = yes
13325 cat >conftest.$ac_ext <<_ACEOF
13326 #line 13326 "configure"
13327 #include "confdefs.h"
13328 #include <stdlib.h>
13333 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13340 rm -f conftest.$ac_objext
13341 if { (eval echo "$as_me:13341: \"$ac_compile\"") >&5
13342 (eval $ac_compile) 2>&5
13344 echo "$as_me:13344: \$? = $ac_status" >&5
13345 (exit $ac_status); } &&
13346 { ac_try='test -s conftest.$ac_objext'
13347 { (eval echo "$as_me:13347: \"$ac_try\"") >&5
13348 (eval $ac_try) 2>&5
13350 echo "$as_me:13350: \$? = $ac_status" >&5
13351 (exit $ac_status); }; }; then
13352 cf_XOPEN_SOURCE_set_ok=yes
13354 echo "$as_me: failed program was:" >&5
13355 cat conftest.$ac_ext >&5
13356 cf_XOPEN_SOURCE_set_ok=no
13358 rm -f conftest.$ac_objext conftest.$ac_ext
13359 if test $cf_XOPEN_SOURCE_set_ok = no
13361 { echo "$as_me:13361: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13362 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13366 echo "$as_me:13366: checking if we should define _XOPEN_SOURCE" >&5
13367 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13368 if test "${cf_cv_xopen_source+set}" = set; then
13369 echo $ECHO_N "(cached) $ECHO_C" >&6
13372 cat >conftest.$ac_ext <<_ACEOF
13373 #line 13373 "configure"
13374 #include "confdefs.h"
13376 #include <stdlib.h>
13377 #include <string.h>
13378 #include <sys/types.h>
13384 #ifndef _XOPEN_SOURCE
13391 rm -f conftest.$ac_objext
13392 if { (eval echo "$as_me:13392: \"$ac_compile\"") >&5
13393 (eval $ac_compile) 2>&5
13395 echo "$as_me:13395: \$? = $ac_status" >&5
13396 (exit $ac_status); } &&
13397 { ac_try='test -s conftest.$ac_objext'
13398 { (eval echo "$as_me:13398: \"$ac_try\"") >&5
13399 (eval $ac_try) 2>&5
13401 echo "$as_me:13401: \$? = $ac_status" >&5
13402 (exit $ac_status); }; }; then
13403 cf_cv_xopen_source=no
13405 echo "$as_me: failed program was:" >&5
13406 cat conftest.$ac_ext >&5
13407 cf_save="$CPPFLAGS"
13409 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13410 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13412 cat >conftest.$ac_ext <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13416 #include <stdlib.h>
13417 #include <string.h>
13418 #include <sys/types.h>
13424 #ifdef _XOPEN_SOURCE
13431 rm -f conftest.$ac_objext
13432 if { (eval echo "$as_me:13432: \"$ac_compile\"") >&5
13433 (eval $ac_compile) 2>&5
13435 echo "$as_me:13435: \$? = $ac_status" >&5
13436 (exit $ac_status); } &&
13437 { ac_try='test -s conftest.$ac_objext'
13438 { (eval echo "$as_me:13438: \"$ac_try\"") >&5
13439 (eval $ac_try) 2>&5
13441 echo "$as_me:13441: \$? = $ac_status" >&5
13442 (exit $ac_status); }; }; then
13443 cf_cv_xopen_source=no
13445 echo "$as_me: failed program was:" >&5
13446 cat conftest.$ac_ext >&5
13447 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13449 rm -f conftest.$ac_objext conftest.$ac_ext
13450 CPPFLAGS="$cf_save"
13453 rm -f conftest.$ac_objext conftest.$ac_ext
13456 echo "$as_me:13456: result: $cf_cv_xopen_source" >&5
13457 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13459 if test "$cf_cv_xopen_source" != no ; then
13461 CFLAGS=`echo "$CFLAGS" | \
13462 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13463 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13465 CPPFLAGS=`echo "$CPPFLAGS" | \
13466 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13467 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13469 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13474 cf_new_extra_cppflags=
13476 for cf_add_cflags in $cf_temp_xopen_source
13478 case $cf_fix_cppflags in
13480 case $cf_add_cflags in
13481 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13482 case $cf_add_cflags in
13484 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13486 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13487 && test -z "${cf_tst_cflags}" \
13488 && cf_fix_cppflags=yes
13490 if test $cf_fix_cppflags = yes ; then
13492 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13493 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13496 elif test "${cf_tst_cflags}" = "\"'" ; then
13498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13505 case "$CPPFLAGS" in
13509 case $cf_add_cflags in
13511 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13513 CPPFLAGS=`echo "$CPPFLAGS" | \
13514 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13515 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13520 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13521 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13528 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13529 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13539 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13541 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13542 && test -z "${cf_tst_cflags}" \
13543 && cf_fix_cppflags=no
13548 if test -n "$cf_new_cflags" ; then
13550 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13551 CFLAGS="${CFLAGS}$cf_new_cflags"
13555 if test -n "$cf_new_cppflags" ; then
13557 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13558 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13562 if test -n "$cf_new_extra_cppflags" ; then
13564 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13565 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13573 fi # cf_cv_posix_visible
13575 # Check whether --enable-largefile or --disable-largefile was given.
13576 if test "${enable_largefile+set}" = set; then
13577 enableval="$enable_largefile"
13580 if test "$enable_largefile" != no; then
13582 echo "$as_me:13582: checking for special C compiler options needed for large files" >&5
13583 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13584 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13585 echo $ECHO_N "(cached) $ECHO_C" >&6
13587 ac_cv_sys_largefile_CC=no
13588 if test "$GCC" != yes; then
13591 # IRIX 6.2 and later do not support large files by default,
13592 # so use the C compiler's -n32 option if that helps.
13593 cat >conftest.$ac_ext <<_ACEOF
13594 #line 13594 "configure"
13595 #include "confdefs.h"
13596 #include <sys/types.h>
13597 /* Check that off_t can represent 2**63 - 1 correctly.
13598 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13599 since some C++ compilers masquerading as C compilers
13600 incorrectly reject 9223372036854775807. */
13601 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13602 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13603 && LARGE_OFF_T % 2147483647 == 1)
13613 rm -f conftest.$ac_objext
13614 if { (eval echo "$as_me:13614: \"$ac_compile\"") >&5
13615 (eval $ac_compile) 2>&5
13617 echo "$as_me:13617: \$? = $ac_status" >&5
13618 (exit $ac_status); } &&
13619 { ac_try='test -s conftest.$ac_objext'
13620 { (eval echo "$as_me:13620: \"$ac_try\"") >&5
13621 (eval $ac_try) 2>&5
13623 echo "$as_me:13623: \$? = $ac_status" >&5
13624 (exit $ac_status); }; }; then
13627 echo "$as_me: failed program was:" >&5
13628 cat conftest.$ac_ext >&5
13630 rm -f conftest.$ac_objext
13632 rm -f conftest.$ac_objext
13633 if { (eval echo "$as_me:13633: \"$ac_compile\"") >&5
13634 (eval $ac_compile) 2>&5
13636 echo "$as_me:13636: \$? = $ac_status" >&5
13637 (exit $ac_status); } &&
13638 { ac_try='test -s conftest.$ac_objext'
13639 { (eval echo "$as_me:13639: \"$ac_try\"") >&5
13640 (eval $ac_try) 2>&5
13642 echo "$as_me:13642: \$? = $ac_status" >&5
13643 (exit $ac_status); }; }; then
13644 ac_cv_sys_largefile_CC=' -n32'; break
13646 echo "$as_me: failed program was:" >&5
13647 cat conftest.$ac_ext >&5
13649 rm -f conftest.$ac_objext
13653 rm -f conftest.$ac_ext
13656 echo "$as_me:13656: result: $ac_cv_sys_largefile_CC" >&5
13657 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13658 if test "$ac_cv_sys_largefile_CC" != no; then
13659 CC=$CC$ac_cv_sys_largefile_CC
13662 echo "$as_me:13662: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13663 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13664 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13665 echo $ECHO_N "(cached) $ECHO_C" >&6
13668 ac_cv_sys_file_offset_bits=no
13669 cat >conftest.$ac_ext <<_ACEOF
13670 #line 13670 "configure"
13671 #include "confdefs.h"
13672 #include <sys/types.h>
13673 /* Check that off_t can represent 2**63 - 1 correctly.
13674 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13675 since some C++ compilers masquerading as C compilers
13676 incorrectly reject 9223372036854775807. */
13677 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13678 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13679 && LARGE_OFF_T % 2147483647 == 1)
13689 rm -f conftest.$ac_objext
13690 if { (eval echo "$as_me:13690: \"$ac_compile\"") >&5
13691 (eval $ac_compile) 2>&5
13693 echo "$as_me:13693: \$? = $ac_status" >&5
13694 (exit $ac_status); } &&
13695 { ac_try='test -s conftest.$ac_objext'
13696 { (eval echo "$as_me:13696: \"$ac_try\"") >&5
13697 (eval $ac_try) 2>&5
13699 echo "$as_me:13699: \$? = $ac_status" >&5
13700 (exit $ac_status); }; }; then
13703 echo "$as_me: failed program was:" >&5
13704 cat conftest.$ac_ext >&5
13706 rm -f conftest.$ac_objext conftest.$ac_ext
13707 cat >conftest.$ac_ext <<_ACEOF
13708 #line 13708 "configure"
13709 #include "confdefs.h"
13710 #define _FILE_OFFSET_BITS 64
13711 #include <sys/types.h>
13712 /* Check that off_t can represent 2**63 - 1 correctly.
13713 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13714 since some C++ compilers masquerading as C compilers
13715 incorrectly reject 9223372036854775807. */
13716 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13717 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13718 && LARGE_OFF_T % 2147483647 == 1)
13728 rm -f conftest.$ac_objext
13729 if { (eval echo "$as_me:13729: \"$ac_compile\"") >&5
13730 (eval $ac_compile) 2>&5
13732 echo "$as_me:13732: \$? = $ac_status" >&5
13733 (exit $ac_status); } &&
13734 { ac_try='test -s conftest.$ac_objext'
13735 { (eval echo "$as_me:13735: \"$ac_try\"") >&5
13736 (eval $ac_try) 2>&5
13738 echo "$as_me:13738: \$? = $ac_status" >&5
13739 (exit $ac_status); }; }; then
13740 ac_cv_sys_file_offset_bits=64; break
13742 echo "$as_me: failed program was:" >&5
13743 cat conftest.$ac_ext >&5
13745 rm -f conftest.$ac_objext conftest.$ac_ext
13749 echo "$as_me:13749: result: $ac_cv_sys_file_offset_bits" >&5
13750 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13751 if test "$ac_cv_sys_file_offset_bits" != no; then
13753 cat >>confdefs.h <<EOF
13754 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13759 echo "$as_me:13759: checking for _LARGE_FILES value needed for large files" >&5
13760 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13761 if test "${ac_cv_sys_large_files+set}" = set; then
13762 echo $ECHO_N "(cached) $ECHO_C" >&6
13765 ac_cv_sys_large_files=no
13766 cat >conftest.$ac_ext <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769 #include <sys/types.h>
13770 /* Check that off_t can represent 2**63 - 1 correctly.
13771 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13772 since some C++ compilers masquerading as C compilers
13773 incorrectly reject 9223372036854775807. */
13774 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13775 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13776 && LARGE_OFF_T % 2147483647 == 1)
13786 rm -f conftest.$ac_objext
13787 if { (eval echo "$as_me:13787: \"$ac_compile\"") >&5
13788 (eval $ac_compile) 2>&5
13790 echo "$as_me:13790: \$? = $ac_status" >&5
13791 (exit $ac_status); } &&
13792 { ac_try='test -s conftest.$ac_objext'
13793 { (eval echo "$as_me:13793: \"$ac_try\"") >&5
13794 (eval $ac_try) 2>&5
13796 echo "$as_me:13796: \$? = $ac_status" >&5
13797 (exit $ac_status); }; }; then
13800 echo "$as_me: failed program was:" >&5
13801 cat conftest.$ac_ext >&5
13803 rm -f conftest.$ac_objext conftest.$ac_ext
13804 cat >conftest.$ac_ext <<_ACEOF
13805 #line 13805 "configure"
13806 #include "confdefs.h"
13807 #define _LARGE_FILES 1
13808 #include <sys/types.h>
13809 /* Check that off_t can represent 2**63 - 1 correctly.
13810 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13811 since some C++ compilers masquerading as C compilers
13812 incorrectly reject 9223372036854775807. */
13813 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13814 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13815 && LARGE_OFF_T % 2147483647 == 1)
13825 rm -f conftest.$ac_objext
13826 if { (eval echo "$as_me:13826: \"$ac_compile\"") >&5
13827 (eval $ac_compile) 2>&5
13829 echo "$as_me:13829: \$? = $ac_status" >&5
13830 (exit $ac_status); } &&
13831 { ac_try='test -s conftest.$ac_objext'
13832 { (eval echo "$as_me:13832: \"$ac_try\"") >&5
13833 (eval $ac_try) 2>&5
13835 echo "$as_me:13835: \$? = $ac_status" >&5
13836 (exit $ac_status); }; }; then
13837 ac_cv_sys_large_files=1; break
13839 echo "$as_me: failed program was:" >&5
13840 cat conftest.$ac_ext >&5
13842 rm -f conftest.$ac_objext conftest.$ac_ext
13846 echo "$as_me:13846: result: $ac_cv_sys_large_files" >&5
13847 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13848 if test "$ac_cv_sys_large_files" != no; then
13850 cat >>confdefs.h <<EOF
13851 #define _LARGE_FILES $ac_cv_sys_large_files
13858 if test "$enable_largefile" != no ; then
13859 echo "$as_me:13859: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13860 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13861 if test "${ac_cv_sys_largefile_source+set}" = set; then
13862 echo $ECHO_N "(cached) $ECHO_C" >&6
13865 ac_cv_sys_largefile_source=no
13866 cat >conftest.$ac_ext <<_ACEOF
13867 #line 13867 "configure"
13868 #include "confdefs.h"
13878 rm -f conftest.$ac_objext
13879 if { (eval echo "$as_me:13879: \"$ac_compile\"") >&5
13880 (eval $ac_compile) 2>&5
13882 echo "$as_me:13882: \$? = $ac_status" >&5
13883 (exit $ac_status); } &&
13884 { ac_try='test -s conftest.$ac_objext'
13885 { (eval echo "$as_me:13885: \"$ac_try\"") >&5
13886 (eval $ac_try) 2>&5
13888 echo "$as_me:13888: \$? = $ac_status" >&5
13889 (exit $ac_status); }; }; then
13892 echo "$as_me: failed program was:" >&5
13893 cat conftest.$ac_ext >&5
13895 rm -f conftest.$ac_objext conftest.$ac_ext
13896 cat >conftest.$ac_ext <<_ACEOF
13897 #line 13897 "configure"
13898 #include "confdefs.h"
13899 #define _LARGEFILE_SOURCE 1
13909 rm -f conftest.$ac_objext
13910 if { (eval echo "$as_me:13910: \"$ac_compile\"") >&5
13911 (eval $ac_compile) 2>&5
13913 echo "$as_me:13913: \$? = $ac_status" >&5
13914 (exit $ac_status); } &&
13915 { ac_try='test -s conftest.$ac_objext'
13916 { (eval echo "$as_me:13916: \"$ac_try\"") >&5
13917 (eval $ac_try) 2>&5
13919 echo "$as_me:13919: \$? = $ac_status" >&5
13920 (exit $ac_status); }; }; then
13921 ac_cv_sys_largefile_source=1; break
13923 echo "$as_me: failed program was:" >&5
13924 cat conftest.$ac_ext >&5
13926 rm -f conftest.$ac_objext conftest.$ac_ext
13930 echo "$as_me:13930: result: $ac_cv_sys_largefile_source" >&5
13931 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13932 if test "$ac_cv_sys_largefile_source" != no; then
13934 cat >>confdefs.h <<EOF
13935 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13941 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13942 # in glibc 2.1.3, but that breaks too many other things.
13943 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13944 echo "$as_me:13944: checking for fseeko" >&5
13945 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13946 if test "${ac_cv_func_fseeko+set}" = set; then
13947 echo $ECHO_N "(cached) $ECHO_C" >&6
13949 cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13956 return fseeko && fseeko (stdin, 0, 0);
13961 rm -f conftest.$ac_objext conftest$ac_exeext
13962 if { (eval echo "$as_me:13962: \"$ac_link\"") >&5
13963 (eval $ac_link) 2>&5
13965 echo "$as_me:13965: \$? = $ac_status" >&5
13966 (exit $ac_status); } &&
13967 { ac_try='test -s conftest$ac_exeext'
13968 { (eval echo "$as_me:13968: \"$ac_try\"") >&5
13969 (eval $ac_try) 2>&5
13971 echo "$as_me:13971: \$? = $ac_status" >&5
13972 (exit $ac_status); }; }; then
13973 ac_cv_func_fseeko=yes
13975 echo "$as_me: failed program was:" >&5
13976 cat conftest.$ac_ext >&5
13977 ac_cv_func_fseeko=no
13979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13981 echo "$as_me:13981: result: $ac_cv_func_fseeko" >&5
13982 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13983 if test $ac_cv_func_fseeko = yes; then
13985 cat >>confdefs.h <<\EOF
13986 #define HAVE_FSEEKO 1
13991 # Normally we would collect these definitions in the config.h,
13992 # but (like _XOPEN_SOURCE), some environments rely on having these
13993 # defined before any of the system headers are included. Another
13994 # case comes up with C++, e.g., on AIX the compiler compiles the
13995 # header files by themselves before looking at the body files it is
13996 # told to compile. For ncurses, those header files do not include
13998 if test "$ac_cv_sys_large_files" != no
14001 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14002 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14005 if test "$ac_cv_sys_largefile_source" != no
14008 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14009 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14012 if test "$ac_cv_sys_file_offset_bits" != no
14015 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14016 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14020 echo "$as_me:14020: checking whether to use struct dirent64" >&5
14021 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14022 if test "${cf_cv_struct_dirent64+set}" = set; then
14023 echo $ECHO_N "(cached) $ECHO_C" >&6
14026 cat >conftest.$ac_ext <<_ACEOF
14027 #line 14027 "configure"
14028 #include "confdefs.h"
14030 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14031 #include <sys/types.h>
14032 #include <dirent.h>
14038 /* if transitional largefile support is setup, this is true */
14039 extern struct dirent64 * readdir(DIR *);
14040 struct dirent64 *x = readdir((DIR *)0);
14041 struct dirent *y = readdir((DIR *)0);
14049 rm -f conftest.$ac_objext
14050 if { (eval echo "$as_me:14050: \"$ac_compile\"") >&5
14051 (eval $ac_compile) 2>&5
14053 echo "$as_me:14053: \$? = $ac_status" >&5
14054 (exit $ac_status); } &&
14055 { ac_try='test -s conftest.$ac_objext'
14056 { (eval echo "$as_me:14056: \"$ac_try\"") >&5
14057 (eval $ac_try) 2>&5
14059 echo "$as_me:14059: \$? = $ac_status" >&5
14060 (exit $ac_status); }; }; then
14061 cf_cv_struct_dirent64=yes
14063 echo "$as_me: failed program was:" >&5
14064 cat conftest.$ac_ext >&5
14065 cf_cv_struct_dirent64=no
14067 rm -f conftest.$ac_objext conftest.$ac_ext
14070 echo "$as_me:14070: result: $cf_cv_struct_dirent64" >&5
14071 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14072 test "$cf_cv_struct_dirent64" = yes &&
14073 cat >>confdefs.h <<\EOF
14074 #define HAVE_STRUCT_DIRENT64 1
14079 ### Enable compiling-in rcs id's
14080 echo "$as_me:14080: checking if RCS identifiers should be compiled-in" >&5
14081 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14083 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14084 if test "${with_rcs_ids+set}" = set; then
14085 withval="$with_rcs_ids"
14086 with_rcs_ids=$withval
14090 echo "$as_me:14090: result: $with_rcs_ids" >&5
14091 echo "${ECHO_T}$with_rcs_ids" >&6
14092 test "$with_rcs_ids" = yes &&
14093 cat >>confdefs.h <<\EOF
14094 #define USE_RCS_IDS 1
14097 ###############################################################################
14099 ### Note that some functions (such as const) are normally disabled anyway.
14100 echo "$as_me:14100: checking if you want to build with function extensions" >&5
14101 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14103 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14104 if test "${enable_ext_funcs+set}" = set; then
14105 enableval="$enable_ext_funcs"
14106 with_ext_funcs=$enableval
14110 echo "$as_me:14110: result: $with_ext_funcs" >&5
14111 echo "${ECHO_T}$with_ext_funcs" >&6
14112 if test "$with_ext_funcs" = yes ; then
14113 NCURSES_EXT_FUNCS=1
14115 cat >>confdefs.h <<\EOF
14116 #define HAVE_USE_DEFAULT_COLORS 1
14119 cat >>confdefs.h <<\EOF
14120 #define NCURSES_EXT_FUNCS 1
14124 NCURSES_EXT_FUNCS=0
14127 ### use option --enable-const to turn on use of const beyond that in XSI.
14128 echo "$as_me:14128: checking for extended use of const keyword" >&5
14129 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14131 # Check whether --enable-const or --disable-const was given.
14132 if test "${enable_const+set}" = set; then
14133 enableval="$enable_const"
14134 with_ext_const=$enableval
14138 echo "$as_me:14138: result: $with_ext_const" >&5
14139 echo "${ECHO_T}$with_ext_const" >&6
14140 NCURSES_CONST='/*nothing*/'
14141 if test "$with_ext_const" = yes ; then
14142 NCURSES_CONST=const
14145 ###############################################################################
14146 # These options are relatively safe to experiment with.
14148 echo "$as_me:14148: checking if you want all development code" >&5
14149 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14151 # Check whether --with-develop or --without-develop was given.
14152 if test "${with_develop+set}" = set; then
14153 withval="$with_develop"
14154 with_develop=$withval
14158 echo "$as_me:14158: result: $with_develop" >&5
14159 echo "${ECHO_T}$with_develop" >&6
14161 ###############################################################################
14162 # These are just experimental, probably should not be in a package:
14164 # This is still experimental (20080329), but should ultimately be moved to
14165 # the script-block --with-normal, etc.
14167 echo "$as_me:14167: checking if you want to link with the pthread library" >&5
14168 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14170 # Check whether --with-pthread or --without-pthread was given.
14171 if test "${with_pthread+set}" = set; then
14172 withval="$with_pthread"
14173 with_pthread=$withval
14177 echo "$as_me:14177: result: $with_pthread" >&5
14178 echo "${ECHO_T}$with_pthread" >&6
14180 if test "$with_pthread" != no ; then
14181 echo "$as_me:14181: checking for pthread.h" >&5
14182 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14183 if test "${ac_cv_header_pthread_h+set}" = set; then
14184 echo $ECHO_N "(cached) $ECHO_C" >&6
14186 cat >conftest.$ac_ext <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189 #include <pthread.h>
14191 if { (eval echo "$as_me:14191: \"$ac_cpp conftest.$ac_ext\"") >&5
14192 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14194 egrep -v '^ *\+' conftest.er1 >conftest.err
14196 cat conftest.err >&5
14197 echo "$as_me:14197: \$? = $ac_status" >&5
14198 (exit $ac_status); } >/dev/null; then
14199 if test -s conftest.err; then
14200 ac_cpp_err=$ac_c_preproc_warn_flag
14207 if test -z "$ac_cpp_err"; then
14208 ac_cv_header_pthread_h=yes
14210 echo "$as_me: failed program was:" >&5
14211 cat conftest.$ac_ext >&5
14212 ac_cv_header_pthread_h=no
14214 rm -f conftest.err conftest.$ac_ext
14216 echo "$as_me:14216: result: $ac_cv_header_pthread_h" >&5
14217 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14218 if test $ac_cv_header_pthread_h = yes; then
14220 cat >>confdefs.h <<\EOF
14221 #define HAVE_PTHREADS_H 1
14224 for cf_lib_pthread in pthread c_r
14226 echo "$as_me:14226: checking if we can link with the $cf_lib_pthread library" >&5
14227 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14228 cf_save_LIBS="$LIBS"
14230 cf_add_libs="$LIBS"
14233 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14234 # filter duplicates
14235 for cf_add_1lib in $cf_add_0lib; do
14236 for cf_add_2lib in $cf_add_libs; do
14237 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14242 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14244 LIBS="$cf_add_libs"
14246 cat >conftest.$ac_ext <<_ACEOF
14247 #line 14247 "configure"
14248 #include "confdefs.h"
14250 #include <pthread.h>
14256 int rc = pthread_create(0,0,0,0);
14257 int r2 = pthread_mutexattr_settype(0, 0);
14263 rm -f conftest.$ac_objext conftest$ac_exeext
14264 if { (eval echo "$as_me:14264: \"$ac_link\"") >&5
14265 (eval $ac_link) 2>&5
14267 echo "$as_me:14267: \$? = $ac_status" >&5
14268 (exit $ac_status); } &&
14269 { ac_try='test -s conftest$ac_exeext'
14270 { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271 (eval $ac_try) 2>&5
14273 echo "$as_me:14273: \$? = $ac_status" >&5
14274 (exit $ac_status); }; }; then
14277 echo "$as_me: failed program was:" >&5
14278 cat conftest.$ac_ext >&5
14281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14282 LIBS="$cf_save_LIBS"
14283 echo "$as_me:14283: result: $with_pthread" >&5
14284 echo "${ECHO_T}$with_pthread" >&6
14285 test "$with_pthread" = yes && break
14288 if test "$with_pthread" = yes ; then
14290 cf_add_libs="$LIBS"
14293 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14294 # filter duplicates
14295 for cf_add_1lib in $cf_add_0lib; do
14296 for cf_add_2lib in $cf_add_libs; do
14297 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14304 LIBS="$cf_add_libs"
14306 cat >>confdefs.h <<\EOF
14307 #define HAVE_LIBPTHREADS 1
14311 { { echo "$as_me:14311: error: Cannot link with pthread library" >&5
14312 echo "$as_me: error: Cannot link with pthread library" >&2;}
14313 { (exit 1); exit 1; }; }
14320 echo "$as_me:14320: checking if you want to use weak-symbols for pthreads" >&5
14321 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14323 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14324 if test "${enable_weak_symbols+set}" = set; then
14325 enableval="$enable_weak_symbols"
14326 use_weak_symbols=$withval
14328 use_weak_symbols=no
14330 echo "$as_me:14330: result: $use_weak_symbols" >&5
14331 echo "${ECHO_T}$use_weak_symbols" >&6
14332 if test "$use_weak_symbols" = yes ; then
14334 echo "$as_me:14334: checking if $CC supports weak symbols" >&5
14335 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14336 if test "${cf_cv_weak_symbols+set}" = set; then
14337 echo $ECHO_N "(cached) $ECHO_C" >&6
14340 cat >conftest.$ac_ext <<_ACEOF
14341 #line 14341 "configure"
14342 #include "confdefs.h"
14349 #if defined(__GNUC__)
14350 # if defined __USE_ISOC99
14351 # define _cat_pragma(exp) _Pragma(#exp)
14352 # define _weak_pragma(exp) _cat_pragma(weak name)
14354 # define _weak_pragma(exp)
14356 # define _declare(name) __extension__ extern __typeof__(name) name
14357 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14360 weak_symbol(fopen);
14366 rm -f conftest.$ac_objext
14367 if { (eval echo "$as_me:14367: \"$ac_compile\"") >&5
14368 (eval $ac_compile) 2>&5
14370 echo "$as_me:14370: \$? = $ac_status" >&5
14371 (exit $ac_status); } &&
14372 { ac_try='test -s conftest.$ac_objext'
14373 { (eval echo "$as_me:14373: \"$ac_try\"") >&5
14374 (eval $ac_try) 2>&5
14376 echo "$as_me:14376: \$? = $ac_status" >&5
14377 (exit $ac_status); }; }; then
14378 cf_cv_weak_symbols=yes
14380 echo "$as_me: failed program was:" >&5
14381 cat conftest.$ac_ext >&5
14382 cf_cv_weak_symbols=no
14384 rm -f conftest.$ac_objext conftest.$ac_ext
14387 echo "$as_me:14387: result: $cf_cv_weak_symbols" >&5
14388 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14391 cf_cv_weak_symbols=no
14394 if test $cf_cv_weak_symbols = yes ; then
14396 cat >>confdefs.h <<\EOF
14397 #define USE_WEAK_SYMBOLS 1
14403 if test "$with_pthread" = "yes" ; then
14405 cat >>confdefs.h <<\EOF
14406 #define USE_PTHREADS 1
14409 enable_reentrant=yes
14410 if test $cf_cv_weak_symbols = yes ; then
14415 # OpenSUSE is installing ncurses6, using reentrant option.
14416 echo "$as_me:14416: checking for _nc_TABSIZE" >&5
14417 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14418 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14419 echo $ECHO_N "(cached) $ECHO_C" >&6
14421 cat >conftest.$ac_ext <<_ACEOF
14422 #line 14422 "configure"
14423 #include "confdefs.h"
14424 #define _nc_TABSIZE autoconf_temporary
14425 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14432 /* We use char because int might match the return type of a gcc2
14433 builtin and then its argument prototype would still apply. */
14434 char _nc_TABSIZE (void);
14440 /* The GNU C library defines stubs for functions which it implements
14441 to always fail with ENOSYS. Some functions are actually named
14442 something starting with __ and the normal name is an alias. */
14443 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14444 #error found stub for _nc_TABSIZE
14447 return _nc_TABSIZE ();
14452 rm -f conftest.$ac_objext conftest$ac_exeext
14453 if { (eval echo "$as_me:14453: \"$ac_link\"") >&5
14454 (eval $ac_link) 2>&5
14456 echo "$as_me:14456: \$? = $ac_status" >&5
14457 (exit $ac_status); } &&
14458 { ac_try='test -s conftest$ac_exeext'
14459 { (eval echo "$as_me:14459: \"$ac_try\"") >&5
14460 (eval $ac_try) 2>&5
14462 echo "$as_me:14462: \$? = $ac_status" >&5
14463 (exit $ac_status); }; }; then
14464 ac_cv_func__nc_TABSIZE=yes
14466 echo "$as_me: failed program was:" >&5
14467 cat conftest.$ac_ext >&5
14468 ac_cv_func__nc_TABSIZE=no
14470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14472 echo "$as_me:14472: result: $ac_cv_func__nc_TABSIZE" >&5
14473 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14474 if test $ac_cv_func__nc_TABSIZE = yes; then
14475 assume_reentrant=yes
14477 assume_reentrant=no
14480 # Reentrant code has to be opaque; there's little advantage to making ncurses
14481 # opaque outside of that, so there is no --enable-opaque option. We can use
14482 # this option without --with-pthreads, but this will be always set for
14484 echo "$as_me:14484: checking if you want experimental reentrant code" >&5
14485 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14487 # Check whether --enable-reentrant or --disable-reentrant was given.
14488 if test "${enable_reentrant+set}" = set; then
14489 enableval="$enable_reentrant"
14490 with_reentrant=$enableval
14492 with_reentrant=$assume_reentrant
14494 echo "$as_me:14494: result: $with_reentrant" >&5
14495 echo "${ECHO_T}$with_reentrant" >&6
14496 if test "$with_reentrant" = yes ; then
14497 cf_cv_enable_reentrant=1
14498 if test $cf_cv_weak_symbols = yes ; then
14500 # remove pthread library from $LIBS
14501 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14503 elif test "$assume_reentrant" = no ; then
14504 LIB_SUFFIX="t${LIB_SUFFIX}"
14507 cat >>confdefs.h <<\EOF
14508 #define USE_REENTRANT 1
14512 cf_cv_enable_reentrant=0
14515 ### Allow using a different wrap-prefix
14516 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14517 echo "$as_me:14517: checking for prefix used to wrap public variables" >&5
14518 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14520 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14521 if test "${with_wrap_prefix+set}" = set; then
14522 withval="$with_wrap_prefix"
14523 NCURSES_WRAP_PREFIX=$withval
14525 NCURSES_WRAP_PREFIX=_nc_
14527 echo "$as_me:14527: result: $NCURSES_WRAP_PREFIX" >&5
14528 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14530 NCURSES_WRAP_PREFIX=_nc_
14533 cat >>confdefs.h <<EOF
14534 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14537 ###############################################################################
14539 ### use option --disable-echo to suppress full display compiling commands
14541 echo "$as_me:14541: checking if you want to see long compiling messages" >&5
14542 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14544 # Check whether --enable-echo or --disable-echo was given.
14545 if test "${enable_echo+set}" = set; then
14546 enableval="$enable_echo"
14547 test "$enableval" != no && enableval=yes
14548 if test "$enableval" != "yes" ; then
14551 ECHO_LD='@echo linking $@;'
14552 RULE_CC='@echo compiling $<'
14553 SHOW_CC='@echo compiling $@'
14575 echo "$as_me:14575: result: $enableval" >&5
14576 echo "${ECHO_T}$enableval" >&6
14578 ### use option --enable-warnings to turn on all gcc warnings
14579 echo "$as_me:14579: checking if you want to see compiler warnings" >&5
14580 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14582 # Check whether --enable-warnings or --disable-warnings was given.
14583 if test "${enable_warnings+set}" = set; then
14584 enableval="$enable_warnings"
14585 with_warnings=$enableval
14587 echo "$as_me:14587: result: $with_warnings" >&5
14588 echo "${ECHO_T}$with_warnings" >&6
14590 if ( test "$GCC" = yes || test "$GXX" = yes )
14593 if ( test "$GCC" = yes || test "$GXX" = yes )
14597 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14599 echo "${as_me:-configure}:14599: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14602 for cf_temp_scan in $CFLAGS
14604 case "x$cf_temp_scan" in
14607 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14608 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14613 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14614 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14619 CFLAGS="$cf_temp_flags"
14620 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14622 echo "${as_me:-configure}:14622: testing ... fixed $CFLAGS ..." 1>&5
14624 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14626 echo "${as_me:-configure}:14626: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14632 if ( test "$GCC" = yes || test "$GXX" = yes )
14636 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14638 echo "${as_me:-configure}:14638: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14641 for cf_temp_scan in $CPPFLAGS
14643 case "x$cf_temp_scan" in
14646 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14647 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14652 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14653 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14658 CPPFLAGS="$cf_temp_flags"
14659 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14661 echo "${as_me:-configure}:14661: testing ... fixed $CPPFLAGS ..." 1>&5
14663 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14665 echo "${as_me:-configure}:14665: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14671 if ( test "$GCC" = yes || test "$GXX" = yes )
14675 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
14677 echo "${as_me:-configure}:14677: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
14680 for cf_temp_scan in $LDFLAGS
14682 case "x$cf_temp_scan" in
14685 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14686 EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
14691 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14692 cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
14697 LDFLAGS="$cf_temp_flags"
14698 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
14700 echo "${as_me:-configure}:14700: testing ... fixed $LDFLAGS ..." 1>&5
14702 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14704 echo "${as_me:-configure}:14704: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14710 echo "$as_me:14710: checking if you want to turn on gcc warnings" >&5
14711 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
14713 # Check whether --enable-warnings or --disable-warnings was given.
14714 if test "${enable_warnings+set}" = set; then
14715 enableval="$enable_warnings"
14716 test "$enableval" != yes && enableval=no
14717 if test "$enableval" != "no" ; then
14727 echo "$as_me:14727: result: $with_warnings" >&5
14728 echo "${ECHO_T}$with_warnings" >&6
14729 if test "$with_warnings" = "yes"
14732 if test "x$have_x" = xyes; then
14734 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
14735 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
14736 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
14737 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14738 for cf_X_CFLAGS in $X_CFLAGS
14740 case "x$cf_X_CFLAGS" in
14742 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14745 CFLAGS="$CFLAGS $cf_X_CFLAGS"
14750 cat >conftest.$ac_ext <<_ACEOF
14751 #line 14751 "configure"
14752 #include "confdefs.h"
14754 #include <stdlib.h>
14755 #include <X11/Intrinsic.h>
14760 String foo = malloc(1); (void)foo
14765 rm -f conftest.$ac_objext
14766 if { (eval echo "$as_me:14766: \"$ac_compile\"") >&5
14767 (eval $ac_compile) 2>&5
14769 echo "$as_me:14769: \$? = $ac_status" >&5
14770 (exit $ac_status); } &&
14771 { ac_try='test -s conftest.$ac_objext'
14772 { (eval echo "$as_me:14772: \"$ac_try\"") >&5
14773 (eval $ac_try) 2>&5
14775 echo "$as_me:14775: \$? = $ac_status" >&5
14776 (exit $ac_status); }; }; then
14778 echo "$as_me:14778: checking for X11/Xt const-feature" >&5
14779 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
14780 if test "${cf_cv_const_x_string+set}" = set; then
14781 echo $ECHO_N "(cached) $ECHO_C" >&6
14784 cat >conftest.$ac_ext <<_ACEOF
14785 #line 14785 "configure"
14786 #include "confdefs.h"
14788 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
14789 #undef XTSTRINGDEFINES /* X11R5 and later */
14790 #include <stdlib.h>
14791 #include <X11/Intrinsic.h>
14796 String foo = malloc(1); *foo = 0
14801 rm -f conftest.$ac_objext
14802 if { (eval echo "$as_me:14802: \"$ac_compile\"") >&5
14803 (eval $ac_compile) 2>&5
14805 echo "$as_me:14805: \$? = $ac_status" >&5
14806 (exit $ac_status); } &&
14807 { ac_try='test -s conftest.$ac_objext'
14808 { (eval echo "$as_me:14808: \"$ac_try\"") >&5
14809 (eval $ac_try) 2>&5
14811 echo "$as_me:14811: \$? = $ac_status" >&5
14812 (exit $ac_status); }; }; then
14814 cf_cv_const_x_string=no
14817 echo "$as_me: failed program was:" >&5
14818 cat conftest.$ac_ext >&5
14820 cf_cv_const_x_string=yes
14823 rm -f conftest.$ac_objext conftest.$ac_ext
14826 echo "$as_me:14826: result: $cf_cv_const_x_string" >&5
14827 echo "${ECHO_T}$cf_cv_const_x_string" >&6
14829 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
14830 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
14831 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
14833 case $cf_cv_const_x_string in
14836 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14837 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
14842 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14843 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
14849 echo "$as_me: failed program was:" >&5
14850 cat conftest.$ac_ext >&5
14852 rm -f conftest.$ac_objext conftest.$ac_ext
14854 cat > conftest.$ac_ext <<EOF
14855 #line 14855 "${as_me:-configure}"
14856 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14858 if test "$INTEL_COMPILER" = yes
14860 # The "-wdXXX" options suppress warnings:
14861 # remark #1419: external declaration in primary source file
14862 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14863 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14864 # remark #193: zero used for undefined preprocessing identifier
14865 # remark #593: variable "curs_sb_left_arrow" was set but never used
14866 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14867 # remark #869: parameter "tw" was never referenced
14868 # remark #981: operands are evaluated in unspecified order
14869 # warning #279: controlling expression is constant
14871 { echo "$as_me:14871: checking for $CC warning options..." >&5
14872 echo "$as_me: checking for $CC warning options..." >&6;}
14873 cf_save_CFLAGS="$CFLAGS"
14874 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
14886 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14887 if { (eval echo "$as_me:14887: \"$ac_compile\"") >&5
14888 (eval $ac_compile) 2>&5
14890 echo "$as_me:14890: \$? = $ac_status" >&5
14891 (exit $ac_status); }; then
14892 test -n "$verbose" && echo "$as_me:14892: result: ... -$cf_opt" >&5
14893 echo "${ECHO_T}... -$cf_opt" >&6
14894 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14897 CFLAGS="$cf_save_CFLAGS"
14898 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
14900 { echo "$as_me:14900: checking for $CC warning options..." >&5
14901 echo "$as_me: checking for $CC warning options..." >&6;}
14902 cf_save_CFLAGS="$CFLAGS"
14904 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14905 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14906 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14907 for cf_opt in W Wall \
14908 Wbad-function-cast \
14911 Wdeclaration-after-statement \
14914 Wmissing-declarations \
14915 Wmissing-prototypes \
14919 Wstrict-prototypes \
14920 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
14922 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14923 if { (eval echo "$as_me:14923: \"$ac_compile\"") >&5
14924 (eval $ac_compile) 2>&5
14926 echo "$as_me:14926: \$? = $ac_status" >&5
14927 (exit $ac_status); }; then
14928 test -n "$verbose" && echo "$as_me:14928: result: ... -$cf_opt" >&5
14929 echo "${ECHO_T}... -$cf_opt" >&6
14932 case $GCC_VERSION in
14934 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
14936 echo "${as_me:-configure}:14936: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14942 case $GCC_VERSION in
14944 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
14946 echo "${as_me:-configure}:14946: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14952 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14955 CFLAGS="$cf_save_CFLAGS"
14961 if ( test "$GCC" = yes || test "$GXX" = yes )
14963 cat > conftest.i <<EOF
14965 #define GCC_PRINTF 0
14968 #define GCC_SCANF 0
14970 #ifndef GCC_NORETURN
14971 #define GCC_NORETURN /* nothing */
14974 #define GCC_UNUSED /* nothing */
14977 if test "$GCC" = yes
14979 { echo "$as_me:14979: checking for $CC __attribute__ directives..." >&5
14980 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14981 cat > conftest.$ac_ext <<EOF
14982 #line 14982 "${as_me:-configure}"
14983 #include "confdefs.h"
14984 #include "conftest.h"
14985 #include "conftest.i"
14987 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14989 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14992 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
14994 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
14996 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14997 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14998 extern void foo(void) GCC_NORETURN;
14999 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15001 cf_printf_attribute=no
15002 cf_scanf_attribute=no
15003 for cf_attribute in scanf printf unused noreturn
15006 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15008 cf_directive="__attribute__(($cf_attribute))"
15009 echo "checking for $CC $cf_directive" 1>&5
15011 case $cf_attribute in
15013 cf_printf_attribute=yes
15014 cat >conftest.h <<EOF
15015 #define GCC_$cf_ATTRIBUTE 1
15019 cf_scanf_attribute=yes
15020 cat >conftest.h <<EOF
15021 #define GCC_$cf_ATTRIBUTE 1
15025 cat >conftest.h <<EOF
15026 #define GCC_$cf_ATTRIBUTE $cf_directive
15031 if { (eval echo "$as_me:15031: \"$ac_compile\"") >&5
15032 (eval $ac_compile) 2>&5
15034 echo "$as_me:15034: \$? = $ac_status" >&5
15035 (exit $ac_status); }; then
15036 test -n "$verbose" && echo "$as_me:15036: result: ... $cf_attribute" >&5
15037 echo "${ECHO_T}... $cf_attribute" >&6
15038 cat conftest.h >>confdefs.h
15039 case $cf_attribute in
15042 cat >>confdefs.h <<EOF
15043 #define GCC_NORETURN $cf_directive
15048 cf_value='/* nothing */'
15049 if test "$cf_printf_attribute" != no ; then
15050 cf_value='__attribute__((format(printf,fmt,var)))'
15052 cat >>confdefs.h <<\EOF
15053 #define GCC_PRINTF 1
15058 cat >>confdefs.h <<EOF
15059 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15064 cf_value='/* nothing */'
15065 if test "$cf_scanf_attribute" != no ; then
15066 cf_value='__attribute__((format(scanf,fmt,var)))'
15068 cat >>confdefs.h <<\EOF
15069 #define GCC_SCANF 1
15074 cat >>confdefs.h <<EOF
15075 #define GCC_SCANFLIKE(fmt,var) $cf_value
15081 cat >>confdefs.h <<EOF
15082 #define GCC_UNUSED $cf_directive
15090 fgrep define conftest.i >>confdefs.h
15097 if test "x$with_warnings" = "xyes"; then
15099 ADAFLAGS="$ADAFLAGS -gnatg"
15103 ### use option --enable-assertions to turn on generation of assertion code
15104 echo "$as_me:15104: checking if you want to enable runtime assertions" >&5
15105 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15107 # Check whether --enable-assertions or --disable-assertions was given.
15108 if test "${enable_assertions+set}" = set; then
15109 enableval="$enable_assertions"
15110 with_assertions=$enableval
15114 echo "$as_me:15114: result: $with_assertions" >&5
15115 echo "${ECHO_T}$with_assertions" >&6
15118 if test "$with_assertions" = no
15120 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15123 ADAFLAGS="$ADAFLAGS -gnata"
15128 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15130 cat >>confdefs.h <<\EOF
15131 #define HAVE_NC_ALLOC_H 1
15134 ### use option --enable-expanded to generate certain macros as functions
15136 # Check whether --enable-expanded or --disable-expanded was given.
15137 if test "${enable_expanded+set}" = set; then
15138 enableval="$enable_expanded"
15139 test "$enableval" = yes &&
15140 cat >>confdefs.h <<\EOF
15141 #define NCURSES_EXPANDED 1
15146 ### use option --disable-macros to suppress macros in favor of functions
15148 # Check whether --enable-macros or --disable-macros was given.
15149 if test "${enable_macros+set}" = set; then
15150 enableval="$enable_macros"
15151 test "$enableval" = no &&
15152 cat >>confdefs.h <<\EOF
15153 #define NCURSES_NOMACROS 1
15158 # Normally we only add trace() to the debug-library. Allow this to be
15159 # extended to all models of the ncurses library:
15161 case "$CFLAGS $CPPFLAGS" in
15167 echo "$as_me:15167: checking whether to add trace feature to all models" >&5
15168 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15170 # Check whether --with-trace or --without-trace was given.
15171 if test "${with_trace+set}" = set; then
15172 withval="$with_trace"
15173 cf_with_trace=$withval
15175 cf_with_trace=$cf_all_traces
15177 echo "$as_me:15177: result: $cf_with_trace" >&5
15178 echo "${ECHO_T}$cf_with_trace" >&6
15180 if test "$cf_with_trace" = yes ; then
15186 cf_new_extra_cppflags=
15188 for cf_add_cflags in -DTRACE
15190 case $cf_fix_cppflags in
15192 case $cf_add_cflags in
15193 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15194 case $cf_add_cflags in
15196 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15198 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15199 && test -z "${cf_tst_cflags}" \
15200 && cf_fix_cppflags=yes
15202 if test $cf_fix_cppflags = yes ; then
15204 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15205 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15208 elif test "${cf_tst_cflags}" = "\"'" ; then
15210 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15211 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15217 case "$CPPFLAGS" in
15221 case $cf_add_cflags in
15223 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15225 CPPFLAGS=`echo "$CPPFLAGS" | \
15226 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15227 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15232 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15233 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15240 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15241 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15248 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15249 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15251 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15253 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15254 && test -z "${cf_tst_cflags}" \
15255 && cf_fix_cppflags=no
15260 if test -n "$cf_new_cflags" ; then
15262 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15263 CFLAGS="${CFLAGS}$cf_new_cflags"
15267 if test -n "$cf_new_cppflags" ; then
15269 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15270 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15274 if test -n "$cf_new_extra_cppflags" ; then
15276 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15277 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15285 echo "$as_me:15285: checking if we want to use GNAT projects" >&5
15286 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15288 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15289 if test "${enable_gnat_projects+set}" = set; then
15290 enableval="$enable_gnat_projects"
15291 test "$enableval" != no && enableval=yes
15292 if test "$enableval" != "yes" ; then
15293 enable_gnat_projects=no
15295 enable_gnat_projects=yes
15299 enable_gnat_projects=yes
15302 echo "$as_me:15302: result: $enable_gnat_projects" >&5
15303 echo "${ECHO_T}$enable_gnat_projects" >&6
15305 ### Checks for libraries.
15306 case $cf_cv_system_name in
15310 echo "$as_me:15310: checking for gettimeofday" >&5
15311 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15312 if test "${ac_cv_func_gettimeofday+set}" = set; then
15313 echo $ECHO_N "(cached) $ECHO_C" >&6
15315 cat >conftest.$ac_ext <<_ACEOF
15316 #line 15316 "configure"
15317 #include "confdefs.h"
15318 #define gettimeofday autoconf_temporary
15319 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15320 #undef gettimeofday
15326 /* We use char because int might match the return type of a gcc2
15327 builtin and then its argument prototype would still apply. */
15328 char gettimeofday (void);
15334 /* The GNU C library defines stubs for functions which it implements
15335 to always fail with ENOSYS. Some functions are actually named
15336 something starting with __ and the normal name is an alias. */
15337 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15338 #error found stub for gettimeofday
15341 return gettimeofday ();
15346 rm -f conftest.$ac_objext conftest$ac_exeext
15347 if { (eval echo "$as_me:15347: \"$ac_link\"") >&5
15348 (eval $ac_link) 2>&5
15350 echo "$as_me:15350: \$? = $ac_status" >&5
15351 (exit $ac_status); } &&
15352 { ac_try='test -s conftest$ac_exeext'
15353 { (eval echo "$as_me:15353: \"$ac_try\"") >&5
15354 (eval $ac_try) 2>&5
15356 echo "$as_me:15356: \$? = $ac_status" >&5
15357 (exit $ac_status); }; }; then
15358 ac_cv_func_gettimeofday=yes
15360 echo "$as_me: failed program was:" >&5
15361 cat conftest.$ac_ext >&5
15362 ac_cv_func_gettimeofday=no
15364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15366 echo "$as_me:15366: result: $ac_cv_func_gettimeofday" >&5
15367 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15368 if test $ac_cv_func_gettimeofday = yes; then
15369 cat >>confdefs.h <<\EOF
15370 #define HAVE_GETTIMEOFDAY 1
15375 echo "$as_me:15375: checking for gettimeofday in -lbsd" >&5
15376 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15377 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15378 echo $ECHO_N "(cached) $ECHO_C" >&6
15380 ac_check_lib_save_LIBS=$LIBS
15382 cat >conftest.$ac_ext <<_ACEOF
15383 #line 15383 "configure"
15384 #include "confdefs.h"
15386 /* Override any gcc2 internal prototype to avoid an error. */
15390 /* We use char because int might match the return type of a gcc2
15391 builtin and then its argument prototype would still apply. */
15392 char gettimeofday ();
15401 rm -f conftest.$ac_objext conftest$ac_exeext
15402 if { (eval echo "$as_me:15402: \"$ac_link\"") >&5
15403 (eval $ac_link) 2>&5
15405 echo "$as_me:15405: \$? = $ac_status" >&5
15406 (exit $ac_status); } &&
15407 { ac_try='test -s conftest$ac_exeext'
15408 { (eval echo "$as_me:15408: \"$ac_try\"") >&5
15409 (eval $ac_try) 2>&5
15411 echo "$as_me:15411: \$? = $ac_status" >&5
15412 (exit $ac_status); }; }; then
15413 ac_cv_lib_bsd_gettimeofday=yes
15415 echo "$as_me: failed program was:" >&5
15416 cat conftest.$ac_ext >&5
15417 ac_cv_lib_bsd_gettimeofday=no
15419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15420 LIBS=$ac_check_lib_save_LIBS
15422 echo "$as_me:15422: result: $ac_cv_lib_bsd_gettimeofday" >&5
15423 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15424 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15426 cat >>confdefs.h <<\EOF
15427 #define HAVE_GETTIMEOFDAY 1
15437 ### Checks for header files.
15438 echo "$as_me:15438: checking for ANSI C header files" >&5
15439 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15440 if test "${ac_cv_header_stdc+set}" = set; then
15441 echo $ECHO_N "(cached) $ECHO_C" >&6
15443 cat >conftest.$ac_ext <<_ACEOF
15444 #line 15444 "configure"
15445 #include "confdefs.h"
15446 #include <stdlib.h>
15447 #include <stdarg.h>
15448 #include <string.h>
15452 if { (eval echo "$as_me:15452: \"$ac_cpp conftest.$ac_ext\"") >&5
15453 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15455 egrep -v '^ *\+' conftest.er1 >conftest.err
15457 cat conftest.err >&5
15458 echo "$as_me:15458: \$? = $ac_status" >&5
15459 (exit $ac_status); } >/dev/null; then
15460 if test -s conftest.err; then
15461 ac_cpp_err=$ac_c_preproc_warn_flag
15468 if test -z "$ac_cpp_err"; then
15469 ac_cv_header_stdc=yes
15471 echo "$as_me: failed program was:" >&5
15472 cat conftest.$ac_ext >&5
15473 ac_cv_header_stdc=no
15475 rm -f conftest.err conftest.$ac_ext
15477 if test $ac_cv_header_stdc = yes; then
15478 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15479 cat >conftest.$ac_ext <<_ACEOF
15480 #line 15480 "configure"
15481 #include "confdefs.h"
15482 #include <string.h>
15485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15486 egrep "memchr" >/dev/null 2>&1; then
15489 ac_cv_header_stdc=no
15495 if test $ac_cv_header_stdc = yes; then
15496 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15497 cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500 #include <stdlib.h>
15503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15504 egrep "free" >/dev/null 2>&1; then
15507 ac_cv_header_stdc=no
15513 if test $ac_cv_header_stdc = yes; then
15514 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15515 if test "$cross_compiling" = yes; then
15518 cat >conftest.$ac_ext <<_ACEOF
15519 #line 15519 "configure"
15520 #include "confdefs.h"
15522 #if ((' ' & 0x0FF) == 0x020)
15523 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15524 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15526 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15527 || ('j' <= (c) && (c) <= 'r') \
15528 || ('s' <= (c) && (c) <= 'z'))
15529 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15532 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15537 for (i = 0; i < 256; i++)
15538 if (XOR (islower (i), ISLOWER (i))
15539 || toupper (i) != TOUPPER (i))
15540 $ac_main_return(2);
15541 $ac_main_return (0);
15544 rm -f conftest$ac_exeext
15545 if { (eval echo "$as_me:15545: \"$ac_link\"") >&5
15546 (eval $ac_link) 2>&5
15548 echo "$as_me:15548: \$? = $ac_status" >&5
15549 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15550 { (eval echo "$as_me:15550: \"$ac_try\"") >&5
15551 (eval $ac_try) 2>&5
15553 echo "$as_me:15553: \$? = $ac_status" >&5
15554 (exit $ac_status); }; }; then
15557 echo "$as_me: program exited with status $ac_status" >&5
15558 echo "$as_me: failed program was:" >&5
15559 cat conftest.$ac_ext >&5
15560 ac_cv_header_stdc=no
15562 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15566 echo "$as_me:15566: result: $ac_cv_header_stdc" >&5
15567 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15568 if test $ac_cv_header_stdc = yes; then
15570 cat >>confdefs.h <<\EOF
15571 #define STDC_HEADERS 1
15576 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15578 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15579 inttypes.h stdint.h unistd.h
15581 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15582 echo "$as_me:15582: checking for $ac_header" >&5
15583 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15584 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15585 echo $ECHO_N "(cached) $ECHO_C" >&6
15587 cat >conftest.$ac_ext <<_ACEOF
15588 #line 15588 "configure"
15589 #include "confdefs.h"
15590 $ac_includes_default
15591 #include <$ac_header>
15593 rm -f conftest.$ac_objext
15594 if { (eval echo "$as_me:15594: \"$ac_compile\"") >&5
15595 (eval $ac_compile) 2>&5
15597 echo "$as_me:15597: \$? = $ac_status" >&5
15598 (exit $ac_status); } &&
15599 { ac_try='test -s conftest.$ac_objext'
15600 { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601 (eval $ac_try) 2>&5
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit $ac_status); }; }; then
15605 eval "$as_ac_Header=yes"
15607 echo "$as_me: failed program was:" >&5
15608 cat conftest.$ac_ext >&5
15609 eval "$as_ac_Header=no"
15611 rm -f conftest.$ac_objext conftest.$ac_ext
15613 echo "$as_me:15613: result: `eval echo '${'$as_ac_Header'}'`" >&5
15614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15616 cat >>confdefs.h <<EOF
15617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15623 echo "$as_me:15623: checking for signed char" >&5
15624 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15625 if test "${ac_cv_type_signed_char+set}" = set; then
15626 echo $ECHO_N "(cached) $ECHO_C" >&6
15628 cat >conftest.$ac_ext <<_ACEOF
15629 #line 15629 "configure"
15630 #include "confdefs.h"
15631 $ac_includes_default
15635 if ((signed char *) 0)
15637 if (sizeof (signed char))
15643 rm -f conftest.$ac_objext
15644 if { (eval echo "$as_me:15644: \"$ac_compile\"") >&5
15645 (eval $ac_compile) 2>&5
15647 echo "$as_me:15647: \$? = $ac_status" >&5
15648 (exit $ac_status); } &&
15649 { ac_try='test -s conftest.$ac_objext'
15650 { (eval echo "$as_me:15650: \"$ac_try\"") >&5
15651 (eval $ac_try) 2>&5
15653 echo "$as_me:15653: \$? = $ac_status" >&5
15654 (exit $ac_status); }; }; then
15655 ac_cv_type_signed_char=yes
15657 echo "$as_me: failed program was:" >&5
15658 cat conftest.$ac_ext >&5
15659 ac_cv_type_signed_char=no
15661 rm -f conftest.$ac_objext conftest.$ac_ext
15663 echo "$as_me:15663: result: $ac_cv_type_signed_char" >&5
15664 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15666 echo "$as_me:15666: checking size of signed char" >&5
15667 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15668 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15669 echo $ECHO_N "(cached) $ECHO_C" >&6
15671 if test "$ac_cv_type_signed_char" = yes; then
15672 if test "$cross_compiling" = yes; then
15673 # Depending upon the size, compute the lo and hi bounds.
15674 cat >conftest.$ac_ext <<_ACEOF
15675 #line 15675 "configure"
15676 #include "confdefs.h"
15677 $ac_includes_default
15681 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
15686 rm -f conftest.$ac_objext
15687 if { (eval echo "$as_me:15687: \"$ac_compile\"") >&5
15688 (eval $ac_compile) 2>&5
15690 echo "$as_me:15690: \$? = $ac_status" >&5
15691 (exit $ac_status); } &&
15692 { ac_try='test -s conftest.$ac_objext'
15693 { (eval echo "$as_me:15693: \"$ac_try\"") >&5
15694 (eval $ac_try) 2>&5
15696 echo "$as_me:15696: \$? = $ac_status" >&5
15697 (exit $ac_status); }; }; then
15700 cat >conftest.$ac_ext <<_ACEOF
15701 #line 15701 "configure"
15702 #include "confdefs.h"
15703 $ac_includes_default
15707 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15712 rm -f conftest.$ac_objext
15713 if { (eval echo "$as_me:15713: \"$ac_compile\"") >&5
15714 (eval $ac_compile) 2>&5
15716 echo "$as_me:15716: \$? = $ac_status" >&5
15717 (exit $ac_status); } &&
15718 { ac_try='test -s conftest.$ac_objext'
15719 { (eval echo "$as_me:15719: \"$ac_try\"") >&5
15720 (eval $ac_try) 2>&5
15722 echo "$as_me:15722: \$? = $ac_status" >&5
15723 (exit $ac_status); }; }; then
15724 ac_hi=$ac_mid; break
15726 echo "$as_me: failed program was:" >&5
15727 cat conftest.$ac_ext >&5
15728 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
15730 rm -f conftest.$ac_objext conftest.$ac_ext
15733 echo "$as_me: failed program was:" >&5
15734 cat conftest.$ac_ext >&5
15737 cat >conftest.$ac_ext <<_ACEOF
15738 #line 15738 "configure"
15739 #include "confdefs.h"
15740 $ac_includes_default
15744 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15749 rm -f conftest.$ac_objext
15750 if { (eval echo "$as_me:15750: \"$ac_compile\"") >&5
15751 (eval $ac_compile) 2>&5
15753 echo "$as_me:15753: \$? = $ac_status" >&5
15754 (exit $ac_status); } &&
15755 { ac_try='test -s conftest.$ac_objext'
15756 { (eval echo "$as_me:15756: \"$ac_try\"") >&5
15757 (eval $ac_try) 2>&5
15759 echo "$as_me:15759: \$? = $ac_status" >&5
15760 (exit $ac_status); }; }; then
15761 ac_lo=$ac_mid; break
15763 echo "$as_me: failed program was:" >&5
15764 cat conftest.$ac_ext >&5
15765 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
15767 rm -f conftest.$ac_objext conftest.$ac_ext
15770 rm -f conftest.$ac_objext conftest.$ac_ext
15771 # Binary search between lo and hi bounds.
15772 while test "x$ac_lo" != "x$ac_hi"; do
15773 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
15774 cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15777 $ac_includes_default
15781 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15786 rm -f conftest.$ac_objext
15787 if { (eval echo "$as_me:15787: \"$ac_compile\"") >&5
15788 (eval $ac_compile) 2>&5
15790 echo "$as_me:15790: \$? = $ac_status" >&5
15791 (exit $ac_status); } &&
15792 { ac_try='test -s conftest.$ac_objext'
15793 { (eval echo "$as_me:15793: \"$ac_try\"") >&5
15794 (eval $ac_try) 2>&5
15796 echo "$as_me:15796: \$? = $ac_status" >&5
15797 (exit $ac_status); }; }; then
15800 echo "$as_me: failed program was:" >&5
15801 cat conftest.$ac_ext >&5
15802 ac_lo=`expr $ac_mid + 1`
15804 rm -f conftest.$ac_objext conftest.$ac_ext
15806 ac_cv_sizeof_signed_char=$ac_lo
15808 if test "$cross_compiling" = yes; then
15809 { { echo "$as_me:15809: error: cannot run test program while cross compiling" >&5
15810 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15811 { (exit 1); exit 1; }; }
15813 cat >conftest.$ac_ext <<_ACEOF
15814 #line 15814 "configure"
15815 #include "confdefs.h"
15816 $ac_includes_default
15820 FILE *f = fopen ("conftest.val", "w");
15822 $ac_main_return (1);
15823 fprintf (f, "%d", (sizeof (signed char)));
15829 rm -f conftest$ac_exeext
15830 if { (eval echo "$as_me:15830: \"$ac_link\"") >&5
15831 (eval $ac_link) 2>&5
15833 echo "$as_me:15833: \$? = $ac_status" >&5
15834 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15835 { (eval echo "$as_me:15835: \"$ac_try\"") >&5
15836 (eval $ac_try) 2>&5
15838 echo "$as_me:15838: \$? = $ac_status" >&5
15839 (exit $ac_status); }; }; then
15840 ac_cv_sizeof_signed_char=`cat conftest.val`
15842 echo "$as_me: program exited with status $ac_status" >&5
15843 echo "$as_me: failed program was:" >&5
15844 cat conftest.$ac_ext >&5
15846 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15851 ac_cv_sizeof_signed_char=0
15854 echo "$as_me:15854: result: $ac_cv_sizeof_signed_char" >&5
15855 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15856 cat >>confdefs.h <<EOF
15857 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15860 echo "$as_me:15860: checking for ANSI C header files" >&5
15861 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15862 if test "${ac_cv_header_stdc+set}" = set; then
15863 echo $ECHO_N "(cached) $ECHO_C" >&6
15865 cat >conftest.$ac_ext <<_ACEOF
15866 #line 15866 "configure"
15867 #include "confdefs.h"
15868 #include <stdlib.h>
15869 #include <stdarg.h>
15870 #include <string.h>
15874 if { (eval echo "$as_me:15874: \"$ac_cpp conftest.$ac_ext\"") >&5
15875 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15877 egrep -v '^ *\+' conftest.er1 >conftest.err
15879 cat conftest.err >&5
15880 echo "$as_me:15880: \$? = $ac_status" >&5
15881 (exit $ac_status); } >/dev/null; then
15882 if test -s conftest.err; then
15883 ac_cpp_err=$ac_c_preproc_warn_flag
15890 if test -z "$ac_cpp_err"; then
15891 ac_cv_header_stdc=yes
15893 echo "$as_me: failed program was:" >&5
15894 cat conftest.$ac_ext >&5
15895 ac_cv_header_stdc=no
15897 rm -f conftest.err conftest.$ac_ext
15899 if test $ac_cv_header_stdc = yes; then
15900 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15901 cat >conftest.$ac_ext <<_ACEOF
15902 #line 15902 "configure"
15903 #include "confdefs.h"
15904 #include <string.h>
15907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15908 egrep "memchr" >/dev/null 2>&1; then
15911 ac_cv_header_stdc=no
15917 if test $ac_cv_header_stdc = yes; then
15918 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15919 cat >conftest.$ac_ext <<_ACEOF
15920 #line 15920 "configure"
15921 #include "confdefs.h"
15922 #include <stdlib.h>
15925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15926 egrep "free" >/dev/null 2>&1; then
15929 ac_cv_header_stdc=no
15935 if test $ac_cv_header_stdc = yes; then
15936 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15937 if test "$cross_compiling" = yes; then
15940 cat >conftest.$ac_ext <<_ACEOF
15941 #line 15941 "configure"
15942 #include "confdefs.h"
15944 #if ((' ' & 0x0FF) == 0x020)
15945 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15946 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15948 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15949 || ('j' <= (c) && (c) <= 'r') \
15950 || ('s' <= (c) && (c) <= 'z'))
15951 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15954 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15959 for (i = 0; i < 256; i++)
15960 if (XOR (islower (i), ISLOWER (i))
15961 || toupper (i) != TOUPPER (i))
15962 $ac_main_return(2);
15963 $ac_main_return (0);
15966 rm -f conftest$ac_exeext
15967 if { (eval echo "$as_me:15967: \"$ac_link\"") >&5
15968 (eval $ac_link) 2>&5
15970 echo "$as_me:15970: \$? = $ac_status" >&5
15971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15972 { (eval echo "$as_me:15972: \"$ac_try\"") >&5
15973 (eval $ac_try) 2>&5
15975 echo "$as_me:15975: \$? = $ac_status" >&5
15976 (exit $ac_status); }; }; then
15979 echo "$as_me: program exited with status $ac_status" >&5
15980 echo "$as_me: failed program was:" >&5
15981 cat conftest.$ac_ext >&5
15982 ac_cv_header_stdc=no
15984 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15988 echo "$as_me:15988: result: $ac_cv_header_stdc" >&5
15989 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15990 if test $ac_cv_header_stdc = yes; then
15992 cat >>confdefs.h <<\EOF
15993 #define STDC_HEADERS 1
15998 ac_header_dirent=no
15999 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16000 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16001 echo "$as_me:16001: checking for $ac_hdr that defines DIR" >&5
16002 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16003 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16004 echo $ECHO_N "(cached) $ECHO_C" >&6
16006 cat >conftest.$ac_ext <<_ACEOF
16007 #line 16007 "configure"
16008 #include "confdefs.h"
16009 #include <sys/types.h>
16021 rm -f conftest.$ac_objext
16022 if { (eval echo "$as_me:16022: \"$ac_compile\"") >&5
16023 (eval $ac_compile) 2>&5
16025 echo "$as_me:16025: \$? = $ac_status" >&5
16026 (exit $ac_status); } &&
16027 { ac_try='test -s conftest.$ac_objext'
16028 { (eval echo "$as_me:16028: \"$ac_try\"") >&5
16029 (eval $ac_try) 2>&5
16031 echo "$as_me:16031: \$? = $ac_status" >&5
16032 (exit $ac_status); }; }; then
16033 eval "$as_ac_Header=yes"
16035 echo "$as_me: failed program was:" >&5
16036 cat conftest.$ac_ext >&5
16037 eval "$as_ac_Header=no"
16039 rm -f conftest.$ac_objext conftest.$ac_ext
16041 echo "$as_me:16041: result: `eval echo '${'$as_ac_Header'}'`" >&5
16042 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16043 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16044 cat >>confdefs.h <<EOF
16045 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16048 ac_header_dirent=$ac_hdr; break
16052 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16053 if test $ac_header_dirent = dirent.h; then
16054 echo "$as_me:16054: checking for opendir in -ldir" >&5
16055 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16056 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16057 echo $ECHO_N "(cached) $ECHO_C" >&6
16059 ac_check_lib_save_LIBS=$LIBS
16061 cat >conftest.$ac_ext <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16065 /* Override any gcc2 internal prototype to avoid an error. */
16069 /* We use char because int might match the return type of a gcc2
16070 builtin and then its argument prototype would still apply. */
16080 rm -f conftest.$ac_objext conftest$ac_exeext
16081 if { (eval echo "$as_me:16081: \"$ac_link\"") >&5
16082 (eval $ac_link) 2>&5
16084 echo "$as_me:16084: \$? = $ac_status" >&5
16085 (exit $ac_status); } &&
16086 { ac_try='test -s conftest$ac_exeext'
16087 { (eval echo "$as_me:16087: \"$ac_try\"") >&5
16088 (eval $ac_try) 2>&5
16090 echo "$as_me:16090: \$? = $ac_status" >&5
16091 (exit $ac_status); }; }; then
16092 ac_cv_lib_dir_opendir=yes
16094 echo "$as_me: failed program was:" >&5
16095 cat conftest.$ac_ext >&5
16096 ac_cv_lib_dir_opendir=no
16098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16099 LIBS=$ac_check_lib_save_LIBS
16101 echo "$as_me:16101: result: $ac_cv_lib_dir_opendir" >&5
16102 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16103 if test $ac_cv_lib_dir_opendir = yes; then
16108 echo "$as_me:16108: checking for opendir in -lx" >&5
16109 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16110 if test "${ac_cv_lib_x_opendir+set}" = set; then
16111 echo $ECHO_N "(cached) $ECHO_C" >&6
16113 ac_check_lib_save_LIBS=$LIBS
16115 cat >conftest.$ac_ext <<_ACEOF
16116 #line 16116 "configure"
16117 #include "confdefs.h"
16119 /* Override any gcc2 internal prototype to avoid an error. */
16123 /* We use char because int might match the return type of a gcc2
16124 builtin and then its argument prototype would still apply. */
16134 rm -f conftest.$ac_objext conftest$ac_exeext
16135 if { (eval echo "$as_me:16135: \"$ac_link\"") >&5
16136 (eval $ac_link) 2>&5
16138 echo "$as_me:16138: \$? = $ac_status" >&5
16139 (exit $ac_status); } &&
16140 { ac_try='test -s conftest$ac_exeext'
16141 { (eval echo "$as_me:16141: \"$ac_try\"") >&5
16142 (eval $ac_try) 2>&5
16144 echo "$as_me:16144: \$? = $ac_status" >&5
16145 (exit $ac_status); }; }; then
16146 ac_cv_lib_x_opendir=yes
16148 echo "$as_me: failed program was:" >&5
16149 cat conftest.$ac_ext >&5
16150 ac_cv_lib_x_opendir=no
16152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16153 LIBS=$ac_check_lib_save_LIBS
16155 echo "$as_me:16155: result: $ac_cv_lib_x_opendir" >&5
16156 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16157 if test $ac_cv_lib_x_opendir = yes; then
16163 echo "$as_me:16163: checking whether time.h and sys/time.h may both be included" >&5
16164 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16165 if test "${ac_cv_header_time+set}" = set; then
16166 echo $ECHO_N "(cached) $ECHO_C" >&6
16168 cat >conftest.$ac_ext <<_ACEOF
16169 #line 16169 "configure"
16170 #include "confdefs.h"
16171 #include <sys/types.h>
16172 #include <sys/time.h>
16178 if ((struct tm *) 0)
16184 rm -f conftest.$ac_objext
16185 if { (eval echo "$as_me:16185: \"$ac_compile\"") >&5
16186 (eval $ac_compile) 2>&5
16188 echo "$as_me:16188: \$? = $ac_status" >&5
16189 (exit $ac_status); } &&
16190 { ac_try='test -s conftest.$ac_objext'
16191 { (eval echo "$as_me:16191: \"$ac_try\"") >&5
16192 (eval $ac_try) 2>&5
16194 echo "$as_me:16194: \$? = $ac_status" >&5
16195 (exit $ac_status); }; }; then
16196 ac_cv_header_time=yes
16198 echo "$as_me: failed program was:" >&5
16199 cat conftest.$ac_ext >&5
16200 ac_cv_header_time=no
16202 rm -f conftest.$ac_objext conftest.$ac_ext
16204 echo "$as_me:16204: result: $ac_cv_header_time" >&5
16205 echo "${ECHO_T}$ac_cv_header_time" >&6
16206 if test $ac_cv_header_time = yes; then
16208 cat >>confdefs.h <<\EOF
16209 #define TIME_WITH_SYS_TIME 1
16214 ### checks for compiler characteristics
16216 ac_cpp='$CPP $CPPFLAGS'
16217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16220 ac_main_return=return
16222 echo "$as_me:16222: checking for an ANSI C-conforming const" >&5
16223 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16224 if test "${ac_cv_c_const+set}" = set; then
16225 echo $ECHO_N "(cached) $ECHO_C" >&6
16227 cat >conftest.$ac_ext <<_ACEOF
16228 #line 16228 "configure"
16229 #include "confdefs.h"
16234 /* FIXME: Include the comments suggested by Paul. */
16235 #ifndef __cplusplus
16236 /* Ultrix mips cc rejects this. */
16237 typedef int charset[2];
16239 /* SunOS 4.1.1 cc rejects this. */
16240 char const *const *ccp;
16242 /* NEC SVR4.0.2 mips cc rejects this. */
16243 struct point {int x, y;};
16244 static struct point const zero = {0,0};
16245 /* AIX XL C 1.02.0.0 rejects this.
16246 It does not let you subtract one const X* pointer from another in
16247 an arm of an if-expression whose if-part is not a constant
16249 const char *g = "string";
16250 ccp = &g + (g ? g-g : 0);
16251 /* HPUX 7.0 cc rejects these. */
16254 ccp = (char const *const *) p;
16255 { /* SCO 3.2v4 cc rejects this. */
16257 char const *s = 0 ? (char *) 0 : (char const *) 0;
16261 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16262 int x[] = {25, 17};
16263 const int *foo = &x[0];
16266 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16267 typedef const int *iptr;
16271 { /* AIX XL C 1.02.0.0 rejects this saying
16272 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16273 struct s { int j; const int *ap[3]; };
16274 struct s *b; b->j = 5;
16276 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16277 const int foo = 10;
16285 rm -f conftest.$ac_objext
16286 if { (eval echo "$as_me:16286: \"$ac_compile\"") >&5
16287 (eval $ac_compile) 2>&5
16289 echo "$as_me:16289: \$? = $ac_status" >&5
16290 (exit $ac_status); } &&
16291 { ac_try='test -s conftest.$ac_objext'
16292 { (eval echo "$as_me:16292: \"$ac_try\"") >&5
16293 (eval $ac_try) 2>&5
16295 echo "$as_me:16295: \$? = $ac_status" >&5
16296 (exit $ac_status); }; }; then
16299 echo "$as_me: failed program was:" >&5
16300 cat conftest.$ac_ext >&5
16303 rm -f conftest.$ac_objext conftest.$ac_ext
16305 echo "$as_me:16305: result: $ac_cv_c_const" >&5
16306 echo "${ECHO_T}$ac_cv_c_const" >&6
16307 if test $ac_cv_c_const = no; then
16309 cat >>confdefs.h <<\EOF
16315 ### Checks for external-data
16317 echo "$as_me:16317: checking if data-only library module links" >&5
16318 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16319 if test "${cf_cv_link_dataonly+set}" = set; then
16320 echo $ECHO_N "(cached) $ECHO_C" >&6
16324 cat >conftest.$ac_ext <<EOF
16325 #line 16325 "configure"
16326 int testdata[3] = { 123, 456, 789 };
16328 if { (eval echo "$as_me:16328: \"$ac_compile\"") >&5
16329 (eval $ac_compile) 2>&5
16331 echo "$as_me:16331: \$? = $ac_status" >&5
16332 (exit $ac_status); } ; then
16333 mv conftest.o data.o && \
16334 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16336 rm -f conftest.$ac_ext data.o
16337 cat >conftest.$ac_ext <<EOF
16338 #line 16338 "configure"
16342 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16344 extern int testdata[3];
16345 return testdata[0] == 123
16346 && testdata[1] == 456
16347 && testdata[2] == 789;
16351 if { (eval echo "$as_me:16351: \"$ac_compile\"") >&5
16352 (eval $ac_compile) 2>&5
16354 echo "$as_me:16354: \$? = $ac_status" >&5
16355 (exit $ac_status); }; then
16356 mv conftest.o func.o && \
16357 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16359 rm -f conftest.$ac_ext func.o
16360 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16361 cf_saveLIBS="$LIBS"
16362 LIBS="conftest.a $LIBS"
16363 if test "$cross_compiling" = yes; then
16364 cf_cv_link_dataonly=unknown
16366 cat >conftest.$ac_ext <<_ACEOF
16367 #line 16367 "configure"
16368 #include "confdefs.h"
16372 extern int testfunc();
16373 ${cf_cv_main_return:-return} (!testfunc());
16377 rm -f conftest$ac_exeext
16378 if { (eval echo "$as_me:16378: \"$ac_link\"") >&5
16379 (eval $ac_link) 2>&5
16381 echo "$as_me:16381: \$? = $ac_status" >&5
16382 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16383 { (eval echo "$as_me:16383: \"$ac_try\"") >&5
16384 (eval $ac_try) 2>&5
16386 echo "$as_me:16386: \$? = $ac_status" >&5
16387 (exit $ac_status); }; }; then
16388 cf_cv_link_dataonly=yes
16390 echo "$as_me: program exited with status $ac_status" >&5
16391 echo "$as_me: failed program was:" >&5
16392 cat conftest.$ac_ext >&5
16393 cf_cv_link_dataonly=no
16395 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16397 LIBS="$cf_saveLIBS"
16401 echo "$as_me:16401: result: $cf_cv_link_dataonly" >&5
16402 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16404 if test "$cf_cv_link_dataonly" = no ; then
16406 cat >>confdefs.h <<\EOF
16407 #define BROKEN_LINKER 1
16413 ### Checks for library functions.
16419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16420 echo "$as_me:16420: checking for $ac_header" >&5
16421 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16422 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16423 echo $ECHO_N "(cached) $ECHO_C" >&6
16425 cat >conftest.$ac_ext <<_ACEOF
16426 #line 16426 "configure"
16427 #include "confdefs.h"
16428 #include <$ac_header>
16430 if { (eval echo "$as_me:16430: \"$ac_cpp conftest.$ac_ext\"") >&5
16431 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16433 egrep -v '^ *\+' conftest.er1 >conftest.err
16435 cat conftest.err >&5
16436 echo "$as_me:16436: \$? = $ac_status" >&5
16437 (exit $ac_status); } >/dev/null; then
16438 if test -s conftest.err; then
16439 ac_cpp_err=$ac_c_preproc_warn_flag
16446 if test -z "$ac_cpp_err"; then
16447 eval "$as_ac_Header=yes"
16449 echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 eval "$as_ac_Header=no"
16453 rm -f conftest.err conftest.$ac_ext
16455 echo "$as_me:16455: result: `eval echo '${'$as_ac_Header'}'`" >&5
16456 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16457 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16458 cat >>confdefs.h <<EOF
16459 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16465 echo "$as_me:16465: checking for working mkstemp" >&5
16466 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16467 if test "${cf_cv_func_mkstemp+set}" = set; then
16468 echo $ECHO_N "(cached) $ECHO_C" >&6
16472 if test "$cross_compiling" = yes; then
16473 cf_cv_func_mkstemp=maybe
16475 cat >conftest.$ac_ext <<_ACEOF
16476 #line 16476 "configure"
16477 #include "confdefs.h"
16479 #include <sys/types.h>
16480 #ifdef HAVE_UNISTD_H
16481 #include <unistd.h>
16483 #include <stdlib.h>
16485 #include <string.h>
16486 #include <sys/stat.h>
16489 char *tmpl = "conftestXXXXXX";
16497 for (n = 0; n < 2; ++n) {
16498 strcpy(name[n], tmpl);
16499 if ((fd = mkstemp(name[n])) >= 0) {
16500 if (!strcmp(name[n], tmpl)
16501 || stat(name[n], &sb) != 0
16502 || (sb.st_mode & S_IFMT) != S_IFREG
16503 || (sb.st_mode & 077) != 0) {
16510 && !strcmp(name[0], name[1]))
16512 ${cf_cv_main_return:-return}(result);
16516 rm -f conftest$ac_exeext
16517 if { (eval echo "$as_me:16517: \"$ac_link\"") >&5
16518 (eval $ac_link) 2>&5
16520 echo "$as_me:16520: \$? = $ac_status" >&5
16521 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16522 { (eval echo "$as_me:16522: \"$ac_try\"") >&5
16523 (eval $ac_try) 2>&5
16525 echo "$as_me:16525: \$? = $ac_status" >&5
16526 (exit $ac_status); }; }; then
16527 cf_cv_func_mkstemp=yes
16530 echo "$as_me: program exited with status $ac_status" >&5
16531 echo "$as_me: failed program was:" >&5
16532 cat conftest.$ac_ext >&5
16533 cf_cv_func_mkstemp=no
16536 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16540 echo "$as_me:16540: result: $cf_cv_func_mkstemp" >&5
16541 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16542 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16543 echo "$as_me:16543: checking for mkstemp" >&5
16544 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16545 if test "${ac_cv_func_mkstemp+set}" = set; then
16546 echo $ECHO_N "(cached) $ECHO_C" >&6
16548 cat >conftest.$ac_ext <<_ACEOF
16549 #line 16549 "configure"
16550 #include "confdefs.h"
16551 #define mkstemp autoconf_temporary
16552 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16559 /* We use char because int might match the return type of a gcc2
16560 builtin and then its argument prototype would still apply. */
16561 char mkstemp (void);
16567 /* The GNU C library defines stubs for functions which it implements
16568 to always fail with ENOSYS. Some functions are actually named
16569 something starting with __ and the normal name is an alias. */
16570 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16571 #error found stub for mkstemp
16579 rm -f conftest.$ac_objext conftest$ac_exeext
16580 if { (eval echo "$as_me:16580: \"$ac_link\"") >&5
16581 (eval $ac_link) 2>&5
16583 echo "$as_me:16583: \$? = $ac_status" >&5
16584 (exit $ac_status); } &&
16585 { ac_try='test -s conftest$ac_exeext'
16586 { (eval echo "$as_me:16586: \"$ac_try\"") >&5
16587 (eval $ac_try) 2>&5
16589 echo "$as_me:16589: \$? = $ac_status" >&5
16590 (exit $ac_status); }; }; then
16591 ac_cv_func_mkstemp=yes
16593 echo "$as_me: failed program was:" >&5
16594 cat conftest.$ac_ext >&5
16595 ac_cv_func_mkstemp=no
16597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16599 echo "$as_me:16599: result: $ac_cv_func_mkstemp" >&5
16600 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16603 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16605 cat >>confdefs.h <<\EOF
16606 #define HAVE_MKSTEMP 1
16611 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16612 CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16613 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16617 if test "$cf_with_ada" != "no" ; then
16619 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16622 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16624 unset ac_cv_path_cf_TEMP_gnat
16626 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16627 set dummy $cf_prog_gnat; ac_word=$2
16628 echo "$as_me:16628: checking for $ac_word" >&5
16629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16630 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16631 echo $ECHO_N "(cached) $ECHO_C" >&6
16633 case $cf_TEMP_gnat in
16635 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16638 ac_save_IFS=$IFS; IFS=$ac_path_separator
16640 for ac_dir in $ac_dummy; do
16642 test -z "$ac_dir" && ac_dir=.
16643 if $as_executable_p "$ac_dir/$ac_word"; then
16644 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16645 echo "$as_me:16645: found $ac_dir/$ac_word" >&5
16650 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16654 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16656 if test -n "$cf_TEMP_gnat"; then
16657 echo "$as_me:16657: result: $cf_TEMP_gnat" >&5
16658 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16660 echo "$as_me:16660: result: no" >&5
16661 echo "${ECHO_T}no" >&6
16664 eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
16666 if test "x$cf_TEMP_gnat" != xno; then
16667 unset cf_cv_gnat_version
16670 echo "$as_me:16670: checking for $cf_prog_gnat version" >&5
16671 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16672 if test "${cf_cv_gnat_version+set}" = set; then
16673 echo $ECHO_N "(cached) $ECHO_C" >&6
16676 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
16677 grep '[0-9].[0-9][0-9]*' |\
16678 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16681 echo "$as_me:16681: result: $cf_cv_gnat_version" >&5
16682 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16683 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16684 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
16687 eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
16690 unset cf_cv_gnat_version
16691 unset ac_cv_path_cf_TEMP_gnat
16694 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
16696 cf_cv_prog_gnat_correct=no
16698 cf_ada_make=gnatmake
16699 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
16700 # gprconfig is newer than gnatmake; we can continue...
16703 rm -rf conftest* *~conftest*
16704 if mkdir conftest.src
16708 for cf_gprconfig in Ada C
16710 echo "$as_me:16710: checking for gprconfig name for $cf_gprconfig" >&5
16711 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
16712 if test $cf_gprconfig = C
16714 for cf_gprconfig_param in \
16715 $cf_gprconfig,,,,GNATGCC \
16716 $cf_gprconfig,,,,GCC \
16719 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16720 test -n "$cf_gprconfig_value" && break
16723 cf_gprconfig_param=$cf_gprconfig
16724 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
16726 if test -n "$cf_gprconfig_value"
16728 eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
16729 echo "$as_me:16729: result: $cf_gprconfig_value" >&5
16730 echo "${ECHO_T}$cf_gprconfig_value" >&6
16732 echo "$as_me:16732: result: missing" >&5
16733 echo "${ECHO_T}missing" >&6
16739 rm -rf conftest* *~conftest*
16742 if test "x$cf_ada_config" != "x#"
16745 echo "$as_me:16745: checking for gnat version" >&5
16746 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16747 if test "${cf_cv_gnat_version+set}" = set; then
16748 echo $ECHO_N "(cached) $ECHO_C" >&6
16751 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
16752 grep '[0-9].[0-9][0-9]*' |\
16753 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16756 echo "$as_me:16756: result: $cf_cv_gnat_version" >&5
16757 echo "${ECHO_T}$cf_cv_gnat_version" >&6
16758 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
16760 case $cf_cv_gnat_version in
16761 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16762 cf_cv_prog_gnat_correct=yes
16765 { echo "$as_me:16765: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
16766 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
16767 cf_cv_prog_gnat_correct=no
16771 # Extract the first word of "m4", so it can be a program name with args.
16772 set dummy m4; ac_word=$2
16773 echo "$as_me:16773: checking for $ac_word" >&5
16774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16775 if test "${ac_cv_prog_M4_exists+set}" = set; then
16776 echo $ECHO_N "(cached) $ECHO_C" >&6
16778 if test -n "$M4_exists"; then
16779 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16781 ac_save_IFS=$IFS; IFS=$ac_path_separator
16783 for ac_dir in $ac_dummy; do
16785 test -z "$ac_dir" && ac_dir=.
16786 $as_executable_p "$ac_dir/$ac_word" || continue
16787 ac_cv_prog_M4_exists="yes"
16788 echo "$as_me:16788: found $ac_dir/$ac_word" >&5
16792 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16795 M4_exists=$ac_cv_prog_M4_exists
16796 if test -n "$M4_exists"; then
16797 echo "$as_me:16797: result: $M4_exists" >&5
16798 echo "${ECHO_T}$M4_exists" >&6
16800 echo "$as_me:16800: result: no" >&5
16801 echo "${ECHO_T}no" >&6
16804 if test "$ac_cv_prog_M4_exists" = no; then
16805 cf_cv_prog_gnat_correct=no
16806 { echo "$as_me:16806: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
16807 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
16809 if test "$cf_cv_prog_gnat_correct" = yes; then
16810 echo "$as_me:16810: checking if GNAT works" >&5
16811 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16813 rm -rf conftest* *~conftest*
16814 cat >>conftest.ads <<CF_EOF
16815 procedure conftest;
16817 cat >>conftest.adb <<CF_EOF
16820 procedure conftest is
16822 Text_IO.Put ("Hello World");
16824 GNAT.OS_Lib.OS_Exit (0);
16827 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16828 if ( ./conftest 1>&5 2>&1 ) ; then
16829 cf_cv_prog_gnat_correct=yes
16831 cf_cv_prog_gnat_correct=no
16834 cf_cv_prog_gnat_correct=no
16836 rm -rf conftest* *~conftest*
16838 echo "$as_me:16838: result: $cf_cv_prog_gnat_correct" >&5
16839 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16842 cf_cv_prog_gnat_correct=no
16846 if test "$cf_cv_prog_gnat_correct" = yes; then
16848 echo "$as_me:16848: checking optimization options for ADAFLAGS" >&5
16849 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
16853 ADAFLAGS="$ADAFLAGS -g"
16859 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
16861 ADAFLAGS="$ADAFLAGS $cf_O_flag"
16865 echo "$as_me:16865: result: $ADAFLAGS" >&5
16866 echo "${ECHO_T}$ADAFLAGS" >&6
16868 echo "$as_me:16868: checking if GNATPREP supports -T option" >&5
16869 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
16870 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
16871 echo $ECHO_N "(cached) $ECHO_C" >&6
16874 cf_cv_gnatprep_opt_t=no
16875 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
16878 echo "$as_me:16878: result: $cf_cv_gnatprep_opt_t" >&5
16879 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
16880 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
16882 echo "$as_me:16882: checking if GNAT supports generics" >&5
16883 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
16884 case $cf_cv_gnat_version in
16885 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
16886 cf_gnat_generics=yes
16889 cf_gnat_generics=no
16892 echo "$as_me:16892: result: $cf_gnat_generics" >&5
16893 echo "${ECHO_T}$cf_gnat_generics" >&6
16895 if test "$cf_gnat_generics" = yes
16897 cf_compile_generics=generics
16898 cf_generic_objects="\${GENOBJS}"
16900 cf_compile_generics=
16901 cf_generic_objects=
16904 echo "$as_me:16904: checking if GNAT supports SIGINT" >&5
16905 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
16906 if test "${cf_cv_gnat_sigint+set}" = set; then
16907 echo $ECHO_N "(cached) $ECHO_C" >&6
16910 rm -rf conftest* *~conftest*
16911 cat >>conftest.ads <<CF_EOF
16912 with Ada.Interrupts.Names;
16914 package ConfTest is
16916 pragma Warnings (Off); -- the next pragma exists since 3.11p
16917 pragma Unreserve_All_Interrupts;
16918 pragma Warnings (On);
16920 protected Process is
16922 function Continue return Boolean;
16923 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
16925 Done : Boolean := False;
16930 cat >>conftest.adb <<CF_EOF
16931 package body ConfTest is
16932 protected body Process is
16937 function Continue return Boolean is
16944 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16945 cf_cv_gnat_sigint=yes
16947 cf_cv_gnat_sigint=no
16949 rm -rf conftest* *~conftest*
16952 echo "$as_me:16952: result: $cf_cv_gnat_sigint" >&5
16953 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
16955 if test $cf_cv_gnat_sigint = yes ; then
16958 USE_GNAT_SIGINT="#"
16961 cf_gnat_libraries=no
16962 cf_gnat_projects=no
16964 if test "$enable_gnat_projects" != no ; then
16965 echo "$as_me:16965: checking if GNAT supports project files" >&5
16966 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
16967 case $cf_cv_gnat_version in
16971 case $cf_cv_system_name in
16975 rm -rf conftest* *~conftest*
16976 if mkdir conftest.src conftest.bin conftest.lib
16979 rm -rf conftest* *~conftest*
16980 cat >>library.gpr <<CF_EOF
16982 Kind := External ("LIB_KIND");
16983 for Library_Name use "ConfTest";
16984 for Object_Dir use ".";
16985 for Library_ALI_Dir use External("LIBRARY_DIR");
16986 for Library_Version use External ("SONAME");
16987 for Library_Kind use Kind;
16988 for Library_Dir use External("BUILD_DIR");
16989 Source_Dir := External ("SOURCE_DIR");
16990 for Source_Dirs use (Source_Dir);
16993 cat >>confpackage.ads <<CF_EOF
16994 package ConfPackage is
16995 procedure conftest;
16998 cat >>confpackage.adb <<CF_EOF
17000 package body ConfPackage is
17001 procedure conftest is
17003 Text_IO.Put ("Hello World");
17008 if ( $cf_ada_make $ADAFLAGS \
17010 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
17011 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
17012 -XSOURCE_DIR=`pwd` \
17013 -XSONAME=libConfTest.so.1 \
17014 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17015 cf_gnat_projects=yes
17019 if test -f conftest.lib/confpackage.ali
17021 cf_gnat_libraries=yes
17023 rm -rf conftest* *~conftest*
17028 echo "$as_me:17028: result: $cf_gnat_projects" >&5
17029 echo "${ECHO_T}$cf_gnat_projects" >&6
17030 fi # enable_gnat_projects
17032 if test $cf_gnat_projects = yes
17034 echo "$as_me:17034: checking if GNAT supports libraries" >&5
17035 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17036 echo "$as_me:17036: result: $cf_gnat_libraries" >&5
17037 echo "${ECHO_T}$cf_gnat_libraries" >&6
17040 if test "$cf_gnat_projects" = yes
17042 USE_OLD_MAKERULES="#"
17043 USE_GNAT_PROJECTS=""
17045 USE_OLD_MAKERULES=""
17046 USE_GNAT_PROJECTS="#"
17049 if test "$cf_gnat_libraries" = yes
17051 USE_GNAT_LIBRARIES=""
17053 USE_GNAT_LIBRARIES="#"
17056 echo "$as_me:17056: checking for ada-compiler" >&5
17057 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17059 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17060 if test "${with_ada_compiler+set}" = set; then
17061 withval="$with_ada_compiler"
17062 cf_ada_compiler=$withval
17064 cf_ada_compiler=gnatmake
17067 echo "$as_me:17067: result: $cf_ada_compiler" >&5
17068 echo "${ECHO_T}$cf_ada_compiler" >&6
17070 cf_ada_package=terminal_interface
17072 echo "$as_me:17072: checking for ada-include" >&5
17073 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17075 # Check whether --with-ada-include or --without-ada-include was given.
17076 if test "${with_ada_include+set}" = set; then
17077 withval="$with_ada_include"
17080 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17081 fi; if test -n "$prefix/share/ada/adainclude" ; then
17083 if test "x$prefix" != xNONE; then
17084 cf_path_syntax="$prefix"
17086 cf_path_syntax="$ac_default_prefix"
17089 case ".$withval" in
17090 (.\$\(*\)*|.\'*\'*)
17094 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17096 (.\${*prefix}*|.\${*dir}*)
17097 eval withval="$withval"
17098 case ".$withval" in
17100 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17105 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17108 { { echo "$as_me:17108: error: expected a pathname, not \"$withval\"" >&5
17109 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17110 { (exit 1); exit 1; }; }
17115 eval ADA_INCLUDE="$withval"
17117 echo "$as_me:17117: result: $ADA_INCLUDE" >&5
17118 echo "${ECHO_T}$ADA_INCLUDE" >&6
17120 echo "$as_me:17120: checking for ada-objects" >&5
17121 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17123 # Check whether --with-ada-objects or --without-ada-objects was given.
17124 if test "${with_ada_objects+set}" = set; then
17125 withval="$with_ada_objects"
17128 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17129 fi; if test -n "$prefix/lib/ada/adalib" ; then
17131 if test "x$prefix" != xNONE; then
17132 cf_path_syntax="$prefix"
17134 cf_path_syntax="$ac_default_prefix"
17137 case ".$withval" in
17138 (.\$\(*\)*|.\'*\'*)
17142 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17144 (.\${*prefix}*|.\${*dir}*)
17145 eval withval="$withval"
17146 case ".$withval" in
17148 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17153 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17156 { { echo "$as_me:17156: error: expected a pathname, not \"$withval\"" >&5
17157 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17158 { (exit 1); exit 1; }; }
17163 eval ADA_OBJECTS="$withval"
17165 echo "$as_me:17165: result: $ADA_OBJECTS" >&5
17166 echo "${ECHO_T}$ADA_OBJECTS" >&6
17168 echo "$as_me:17168: checking if an Ada95 shared-library should be built" >&5
17169 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17171 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17172 if test "${with_ada_sharedlib+set}" = set; then
17173 withval="$with_ada_sharedlib"
17174 with_ada_sharedlib=$withval
17176 with_ada_sharedlib=no
17178 echo "$as_me:17178: result: $with_ada_sharedlib" >&5
17179 echo "${ECHO_T}$with_ada_sharedlib" >&6
17181 if test "x$with_ada_sharedlib" != xno
17183 if test "x$cf_gnat_projects" != xyes
17185 { echo "$as_me:17185: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17186 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17187 with_ada_sharedlib=no
17191 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17192 MAKE_ADA_SHAREDLIB="#"
17194 if test "x$with_ada_sharedlib" != xno
17196 MAKE_ADA_SHAREDLIB=
17197 if test "x$with_ada_sharedlib" != xyes
17199 ADA_SHAREDLIB="$with_ada_sharedlib"
17203 # allow the Ada binding to be renamed
17205 echo "$as_me:17205: checking for ada-libname" >&5
17206 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17208 # Check whether --with-ada-libname or --without-ada-libname was given.
17209 if test "${with_ada_libname+set}" = set; then
17210 withval="$with_ada_libname"
17211 ADA_LIBNAME=$withval
17213 ADA_LIBNAME=AdaCurses
17215 case "x$ADA_LIBNAME" in
17217 ADA_LIBNAME=AdaCurses
17221 echo "$as_me:17221: result: $ADA_LIBNAME" >&5
17222 echo "${ECHO_T}$ADA_LIBNAME" >&6
17225 { { echo "$as_me:17225: error: No usable Ada compiler found" >&5
17226 echo "$as_me: error: No usable Ada compiler found" >&2;}
17227 { (exit 1); exit 1; }; }
17230 { { echo "$as_me:17230: error: The Ada compiler is needed for this package" >&5
17231 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17232 { (exit 1); exit 1; }; }
17235 ################################################################################
17242 ### Construct the list of include-directories to be generated
17244 if test "$srcdir" != "."; then
17245 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17247 CPPFLAGS="-I../include $CPPFLAGS"
17248 if test "$srcdir" != "."; then
17249 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17251 CPPFLAGS="-I. $CPPFLAGS"
17253 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17254 if test "$srcdir" != "."; then
17255 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17257 if test "$GCC" != yes; then
17258 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17259 elif test "$includedir" != "/usr/include"; then
17260 if test "$includedir" = '${prefix}/include' ; then
17261 if test x$prefix != x/usr ; then
17262 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17265 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17269 ### Build up pieces for makefile rules
17270 echo "$as_me:17270: checking default library suffix" >&5
17271 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17273 case $DFT_LWR_MODEL in
17274 (libtool) DFT_ARG_SUFFIX='' ;;
17275 (normal) DFT_ARG_SUFFIX='' ;;
17276 (debug) DFT_ARG_SUFFIX='_g' ;;
17277 (profile) DFT_ARG_SUFFIX='_p' ;;
17278 (shared) DFT_ARG_SUFFIX='' ;;
17280 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17281 echo "$as_me:17281: result: $DFT_ARG_SUFFIX" >&5
17282 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17284 echo "$as_me:17284: checking default library-dependency suffix" >&5
17285 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17287 case X$DFT_LWR_MODEL in
17289 DFT_LIB_SUFFIX='.la'
17290 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17293 case $cf_cv_system_name in
17295 DFT_LIB_SUFFIX='_g.lib'
17298 DFT_LIB_SUFFIX='_g.a'
17301 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17304 case $cf_cv_system_name in
17306 DFT_LIB_SUFFIX='_p.lib'
17309 DFT_LIB_SUFFIX='_p.a'
17312 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17315 case $cf_cv_system_name in
17317 DFT_LIB_SUFFIX='.so'
17318 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17321 DFT_LIB_SUFFIX='.dll'
17322 DFT_DEP_SUFFIX='.dll.lib'
17324 (cygwin*|msys*|mingw*)
17325 DFT_LIB_SUFFIX='.dll'
17326 DFT_DEP_SUFFIX='.dll.a'
17329 DFT_LIB_SUFFIX='.dylib'
17330 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17335 DFT_LIB_SUFFIX='.so'
17336 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17339 DFT_LIB_SUFFIX='.sl'
17340 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17345 DFT_LIB_SUFFIX='.so'
17346 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17353 DFT_LIB_SUFFIX='.lib'
17356 DFT_LIB_SUFFIX='.a'
17359 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17362 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17364 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17365 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17367 echo "$as_me:17367: result: $DFT_DEP_SUFFIX" >&5
17368 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17370 echo "$as_me:17370: checking default object directory" >&5
17371 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17373 case $DFT_LWR_MODEL in
17374 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17375 (normal) DFT_OBJ_SUBDIR='objects' ;;
17376 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17377 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17379 case $cf_cv_system_name in
17381 DFT_OBJ_SUBDIR='objects' ;;
17383 DFT_OBJ_SUBDIR='obj_s' ;;
17386 echo "$as_me:17386: result: $DFT_OBJ_SUBDIR" >&5
17387 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17389 ### Set up low-level terminfo dependencies for makefiles.
17391 if test "$DFT_LWR_MODEL" = shared ; then
17392 case $cf_cv_system_name in
17394 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17397 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17402 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17404 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17406 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17408 ### Construct the list of subdirectories for which we'll customize makefiles
17409 ### with the appropriate compile-rules.
17411 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17413 cat >>confdefs.h <<EOF
17414 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17417 ################################################################################
17423 NCURSES_SHLIB2="sh -c"
17425 ADA_SUBDIRS="include gen src doc"
17426 if test "x$cf_with_tests" != "xno" ; then
17427 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17429 for cf_dir in $ADA_SUBDIRS
17431 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17438 # match layout used by make-tar.sh
17439 ADAHTML_DIR=../doc/ada
17441 if test "x$cross_compiling" = xyes ; then
17442 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17444 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17447 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"
17448 ac_config_commands="$ac_config_commands default"
17449 cat >confcache <<\_ACEOF
17450 # This file is a shell script that caches the results of configure
17451 # tests run on this system so they can be shared between configure
17452 # scripts and configure runs, see configure's option --config-cache.
17453 # It is not useful on other systems. If it contains results you don't
17454 # want to keep, you may remove or edit it.
17456 # config.status only pays attention to the cache file if you give it
17457 # the --recheck option to rerun configure.
17459 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17460 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17461 # following values.
17465 # The following way of writing the cache mishandles newlines in values,
17466 # but we know of no workaround that is simple, portable, and efficient.
17467 # So, don't put newlines in cache variables' values.
17468 # Ultrix sh set writes to stderr and can't be redirected directly,
17469 # and sets the high bit in the cache file unless we assign to the vars.
17472 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17474 # `set' does not quote correctly, so add quotes (double-quote
17475 # substitution turns \\\\ into \\, and sed turns \\ into \).
17478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17481 # `set' quotes correctly as required by POSIX, so do not add quotes.
17483 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17490 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17492 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17494 if cmp -s $cache_file confcache; then :; else
17495 if test -w $cache_file; then
17496 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17497 cat confcache >$cache_file
17499 echo "not updating unwritable cache $cache_file"
17504 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17505 # Let make expand exec_prefix.
17506 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17508 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17509 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17510 # trailing colons and then remove the whole line if VPATH becomes empty
17511 # (actually we leave an empty line to preserve line numbers).
17512 if test "x$srcdir" = x.; then
17513 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17514 s/:*\$(srcdir):*/:/;
17515 s/:*\${srcdir}:*/:/;
17517 s/^\([^=]*=[ ]*\):*/\1/;
17523 DEFS=-DHAVE_CONFIG_H
17525 : ${CONFIG_STATUS=./config.status}
17526 ac_clean_files_save=$ac_clean_files
17527 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17528 { echo "$as_me:17528: creating $CONFIG_STATUS" >&5
17529 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17530 cat >$CONFIG_STATUS <<_ACEOF
17532 # Generated automatically by configure.
17533 # Run this file to recreate the current configuration.
17534 # Compiler output produced by configure, useful for debugging
17535 # configure, is in config.log if it exists.
17538 SHELL=\${CONFIG_SHELL-$SHELL}
17539 ac_cs_invocation="\$0 \$@"
17541 CLICOLOR_FORCE= GREP_OPTIONS=
17542 unset CLICOLOR_FORCE GREP_OPTIONS
17545 cat >>$CONFIG_STATUS <<\_ACEOF
17546 # Be Bourne compatible
17547 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17550 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17554 # Name of the executable.
17555 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17557 if expr a : '\(a\)' >/dev/null 2>&1; then
17563 rm -f conf$$ conf$$.exe conf$$.file
17565 if ln -s conf$$.file conf$$ 2>/dev/null; then
17566 # We could just check for DJGPP; but this test a) works b) is more generic
17567 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17568 if test -f conf$$.exe; then
17569 # Don't use ln at all; we don't have any links
17574 elif ln conf$$.file conf$$ 2>/dev/null; then
17579 rm -f conf$$ conf$$.exe conf$$.file
17581 as_executable_p="test -f"
17583 # Support unset when possible.
17584 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17591 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17592 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17593 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17594 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17595 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17596 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17597 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17598 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17601 # We need space, tab and new line, in precisely that order.
17607 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17613 # Files that config.status was made for.
17614 if test -n "$ac_config_files"; then
17615 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17618 if test -n "$ac_config_headers"; then
17619 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17622 if test -n "$ac_config_links"; then
17623 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17626 if test -n "$ac_config_commands"; then
17627 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17630 cat >>$CONFIG_STATUS <<\EOF
17633 \`$as_me' instantiates files from templates according to the
17634 current configuration.
17636 Usage: $0 [OPTIONS] [FILE]...
17638 -h, --help print this help, then exit
17639 -V, --version print version number, then exit
17640 -d, --debug don't remove temporary files
17641 --recheck update $as_me by reconfiguring in the same conditions
17642 --file=FILE[:TEMPLATE]
17643 instantiate the configuration file FILE
17644 --header=FILE[:TEMPLATE]
17645 instantiate the configuration header FILE
17647 Configuration files:
17650 Configuration headers:
17653 Configuration commands:
17656 Report bugs to <dickey@invisible-island.net>."
17659 cat >>$CONFIG_STATUS <<EOF
17662 configured by $0, generated by GNU Autoconf 2.52.20200802,
17663 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17665 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17666 Free Software Foundation, Inc.
17667 This config.status script is free software; the Free Software Foundation
17668 gives unlimited permission to copy, distribute and modify it."
17673 cat >>$CONFIG_STATUS <<\EOF
17674 # If no file are specified by the user, then we need to provide default
17675 # value. By we need to know if files were specified by the user.
17681 ac_option=`expr "x$1" : 'x\([^=]*\)='`
17682 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17684 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17688 *) # This is not an option, so the user has probably given explicit
17690 ac_need_defaults=false;;
17694 # Handling of the options.
17696 cat >>$CONFIG_STATUS <<EOF
17697 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17698 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17699 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17701 cat >>$CONFIG_STATUS <<\EOF
17702 --version | --vers* | -V )
17703 echo "$ac_cs_version"; exit 0 ;;
17705 # Conflict between --help and --header
17706 { { echo "$as_me:17706: error: ambiguous option: $1
17707 Try \`$0 --help' for more information." >&5
17708 echo "$as_me: error: ambiguous option: $1
17709 Try \`$0 --help' for more information." >&2;}
17710 { (exit 1); exit 1; }; };;
17711 --help | --hel | -h )
17712 echo "$ac_cs_usage"; exit 0 ;;
17713 --debug | --d* | -d )
17715 --file | --fil | --fi | --f )
17717 CONFIG_FILES="$CONFIG_FILES $1"
17718 ac_need_defaults=false;;
17719 --header | --heade | --head | --hea )
17721 CONFIG_HEADERS="$CONFIG_HEADERS $1"
17722 ac_need_defaults=false;;
17724 # This is an error.
17725 -*) { { echo "$as_me:17725: error: unrecognized option: $1
17726 Try \`$0 --help' for more information." >&5
17727 echo "$as_me: error: unrecognized option: $1
17728 Try \`$0 --help' for more information." >&2;}
17729 { (exit 1); exit 1; }; } ;;
17731 *) ac_config_targets="$ac_config_targets $1" ;;
17740 ## ----------------------- ##
17741 ## Running config.status. ##
17742 ## ----------------------- ##
17744 This file was extended by $as_me 2.52.20200802, executed with
17745 CONFIG_FILES = $CONFIG_FILES
17746 CONFIG_HEADERS = $CONFIG_HEADERS
17747 CONFIG_LINKS = $CONFIG_LINKS
17748 CONFIG_COMMANDS = $CONFIG_COMMANDS
17749 > $ac_cs_invocation
17750 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17755 cat >>$CONFIG_STATUS <<EOF
17757 # INIT-COMMANDS section.
17760 ### Special initialization commands, used to pass information from the
17761 ### configuration-run into config.status
17764 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17765 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17766 LIB_NAME="$LIB_NAME"
17767 LIB_PREFIX="$LIB_PREFIX"
17768 LIB_SUFFIX="$LIB_SUFFIX"
17770 NCURSES_MAJOR="$NCURSES_MAJOR"
17771 NCURSES_MINOR="$NCURSES_MINOR"
17772 NCURSES_PATCH="$NCURSES_PATCH"
17773 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
17774 cf_cv_abi_version="$cf_cv_abi_version"
17775 cf_cv_rel_version="$cf_cv_rel_version"
17776 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17777 cf_cv_shared_soname='$cf_cv_shared_soname'
17778 cf_cv_shlib_version="$cf_cv_shlib_version"
17779 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17780 cf_cv_system_name="$cf_cv_system_name"
17786 cat >>$CONFIG_STATUS <<\EOF
17787 for ac_config_target in $ac_config_targets
17789 case "$ac_config_target" in
17790 # Handling of arguments.
17791 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17792 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
17793 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
17794 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17795 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17796 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17797 *) { { echo "$as_me:17797: error: invalid argument: $ac_config_target" >&5
17798 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17799 { (exit 1); exit 1; }; };;
17803 # If the user did not use the arguments to specify the items to instantiate,
17804 # then the envvar interface is used. Set only those that are not.
17805 # We use the long form for the default assignment because of an extremely
17806 # bizarre bug on SunOS 4.1.3.
17807 if $ac_need_defaults; then
17808 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17809 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17810 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17813 # Create a temporary directory, and hook for its removal unless debugging.
17816 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17817 trap '{ (exit 1); exit 1; }' 1 2 13 15
17820 # Create a (secure) tmp directory for tmp files.
17823 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17824 test -n "$tmp" && test -d "$tmp"
17827 tmp=$TMPDIR/cs$$-$RANDOM
17828 (umask 077 && mkdir $tmp)
17831 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17832 { (exit 1); exit 1; }
17837 cat >>$CONFIG_STATUS <<EOF
17840 # CONFIG_FILES section.
17843 # No need to generate the scripts if there are no CONFIG_FILES.
17844 # This happens for instance when ./config.status config.h
17845 if test -n "\$CONFIG_FILES"; then
17846 # Protect against being on the right side of a sed subst in config.status.
17847 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17848 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17849 s,@SHELL@,$SHELL,;t t
17850 s,@exec_prefix@,$exec_prefix,;t t
17851 s,@prefix@,$prefix,;t t
17852 s,@program_transform_name@,$program_transform_name,;t t
17853 s,@bindir@,$bindir,;t t
17854 s,@sbindir@,$sbindir,;t t
17855 s,@libexecdir@,$libexecdir,;t t
17856 s,@datarootdir@,$datarootdir,;t t
17857 s,@datadir@,$datadir,;t t
17858 s,@sysconfdir@,$sysconfdir,;t t
17859 s,@sharedstatedir@,$sharedstatedir,;t t
17860 s,@localstatedir@,$localstatedir,;t t
17861 s,@runstatedir@,$runstatedir,;t t
17862 s,@libdir@,$libdir,;t t
17863 s,@includedir@,$includedir,;t t
17864 s,@oldincludedir@,$oldincludedir,;t t
17865 s,@infodir@,$infodir,;t t
17866 s,@mandir@,$mandir,;t t
17867 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17868 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17869 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17870 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17871 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17872 s,@build_alias@,$build_alias,;t t
17873 s,@host_alias@,$host_alias,;t t
17874 s,@target_alias@,$target_alias,;t t
17875 s,@ECHO_C@,$ECHO_C,;t t
17876 s,@ECHO_N@,$ECHO_N,;t t
17877 s,@ECHO_T@,$ECHO_T,;t t
17878 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17879 s,@DEFS@,$DEFS,;t t
17880 s,@LIBS@,$LIBS,;t t
17881 s,@top_builddir@,$top_builddir,;t t
17882 s,@build@,$build,;t t
17883 s,@build_cpu@,$build_cpu,;t t
17884 s,@build_vendor@,$build_vendor,;t t
17885 s,@build_os@,$build_os,;t t
17886 s,@host@,$host,;t t
17887 s,@host_cpu@,$host_cpu,;t t
17888 s,@host_vendor@,$host_vendor,;t t
17889 s,@host_os@,$host_os,;t t
17890 s,@target@,$target,;t t
17891 s,@target_cpu@,$target_cpu,;t t
17892 s,@target_vendor@,$target_vendor,;t t
17893 s,@target_os@,$target_os,;t t
17895 s,@CFLAGS@,$CFLAGS,;t t
17896 s,@LDFLAGS@,$LDFLAGS,;t t
17897 s,@CPPFLAGS@,$CPPFLAGS,;t t
17898 s,@ac_ct_CC@,$ac_ct_CC,;t t
17899 s,@EXEEXT@,$EXEEXT,;t t
17900 s,@OBJEXT@,$OBJEXT,;t t
17901 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17904 s,@EGREP@,$EGREP,;t t
17905 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17906 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17907 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17908 s,@LN_S@,$LN_S,;t t
17909 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
17910 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
17911 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17912 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
17913 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17914 s,@SET_MAKE@,$SET_MAKE,;t t
17915 s,@CTAGS@,$CTAGS,;t t
17916 s,@ETAGS@,$ETAGS,;t t
17917 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17918 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17919 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17920 s,@RANLIB@,$RANLIB,;t t
17921 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17923 s,@ac_ct_LD@,$ac_ct_LD,;t t
17925 s,@ac_ct_AR@,$ac_ct_AR,;t t
17926 s,@ARFLAGS@,$ARFLAGS,;t t
17927 s,@DESTDIR@,$DESTDIR,;t t
17928 s,@BUILD_CC@,$BUILD_CC,;t t
17929 s,@BUILD_CPP@,$BUILD_CPP,;t t
17930 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17931 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17932 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17933 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17934 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17935 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17936 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17937 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17938 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
17939 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
17940 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17941 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17942 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17943 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17944 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17945 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17946 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17947 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17948 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17949 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17950 s,@CC_G_OPT@,$CC_G_OPT,;t t
17951 s,@LD_MODEL@,$LD_MODEL,;t t
17952 s,@shlibdir@,$shlibdir,;t t
17953 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
17954 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17955 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17956 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17957 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17958 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
17959 s,@LINK_PROGS@,$LINK_PROGS,;t t
17960 s,@LINK_TESTS@,$LINK_TESTS,;t t
17961 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17962 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17963 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17964 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17965 s,@RPATH_LIST@,$RPATH_LIST,;t t
17966 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17967 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17968 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17969 s,@PTHREAD@,$PTHREAD,;t t
17970 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17971 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17972 s,@ECHO_LT@,$ECHO_LT,;t t
17973 s,@ECHO_LD@,$ECHO_LD,;t t
17974 s,@RULE_CC@,$RULE_CC,;t t
17975 s,@SHOW_CC@,$SHOW_CC,;t t
17976 s,@ECHO_CC@,$ECHO_CC,;t t
17977 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17978 s,@ADAFLAGS@,$ADAFLAGS,;t t
17979 s,@ADA_TRACE@,$ADA_TRACE,;t t
17980 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
17981 s,@M4_exists@,$M4_exists,;t t
17982 s,@cf_ada_make@,$cf_ada_make,;t t
17983 s,@cf_ada_config@,$cf_ada_config,;t t
17984 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
17985 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
17986 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
17987 s,@cf_compile_generics@,$cf_compile_generics,;t t
17988 s,@cf_generic_objects@,$cf_generic_objects,;t t
17989 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
17990 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
17991 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
17992 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
17993 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17994 s,@cf_ada_package@,$cf_ada_package,;t t
17995 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17996 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17997 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
17998 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
17999 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18000 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18001 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18002 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18003 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18004 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18005 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18006 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18007 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18008 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18009 s,@TEST_ARG2@,$TEST_ARG2,;t t
18010 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18011 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18012 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18013 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18014 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18015 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18016 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18021 cat >>$CONFIG_STATUS <<\EOF
18022 # Split the substitutions into bite-sized pieces for seds with
18023 # small command number limits, like on Digital OSF/1 and HP-UX.
18024 ac_max_sed_lines=48
18025 ac_sed_frag=1 # Number of current file.
18026 ac_beg=1 # First line for current file.
18027 ac_end=$ac_max_sed_lines # Line after last line for current file.
18030 while $ac_more_lines; do
18031 if test $ac_beg -gt 1; then
18032 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18034 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18036 if test ! -s $tmp/subs.frag; then
18037 ac_more_lines=false
18039 # The purpose of the label and of the branching condition is to
18040 # speed up the sed processing (if there are no `@' at all, there
18041 # is no need to browse any of the substitutions).
18042 # These are the two extra sed commands mentioned above.
18044 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18045 # It is possible to make a multiline substitution using escaped newlines.
18046 # Ensure that we do not split the substitution between script fragments.
18048 ac_END=`expr $ac_end + $ac_max_sed_lines`
18049 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18050 if test -s $tmp/subs.next; then
18051 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18052 if test ! -s $tmp/subs.edit; then
18053 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18054 if test ! -s $tmp/subs.edit; then
18055 if test $ac_beg -gt 1; then
18056 ac_end=`expr $ac_end - 1`
18063 if test -z "$ac_sed_cmds"; then
18064 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18066 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18068 ac_sed_frag=`expr $ac_sed_frag + 1`
18070 ac_end=`expr $ac_end + $ac_max_sed_lines`
18073 if test -z "$ac_sed_cmds"; then
18076 fi # test -n "$CONFIG_FILES"
18079 cat >>$CONFIG_STATUS <<\EOF
18080 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18081 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18083 - | *:- | *:-:* ) # input from stdin
18085 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18086 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18087 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18088 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18089 * ) ac_file_in=$ac_file.in ;;
18092 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18093 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18094 X"$ac_file" : 'X\(//\)[^/]' \| \
18095 X"$ac_file" : 'X\(//\)$' \| \
18096 X"$ac_file" : 'X\(/\)' \| \
18097 . : '\(.\)' 2>/dev/null ||
18099 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18100 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18101 /^X\(\/\/\)$/{ s//\1/; q; }
18102 /^X\(\/\).*/{ s//\1/; q; }
18104 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18105 { case "$ac_dir" in
18106 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18110 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18111 case $as_mkdir_dir in
18112 # Skip DOS drivespec
18113 ?:) as_incr_dir=$as_mkdir_dir ;;
18115 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18116 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18121 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18122 # A "../" for each directory in $ac_dir_suffix.
18123 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18125 ac_dir_suffix= ac_dots=
18130 if test -z "$ac_dots"; then
18133 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18135 [\\/]* | ?:[\\/]* )
18136 ac_srcdir=$srcdir$ac_dir_suffix;
18137 ac_top_srcdir=$srcdir ;;
18138 *) # Relative path.
18139 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18140 ac_top_srcdir=$ac_dots$srcdir ;;
18144 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18145 *) ac_INSTALL=$ac_dots$INSTALL ;;
18148 if test x"$ac_file" != x-; then
18149 { echo "$as_me:18149: creating $ac_file" >&5
18150 echo "$as_me: creating $ac_file" >&6;}
18153 # Let's still pretend it is `configure' which instantiates (i.e., don't
18154 # use $as_me), people would be surprised to read:
18155 # /* config.h. Generated automatically by config.status. */
18156 configure_input="Generated automatically from `echo $ac_file_in |
18157 sed 's,.*/,,'` by configure."
18159 # First look for the input files in the build tree, otherwise in the
18161 ac_file_inputs=`IFS=:
18162 for f in $ac_file_in; do
18164 -) echo $tmp/stdin ;;
18166 # Absolute (can't be DOS-style, as IFS=:)
18167 test -f "$f" || { { echo "$as_me:18167: error: cannot find input file: $f" >&5
18168 echo "$as_me: error: cannot find input file: $f" >&2;}
18169 { (exit 1); exit 1; }; }
18172 if test -f "$f"; then
18175 elif test -f "$srcdir/$f"; then
18180 { { echo "$as_me:18180: error: cannot find input file: $f" >&5
18181 echo "$as_me: error: cannot find input file: $f" >&2;}
18182 { (exit 1); exit 1; }; }
18185 done` || { (exit 1); exit 1; }
18187 cat >>$CONFIG_STATUS <<\EOF
18188 ac_warn_datarootdir=no
18189 if test x"$ac_file" != x-; then
18190 for ac_item in $ac_file_inputs
18192 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
18193 if test -n "$ac_seen"; then
18194 ac_used=`grep '@datarootdir@' $ac_item`
18195 if test -z "$ac_used"; then
18196 { echo "$as_me:18196: WARNING: datarootdir was used implicitly but not set:
18198 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18200 ac_warn_datarootdir=yes
18203 ac_seen=`grep '${datarootdir}' $ac_item`
18204 if test -n "$ac_seen"; then
18205 { echo "$as_me:18205: WARNING: datarootdir was used explicitly but not set:
18207 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18209 ac_warn_datarootdir=yes
18214 if test "x$ac_warn_datarootdir" = xyes; then
18215 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18219 cat >>$CONFIG_STATUS <<EOF
18223 cat >>$CONFIG_STATUS <<\EOF
18225 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18226 s,@configure_input@,$configure_input,;t t
18227 s,@srcdir@,$ac_srcdir,;t t
18228 s,@top_srcdir@,$ac_top_srcdir,;t t
18229 s,@INSTALL@,$ac_INSTALL,;t t
18230 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18232 if test x"$ac_file" != x-; then
18233 cp $tmp/out $ac_file
18235 for ac_name in prefix exec_prefix datarootdir
18237 ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
18238 if test -n "$ac_seen"; then
18239 ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
18240 if test -z "$ac_init"; then
18241 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18242 { echo "$as_me:18242: WARNING: Variable $ac_name is used but was not set:
18244 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18249 egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
18250 egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
18251 if test -s $tmp/out; then
18252 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18253 { echo "$as_me:18253: WARNING: Some variables may not be substituted:
18255 echo "$as_me: WARNING: Some variables may not be substituted:
18265 cat >>$CONFIG_STATUS <<\EOF
18268 # CONFIG_HEADER section.
18271 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18272 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18274 # ac_d sets the value in "#define NAME VALUE" lines.
18275 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18276 ac_dB='[ ].*$,\1#\2'
18279 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18280 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18281 ac_iB='\([ ]\),\1#\2define\3'
18284 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18285 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18286 ac_uB='$,\1#\2define\3'
18290 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18291 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18293 - | *:- | *:-:* ) # input from stdin
18295 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18296 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18297 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18298 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18299 * ) ac_file_in=$ac_file.in ;;
18302 test x"$ac_file" != x- && { echo "$as_me:18302: creating $ac_file" >&5
18303 echo "$as_me: creating $ac_file" >&6;}
18305 # First look for the input files in the build tree, otherwise in the
18307 ac_file_inputs=`IFS=:
18308 for f in $ac_file_in; do
18310 -) echo $tmp/stdin ;;
18312 # Absolute (can't be DOS-style, as IFS=:)
18313 test -f "$f" || { { echo "$as_me:18313: error: cannot find input file: $f" >&5
18314 echo "$as_me: error: cannot find input file: $f" >&2;}
18315 { (exit 1); exit 1; }; }
18318 if test -f "$f"; then
18321 elif test -f "$srcdir/$f"; then
18326 { { echo "$as_me:18326: error: cannot find input file: $f" >&5
18327 echo "$as_me: error: cannot find input file: $f" >&2;}
18328 { (exit 1); exit 1; }; }
18331 done` || { (exit 1); exit 1; }
18332 # Remove the trailing spaces.
18333 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18337 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18338 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18339 # be either 'cat' or 'sort'.
18340 cat confdefs.h | uniq >conftest.vals
18342 # Break up conftest.vals because some shells have a limit on
18343 # the size of here documents, and old seds have small limits too.
18345 rm -f conftest.tail
18346 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
18347 while grep . conftest.vals >/dev/null
18349 # Write chunks of a limited-size here document to conftest.frag.
18350 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18351 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18352 echo 'CEOF' >> $CONFIG_STATUS
18353 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18354 rm -f conftest.vals
18355 mv conftest.tail conftest.vals
18357 rm -f conftest.vals
18359 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18361 echo ' cat >> conftest.edit <<CEOF
18362 /@DEFS@/r conftest.frag
18365 sed -f conftest.edit $tmp/in > $tmp/out
18367 mv $tmp/out $tmp/in
18368 rm -f conftest.edit conftest.frag
18369 ' >> $CONFIG_STATUS
18371 cat >>$CONFIG_STATUS <<\EOF
18372 # Let's still pretend it is `configure' which instantiates (i.e., don't
18373 # use $as_me), people would be surprised to read:
18374 # /* config.h. Generated automatically by config.status. */
18375 if test x"$ac_file" = x-; then
18376 echo "/* Generated automatically by configure. */" >$tmp/config.h
18378 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18380 cat $tmp/in >>$tmp/config.h
18382 if test x"$ac_file" != x-; then
18383 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18384 { echo "$as_me:18384: $ac_file is unchanged" >&5
18385 echo "$as_me: $ac_file is unchanged" >&6;}
18387 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18388 X"$ac_file" : 'X\(//\)[^/]' \| \
18389 X"$ac_file" : 'X\(//\)$' \| \
18390 X"$ac_file" : 'X\(/\)' \| \
18391 . : '\(.\)' 2>/dev/null ||
18393 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18394 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18395 /^X\(\/\/\)$/{ s//\1/; q; }
18396 /^X\(\/\).*/{ s//\1/; q; }
18398 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18399 { case "$ac_dir" in
18400 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18404 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18405 case $as_mkdir_dir in
18406 # Skip DOS drivespec
18407 ?:) as_incr_dir=$as_mkdir_dir ;;
18409 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18410 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18417 mv $tmp/config.h $ac_file
18421 rm -f $tmp/config.h
18425 cat >>$CONFIG_STATUS <<\EOF
18427 # CONFIG_COMMANDS section.
18429 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18430 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18431 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18435 if test -z "$USE_OLD_MAKERULES" ; then
18436 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18443 cat >>$CONFIG_STATUS <<\EOF
18445 { (exit 0); exit 0; }
18447 chmod +x $CONFIG_STATUS
18448 ac_clean_files=$ac_clean_files_save
18450 # configure is writing to config.log, and then calls config.status.
18451 # config.status does its own redirection, appending to config.log.
18452 # Unfortunately, on DOS this fails, as config.log is still kept open
18453 # by configure, so config.status won't be able to write to it; its
18454 # output is simply discarded. So we exec the FD to /dev/null,
18455 # effectively closing config.log, so it can be properly (re)opened and
18456 # appended to by config.status. When coming back to configure, we
18457 # need to make the FD available again.
18458 if test "$no_create" != yes; then
18461 $SHELL $CONFIG_STATUS || ac_cs_success=false
18463 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18464 # would make configure fail if this is the last instruction.
18465 $ac_cs_success || { (exit 1); exit 1; }
18467 ${MAKE:-make} preinstall