2 # From configure.in Revision: 1.88 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20221202.
6 # Copyright 2003-2021,2022 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2021,2022 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20221202. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1067 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1068 if test -f "$ac_dir/install-sh"; then
1070 ac_install_sh="$ac_aux_dir/install-sh -c"
1072 elif test -f "$ac_dir/install.sh"; then
1074 ac_install_sh="$ac_aux_dir/install.sh -c"
1076 elif test -f "$ac_dir/shtool"; then
1078 ac_install_sh="$ac_aux_dir/shtool install -c"
1082 if test -z "$ac_aux_dir"; then
1083 { { echo "$as_me:1083: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1084 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1085 { (exit 1); exit 1; }; }
1087 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1088 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1089 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1091 # Make sure we can run config.sub.
1092 $ac_config_sub sun4 >/dev/null 2>&1 ||
1093 { { echo "$as_me:1093: error: cannot run $ac_config_sub" >&5
1094 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1095 { (exit 1); exit 1; }; }
1097 echo "$as_me:1097: checking build system type" >&5
1098 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1099 if test "${ac_cv_build+set}" = set; then
1100 echo $ECHO_N "(cached) $ECHO_C" >&6
1102 ac_cv_build_alias=$build_alias
1103 test -z "$ac_cv_build_alias" &&
1104 ac_cv_build_alias=`$ac_config_guess`
1105 test -z "$ac_cv_build_alias" &&
1106 { { echo "$as_me:1106: error: cannot guess build type; you must specify one" >&5
1107 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1108 { (exit 1); exit 1; }; }
1109 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1110 { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1111 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1112 { (exit 1); exit 1; }; }
1115 echo "$as_me:1115: result: $ac_cv_build" >&5
1116 echo "${ECHO_T}$ac_cv_build" >&6
1118 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122 echo "$as_me:1122: checking host system type" >&5
1123 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1124 if test "${ac_cv_host+set}" = set; then
1125 echo $ECHO_N "(cached) $ECHO_C" >&6
1127 ac_cv_host_alias=$host_alias
1128 test -z "$ac_cv_host_alias" &&
1129 ac_cv_host_alias=$ac_cv_build_alias
1130 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1131 { { echo "$as_me:1131: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1132 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1133 { (exit 1); exit 1; }; }
1136 echo "$as_me:1136: result: $ac_cv_host" >&5
1137 echo "${ECHO_T}$ac_cv_host" >&6
1139 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1144 echo "$as_me:1144: checking target system type" >&5
1145 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1146 if test "${ac_cv_target+set}" = set; then
1147 echo $ECHO_N "(cached) $ECHO_C" >&6
1149 ac_cv_target_alias=$target_alias
1150 test "x$ac_cv_target_alias" = "x" &&
1151 ac_cv_target_alias=$ac_cv_host_alias
1152 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1153 { { echo "$as_me:1153: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1154 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1155 { (exit 1); exit 1; }; }
1158 echo "$as_me:1158: result: $ac_cv_target" >&5
1159 echo "${ECHO_T}$ac_cv_target" >&6
1160 target=$ac_cv_target
1161 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1162 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1163 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1165 # The aliases save the names the user supplied, while $host etc.
1166 # will get canonicalized.
1167 test -n "$target_alias" &&
1168 test "$program_prefix$program_suffix$program_transform_name" = \
1170 program_prefix=${target_alias}-
1171 system_name="$host_os"
1173 system_name="`(uname -s -r) 2>/dev/null`"
1174 if test -z "$system_name" ; then
1175 system_name="`(hostname) 2>/dev/null`"
1178 test -n "$system_name" &&
1179 cat >>confdefs.h <<EOF
1180 #define SYSTEM_NAME "$system_name"
1183 if test "${cf_cv_system_name+set}" = set; then
1184 echo $ECHO_N "(cached) $ECHO_C" >&6
1186 cf_cv_system_name="$system_name"
1189 test -z "$system_name" && system_name="$cf_cv_system_name"
1190 test -n "$cf_cv_system_name" && echo "$as_me:1190: result: Configuring for $cf_cv_system_name" >&5
1191 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1193 if test ".$system_name" != ".$cf_cv_system_name" ; then
1194 echo "$as_me:1194: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1195 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1196 { { echo "$as_me:1196: error: \"Please remove config.cache and try again.\"" >&5
1197 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1198 { (exit 1); exit 1; }; }
1201 # Check whether --with-system-type or --without-system-type was given.
1202 if test "${with_system_type+set}" = set; then
1203 withval="$with_system_type"
1204 { echo "$as_me:1204: WARNING: overriding system type to $withval" >&5
1205 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1206 cf_cv_system_name=$withval
1211 ### Save the given $CFLAGS to allow user-override.
1212 cf_user_CFLAGS="$CFLAGS"
1214 ### Default install-location
1215 for ac_prog in ggrep grep
1217 # Extract the first word of "$ac_prog", so it can be a program name with args.
1218 set dummy $ac_prog; ac_word=$2
1219 echo "$as_me:1219: checking for $ac_word" >&5
1220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1221 if test "${ac_cv_prog_GREP+set}" = set; then
1222 echo $ECHO_N "(cached) $ECHO_C" >&6
1224 if test -n "$GREP"; then
1225 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1227 ac_save_IFS=$IFS; IFS=$ac_path_separator
1229 for ac_dir in $ac_dummy; do
1231 test -z "$ac_dir" && ac_dir=.
1232 $as_executable_p "$ac_dir/$ac_word" || continue
1233 ac_cv_prog_GREP="$ac_prog"
1234 echo "$as_me:1234: found $ac_dir/$ac_word" >&5
1240 GREP=$ac_cv_prog_GREP
1241 if test -n "$GREP"; then
1242 echo "$as_me:1242: result: $GREP" >&5
1243 echo "${ECHO_T}$GREP" >&6
1245 echo "$as_me:1245: result: no" >&5
1246 echo "${ECHO_T}no" >&6
1249 test -n "$GREP" && break
1251 test -n "$GREP" || GREP=": "
1253 echo "$as_me:1253: checking for fgrep" >&5
1254 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1255 if test "${ac_cv_path_FGREP+set}" = set; then
1256 echo $ECHO_N "(cached) $ECHO_C" >&6
1258 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1259 then ac_cv_path_FGREP="$GREP -F"
1261 for ac_prog in gfgrep fgrep
1263 # Extract the first word of "$ac_prog", so it can be a program name with args.
1264 set dummy $ac_prog; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_path_FGREP+set}" = set; then
1268 echo $ECHO_N "(cached) $ECHO_C" >&6
1272 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1275 ac_save_IFS=$IFS; IFS=$ac_path_separator
1277 for ac_dir in $ac_dummy; do
1279 test -z "$ac_dir" && ac_dir=.
1280 if $as_executable_p "$ac_dir/$ac_word"; then
1281 ac_cv_path_FGREP="$ac_dir/$ac_word"
1282 echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1290 FGREP=$ac_cv_path_FGREP
1292 if test -n "$FGREP"; then
1293 echo "$as_me:1293: result: $FGREP" >&5
1294 echo "${ECHO_T}$FGREP" >&6
1296 echo "$as_me:1296: result: no" >&5
1297 echo "${ECHO_T}no" >&6
1300 test -n "$FGREP" && break
1302 test -n "$FGREP" || FGREP=": "
1304 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1304: error: cannot find workable fgrep" >&5
1305 echo "$as_me: error: cannot find workable fgrep" >&2;}
1306 { (exit 1); exit 1; }; }
1309 echo "$as_me:1309: result: $ac_cv_path_FGREP" >&5
1310 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1311 FGREP="$ac_cv_path_FGREP"
1313 echo "$as_me:1313: checking for prefix" >&5
1314 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1315 if test "x$prefix" = "xNONE" ; then
1316 case "$cf_cv_system_name" in
1317 # non-vendor systems don't have a conflict
1318 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1321 (*) prefix=$ac_default_prefix
1325 echo "$as_me:1325: result: $prefix" >&5
1326 echo "${ECHO_T}$prefix" >&6
1328 if test "x$prefix" = "xNONE" ; then
1329 echo "$as_me:1329: checking for default include-directory" >&5
1330 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1331 test -n "$verbose" && echo 1>&6
1334 "$includedir/ncurses" \
1336 "$prefix/include/ncurses" \
1337 /usr/local/include \
1338 /usr/local/include/ncurses \
1340 /usr/include/ncurses
1342 cf_dir=`eval echo "$cf_symbol"`
1343 if test -f "$cf_dir/curses.h" ; then
1344 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1345 includedir="$cf_symbol"
1346 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1350 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1352 echo "$as_me:1352: result: $includedir" >&5
1353 echo "${ECHO_T}$includedir" >&6
1356 ### Checks for programs.
1359 ac_cpp='$CPP $CPPFLAGS'
1360 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1361 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363 ac_main_return="return"
1364 if test -n "$ac_tool_prefix"; then
1365 for ac_prog in gnatgcc gcc cc
1367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1368 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1369 echo "$as_me:1369: checking for $ac_word" >&5
1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371 if test "${ac_cv_prog_CC+set}" = set; then
1372 echo $ECHO_N "(cached) $ECHO_C" >&6
1374 if test -n "$CC"; then
1375 ac_cv_prog_CC="$CC" # Let the user override the test.
1377 ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 for ac_dir in $ac_dummy; do
1381 test -z "$ac_dir" && ac_dir=.
1382 $as_executable_p "$ac_dir/$ac_word" || continue
1383 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1384 echo "$as_me:1384: found $ac_dir/$ac_word" >&5
1391 if test -n "$CC"; then
1392 echo "$as_me:1392: result: $CC" >&5
1393 echo "${ECHO_T}$CC" >&6
1395 echo "$as_me:1395: result: no" >&5
1396 echo "${ECHO_T}no" >&6
1399 test -n "$CC" && break
1402 if test -z "$CC"; then
1404 for ac_prog in gnatgcc gcc cc
1406 # Extract the first word of "$ac_prog", so it can be a program name with args.
1407 set dummy $ac_prog; ac_word=$2
1408 echo "$as_me:1408: checking for $ac_word" >&5
1409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1411 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 if test -n "$ac_ct_CC"; then
1414 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1416 ac_save_IFS=$IFS; IFS=$ac_path_separator
1418 for ac_dir in $ac_dummy; do
1420 test -z "$ac_dir" && ac_dir=.
1421 $as_executable_p "$ac_dir/$ac_word" || continue
1422 ac_cv_prog_ac_ct_CC="$ac_prog"
1423 echo "$as_me:1423: found $ac_dir/$ac_word" >&5
1429 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1430 if test -n "$ac_ct_CC"; then
1431 echo "$as_me:1431: result: $ac_ct_CC" >&5
1432 echo "${ECHO_T}$ac_ct_CC" >&6
1434 echo "$as_me:1434: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1438 test -n "$ac_ct_CC" && break
1444 test -z "$CC" && { { echo "$as_me:1444: error: no acceptable cc found in \$PATH" >&5
1445 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1446 { (exit 1); exit 1; }; }
1448 # Provide some information about the compiler.
1449 echo "$as_me:1449:" \
1450 "checking for C compiler version" >&5
1451 ac_compiler=`set X $ac_compile; echo "$2"`
1452 { (eval echo "$as_me:1452: \"$ac_compiler --version </dev/null >&5\"") >&5
1453 (eval $ac_compiler --version </dev/null >&5) 2>&5
1455 echo "$as_me:1455: \$? = $ac_status" >&5
1456 (exit "$ac_status"); }
1457 { (eval echo "$as_me:1457: \"$ac_compiler -v </dev/null >&5\"") >&5
1458 (eval $ac_compiler -v </dev/null >&5) 2>&5
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit "$ac_status"); }
1462 { (eval echo "$as_me:1462: \"$ac_compiler -V </dev/null >&5\"") >&5
1463 (eval $ac_compiler -V </dev/null >&5) 2>&5
1465 echo "$as_me:1465: \$? = $ac_status" >&5
1466 (exit "$ac_status"); }
1468 cat >"conftest.$ac_ext" <<_ACEOF
1469 #line 1469 "configure"
1470 #include "confdefs.h"
1480 ac_clean_files_save=$ac_clean_files
1481 ac_clean_files="$ac_clean_files a.out a.exe"
1482 # Try to create an executable without -o first, disregard a.out.
1483 # It will help us diagnose broken compilers, and finding out an intuition
1485 echo "$as_me:1485: checking for C compiler default output" >&5
1486 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1487 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1488 if { (eval echo "$as_me:1488: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1491 echo "$as_me:1491: \$? = $ac_status" >&5
1492 (exit "$ac_status"); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1496 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1497 ls a.out conftest 2>/dev/null;
1498 ls a.* conftest.* 2>/dev/null`; do
1500 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1501 a.out ) # We found the default executable, but exeext='' is most
1504 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1505 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512 echo "$as_me: failed program was:" >&5
1513 cat "conftest.$ac_ext" >&5
1514 { { echo "$as_me:1514: error: C compiler cannot create executables" >&5
1515 echo "$as_me: error: C compiler cannot create executables" >&2;}
1516 { (exit 77); exit 77; }; }
1519 ac_exeext=$ac_cv_exeext
1520 echo "$as_me:1520: result: $ac_file" >&5
1521 echo "${ECHO_T}$ac_file" >&6
1523 # Check the compiler produces executables we can run. If not, either
1524 # the compiler is broken, or we cross compile.
1525 echo "$as_me:1525: checking whether the C compiler works" >&5
1526 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1527 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1528 # If not cross compiling, check that we can run a simple program.
1529 if test "$cross_compiling" != yes; then
1530 if { ac_try='./$ac_file'
1531 { (eval echo "$as_me:1531: \"$ac_try\"") >&5
1534 echo "$as_me:1534: \$? = $ac_status" >&5
1535 (exit "$ac_status"); }; }; then
1538 if test "$cross_compiling" = maybe; then
1541 { { echo "$as_me:1541: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&5
1543 echo "$as_me: error: cannot run C compiled programs.
1544 If you meant to cross compile, use \`--host'." >&2;}
1545 { (exit 1); exit 1; }; }
1549 echo "$as_me:1549: result: yes" >&5
1550 echo "${ECHO_T}yes" >&6
1552 rm -f a.out a.exe "conftest$ac_cv_exeext"
1553 ac_clean_files=$ac_clean_files_save
1554 # Check the compiler produces executables we can run. If not, either
1555 # the compiler is broken, or we cross compile.
1556 echo "$as_me:1556: checking whether we are cross compiling" >&5
1557 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1558 echo "$as_me:1558: result: $cross_compiling" >&5
1559 echo "${ECHO_T}$cross_compiling" >&6
1561 echo "$as_me:1561: checking for executable suffix" >&5
1562 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1563 if { (eval echo "$as_me:1563: \"$ac_link\"") >&5
1564 (eval $ac_link) 2>&5
1566 echo "$as_me:1566: \$? = $ac_status" >&5
1567 (exit "$ac_status"); }; then
1568 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1569 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1570 # work properly (i.e., refer to `conftest.exe'), while it won't with
1572 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1575 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582 { { echo "$as_me:1582: error: cannot compute EXEEXT: cannot compile and link" >&5
1583 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1584 { (exit 1); exit 1; }; }
1587 rm -f "conftest$ac_cv_exeext"
1588 echo "$as_me:1588: result: $ac_cv_exeext" >&5
1589 echo "${ECHO_T}$ac_cv_exeext" >&6
1591 rm -f "conftest.$ac_ext"
1592 EXEEXT=$ac_cv_exeext
1594 echo "$as_me:1594: checking for object suffix" >&5
1595 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1596 if test "${ac_cv_objext+set}" = set; then
1597 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 cat >"conftest.$ac_ext" <<_ACEOF
1600 #line 1600 "configure"
1601 #include "confdefs.h"
1611 rm -f conftest.o conftest.obj
1612 if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5
1613 (eval $ac_compile) 2>&5
1615 echo "$as_me:1615: \$? = $ac_status" >&5
1616 (exit "$ac_status"); }; then
1617 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1619 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1620 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1625 echo "$as_me: failed program was:" >&5
1626 cat "conftest.$ac_ext" >&5
1627 { { echo "$as_me:1627: error: cannot compute OBJEXT: cannot compile" >&5
1628 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1629 { (exit 1); exit 1; }; }
1632 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1634 echo "$as_me:1634: result: $ac_cv_objext" >&5
1635 echo "${ECHO_T}$ac_cv_objext" >&6
1636 OBJEXT=$ac_cv_objext
1638 echo "$as_me:1638: checking whether we are using the GNU C compiler" >&5
1639 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1640 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1641 echo $ECHO_N "(cached) $ECHO_C" >&6
1643 cat >"conftest.$ac_ext" <<_ACEOF
1644 #line 1644 "configure"
1645 #include "confdefs.h"
1658 rm -f "conftest.$ac_objext"
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit "$ac_status"); } &&
1664 { ac_try='test -s "conftest.$ac_objext"'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit "$ac_status"); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat "conftest.$ac_ext" >&5
1676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1677 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1680 echo "$as_me:1680: result: $ac_cv_c_compiler_gnu" >&5
1681 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1682 GCC=`test $ac_compiler_gnu = yes && echo yes`
1683 ac_test_CFLAGS=${CFLAGS+set}
1684 ac_save_CFLAGS=$CFLAGS
1686 echo "$as_me:1686: checking whether $CC accepts -g" >&5
1687 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1688 if test "${ac_cv_prog_cc_g+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >"conftest.$ac_ext" <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1703 rm -f "conftest.$ac_objext"
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705 (eval $ac_compile) 2>&5
1707 echo "$as_me:1707: \$? = $ac_status" >&5
1708 (exit "$ac_status"); } &&
1709 { ac_try='test -s "conftest.$ac_objext"'
1710 { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit "$ac_status"); }; }; then
1717 echo "$as_me: failed program was:" >&5
1718 cat "conftest.$ac_ext" >&5
1721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1723 echo "$as_me:1723: result: $ac_cv_prog_cc_g" >&5
1724 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1725 if test "$ac_test_CFLAGS" = set; then
1726 CFLAGS=$ac_save_CFLAGS
1727 elif test $ac_cv_prog_cc_g = yes; then
1728 if test "$GCC" = yes; then
1734 if test "$GCC" = yes; then
1740 # Some people use a C++ compiler to compile C. Since we use `exit',
1741 # in C++ we need to declare it. In case someone uses the same compiler
1742 # for both compiling C and C++ we need to have the C++ compiler decide
1743 # the declaration of exit, since it's the most demanding environment.
1744 cat >"conftest.$ac_ext" <<_ACEOF
1749 rm -f "conftest.$ac_objext"
1750 if { (eval echo "$as_me:1750: \"$ac_compile\"") >&5
1751 (eval $ac_compile) 2>&5
1753 echo "$as_me:1753: \$? = $ac_status" >&5
1754 (exit "$ac_status"); } &&
1755 { ac_try='test -s "conftest.$ac_objext"'
1756 { (eval echo "$as_me:1756: \"$ac_try\"") >&5
1759 echo "$as_me:1759: \$? = $ac_status" >&5
1760 (exit "$ac_status"); }; }; then
1761 for ac_declaration in \
1763 '#include <stdlib.h>' \
1764 'extern "C" void std::exit (int) throw (); using std::exit;' \
1765 'extern "C" void std::exit (int); using std::exit;' \
1766 'extern "C" void exit (int) throw ();' \
1767 'extern "C" void exit (int);' \
1770 cat >"conftest.$ac_ext" <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1783 rm -f "conftest.$ac_objext"
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit "$ac_status"); } &&
1789 { ac_try='test -s "conftest.$ac_objext"'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit "$ac_status"); }; }; then
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1802 cat >"conftest.$ac_ext" <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1814 rm -f "conftest.$ac_objext"
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816 (eval $ac_compile) 2>&5
1818 echo "$as_me:1818: \$? = $ac_status" >&5
1819 (exit "$ac_status"); } &&
1820 { ac_try='test -s "conftest.$ac_objext"'
1821 { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1824 echo "$as_me:1824: \$? = $ac_status" >&5
1825 (exit "$ac_status"); }; }; then
1828 echo "$as_me: failed program was:" >&5
1829 cat "conftest.$ac_ext" >&5
1831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1834 if test -n "$ac_declaration"; then
1835 echo '#ifdef __cplusplus' >>confdefs.h
1836 echo "$ac_declaration" >>confdefs.h
1837 echo '#endif' >>confdefs.h
1841 echo "$as_me: failed program was:" >&5
1842 cat "conftest.$ac_ext" >&5
1844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 ac_cpp='$CPP $CPPFLAGS'
1847 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1848 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1850 ac_main_return="return"
1853 if test "$GCC" = yes ; then
1854 echo "$as_me:1854: checking version of $CC" >&5
1855 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1856 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.].*//'`"
1857 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1858 echo "$as_me:1858: result: $GCC_VERSION" >&5
1859 echo "${ECHO_T}$GCC_VERSION" >&6
1864 if test "$GCC" = yes ; then
1867 echo "$as_me:1867: checking if this is really Intel C compiler" >&5
1868 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1869 cf_save_CFLAGS="$CFLAGS"
1870 CFLAGS="$CFLAGS -no-gcc"
1871 cat >"conftest.$ac_ext" <<_ACEOF
1872 #line 1872 "configure"
1873 #include "confdefs.h"
1879 #ifdef __INTEL_COMPILER
1888 rm -f "conftest.$ac_objext"
1889 if { (eval echo "$as_me:1889: \"$ac_compile\"") >&5
1890 (eval $ac_compile) 2>&5
1892 echo "$as_me:1892: \$? = $ac_status" >&5
1893 (exit "$ac_status"); } &&
1894 { ac_try='test -s "conftest.$ac_objext"'
1895 { (eval echo "$as_me:1895: \"$ac_try\"") >&5
1898 echo "$as_me:1898: \$? = $ac_status" >&5
1899 (exit "$ac_status"); }; }; then
1901 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1904 echo "$as_me: failed program was:" >&5
1905 cat "conftest.$ac_ext" >&5
1907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1908 CFLAGS="$cf_save_CFLAGS"
1909 echo "$as_me:1909: result: $INTEL_COMPILER" >&5
1910 echo "${ECHO_T}$INTEL_COMPILER" >&6
1917 if test "$GCC" = yes ; then
1918 echo "$as_me:1918: checking if this is really Clang C compiler" >&5
1919 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1920 cf_save_CFLAGS="$CFLAGS"
1921 cat >"conftest.$ac_ext" <<_ACEOF
1922 #line 1922 "configure"
1923 #include "confdefs.h"
1938 rm -f "conftest.$ac_objext"
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940 (eval $ac_compile) 2>&5
1942 echo "$as_me:1942: \$? = $ac_status" >&5
1943 (exit "$ac_status"); } &&
1944 { ac_try='test -s "conftest.$ac_objext"'
1945 { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1948 echo "$as_me:1948: \$? = $ac_status" >&5
1949 (exit "$ac_status"); }; }; then
1953 echo "$as_me: failed program was:" >&5
1954 cat "conftest.$ac_ext" >&5
1956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1957 CFLAGS="$cf_save_CFLAGS"
1958 echo "$as_me:1958: result: $CLANG_COMPILER" >&5
1959 echo "${ECHO_T}$CLANG_COMPILER" >&6
1964 if test "x$CLANG_COMPILER" = "xyes" ; then
1966 (c[1-9][0-9]|*/c[1-9][0-9])
1967 { echo "$as_me:1967: WARNING: replacing broken compiler alias $CC" >&5
1968 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1969 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1974 echo "$as_me:1974: checking version of $CC" >&5
1975 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1976 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1977 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1978 echo "$as_me:1978: result: $CLANG_VERSION" >&5
1979 echo "${ECHO_T}$CLANG_VERSION" >&6
1981 for cf_clang_opt in \
1982 -Qunused-arguments \
1983 -Wno-error=implicit-function-declaration
1985 echo "$as_me:1985: checking if option $cf_clang_opt works" >&5
1986 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1987 cf_save_CFLAGS="$CFLAGS"
1988 CFLAGS="$CFLAGS $cf_clang_opt"
1989 cat >"conftest.$ac_ext" <<_ACEOF
1990 #line 1990 "configure"
1991 #include "confdefs.h"
1998 printf("hello!\\n");
2003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2004 if { (eval echo "$as_me:2004: \"$ac_link\"") >&5
2005 (eval $ac_link) 2>&5
2007 echo "$as_me:2007: \$? = $ac_status" >&5
2008 (exit "$ac_status"); } &&
2009 { ac_try='test -s "conftest$ac_exeext"'
2010 { (eval echo "$as_me:2010: \"$ac_try\"") >&5
2013 echo "$as_me:2013: \$? = $ac_status" >&5
2014 (exit "$ac_status"); }; }; then
2018 echo "$as_me: failed program was:" >&5
2019 cat "conftest.$ac_ext" >&5
2023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2024 echo "$as_me:2024: result: $cf_clang_optok" >&5
2025 echo "${ECHO_T}$cf_clang_optok" >&6
2026 CFLAGS="$cf_save_CFLAGS"
2027 if test "$cf_clang_optok" = yes; then
2028 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2030 echo "${as_me:-configure}:2030: testing adding option $cf_clang_opt ..." 1>&5
2032 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2033 CFLAGS="${CFLAGS}$cf_clang_opt"
2039 echo "$as_me:2039: checking for $CC option to accept ANSI C" >&5
2040 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2041 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2042 echo $ECHO_N "(cached) $ECHO_C" >&6
2044 ac_cv_prog_cc_stdc=no
2046 cat >"conftest.$ac_ext" <<_ACEOF
2047 #line 2047 "configure"
2048 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #include <sys/stat.h>
2053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2054 struct buf { int x; };
2055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2056 static char *e (p, i)
2062 static char *f (char * (*g) (char **, int), char **p, ...)
2067 s = g (p, va_arg (v,int));
2071 int test (int i, double x);
2072 struct s1 {int (*f) (int a);};
2073 struct s2 {int (*f) (double a);};
2074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2080 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2085 # Don't try gcc -ansi; that turns off useful extensions and
2086 # breaks some systems' header files.
2087 # AIX -qlanglvl=ansi
2088 # Ultrix and OSF/1 -std1
2089 # HP-UX 10.20 and later -Ae
2090 # HP-UX older versions -Aa -D_HPUX_SOURCE
2091 # SVR4 -Xc -D__EXTENSIONS__
2092 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2094 CC="$ac_save_CC $ac_arg"
2095 rm -f "conftest.$ac_objext"
2096 if { (eval echo "$as_me:2096: \"$ac_compile\"") >&5
2097 (eval $ac_compile) 2>&5
2099 echo "$as_me:2099: \$? = $ac_status" >&5
2100 (exit "$ac_status"); } &&
2101 { ac_try='test -s "conftest.$ac_objext"'
2102 { (eval echo "$as_me:2102: \"$ac_try\"") >&5
2105 echo "$as_me:2105: \$? = $ac_status" >&5
2106 (exit "$ac_status"); }; }; then
2107 ac_cv_prog_cc_stdc=$ac_arg
2110 echo "$as_me: failed program was:" >&5
2111 cat "conftest.$ac_ext" >&5
2113 rm -f "conftest.$ac_objext"
2115 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2120 case "x$ac_cv_prog_cc_stdc" in
2122 echo "$as_me:2122: result: none needed" >&5
2123 echo "${ECHO_T}none needed" >&6 ;;
2125 echo "$as_me:2125: result: $ac_cv_prog_cc_stdc" >&5
2126 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2127 CC="$CC $ac_cv_prog_cc_stdc" ;;
2130 # This should have been defined by AC_PROG_CC
2133 echo "$as_me:2133: checking \$CFLAGS variable" >&5
2134 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2137 echo "$as_me:2137: result: broken" >&5
2138 echo "${ECHO_T}broken" >&6
2139 { echo "$as_me:2139: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2140 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2143 for cf_arg in $cf_flags
2149 cf_new_extra_cppflags=
2151 for cf_add_cflags in $cf_arg
2153 case "$cf_fix_cppflags" in
2155 case "$cf_add_cflags" in
2156 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2157 case "$cf_add_cflags" in
2159 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2161 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2162 && test -z "${cf_tst_cflags}" \
2163 && cf_fix_cppflags=yes
2165 if test "$cf_fix_cppflags" = yes ; then
2167 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2168 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2171 elif test "${cf_tst_cflags}" = "\"'" ; then
2173 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2174 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2184 case "$cf_add_cflags" in
2186 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2188 CPPFLAGS=`echo "$CPPFLAGS" | \
2189 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2190 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2195 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2196 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2203 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2204 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2214 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2216 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2217 && test -z "${cf_tst_cflags}" \
2218 && cf_fix_cppflags=no
2223 if test -n "$cf_new_cflags" ; then
2225 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2226 CFLAGS="${CFLAGS}$cf_new_cflags"
2230 if test -n "$cf_new_cppflags" ; then
2232 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2233 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2237 if test -n "$cf_new_extra_cppflags" ; then
2239 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2240 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2247 echo "$as_me:2247: result: ok" >&5
2248 echo "${ECHO_T}ok" >&6
2252 echo "$as_me:2252: checking \$CC variable" >&5
2253 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2256 echo "$as_me:2256: result: broken" >&5
2257 echo "${ECHO_T}broken" >&6
2258 { echo "$as_me:2258: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2259 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2261 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2262 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2264 for cf_arg in $cf_flags
2272 cf_new_extra_cppflags=
2274 for cf_add_cflags in $cf_arg
2276 case "$cf_fix_cppflags" in
2278 case "$cf_add_cflags" in
2279 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2280 case "$cf_add_cflags" in
2282 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2285 && test -z "${cf_tst_cflags}" \
2286 && cf_fix_cppflags=yes
2288 if test "$cf_fix_cppflags" = yes ; then
2290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2294 elif test "${cf_tst_cflags}" = "\"'" ; then
2296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2307 case "$cf_add_cflags" in
2309 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2311 CPPFLAGS=`echo "$CPPFLAGS" | \
2312 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2313 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2318 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2319 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2326 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2327 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2337 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2340 && test -z "${cf_tst_cflags}" \
2341 && cf_fix_cppflags=no
2346 if test -n "$cf_new_cflags" ; then
2348 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2349 CFLAGS="${CFLAGS}$cf_new_cflags"
2353 if test -n "$cf_new_cppflags" ; then
2355 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2356 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2360 if test -n "$cf_new_extra_cppflags" ; then
2362 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2363 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2373 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2375 echo "${as_me:-configure}:2375: testing resulting CC: '$CC' ..." 1>&5
2377 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2379 echo "${as_me:-configure}:2379: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2381 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2383 echo "${as_me:-configure}:2383: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2387 echo "$as_me:2387: result: ok" >&5
2388 echo "${ECHO_T}ok" >&6
2392 echo "$as_me:2392: checking for egrep" >&5
2393 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2394 if test "${ac_cv_path_EGREP+set}" = set; then
2395 echo $ECHO_N "(cached) $ECHO_C" >&6
2397 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2398 then ac_cv_path_EGREP="$GREP -E"
2400 for ac_prog in gegrep egrep
2402 # Extract the first word of "$ac_prog", so it can be a program name with args.
2403 set dummy $ac_prog; ac_word=$2
2404 echo "$as_me:2404: checking for $ac_word" >&5
2405 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2406 if test "${ac_cv_path_EGREP+set}" = set; then
2407 echo $ECHO_N "(cached) $ECHO_C" >&6
2411 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2414 ac_save_IFS=$IFS; IFS=$ac_path_separator
2416 for ac_dir in $ac_dummy; do
2418 test -z "$ac_dir" && ac_dir=.
2419 if $as_executable_p "$ac_dir/$ac_word"; then
2420 ac_cv_path_EGREP="$ac_dir/$ac_word"
2421 echo "$as_me:2421: found $ac_dir/$ac_word" >&5
2429 EGREP=$ac_cv_path_EGREP
2431 if test -n "$EGREP"; then
2432 echo "$as_me:2432: result: $EGREP" >&5
2433 echo "${ECHO_T}$EGREP" >&6
2435 echo "$as_me:2435: result: no" >&5
2436 echo "${ECHO_T}no" >&6
2439 test -n "$EGREP" && break
2441 test -n "$EGREP" || EGREP=": "
2443 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2443: error: cannot find workable egrep" >&5
2444 echo "$as_me: error: cannot find workable egrep" >&2;}
2445 { (exit 1); exit 1; }; }
2448 echo "$as_me:2448: result: $ac_cv_path_EGREP" >&5
2449 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2450 EGREP="$ac_cv_path_EGREP"
2453 ac_cpp='$CPP $CPPFLAGS'
2454 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2455 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2457 ac_main_return="return"
2458 echo "$as_me:2458: checking how to run the C preprocessor" >&5
2459 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2460 # On Suns, sometimes $CPP names a directory.
2461 if test -n "$CPP" && test -d "$CPP"; then
2464 if test -z "$CPP"; then
2465 if test "${ac_cv_prog_CPP+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
2468 # Double quotes because CPP needs to be expanded
2469 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2472 for ac_c_preproc_warn_flag in '' yes
2474 # Use a header file that comes with gcc, so configuring glibc
2475 # with a fresh cross-compiler works.
2476 # On the NeXT, cc -E runs the code through the compiler's parser,
2477 # not just through cpp. "Syntax error" is here to catch this case.
2478 cat >"conftest.$ac_ext" <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2484 if { (eval echo "$as_me:2484: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2485 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2487 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2489 cat conftest.err >&5
2490 echo "$as_me:2490: \$? = $ac_status" >&5
2491 (exit "$ac_status"); } >/dev/null; then
2492 if test -s conftest.err; then
2493 ac_cpp_err=$ac_c_preproc_warn_flag
2500 if test -z "$ac_cpp_err"; then
2503 echo "$as_me: failed program was:" >&5
2504 cat "conftest.$ac_ext" >&5
2505 # Broken: fails on valid input.
2508 rm -f conftest.err "conftest.$ac_ext"
2510 # OK, works on sane cases. Now check whether non-existent headers
2511 # can be detected and how.
2512 cat >"conftest.$ac_ext" <<_ACEOF
2513 #line 2513 "configure"
2514 #include "confdefs.h"
2515 #include <ac_nonexistent.h>
2517 if { (eval echo "$as_me:2517: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2518 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2520 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2522 cat conftest.err >&5
2523 echo "$as_me:2523: \$? = $ac_status" >&5
2524 (exit "$ac_status"); } >/dev/null; then
2525 if test -s conftest.err; then
2526 ac_cpp_err=$ac_c_preproc_warn_flag
2533 if test -z "$ac_cpp_err"; then
2534 # Broken: success on invalid input.
2537 echo "$as_me: failed program was:" >&5
2538 cat "conftest.$ac_ext" >&5
2539 # Passes both tests.
2543 rm -f conftest.err "conftest.$ac_ext"
2546 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2547 rm -f conftest.err "conftest.$ac_ext"
2548 if $ac_preproc_ok; then
2560 echo "$as_me:2560: result: $CPP" >&5
2561 echo "${ECHO_T}$CPP" >&6
2563 for ac_c_preproc_warn_flag in '' yes
2565 # Use a header file that comes with gcc, so configuring glibc
2566 # with a fresh cross-compiler works.
2567 # On the NeXT, cc -E runs the code through the compiler's parser,
2568 # not just through cpp. "Syntax error" is here to catch this case.
2569 cat >"conftest.$ac_ext" <<_ACEOF
2570 #line 2570 "configure"
2571 #include "confdefs.h"
2575 if { (eval echo "$as_me:2575: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2576 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2578 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2580 cat conftest.err >&5
2581 echo "$as_me:2581: \$? = $ac_status" >&5
2582 (exit "$ac_status"); } >/dev/null; then
2583 if test -s conftest.err; then
2584 ac_cpp_err=$ac_c_preproc_warn_flag
2591 if test -z "$ac_cpp_err"; then
2594 echo "$as_me: failed program was:" >&5
2595 cat "conftest.$ac_ext" >&5
2596 # Broken: fails on valid input.
2599 rm -f conftest.err "conftest.$ac_ext"
2601 # OK, works on sane cases. Now check whether non-existent headers
2602 # can be detected and how.
2603 cat >"conftest.$ac_ext" <<_ACEOF
2604 #line 2604 "configure"
2605 #include "confdefs.h"
2606 #include <ac_nonexistent.h>
2608 if { (eval echo "$as_me:2608: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2609 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2611 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2613 cat conftest.err >&5
2614 echo "$as_me:2614: \$? = $ac_status" >&5
2615 (exit "$ac_status"); } >/dev/null; then
2616 if test -s conftest.err; then
2617 ac_cpp_err=$ac_c_preproc_warn_flag
2624 if test -z "$ac_cpp_err"; then
2625 # Broken: success on invalid input.
2628 echo "$as_me: failed program was:" >&5
2629 cat "conftest.$ac_ext" >&5
2630 # Passes both tests.
2634 rm -f conftest.err "conftest.$ac_ext"
2637 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2638 rm -f conftest.err "conftest.$ac_ext"
2639 if $ac_preproc_ok; then
2642 { { echo "$as_me:2642: error: C preprocessor \"$CPP\" fails sanity check" >&5
2643 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2644 { (exit 1); exit 1; }; }
2648 ac_cpp='$CPP $CPPFLAGS'
2649 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2650 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2651 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2652 ac_main_return="return"
2654 if test $ac_cv_c_compiler_gnu = yes; then
2655 echo "$as_me:2655: checking whether $CC needs -traditional" >&5
2656 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2657 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2658 echo $ECHO_N "(cached) $ECHO_C" >&6
2660 ac_pattern="Autoconf.*'x'"
2661 cat >"conftest.$ac_ext" <<_ACEOF
2662 #line 2662 "configure"
2663 #include "confdefs.h"
2665 int Autoconf = TIOCGETP;
2667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2668 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2669 ac_cv_prog_gcc_traditional=yes
2671 ac_cv_prog_gcc_traditional=no
2675 if test $ac_cv_prog_gcc_traditional = no; then
2676 cat >"conftest.$ac_ext" <<_ACEOF
2677 #line 2677 "configure"
2678 #include "confdefs.h"
2680 int Autoconf = TCGETA;
2682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2683 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2684 ac_cv_prog_gcc_traditional=yes
2690 echo "$as_me:2690: result: $ac_cv_prog_gcc_traditional" >&5
2691 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2692 if test $ac_cv_prog_gcc_traditional = yes; then
2693 CC="$CC -traditional"
2697 echo "$as_me:2697: checking whether $CC understands -c and -o together" >&5
2698 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2699 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2700 echo $ECHO_N "(cached) $ECHO_C" >&6
2703 cat > conftest.$ac_ext <<CF_EOF
2706 ${cf_cv_main_return:-return}(0);
2709 # We do the test twice because some compilers refuse to overwrite an
2710 # existing .o file with -o, though they will create one.
2711 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2712 if { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2715 echo "$as_me:2715: \$? = $ac_status" >&5
2716 (exit "$ac_status"); } &&
2717 test -f conftest2.$ac_objext && { (eval echo "$as_me:2717: \"$ac_try\"") >&5
2720 echo "$as_me:2720: \$? = $ac_status" >&5
2721 (exit "$ac_status"); };
2723 eval cf_cv_prog_CC_c_o=yes
2725 eval cf_cv_prog_CC_c_o=no
2730 if test "$cf_cv_prog_CC_c_o" = yes; then
2731 echo "$as_me:2731: result: yes" >&5
2732 echo "${ECHO_T}yes" >&6
2734 echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2738 test "$program_prefix" != NONE &&
2739 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2740 # Use a double $ so make ignores it.
2741 test "$program_suffix" != NONE &&
2742 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2743 # Double any \ or $. echo might interpret backslashes.
2744 # By default was `s,x,x', remove it if useless.
2745 cat <<\_ACEOF >conftest.sed
2746 s/[\\$]/&&/g;s/;s,x,x,$//
2748 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2751 for ac_prog in mawk gawk nawk awk
2753 # Extract the first word of "$ac_prog", so it can be a program name with args.
2754 set dummy $ac_prog; ac_word=$2
2755 echo "$as_me:2755: checking for $ac_word" >&5
2756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2757 if test "${ac_cv_prog_AWK+set}" = set; then
2758 echo $ECHO_N "(cached) $ECHO_C" >&6
2760 if test -n "$AWK"; then
2761 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2763 ac_save_IFS=$IFS; IFS=$ac_path_separator
2765 for ac_dir in $ac_dummy; do
2767 test -z "$ac_dir" && ac_dir=.
2768 $as_executable_p "$ac_dir/$ac_word" || continue
2769 ac_cv_prog_AWK="$ac_prog"
2770 echo "$as_me:2770: found $ac_dir/$ac_word" >&5
2777 if test -n "$AWK"; then
2778 echo "$as_me:2778: result: $AWK" >&5
2779 echo "${ECHO_T}$AWK" >&6
2781 echo "$as_me:2781: result: no" >&5
2782 echo "${ECHO_T}no" >&6
2785 test -n "$AWK" && break
2788 test -z "$AWK" && { { echo "$as_me:2788: error: No awk program found" >&5
2789 echo "$as_me: error: No awk program found" >&2;}
2790 { (exit 1); exit 1; }; }
2792 echo "$as_me:2792: checking for egrep" >&5
2793 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2794 if test "${ac_cv_prog_egrep+set}" = set; then
2795 echo $ECHO_N "(cached) $ECHO_C" >&6
2797 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2798 then ac_cv_prog_egrep='grep -E'
2799 else ac_cv_prog_egrep='egrep'
2802 echo "$as_me:2802: result: $ac_cv_prog_egrep" >&5
2803 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2804 EGREP=$ac_cv_prog_egrep
2806 test -z "$EGREP" && { { echo "$as_me:2806: error: No egrep program found" >&5
2807 echo "$as_me: error: No egrep program found" >&2;}
2808 { (exit 1); exit 1; }; }
2810 # Find a good install program. We prefer a C program (faster),
2811 # so one script is as good as another. But avoid the broken or
2812 # incompatible versions:
2813 # SysV /etc/install, /usr/sbin/install
2814 # SunOS /usr/etc/install
2815 # IRIX /sbin/install
2817 # AmigaOS /C/install, which installs bootblocks on floppy discs
2818 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2819 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2820 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2821 # ./install, which can be erroneously created by make from ./install.sh.
2822 echo "$as_me:2822: checking for a BSD compatible install" >&5
2823 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2824 if test -z "$INSTALL"; then
2825 if test "${ac_cv_path_install+set}" = set; then
2826 echo $ECHO_N "(cached) $ECHO_C" >&6
2828 ac_save_IFS=$IFS; IFS=$ac_path_separator
2829 for ac_dir in $PATH; do
2831 # Account for people who put trailing slashes in PATH elements.
2833 / | ./ | .// | /cC/* \
2834 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2837 # OSF1 and SCO ODT 3.0 have their own names for install.
2838 # Don't use installbsd from OSF since it installs stuff as root
2840 for ac_prog in ginstall scoinst install; do
2841 if $as_executable_p "$ac_dir/$ac_prog"; then
2842 if test $ac_prog = install &&
2843 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2844 # AIX install. It has an incompatible calling convention.
2846 elif test $ac_prog = install &&
2847 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2848 # program-specific install script used by HP pwplus--don't use.
2851 ac_cv_path_install="$ac_dir/$ac_prog -c"
2861 if test "${ac_cv_path_install+set}" = set; then
2862 INSTALL=$ac_cv_path_install
2864 # As a last resort, use the slow shell script. We don't cache a
2865 # path for INSTALL within a source directory, because that will
2866 # break other packages using the cache if that directory is
2867 # removed, or if the path is relative.
2868 INSTALL=$ac_install_sh
2871 echo "$as_me:2871: result: $INSTALL" >&5
2872 echo "${ECHO_T}$INSTALL" >&6
2874 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2875 # It thinks the first close brace ends the variable substitution.
2876 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2878 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2880 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2882 echo "$as_me:2882: checking whether ln -s works" >&5
2883 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2885 if test "$LN_S" = "ln -s"; then
2886 echo "$as_me:2886: result: yes" >&5
2887 echo "${ECHO_T}yes" >&6
2889 echo "$as_me:2889: result: no, using $LN_S" >&5
2890 echo "${ECHO_T}no, using $LN_S" >&6
2893 echo "$as_me:2893: checking if $LN_S -f options work" >&5
2894 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2896 rm -f conf$$.src conf$$dst
2898 echo first >conf$$.src
2899 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2904 rm -f conf$$.dst conf$$src
2905 echo "$as_me:2905: result: $cf_prog_ln_sf" >&5
2906 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2908 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2910 # Find a good install program. We prefer a C program (faster),
2911 # so one script is as good as another. But avoid the broken or
2912 # incompatible versions:
2913 # SysV /etc/install, /usr/sbin/install
2914 # SunOS /usr/etc/install
2915 # IRIX /sbin/install
2917 # AmigaOS /C/install, which installs bootblocks on floppy discs
2918 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2919 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2920 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2921 # ./install, which can be erroneously created by make from ./install.sh.
2922 echo "$as_me:2922: checking for a BSD compatible install" >&5
2923 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2924 if test -z "$INSTALL"; then
2925 if test "${ac_cv_path_install+set}" = set; then
2926 echo $ECHO_N "(cached) $ECHO_C" >&6
2928 ac_save_IFS=$IFS; IFS=$ac_path_separator
2929 for ac_dir in $PATH; do
2931 # Account for people who put trailing slashes in PATH elements.
2933 / | ./ | .// | /cC/* \
2934 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2937 # OSF1 and SCO ODT 3.0 have their own names for install.
2938 # Don't use installbsd from OSF since it installs stuff as root
2940 for ac_prog in ginstall scoinst install; do
2941 if $as_executable_p "$ac_dir/$ac_prog"; then
2942 if test $ac_prog = install &&
2943 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2944 # AIX install. It has an incompatible calling convention.
2946 elif test $ac_prog = install &&
2947 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2948 # program-specific install script used by HP pwplus--don't use.
2951 ac_cv_path_install="$ac_dir/$ac_prog -c"
2961 if test "${ac_cv_path_install+set}" = set; then
2962 INSTALL=$ac_cv_path_install
2964 # As a last resort, use the slow shell script. We don't cache a
2965 # path for INSTALL within a source directory, because that will
2966 # break other packages using the cache if that directory is
2967 # removed, or if the path is relative.
2968 INSTALL=$ac_install_sh
2971 echo "$as_me:2971: result: $INSTALL" >&5
2972 echo "${ECHO_T}$INSTALL" >&6
2974 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2975 # It thinks the first close brace ends the variable substitution.
2976 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2978 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2980 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2986 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2987 test -z "$cf_dir" && cf_dir=.
2988 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2992 echo "$as_me:2992: checking if you want to install stripped executables" >&5
2993 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2995 # Check whether --enable-stripping or --disable-stripping was given.
2996 if test "${enable_stripping+set}" = set; then
2997 enableval="$enable_stripping"
2998 test "$enableval" != no && enableval=yes
2999 if test "$enableval" != "yes" ; then
3002 enable_stripping=yes
3006 enable_stripping=yes
3009 echo "$as_me:3009: result: $enable_stripping" >&5
3010 echo "${ECHO_T}$enable_stripping" >&6
3012 if test "$enable_stripping" = yes
3019 : "${INSTALL:=install}"
3020 echo "$as_me:3020: checking if install accepts -p option" >&5
3021 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3022 if test "${cf_cv_install_p+set}" = set; then
3023 echo $ECHO_N "(cached) $ECHO_C" >&6
3030 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3032 if test -f conftest.out/conftest.in
3034 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3035 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3036 if test -s conftest.err
3051 echo "$as_me:3051: result: $cf_cv_install_p" >&5
3052 echo "${ECHO_T}$cf_cv_install_p" >&6
3054 echo "$as_me:3054: checking if install needs to be told about ownership" >&5
3055 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3056 case `$ac_config_guess` in
3065 echo "$as_me:3065: result: $with_install_o" >&5
3066 echo "${ECHO_T}$with_install_o" >&6
3067 if test "x$with_install_o" = xyes
3069 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'`"
3074 echo "$as_me:3074: checking for long file names" >&5
3075 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3076 if test "${ac_cv_sys_long_file_names+set}" = set; then
3077 echo $ECHO_N "(cached) $ECHO_C" >&6
3079 ac_cv_sys_long_file_names=yes
3080 # Test for long file names in all the places we know might matter:
3081 # . the current directory, where building will happen
3082 # $prefix/lib where we will be installing things
3083 # $exec_prefix/lib likewise
3084 # eval it to expand exec_prefix.
3085 # $TMPDIR if set, where it might want to write temporary files
3086 # if $TMPDIR is not set:
3087 # /tmp where it might want to write temporary files
3090 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3093 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3095 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3096 test -d "$ac_dir" || continue
3097 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3098 ac_xdir=$ac_dir/cf$$
3099 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3100 ac_tf1=$ac_xdir/conftest9012345
3101 ac_tf2=$ac_xdir/conftest9012346
3102 (echo 1 >"$ac_tf1") 2>/dev/null
3103 (echo 2 >"$ac_tf2") 2>/dev/null
3104 ac_val=`cat "$ac_tf1" 2>/dev/null`
3105 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3106 ac_cv_sys_long_file_names=no
3107 rm -rf "$ac_xdir" 2>/dev/null
3110 rm -rf "$ac_xdir" 2>/dev/null
3113 echo "$as_me:3113: result: $ac_cv_sys_long_file_names" >&5
3114 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3115 if test "$ac_cv_sys_long_file_names" = yes; then
3117 cat >>confdefs.h <<\EOF
3118 #define HAVE_LONG_FILE_NAMES 1
3123 # if we find pkg-config, check if we should install the ".pc" files.
3125 echo "$as_me:3125: checking if you want to use pkg-config" >&5
3126 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3128 # Check whether --with-pkg-config or --without-pkg-config was given.
3129 if test "${with_pkg_config+set}" = set; then
3130 withval="$with_pkg_config"
3131 cf_pkg_config=$withval
3135 echo "$as_me:3135: result: $cf_pkg_config" >&5
3136 echo "${ECHO_T}$cf_pkg_config" >&6
3138 case "$cf_pkg_config" in
3144 if test -n "$ac_tool_prefix"; then
3145 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3146 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3147 echo "$as_me:3147: checking for $ac_word" >&5
3148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3149 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3150 echo $ECHO_N "(cached) $ECHO_C" >&6
3154 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3157 ac_save_IFS=$IFS; IFS=$ac_path_separator
3159 for ac_dir in $ac_dummy; do
3161 test -z "$ac_dir" && ac_dir=.
3162 if $as_executable_p "$ac_dir/$ac_word"; then
3163 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3164 echo "$as_me:3164: found $ac_dir/$ac_word" >&5
3172 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3174 if test -n "$PKG_CONFIG"; then
3175 echo "$as_me:3175: result: $PKG_CONFIG" >&5
3176 echo "${ECHO_T}$PKG_CONFIG" >&6
3178 echo "$as_me:3178: result: no" >&5
3179 echo "${ECHO_T}no" >&6
3183 if test -z "$ac_cv_path_PKG_CONFIG"; then
3184 ac_pt_PKG_CONFIG=$PKG_CONFIG
3185 # Extract the first word of "pkg-config", so it can be a program name with args.
3186 set dummy pkg-config; ac_word=$2
3187 echo "$as_me:3187: checking for $ac_word" >&5
3188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3192 case $ac_pt_PKG_CONFIG in
3194 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3197 ac_save_IFS=$IFS; IFS=$ac_path_separator
3199 for ac_dir in $ac_dummy; do
3201 test -z "$ac_dir" && ac_dir=.
3202 if $as_executable_p "$ac_dir/$ac_word"; then
3203 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3204 echo "$as_me:3204: found $ac_dir/$ac_word" >&5
3209 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3213 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3215 if test -n "$ac_pt_PKG_CONFIG"; then
3216 echo "$as_me:3216: result: $ac_pt_PKG_CONFIG" >&5
3217 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3219 echo "$as_me:3219: result: no" >&5
3220 echo "${ECHO_T}no" >&6
3223 PKG_CONFIG=$ac_pt_PKG_CONFIG
3225 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3234 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3235 if test "$PKG_CONFIG" != none ; then
3237 if test "x$prefix" != xNONE; then
3238 cf_path_syntax="$prefix"
3240 cf_path_syntax="$ac_default_prefix"
3243 case ".$PKG_CONFIG" in
3248 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3250 (.\$\{*prefix\}*|.\$\{*dir\}*)
3251 eval PKG_CONFIG="$PKG_CONFIG"
3252 case ".$PKG_CONFIG" in
3254 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3259 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3262 { { echo "$as_me:3262: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3263 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3264 { (exit 1); exit 1; }; }
3268 elif test "x$cf_pkg_config" != xno ; then
3269 { echo "$as_me:3269: WARNING: pkg-config is not installed" >&5
3270 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3273 case "$PKG_CONFIG" in
3275 echo "$as_me:3275: checking for pkg-config library directory" >&5
3276 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3279 echo "$as_me:3279: checking for $PKG_CONFIG library directory" >&5
3280 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3284 # if $PKG_CONFIG_LIBDIR is set, try to use that
3285 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3287 # if the option is used, let that override. otherwise default to "libdir"
3289 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3290 if test "${with_pkg_config_libdir+set}" = set; then
3291 withval="$with_pkg_config_libdir"
3292 cf_search_path=$withval
3294 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3297 case "x$cf_search_path" in
3299 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3300 echo "$as_me:3300: result: $PKG_CONFIG_LIBDIR" >&5
3301 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3310 PKG_CONFIG_LIBDIR="$cf_search_path"
3311 echo "$as_me:3311: result: $PKG_CONFIG_LIBDIR" >&5
3312 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3316 echo "$as_me:3316: result: auto" >&5
3317 echo "${ECHO_T}auto" >&6
3319 # Look for the library directory using the same prefix as the executable
3320 echo "$as_me:3320: checking for search-list" >&5
3321 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3322 if test "x$PKG_CONFIG" != xnone
3324 # works for pkg-config since version 0.24 (2009)
3325 # works for pkgconf since version 0.8.3 (2012)
3326 for cf_pkg_program in \
3327 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3331 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3332 test -n "$cf_search_path" && break
3335 # works for pkg-config since import in 2005 of original 2001 HP code.
3336 test -z "$cf_search_path" && \
3338 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3339 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3340 sub(\"^[^']*'\",\"\"); \
3341 sub(\"'.*\",\"\"); \
3342 printf \" %s\", \\$0; } \
3347 echo "$as_me:3347: result: $cf_search_path" >&5
3348 echo "${ECHO_T}$cf_search_path" >&6
3351 { { echo "$as_me:3351: error: Unexpected option value: $cf_search_path" >&5
3352 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3353 { (exit 1); exit 1; }; }
3357 if test -n "$cf_search_path"
3359 echo "$as_me:3359: checking for first directory" >&5
3360 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3361 cf_pkg_config_path=none
3362 for cf_config in $cf_search_path
3364 if test -d "$cf_config"
3366 cf_pkg_config_path=$cf_config
3370 echo "$as_me:3370: result: $cf_pkg_config_path" >&5
3371 echo "${ECHO_T}$cf_pkg_config_path" >&6
3373 if test "x$cf_pkg_config_path" != xnone ; then
3374 # limit this to the first directory found
3375 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3378 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3380 echo "$as_me:3380: checking for workaround" >&5
3381 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3382 if test "$prefix" = "NONE" ; then
3383 cf_prefix="$ac_default_prefix"
3387 eval cf_libdir=$libdir
3388 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3390 for cf_config in $cf_search_path
3393 $cf_libdir/pkgconfig)
3394 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3398 test -z "$cf_backup" && cf_backup=$cf_config
3402 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3403 echo "$as_me:3403: result: $PKG_CONFIG_LIBDIR" >&5
3404 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3408 echo "$as_me:3408: checking if you want to build test-programs" >&5
3409 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3411 # Check whether --with-tests or --without-tests was given.
3412 if test "${with_tests+set}" = set; then
3413 withval="$with_tests"
3414 cf_with_tests=$withval
3418 echo "$as_me:3418: result: $cf_with_tests" >&5
3419 echo "${ECHO_T}$cf_with_tests" >&6
3421 echo "$as_me:3421: checking if we should assume mixed-case filenames" >&5
3422 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3424 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3425 if test "${enable_mixed_case+set}" = set; then
3426 enableval="$enable_mixed_case"
3427 enable_mixedcase=$enableval
3429 enable_mixedcase=auto
3431 echo "$as_me:3431: result: $enable_mixedcase" >&5
3432 echo "${ECHO_T}$enable_mixedcase" >&6
3433 if test "$enable_mixedcase" = "auto" ; then
3435 echo "$as_me:3435: checking if filesystem supports mixed-case filenames" >&5
3436 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3437 if test "${cf_cv_mixedcase+set}" = set; then
3438 echo $ECHO_N "(cached) $ECHO_C" >&6
3441 if test "$cross_compiling" = yes ; then
3442 case "$target_alias" in
3443 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3451 rm -f conftest CONFTEST
3453 if test -f CONFTEST ; then
3458 rm -f conftest CONFTEST
3462 echo "$as_me:3462: result: $cf_cv_mixedcase" >&5
3463 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3464 test "$cf_cv_mixedcase" = yes &&
3465 cat >>confdefs.h <<\EOF
3466 #define MIXEDCASE_FILENAMES 1
3470 cf_cv_mixedcase=$enable_mixedcase
3471 if test "$enable_mixedcase" = "yes" ; then
3472 cat >>confdefs.h <<\EOF
3473 #define MIXEDCASE_FILENAMES 1
3479 # do this after mixed-case option (tags/TAGS is not as important as tic).
3480 echo "$as_me:3480: checking whether ${MAKE-make} sets \${MAKE}" >&5
3481 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3482 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3483 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3484 echo $ECHO_N "(cached) $ECHO_C" >&6
3486 cat >conftest.make <<\EOF
3488 @echo 'ac_maketemp="${MAKE}"'
3490 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3491 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3492 if test -n "$ac_maketemp"; then
3493 eval ac_cv_prog_make_${ac_make}_set=yes
3495 eval ac_cv_prog_make_${ac_make}_set=no
3499 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3500 echo "$as_me:3500: result: yes" >&5
3501 echo "${ECHO_T}yes" >&6
3504 echo "$as_me:3504: result: no" >&5
3505 echo "${ECHO_T}no" >&6
3506 SET_MAKE="MAKE=${MAKE-make}"
3509 echo "$as_me:3509: checking for \".PHONY\" make-support" >&5
3510 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3511 if test "${cf_cv_make_PHONY+set}" = set; then
3512 echo $ECHO_N "(cached) $ECHO_C" >&6
3517 mkdir conftest || exit 1
3519 cat >makefile <<'CF_EOF'
3523 @echo "** making $@ $(DATA)"
3525 @echo "** making $@ $(DATA)"
3527 @echo "** making $@ $(DATA)"
3530 @echo "** making $@ $(DATA)"
3533 for cf_data in 1 2 3
3535 ${MAKE:-make} always DATA=$cf_data
3536 ${MAKE:-make} once DATA=$cf_data
3537 ${MAKE:-make} -t always once
3538 if test -f always ; then
3539 echo "no (case 1)" > ../conftest.tmp
3540 elif test ! -f always.out ; then
3541 echo "no (case 2)" > ../conftest.tmp
3542 elif test ! -f once.out ; then
3543 echo "no (case 3)" > ../conftest.tmp
3544 elif ! cmp -s always.out once.out ; then
3545 echo "no (case 4)" > ../conftest.tmp
3546 diff always.out once.out
3548 cf_check="`cat always.out`"
3549 if test "x$cf_check" != "x$cf_data" ; then
3550 echo "no (case 5)" > ../conftest.tmp
3552 echo yes > ../conftest.tmp
3560 cf_cv_make_PHONY="`cat conftest.tmp`"
3564 echo "$as_me:3564: result: $cf_cv_make_PHONY" >&5
3565 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3568 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3569 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3571 for ac_prog in exctags ctags
3573 # Extract the first word of "$ac_prog", so it can be a program name with args.
3574 set dummy $ac_prog; ac_word=$2
3575 echo "$as_me:3575: checking for $ac_word" >&5
3576 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3577 if test "${ac_cv_prog_CTAGS+set}" = set; then
3578 echo $ECHO_N "(cached) $ECHO_C" >&6
3580 if test -n "$CTAGS"; then
3581 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3583 ac_save_IFS=$IFS; IFS=$ac_path_separator
3585 for ac_dir in $ac_dummy; do
3587 test -z "$ac_dir" && ac_dir=.
3588 $as_executable_p "$ac_dir/$ac_word" || continue
3589 ac_cv_prog_CTAGS="$ac_prog"
3590 echo "$as_me:3590: found $ac_dir/$ac_word" >&5
3596 CTAGS=$ac_cv_prog_CTAGS
3597 if test -n "$CTAGS"; then
3598 echo "$as_me:3598: result: $CTAGS" >&5
3599 echo "${ECHO_T}$CTAGS" >&6
3601 echo "$as_me:3601: result: no" >&5
3602 echo "${ECHO_T}no" >&6
3605 test -n "$CTAGS" && break
3608 for ac_prog in exetags etags
3610 # Extract the first word of "$ac_prog", so it can be a program name with args.
3611 set dummy $ac_prog; ac_word=$2
3612 echo "$as_me:3612: checking for $ac_word" >&5
3613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3614 if test "${ac_cv_prog_ETAGS+set}" = set; then
3615 echo $ECHO_N "(cached) $ECHO_C" >&6
3617 if test -n "$ETAGS"; then
3618 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3620 ac_save_IFS=$IFS; IFS=$ac_path_separator
3622 for ac_dir in $ac_dummy; do
3624 test -z "$ac_dir" && ac_dir=.
3625 $as_executable_p "$ac_dir/$ac_word" || continue
3626 ac_cv_prog_ETAGS="$ac_prog"
3627 echo "$as_me:3627: found $ac_dir/$ac_word" >&5
3633 ETAGS=$ac_cv_prog_ETAGS
3634 if test -n "$ETAGS"; then
3635 echo "$as_me:3635: result: $ETAGS" >&5
3636 echo "${ECHO_T}$ETAGS" >&6
3638 echo "$as_me:3638: result: no" >&5
3639 echo "${ECHO_T}no" >&6
3642 test -n "$ETAGS" && break
3645 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3646 set dummy ${CTAGS:-ctags}; ac_word=$2
3647 echo "$as_me:3647: checking for $ac_word" >&5
3648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3649 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3650 echo $ECHO_N "(cached) $ECHO_C" >&6
3652 if test -n "$MAKE_LOWER_TAGS"; then
3653 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3655 ac_save_IFS=$IFS; IFS=$ac_path_separator
3657 for ac_dir in $ac_dummy; do
3659 test -z "$ac_dir" && ac_dir=.
3660 $as_executable_p "$ac_dir/$ac_word" || continue
3661 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3662 echo "$as_me:3662: found $ac_dir/$ac_word" >&5
3666 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3669 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3670 if test -n "$MAKE_LOWER_TAGS"; then
3671 echo "$as_me:3671: result: $MAKE_LOWER_TAGS" >&5
3672 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3674 echo "$as_me:3674: result: no" >&5
3675 echo "${ECHO_T}no" >&6
3678 if test "$cf_cv_mixedcase" = yes ; then
3679 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3680 set dummy ${ETAGS:-etags}; ac_word=$2
3681 echo "$as_me:3681: checking for $ac_word" >&5
3682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3684 echo $ECHO_N "(cached) $ECHO_C" >&6
3686 if test -n "$MAKE_UPPER_TAGS"; then
3687 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3689 ac_save_IFS=$IFS; IFS=$ac_path_separator
3691 for ac_dir in $ac_dummy; do
3693 test -z "$ac_dir" && ac_dir=.
3694 $as_executable_p "$ac_dir/$ac_word" || continue
3695 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3696 echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3700 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3703 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3704 if test -n "$MAKE_UPPER_TAGS"; then
3705 echo "$as_me:3705: result: $MAKE_UPPER_TAGS" >&5
3706 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3708 echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3716 if test "$MAKE_UPPER_TAGS" = yes ; then
3722 if test "$MAKE_LOWER_TAGS" = yes ; then
3728 echo "$as_me:3728: checking for makeflags variable" >&5
3729 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3730 if test "${cf_cv_makeflags+set}" = set; then
3731 echo $ECHO_N "(cached) $ECHO_C" >&6
3735 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3737 cat >cf_makeflags.tmp <<CF_EOF
3740 @ echo '.$cf_option'
3742 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3743 case "$cf_result" in
3745 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3746 case "$cf_result" in
3747 (.*CC=*) cf_cv_makeflags=
3749 (*) cf_cv_makeflags=$cf_option
3758 echo "${as_me:-configure}:3758: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3763 rm -f cf_makeflags.tmp
3766 echo "$as_me:3766: result: $cf_cv_makeflags" >&5
3767 echo "${ECHO_T}$cf_cv_makeflags" >&6
3769 if test -n "$ac_tool_prefix"; then
3770 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3771 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3772 echo "$as_me:3772: checking for $ac_word" >&5
3773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3774 if test "${ac_cv_prog_RANLIB+set}" = set; then
3775 echo $ECHO_N "(cached) $ECHO_C" >&6
3777 if test -n "$RANLIB"; then
3778 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3780 ac_save_IFS=$IFS; IFS=$ac_path_separator
3782 for ac_dir in $ac_dummy; do
3784 test -z "$ac_dir" && ac_dir=.
3785 $as_executable_p "$ac_dir/$ac_word" || continue
3786 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3787 echo "$as_me:3787: found $ac_dir/$ac_word" >&5
3793 RANLIB=$ac_cv_prog_RANLIB
3794 if test -n "$RANLIB"; then
3795 echo "$as_me:3795: result: $RANLIB" >&5
3796 echo "${ECHO_T}$RANLIB" >&6
3798 echo "$as_me:3798: result: no" >&5
3799 echo "${ECHO_T}no" >&6
3803 if test -z "$ac_cv_prog_RANLIB"; then
3804 ac_ct_RANLIB=$RANLIB
3805 # Extract the first word of "ranlib", so it can be a program name with args.
3806 set dummy ranlib; ac_word=$2
3807 echo "$as_me:3807: checking for $ac_word" >&5
3808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3809 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3810 echo $ECHO_N "(cached) $ECHO_C" >&6
3812 if test -n "$ac_ct_RANLIB"; then
3813 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3815 ac_save_IFS=$IFS; IFS=$ac_path_separator
3817 for ac_dir in $ac_dummy; do
3819 test -z "$ac_dir" && ac_dir=.
3820 $as_executable_p "$ac_dir/$ac_word" || continue
3821 ac_cv_prog_ac_ct_RANLIB="ranlib"
3822 echo "$as_me:3822: found $ac_dir/$ac_word" >&5
3826 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3829 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3830 if test -n "$ac_ct_RANLIB"; then
3831 echo "$as_me:3831: result: $ac_ct_RANLIB" >&5
3832 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3834 echo "$as_me:3834: result: no" >&5
3835 echo "${ECHO_T}no" >&6
3838 RANLIB=$ac_ct_RANLIB
3840 RANLIB="$ac_cv_prog_RANLIB"
3843 if test -n "$ac_tool_prefix"; then
3844 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3845 set dummy ${ac_tool_prefix}ld; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_LD+set}" = set; then
3849 echo $ECHO_N "(cached) $ECHO_C" >&6
3851 if test -n "$LD"; then
3852 ac_cv_prog_LD="$LD" # Let the user override the test.
3854 ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 for ac_dir in $ac_dummy; do
3858 test -z "$ac_dir" && ac_dir=.
3859 $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_LD="${ac_tool_prefix}ld"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3868 if test -n "$LD"; then
3869 echo "$as_me:3869: result: $LD" >&5
3870 echo "${ECHO_T}$LD" >&6
3872 echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3877 if test -z "$ac_cv_prog_LD"; then
3879 # Extract the first word of "ld", so it can be a program name with args.
3880 set dummy ld; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3884 echo $ECHO_N "(cached) $ECHO_C" >&6
3886 if test -n "$ac_ct_LD"; then
3887 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3889 ac_save_IFS=$IFS; IFS=$ac_path_separator
3891 for ac_dir in $ac_dummy; do
3893 test -z "$ac_dir" && ac_dir=.
3894 $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_ac_ct_LD="ld"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3900 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3903 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3904 if test -n "$ac_ct_LD"; then
3905 echo "$as_me:3905: result: $ac_ct_LD" >&5
3906 echo "${ECHO_T}$ac_ct_LD" >&6
3908 echo "$as_me:3908: result: no" >&5
3909 echo "${ECHO_T}no" >&6
3917 if test -n "$ac_tool_prefix"; then
3918 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3919 set dummy ${ac_tool_prefix}ar; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_AR+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
3925 if test -n "$AR"; then
3926 ac_cv_prog_AR="$AR" # Let the user override the test.
3928 ac_save_IFS=$IFS; IFS=$ac_path_separator
3930 for ac_dir in $ac_dummy; do
3932 test -z "$ac_dir" && ac_dir=.
3933 $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_AR="${ac_tool_prefix}ar"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3942 if test -n "$AR"; then
3943 echo "$as_me:3943: result: $AR" >&5
3944 echo "${ECHO_T}$AR" >&6
3946 echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3951 if test -z "$ac_cv_prog_AR"; then
3953 # Extract the first word of "ar", so it can be a program name with args.
3954 set dummy ar; ac_word=$2
3955 echo "$as_me:3955: checking for $ac_word" >&5
3956 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3957 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3958 echo $ECHO_N "(cached) $ECHO_C" >&6
3960 if test -n "$ac_ct_AR"; then
3961 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3963 ac_save_IFS=$IFS; IFS=$ac_path_separator
3965 for ac_dir in $ac_dummy; do
3967 test -z "$ac_dir" && ac_dir=.
3968 $as_executable_p "$ac_dir/$ac_word" || continue
3969 ac_cv_prog_ac_ct_AR="ar"
3970 echo "$as_me:3970: found $ac_dir/$ac_word" >&5
3974 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3977 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3978 if test -n "$ac_ct_AR"; then
3979 echo "$as_me:3979: result: $ac_ct_AR" >&5
3980 echo "${ECHO_T}$ac_ct_AR" >&6
3982 echo "$as_me:3982: result: no" >&5
3983 echo "${ECHO_T}no" >&6
3991 if test -n "$ac_tool_prefix"; then
3992 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3993 set dummy ${ac_tool_prefix}ar; ac_word=$2
3994 echo "$as_me:3994: checking for $ac_word" >&5
3995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3996 if test "${ac_cv_prog_AR+set}" = set; then
3997 echo $ECHO_N "(cached) $ECHO_C" >&6
3999 if test -n "$AR"; then
4000 ac_cv_prog_AR="$AR" # Let the user override the test.
4002 ac_save_IFS=$IFS; IFS=$ac_path_separator
4004 for ac_dir in $ac_dummy; do
4006 test -z "$ac_dir" && ac_dir=.
4007 $as_executable_p "$ac_dir/$ac_word" || continue
4008 ac_cv_prog_AR="${ac_tool_prefix}ar"
4009 echo "$as_me:4009: found $ac_dir/$ac_word" >&5
4016 if test -n "$AR"; then
4017 echo "$as_me:4017: result: $AR" >&5
4018 echo "${ECHO_T}$AR" >&6
4020 echo "$as_me:4020: result: no" >&5
4021 echo "${ECHO_T}no" >&6
4025 if test -z "$ac_cv_prog_AR"; then
4027 # Extract the first word of "ar", so it can be a program name with args.
4028 set dummy ar; ac_word=$2
4029 echo "$as_me:4029: checking for $ac_word" >&5
4030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4031 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4032 echo $ECHO_N "(cached) $ECHO_C" >&6
4034 if test -n "$ac_ct_AR"; then
4035 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4037 ac_save_IFS=$IFS; IFS=$ac_path_separator
4039 for ac_dir in $ac_dummy; do
4041 test -z "$ac_dir" && ac_dir=.
4042 $as_executable_p "$ac_dir/$ac_word" || continue
4043 ac_cv_prog_ac_ct_AR="ar"
4044 echo "$as_me:4044: found $ac_dir/$ac_word" >&5
4048 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4051 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4052 if test -n "$ac_ct_AR"; then
4053 echo "$as_me:4053: result: $ac_ct_AR" >&5
4054 echo "${ECHO_T}$ac_ct_AR" >&6
4056 echo "$as_me:4056: result: no" >&5
4057 echo "${ECHO_T}no" >&6
4065 echo "$as_me:4065: checking for options to update archives" >&5
4066 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4067 if test "${cf_cv_ar_flags+set}" = set; then
4068 echo $ECHO_N "(cached) $ECHO_C" >&6
4071 case "$cf_cv_system_name" in
4074 cat >mk_static_lib.sh <<-EOF
4079 exec \$MSVC_BIN -out:"\$out" \$@
4081 chmod +x mk_static_lib.sh
4082 AR=`pwd`/mk_static_lib.sh
4085 cf_cv_ar_flags=unknown
4086 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4089 # check if $ARFLAGS already contains this choice
4090 if test "x$ARFLAGS" != "x" ; then
4091 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4092 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4098 rm -f "conftest.$ac_cv_objext"
4101 cat >"conftest.$ac_ext" <<EOF
4102 #line 4102 "configure"
4103 int testdata[3] = { 123, 456, 789 };
4105 if { (eval echo "$as_me:4105: \"$ac_compile\"") >&5
4106 (eval $ac_compile) 2>&5
4108 echo "$as_me:4108: \$? = $ac_status" >&5
4109 (exit "$ac_status"); } ; then
4110 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4111 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4112 if test -f conftest.a ; then
4113 cf_cv_ar_flags="$cf_ar_flags"
4117 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4119 echo "${as_me:-configure}:4119: testing cannot compile test-program ..." 1>&5
4124 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4129 echo "$as_me:4129: result: $cf_cv_ar_flags" >&5
4130 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4132 if test -n "$ARFLAGS" ; then
4133 if test -n "$cf_cv_ar_flags" ; then
4134 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4137 ARFLAGS=$cf_cv_ar_flags
4140 echo "$as_me:4140: checking for PATH separator" >&5
4141 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4142 case "$cf_cv_system_name" in
4143 (os2*) PATH_SEPARATOR=';' ;;
4144 (*) ${PATH_SEPARATOR:=':'} ;;
4147 echo "$as_me:4147: result: $PATH_SEPARATOR" >&5
4148 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4150 echo "$as_me:4150: checking if you have specified an install-prefix" >&5
4151 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4153 # Check whether --with-install-prefix or --without-install-prefix was given.
4154 if test "${with_install_prefix+set}" = set; then
4155 withval="$with_install_prefix"
4159 (*) DESTDIR="$withval"
4163 echo "$as_me:4163: result: $DESTDIR" >&5
4164 echo "${ECHO_T}$DESTDIR" >&6
4166 ###############################################################################
4168 # If we're cross-compiling, allow the user to override the tools and their
4169 # options. The configure script is oriented toward identifying the host
4170 # compiler, etc., but we need a build compiler to generate parts of the source.
4172 if test "$cross_compiling" = yes ; then
4174 # defaults that we might want to override
4175 : ${BUILD_CFLAGS:=''}
4176 : ${BUILD_CPPFLAGS:=''}
4177 : ${BUILD_LDFLAGS:=''}
4179 : ${BUILD_EXEEXT:='$x'}
4180 : ${BUILD_OBJEXT:='o'}
4182 # Check whether --with-build-cc or --without-build-cc was given.
4183 if test "${with_build_cc+set}" = set; then
4184 withval="$with_build_cc"
4187 for ac_prog in gcc clang c99 c89 cc cl
4189 # Extract the first word of "$ac_prog", so it can be a program name with args.
4190 set dummy $ac_prog; ac_word=$2
4191 echo "$as_me:4191: checking for $ac_word" >&5
4192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4193 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4194 echo $ECHO_N "(cached) $ECHO_C" >&6
4196 if test -n "$BUILD_CC"; then
4197 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4199 ac_save_IFS=$IFS; IFS=$ac_path_separator
4201 for ac_dir in $ac_dummy; do
4203 test -z "$ac_dir" && ac_dir=.
4204 $as_executable_p "$ac_dir/$ac_word" || continue
4205 ac_cv_prog_BUILD_CC="$ac_prog"
4206 echo "$as_me:4206: found $ac_dir/$ac_word" >&5
4212 BUILD_CC=$ac_cv_prog_BUILD_CC
4213 if test -n "$BUILD_CC"; then
4214 echo "$as_me:4214: result: $BUILD_CC" >&5
4215 echo "${ECHO_T}$BUILD_CC" >&6
4217 echo "$as_me:4217: result: no" >&5
4218 echo "${ECHO_T}no" >&6
4221 test -n "$BUILD_CC" && break
4223 test -n "$BUILD_CC" || BUILD_CC="none"
4226 echo "$as_me:4226: checking for native build C compiler" >&5
4227 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4228 echo "$as_me:4228: result: $BUILD_CC" >&5
4229 echo "${ECHO_T}$BUILD_CC" >&6
4231 echo "$as_me:4231: checking for native build C preprocessor" >&5
4232 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4234 # Check whether --with-build-cpp or --without-build-cpp was given.
4235 if test "${with_build_cpp+set}" = set; then
4236 withval="$with_build_cpp"
4237 BUILD_CPP="$withval"
4239 BUILD_CPP='${BUILD_CC} -E'
4241 echo "$as_me:4241: result: $BUILD_CPP" >&5
4242 echo "${ECHO_T}$BUILD_CPP" >&6
4244 echo "$as_me:4244: checking for native build C flags" >&5
4245 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4247 # Check whether --with-build-cflags or --without-build-cflags was given.
4248 if test "${with_build_cflags+set}" = set; then
4249 withval="$with_build_cflags"
4250 BUILD_CFLAGS="$withval"
4252 echo "$as_me:4252: result: $BUILD_CFLAGS" >&5
4253 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4255 echo "$as_me:4255: checking for native build C preprocessor-flags" >&5
4256 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4258 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4259 if test "${with_build_cppflags+set}" = set; then
4260 withval="$with_build_cppflags"
4261 BUILD_CPPFLAGS="$withval"
4263 echo "$as_me:4263: result: $BUILD_CPPFLAGS" >&5
4264 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4266 echo "$as_me:4266: checking for native build linker-flags" >&5
4267 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4269 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4270 if test "${with_build_ldflags+set}" = set; then
4271 withval="$with_build_ldflags"
4272 BUILD_LDFLAGS="$withval"
4274 echo "$as_me:4274: result: $BUILD_LDFLAGS" >&5
4275 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4277 echo "$as_me:4277: checking for native build linker-libraries" >&5
4278 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4280 # Check whether --with-build-libs or --without-build-libs was given.
4281 if test "${with_build_libs+set}" = set; then
4282 withval="$with_build_libs"
4283 BUILD_LIBS="$withval"
4285 echo "$as_me:4285: result: $BUILD_LIBS" >&5
4286 echo "${ECHO_T}$BUILD_LIBS" >&6
4288 # this assumes we're on Unix.
4292 : ${BUILD_CC:='${CC}'}
4294 echo "$as_me:4294: checking if the build-compiler \"$BUILD_CC\" works" >&5
4295 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4297 cf_save_crossed=$cross_compiling
4298 cf_save_ac_link=$ac_link
4300 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $BUILD_CPPFLAGS $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4302 if test "$cross_compiling" = yes; then
4303 cf_ok_build_cc=unknown
4305 cat >"conftest.$ac_ext" <<_ACEOF
4306 #line 4306 "configure"
4307 #include "confdefs.h"
4309 int main(int argc, char *argv[])
4311 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4315 rm -f "conftest$ac_exeext"
4316 if { (eval echo "$as_me:4316: \"$ac_link\"") >&5
4317 (eval $ac_link) 2>&5
4319 echo "$as_me:4319: \$? = $ac_status" >&5
4320 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4321 { (eval echo "$as_me:4321: \"$ac_try\"") >&5
4324 echo "$as_me:4324: \$? = $ac_status" >&5
4325 (exit "$ac_status"); }; }; then
4328 echo "$as_me: program exited with status $ac_status" >&5
4329 echo "$as_me: failed program was:" >&5
4330 cat "conftest.$ac_ext" >&5
4333 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4336 cross_compiling=$cf_save_crossed
4337 ac_link=$cf_save_ac_link
4339 echo "$as_me:4339: result: $cf_ok_build_cc" >&5
4340 echo "${ECHO_T}$cf_ok_build_cc" >&6
4342 if test "$cf_ok_build_cc" != yes
4344 { { echo "$as_me:4344: error: Cross-build requires two compilers.
4345 Use --with-build-cc to specify the native compiler." >&5
4346 echo "$as_me: error: Cross-build requires two compilers.
4347 Use --with-build-cc to specify the native compiler." >&2;}
4348 { (exit 1); exit 1; }; }
4352 : ${BUILD_CC:='${CC}'}
4353 : ${BUILD_CPP:='${CPP}'}
4354 : ${BUILD_CFLAGS:='${CFLAGS}'}
4355 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4356 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4357 : ${BUILD_LIBS:='${LIBS}'}
4358 : ${BUILD_EXEEXT:='$x'}
4359 : ${BUILD_OBJEXT:='o'}
4362 ###############################################################################
4364 ### Options to allow the user to specify the set of libraries which are used.
4365 ### Use "--without-normal --with-shared" to allow the default model to be
4366 ### shared, for example.
4369 echo "$as_me:4369: checking if you want to build shared C-objects" >&5
4370 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4372 # Check whether --with-shared or --without-shared was given.
4373 if test "${with_shared+set}" = set; then
4374 withval="$with_shared"
4375 with_shared=$withval
4379 echo "$as_me:4379: result: $with_shared" >&5
4380 echo "${ECHO_T}$with_shared" >&6
4381 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4383 echo "$as_me:4383: checking for specified models" >&5
4384 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4385 test -z "$cf_list_models" && cf_list_models=normal
4386 echo "$as_me:4386: result: $cf_list_models" >&5
4387 echo "${ECHO_T}$cf_list_models" >&6
4389 ### Use the first model as the default, and save its suffix for use in building
4390 ### up test-applications.
4391 echo "$as_me:4391: checking for default model" >&5
4392 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4393 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4394 echo "$as_me:4394: result: $DFT_LWR_MODEL" >&5
4395 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4397 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4399 echo "$as_me:4399: checking for specific curses-directory" >&5
4400 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4402 # Check whether --with-curses-dir or --without-curses-dir was given.
4403 if test "${with_curses_dir+set}" = set; then
4404 withval="$with_curses_dir"
4405 cf_cv_curses_dir=$withval
4409 echo "$as_me:4409: result: $cf_cv_curses_dir" >&5
4410 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4412 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4415 if test "x$prefix" != xNONE; then
4416 cf_path_syntax="$prefix"
4418 cf_path_syntax="$ac_default_prefix"
4426 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4428 (.\$\{*prefix\}*|.\$\{*dir\}*)
4429 eval withval="$withval"
4432 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4437 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4440 { { echo "$as_me:4440: error: expected a pathname, not \"$withval\"" >&5
4441 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4442 { (exit 1); exit 1; }; }
4446 if test -d "$cf_cv_curses_dir"
4449 if test -n "$cf_cv_curses_dir/include" ; then
4450 for cf_add_incdir in $cf_cv_curses_dir/include
4452 while test "$cf_add_incdir" != /usr/include
4454 if test -d "$cf_add_incdir"
4457 if test -n "$CFLAGS$CPPFLAGS" ; then
4458 # a loop is needed to ensure we can add subdirs of existing dirs
4459 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4460 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4461 cf_have_incdir=yes; break
4466 if test "$cf_have_incdir" = no ; then
4467 if test "$cf_add_incdir" = /usr/local/include ; then
4468 if test "$GCC" = yes
4470 cf_save_CPPFLAGS=$CPPFLAGS
4472 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4473 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4475 cat >"conftest.$ac_ext" <<_ACEOF
4476 #line 4476 "configure"
4477 #include "confdefs.h"
4487 rm -f "conftest.$ac_objext"
4488 if { (eval echo "$as_me:4488: \"$ac_compile\"") >&5
4489 (eval $ac_compile) 2>&5
4491 echo "$as_me:4491: \$? = $ac_status" >&5
4492 (exit "$ac_status"); } &&
4493 { ac_try='test -s "conftest.$ac_objext"'
4494 { (eval echo "$as_me:4494: \"$ac_try\"") >&5
4497 echo "$as_me:4497: \$? = $ac_status" >&5
4498 (exit "$ac_status"); }; }; then
4501 echo "$as_me: failed program was:" >&5
4502 cat "conftest.$ac_ext" >&5
4505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4506 CPPFLAGS=$cf_save_CPPFLAGS
4511 if test "$cf_have_incdir" = no ; then
4512 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4514 echo "${as_me:-configure}:4514: testing adding $cf_add_incdir to include-path ..." 1>&5
4516 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4518 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4519 test "$cf_top_incdir" = "$cf_add_incdir" && break
4520 cf_add_incdir="$cf_top_incdir"
4531 if test -n "$cf_cv_curses_dir/lib" ; then
4532 for cf_add_libdir in $cf_cv_curses_dir/lib
4534 if test "$cf_add_libdir" = /usr/lib ; then
4536 elif test -d "$cf_add_libdir"
4539 if test -n "$LDFLAGS$LIBS" ; then
4540 # a loop is needed to ensure we can add subdirs of existing dirs
4541 for cf_test_libdir in $LDFLAGS $LIBS ; do
4542 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4543 cf_have_libdir=yes; break
4547 if test "$cf_have_libdir" = no ; then
4548 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4550 echo "${as_me:-configure}:4550: testing adding $cf_add_libdir to library-path ..." 1>&5
4552 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4561 cf_ncuconfig_root=ncurses
4562 cf_have_ncuconfig=no
4564 if test "x${PKG_CONFIG:=none}" != xnone; then
4565 echo "$as_me:4565: checking pkg-config for $cf_ncuconfig_root" >&5
4566 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4567 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4568 echo "$as_me:4568: result: yes" >&5
4569 echo "${ECHO_T}yes" >&6
4571 echo "$as_me:4571: checking if the $cf_ncuconfig_root package files work" >&5
4572 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4573 cf_have_ncuconfig=unknown
4575 cf_save_CFLAGS="$CFLAGS"
4576 cf_save_CPPFLAGS="$CPPFLAGS"
4577 cf_save_LIBS="$LIBS"
4579 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4580 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4582 # while -W for passing linker flags is prevalent, it is not "standard".
4583 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4584 # incompatible _and_ non-standard -W option which gives an error. Work
4585 # around that pitfall.
4586 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4592 cf_new_extra_cppflags=
4594 for cf_add_cflags in $cf_pkg_cflags
4596 case "$cf_fix_cppflags" in
4598 case "$cf_add_cflags" in
4599 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4600 case "$cf_add_cflags" in
4602 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4605 && test -z "${cf_tst_cflags}" \
4606 && cf_fix_cppflags=yes
4608 if test "$cf_fix_cppflags" = yes ; then
4610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4614 elif test "${cf_tst_cflags}" = "\"'" ; then
4616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4627 case "$cf_add_cflags" in
4629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4631 CPPFLAGS=`echo "$CPPFLAGS" | \
4632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4638 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4639 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4646 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4647 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4654 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4655 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4657 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4659 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4660 && test -z "${cf_tst_cflags}" \
4661 && cf_fix_cppflags=no
4666 if test -n "$cf_new_cflags" ; then
4668 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4669 CFLAGS="${CFLAGS}$cf_new_cflags"
4673 if test -n "$cf_new_cppflags" ; then
4675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4676 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4680 if test -n "$cf_new_extra_cppflags" ; then
4682 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4683 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4690 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4692 for cf_add_1lib in $cf_add_0lib; do
4693 for cf_add_2lib in $cf_add_libs; do
4694 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4699 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4703 cat >"conftest.$ac_ext" <<_ACEOF
4704 #line 4704 "configure"
4705 #include "confdefs.h"
4706 #include <${cf_cv_ncurses_header:-curses.h}>
4710 initscr(); mousemask(0,0); tigetstr((char *)0);
4715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717 (eval $ac_link) 2>&5
4719 echo "$as_me:4719: \$? = $ac_status" >&5
4720 (exit "$ac_status"); } &&
4721 { ac_try='test -s "conftest$ac_exeext"'
4722 { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4725 echo "$as_me:4725: \$? = $ac_status" >&5
4726 (exit "$ac_status"); }; }; then
4727 if test "$cross_compiling" = yes; then
4728 cf_test_ncuconfig=maybe
4730 cat >"conftest.$ac_ext" <<_ACEOF
4731 #line 4731 "configure"
4732 #include "confdefs.h"
4733 #include <${cf_cv_ncurses_header:-curses.h}>
4735 { const char *xx = curses_version(); return (xx == 0); }
4737 rm -f "conftest$ac_exeext"
4738 if { (eval echo "$as_me:4738: \"$ac_link\"") >&5
4739 (eval $ac_link) 2>&5
4741 echo "$as_me:4741: \$? = $ac_status" >&5
4742 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4743 { (eval echo "$as_me:4743: \"$ac_try\"") >&5
4746 echo "$as_me:4746: \$? = $ac_status" >&5
4747 (exit "$ac_status"); }; }; then
4748 cf_test_ncuconfig=yes
4750 echo "$as_me: program exited with status $ac_status" >&5
4751 echo "$as_me: failed program was:" >&5
4752 cat "conftest.$ac_ext" >&5
4753 cf_test_ncuconfig=no
4755 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4758 echo "$as_me: failed program was:" >&5
4759 cat "conftest.$ac_ext" >&5
4760 cf_test_ncuconfig=no
4762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4764 CFLAGS="$cf_save_CFLAGS"
4765 CPPFLAGS="$cf_save_CPPFLAGS"
4766 LIBS="$cf_save_LIBS"
4768 if test "x$cf_test_ncuconfig" != xyes; then
4769 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4770 cf_pkg_cflags="$cf_temp"
4771 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4772 cf_pkg_libs="$cf_temp"
4777 for cf_add_cflags in $cf_pkg_cflags
4779 case "x$cf_add_cflags" in
4782 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4785 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4786 test "$CFLAGS" != "$cf_old_cflag" || break
4788 CFLAGS="$cf_old_cflag"
4791 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4794 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4795 test "$CPPFLAGS" != "$cf_old_cflag" || break
4797 CPPFLAGS="$cf_old_cflag"
4806 cf_new_extra_cppflags=
4808 for cf_add_cflags in $cf_add_cflags
4810 case "$cf_fix_cppflags" in
4812 case "$cf_add_cflags" in
4813 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4814 case "$cf_add_cflags" in
4816 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4818 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4819 && test -z "${cf_tst_cflags}" \
4820 && cf_fix_cppflags=yes
4822 if test "$cf_fix_cppflags" = yes ; then
4824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4828 elif test "${cf_tst_cflags}" = "\"'" ; then
4830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4841 case "$cf_add_cflags" in
4843 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4845 CPPFLAGS=`echo "$CPPFLAGS" | \
4846 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4847 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4852 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4853 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4860 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4861 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4868 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4869 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4871 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4873 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4874 && test -z "${cf_tst_cflags}" \
4875 && cf_fix_cppflags=no
4880 if test -n "$cf_new_cflags" ; then
4882 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4883 CFLAGS="${CFLAGS}$cf_new_cflags"
4887 if test -n "$cf_new_cppflags" ; then
4889 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4890 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4894 if test -n "$cf_new_extra_cppflags" ; then
4896 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4897 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4906 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4908 for cf_add_1lib in $cf_add_0lib; do
4909 for cf_add_2lib in $cf_add_libs; do
4910 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4915 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4919 cat >"conftest.$ac_ext" <<_ACEOF
4920 #line 4920 "configure"
4921 #include "confdefs.h"
4922 #include <${cf_cv_ncurses_header:-curses.h}>
4926 initscr(); mousemask(0,0); tigetstr((char *)0);
4931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4932 if { (eval echo "$as_me:4932: \"$ac_link\"") >&5
4933 (eval $ac_link) 2>&5
4935 echo "$as_me:4935: \$? = $ac_status" >&5
4936 (exit "$ac_status"); } &&
4937 { ac_try='test -s "conftest$ac_exeext"'
4938 { (eval echo "$as_me:4938: \"$ac_try\"") >&5
4941 echo "$as_me:4941: \$? = $ac_status" >&5
4942 (exit "$ac_status"); }; }; then
4943 if test "$cross_compiling" = yes; then
4944 cf_have_ncuconfig=maybe
4946 cat >"conftest.$ac_ext" <<_ACEOF
4947 #line 4947 "configure"
4948 #include "confdefs.h"
4949 #include <${cf_cv_ncurses_header:-curses.h}>
4951 { const char *xx = curses_version(); return (xx == 0); }
4953 rm -f "conftest$ac_exeext"
4954 if { (eval echo "$as_me:4954: \"$ac_link\"") >&5
4955 (eval $ac_link) 2>&5
4957 echo "$as_me:4957: \$? = $ac_status" >&5
4958 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4959 { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4962 echo "$as_me:4962: \$? = $ac_status" >&5
4963 (exit "$ac_status"); }; }; then
4964 cf_have_ncuconfig=yes
4966 echo "$as_me: program exited with status $ac_status" >&5
4967 echo "$as_me: failed program was:" >&5
4968 cat "conftest.$ac_ext" >&5
4969 cf_have_ncuconfig=no
4971 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4974 echo "$as_me: failed program was:" >&5
4975 cat "conftest.$ac_ext" >&5
4976 cf_have_ncuconfig=no
4978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4979 echo "$as_me:4979: result: $cf_have_ncuconfig" >&5
4980 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4981 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4982 if test "$cf_have_ncuconfig" != "yes"
4984 CPPFLAGS="$cf_save_CPPFLAGS"
4985 LIBS="$cf_save_LIBS"
4986 NCURSES_CONFIG_PKG=none
4989 cat >>confdefs.h <<\EOF
4993 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4995 echo "$as_me:4995: checking for terminfo header" >&5
4996 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4997 if test "${cf_cv_term_header+set}" = set; then
4998 echo $ECHO_N "(cached) $ECHO_C" >&6
5001 case "${cf_cv_ncurses_header}" in
5002 (*/ncurses.h|*/ncursesw.h)
5003 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5006 cf_term_header=term.h
5010 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5012 cat >"conftest.$ac_ext" <<_ACEOF
5013 #line 5013 "configure"
5014 #include "confdefs.h"
5016 #include <${cf_cv_ncurses_header:-curses.h}>
5022 int x = auto_left_margin; (void)x
5027 rm -f "conftest.$ac_objext"
5028 if { (eval echo "$as_me:5028: \"$ac_compile\"") >&5
5029 (eval $ac_compile) 2>&5
5031 echo "$as_me:5031: \$? = $ac_status" >&5
5032 (exit "$ac_status"); } &&
5033 { ac_try='test -s "conftest.$ac_objext"'
5034 { (eval echo "$as_me:5034: \"$ac_try\"") >&5
5037 echo "$as_me:5037: \$? = $ac_status" >&5
5038 (exit "$ac_status"); }; }; then
5040 cf_cv_term_header="$cf_test"
5042 echo "$as_me: failed program was:" >&5
5043 cat "conftest.$ac_ext" >&5
5045 cf_cv_term_header=unknown
5048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5049 test "$cf_cv_term_header" != unknown && break
5053 echo "$as_me:5053: result: $cf_cv_term_header" >&5
5054 echo "${ECHO_T}$cf_cv_term_header" >&6
5056 # Set definitions to allow ifdef'ing to accommodate subdirectories
5058 case "$cf_cv_term_header" in
5061 cat >>confdefs.h <<\EOF
5062 #define HAVE_TERM_H 1
5068 case "$cf_cv_term_header" in
5071 cat >>confdefs.h <<\EOF
5072 #define HAVE_NCURSES_TERM_H 1
5078 cat >>confdefs.h <<\EOF
5079 #define HAVE_NCURSESW_TERM_H 1
5088 echo "$as_me:5088: result: no" >&5
5089 echo "${ECHO_T}no" >&6
5090 NCURSES_CONFIG_PKG=none
5093 NCURSES_CONFIG_PKG=none
5096 if test "x$cf_have_ncuconfig" = "xno"; then
5097 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5099 if test -n "$ac_tool_prefix"; then
5100 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5102 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5103 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5104 echo "$as_me:5104: checking for $ac_word" >&5
5105 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5106 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5107 echo $ECHO_N "(cached) $ECHO_C" >&6
5109 if test -n "$NCURSES_CONFIG"; then
5110 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5112 ac_save_IFS=$IFS; IFS=$ac_path_separator
5114 for ac_dir in $ac_dummy; do
5116 test -z "$ac_dir" && ac_dir=.
5117 $as_executable_p "$ac_dir/$ac_word" || continue
5118 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5119 echo "$as_me:5119: found $ac_dir/$ac_word" >&5
5125 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5126 if test -n "$NCURSES_CONFIG"; then
5127 echo "$as_me:5127: result: $NCURSES_CONFIG" >&5
5128 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5130 echo "$as_me:5130: result: no" >&5
5131 echo "${ECHO_T}no" >&6
5134 test -n "$NCURSES_CONFIG" && break
5137 if test -z "$NCURSES_CONFIG"; then
5138 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5139 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142 set dummy $ac_prog; ac_word=$2
5143 echo "$as_me:5143: checking for $ac_word" >&5
5144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5145 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5146 echo $ECHO_N "(cached) $ECHO_C" >&6
5148 if test -n "$ac_ct_NCURSES_CONFIG"; then
5149 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5151 ac_save_IFS=$IFS; IFS=$ac_path_separator
5153 for ac_dir in $ac_dummy; do
5155 test -z "$ac_dir" && ac_dir=.
5156 $as_executable_p "$ac_dir/$ac_word" || continue
5157 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5158 echo "$as_me:5158: found $ac_dir/$ac_word" >&5
5164 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5165 if test -n "$ac_ct_NCURSES_CONFIG"; then
5166 echo "$as_me:5166: result: $ac_ct_NCURSES_CONFIG" >&5
5167 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5169 echo "$as_me:5169: result: no" >&5
5170 echo "${ECHO_T}no" >&6
5173 test -n "$ac_ct_NCURSES_CONFIG" && break
5175 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5177 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5180 if test "$NCURSES_CONFIG" != none ; then
5182 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5184 case "x$cf_add_cflags" in
5187 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5190 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5191 test "$CFLAGS" != "$cf_old_cflag" || break
5193 CFLAGS="$cf_old_cflag"
5196 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5199 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5200 test "$CPPFLAGS" != "$cf_old_cflag" || break
5202 CPPFLAGS="$cf_old_cflag"
5211 cf_new_extra_cppflags=
5213 for cf_add_cflags in $cf_add_cflags
5215 case "$cf_fix_cppflags" in
5217 case "$cf_add_cflags" in
5218 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5219 case "$cf_add_cflags" in
5221 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5223 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5224 && test -z "${cf_tst_cflags}" \
5225 && cf_fix_cppflags=yes
5227 if test "$cf_fix_cppflags" = yes ; then
5229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5233 elif test "${cf_tst_cflags}" = "\"'" ; then
5235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5246 case "$cf_add_cflags" in
5248 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5250 CPPFLAGS=`echo "$CPPFLAGS" | \
5251 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5252 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5257 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5258 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5265 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5266 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5276 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5278 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5279 && test -z "${cf_tst_cflags}" \
5280 && cf_fix_cppflags=no
5285 if test -n "$cf_new_cflags" ; then
5287 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5288 CFLAGS="${CFLAGS}$cf_new_cflags"
5292 if test -n "$cf_new_cppflags" ; then
5294 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5295 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5299 if test -n "$cf_new_extra_cppflags" ; then
5301 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5302 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5311 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5313 for cf_add_1lib in $cf_add_0lib; do
5314 for cf_add_2lib in $cf_add_libs; do
5315 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5320 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5324 # even with config script, some packages use no-override for curses.h
5326 echo "$as_me:5326: checking if we have identified curses headers" >&5
5327 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5328 if test "${cf_cv_ncurses_header+set}" = set; then
5329 echo $ECHO_N "(cached) $ECHO_C" >&6
5332 cf_cv_ncurses_header=none
5334 ncurses.h ncurses/ncurses.h \
5335 curses.h ncurses/curses.h
5337 cat >"conftest.$ac_ext" <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5340 #include <${cf_header}>
5344 initscr(); tgoto("?", 0,0)
5349 rm -f "conftest.$ac_objext"
5350 if { (eval echo "$as_me:5350: \"$ac_compile\"") >&5
5351 (eval $ac_compile) 2>&5
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit "$ac_status"); } &&
5355 { ac_try='test -s "conftest.$ac_objext"'
5356 { (eval echo "$as_me:5356: \"$ac_try\"") >&5
5359 echo "$as_me:5359: \$? = $ac_status" >&5
5360 (exit "$ac_status"); }; }; then
5361 cf_cv_ncurses_header=$cf_header; break
5363 echo "$as_me: failed program was:" >&5
5364 cat "conftest.$ac_ext" >&5
5366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5370 echo "$as_me:5370: result: $cf_cv_ncurses_header" >&5
5371 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5373 if test "$cf_cv_ncurses_header" = none ; then
5374 { { echo "$as_me:5374: error: No curses header-files found" >&5
5375 echo "$as_me: error: No curses header-files found" >&2;}
5376 { (exit 1); exit 1; }; }
5379 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5381 for ac_header in $cf_cv_ncurses_header
5383 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5384 echo "$as_me:5384: checking for $ac_header" >&5
5385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5387 echo $ECHO_N "(cached) $ECHO_C" >&6
5389 cat >"conftest.$ac_ext" <<_ACEOF
5390 #line 5390 "configure"
5391 #include "confdefs.h"
5392 #include <$ac_header>
5394 if { (eval echo "$as_me:5394: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5395 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5397 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5399 cat conftest.err >&5
5400 echo "$as_me:5400: \$? = $ac_status" >&5
5401 (exit "$ac_status"); } >/dev/null; then
5402 if test -s conftest.err; then
5403 ac_cpp_err=$ac_c_preproc_warn_flag
5410 if test -z "$ac_cpp_err"; then
5411 eval "$as_ac_Header=yes"
5413 echo "$as_me: failed program was:" >&5
5414 cat "conftest.$ac_ext" >&5
5415 eval "$as_ac_Header=no"
5417 rm -f conftest.err "conftest.$ac_ext"
5419 echo "$as_me:5419: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5420 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5421 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5422 cat >>confdefs.h <<EOF
5423 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5429 cat >>confdefs.h <<\EOF
5433 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5435 cat >>confdefs.h <<EOF
5436 #define $cf_nculib_ROOT 1
5439 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5443 cf_ncuhdr_root=ncurses
5445 test -n "$cf_cv_curses_dir" && \
5446 test "$cf_cv_curses_dir" != "no" && { \
5448 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5449 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5451 while test "$cf_add_incdir" != /usr/include
5453 if test -d "$cf_add_incdir"
5456 if test -n "$CFLAGS$CPPFLAGS" ; then
5457 # a loop is needed to ensure we can add subdirs of existing dirs
5458 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5459 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5460 cf_have_incdir=yes; break
5465 if test "$cf_have_incdir" = no ; then
5466 if test "$cf_add_incdir" = /usr/local/include ; then
5467 if test "$GCC" = yes
5469 cf_save_CPPFLAGS=$CPPFLAGS
5471 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5472 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5474 cat >"conftest.$ac_ext" <<_ACEOF
5475 #line 5475 "configure"
5476 #include "confdefs.h"
5486 rm -f "conftest.$ac_objext"
5487 if { (eval echo "$as_me:5487: \"$ac_compile\"") >&5
5488 (eval $ac_compile) 2>&5
5490 echo "$as_me:5490: \$? = $ac_status" >&5
5491 (exit "$ac_status"); } &&
5492 { ac_try='test -s "conftest.$ac_objext"'
5493 { (eval echo "$as_me:5493: \"$ac_try\"") >&5
5496 echo "$as_me:5496: \$? = $ac_status" >&5
5497 (exit "$ac_status"); }; }; then
5500 echo "$as_me: failed program was:" >&5
5501 cat "conftest.$ac_ext" >&5
5504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5505 CPPFLAGS=$cf_save_CPPFLAGS
5510 if test "$cf_have_incdir" = no ; then
5511 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5513 echo "${as_me:-configure}:5513: testing adding $cf_add_incdir to include-path ..." 1>&5
5515 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5517 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5518 test "$cf_top_incdir" = "$cf_add_incdir" && break
5519 cf_add_incdir="$cf_top_incdir"
5532 echo "$as_me:5532: checking for $cf_ncuhdr_root header in include-path" >&5
5533 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5534 if test "${cf_cv_ncurses_h+set}" = set; then
5535 echo $ECHO_N "(cached) $ECHO_C" >&6
5538 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5539 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5540 for cf_header in $cf_header_list
5543 cat >"conftest.$ac_ext" <<_ACEOF
5544 #line 5544 "configure"
5545 #include "confdefs.h"
5547 #include <$cf_header>
5552 #ifdef NCURSES_VERSION
5554 printf("%s\\n", NCURSES_VERSION);
5567 rm -f "conftest.$ac_objext"
5568 if { (eval echo "$as_me:5568: \"$ac_compile\"") >&5
5569 (eval $ac_compile) 2>&5
5571 echo "$as_me:5571: \$? = $ac_status" >&5
5572 (exit "$ac_status"); } &&
5573 { ac_try='test -s "conftest.$ac_objext"'
5574 { (eval echo "$as_me:5574: \"$ac_try\"") >&5
5577 echo "$as_me:5577: \$? = $ac_status" >&5
5578 (exit "$ac_status"); }; }; then
5579 cf_cv_ncurses_h=$cf_header
5582 echo "$as_me: failed program was:" >&5
5583 cat "conftest.$ac_ext" >&5
5586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5588 test "$cf_cv_ncurses_h" != no && break
5592 echo "$as_me:5592: result: $cf_cv_ncurses_h" >&5
5593 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5595 if test "$cf_cv_ncurses_h" != no ; then
5596 cf_cv_ncurses_header=$cf_cv_ncurses_h
5599 echo "$as_me:5599: checking for $cf_ncuhdr_root include-path" >&5
5600 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5601 if test "${cf_cv_ncurses_h2+set}" = set; then
5602 echo $ECHO_N "(cached) $ECHO_C" >&6
5605 test -n "$verbose" && echo
5609 # collect the current set of include-directories from compiler flags
5610 cf_header_path_list=""
5611 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5612 for cf_header_path in $CPPFLAGS $CFLAGS
5614 case "$cf_header_path" in
5616 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5618 test "x$cf_header_path" != "xNONE" && \
5619 test -d "$cf_header_path" && \
5621 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5622 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5623 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5624 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5625 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5626 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"
5629 cf_header_path_list="$cf_header_path_list $cf_search"
5635 # add the variations for the package we are looking for
5639 test "x$prefix" != "xNONE" && \
5640 test -d "$prefix" && \
5642 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5643 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5644 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5645 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5646 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5647 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5650 for cf_subdir_prefix in \
5659 test "x$cf_subdir_prefix" != "x$prefix" && \
5660 test -d "$cf_subdir_prefix" && \
5661 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5662 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5663 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5664 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5665 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5666 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5667 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"
5672 test "$includedir" != NONE && \
5673 test "$includedir" != "/usr/include" && \
5674 test -d "$includedir" && {
5675 test -d "$includedir" && cf_search="$cf_search $includedir"
5676 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5679 test "$oldincludedir" != NONE && \
5680 test "$oldincludedir" != "/usr/include" && \
5681 test -d "$oldincludedir" && {
5682 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5683 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5686 cf_search="$cf_search $cf_header_path_list"
5688 test -n "$verbose" && echo "search path $cf_search"
5689 cf_save2_CPPFLAGS="$CPPFLAGS"
5690 for cf_incdir in $cf_search
5693 if test -n "$cf_incdir" ; then
5694 for cf_add_incdir in $cf_incdir
5696 while test "$cf_add_incdir" != /usr/include
5698 if test -d "$cf_add_incdir"
5701 if test -n "$CFLAGS$CPPFLAGS" ; then
5702 # a loop is needed to ensure we can add subdirs of existing dirs
5703 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5704 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5705 cf_have_incdir=yes; break
5710 if test "$cf_have_incdir" = no ; then
5711 if test "$cf_add_incdir" = /usr/local/include ; then
5712 if test "$GCC" = yes
5714 cf_save_CPPFLAGS=$CPPFLAGS
5716 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5717 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5719 cat >"conftest.$ac_ext" <<_ACEOF
5720 #line 5720 "configure"
5721 #include "confdefs.h"
5731 rm -f "conftest.$ac_objext"
5732 if { (eval echo "$as_me:5732: \"$ac_compile\"") >&5
5733 (eval $ac_compile) 2>&5
5735 echo "$as_me:5735: \$? = $ac_status" >&5
5736 (exit "$ac_status"); } &&
5737 { ac_try='test -s "conftest.$ac_objext"'
5738 { (eval echo "$as_me:5738: \"$ac_try\"") >&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit "$ac_status"); }; }; then
5745 echo "$as_me: failed program was:" >&5
5746 cat "conftest.$ac_ext" >&5
5749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5750 CPPFLAGS=$cf_save_CPPFLAGS
5755 if test "$cf_have_incdir" = no ; then
5756 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5758 echo "${as_me:-configure}:5758: testing adding $cf_add_incdir to include-path ..." 1>&5
5760 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5762 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5763 test "$cf_top_incdir" = "$cf_add_incdir" && break
5764 cf_add_incdir="$cf_top_incdir"
5780 cat >"conftest.$ac_ext" <<_ACEOF
5781 #line 5781 "configure"
5782 #include "confdefs.h"
5784 #include <$cf_header>
5789 #ifdef NCURSES_VERSION
5791 printf("%s\\n", NCURSES_VERSION);
5804 rm -f "conftest.$ac_objext"
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806 (eval $ac_compile) 2>&5
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit "$ac_status"); } &&
5810 { ac_try='test -s "conftest.$ac_objext"'
5811 { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5814 echo "$as_me:5814: \$? = $ac_status" >&5
5815 (exit "$ac_status"); }; }; then
5816 cf_cv_ncurses_h2=$cf_header
5819 echo "$as_me: failed program was:" >&5
5820 cat "conftest.$ac_ext" >&5
5823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5825 if test "$cf_cv_ncurses_h2" != no ; then
5826 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5827 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5830 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5832 CPPFLAGS="$cf_save2_CPPFLAGS"
5833 test "$cf_cv_ncurses_h2" != no && break
5835 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5835: error: not found" >&5
5836 echo "$as_me: error: not found" >&2;}
5837 { (exit 1); exit 1; }; }
5840 echo "$as_me:5840: result: $cf_cv_ncurses_h2" >&5
5841 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5843 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5844 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5845 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5846 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5849 if test -n "$cf_1st_incdir" ; then
5850 for cf_add_incdir in $cf_1st_incdir
5852 while test "$cf_add_incdir" != /usr/include
5854 if test -d "$cf_add_incdir"
5857 if test -n "$CFLAGS$CPPFLAGS" ; then
5858 # a loop is needed to ensure we can add subdirs of existing dirs
5859 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5860 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5861 cf_have_incdir=yes; break
5866 if test "$cf_have_incdir" = no ; then
5867 if test "$cf_add_incdir" = /usr/local/include ; then
5868 if test "$GCC" = yes
5870 cf_save_CPPFLAGS=$CPPFLAGS
5872 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5873 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5875 cat >"conftest.$ac_ext" <<_ACEOF
5876 #line 5876 "configure"
5877 #include "confdefs.h"
5887 rm -f "conftest.$ac_objext"
5888 if { (eval echo "$as_me:5888: \"$ac_compile\"") >&5
5889 (eval $ac_compile) 2>&5
5891 echo "$as_me:5891: \$? = $ac_status" >&5
5892 (exit "$ac_status"); } &&
5893 { ac_try='test -s "conftest.$ac_objext"'
5894 { (eval echo "$as_me:5894: \"$ac_try\"") >&5
5897 echo "$as_me:5897: \$? = $ac_status" >&5
5898 (exit "$ac_status"); }; }; then
5901 echo "$as_me: failed program was:" >&5
5902 cat "conftest.$ac_ext" >&5
5905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5906 CPPFLAGS=$cf_save_CPPFLAGS
5911 if test "$cf_have_incdir" = no ; then
5912 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5914 echo "${as_me:-configure}:5914: testing adding $cf_add_incdir to include-path ..." 1>&5
5916 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5918 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5919 test "$cf_top_incdir" = "$cf_add_incdir" && break
5920 cf_add_incdir="$cf_top_incdir"
5933 # Set definitions to allow ifdef'ing for ncurses.h
5935 case "$cf_cv_ncurses_header" in
5938 cat >>confdefs.h <<\EOF
5939 #define HAVE_NCURSES_H 1
5945 case "$cf_cv_ncurses_header" in
5946 (ncurses/curses.h|ncurses/ncurses.h)
5948 cat >>confdefs.h <<\EOF
5949 #define HAVE_NCURSES_NCURSES_H 1
5953 (ncursesw/curses.h|ncursesw/ncurses.h)
5955 cat >>confdefs.h <<\EOF
5956 #define HAVE_NCURSESW_NCURSES_H 1
5962 echo "$as_me:5962: checking for terminfo header" >&5
5963 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5964 if test "${cf_cv_term_header+set}" = set; then
5965 echo $ECHO_N "(cached) $ECHO_C" >&6
5968 case "${cf_cv_ncurses_header}" in
5969 (*/ncurses.h|*/ncursesw.h)
5970 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5973 cf_term_header=term.h
5977 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5979 cat >"conftest.$ac_ext" <<_ACEOF
5980 #line 5980 "configure"
5981 #include "confdefs.h"
5983 #include <${cf_cv_ncurses_header:-curses.h}>
5989 int x = auto_left_margin; (void)x
5994 rm -f "conftest.$ac_objext"
5995 if { (eval echo "$as_me:5995: \"$ac_compile\"") >&5
5996 (eval $ac_compile) 2>&5
5998 echo "$as_me:5998: \$? = $ac_status" >&5
5999 (exit "$ac_status"); } &&
6000 { ac_try='test -s "conftest.$ac_objext"'
6001 { (eval echo "$as_me:6001: \"$ac_try\"") >&5
6004 echo "$as_me:6004: \$? = $ac_status" >&5
6005 (exit "$ac_status"); }; }; then
6007 cf_cv_term_header="$cf_test"
6009 echo "$as_me: failed program was:" >&5
6010 cat "conftest.$ac_ext" >&5
6012 cf_cv_term_header=unknown
6015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6016 test "$cf_cv_term_header" != unknown && break
6020 echo "$as_me:6020: result: $cf_cv_term_header" >&5
6021 echo "${ECHO_T}$cf_cv_term_header" >&6
6023 # Set definitions to allow ifdef'ing to accommodate subdirectories
6025 case "$cf_cv_term_header" in
6028 cat >>confdefs.h <<\EOF
6029 #define HAVE_TERM_H 1
6035 case "$cf_cv_term_header" in
6038 cat >>confdefs.h <<\EOF
6039 #define HAVE_NCURSES_TERM_H 1
6045 cat >>confdefs.h <<\EOF
6046 #define HAVE_NCURSESW_TERM_H 1
6052 # some applications need this, but should check for NCURSES_VERSION
6054 cat >>confdefs.h <<\EOF
6058 echo "$as_me:6058: checking for ncurses version" >&5
6059 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6060 if test "${cf_cv_ncurses_version+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
6064 cf_cv_ncurses_version=no
6066 rm -f "$cf_tempfile"
6067 if test "$cross_compiling" = yes; then
6069 # This will not work if the preprocessor splits the line after the
6070 # Autoconf token. The 'unproto' program does that.
6071 cat > "conftest.$ac_ext" <<EOF
6072 #include <${cf_cv_ncurses_header:-curses.h}>
6074 #ifdef NCURSES_VERSION
6075 Autoconf NCURSES_VERSION
6083 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6084 { (eval echo "$as_me:6084: \"$cf_try\"") >&5
6087 echo "$as_me:6087: \$? = $ac_status" >&5
6088 (exit "$ac_status"); }
6089 if test -f conftest.out ; then
6090 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6091 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6096 cat >"conftest.$ac_ext" <<_ACEOF
6097 #line 6097 "configure"
6098 #include "confdefs.h"
6100 #include <${cf_cv_ncurses_header:-curses.h}>
6104 FILE *fp = fopen("$cf_tempfile", "w");
6105 #ifdef NCURSES_VERSION
6106 # ifdef NCURSES_VERSION_PATCH
6107 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6109 fprintf(fp, "%s\\n", NCURSES_VERSION);
6113 fprintf(fp, "old\\n");
6118 ${cf_cv_main_return:-return}(0);
6121 rm -f "conftest$ac_exeext"
6122 if { (eval echo "$as_me:6122: \"$ac_link\"") >&5
6123 (eval $ac_link) 2>&5
6125 echo "$as_me:6125: \$? = $ac_status" >&5
6126 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6127 { (eval echo "$as_me:6127: \"$ac_try\"") >&5
6130 echo "$as_me:6130: \$? = $ac_status" >&5
6131 (exit "$ac_status"); }; }; then
6133 cf_cv_ncurses_version=`cat $cf_tempfile`
6135 echo "$as_me: program exited with status $ac_status" >&5
6136 echo "$as_me: failed program was:" >&5
6137 cat "conftest.$ac_ext" >&5
6139 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6141 rm -f "$cf_tempfile"
6144 echo "$as_me:6144: result: $cf_cv_ncurses_version" >&5
6145 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6146 test "$cf_cv_ncurses_version" = no ||
6147 cat >>confdefs.h <<\EOF
6151 cf_nculib_root=ncurses
6152 # This works, except for the special case where we find gpm, but
6153 # ncurses is in a nonstandard location via $LIBS, and we really want
6156 cf_ncurses_SAVE="$LIBS"
6157 echo "$as_me:6157: checking for Gpm_Open in -lgpm" >&5
6158 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6159 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6160 echo $ECHO_N "(cached) $ECHO_C" >&6
6162 ac_check_lib_save_LIBS=$LIBS
6164 cat >"conftest.$ac_ext" <<_ACEOF
6165 #line 6165 "configure"
6166 #include "confdefs.h"
6168 /* Override any gcc2 internal prototype to avoid an error. */
6172 /* We use char because int might match the return type of a gcc2
6173 builtin and then its argument prototype would still apply. */
6183 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6184 if { (eval echo "$as_me:6184: \"$ac_link\"") >&5
6185 (eval $ac_link) 2>&5
6187 echo "$as_me:6187: \$? = $ac_status" >&5
6188 (exit "$ac_status"); } &&
6189 { ac_try='test -s "conftest$ac_exeext"'
6190 { (eval echo "$as_me:6190: \"$ac_try\"") >&5
6193 echo "$as_me:6193: \$? = $ac_status" >&5
6194 (exit "$ac_status"); }; }; then
6195 ac_cv_lib_gpm_Gpm_Open=yes
6197 echo "$as_me: failed program was:" >&5
6198 cat "conftest.$ac_ext" >&5
6199 ac_cv_lib_gpm_Gpm_Open=no
6201 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6202 LIBS=$ac_check_lib_save_LIBS
6204 echo "$as_me:6204: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6205 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6206 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6207 echo "$as_me:6207: checking for initscr in -lgpm" >&5
6208 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6209 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6210 echo $ECHO_N "(cached) $ECHO_C" >&6
6212 ac_check_lib_save_LIBS=$LIBS
6214 cat >"conftest.$ac_ext" <<_ACEOF
6215 #line 6215 "configure"
6216 #include "confdefs.h"
6218 /* Override any gcc2 internal prototype to avoid an error. */
6222 /* We use char because int might match the return type of a gcc2
6223 builtin and then its argument prototype would still apply. */
6233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6234 if { (eval echo "$as_me:6234: \"$ac_link\"") >&5
6235 (eval $ac_link) 2>&5
6237 echo "$as_me:6237: \$? = $ac_status" >&5
6238 (exit "$ac_status"); } &&
6239 { ac_try='test -s "conftest$ac_exeext"'
6240 { (eval echo "$as_me:6240: \"$ac_try\"") >&5
6243 echo "$as_me:6243: \$? = $ac_status" >&5
6244 (exit "$ac_status"); }; }; then
6245 ac_cv_lib_gpm_initscr=yes
6247 echo "$as_me: failed program was:" >&5
6248 cat "conftest.$ac_ext" >&5
6249 ac_cv_lib_gpm_initscr=no
6251 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6252 LIBS=$ac_check_lib_save_LIBS
6254 echo "$as_me:6254: result: $ac_cv_lib_gpm_initscr" >&5
6255 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6256 if test "$ac_cv_lib_gpm_initscr" = yes; then
6257 LIBS="$cf_ncurses_SAVE"
6259 cf_ncurses_LIBS="-lgpm"
6266 # This is only necessary if you are linking against an obsolete
6267 # version of ncurses (but it should do no harm, since it is static).
6268 if test "$cf_nculib_root" = ncurses ; then
6269 echo "$as_me:6269: checking for tgoto in -lmytinfo" >&5
6270 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6271 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6272 echo $ECHO_N "(cached) $ECHO_C" >&6
6274 ac_check_lib_save_LIBS=$LIBS
6275 LIBS="-lmytinfo $LIBS"
6276 cat >"conftest.$ac_ext" <<_ACEOF
6277 #line 6277 "configure"
6278 #include "confdefs.h"
6280 /* Override any gcc2 internal prototype to avoid an error. */
6284 /* We use char because int might match the return type of a gcc2
6285 builtin and then its argument prototype would still apply. */
6295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6296 if { (eval echo "$as_me:6296: \"$ac_link\"") >&5
6297 (eval $ac_link) 2>&5
6299 echo "$as_me:6299: \$? = $ac_status" >&5
6300 (exit "$ac_status"); } &&
6301 { ac_try='test -s "conftest$ac_exeext"'
6302 { (eval echo "$as_me:6302: \"$ac_try\"") >&5
6305 echo "$as_me:6305: \$? = $ac_status" >&5
6306 (exit "$ac_status"); }; }; then
6307 ac_cv_lib_mytinfo_tgoto=yes
6309 echo "$as_me: failed program was:" >&5
6310 cat "conftest.$ac_ext" >&5
6311 ac_cv_lib_mytinfo_tgoto=no
6313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6314 LIBS=$ac_check_lib_save_LIBS
6316 echo "$as_me:6316: result: $ac_cv_lib_mytinfo_tgoto" >&5
6317 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6318 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6319 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6329 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6331 for cf_add_1lib in $cf_add_0lib; do
6332 for cf_add_2lib in $cf_add_libs; do
6333 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6338 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6342 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6348 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6350 for cf_add_1lib in $cf_add_0lib; do
6351 for cf_add_2lib in $cf_add_libs; do
6352 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6357 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6363 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6365 echo "$as_me:6365: checking for initscr" >&5
6366 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6367 if test "${ac_cv_func_initscr+set}" = set; then
6368 echo $ECHO_N "(cached) $ECHO_C" >&6
6370 cat >"conftest.$ac_ext" <<_ACEOF
6371 #line 6371 "configure"
6372 #include "confdefs.h"
6373 #define initscr autoconf_temporary
6374 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6381 /* We use char because int might match the return type of a gcc2
6382 builtin and then its argument prototype would still apply. */
6383 char initscr (void);
6389 /* The GNU C library defines stubs for functions which it implements
6390 to always fail with ENOSYS. Some functions are actually named
6391 something starting with __ and the normal name is an alias. */
6392 #if defined (__stub_initscr) || defined (__stub___initscr)
6393 #error found stub for initscr
6401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6402 if { (eval echo "$as_me:6402: \"$ac_link\"") >&5
6403 (eval $ac_link) 2>&5
6405 echo "$as_me:6405: \$? = $ac_status" >&5
6406 (exit "$ac_status"); } &&
6407 { ac_try='test -s "conftest$ac_exeext"'
6408 { (eval echo "$as_me:6408: \"$ac_try\"") >&5
6411 echo "$as_me:6411: \$? = $ac_status" >&5
6412 (exit "$ac_status"); }; }; then
6413 ac_cv_func_initscr=yes
6415 echo "$as_me: failed program was:" >&5
6416 cat "conftest.$ac_ext" >&5
6417 ac_cv_func_initscr=no
6419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6421 echo "$as_me:6421: result: $ac_cv_func_initscr" >&5
6422 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6423 if test "$ac_cv_func_initscr" = yes; then
6424 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6427 cf_save_LIBS="$LIBS"
6428 echo "$as_me:6428: checking for initscr in -l$cf_nculib_root" >&5
6429 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6430 LIBS="-l$cf_nculib_root $LIBS"
6431 cat >"conftest.$ac_ext" <<_ACEOF
6432 #line 6432 "configure"
6433 #include "confdefs.h"
6434 #include <${cf_cv_ncurses_header:-curses.h}>
6443 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6444 if { (eval echo "$as_me:6444: \"$ac_link\"") >&5
6445 (eval $ac_link) 2>&5
6447 echo "$as_me:6447: \$? = $ac_status" >&5
6448 (exit "$ac_status"); } &&
6449 { ac_try='test -s "conftest$ac_exeext"'
6450 { (eval echo "$as_me:6450: \"$ac_try\"") >&5
6453 echo "$as_me:6453: \$? = $ac_status" >&5
6454 (exit "$ac_status"); }; }; then
6455 echo "$as_me:6455: result: yes" >&5
6456 echo "${ECHO_T}yes" >&6
6457 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6460 echo "$as_me: failed program was:" >&5
6461 cat "conftest.$ac_ext" >&5
6462 echo "$as_me:6462: result: no" >&5
6463 echo "${ECHO_T}no" >&6
6466 cf_library_path_list=""
6467 if test -n "${LDFLAGS}${LIBS}" ; then
6468 for cf_library_path in $LDFLAGS $LIBS
6470 case "$cf_library_path" in
6472 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6474 test "x$cf_library_path" != "xNONE" && \
6475 test -d "$cf_library_path" && \
6477 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6478 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6479 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6480 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6481 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6482 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"
6485 cf_library_path_list="$cf_library_path_list $cf_search"
6493 test "x$prefix" != "xNONE" && \
6494 test -d "$prefix" && \
6496 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6497 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6498 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6499 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6500 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6501 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6504 for cf_subdir_prefix in \
6513 test "x$cf_subdir_prefix" != "x$prefix" && \
6514 test -d "$cf_subdir_prefix" && \
6515 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6516 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6517 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6518 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6519 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6520 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6521 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"
6526 cf_search="$cf_library_path_list $cf_search"
6528 for cf_libdir in $cf_search
6530 echo "$as_me:6530: checking for -l$cf_nculib_root in $cf_libdir" >&5
6531 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6532 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6533 cat >"conftest.$ac_ext" <<_ACEOF
6534 #line 6534 "configure"
6535 #include "confdefs.h"
6536 #include <${cf_cv_ncurses_header:-curses.h}>
6545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6546 if { (eval echo "$as_me:6546: \"$ac_link\"") >&5
6547 (eval $ac_link) 2>&5
6549 echo "$as_me:6549: \$? = $ac_status" >&5
6550 (exit "$ac_status"); } &&
6551 { ac_try='test -s "conftest$ac_exeext"'
6552 { (eval echo "$as_me:6552: \"$ac_try\"") >&5
6555 echo "$as_me:6555: \$? = $ac_status" >&5
6556 (exit "$ac_status"); }; }; then
6557 echo "$as_me:6557: result: yes" >&5
6558 echo "${ECHO_T}yes" >&6
6559 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6562 echo "$as_me: failed program was:" >&5
6563 cat "conftest.$ac_ext" >&5
6564 echo "$as_me:6564: result: no" >&5
6565 echo "${ECHO_T}no" >&6
6566 LIBS="$cf_save_LIBS"
6568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6576 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6578 if test "$cf_found_library" = no ; then
6579 { { echo "$as_me:6579: error: Cannot link $cf_nculib_root library" >&5
6580 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6581 { (exit 1); exit 1; }; }
6586 if test -n "$cf_ncurses_LIBS" ; then
6587 echo "$as_me:6587: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6588 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6589 cf_ncurses_SAVE="$LIBS"
6590 for p in $cf_ncurses_LIBS ; do
6591 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6592 if test "$q" != "$LIBS" ; then
6596 cat >"conftest.$ac_ext" <<_ACEOF
6597 #line 6597 "configure"
6598 #include "confdefs.h"
6599 #include <${cf_cv_ncurses_header:-curses.h}>
6603 initscr(); mousemask(0,0); tigetstr((char *)0);
6608 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6609 if { (eval echo "$as_me:6609: \"$ac_link\"") >&5
6610 (eval $ac_link) 2>&5
6612 echo "$as_me:6612: \$? = $ac_status" >&5
6613 (exit "$ac_status"); } &&
6614 { ac_try='test -s "conftest$ac_exeext"'
6615 { (eval echo "$as_me:6615: \"$ac_try\"") >&5
6618 echo "$as_me:6618: \$? = $ac_status" >&5
6619 (exit "$ac_status"); }; }; then
6620 echo "$as_me:6620: result: yes" >&5
6621 echo "${ECHO_T}yes" >&6
6623 echo "$as_me: failed program was:" >&5
6624 cat "conftest.$ac_ext" >&5
6625 echo "$as_me:6625: result: no" >&5
6626 echo "${ECHO_T}no" >&6
6627 LIBS="$cf_ncurses_SAVE"
6629 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6632 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6634 cat >>confdefs.h <<EOF
6635 #define $cf_nculib_ROOT 1
6643 echo "$as_me:6643: checking if you want wide-character code" >&5
6644 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6646 # Check whether --enable-widec or --disable-widec was given.
6647 if test "${enable_widec+set}" = set; then
6648 enableval="$enable_widec"
6649 with_widec=$enableval
6653 echo "$as_me:6653: result: $with_widec" >&5
6654 echo "${ECHO_T}$with_widec" >&6
6655 if test "$with_widec" = yes ; then
6657 for ac_header in wchar.h
6659 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6660 echo "$as_me:6660: checking for $ac_header" >&5
6661 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6662 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6663 echo $ECHO_N "(cached) $ECHO_C" >&6
6665 cat >"conftest.$ac_ext" <<_ACEOF
6666 #line 6666 "configure"
6667 #include "confdefs.h"
6668 #include <$ac_header>
6670 if { (eval echo "$as_me:6670: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6671 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6673 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6675 cat conftest.err >&5
6676 echo "$as_me:6676: \$? = $ac_status" >&5
6677 (exit "$ac_status"); } >/dev/null; then
6678 if test -s conftest.err; then
6679 ac_cpp_err=$ac_c_preproc_warn_flag
6686 if test -z "$ac_cpp_err"; then
6687 eval "$as_ac_Header=yes"
6689 echo "$as_me: failed program was:" >&5
6690 cat "conftest.$ac_ext" >&5
6691 eval "$as_ac_Header=no"
6693 rm -f conftest.err "conftest.$ac_ext"
6695 echo "$as_me:6695: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6696 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6697 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6698 cat >>confdefs.h <<EOF
6699 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6705 echo "$as_me:6705: checking for multibyte character support" >&5
6706 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6707 if test "${cf_cv_utf8_lib+set}" = set; then
6708 echo $ECHO_N "(cached) $ECHO_C" >&6
6711 cf_save_LIBS="$LIBS"
6712 cat >"conftest.$ac_ext" <<_ACEOF
6713 #line 6713 "configure"
6714 #include "confdefs.h"
6730 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6731 if { (eval echo "$as_me:6731: \"$ac_link\"") >&5
6732 (eval $ac_link) 2>&5
6734 echo "$as_me:6734: \$? = $ac_status" >&5
6735 (exit "$ac_status"); } &&
6736 { ac_try='test -s "conftest$ac_exeext"'
6737 { (eval echo "$as_me:6737: \"$ac_try\"") >&5
6740 echo "$as_me:6740: \$? = $ac_status" >&5
6741 (exit "$ac_status"); }; }; then
6744 echo "$as_me: failed program was:" >&5
6745 cat "conftest.$ac_ext" >&5
6747 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6748 # will be set on completion of the AC_TRY_LINK below.
6749 cf_cv_header_path_utf8=
6750 cf_cv_library_path_utf8=
6752 echo "${as_me:-configure}:6752: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6754 cf_save_LIBS="$LIBS"
6756 cat >"conftest.$ac_ext" <<_ACEOF
6757 #line 6757 "configure"
6758 #include "confdefs.h"
6760 #include <libutf8.h>
6769 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6770 if { (eval echo "$as_me:6770: \"$ac_link\"") >&5
6771 (eval $ac_link) 2>&5
6773 echo "$as_me:6773: \$? = $ac_status" >&5
6774 (exit "$ac_status"); } &&
6775 { ac_try='test -s "conftest$ac_exeext"'
6776 { (eval echo "$as_me:6776: \"$ac_try\"") >&5
6779 echo "$as_me:6779: \$? = $ac_status" >&5
6780 (exit "$ac_status"); }; }; then
6782 cf_cv_find_linkage_utf8=yes
6783 cf_cv_header_path_utf8=/usr/include
6784 cf_cv_library_path_utf8=/usr/lib
6787 echo "$as_me: failed program was:" >&5
6788 cat "conftest.$ac_ext" >&5
6790 LIBS="-lutf8 $cf_save_LIBS"
6792 cat >"conftest.$ac_ext" <<_ACEOF
6793 #line 6793 "configure"
6794 #include "confdefs.h"
6796 #include <libutf8.h>
6805 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6806 if { (eval echo "$as_me:6806: \"$ac_link\"") >&5
6807 (eval $ac_link) 2>&5
6809 echo "$as_me:6809: \$? = $ac_status" >&5
6810 (exit "$ac_status"); } &&
6811 { ac_try='test -s "conftest$ac_exeext"'
6812 { (eval echo "$as_me:6812: \"$ac_try\"") >&5
6815 echo "$as_me:6815: \$? = $ac_status" >&5
6816 (exit "$ac_status"); }; }; then
6818 cf_cv_find_linkage_utf8=yes
6819 cf_cv_header_path_utf8=/usr/include
6820 cf_cv_library_path_utf8=/usr/lib
6821 cf_cv_library_file_utf8="-lutf8"
6824 echo "$as_me: failed program was:" >&5
6825 cat "conftest.$ac_ext" >&5
6827 cf_cv_find_linkage_utf8=no
6828 LIBS="$cf_save_LIBS"
6830 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6832 echo "${as_me:-configure}:6832: testing find linkage for utf8 library ..." 1>&5
6834 echo "${as_me:-configure}:6834: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6836 cf_save_CPPFLAGS="$CPPFLAGS"
6837 cf_test_CPPFLAGS="$CPPFLAGS"
6841 # collect the current set of include-directories from compiler flags
6842 cf_header_path_list=""
6843 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6844 for cf_header_path in $CPPFLAGS $CFLAGS
6846 case "$cf_header_path" in
6848 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6850 test "x$cf_header_path" != "xNONE" && \
6851 test -d "$cf_header_path" && \
6853 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6854 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6855 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6856 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6857 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6858 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6861 cf_header_path_list="$cf_header_path_list $cf_search"
6867 # add the variations for the package we are looking for
6871 test "x$prefix" != "xNONE" && \
6872 test -d "$prefix" && \
6874 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6875 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6876 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6877 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6878 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6879 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6882 for cf_subdir_prefix in \
6891 test "x$cf_subdir_prefix" != "x$prefix" && \
6892 test -d "$cf_subdir_prefix" && \
6893 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6894 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6895 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6896 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6897 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6898 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6899 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6904 test "$includedir" != NONE && \
6905 test "$includedir" != "/usr/include" && \
6906 test -d "$includedir" && {
6907 test -d "$includedir" && cf_search="$cf_search $includedir"
6908 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6911 test "$oldincludedir" != NONE && \
6912 test "$oldincludedir" != "/usr/include" && \
6913 test -d "$oldincludedir" && {
6914 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6915 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6918 cf_search="$cf_search $cf_header_path_list"
6920 for cf_cv_header_path_utf8 in $cf_search
6922 if test -d "$cf_cv_header_path_utf8" ; then
6923 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6925 echo "${as_me:-configure}:6925: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6927 CPPFLAGS="$cf_save_CPPFLAGS"
6929 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6930 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6932 cat >"conftest.$ac_ext" <<_ACEOF
6933 #line 6933 "configure"
6934 #include "confdefs.h"
6936 #include <libutf8.h>
6945 rm -f "conftest.$ac_objext"
6946 if { (eval echo "$as_me:6946: \"$ac_compile\"") >&5
6947 (eval $ac_compile) 2>&5
6949 echo "$as_me:6949: \$? = $ac_status" >&5
6950 (exit "$ac_status"); } &&
6951 { ac_try='test -s "conftest.$ac_objext"'
6952 { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6955 echo "$as_me:6955: \$? = $ac_status" >&5
6956 (exit "$ac_status"); }; }; then
6958 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6960 echo "${as_me:-configure}:6960: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6962 cf_cv_find_linkage_utf8=maybe
6963 cf_test_CPPFLAGS="$CPPFLAGS"
6966 echo "$as_me: failed program was:" >&5
6967 cat "conftest.$ac_ext" >&5
6969 CPPFLAGS="$cf_save_CPPFLAGS"
6972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6976 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6978 echo "${as_me:-configure}:6978: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6980 cf_save_LIBS="$LIBS"
6981 cf_save_LDFLAGS="$LDFLAGS"
6983 if test "$cf_cv_find_linkage_utf8" != yes ; then
6986 cf_library_path_list=""
6987 if test -n "${LDFLAGS}${LIBS}" ; then
6988 for cf_library_path in $LDFLAGS $LIBS
6990 case "$cf_library_path" in
6992 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6994 test "x$cf_library_path" != "xNONE" && \
6995 test -d "$cf_library_path" && \
6997 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6998 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6999 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7000 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7001 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7002 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7005 cf_library_path_list="$cf_library_path_list $cf_search"
7013 test "x$prefix" != "xNONE" && \
7014 test -d "$prefix" && \
7016 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7017 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7018 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7019 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7020 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7021 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7024 for cf_subdir_prefix in \
7033 test "x$cf_subdir_prefix" != "x$prefix" && \
7034 test -d "$cf_subdir_prefix" && \
7035 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7036 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7037 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7038 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7039 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7040 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7041 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7046 cf_search="$cf_library_path_list $cf_search"
7048 for cf_cv_library_path_utf8 in $cf_search
7050 if test -d "$cf_cv_library_path_utf8" ; then
7051 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7053 echo "${as_me:-configure}:7053: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7055 CPPFLAGS="$cf_test_CPPFLAGS"
7056 LIBS="-lutf8 $cf_save_LIBS"
7057 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7058 cat >"conftest.$ac_ext" <<_ACEOF
7059 #line 7059 "configure"
7060 #include "confdefs.h"
7062 #include <libutf8.h>
7071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7072 if { (eval echo "$as_me:7072: \"$ac_link\"") >&5
7073 (eval $ac_link) 2>&5
7075 echo "$as_me:7075: \$? = $ac_status" >&5
7076 (exit "$ac_status"); } &&
7077 { ac_try='test -s "conftest$ac_exeext"'
7078 { (eval echo "$as_me:7078: \"$ac_try\"") >&5
7081 echo "$as_me:7081: \$? = $ac_status" >&5
7082 (exit "$ac_status"); }; }; then
7084 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7086 echo "${as_me:-configure}:7086: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7088 cf_cv_find_linkage_utf8=yes
7089 cf_cv_library_file_utf8="-lutf8"
7092 echo "$as_me: failed program was:" >&5
7093 cat "conftest.$ac_ext" >&5
7095 CPPFLAGS="$cf_save_CPPFLAGS"
7096 LIBS="$cf_save_LIBS"
7097 LDFLAGS="$cf_save_LDFLAGS"
7100 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7103 CPPFLAGS="$cf_save_CPPFLAGS"
7104 LDFLAGS="$cf_save_LDFLAGS"
7108 cf_cv_find_linkage_utf8=no
7112 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7115 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7117 LIBS="$cf_save_LIBS"
7119 if test "$cf_cv_find_linkage_utf8" = yes ; then
7120 cf_cv_utf8_lib=add-on
7126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7128 echo "$as_me:7128: result: $cf_cv_utf8_lib" >&5
7129 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7131 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7133 if test "$cf_cv_utf8_lib" = "add-on" ; then
7135 cat >>confdefs.h <<\EOF
7136 #define HAVE_LIBUTF8_H 1
7139 if test -n "$cf_cv_header_path_utf8" ; then
7140 for cf_add_incdir in $cf_cv_header_path_utf8
7142 while test "$cf_add_incdir" != /usr/include
7144 if test -d "$cf_add_incdir"
7147 if test -n "$CFLAGS$CPPFLAGS" ; then
7148 # a loop is needed to ensure we can add subdirs of existing dirs
7149 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7150 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7151 cf_have_incdir=yes; break
7156 if test "$cf_have_incdir" = no ; then
7157 if test "$cf_add_incdir" = /usr/local/include ; then
7158 if test "$GCC" = yes
7160 cf_save_CPPFLAGS=$CPPFLAGS
7162 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7163 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7165 cat >"conftest.$ac_ext" <<_ACEOF
7166 #line 7166 "configure"
7167 #include "confdefs.h"
7177 rm -f "conftest.$ac_objext"
7178 if { (eval echo "$as_me:7178: \"$ac_compile\"") >&5
7179 (eval $ac_compile) 2>&5
7181 echo "$as_me:7181: \$? = $ac_status" >&5
7182 (exit "$ac_status"); } &&
7183 { ac_try='test -s "conftest.$ac_objext"'
7184 { (eval echo "$as_me:7184: \"$ac_try\"") >&5
7187 echo "$as_me:7187: \$? = $ac_status" >&5
7188 (exit "$ac_status"); }; }; then
7191 echo "$as_me: failed program was:" >&5
7192 cat "conftest.$ac_ext" >&5
7195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7196 CPPFLAGS=$cf_save_CPPFLAGS
7201 if test "$cf_have_incdir" = no ; then
7202 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7204 echo "${as_me:-configure}:7204: testing adding $cf_add_incdir to include-path ..." 1>&5
7206 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7208 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7209 test "$cf_top_incdir" = "$cf_add_incdir" && break
7210 cf_add_incdir="$cf_top_incdir"
7221 if test -n "$cf_cv_library_path_utf8" ; then
7222 for cf_add_libdir in $cf_cv_library_path_utf8
7224 if test "$cf_add_libdir" = /usr/lib ; then
7226 elif test -d "$cf_add_libdir"
7229 if test -n "$LDFLAGS$LIBS" ; then
7230 # a loop is needed to ensure we can add subdirs of existing dirs
7231 for cf_test_libdir in $LDFLAGS $LIBS ; do
7232 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7233 cf_have_libdir=yes; break
7237 if test "$cf_have_libdir" = no ; then
7238 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7240 echo "${as_me:-configure}:7240: testing adding $cf_add_libdir to library-path ..." 1>&5
7242 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7251 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7253 for cf_add_1lib in $cf_add_0lib; do
7254 for cf_add_2lib in $cf_add_libs; do
7255 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7260 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7266 cf_ncuconfig_root=ncursesw
7267 cf_have_ncuconfig=no
7269 if test "x${PKG_CONFIG:=none}" != xnone; then
7270 echo "$as_me:7270: checking pkg-config for $cf_ncuconfig_root" >&5
7271 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7272 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7273 echo "$as_me:7273: result: yes" >&5
7274 echo "${ECHO_T}yes" >&6
7276 echo "$as_me:7276: checking if the $cf_ncuconfig_root package files work" >&5
7277 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7278 cf_have_ncuconfig=unknown
7280 cf_save_CFLAGS="$CFLAGS"
7281 cf_save_CPPFLAGS="$CPPFLAGS"
7282 cf_save_LIBS="$LIBS"
7284 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7285 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7287 # while -W for passing linker flags is prevalent, it is not "standard".
7288 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7289 # incompatible _and_ non-standard -W option which gives an error. Work
7290 # around that pitfall.
7291 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7297 cf_new_extra_cppflags=
7299 for cf_add_cflags in $cf_pkg_cflags
7301 case "$cf_fix_cppflags" in
7303 case "$cf_add_cflags" in
7304 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7305 case "$cf_add_cflags" in
7307 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7309 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7310 && test -z "${cf_tst_cflags}" \
7311 && cf_fix_cppflags=yes
7313 if test "$cf_fix_cppflags" = yes ; then
7315 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7316 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7319 elif test "${cf_tst_cflags}" = "\"'" ; then
7321 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7322 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7332 case "$cf_add_cflags" in
7334 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7336 CPPFLAGS=`echo "$CPPFLAGS" | \
7337 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7338 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7343 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7344 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7351 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7352 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7359 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7360 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7362 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7364 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7365 && test -z "${cf_tst_cflags}" \
7366 && cf_fix_cppflags=no
7371 if test -n "$cf_new_cflags" ; then
7373 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7374 CFLAGS="${CFLAGS}$cf_new_cflags"
7378 if test -n "$cf_new_cppflags" ; then
7380 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7381 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7385 if test -n "$cf_new_extra_cppflags" ; then
7387 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7388 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7395 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7397 for cf_add_1lib in $cf_add_0lib; do
7398 for cf_add_2lib in $cf_add_libs; do
7399 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7404 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7408 cat >"conftest.$ac_ext" <<_ACEOF
7409 #line 7409 "configure"
7410 #include "confdefs.h"
7411 #include <${cf_cv_ncurses_header:-curses.h}>
7415 initscr(); mousemask(0,0); tigetstr((char *)0);
7420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7421 if { (eval echo "$as_me:7421: \"$ac_link\"") >&5
7422 (eval $ac_link) 2>&5
7424 echo "$as_me:7424: \$? = $ac_status" >&5
7425 (exit "$ac_status"); } &&
7426 { ac_try='test -s "conftest$ac_exeext"'
7427 { (eval echo "$as_me:7427: \"$ac_try\"") >&5
7430 echo "$as_me:7430: \$? = $ac_status" >&5
7431 (exit "$ac_status"); }; }; then
7432 if test "$cross_compiling" = yes; then
7433 cf_test_ncuconfig=maybe
7435 cat >"conftest.$ac_ext" <<_ACEOF
7436 #line 7436 "configure"
7437 #include "confdefs.h"
7438 #include <${cf_cv_ncurses_header:-curses.h}>
7440 { const char *xx = curses_version(); return (xx == 0); }
7442 rm -f "conftest$ac_exeext"
7443 if { (eval echo "$as_me:7443: \"$ac_link\"") >&5
7444 (eval $ac_link) 2>&5
7446 echo "$as_me:7446: \$? = $ac_status" >&5
7447 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7448 { (eval echo "$as_me:7448: \"$ac_try\"") >&5
7451 echo "$as_me:7451: \$? = $ac_status" >&5
7452 (exit "$ac_status"); }; }; then
7453 cf_test_ncuconfig=yes
7455 echo "$as_me: program exited with status $ac_status" >&5
7456 echo "$as_me: failed program was:" >&5
7457 cat "conftest.$ac_ext" >&5
7458 cf_test_ncuconfig=no
7460 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7463 echo "$as_me: failed program was:" >&5
7464 cat "conftest.$ac_ext" >&5
7465 cf_test_ncuconfig=no
7467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7469 CFLAGS="$cf_save_CFLAGS"
7470 CPPFLAGS="$cf_save_CPPFLAGS"
7471 LIBS="$cf_save_LIBS"
7473 if test "x$cf_test_ncuconfig" != xyes; then
7474 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7475 cf_pkg_cflags="$cf_temp"
7476 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7477 cf_pkg_libs="$cf_temp"
7482 for cf_add_cflags in $cf_pkg_cflags
7484 case "x$cf_add_cflags" in
7487 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7490 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7491 test "$CFLAGS" != "$cf_old_cflag" || break
7493 CFLAGS="$cf_old_cflag"
7496 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7499 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7500 test "$CPPFLAGS" != "$cf_old_cflag" || break
7502 CPPFLAGS="$cf_old_cflag"
7511 cf_new_extra_cppflags=
7513 for cf_add_cflags in $cf_add_cflags
7515 case "$cf_fix_cppflags" in
7517 case "$cf_add_cflags" in
7518 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7519 case "$cf_add_cflags" in
7521 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7523 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7524 && test -z "${cf_tst_cflags}" \
7525 && cf_fix_cppflags=yes
7527 if test "$cf_fix_cppflags" = yes ; then
7529 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7530 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7533 elif test "${cf_tst_cflags}" = "\"'" ; then
7535 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7536 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7546 case "$cf_add_cflags" in
7548 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7550 CPPFLAGS=`echo "$CPPFLAGS" | \
7551 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7552 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7557 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7558 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7565 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7566 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7573 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7574 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7576 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7578 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7579 && test -z "${cf_tst_cflags}" \
7580 && cf_fix_cppflags=no
7585 if test -n "$cf_new_cflags" ; then
7587 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7588 CFLAGS="${CFLAGS}$cf_new_cflags"
7592 if test -n "$cf_new_cppflags" ; then
7594 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7595 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7599 if test -n "$cf_new_extra_cppflags" ; then
7601 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7602 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7611 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7613 for cf_add_1lib in $cf_add_0lib; do
7614 for cf_add_2lib in $cf_add_libs; do
7615 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7620 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7624 cat >"conftest.$ac_ext" <<_ACEOF
7625 #line 7625 "configure"
7626 #include "confdefs.h"
7627 #include <${cf_cv_ncurses_header:-curses.h}>
7631 initscr(); mousemask(0,0); tigetstr((char *)0);
7636 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7637 if { (eval echo "$as_me:7637: \"$ac_link\"") >&5
7638 (eval $ac_link) 2>&5
7640 echo "$as_me:7640: \$? = $ac_status" >&5
7641 (exit "$ac_status"); } &&
7642 { ac_try='test -s "conftest$ac_exeext"'
7643 { (eval echo "$as_me:7643: \"$ac_try\"") >&5
7646 echo "$as_me:7646: \$? = $ac_status" >&5
7647 (exit "$ac_status"); }; }; then
7648 if test "$cross_compiling" = yes; then
7649 cf_have_ncuconfig=maybe
7651 cat >"conftest.$ac_ext" <<_ACEOF
7652 #line 7652 "configure"
7653 #include "confdefs.h"
7654 #include <${cf_cv_ncurses_header:-curses.h}>
7656 { const char *xx = curses_version(); return (xx == 0); }
7658 rm -f "conftest$ac_exeext"
7659 if { (eval echo "$as_me:7659: \"$ac_link\"") >&5
7660 (eval $ac_link) 2>&5
7662 echo "$as_me:7662: \$? = $ac_status" >&5
7663 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7664 { (eval echo "$as_me:7664: \"$ac_try\"") >&5
7667 echo "$as_me:7667: \$? = $ac_status" >&5
7668 (exit "$ac_status"); }; }; then
7669 cf_have_ncuconfig=yes
7671 echo "$as_me: program exited with status $ac_status" >&5
7672 echo "$as_me: failed program was:" >&5
7673 cat "conftest.$ac_ext" >&5
7674 cf_have_ncuconfig=no
7676 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7679 echo "$as_me: failed program was:" >&5
7680 cat "conftest.$ac_ext" >&5
7681 cf_have_ncuconfig=no
7683 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7684 echo "$as_me:7684: result: $cf_have_ncuconfig" >&5
7685 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7686 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7687 if test "$cf_have_ncuconfig" != "yes"
7689 CPPFLAGS="$cf_save_CPPFLAGS"
7690 LIBS="$cf_save_LIBS"
7691 NCURSES_CONFIG_PKG=none
7694 cat >>confdefs.h <<\EOF
7698 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7700 echo "$as_me:7700: checking for terminfo header" >&5
7701 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7702 if test "${cf_cv_term_header+set}" = set; then
7703 echo $ECHO_N "(cached) $ECHO_C" >&6
7706 case "${cf_cv_ncurses_header}" in
7707 (*/ncurses.h|*/ncursesw.h)
7708 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7711 cf_term_header=term.h
7715 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7717 cat >"conftest.$ac_ext" <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7721 #include <${cf_cv_ncurses_header:-curses.h}>
7727 int x = auto_left_margin; (void)x
7732 rm -f "conftest.$ac_objext"
7733 if { (eval echo "$as_me:7733: \"$ac_compile\"") >&5
7734 (eval $ac_compile) 2>&5
7736 echo "$as_me:7736: \$? = $ac_status" >&5
7737 (exit "$ac_status"); } &&
7738 { ac_try='test -s "conftest.$ac_objext"'
7739 { (eval echo "$as_me:7739: \"$ac_try\"") >&5
7742 echo "$as_me:7742: \$? = $ac_status" >&5
7743 (exit "$ac_status"); }; }; then
7745 cf_cv_term_header="$cf_test"
7747 echo "$as_me: failed program was:" >&5
7748 cat "conftest.$ac_ext" >&5
7750 cf_cv_term_header=unknown
7753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7754 test "$cf_cv_term_header" != unknown && break
7758 echo "$as_me:7758: result: $cf_cv_term_header" >&5
7759 echo "${ECHO_T}$cf_cv_term_header" >&6
7761 # Set definitions to allow ifdef'ing to accommodate subdirectories
7763 case "$cf_cv_term_header" in
7766 cat >>confdefs.h <<\EOF
7767 #define HAVE_TERM_H 1
7773 case "$cf_cv_term_header" in
7776 cat >>confdefs.h <<\EOF
7777 #define HAVE_NCURSES_TERM_H 1
7783 cat >>confdefs.h <<\EOF
7784 #define HAVE_NCURSESW_TERM_H 1
7793 echo "$as_me:7793: result: no" >&5
7794 echo "${ECHO_T}no" >&6
7795 NCURSES_CONFIG_PKG=none
7798 NCURSES_CONFIG_PKG=none
7801 if test "x$cf_have_ncuconfig" = "xno"; then
7802 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7804 if test -n "$ac_tool_prefix"; then
7805 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7807 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7808 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7809 echo "$as_me:7809: checking for $ac_word" >&5
7810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7811 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7812 echo $ECHO_N "(cached) $ECHO_C" >&6
7814 if test -n "$NCURSES_CONFIG"; then
7815 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7817 ac_save_IFS=$IFS; IFS=$ac_path_separator
7819 for ac_dir in $ac_dummy; do
7821 test -z "$ac_dir" && ac_dir=.
7822 $as_executable_p "$ac_dir/$ac_word" || continue
7823 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7824 echo "$as_me:7824: found $ac_dir/$ac_word" >&5
7830 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7831 if test -n "$NCURSES_CONFIG"; then
7832 echo "$as_me:7832: result: $NCURSES_CONFIG" >&5
7833 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7835 echo "$as_me:7835: result: no" >&5
7836 echo "${ECHO_T}no" >&6
7839 test -n "$NCURSES_CONFIG" && break
7842 if test -z "$NCURSES_CONFIG"; then
7843 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7844 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7846 # Extract the first word of "$ac_prog", so it can be a program name with args.
7847 set dummy $ac_prog; ac_word=$2
7848 echo "$as_me:7848: checking for $ac_word" >&5
7849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7850 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7851 echo $ECHO_N "(cached) $ECHO_C" >&6
7853 if test -n "$ac_ct_NCURSES_CONFIG"; then
7854 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7856 ac_save_IFS=$IFS; IFS=$ac_path_separator
7858 for ac_dir in $ac_dummy; do
7860 test -z "$ac_dir" && ac_dir=.
7861 $as_executable_p "$ac_dir/$ac_word" || continue
7862 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7863 echo "$as_me:7863: found $ac_dir/$ac_word" >&5
7869 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7870 if test -n "$ac_ct_NCURSES_CONFIG"; then
7871 echo "$as_me:7871: result: $ac_ct_NCURSES_CONFIG" >&5
7872 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7874 echo "$as_me:7874: result: no" >&5
7875 echo "${ECHO_T}no" >&6
7878 test -n "$ac_ct_NCURSES_CONFIG" && break
7880 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7882 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7885 if test "$NCURSES_CONFIG" != none ; then
7887 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7889 case "x$cf_add_cflags" in
7892 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7895 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7896 test "$CFLAGS" != "$cf_old_cflag" || break
7898 CFLAGS="$cf_old_cflag"
7901 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7904 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
7905 test "$CPPFLAGS" != "$cf_old_cflag" || break
7907 CPPFLAGS="$cf_old_cflag"
7916 cf_new_extra_cppflags=
7918 for cf_add_cflags in $cf_add_cflags
7920 case "$cf_fix_cppflags" in
7922 case "$cf_add_cflags" in
7923 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7924 case "$cf_add_cflags" in
7926 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7928 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7929 && test -z "${cf_tst_cflags}" \
7930 && cf_fix_cppflags=yes
7932 if test "$cf_fix_cppflags" = yes ; then
7934 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7935 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7938 elif test "${cf_tst_cflags}" = "\"'" ; then
7940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7951 case "$cf_add_cflags" in
7953 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7955 CPPFLAGS=`echo "$CPPFLAGS" | \
7956 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7957 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7962 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7963 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7970 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7971 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7978 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7979 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7981 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7983 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7984 && test -z "${cf_tst_cflags}" \
7985 && cf_fix_cppflags=no
7990 if test -n "$cf_new_cflags" ; then
7992 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7993 CFLAGS="${CFLAGS}$cf_new_cflags"
7997 if test -n "$cf_new_cppflags" ; then
7999 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8000 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8004 if test -n "$cf_new_extra_cppflags" ; then
8006 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8007 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8016 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8018 for cf_add_1lib in $cf_add_0lib; do
8019 for cf_add_2lib in $cf_add_libs; do
8020 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8025 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8029 # even with config script, some packages use no-override for curses.h
8031 echo "$as_me:8031: checking if we have identified curses headers" >&5
8032 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8033 if test "${cf_cv_ncurses_header+set}" = set; then
8034 echo $ECHO_N "(cached) $ECHO_C" >&6
8037 cf_cv_ncurses_header=none
8039 ncurses.h ncursesw/ncurses.h \
8040 curses.h ncursesw/curses.h
8042 cat >"conftest.$ac_ext" <<_ACEOF
8043 #line 8043 "configure"
8044 #include "confdefs.h"
8045 #include <${cf_header}>
8049 initscr(); tgoto("?", 0,0)
8054 rm -f "conftest.$ac_objext"
8055 if { (eval echo "$as_me:8055: \"$ac_compile\"") >&5
8056 (eval $ac_compile) 2>&5
8058 echo "$as_me:8058: \$? = $ac_status" >&5
8059 (exit "$ac_status"); } &&
8060 { ac_try='test -s "conftest.$ac_objext"'
8061 { (eval echo "$as_me:8061: \"$ac_try\"") >&5
8064 echo "$as_me:8064: \$? = $ac_status" >&5
8065 (exit "$ac_status"); }; }; then
8066 cf_cv_ncurses_header=$cf_header; break
8068 echo "$as_me: failed program was:" >&5
8069 cat "conftest.$ac_ext" >&5
8071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8075 echo "$as_me:8075: result: $cf_cv_ncurses_header" >&5
8076 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8078 if test "$cf_cv_ncurses_header" = none ; then
8079 { { echo "$as_me:8079: error: No curses header-files found" >&5
8080 echo "$as_me: error: No curses header-files found" >&2;}
8081 { (exit 1); exit 1; }; }
8084 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8086 for ac_header in $cf_cv_ncurses_header
8088 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8089 echo "$as_me:8089: checking for $ac_header" >&5
8090 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8091 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8092 echo $ECHO_N "(cached) $ECHO_C" >&6
8094 cat >"conftest.$ac_ext" <<_ACEOF
8095 #line 8095 "configure"
8096 #include "confdefs.h"
8097 #include <$ac_header>
8099 if { (eval echo "$as_me:8099: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8100 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8102 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8104 cat conftest.err >&5
8105 echo "$as_me:8105: \$? = $ac_status" >&5
8106 (exit "$ac_status"); } >/dev/null; then
8107 if test -s conftest.err; then
8108 ac_cpp_err=$ac_c_preproc_warn_flag
8115 if test -z "$ac_cpp_err"; then
8116 eval "$as_ac_Header=yes"
8118 echo "$as_me: failed program was:" >&5
8119 cat "conftest.$ac_ext" >&5
8120 eval "$as_ac_Header=no"
8122 rm -f conftest.err "conftest.$ac_ext"
8124 echo "$as_me:8124: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8125 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8126 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8127 cat >>confdefs.h <<EOF
8128 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8134 cat >>confdefs.h <<\EOF
8138 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8140 cat >>confdefs.h <<EOF
8141 #define $cf_nculib_ROOT 1
8144 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8148 cf_ncuhdr_root=ncursesw
8150 test -n "$cf_cv_curses_dir" && \
8151 test "$cf_cv_curses_dir" != "no" && { \
8153 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8154 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8156 while test "$cf_add_incdir" != /usr/include
8158 if test -d "$cf_add_incdir"
8161 if test -n "$CFLAGS$CPPFLAGS" ; then
8162 # a loop is needed to ensure we can add subdirs of existing dirs
8163 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8164 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8165 cf_have_incdir=yes; break
8170 if test "$cf_have_incdir" = no ; then
8171 if test "$cf_add_incdir" = /usr/local/include ; then
8172 if test "$GCC" = yes
8174 cf_save_CPPFLAGS=$CPPFLAGS
8176 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8177 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8179 cat >"conftest.$ac_ext" <<_ACEOF
8180 #line 8180 "configure"
8181 #include "confdefs.h"
8191 rm -f "conftest.$ac_objext"
8192 if { (eval echo "$as_me:8192: \"$ac_compile\"") >&5
8193 (eval $ac_compile) 2>&5
8195 echo "$as_me:8195: \$? = $ac_status" >&5
8196 (exit "$ac_status"); } &&
8197 { ac_try='test -s "conftest.$ac_objext"'
8198 { (eval echo "$as_me:8198: \"$ac_try\"") >&5
8201 echo "$as_me:8201: \$? = $ac_status" >&5
8202 (exit "$ac_status"); }; }; then
8205 echo "$as_me: failed program was:" >&5
8206 cat "conftest.$ac_ext" >&5
8209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8210 CPPFLAGS=$cf_save_CPPFLAGS
8215 if test "$cf_have_incdir" = no ; then
8216 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8218 echo "${as_me:-configure}:8218: testing adding $cf_add_incdir to include-path ..." 1>&5
8220 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8222 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8223 test "$cf_top_incdir" = "$cf_add_incdir" && break
8224 cf_add_incdir="$cf_top_incdir"
8237 echo "$as_me:8237: checking for $cf_ncuhdr_root header in include-path" >&5
8238 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8239 if test "${cf_cv_ncurses_h+set}" = set; then
8240 echo $ECHO_N "(cached) $ECHO_C" >&6
8243 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8244 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8245 for cf_header in $cf_header_list
8248 cat >"conftest.$ac_ext" <<_ACEOF
8249 #line 8249 "configure"
8250 #include "confdefs.h"
8252 #define _XOPEN_SOURCE_EXTENDED
8253 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8254 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8256 #include <$cf_header>
8261 #ifdef NCURSES_VERSION
8267 printf("%s\\n", NCURSES_VERSION);
8280 rm -f "conftest.$ac_objext"
8281 if { (eval echo "$as_me:8281: \"$ac_compile\"") >&5
8282 (eval $ac_compile) 2>&5
8284 echo "$as_me:8284: \$? = $ac_status" >&5
8285 (exit "$ac_status"); } &&
8286 { ac_try='test -s "conftest.$ac_objext"'
8287 { (eval echo "$as_me:8287: \"$ac_try\"") >&5
8290 echo "$as_me:8290: \$? = $ac_status" >&5
8291 (exit "$ac_status"); }; }; then
8292 cf_cv_ncurses_h=$cf_header
8295 echo "$as_me: failed program was:" >&5
8296 cat "conftest.$ac_ext" >&5
8299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8301 test "$cf_cv_ncurses_h" != no && break
8305 echo "$as_me:8305: result: $cf_cv_ncurses_h" >&5
8306 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8308 if test "$cf_cv_ncurses_h" != no ; then
8309 cf_cv_ncurses_header=$cf_cv_ncurses_h
8312 echo "$as_me:8312: checking for $cf_ncuhdr_root include-path" >&5
8313 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8314 if test "${cf_cv_ncurses_h2+set}" = set; then
8315 echo $ECHO_N "(cached) $ECHO_C" >&6
8318 test -n "$verbose" && echo
8322 # collect the current set of include-directories from compiler flags
8323 cf_header_path_list=""
8324 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8325 for cf_header_path in $CPPFLAGS $CFLAGS
8327 case "$cf_header_path" in
8329 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8331 test "x$cf_header_path" != "xNONE" && \
8332 test -d "$cf_header_path" && \
8334 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8335 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8336 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8337 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8338 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8339 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"
8342 cf_header_path_list="$cf_header_path_list $cf_search"
8348 # add the variations for the package we are looking for
8352 test "x$prefix" != "xNONE" && \
8353 test -d "$prefix" && \
8355 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8356 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8357 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8358 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8359 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8360 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8363 for cf_subdir_prefix in \
8372 test "x$cf_subdir_prefix" != "x$prefix" && \
8373 test -d "$cf_subdir_prefix" && \
8374 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8375 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8376 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8377 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8378 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8379 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8380 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"
8385 test "$includedir" != NONE && \
8386 test "$includedir" != "/usr/include" && \
8387 test -d "$includedir" && {
8388 test -d "$includedir" && cf_search="$cf_search $includedir"
8389 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8392 test "$oldincludedir" != NONE && \
8393 test "$oldincludedir" != "/usr/include" && \
8394 test -d "$oldincludedir" && {
8395 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8396 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8399 cf_search="$cf_search $cf_header_path_list"
8401 test -n "$verbose" && echo "search path $cf_search"
8402 cf_save2_CPPFLAGS="$CPPFLAGS"
8403 for cf_incdir in $cf_search
8406 if test -n "$cf_incdir" ; then
8407 for cf_add_incdir in $cf_incdir
8409 while test "$cf_add_incdir" != /usr/include
8411 if test -d "$cf_add_incdir"
8414 if test -n "$CFLAGS$CPPFLAGS" ; then
8415 # a loop is needed to ensure we can add subdirs of existing dirs
8416 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8417 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8418 cf_have_incdir=yes; break
8423 if test "$cf_have_incdir" = no ; then
8424 if test "$cf_add_incdir" = /usr/local/include ; then
8425 if test "$GCC" = yes
8427 cf_save_CPPFLAGS=$CPPFLAGS
8429 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8430 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8432 cat >"conftest.$ac_ext" <<_ACEOF
8433 #line 8433 "configure"
8434 #include "confdefs.h"
8444 rm -f "conftest.$ac_objext"
8445 if { (eval echo "$as_me:8445: \"$ac_compile\"") >&5
8446 (eval $ac_compile) 2>&5
8448 echo "$as_me:8448: \$? = $ac_status" >&5
8449 (exit "$ac_status"); } &&
8450 { ac_try='test -s "conftest.$ac_objext"'
8451 { (eval echo "$as_me:8451: \"$ac_try\"") >&5
8454 echo "$as_me:8454: \$? = $ac_status" >&5
8455 (exit "$ac_status"); }; }; then
8458 echo "$as_me: failed program was:" >&5
8459 cat "conftest.$ac_ext" >&5
8462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8463 CPPFLAGS=$cf_save_CPPFLAGS
8468 if test "$cf_have_incdir" = no ; then
8469 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8471 echo "${as_me:-configure}:8471: testing adding $cf_add_incdir to include-path ..." 1>&5
8473 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8475 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8476 test "$cf_top_incdir" = "$cf_add_incdir" && break
8477 cf_add_incdir="$cf_top_incdir"
8493 cat >"conftest.$ac_ext" <<_ACEOF
8494 #line 8494 "configure"
8495 #include "confdefs.h"
8497 #include <$cf_header>
8502 #ifdef NCURSES_VERSION
8504 printf("%s\\n", NCURSES_VERSION);
8517 rm -f "conftest.$ac_objext"
8518 if { (eval echo "$as_me:8518: \"$ac_compile\"") >&5
8519 (eval $ac_compile) 2>&5
8521 echo "$as_me:8521: \$? = $ac_status" >&5
8522 (exit "$ac_status"); } &&
8523 { ac_try='test -s "conftest.$ac_objext"'
8524 { (eval echo "$as_me:8524: \"$ac_try\"") >&5
8527 echo "$as_me:8527: \$? = $ac_status" >&5
8528 (exit "$ac_status"); }; }; then
8529 cf_cv_ncurses_h2=$cf_header
8532 echo "$as_me: failed program was:" >&5
8533 cat "conftest.$ac_ext" >&5
8536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8538 if test "$cf_cv_ncurses_h2" != no ; then
8539 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8540 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8543 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8545 CPPFLAGS="$cf_save2_CPPFLAGS"
8546 test "$cf_cv_ncurses_h2" != no && break
8548 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8548: error: not found" >&5
8549 echo "$as_me: error: not found" >&2;}
8550 { (exit 1); exit 1; }; }
8553 echo "$as_me:8553: result: $cf_cv_ncurses_h2" >&5
8554 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8556 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8557 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8558 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8559 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8562 if test -n "$cf_1st_incdir" ; then
8563 for cf_add_incdir in $cf_1st_incdir
8565 while test "$cf_add_incdir" != /usr/include
8567 if test -d "$cf_add_incdir"
8570 if test -n "$CFLAGS$CPPFLAGS" ; then
8571 # a loop is needed to ensure we can add subdirs of existing dirs
8572 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8573 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8574 cf_have_incdir=yes; break
8579 if test "$cf_have_incdir" = no ; then
8580 if test "$cf_add_incdir" = /usr/local/include ; then
8581 if test "$GCC" = yes
8583 cf_save_CPPFLAGS=$CPPFLAGS
8585 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8586 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8588 cat >"conftest.$ac_ext" <<_ACEOF
8589 #line 8589 "configure"
8590 #include "confdefs.h"
8600 rm -f "conftest.$ac_objext"
8601 if { (eval echo "$as_me:8601: \"$ac_compile\"") >&5
8602 (eval $ac_compile) 2>&5
8604 echo "$as_me:8604: \$? = $ac_status" >&5
8605 (exit "$ac_status"); } &&
8606 { ac_try='test -s "conftest.$ac_objext"'
8607 { (eval echo "$as_me:8607: \"$ac_try\"") >&5
8610 echo "$as_me:8610: \$? = $ac_status" >&5
8611 (exit "$ac_status"); }; }; then
8614 echo "$as_me: failed program was:" >&5
8615 cat "conftest.$ac_ext" >&5
8618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8619 CPPFLAGS=$cf_save_CPPFLAGS
8624 if test "$cf_have_incdir" = no ; then
8625 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8627 echo "${as_me:-configure}:8627: testing adding $cf_add_incdir to include-path ..." 1>&5
8629 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8631 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8632 test "$cf_top_incdir" = "$cf_add_incdir" && break
8633 cf_add_incdir="$cf_top_incdir"
8646 # Set definitions to allow ifdef'ing for ncurses.h
8648 case "$cf_cv_ncurses_header" in
8651 cat >>confdefs.h <<\EOF
8652 #define HAVE_NCURSES_H 1
8658 case "$cf_cv_ncurses_header" in
8659 (ncurses/curses.h|ncurses/ncurses.h)
8661 cat >>confdefs.h <<\EOF
8662 #define HAVE_NCURSES_NCURSES_H 1
8666 (ncursesw/curses.h|ncursesw/ncurses.h)
8668 cat >>confdefs.h <<\EOF
8669 #define HAVE_NCURSESW_NCURSES_H 1
8675 echo "$as_me:8675: checking for terminfo header" >&5
8676 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8677 if test "${cf_cv_term_header+set}" = set; then
8678 echo $ECHO_N "(cached) $ECHO_C" >&6
8681 case "${cf_cv_ncurses_header}" in
8682 (*/ncurses.h|*/ncursesw.h)
8683 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8686 cf_term_header=term.h
8690 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8692 cat >"conftest.$ac_ext" <<_ACEOF
8693 #line 8693 "configure"
8694 #include "confdefs.h"
8696 #include <${cf_cv_ncurses_header:-curses.h}>
8702 int x = auto_left_margin; (void)x
8707 rm -f "conftest.$ac_objext"
8708 if { (eval echo "$as_me:8708: \"$ac_compile\"") >&5
8709 (eval $ac_compile) 2>&5
8711 echo "$as_me:8711: \$? = $ac_status" >&5
8712 (exit "$ac_status"); } &&
8713 { ac_try='test -s "conftest.$ac_objext"'
8714 { (eval echo "$as_me:8714: \"$ac_try\"") >&5
8717 echo "$as_me:8717: \$? = $ac_status" >&5
8718 (exit "$ac_status"); }; }; then
8720 cf_cv_term_header="$cf_test"
8722 echo "$as_me: failed program was:" >&5
8723 cat "conftest.$ac_ext" >&5
8725 cf_cv_term_header=unknown
8728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8729 test "$cf_cv_term_header" != unknown && break
8733 echo "$as_me:8733: result: $cf_cv_term_header" >&5
8734 echo "${ECHO_T}$cf_cv_term_header" >&6
8736 # Set definitions to allow ifdef'ing to accommodate subdirectories
8738 case "$cf_cv_term_header" in
8741 cat >>confdefs.h <<\EOF
8742 #define HAVE_TERM_H 1
8748 case "$cf_cv_term_header" in
8751 cat >>confdefs.h <<\EOF
8752 #define HAVE_NCURSES_TERM_H 1
8758 cat >>confdefs.h <<\EOF
8759 #define HAVE_NCURSESW_TERM_H 1
8765 # some applications need this, but should check for NCURSES_VERSION
8767 cat >>confdefs.h <<\EOF
8771 echo "$as_me:8771: checking for ncurses version" >&5
8772 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8773 if test "${cf_cv_ncurses_version+set}" = set; then
8774 echo $ECHO_N "(cached) $ECHO_C" >&6
8777 cf_cv_ncurses_version=no
8779 rm -f "$cf_tempfile"
8780 if test "$cross_compiling" = yes; then
8782 # This will not work if the preprocessor splits the line after the
8783 # Autoconf token. The 'unproto' program does that.
8784 cat > "conftest.$ac_ext" <<EOF
8785 #include <${cf_cv_ncurses_header:-curses.h}>
8787 #ifdef NCURSES_VERSION
8788 Autoconf NCURSES_VERSION
8796 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8797 { (eval echo "$as_me:8797: \"$cf_try\"") >&5
8800 echo "$as_me:8800: \$? = $ac_status" >&5
8801 (exit "$ac_status"); }
8802 if test -f conftest.out ; then
8803 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8804 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8809 cat >"conftest.$ac_ext" <<_ACEOF
8810 #line 8810 "configure"
8811 #include "confdefs.h"
8813 #include <${cf_cv_ncurses_header:-curses.h}>
8817 FILE *fp = fopen("$cf_tempfile", "w");
8818 #ifdef NCURSES_VERSION
8819 # ifdef NCURSES_VERSION_PATCH
8820 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8822 fprintf(fp, "%s\\n", NCURSES_VERSION);
8826 fprintf(fp, "old\\n");
8831 ${cf_cv_main_return:-return}(0);
8834 rm -f "conftest$ac_exeext"
8835 if { (eval echo "$as_me:8835: \"$ac_link\"") >&5
8836 (eval $ac_link) 2>&5
8838 echo "$as_me:8838: \$? = $ac_status" >&5
8839 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8840 { (eval echo "$as_me:8840: \"$ac_try\"") >&5
8843 echo "$as_me:8843: \$? = $ac_status" >&5
8844 (exit "$ac_status"); }; }; then
8846 cf_cv_ncurses_version=`cat $cf_tempfile`
8848 echo "$as_me: program exited with status $ac_status" >&5
8849 echo "$as_me: failed program was:" >&5
8850 cat "conftest.$ac_ext" >&5
8852 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8854 rm -f "$cf_tempfile"
8857 echo "$as_me:8857: result: $cf_cv_ncurses_version" >&5
8858 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8859 test "$cf_cv_ncurses_version" = no ||
8860 cat >>confdefs.h <<\EOF
8864 cf_nculib_root=ncursesw
8865 # This works, except for the special case where we find gpm, but
8866 # ncurses is in a nonstandard location via $LIBS, and we really want
8869 cf_ncurses_SAVE="$LIBS"
8870 echo "$as_me:8870: checking for Gpm_Open in -lgpm" >&5
8871 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8872 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8873 echo $ECHO_N "(cached) $ECHO_C" >&6
8875 ac_check_lib_save_LIBS=$LIBS
8877 cat >"conftest.$ac_ext" <<_ACEOF
8878 #line 8878 "configure"
8879 #include "confdefs.h"
8881 /* Override any gcc2 internal prototype to avoid an error. */
8885 /* We use char because int might match the return type of a gcc2
8886 builtin and then its argument prototype would still apply. */
8896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8897 if { (eval echo "$as_me:8897: \"$ac_link\"") >&5
8898 (eval $ac_link) 2>&5
8900 echo "$as_me:8900: \$? = $ac_status" >&5
8901 (exit "$ac_status"); } &&
8902 { ac_try='test -s "conftest$ac_exeext"'
8903 { (eval echo "$as_me:8903: \"$ac_try\"") >&5
8906 echo "$as_me:8906: \$? = $ac_status" >&5
8907 (exit "$ac_status"); }; }; then
8908 ac_cv_lib_gpm_Gpm_Open=yes
8910 echo "$as_me: failed program was:" >&5
8911 cat "conftest.$ac_ext" >&5
8912 ac_cv_lib_gpm_Gpm_Open=no
8914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8915 LIBS=$ac_check_lib_save_LIBS
8917 echo "$as_me:8917: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8918 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8919 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8920 echo "$as_me:8920: checking for initscr in -lgpm" >&5
8921 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8922 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8923 echo $ECHO_N "(cached) $ECHO_C" >&6
8925 ac_check_lib_save_LIBS=$LIBS
8927 cat >"conftest.$ac_ext" <<_ACEOF
8928 #line 8928 "configure"
8929 #include "confdefs.h"
8931 /* Override any gcc2 internal prototype to avoid an error. */
8935 /* We use char because int might match the return type of a gcc2
8936 builtin and then its argument prototype would still apply. */
8946 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8947 if { (eval echo "$as_me:8947: \"$ac_link\"") >&5
8948 (eval $ac_link) 2>&5
8950 echo "$as_me:8950: \$? = $ac_status" >&5
8951 (exit "$ac_status"); } &&
8952 { ac_try='test -s "conftest$ac_exeext"'
8953 { (eval echo "$as_me:8953: \"$ac_try\"") >&5
8956 echo "$as_me:8956: \$? = $ac_status" >&5
8957 (exit "$ac_status"); }; }; then
8958 ac_cv_lib_gpm_initscr=yes
8960 echo "$as_me: failed program was:" >&5
8961 cat "conftest.$ac_ext" >&5
8962 ac_cv_lib_gpm_initscr=no
8964 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8965 LIBS=$ac_check_lib_save_LIBS
8967 echo "$as_me:8967: result: $ac_cv_lib_gpm_initscr" >&5
8968 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8969 if test "$ac_cv_lib_gpm_initscr" = yes; then
8970 LIBS="$cf_ncurses_SAVE"
8972 cf_ncurses_LIBS="-lgpm"
8979 # This is only necessary if you are linking against an obsolete
8980 # version of ncurses (but it should do no harm, since it is static).
8981 if test "$cf_nculib_root" = ncurses ; then
8982 echo "$as_me:8982: checking for tgoto in -lmytinfo" >&5
8983 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8984 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8985 echo $ECHO_N "(cached) $ECHO_C" >&6
8987 ac_check_lib_save_LIBS=$LIBS
8988 LIBS="-lmytinfo $LIBS"
8989 cat >"conftest.$ac_ext" <<_ACEOF
8990 #line 8990 "configure"
8991 #include "confdefs.h"
8993 /* Override any gcc2 internal prototype to avoid an error. */
8997 /* We use char because int might match the return type of a gcc2
8998 builtin and then its argument prototype would still apply. */
9008 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9009 if { (eval echo "$as_me:9009: \"$ac_link\"") >&5
9010 (eval $ac_link) 2>&5
9012 echo "$as_me:9012: \$? = $ac_status" >&5
9013 (exit "$ac_status"); } &&
9014 { ac_try='test -s "conftest$ac_exeext"'
9015 { (eval echo "$as_me:9015: \"$ac_try\"") >&5
9018 echo "$as_me:9018: \$? = $ac_status" >&5
9019 (exit "$ac_status"); }; }; then
9020 ac_cv_lib_mytinfo_tgoto=yes
9022 echo "$as_me: failed program was:" >&5
9023 cat "conftest.$ac_ext" >&5
9024 ac_cv_lib_mytinfo_tgoto=no
9026 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9027 LIBS=$ac_check_lib_save_LIBS
9029 echo "$as_me:9029: result: $ac_cv_lib_mytinfo_tgoto" >&5
9030 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9031 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9032 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9042 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9044 for cf_add_1lib in $cf_add_0lib; do
9045 for cf_add_2lib in $cf_add_libs; do
9046 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9055 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9061 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9063 for cf_add_1lib in $cf_add_0lib; do
9064 for cf_add_2lib in $cf_add_libs; do
9065 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9070 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9076 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9078 echo "$as_me:9078: checking for initscr" >&5
9079 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9080 if test "${ac_cv_func_initscr+set}" = set; then
9081 echo $ECHO_N "(cached) $ECHO_C" >&6
9083 cat >"conftest.$ac_ext" <<_ACEOF
9084 #line 9084 "configure"
9085 #include "confdefs.h"
9086 #define initscr autoconf_temporary
9087 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9094 /* We use char because int might match the return type of a gcc2
9095 builtin and then its argument prototype would still apply. */
9096 char initscr (void);
9102 /* The GNU C library defines stubs for functions which it implements
9103 to always fail with ENOSYS. Some functions are actually named
9104 something starting with __ and the normal name is an alias. */
9105 #if defined (__stub_initscr) || defined (__stub___initscr)
9106 #error found stub for initscr
9114 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9115 if { (eval echo "$as_me:9115: \"$ac_link\"") >&5
9116 (eval $ac_link) 2>&5
9118 echo "$as_me:9118: \$? = $ac_status" >&5
9119 (exit "$ac_status"); } &&
9120 { ac_try='test -s "conftest$ac_exeext"'
9121 { (eval echo "$as_me:9121: \"$ac_try\"") >&5
9124 echo "$as_me:9124: \$? = $ac_status" >&5
9125 (exit "$ac_status"); }; }; then
9126 ac_cv_func_initscr=yes
9128 echo "$as_me: failed program was:" >&5
9129 cat "conftest.$ac_ext" >&5
9130 ac_cv_func_initscr=no
9132 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9134 echo "$as_me:9134: result: $ac_cv_func_initscr" >&5
9135 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9136 if test "$ac_cv_func_initscr" = yes; then
9137 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9140 cf_save_LIBS="$LIBS"
9141 echo "$as_me:9141: checking for initscr in -l$cf_nculib_root" >&5
9142 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9143 LIBS="-l$cf_nculib_root $LIBS"
9144 cat >"conftest.$ac_ext" <<_ACEOF
9145 #line 9145 "configure"
9146 #include "confdefs.h"
9147 #include <${cf_cv_ncurses_header:-curses.h}>
9156 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9157 if { (eval echo "$as_me:9157: \"$ac_link\"") >&5
9158 (eval $ac_link) 2>&5
9160 echo "$as_me:9160: \$? = $ac_status" >&5
9161 (exit "$ac_status"); } &&
9162 { ac_try='test -s "conftest$ac_exeext"'
9163 { (eval echo "$as_me:9163: \"$ac_try\"") >&5
9166 echo "$as_me:9166: \$? = $ac_status" >&5
9167 (exit "$ac_status"); }; }; then
9168 echo "$as_me:9168: result: yes" >&5
9169 echo "${ECHO_T}yes" >&6
9170 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9173 echo "$as_me: failed program was:" >&5
9174 cat "conftest.$ac_ext" >&5
9175 echo "$as_me:9175: result: no" >&5
9176 echo "${ECHO_T}no" >&6
9179 cf_library_path_list=""
9180 if test -n "${LDFLAGS}${LIBS}" ; then
9181 for cf_library_path in $LDFLAGS $LIBS
9183 case "$cf_library_path" in
9185 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9187 test "x$cf_library_path" != "xNONE" && \
9188 test -d "$cf_library_path" && \
9190 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9191 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9192 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9193 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9194 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9195 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"
9198 cf_library_path_list="$cf_library_path_list $cf_search"
9206 test "x$prefix" != "xNONE" && \
9207 test -d "$prefix" && \
9209 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9210 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9211 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9212 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9213 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9214 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9217 for cf_subdir_prefix in \
9226 test "x$cf_subdir_prefix" != "x$prefix" && \
9227 test -d "$cf_subdir_prefix" && \
9228 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9229 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9230 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9231 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9232 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9233 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9234 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"
9239 cf_search="$cf_library_path_list $cf_search"
9241 for cf_libdir in $cf_search
9243 echo "$as_me:9243: checking for -l$cf_nculib_root in $cf_libdir" >&5
9244 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9245 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9246 cat >"conftest.$ac_ext" <<_ACEOF
9247 #line 9247 "configure"
9248 #include "confdefs.h"
9249 #include <${cf_cv_ncurses_header:-curses.h}>
9258 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9259 if { (eval echo "$as_me:9259: \"$ac_link\"") >&5
9260 (eval $ac_link) 2>&5
9262 echo "$as_me:9262: \$? = $ac_status" >&5
9263 (exit "$ac_status"); } &&
9264 { ac_try='test -s "conftest$ac_exeext"'
9265 { (eval echo "$as_me:9265: \"$ac_try\"") >&5
9268 echo "$as_me:9268: \$? = $ac_status" >&5
9269 (exit "$ac_status"); }; }; then
9270 echo "$as_me:9270: result: yes" >&5
9271 echo "${ECHO_T}yes" >&6
9272 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9275 echo "$as_me: failed program was:" >&5
9276 cat "conftest.$ac_ext" >&5
9277 echo "$as_me:9277: result: no" >&5
9278 echo "${ECHO_T}no" >&6
9279 LIBS="$cf_save_LIBS"
9281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9285 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9289 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9291 if test "$cf_found_library" = no ; then
9292 { { echo "$as_me:9292: error: Cannot link $cf_nculib_root library" >&5
9293 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9294 { (exit 1); exit 1; }; }
9299 if test -n "$cf_ncurses_LIBS" ; then
9300 echo "$as_me:9300: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9301 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9302 cf_ncurses_SAVE="$LIBS"
9303 for p in $cf_ncurses_LIBS ; do
9304 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9305 if test "$q" != "$LIBS" ; then
9309 cat >"conftest.$ac_ext" <<_ACEOF
9310 #line 9310 "configure"
9311 #include "confdefs.h"
9312 #include <${cf_cv_ncurses_header:-curses.h}>
9316 initscr(); mousemask(0,0); tigetstr((char *)0);
9321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9322 if { (eval echo "$as_me:9322: \"$ac_link\"") >&5
9323 (eval $ac_link) 2>&5
9325 echo "$as_me:9325: \$? = $ac_status" >&5
9326 (exit "$ac_status"); } &&
9327 { ac_try='test -s "conftest$ac_exeext"'
9328 { (eval echo "$as_me:9328: \"$ac_try\"") >&5
9331 echo "$as_me:9331: \$? = $ac_status" >&5
9332 (exit "$ac_status"); }; }; then
9333 echo "$as_me:9333: result: yes" >&5
9334 echo "${ECHO_T}yes" >&6
9336 echo "$as_me: failed program was:" >&5
9337 cat "conftest.$ac_ext" >&5
9338 echo "$as_me:9338: result: no" >&5
9339 echo "${ECHO_T}no" >&6
9340 LIBS="$cf_ncurses_SAVE"
9342 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9345 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9347 cat >>confdefs.h <<EOF
9348 #define $cf_nculib_ROOT 1
9358 cf_ncuconfig_root=ncurses
9359 cf_have_ncuconfig=no
9361 if test "x${PKG_CONFIG:=none}" != xnone; then
9362 echo "$as_me:9362: checking pkg-config for $cf_ncuconfig_root" >&5
9363 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9364 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9365 echo "$as_me:9365: result: yes" >&5
9366 echo "${ECHO_T}yes" >&6
9368 echo "$as_me:9368: checking if the $cf_ncuconfig_root package files work" >&5
9369 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9370 cf_have_ncuconfig=unknown
9372 cf_save_CFLAGS="$CFLAGS"
9373 cf_save_CPPFLAGS="$CPPFLAGS"
9374 cf_save_LIBS="$LIBS"
9376 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9377 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9379 # while -W for passing linker flags is prevalent, it is not "standard".
9380 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9381 # incompatible _and_ non-standard -W option which gives an error. Work
9382 # around that pitfall.
9383 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9389 cf_new_extra_cppflags=
9391 for cf_add_cflags in $cf_pkg_cflags
9393 case "$cf_fix_cppflags" in
9395 case "$cf_add_cflags" in
9396 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9397 case "$cf_add_cflags" in
9399 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9401 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9402 && test -z "${cf_tst_cflags}" \
9403 && cf_fix_cppflags=yes
9405 if test "$cf_fix_cppflags" = yes ; then
9407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9411 elif test "${cf_tst_cflags}" = "\"'" ; then
9413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9424 case "$cf_add_cflags" in
9426 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9428 CPPFLAGS=`echo "$CPPFLAGS" | \
9429 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9430 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9435 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9436 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9443 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9444 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9454 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9456 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9457 && test -z "${cf_tst_cflags}" \
9458 && cf_fix_cppflags=no
9463 if test -n "$cf_new_cflags" ; then
9465 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9466 CFLAGS="${CFLAGS}$cf_new_cflags"
9470 if test -n "$cf_new_cppflags" ; then
9472 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9473 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9477 if test -n "$cf_new_extra_cppflags" ; then
9479 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9480 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9487 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9489 for cf_add_1lib in $cf_add_0lib; do
9490 for cf_add_2lib in $cf_add_libs; do
9491 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9496 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9500 cat >"conftest.$ac_ext" <<_ACEOF
9501 #line 9501 "configure"
9502 #include "confdefs.h"
9503 #include <${cf_cv_ncurses_header:-curses.h}>
9507 initscr(); mousemask(0,0); tigetstr((char *)0);
9512 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9513 if { (eval echo "$as_me:9513: \"$ac_link\"") >&5
9514 (eval $ac_link) 2>&5
9516 echo "$as_me:9516: \$? = $ac_status" >&5
9517 (exit "$ac_status"); } &&
9518 { ac_try='test -s "conftest$ac_exeext"'
9519 { (eval echo "$as_me:9519: \"$ac_try\"") >&5
9522 echo "$as_me:9522: \$? = $ac_status" >&5
9523 (exit "$ac_status"); }; }; then
9524 if test "$cross_compiling" = yes; then
9525 cf_test_ncuconfig=maybe
9527 cat >"conftest.$ac_ext" <<_ACEOF
9528 #line 9528 "configure"
9529 #include "confdefs.h"
9530 #include <${cf_cv_ncurses_header:-curses.h}>
9532 { const char *xx = curses_version(); return (xx == 0); }
9534 rm -f "conftest$ac_exeext"
9535 if { (eval echo "$as_me:9535: \"$ac_link\"") >&5
9536 (eval $ac_link) 2>&5
9538 echo "$as_me:9538: \$? = $ac_status" >&5
9539 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9540 { (eval echo "$as_me:9540: \"$ac_try\"") >&5
9543 echo "$as_me:9543: \$? = $ac_status" >&5
9544 (exit "$ac_status"); }; }; then
9545 cf_test_ncuconfig=yes
9547 echo "$as_me: program exited with status $ac_status" >&5
9548 echo "$as_me: failed program was:" >&5
9549 cat "conftest.$ac_ext" >&5
9550 cf_test_ncuconfig=no
9552 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9555 echo "$as_me: failed program was:" >&5
9556 cat "conftest.$ac_ext" >&5
9557 cf_test_ncuconfig=no
9559 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9561 CFLAGS="$cf_save_CFLAGS"
9562 CPPFLAGS="$cf_save_CPPFLAGS"
9563 LIBS="$cf_save_LIBS"
9565 if test "x$cf_test_ncuconfig" != xyes; then
9566 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9567 cf_pkg_cflags="$cf_temp"
9568 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9569 cf_pkg_libs="$cf_temp"
9574 for cf_add_cflags in $cf_pkg_cflags
9576 case "x$cf_add_cflags" in
9579 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9582 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9583 test "$CFLAGS" != "$cf_old_cflag" || break
9585 CFLAGS="$cf_old_cflag"
9588 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9591 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9592 test "$CPPFLAGS" != "$cf_old_cflag" || break
9594 CPPFLAGS="$cf_old_cflag"
9603 cf_new_extra_cppflags=
9605 for cf_add_cflags in $cf_add_cflags
9607 case "$cf_fix_cppflags" in
9609 case "$cf_add_cflags" in
9610 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9611 case "$cf_add_cflags" in
9613 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9615 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9616 && test -z "${cf_tst_cflags}" \
9617 && cf_fix_cppflags=yes
9619 if test "$cf_fix_cppflags" = yes ; then
9621 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9622 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9625 elif test "${cf_tst_cflags}" = "\"'" ; then
9627 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9628 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9638 case "$cf_add_cflags" in
9640 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9642 CPPFLAGS=`echo "$CPPFLAGS" | \
9643 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9644 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9649 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9650 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9657 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9658 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9665 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9666 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9668 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9670 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9671 && test -z "${cf_tst_cflags}" \
9672 && cf_fix_cppflags=no
9677 if test -n "$cf_new_cflags" ; then
9679 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9680 CFLAGS="${CFLAGS}$cf_new_cflags"
9684 if test -n "$cf_new_cppflags" ; then
9686 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9687 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9691 if test -n "$cf_new_extra_cppflags" ; then
9693 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9694 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9703 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9705 for cf_add_1lib in $cf_add_0lib; do
9706 for cf_add_2lib in $cf_add_libs; do
9707 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9712 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9716 cat >"conftest.$ac_ext" <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719 #include <${cf_cv_ncurses_header:-curses.h}>
9723 initscr(); mousemask(0,0); tigetstr((char *)0);
9728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9729 if { (eval echo "$as_me:9729: \"$ac_link\"") >&5
9730 (eval $ac_link) 2>&5
9732 echo "$as_me:9732: \$? = $ac_status" >&5
9733 (exit "$ac_status"); } &&
9734 { ac_try='test -s "conftest$ac_exeext"'
9735 { (eval echo "$as_me:9735: \"$ac_try\"") >&5
9738 echo "$as_me:9738: \$? = $ac_status" >&5
9739 (exit "$ac_status"); }; }; then
9740 if test "$cross_compiling" = yes; then
9741 cf_have_ncuconfig=maybe
9743 cat >"conftest.$ac_ext" <<_ACEOF
9744 #line 9744 "configure"
9745 #include "confdefs.h"
9746 #include <${cf_cv_ncurses_header:-curses.h}>
9748 { const char *xx = curses_version(); return (xx == 0); }
9750 rm -f "conftest$ac_exeext"
9751 if { (eval echo "$as_me:9751: \"$ac_link\"") >&5
9752 (eval $ac_link) 2>&5
9754 echo "$as_me:9754: \$? = $ac_status" >&5
9755 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9756 { (eval echo "$as_me:9756: \"$ac_try\"") >&5
9759 echo "$as_me:9759: \$? = $ac_status" >&5
9760 (exit "$ac_status"); }; }; then
9761 cf_have_ncuconfig=yes
9763 echo "$as_me: program exited with status $ac_status" >&5
9764 echo "$as_me: failed program was:" >&5
9765 cat "conftest.$ac_ext" >&5
9766 cf_have_ncuconfig=no
9768 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9771 echo "$as_me: failed program was:" >&5
9772 cat "conftest.$ac_ext" >&5
9773 cf_have_ncuconfig=no
9775 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9776 echo "$as_me:9776: result: $cf_have_ncuconfig" >&5
9777 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9778 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9779 if test "$cf_have_ncuconfig" != "yes"
9781 CPPFLAGS="$cf_save_CPPFLAGS"
9782 LIBS="$cf_save_LIBS"
9783 NCURSES_CONFIG_PKG=none
9786 cat >>confdefs.h <<\EOF
9790 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9792 echo "$as_me:9792: checking for terminfo header" >&5
9793 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9794 if test "${cf_cv_term_header+set}" = set; then
9795 echo $ECHO_N "(cached) $ECHO_C" >&6
9798 case "${cf_cv_ncurses_header}" in
9799 (*/ncurses.h|*/ncursesw.h)
9800 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9803 cf_term_header=term.h
9807 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9809 cat >"conftest.$ac_ext" <<_ACEOF
9810 #line 9810 "configure"
9811 #include "confdefs.h"
9813 #include <${cf_cv_ncurses_header:-curses.h}>
9819 int x = auto_left_margin; (void)x
9824 rm -f "conftest.$ac_objext"
9825 if { (eval echo "$as_me:9825: \"$ac_compile\"") >&5
9826 (eval $ac_compile) 2>&5
9828 echo "$as_me:9828: \$? = $ac_status" >&5
9829 (exit "$ac_status"); } &&
9830 { ac_try='test -s "conftest.$ac_objext"'
9831 { (eval echo "$as_me:9831: \"$ac_try\"") >&5
9834 echo "$as_me:9834: \$? = $ac_status" >&5
9835 (exit "$ac_status"); }; }; then
9837 cf_cv_term_header="$cf_test"
9839 echo "$as_me: failed program was:" >&5
9840 cat "conftest.$ac_ext" >&5
9842 cf_cv_term_header=unknown
9845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9846 test "$cf_cv_term_header" != unknown && break
9850 echo "$as_me:9850: result: $cf_cv_term_header" >&5
9851 echo "${ECHO_T}$cf_cv_term_header" >&6
9853 # Set definitions to allow ifdef'ing to accommodate subdirectories
9855 case "$cf_cv_term_header" in
9858 cat >>confdefs.h <<\EOF
9859 #define HAVE_TERM_H 1
9865 case "$cf_cv_term_header" in
9868 cat >>confdefs.h <<\EOF
9869 #define HAVE_NCURSES_TERM_H 1
9875 cat >>confdefs.h <<\EOF
9876 #define HAVE_NCURSESW_TERM_H 1
9885 echo "$as_me:9885: result: no" >&5
9886 echo "${ECHO_T}no" >&6
9887 NCURSES_CONFIG_PKG=none
9890 NCURSES_CONFIG_PKG=none
9893 if test "x$cf_have_ncuconfig" = "xno"; then
9894 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9896 if test -n "$ac_tool_prefix"; then
9897 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9899 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9900 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9901 echo "$as_me:9901: checking for $ac_word" >&5
9902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9903 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9904 echo $ECHO_N "(cached) $ECHO_C" >&6
9906 if test -n "$NCURSES_CONFIG"; then
9907 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9909 ac_save_IFS=$IFS; IFS=$ac_path_separator
9911 for ac_dir in $ac_dummy; do
9913 test -z "$ac_dir" && ac_dir=.
9914 $as_executable_p "$ac_dir/$ac_word" || continue
9915 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9916 echo "$as_me:9916: found $ac_dir/$ac_word" >&5
9922 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9923 if test -n "$NCURSES_CONFIG"; then
9924 echo "$as_me:9924: result: $NCURSES_CONFIG" >&5
9925 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9927 echo "$as_me:9927: result: no" >&5
9928 echo "${ECHO_T}no" >&6
9931 test -n "$NCURSES_CONFIG" && break
9934 if test -z "$NCURSES_CONFIG"; then
9935 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9936 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9938 # Extract the first word of "$ac_prog", so it can be a program name with args.
9939 set dummy $ac_prog; ac_word=$2
9940 echo "$as_me:9940: checking for $ac_word" >&5
9941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9942 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9943 echo $ECHO_N "(cached) $ECHO_C" >&6
9945 if test -n "$ac_ct_NCURSES_CONFIG"; then
9946 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9948 ac_save_IFS=$IFS; IFS=$ac_path_separator
9950 for ac_dir in $ac_dummy; do
9952 test -z "$ac_dir" && ac_dir=.
9953 $as_executable_p "$ac_dir/$ac_word" || continue
9954 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9955 echo "$as_me:9955: found $ac_dir/$ac_word" >&5
9961 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9962 if test -n "$ac_ct_NCURSES_CONFIG"; then
9963 echo "$as_me:9963: result: $ac_ct_NCURSES_CONFIG" >&5
9964 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9966 echo "$as_me:9966: result: no" >&5
9967 echo "${ECHO_T}no" >&6
9970 test -n "$ac_ct_NCURSES_CONFIG" && break
9972 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9974 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9977 if test "$NCURSES_CONFIG" != none ; then
9979 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9981 case "x$cf_add_cflags" in
9984 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9987 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9988 test "$CFLAGS" != "$cf_old_cflag" || break
9990 CFLAGS="$cf_old_cflag"
9993 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9996 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9997 test "$CPPFLAGS" != "$cf_old_cflag" || break
9999 CPPFLAGS="$cf_old_cflag"
10008 cf_new_extra_cppflags=
10010 for cf_add_cflags in $cf_add_cflags
10012 case "$cf_fix_cppflags" in
10014 case "$cf_add_cflags" in
10015 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10016 case "$cf_add_cflags" in
10018 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10020 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10021 && test -z "${cf_tst_cflags}" \
10022 && cf_fix_cppflags=yes
10024 if test "$cf_fix_cppflags" = yes ; then
10026 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10027 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10030 elif test "${cf_tst_cflags}" = "\"'" ; then
10032 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10033 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039 case "$CPPFLAGS" in
10043 case "$cf_add_cflags" in
10045 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10047 CPPFLAGS=`echo "$CPPFLAGS" | \
10048 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10049 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10054 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10055 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10062 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10063 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10070 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10071 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10073 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10075 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10076 && test -z "${cf_tst_cflags}" \
10077 && cf_fix_cppflags=no
10082 if test -n "$cf_new_cflags" ; then
10084 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10085 CFLAGS="${CFLAGS}$cf_new_cflags"
10089 if test -n "$cf_new_cppflags" ; then
10091 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10092 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10096 if test -n "$cf_new_extra_cppflags" ; then
10098 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10099 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10105 cf_add_libs="$LIBS"
10108 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10109 # filter duplicates
10110 for cf_add_1lib in $cf_add_0lib; do
10111 for cf_add_2lib in $cf_add_libs; do
10112 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10117 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10119 LIBS="$cf_add_libs"
10121 # even with config script, some packages use no-override for curses.h
10123 echo "$as_me:10123: checking if we have identified curses headers" >&5
10124 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10125 if test "${cf_cv_ncurses_header+set}" = set; then
10126 echo $ECHO_N "(cached) $ECHO_C" >&6
10129 cf_cv_ncurses_header=none
10131 ncurses.h ncurses/ncurses.h \
10132 curses.h ncurses/curses.h
10134 cat >"conftest.$ac_ext" <<_ACEOF
10135 #line 10135 "configure"
10136 #include "confdefs.h"
10137 #include <${cf_header}>
10141 initscr(); tgoto("?", 0,0)
10146 rm -f "conftest.$ac_objext"
10147 if { (eval echo "$as_me:10147: \"$ac_compile\"") >&5
10148 (eval $ac_compile) 2>&5
10150 echo "$as_me:10150: \$? = $ac_status" >&5
10151 (exit "$ac_status"); } &&
10152 { ac_try='test -s "conftest.$ac_objext"'
10153 { (eval echo "$as_me:10153: \"$ac_try\"") >&5
10154 (eval $ac_try) 2>&5
10156 echo "$as_me:10156: \$? = $ac_status" >&5
10157 (exit "$ac_status"); }; }; then
10158 cf_cv_ncurses_header=$cf_header; break
10160 echo "$as_me: failed program was:" >&5
10161 cat "conftest.$ac_ext" >&5
10163 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10167 echo "$as_me:10167: result: $cf_cv_ncurses_header" >&5
10168 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10170 if test "$cf_cv_ncurses_header" = none ; then
10171 { { echo "$as_me:10171: error: No curses header-files found" >&5
10172 echo "$as_me: error: No curses header-files found" >&2;}
10173 { (exit 1); exit 1; }; }
10176 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10178 for ac_header in $cf_cv_ncurses_header
10180 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10181 echo "$as_me:10181: checking for $ac_header" >&5
10182 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10184 echo $ECHO_N "(cached) $ECHO_C" >&6
10186 cat >"conftest.$ac_ext" <<_ACEOF
10187 #line 10187 "configure"
10188 #include "confdefs.h"
10189 #include <$ac_header>
10191 if { (eval echo "$as_me:10191: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10192 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10194 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10196 cat conftest.err >&5
10197 echo "$as_me:10197: \$? = $ac_status" >&5
10198 (exit "$ac_status"); } >/dev/null; then
10199 if test -s conftest.err; then
10200 ac_cpp_err=$ac_c_preproc_warn_flag
10207 if test -z "$ac_cpp_err"; then
10208 eval "$as_ac_Header=yes"
10210 echo "$as_me: failed program was:" >&5
10211 cat "conftest.$ac_ext" >&5
10212 eval "$as_ac_Header=no"
10214 rm -f conftest.err "conftest.$ac_ext"
10216 echo "$as_me:10216: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10217 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10218 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10219 cat >>confdefs.h <<EOF
10220 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10226 cat >>confdefs.h <<\EOF
10230 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10232 cat >>confdefs.h <<EOF
10233 #define $cf_nculib_ROOT 1
10236 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10240 cf_ncuhdr_root=ncurses
10242 test -n "$cf_cv_curses_dir" && \
10243 test "$cf_cv_curses_dir" != "no" && { \
10245 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10246 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10248 while test "$cf_add_incdir" != /usr/include
10250 if test -d "$cf_add_incdir"
10253 if test -n "$CFLAGS$CPPFLAGS" ; then
10254 # a loop is needed to ensure we can add subdirs of existing dirs
10255 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10256 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10257 cf_have_incdir=yes; break
10262 if test "$cf_have_incdir" = no ; then
10263 if test "$cf_add_incdir" = /usr/local/include ; then
10264 if test "$GCC" = yes
10266 cf_save_CPPFLAGS=$CPPFLAGS
10268 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10269 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10271 cat >"conftest.$ac_ext" <<_ACEOF
10272 #line 10272 "configure"
10273 #include "confdefs.h"
10283 rm -f "conftest.$ac_objext"
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285 (eval $ac_compile) 2>&5
10287 echo "$as_me:10287: \$? = $ac_status" >&5
10288 (exit "$ac_status"); } &&
10289 { ac_try='test -s "conftest.$ac_objext"'
10290 { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291 (eval $ac_try) 2>&5
10293 echo "$as_me:10293: \$? = $ac_status" >&5
10294 (exit "$ac_status"); }; }; then
10297 echo "$as_me: failed program was:" >&5
10298 cat "conftest.$ac_ext" >&5
10301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10302 CPPFLAGS=$cf_save_CPPFLAGS
10307 if test "$cf_have_incdir" = no ; then
10308 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10310 echo "${as_me:-configure}:10310: testing adding $cf_add_incdir to include-path ..." 1>&5
10312 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10314 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10315 test "$cf_top_incdir" = "$cf_add_incdir" && break
10316 cf_add_incdir="$cf_top_incdir"
10329 echo "$as_me:10329: checking for $cf_ncuhdr_root header in include-path" >&5
10330 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10331 if test "${cf_cv_ncurses_h+set}" = set; then
10332 echo $ECHO_N "(cached) $ECHO_C" >&6
10335 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10336 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10337 for cf_header in $cf_header_list
10340 cat >"conftest.$ac_ext" <<_ACEOF
10341 #line 10341 "configure"
10342 #include "confdefs.h"
10344 #include <$cf_header>
10349 #ifdef NCURSES_VERSION
10351 printf("%s\\n", NCURSES_VERSION);
10364 rm -f "conftest.$ac_objext"
10365 if { (eval echo "$as_me:10365: \"$ac_compile\"") >&5
10366 (eval $ac_compile) 2>&5
10368 echo "$as_me:10368: \$? = $ac_status" >&5
10369 (exit "$ac_status"); } &&
10370 { ac_try='test -s "conftest.$ac_objext"'
10371 { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372 (eval $ac_try) 2>&5
10374 echo "$as_me:10374: \$? = $ac_status" >&5
10375 (exit "$ac_status"); }; }; then
10376 cf_cv_ncurses_h=$cf_header
10379 echo "$as_me: failed program was:" >&5
10380 cat "conftest.$ac_ext" >&5
10383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10385 test "$cf_cv_ncurses_h" != no && break
10389 echo "$as_me:10389: result: $cf_cv_ncurses_h" >&5
10390 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10392 if test "$cf_cv_ncurses_h" != no ; then
10393 cf_cv_ncurses_header=$cf_cv_ncurses_h
10396 echo "$as_me:10396: checking for $cf_ncuhdr_root include-path" >&5
10397 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10398 if test "${cf_cv_ncurses_h2+set}" = set; then
10399 echo $ECHO_N "(cached) $ECHO_C" >&6
10402 test -n "$verbose" && echo
10406 # collect the current set of include-directories from compiler flags
10407 cf_header_path_list=""
10408 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10409 for cf_header_path in $CPPFLAGS $CFLAGS
10411 case "$cf_header_path" in
10413 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10415 test "x$cf_header_path" != "xNONE" && \
10416 test -d "$cf_header_path" && \
10418 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10419 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10420 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10421 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10422 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10423 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"
10426 cf_header_path_list="$cf_header_path_list $cf_search"
10432 # add the variations for the package we are looking for
10436 test "x$prefix" != "xNONE" && \
10437 test -d "$prefix" && \
10439 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10440 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10441 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10442 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10443 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10444 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10447 for cf_subdir_prefix in \
10456 test "x$cf_subdir_prefix" != "x$prefix" && \
10457 test -d "$cf_subdir_prefix" && \
10458 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10459 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10460 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10461 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10462 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10463 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10464 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"
10469 test "$includedir" != NONE && \
10470 test "$includedir" != "/usr/include" && \
10471 test -d "$includedir" && {
10472 test -d "$includedir" && cf_search="$cf_search $includedir"
10473 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10476 test "$oldincludedir" != NONE && \
10477 test "$oldincludedir" != "/usr/include" && \
10478 test -d "$oldincludedir" && {
10479 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10480 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10483 cf_search="$cf_search $cf_header_path_list"
10485 test -n "$verbose" && echo "search path $cf_search"
10486 cf_save2_CPPFLAGS="$CPPFLAGS"
10487 for cf_incdir in $cf_search
10490 if test -n "$cf_incdir" ; then
10491 for cf_add_incdir in $cf_incdir
10493 while test "$cf_add_incdir" != /usr/include
10495 if test -d "$cf_add_incdir"
10498 if test -n "$CFLAGS$CPPFLAGS" ; then
10499 # a loop is needed to ensure we can add subdirs of existing dirs
10500 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10501 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10502 cf_have_incdir=yes; break
10507 if test "$cf_have_incdir" = no ; then
10508 if test "$cf_add_incdir" = /usr/local/include ; then
10509 if test "$GCC" = yes
10511 cf_save_CPPFLAGS=$CPPFLAGS
10513 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10514 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10516 cat >"conftest.$ac_ext" <<_ACEOF
10517 #line 10517 "configure"
10518 #include "confdefs.h"
10528 rm -f "conftest.$ac_objext"
10529 if { (eval echo "$as_me:10529: \"$ac_compile\"") >&5
10530 (eval $ac_compile) 2>&5
10532 echo "$as_me:10532: \$? = $ac_status" >&5
10533 (exit "$ac_status"); } &&
10534 { ac_try='test -s "conftest.$ac_objext"'
10535 { (eval echo "$as_me:10535: \"$ac_try\"") >&5
10536 (eval $ac_try) 2>&5
10538 echo "$as_me:10538: \$? = $ac_status" >&5
10539 (exit "$ac_status"); }; }; then
10542 echo "$as_me: failed program was:" >&5
10543 cat "conftest.$ac_ext" >&5
10546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10547 CPPFLAGS=$cf_save_CPPFLAGS
10552 if test "$cf_have_incdir" = no ; then
10553 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10555 echo "${as_me:-configure}:10555: testing adding $cf_add_incdir to include-path ..." 1>&5
10557 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10559 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10560 test "$cf_top_incdir" = "$cf_add_incdir" && break
10561 cf_add_incdir="$cf_top_incdir"
10577 cat >"conftest.$ac_ext" <<_ACEOF
10578 #line 10578 "configure"
10579 #include "confdefs.h"
10581 #include <$cf_header>
10586 #ifdef NCURSES_VERSION
10588 printf("%s\\n", NCURSES_VERSION);
10601 rm -f "conftest.$ac_objext"
10602 if { (eval echo "$as_me:10602: \"$ac_compile\"") >&5
10603 (eval $ac_compile) 2>&5
10605 echo "$as_me:10605: \$? = $ac_status" >&5
10606 (exit "$ac_status"); } &&
10607 { ac_try='test -s "conftest.$ac_objext"'
10608 { (eval echo "$as_me:10608: \"$ac_try\"") >&5
10609 (eval $ac_try) 2>&5
10611 echo "$as_me:10611: \$? = $ac_status" >&5
10612 (exit "$ac_status"); }; }; then
10613 cf_cv_ncurses_h2=$cf_header
10616 echo "$as_me: failed program was:" >&5
10617 cat "conftest.$ac_ext" >&5
10618 cf_cv_ncurses_h2=no
10620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10622 if test "$cf_cv_ncurses_h2" != no ; then
10623 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10624 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10627 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10629 CPPFLAGS="$cf_save2_CPPFLAGS"
10630 test "$cf_cv_ncurses_h2" != no && break
10632 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10632: error: not found" >&5
10633 echo "$as_me: error: not found" >&2;}
10634 { (exit 1); exit 1; }; }
10637 echo "$as_me:10637: result: $cf_cv_ncurses_h2" >&5
10638 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10640 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10641 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10642 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10643 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10646 if test -n "$cf_1st_incdir" ; then
10647 for cf_add_incdir in $cf_1st_incdir
10649 while test "$cf_add_incdir" != /usr/include
10651 if test -d "$cf_add_incdir"
10654 if test -n "$CFLAGS$CPPFLAGS" ; then
10655 # a loop is needed to ensure we can add subdirs of existing dirs
10656 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10657 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10658 cf_have_incdir=yes; break
10663 if test "$cf_have_incdir" = no ; then
10664 if test "$cf_add_incdir" = /usr/local/include ; then
10665 if test "$GCC" = yes
10667 cf_save_CPPFLAGS=$CPPFLAGS
10669 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10670 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10672 cat >"conftest.$ac_ext" <<_ACEOF
10673 #line 10673 "configure"
10674 #include "confdefs.h"
10684 rm -f "conftest.$ac_objext"
10685 if { (eval echo "$as_me:10685: \"$ac_compile\"") >&5
10686 (eval $ac_compile) 2>&5
10688 echo "$as_me:10688: \$? = $ac_status" >&5
10689 (exit "$ac_status"); } &&
10690 { ac_try='test -s "conftest.$ac_objext"'
10691 { (eval echo "$as_me:10691: \"$ac_try\"") >&5
10692 (eval $ac_try) 2>&5
10694 echo "$as_me:10694: \$? = $ac_status" >&5
10695 (exit "$ac_status"); }; }; then
10698 echo "$as_me: failed program was:" >&5
10699 cat "conftest.$ac_ext" >&5
10702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10703 CPPFLAGS=$cf_save_CPPFLAGS
10708 if test "$cf_have_incdir" = no ; then
10709 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10711 echo "${as_me:-configure}:10711: testing adding $cf_add_incdir to include-path ..." 1>&5
10713 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10715 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10716 test "$cf_top_incdir" = "$cf_add_incdir" && break
10717 cf_add_incdir="$cf_top_incdir"
10730 # Set definitions to allow ifdef'ing for ncurses.h
10732 case "$cf_cv_ncurses_header" in
10735 cat >>confdefs.h <<\EOF
10736 #define HAVE_NCURSES_H 1
10742 case "$cf_cv_ncurses_header" in
10743 (ncurses/curses.h|ncurses/ncurses.h)
10745 cat >>confdefs.h <<\EOF
10746 #define HAVE_NCURSES_NCURSES_H 1
10750 (ncursesw/curses.h|ncursesw/ncurses.h)
10752 cat >>confdefs.h <<\EOF
10753 #define HAVE_NCURSESW_NCURSES_H 1
10759 echo "$as_me:10759: checking for terminfo header" >&5
10760 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10761 if test "${cf_cv_term_header+set}" = set; then
10762 echo $ECHO_N "(cached) $ECHO_C" >&6
10765 case "${cf_cv_ncurses_header}" in
10766 (*/ncurses.h|*/ncursesw.h)
10767 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10770 cf_term_header=term.h
10774 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10776 cat >"conftest.$ac_ext" <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10780 #include <${cf_cv_ncurses_header:-curses.h}>
10781 #include <$cf_test>
10786 int x = auto_left_margin; (void)x
10791 rm -f "conftest.$ac_objext"
10792 if { (eval echo "$as_me:10792: \"$ac_compile\"") >&5
10793 (eval $ac_compile) 2>&5
10795 echo "$as_me:10795: \$? = $ac_status" >&5
10796 (exit "$ac_status"); } &&
10797 { ac_try='test -s "conftest.$ac_objext"'
10798 { (eval echo "$as_me:10798: \"$ac_try\"") >&5
10799 (eval $ac_try) 2>&5
10801 echo "$as_me:10801: \$? = $ac_status" >&5
10802 (exit "$ac_status"); }; }; then
10804 cf_cv_term_header="$cf_test"
10806 echo "$as_me: failed program was:" >&5
10807 cat "conftest.$ac_ext" >&5
10809 cf_cv_term_header=unknown
10812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10813 test "$cf_cv_term_header" != unknown && break
10817 echo "$as_me:10817: result: $cf_cv_term_header" >&5
10818 echo "${ECHO_T}$cf_cv_term_header" >&6
10820 # Set definitions to allow ifdef'ing to accommodate subdirectories
10822 case "$cf_cv_term_header" in
10825 cat >>confdefs.h <<\EOF
10826 #define HAVE_TERM_H 1
10832 case "$cf_cv_term_header" in
10835 cat >>confdefs.h <<\EOF
10836 #define HAVE_NCURSES_TERM_H 1
10842 cat >>confdefs.h <<\EOF
10843 #define HAVE_NCURSESW_TERM_H 1
10849 # some applications need this, but should check for NCURSES_VERSION
10851 cat >>confdefs.h <<\EOF
10855 echo "$as_me:10855: checking for ncurses version" >&5
10856 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10857 if test "${cf_cv_ncurses_version+set}" = set; then
10858 echo $ECHO_N "(cached) $ECHO_C" >&6
10861 cf_cv_ncurses_version=no
10863 rm -f "$cf_tempfile"
10864 if test "$cross_compiling" = yes; then
10866 # This will not work if the preprocessor splits the line after the
10867 # Autoconf token. The 'unproto' program does that.
10868 cat > "conftest.$ac_ext" <<EOF
10869 #include <${cf_cv_ncurses_header:-curses.h}>
10871 #ifdef NCURSES_VERSION
10872 Autoconf NCURSES_VERSION
10880 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10881 { (eval echo "$as_me:10881: \"$cf_try\"") >&5
10882 (eval $cf_try) 2>&5
10884 echo "$as_me:10884: \$? = $ac_status" >&5
10885 (exit "$ac_status"); }
10886 if test -f conftest.out ; then
10887 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10888 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10893 cat >"conftest.$ac_ext" <<_ACEOF
10894 #line 10894 "configure"
10895 #include "confdefs.h"
10897 #include <${cf_cv_ncurses_header:-curses.h}>
10901 FILE *fp = fopen("$cf_tempfile", "w");
10902 #ifdef NCURSES_VERSION
10903 # ifdef NCURSES_VERSION_PATCH
10904 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10906 fprintf(fp, "%s\\n", NCURSES_VERSION);
10909 # ifdef __NCURSES_H
10910 fprintf(fp, "old\\n");
10915 ${cf_cv_main_return:-return}(0);
10918 rm -f "conftest$ac_exeext"
10919 if { (eval echo "$as_me:10919: \"$ac_link\"") >&5
10920 (eval $ac_link) 2>&5
10922 echo "$as_me:10922: \$? = $ac_status" >&5
10923 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10924 { (eval echo "$as_me:10924: \"$ac_try\"") >&5
10925 (eval $ac_try) 2>&5
10927 echo "$as_me:10927: \$? = $ac_status" >&5
10928 (exit "$ac_status"); }; }; then
10930 cf_cv_ncurses_version=`cat $cf_tempfile`
10932 echo "$as_me: program exited with status $ac_status" >&5
10933 echo "$as_me: failed program was:" >&5
10934 cat "conftest.$ac_ext" >&5
10936 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10938 rm -f "$cf_tempfile"
10941 echo "$as_me:10941: result: $cf_cv_ncurses_version" >&5
10942 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10943 test "$cf_cv_ncurses_version" = no ||
10944 cat >>confdefs.h <<\EOF
10948 cf_nculib_root=ncurses
10949 # This works, except for the special case where we find gpm, but
10950 # ncurses is in a nonstandard location via $LIBS, and we really want
10953 cf_ncurses_SAVE="$LIBS"
10954 echo "$as_me:10954: checking for Gpm_Open in -lgpm" >&5
10955 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10956 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10957 echo $ECHO_N "(cached) $ECHO_C" >&6
10959 ac_check_lib_save_LIBS=$LIBS
10961 cat >"conftest.$ac_ext" <<_ACEOF
10962 #line 10962 "configure"
10963 #include "confdefs.h"
10965 /* Override any gcc2 internal prototype to avoid an error. */
10969 /* We use char because int might match the return type of a gcc2
10970 builtin and then its argument prototype would still apply. */
10980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10981 if { (eval echo "$as_me:10981: \"$ac_link\"") >&5
10982 (eval $ac_link) 2>&5
10984 echo "$as_me:10984: \$? = $ac_status" >&5
10985 (exit "$ac_status"); } &&
10986 { ac_try='test -s "conftest$ac_exeext"'
10987 { (eval echo "$as_me:10987: \"$ac_try\"") >&5
10988 (eval $ac_try) 2>&5
10990 echo "$as_me:10990: \$? = $ac_status" >&5
10991 (exit "$ac_status"); }; }; then
10992 ac_cv_lib_gpm_Gpm_Open=yes
10994 echo "$as_me: failed program was:" >&5
10995 cat "conftest.$ac_ext" >&5
10996 ac_cv_lib_gpm_Gpm_Open=no
10998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10999 LIBS=$ac_check_lib_save_LIBS
11001 echo "$as_me:11001: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11002 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11003 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11004 echo "$as_me:11004: checking for initscr in -lgpm" >&5
11005 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11006 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11007 echo $ECHO_N "(cached) $ECHO_C" >&6
11009 ac_check_lib_save_LIBS=$LIBS
11011 cat >"conftest.$ac_ext" <<_ACEOF
11012 #line 11012 "configure"
11013 #include "confdefs.h"
11015 /* Override any gcc2 internal prototype to avoid an error. */
11019 /* We use char because int might match the return type of a gcc2
11020 builtin and then its argument prototype would still apply. */
11030 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11031 if { (eval echo "$as_me:11031: \"$ac_link\"") >&5
11032 (eval $ac_link) 2>&5
11034 echo "$as_me:11034: \$? = $ac_status" >&5
11035 (exit "$ac_status"); } &&
11036 { ac_try='test -s "conftest$ac_exeext"'
11037 { (eval echo "$as_me:11037: \"$ac_try\"") >&5
11038 (eval $ac_try) 2>&5
11040 echo "$as_me:11040: \$? = $ac_status" >&5
11041 (exit "$ac_status"); }; }; then
11042 ac_cv_lib_gpm_initscr=yes
11044 echo "$as_me: failed program was:" >&5
11045 cat "conftest.$ac_ext" >&5
11046 ac_cv_lib_gpm_initscr=no
11048 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11049 LIBS=$ac_check_lib_save_LIBS
11051 echo "$as_me:11051: result: $ac_cv_lib_gpm_initscr" >&5
11052 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11053 if test "$ac_cv_lib_gpm_initscr" = yes; then
11054 LIBS="$cf_ncurses_SAVE"
11056 cf_ncurses_LIBS="-lgpm"
11063 # This is only necessary if you are linking against an obsolete
11064 # version of ncurses (but it should do no harm, since it is static).
11065 if test "$cf_nculib_root" = ncurses ; then
11066 echo "$as_me:11066: checking for tgoto in -lmytinfo" >&5
11067 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11068 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11069 echo $ECHO_N "(cached) $ECHO_C" >&6
11071 ac_check_lib_save_LIBS=$LIBS
11072 LIBS="-lmytinfo $LIBS"
11073 cat >"conftest.$ac_ext" <<_ACEOF
11074 #line 11074 "configure"
11075 #include "confdefs.h"
11077 /* Override any gcc2 internal prototype to avoid an error. */
11081 /* We use char because int might match the return type of a gcc2
11082 builtin and then its argument prototype would still apply. */
11092 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11093 if { (eval echo "$as_me:11093: \"$ac_link\"") >&5
11094 (eval $ac_link) 2>&5
11096 echo "$as_me:11096: \$? = $ac_status" >&5
11097 (exit "$ac_status"); } &&
11098 { ac_try='test -s "conftest$ac_exeext"'
11099 { (eval echo "$as_me:11099: \"$ac_try\"") >&5
11100 (eval $ac_try) 2>&5
11102 echo "$as_me:11102: \$? = $ac_status" >&5
11103 (exit "$ac_status"); }; }; then
11104 ac_cv_lib_mytinfo_tgoto=yes
11106 echo "$as_me: failed program was:" >&5
11107 cat "conftest.$ac_ext" >&5
11108 ac_cv_lib_mytinfo_tgoto=no
11110 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11111 LIBS=$ac_check_lib_save_LIBS
11113 echo "$as_me:11113: result: $ac_cv_lib_mytinfo_tgoto" >&5
11114 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11115 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11116 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11123 cf_add_libs="$LIBS"
11126 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11127 # filter duplicates
11128 for cf_add_1lib in $cf_add_0lib; do
11129 for cf_add_2lib in $cf_add_libs; do
11130 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11135 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11137 LIBS="$cf_add_libs"
11139 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11142 cf_add_libs="$LIBS"
11145 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11146 # filter duplicates
11147 for cf_add_1lib in $cf_add_0lib; do
11148 for cf_add_2lib in $cf_add_libs; do
11149 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11154 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11156 LIBS="$cf_add_libs"
11160 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11162 echo "$as_me:11162: checking for initscr" >&5
11163 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11164 if test "${ac_cv_func_initscr+set}" = set; then
11165 echo $ECHO_N "(cached) $ECHO_C" >&6
11167 cat >"conftest.$ac_ext" <<_ACEOF
11168 #line 11168 "configure"
11169 #include "confdefs.h"
11170 #define initscr autoconf_temporary
11171 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11178 /* We use char because int might match the return type of a gcc2
11179 builtin and then its argument prototype would still apply. */
11180 char initscr (void);
11186 /* The GNU C library defines stubs for functions which it implements
11187 to always fail with ENOSYS. Some functions are actually named
11188 something starting with __ and the normal name is an alias. */
11189 #if defined (__stub_initscr) || defined (__stub___initscr)
11190 #error found stub for initscr
11198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11199 if { (eval echo "$as_me:11199: \"$ac_link\"") >&5
11200 (eval $ac_link) 2>&5
11202 echo "$as_me:11202: \$? = $ac_status" >&5
11203 (exit "$ac_status"); } &&
11204 { ac_try='test -s "conftest$ac_exeext"'
11205 { (eval echo "$as_me:11205: \"$ac_try\"") >&5
11206 (eval $ac_try) 2>&5
11208 echo "$as_me:11208: \$? = $ac_status" >&5
11209 (exit "$ac_status"); }; }; then
11210 ac_cv_func_initscr=yes
11212 echo "$as_me: failed program was:" >&5
11213 cat "conftest.$ac_ext" >&5
11214 ac_cv_func_initscr=no
11216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11218 echo "$as_me:11218: result: $ac_cv_func_initscr" >&5
11219 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11220 if test "$ac_cv_func_initscr" = yes; then
11221 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11224 cf_save_LIBS="$LIBS"
11225 echo "$as_me:11225: checking for initscr in -l$cf_nculib_root" >&5
11226 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11227 LIBS="-l$cf_nculib_root $LIBS"
11228 cat >"conftest.$ac_ext" <<_ACEOF
11229 #line 11229 "configure"
11230 #include "confdefs.h"
11231 #include <${cf_cv_ncurses_header:-curses.h}>
11240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11241 if { (eval echo "$as_me:11241: \"$ac_link\"") >&5
11242 (eval $ac_link) 2>&5
11244 echo "$as_me:11244: \$? = $ac_status" >&5
11245 (exit "$ac_status"); } &&
11246 { ac_try='test -s "conftest$ac_exeext"'
11247 { (eval echo "$as_me:11247: \"$ac_try\"") >&5
11248 (eval $ac_try) 2>&5
11250 echo "$as_me:11250: \$? = $ac_status" >&5
11251 (exit "$ac_status"); }; }; then
11252 echo "$as_me:11252: result: yes" >&5
11253 echo "${ECHO_T}yes" >&6
11254 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11257 echo "$as_me: failed program was:" >&5
11258 cat "conftest.$ac_ext" >&5
11259 echo "$as_me:11259: result: no" >&5
11260 echo "${ECHO_T}no" >&6
11263 cf_library_path_list=""
11264 if test -n "${LDFLAGS}${LIBS}" ; then
11265 for cf_library_path in $LDFLAGS $LIBS
11267 case "$cf_library_path" in
11269 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11271 test "x$cf_library_path" != "xNONE" && \
11272 test -d "$cf_library_path" && \
11274 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11275 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11276 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11277 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11278 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11279 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"
11282 cf_library_path_list="$cf_library_path_list $cf_search"
11290 test "x$prefix" != "xNONE" && \
11291 test -d "$prefix" && \
11293 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11294 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11295 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11296 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11297 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11298 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11301 for cf_subdir_prefix in \
11310 test "x$cf_subdir_prefix" != "x$prefix" && \
11311 test -d "$cf_subdir_prefix" && \
11312 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11313 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11314 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11315 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11316 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11317 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11318 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"
11323 cf_search="$cf_library_path_list $cf_search"
11325 for cf_libdir in $cf_search
11327 echo "$as_me:11327: checking for -l$cf_nculib_root in $cf_libdir" >&5
11328 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11329 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11330 cat >"conftest.$ac_ext" <<_ACEOF
11331 #line 11331 "configure"
11332 #include "confdefs.h"
11333 #include <${cf_cv_ncurses_header:-curses.h}>
11342 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11343 if { (eval echo "$as_me:11343: \"$ac_link\"") >&5
11344 (eval $ac_link) 2>&5
11346 echo "$as_me:11346: \$? = $ac_status" >&5
11347 (exit "$ac_status"); } &&
11348 { ac_try='test -s "conftest$ac_exeext"'
11349 { (eval echo "$as_me:11349: \"$ac_try\"") >&5
11350 (eval $ac_try) 2>&5
11352 echo "$as_me:11352: \$? = $ac_status" >&5
11353 (exit "$ac_status"); }; }; then
11354 echo "$as_me:11354: result: yes" >&5
11355 echo "${ECHO_T}yes" >&6
11356 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11359 echo "$as_me: failed program was:" >&5
11360 cat "conftest.$ac_ext" >&5
11361 echo "$as_me:11361: result: no" >&5
11362 echo "${ECHO_T}no" >&6
11363 LIBS="$cf_save_LIBS"
11365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11373 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11375 if test "$cf_found_library" = no ; then
11376 { { echo "$as_me:11376: error: Cannot link $cf_nculib_root library" >&5
11377 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11378 { (exit 1); exit 1; }; }
11383 if test -n "$cf_ncurses_LIBS" ; then
11384 echo "$as_me:11384: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11385 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11386 cf_ncurses_SAVE="$LIBS"
11387 for p in $cf_ncurses_LIBS ; do
11388 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11389 if test "$q" != "$LIBS" ; then
11393 cat >"conftest.$ac_ext" <<_ACEOF
11394 #line 11394 "configure"
11395 #include "confdefs.h"
11396 #include <${cf_cv_ncurses_header:-curses.h}>
11400 initscr(); mousemask(0,0); tigetstr((char *)0);
11405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11406 if { (eval echo "$as_me:11406: \"$ac_link\"") >&5
11407 (eval $ac_link) 2>&5
11409 echo "$as_me:11409: \$? = $ac_status" >&5
11410 (exit "$ac_status"); } &&
11411 { ac_try='test -s "conftest$ac_exeext"'
11412 { (eval echo "$as_me:11412: \"$ac_try\"") >&5
11413 (eval $ac_try) 2>&5
11415 echo "$as_me:11415: \$? = $ac_status" >&5
11416 (exit "$ac_status"); }; }; then
11417 echo "$as_me:11417: result: yes" >&5
11418 echo "${ECHO_T}yes" >&6
11420 echo "$as_me: failed program was:" >&5
11421 cat "conftest.$ac_ext" >&5
11422 echo "$as_me:11422: result: no" >&5
11423 echo "${ECHO_T}no" >&6
11424 LIBS="$cf_ncurses_SAVE"
11426 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11429 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11431 cat >>confdefs.h <<EOF
11432 #define $cf_nculib_ROOT 1
11437 NCURSES_CONFIG=none
11442 if test "$NCURSES_CONFIG_PKG" != none ; then
11443 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11445 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11446 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11447 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11449 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11450 if test -z "$cf_cv_abi_version"
11452 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11455 elif test "$NCURSES_CONFIG" != none ; then
11457 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11459 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11460 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11461 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11463 # ABI version is not available from headers
11464 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11468 for cf_name in MAJOR MINOR PATCH
11470 cat >conftest.$ac_ext <<CF_EOF
11471 #include <${cf_cv_ncurses_header:-curses.h}>
11472 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11474 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11475 { (eval echo "$as_me:11475: \"$cf_try\"") >&5
11476 (eval $cf_try) 2>&5
11478 echo "$as_me:11478: \$? = $ac_status" >&5
11479 (exit "$ac_status"); }
11480 if test -f conftest.out ; then
11481 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11482 eval NCURSES_$cf_name=\"$cf_result\"
11483 # cat conftest.$ac_ext
11488 cf_cv_abi_version=${NCURSES_MAJOR}
11492 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11494 cf_cv_timestamp=`date`
11496 echo "$as_me:11496: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11497 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11499 echo "$as_me:11499: checking if you want to have a library-prefix" >&5
11500 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11502 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11503 if test "${with_lib_prefix+set}" = set; then
11504 withval="$with_lib_prefix"
11505 with_lib_prefix=$withval
11507 with_lib_prefix=auto
11509 echo "$as_me:11509: result: $with_lib_prefix" >&5
11510 echo "${ECHO_T}$with_lib_prefix" >&6
11512 if test "$with_lib_prefix" = auto
11515 case "$cf_cv_system_name" in
11517 if test "$DFT_LWR_MODEL" = libtool; then
11526 (*) LIB_PREFIX='lib'
11529 cf_prefix=$LIB_PREFIX
11531 elif test "$with_lib_prefix" = no
11535 LIB_PREFIX=$with_lib_prefix
11540 ###############################################################################
11542 if test X"$CC_G_OPT" = X"" ; then
11544 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11547 echo "$as_me:11547: checking for default loader flags" >&5
11548 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11549 case $DFT_LWR_MODEL in
11550 (normal) LD_MODEL='' ;;
11551 (debug) LD_MODEL=$CC_G_OPT ;;
11552 (profile) LD_MODEL='-pg';;
11553 (shared) LD_MODEL='' ;;
11555 echo "$as_me:11555: result: $LD_MODEL" >&5
11556 echo "${ECHO_T}$LD_MODEL" >&6
11559 if test "x$cf_cv_enable_rpath" != xno
11561 echo "$as_me:11561: checking for an rpath option" >&5
11562 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11563 case "$cf_cv_system_name" in
11565 if test "$GCC" = yes; then
11566 LD_RPATH_OPT="-Wl,-rpath,"
11568 LD_RPATH_OPT="-rpath "
11571 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11572 LD_RPATH_OPT="-Wl,-rpath,"
11574 (openbsd[2-9].*|mirbsd*)
11575 LD_RPATH_OPT="-Wl,-rpath,"
11578 LD_RPATH_OPT="-rpath "
11581 LD_RPATH_OPT="-Wl,-rpath,"
11584 LD_RPATH_OPT="-rpath "
11592 echo "$as_me:11592: result: $LD_RPATH_OPT" >&5
11593 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11595 case "x$LD_RPATH_OPT" in
11597 echo "$as_me:11597: checking if we need a space after rpath option" >&5
11598 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11599 cf_save_LIBS="$LIBS"
11601 cf_add_libs="$LIBS"
11604 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11605 # filter duplicates
11606 for cf_add_1lib in $cf_add_0lib; do
11607 for cf_add_2lib in $cf_add_libs; do
11608 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11613 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11615 LIBS="$cf_add_libs"
11617 cat >"conftest.$ac_ext" <<_ACEOF
11618 #line 11618 "configure"
11619 #include "confdefs.h"
11629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11630 if { (eval echo "$as_me:11630: \"$ac_link\"") >&5
11631 (eval $ac_link) 2>&5
11633 echo "$as_me:11633: \$? = $ac_status" >&5
11634 (exit "$ac_status"); } &&
11635 { ac_try='test -s "conftest$ac_exeext"'
11636 { (eval echo "$as_me:11636: \"$ac_try\"") >&5
11637 (eval $ac_try) 2>&5
11639 echo "$as_me:11639: \$? = $ac_status" >&5
11640 (exit "$ac_status"); }; }; then
11643 echo "$as_me: failed program was:" >&5
11644 cat "conftest.$ac_ext" >&5
11647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11648 LIBS="$cf_save_LIBS"
11649 echo "$as_me:11649: result: $cf_rpath_space" >&5
11650 echo "${ECHO_T}$cf_rpath_space" >&6
11651 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11660 INSTALL_LIB="-m 644"
11661 : ${rel_builddir:=.}
11667 cf_cv_do_symlinks=no
11669 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11671 echo "$as_me:11671: checking if release/abi version should be used for shared libs" >&5
11672 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11674 # Check whether --with-shlib-version or --without-shlib-version was given.
11675 if test "${with_shlib_version+set}" = set; then
11676 withval="$with_shlib_version"
11677 test -z "$withval" && withval=auto
11680 cf_cv_shlib_version=auto
11683 cf_cv_shlib_version=$withval
11686 echo "$as_me:11686: result: $withval" >&5
11687 echo "${ECHO_T}$withval" >&6
11688 { { echo "$as_me:11688: error: option value must be one of: rel, abi, or auto" >&5
11689 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11690 { (exit 1); exit 1; }; }
11695 cf_cv_shlib_version=auto
11697 echo "$as_me:11697: result: $cf_cv_shlib_version" >&5
11698 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11700 cf_cv_rm_so_locs=no
11703 # Some less-capable ports of gcc support only -fpic
11707 if test "$GCC" = yes
11711 case "$cf_cv_system_name" in
11712 (*linux*) # e.g., PGI compiler
11718 if test "$cf_try_fPIC" = yes
11720 echo "$as_me:11720: checking which $CC option to use" >&5
11721 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11722 cf_save_CFLAGS="$CFLAGS"
11723 for CC_SHARED_OPTS in -fPIC -fpic ''
11725 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11726 cat >"conftest.$ac_ext" <<_ACEOF
11727 #line 11727 "configure"
11728 #include "confdefs.h"
11738 rm -f "conftest.$ac_objext"
11739 if { (eval echo "$as_me:11739: \"$ac_compile\"") >&5
11740 (eval $ac_compile) 2>&5
11742 echo "$as_me:11742: \$? = $ac_status" >&5
11743 (exit "$ac_status"); } &&
11744 { ac_try='test -s "conftest.$ac_objext"'
11745 { (eval echo "$as_me:11745: \"$ac_try\"") >&5
11746 (eval $ac_try) 2>&5
11748 echo "$as_me:11748: \$? = $ac_status" >&5
11749 (exit "$ac_status"); }; }; then
11752 echo "$as_me: failed program was:" >&5
11753 cat "conftest.$ac_ext" >&5
11755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11757 echo "$as_me:11757: result: $CC_SHARED_OPTS" >&5
11758 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11759 CFLAGS="$cf_save_CFLAGS"
11762 cf_cv_shlib_version_infix=no
11764 case "$cf_cv_system_name" in
11765 (aix4.3-9*|aix[5-7]*)
11766 if test "$GCC" = yes; then
11767 CC_SHARED_OPTS='-Wl,-brtl'
11768 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11770 CC_SHARED_OPTS='-brtl'
11771 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11772 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11776 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11780 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11781 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11782 cf_cv_shlib_version=cygdll
11783 cf_cv_shlib_version_infix=cygdll
11786 cat >mk_shared_lib.sh <<-CF_EOF
11789 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11792 Linking shared library
11793 ** SHARED_LIB \$SHARED_LIB
11794 ** IMPORT_LIB \$IMPORT_LIB
11796 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11798 chmod +x mk_shared_lib.sh
11802 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11803 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11804 cf_cv_shlib_version=msysdll
11805 cf_cv_shlib_version_infix=msysdll
11808 cat >mk_shared_lib.sh <<-CF_EOF
11811 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11814 Linking shared library
11815 ** SHARED_LIB \$SHARED_LIB
11816 ** IMPORT_LIB \$IMPORT_LIB
11818 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11820 chmod +x mk_shared_lib.sh
11823 cf_try_cflags="no-cpp-precomp"
11824 CC_SHARED_OPTS="-dynamic"
11825 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11826 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11827 cf_cv_shlib_version_infix=yes
11828 echo "$as_me:11828: checking if ld -search_paths_first works" >&5
11829 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11830 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11831 echo $ECHO_N "(cached) $ECHO_C" >&6
11834 cf_save_LDFLAGS=$LDFLAGS
11835 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11836 cat >"conftest.$ac_ext" <<_ACEOF
11837 #line 11837 "configure"
11838 #include "confdefs.h"
11848 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11849 if { (eval echo "$as_me:11849: \"$ac_link\"") >&5
11850 (eval $ac_link) 2>&5
11852 echo "$as_me:11852: \$? = $ac_status" >&5
11853 (exit "$ac_status"); } &&
11854 { ac_try='test -s "conftest$ac_exeext"'
11855 { (eval echo "$as_me:11855: \"$ac_try\"") >&5
11856 (eval $ac_try) 2>&5
11858 echo "$as_me:11858: \$? = $ac_status" >&5
11859 (exit "$ac_status"); }; }; then
11860 cf_cv_ldflags_search_paths_first=yes
11862 echo "$as_me: failed program was:" >&5
11863 cat "conftest.$ac_ext" >&5
11864 cf_cv_ldflags_search_paths_first=no
11866 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11867 LDFLAGS=$cf_save_LDFLAGS
11869 echo "$as_me:11869: result: $cf_cv_ldflags_search_paths_first" >&5
11870 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11871 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11872 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11877 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11878 if test "$cf_cv_shlib_version" = rel; then
11879 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11881 cf_cv_shared_soname='`basename $@`'
11884 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11887 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11888 if test "$GCC" != yes; then
11889 CC_SHARED_OPTS='+Z'
11891 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11892 INSTALL_LIB="-m 555"
11895 # (tested with gcc 2.7.2 -- I don't have c89)
11896 if test "$GCC" = yes; then
11897 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11899 CC_SHARED_OPTS='+Z'
11900 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11902 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11903 # HP-UX shared libraries must be executable, and should be
11904 # readonly to exploit a quirk in the memory manager.
11905 INSTALL_LIB="-m 555"
11908 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11909 if test "$cf_cv_shlib_version" = rel; then
11910 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11912 cf_shared_soname='`basename $@`'
11915 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11918 if test "$cf_cv_enable_rpath" = yes ; then
11919 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11921 # tested with IRIX 5.2 and 'cc'.
11922 if test "$GCC" != yes; then
11923 CC_SHARED_OPTS='-KPIC'
11924 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11926 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11928 cf_cv_rm_so_locs=yes
11930 (linux*|gnu*|k*bsd*-gnu)
11931 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11932 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11933 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11935 if test "$cf_cv_enable_rpath" = yes ; then
11936 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11939 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11940 if test "$cf_cv_shlib_version" = rel; then
11941 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11943 cf_cv_shared_soname='`basename $@`'
11946 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11949 cf_cv_shlib_version=msvcdll
11950 cf_cv_shlib_version_infix=msvcdll
11953 if test "$DFT_LWR_MODEL" = "shared" ; then
11954 LOCAL_LDFLAGS="-link -dll"
11955 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11956 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11959 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11960 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11961 cat >mk_shared_lib.sh <<-CF_EOF
11964 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11969 Linking shared library
11970 ** SHARED LIB \$SHARED_LIB
11971 ** IMPORT_LIB \$IMPORT_LIB
11973 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11974 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11975 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11977 chmod +x mk_shared_lib.sh
11978 cat >mk_prog.sh <<-CF_EOF
11981 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11984 ldopts=("/subsystem:console")
11987 while test \$# -gt 0; do
11990 # ignore -link argument
11993 # ignore runtime-library option
12008 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12011 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12017 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12018 ldopts+=("\${linkarg}")
12026 ldopts+=("-out:\$1")
12035 if [ "\$isdll" -ne 0 ]; then
12036 for lib in \${libs[*]}; do
12037 ldopts+=("\$lib.dll.lib")
12040 for lib in \${libs[*]}; do
12041 ldopts+=("\$lib.lib")
12046 ** ld options: "\${ldopts[@]}"
12048 exec \$LD \${ldopts[@]}
12050 chmod +x mk_prog.sh
12051 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12052 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12055 cf_cv_shlib_version=mingw
12056 cf_cv_shlib_version_infix=mingw
12059 if test "$DFT_LWR_MODEL" = "shared" ; then
12060 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12061 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12062 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12065 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12066 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12067 cat >mk_shared_lib.sh <<-CF_EOF
12070 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12073 Linking shared library
12074 ** SHARED_LIB \$SHARED_LIB
12075 ** IMPORT_LIB \$IMPORT_LIB
12077 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12079 chmod +x mk_shared_lib.sh
12081 (openbsd[2-9].*|mirbsd*)
12082 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12083 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12084 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12086 if test "$cf_cv_enable_rpath" = yes ; then
12087 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12089 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12091 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12092 if test "$cf_cv_shlib_version" = rel; then
12093 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12095 cf_cv_shared_soname='`basename $@`'
12098 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12102 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12106 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12108 (nto-qnx*|openbsd*|freebsd[12].*)
12109 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12110 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12111 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12113 (dragonfly*|freebsd*)
12114 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12115 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12116 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12117 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12118 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12121 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12122 if test "$cf_cv_shlib_version" = rel; then
12123 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12125 cf_cv_shared_soname='`basename $@`'
12128 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12131 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12132 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12133 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12134 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12135 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12136 if test "$cf_cv_shlib_version" = auto; then
12137 if test -f /usr/libexec/ld.elf_so; then
12138 cf_cv_shlib_version=abi
12140 cf_cv_shlib_version=rel
12144 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12145 if test "$cf_cv_shlib_version" = rel; then
12146 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12148 cf_cv_shared_soname='`basename $@`'
12151 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12153 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12157 # tested with OSF/1 V3.2 and 'cc'
12158 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12159 # link with shared libs).
12160 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12163 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12166 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12167 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12168 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12169 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12171 cf_cv_rm_so_locs=yes
12173 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12174 # tested with osr5.0.5
12175 if test "$GCC" != yes; then
12176 CC_SHARED_OPTS='-belf -KPIC'
12178 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12179 if test "$cf_cv_enable_rpath" = yes ; then
12180 # only way is to set LD_RUN_PATH but no switch for it
12183 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12184 LINK_PROGS='LD_RUN_PATH=${libdir}'
12185 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12188 # tested with SunOS 4.1.1 and gcc 2.7.0
12189 if test "$GCC" != yes; then
12190 CC_SHARED_OPTS='-KPIC'
12192 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12193 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12196 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12197 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12198 if test "$DFT_LWR_MODEL" = "shared" ; then
12199 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12200 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12202 if test "$cf_cv_enable_rpath" = yes ; then
12203 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12206 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12207 if test "$cf_cv_shlib_version" = rel; then
12208 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12210 cf_cv_shared_soname='`basename $@`'
12213 if test "$GCC" != yes; then
12214 cf_save_CFLAGS="$CFLAGS"
12215 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12217 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12218 cat >"conftest.$ac_ext" <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12225 printf("Hello\\n");
12230 rm -f "conftest.$ac_objext"
12231 if { (eval echo "$as_me:12231: \"$ac_compile\"") >&5
12232 (eval $ac_compile) 2>&5
12234 echo "$as_me:12234: \$? = $ac_status" >&5
12235 (exit "$ac_status"); } &&
12236 { ac_try='test -s "conftest.$ac_objext"'
12237 { (eval echo "$as_me:12237: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12240 echo "$as_me:12240: \$? = $ac_status" >&5
12241 (exit "$ac_status"); }; }; then
12244 echo "$as_me: failed program was:" >&5
12245 cat "conftest.$ac_ext" >&5
12247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12249 CFLAGS="$cf_save_CFLAGS"
12250 CC_SHARED_OPTS=$cf_shared_opts
12251 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12253 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12256 (sysv5uw7*|unix_sv*)
12257 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12258 if test "$GCC" != yes; then
12259 CC_SHARED_OPTS='-KPIC'
12261 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12264 CC_SHARED_OPTS='unknown'
12265 MK_SHARED_LIB='echo unknown'
12269 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12270 case "$cf_cv_shlib_version" in
12272 case "$MK_SHARED_LIB" in
12274 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12277 { echo "$as_me:12277: WARNING: ignored --with-shlib-version" >&5
12278 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12284 if test -n "$cf_try_cflags"
12286 cat > conftest.$ac_ext <<EOF
12287 #line 12287 "${as_me:-configure}"
12289 int main(int argc, char *argv[])
12291 printf("hello\\n");
12292 return (argv[argc-1] == 0) ;
12295 cf_save_CFLAGS="$CFLAGS"
12296 for cf_opt in $cf_try_cflags
12298 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12299 echo "$as_me:12299: checking if CFLAGS option -$cf_opt works" >&5
12300 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12301 if { (eval echo "$as_me:12301: \"$ac_compile\"") >&5
12302 (eval $ac_compile) 2>&5
12304 echo "$as_me:12304: \$? = $ac_status" >&5
12305 (exit "$ac_status"); }; then
12306 echo "$as_me:12306: result: yes" >&5
12307 echo "${ECHO_T}yes" >&6
12308 cf_save_CFLAGS="$CFLAGS"
12310 echo "$as_me:12310: result: no" >&5
12311 echo "${ECHO_T}no" >&6
12314 CFLAGS="$cf_save_CFLAGS"
12317 # RPATH_LIST is a colon-separated list of directories
12318 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12319 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12321 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12323 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12325 echo "${as_me:-configure}:12325: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12327 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12329 echo "${as_me:-configure}:12329: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12331 # The test/sample programs in the original tree link using rpath option.
12332 # Make it optional for packagers.
12333 if test -n "$LOCAL_LDFLAGS"
12335 echo "$as_me:12335: checking if you want to link sample programs with rpath option" >&5
12336 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12338 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12339 if test "${enable_rpath_link+set}" = set; then
12340 enableval="$enable_rpath_link"
12341 with_rpath_link=$enableval
12343 with_rpath_link=yes
12345 echo "$as_me:12345: result: $with_rpath_link" >&5
12346 echo "${ECHO_T}$with_rpath_link" >&6
12347 if test "$with_rpath_link" = no
12354 ###############################################################################
12356 ### use option --enable-broken-linker to force on use of broken-linker support
12358 echo "$as_me:12358: checking if you want broken-linker support code" >&5
12359 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12361 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12362 if test "${enable_broken_linker+set}" = set; then
12363 enableval="$enable_broken_linker"
12364 with_broken_linker=$enableval
12366 with_broken_linker=no
12368 echo "$as_me:12368: result: $with_broken_linker" >&5
12369 echo "${ECHO_T}$with_broken_linker" >&6
12371 : "${BROKEN_LINKER:=0}"
12372 if test "x$with_broken_linker" = xyes ; then
12374 cat >>confdefs.h <<\EOF
12375 #define BROKEN_LINKER 1
12381 # Check to define _XOPEN_SOURCE "automatically"
12383 echo "$as_me:12383: checking if the POSIX test-macros are already defined" >&5
12384 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12385 if test "${cf_cv_posix_visible+set}" = set; then
12386 echo $ECHO_N "(cached) $ECHO_C" >&6
12389 cat >"conftest.$ac_ext" <<_ACEOF
12390 #line 12390 "configure"
12391 #include "confdefs.h"
12397 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12398 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12399 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12400 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12401 #error conflicting symbols found
12408 rm -f "conftest.$ac_objext"
12409 if { (eval echo "$as_me:12409: \"$ac_compile\"") >&5
12410 (eval $ac_compile) 2>&5
12412 echo "$as_me:12412: \$? = $ac_status" >&5
12413 (exit "$ac_status"); } &&
12414 { ac_try='test -s "conftest.$ac_objext"'
12415 { (eval echo "$as_me:12415: \"$ac_try\"") >&5
12416 (eval $ac_try) 2>&5
12418 echo "$as_me:12418: \$? = $ac_status" >&5
12419 (exit "$ac_status"); }; }; then
12420 cf_cv_posix_visible=no
12422 echo "$as_me: failed program was:" >&5
12423 cat "conftest.$ac_ext" >&5
12424 cf_cv_posix_visible=yes
12426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12429 echo "$as_me:12429: result: $cf_cv_posix_visible" >&5
12430 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12432 if test "$cf_cv_posix_visible" = no; then
12434 cf_XOPEN_SOURCE=600
12435 cf_POSIX_C_SOURCE=199506L
12440 cf_xopen_source="-D_ALL_SOURCE"
12443 cf_XOPEN_SOURCE=600
12446 cf_xopen_source="-D_APPLE_C_SOURCE"
12449 cf_xopen_source="-D_DARWIN_C_SOURCE"
12452 (freebsd*|dragonfly*|midnightbsd*)
12453 # 5.x headers associate
12454 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12455 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12456 cf_POSIX_C_SOURCE=200112L
12457 cf_XOPEN_SOURCE=600
12458 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12461 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12464 cf_xopen_source="-D_HPUX_SOURCE"
12467 cf_xopen_source="-D_SGI_SOURCE"
12470 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12472 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12474 echo "$as_me:12474: checking if this is the GNU C library" >&5
12475 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12476 if test "${cf_cv_gnu_library+set}" = set; then
12477 echo $ECHO_N "(cached) $ECHO_C" >&6
12480 cat >"conftest.$ac_ext" <<_ACEOF
12481 #line 12481 "configure"
12482 #include "confdefs.h"
12483 #include <sys/types.h>
12488 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12490 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12493 # error not GNU C library
12499 rm -f "conftest.$ac_objext"
12500 if { (eval echo "$as_me:12500: \"$ac_compile\"") >&5
12501 (eval $ac_compile) 2>&5
12503 echo "$as_me:12503: \$? = $ac_status" >&5
12504 (exit "$ac_status"); } &&
12505 { ac_try='test -s "conftest.$ac_objext"'
12506 { (eval echo "$as_me:12506: \"$ac_try\"") >&5
12507 (eval $ac_try) 2>&5
12509 echo "$as_me:12509: \$? = $ac_status" >&5
12510 (exit "$ac_status"); }; }; then
12511 cf_cv_gnu_library=yes
12513 echo "$as_me: failed program was:" >&5
12514 cat "conftest.$ac_ext" >&5
12515 cf_cv_gnu_library=no
12517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12520 echo "$as_me:12520: result: $cf_cv_gnu_library" >&5
12521 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12523 if test x$cf_cv_gnu_library = xyes; then
12525 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12526 # was changed to help a little. newlib incorporated the change about 4
12528 echo "$as_me:12528: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12529 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12530 if test "${cf_cv_gnu_library_219+set}" = set; then
12531 echo $ECHO_N "(cached) $ECHO_C" >&6
12534 cf_save="$CPPFLAGS"
12536 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12537 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12539 cat >"conftest.$ac_ext" <<_ACEOF
12540 #line 12540 "configure"
12541 #include "confdefs.h"
12542 #include <sys/types.h>
12547 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12549 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12552 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12558 rm -f "conftest.$ac_objext"
12559 if { (eval echo "$as_me:12559: \"$ac_compile\"") >&5
12560 (eval $ac_compile) 2>&5
12562 echo "$as_me:12562: \$? = $ac_status" >&5
12563 (exit "$ac_status"); } &&
12564 { ac_try='test -s "conftest.$ac_objext"'
12565 { (eval echo "$as_me:12565: \"$ac_try\"") >&5
12566 (eval $ac_try) 2>&5
12568 echo "$as_me:12568: \$? = $ac_status" >&5
12569 (exit "$ac_status"); }; }; then
12570 cf_cv_gnu_library_219=yes
12572 echo "$as_me: failed program was:" >&5
12573 cat "conftest.$ac_ext" >&5
12574 cf_cv_gnu_library_219=no
12576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12577 CPPFLAGS="$cf_save"
12580 echo "$as_me:12580: result: $cf_cv_gnu_library_219" >&5
12581 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12583 if test "x$cf_cv_gnu_library_219" = xyes; then
12584 cf_save="$CPPFLAGS"
12585 echo "$as_me:12585: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12586 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12587 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12588 echo $ECHO_N "(cached) $ECHO_C" >&6
12594 cf_new_extra_cppflags=
12596 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12598 case "$cf_fix_cppflags" in
12600 case "$cf_add_cflags" in
12601 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12602 case "$cf_add_cflags" in
12604 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12607 && test -z "${cf_tst_cflags}" \
12608 && cf_fix_cppflags=yes
12610 if test "$cf_fix_cppflags" = yes ; then
12612 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12613 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12616 elif test "${cf_tst_cflags}" = "\"'" ; then
12618 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12619 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12625 case "$CPPFLAGS" in
12629 case "$cf_add_cflags" in
12631 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12633 CPPFLAGS=`echo "$CPPFLAGS" | \
12634 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12635 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12640 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12641 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12648 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12649 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12659 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12661 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12662 && test -z "${cf_tst_cflags}" \
12663 && cf_fix_cppflags=no
12668 if test -n "$cf_new_cflags" ; then
12670 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12671 CFLAGS="${CFLAGS}$cf_new_cflags"
12675 if test -n "$cf_new_cppflags" ; then
12677 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12678 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12682 if test -n "$cf_new_extra_cppflags" ; then
12684 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12685 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12689 cat >"conftest.$ac_ext" <<_ACEOF
12690 #line 12690 "configure"
12691 #include "confdefs.h"
12693 #include <limits.h>
12694 #include <sys/types.h>
12700 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12703 # error GNU C library is too old
12709 rm -f "conftest.$ac_objext"
12710 if { (eval echo "$as_me:12710: \"$ac_compile\"") >&5
12711 (eval $ac_compile) 2>&5
12713 echo "$as_me:12713: \$? = $ac_status" >&5
12714 (exit "$ac_status"); } &&
12715 { ac_try='test -s "conftest.$ac_objext"'
12716 { (eval echo "$as_me:12716: \"$ac_try\"") >&5
12717 (eval $ac_try) 2>&5
12719 echo "$as_me:12719: \$? = $ac_status" >&5
12720 (exit "$ac_status"); }; }; then
12721 cf_cv_gnu_dftsrc_219=yes
12723 echo "$as_me: failed program was:" >&5
12724 cat "conftest.$ac_ext" >&5
12725 cf_cv_gnu_dftsrc_219=no
12727 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12730 echo "$as_me:12730: result: $cf_cv_gnu_dftsrc_219" >&5
12731 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12732 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12734 cf_cv_gnu_dftsrc_219=maybe
12737 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12739 echo "$as_me:12739: checking if we must define _GNU_SOURCE" >&5
12740 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12741 if test "${cf_cv_gnu_source+set}" = set; then
12742 echo $ECHO_N "(cached) $ECHO_C" >&6
12745 cat >"conftest.$ac_ext" <<_ACEOF
12746 #line 12746 "configure"
12747 #include "confdefs.h"
12748 #include <sys/types.h>
12753 #ifndef _XOPEN_SOURCE
12754 #error expected _XOPEN_SOURCE to be defined
12760 rm -f "conftest.$ac_objext"
12761 if { (eval echo "$as_me:12761: \"$ac_compile\"") >&5
12762 (eval $ac_compile) 2>&5
12764 echo "$as_me:12764: \$? = $ac_status" >&5
12765 (exit "$ac_status"); } &&
12766 { ac_try='test -s "conftest.$ac_objext"'
12767 { (eval echo "$as_me:12767: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12770 echo "$as_me:12770: \$? = $ac_status" >&5
12771 (exit "$ac_status"); }; }; then
12772 cf_cv_gnu_source=no
12774 echo "$as_me: failed program was:" >&5
12775 cat "conftest.$ac_ext" >&5
12776 cf_save="$CPPFLAGS"
12781 cf_new_extra_cppflags=
12783 for cf_add_cflags in -D_GNU_SOURCE
12785 case "$cf_fix_cppflags" in
12787 case "$cf_add_cflags" in
12788 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12789 case "$cf_add_cflags" in
12791 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12793 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12794 && test -z "${cf_tst_cflags}" \
12795 && cf_fix_cppflags=yes
12797 if test "$cf_fix_cppflags" = yes ; then
12799 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12800 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12803 elif test "${cf_tst_cflags}" = "\"'" ; then
12805 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12806 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12812 case "$CPPFLAGS" in
12816 case "$cf_add_cflags" in
12818 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12820 CPPFLAGS=`echo "$CPPFLAGS" | \
12821 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12822 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12827 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12828 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12835 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12836 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12843 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12844 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12846 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12848 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12849 && test -z "${cf_tst_cflags}" \
12850 && cf_fix_cppflags=no
12855 if test -n "$cf_new_cflags" ; then
12857 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12858 CFLAGS="${CFLAGS}$cf_new_cflags"
12862 if test -n "$cf_new_cppflags" ; then
12864 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12865 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12869 if test -n "$cf_new_extra_cppflags" ; then
12871 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12872 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12876 cat >"conftest.$ac_ext" <<_ACEOF
12877 #line 12877 "configure"
12878 #include "confdefs.h"
12879 #include <sys/types.h>
12884 #ifdef _XOPEN_SOURCE
12885 #error expected _XOPEN_SOURCE to be undefined
12891 rm -f "conftest.$ac_objext"
12892 if { (eval echo "$as_me:12892: \"$ac_compile\"") >&5
12893 (eval $ac_compile) 2>&5
12895 echo "$as_me:12895: \$? = $ac_status" >&5
12896 (exit "$ac_status"); } &&
12897 { ac_try='test -s "conftest.$ac_objext"'
12898 { (eval echo "$as_me:12898: \"$ac_try\"") >&5
12899 (eval $ac_try) 2>&5
12901 echo "$as_me:12901: \$? = $ac_status" >&5
12902 (exit "$ac_status"); }; }; then
12903 cf_cv_gnu_source=no
12905 echo "$as_me: failed program was:" >&5
12906 cat "conftest.$ac_ext" >&5
12907 cf_cv_gnu_source=yes
12909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12910 CPPFLAGS="$cf_save"
12913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12916 echo "$as_me:12916: result: $cf_cv_gnu_source" >&5
12917 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12919 if test "$cf_cv_gnu_source" = yes
12921 echo "$as_me:12921: checking if we should also define _DEFAULT_SOURCE" >&5
12922 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12923 if test "${cf_cv_default_source+set}" = set; then
12924 echo $ECHO_N "(cached) $ECHO_C" >&6
12927 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12928 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12930 cat >"conftest.$ac_ext" <<_ACEOF
12931 #line 12931 "configure"
12932 #include "confdefs.h"
12933 #include <sys/types.h>
12938 #ifdef _DEFAULT_SOURCE
12939 #error expected _DEFAULT_SOURCE to be undefined
12945 rm -f "conftest.$ac_objext"
12946 if { (eval echo "$as_me:12946: \"$ac_compile\"") >&5
12947 (eval $ac_compile) 2>&5
12949 echo "$as_me:12949: \$? = $ac_status" >&5
12950 (exit "$ac_status"); } &&
12951 { ac_try='test -s "conftest.$ac_objext"'
12952 { (eval echo "$as_me:12952: \"$ac_try\"") >&5
12953 (eval $ac_try) 2>&5
12955 echo "$as_me:12955: \$? = $ac_status" >&5
12956 (exit "$ac_status"); }; }; then
12957 cf_cv_default_source=no
12959 echo "$as_me: failed program was:" >&5
12960 cat "conftest.$ac_ext" >&5
12961 cf_cv_default_source=yes
12963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12966 echo "$as_me:12966: result: $cf_cv_default_source" >&5
12967 echo "${ECHO_T}$cf_cv_default_source" >&6
12968 if test "$cf_cv_default_source" = yes
12971 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12972 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12982 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12985 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12988 if test "$cf_cv_posix_visible" = no; then
12990 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12992 cf_save_CFLAGS="$CFLAGS"
12993 cf_save_CPPFLAGS="$CPPFLAGS"
12995 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12996 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12997 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12999 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13000 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13001 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13003 echo "$as_me:13003: checking if we should define _POSIX_C_SOURCE" >&5
13004 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13005 if test "${cf_cv_posix_c_source+set}" = set; then
13006 echo $ECHO_N "(cached) $ECHO_C" >&6
13009 echo "${as_me:-configure}:13009: testing if the symbol is already defined go no further ..." 1>&5
13011 cat >"conftest.$ac_ext" <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014 #include <sys/types.h>
13019 #ifndef _POSIX_C_SOURCE
13026 rm -f "conftest.$ac_objext"
13027 if { (eval echo "$as_me:13027: \"$ac_compile\"") >&5
13028 (eval $ac_compile) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit "$ac_status"); } &&
13032 { ac_try='test -s "conftest.$ac_objext"'
13033 { (eval echo "$as_me:13033: \"$ac_try\"") >&5
13034 (eval $ac_try) 2>&5
13036 echo "$as_me:13036: \$? = $ac_status" >&5
13037 (exit "$ac_status"); }; }; then
13038 cf_cv_posix_c_source=no
13040 echo "$as_me: failed program was:" >&5
13041 cat "conftest.$ac_ext" >&5
13042 cf_want_posix_source=no
13043 case .$cf_POSIX_C_SOURCE in
13045 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13048 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13049 cf_want_posix_source=yes
13052 cf_want_posix_source=yes
13055 if test "$cf_want_posix_source" = yes ; then
13056 cat >"conftest.$ac_ext" <<_ACEOF
13057 #line 13057 "configure"
13058 #include "confdefs.h"
13059 #include <sys/types.h>
13064 #ifdef _POSIX_SOURCE
13071 rm -f "conftest.$ac_objext"
13072 if { (eval echo "$as_me:13072: \"$ac_compile\"") >&5
13073 (eval $ac_compile) 2>&5
13075 echo "$as_me:13075: \$? = $ac_status" >&5
13076 (exit "$ac_status"); } &&
13077 { ac_try='test -s "conftest.$ac_objext"'
13078 { (eval echo "$as_me:13078: \"$ac_try\"") >&5
13079 (eval $ac_try) 2>&5
13081 echo "$as_me:13081: \$? = $ac_status" >&5
13082 (exit "$ac_status"); }; }; then
13085 echo "$as_me: failed program was:" >&5
13086 cat "conftest.$ac_ext" >&5
13087 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13092 echo "${as_me:-configure}:13092: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13094 CFLAGS="$cf_trim_CFLAGS"
13095 CPPFLAGS="$cf_trim_CPPFLAGS"
13097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13098 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13100 echo "${as_me:-configure}:13100: testing if the second compile does not leave our definition intact error ..." 1>&5
13102 cat >"conftest.$ac_ext" <<_ACEOF
13103 #line 13103 "configure"
13104 #include "confdefs.h"
13105 #include <sys/types.h>
13110 #ifndef _POSIX_C_SOURCE
13117 rm -f "conftest.$ac_objext"
13118 if { (eval echo "$as_me:13118: \"$ac_compile\"") >&5
13119 (eval $ac_compile) 2>&5
13121 echo "$as_me:13121: \$? = $ac_status" >&5
13122 (exit "$ac_status"); } &&
13123 { ac_try='test -s "conftest.$ac_objext"'
13124 { (eval echo "$as_me:13124: \"$ac_try\"") >&5
13125 (eval $ac_try) 2>&5
13127 echo "$as_me:13127: \$? = $ac_status" >&5
13128 (exit "$ac_status"); }; }; then
13131 echo "$as_me: failed program was:" >&5
13132 cat "conftest.$ac_ext" >&5
13133 cf_cv_posix_c_source=no
13135 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13136 CFLAGS="$cf_save_CFLAGS"
13137 CPPFLAGS="$cf_save_CPPFLAGS"
13140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13143 echo "$as_me:13143: result: $cf_cv_posix_c_source" >&5
13144 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13146 if test "$cf_cv_posix_c_source" != no ; then
13147 CFLAGS="$cf_trim_CFLAGS"
13148 CPPFLAGS="$cf_trim_CPPFLAGS"
13153 cf_new_extra_cppflags=
13155 for cf_add_cflags in $cf_cv_posix_c_source
13157 case "$cf_fix_cppflags" in
13159 case "$cf_add_cflags" in
13160 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13161 case "$cf_add_cflags" in
13163 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13165 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13166 && test -z "${cf_tst_cflags}" \
13167 && cf_fix_cppflags=yes
13169 if test "$cf_fix_cppflags" = yes ; then
13171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13175 elif test "${cf_tst_cflags}" = "\"'" ; then
13177 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13178 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13184 case "$CPPFLAGS" in
13188 case "$cf_add_cflags" in
13190 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13192 CPPFLAGS=`echo "$CPPFLAGS" | \
13193 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13194 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13199 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13200 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13207 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13208 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13215 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13216 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13218 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13220 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13221 && test -z "${cf_tst_cflags}" \
13222 && cf_fix_cppflags=no
13227 if test -n "$cf_new_cflags" ; then
13229 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13230 CFLAGS="${CFLAGS}$cf_new_cflags"
13234 if test -n "$cf_new_cppflags" ; then
13236 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13237 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13241 if test -n "$cf_new_extra_cppflags" ; then
13243 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13244 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13250 fi # cf_cv_posix_visible
13254 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13257 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13258 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13259 # Abusing the conformance level is a workaround.
13260 { echo "$as_me:13260: WARNING: this system does not provide usable locale support" >&5
13261 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13262 cf_xopen_source="-D_BSD_SOURCE"
13263 cf_XOPEN_SOURCE=700
13266 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13267 cf_xopen_source="-D_BSD_SOURCE"
13268 cf_XOPEN_SOURCE=600
13271 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13274 cf_xopen_source="-D_OSF_SOURCE"
13277 cf_xopen_source="-D_QNX_SOURCE"
13280 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13283 cf_xopen_source="-D__EXTENSIONS__"
13284 cf_cv_xopen_source=broken
13286 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13292 echo "$as_me:13292: checking if we should define _XOPEN_SOURCE" >&5
13293 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13294 if test "${cf_cv_xopen_source+set}" = set; then
13295 echo $ECHO_N "(cached) $ECHO_C" >&6
13298 cat >"conftest.$ac_ext" <<_ACEOF
13299 #line 13299 "configure"
13300 #include "confdefs.h"
13302 #include <stdlib.h>
13303 #include <string.h>
13304 #include <sys/types.h>
13310 #ifndef _XOPEN_SOURCE
13318 rm -f "conftest.$ac_objext"
13319 if { (eval echo "$as_me:13319: \"$ac_compile\"") >&5
13320 (eval $ac_compile) 2>&5
13322 echo "$as_me:13322: \$? = $ac_status" >&5
13323 (exit "$ac_status"); } &&
13324 { ac_try='test -s "conftest.$ac_objext"'
13325 { (eval echo "$as_me:13325: \"$ac_try\"") >&5
13326 (eval $ac_try) 2>&5
13328 echo "$as_me:13328: \$? = $ac_status" >&5
13329 (exit "$ac_status"); }; }; then
13330 cf_cv_xopen_source=no
13332 echo "$as_me: failed program was:" >&5
13333 cat "conftest.$ac_ext" >&5
13334 cf_save="$CPPFLAGS"
13336 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13337 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13339 cat >"conftest.$ac_ext" <<_ACEOF
13340 #line 13340 "configure"
13341 #include "confdefs.h"
13343 #include <stdlib.h>
13344 #include <string.h>
13345 #include <sys/types.h>
13351 #ifndef _XOPEN_SOURCE
13359 rm -f "conftest.$ac_objext"
13360 if { (eval echo "$as_me:13360: \"$ac_compile\"") >&5
13361 (eval $ac_compile) 2>&5
13363 echo "$as_me:13363: \$? = $ac_status" >&5
13364 (exit "$ac_status"); } &&
13365 { ac_try='test -s "conftest.$ac_objext"'
13366 { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367 (eval $ac_try) 2>&5
13369 echo "$as_me:13369: \$? = $ac_status" >&5
13370 (exit "$ac_status"); }; }; then
13371 cf_cv_xopen_source=no
13373 echo "$as_me: failed program was:" >&5
13374 cat "conftest.$ac_ext" >&5
13375 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13378 CPPFLAGS="$cf_save"
13381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13384 echo "$as_me:13384: result: $cf_cv_xopen_source" >&5
13385 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13387 if test "$cf_cv_xopen_source" != no ; then
13389 CFLAGS=`echo "$CFLAGS" | \
13390 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13391 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13393 CPPFLAGS=`echo "$CPPFLAGS" | \
13394 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13395 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13397 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13399 for cf_add_cflags in $cf_temp_xopen_source
13401 case "x$cf_add_cflags" in
13404 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13407 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13408 test "$CFLAGS" != "$cf_old_cflag" || break
13410 CFLAGS="$cf_old_cflag"
13413 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13416 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13417 test "$CPPFLAGS" != "$cf_old_cflag" || break
13419 CPPFLAGS="$cf_old_cflag"
13428 cf_new_extra_cppflags=
13430 for cf_add_cflags in $cf_add_cflags
13432 case "$cf_fix_cppflags" in
13434 case "$cf_add_cflags" in
13435 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13436 case "$cf_add_cflags" in
13438 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13440 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13441 && test -z "${cf_tst_cflags}" \
13442 && cf_fix_cppflags=yes
13444 if test "$cf_fix_cppflags" = yes ; then
13446 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13447 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13450 elif test "${cf_tst_cflags}" = "\"'" ; then
13452 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13453 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13459 case "$CPPFLAGS" in
13463 case "$cf_add_cflags" in
13465 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13467 CPPFLAGS=`echo "$CPPFLAGS" | \
13468 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13469 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13474 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13475 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13482 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13483 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13490 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13491 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13493 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13495 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13496 && test -z "${cf_tst_cflags}" \
13497 && cf_fix_cppflags=no
13502 if test -n "$cf_new_cflags" ; then
13504 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13505 CFLAGS="${CFLAGS}$cf_new_cflags"
13509 if test -n "$cf_new_cppflags" ; then
13511 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13512 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13516 if test -n "$cf_new_extra_cppflags" ; then
13518 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13519 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13527 cf_save_xopen_cppflags="$CPPFLAGS"
13529 if test "$cf_cv_posix_visible" = no; then
13531 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13533 cf_save_CFLAGS="$CFLAGS"
13534 cf_save_CPPFLAGS="$CPPFLAGS"
13536 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13537 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13538 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13540 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13541 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13542 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13544 echo "$as_me:13544: checking if we should define _POSIX_C_SOURCE" >&5
13545 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13546 if test "${cf_cv_posix_c_source+set}" = set; then
13547 echo $ECHO_N "(cached) $ECHO_C" >&6
13550 echo "${as_me:-configure}:13550: testing if the symbol is already defined go no further ..." 1>&5
13552 cat >"conftest.$ac_ext" <<_ACEOF
13553 #line 13553 "configure"
13554 #include "confdefs.h"
13555 #include <sys/types.h>
13560 #ifndef _POSIX_C_SOURCE
13567 rm -f "conftest.$ac_objext"
13568 if { (eval echo "$as_me:13568: \"$ac_compile\"") >&5
13569 (eval $ac_compile) 2>&5
13571 echo "$as_me:13571: \$? = $ac_status" >&5
13572 (exit "$ac_status"); } &&
13573 { ac_try='test -s "conftest.$ac_objext"'
13574 { (eval echo "$as_me:13574: \"$ac_try\"") >&5
13575 (eval $ac_try) 2>&5
13577 echo "$as_me:13577: \$? = $ac_status" >&5
13578 (exit "$ac_status"); }; }; then
13579 cf_cv_posix_c_source=no
13581 echo "$as_me: failed program was:" >&5
13582 cat "conftest.$ac_ext" >&5
13583 cf_want_posix_source=no
13584 case .$cf_POSIX_C_SOURCE in
13586 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13589 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13590 cf_want_posix_source=yes
13593 cf_want_posix_source=yes
13596 if test "$cf_want_posix_source" = yes ; then
13597 cat >"conftest.$ac_ext" <<_ACEOF
13598 #line 13598 "configure"
13599 #include "confdefs.h"
13600 #include <sys/types.h>
13605 #ifdef _POSIX_SOURCE
13612 rm -f "conftest.$ac_objext"
13613 if { (eval echo "$as_me:13613: \"$ac_compile\"") >&5
13614 (eval $ac_compile) 2>&5
13616 echo "$as_me:13616: \$? = $ac_status" >&5
13617 (exit "$ac_status"); } &&
13618 { ac_try='test -s "conftest.$ac_objext"'
13619 { (eval echo "$as_me:13619: \"$ac_try\"") >&5
13620 (eval $ac_try) 2>&5
13622 echo "$as_me:13622: \$? = $ac_status" >&5
13623 (exit "$ac_status"); }; }; then
13626 echo "$as_me: failed program was:" >&5
13627 cat "conftest.$ac_ext" >&5
13628 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13633 echo "${as_me:-configure}:13633: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13635 CFLAGS="$cf_trim_CFLAGS"
13636 CPPFLAGS="$cf_trim_CPPFLAGS"
13638 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13639 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13641 echo "${as_me:-configure}:13641: testing if the second compile does not leave our definition intact error ..." 1>&5
13643 cat >"conftest.$ac_ext" <<_ACEOF
13644 #line 13644 "configure"
13645 #include "confdefs.h"
13646 #include <sys/types.h>
13651 #ifndef _POSIX_C_SOURCE
13658 rm -f "conftest.$ac_objext"
13659 if { (eval echo "$as_me:13659: \"$ac_compile\"") >&5
13660 (eval $ac_compile) 2>&5
13662 echo "$as_me:13662: \$? = $ac_status" >&5
13663 (exit "$ac_status"); } &&
13664 { ac_try='test -s "conftest.$ac_objext"'
13665 { (eval echo "$as_me:13665: \"$ac_try\"") >&5
13666 (eval $ac_try) 2>&5
13668 echo "$as_me:13668: \$? = $ac_status" >&5
13669 (exit "$ac_status"); }; }; then
13672 echo "$as_me: failed program was:" >&5
13673 cat "conftest.$ac_ext" >&5
13674 cf_cv_posix_c_source=no
13676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13677 CFLAGS="$cf_save_CFLAGS"
13678 CPPFLAGS="$cf_save_CPPFLAGS"
13681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13684 echo "$as_me:13684: result: $cf_cv_posix_c_source" >&5
13685 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13687 if test "$cf_cv_posix_c_source" != no ; then
13688 CFLAGS="$cf_trim_CFLAGS"
13689 CPPFLAGS="$cf_trim_CPPFLAGS"
13694 cf_new_extra_cppflags=
13696 for cf_add_cflags in $cf_cv_posix_c_source
13698 case "$cf_fix_cppflags" in
13700 case "$cf_add_cflags" in
13701 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13702 case "$cf_add_cflags" in
13704 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13706 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13707 && test -z "${cf_tst_cflags}" \
13708 && cf_fix_cppflags=yes
13710 if test "$cf_fix_cppflags" = yes ; then
13712 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13713 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13716 elif test "${cf_tst_cflags}" = "\"'" ; then
13718 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13719 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13725 case "$CPPFLAGS" in
13729 case "$cf_add_cflags" in
13731 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13733 CPPFLAGS=`echo "$CPPFLAGS" | \
13734 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13735 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13740 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13741 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13748 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13749 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13756 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13757 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13759 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13761 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13762 && test -z "${cf_tst_cflags}" \
13763 && cf_fix_cppflags=no
13768 if test -n "$cf_new_cflags" ; then
13770 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13771 CFLAGS="${CFLAGS}$cf_new_cflags"
13775 if test -n "$cf_new_cppflags" ; then
13777 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13778 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13782 if test -n "$cf_new_extra_cppflags" ; then
13784 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13785 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13791 fi # cf_cv_posix_visible
13793 # Some of these niche implementations use copy/paste, double-check...
13794 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13796 echo "${as_me:-configure}:13796: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13798 cat >"conftest.$ac_ext" <<_ACEOF
13799 #line 13799 "configure"
13800 #include "confdefs.h"
13802 #include <stdlib.h>
13803 #include <string.h>
13804 #include <sys/types.h>
13810 #ifndef _XOPEN_SOURCE
13818 rm -f "conftest.$ac_objext"
13819 if { (eval echo "$as_me:13819: \"$ac_compile\"") >&5
13820 (eval $ac_compile) 2>&5
13822 echo "$as_me:13822: \$? = $ac_status" >&5
13823 (exit "$ac_status"); } &&
13824 { ac_try='test -s "conftest.$ac_objext"'
13825 { (eval echo "$as_me:13825: \"$ac_try\"") >&5
13826 (eval $ac_try) 2>&5
13828 echo "$as_me:13828: \$? = $ac_status" >&5
13829 (exit "$ac_status"); }; }; then
13832 echo "$as_me: failed program was:" >&5
13833 cat "conftest.$ac_ext" >&5
13835 { echo "$as_me:13835: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13836 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13837 CPPFLAGS="$cf_save_xopen_cppflags"
13839 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13843 if test -n "$cf_xopen_source" ; then
13845 for cf_add_cflags in $cf_xopen_source
13847 case "x$cf_add_cflags" in
13850 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13853 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13854 test "$CFLAGS" != "$cf_old_cflag" || break
13855 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13857 echo "${as_me:-configure}:13857: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13859 CFLAGS="$cf_old_cflag"
13862 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13865 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
13866 test "$CPPFLAGS" != "$cf_old_cflag" || break
13867 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13869 echo "${as_me:-configure}:13869: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13871 CPPFLAGS="$cf_old_cflag"
13880 cf_new_extra_cppflags=
13882 for cf_add_cflags in $cf_add_cflags
13884 case "$cf_fix_cppflags" in
13886 case "$cf_add_cflags" in
13887 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13888 case "$cf_add_cflags" in
13890 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13892 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13893 && test -z "${cf_tst_cflags}" \
13894 && cf_fix_cppflags=yes
13896 if test "$cf_fix_cppflags" = yes ; then
13898 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13899 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13902 elif test "${cf_tst_cflags}" = "\"'" ; then
13904 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13905 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13911 case "$CPPFLAGS" in
13915 case "$cf_add_cflags" in
13917 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13919 CPPFLAGS=`echo "$CPPFLAGS" | \
13920 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13921 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13926 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13927 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13934 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13935 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13942 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13943 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13945 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13947 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13948 && test -z "${cf_tst_cflags}" \
13949 && cf_fix_cppflags=no
13954 if test -n "$cf_new_cflags" ; then
13955 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13957 echo "${as_me:-configure}:13957: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13959 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13960 CFLAGS="${CFLAGS}$cf_new_cflags"
13964 if test -n "$cf_new_cppflags" ; then
13965 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13967 echo "${as_me:-configure}:13967: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13969 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13970 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13974 if test -n "$cf_new_extra_cppflags" ; then
13975 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13977 echo "${as_me:-configure}:13977: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13979 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13980 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13988 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13989 echo "$as_me:13989: checking if _XOPEN_SOURCE really is set" >&5
13990 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13991 cat >"conftest.$ac_ext" <<_ACEOF
13992 #line 13992 "configure"
13993 #include "confdefs.h"
13994 #include <stdlib.h>
13999 #ifndef _XOPEN_SOURCE
14006 rm -f "conftest.$ac_objext"
14007 if { (eval echo "$as_me:14007: \"$ac_compile\"") >&5
14008 (eval $ac_compile) 2>&5
14010 echo "$as_me:14010: \$? = $ac_status" >&5
14011 (exit "$ac_status"); } &&
14012 { ac_try='test -s "conftest.$ac_objext"'
14013 { (eval echo "$as_me:14013: \"$ac_try\"") >&5
14014 (eval $ac_try) 2>&5
14016 echo "$as_me:14016: \$? = $ac_status" >&5
14017 (exit "$ac_status"); }; }; then
14018 cf_XOPEN_SOURCE_set=yes
14020 echo "$as_me: failed program was:" >&5
14021 cat "conftest.$ac_ext" >&5
14022 cf_XOPEN_SOURCE_set=no
14024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14025 echo "$as_me:14025: result: $cf_XOPEN_SOURCE_set" >&5
14026 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14027 if test "$cf_XOPEN_SOURCE_set" = yes
14029 cat >"conftest.$ac_ext" <<_ACEOF
14030 #line 14030 "configure"
14031 #include "confdefs.h"
14032 #include <stdlib.h>
14037 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14044 rm -f "conftest.$ac_objext"
14045 if { (eval echo "$as_me:14045: \"$ac_compile\"") >&5
14046 (eval $ac_compile) 2>&5
14048 echo "$as_me:14048: \$? = $ac_status" >&5
14049 (exit "$ac_status"); } &&
14050 { ac_try='test -s "conftest.$ac_objext"'
14051 { (eval echo "$as_me:14051: \"$ac_try\"") >&5
14052 (eval $ac_try) 2>&5
14054 echo "$as_me:14054: \$? = $ac_status" >&5
14055 (exit "$ac_status"); }; }; then
14056 cf_XOPEN_SOURCE_set_ok=yes
14058 echo "$as_me: failed program was:" >&5
14059 cat "conftest.$ac_ext" >&5
14060 cf_XOPEN_SOURCE_set_ok=no
14062 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14063 if test "$cf_XOPEN_SOURCE_set_ok" = no
14065 { echo "$as_me:14065: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14066 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14070 echo "$as_me:14070: checking if we should define _XOPEN_SOURCE" >&5
14071 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14072 if test "${cf_cv_xopen_source+set}" = set; then
14073 echo $ECHO_N "(cached) $ECHO_C" >&6
14076 cat >"conftest.$ac_ext" <<_ACEOF
14077 #line 14077 "configure"
14078 #include "confdefs.h"
14080 #include <stdlib.h>
14081 #include <string.h>
14082 #include <sys/types.h>
14088 #ifndef _XOPEN_SOURCE
14096 rm -f "conftest.$ac_objext"
14097 if { (eval echo "$as_me:14097: \"$ac_compile\"") >&5
14098 (eval $ac_compile) 2>&5
14100 echo "$as_me:14100: \$? = $ac_status" >&5
14101 (exit "$ac_status"); } &&
14102 { ac_try='test -s "conftest.$ac_objext"'
14103 { (eval echo "$as_me:14103: \"$ac_try\"") >&5
14104 (eval $ac_try) 2>&5
14106 echo "$as_me:14106: \$? = $ac_status" >&5
14107 (exit "$ac_status"); }; }; then
14108 cf_cv_xopen_source=no
14110 echo "$as_me: failed program was:" >&5
14111 cat "conftest.$ac_ext" >&5
14112 cf_save="$CPPFLAGS"
14114 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14115 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14117 cat >"conftest.$ac_ext" <<_ACEOF
14118 #line 14118 "configure"
14119 #include "confdefs.h"
14121 #include <stdlib.h>
14122 #include <string.h>
14123 #include <sys/types.h>
14129 #ifndef _XOPEN_SOURCE
14137 rm -f "conftest.$ac_objext"
14138 if { (eval echo "$as_me:14138: \"$ac_compile\"") >&5
14139 (eval $ac_compile) 2>&5
14141 echo "$as_me:14141: \$? = $ac_status" >&5
14142 (exit "$ac_status"); } &&
14143 { ac_try='test -s "conftest.$ac_objext"'
14144 { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145 (eval $ac_try) 2>&5
14147 echo "$as_me:14147: \$? = $ac_status" >&5
14148 (exit "$ac_status"); }; }; then
14149 cf_cv_xopen_source=no
14151 echo "$as_me: failed program was:" >&5
14152 cat "conftest.$ac_ext" >&5
14153 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14156 CPPFLAGS="$cf_save"
14159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14162 echo "$as_me:14162: result: $cf_cv_xopen_source" >&5
14163 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14165 if test "$cf_cv_xopen_source" != no ; then
14167 CFLAGS=`echo "$CFLAGS" | \
14168 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14169 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14171 CPPFLAGS=`echo "$CPPFLAGS" | \
14172 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14173 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14175 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14177 for cf_add_cflags in $cf_temp_xopen_source
14179 case "x$cf_add_cflags" in
14182 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14185 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14186 test "$CFLAGS" != "$cf_old_cflag" || break
14188 CFLAGS="$cf_old_cflag"
14191 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14194 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14195 test "$CPPFLAGS" != "$cf_old_cflag" || break
14197 CPPFLAGS="$cf_old_cflag"
14206 cf_new_extra_cppflags=
14208 for cf_add_cflags in $cf_add_cflags
14210 case "$cf_fix_cppflags" in
14212 case "$cf_add_cflags" in
14213 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14214 case "$cf_add_cflags" in
14216 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14218 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14219 && test -z "${cf_tst_cflags}" \
14220 && cf_fix_cppflags=yes
14222 if test "$cf_fix_cppflags" = yes ; then
14224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14228 elif test "${cf_tst_cflags}" = "\"'" ; then
14230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14237 case "$CPPFLAGS" in
14241 case "$cf_add_cflags" in
14243 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14245 CPPFLAGS=`echo "$CPPFLAGS" | \
14246 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14247 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14252 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14253 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14260 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14261 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14271 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14273 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14274 && test -z "${cf_tst_cflags}" \
14275 && cf_fix_cppflags=no
14280 if test -n "$cf_new_cflags" ; then
14282 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14283 CFLAGS="${CFLAGS}$cf_new_cflags"
14287 if test -n "$cf_new_cppflags" ; then
14289 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14290 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14294 if test -n "$cf_new_extra_cppflags" ; then
14296 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14297 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14307 fi # cf_cv_posix_visible
14309 # Check whether --enable-largefile or --disable-largefile was given.
14310 if test "${enable_largefile+set}" = set; then
14311 enableval="$enable_largefile"
14314 if test "$enable_largefile" != no; then
14316 echo "$as_me:14316: checking for special C compiler options needed for large files" >&5
14317 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14318 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14319 echo $ECHO_N "(cached) $ECHO_C" >&6
14321 ac_cv_sys_largefile_CC=no
14322 if test "$GCC" != yes; then
14325 # IRIX 6.2 and later do not support large files by default,
14326 # so use the C compiler's -n32 option if that helps.
14327 cat >"conftest.$ac_ext" <<_ACEOF
14328 #line 14328 "configure"
14329 #include "confdefs.h"
14330 #include <sys/types.h>
14331 /* Check that off_t can represent 2**63 - 1 correctly.
14332 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14333 since some C++ compilers masquerading as C compilers
14334 incorrectly reject 9223372036854775807. */
14335 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14336 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14337 && LARGE_OFF_T % 2147483647 == 1)
14347 rm -f "conftest.$ac_objext"
14348 if { (eval echo "$as_me:14348: \"$ac_compile\"") >&5
14349 (eval $ac_compile) 2>&5
14351 echo "$as_me:14351: \$? = $ac_status" >&5
14352 (exit "$ac_status"); } &&
14353 { ac_try='test -s "conftest.$ac_objext"'
14354 { (eval echo "$as_me:14354: \"$ac_try\"") >&5
14355 (eval $ac_try) 2>&5
14357 echo "$as_me:14357: \$? = $ac_status" >&5
14358 (exit "$ac_status"); }; }; then
14361 echo "$as_me: failed program was:" >&5
14362 cat "conftest.$ac_ext" >&5
14364 rm -f "conftest.$ac_objext"
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 ac_cv_sys_largefile_CC=' -n32'; break
14380 echo "$as_me: failed program was:" >&5
14381 cat "conftest.$ac_ext" >&5
14383 rm -f "conftest.$ac_objext"
14387 rm -f "conftest.$ac_ext"
14390 echo "$as_me:14390: result: $ac_cv_sys_largefile_CC" >&5
14391 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14392 if test "$ac_cv_sys_largefile_CC" != no; then
14393 CC=$CC$ac_cv_sys_largefile_CC
14396 echo "$as_me:14396: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14397 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14398 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14399 echo $ECHO_N "(cached) $ECHO_C" >&6
14402 ac_cv_sys_file_offset_bits=no
14403 cat >"conftest.$ac_ext" <<_ACEOF
14404 #line 14404 "configure"
14405 #include "confdefs.h"
14406 #include <sys/types.h>
14407 /* Check that off_t can represent 2**63 - 1 correctly.
14408 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14409 since some C++ compilers masquerading as C compilers
14410 incorrectly reject 9223372036854775807. */
14411 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14412 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14413 && LARGE_OFF_T % 2147483647 == 1)
14423 rm -f "conftest.$ac_objext"
14424 if { (eval echo "$as_me:14424: \"$ac_compile\"") >&5
14425 (eval $ac_compile) 2>&5
14427 echo "$as_me:14427: \$? = $ac_status" >&5
14428 (exit "$ac_status"); } &&
14429 { ac_try='test -s "conftest.$ac_objext"'
14430 { (eval echo "$as_me:14430: \"$ac_try\"") >&5
14431 (eval $ac_try) 2>&5
14433 echo "$as_me:14433: \$? = $ac_status" >&5
14434 (exit "$ac_status"); }; }; then
14437 echo "$as_me: failed program was:" >&5
14438 cat "conftest.$ac_ext" >&5
14440 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14441 cat >"conftest.$ac_ext" <<_ACEOF
14442 #line 14442 "configure"
14443 #include "confdefs.h"
14444 #define _FILE_OFFSET_BITS 64
14445 #include <sys/types.h>
14446 /* Check that off_t can represent 2**63 - 1 correctly.
14447 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14448 since some C++ compilers masquerading as C compilers
14449 incorrectly reject 9223372036854775807. */
14450 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14451 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14452 && LARGE_OFF_T % 2147483647 == 1)
14462 rm -f "conftest.$ac_objext"
14463 if { (eval echo "$as_me:14463: \"$ac_compile\"") >&5
14464 (eval $ac_compile) 2>&5
14466 echo "$as_me:14466: \$? = $ac_status" >&5
14467 (exit "$ac_status"); } &&
14468 { ac_try='test -s "conftest.$ac_objext"'
14469 { (eval echo "$as_me:14469: \"$ac_try\"") >&5
14470 (eval $ac_try) 2>&5
14472 echo "$as_me:14472: \$? = $ac_status" >&5
14473 (exit "$ac_status"); }; }; then
14474 ac_cv_sys_file_offset_bits=64; break
14476 echo "$as_me: failed program was:" >&5
14477 cat "conftest.$ac_ext" >&5
14479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14483 echo "$as_me:14483: result: $ac_cv_sys_file_offset_bits" >&5
14484 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14485 if test "$ac_cv_sys_file_offset_bits" != no; then
14487 cat >>confdefs.h <<EOF
14488 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14493 echo "$as_me:14493: checking for _LARGE_FILES value needed for large files" >&5
14494 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14495 if test "${ac_cv_sys_large_files+set}" = set; then
14496 echo $ECHO_N "(cached) $ECHO_C" >&6
14499 ac_cv_sys_large_files=no
14500 cat >"conftest.$ac_ext" <<_ACEOF
14501 #line 14501 "configure"
14502 #include "confdefs.h"
14503 #include <sys/types.h>
14504 /* Check that off_t can represent 2**63 - 1 correctly.
14505 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14506 since some C++ compilers masquerading as C compilers
14507 incorrectly reject 9223372036854775807. */
14508 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14509 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14510 && LARGE_OFF_T % 2147483647 == 1)
14520 rm -f "conftest.$ac_objext"
14521 if { (eval echo "$as_me:14521: \"$ac_compile\"") >&5
14522 (eval $ac_compile) 2>&5
14524 echo "$as_me:14524: \$? = $ac_status" >&5
14525 (exit "$ac_status"); } &&
14526 { ac_try='test -s "conftest.$ac_objext"'
14527 { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528 (eval $ac_try) 2>&5
14530 echo "$as_me:14530: \$? = $ac_status" >&5
14531 (exit "$ac_status"); }; }; then
14534 echo "$as_me: failed program was:" >&5
14535 cat "conftest.$ac_ext" >&5
14537 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14538 cat >"conftest.$ac_ext" <<_ACEOF
14539 #line 14539 "configure"
14540 #include "confdefs.h"
14541 #define _LARGE_FILES 1
14542 #include <sys/types.h>
14543 /* Check that off_t can represent 2**63 - 1 correctly.
14544 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14545 since some C++ compilers masquerading as C compilers
14546 incorrectly reject 9223372036854775807. */
14547 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14548 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14549 && LARGE_OFF_T % 2147483647 == 1)
14559 rm -f "conftest.$ac_objext"
14560 if { (eval echo "$as_me:14560: \"$ac_compile\"") >&5
14561 (eval $ac_compile) 2>&5
14563 echo "$as_me:14563: \$? = $ac_status" >&5
14564 (exit "$ac_status"); } &&
14565 { ac_try='test -s "conftest.$ac_objext"'
14566 { (eval echo "$as_me:14566: \"$ac_try\"") >&5
14567 (eval $ac_try) 2>&5
14569 echo "$as_me:14569: \$? = $ac_status" >&5
14570 (exit "$ac_status"); }; }; then
14571 ac_cv_sys_large_files=1; break
14573 echo "$as_me: failed program was:" >&5
14574 cat "conftest.$ac_ext" >&5
14576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14580 echo "$as_me:14580: result: $ac_cv_sys_large_files" >&5
14581 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14582 if test "$ac_cv_sys_large_files" != no; then
14584 cat >>confdefs.h <<EOF
14585 #define _LARGE_FILES $ac_cv_sys_large_files
14592 if test "$enable_largefile" != no ; then
14593 echo "$as_me:14593: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14594 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14595 if test "${ac_cv_sys_largefile_source+set}" = set; then
14596 echo $ECHO_N "(cached) $ECHO_C" >&6
14599 ac_cv_sys_largefile_source=no
14600 cat >"conftest.$ac_ext" <<_ACEOF
14601 #line 14601 "configure"
14602 #include "confdefs.h"
14612 rm -f "conftest.$ac_objext"
14613 if { (eval echo "$as_me:14613: \"$ac_compile\"") >&5
14614 (eval $ac_compile) 2>&5
14616 echo "$as_me:14616: \$? = $ac_status" >&5
14617 (exit "$ac_status"); } &&
14618 { ac_try='test -s "conftest.$ac_objext"'
14619 { (eval echo "$as_me:14619: \"$ac_try\"") >&5
14620 (eval $ac_try) 2>&5
14622 echo "$as_me:14622: \$? = $ac_status" >&5
14623 (exit "$ac_status"); }; }; then
14626 echo "$as_me: failed program was:" >&5
14627 cat "conftest.$ac_ext" >&5
14629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14630 cat >"conftest.$ac_ext" <<_ACEOF
14631 #line 14631 "configure"
14632 #include "confdefs.h"
14633 #define _LARGEFILE_SOURCE 1
14643 rm -f "conftest.$ac_objext"
14644 if { (eval echo "$as_me:14644: \"$ac_compile\"") >&5
14645 (eval $ac_compile) 2>&5
14647 echo "$as_me:14647: \$? = $ac_status" >&5
14648 (exit "$ac_status"); } &&
14649 { ac_try='test -s "conftest.$ac_objext"'
14650 { (eval echo "$as_me:14650: \"$ac_try\"") >&5
14651 (eval $ac_try) 2>&5
14653 echo "$as_me:14653: \$? = $ac_status" >&5
14654 (exit "$ac_status"); }; }; then
14655 ac_cv_sys_largefile_source=1; break
14657 echo "$as_me: failed program was:" >&5
14658 cat "conftest.$ac_ext" >&5
14660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14664 echo "$as_me:14664: result: $ac_cv_sys_largefile_source" >&5
14665 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14666 if test "$ac_cv_sys_largefile_source" != no; then
14668 cat >>confdefs.h <<EOF
14669 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14675 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14676 # in glibc 2.1.3, but that breaks too many other things.
14677 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14678 echo "$as_me:14678: checking for fseeko" >&5
14679 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14680 if test "${ac_cv_func_fseeko+set}" = set; then
14681 echo $ECHO_N "(cached) $ECHO_C" >&6
14683 cat >"conftest.$ac_ext" <<_ACEOF
14684 #line 14684 "configure"
14685 #include "confdefs.h"
14690 return fseeko && fseeko (stdin, 0, 0);
14695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14696 if { (eval echo "$as_me:14696: \"$ac_link\"") >&5
14697 (eval $ac_link) 2>&5
14699 echo "$as_me:14699: \$? = $ac_status" >&5
14700 (exit "$ac_status"); } &&
14701 { ac_try='test -s "conftest$ac_exeext"'
14702 { (eval echo "$as_me:14702: \"$ac_try\"") >&5
14703 (eval $ac_try) 2>&5
14705 echo "$as_me:14705: \$? = $ac_status" >&5
14706 (exit "$ac_status"); }; }; then
14707 ac_cv_func_fseeko=yes
14709 echo "$as_me: failed program was:" >&5
14710 cat "conftest.$ac_ext" >&5
14711 ac_cv_func_fseeko=no
14713 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14715 echo "$as_me:14715: result: $ac_cv_func_fseeko" >&5
14716 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14717 if test $ac_cv_func_fseeko = yes; then
14719 cat >>confdefs.h <<\EOF
14720 #define HAVE_FSEEKO 1
14725 # Normally we would collect these definitions in the config.h,
14726 # but (like _XOPEN_SOURCE), some environments rely on having these
14727 # defined before any of the system headers are included. Another
14728 # case comes up with C++, e.g., on AIX the compiler compiles the
14729 # header files by themselves before looking at the body files it is
14730 # told to compile. For ncurses, those header files do not include
14732 if test "$ac_cv_sys_large_files" != no
14735 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14736 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14739 if test "$ac_cv_sys_largefile_source" != no
14742 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14743 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14746 if test "$ac_cv_sys_file_offset_bits" != no
14749 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14750 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14754 echo "$as_me:14754: checking whether to use struct dirent64" >&5
14755 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14756 if test "${cf_cv_struct_dirent64+set}" = set; then
14757 echo $ECHO_N "(cached) $ECHO_C" >&6
14760 cat >"conftest.$ac_ext" <<_ACEOF
14761 #line 14761 "configure"
14762 #include "confdefs.h"
14764 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14765 #include <sys/types.h>
14766 #include <dirent.h>
14772 /* if transitional largefile support is setup, this is true */
14773 extern struct dirent64 * readdir(DIR *);
14774 struct dirent64 *x = readdir((DIR *)0);
14775 struct dirent *y = readdir((DIR *)0);
14783 rm -f "conftest.$ac_objext"
14784 if { (eval echo "$as_me:14784: \"$ac_compile\"") >&5
14785 (eval $ac_compile) 2>&5
14787 echo "$as_me:14787: \$? = $ac_status" >&5
14788 (exit "$ac_status"); } &&
14789 { ac_try='test -s "conftest.$ac_objext"'
14790 { (eval echo "$as_me:14790: \"$ac_try\"") >&5
14791 (eval $ac_try) 2>&5
14793 echo "$as_me:14793: \$? = $ac_status" >&5
14794 (exit "$ac_status"); }; }; then
14795 cf_cv_struct_dirent64=yes
14797 echo "$as_me: failed program was:" >&5
14798 cat "conftest.$ac_ext" >&5
14799 cf_cv_struct_dirent64=no
14801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14804 echo "$as_me:14804: result: $cf_cv_struct_dirent64" >&5
14805 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14806 test "$cf_cv_struct_dirent64" = yes &&
14807 cat >>confdefs.h <<\EOF
14808 #define HAVE_STRUCT_DIRENT64 1
14813 ### Enable compiling-in rcs id's
14814 echo "$as_me:14814: checking if RCS identifiers should be compiled-in" >&5
14815 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14817 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14818 if test "${with_rcs_ids+set}" = set; then
14819 withval="$with_rcs_ids"
14820 with_rcs_ids=$withval
14824 echo "$as_me:14824: result: $with_rcs_ids" >&5
14825 echo "${ECHO_T}$with_rcs_ids" >&6
14826 test "$with_rcs_ids" = yes &&
14827 cat >>confdefs.h <<\EOF
14828 #define USE_RCS_IDS 1
14831 ###############################################################################
14833 ### Note that some functions (such as const) are normally disabled anyway.
14834 echo "$as_me:14834: checking if you want to build with function extensions" >&5
14835 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14837 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14838 if test "${enable_ext_funcs+set}" = set; then
14839 enableval="$enable_ext_funcs"
14840 with_ext_funcs=$enableval
14844 echo "$as_me:14844: result: $with_ext_funcs" >&5
14845 echo "${ECHO_T}$with_ext_funcs" >&6
14846 if test "$with_ext_funcs" = yes ; then
14847 NCURSES_EXT_FUNCS=1
14849 cat >>confdefs.h <<\EOF
14850 #define HAVE_USE_DEFAULT_COLORS 1
14853 cat >>confdefs.h <<\EOF
14854 #define NCURSES_EXT_FUNCS 1
14858 NCURSES_EXT_FUNCS=0
14861 ### use option --enable-const to turn on use of const beyond that in XSI.
14862 echo "$as_me:14862: checking for extended use of const keyword" >&5
14863 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14865 # Check whether --enable-const or --disable-const was given.
14866 if test "${enable_const+set}" = set; then
14867 enableval="$enable_const"
14868 with_ext_const=$enableval
14872 echo "$as_me:14872: result: $with_ext_const" >&5
14873 echo "${ECHO_T}$with_ext_const" >&6
14874 NCURSES_CONST='/*nothing*/'
14875 if test "$with_ext_const" = yes ; then
14876 NCURSES_CONST=const
14879 ###############################################################################
14880 # These options are relatively safe to experiment with.
14882 echo "$as_me:14882: checking if you want all development code" >&5
14883 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14885 # Check whether --with-develop or --without-develop was given.
14886 if test "${with_develop+set}" = set; then
14887 withval="$with_develop"
14888 with_develop=$withval
14892 echo "$as_me:14892: result: $with_develop" >&5
14893 echo "${ECHO_T}$with_develop" >&6
14895 ###############################################################################
14896 # These are just experimental, probably should not be in a package:
14898 # This is still experimental (20080329), but should ultimately be moved to
14899 # the script-block --with-normal, etc.
14901 echo "$as_me:14901: checking if you want to link with the pthread library" >&5
14902 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14904 # Check whether --with-pthread or --without-pthread was given.
14905 if test "${with_pthread+set}" = set; then
14906 withval="$with_pthread"
14907 with_pthread=$withval
14911 echo "$as_me:14911: result: $with_pthread" >&5
14912 echo "${ECHO_T}$with_pthread" >&6
14914 if test "$with_pthread" != no ; then
14915 echo "$as_me:14915: checking for pthread.h" >&5
14916 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14917 if test "${ac_cv_header_pthread_h+set}" = set; then
14918 echo $ECHO_N "(cached) $ECHO_C" >&6
14920 cat >"conftest.$ac_ext" <<_ACEOF
14921 #line 14921 "configure"
14922 #include "confdefs.h"
14923 #include <pthread.h>
14925 if { (eval echo "$as_me:14925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14926 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14928 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14930 cat conftest.err >&5
14931 echo "$as_me:14931: \$? = $ac_status" >&5
14932 (exit "$ac_status"); } >/dev/null; then
14933 if test -s conftest.err; then
14934 ac_cpp_err=$ac_c_preproc_warn_flag
14941 if test -z "$ac_cpp_err"; then
14942 ac_cv_header_pthread_h=yes
14944 echo "$as_me: failed program was:" >&5
14945 cat "conftest.$ac_ext" >&5
14946 ac_cv_header_pthread_h=no
14948 rm -f conftest.err "conftest.$ac_ext"
14950 echo "$as_me:14950: result: $ac_cv_header_pthread_h" >&5
14951 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14952 if test "$ac_cv_header_pthread_h" = yes; then
14954 cat >>confdefs.h <<\EOF
14955 #define HAVE_PTHREADS_H 1
14958 for cf_lib_pthread in pthread c_r
14960 echo "$as_me:14960: checking if we can link with the $cf_lib_pthread library" >&5
14961 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14962 cf_save_LIBS="$LIBS"
14964 cf_add_libs="$LIBS"
14967 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14968 # filter duplicates
14969 for cf_add_1lib in $cf_add_0lib; do
14970 for cf_add_2lib in $cf_add_libs; do
14971 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14976 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14978 LIBS="$cf_add_libs"
14980 cat >"conftest.$ac_ext" <<_ACEOF
14981 #line 14981 "configure"
14982 #include "confdefs.h"
14984 #include <pthread.h>
14990 int rc = pthread_create(0,0,0,0);
14991 int r2 = pthread_mutexattr_settype(0, 0);
14997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14998 if { (eval echo "$as_me:14998: \"$ac_link\"") >&5
14999 (eval $ac_link) 2>&5
15001 echo "$as_me:15001: \$? = $ac_status" >&5
15002 (exit "$ac_status"); } &&
15003 { ac_try='test -s "conftest$ac_exeext"'
15004 { (eval echo "$as_me:15004: \"$ac_try\"") >&5
15005 (eval $ac_try) 2>&5
15007 echo "$as_me:15007: \$? = $ac_status" >&5
15008 (exit "$ac_status"); }; }; then
15011 echo "$as_me: failed program was:" >&5
15012 cat "conftest.$ac_ext" >&5
15015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15016 LIBS="$cf_save_LIBS"
15017 echo "$as_me:15017: result: $with_pthread" >&5
15018 echo "${ECHO_T}$with_pthread" >&6
15019 test "$with_pthread" = yes && break
15022 if test "$with_pthread" = yes ; then
15024 cf_add_libs="$LIBS"
15027 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15028 # filter duplicates
15029 for cf_add_1lib in $cf_add_0lib; do
15030 for cf_add_2lib in $cf_add_libs; do
15031 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15036 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15038 LIBS="$cf_add_libs"
15040 cat >>confdefs.h <<\EOF
15041 #define HAVE_LIBPTHREADS 1
15045 { { echo "$as_me:15045: error: Cannot link with pthread library" >&5
15046 echo "$as_me: error: Cannot link with pthread library" >&2;}
15047 { (exit 1); exit 1; }; }
15054 echo "$as_me:15054: checking if you want to use weak-symbols for pthreads" >&5
15055 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15057 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15058 if test "${enable_weak_symbols+set}" = set; then
15059 enableval="$enable_weak_symbols"
15060 use_weak_symbols=$withval
15062 use_weak_symbols=no
15064 echo "$as_me:15064: result: $use_weak_symbols" >&5
15065 echo "${ECHO_T}$use_weak_symbols" >&6
15066 if test "$use_weak_symbols" = yes ; then
15068 echo "$as_me:15068: checking if $CC supports weak symbols" >&5
15069 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15070 if test "${cf_cv_weak_symbols+set}" = set; then
15071 echo $ECHO_N "(cached) $ECHO_C" >&6
15074 cat >"conftest.$ac_ext" <<_ACEOF
15075 #line 15075 "configure"
15076 #include "confdefs.h"
15083 #if defined(__GNUC__)
15084 # if defined __USE_ISOC99
15085 # define _cat_pragma(exp) _Pragma(#exp)
15086 # define _weak_pragma(exp) _cat_pragma(weak name)
15088 # define _weak_pragma(exp)
15090 # define _declare(name) __extension__ extern __typeof__(name) name
15091 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15094 weak_symbol(fopen);
15100 rm -f "conftest.$ac_objext"
15101 if { (eval echo "$as_me:15101: \"$ac_compile\"") >&5
15102 (eval $ac_compile) 2>&5
15104 echo "$as_me:15104: \$? = $ac_status" >&5
15105 (exit "$ac_status"); } &&
15106 { ac_try='test -s "conftest.$ac_objext"'
15107 { (eval echo "$as_me:15107: \"$ac_try\"") >&5
15108 (eval $ac_try) 2>&5
15110 echo "$as_me:15110: \$? = $ac_status" >&5
15111 (exit "$ac_status"); }; }; then
15112 cf_cv_weak_symbols=yes
15114 echo "$as_me: failed program was:" >&5
15115 cat "conftest.$ac_ext" >&5
15116 cf_cv_weak_symbols=no
15118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15121 echo "$as_me:15121: result: $cf_cv_weak_symbols" >&5
15122 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15125 cf_cv_weak_symbols=no
15128 if test $cf_cv_weak_symbols = yes ; then
15130 cat >>confdefs.h <<\EOF
15131 #define USE_WEAK_SYMBOLS 1
15137 if test "$with_pthread" = "yes" ; then
15139 cat >>confdefs.h <<\EOF
15140 #define USE_PTHREADS 1
15143 enable_reentrant=yes
15144 if test $cf_cv_weak_symbols = yes ; then
15149 # OpenSUSE is installing ncurses6, using reentrant option.
15150 echo "$as_me:15150: checking for _nc_TABSIZE" >&5
15151 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15152 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15153 echo $ECHO_N "(cached) $ECHO_C" >&6
15155 cat >"conftest.$ac_ext" <<_ACEOF
15156 #line 15156 "configure"
15157 #include "confdefs.h"
15158 #define _nc_TABSIZE autoconf_temporary
15159 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15166 /* We use char because int might match the return type of a gcc2
15167 builtin and then its argument prototype would still apply. */
15168 char _nc_TABSIZE (void);
15174 /* The GNU C library defines stubs for functions which it implements
15175 to always fail with ENOSYS. Some functions are actually named
15176 something starting with __ and the normal name is an alias. */
15177 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15178 #error found stub for _nc_TABSIZE
15181 return _nc_TABSIZE ();
15186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15187 if { (eval echo "$as_me:15187: \"$ac_link\"") >&5
15188 (eval $ac_link) 2>&5
15190 echo "$as_me:15190: \$? = $ac_status" >&5
15191 (exit "$ac_status"); } &&
15192 { ac_try='test -s "conftest$ac_exeext"'
15193 { (eval echo "$as_me:15193: \"$ac_try\"") >&5
15194 (eval $ac_try) 2>&5
15196 echo "$as_me:15196: \$? = $ac_status" >&5
15197 (exit "$ac_status"); }; }; then
15198 ac_cv_func__nc_TABSIZE=yes
15200 echo "$as_me: failed program was:" >&5
15201 cat "conftest.$ac_ext" >&5
15202 ac_cv_func__nc_TABSIZE=no
15204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15206 echo "$as_me:15206: result: $ac_cv_func__nc_TABSIZE" >&5
15207 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15208 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15209 assume_reentrant=yes
15211 assume_reentrant=no
15214 # Reentrant code has to be opaque; there's little advantage to making ncurses
15215 # opaque outside of that, so there is no --enable-opaque option. We can use
15216 # this option without --with-pthreads, but this will be always set for
15218 echo "$as_me:15218: checking if you want experimental reentrant code" >&5
15219 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15221 # Check whether --enable-reentrant or --disable-reentrant was given.
15222 if test "${enable_reentrant+set}" = set; then
15223 enableval="$enable_reentrant"
15224 with_reentrant=$enableval
15226 with_reentrant=$assume_reentrant
15228 echo "$as_me:15228: result: $with_reentrant" >&5
15229 echo "${ECHO_T}$with_reentrant" >&6
15230 if test "$with_reentrant" = yes ; then
15231 cf_cv_enable_reentrant=1
15232 if test $cf_cv_weak_symbols = yes ; then
15234 # remove pthread library from $LIBS
15235 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15237 elif test "$assume_reentrant" = no ; then
15238 LIB_SUFFIX="t${LIB_SUFFIX}"
15241 cat >>confdefs.h <<\EOF
15242 #define USE_REENTRANT 1
15246 cf_cv_enable_reentrant=0
15249 ### Allow using a different wrap-prefix
15250 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15251 echo "$as_me:15251: checking for prefix used to wrap public variables" >&5
15252 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15254 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15255 if test "${with_wrap_prefix+set}" = set; then
15256 withval="$with_wrap_prefix"
15257 NCURSES_WRAP_PREFIX=$withval
15259 NCURSES_WRAP_PREFIX=_nc_
15261 echo "$as_me:15261: result: $NCURSES_WRAP_PREFIX" >&5
15262 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15264 NCURSES_WRAP_PREFIX=_nc_
15267 cat >>confdefs.h <<EOF
15268 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15271 ###############################################################################
15273 ### use option --disable-echo to suppress full display compiling commands
15275 echo "$as_me:15275: checking if you want to see long compiling messages" >&5
15276 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15278 # Check whether --enable-echo or --disable-echo was given.
15279 if test "${enable_echo+set}" = set; then
15280 enableval="$enable_echo"
15281 test "$enableval" != no && enableval=yes
15282 if test "$enableval" != "yes" ; then
15285 ECHO_LD='@echo linking $@;'
15286 RULE_CC='@echo compiling $<'
15287 SHOW_CC='@echo compiling $@'
15309 echo "$as_me:15309: result: $enableval" >&5
15310 echo "${ECHO_T}$enableval" >&6
15312 echo "$as_me:15312: checking if you want to use C11 _Noreturn feature" >&5
15313 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15315 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15316 if test "${enable_stdnoreturn+set}" = set; then
15317 enableval="$enable_stdnoreturn"
15318 test "$enableval" != yes && enableval=no
15319 if test "$enableval" != "no" ; then
15320 enable_stdnoreturn=yes
15322 enable_stdnoreturn=no
15326 enable_stdnoreturn=no
15329 echo "$as_me:15329: result: $enable_stdnoreturn" >&5
15330 echo "${ECHO_T}$enable_stdnoreturn" >&6
15332 if test $enable_stdnoreturn = yes; then
15333 echo "$as_me:15333: checking for C11 _Noreturn feature" >&5
15334 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15335 if test "${cf_cv_c11_noreturn+set}" = set; then
15336 echo $ECHO_N "(cached) $ECHO_C" >&6
15338 cat >"conftest.$ac_ext" <<_ACEOF
15339 #line 15339 "configure"
15340 #include "confdefs.h"
15343 #include <stdlib.h>
15344 #include <stdnoreturn.h>
15345 static _Noreturn void giveup(void) { exit(0); }
15350 if (feof(stdin)) giveup()
15355 rm -f "conftest.$ac_objext"
15356 if { (eval echo "$as_me:15356: \"$ac_compile\"") >&5
15357 (eval $ac_compile) 2>&5
15359 echo "$as_me:15359: \$? = $ac_status" >&5
15360 (exit "$ac_status"); } &&
15361 { ac_try='test -s "conftest.$ac_objext"'
15362 { (eval echo "$as_me:15362: \"$ac_try\"") >&5
15363 (eval $ac_try) 2>&5
15365 echo "$as_me:15365: \$? = $ac_status" >&5
15366 (exit "$ac_status"); }; }; then
15367 cf_cv_c11_noreturn=yes
15369 echo "$as_me: failed program was:" >&5
15370 cat "conftest.$ac_ext" >&5
15371 cf_cv_c11_noreturn=no
15373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15376 echo "$as_me:15376: result: $cf_cv_c11_noreturn" >&5
15377 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15379 cf_cv_c11_noreturn=no,
15382 if test "$cf_cv_c11_noreturn" = yes; then
15384 cat >>confdefs.h <<\EOF
15385 #define HAVE_STDNORETURN_H 1
15388 cat >>confdefs.h <<EOF
15389 #define STDC_NORETURN _Noreturn
15392 HAVE_STDNORETURN_H=1
15394 HAVE_STDNORETURN_H=0
15397 if test "$GCC" = yes || test "$GXX" = yes
15400 if test "$GCC" = yes || test "$GXX" = yes
15405 for cf_temp_scan in $CFLAGS
15407 case "x$cf_temp_scan" in
15410 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15411 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15416 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15417 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15422 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15423 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15428 if test "x$CFLAGS" != "x$cf_temp_flags"
15430 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15432 echo "${as_me:-configure}:15432: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15434 CFLAGS="$cf_temp_flags"
15435 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15437 echo "${as_me:-configure}:15437: testing ... fixed $CFLAGS ..." 1>&5
15439 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15441 echo "${as_me:-configure}:15441: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15448 if test "$GCC" = yes || test "$GXX" = yes
15453 for cf_temp_scan in $CPPFLAGS
15455 case "x$cf_temp_scan" in
15458 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15459 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15464 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15465 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15470 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15471 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15476 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15478 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15480 echo "${as_me:-configure}:15480: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15482 CPPFLAGS="$cf_temp_flags"
15483 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15485 echo "${as_me:-configure}:15485: testing ... fixed $CPPFLAGS ..." 1>&5
15487 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15489 echo "${as_me:-configure}:15489: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15496 if test "$GCC" = yes || test "$GXX" = yes
15501 for cf_temp_scan in $LDFLAGS
15503 case "x$cf_temp_scan" in
15506 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15507 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15512 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15513 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15518 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15519 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15524 if test "x$LDFLAGS" != "x$cf_temp_flags"
15526 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15528 echo "${as_me:-configure}:15528: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15530 LDFLAGS="$cf_temp_flags"
15531 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15533 echo "${as_me:-configure}:15533: testing ... fixed $LDFLAGS ..." 1>&5
15535 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15537 echo "${as_me:-configure}:15537: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15544 echo "$as_me:15544: checking if you want to turn on gcc warnings" >&5
15545 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15547 # Check whether --enable-warnings or --disable-warnings was given.
15548 if test "${enable_warnings+set}" = set; then
15549 enableval="$enable_warnings"
15550 test "$enableval" != yes && enableval=no
15551 if test "$enableval" != "no" ; then
15552 enable_warnings=yes
15561 echo "$as_me:15561: result: $enable_warnings" >&5
15562 echo "${ECHO_T}$enable_warnings" >&6
15563 if test "$enable_warnings" = "yes"
15566 if test "x$have_x" = xyes; then
15568 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15569 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15570 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15571 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15572 for cf_X_CFLAGS in $X_CFLAGS
15574 case "x$cf_X_CFLAGS" in
15576 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15579 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15584 cat >"conftest.$ac_ext" <<_ACEOF
15585 #line 15585 "configure"
15586 #include "confdefs.h"
15588 #include <stdlib.h>
15589 #include <X11/Intrinsic.h>
15594 String foo = malloc(1); free((void*)foo)
15599 rm -f "conftest.$ac_objext"
15600 if { (eval echo "$as_me:15600: \"$ac_compile\"") >&5
15601 (eval $ac_compile) 2>&5
15603 echo "$as_me:15603: \$? = $ac_status" >&5
15604 (exit "$ac_status"); } &&
15605 { ac_try='test -s "conftest.$ac_objext"'
15606 { (eval echo "$as_me:15606: \"$ac_try\"") >&5
15607 (eval $ac_try) 2>&5
15609 echo "$as_me:15609: \$? = $ac_status" >&5
15610 (exit "$ac_status"); }; }; then
15612 echo "$as_me:15612: checking for X11/Xt const-feature" >&5
15613 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15614 if test "${cf_cv_const_x_string+set}" = set; then
15615 echo $ECHO_N "(cached) $ECHO_C" >&6
15618 cat >"conftest.$ac_ext" <<_ACEOF
15619 #line 15619 "configure"
15620 #include "confdefs.h"
15622 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15623 #undef XTSTRINGDEFINES /* X11R5 and later */
15624 #include <stdlib.h>
15625 #include <X11/Intrinsic.h>
15630 String foo = malloc(1); *foo = 0
15635 rm -f "conftest.$ac_objext"
15636 if { (eval echo "$as_me:15636: \"$ac_compile\"") >&5
15637 (eval $ac_compile) 2>&5
15639 echo "$as_me:15639: \$? = $ac_status" >&5
15640 (exit "$ac_status"); } &&
15641 { ac_try='test -s "conftest.$ac_objext"'
15642 { (eval echo "$as_me:15642: \"$ac_try\"") >&5
15643 (eval $ac_try) 2>&5
15645 echo "$as_me:15645: \$? = $ac_status" >&5
15646 (exit "$ac_status"); }; }; then
15648 cf_cv_const_x_string=no
15651 echo "$as_me: failed program was:" >&5
15652 cat "conftest.$ac_ext" >&5
15654 cf_cv_const_x_string=yes
15657 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15660 echo "$as_me:15660: result: $cf_cv_const_x_string" >&5
15661 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15663 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15664 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15665 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15667 case "$cf_cv_const_x_string" in
15670 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15671 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15676 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15677 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15683 echo "$as_me: failed program was:" >&5
15684 cat "conftest.$ac_ext" >&5
15686 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15688 cat > "conftest.$ac_ext" <<EOF
15689 #line 15689 "${as_me:-configure}"
15690 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15692 if test "$INTEL_COMPILER" = yes
15694 # The "-wdXXX" options suppress warnings:
15695 # remark #1419: external declaration in primary source file
15696 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15697 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15698 # remark #193: zero used for undefined preprocessing identifier
15699 # remark #593: variable "curs_sb_left_arrow" was set but never used
15700 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15701 # remark #869: parameter "tw" was never referenced
15702 # remark #981: operands are evaluated in unspecified order
15703 # warning #279: controlling expression is constant
15705 { echo "$as_me:15705: checking for $CC warning options..." >&5
15706 echo "$as_me: checking for $CC warning options..." >&6;}
15707 cf_save_CFLAGS="$CFLAGS"
15708 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15720 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15721 if { (eval echo "$as_me:15721: \"$ac_compile\"") >&5
15722 (eval $ac_compile) 2>&5
15724 echo "$as_me:15724: \$? = $ac_status" >&5
15725 (exit "$ac_status"); }; then
15726 test -n "$verbose" && echo "$as_me:15726: result: ... -$cf_opt" >&5
15727 echo "${ECHO_T}... -$cf_opt" >&6
15728 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15731 CFLAGS="$cf_save_CFLAGS"
15732 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15734 { echo "$as_me:15734: checking for $CC warning options..." >&5
15735 echo "$as_me: checking for $CC warning options..." >&6;}
15736 cf_save_CFLAGS="$CFLAGS"
15738 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15739 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15740 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15741 for cf_opt in W Wall \
15742 Wbad-function-cast \
15745 Wdeclaration-after-statement \
15748 Wmissing-declarations \
15749 Wmissing-prototypes \
15753 Wstrict-prototypes \
15754 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15756 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15757 if { (eval echo "$as_me:15757: \"$ac_compile\"") >&5
15758 (eval $ac_compile) 2>&5
15760 echo "$as_me:15760: \$? = $ac_status" >&5
15761 (exit "$ac_status"); }; then
15762 test -n "$verbose" && echo "$as_me:15762: result: ... -$cf_opt" >&5
15763 echo "${ECHO_T}... -$cf_opt" >&6
15766 case "$GCC_VERSION" in
15768 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15770 echo "${as_me:-configure}:15770: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15776 case "$GCC_VERSION" in
15778 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15780 echo "${as_me:-configure}:15780: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15786 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15789 CFLAGS="$cf_save_CFLAGS"
15795 if test "$GCC" = yes || test "$GXX" = yes
15797 cat > conftest.i <<EOF
15799 #define GCC_PRINTF 0
15802 #define GCC_SCANF 0
15804 #ifndef GCC_NORETURN
15805 #define GCC_NORETURN /* nothing */
15808 #define GCC_UNUSED /* nothing */
15811 if test "$GCC" = yes
15813 { echo "$as_me:15813: checking for $CC __attribute__ directives..." >&5
15814 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15815 cat > "conftest.$ac_ext" <<EOF
15816 #line 15816 "${as_me:-configure}"
15817 #include "confdefs.h"
15818 #include "conftest.h"
15819 #include "conftest.i"
15821 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15823 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15826 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15828 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15830 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15831 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15832 extern GCC_NORETURN void foo(void);
15833 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15835 cf_printf_attribute=no
15836 cf_scanf_attribute=no
15837 for cf_attribute in scanf printf unused noreturn
15840 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15842 cf_directive="__attribute__(($cf_attribute))"
15843 echo "checking for $CC $cf_directive" 1>&5
15845 case "$cf_attribute" in
15847 cf_printf_attribute=yes
15848 cat >conftest.h <<EOF
15849 #define GCC_$cf_ATTRIBUTE 1
15853 cf_scanf_attribute=yes
15854 cat >conftest.h <<EOF
15855 #define GCC_$cf_ATTRIBUTE 1
15859 cat >conftest.h <<EOF
15860 #define GCC_$cf_ATTRIBUTE $cf_directive
15865 if { (eval echo "$as_me:15865: \"$ac_compile\"") >&5
15866 (eval $ac_compile) 2>&5
15868 echo "$as_me:15868: \$? = $ac_status" >&5
15869 (exit "$ac_status"); }; then
15870 test -n "$verbose" && echo "$as_me:15870: result: ... $cf_attribute" >&5
15871 echo "${ECHO_T}... $cf_attribute" >&6
15872 cat conftest.h >>confdefs.h
15873 case "$cf_attribute" in
15876 cat >>confdefs.h <<EOF
15877 #define GCC_NORETURN $cf_directive
15882 cf_value='/* nothing */'
15883 if test "$cf_printf_attribute" != no ; then
15884 cf_value='__attribute__((format(printf,fmt,var)))'
15886 cat >>confdefs.h <<\EOF
15887 #define GCC_PRINTF 1
15892 cat >>confdefs.h <<EOF
15893 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15898 cf_value='/* nothing */'
15899 if test "$cf_scanf_attribute" != no ; then
15900 cf_value='__attribute__((format(scanf,fmt,var)))'
15902 cat >>confdefs.h <<\EOF
15903 #define GCC_SCANF 1
15908 cat >>confdefs.h <<EOF
15909 #define GCC_SCANFLIKE(fmt,var) $cf_value
15915 cat >>confdefs.h <<EOF
15916 #define GCC_UNUSED $cf_directive
15924 ${FGREP-fgrep} define conftest.i >>confdefs.h
15931 if test "x$enable_warnings" = "xyes"; then
15933 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
15937 ### use option --enable-assertions to turn on generation of assertion code
15938 echo "$as_me:15938: checking if you want to enable runtime assertions" >&5
15939 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15941 # Check whether --enable-assertions or --disable-assertions was given.
15942 if test "${enable_assertions+set}" = set; then
15943 enableval="$enable_assertions"
15944 with_assertions=$enableval
15948 echo "$as_me:15948: result: $with_assertions" >&5
15949 echo "${ECHO_T}$with_assertions" >&6
15952 if test "$with_assertions" = no
15954 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15957 ADAFLAGS="$ADAFLAGS -gnata"
15962 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15964 cat >>confdefs.h <<\EOF
15965 #define HAVE_NC_ALLOC_H 1
15968 ### use option --enable-expanded to generate certain macros as functions
15970 # Check whether --enable-expanded or --disable-expanded was given.
15971 if test "${enable_expanded+set}" = set; then
15972 enableval="$enable_expanded"
15973 test "$enableval" = yes &&
15974 cat >>confdefs.h <<\EOF
15975 #define NCURSES_EXPANDED 1
15980 ### use option --disable-macros to suppress macros in favor of functions
15982 # Check whether --enable-macros or --disable-macros was given.
15983 if test "${enable_macros+set}" = set; then
15984 enableval="$enable_macros"
15985 test "$enableval" = no &&
15986 cat >>confdefs.h <<\EOF
15987 #define NCURSES_NOMACROS 1
15992 # Normally we only add trace() to the debug-library. Allow this to be
15993 # extended to all models of the ncurses library:
15995 case "$CFLAGS $CPPFLAGS" in
16001 echo "$as_me:16001: checking whether to add trace feature to all models" >&5
16002 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16004 # Check whether --with-trace or --without-trace was given.
16005 if test "${with_trace+set}" = set; then
16006 withval="$with_trace"
16007 cf_with_trace=$withval
16009 cf_with_trace=$cf_all_traces
16011 echo "$as_me:16011: result: $cf_with_trace" >&5
16012 echo "${ECHO_T}$cf_with_trace" >&6
16014 if test "$cf_with_trace" = yes ; then
16020 cf_new_extra_cppflags=
16022 for cf_add_cflags in -DTRACE
16024 case "$cf_fix_cppflags" in
16026 case "$cf_add_cflags" in
16027 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16028 case "$cf_add_cflags" in
16030 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16032 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16033 && test -z "${cf_tst_cflags}" \
16034 && cf_fix_cppflags=yes
16036 if test "$cf_fix_cppflags" = yes ; then
16038 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16039 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16042 elif test "${cf_tst_cflags}" = "\"'" ; then
16044 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16045 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16051 case "$CPPFLAGS" in
16055 case "$cf_add_cflags" in
16057 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16059 CPPFLAGS=`echo "$CPPFLAGS" | \
16060 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16061 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16066 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16067 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16074 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16075 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16082 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16083 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16085 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16087 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16088 && test -z "${cf_tst_cflags}" \
16089 && cf_fix_cppflags=no
16094 if test -n "$cf_new_cflags" ; then
16096 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16097 CFLAGS="${CFLAGS}$cf_new_cflags"
16101 if test -n "$cf_new_cppflags" ; then
16103 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16104 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16108 if test -n "$cf_new_extra_cppflags" ; then
16110 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16111 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16119 echo "$as_me:16119: checking if we want to use GNAT projects" >&5
16120 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16122 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16123 if test "${enable_gnat_projects+set}" = set; then
16124 enableval="$enable_gnat_projects"
16125 test "$enableval" != no && enableval=yes
16126 if test "$enableval" != "yes" ; then
16127 enable_gnat_projects=no
16129 enable_gnat_projects=yes
16133 enable_gnat_projects=yes
16136 echo "$as_me:16136: result: $enable_gnat_projects" >&5
16137 echo "${ECHO_T}$enable_gnat_projects" >&6
16139 ### Checks for libraries.
16140 case $cf_cv_system_name in
16143 echo "$as_me:16143: checking if ssp library is needed" >&5
16144 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16145 if test "${cf_cv_need_libssp+set}" = set; then
16146 echo $ECHO_N "(cached) $ECHO_C" >&6
16149 cat >"conftest.$ac_ext" <<_ACEOF
16150 #line 16150 "configure"
16151 #include "confdefs.h"
16153 #include <sys/types.h>
16154 #include <dirent.h>
16160 DIR *dp = opendir(".");
16166 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16167 if { (eval echo "$as_me:16167: \"$ac_link\"") >&5
16168 (eval $ac_link) 2>&5
16170 echo "$as_me:16170: \$? = $ac_status" >&5
16171 (exit "$ac_status"); } &&
16172 { ac_try='test -s "conftest$ac_exeext"'
16173 { (eval echo "$as_me:16173: \"$ac_try\"") >&5
16174 (eval $ac_try) 2>&5
16176 echo "$as_me:16176: \$? = $ac_status" >&5
16177 (exit "$ac_status"); }; }; then
16178 cf_cv_need_libssp=no
16180 echo "$as_me: failed program was:" >&5
16181 cat "conftest.$ac_ext" >&5
16183 cf_save_LIBS="$LIBS"
16185 cat >"conftest.$ac_ext" <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16189 #include <sys/types.h>
16190 #include <dirent.h>
16196 DIR *dp = opendir(".");
16202 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16203 if { (eval echo "$as_me:16203: \"$ac_link\"") >&5
16204 (eval $ac_link) 2>&5
16206 echo "$as_me:16206: \$? = $ac_status" >&5
16207 (exit "$ac_status"); } &&
16208 { ac_try='test -s "conftest$ac_exeext"'
16209 { (eval echo "$as_me:16209: \"$ac_try\"") >&5
16210 (eval $ac_try) 2>&5
16212 echo "$as_me:16212: \$? = $ac_status" >&5
16213 (exit "$ac_status"); }; }; then
16214 cf_cv_need_libssp=yes
16216 echo "$as_me: failed program was:" >&5
16217 cat "conftest.$ac_ext" >&5
16218 cf_cv_need_libssp=maybe
16220 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16221 LIBS="$cf_save_LIBS"
16224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16226 echo "$as_me:16226: result: $cf_cv_need_libssp" >&5
16227 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16229 if test "x$cf_cv_need_libssp" = xyes
16232 cf_add_libs="$LIBS"
16235 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16236 # filter duplicates
16237 for cf_add_1lib in $cf_add_0lib; do
16238 for cf_add_2lib in $cf_add_libs; do
16239 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16244 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16246 LIBS="$cf_add_libs"
16252 echo "$as_me:16252: checking for gettimeofday" >&5
16253 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16254 if test "${ac_cv_func_gettimeofday+set}" = set; then
16255 echo $ECHO_N "(cached) $ECHO_C" >&6
16257 cat >"conftest.$ac_ext" <<_ACEOF
16258 #line 16258 "configure"
16259 #include "confdefs.h"
16260 #define gettimeofday autoconf_temporary
16261 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16262 #undef gettimeofday
16268 /* We use char because int might match the return type of a gcc2
16269 builtin and then its argument prototype would still apply. */
16270 char gettimeofday (void);
16276 /* The GNU C library defines stubs for functions which it implements
16277 to always fail with ENOSYS. Some functions are actually named
16278 something starting with __ and the normal name is an alias. */
16279 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16280 #error found stub for gettimeofday
16283 return gettimeofday ();
16288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290 (eval $ac_link) 2>&5
16292 echo "$as_me:16292: \$? = $ac_status" >&5
16293 (exit "$ac_status"); } &&
16294 { ac_try='test -s "conftest$ac_exeext"'
16295 { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296 (eval $ac_try) 2>&5
16298 echo "$as_me:16298: \$? = $ac_status" >&5
16299 (exit "$ac_status"); }; }; then
16300 ac_cv_func_gettimeofday=yes
16302 echo "$as_me: failed program was:" >&5
16303 cat "conftest.$ac_ext" >&5
16304 ac_cv_func_gettimeofday=no
16306 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16308 echo "$as_me:16308: result: $ac_cv_func_gettimeofday" >&5
16309 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16310 if test "$ac_cv_func_gettimeofday" = yes; then
16311 cat >>confdefs.h <<\EOF
16312 #define HAVE_GETTIMEOFDAY 1
16317 echo "$as_me:16317: checking for gettimeofday in -lbsd" >&5
16318 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16319 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16320 echo $ECHO_N "(cached) $ECHO_C" >&6
16322 ac_check_lib_save_LIBS=$LIBS
16324 cat >"conftest.$ac_ext" <<_ACEOF
16325 #line 16325 "configure"
16326 #include "confdefs.h"
16328 /* Override any gcc2 internal prototype to avoid an error. */
16332 /* We use char because int might match the return type of a gcc2
16333 builtin and then its argument prototype would still apply. */
16334 char gettimeofday ();
16343 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16344 if { (eval echo "$as_me:16344: \"$ac_link\"") >&5
16345 (eval $ac_link) 2>&5
16347 echo "$as_me:16347: \$? = $ac_status" >&5
16348 (exit "$ac_status"); } &&
16349 { ac_try='test -s "conftest$ac_exeext"'
16350 { (eval echo "$as_me:16350: \"$ac_try\"") >&5
16351 (eval $ac_try) 2>&5
16353 echo "$as_me:16353: \$? = $ac_status" >&5
16354 (exit "$ac_status"); }; }; then
16355 ac_cv_lib_bsd_gettimeofday=yes
16357 echo "$as_me: failed program was:" >&5
16358 cat "conftest.$ac_ext" >&5
16359 ac_cv_lib_bsd_gettimeofday=no
16361 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16362 LIBS=$ac_check_lib_save_LIBS
16364 echo "$as_me:16364: result: $ac_cv_lib_bsd_gettimeofday" >&5
16365 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16366 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16368 cat >>confdefs.h <<\EOF
16369 #define HAVE_GETTIMEOFDAY 1
16379 ### Checks for header files.
16380 echo "$as_me:16380: checking for ANSI C header files" >&5
16381 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16382 if test "${ac_cv_header_stdc+set}" = set; then
16383 echo $ECHO_N "(cached) $ECHO_C" >&6
16385 cat >"conftest.$ac_ext" <<_ACEOF
16386 #line 16386 "configure"
16387 #include "confdefs.h"
16388 #include <stdlib.h>
16389 #include <stdarg.h>
16390 #include <string.h>
16394 if { (eval echo "$as_me:16394: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16395 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16397 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16399 cat conftest.err >&5
16400 echo "$as_me:16400: \$? = $ac_status" >&5
16401 (exit "$ac_status"); } >/dev/null; then
16402 if test -s conftest.err; then
16403 ac_cpp_err=$ac_c_preproc_warn_flag
16410 if test -z "$ac_cpp_err"; then
16411 ac_cv_header_stdc=yes
16413 echo "$as_me: failed program was:" >&5
16414 cat "conftest.$ac_ext" >&5
16415 ac_cv_header_stdc=no
16417 rm -f conftest.err "conftest.$ac_ext"
16419 if test $ac_cv_header_stdc = yes; then
16420 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16421 cat >"conftest.$ac_ext" <<_ACEOF
16422 #line 16422 "configure"
16423 #include "confdefs.h"
16424 #include <string.h>
16427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16428 $EGREP "memchr" >/dev/null 2>&1; then
16431 ac_cv_header_stdc=no
16437 if test $ac_cv_header_stdc = yes; then
16438 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16439 cat >"conftest.$ac_ext" <<_ACEOF
16440 #line 16440 "configure"
16441 #include "confdefs.h"
16442 #include <stdlib.h>
16445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16446 $EGREP "free" >/dev/null 2>&1; then
16449 ac_cv_header_stdc=no
16455 if test $ac_cv_header_stdc = yes; then
16456 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16457 if test "$cross_compiling" = yes; then
16460 cat >"conftest.$ac_ext" <<_ACEOF
16461 #line 16461 "configure"
16462 #include "confdefs.h"
16464 #if ((' ' & 0x0FF) == 0x020)
16465 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16466 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16468 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16469 || ('j' <= (c) && (c) <= 'r') \
16470 || ('s' <= (c) && (c) <= 'z'))
16471 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16474 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16479 for (i = 0; i < 256; i++)
16480 if (XOR (islower (i), ISLOWER (i))
16481 || toupper (i) != TOUPPER (i))
16482 $ac_main_return(2);
16483 $ac_main_return (0);
16486 rm -f "conftest$ac_exeext"
16487 if { (eval echo "$as_me:16487: \"$ac_link\"") >&5
16488 (eval $ac_link) 2>&5
16490 echo "$as_me:16490: \$? = $ac_status" >&5
16491 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16492 { (eval echo "$as_me:16492: \"$ac_try\"") >&5
16493 (eval $ac_try) 2>&5
16495 echo "$as_me:16495: \$? = $ac_status" >&5
16496 (exit "$ac_status"); }; }; then
16499 echo "$as_me: program exited with status $ac_status" >&5
16500 echo "$as_me: failed program was:" >&5
16501 cat "conftest.$ac_ext" >&5
16502 ac_cv_header_stdc=no
16504 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16508 echo "$as_me:16508: result: $ac_cv_header_stdc" >&5
16509 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16510 if test $ac_cv_header_stdc = yes; then
16512 cat >>confdefs.h <<\EOF
16513 #define STDC_HEADERS 1
16518 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16520 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16521 inttypes.h stdint.h unistd.h
16523 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16524 echo "$as_me:16524: checking for $ac_header" >&5
16525 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16526 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16527 echo $ECHO_N "(cached) $ECHO_C" >&6
16529 cat >"conftest.$ac_ext" <<_ACEOF
16530 #line 16530 "configure"
16531 #include "confdefs.h"
16532 $ac_includes_default
16533 #include <$ac_header>
16535 rm -f "conftest.$ac_objext"
16536 if { (eval echo "$as_me:16536: \"$ac_compile\"") >&5
16537 (eval $ac_compile) 2>&5
16539 echo "$as_me:16539: \$? = $ac_status" >&5
16540 (exit "$ac_status"); } &&
16541 { ac_try='test -s "conftest.$ac_objext"'
16542 { (eval echo "$as_me:16542: \"$ac_try\"") >&5
16543 (eval $ac_try) 2>&5
16545 echo "$as_me:16545: \$? = $ac_status" >&5
16546 (exit "$ac_status"); }; }; then
16547 eval "$as_ac_Header=yes"
16549 echo "$as_me: failed program was:" >&5
16550 cat "conftest.$ac_ext" >&5
16551 eval "$as_ac_Header=no"
16553 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16555 echo "$as_me:16555: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16556 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16557 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16558 cat >>confdefs.h <<EOF
16559 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16565 echo "$as_me:16565: checking for signed char" >&5
16566 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16567 if test "${ac_cv_type_signed_char+set}" = set; then
16568 echo $ECHO_N "(cached) $ECHO_C" >&6
16570 cat >"conftest.$ac_ext" <<_ACEOF
16571 #line 16571 "configure"
16572 #include "confdefs.h"
16573 $ac_includes_default
16577 if ((signed char *) 0)
16579 if (sizeof (signed char))
16585 rm -f "conftest.$ac_objext"
16586 if { (eval echo "$as_me:16586: \"$ac_compile\"") >&5
16587 (eval $ac_compile) 2>&5
16589 echo "$as_me:16589: \$? = $ac_status" >&5
16590 (exit "$ac_status"); } &&
16591 { ac_try='test -s "conftest.$ac_objext"'
16592 { (eval echo "$as_me:16592: \"$ac_try\"") >&5
16593 (eval $ac_try) 2>&5
16595 echo "$as_me:16595: \$? = $ac_status" >&5
16596 (exit "$ac_status"); }; }; then
16597 ac_cv_type_signed_char=yes
16599 echo "$as_me: failed program was:" >&5
16600 cat "conftest.$ac_ext" >&5
16601 ac_cv_type_signed_char=no
16603 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16605 echo "$as_me:16605: result: $ac_cv_type_signed_char" >&5
16606 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16608 echo "$as_me:16608: checking size of signed char" >&5
16609 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16610 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16611 echo $ECHO_N "(cached) $ECHO_C" >&6
16613 if test "$ac_cv_type_signed_char" = yes; then
16614 if test "$cross_compiling" = yes; then
16615 # Depending upon the size, compute the lo and hi bounds.
16616 cat >"conftest.$ac_ext" <<_ACEOF
16617 #line 16617 "configure"
16618 #include "confdefs.h"
16619 $ac_includes_default
16623 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16628 rm -f "conftest.$ac_objext"
16629 if { (eval echo "$as_me:16629: \"$ac_compile\"") >&5
16630 (eval $ac_compile) 2>&5
16632 echo "$as_me:16632: \$? = $ac_status" >&5
16633 (exit "$ac_status"); } &&
16634 { ac_try='test -s "conftest.$ac_objext"'
16635 { (eval echo "$as_me:16635: \"$ac_try\"") >&5
16636 (eval $ac_try) 2>&5
16638 echo "$as_me:16638: \$? = $ac_status" >&5
16639 (exit "$ac_status"); }; }; then
16642 cat >"conftest.$ac_ext" <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645 $ac_includes_default
16649 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16654 rm -f "conftest.$ac_objext"
16655 if { (eval echo "$as_me:16655: \"$ac_compile\"") >&5
16656 (eval $ac_compile) 2>&5
16658 echo "$as_me:16658: \$? = $ac_status" >&5
16659 (exit "$ac_status"); } &&
16660 { ac_try='test -s "conftest.$ac_objext"'
16661 { (eval echo "$as_me:16661: \"$ac_try\"") >&5
16662 (eval $ac_try) 2>&5
16664 echo "$as_me:16664: \$? = $ac_status" >&5
16665 (exit "$ac_status"); }; }; then
16666 ac_hi=$ac_mid; break
16668 echo "$as_me: failed program was:" >&5
16669 cat "conftest.$ac_ext" >&5
16670 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16672 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16675 echo "$as_me: failed program was:" >&5
16676 cat "conftest.$ac_ext" >&5
16679 cat >"conftest.$ac_ext" <<_ACEOF
16680 #line 16680 "configure"
16681 #include "confdefs.h"
16682 $ac_includes_default
16686 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16691 rm -f "conftest.$ac_objext"
16692 if { (eval echo "$as_me:16692: \"$ac_compile\"") >&5
16693 (eval $ac_compile) 2>&5
16695 echo "$as_me:16695: \$? = $ac_status" >&5
16696 (exit "$ac_status"); } &&
16697 { ac_try='test -s "conftest.$ac_objext"'
16698 { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699 (eval $ac_try) 2>&5
16701 echo "$as_me:16701: \$? = $ac_status" >&5
16702 (exit "$ac_status"); }; }; then
16703 ac_lo=$ac_mid; break
16705 echo "$as_me: failed program was:" >&5
16706 cat "conftest.$ac_ext" >&5
16707 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16709 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16712 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16713 # Binary search between lo and hi bounds.
16714 while test "x$ac_lo" != "x$ac_hi"; do
16715 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16716 cat >"conftest.$ac_ext" <<_ACEOF
16717 #line 16717 "configure"
16718 #include "confdefs.h"
16719 $ac_includes_default
16723 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16728 rm -f "conftest.$ac_objext"
16729 if { (eval echo "$as_me:16729: \"$ac_compile\"") >&5
16730 (eval $ac_compile) 2>&5
16732 echo "$as_me:16732: \$? = $ac_status" >&5
16733 (exit "$ac_status"); } &&
16734 { ac_try='test -s "conftest.$ac_objext"'
16735 { (eval echo "$as_me:16735: \"$ac_try\"") >&5
16736 (eval $ac_try) 2>&5
16738 echo "$as_me:16738: \$? = $ac_status" >&5
16739 (exit "$ac_status"); }; }; then
16742 echo "$as_me: failed program was:" >&5
16743 cat "conftest.$ac_ext" >&5
16744 ac_lo=`expr "$ac_mid" + 1`
16746 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16748 ac_cv_sizeof_signed_char=$ac_lo
16750 if test "$cross_compiling" = yes; then
16751 { { echo "$as_me:16751: error: cannot run test program while cross compiling" >&5
16752 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16753 { (exit 1); exit 1; }; }
16755 cat >"conftest.$ac_ext" <<_ACEOF
16756 #line 16756 "configure"
16757 #include "confdefs.h"
16758 $ac_includes_default
16762 FILE *f = fopen ("conftest.val", "w");
16764 $ac_main_return (1);
16765 fprintf (f, "%ld", (long)(sizeof (signed char)));
16771 rm -f "conftest$ac_exeext"
16772 if { (eval echo "$as_me:16772: \"$ac_link\"") >&5
16773 (eval $ac_link) 2>&5
16775 echo "$as_me:16775: \$? = $ac_status" >&5
16776 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16777 { (eval echo "$as_me:16777: \"$ac_try\"") >&5
16778 (eval $ac_try) 2>&5
16780 echo "$as_me:16780: \$? = $ac_status" >&5
16781 (exit "$ac_status"); }; }; then
16782 ac_cv_sizeof_signed_char=`cat conftest.val`
16784 echo "$as_me: program exited with status $ac_status" >&5
16785 echo "$as_me: failed program was:" >&5
16786 cat "conftest.$ac_ext" >&5
16788 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16793 ac_cv_sizeof_signed_char=0
16796 echo "$as_me:16796: result: $ac_cv_sizeof_signed_char" >&5
16797 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16798 cat >>confdefs.h <<EOF
16799 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16802 echo "$as_me:16802: checking for ANSI C header files" >&5
16803 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16804 if test "${ac_cv_header_stdc+set}" = set; then
16805 echo $ECHO_N "(cached) $ECHO_C" >&6
16807 cat >"conftest.$ac_ext" <<_ACEOF
16808 #line 16808 "configure"
16809 #include "confdefs.h"
16810 #include <stdlib.h>
16811 #include <stdarg.h>
16812 #include <string.h>
16816 if { (eval echo "$as_me:16816: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16817 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16819 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16821 cat conftest.err >&5
16822 echo "$as_me:16822: \$? = $ac_status" >&5
16823 (exit "$ac_status"); } >/dev/null; then
16824 if test -s conftest.err; then
16825 ac_cpp_err=$ac_c_preproc_warn_flag
16832 if test -z "$ac_cpp_err"; then
16833 ac_cv_header_stdc=yes
16835 echo "$as_me: failed program was:" >&5
16836 cat "conftest.$ac_ext" >&5
16837 ac_cv_header_stdc=no
16839 rm -f conftest.err "conftest.$ac_ext"
16841 if test $ac_cv_header_stdc = yes; then
16842 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16843 cat >"conftest.$ac_ext" <<_ACEOF
16844 #line 16844 "configure"
16845 #include "confdefs.h"
16846 #include <string.h>
16849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16850 $EGREP "memchr" >/dev/null 2>&1; then
16853 ac_cv_header_stdc=no
16859 if test $ac_cv_header_stdc = yes; then
16860 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16861 cat >"conftest.$ac_ext" <<_ACEOF
16862 #line 16862 "configure"
16863 #include "confdefs.h"
16864 #include <stdlib.h>
16867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16868 $EGREP "free" >/dev/null 2>&1; then
16871 ac_cv_header_stdc=no
16877 if test $ac_cv_header_stdc = yes; then
16878 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16879 if test "$cross_compiling" = yes; then
16882 cat >"conftest.$ac_ext" <<_ACEOF
16883 #line 16883 "configure"
16884 #include "confdefs.h"
16886 #if ((' ' & 0x0FF) == 0x020)
16887 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16888 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16890 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16891 || ('j' <= (c) && (c) <= 'r') \
16892 || ('s' <= (c) && (c) <= 'z'))
16893 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16896 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16901 for (i = 0; i < 256; i++)
16902 if (XOR (islower (i), ISLOWER (i))
16903 || toupper (i) != TOUPPER (i))
16904 $ac_main_return(2);
16905 $ac_main_return (0);
16908 rm -f "conftest$ac_exeext"
16909 if { (eval echo "$as_me:16909: \"$ac_link\"") >&5
16910 (eval $ac_link) 2>&5
16912 echo "$as_me:16912: \$? = $ac_status" >&5
16913 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16914 { (eval echo "$as_me:16914: \"$ac_try\"") >&5
16915 (eval $ac_try) 2>&5
16917 echo "$as_me:16917: \$? = $ac_status" >&5
16918 (exit "$ac_status"); }; }; then
16921 echo "$as_me: program exited with status $ac_status" >&5
16922 echo "$as_me: failed program was:" >&5
16923 cat "conftest.$ac_ext" >&5
16924 ac_cv_header_stdc=no
16926 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16930 echo "$as_me:16930: result: $ac_cv_header_stdc" >&5
16931 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16932 if test $ac_cv_header_stdc = yes; then
16934 cat >>confdefs.h <<\EOF
16935 #define STDC_HEADERS 1
16940 ac_header_dirent=no
16941 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16942 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16943 echo "$as_me:16943: checking for $ac_hdr that defines DIR" >&5
16944 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16945 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16946 echo $ECHO_N "(cached) $ECHO_C" >&6
16948 cat >"conftest.$ac_ext" <<_ACEOF
16949 #line 16949 "configure"
16950 #include "confdefs.h"
16951 #include <sys/types.h>
16963 rm -f "conftest.$ac_objext"
16964 if { (eval echo "$as_me:16964: \"$ac_compile\"") >&5
16965 (eval $ac_compile) 2>&5
16967 echo "$as_me:16967: \$? = $ac_status" >&5
16968 (exit "$ac_status"); } &&
16969 { ac_try='test -s "conftest.$ac_objext"'
16970 { (eval echo "$as_me:16970: \"$ac_try\"") >&5
16971 (eval $ac_try) 2>&5
16973 echo "$as_me:16973: \$? = $ac_status" >&5
16974 (exit "$ac_status"); }; }; then
16975 eval "$as_ac_Header=yes"
16977 echo "$as_me: failed program was:" >&5
16978 cat "conftest.$ac_ext" >&5
16979 eval "$as_ac_Header=no"
16981 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16983 echo "$as_me:16983: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16984 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16985 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16986 cat >>confdefs.h <<EOF
16987 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16990 ac_header_dirent=$ac_hdr; break
16994 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16995 if test $ac_header_dirent = dirent.h; then
16996 echo "$as_me:16996: checking for opendir in -ldir" >&5
16997 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16998 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16999 echo $ECHO_N "(cached) $ECHO_C" >&6
17001 ac_check_lib_save_LIBS=$LIBS
17003 cat >"conftest.$ac_ext" <<_ACEOF
17004 #line 17004 "configure"
17005 #include "confdefs.h"
17007 /* Override any gcc2 internal prototype to avoid an error. */
17011 /* We use char because int might match the return type of a gcc2
17012 builtin and then its argument prototype would still apply. */
17022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17023 if { (eval echo "$as_me:17023: \"$ac_link\"") >&5
17024 (eval $ac_link) 2>&5
17026 echo "$as_me:17026: \$? = $ac_status" >&5
17027 (exit "$ac_status"); } &&
17028 { ac_try='test -s "conftest$ac_exeext"'
17029 { (eval echo "$as_me:17029: \"$ac_try\"") >&5
17030 (eval $ac_try) 2>&5
17032 echo "$as_me:17032: \$? = $ac_status" >&5
17033 (exit "$ac_status"); }; }; then
17034 ac_cv_lib_dir_opendir=yes
17036 echo "$as_me: failed program was:" >&5
17037 cat "conftest.$ac_ext" >&5
17038 ac_cv_lib_dir_opendir=no
17040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17041 LIBS=$ac_check_lib_save_LIBS
17043 echo "$as_me:17043: result: $ac_cv_lib_dir_opendir" >&5
17044 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17045 if test "$ac_cv_lib_dir_opendir" = yes; then
17050 echo "$as_me:17050: checking for opendir in -lx" >&5
17051 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17052 if test "${ac_cv_lib_x_opendir+set}" = set; then
17053 echo $ECHO_N "(cached) $ECHO_C" >&6
17055 ac_check_lib_save_LIBS=$LIBS
17057 cat >"conftest.$ac_ext" <<_ACEOF
17058 #line 17058 "configure"
17059 #include "confdefs.h"
17061 /* Override any gcc2 internal prototype to avoid an error. */
17065 /* We use char because int might match the return type of a gcc2
17066 builtin and then its argument prototype would still apply. */
17076 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17077 if { (eval echo "$as_me:17077: \"$ac_link\"") >&5
17078 (eval $ac_link) 2>&5
17080 echo "$as_me:17080: \$? = $ac_status" >&5
17081 (exit "$ac_status"); } &&
17082 { ac_try='test -s "conftest$ac_exeext"'
17083 { (eval echo "$as_me:17083: \"$ac_try\"") >&5
17084 (eval $ac_try) 2>&5
17086 echo "$as_me:17086: \$? = $ac_status" >&5
17087 (exit "$ac_status"); }; }; then
17088 ac_cv_lib_x_opendir=yes
17090 echo "$as_me: failed program was:" >&5
17091 cat "conftest.$ac_ext" >&5
17092 ac_cv_lib_x_opendir=no
17094 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17095 LIBS=$ac_check_lib_save_LIBS
17097 echo "$as_me:17097: result: $ac_cv_lib_x_opendir" >&5
17098 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17099 if test "$ac_cv_lib_x_opendir" = yes; then
17105 echo "$as_me:17105: checking whether time.h and sys/time.h may both be included" >&5
17106 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17107 if test "${ac_cv_header_time+set}" = set; then
17108 echo $ECHO_N "(cached) $ECHO_C" >&6
17110 cat >"conftest.$ac_ext" <<_ACEOF
17111 #line 17111 "configure"
17112 #include "confdefs.h"
17113 #include <sys/types.h>
17114 #include <sys/time.h>
17120 if ((struct tm *) 0)
17126 rm -f "conftest.$ac_objext"
17127 if { (eval echo "$as_me:17127: \"$ac_compile\"") >&5
17128 (eval $ac_compile) 2>&5
17130 echo "$as_me:17130: \$? = $ac_status" >&5
17131 (exit "$ac_status"); } &&
17132 { ac_try='test -s "conftest.$ac_objext"'
17133 { (eval echo "$as_me:17133: \"$ac_try\"") >&5
17134 (eval $ac_try) 2>&5
17136 echo "$as_me:17136: \$? = $ac_status" >&5
17137 (exit "$ac_status"); }; }; then
17138 ac_cv_header_time=yes
17140 echo "$as_me: failed program was:" >&5
17141 cat "conftest.$ac_ext" >&5
17142 ac_cv_header_time=no
17144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17146 echo "$as_me:17146: result: $ac_cv_header_time" >&5
17147 echo "${ECHO_T}$ac_cv_header_time" >&6
17148 if test $ac_cv_header_time = yes; then
17150 cat >>confdefs.h <<\EOF
17151 #define TIME_WITH_SYS_TIME 1
17156 ### checks for compiler characteristics
17158 ac_cpp='$CPP $CPPFLAGS'
17159 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17160 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17162 ac_main_return="return"
17164 echo "$as_me:17164: checking for an ANSI C-conforming const" >&5
17165 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17166 if test "${ac_cv_c_const+set}" = set; then
17167 echo $ECHO_N "(cached) $ECHO_C" >&6
17169 cat >"conftest.$ac_ext" <<_ACEOF
17170 #line 17170 "configure"
17171 #include "confdefs.h"
17176 /* FIXME: Include the comments suggested by Paul. */
17177 #ifndef __cplusplus
17178 /* Ultrix mips cc rejects this. */
17179 typedef int charset[2];
17181 /* SunOS 4.1.1 cc rejects this. */
17182 char const *const *ccp;
17184 /* NEC SVR4.0.2 mips cc rejects this. */
17185 struct point {int x, y;};
17186 static struct point const zero = {0,0};
17187 /* AIX XL C 1.02.0.0 rejects this.
17188 It does not let you subtract one const X* pointer from another in
17189 an arm of an if-expression whose if-part is not a constant
17191 const char *g = "string";
17192 ccp = &g + (g ? g-g : 0);
17193 /* HPUX 7.0 cc rejects these. */
17196 ccp = (char const *const *) p;
17197 { /* SCO 3.2v4 cc rejects this. */
17199 char const *s = 0 ? (char *) 0 : (char const *) 0;
17203 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17204 int x[] = {25, 17};
17205 const int *foo = &x[0];
17208 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17209 typedef const int *iptr;
17213 { /* AIX XL C 1.02.0.0 rejects this saying
17214 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17215 struct s { int j; const int *ap[3]; };
17216 struct s *b; b->j = 5;
17218 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17219 const int foo = 10;
17227 rm -f "conftest.$ac_objext"
17228 if { (eval echo "$as_me:17228: \"$ac_compile\"") >&5
17229 (eval $ac_compile) 2>&5
17231 echo "$as_me:17231: \$? = $ac_status" >&5
17232 (exit "$ac_status"); } &&
17233 { ac_try='test -s "conftest.$ac_objext"'
17234 { (eval echo "$as_me:17234: \"$ac_try\"") >&5
17235 (eval $ac_try) 2>&5
17237 echo "$as_me:17237: \$? = $ac_status" >&5
17238 (exit "$ac_status"); }; }; then
17241 echo "$as_me: failed program was:" >&5
17242 cat "conftest.$ac_ext" >&5
17245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17247 echo "$as_me:17247: result: $ac_cv_c_const" >&5
17248 echo "${ECHO_T}$ac_cv_c_const" >&6
17249 if test $ac_cv_c_const = no; then
17251 cat >>confdefs.h <<\EOF
17257 ### Checks for external-data
17259 echo "$as_me:17259: checking if data-only library module links" >&5
17260 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17261 if test "${cf_cv_link_dataonly+set}" = set; then
17262 echo $ECHO_N "(cached) $ECHO_C" >&6
17266 cat >conftest.$ac_ext <<EOF
17267 #line 17267 "configure"
17268 int testdata[3] = { 123, 456, 789 };
17270 if { (eval echo "$as_me:17270: \"$ac_compile\"") >&5
17271 (eval $ac_compile) 2>&5
17273 echo "$as_me:17273: \$? = $ac_status" >&5
17274 (exit "$ac_status"); } ; then
17275 mv conftest.o data.o && \
17276 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17278 rm -f conftest.$ac_ext data.o
17279 cat >conftest.$ac_ext <<EOF
17280 #line 17280 "configure"
17284 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17286 extern int testdata[3];
17287 return testdata[0] == 123
17288 && testdata[1] == 456
17289 && testdata[2] == 789;
17293 if { (eval echo "$as_me:17293: \"$ac_compile\"") >&5
17294 (eval $ac_compile) 2>&5
17296 echo "$as_me:17296: \$? = $ac_status" >&5
17297 (exit "$ac_status"); }; then
17298 mv conftest.o func.o && \
17299 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17301 rm -f conftest.$ac_ext func.o
17302 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17303 cf_saveLIBS="$LIBS"
17304 LIBS="conftest.a $LIBS"
17305 if test "$cross_compiling" = yes; then
17306 cf_cv_link_dataonly=unknown
17308 cat >"conftest.$ac_ext" <<_ACEOF
17309 #line 17309 "configure"
17310 #include "confdefs.h"
17314 extern int testfunc();
17315 ${cf_cv_main_return:-return} (!testfunc());
17319 rm -f "conftest$ac_exeext"
17320 if { (eval echo "$as_me:17320: \"$ac_link\"") >&5
17321 (eval $ac_link) 2>&5
17323 echo "$as_me:17323: \$? = $ac_status" >&5
17324 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17325 { (eval echo "$as_me:17325: \"$ac_try\"") >&5
17326 (eval $ac_try) 2>&5
17328 echo "$as_me:17328: \$? = $ac_status" >&5
17329 (exit "$ac_status"); }; }; then
17330 cf_cv_link_dataonly=yes
17332 echo "$as_me: program exited with status $ac_status" >&5
17333 echo "$as_me: failed program was:" >&5
17334 cat "conftest.$ac_ext" >&5
17335 cf_cv_link_dataonly=no
17337 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17339 LIBS="$cf_saveLIBS"
17343 echo "$as_me:17343: result: $cf_cv_link_dataonly" >&5
17344 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17346 if test "$cf_cv_link_dataonly" = no ; then
17348 cat >>confdefs.h <<\EOF
17349 #define BROKEN_LINKER 1
17355 ### Checks for library functions.
17361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17362 echo "$as_me:17362: checking for $ac_header" >&5
17363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17365 echo $ECHO_N "(cached) $ECHO_C" >&6
17367 cat >"conftest.$ac_ext" <<_ACEOF
17368 #line 17368 "configure"
17369 #include "confdefs.h"
17370 #include <$ac_header>
17372 if { (eval echo "$as_me:17372: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17373 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17375 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17377 cat conftest.err >&5
17378 echo "$as_me:17378: \$? = $ac_status" >&5
17379 (exit "$ac_status"); } >/dev/null; then
17380 if test -s conftest.err; then
17381 ac_cpp_err=$ac_c_preproc_warn_flag
17388 if test -z "$ac_cpp_err"; then
17389 eval "$as_ac_Header=yes"
17391 echo "$as_me: failed program was:" >&5
17392 cat "conftest.$ac_ext" >&5
17393 eval "$as_ac_Header=no"
17395 rm -f conftest.err "conftest.$ac_ext"
17397 echo "$as_me:17397: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17398 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17399 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17400 cat >>confdefs.h <<EOF
17401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17407 echo "$as_me:17407: checking for working mkstemp" >&5
17408 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17409 if test "${cf_cv_func_mkstemp+set}" = set; then
17410 echo $ECHO_N "(cached) $ECHO_C" >&6
17414 if test "$cross_compiling" = yes; then
17415 cf_cv_func_mkstemp=maybe
17417 cat >"conftest.$ac_ext" <<_ACEOF
17418 #line 17418 "configure"
17419 #include "confdefs.h"
17421 #include <sys/types.h>
17422 #ifdef HAVE_UNISTD_H
17423 #include <unistd.h>
17425 #include <stdlib.h>
17427 #include <string.h>
17428 #include <sys/stat.h>
17431 char *tmpl = "conftestXXXXXX";
17439 for (n = 0; n < 2; ++n) {
17440 strcpy(name[n], tmpl);
17441 if ((fd = mkstemp(name[n])) >= 0) {
17442 if (!strcmp(name[n], tmpl)
17443 || stat(name[n], &sb) != 0
17444 || (sb.st_mode & S_IFMT) != S_IFREG
17445 || (sb.st_mode & 077) != 0) {
17452 && !strcmp(name[0], name[1]))
17454 ${cf_cv_main_return:-return}(result);
17458 rm -f "conftest$ac_exeext"
17459 if { (eval echo "$as_me:17459: \"$ac_link\"") >&5
17460 (eval $ac_link) 2>&5
17462 echo "$as_me:17462: \$? = $ac_status" >&5
17463 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17464 { (eval echo "$as_me:17464: \"$ac_try\"") >&5
17465 (eval $ac_try) 2>&5
17467 echo "$as_me:17467: \$? = $ac_status" >&5
17468 (exit "$ac_status"); }; }; then
17469 cf_cv_func_mkstemp=yes
17472 echo "$as_me: program exited with status $ac_status" >&5
17473 echo "$as_me: failed program was:" >&5
17474 cat "conftest.$ac_ext" >&5
17475 cf_cv_func_mkstemp=no
17478 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17482 echo "$as_me:17482: result: $cf_cv_func_mkstemp" >&5
17483 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17484 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17485 echo "$as_me:17485: checking for mkstemp" >&5
17486 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17487 if test "${ac_cv_func_mkstemp+set}" = set; then
17488 echo $ECHO_N "(cached) $ECHO_C" >&6
17490 cat >"conftest.$ac_ext" <<_ACEOF
17491 #line 17491 "configure"
17492 #include "confdefs.h"
17493 #define mkstemp autoconf_temporary
17494 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17501 /* We use char because int might match the return type of a gcc2
17502 builtin and then its argument prototype would still apply. */
17503 char mkstemp (void);
17509 /* The GNU C library defines stubs for functions which it implements
17510 to always fail with ENOSYS. Some functions are actually named
17511 something starting with __ and the normal name is an alias. */
17512 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17513 #error found stub for mkstemp
17521 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17522 if { (eval echo "$as_me:17522: \"$ac_link\"") >&5
17523 (eval $ac_link) 2>&5
17525 echo "$as_me:17525: \$? = $ac_status" >&5
17526 (exit "$ac_status"); } &&
17527 { ac_try='test -s "conftest$ac_exeext"'
17528 { (eval echo "$as_me:17528: \"$ac_try\"") >&5
17529 (eval $ac_try) 2>&5
17531 echo "$as_me:17531: \$? = $ac_status" >&5
17532 (exit "$ac_status"); }; }; then
17533 ac_cv_func_mkstemp=yes
17535 echo "$as_me: failed program was:" >&5
17536 cat "conftest.$ac_ext" >&5
17537 ac_cv_func_mkstemp=no
17539 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17541 echo "$as_me:17541: result: $ac_cv_func_mkstemp" >&5
17542 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17545 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17547 cat >>confdefs.h <<\EOF
17548 #define HAVE_MKSTEMP 1
17553 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17554 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17555 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17559 if test "$cf_with_ada" != "no" ; then
17561 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17564 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17566 unset ac_cv_path_cf_TEMP_gnat
17568 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17569 set dummy $cf_prog_gnat; ac_word=$2
17570 echo "$as_me:17570: checking for $ac_word" >&5
17571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17572 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17573 echo $ECHO_N "(cached) $ECHO_C" >&6
17575 case $cf_TEMP_gnat in
17577 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17580 ac_save_IFS=$IFS; IFS=$ac_path_separator
17582 for ac_dir in $ac_dummy; do
17584 test -z "$ac_dir" && ac_dir=.
17585 if $as_executable_p "$ac_dir/$ac_word"; then
17586 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17587 echo "$as_me:17587: found $ac_dir/$ac_word" >&5
17592 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17596 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17598 if test -n "$cf_TEMP_gnat"; then
17599 echo "$as_me:17599: result: $cf_TEMP_gnat" >&5
17600 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17602 echo "$as_me:17602: result: no" >&5
17603 echo "${ECHO_T}no" >&6
17606 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17608 if test "x$cf_TEMP_gnat" != xno; then
17609 unset cf_cv_gnat_version
17612 echo "$as_me:17612: checking for $cf_prog_gnat version" >&5
17613 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17614 if test "${cf_cv_gnat_version+set}" = set; then
17615 echo $ECHO_N "(cached) $ECHO_C" >&6
17618 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17619 grep '[0-9].[0-9][0-9]*' |\
17620 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17623 echo "$as_me:17623: result: $cf_cv_gnat_version" >&5
17624 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17625 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17626 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17629 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17632 unset cf_cv_gnat_version
17633 unset ac_cv_path_cf_TEMP_gnat
17636 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17638 cf_cv_prog_gnat_correct=no
17640 cf_ada_make=gnatmake
17641 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17642 # gprconfig is newer than gnatmake; we can continue...
17645 rm -rf ./conftest* ./*~conftest*
17646 if mkdir conftest.src
17650 for cf_gprconfig in Ada C
17652 echo "$as_me:17652: checking for gprconfig name for $cf_gprconfig" >&5
17653 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17654 if test "$cf_gprconfig" = C
17656 for cf_gprconfig_param in \
17657 "$cf_gprconfig,,,,GNATGCC" \
17658 "$cf_gprconfig,,,,GCC" \
17661 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17662 test -n "$cf_gprconfig_value" && break
17665 cf_gprconfig_param=$cf_gprconfig
17666 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17668 if test -n "$cf_gprconfig_value"
17670 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17671 echo "$as_me:17671: result: $cf_gprconfig_value" >&5
17672 echo "${ECHO_T}$cf_gprconfig_value" >&6
17674 echo "$as_me:17674: result: missing" >&5
17675 echo "${ECHO_T}missing" >&6
17681 rm -rf ./conftest* ./*~conftest*
17684 if test "x$cf_ada_config" != "x#"
17687 echo "$as_me:17687: checking for gnat version" >&5
17688 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17689 if test "${cf_cv_gnat_version+set}" = set; then
17690 echo $ECHO_N "(cached) $ECHO_C" >&6
17693 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17694 grep '[0-9].[0-9][0-9]*' |\
17695 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17698 echo "$as_me:17698: result: $cf_cv_gnat_version" >&5
17699 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17700 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17702 case "$cf_cv_gnat_version" in
17703 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17704 cf_cv_prog_gnat_correct=yes
17707 { echo "$as_me:17707: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17708 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17709 cf_cv_prog_gnat_correct=no
17713 # Extract the first word of "m4", so it can be a program name with args.
17714 set dummy m4; ac_word=$2
17715 echo "$as_me:17715: checking for $ac_word" >&5
17716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17717 if test "${ac_cv_prog_M4_exists+set}" = set; then
17718 echo $ECHO_N "(cached) $ECHO_C" >&6
17720 if test -n "$M4_exists"; then
17721 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17723 ac_save_IFS=$IFS; IFS=$ac_path_separator
17725 for ac_dir in $ac_dummy; do
17727 test -z "$ac_dir" && ac_dir=.
17728 $as_executable_p "$ac_dir/$ac_word" || continue
17729 ac_cv_prog_M4_exists="yes"
17730 echo "$as_me:17730: found $ac_dir/$ac_word" >&5
17734 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17737 M4_exists=$ac_cv_prog_M4_exists
17738 if test -n "$M4_exists"; then
17739 echo "$as_me:17739: result: $M4_exists" >&5
17740 echo "${ECHO_T}$M4_exists" >&6
17742 echo "$as_me:17742: result: no" >&5
17743 echo "${ECHO_T}no" >&6
17746 if test "$ac_cv_prog_M4_exists" = no; then
17747 cf_cv_prog_gnat_correct=no
17748 { echo "$as_me:17748: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17749 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17751 if test "$cf_cv_prog_gnat_correct" = yes; then
17752 echo "$as_me:17752: checking if GNAT works" >&5
17753 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17755 rm -rf ./conftest* ./*~conftest*
17756 cat >>conftest.ads <<CF_EOF
17757 procedure conftest;
17759 cat >>conftest.adb <<CF_EOF
17762 procedure conftest is
17764 Text_IO.Put ("Hello World");
17766 GNAT.OS_Lib.OS_Exit (0);
17769 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17770 if ( ./conftest 1>&5 2>&1 ) ; then
17771 cf_cv_prog_gnat_correct=yes
17773 cf_cv_prog_gnat_correct=no
17776 cf_cv_prog_gnat_correct=no
17778 rm -rf ./conftest* ./*~conftest*
17780 echo "$as_me:17780: result: $cf_cv_prog_gnat_correct" >&5
17781 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17784 cf_cv_prog_gnat_correct=no
17788 if test "$cf_cv_prog_gnat_correct" = yes; then
17790 echo "$as_me:17790: checking optimization options for ADAFLAGS" >&5
17791 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17795 ADAFLAGS="$ADAFLAGS -g"
17801 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17803 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17807 echo "$as_me:17807: result: $ADAFLAGS" >&5
17808 echo "${ECHO_T}$ADAFLAGS" >&6
17810 echo "$as_me:17810: checking if GNATPREP supports -T option" >&5
17811 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17812 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17813 echo $ECHO_N "(cached) $ECHO_C" >&6
17816 cf_cv_gnatprep_opt_t=no
17817 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17820 echo "$as_me:17820: result: $cf_cv_gnatprep_opt_t" >&5
17821 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17822 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17824 echo "$as_me:17824: checking if GNAT supports generics" >&5
17825 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17826 case "$cf_cv_gnat_version" in
17827 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17828 cf_gnat_generics=yes
17831 cf_gnat_generics=no
17834 echo "$as_me:17834: result: $cf_gnat_generics" >&5
17835 echo "${ECHO_T}$cf_gnat_generics" >&6
17837 if test "$cf_gnat_generics" = yes
17839 cf_compile_generics=generics
17840 cf_generic_objects="\${GENOBJS}"
17842 cf_compile_generics=
17843 cf_generic_objects=
17846 echo "$as_me:17846: checking if GNAT supports SIGINT" >&5
17847 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17848 if test "${cf_cv_gnat_sigint+set}" = set; then
17849 echo $ECHO_N "(cached) $ECHO_C" >&6
17852 rm -rf ./conftest* ./*~conftest*
17853 cat >>conftest.ads <<CF_EOF
17854 with Ada.Interrupts.Names;
17856 package ConfTest is
17858 pragma Warnings (Off); -- the next pragma exists since 3.11p
17859 pragma Unreserve_All_Interrupts;
17860 pragma Warnings (On);
17862 protected Process is
17864 function Continue return Boolean;
17865 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17867 Done : Boolean := False;
17872 cat >>conftest.adb <<CF_EOF
17873 package body ConfTest is
17874 protected body Process is
17879 function Continue return Boolean is
17886 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17887 cf_cv_gnat_sigint=yes
17889 cf_cv_gnat_sigint=no
17891 rm -rf ./conftest* ./*~conftest*
17894 echo "$as_me:17894: result: $cf_cv_gnat_sigint" >&5
17895 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17897 if test "$cf_cv_gnat_sigint" = yes ; then
17900 USE_GNAT_SIGINT="#"
17903 cf_gnat_libraries=no
17904 cf_gnat_projects=no
17906 if test "$enable_gnat_projects" != no ; then
17907 echo "$as_me:17907: checking if GNAT supports project files" >&5
17908 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17909 case "$cf_cv_gnat_version" in
17913 case "$cf_cv_system_name" in
17917 rm -rf ./conftest* ./*~conftest*
17918 if mkdir conftest.src conftest.bin conftest.lib
17921 rm -rf ./conftest* ./*~conftest*
17922 cat >>library.gpr <<CF_EOF
17924 Kind := External ("LIB_KIND");
17925 for Library_Name use "ConfTest";
17926 for Object_Dir use ".";
17927 for Library_ALI_Dir use External("LIBRARY_DIR");
17928 for Library_Version use External ("SONAME");
17929 for Library_Kind use Kind;
17930 for Library_Dir use External("BUILD_DIR");
17931 Source_Dir := External ("SOURCE_DIR");
17932 for Source_Dirs use (Source_Dir);
17935 cat >>confpackage.ads <<CF_EOF
17936 package ConfPackage is
17937 procedure conftest;
17940 cat >>confpackage.adb <<CF_EOF
17942 package body ConfPackage is
17943 procedure conftest is
17945 Text_IO.Put ("Hello World");
17950 if ( "$cf_ada_make" $ADAFLAGS \
17952 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17953 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17954 -XSOURCE_DIR="`pwd`" \
17955 -XSONAME=libConfTest.so.1 \
17956 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17957 cf_gnat_projects=yes
17961 if test -f conftest.lib/confpackage.ali
17963 cf_gnat_libraries=yes
17965 rm -rf ./conftest* ./*~conftest*
17970 echo "$as_me:17970: result: $cf_gnat_projects" >&5
17971 echo "${ECHO_T}$cf_gnat_projects" >&6
17972 fi # enable_gnat_projects
17974 if test "$cf_gnat_projects" = yes
17976 echo "$as_me:17976: checking if GNAT supports libraries" >&5
17977 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17978 echo "$as_me:17978: result: $cf_gnat_libraries" >&5
17979 echo "${ECHO_T}$cf_gnat_libraries" >&6
17982 USE_OLD_MAKERULES=""
17983 USE_GNAT_PROJECTS="#"
17984 USE_GNAT_MAKE_GPR="#"
17985 USE_GNAT_GPRBUILD="#"
17987 if test "$cf_gnat_projects" = yes
17989 USE_OLD_MAKERULES="#"
17990 USE_GNAT_PROJECTS=""
17991 if test "$cf_cv_VERSION_GPRBUILD" != no
17993 USE_GNAT_GPRBUILD=""
17994 elif test "$cf_cv_VERSION_GNATMAKE" != no
17996 USE_GNAT_MAKE_GPR=""
17998 { echo "$as_me:17998: WARNING: use old makefile rules since tools are missing" >&5
17999 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18003 if test "$cf_gnat_libraries" = yes
18005 USE_GNAT_LIBRARIES=""
18007 USE_GNAT_LIBRARIES="#"
18010 echo "$as_me:18010: checking for ada-compiler" >&5
18011 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18013 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18014 if test "${with_ada_compiler+set}" = set; then
18015 withval="$with_ada_compiler"
18016 cf_ada_compiler=$withval
18018 cf_ada_compiler=gnatmake
18021 echo "$as_me:18021: result: $cf_ada_compiler" >&5
18022 echo "${ECHO_T}$cf_ada_compiler" >&6
18024 cf_ada_package=terminal_interface
18026 echo "$as_me:18026: checking for ada-include" >&5
18027 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18029 # Check whether --with-ada-include or --without-ada-include was given.
18030 if test "${with_ada_include+set}" = set; then
18031 withval="$with_ada_include"
18034 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18035 fi; if test -n "$prefix/share/ada/adainclude" ; then
18037 if test "x$prefix" != xNONE; then
18038 cf_path_syntax="$prefix"
18040 cf_path_syntax="$ac_default_prefix"
18043 case ".$withval" in
18044 (.\$\(*\)*|.\'*\'*)
18048 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18050 (.\$\{*prefix\}*|.\$\{*dir\}*)
18051 eval withval="$withval"
18052 case ".$withval" in
18054 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18059 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18062 { { echo "$as_me:18062: error: expected a pathname, not \"$withval\"" >&5
18063 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18064 { (exit 1); exit 1; }; }
18069 eval ADA_INCLUDE="$withval"
18071 echo "$as_me:18071: result: $ADA_INCLUDE" >&5
18072 echo "${ECHO_T}$ADA_INCLUDE" >&6
18074 echo "$as_me:18074: checking for ada-objects" >&5
18075 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18077 # Check whether --with-ada-objects or --without-ada-objects was given.
18078 if test "${with_ada_objects+set}" = set; then
18079 withval="$with_ada_objects"
18082 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18083 fi; if test -n "$prefix/lib/ada/adalib" ; then
18085 if test "x$prefix" != xNONE; then
18086 cf_path_syntax="$prefix"
18088 cf_path_syntax="$ac_default_prefix"
18091 case ".$withval" in
18092 (.\$\(*\)*|.\'*\'*)
18096 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18098 (.\$\{*prefix\}*|.\$\{*dir\}*)
18099 eval withval="$withval"
18100 case ".$withval" in
18102 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18107 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18110 { { echo "$as_me:18110: error: expected a pathname, not \"$withval\"" >&5
18111 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18112 { (exit 1); exit 1; }; }
18117 eval ADA_OBJECTS="$withval"
18119 echo "$as_me:18119: result: $ADA_OBJECTS" >&5
18120 echo "${ECHO_T}$ADA_OBJECTS" >&6
18122 echo "$as_me:18122: checking if an Ada95 shared-library should be built" >&5
18123 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18125 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18126 if test "${with_ada_sharedlib+set}" = set; then
18127 withval="$with_ada_sharedlib"
18128 with_ada_sharedlib=$withval
18130 with_ada_sharedlib=no
18132 echo "$as_me:18132: result: $with_ada_sharedlib" >&5
18133 echo "${ECHO_T}$with_ada_sharedlib" >&6
18135 if test "x$with_ada_sharedlib" != xno
18137 if test "x$cf_gnat_projects" != xyes
18139 { echo "$as_me:18139: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18140 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18141 with_ada_sharedlib=no
18145 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18146 MAKE_ADA_SHAREDLIB="#"
18148 if test "x$with_ada_sharedlib" != xno
18150 MAKE_ADA_SHAREDLIB=
18151 if test "x$with_ada_sharedlib" != xyes
18153 ADA_SHAREDLIB="$with_ada_sharedlib"
18157 # allow the Ada binding to be renamed
18159 echo "$as_me:18159: checking for ada-libname" >&5
18160 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18162 # Check whether --with-ada-libname or --without-ada-libname was given.
18163 if test "${with_ada_libname+set}" = set; then
18164 withval="$with_ada_libname"
18165 ADA_LIBNAME=$withval
18167 ADA_LIBNAME=AdaCurses
18169 case "x$ADA_LIBNAME" in
18171 ADA_LIBNAME=AdaCurses
18175 echo "$as_me:18175: result: $ADA_LIBNAME" >&5
18176 echo "${ECHO_T}$ADA_LIBNAME" >&6
18179 { { echo "$as_me:18179: error: No usable Ada compiler found" >&5
18180 echo "$as_me: error: No usable Ada compiler found" >&2;}
18181 { (exit 1); exit 1; }; }
18184 { { echo "$as_me:18184: error: The Ada compiler is needed for this package" >&5
18185 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18186 { (exit 1); exit 1; }; }
18189 ################################################################################
18196 ### Construct the list of include-directories to be generated
18198 if test "$srcdir" != "."; then
18199 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18201 CPPFLAGS="-I../include $CPPFLAGS"
18202 if test "$srcdir" != "."; then
18203 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18205 CPPFLAGS="-I. $CPPFLAGS"
18207 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18208 if test "$srcdir" != "."; then
18209 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18211 if test "$GCC" != yes; then
18212 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18213 elif test "$includedir" != "/usr/include"; then
18214 if test "$includedir" = '${prefix}/include' ; then
18215 if test x$prefix != x/usr ; then
18216 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18219 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18223 ### Build up pieces for makefile rules
18224 echo "$as_me:18224: checking default library suffix" >&5
18225 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18227 case $DFT_LWR_MODEL in
18228 (libtool) DFT_ARG_SUFFIX='' ;;
18229 (normal) DFT_ARG_SUFFIX='' ;;
18230 (debug) DFT_ARG_SUFFIX='_g' ;;
18231 (profile) DFT_ARG_SUFFIX='_p' ;;
18232 (shared) DFT_ARG_SUFFIX='' ;;
18234 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18235 echo "$as_me:18235: result: $DFT_ARG_SUFFIX" >&5
18236 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18238 echo "$as_me:18238: checking default library-dependency suffix" >&5
18239 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18241 case X$DFT_LWR_MODEL in
18243 DFT_LIB_SUFFIX='.la'
18244 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18247 case "$cf_cv_system_name" in
18249 DFT_LIB_SUFFIX='_g.lib'
18252 DFT_LIB_SUFFIX='_g.a'
18255 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18258 case "$cf_cv_system_name" in
18260 DFT_LIB_SUFFIX='_p.lib'
18263 DFT_LIB_SUFFIX='_p.a'
18266 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18269 case "$cf_cv_system_name" in
18271 DFT_LIB_SUFFIX='.so'
18272 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18275 DFT_LIB_SUFFIX='.dll'
18276 DFT_DEP_SUFFIX='.dll.lib'
18278 (cygwin*|msys*|mingw*)
18279 DFT_LIB_SUFFIX='.dll'
18280 DFT_DEP_SUFFIX='.dll.a'
18283 DFT_LIB_SUFFIX='.dylib'
18284 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18289 DFT_LIB_SUFFIX='.so'
18290 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18293 DFT_LIB_SUFFIX='.sl'
18294 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18299 DFT_LIB_SUFFIX='.so'
18300 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18307 DFT_LIB_SUFFIX='.lib'
18310 DFT_LIB_SUFFIX='.a'
18313 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18316 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18318 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18319 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18321 echo "$as_me:18321: result: $DFT_DEP_SUFFIX" >&5
18322 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18324 echo "$as_me:18324: checking default object directory" >&5
18325 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18327 case $DFT_LWR_MODEL in
18328 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18329 (normal) DFT_OBJ_SUBDIR='objects' ;;
18330 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18331 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18333 case "$cf_cv_system_name" in
18335 DFT_OBJ_SUBDIR='objects' ;;
18337 DFT_OBJ_SUBDIR='obj_s' ;;
18340 echo "$as_me:18340: result: $DFT_OBJ_SUBDIR" >&5
18341 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18343 ### Set up low-level terminfo dependencies for makefiles.
18345 if test "$DFT_LWR_MODEL" = shared ; then
18346 case $cf_cv_system_name in
18348 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18351 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18356 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18358 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18360 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18362 ### Construct the list of subdirectories for which we'll customize makefiles
18363 ### with the appropriate compile-rules.
18365 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18367 cat >>confdefs.h <<EOF
18368 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18371 ################################################################################
18377 NCURSES_SHLIB2="sh -c"
18379 ADA_SUBDIRS="include gen src doc"
18380 if test "x$cf_with_tests" != "xno" ; then
18381 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18383 for cf_dir in $ADA_SUBDIRS
18385 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18392 # match layout used by make-tar.sh
18393 ADAHTML_DIR=../doc/ada
18395 if test "x$cross_compiling" = xyes ; then
18396 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18398 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18401 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"
18402 ac_config_commands="$ac_config_commands default"
18403 cat >confcache <<\_ACEOF
18404 # This file is a shell script that caches the results of configure
18405 # tests run on this system so they can be shared between configure
18406 # scripts and configure runs, see configure's option --config-cache.
18407 # It is not useful on other systems. If it contains results you don't
18408 # want to keep, you may remove or edit it.
18410 # config.status only pays attention to the cache file if you give it
18411 # the --recheck option to rerun configure.
18413 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18414 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18415 # following values.
18419 # The following way of writing the cache mishandles newlines in values,
18420 # but we know of no workaround that is simple, portable, and efficient.
18421 # So, don't put newlines in cache variables' values.
18422 # Ultrix sh set writes to stderr and can't be redirected directly,
18423 # and sets the high bit in the cache file unless we assign to the vars.
18426 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18428 # `set' does not quote correctly, so add quotes (double-quote
18429 # substitution turns \\\\ into \\, and sed turns \\ into \).
18432 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18435 # `set' quotes correctly as required by POSIX, so do not add quotes.
18437 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18444 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18446 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18448 if cmp -s $cache_file confcache; then :; else
18449 if test -w $cache_file; then
18450 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18451 cat confcache >$cache_file
18453 echo "not updating unwritable cache $cache_file"
18458 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18459 # Let make expand exec_prefix.
18460 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18462 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18463 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18464 # trailing colons and then remove the whole line if VPATH becomes empty
18465 # (actually we leave an empty line to preserve line numbers).
18466 if test "x$srcdir" = x.; then
18467 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18468 s/:*\$(srcdir):*/:/;
18469 s/:*\${srcdir}:*/:/;
18471 s/^\([^=]*=[ ]*\):*/\1/;
18477 DEFS=-DHAVE_CONFIG_H
18479 : "${CONFIG_STATUS=./config.status}"
18480 ac_clean_files_save=$ac_clean_files
18481 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18482 { echo "$as_me:18482: creating $CONFIG_STATUS" >&5
18483 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18484 cat >"$CONFIG_STATUS" <<_ACEOF
18486 # Generated automatically by configure.
18487 # Run this file to recreate the current configuration.
18488 # Compiler output produced by configure, useful for debugging
18489 # configure, is in config.log if it exists.
18491 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18494 SHELL=\${CONFIG_SHELL-$SHELL}
18495 ac_cs_invocation="\$0 \$@"
18497 CLICOLOR_FORCE= GREP_OPTIONS=
18498 unset CLICOLOR_FORCE GREP_OPTIONS
18501 cat >>"$CONFIG_STATUS" <<\_ACEOF
18502 # Be Bourne compatible
18503 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18506 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18510 # Name of the executable.
18511 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18513 if expr a : '\(a\)' >/dev/null 2>&1; then
18519 rm -f conf$$ conf$$.exe conf$$.file
18521 if ln -s conf$$.file conf$$ 2>/dev/null; then
18522 # We could just check for DJGPP; but this test a) works b) is more generic
18523 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18524 if test -f conf$$.exe; then
18525 # Don't use ln at all; we don't have any links
18530 elif ln conf$$.file conf$$ 2>/dev/null; then
18535 rm -f conf$$ conf$$.exe conf$$.file
18537 as_executable_p="test -f"
18539 # Support unset when possible.
18540 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18547 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18548 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18549 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18550 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18551 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18552 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18553 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18554 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18557 # We need space, tab and new line, in precisely that order.
18563 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18569 # Files that config.status was made for.
18570 if test -n "$ac_config_files"; then
18571 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18574 if test -n "$ac_config_headers"; then
18575 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18578 if test -n "$ac_config_links"; then
18579 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18582 if test -n "$ac_config_commands"; then
18583 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18586 cat >>"$CONFIG_STATUS" <<\EOF
18589 \`$as_me' instantiates files from templates according to the
18590 current configuration.
18592 Usage: $0 [OPTIONS] [FILE]...
18594 -h, --help print this help, then exit
18595 -V, --version print version number, then exit
18596 -d, --debug don't remove temporary files
18597 --recheck update $as_me by reconfiguring in the same conditions
18598 --file=FILE[:TEMPLATE]
18599 instantiate the configuration file FILE
18600 --header=FILE[:TEMPLATE]
18601 instantiate the configuration header FILE
18603 Configuration files:
18606 Configuration headers:
18609 Configuration commands:
18612 Report bugs to <dickey@invisible-island.net>."
18615 cat >>"$CONFIG_STATUS" <<EOF
18618 configured by $0, generated by GNU Autoconf 2.52.20221202,
18619 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18621 Copyright 2003-2021,2022 Thomas E. Dickey
18622 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18623 Free Software Foundation, Inc.
18624 This config.status script is free software; the Free Software Foundation
18625 gives unlimited permission to copy, distribute and modify it."
18630 cat >>"$CONFIG_STATUS" <<\EOF
18631 # If no file are specified by the user, then we need to provide default
18632 # value. By we need to know if files were specified by the user.
18638 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18639 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18641 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18645 *) # This is not an option, so the user has probably given explicit
18647 ac_need_defaults=false;;
18651 # Handling of the options.
18653 cat >>"$CONFIG_STATUS" <<EOF
18654 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18655 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18656 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18658 cat >>"$CONFIG_STATUS" <<\EOF
18659 --version | --vers* | -V )
18660 echo "$ac_cs_version"; exit 0 ;;
18662 # Conflict between --help and --header
18663 { { echo "$as_me:18663: error: ambiguous option: $1
18664 Try \`$0 --help' for more information." >&5
18665 echo "$as_me: error: ambiguous option: $1
18666 Try \`$0 --help' for more information." >&2;}
18667 { (exit 1); exit 1; }; };;
18668 --help | --hel | -h )
18669 echo "$ac_cs_usage"; exit 0 ;;
18670 --debug | --d* | -d )
18672 --file | --fil | --fi | --f )
18674 CONFIG_FILES="$CONFIG_FILES $1"
18675 ac_need_defaults=false;;
18676 --header | --heade | --head | --hea )
18678 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18679 ac_need_defaults=false;;
18681 # This is an error.
18682 -*) { { echo "$as_me:18682: error: unrecognized option: $1
18683 Try \`$0 --help' for more information." >&5
18684 echo "$as_me: error: unrecognized option: $1
18685 Try \`$0 --help' for more information." >&2;}
18686 { (exit 1); exit 1; }; } ;;
18688 *) ac_config_targets="$ac_config_targets $1" ;;
18697 ## ----------------------- ##
18698 ## Running config.status. ##
18699 ## ----------------------- ##
18701 This file was extended by $as_me 2.52.20221202, executed with
18702 CONFIG_FILES = $CONFIG_FILES
18703 CONFIG_HEADERS = $CONFIG_HEADERS
18704 CONFIG_LINKS = $CONFIG_LINKS
18705 CONFIG_COMMANDS = $CONFIG_COMMANDS
18706 > "$ac_cs_invocation"
18707 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18712 cat >>"$CONFIG_STATUS" <<EOF
18714 # INIT-COMMANDS section.
18717 ### Special initialization commands, used to pass information from the
18718 ### configuration-run into config.status
18721 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18722 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18723 LIB_NAME="$LIB_NAME"
18724 LIB_PREFIX="$LIB_PREFIX"
18725 LIB_SUFFIX="$LIB_SUFFIX"
18727 NCURSES_MAJOR="$NCURSES_MAJOR"
18728 NCURSES_MINOR="$NCURSES_MINOR"
18729 NCURSES_PATCH="$NCURSES_PATCH"
18731 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18732 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18733 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18734 cf_cv_abi_version="$cf_cv_abi_version"
18735 cf_cv_rel_version="$cf_cv_rel_version"
18736 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18737 cf_cv_shared_soname='$cf_cv_shared_soname'
18738 cf_cv_shlib_version="$cf_cv_shlib_version"
18739 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18740 cf_cv_system_name="$cf_cv_system_name"
18746 cat >>"$CONFIG_STATUS" <<\EOF
18747 for ac_config_target in $ac_config_targets
18749 case "$ac_config_target" in
18750 # Handling of arguments.
18751 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18752 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18753 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18754 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18755 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18756 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18757 *) { { echo "$as_me:18757: error: invalid argument: $ac_config_target" >&5
18758 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18759 { (exit 1); exit 1; }; };;
18763 # If the user did not use the arguments to specify the items to instantiate,
18764 # then the envvar interface is used. Set only those that are not.
18765 # We use the long form for the default assignment because of an extremely
18766 # bizarre bug on SunOS 4.1.3.
18767 if "$ac_need_defaults"; then
18768 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18769 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18770 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18773 # Create a temporary directory, and hook for its removal unless debugging.
18776 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18777 trap '{ (exit 1); exit 1; }' 1 2 13 15
18780 # Create a (secure) tmp directory for tmp files.
18783 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18784 test -n "$tmp" && test -d "$tmp"
18787 tmp=$TMPDIR/cs$$-$RANDOM
18788 (umask 077 && mkdir "$tmp")
18791 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18792 { (exit 1); exit 1; }
18797 cat >>"$CONFIG_STATUS" <<EOF
18800 # CONFIG_FILES section.
18803 # No need to generate the scripts if there are no CONFIG_FILES.
18804 # This happens for instance when ./config.status config.h
18805 if test -n "\$CONFIG_FILES"; then
18806 # Protect against being on the right side of a sed subst in config.status.
18807 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18808 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18809 s,@SHELL@,$SHELL,;t t
18810 s,@exec_prefix@,$exec_prefix,;t t
18811 s,@prefix@,$prefix,;t t
18812 s,@program_transform_name@,$program_transform_name,;t t
18813 s,@bindir@,$bindir,;t t
18814 s,@sbindir@,$sbindir,;t t
18815 s,@libexecdir@,$libexecdir,;t t
18816 s,@datarootdir@,$datarootdir,;t t
18817 s,@datadir@,$datadir,;t t
18818 s,@sysconfdir@,$sysconfdir,;t t
18819 s,@sharedstatedir@,$sharedstatedir,;t t
18820 s,@localstatedir@,$localstatedir,;t t
18821 s,@runstatedir@,$runstatedir,;t t
18822 s,@libdir@,$libdir,;t t
18823 s,@includedir@,$includedir,;t t
18824 s,@oldincludedir@,$oldincludedir,;t t
18825 s,@infodir@,$infodir,;t t
18826 s,@mandir@,$mandir,;t t
18827 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18828 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18829 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18830 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18831 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18832 s,@build_alias@,$build_alias,;t t
18833 s,@host_alias@,$host_alias,;t t
18834 s,@target_alias@,$target_alias,;t t
18835 s,@ECHO_C@,$ECHO_C,;t t
18836 s,@ECHO_N@,$ECHO_N,;t t
18837 s,@ECHO_T@,$ECHO_T,;t t
18838 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18839 s,@DEFS@,$DEFS,;t t
18840 s,@LIBS@,$LIBS,;t t
18841 s,@PACKAGE@,$PACKAGE,;t t
18842 s,@top_builddir@,$top_builddir,;t t
18843 s,@build@,$build,;t t
18844 s,@build_cpu@,$build_cpu,;t t
18845 s,@build_vendor@,$build_vendor,;t t
18846 s,@build_os@,$build_os,;t t
18847 s,@host@,$host,;t t
18848 s,@host_cpu@,$host_cpu,;t t
18849 s,@host_vendor@,$host_vendor,;t t
18850 s,@host_os@,$host_os,;t t
18851 s,@target@,$target,;t t
18852 s,@target_cpu@,$target_cpu,;t t
18853 s,@target_vendor@,$target_vendor,;t t
18854 s,@target_os@,$target_os,;t t
18855 s,@GREP@,$GREP,;t t
18856 s,@FGREP@,$FGREP,;t t
18858 s,@CFLAGS@,$CFLAGS,;t t
18859 s,@LDFLAGS@,$LDFLAGS,;t t
18860 s,@CPPFLAGS@,$CPPFLAGS,;t t
18861 s,@ac_ct_CC@,$ac_ct_CC,;t t
18862 s,@EXEEXT@,$EXEEXT,;t t
18863 s,@OBJEXT@,$OBJEXT,;t t
18864 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18866 s,@EGREP@,$EGREP,;t t
18868 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18869 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18870 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18871 s,@LN_S@,$LN_S,;t t
18872 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18873 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18874 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18875 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18876 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18877 s,@SET_MAKE@,$SET_MAKE,;t t
18878 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18879 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18880 s,@CTAGS@,$CTAGS,;t t
18881 s,@ETAGS@,$ETAGS,;t t
18882 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18883 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18884 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18885 s,@RANLIB@,$RANLIB,;t t
18886 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18888 s,@ac_ct_LD@,$ac_ct_LD,;t t
18890 s,@ac_ct_AR@,$ac_ct_AR,;t t
18891 s,@ARFLAGS@,$ARFLAGS,;t t
18892 s,@DESTDIR@,$DESTDIR,;t t
18893 s,@BUILD_CC@,$BUILD_CC,;t t
18894 s,@BUILD_CPP@,$BUILD_CPP,;t t
18895 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18896 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18897 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18898 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18899 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18900 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18901 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18902 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18903 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18904 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18905 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18906 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18907 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18908 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18909 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18910 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18911 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18912 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18913 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18914 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18915 s,@CC_G_OPT@,$CC_G_OPT,;t t
18916 s,@LD_MODEL@,$LD_MODEL,;t t
18917 s,@shlibdir@,$shlibdir,;t t
18918 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18919 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18920 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18921 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18922 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18923 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18924 s,@LINK_PROGS@,$LINK_PROGS,;t t
18925 s,@LINK_TESTS@,$LINK_TESTS,;t t
18926 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18927 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18928 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18929 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18930 s,@RPATH_LIST@,$RPATH_LIST,;t t
18931 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18932 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18933 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18934 s,@PTHREAD@,$PTHREAD,;t t
18935 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18936 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18937 s,@ECHO_LT@,$ECHO_LT,;t t
18938 s,@ECHO_LD@,$ECHO_LD,;t t
18939 s,@RULE_CC@,$RULE_CC,;t t
18940 s,@SHOW_CC@,$SHOW_CC,;t t
18941 s,@ECHO_CC@,$ECHO_CC,;t t
18942 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18943 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18944 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18945 s,@ADAFLAGS@,$ADAFLAGS,;t t
18946 s,@ADA_TRACE@,$ADA_TRACE,;t t
18947 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18948 s,@M4_exists@,$M4_exists,;t t
18949 s,@cf_ada_make@,$cf_ada_make,;t t
18950 s,@cf_ada_config@,$cf_ada_config,;t t
18951 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18952 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18953 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18954 s,@cf_compile_generics@,$cf_compile_generics,;t t
18955 s,@cf_generic_objects@,$cf_generic_objects,;t t
18956 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18957 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18958 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18959 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18960 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18961 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18962 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18963 s,@cf_ada_package@,$cf_ada_package,;t t
18964 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18965 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18966 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18967 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18968 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18969 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18970 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18971 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18972 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18973 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18974 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18975 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18976 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18977 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18978 s,@TEST_ARG2@,$TEST_ARG2,;t t
18979 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18980 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18981 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18982 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18983 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18984 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18985 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18990 cat >>"$CONFIG_STATUS" <<\EOF
18991 # Split the substitutions into bite-sized pieces for seds with
18992 # small command number limits, like on Digital OSF/1 and HP-UX.
18993 ac_max_sed_lines=48
18994 ac_sed_frag=1 # Number of current file.
18995 ac_beg=1 # First line for current file.
18996 ac_end=$ac_max_sed_lines # Line after last line for current file.
18999 while "$ac_more_lines"; do
19000 if test "$ac_beg" -gt 1; then
19001 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19003 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19005 if test ! -s "$tmp"/subs.frag; then
19006 ac_more_lines=false
19008 # The purpose of the label and of the branching condition is to
19009 # speed up the sed processing (if there are no `@' at all, there
19010 # is no need to browse any of the substitutions).
19011 # These are the two extra sed commands mentioned above.
19013 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19014 # It is possible to make a multiline substitution using escaped newlines.
19015 # Ensure that we do not split the substitution between script fragments.
19017 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19018 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19019 if test -s "$tmp"/subs.next; then
19020 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19021 if test ! -s "$tmp"/subs.edit; then
19022 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19023 if test ! -s "$tmp"/subs.edit; then
19024 if test "$ac_beg" -gt 1; then
19025 ac_end=`expr "$ac_end" - 1`
19032 if test -z "$ac_sed_cmds"; then
19033 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19035 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19037 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19039 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19042 if test -z "$ac_sed_cmds"; then
19045 fi # test -n "$CONFIG_FILES"
19048 cat >>"$CONFIG_STATUS" <<\EOF
19049 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19050 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19052 - | *:- | *:-:* ) # input from stdin
19054 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19055 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19056 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19057 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19058 * ) ac_file_in=$ac_file.in ;;
19061 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19062 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19063 X"$ac_file" : 'X\(//\)[^/]' \| \
19064 X"$ac_file" : 'X\(//\)$' \| \
19065 X"$ac_file" : 'X\(/\)' \| \
19066 . : '\(.\)' 2>/dev/null ||
19068 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19069 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19070 /^X\(\/\/\)$/{ s//\1/; q; }
19071 /^X\(\/\).*/{ s//\1/; q; }
19073 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19074 { case "$ac_dir" in
19075 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19079 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19080 case $as_mkdir_dir in
19081 # Skip DOS drivespec
19082 ?:) as_incr_dir=$as_mkdir_dir ;;
19084 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19085 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19090 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19091 # A "../" for each directory in $ac_dir_suffix.
19092 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19094 ac_dir_suffix= ac_dots=
19099 if test -z "$ac_dots"; then
19102 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19104 [\\/]* | ?:[\\/]* )
19105 ac_srcdir="$srcdir$ac_dir_suffix";
19106 ac_top_srcdir="$srcdir" ;;
19107 *) # Relative path.
19108 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19109 ac_top_srcdir="$ac_dots$srcdir" ;;
19113 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19114 *) ac_INSTALL=$ac_dots$INSTALL ;;
19117 if test x"$ac_file" != x-; then
19118 { echo "$as_me:19118: creating $ac_file" >&5
19119 echo "$as_me: creating $ac_file" >&6;}
19122 # Let's still pretend it is `configure' which instantiates (i.e., don't
19123 # use $as_me), people would be surprised to read:
19124 # /* config.h. Generated automatically by config.status. */
19125 configure_input="Generated automatically from `echo $ac_file_in |
19126 sed 's,.*/,,'` by configure."
19128 # First look for the input files in the build tree, otherwise in the
19130 ac_file_inputs=`IFS=:
19131 for f in $ac_file_in; do
19133 -) echo "$tmp"/stdin ;;
19135 # Absolute (can't be DOS-style, as IFS=:)
19136 test -f "$f" || { { echo "$as_me:19136: error: cannot find input file: $f" >&5
19137 echo "$as_me: error: cannot find input file: $f" >&2;}
19138 { (exit 1); exit 1; }; }
19141 if test -f "$f"; then
19144 elif test -f "$srcdir/$f"; then
19149 { { echo "$as_me:19149: error: cannot find input file: $f" >&5
19150 echo "$as_me: error: cannot find input file: $f" >&2;}
19151 { (exit 1); exit 1; }; }
19154 done` || { (exit 1); exit 1; }
19156 cat >>"$CONFIG_STATUS" <<\EOF
19157 ac_warn_datarootdir=no
19158 if test x"$ac_file" != x-; then
19159 for ac_item in $ac_file_inputs
19161 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19162 if test -n "$ac_seen"; then
19163 ac_used=`grep '@datarootdir@' "$ac_item"`
19164 if test -z "$ac_used"; then
19165 { echo "$as_me:19165: WARNING: datarootdir was used implicitly but not set:
19167 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19169 ac_warn_datarootdir=yes
19172 ac_seen=`grep '${datarootdir}' "$ac_item"`
19173 if test -n "$ac_seen"; then
19174 { echo "$as_me:19174: WARNING: datarootdir was used explicitly but not set:
19176 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19178 ac_warn_datarootdir=yes
19183 if test "x$ac_warn_datarootdir" = xyes; then
19184 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19188 cat >>"$CONFIG_STATUS" <<EOF
19192 cat >>"$CONFIG_STATUS" <<\EOF
19194 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19195 s,@configure_input@,$configure_input,;t t
19196 s,@srcdir@,$ac_srcdir,;t t
19197 s,@top_srcdir@,$ac_top_srcdir,;t t
19198 s,@INSTALL@,$ac_INSTALL,;t t
19199 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19202 : "${FGREP:=grep -F}"
19203 : "${EGREP:=grep -E}"
19204 cat >>"$CONFIG_STATUS" <<EOF
19205 : "\${FGREP:=$FGREP}"
19206 : "\${EGREP:=$EGREP}"
19208 cat >>"$CONFIG_STATUS" <<\EOF
19209 if test x"$ac_file" != x-; then
19210 cp "$tmp/out" "$ac_file"
19212 for ac_name in prefix exec_prefix datarootdir
19214 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19215 if test -n "$ac_seen"; then
19216 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19217 if test -z "$ac_init"; then
19218 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19219 { echo "$as_me:19219: WARNING: Variable $ac_name is used but was not set:
19221 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19226 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19227 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19228 if test -s "$tmp"/out; then
19229 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19230 { echo "$as_me:19230: WARNING: Some variables may not be substituted:
19232 echo "$as_me: WARNING: Some variables may not be substituted:
19242 cat >>"$CONFIG_STATUS" <<\EOF
19245 # CONFIG_HEADER section.
19248 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19249 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19251 # ac_d sets the value in "#define NAME VALUE" lines.
19252 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19253 ac_dB='[ ].*$,\1#\2'
19256 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19257 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19258 ac_iB='\([ ]\),\1#\2define\3'
19261 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19262 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19263 ac_uB='$,\1#\2define\3'
19267 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19268 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19270 - | *:- | *:-:* ) # input from stdin
19272 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19273 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19274 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19275 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19276 * ) ac_file_in=$ac_file.in ;;
19279 test x"$ac_file" != x- && { echo "$as_me:19279: creating $ac_file" >&5
19280 echo "$as_me: creating $ac_file" >&6;}
19282 # First look for the input files in the build tree, otherwise in the
19284 ac_file_inputs=`IFS=:
19285 for f in $ac_file_in; do
19287 -) echo "$tmp"/stdin ;;
19289 # Absolute (can't be DOS-style, as IFS=:)
19290 test -f "$f" || { { echo "$as_me:19290: error: cannot find input file: $f" >&5
19291 echo "$as_me: error: cannot find input file: $f" >&2;}
19292 { (exit 1); exit 1; }; }
19295 if test -f "$f"; then
19298 elif test -f "$srcdir/$f"; then
19303 { { echo "$as_me:19303: error: cannot find input file: $f" >&5
19304 echo "$as_me: error: cannot find input file: $f" >&2;}
19305 { (exit 1); exit 1; }; }
19308 done` || { (exit 1); exit 1; }
19309 # Remove the trailing spaces.
19310 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19314 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19315 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19316 # be either 'cat' or 'sort'.
19317 cat confdefs.h | uniq >conftest.vals
19319 # Break up conftest.vals because some shells have a limit on
19320 # the size of here documents, and old seds have small limits too.
19322 rm -f conftest.tail
19323 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19324 while grep . conftest.vals >/dev/null
19326 # Write chunks of a limited-size here document to conftest.frag.
19327 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19328 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19329 echo 'CEOF' >> "$CONFIG_STATUS"
19330 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19331 rm -f conftest.vals
19332 mv conftest.tail conftest.vals
19334 rm -f conftest.vals
19336 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19338 echo ' cat >> conftest.edit <<CEOF
19339 /@DEFS@/r conftest.frag
19342 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19344 mv "$tmp"/out "$tmp"/in
19345 rm -f conftest.edit conftest.frag
19346 ' >> "$CONFIG_STATUS"
19348 cat >>"$CONFIG_STATUS" <<\EOF
19349 # Let's still pretend it is `configure' which instantiates (i.e., don't
19350 # use $as_me), people would be surprised to read:
19351 # /* config.h. Generated automatically by config.status. */
19352 if test x"$ac_file" = x-; then
19353 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19355 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19357 cat "$tmp"/in >>"$tmp"/config.h
19359 if test x"$ac_file" != x-; then
19360 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19361 { echo "$as_me:19361: $ac_file is unchanged" >&5
19362 echo "$as_me: $ac_file is unchanged" >&6;}
19364 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19365 X"$ac_file" : 'X\(//\)[^/]' \| \
19366 X"$ac_file" : 'X\(//\)$' \| \
19367 X"$ac_file" : 'X\(/\)' \| \
19368 . : '\(.\)' 2>/dev/null ||
19370 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19371 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19372 /^X\(\/\/\)$/{ s//\1/; q; }
19373 /^X\(\/\).*/{ s//\1/; q; }
19375 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19376 { case "$ac_dir" in
19377 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19381 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19382 case $as_mkdir_dir in
19383 # Skip DOS drivespec
19384 ?:) as_incr_dir=$as_mkdir_dir ;;
19386 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19387 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19394 mv "$tmp/config.h" "$ac_file"
19397 cat "$tmp"/config.h
19398 rm -f "$tmp"/config.h
19402 cat >>"$CONFIG_STATUS" <<\EOF
19404 # CONFIG_COMMANDS section.
19406 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19407 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19408 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19412 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19413 if test -z "$USE_OLD_MAKERULES" ; then
19414 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19421 cat >>"$CONFIG_STATUS" <<\EOF
19423 { (exit 0); exit 0; }
19425 chmod +x "$CONFIG_STATUS"
19426 ac_clean_files=$ac_clean_files_save
19428 # configure is writing to config.log, and then calls config.status.
19429 # config.status does its own redirection, appending to config.log.
19430 # Unfortunately, on DOS this fails, as config.log is still kept open
19431 # by configure, so config.status won't be able to write to it; its
19432 # output is simply discarded. So we exec the FD to /dev/null,
19433 # effectively closing config.log, so it can be properly (re)opened and
19434 # appended to by config.status. When coming back to configure, we
19435 # need to make the FD available again.
19436 if test "$no_create" != yes; then
19439 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19441 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19442 # would make configure fail if this is the last instruction.
19443 "$ac_cs_success" || { (exit 1); exit 1; }
19445 ${MAKE:-make} preinstall