2 # From configure.in Revision: 1.87 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20221009.
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.20221009. 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"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 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.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 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.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 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'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 # if $PKG_CONFIG_LIBDIR is set, try to use that
3283 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3285 # if the option is used, let that override. otherwise default to "libdir"
3287 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3288 if test "${with_pkg_config_libdir+set}" = set; then
3289 withval="$with_pkg_config_libdir"
3290 cf_search_path=$withval
3292 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3295 case "x$cf_search_path" in
3297 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3298 echo "$as_me:3298: result: $PKG_CONFIG_LIBDIR" >&5
3299 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3308 PKG_CONFIG_LIBDIR="$cf_search_path"
3309 echo "$as_me:3309: result: $PKG_CONFIG_LIBDIR" >&5
3310 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3314 echo "$as_me:3314: result: auto" >&5
3315 echo "${ECHO_T}auto" >&6
3317 # Look for the library directory using the same prefix as the executable
3318 echo "$as_me:3318: checking for search-list" >&5
3319 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3320 if test "x$PKG_CONFIG" != xnone
3322 # works for pkg-config since version 0.24 (2009)
3323 # works for pkgconf since version 0.8.3 (2012)
3324 for cf_pkg_program in \
3325 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3329 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3330 test -n "$cf_search_path" && break
3333 # works for pkg-config since import in 2005 of original 2001 HP code.
3334 test -z "$cf_search_path" && \
3336 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3337 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3338 sub(\"^[^']*'\",\"\"); \
3339 sub(\"'.*\",\"\"); \
3340 printf \" %s\", \\$0; } \
3345 echo "$as_me:3345: result: $cf_search_path" >&5
3346 echo "${ECHO_T}$cf_search_path" >&6
3349 { { echo "$as_me:3349: error: Unexpected option value: $cf_search_path" >&5
3350 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3351 { (exit 1); exit 1; }; }
3355 if test -n "$cf_search_path"
3357 echo "$as_me:3357: checking for first directory" >&5
3358 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3359 cf_pkg_config_path=none
3360 for cf_config in $cf_search_path
3362 if test -d "$cf_config"
3364 cf_pkg_config_path=$cf_config
3368 echo "$as_me:3368: result: $cf_pkg_config_path" >&5
3369 echo "${ECHO_T}$cf_pkg_config_path" >&6
3371 if test "x$cf_pkg_config_path" != xnone ; then
3372 # limit this to the first directory found
3373 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3376 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3378 echo "$as_me:3378: checking for workaround" >&5
3379 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3380 if test "$prefix" = "NONE" ; then
3381 cf_prefix="$ac_default_prefix"
3385 eval cf_libdir=$libdir
3386 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3388 for cf_config in $cf_search_path
3391 $cf_libdir/pkgconfig)
3392 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3396 test -z "$cf_backup" && cf_backup=$cf_config
3400 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3401 echo "$as_me:3401: result: $PKG_CONFIG_LIBDIR" >&5
3402 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3406 echo "$as_me:3406: checking if you want to build test-programs" >&5
3407 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3409 # Check whether --with-tests or --without-tests was given.
3410 if test "${with_tests+set}" = set; then
3411 withval="$with_tests"
3412 cf_with_tests=$withval
3416 echo "$as_me:3416: result: $cf_with_tests" >&5
3417 echo "${ECHO_T}$cf_with_tests" >&6
3419 echo "$as_me:3419: checking if we should assume mixed-case filenames" >&5
3420 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3422 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3423 if test "${enable_mixed_case+set}" = set; then
3424 enableval="$enable_mixed_case"
3425 enable_mixedcase=$enableval
3427 enable_mixedcase=auto
3429 echo "$as_me:3429: result: $enable_mixedcase" >&5
3430 echo "${ECHO_T}$enable_mixedcase" >&6
3431 if test "$enable_mixedcase" = "auto" ; then
3433 echo "$as_me:3433: checking if filesystem supports mixed-case filenames" >&5
3434 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3435 if test "${cf_cv_mixedcase+set}" = set; then
3436 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 if test "$cross_compiling" = yes ; then
3440 case "$target_alias" in
3441 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3449 rm -f conftest CONFTEST
3451 if test -f CONFTEST ; then
3456 rm -f conftest CONFTEST
3460 echo "$as_me:3460: result: $cf_cv_mixedcase" >&5
3461 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3462 test "$cf_cv_mixedcase" = yes &&
3463 cat >>confdefs.h <<\EOF
3464 #define MIXEDCASE_FILENAMES 1
3468 cf_cv_mixedcase=$enable_mixedcase
3469 if test "$enable_mixedcase" = "yes" ; then
3470 cat >>confdefs.h <<\EOF
3471 #define MIXEDCASE_FILENAMES 1
3477 # do this after mixed-case option (tags/TAGS is not as important as tic).
3478 echo "$as_me:3478: checking whether ${MAKE-make} sets \${MAKE}" >&5
3479 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3480 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3481 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3482 echo $ECHO_N "(cached) $ECHO_C" >&6
3484 cat >conftest.make <<\EOF
3486 @echo 'ac_maketemp="${MAKE}"'
3488 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3489 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3490 if test -n "$ac_maketemp"; then
3491 eval ac_cv_prog_make_${ac_make}_set=yes
3493 eval ac_cv_prog_make_${ac_make}_set=no
3497 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3498 echo "$as_me:3498: result: yes" >&5
3499 echo "${ECHO_T}yes" >&6
3502 echo "$as_me:3502: result: no" >&5
3503 echo "${ECHO_T}no" >&6
3504 SET_MAKE="MAKE=${MAKE-make}"
3507 echo "$as_me:3507: checking for \".PHONY\" make-support" >&5
3508 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3509 if test "${cf_cv_make_PHONY+set}" = set; then
3510 echo $ECHO_N "(cached) $ECHO_C" >&6
3515 mkdir conftest || exit 1
3517 cat >makefile <<'CF_EOF'
3521 @echo "** making $@ $(DATA)"
3523 @echo "** making $@ $(DATA)"
3525 @echo "** making $@ $(DATA)"
3528 @echo "** making $@ $(DATA)"
3531 for cf_data in 1 2 3
3533 ${MAKE:-make} always DATA=$cf_data
3534 ${MAKE:-make} once DATA=$cf_data
3535 ${MAKE:-make} -t always once
3536 if test -f always ; then
3537 echo "no (case 1)" > ../conftest.tmp
3538 elif test ! -f always.out ; then
3539 echo "no (case 2)" > ../conftest.tmp
3540 elif test ! -f once.out ; then
3541 echo "no (case 3)" > ../conftest.tmp
3542 elif ! cmp -s always.out once.out ; then
3543 echo "no (case 4)" > ../conftest.tmp
3544 diff always.out once.out
3546 cf_check="`cat always.out`"
3547 if test "x$cf_check" != "x$cf_data" ; then
3548 echo "no (case 5)" > ../conftest.tmp
3550 echo yes > ../conftest.tmp
3558 cf_cv_make_PHONY="`cat conftest.tmp`"
3562 echo "$as_me:3562: result: $cf_cv_make_PHONY" >&5
3563 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3566 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3567 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3569 for ac_prog in exctags ctags
3571 # Extract the first word of "$ac_prog", so it can be a program name with args.
3572 set dummy $ac_prog; ac_word=$2
3573 echo "$as_me:3573: checking for $ac_word" >&5
3574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3575 if test "${ac_cv_prog_CTAGS+set}" = set; then
3576 echo $ECHO_N "(cached) $ECHO_C" >&6
3578 if test -n "$CTAGS"; then
3579 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3581 ac_save_IFS=$IFS; IFS=$ac_path_separator
3583 for ac_dir in $ac_dummy; do
3585 test -z "$ac_dir" && ac_dir=.
3586 $as_executable_p "$ac_dir/$ac_word" || continue
3587 ac_cv_prog_CTAGS="$ac_prog"
3588 echo "$as_me:3588: found $ac_dir/$ac_word" >&5
3594 CTAGS=$ac_cv_prog_CTAGS
3595 if test -n "$CTAGS"; then
3596 echo "$as_me:3596: result: $CTAGS" >&5
3597 echo "${ECHO_T}$CTAGS" >&6
3599 echo "$as_me:3599: result: no" >&5
3600 echo "${ECHO_T}no" >&6
3603 test -n "$CTAGS" && break
3606 for ac_prog in exetags etags
3608 # Extract the first word of "$ac_prog", so it can be a program name with args.
3609 set dummy $ac_prog; ac_word=$2
3610 echo "$as_me:3610: checking for $ac_word" >&5
3611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3612 if test "${ac_cv_prog_ETAGS+set}" = set; then
3613 echo $ECHO_N "(cached) $ECHO_C" >&6
3615 if test -n "$ETAGS"; then
3616 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3618 ac_save_IFS=$IFS; IFS=$ac_path_separator
3620 for ac_dir in $ac_dummy; do
3622 test -z "$ac_dir" && ac_dir=.
3623 $as_executable_p "$ac_dir/$ac_word" || continue
3624 ac_cv_prog_ETAGS="$ac_prog"
3625 echo "$as_me:3625: found $ac_dir/$ac_word" >&5
3631 ETAGS=$ac_cv_prog_ETAGS
3632 if test -n "$ETAGS"; then
3633 echo "$as_me:3633: result: $ETAGS" >&5
3634 echo "${ECHO_T}$ETAGS" >&6
3636 echo "$as_me:3636: result: no" >&5
3637 echo "${ECHO_T}no" >&6
3640 test -n "$ETAGS" && break
3643 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3644 set dummy ${CTAGS:-ctags}; ac_word=$2
3645 echo "$as_me:3645: checking for $ac_word" >&5
3646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3647 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3648 echo $ECHO_N "(cached) $ECHO_C" >&6
3650 if test -n "$MAKE_LOWER_TAGS"; then
3651 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3653 ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 for ac_dir in $ac_dummy; do
3657 test -z "$ac_dir" && ac_dir=.
3658 $as_executable_p "$ac_dir/$ac_word" || continue
3659 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3660 echo "$as_me:3660: found $ac_dir/$ac_word" >&5
3664 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3667 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3668 if test -n "$MAKE_LOWER_TAGS"; then
3669 echo "$as_me:3669: result: $MAKE_LOWER_TAGS" >&5
3670 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3672 echo "$as_me:3672: result: no" >&5
3673 echo "${ECHO_T}no" >&6
3676 if test "$cf_cv_mixedcase" = yes ; then
3677 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3678 set dummy ${ETAGS:-etags}; ac_word=$2
3679 echo "$as_me:3679: checking for $ac_word" >&5
3680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3681 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3682 echo $ECHO_N "(cached) $ECHO_C" >&6
3684 if test -n "$MAKE_UPPER_TAGS"; then
3685 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3687 ac_save_IFS=$IFS; IFS=$ac_path_separator
3689 for ac_dir in $ac_dummy; do
3691 test -z "$ac_dir" && ac_dir=.
3692 $as_executable_p "$ac_dir/$ac_word" || continue
3693 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3694 echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3698 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3701 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3702 if test -n "$MAKE_UPPER_TAGS"; then
3703 echo "$as_me:3703: result: $MAKE_UPPER_TAGS" >&5
3704 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3706 echo "$as_me:3706: result: no" >&5
3707 echo "${ECHO_T}no" >&6
3714 if test "$MAKE_UPPER_TAGS" = yes ; then
3720 if test "$MAKE_LOWER_TAGS" = yes ; then
3726 echo "$as_me:3726: checking for makeflags variable" >&5
3727 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3728 if test "${cf_cv_makeflags+set}" = set; then
3729 echo $ECHO_N "(cached) $ECHO_C" >&6
3733 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3735 cat >cf_makeflags.tmp <<CF_EOF
3738 @ echo '.$cf_option'
3740 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3741 case "$cf_result" in
3743 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3744 case "$cf_result" in
3745 (.*CC=*) cf_cv_makeflags=
3747 (*) cf_cv_makeflags=$cf_option
3756 echo "${as_me:-configure}:3756: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3761 rm -f cf_makeflags.tmp
3764 echo "$as_me:3764: result: $cf_cv_makeflags" >&5
3765 echo "${ECHO_T}$cf_cv_makeflags" >&6
3767 if test -n "$ac_tool_prefix"; then
3768 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3769 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_RANLIB+set}" = set; then
3773 echo $ECHO_N "(cached) $ECHO_C" >&6
3775 if test -n "$RANLIB"; then
3776 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3778 ac_save_IFS=$IFS; IFS=$ac_path_separator
3780 for ac_dir in $ac_dummy; do
3782 test -z "$ac_dir" && ac_dir=.
3783 $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3791 RANLIB=$ac_cv_prog_RANLIB
3792 if test -n "$RANLIB"; then
3793 echo "$as_me:3793: result: $RANLIB" >&5
3794 echo "${ECHO_T}$RANLIB" >&6
3796 echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3801 if test -z "$ac_cv_prog_RANLIB"; then
3802 ac_ct_RANLIB=$RANLIB
3803 # Extract the first word of "ranlib", so it can be a program name with args.
3804 set dummy ranlib; ac_word=$2
3805 echo "$as_me:3805: checking for $ac_word" >&5
3806 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3807 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3808 echo $ECHO_N "(cached) $ECHO_C" >&6
3810 if test -n "$ac_ct_RANLIB"; then
3811 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3813 ac_save_IFS=$IFS; IFS=$ac_path_separator
3815 for ac_dir in $ac_dummy; do
3817 test -z "$ac_dir" && ac_dir=.
3818 $as_executable_p "$ac_dir/$ac_word" || continue
3819 ac_cv_prog_ac_ct_RANLIB="ranlib"
3820 echo "$as_me:3820: found $ac_dir/$ac_word" >&5
3824 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3827 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3828 if test -n "$ac_ct_RANLIB"; then
3829 echo "$as_me:3829: result: $ac_ct_RANLIB" >&5
3830 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3832 echo "$as_me:3832: result: no" >&5
3833 echo "${ECHO_T}no" >&6
3836 RANLIB=$ac_ct_RANLIB
3838 RANLIB="$ac_cv_prog_RANLIB"
3841 if test -n "$ac_tool_prefix"; then
3842 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3843 set dummy ${ac_tool_prefix}ld; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_LD+set}" = set; then
3847 echo $ECHO_N "(cached) $ECHO_C" >&6
3849 if test -n "$LD"; then
3850 ac_cv_prog_LD="$LD" # Let the user override the test.
3852 ac_save_IFS=$IFS; IFS=$ac_path_separator
3854 for ac_dir in $ac_dummy; do
3856 test -z "$ac_dir" && ac_dir=.
3857 $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_LD="${ac_tool_prefix}ld"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3866 if test -n "$LD"; then
3867 echo "$as_me:3867: result: $LD" >&5
3868 echo "${ECHO_T}$LD" >&6
3870 echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3875 if test -z "$ac_cv_prog_LD"; then
3877 # Extract the first word of "ld", so it can be a program name with args.
3878 set dummy ld; ac_word=$2
3879 echo "$as_me:3879: checking for $ac_word" >&5
3880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3881 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3882 echo $ECHO_N "(cached) $ECHO_C" >&6
3884 if test -n "$ac_ct_LD"; then
3885 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3887 ac_save_IFS=$IFS; IFS=$ac_path_separator
3889 for ac_dir in $ac_dummy; do
3891 test -z "$ac_dir" && ac_dir=.
3892 $as_executable_p "$ac_dir/$ac_word" || continue
3893 ac_cv_prog_ac_ct_LD="ld"
3894 echo "$as_me:3894: found $ac_dir/$ac_word" >&5
3898 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3901 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3902 if test -n "$ac_ct_LD"; then
3903 echo "$as_me:3903: result: $ac_ct_LD" >&5
3904 echo "${ECHO_T}$ac_ct_LD" >&6
3906 echo "$as_me:3906: result: no" >&5
3907 echo "${ECHO_T}no" >&6
3915 if test -n "$ac_tool_prefix"; then
3916 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3917 set dummy ${ac_tool_prefix}ar; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_AR+set}" = set; then
3921 echo $ECHO_N "(cached) $ECHO_C" >&6
3923 if test -n "$AR"; then
3924 ac_cv_prog_AR="$AR" # Let the user override the test.
3926 ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 for ac_dir in $ac_dummy; do
3930 test -z "$ac_dir" && ac_dir=.
3931 $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_AR="${ac_tool_prefix}ar"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3940 if test -n "$AR"; then
3941 echo "$as_me:3941: result: $AR" >&5
3942 echo "${ECHO_T}$AR" >&6
3944 echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3949 if test -z "$ac_cv_prog_AR"; then
3951 # Extract the first word of "ar", so it can be a program name with args.
3952 set dummy ar; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3958 if test -n "$ac_ct_AR"; then
3959 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3961 ac_save_IFS=$IFS; IFS=$ac_path_separator
3963 for ac_dir in $ac_dummy; do
3965 test -z "$ac_dir" && ac_dir=.
3966 $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_ac_ct_AR="ar"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3972 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3975 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3976 if test -n "$ac_ct_AR"; then
3977 echo "$as_me:3977: result: $ac_ct_AR" >&5
3978 echo "${ECHO_T}$ac_ct_AR" >&6
3980 echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3989 if test -n "$ac_tool_prefix"; then
3990 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3991 set dummy ${ac_tool_prefix}ar; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_AR+set}" = set; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3997 if test -n "$AR"; then
3998 ac_cv_prog_AR="$AR" # Let the user override the test.
4000 ac_save_IFS=$IFS; IFS=$ac_path_separator
4002 for ac_dir in $ac_dummy; do
4004 test -z "$ac_dir" && ac_dir=.
4005 $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_AR="${ac_tool_prefix}ar"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4014 if test -n "$AR"; then
4015 echo "$as_me:4015: result: $AR" >&5
4016 echo "${ECHO_T}$AR" >&6
4018 echo "$as_me:4018: result: no" >&5
4019 echo "${ECHO_T}no" >&6
4023 if test -z "$ac_cv_prog_AR"; then
4025 # Extract the first word of "ar", so it can be a program name with args.
4026 set dummy ar; ac_word=$2
4027 echo "$as_me:4027: checking for $ac_word" >&5
4028 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4029 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4030 echo $ECHO_N "(cached) $ECHO_C" >&6
4032 if test -n "$ac_ct_AR"; then
4033 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4035 ac_save_IFS=$IFS; IFS=$ac_path_separator
4037 for ac_dir in $ac_dummy; do
4039 test -z "$ac_dir" && ac_dir=.
4040 $as_executable_p "$ac_dir/$ac_word" || continue
4041 ac_cv_prog_ac_ct_AR="ar"
4042 echo "$as_me:4042: found $ac_dir/$ac_word" >&5
4046 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4049 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4050 if test -n "$ac_ct_AR"; then
4051 echo "$as_me:4051: result: $ac_ct_AR" >&5
4052 echo "${ECHO_T}$ac_ct_AR" >&6
4054 echo "$as_me:4054: result: no" >&5
4055 echo "${ECHO_T}no" >&6
4063 echo "$as_me:4063: checking for options to update archives" >&5
4064 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4065 if test "${cf_cv_ar_flags+set}" = set; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4069 case "$cf_cv_system_name" in
4072 cat >mk_static_lib.sh <<-EOF
4077 exec \$MSVC_BIN -out:"\$out" \$@
4079 chmod +x mk_static_lib.sh
4080 AR=`pwd`/mk_static_lib.sh
4083 cf_cv_ar_flags=unknown
4084 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4087 # check if $ARFLAGS already contains this choice
4088 if test "x$ARFLAGS" != "x" ; then
4089 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4090 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4096 rm -f "conftest.$ac_cv_objext"
4099 cat >"conftest.$ac_ext" <<EOF
4100 #line 4100 "configure"
4101 int testdata[3] = { 123, 456, 789 };
4103 if { (eval echo "$as_me:4103: \"$ac_compile\"") >&5
4104 (eval $ac_compile) 2>&5
4106 echo "$as_me:4106: \$? = $ac_status" >&5
4107 (exit "$ac_status"); } ; then
4108 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4109 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4110 if test -f conftest.a ; then
4111 cf_cv_ar_flags="$cf_ar_flags"
4115 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4117 echo "${as_me:-configure}:4117: testing cannot compile test-program ..." 1>&5
4122 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4127 echo "$as_me:4127: result: $cf_cv_ar_flags" >&5
4128 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4130 if test -n "$ARFLAGS" ; then
4131 if test -n "$cf_cv_ar_flags" ; then
4132 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4135 ARFLAGS=$cf_cv_ar_flags
4138 echo "$as_me:4138: checking for PATH separator" >&5
4139 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4140 case "$cf_cv_system_name" in
4141 (os2*) PATH_SEPARATOR=';' ;;
4142 (*) ${PATH_SEPARATOR:=':'} ;;
4145 echo "$as_me:4145: result: $PATH_SEPARATOR" >&5
4146 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4148 echo "$as_me:4148: checking if you have specified an install-prefix" >&5
4149 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4151 # Check whether --with-install-prefix or --without-install-prefix was given.
4152 if test "${with_install_prefix+set}" = set; then
4153 withval="$with_install_prefix"
4157 (*) DESTDIR="$withval"
4161 echo "$as_me:4161: result: $DESTDIR" >&5
4162 echo "${ECHO_T}$DESTDIR" >&6
4164 ###############################################################################
4166 # If we're cross-compiling, allow the user to override the tools and their
4167 # options. The configure script is oriented toward identifying the host
4168 # compiler, etc., but we need a build compiler to generate parts of the source.
4170 if test "$cross_compiling" = yes ; then
4172 # defaults that we might want to override
4173 : ${BUILD_CFLAGS:=''}
4174 : ${BUILD_CPPFLAGS:=''}
4175 : ${BUILD_LDFLAGS:=''}
4177 : ${BUILD_EXEEXT:='$x'}
4178 : ${BUILD_OBJEXT:='o'}
4180 # Check whether --with-build-cc or --without-build-cc was given.
4181 if test "${with_build_cc+set}" = set; then
4182 withval="$with_build_cc"
4185 for ac_prog in gcc clang c99 c89 cc cl
4187 # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4192 echo $ECHO_N "(cached) $ECHO_C" >&6
4194 if test -n "$BUILD_CC"; then
4195 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4197 ac_save_IFS=$IFS; IFS=$ac_path_separator
4199 for ac_dir in $ac_dummy; do
4201 test -z "$ac_dir" && ac_dir=.
4202 $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_BUILD_CC="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4210 BUILD_CC=$ac_cv_prog_BUILD_CC
4211 if test -n "$BUILD_CC"; then
4212 echo "$as_me:4212: result: $BUILD_CC" >&5
4213 echo "${ECHO_T}$BUILD_CC" >&6
4215 echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4219 test -n "$BUILD_CC" && break
4221 test -n "$BUILD_CC" || BUILD_CC="none"
4224 echo "$as_me:4224: checking for native build C compiler" >&5
4225 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4226 echo "$as_me:4226: result: $BUILD_CC" >&5
4227 echo "${ECHO_T}$BUILD_CC" >&6
4229 echo "$as_me:4229: checking for native build C preprocessor" >&5
4230 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4232 # Check whether --with-build-cpp or --without-build-cpp was given.
4233 if test "${with_build_cpp+set}" = set; then
4234 withval="$with_build_cpp"
4235 BUILD_CPP="$withval"
4237 BUILD_CPP='${BUILD_CC} -E'
4239 echo "$as_me:4239: result: $BUILD_CPP" >&5
4240 echo "${ECHO_T}$BUILD_CPP" >&6
4242 echo "$as_me:4242: checking for native build C flags" >&5
4243 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4245 # Check whether --with-build-cflags or --without-build-cflags was given.
4246 if test "${with_build_cflags+set}" = set; then
4247 withval="$with_build_cflags"
4248 BUILD_CFLAGS="$withval"
4250 echo "$as_me:4250: result: $BUILD_CFLAGS" >&5
4251 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4253 echo "$as_me:4253: checking for native build C preprocessor-flags" >&5
4254 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4256 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4257 if test "${with_build_cppflags+set}" = set; then
4258 withval="$with_build_cppflags"
4259 BUILD_CPPFLAGS="$withval"
4261 echo "$as_me:4261: result: $BUILD_CPPFLAGS" >&5
4262 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4264 echo "$as_me:4264: checking for native build linker-flags" >&5
4265 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4267 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4268 if test "${with_build_ldflags+set}" = set; then
4269 withval="$with_build_ldflags"
4270 BUILD_LDFLAGS="$withval"
4272 echo "$as_me:4272: result: $BUILD_LDFLAGS" >&5
4273 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4275 echo "$as_me:4275: checking for native build linker-libraries" >&5
4276 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4278 # Check whether --with-build-libs or --without-build-libs was given.
4279 if test "${with_build_libs+set}" = set; then
4280 withval="$with_build_libs"
4281 BUILD_LIBS="$withval"
4283 echo "$as_me:4283: result: $BUILD_LIBS" >&5
4284 echo "${ECHO_T}$BUILD_LIBS" >&6
4286 # this assumes we're on Unix.
4290 : ${BUILD_CC:='${CC}'}
4292 echo "$as_me:4292: checking if the build-compiler \"$BUILD_CC\" works" >&5
4293 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4295 cf_save_crossed=$cross_compiling
4296 cf_save_ac_link=$ac_link
4298 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $BUILD_CPPFLAGS $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4300 if test "$cross_compiling" = yes; then
4301 cf_ok_build_cc=unknown
4303 cat >"conftest.$ac_ext" <<_ACEOF
4304 #line 4304 "configure"
4305 #include "confdefs.h"
4307 int main(int argc, char *argv[])
4309 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4313 rm -f "conftest$ac_exeext"
4314 if { (eval echo "$as_me:4314: \"$ac_link\"") >&5
4315 (eval $ac_link) 2>&5
4317 echo "$as_me:4317: \$? = $ac_status" >&5
4318 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4319 { (eval echo "$as_me:4319: \"$ac_try\"") >&5
4322 echo "$as_me:4322: \$? = $ac_status" >&5
4323 (exit "$ac_status"); }; }; then
4326 echo "$as_me: program exited with status $ac_status" >&5
4327 echo "$as_me: failed program was:" >&5
4328 cat "conftest.$ac_ext" >&5
4331 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4334 cross_compiling=$cf_save_crossed
4335 ac_link=$cf_save_ac_link
4337 echo "$as_me:4337: result: $cf_ok_build_cc" >&5
4338 echo "${ECHO_T}$cf_ok_build_cc" >&6
4340 if test "$cf_ok_build_cc" != yes
4342 { { echo "$as_me:4342: error: Cross-build requires two compilers.
4343 Use --with-build-cc to specify the native compiler." >&5
4344 echo "$as_me: error: Cross-build requires two compilers.
4345 Use --with-build-cc to specify the native compiler." >&2;}
4346 { (exit 1); exit 1; }; }
4350 : ${BUILD_CC:='${CC}'}
4351 : ${BUILD_CPP:='${CPP}'}
4352 : ${BUILD_CFLAGS:='${CFLAGS}'}
4353 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4354 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4355 : ${BUILD_LIBS:='${LIBS}'}
4356 : ${BUILD_EXEEXT:='$x'}
4357 : ${BUILD_OBJEXT:='o'}
4360 ###############################################################################
4362 ### Options to allow the user to specify the set of libraries which are used.
4363 ### Use "--without-normal --with-shared" to allow the default model to be
4364 ### shared, for example.
4367 echo "$as_me:4367: checking if you want to build shared C-objects" >&5
4368 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4370 # Check whether --with-shared or --without-shared was given.
4371 if test "${with_shared+set}" = set; then
4372 withval="$with_shared"
4373 with_shared=$withval
4377 echo "$as_me:4377: result: $with_shared" >&5
4378 echo "${ECHO_T}$with_shared" >&6
4379 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4381 echo "$as_me:4381: checking for specified models" >&5
4382 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4383 test -z "$cf_list_models" && cf_list_models=normal
4384 echo "$as_me:4384: result: $cf_list_models" >&5
4385 echo "${ECHO_T}$cf_list_models" >&6
4387 ### Use the first model as the default, and save its suffix for use in building
4388 ### up test-applications.
4389 echo "$as_me:4389: checking for default model" >&5
4390 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4391 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4392 echo "$as_me:4392: result: $DFT_LWR_MODEL" >&5
4393 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4395 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4397 echo "$as_me:4397: checking for specific curses-directory" >&5
4398 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4400 # Check whether --with-curses-dir or --without-curses-dir was given.
4401 if test "${with_curses_dir+set}" = set; then
4402 withval="$with_curses_dir"
4403 cf_cv_curses_dir=$withval
4407 echo "$as_me:4407: result: $cf_cv_curses_dir" >&5
4408 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4410 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4413 if test "x$prefix" != xNONE; then
4414 cf_path_syntax="$prefix"
4416 cf_path_syntax="$ac_default_prefix"
4424 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4426 (.\$\{*prefix\}*|.\$\{*dir\}*)
4427 eval withval="$withval"
4430 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4435 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4438 { { echo "$as_me:4438: error: expected a pathname, not \"$withval\"" >&5
4439 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4440 { (exit 1); exit 1; }; }
4444 if test -d "$cf_cv_curses_dir"
4447 if test -n "$cf_cv_curses_dir/include" ; then
4448 for cf_add_incdir in $cf_cv_curses_dir/include
4450 while test "$cf_add_incdir" != /usr/include
4452 if test -d "$cf_add_incdir"
4455 if test -n "$CFLAGS$CPPFLAGS" ; then
4456 # a loop is needed to ensure we can add subdirs of existing dirs
4457 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4458 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4459 cf_have_incdir=yes; break
4464 if test "$cf_have_incdir" = no ; then
4465 if test "$cf_add_incdir" = /usr/local/include ; then
4466 if test "$GCC" = yes
4468 cf_save_CPPFLAGS=$CPPFLAGS
4470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4471 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4473 cat >"conftest.$ac_ext" <<_ACEOF
4474 #line 4474 "configure"
4475 #include "confdefs.h"
4485 rm -f "conftest.$ac_objext"
4486 if { (eval echo "$as_me:4486: \"$ac_compile\"") >&5
4487 (eval $ac_compile) 2>&5
4489 echo "$as_me:4489: \$? = $ac_status" >&5
4490 (exit "$ac_status"); } &&
4491 { ac_try='test -s "conftest.$ac_objext"'
4492 { (eval echo "$as_me:4492: \"$ac_try\"") >&5
4495 echo "$as_me:4495: \$? = $ac_status" >&5
4496 (exit "$ac_status"); }; }; then
4499 echo "$as_me: failed program was:" >&5
4500 cat "conftest.$ac_ext" >&5
4503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4504 CPPFLAGS=$cf_save_CPPFLAGS
4509 if test "$cf_have_incdir" = no ; then
4510 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4512 echo "${as_me:-configure}:4512: testing adding $cf_add_incdir to include-path ..." 1>&5
4514 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4516 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4517 test "$cf_top_incdir" = "$cf_add_incdir" && break
4518 cf_add_incdir="$cf_top_incdir"
4529 if test -n "$cf_cv_curses_dir/lib" ; then
4530 for cf_add_libdir in $cf_cv_curses_dir/lib
4532 if test "$cf_add_libdir" = /usr/lib ; then
4534 elif test -d "$cf_add_libdir"
4537 if test -n "$LDFLAGS$LIBS" ; then
4538 # a loop is needed to ensure we can add subdirs of existing dirs
4539 for cf_test_libdir in $LDFLAGS $LIBS ; do
4540 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4541 cf_have_libdir=yes; break
4545 if test "$cf_have_libdir" = no ; then
4546 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4548 echo "${as_me:-configure}:4548: testing adding $cf_add_libdir to library-path ..." 1>&5
4550 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4559 cf_ncuconfig_root=ncurses
4560 cf_have_ncuconfig=no
4562 if test "x${PKG_CONFIG:=none}" != xnone; then
4563 echo "$as_me:4563: checking pkg-config for $cf_ncuconfig_root" >&5
4564 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4565 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4566 echo "$as_me:4566: result: yes" >&5
4567 echo "${ECHO_T}yes" >&6
4569 echo "$as_me:4569: checking if the $cf_ncuconfig_root package files work" >&5
4570 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4571 cf_have_ncuconfig=unknown
4573 cf_save_CFLAGS="$CFLAGS"
4574 cf_save_CPPFLAGS="$CPPFLAGS"
4575 cf_save_LIBS="$LIBS"
4577 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4578 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4580 # while -W for passing linker flags is prevalent, it is not "standard".
4581 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4582 # incompatible _and_ non-standard -W option which gives an error. Work
4583 # around that pitfall.
4584 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4590 cf_new_extra_cppflags=
4592 for cf_add_cflags in $cf_pkg_cflags
4594 case "$cf_fix_cppflags" in
4596 case "$cf_add_cflags" in
4597 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4598 case "$cf_add_cflags" in
4600 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4602 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4603 && test -z "${cf_tst_cflags}" \
4604 && cf_fix_cppflags=yes
4606 if test "$cf_fix_cppflags" = yes ; then
4608 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4609 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4612 elif test "${cf_tst_cflags}" = "\"'" ; then
4614 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4615 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4625 case "$cf_add_cflags" in
4627 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4629 CPPFLAGS=`echo "$CPPFLAGS" | \
4630 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4631 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4636 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4637 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4644 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4645 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4652 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4653 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4655 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4657 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4658 && test -z "${cf_tst_cflags}" \
4659 && cf_fix_cppflags=no
4664 if test -n "$cf_new_cflags" ; then
4666 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4667 CFLAGS="${CFLAGS}$cf_new_cflags"
4671 if test -n "$cf_new_cppflags" ; then
4673 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4674 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4678 if test -n "$cf_new_extra_cppflags" ; then
4680 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4681 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4688 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4690 for cf_add_1lib in $cf_add_0lib; do
4691 for cf_add_2lib in $cf_add_libs; do
4692 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4697 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4701 cat >"conftest.$ac_ext" <<_ACEOF
4702 #line 4702 "configure"
4703 #include "confdefs.h"
4704 #include <${cf_cv_ncurses_header:-curses.h}>
4708 initscr(); mousemask(0,0); tigetstr((char *)0);
4713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4714 if { (eval echo "$as_me:4714: \"$ac_link\"") >&5
4715 (eval $ac_link) 2>&5
4717 echo "$as_me:4717: \$? = $ac_status" >&5
4718 (exit "$ac_status"); } &&
4719 { ac_try='test -s "conftest$ac_exeext"'
4720 { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4723 echo "$as_me:4723: \$? = $ac_status" >&5
4724 (exit "$ac_status"); }; }; then
4725 if test "$cross_compiling" = yes; then
4726 cf_test_ncuconfig=maybe
4728 cat >"conftest.$ac_ext" <<_ACEOF
4729 #line 4729 "configure"
4730 #include "confdefs.h"
4731 #include <${cf_cv_ncurses_header:-curses.h}>
4733 { const char *xx = curses_version(); return (xx == 0); }
4735 rm -f "conftest$ac_exeext"
4736 if { (eval echo "$as_me:4736: \"$ac_link\"") >&5
4737 (eval $ac_link) 2>&5
4739 echo "$as_me:4739: \$? = $ac_status" >&5
4740 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4741 { (eval echo "$as_me:4741: \"$ac_try\"") >&5
4744 echo "$as_me:4744: \$? = $ac_status" >&5
4745 (exit "$ac_status"); }; }; then
4746 cf_test_ncuconfig=yes
4748 echo "$as_me: program exited with status $ac_status" >&5
4749 echo "$as_me: failed program was:" >&5
4750 cat "conftest.$ac_ext" >&5
4751 cf_test_ncuconfig=no
4753 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4756 echo "$as_me: failed program was:" >&5
4757 cat "conftest.$ac_ext" >&5
4758 cf_test_ncuconfig=no
4760 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4762 CFLAGS="$cf_save_CFLAGS"
4763 CPPFLAGS="$cf_save_CPPFLAGS"
4764 LIBS="$cf_save_LIBS"
4766 if test "x$cf_test_ncuconfig" != xyes; then
4767 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4768 cf_pkg_cflags="$cf_temp"
4769 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4770 cf_pkg_libs="$cf_temp"
4775 for cf_add_cflags in $cf_pkg_cflags
4777 case "x$cf_add_cflags" in
4780 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4783 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'`
4784 test "$CFLAGS" != "$cf_old_cflag" || break
4786 CFLAGS="$cf_old_cflag"
4789 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4792 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'`
4793 test "$CPPFLAGS" != "$cf_old_cflag" || break
4795 CPPFLAGS="$cf_old_cflag"
4804 cf_new_extra_cppflags=
4806 for cf_add_cflags in $cf_add_cflags
4808 case "$cf_fix_cppflags" in
4810 case "$cf_add_cflags" in
4811 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4812 case "$cf_add_cflags" in
4814 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4816 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4817 && test -z "${cf_tst_cflags}" \
4818 && cf_fix_cppflags=yes
4820 if test "$cf_fix_cppflags" = yes ; then
4822 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4823 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4826 elif test "${cf_tst_cflags}" = "\"'" ; then
4828 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4829 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4839 case "$cf_add_cflags" in
4841 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4843 CPPFLAGS=`echo "$CPPFLAGS" | \
4844 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4845 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4850 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4851 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4858 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4859 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4866 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4867 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4869 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4871 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4872 && test -z "${cf_tst_cflags}" \
4873 && cf_fix_cppflags=no
4878 if test -n "$cf_new_cflags" ; then
4880 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4881 CFLAGS="${CFLAGS}$cf_new_cflags"
4885 if test -n "$cf_new_cppflags" ; then
4887 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4888 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4892 if test -n "$cf_new_extra_cppflags" ; then
4894 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4895 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4904 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4906 for cf_add_1lib in $cf_add_0lib; do
4907 for cf_add_2lib in $cf_add_libs; do
4908 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4913 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4917 cat >"conftest.$ac_ext" <<_ACEOF
4918 #line 4918 "configure"
4919 #include "confdefs.h"
4920 #include <${cf_cv_ncurses_header:-curses.h}>
4924 initscr(); mousemask(0,0); tigetstr((char *)0);
4929 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4930 if { (eval echo "$as_me:4930: \"$ac_link\"") >&5
4931 (eval $ac_link) 2>&5
4933 echo "$as_me:4933: \$? = $ac_status" >&5
4934 (exit "$ac_status"); } &&
4935 { ac_try='test -s "conftest$ac_exeext"'
4936 { (eval echo "$as_me:4936: \"$ac_try\"") >&5
4939 echo "$as_me:4939: \$? = $ac_status" >&5
4940 (exit "$ac_status"); }; }; then
4941 if test "$cross_compiling" = yes; then
4942 cf_have_ncuconfig=maybe
4944 cat >"conftest.$ac_ext" <<_ACEOF
4945 #line 4945 "configure"
4946 #include "confdefs.h"
4947 #include <${cf_cv_ncurses_header:-curses.h}>
4949 { const char *xx = curses_version(); return (xx == 0); }
4951 rm -f "conftest$ac_exeext"
4952 if { (eval echo "$as_me:4952: \"$ac_link\"") >&5
4953 (eval $ac_link) 2>&5
4955 echo "$as_me:4955: \$? = $ac_status" >&5
4956 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4957 { (eval echo "$as_me:4957: \"$ac_try\"") >&5
4960 echo "$as_me:4960: \$? = $ac_status" >&5
4961 (exit "$ac_status"); }; }; then
4962 cf_have_ncuconfig=yes
4964 echo "$as_me: program exited with status $ac_status" >&5
4965 echo "$as_me: failed program was:" >&5
4966 cat "conftest.$ac_ext" >&5
4967 cf_have_ncuconfig=no
4969 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4972 echo "$as_me: failed program was:" >&5
4973 cat "conftest.$ac_ext" >&5
4974 cf_have_ncuconfig=no
4976 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4977 echo "$as_me:4977: result: $cf_have_ncuconfig" >&5
4978 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4979 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4980 if test "$cf_have_ncuconfig" != "yes"
4982 CPPFLAGS="$cf_save_CPPFLAGS"
4983 LIBS="$cf_save_LIBS"
4984 NCURSES_CONFIG_PKG=none
4987 cat >>confdefs.h <<\EOF
4991 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4993 echo "$as_me:4993: checking for terminfo header" >&5
4994 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4995 if test "${cf_cv_term_header+set}" = set; then
4996 echo $ECHO_N "(cached) $ECHO_C" >&6
4999 case "${cf_cv_ncurses_header}" in
5000 (*/ncurses.h|*/ncursesw.h)
5001 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5004 cf_term_header=term.h
5008 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5010 cat >"conftest.$ac_ext" <<_ACEOF
5011 #line 5011 "configure"
5012 #include "confdefs.h"
5014 #include <${cf_cv_ncurses_header:-curses.h}>
5020 int x = auto_left_margin; (void)x
5025 rm -f "conftest.$ac_objext"
5026 if { (eval echo "$as_me:5026: \"$ac_compile\"") >&5
5027 (eval $ac_compile) 2>&5
5029 echo "$as_me:5029: \$? = $ac_status" >&5
5030 (exit "$ac_status"); } &&
5031 { ac_try='test -s "conftest.$ac_objext"'
5032 { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit "$ac_status"); }; }; then
5038 cf_cv_term_header="$cf_test"
5040 echo "$as_me: failed program was:" >&5
5041 cat "conftest.$ac_ext" >&5
5043 cf_cv_term_header=unknown
5046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5047 test "$cf_cv_term_header" != unknown && break
5051 echo "$as_me:5051: result: $cf_cv_term_header" >&5
5052 echo "${ECHO_T}$cf_cv_term_header" >&6
5054 # Set definitions to allow ifdef'ing to accommodate subdirectories
5056 case "$cf_cv_term_header" in
5059 cat >>confdefs.h <<\EOF
5060 #define HAVE_TERM_H 1
5066 case "$cf_cv_term_header" in
5069 cat >>confdefs.h <<\EOF
5070 #define HAVE_NCURSES_TERM_H 1
5076 cat >>confdefs.h <<\EOF
5077 #define HAVE_NCURSESW_TERM_H 1
5086 echo "$as_me:5086: result: no" >&5
5087 echo "${ECHO_T}no" >&6
5088 NCURSES_CONFIG_PKG=none
5091 NCURSES_CONFIG_PKG=none
5094 if test "x$cf_have_ncuconfig" = "xno"; then
5095 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5097 if test -n "$ac_tool_prefix"; then
5098 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5100 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5101 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5102 echo "$as_me:5102: checking for $ac_word" >&5
5103 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5104 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5105 echo $ECHO_N "(cached) $ECHO_C" >&6
5107 if test -n "$NCURSES_CONFIG"; then
5108 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5110 ac_save_IFS=$IFS; IFS=$ac_path_separator
5112 for ac_dir in $ac_dummy; do
5114 test -z "$ac_dir" && ac_dir=.
5115 $as_executable_p "$ac_dir/$ac_word" || continue
5116 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5117 echo "$as_me:5117: found $ac_dir/$ac_word" >&5
5123 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5124 if test -n "$NCURSES_CONFIG"; then
5125 echo "$as_me:5125: result: $NCURSES_CONFIG" >&5
5126 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5128 echo "$as_me:5128: result: no" >&5
5129 echo "${ECHO_T}no" >&6
5132 test -n "$NCURSES_CONFIG" && break
5135 if test -z "$NCURSES_CONFIG"; then
5136 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5137 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5139 # Extract the first word of "$ac_prog", so it can be a program name with args.
5140 set dummy $ac_prog; ac_word=$2
5141 echo "$as_me:5141: checking for $ac_word" >&5
5142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5143 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5144 echo $ECHO_N "(cached) $ECHO_C" >&6
5146 if test -n "$ac_ct_NCURSES_CONFIG"; then
5147 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5149 ac_save_IFS=$IFS; IFS=$ac_path_separator
5151 for ac_dir in $ac_dummy; do
5153 test -z "$ac_dir" && ac_dir=.
5154 $as_executable_p "$ac_dir/$ac_word" || continue
5155 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5156 echo "$as_me:5156: found $ac_dir/$ac_word" >&5
5162 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5163 if test -n "$ac_ct_NCURSES_CONFIG"; then
5164 echo "$as_me:5164: result: $ac_ct_NCURSES_CONFIG" >&5
5165 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5167 echo "$as_me:5167: result: no" >&5
5168 echo "${ECHO_T}no" >&6
5171 test -n "$ac_ct_NCURSES_CONFIG" && break
5173 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5175 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5178 if test "$NCURSES_CONFIG" != none ; then
5180 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5182 case "x$cf_add_cflags" in
5185 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5188 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'`
5189 test "$CFLAGS" != "$cf_old_cflag" || break
5191 CFLAGS="$cf_old_cflag"
5194 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5197 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'`
5198 test "$CPPFLAGS" != "$cf_old_cflag" || break
5200 CPPFLAGS="$cf_old_cflag"
5209 cf_new_extra_cppflags=
5211 for cf_add_cflags in $cf_add_cflags
5213 case "$cf_fix_cppflags" in
5215 case "$cf_add_cflags" in
5216 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5217 case "$cf_add_cflags" in
5219 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5221 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5222 && test -z "${cf_tst_cflags}" \
5223 && cf_fix_cppflags=yes
5225 if test "$cf_fix_cppflags" = yes ; then
5227 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5228 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5231 elif test "${cf_tst_cflags}" = "\"'" ; then
5233 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5234 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5244 case "$cf_add_cflags" in
5246 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5248 CPPFLAGS=`echo "$CPPFLAGS" | \
5249 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5250 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5255 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5256 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5263 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5264 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5271 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5272 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5274 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5276 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5277 && test -z "${cf_tst_cflags}" \
5278 && cf_fix_cppflags=no
5283 if test -n "$cf_new_cflags" ; then
5285 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5286 CFLAGS="${CFLAGS}$cf_new_cflags"
5290 if test -n "$cf_new_cppflags" ; then
5292 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5293 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5297 if test -n "$cf_new_extra_cppflags" ; then
5299 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5300 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5309 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5311 for cf_add_1lib in $cf_add_0lib; do
5312 for cf_add_2lib in $cf_add_libs; do
5313 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5318 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5322 # even with config script, some packages use no-override for curses.h
5324 echo "$as_me:5324: checking if we have identified curses headers" >&5
5325 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5326 if test "${cf_cv_ncurses_header+set}" = set; then
5327 echo $ECHO_N "(cached) $ECHO_C" >&6
5330 cf_cv_ncurses_header=none
5332 ncurses.h ncurses/ncurses.h \
5333 curses.h ncurses/curses.h
5335 cat >"conftest.$ac_ext" <<_ACEOF
5336 #line 5336 "configure"
5337 #include "confdefs.h"
5338 #include <${cf_header}>
5342 initscr(); tgoto("?", 0,0)
5347 rm -f "conftest.$ac_objext"
5348 if { (eval echo "$as_me:5348: \"$ac_compile\"") >&5
5349 (eval $ac_compile) 2>&5
5351 echo "$as_me:5351: \$? = $ac_status" >&5
5352 (exit "$ac_status"); } &&
5353 { ac_try='test -s "conftest.$ac_objext"'
5354 { (eval echo "$as_me:5354: \"$ac_try\"") >&5
5357 echo "$as_me:5357: \$? = $ac_status" >&5
5358 (exit "$ac_status"); }; }; then
5359 cf_cv_ncurses_header=$cf_header; break
5361 echo "$as_me: failed program was:" >&5
5362 cat "conftest.$ac_ext" >&5
5364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5368 echo "$as_me:5368: result: $cf_cv_ncurses_header" >&5
5369 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5371 if test "$cf_cv_ncurses_header" = none ; then
5372 { { echo "$as_me:5372: error: No curses header-files found" >&5
5373 echo "$as_me: error: No curses header-files found" >&2;}
5374 { (exit 1); exit 1; }; }
5377 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5379 for ac_header in $cf_cv_ncurses_header
5381 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5382 echo "$as_me:5382: checking for $ac_header" >&5
5383 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5384 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5387 cat >"conftest.$ac_ext" <<_ACEOF
5388 #line 5388 "configure"
5389 #include "confdefs.h"
5390 #include <$ac_header>
5392 if { (eval echo "$as_me:5392: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5393 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5395 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5397 cat conftest.err >&5
5398 echo "$as_me:5398: \$? = $ac_status" >&5
5399 (exit "$ac_status"); } >/dev/null; then
5400 if test -s conftest.err; then
5401 ac_cpp_err=$ac_c_preproc_warn_flag
5408 if test -z "$ac_cpp_err"; then
5409 eval "$as_ac_Header=yes"
5411 echo "$as_me: failed program was:" >&5
5412 cat "conftest.$ac_ext" >&5
5413 eval "$as_ac_Header=no"
5415 rm -f conftest.err "conftest.$ac_ext"
5417 echo "$as_me:5417: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5418 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5419 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5420 cat >>confdefs.h <<EOF
5421 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5427 cat >>confdefs.h <<\EOF
5431 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5433 cat >>confdefs.h <<EOF
5434 #define $cf_nculib_ROOT 1
5437 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5441 cf_ncuhdr_root=ncurses
5443 test -n "$cf_cv_curses_dir" && \
5444 test "$cf_cv_curses_dir" != "no" && { \
5446 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5447 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5449 while test "$cf_add_incdir" != /usr/include
5451 if test -d "$cf_add_incdir"
5454 if test -n "$CFLAGS$CPPFLAGS" ; then
5455 # a loop is needed to ensure we can add subdirs of existing dirs
5456 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5457 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5458 cf_have_incdir=yes; break
5463 if test "$cf_have_incdir" = no ; then
5464 if test "$cf_add_incdir" = /usr/local/include ; then
5465 if test "$GCC" = yes
5467 cf_save_CPPFLAGS=$CPPFLAGS
5469 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5470 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5472 cat >"conftest.$ac_ext" <<_ACEOF
5473 #line 5473 "configure"
5474 #include "confdefs.h"
5484 rm -f "conftest.$ac_objext"
5485 if { (eval echo "$as_me:5485: \"$ac_compile\"") >&5
5486 (eval $ac_compile) 2>&5
5488 echo "$as_me:5488: \$? = $ac_status" >&5
5489 (exit "$ac_status"); } &&
5490 { ac_try='test -s "conftest.$ac_objext"'
5491 { (eval echo "$as_me:5491: \"$ac_try\"") >&5
5494 echo "$as_me:5494: \$? = $ac_status" >&5
5495 (exit "$ac_status"); }; }; then
5498 echo "$as_me: failed program was:" >&5
5499 cat "conftest.$ac_ext" >&5
5502 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5503 CPPFLAGS=$cf_save_CPPFLAGS
5508 if test "$cf_have_incdir" = no ; then
5509 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5511 echo "${as_me:-configure}:5511: testing adding $cf_add_incdir to include-path ..." 1>&5
5513 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5515 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5516 test "$cf_top_incdir" = "$cf_add_incdir" && break
5517 cf_add_incdir="$cf_top_incdir"
5530 echo "$as_me:5530: checking for $cf_ncuhdr_root header in include-path" >&5
5531 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5532 if test "${cf_cv_ncurses_h+set}" = set; then
5533 echo $ECHO_N "(cached) $ECHO_C" >&6
5536 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5537 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5538 for cf_header in $cf_header_list
5541 cat >"conftest.$ac_ext" <<_ACEOF
5542 #line 5542 "configure"
5543 #include "confdefs.h"
5545 #include <$cf_header>
5550 #ifdef NCURSES_VERSION
5552 printf("%s\\n", NCURSES_VERSION);
5565 rm -f "conftest.$ac_objext"
5566 if { (eval echo "$as_me:5566: \"$ac_compile\"") >&5
5567 (eval $ac_compile) 2>&5
5569 echo "$as_me:5569: \$? = $ac_status" >&5
5570 (exit "$ac_status"); } &&
5571 { ac_try='test -s "conftest.$ac_objext"'
5572 { (eval echo "$as_me:5572: \"$ac_try\"") >&5
5575 echo "$as_me:5575: \$? = $ac_status" >&5
5576 (exit "$ac_status"); }; }; then
5577 cf_cv_ncurses_h=$cf_header
5580 echo "$as_me: failed program was:" >&5
5581 cat "conftest.$ac_ext" >&5
5584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5586 test "$cf_cv_ncurses_h" != no && break
5590 echo "$as_me:5590: result: $cf_cv_ncurses_h" >&5
5591 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5593 if test "$cf_cv_ncurses_h" != no ; then
5594 cf_cv_ncurses_header=$cf_cv_ncurses_h
5597 echo "$as_me:5597: checking for $cf_ncuhdr_root include-path" >&5
5598 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5599 if test "${cf_cv_ncurses_h2+set}" = set; then
5600 echo $ECHO_N "(cached) $ECHO_C" >&6
5603 test -n "$verbose" && echo
5607 # collect the current set of include-directories from compiler flags
5608 cf_header_path_list=""
5609 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5610 for cf_header_path in $CPPFLAGS $CFLAGS
5612 case "$cf_header_path" in
5614 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5616 test "x$cf_header_path" != "xNONE" && \
5617 test -d "$cf_header_path" && \
5619 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5620 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5621 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5622 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5623 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5624 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"
5627 cf_header_path_list="$cf_header_path_list $cf_search"
5633 # add the variations for the package we are looking for
5637 test "x$prefix" != "xNONE" && \
5638 test -d "$prefix" && \
5640 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5641 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5642 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5643 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5644 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5645 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5648 for cf_subdir_prefix in \
5657 test "x$cf_subdir_prefix" != "x$prefix" && \
5658 test -d "$cf_subdir_prefix" && \
5659 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5660 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5661 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5662 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5663 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5664 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5665 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"
5670 test "$includedir" != NONE && \
5671 test "$includedir" != "/usr/include" && \
5672 test -d "$includedir" && {
5673 test -d "$includedir" && cf_search="$cf_search $includedir"
5674 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5677 test "$oldincludedir" != NONE && \
5678 test "$oldincludedir" != "/usr/include" && \
5679 test -d "$oldincludedir" && {
5680 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5681 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5684 cf_search="$cf_search $cf_header_path_list"
5686 test -n "$verbose" && echo "search path $cf_search"
5687 cf_save2_CPPFLAGS="$CPPFLAGS"
5688 for cf_incdir in $cf_search
5691 if test -n "$cf_incdir" ; then
5692 for cf_add_incdir in $cf_incdir
5694 while test "$cf_add_incdir" != /usr/include
5696 if test -d "$cf_add_incdir"
5699 if test -n "$CFLAGS$CPPFLAGS" ; then
5700 # a loop is needed to ensure we can add subdirs of existing dirs
5701 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5702 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5703 cf_have_incdir=yes; break
5708 if test "$cf_have_incdir" = no ; then
5709 if test "$cf_add_incdir" = /usr/local/include ; then
5710 if test "$GCC" = yes
5712 cf_save_CPPFLAGS=$CPPFLAGS
5714 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5715 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5717 cat >"conftest.$ac_ext" <<_ACEOF
5718 #line 5718 "configure"
5719 #include "confdefs.h"
5729 rm -f "conftest.$ac_objext"
5730 if { (eval echo "$as_me:5730: \"$ac_compile\"") >&5
5731 (eval $ac_compile) 2>&5
5733 echo "$as_me:5733: \$? = $ac_status" >&5
5734 (exit "$ac_status"); } &&
5735 { ac_try='test -s "conftest.$ac_objext"'
5736 { (eval echo "$as_me:5736: \"$ac_try\"") >&5
5739 echo "$as_me:5739: \$? = $ac_status" >&5
5740 (exit "$ac_status"); }; }; then
5743 echo "$as_me: failed program was:" >&5
5744 cat "conftest.$ac_ext" >&5
5747 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5748 CPPFLAGS=$cf_save_CPPFLAGS
5753 if test "$cf_have_incdir" = no ; then
5754 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5756 echo "${as_me:-configure}:5756: testing adding $cf_add_incdir to include-path ..." 1>&5
5758 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5760 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5761 test "$cf_top_incdir" = "$cf_add_incdir" && break
5762 cf_add_incdir="$cf_top_incdir"
5778 cat >"conftest.$ac_ext" <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5782 #include <$cf_header>
5787 #ifdef NCURSES_VERSION
5789 printf("%s\\n", NCURSES_VERSION);
5802 rm -f "conftest.$ac_objext"
5803 if { (eval echo "$as_me:5803: \"$ac_compile\"") >&5
5804 (eval $ac_compile) 2>&5
5806 echo "$as_me:5806: \$? = $ac_status" >&5
5807 (exit "$ac_status"); } &&
5808 { ac_try='test -s "conftest.$ac_objext"'
5809 { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5812 echo "$as_me:5812: \$? = $ac_status" >&5
5813 (exit "$ac_status"); }; }; then
5814 cf_cv_ncurses_h2=$cf_header
5817 echo "$as_me: failed program was:" >&5
5818 cat "conftest.$ac_ext" >&5
5821 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5823 if test "$cf_cv_ncurses_h2" != no ; then
5824 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5825 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5828 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5830 CPPFLAGS="$cf_save2_CPPFLAGS"
5831 test "$cf_cv_ncurses_h2" != no && break
5833 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5833: error: not found" >&5
5834 echo "$as_me: error: not found" >&2;}
5835 { (exit 1); exit 1; }; }
5838 echo "$as_me:5838: result: $cf_cv_ncurses_h2" >&5
5839 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5841 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5842 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5843 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5844 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5847 if test -n "$cf_1st_incdir" ; then
5848 for cf_add_incdir in $cf_1st_incdir
5850 while test "$cf_add_incdir" != /usr/include
5852 if test -d "$cf_add_incdir"
5855 if test -n "$CFLAGS$CPPFLAGS" ; then
5856 # a loop is needed to ensure we can add subdirs of existing dirs
5857 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5858 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5859 cf_have_incdir=yes; break
5864 if test "$cf_have_incdir" = no ; then
5865 if test "$cf_add_incdir" = /usr/local/include ; then
5866 if test "$GCC" = yes
5868 cf_save_CPPFLAGS=$CPPFLAGS
5870 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5871 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5873 cat >"conftest.$ac_ext" <<_ACEOF
5874 #line 5874 "configure"
5875 #include "confdefs.h"
5885 rm -f "conftest.$ac_objext"
5886 if { (eval echo "$as_me:5886: \"$ac_compile\"") >&5
5887 (eval $ac_compile) 2>&5
5889 echo "$as_me:5889: \$? = $ac_status" >&5
5890 (exit "$ac_status"); } &&
5891 { ac_try='test -s "conftest.$ac_objext"'
5892 { (eval echo "$as_me:5892: \"$ac_try\"") >&5
5895 echo "$as_me:5895: \$? = $ac_status" >&5
5896 (exit "$ac_status"); }; }; then
5899 echo "$as_me: failed program was:" >&5
5900 cat "conftest.$ac_ext" >&5
5903 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5904 CPPFLAGS=$cf_save_CPPFLAGS
5909 if test "$cf_have_incdir" = no ; then
5910 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5912 echo "${as_me:-configure}:5912: testing adding $cf_add_incdir to include-path ..." 1>&5
5914 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5916 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5917 test "$cf_top_incdir" = "$cf_add_incdir" && break
5918 cf_add_incdir="$cf_top_incdir"
5931 # Set definitions to allow ifdef'ing for ncurses.h
5933 case "$cf_cv_ncurses_header" in
5936 cat >>confdefs.h <<\EOF
5937 #define HAVE_NCURSES_H 1
5943 case "$cf_cv_ncurses_header" in
5944 (ncurses/curses.h|ncurses/ncurses.h)
5946 cat >>confdefs.h <<\EOF
5947 #define HAVE_NCURSES_NCURSES_H 1
5951 (ncursesw/curses.h|ncursesw/ncurses.h)
5953 cat >>confdefs.h <<\EOF
5954 #define HAVE_NCURSESW_NCURSES_H 1
5960 echo "$as_me:5960: checking for terminfo header" >&5
5961 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5962 if test "${cf_cv_term_header+set}" = set; then
5963 echo $ECHO_N "(cached) $ECHO_C" >&6
5966 case "${cf_cv_ncurses_header}" in
5967 (*/ncurses.h|*/ncursesw.h)
5968 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5971 cf_term_header=term.h
5975 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5977 cat >"conftest.$ac_ext" <<_ACEOF
5978 #line 5978 "configure"
5979 #include "confdefs.h"
5981 #include <${cf_cv_ncurses_header:-curses.h}>
5987 int x = auto_left_margin; (void)x
5992 rm -f "conftest.$ac_objext"
5993 if { (eval echo "$as_me:5993: \"$ac_compile\"") >&5
5994 (eval $ac_compile) 2>&5
5996 echo "$as_me:5996: \$? = $ac_status" >&5
5997 (exit "$ac_status"); } &&
5998 { ac_try='test -s "conftest.$ac_objext"'
5999 { (eval echo "$as_me:5999: \"$ac_try\"") >&5
6002 echo "$as_me:6002: \$? = $ac_status" >&5
6003 (exit "$ac_status"); }; }; then
6005 cf_cv_term_header="$cf_test"
6007 echo "$as_me: failed program was:" >&5
6008 cat "conftest.$ac_ext" >&5
6010 cf_cv_term_header=unknown
6013 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6014 test "$cf_cv_term_header" != unknown && break
6018 echo "$as_me:6018: result: $cf_cv_term_header" >&5
6019 echo "${ECHO_T}$cf_cv_term_header" >&6
6021 # Set definitions to allow ifdef'ing to accommodate subdirectories
6023 case "$cf_cv_term_header" in
6026 cat >>confdefs.h <<\EOF
6027 #define HAVE_TERM_H 1
6033 case "$cf_cv_term_header" in
6036 cat >>confdefs.h <<\EOF
6037 #define HAVE_NCURSES_TERM_H 1
6043 cat >>confdefs.h <<\EOF
6044 #define HAVE_NCURSESW_TERM_H 1
6050 # some applications need this, but should check for NCURSES_VERSION
6052 cat >>confdefs.h <<\EOF
6056 echo "$as_me:6056: checking for ncurses version" >&5
6057 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6058 if test "${cf_cv_ncurses_version+set}" = set; then
6059 echo $ECHO_N "(cached) $ECHO_C" >&6
6062 cf_cv_ncurses_version=no
6064 rm -f "$cf_tempfile"
6065 if test "$cross_compiling" = yes; then
6067 # This will not work if the preprocessor splits the line after the
6068 # Autoconf token. The 'unproto' program does that.
6069 cat > "conftest.$ac_ext" <<EOF
6070 #include <${cf_cv_ncurses_header:-curses.h}>
6072 #ifdef NCURSES_VERSION
6073 Autoconf NCURSES_VERSION
6081 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6082 { (eval echo "$as_me:6082: \"$cf_try\"") >&5
6085 echo "$as_me:6085: \$? = $ac_status" >&5
6086 (exit "$ac_status"); }
6087 if test -f conftest.out ; then
6088 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6089 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6094 cat >"conftest.$ac_ext" <<_ACEOF
6095 #line 6095 "configure"
6096 #include "confdefs.h"
6098 #include <${cf_cv_ncurses_header:-curses.h}>
6102 FILE *fp = fopen("$cf_tempfile", "w");
6103 #ifdef NCURSES_VERSION
6104 # ifdef NCURSES_VERSION_PATCH
6105 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6107 fprintf(fp, "%s\\n", NCURSES_VERSION);
6111 fprintf(fp, "old\\n");
6116 ${cf_cv_main_return:-return}(0);
6119 rm -f "conftest$ac_exeext"
6120 if { (eval echo "$as_me:6120: \"$ac_link\"") >&5
6121 (eval $ac_link) 2>&5
6123 echo "$as_me:6123: \$? = $ac_status" >&5
6124 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6125 { (eval echo "$as_me:6125: \"$ac_try\"") >&5
6128 echo "$as_me:6128: \$? = $ac_status" >&5
6129 (exit "$ac_status"); }; }; then
6131 cf_cv_ncurses_version=`cat $cf_tempfile`
6133 echo "$as_me: program exited with status $ac_status" >&5
6134 echo "$as_me: failed program was:" >&5
6135 cat "conftest.$ac_ext" >&5
6137 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6139 rm -f "$cf_tempfile"
6142 echo "$as_me:6142: result: $cf_cv_ncurses_version" >&5
6143 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6144 test "$cf_cv_ncurses_version" = no ||
6145 cat >>confdefs.h <<\EOF
6149 cf_nculib_root=ncurses
6150 # This works, except for the special case where we find gpm, but
6151 # ncurses is in a nonstandard location via $LIBS, and we really want
6154 cf_ncurses_SAVE="$LIBS"
6155 echo "$as_me:6155: checking for Gpm_Open in -lgpm" >&5
6156 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6157 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6158 echo $ECHO_N "(cached) $ECHO_C" >&6
6160 ac_check_lib_save_LIBS=$LIBS
6162 cat >"conftest.$ac_ext" <<_ACEOF
6163 #line 6163 "configure"
6164 #include "confdefs.h"
6166 /* Override any gcc2 internal prototype to avoid an error. */
6170 /* We use char because int might match the return type of a gcc2
6171 builtin and then its argument prototype would still apply. */
6181 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6182 if { (eval echo "$as_me:6182: \"$ac_link\"") >&5
6183 (eval $ac_link) 2>&5
6185 echo "$as_me:6185: \$? = $ac_status" >&5
6186 (exit "$ac_status"); } &&
6187 { ac_try='test -s "conftest$ac_exeext"'
6188 { (eval echo "$as_me:6188: \"$ac_try\"") >&5
6191 echo "$as_me:6191: \$? = $ac_status" >&5
6192 (exit "$ac_status"); }; }; then
6193 ac_cv_lib_gpm_Gpm_Open=yes
6195 echo "$as_me: failed program was:" >&5
6196 cat "conftest.$ac_ext" >&5
6197 ac_cv_lib_gpm_Gpm_Open=no
6199 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6200 LIBS=$ac_check_lib_save_LIBS
6202 echo "$as_me:6202: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6203 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6204 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6205 echo "$as_me:6205: checking for initscr in -lgpm" >&5
6206 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6207 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6208 echo $ECHO_N "(cached) $ECHO_C" >&6
6210 ac_check_lib_save_LIBS=$LIBS
6212 cat >"conftest.$ac_ext" <<_ACEOF
6213 #line 6213 "configure"
6214 #include "confdefs.h"
6216 /* Override any gcc2 internal prototype to avoid an error. */
6220 /* We use char because int might match the return type of a gcc2
6221 builtin and then its argument prototype would still apply. */
6231 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6232 if { (eval echo "$as_me:6232: \"$ac_link\"") >&5
6233 (eval $ac_link) 2>&5
6235 echo "$as_me:6235: \$? = $ac_status" >&5
6236 (exit "$ac_status"); } &&
6237 { ac_try='test -s "conftest$ac_exeext"'
6238 { (eval echo "$as_me:6238: \"$ac_try\"") >&5
6241 echo "$as_me:6241: \$? = $ac_status" >&5
6242 (exit "$ac_status"); }; }; then
6243 ac_cv_lib_gpm_initscr=yes
6245 echo "$as_me: failed program was:" >&5
6246 cat "conftest.$ac_ext" >&5
6247 ac_cv_lib_gpm_initscr=no
6249 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6250 LIBS=$ac_check_lib_save_LIBS
6252 echo "$as_me:6252: result: $ac_cv_lib_gpm_initscr" >&5
6253 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6254 if test "$ac_cv_lib_gpm_initscr" = yes; then
6255 LIBS="$cf_ncurses_SAVE"
6257 cf_ncurses_LIBS="-lgpm"
6264 # This is only necessary if you are linking against an obsolete
6265 # version of ncurses (but it should do no harm, since it is static).
6266 if test "$cf_nculib_root" = ncurses ; then
6267 echo "$as_me:6267: checking for tgoto in -lmytinfo" >&5
6268 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6269 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6270 echo $ECHO_N "(cached) $ECHO_C" >&6
6272 ac_check_lib_save_LIBS=$LIBS
6273 LIBS="-lmytinfo $LIBS"
6274 cat >"conftest.$ac_ext" <<_ACEOF
6275 #line 6275 "configure"
6276 #include "confdefs.h"
6278 /* Override any gcc2 internal prototype to avoid an error. */
6282 /* We use char because int might match the return type of a gcc2
6283 builtin and then its argument prototype would still apply. */
6293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6294 if { (eval echo "$as_me:6294: \"$ac_link\"") >&5
6295 (eval $ac_link) 2>&5
6297 echo "$as_me:6297: \$? = $ac_status" >&5
6298 (exit "$ac_status"); } &&
6299 { ac_try='test -s "conftest$ac_exeext"'
6300 { (eval echo "$as_me:6300: \"$ac_try\"") >&5
6303 echo "$as_me:6303: \$? = $ac_status" >&5
6304 (exit "$ac_status"); }; }; then
6305 ac_cv_lib_mytinfo_tgoto=yes
6307 echo "$as_me: failed program was:" >&5
6308 cat "conftest.$ac_ext" >&5
6309 ac_cv_lib_mytinfo_tgoto=no
6311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6312 LIBS=$ac_check_lib_save_LIBS
6314 echo "$as_me:6314: result: $ac_cv_lib_mytinfo_tgoto" >&5
6315 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6316 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6317 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6327 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6329 for cf_add_1lib in $cf_add_0lib; do
6330 for cf_add_2lib in $cf_add_libs; do
6331 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6336 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6340 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6346 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6348 for cf_add_1lib in $cf_add_0lib; do
6349 for cf_add_2lib in $cf_add_libs; do
6350 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6355 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6361 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6363 echo "$as_me:6363: checking for initscr" >&5
6364 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6365 if test "${ac_cv_func_initscr+set}" = set; then
6366 echo $ECHO_N "(cached) $ECHO_C" >&6
6368 cat >"conftest.$ac_ext" <<_ACEOF
6369 #line 6369 "configure"
6370 #include "confdefs.h"
6371 #define initscr autoconf_temporary
6372 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6379 /* We use char because int might match the return type of a gcc2
6380 builtin and then its argument prototype would still apply. */
6381 char initscr (void);
6387 /* The GNU C library defines stubs for functions which it implements
6388 to always fail with ENOSYS. Some functions are actually named
6389 something starting with __ and the normal name is an alias. */
6390 #if defined (__stub_initscr) || defined (__stub___initscr)
6391 #error found stub for initscr
6399 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6400 if { (eval echo "$as_me:6400: \"$ac_link\"") >&5
6401 (eval $ac_link) 2>&5
6403 echo "$as_me:6403: \$? = $ac_status" >&5
6404 (exit "$ac_status"); } &&
6405 { ac_try='test -s "conftest$ac_exeext"'
6406 { (eval echo "$as_me:6406: \"$ac_try\"") >&5
6409 echo "$as_me:6409: \$? = $ac_status" >&5
6410 (exit "$ac_status"); }; }; then
6411 ac_cv_func_initscr=yes
6413 echo "$as_me: failed program was:" >&5
6414 cat "conftest.$ac_ext" >&5
6415 ac_cv_func_initscr=no
6417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6419 echo "$as_me:6419: result: $ac_cv_func_initscr" >&5
6420 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6421 if test "$ac_cv_func_initscr" = yes; then
6422 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6425 cf_save_LIBS="$LIBS"
6426 echo "$as_me:6426: checking for initscr in -l$cf_nculib_root" >&5
6427 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6428 LIBS="-l$cf_nculib_root $LIBS"
6429 cat >"conftest.$ac_ext" <<_ACEOF
6430 #line 6430 "configure"
6431 #include "confdefs.h"
6432 #include <${cf_cv_ncurses_header:-curses.h}>
6441 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6442 if { (eval echo "$as_me:6442: \"$ac_link\"") >&5
6443 (eval $ac_link) 2>&5
6445 echo "$as_me:6445: \$? = $ac_status" >&5
6446 (exit "$ac_status"); } &&
6447 { ac_try='test -s "conftest$ac_exeext"'
6448 { (eval echo "$as_me:6448: \"$ac_try\"") >&5
6451 echo "$as_me:6451: \$? = $ac_status" >&5
6452 (exit "$ac_status"); }; }; then
6453 echo "$as_me:6453: result: yes" >&5
6454 echo "${ECHO_T}yes" >&6
6455 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6458 echo "$as_me: failed program was:" >&5
6459 cat "conftest.$ac_ext" >&5
6460 echo "$as_me:6460: result: no" >&5
6461 echo "${ECHO_T}no" >&6
6464 cf_library_path_list=""
6465 if test -n "${LDFLAGS}${LIBS}" ; then
6466 for cf_library_path in $LDFLAGS $LIBS
6468 case "$cf_library_path" in
6470 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6472 test "x$cf_library_path" != "xNONE" && \
6473 test -d "$cf_library_path" && \
6475 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6476 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6477 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6478 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6479 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6480 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"
6483 cf_library_path_list="$cf_library_path_list $cf_search"
6491 test "x$prefix" != "xNONE" && \
6492 test -d "$prefix" && \
6494 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6495 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6496 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6497 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6498 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6499 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6502 for cf_subdir_prefix in \
6511 test "x$cf_subdir_prefix" != "x$prefix" && \
6512 test -d "$cf_subdir_prefix" && \
6513 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6514 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6515 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6516 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6517 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6518 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6519 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"
6524 cf_search="$cf_library_path_list $cf_search"
6526 for cf_libdir in $cf_search
6528 echo "$as_me:6528: checking for -l$cf_nculib_root in $cf_libdir" >&5
6529 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6530 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6531 cat >"conftest.$ac_ext" <<_ACEOF
6532 #line 6532 "configure"
6533 #include "confdefs.h"
6534 #include <${cf_cv_ncurses_header:-curses.h}>
6543 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6544 if { (eval echo "$as_me:6544: \"$ac_link\"") >&5
6545 (eval $ac_link) 2>&5
6547 echo "$as_me:6547: \$? = $ac_status" >&5
6548 (exit "$ac_status"); } &&
6549 { ac_try='test -s "conftest$ac_exeext"'
6550 { (eval echo "$as_me:6550: \"$ac_try\"") >&5
6553 echo "$as_me:6553: \$? = $ac_status" >&5
6554 (exit "$ac_status"); }; }; then
6555 echo "$as_me:6555: result: yes" >&5
6556 echo "${ECHO_T}yes" >&6
6557 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6560 echo "$as_me: failed program was:" >&5
6561 cat "conftest.$ac_ext" >&5
6562 echo "$as_me:6562: result: no" >&5
6563 echo "${ECHO_T}no" >&6
6564 LIBS="$cf_save_LIBS"
6566 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6574 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6576 if test "$cf_found_library" = no ; then
6577 { { echo "$as_me:6577: error: Cannot link $cf_nculib_root library" >&5
6578 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6579 { (exit 1); exit 1; }; }
6584 if test -n "$cf_ncurses_LIBS" ; then
6585 echo "$as_me:6585: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6586 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6587 cf_ncurses_SAVE="$LIBS"
6588 for p in $cf_ncurses_LIBS ; do
6589 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6590 if test "$q" != "$LIBS" ; then
6594 cat >"conftest.$ac_ext" <<_ACEOF
6595 #line 6595 "configure"
6596 #include "confdefs.h"
6597 #include <${cf_cv_ncurses_header:-curses.h}>
6601 initscr(); mousemask(0,0); tigetstr((char *)0);
6606 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6607 if { (eval echo "$as_me:6607: \"$ac_link\"") >&5
6608 (eval $ac_link) 2>&5
6610 echo "$as_me:6610: \$? = $ac_status" >&5
6611 (exit "$ac_status"); } &&
6612 { ac_try='test -s "conftest$ac_exeext"'
6613 { (eval echo "$as_me:6613: \"$ac_try\"") >&5
6616 echo "$as_me:6616: \$? = $ac_status" >&5
6617 (exit "$ac_status"); }; }; then
6618 echo "$as_me:6618: result: yes" >&5
6619 echo "${ECHO_T}yes" >&6
6621 echo "$as_me: failed program was:" >&5
6622 cat "conftest.$ac_ext" >&5
6623 echo "$as_me:6623: result: no" >&5
6624 echo "${ECHO_T}no" >&6
6625 LIBS="$cf_ncurses_SAVE"
6627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6630 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6632 cat >>confdefs.h <<EOF
6633 #define $cf_nculib_ROOT 1
6641 echo "$as_me:6641: checking if you want wide-character code" >&5
6642 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6644 # Check whether --enable-widec or --disable-widec was given.
6645 if test "${enable_widec+set}" = set; then
6646 enableval="$enable_widec"
6647 with_widec=$enableval
6651 echo "$as_me:6651: result: $with_widec" >&5
6652 echo "${ECHO_T}$with_widec" >&6
6653 if test "$with_widec" = yes ; then
6655 for ac_header in wchar.h
6657 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6658 echo "$as_me:6658: checking for $ac_header" >&5
6659 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6660 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6661 echo $ECHO_N "(cached) $ECHO_C" >&6
6663 cat >"conftest.$ac_ext" <<_ACEOF
6664 #line 6664 "configure"
6665 #include "confdefs.h"
6666 #include <$ac_header>
6668 if { (eval echo "$as_me:6668: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6669 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6671 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6673 cat conftest.err >&5
6674 echo "$as_me:6674: \$? = $ac_status" >&5
6675 (exit "$ac_status"); } >/dev/null; then
6676 if test -s conftest.err; then
6677 ac_cpp_err=$ac_c_preproc_warn_flag
6684 if test -z "$ac_cpp_err"; then
6685 eval "$as_ac_Header=yes"
6687 echo "$as_me: failed program was:" >&5
6688 cat "conftest.$ac_ext" >&5
6689 eval "$as_ac_Header=no"
6691 rm -f conftest.err "conftest.$ac_ext"
6693 echo "$as_me:6693: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6694 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6695 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6696 cat >>confdefs.h <<EOF
6697 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6703 echo "$as_me:6703: checking for multibyte character support" >&5
6704 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6705 if test "${cf_cv_utf8_lib+set}" = set; then
6706 echo $ECHO_N "(cached) $ECHO_C" >&6
6709 cf_save_LIBS="$LIBS"
6710 cat >"conftest.$ac_ext" <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6729 if { (eval echo "$as_me:6729: \"$ac_link\"") >&5
6730 (eval $ac_link) 2>&5
6732 echo "$as_me:6732: \$? = $ac_status" >&5
6733 (exit "$ac_status"); } &&
6734 { ac_try='test -s "conftest$ac_exeext"'
6735 { (eval echo "$as_me:6735: \"$ac_try\"") >&5
6738 echo "$as_me:6738: \$? = $ac_status" >&5
6739 (exit "$ac_status"); }; }; then
6742 echo "$as_me: failed program was:" >&5
6743 cat "conftest.$ac_ext" >&5
6745 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6746 # will be set on completion of the AC_TRY_LINK below.
6747 cf_cv_header_path_utf8=
6748 cf_cv_library_path_utf8=
6750 echo "${as_me:-configure}:6750: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6752 cf_save_LIBS="$LIBS"
6754 cat >"conftest.$ac_ext" <<_ACEOF
6755 #line 6755 "configure"
6756 #include "confdefs.h"
6758 #include <libutf8.h>
6767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6768 if { (eval echo "$as_me:6768: \"$ac_link\"") >&5
6769 (eval $ac_link) 2>&5
6771 echo "$as_me:6771: \$? = $ac_status" >&5
6772 (exit "$ac_status"); } &&
6773 { ac_try='test -s "conftest$ac_exeext"'
6774 { (eval echo "$as_me:6774: \"$ac_try\"") >&5
6777 echo "$as_me:6777: \$? = $ac_status" >&5
6778 (exit "$ac_status"); }; }; then
6780 cf_cv_find_linkage_utf8=yes
6781 cf_cv_header_path_utf8=/usr/include
6782 cf_cv_library_path_utf8=/usr/lib
6785 echo "$as_me: failed program was:" >&5
6786 cat "conftest.$ac_ext" >&5
6788 LIBS="-lutf8 $cf_save_LIBS"
6790 cat >"conftest.$ac_ext" <<_ACEOF
6791 #line 6791 "configure"
6792 #include "confdefs.h"
6794 #include <libutf8.h>
6803 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6804 if { (eval echo "$as_me:6804: \"$ac_link\"") >&5
6805 (eval $ac_link) 2>&5
6807 echo "$as_me:6807: \$? = $ac_status" >&5
6808 (exit "$ac_status"); } &&
6809 { ac_try='test -s "conftest$ac_exeext"'
6810 { (eval echo "$as_me:6810: \"$ac_try\"") >&5
6813 echo "$as_me:6813: \$? = $ac_status" >&5
6814 (exit "$ac_status"); }; }; then
6816 cf_cv_find_linkage_utf8=yes
6817 cf_cv_header_path_utf8=/usr/include
6818 cf_cv_library_path_utf8=/usr/lib
6819 cf_cv_library_file_utf8="-lutf8"
6822 echo "$as_me: failed program was:" >&5
6823 cat "conftest.$ac_ext" >&5
6825 cf_cv_find_linkage_utf8=no
6826 LIBS="$cf_save_LIBS"
6828 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6830 echo "${as_me:-configure}:6830: testing find linkage for utf8 library ..." 1>&5
6832 echo "${as_me:-configure}:6832: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6834 cf_save_CPPFLAGS="$CPPFLAGS"
6835 cf_test_CPPFLAGS="$CPPFLAGS"
6839 # collect the current set of include-directories from compiler flags
6840 cf_header_path_list=""
6841 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6842 for cf_header_path in $CPPFLAGS $CFLAGS
6844 case "$cf_header_path" in
6846 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6848 test "x$cf_header_path" != "xNONE" && \
6849 test -d "$cf_header_path" && \
6851 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6852 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6853 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6854 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6855 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6856 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6859 cf_header_path_list="$cf_header_path_list $cf_search"
6865 # add the variations for the package we are looking for
6869 test "x$prefix" != "xNONE" && \
6870 test -d "$prefix" && \
6872 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6873 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6874 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6875 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6876 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6877 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6880 for cf_subdir_prefix in \
6889 test "x$cf_subdir_prefix" != "x$prefix" && \
6890 test -d "$cf_subdir_prefix" && \
6891 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6892 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6893 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6894 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6895 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6896 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6897 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6902 test "$includedir" != NONE && \
6903 test "$includedir" != "/usr/include" && \
6904 test -d "$includedir" && {
6905 test -d "$includedir" && cf_search="$cf_search $includedir"
6906 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6909 test "$oldincludedir" != NONE && \
6910 test "$oldincludedir" != "/usr/include" && \
6911 test -d "$oldincludedir" && {
6912 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6913 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6916 cf_search="$cf_search $cf_header_path_list"
6918 for cf_cv_header_path_utf8 in $cf_search
6920 if test -d "$cf_cv_header_path_utf8" ; then
6921 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6923 echo "${as_me:-configure}:6923: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6925 CPPFLAGS="$cf_save_CPPFLAGS"
6927 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6928 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6930 cat >"conftest.$ac_ext" <<_ACEOF
6931 #line 6931 "configure"
6932 #include "confdefs.h"
6934 #include <libutf8.h>
6943 rm -f "conftest.$ac_objext"
6944 if { (eval echo "$as_me:6944: \"$ac_compile\"") >&5
6945 (eval $ac_compile) 2>&5
6947 echo "$as_me:6947: \$? = $ac_status" >&5
6948 (exit "$ac_status"); } &&
6949 { ac_try='test -s "conftest.$ac_objext"'
6950 { (eval echo "$as_me:6950: \"$ac_try\"") >&5
6953 echo "$as_me:6953: \$? = $ac_status" >&5
6954 (exit "$ac_status"); }; }; then
6956 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6958 echo "${as_me:-configure}:6958: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6960 cf_cv_find_linkage_utf8=maybe
6961 cf_test_CPPFLAGS="$CPPFLAGS"
6964 echo "$as_me: failed program was:" >&5
6965 cat "conftest.$ac_ext" >&5
6967 CPPFLAGS="$cf_save_CPPFLAGS"
6970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6974 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6976 echo "${as_me:-configure}:6976: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6978 cf_save_LIBS="$LIBS"
6979 cf_save_LDFLAGS="$LDFLAGS"
6981 if test "$cf_cv_find_linkage_utf8" != yes ; then
6984 cf_library_path_list=""
6985 if test -n "${LDFLAGS}${LIBS}" ; then
6986 for cf_library_path in $LDFLAGS $LIBS
6988 case "$cf_library_path" in
6990 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6992 test "x$cf_library_path" != "xNONE" && \
6993 test -d "$cf_library_path" && \
6995 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6996 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6997 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6998 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6999 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7000 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7003 cf_library_path_list="$cf_library_path_list $cf_search"
7011 test "x$prefix" != "xNONE" && \
7012 test -d "$prefix" && \
7014 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7015 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7016 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7017 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7018 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7019 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7022 for cf_subdir_prefix in \
7031 test "x$cf_subdir_prefix" != "x$prefix" && \
7032 test -d "$cf_subdir_prefix" && \
7033 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7034 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7035 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7036 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7037 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7038 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7039 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7044 cf_search="$cf_library_path_list $cf_search"
7046 for cf_cv_library_path_utf8 in $cf_search
7048 if test -d "$cf_cv_library_path_utf8" ; then
7049 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7051 echo "${as_me:-configure}:7051: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7053 CPPFLAGS="$cf_test_CPPFLAGS"
7054 LIBS="-lutf8 $cf_save_LIBS"
7055 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7056 cat >"conftest.$ac_ext" <<_ACEOF
7057 #line 7057 "configure"
7058 #include "confdefs.h"
7060 #include <libutf8.h>
7069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7070 if { (eval echo "$as_me:7070: \"$ac_link\"") >&5
7071 (eval $ac_link) 2>&5
7073 echo "$as_me:7073: \$? = $ac_status" >&5
7074 (exit "$ac_status"); } &&
7075 { ac_try='test -s "conftest$ac_exeext"'
7076 { (eval echo "$as_me:7076: \"$ac_try\"") >&5
7079 echo "$as_me:7079: \$? = $ac_status" >&5
7080 (exit "$ac_status"); }; }; then
7082 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7084 echo "${as_me:-configure}:7084: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7086 cf_cv_find_linkage_utf8=yes
7087 cf_cv_library_file_utf8="-lutf8"
7090 echo "$as_me: failed program was:" >&5
7091 cat "conftest.$ac_ext" >&5
7093 CPPFLAGS="$cf_save_CPPFLAGS"
7094 LIBS="$cf_save_LIBS"
7095 LDFLAGS="$cf_save_LDFLAGS"
7098 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7101 CPPFLAGS="$cf_save_CPPFLAGS"
7102 LDFLAGS="$cf_save_LDFLAGS"
7106 cf_cv_find_linkage_utf8=no
7110 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7113 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7115 LIBS="$cf_save_LIBS"
7117 if test "$cf_cv_find_linkage_utf8" = yes ; then
7118 cf_cv_utf8_lib=add-on
7124 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7126 echo "$as_me:7126: result: $cf_cv_utf8_lib" >&5
7127 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7129 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7131 if test "$cf_cv_utf8_lib" = "add-on" ; then
7133 cat >>confdefs.h <<\EOF
7134 #define HAVE_LIBUTF8_H 1
7137 if test -n "$cf_cv_header_path_utf8" ; then
7138 for cf_add_incdir in $cf_cv_header_path_utf8
7140 while test "$cf_add_incdir" != /usr/include
7142 if test -d "$cf_add_incdir"
7145 if test -n "$CFLAGS$CPPFLAGS" ; then
7146 # a loop is needed to ensure we can add subdirs of existing dirs
7147 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7148 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7149 cf_have_incdir=yes; break
7154 if test "$cf_have_incdir" = no ; then
7155 if test "$cf_add_incdir" = /usr/local/include ; then
7156 if test "$GCC" = yes
7158 cf_save_CPPFLAGS=$CPPFLAGS
7160 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7161 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7163 cat >"conftest.$ac_ext" <<_ACEOF
7164 #line 7164 "configure"
7165 #include "confdefs.h"
7175 rm -f "conftest.$ac_objext"
7176 if { (eval echo "$as_me:7176: \"$ac_compile\"") >&5
7177 (eval $ac_compile) 2>&5
7179 echo "$as_me:7179: \$? = $ac_status" >&5
7180 (exit "$ac_status"); } &&
7181 { ac_try='test -s "conftest.$ac_objext"'
7182 { (eval echo "$as_me:7182: \"$ac_try\"") >&5
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit "$ac_status"); }; }; then
7189 echo "$as_me: failed program was:" >&5
7190 cat "conftest.$ac_ext" >&5
7193 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7194 CPPFLAGS=$cf_save_CPPFLAGS
7199 if test "$cf_have_incdir" = no ; then
7200 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7202 echo "${as_me:-configure}:7202: testing adding $cf_add_incdir to include-path ..." 1>&5
7204 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7206 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7207 test "$cf_top_incdir" = "$cf_add_incdir" && break
7208 cf_add_incdir="$cf_top_incdir"
7219 if test -n "$cf_cv_library_path_utf8" ; then
7220 for cf_add_libdir in $cf_cv_library_path_utf8
7222 if test "$cf_add_libdir" = /usr/lib ; then
7224 elif test -d "$cf_add_libdir"
7227 if test -n "$LDFLAGS$LIBS" ; then
7228 # a loop is needed to ensure we can add subdirs of existing dirs
7229 for cf_test_libdir in $LDFLAGS $LIBS ; do
7230 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7231 cf_have_libdir=yes; break
7235 if test "$cf_have_libdir" = no ; then
7236 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7238 echo "${as_me:-configure}:7238: testing adding $cf_add_libdir to library-path ..." 1>&5
7240 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7249 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7251 for cf_add_1lib in $cf_add_0lib; do
7252 for cf_add_2lib in $cf_add_libs; do
7253 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7258 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7264 cf_ncuconfig_root=ncursesw
7265 cf_have_ncuconfig=no
7267 if test "x${PKG_CONFIG:=none}" != xnone; then
7268 echo "$as_me:7268: checking pkg-config for $cf_ncuconfig_root" >&5
7269 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7270 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7271 echo "$as_me:7271: result: yes" >&5
7272 echo "${ECHO_T}yes" >&6
7274 echo "$as_me:7274: checking if the $cf_ncuconfig_root package files work" >&5
7275 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7276 cf_have_ncuconfig=unknown
7278 cf_save_CFLAGS="$CFLAGS"
7279 cf_save_CPPFLAGS="$CPPFLAGS"
7280 cf_save_LIBS="$LIBS"
7282 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7283 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7285 # while -W for passing linker flags is prevalent, it is not "standard".
7286 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7287 # incompatible _and_ non-standard -W option which gives an error. Work
7288 # around that pitfall.
7289 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7295 cf_new_extra_cppflags=
7297 for cf_add_cflags in $cf_pkg_cflags
7299 case "$cf_fix_cppflags" in
7301 case "$cf_add_cflags" in
7302 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7303 case "$cf_add_cflags" in
7305 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7307 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7308 && test -z "${cf_tst_cflags}" \
7309 && cf_fix_cppflags=yes
7311 if test "$cf_fix_cppflags" = yes ; then
7313 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7314 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7317 elif test "${cf_tst_cflags}" = "\"'" ; then
7319 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7320 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7330 case "$cf_add_cflags" in
7332 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7334 CPPFLAGS=`echo "$CPPFLAGS" | \
7335 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7336 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7341 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7342 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7349 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7350 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7357 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7358 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7360 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7362 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7363 && test -z "${cf_tst_cflags}" \
7364 && cf_fix_cppflags=no
7369 if test -n "$cf_new_cflags" ; then
7371 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7372 CFLAGS="${CFLAGS}$cf_new_cflags"
7376 if test -n "$cf_new_cppflags" ; then
7378 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7379 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7383 if test -n "$cf_new_extra_cppflags" ; then
7385 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7386 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7393 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7395 for cf_add_1lib in $cf_add_0lib; do
7396 for cf_add_2lib in $cf_add_libs; do
7397 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7402 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7406 cat >"conftest.$ac_ext" <<_ACEOF
7407 #line 7407 "configure"
7408 #include "confdefs.h"
7409 #include <${cf_cv_ncurses_header:-curses.h}>
7413 initscr(); mousemask(0,0); tigetstr((char *)0);
7418 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7419 if { (eval echo "$as_me:7419: \"$ac_link\"") >&5
7420 (eval $ac_link) 2>&5
7422 echo "$as_me:7422: \$? = $ac_status" >&5
7423 (exit "$ac_status"); } &&
7424 { ac_try='test -s "conftest$ac_exeext"'
7425 { (eval echo "$as_me:7425: \"$ac_try\"") >&5
7428 echo "$as_me:7428: \$? = $ac_status" >&5
7429 (exit "$ac_status"); }; }; then
7430 if test "$cross_compiling" = yes; then
7431 cf_test_ncuconfig=maybe
7433 cat >"conftest.$ac_ext" <<_ACEOF
7434 #line 7434 "configure"
7435 #include "confdefs.h"
7436 #include <${cf_cv_ncurses_header:-curses.h}>
7438 { const char *xx = curses_version(); return (xx == 0); }
7440 rm -f "conftest$ac_exeext"
7441 if { (eval echo "$as_me:7441: \"$ac_link\"") >&5
7442 (eval $ac_link) 2>&5
7444 echo "$as_me:7444: \$? = $ac_status" >&5
7445 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7446 { (eval echo "$as_me:7446: \"$ac_try\"") >&5
7449 echo "$as_me:7449: \$? = $ac_status" >&5
7450 (exit "$ac_status"); }; }; then
7451 cf_test_ncuconfig=yes
7453 echo "$as_me: program exited with status $ac_status" >&5
7454 echo "$as_me: failed program was:" >&5
7455 cat "conftest.$ac_ext" >&5
7456 cf_test_ncuconfig=no
7458 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7461 echo "$as_me: failed program was:" >&5
7462 cat "conftest.$ac_ext" >&5
7463 cf_test_ncuconfig=no
7465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7467 CFLAGS="$cf_save_CFLAGS"
7468 CPPFLAGS="$cf_save_CPPFLAGS"
7469 LIBS="$cf_save_LIBS"
7471 if test "x$cf_test_ncuconfig" != xyes; then
7472 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7473 cf_pkg_cflags="$cf_temp"
7474 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7475 cf_pkg_libs="$cf_temp"
7480 for cf_add_cflags in $cf_pkg_cflags
7482 case "x$cf_add_cflags" in
7485 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7488 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'`
7489 test "$CFLAGS" != "$cf_old_cflag" || break
7491 CFLAGS="$cf_old_cflag"
7494 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7497 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'`
7498 test "$CPPFLAGS" != "$cf_old_cflag" || break
7500 CPPFLAGS="$cf_old_cflag"
7509 cf_new_extra_cppflags=
7511 for cf_add_cflags in $cf_add_cflags
7513 case "$cf_fix_cppflags" in
7515 case "$cf_add_cflags" in
7516 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7517 case "$cf_add_cflags" in
7519 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7521 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7522 && test -z "${cf_tst_cflags}" \
7523 && cf_fix_cppflags=yes
7525 if test "$cf_fix_cppflags" = yes ; then
7527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7531 elif test "${cf_tst_cflags}" = "\"'" ; then
7533 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7534 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7544 case "$cf_add_cflags" in
7546 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7548 CPPFLAGS=`echo "$CPPFLAGS" | \
7549 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7550 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7555 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7556 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7563 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7564 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7571 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7572 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7574 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7576 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7577 && test -z "${cf_tst_cflags}" \
7578 && cf_fix_cppflags=no
7583 if test -n "$cf_new_cflags" ; then
7585 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7586 CFLAGS="${CFLAGS}$cf_new_cflags"
7590 if test -n "$cf_new_cppflags" ; then
7592 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7593 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7597 if test -n "$cf_new_extra_cppflags" ; then
7599 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7600 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7609 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7611 for cf_add_1lib in $cf_add_0lib; do
7612 for cf_add_2lib in $cf_add_libs; do
7613 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7618 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7622 cat >"conftest.$ac_ext" <<_ACEOF
7623 #line 7623 "configure"
7624 #include "confdefs.h"
7625 #include <${cf_cv_ncurses_header:-curses.h}>
7629 initscr(); mousemask(0,0); tigetstr((char *)0);
7634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7635 if { (eval echo "$as_me:7635: \"$ac_link\"") >&5
7636 (eval $ac_link) 2>&5
7638 echo "$as_me:7638: \$? = $ac_status" >&5
7639 (exit "$ac_status"); } &&
7640 { ac_try='test -s "conftest$ac_exeext"'
7641 { (eval echo "$as_me:7641: \"$ac_try\"") >&5
7644 echo "$as_me:7644: \$? = $ac_status" >&5
7645 (exit "$ac_status"); }; }; then
7646 if test "$cross_compiling" = yes; then
7647 cf_have_ncuconfig=maybe
7649 cat >"conftest.$ac_ext" <<_ACEOF
7650 #line 7650 "configure"
7651 #include "confdefs.h"
7652 #include <${cf_cv_ncurses_header:-curses.h}>
7654 { const char *xx = curses_version(); return (xx == 0); }
7656 rm -f "conftest$ac_exeext"
7657 if { (eval echo "$as_me:7657: \"$ac_link\"") >&5
7658 (eval $ac_link) 2>&5
7660 echo "$as_me:7660: \$? = $ac_status" >&5
7661 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7662 { (eval echo "$as_me:7662: \"$ac_try\"") >&5
7665 echo "$as_me:7665: \$? = $ac_status" >&5
7666 (exit "$ac_status"); }; }; then
7667 cf_have_ncuconfig=yes
7669 echo "$as_me: program exited with status $ac_status" >&5
7670 echo "$as_me: failed program was:" >&5
7671 cat "conftest.$ac_ext" >&5
7672 cf_have_ncuconfig=no
7674 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7677 echo "$as_me: failed program was:" >&5
7678 cat "conftest.$ac_ext" >&5
7679 cf_have_ncuconfig=no
7681 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7682 echo "$as_me:7682: result: $cf_have_ncuconfig" >&5
7683 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7684 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7685 if test "$cf_have_ncuconfig" != "yes"
7687 CPPFLAGS="$cf_save_CPPFLAGS"
7688 LIBS="$cf_save_LIBS"
7689 NCURSES_CONFIG_PKG=none
7692 cat >>confdefs.h <<\EOF
7696 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7698 echo "$as_me:7698: checking for terminfo header" >&5
7699 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7700 if test "${cf_cv_term_header+set}" = set; then
7701 echo $ECHO_N "(cached) $ECHO_C" >&6
7704 case "${cf_cv_ncurses_header}" in
7705 (*/ncurses.h|*/ncursesw.h)
7706 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7709 cf_term_header=term.h
7713 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7715 cat >"conftest.$ac_ext" <<_ACEOF
7716 #line 7716 "configure"
7717 #include "confdefs.h"
7719 #include <${cf_cv_ncurses_header:-curses.h}>
7725 int x = auto_left_margin; (void)x
7730 rm -f "conftest.$ac_objext"
7731 if { (eval echo "$as_me:7731: \"$ac_compile\"") >&5
7732 (eval $ac_compile) 2>&5
7734 echo "$as_me:7734: \$? = $ac_status" >&5
7735 (exit "$ac_status"); } &&
7736 { ac_try='test -s "conftest.$ac_objext"'
7737 { (eval echo "$as_me:7737: \"$ac_try\"") >&5
7740 echo "$as_me:7740: \$? = $ac_status" >&5
7741 (exit "$ac_status"); }; }; then
7743 cf_cv_term_header="$cf_test"
7745 echo "$as_me: failed program was:" >&5
7746 cat "conftest.$ac_ext" >&5
7748 cf_cv_term_header=unknown
7751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7752 test "$cf_cv_term_header" != unknown && break
7756 echo "$as_me:7756: result: $cf_cv_term_header" >&5
7757 echo "${ECHO_T}$cf_cv_term_header" >&6
7759 # Set definitions to allow ifdef'ing to accommodate subdirectories
7761 case "$cf_cv_term_header" in
7764 cat >>confdefs.h <<\EOF
7765 #define HAVE_TERM_H 1
7771 case "$cf_cv_term_header" in
7774 cat >>confdefs.h <<\EOF
7775 #define HAVE_NCURSES_TERM_H 1
7781 cat >>confdefs.h <<\EOF
7782 #define HAVE_NCURSESW_TERM_H 1
7791 echo "$as_me:7791: result: no" >&5
7792 echo "${ECHO_T}no" >&6
7793 NCURSES_CONFIG_PKG=none
7796 NCURSES_CONFIG_PKG=none
7799 if test "x$cf_have_ncuconfig" = "xno"; then
7800 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7802 if test -n "$ac_tool_prefix"; then
7803 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7805 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7806 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7807 echo "$as_me:7807: checking for $ac_word" >&5
7808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7809 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7810 echo $ECHO_N "(cached) $ECHO_C" >&6
7812 if test -n "$NCURSES_CONFIG"; then
7813 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7815 ac_save_IFS=$IFS; IFS=$ac_path_separator
7817 for ac_dir in $ac_dummy; do
7819 test -z "$ac_dir" && ac_dir=.
7820 $as_executable_p "$ac_dir/$ac_word" || continue
7821 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7822 echo "$as_me:7822: found $ac_dir/$ac_word" >&5
7828 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7829 if test -n "$NCURSES_CONFIG"; then
7830 echo "$as_me:7830: result: $NCURSES_CONFIG" >&5
7831 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7833 echo "$as_me:7833: result: no" >&5
7834 echo "${ECHO_T}no" >&6
7837 test -n "$NCURSES_CONFIG" && break
7840 if test -z "$NCURSES_CONFIG"; then
7841 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7842 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7844 # Extract the first word of "$ac_prog", so it can be a program name with args.
7845 set dummy $ac_prog; ac_word=$2
7846 echo "$as_me:7846: checking for $ac_word" >&5
7847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7848 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7849 echo $ECHO_N "(cached) $ECHO_C" >&6
7851 if test -n "$ac_ct_NCURSES_CONFIG"; then
7852 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7854 ac_save_IFS=$IFS; IFS=$ac_path_separator
7856 for ac_dir in $ac_dummy; do
7858 test -z "$ac_dir" && ac_dir=.
7859 $as_executable_p "$ac_dir/$ac_word" || continue
7860 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7861 echo "$as_me:7861: found $ac_dir/$ac_word" >&5
7867 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7868 if test -n "$ac_ct_NCURSES_CONFIG"; then
7869 echo "$as_me:7869: result: $ac_ct_NCURSES_CONFIG" >&5
7870 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7872 echo "$as_me:7872: result: no" >&5
7873 echo "${ECHO_T}no" >&6
7876 test -n "$ac_ct_NCURSES_CONFIG" && break
7878 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7880 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7883 if test "$NCURSES_CONFIG" != none ; then
7885 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7887 case "x$cf_add_cflags" in
7890 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7893 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'`
7894 test "$CFLAGS" != "$cf_old_cflag" || break
7896 CFLAGS="$cf_old_cflag"
7899 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7902 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'`
7903 test "$CPPFLAGS" != "$cf_old_cflag" || break
7905 CPPFLAGS="$cf_old_cflag"
7914 cf_new_extra_cppflags=
7916 for cf_add_cflags in $cf_add_cflags
7918 case "$cf_fix_cppflags" in
7920 case "$cf_add_cflags" in
7921 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7922 case "$cf_add_cflags" in
7924 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7926 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7927 && test -z "${cf_tst_cflags}" \
7928 && cf_fix_cppflags=yes
7930 if test "$cf_fix_cppflags" = yes ; then
7932 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7933 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7936 elif test "${cf_tst_cflags}" = "\"'" ; then
7938 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7939 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7949 case "$cf_add_cflags" in
7951 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7953 CPPFLAGS=`echo "$CPPFLAGS" | \
7954 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7955 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7960 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7961 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7968 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7969 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7976 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7977 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7979 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7981 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7982 && test -z "${cf_tst_cflags}" \
7983 && cf_fix_cppflags=no
7988 if test -n "$cf_new_cflags" ; then
7990 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7991 CFLAGS="${CFLAGS}$cf_new_cflags"
7995 if test -n "$cf_new_cppflags" ; then
7997 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7998 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8002 if test -n "$cf_new_extra_cppflags" ; then
8004 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8005 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8014 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8016 for cf_add_1lib in $cf_add_0lib; do
8017 for cf_add_2lib in $cf_add_libs; do
8018 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8023 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8027 # even with config script, some packages use no-override for curses.h
8029 echo "$as_me:8029: checking if we have identified curses headers" >&5
8030 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8031 if test "${cf_cv_ncurses_header+set}" = set; then
8032 echo $ECHO_N "(cached) $ECHO_C" >&6
8035 cf_cv_ncurses_header=none
8037 ncurses.h ncursesw/ncurses.h \
8038 curses.h ncursesw/curses.h
8040 cat >"conftest.$ac_ext" <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8043 #include <${cf_header}>
8047 initscr(); tgoto("?", 0,0)
8052 rm -f "conftest.$ac_objext"
8053 if { (eval echo "$as_me:8053: \"$ac_compile\"") >&5
8054 (eval $ac_compile) 2>&5
8056 echo "$as_me:8056: \$? = $ac_status" >&5
8057 (exit "$ac_status"); } &&
8058 { ac_try='test -s "conftest.$ac_objext"'
8059 { (eval echo "$as_me:8059: \"$ac_try\"") >&5
8062 echo "$as_me:8062: \$? = $ac_status" >&5
8063 (exit "$ac_status"); }; }; then
8064 cf_cv_ncurses_header=$cf_header; break
8066 echo "$as_me: failed program was:" >&5
8067 cat "conftest.$ac_ext" >&5
8069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8073 echo "$as_me:8073: result: $cf_cv_ncurses_header" >&5
8074 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8076 if test "$cf_cv_ncurses_header" = none ; then
8077 { { echo "$as_me:8077: error: No curses header-files found" >&5
8078 echo "$as_me: error: No curses header-files found" >&2;}
8079 { (exit 1); exit 1; }; }
8082 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8084 for ac_header in $cf_cv_ncurses_header
8086 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8087 echo "$as_me:8087: checking for $ac_header" >&5
8088 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8089 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8090 echo $ECHO_N "(cached) $ECHO_C" >&6
8092 cat >"conftest.$ac_ext" <<_ACEOF
8093 #line 8093 "configure"
8094 #include "confdefs.h"
8095 #include <$ac_header>
8097 if { (eval echo "$as_me:8097: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8098 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8100 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8102 cat conftest.err >&5
8103 echo "$as_me:8103: \$? = $ac_status" >&5
8104 (exit "$ac_status"); } >/dev/null; then
8105 if test -s conftest.err; then
8106 ac_cpp_err=$ac_c_preproc_warn_flag
8113 if test -z "$ac_cpp_err"; then
8114 eval "$as_ac_Header=yes"
8116 echo "$as_me: failed program was:" >&5
8117 cat "conftest.$ac_ext" >&5
8118 eval "$as_ac_Header=no"
8120 rm -f conftest.err "conftest.$ac_ext"
8122 echo "$as_me:8122: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8123 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8124 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8125 cat >>confdefs.h <<EOF
8126 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8132 cat >>confdefs.h <<\EOF
8136 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8138 cat >>confdefs.h <<EOF
8139 #define $cf_nculib_ROOT 1
8142 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8146 cf_ncuhdr_root=ncursesw
8148 test -n "$cf_cv_curses_dir" && \
8149 test "$cf_cv_curses_dir" != "no" && { \
8151 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8152 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8154 while test "$cf_add_incdir" != /usr/include
8156 if test -d "$cf_add_incdir"
8159 if test -n "$CFLAGS$CPPFLAGS" ; then
8160 # a loop is needed to ensure we can add subdirs of existing dirs
8161 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8162 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8163 cf_have_incdir=yes; break
8168 if test "$cf_have_incdir" = no ; then
8169 if test "$cf_add_incdir" = /usr/local/include ; then
8170 if test "$GCC" = yes
8172 cf_save_CPPFLAGS=$CPPFLAGS
8174 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8175 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8177 cat >"conftest.$ac_ext" <<_ACEOF
8178 #line 8178 "configure"
8179 #include "confdefs.h"
8189 rm -f "conftest.$ac_objext"
8190 if { (eval echo "$as_me:8190: \"$ac_compile\"") >&5
8191 (eval $ac_compile) 2>&5
8193 echo "$as_me:8193: \$? = $ac_status" >&5
8194 (exit "$ac_status"); } &&
8195 { ac_try='test -s "conftest.$ac_objext"'
8196 { (eval echo "$as_me:8196: \"$ac_try\"") >&5
8199 echo "$as_me:8199: \$? = $ac_status" >&5
8200 (exit "$ac_status"); }; }; then
8203 echo "$as_me: failed program was:" >&5
8204 cat "conftest.$ac_ext" >&5
8207 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8208 CPPFLAGS=$cf_save_CPPFLAGS
8213 if test "$cf_have_incdir" = no ; then
8214 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8216 echo "${as_me:-configure}:8216: testing adding $cf_add_incdir to include-path ..." 1>&5
8218 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8220 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8221 test "$cf_top_incdir" = "$cf_add_incdir" && break
8222 cf_add_incdir="$cf_top_incdir"
8235 echo "$as_me:8235: checking for $cf_ncuhdr_root header in include-path" >&5
8236 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8237 if test "${cf_cv_ncurses_h+set}" = set; then
8238 echo $ECHO_N "(cached) $ECHO_C" >&6
8241 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8242 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8243 for cf_header in $cf_header_list
8246 cat >"conftest.$ac_ext" <<_ACEOF
8247 #line 8247 "configure"
8248 #include "confdefs.h"
8250 #define _XOPEN_SOURCE_EXTENDED
8251 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8252 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8254 #include <$cf_header>
8259 #ifdef NCURSES_VERSION
8265 printf("%s\\n", NCURSES_VERSION);
8278 rm -f "conftest.$ac_objext"
8279 if { (eval echo "$as_me:8279: \"$ac_compile\"") >&5
8280 (eval $ac_compile) 2>&5
8282 echo "$as_me:8282: \$? = $ac_status" >&5
8283 (exit "$ac_status"); } &&
8284 { ac_try='test -s "conftest.$ac_objext"'
8285 { (eval echo "$as_me:8285: \"$ac_try\"") >&5
8288 echo "$as_me:8288: \$? = $ac_status" >&5
8289 (exit "$ac_status"); }; }; then
8290 cf_cv_ncurses_h=$cf_header
8293 echo "$as_me: failed program was:" >&5
8294 cat "conftest.$ac_ext" >&5
8297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8299 test "$cf_cv_ncurses_h" != no && break
8303 echo "$as_me:8303: result: $cf_cv_ncurses_h" >&5
8304 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8306 if test "$cf_cv_ncurses_h" != no ; then
8307 cf_cv_ncurses_header=$cf_cv_ncurses_h
8310 echo "$as_me:8310: checking for $cf_ncuhdr_root include-path" >&5
8311 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8312 if test "${cf_cv_ncurses_h2+set}" = set; then
8313 echo $ECHO_N "(cached) $ECHO_C" >&6
8316 test -n "$verbose" && echo
8320 # collect the current set of include-directories from compiler flags
8321 cf_header_path_list=""
8322 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8323 for cf_header_path in $CPPFLAGS $CFLAGS
8325 case "$cf_header_path" in
8327 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8329 test "x$cf_header_path" != "xNONE" && \
8330 test -d "$cf_header_path" && \
8332 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8333 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8334 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8335 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8336 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8337 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"
8340 cf_header_path_list="$cf_header_path_list $cf_search"
8346 # add the variations for the package we are looking for
8350 test "x$prefix" != "xNONE" && \
8351 test -d "$prefix" && \
8353 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8354 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8355 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8356 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8357 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8358 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8361 for cf_subdir_prefix in \
8370 test "x$cf_subdir_prefix" != "x$prefix" && \
8371 test -d "$cf_subdir_prefix" && \
8372 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8373 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8374 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8375 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8376 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8377 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8378 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"
8383 test "$includedir" != NONE && \
8384 test "$includedir" != "/usr/include" && \
8385 test -d "$includedir" && {
8386 test -d "$includedir" && cf_search="$cf_search $includedir"
8387 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8390 test "$oldincludedir" != NONE && \
8391 test "$oldincludedir" != "/usr/include" && \
8392 test -d "$oldincludedir" && {
8393 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8394 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8397 cf_search="$cf_search $cf_header_path_list"
8399 test -n "$verbose" && echo "search path $cf_search"
8400 cf_save2_CPPFLAGS="$CPPFLAGS"
8401 for cf_incdir in $cf_search
8404 if test -n "$cf_incdir" ; then
8405 for cf_add_incdir in $cf_incdir
8407 while test "$cf_add_incdir" != /usr/include
8409 if test -d "$cf_add_incdir"
8412 if test -n "$CFLAGS$CPPFLAGS" ; then
8413 # a loop is needed to ensure we can add subdirs of existing dirs
8414 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8415 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8416 cf_have_incdir=yes; break
8421 if test "$cf_have_incdir" = no ; then
8422 if test "$cf_add_incdir" = /usr/local/include ; then
8423 if test "$GCC" = yes
8425 cf_save_CPPFLAGS=$CPPFLAGS
8427 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8428 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8430 cat >"conftest.$ac_ext" <<_ACEOF
8431 #line 8431 "configure"
8432 #include "confdefs.h"
8442 rm -f "conftest.$ac_objext"
8443 if { (eval echo "$as_me:8443: \"$ac_compile\"") >&5
8444 (eval $ac_compile) 2>&5
8446 echo "$as_me:8446: \$? = $ac_status" >&5
8447 (exit "$ac_status"); } &&
8448 { ac_try='test -s "conftest.$ac_objext"'
8449 { (eval echo "$as_me:8449: \"$ac_try\"") >&5
8452 echo "$as_me:8452: \$? = $ac_status" >&5
8453 (exit "$ac_status"); }; }; then
8456 echo "$as_me: failed program was:" >&5
8457 cat "conftest.$ac_ext" >&5
8460 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8461 CPPFLAGS=$cf_save_CPPFLAGS
8466 if test "$cf_have_incdir" = no ; then
8467 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8469 echo "${as_me:-configure}:8469: testing adding $cf_add_incdir to include-path ..." 1>&5
8471 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8473 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8474 test "$cf_top_incdir" = "$cf_add_incdir" && break
8475 cf_add_incdir="$cf_top_incdir"
8491 cat >"conftest.$ac_ext" <<_ACEOF
8492 #line 8492 "configure"
8493 #include "confdefs.h"
8495 #include <$cf_header>
8500 #ifdef NCURSES_VERSION
8502 printf("%s\\n", NCURSES_VERSION);
8515 rm -f "conftest.$ac_objext"
8516 if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517 (eval $ac_compile) 2>&5
8519 echo "$as_me:8519: \$? = $ac_status" >&5
8520 (exit "$ac_status"); } &&
8521 { ac_try='test -s "conftest.$ac_objext"'
8522 { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8525 echo "$as_me:8525: \$? = $ac_status" >&5
8526 (exit "$ac_status"); }; }; then
8527 cf_cv_ncurses_h2=$cf_header
8530 echo "$as_me: failed program was:" >&5
8531 cat "conftest.$ac_ext" >&5
8534 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8536 if test "$cf_cv_ncurses_h2" != no ; then
8537 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8538 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8541 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8543 CPPFLAGS="$cf_save2_CPPFLAGS"
8544 test "$cf_cv_ncurses_h2" != no && break
8546 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8546: error: not found" >&5
8547 echo "$as_me: error: not found" >&2;}
8548 { (exit 1); exit 1; }; }
8551 echo "$as_me:8551: result: $cf_cv_ncurses_h2" >&5
8552 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8554 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8555 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8556 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8557 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8560 if test -n "$cf_1st_incdir" ; then
8561 for cf_add_incdir in $cf_1st_incdir
8563 while test "$cf_add_incdir" != /usr/include
8565 if test -d "$cf_add_incdir"
8568 if test -n "$CFLAGS$CPPFLAGS" ; then
8569 # a loop is needed to ensure we can add subdirs of existing dirs
8570 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8571 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8572 cf_have_incdir=yes; break
8577 if test "$cf_have_incdir" = no ; then
8578 if test "$cf_add_incdir" = /usr/local/include ; then
8579 if test "$GCC" = yes
8581 cf_save_CPPFLAGS=$CPPFLAGS
8583 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8584 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8586 cat >"conftest.$ac_ext" <<_ACEOF
8587 #line 8587 "configure"
8588 #include "confdefs.h"
8598 rm -f "conftest.$ac_objext"
8599 if { (eval echo "$as_me:8599: \"$ac_compile\"") >&5
8600 (eval $ac_compile) 2>&5
8602 echo "$as_me:8602: \$? = $ac_status" >&5
8603 (exit "$ac_status"); } &&
8604 { ac_try='test -s "conftest.$ac_objext"'
8605 { (eval echo "$as_me:8605: \"$ac_try\"") >&5
8608 echo "$as_me:8608: \$? = $ac_status" >&5
8609 (exit "$ac_status"); }; }; then
8612 echo "$as_me: failed program was:" >&5
8613 cat "conftest.$ac_ext" >&5
8616 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8617 CPPFLAGS=$cf_save_CPPFLAGS
8622 if test "$cf_have_incdir" = no ; then
8623 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8625 echo "${as_me:-configure}:8625: testing adding $cf_add_incdir to include-path ..." 1>&5
8627 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8629 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8630 test "$cf_top_incdir" = "$cf_add_incdir" && break
8631 cf_add_incdir="$cf_top_incdir"
8644 # Set definitions to allow ifdef'ing for ncurses.h
8646 case "$cf_cv_ncurses_header" in
8649 cat >>confdefs.h <<\EOF
8650 #define HAVE_NCURSES_H 1
8656 case "$cf_cv_ncurses_header" in
8657 (ncurses/curses.h|ncurses/ncurses.h)
8659 cat >>confdefs.h <<\EOF
8660 #define HAVE_NCURSES_NCURSES_H 1
8664 (ncursesw/curses.h|ncursesw/ncurses.h)
8666 cat >>confdefs.h <<\EOF
8667 #define HAVE_NCURSESW_NCURSES_H 1
8673 echo "$as_me:8673: checking for terminfo header" >&5
8674 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8675 if test "${cf_cv_term_header+set}" = set; then
8676 echo $ECHO_N "(cached) $ECHO_C" >&6
8679 case "${cf_cv_ncurses_header}" in
8680 (*/ncurses.h|*/ncursesw.h)
8681 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8684 cf_term_header=term.h
8688 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8690 cat >"conftest.$ac_ext" <<_ACEOF
8691 #line 8691 "configure"
8692 #include "confdefs.h"
8694 #include <${cf_cv_ncurses_header:-curses.h}>
8700 int x = auto_left_margin; (void)x
8705 rm -f "conftest.$ac_objext"
8706 if { (eval echo "$as_me:8706: \"$ac_compile\"") >&5
8707 (eval $ac_compile) 2>&5
8709 echo "$as_me:8709: \$? = $ac_status" >&5
8710 (exit "$ac_status"); } &&
8711 { ac_try='test -s "conftest.$ac_objext"'
8712 { (eval echo "$as_me:8712: \"$ac_try\"") >&5
8715 echo "$as_me:8715: \$? = $ac_status" >&5
8716 (exit "$ac_status"); }; }; then
8718 cf_cv_term_header="$cf_test"
8720 echo "$as_me: failed program was:" >&5
8721 cat "conftest.$ac_ext" >&5
8723 cf_cv_term_header=unknown
8726 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8727 test "$cf_cv_term_header" != unknown && break
8731 echo "$as_me:8731: result: $cf_cv_term_header" >&5
8732 echo "${ECHO_T}$cf_cv_term_header" >&6
8734 # Set definitions to allow ifdef'ing to accommodate subdirectories
8736 case "$cf_cv_term_header" in
8739 cat >>confdefs.h <<\EOF
8740 #define HAVE_TERM_H 1
8746 case "$cf_cv_term_header" in
8749 cat >>confdefs.h <<\EOF
8750 #define HAVE_NCURSES_TERM_H 1
8756 cat >>confdefs.h <<\EOF
8757 #define HAVE_NCURSESW_TERM_H 1
8763 # some applications need this, but should check for NCURSES_VERSION
8765 cat >>confdefs.h <<\EOF
8769 echo "$as_me:8769: checking for ncurses version" >&5
8770 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8771 if test "${cf_cv_ncurses_version+set}" = set; then
8772 echo $ECHO_N "(cached) $ECHO_C" >&6
8775 cf_cv_ncurses_version=no
8777 rm -f "$cf_tempfile"
8778 if test "$cross_compiling" = yes; then
8780 # This will not work if the preprocessor splits the line after the
8781 # Autoconf token. The 'unproto' program does that.
8782 cat > "conftest.$ac_ext" <<EOF
8783 #include <${cf_cv_ncurses_header:-curses.h}>
8785 #ifdef NCURSES_VERSION
8786 Autoconf NCURSES_VERSION
8794 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8795 { (eval echo "$as_me:8795: \"$cf_try\"") >&5
8798 echo "$as_me:8798: \$? = $ac_status" >&5
8799 (exit "$ac_status"); }
8800 if test -f conftest.out ; then
8801 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8802 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8807 cat >"conftest.$ac_ext" <<_ACEOF
8808 #line 8808 "configure"
8809 #include "confdefs.h"
8811 #include <${cf_cv_ncurses_header:-curses.h}>
8815 FILE *fp = fopen("$cf_tempfile", "w");
8816 #ifdef NCURSES_VERSION
8817 # ifdef NCURSES_VERSION_PATCH
8818 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8820 fprintf(fp, "%s\\n", NCURSES_VERSION);
8824 fprintf(fp, "old\\n");
8829 ${cf_cv_main_return:-return}(0);
8832 rm -f "conftest$ac_exeext"
8833 if { (eval echo "$as_me:8833: \"$ac_link\"") >&5
8834 (eval $ac_link) 2>&5
8836 echo "$as_me:8836: \$? = $ac_status" >&5
8837 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8838 { (eval echo "$as_me:8838: \"$ac_try\"") >&5
8841 echo "$as_me:8841: \$? = $ac_status" >&5
8842 (exit "$ac_status"); }; }; then
8844 cf_cv_ncurses_version=`cat $cf_tempfile`
8846 echo "$as_me: program exited with status $ac_status" >&5
8847 echo "$as_me: failed program was:" >&5
8848 cat "conftest.$ac_ext" >&5
8850 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8852 rm -f "$cf_tempfile"
8855 echo "$as_me:8855: result: $cf_cv_ncurses_version" >&5
8856 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8857 test "$cf_cv_ncurses_version" = no ||
8858 cat >>confdefs.h <<\EOF
8862 cf_nculib_root=ncursesw
8863 # This works, except for the special case where we find gpm, but
8864 # ncurses is in a nonstandard location via $LIBS, and we really want
8867 cf_ncurses_SAVE="$LIBS"
8868 echo "$as_me:8868: checking for Gpm_Open in -lgpm" >&5
8869 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8870 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8871 echo $ECHO_N "(cached) $ECHO_C" >&6
8873 ac_check_lib_save_LIBS=$LIBS
8875 cat >"conftest.$ac_ext" <<_ACEOF
8876 #line 8876 "configure"
8877 #include "confdefs.h"
8879 /* Override any gcc2 internal prototype to avoid an error. */
8883 /* We use char because int might match the return type of a gcc2
8884 builtin and then its argument prototype would still apply. */
8894 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8895 if { (eval echo "$as_me:8895: \"$ac_link\"") >&5
8896 (eval $ac_link) 2>&5
8898 echo "$as_me:8898: \$? = $ac_status" >&5
8899 (exit "$ac_status"); } &&
8900 { ac_try='test -s "conftest$ac_exeext"'
8901 { (eval echo "$as_me:8901: \"$ac_try\"") >&5
8904 echo "$as_me:8904: \$? = $ac_status" >&5
8905 (exit "$ac_status"); }; }; then
8906 ac_cv_lib_gpm_Gpm_Open=yes
8908 echo "$as_me: failed program was:" >&5
8909 cat "conftest.$ac_ext" >&5
8910 ac_cv_lib_gpm_Gpm_Open=no
8912 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8913 LIBS=$ac_check_lib_save_LIBS
8915 echo "$as_me:8915: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8916 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8917 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8918 echo "$as_me:8918: checking for initscr in -lgpm" >&5
8919 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8920 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8921 echo $ECHO_N "(cached) $ECHO_C" >&6
8923 ac_check_lib_save_LIBS=$LIBS
8925 cat >"conftest.$ac_ext" <<_ACEOF
8926 #line 8926 "configure"
8927 #include "confdefs.h"
8929 /* Override any gcc2 internal prototype to avoid an error. */
8933 /* We use char because int might match the return type of a gcc2
8934 builtin and then its argument prototype would still apply. */
8944 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8945 if { (eval echo "$as_me:8945: \"$ac_link\"") >&5
8946 (eval $ac_link) 2>&5
8948 echo "$as_me:8948: \$? = $ac_status" >&5
8949 (exit "$ac_status"); } &&
8950 { ac_try='test -s "conftest$ac_exeext"'
8951 { (eval echo "$as_me:8951: \"$ac_try\"") >&5
8954 echo "$as_me:8954: \$? = $ac_status" >&5
8955 (exit "$ac_status"); }; }; then
8956 ac_cv_lib_gpm_initscr=yes
8958 echo "$as_me: failed program was:" >&5
8959 cat "conftest.$ac_ext" >&5
8960 ac_cv_lib_gpm_initscr=no
8962 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8963 LIBS=$ac_check_lib_save_LIBS
8965 echo "$as_me:8965: result: $ac_cv_lib_gpm_initscr" >&5
8966 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8967 if test "$ac_cv_lib_gpm_initscr" = yes; then
8968 LIBS="$cf_ncurses_SAVE"
8970 cf_ncurses_LIBS="-lgpm"
8977 # This is only necessary if you are linking against an obsolete
8978 # version of ncurses (but it should do no harm, since it is static).
8979 if test "$cf_nculib_root" = ncurses ; then
8980 echo "$as_me:8980: checking for tgoto in -lmytinfo" >&5
8981 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8982 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8983 echo $ECHO_N "(cached) $ECHO_C" >&6
8985 ac_check_lib_save_LIBS=$LIBS
8986 LIBS="-lmytinfo $LIBS"
8987 cat >"conftest.$ac_ext" <<_ACEOF
8988 #line 8988 "configure"
8989 #include "confdefs.h"
8991 /* Override any gcc2 internal prototype to avoid an error. */
8995 /* We use char because int might match the return type of a gcc2
8996 builtin and then its argument prototype would still apply. */
9006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9007 if { (eval echo "$as_me:9007: \"$ac_link\"") >&5
9008 (eval $ac_link) 2>&5
9010 echo "$as_me:9010: \$? = $ac_status" >&5
9011 (exit "$ac_status"); } &&
9012 { ac_try='test -s "conftest$ac_exeext"'
9013 { (eval echo "$as_me:9013: \"$ac_try\"") >&5
9016 echo "$as_me:9016: \$? = $ac_status" >&5
9017 (exit "$ac_status"); }; }; then
9018 ac_cv_lib_mytinfo_tgoto=yes
9020 echo "$as_me: failed program was:" >&5
9021 cat "conftest.$ac_ext" >&5
9022 ac_cv_lib_mytinfo_tgoto=no
9024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9025 LIBS=$ac_check_lib_save_LIBS
9027 echo "$as_me:9027: result: $ac_cv_lib_mytinfo_tgoto" >&5
9028 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9029 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9030 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9040 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9042 for cf_add_1lib in $cf_add_0lib; do
9043 for cf_add_2lib in $cf_add_libs; do
9044 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9049 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9053 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9059 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9061 for cf_add_1lib in $cf_add_0lib; do
9062 for cf_add_2lib in $cf_add_libs; do
9063 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9068 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9074 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9076 echo "$as_me:9076: checking for initscr" >&5
9077 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9078 if test "${ac_cv_func_initscr+set}" = set; then
9079 echo $ECHO_N "(cached) $ECHO_C" >&6
9081 cat >"conftest.$ac_ext" <<_ACEOF
9082 #line 9082 "configure"
9083 #include "confdefs.h"
9084 #define initscr autoconf_temporary
9085 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9092 /* We use char because int might match the return type of a gcc2
9093 builtin and then its argument prototype would still apply. */
9094 char initscr (void);
9100 /* The GNU C library defines stubs for functions which it implements
9101 to always fail with ENOSYS. Some functions are actually named
9102 something starting with __ and the normal name is an alias. */
9103 #if defined (__stub_initscr) || defined (__stub___initscr)
9104 #error found stub for initscr
9112 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9113 if { (eval echo "$as_me:9113: \"$ac_link\"") >&5
9114 (eval $ac_link) 2>&5
9116 echo "$as_me:9116: \$? = $ac_status" >&5
9117 (exit "$ac_status"); } &&
9118 { ac_try='test -s "conftest$ac_exeext"'
9119 { (eval echo "$as_me:9119: \"$ac_try\"") >&5
9122 echo "$as_me:9122: \$? = $ac_status" >&5
9123 (exit "$ac_status"); }; }; then
9124 ac_cv_func_initscr=yes
9126 echo "$as_me: failed program was:" >&5
9127 cat "conftest.$ac_ext" >&5
9128 ac_cv_func_initscr=no
9130 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9132 echo "$as_me:9132: result: $ac_cv_func_initscr" >&5
9133 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9134 if test "$ac_cv_func_initscr" = yes; then
9135 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9138 cf_save_LIBS="$LIBS"
9139 echo "$as_me:9139: checking for initscr in -l$cf_nculib_root" >&5
9140 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9141 LIBS="-l$cf_nculib_root $LIBS"
9142 cat >"conftest.$ac_ext" <<_ACEOF
9143 #line 9143 "configure"
9144 #include "confdefs.h"
9145 #include <${cf_cv_ncurses_header:-curses.h}>
9154 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9155 if { (eval echo "$as_me:9155: \"$ac_link\"") >&5
9156 (eval $ac_link) 2>&5
9158 echo "$as_me:9158: \$? = $ac_status" >&5
9159 (exit "$ac_status"); } &&
9160 { ac_try='test -s "conftest$ac_exeext"'
9161 { (eval echo "$as_me:9161: \"$ac_try\"") >&5
9164 echo "$as_me:9164: \$? = $ac_status" >&5
9165 (exit "$ac_status"); }; }; then
9166 echo "$as_me:9166: result: yes" >&5
9167 echo "${ECHO_T}yes" >&6
9168 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9171 echo "$as_me: failed program was:" >&5
9172 cat "conftest.$ac_ext" >&5
9173 echo "$as_me:9173: result: no" >&5
9174 echo "${ECHO_T}no" >&6
9177 cf_library_path_list=""
9178 if test -n "${LDFLAGS}${LIBS}" ; then
9179 for cf_library_path in $LDFLAGS $LIBS
9181 case "$cf_library_path" in
9183 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9185 test "x$cf_library_path" != "xNONE" && \
9186 test -d "$cf_library_path" && \
9188 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9189 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9190 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9191 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9192 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9193 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"
9196 cf_library_path_list="$cf_library_path_list $cf_search"
9204 test "x$prefix" != "xNONE" && \
9205 test -d "$prefix" && \
9207 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9208 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9209 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9210 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9211 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9212 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9215 for cf_subdir_prefix in \
9224 test "x$cf_subdir_prefix" != "x$prefix" && \
9225 test -d "$cf_subdir_prefix" && \
9226 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9227 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9228 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9229 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9230 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9231 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9232 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"
9237 cf_search="$cf_library_path_list $cf_search"
9239 for cf_libdir in $cf_search
9241 echo "$as_me:9241: checking for -l$cf_nculib_root in $cf_libdir" >&5
9242 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9243 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9244 cat >"conftest.$ac_ext" <<_ACEOF
9245 #line 9245 "configure"
9246 #include "confdefs.h"
9247 #include <${cf_cv_ncurses_header:-curses.h}>
9256 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9257 if { (eval echo "$as_me:9257: \"$ac_link\"") >&5
9258 (eval $ac_link) 2>&5
9260 echo "$as_me:9260: \$? = $ac_status" >&5
9261 (exit "$ac_status"); } &&
9262 { ac_try='test -s "conftest$ac_exeext"'
9263 { (eval echo "$as_me:9263: \"$ac_try\"") >&5
9266 echo "$as_me:9266: \$? = $ac_status" >&5
9267 (exit "$ac_status"); }; }; then
9268 echo "$as_me:9268: result: yes" >&5
9269 echo "${ECHO_T}yes" >&6
9270 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9273 echo "$as_me: failed program was:" >&5
9274 cat "conftest.$ac_ext" >&5
9275 echo "$as_me:9275: result: no" >&5
9276 echo "${ECHO_T}no" >&6
9277 LIBS="$cf_save_LIBS"
9279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9283 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9287 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9289 if test "$cf_found_library" = no ; then
9290 { { echo "$as_me:9290: error: Cannot link $cf_nculib_root library" >&5
9291 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9292 { (exit 1); exit 1; }; }
9297 if test -n "$cf_ncurses_LIBS" ; then
9298 echo "$as_me:9298: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9299 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9300 cf_ncurses_SAVE="$LIBS"
9301 for p in $cf_ncurses_LIBS ; do
9302 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9303 if test "$q" != "$LIBS" ; then
9307 cat >"conftest.$ac_ext" <<_ACEOF
9308 #line 9308 "configure"
9309 #include "confdefs.h"
9310 #include <${cf_cv_ncurses_header:-curses.h}>
9314 initscr(); mousemask(0,0); tigetstr((char *)0);
9319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9320 if { (eval echo "$as_me:9320: \"$ac_link\"") >&5
9321 (eval $ac_link) 2>&5
9323 echo "$as_me:9323: \$? = $ac_status" >&5
9324 (exit "$ac_status"); } &&
9325 { ac_try='test -s "conftest$ac_exeext"'
9326 { (eval echo "$as_me:9326: \"$ac_try\"") >&5
9329 echo "$as_me:9329: \$? = $ac_status" >&5
9330 (exit "$ac_status"); }; }; then
9331 echo "$as_me:9331: result: yes" >&5
9332 echo "${ECHO_T}yes" >&6
9334 echo "$as_me: failed program was:" >&5
9335 cat "conftest.$ac_ext" >&5
9336 echo "$as_me:9336: result: no" >&5
9337 echo "${ECHO_T}no" >&6
9338 LIBS="$cf_ncurses_SAVE"
9340 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9343 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9345 cat >>confdefs.h <<EOF
9346 #define $cf_nculib_ROOT 1
9356 cf_ncuconfig_root=ncurses
9357 cf_have_ncuconfig=no
9359 if test "x${PKG_CONFIG:=none}" != xnone; then
9360 echo "$as_me:9360: checking pkg-config for $cf_ncuconfig_root" >&5
9361 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9362 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9363 echo "$as_me:9363: result: yes" >&5
9364 echo "${ECHO_T}yes" >&6
9366 echo "$as_me:9366: checking if the $cf_ncuconfig_root package files work" >&5
9367 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9368 cf_have_ncuconfig=unknown
9370 cf_save_CFLAGS="$CFLAGS"
9371 cf_save_CPPFLAGS="$CPPFLAGS"
9372 cf_save_LIBS="$LIBS"
9374 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9375 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9377 # while -W for passing linker flags is prevalent, it is not "standard".
9378 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9379 # incompatible _and_ non-standard -W option which gives an error. Work
9380 # around that pitfall.
9381 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9387 cf_new_extra_cppflags=
9389 for cf_add_cflags in $cf_pkg_cflags
9391 case "$cf_fix_cppflags" in
9393 case "$cf_add_cflags" in
9394 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9395 case "$cf_add_cflags" in
9397 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9399 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9400 && test -z "${cf_tst_cflags}" \
9401 && cf_fix_cppflags=yes
9403 if test "$cf_fix_cppflags" = yes ; then
9405 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9406 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9409 elif test "${cf_tst_cflags}" = "\"'" ; then
9411 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9412 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9422 case "$cf_add_cflags" in
9424 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9426 CPPFLAGS=`echo "$CPPFLAGS" | \
9427 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9428 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9433 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9434 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9441 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9442 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9452 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9454 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9455 && test -z "${cf_tst_cflags}" \
9456 && cf_fix_cppflags=no
9461 if test -n "$cf_new_cflags" ; then
9463 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9464 CFLAGS="${CFLAGS}$cf_new_cflags"
9468 if test -n "$cf_new_cppflags" ; then
9470 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9471 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9475 if test -n "$cf_new_extra_cppflags" ; then
9477 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9478 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9485 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9487 for cf_add_1lib in $cf_add_0lib; do
9488 for cf_add_2lib in $cf_add_libs; do
9489 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9494 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9498 cat >"conftest.$ac_ext" <<_ACEOF
9499 #line 9499 "configure"
9500 #include "confdefs.h"
9501 #include <${cf_cv_ncurses_header:-curses.h}>
9505 initscr(); mousemask(0,0); tigetstr((char *)0);
9510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9511 if { (eval echo "$as_me:9511: \"$ac_link\"") >&5
9512 (eval $ac_link) 2>&5
9514 echo "$as_me:9514: \$? = $ac_status" >&5
9515 (exit "$ac_status"); } &&
9516 { ac_try='test -s "conftest$ac_exeext"'
9517 { (eval echo "$as_me:9517: \"$ac_try\"") >&5
9520 echo "$as_me:9520: \$? = $ac_status" >&5
9521 (exit "$ac_status"); }; }; then
9522 if test "$cross_compiling" = yes; then
9523 cf_test_ncuconfig=maybe
9525 cat >"conftest.$ac_ext" <<_ACEOF
9526 #line 9526 "configure"
9527 #include "confdefs.h"
9528 #include <${cf_cv_ncurses_header:-curses.h}>
9530 { const char *xx = curses_version(); return (xx == 0); }
9532 rm -f "conftest$ac_exeext"
9533 if { (eval echo "$as_me:9533: \"$ac_link\"") >&5
9534 (eval $ac_link) 2>&5
9536 echo "$as_me:9536: \$? = $ac_status" >&5
9537 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9538 { (eval echo "$as_me:9538: \"$ac_try\"") >&5
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit "$ac_status"); }; }; then
9543 cf_test_ncuconfig=yes
9545 echo "$as_me: program exited with status $ac_status" >&5
9546 echo "$as_me: failed program was:" >&5
9547 cat "conftest.$ac_ext" >&5
9548 cf_test_ncuconfig=no
9550 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9553 echo "$as_me: failed program was:" >&5
9554 cat "conftest.$ac_ext" >&5
9555 cf_test_ncuconfig=no
9557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9559 CFLAGS="$cf_save_CFLAGS"
9560 CPPFLAGS="$cf_save_CPPFLAGS"
9561 LIBS="$cf_save_LIBS"
9563 if test "x$cf_test_ncuconfig" != xyes; then
9564 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9565 cf_pkg_cflags="$cf_temp"
9566 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9567 cf_pkg_libs="$cf_temp"
9572 for cf_add_cflags in $cf_pkg_cflags
9574 case "x$cf_add_cflags" in
9577 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9580 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'`
9581 test "$CFLAGS" != "$cf_old_cflag" || break
9583 CFLAGS="$cf_old_cflag"
9586 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9589 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'`
9590 test "$CPPFLAGS" != "$cf_old_cflag" || break
9592 CPPFLAGS="$cf_old_cflag"
9601 cf_new_extra_cppflags=
9603 for cf_add_cflags in $cf_add_cflags
9605 case "$cf_fix_cppflags" in
9607 case "$cf_add_cflags" in
9608 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9609 case "$cf_add_cflags" in
9611 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9613 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9614 && test -z "${cf_tst_cflags}" \
9615 && cf_fix_cppflags=yes
9617 if test "$cf_fix_cppflags" = yes ; then
9619 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9620 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9623 elif test "${cf_tst_cflags}" = "\"'" ; then
9625 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9626 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9636 case "$cf_add_cflags" in
9638 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9640 CPPFLAGS=`echo "$CPPFLAGS" | \
9641 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9642 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9647 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9648 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9655 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9656 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9663 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9664 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9666 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9668 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9669 && test -z "${cf_tst_cflags}" \
9670 && cf_fix_cppflags=no
9675 if test -n "$cf_new_cflags" ; then
9677 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9678 CFLAGS="${CFLAGS}$cf_new_cflags"
9682 if test -n "$cf_new_cppflags" ; then
9684 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9685 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9689 if test -n "$cf_new_extra_cppflags" ; then
9691 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9692 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9701 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9703 for cf_add_1lib in $cf_add_0lib; do
9704 for cf_add_2lib in $cf_add_libs; do
9705 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9710 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9714 cat >"conftest.$ac_ext" <<_ACEOF
9715 #line 9715 "configure"
9716 #include "confdefs.h"
9717 #include <${cf_cv_ncurses_header:-curses.h}>
9721 initscr(); mousemask(0,0); tigetstr((char *)0);
9726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9727 if { (eval echo "$as_me:9727: \"$ac_link\"") >&5
9728 (eval $ac_link) 2>&5
9730 echo "$as_me:9730: \$? = $ac_status" >&5
9731 (exit "$ac_status"); } &&
9732 { ac_try='test -s "conftest$ac_exeext"'
9733 { (eval echo "$as_me:9733: \"$ac_try\"") >&5
9736 echo "$as_me:9736: \$? = $ac_status" >&5
9737 (exit "$ac_status"); }; }; then
9738 if test "$cross_compiling" = yes; then
9739 cf_have_ncuconfig=maybe
9741 cat >"conftest.$ac_ext" <<_ACEOF
9742 #line 9742 "configure"
9743 #include "confdefs.h"
9744 #include <${cf_cv_ncurses_header:-curses.h}>
9746 { const char *xx = curses_version(); return (xx == 0); }
9748 rm -f "conftest$ac_exeext"
9749 if { (eval echo "$as_me:9749: \"$ac_link\"") >&5
9750 (eval $ac_link) 2>&5
9752 echo "$as_me:9752: \$? = $ac_status" >&5
9753 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9754 { (eval echo "$as_me:9754: \"$ac_try\"") >&5
9757 echo "$as_me:9757: \$? = $ac_status" >&5
9758 (exit "$ac_status"); }; }; then
9759 cf_have_ncuconfig=yes
9761 echo "$as_me: program exited with status $ac_status" >&5
9762 echo "$as_me: failed program was:" >&5
9763 cat "conftest.$ac_ext" >&5
9764 cf_have_ncuconfig=no
9766 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9769 echo "$as_me: failed program was:" >&5
9770 cat "conftest.$ac_ext" >&5
9771 cf_have_ncuconfig=no
9773 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9774 echo "$as_me:9774: result: $cf_have_ncuconfig" >&5
9775 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9776 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9777 if test "$cf_have_ncuconfig" != "yes"
9779 CPPFLAGS="$cf_save_CPPFLAGS"
9780 LIBS="$cf_save_LIBS"
9781 NCURSES_CONFIG_PKG=none
9784 cat >>confdefs.h <<\EOF
9788 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9790 echo "$as_me:9790: checking for terminfo header" >&5
9791 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9792 if test "${cf_cv_term_header+set}" = set; then
9793 echo $ECHO_N "(cached) $ECHO_C" >&6
9796 case "${cf_cv_ncurses_header}" in
9797 (*/ncurses.h|*/ncursesw.h)
9798 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9801 cf_term_header=term.h
9805 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9807 cat >"conftest.$ac_ext" <<_ACEOF
9808 #line 9808 "configure"
9809 #include "confdefs.h"
9811 #include <${cf_cv_ncurses_header:-curses.h}>
9817 int x = auto_left_margin; (void)x
9822 rm -f "conftest.$ac_objext"
9823 if { (eval echo "$as_me:9823: \"$ac_compile\"") >&5
9824 (eval $ac_compile) 2>&5
9826 echo "$as_me:9826: \$? = $ac_status" >&5
9827 (exit "$ac_status"); } &&
9828 { ac_try='test -s "conftest.$ac_objext"'
9829 { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9832 echo "$as_me:9832: \$? = $ac_status" >&5
9833 (exit "$ac_status"); }; }; then
9835 cf_cv_term_header="$cf_test"
9837 echo "$as_me: failed program was:" >&5
9838 cat "conftest.$ac_ext" >&5
9840 cf_cv_term_header=unknown
9843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9844 test "$cf_cv_term_header" != unknown && break
9848 echo "$as_me:9848: result: $cf_cv_term_header" >&5
9849 echo "${ECHO_T}$cf_cv_term_header" >&6
9851 # Set definitions to allow ifdef'ing to accommodate subdirectories
9853 case "$cf_cv_term_header" in
9856 cat >>confdefs.h <<\EOF
9857 #define HAVE_TERM_H 1
9863 case "$cf_cv_term_header" in
9866 cat >>confdefs.h <<\EOF
9867 #define HAVE_NCURSES_TERM_H 1
9873 cat >>confdefs.h <<\EOF
9874 #define HAVE_NCURSESW_TERM_H 1
9883 echo "$as_me:9883: result: no" >&5
9884 echo "${ECHO_T}no" >&6
9885 NCURSES_CONFIG_PKG=none
9888 NCURSES_CONFIG_PKG=none
9891 if test "x$cf_have_ncuconfig" = "xno"; then
9892 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9894 if test -n "$ac_tool_prefix"; then
9895 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9897 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9898 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9899 echo "$as_me:9899: checking for $ac_word" >&5
9900 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9901 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9904 if test -n "$NCURSES_CONFIG"; then
9905 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9907 ac_save_IFS=$IFS; IFS=$ac_path_separator
9909 for ac_dir in $ac_dummy; do
9911 test -z "$ac_dir" && ac_dir=.
9912 $as_executable_p "$ac_dir/$ac_word" || continue
9913 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9914 echo "$as_me:9914: found $ac_dir/$ac_word" >&5
9920 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9921 if test -n "$NCURSES_CONFIG"; then
9922 echo "$as_me:9922: result: $NCURSES_CONFIG" >&5
9923 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9925 echo "$as_me:9925: result: no" >&5
9926 echo "${ECHO_T}no" >&6
9929 test -n "$NCURSES_CONFIG" && break
9932 if test -z "$NCURSES_CONFIG"; then
9933 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9934 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9936 # Extract the first word of "$ac_prog", so it can be a program name with args.
9937 set dummy $ac_prog; ac_word=$2
9938 echo "$as_me:9938: checking for $ac_word" >&5
9939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9940 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9941 echo $ECHO_N "(cached) $ECHO_C" >&6
9943 if test -n "$ac_ct_NCURSES_CONFIG"; then
9944 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9946 ac_save_IFS=$IFS; IFS=$ac_path_separator
9948 for ac_dir in $ac_dummy; do
9950 test -z "$ac_dir" && ac_dir=.
9951 $as_executable_p "$ac_dir/$ac_word" || continue
9952 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9953 echo "$as_me:9953: found $ac_dir/$ac_word" >&5
9959 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9960 if test -n "$ac_ct_NCURSES_CONFIG"; then
9961 echo "$as_me:9961: result: $ac_ct_NCURSES_CONFIG" >&5
9962 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9964 echo "$as_me:9964: result: no" >&5
9965 echo "${ECHO_T}no" >&6
9968 test -n "$ac_ct_NCURSES_CONFIG" && break
9970 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9972 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9975 if test "$NCURSES_CONFIG" != none ; then
9977 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9979 case "x$cf_add_cflags" in
9982 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9985 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'`
9986 test "$CFLAGS" != "$cf_old_cflag" || break
9988 CFLAGS="$cf_old_cflag"
9991 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9994 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'`
9995 test "$CPPFLAGS" != "$cf_old_cflag" || break
9997 CPPFLAGS="$cf_old_cflag"
10006 cf_new_extra_cppflags=
10008 for cf_add_cflags in $cf_add_cflags
10010 case "$cf_fix_cppflags" in
10012 case "$cf_add_cflags" in
10013 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10014 case "$cf_add_cflags" in
10016 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10019 && test -z "${cf_tst_cflags}" \
10020 && cf_fix_cppflags=yes
10022 if test "$cf_fix_cppflags" = yes ; then
10024 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10025 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10028 elif test "${cf_tst_cflags}" = "\"'" ; then
10030 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10031 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10037 case "$CPPFLAGS" in
10041 case "$cf_add_cflags" in
10043 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10045 CPPFLAGS=`echo "$CPPFLAGS" | \
10046 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10047 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10052 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10053 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10060 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10061 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10068 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10069 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10071 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10073 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10074 && test -z "${cf_tst_cflags}" \
10075 && cf_fix_cppflags=no
10080 if test -n "$cf_new_cflags" ; then
10082 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10083 CFLAGS="${CFLAGS}$cf_new_cflags"
10087 if test -n "$cf_new_cppflags" ; then
10089 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10090 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10094 if test -n "$cf_new_extra_cppflags" ; then
10096 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10097 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10103 cf_add_libs="$LIBS"
10106 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10107 # filter duplicates
10108 for cf_add_1lib in $cf_add_0lib; do
10109 for cf_add_2lib in $cf_add_libs; do
10110 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10115 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10117 LIBS="$cf_add_libs"
10119 # even with config script, some packages use no-override for curses.h
10121 echo "$as_me:10121: checking if we have identified curses headers" >&5
10122 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10123 if test "${cf_cv_ncurses_header+set}" = set; then
10124 echo $ECHO_N "(cached) $ECHO_C" >&6
10127 cf_cv_ncurses_header=none
10129 ncurses.h ncurses/ncurses.h \
10130 curses.h ncurses/curses.h
10132 cat >"conftest.$ac_ext" <<_ACEOF
10133 #line 10133 "configure"
10134 #include "confdefs.h"
10135 #include <${cf_header}>
10139 initscr(); tgoto("?", 0,0)
10144 rm -f "conftest.$ac_objext"
10145 if { (eval echo "$as_me:10145: \"$ac_compile\"") >&5
10146 (eval $ac_compile) 2>&5
10148 echo "$as_me:10148: \$? = $ac_status" >&5
10149 (exit "$ac_status"); } &&
10150 { ac_try='test -s "conftest.$ac_objext"'
10151 { (eval echo "$as_me:10151: \"$ac_try\"") >&5
10152 (eval $ac_try) 2>&5
10154 echo "$as_me:10154: \$? = $ac_status" >&5
10155 (exit "$ac_status"); }; }; then
10156 cf_cv_ncurses_header=$cf_header; break
10158 echo "$as_me: failed program was:" >&5
10159 cat "conftest.$ac_ext" >&5
10161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10165 echo "$as_me:10165: result: $cf_cv_ncurses_header" >&5
10166 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10168 if test "$cf_cv_ncurses_header" = none ; then
10169 { { echo "$as_me:10169: error: No curses header-files found" >&5
10170 echo "$as_me: error: No curses header-files found" >&2;}
10171 { (exit 1); exit 1; }; }
10174 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10176 for ac_header in $cf_cv_ncurses_header
10178 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10179 echo "$as_me:10179: checking for $ac_header" >&5
10180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10182 echo $ECHO_N "(cached) $ECHO_C" >&6
10184 cat >"conftest.$ac_ext" <<_ACEOF
10185 #line 10185 "configure"
10186 #include "confdefs.h"
10187 #include <$ac_header>
10189 if { (eval echo "$as_me:10189: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10190 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10192 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10194 cat conftest.err >&5
10195 echo "$as_me:10195: \$? = $ac_status" >&5
10196 (exit "$ac_status"); } >/dev/null; then
10197 if test -s conftest.err; then
10198 ac_cpp_err=$ac_c_preproc_warn_flag
10205 if test -z "$ac_cpp_err"; then
10206 eval "$as_ac_Header=yes"
10208 echo "$as_me: failed program was:" >&5
10209 cat "conftest.$ac_ext" >&5
10210 eval "$as_ac_Header=no"
10212 rm -f conftest.err "conftest.$ac_ext"
10214 echo "$as_me:10214: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10215 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10216 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10217 cat >>confdefs.h <<EOF
10218 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10224 cat >>confdefs.h <<\EOF
10228 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10230 cat >>confdefs.h <<EOF
10231 #define $cf_nculib_ROOT 1
10234 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10238 cf_ncuhdr_root=ncurses
10240 test -n "$cf_cv_curses_dir" && \
10241 test "$cf_cv_curses_dir" != "no" && { \
10243 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10244 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10246 while test "$cf_add_incdir" != /usr/include
10248 if test -d "$cf_add_incdir"
10251 if test -n "$CFLAGS$CPPFLAGS" ; then
10252 # a loop is needed to ensure we can add subdirs of existing dirs
10253 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10254 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10255 cf_have_incdir=yes; break
10260 if test "$cf_have_incdir" = no ; then
10261 if test "$cf_add_incdir" = /usr/local/include ; then
10262 if test "$GCC" = yes
10264 cf_save_CPPFLAGS=$CPPFLAGS
10266 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10267 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10269 cat >"conftest.$ac_ext" <<_ACEOF
10270 #line 10270 "configure"
10271 #include "confdefs.h"
10281 rm -f "conftest.$ac_objext"
10282 if { (eval echo "$as_me:10282: \"$ac_compile\"") >&5
10283 (eval $ac_compile) 2>&5
10285 echo "$as_me:10285: \$? = $ac_status" >&5
10286 (exit "$ac_status"); } &&
10287 { ac_try='test -s "conftest.$ac_objext"'
10288 { (eval echo "$as_me:10288: \"$ac_try\"") >&5
10289 (eval $ac_try) 2>&5
10291 echo "$as_me:10291: \$? = $ac_status" >&5
10292 (exit "$ac_status"); }; }; then
10295 echo "$as_me: failed program was:" >&5
10296 cat "conftest.$ac_ext" >&5
10299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10300 CPPFLAGS=$cf_save_CPPFLAGS
10305 if test "$cf_have_incdir" = no ; then
10306 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10308 echo "${as_me:-configure}:10308: testing adding $cf_add_incdir to include-path ..." 1>&5
10310 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10312 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10313 test "$cf_top_incdir" = "$cf_add_incdir" && break
10314 cf_add_incdir="$cf_top_incdir"
10327 echo "$as_me:10327: checking for $cf_ncuhdr_root header in include-path" >&5
10328 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10329 if test "${cf_cv_ncurses_h+set}" = set; then
10330 echo $ECHO_N "(cached) $ECHO_C" >&6
10333 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10334 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10335 for cf_header in $cf_header_list
10338 cat >"conftest.$ac_ext" <<_ACEOF
10339 #line 10339 "configure"
10340 #include "confdefs.h"
10342 #include <$cf_header>
10347 #ifdef NCURSES_VERSION
10349 printf("%s\\n", NCURSES_VERSION);
10362 rm -f "conftest.$ac_objext"
10363 if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364 (eval $ac_compile) 2>&5
10366 echo "$as_me:10366: \$? = $ac_status" >&5
10367 (exit "$ac_status"); } &&
10368 { ac_try='test -s "conftest.$ac_objext"'
10369 { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370 (eval $ac_try) 2>&5
10372 echo "$as_me:10372: \$? = $ac_status" >&5
10373 (exit "$ac_status"); }; }; then
10374 cf_cv_ncurses_h=$cf_header
10377 echo "$as_me: failed program was:" >&5
10378 cat "conftest.$ac_ext" >&5
10381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10383 test "$cf_cv_ncurses_h" != no && break
10387 echo "$as_me:10387: result: $cf_cv_ncurses_h" >&5
10388 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10390 if test "$cf_cv_ncurses_h" != no ; then
10391 cf_cv_ncurses_header=$cf_cv_ncurses_h
10394 echo "$as_me:10394: checking for $cf_ncuhdr_root include-path" >&5
10395 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10396 if test "${cf_cv_ncurses_h2+set}" = set; then
10397 echo $ECHO_N "(cached) $ECHO_C" >&6
10400 test -n "$verbose" && echo
10404 # collect the current set of include-directories from compiler flags
10405 cf_header_path_list=""
10406 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10407 for cf_header_path in $CPPFLAGS $CFLAGS
10409 case "$cf_header_path" in
10411 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10413 test "x$cf_header_path" != "xNONE" && \
10414 test -d "$cf_header_path" && \
10416 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10417 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10418 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10419 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10420 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10421 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"
10424 cf_header_path_list="$cf_header_path_list $cf_search"
10430 # add the variations for the package we are looking for
10434 test "x$prefix" != "xNONE" && \
10435 test -d "$prefix" && \
10437 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10438 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10439 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10440 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10441 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10442 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10445 for cf_subdir_prefix in \
10454 test "x$cf_subdir_prefix" != "x$prefix" && \
10455 test -d "$cf_subdir_prefix" && \
10456 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10457 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10458 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10459 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10460 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10461 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10462 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"
10467 test "$includedir" != NONE && \
10468 test "$includedir" != "/usr/include" && \
10469 test -d "$includedir" && {
10470 test -d "$includedir" && cf_search="$cf_search $includedir"
10471 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10474 test "$oldincludedir" != NONE && \
10475 test "$oldincludedir" != "/usr/include" && \
10476 test -d "$oldincludedir" && {
10477 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10478 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10481 cf_search="$cf_search $cf_header_path_list"
10483 test -n "$verbose" && echo "search path $cf_search"
10484 cf_save2_CPPFLAGS="$CPPFLAGS"
10485 for cf_incdir in $cf_search
10488 if test -n "$cf_incdir" ; then
10489 for cf_add_incdir in $cf_incdir
10491 while test "$cf_add_incdir" != /usr/include
10493 if test -d "$cf_add_incdir"
10496 if test -n "$CFLAGS$CPPFLAGS" ; then
10497 # a loop is needed to ensure we can add subdirs of existing dirs
10498 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10499 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10500 cf_have_incdir=yes; break
10505 if test "$cf_have_incdir" = no ; then
10506 if test "$cf_add_incdir" = /usr/local/include ; then
10507 if test "$GCC" = yes
10509 cf_save_CPPFLAGS=$CPPFLAGS
10511 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10512 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10514 cat >"conftest.$ac_ext" <<_ACEOF
10515 #line 10515 "configure"
10516 #include "confdefs.h"
10526 rm -f "conftest.$ac_objext"
10527 if { (eval echo "$as_me:10527: \"$ac_compile\"") >&5
10528 (eval $ac_compile) 2>&5
10530 echo "$as_me:10530: \$? = $ac_status" >&5
10531 (exit "$ac_status"); } &&
10532 { ac_try='test -s "conftest.$ac_objext"'
10533 { (eval echo "$as_me:10533: \"$ac_try\"") >&5
10534 (eval $ac_try) 2>&5
10536 echo "$as_me:10536: \$? = $ac_status" >&5
10537 (exit "$ac_status"); }; }; then
10540 echo "$as_me: failed program was:" >&5
10541 cat "conftest.$ac_ext" >&5
10544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10545 CPPFLAGS=$cf_save_CPPFLAGS
10550 if test "$cf_have_incdir" = no ; then
10551 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10553 echo "${as_me:-configure}:10553: testing adding $cf_add_incdir to include-path ..." 1>&5
10555 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10557 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10558 test "$cf_top_incdir" = "$cf_add_incdir" && break
10559 cf_add_incdir="$cf_top_incdir"
10575 cat >"conftest.$ac_ext" <<_ACEOF
10576 #line 10576 "configure"
10577 #include "confdefs.h"
10579 #include <$cf_header>
10584 #ifdef NCURSES_VERSION
10586 printf("%s\\n", NCURSES_VERSION);
10599 rm -f "conftest.$ac_objext"
10600 if { (eval echo "$as_me:10600: \"$ac_compile\"") >&5
10601 (eval $ac_compile) 2>&5
10603 echo "$as_me:10603: \$? = $ac_status" >&5
10604 (exit "$ac_status"); } &&
10605 { ac_try='test -s "conftest.$ac_objext"'
10606 { (eval echo "$as_me:10606: \"$ac_try\"") >&5
10607 (eval $ac_try) 2>&5
10609 echo "$as_me:10609: \$? = $ac_status" >&5
10610 (exit "$ac_status"); }; }; then
10611 cf_cv_ncurses_h2=$cf_header
10614 echo "$as_me: failed program was:" >&5
10615 cat "conftest.$ac_ext" >&5
10616 cf_cv_ncurses_h2=no
10618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10620 if test "$cf_cv_ncurses_h2" != no ; then
10621 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10622 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10625 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10627 CPPFLAGS="$cf_save2_CPPFLAGS"
10628 test "$cf_cv_ncurses_h2" != no && break
10630 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10630: error: not found" >&5
10631 echo "$as_me: error: not found" >&2;}
10632 { (exit 1); exit 1; }; }
10635 echo "$as_me:10635: result: $cf_cv_ncurses_h2" >&5
10636 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10638 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10639 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10640 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10641 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10644 if test -n "$cf_1st_incdir" ; then
10645 for cf_add_incdir in $cf_1st_incdir
10647 while test "$cf_add_incdir" != /usr/include
10649 if test -d "$cf_add_incdir"
10652 if test -n "$CFLAGS$CPPFLAGS" ; then
10653 # a loop is needed to ensure we can add subdirs of existing dirs
10654 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10655 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10656 cf_have_incdir=yes; break
10661 if test "$cf_have_incdir" = no ; then
10662 if test "$cf_add_incdir" = /usr/local/include ; then
10663 if test "$GCC" = yes
10665 cf_save_CPPFLAGS=$CPPFLAGS
10667 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10668 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10670 cat >"conftest.$ac_ext" <<_ACEOF
10671 #line 10671 "configure"
10672 #include "confdefs.h"
10682 rm -f "conftest.$ac_objext"
10683 if { (eval echo "$as_me:10683: \"$ac_compile\"") >&5
10684 (eval $ac_compile) 2>&5
10686 echo "$as_me:10686: \$? = $ac_status" >&5
10687 (exit "$ac_status"); } &&
10688 { ac_try='test -s "conftest.$ac_objext"'
10689 { (eval echo "$as_me:10689: \"$ac_try\"") >&5
10690 (eval $ac_try) 2>&5
10692 echo "$as_me:10692: \$? = $ac_status" >&5
10693 (exit "$ac_status"); }; }; then
10696 echo "$as_me: failed program was:" >&5
10697 cat "conftest.$ac_ext" >&5
10700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10701 CPPFLAGS=$cf_save_CPPFLAGS
10706 if test "$cf_have_incdir" = no ; then
10707 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10709 echo "${as_me:-configure}:10709: testing adding $cf_add_incdir to include-path ..." 1>&5
10711 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10713 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10714 test "$cf_top_incdir" = "$cf_add_incdir" && break
10715 cf_add_incdir="$cf_top_incdir"
10728 # Set definitions to allow ifdef'ing for ncurses.h
10730 case "$cf_cv_ncurses_header" in
10733 cat >>confdefs.h <<\EOF
10734 #define HAVE_NCURSES_H 1
10740 case "$cf_cv_ncurses_header" in
10741 (ncurses/curses.h|ncurses/ncurses.h)
10743 cat >>confdefs.h <<\EOF
10744 #define HAVE_NCURSES_NCURSES_H 1
10748 (ncursesw/curses.h|ncursesw/ncurses.h)
10750 cat >>confdefs.h <<\EOF
10751 #define HAVE_NCURSESW_NCURSES_H 1
10757 echo "$as_me:10757: checking for terminfo header" >&5
10758 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10759 if test "${cf_cv_term_header+set}" = set; then
10760 echo $ECHO_N "(cached) $ECHO_C" >&6
10763 case "${cf_cv_ncurses_header}" in
10764 (*/ncurses.h|*/ncursesw.h)
10765 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10768 cf_term_header=term.h
10772 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10774 cat >"conftest.$ac_ext" <<_ACEOF
10775 #line 10775 "configure"
10776 #include "confdefs.h"
10778 #include <${cf_cv_ncurses_header:-curses.h}>
10779 #include <$cf_test>
10784 int x = auto_left_margin; (void)x
10789 rm -f "conftest.$ac_objext"
10790 if { (eval echo "$as_me:10790: \"$ac_compile\"") >&5
10791 (eval $ac_compile) 2>&5
10793 echo "$as_me:10793: \$? = $ac_status" >&5
10794 (exit "$ac_status"); } &&
10795 { ac_try='test -s "conftest.$ac_objext"'
10796 { (eval echo "$as_me:10796: \"$ac_try\"") >&5
10797 (eval $ac_try) 2>&5
10799 echo "$as_me:10799: \$? = $ac_status" >&5
10800 (exit "$ac_status"); }; }; then
10802 cf_cv_term_header="$cf_test"
10804 echo "$as_me: failed program was:" >&5
10805 cat "conftest.$ac_ext" >&5
10807 cf_cv_term_header=unknown
10810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10811 test "$cf_cv_term_header" != unknown && break
10815 echo "$as_me:10815: result: $cf_cv_term_header" >&5
10816 echo "${ECHO_T}$cf_cv_term_header" >&6
10818 # Set definitions to allow ifdef'ing to accommodate subdirectories
10820 case "$cf_cv_term_header" in
10823 cat >>confdefs.h <<\EOF
10824 #define HAVE_TERM_H 1
10830 case "$cf_cv_term_header" in
10833 cat >>confdefs.h <<\EOF
10834 #define HAVE_NCURSES_TERM_H 1
10840 cat >>confdefs.h <<\EOF
10841 #define HAVE_NCURSESW_TERM_H 1
10847 # some applications need this, but should check for NCURSES_VERSION
10849 cat >>confdefs.h <<\EOF
10853 echo "$as_me:10853: checking for ncurses version" >&5
10854 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10855 if test "${cf_cv_ncurses_version+set}" = set; then
10856 echo $ECHO_N "(cached) $ECHO_C" >&6
10859 cf_cv_ncurses_version=no
10861 rm -f "$cf_tempfile"
10862 if test "$cross_compiling" = yes; then
10864 # This will not work if the preprocessor splits the line after the
10865 # Autoconf token. The 'unproto' program does that.
10866 cat > "conftest.$ac_ext" <<EOF
10867 #include <${cf_cv_ncurses_header:-curses.h}>
10869 #ifdef NCURSES_VERSION
10870 Autoconf NCURSES_VERSION
10878 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10879 { (eval echo "$as_me:10879: \"$cf_try\"") >&5
10880 (eval $cf_try) 2>&5
10882 echo "$as_me:10882: \$? = $ac_status" >&5
10883 (exit "$ac_status"); }
10884 if test -f conftest.out ; then
10885 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10886 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10891 cat >"conftest.$ac_ext" <<_ACEOF
10892 #line 10892 "configure"
10893 #include "confdefs.h"
10895 #include <${cf_cv_ncurses_header:-curses.h}>
10899 FILE *fp = fopen("$cf_tempfile", "w");
10900 #ifdef NCURSES_VERSION
10901 # ifdef NCURSES_VERSION_PATCH
10902 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10904 fprintf(fp, "%s\\n", NCURSES_VERSION);
10907 # ifdef __NCURSES_H
10908 fprintf(fp, "old\\n");
10913 ${cf_cv_main_return:-return}(0);
10916 rm -f "conftest$ac_exeext"
10917 if { (eval echo "$as_me:10917: \"$ac_link\"") >&5
10918 (eval $ac_link) 2>&5
10920 echo "$as_me:10920: \$? = $ac_status" >&5
10921 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10922 { (eval echo "$as_me:10922: \"$ac_try\"") >&5
10923 (eval $ac_try) 2>&5
10925 echo "$as_me:10925: \$? = $ac_status" >&5
10926 (exit "$ac_status"); }; }; then
10928 cf_cv_ncurses_version=`cat $cf_tempfile`
10930 echo "$as_me: program exited with status $ac_status" >&5
10931 echo "$as_me: failed program was:" >&5
10932 cat "conftest.$ac_ext" >&5
10934 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10936 rm -f "$cf_tempfile"
10939 echo "$as_me:10939: result: $cf_cv_ncurses_version" >&5
10940 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10941 test "$cf_cv_ncurses_version" = no ||
10942 cat >>confdefs.h <<\EOF
10946 cf_nculib_root=ncurses
10947 # This works, except for the special case where we find gpm, but
10948 # ncurses is in a nonstandard location via $LIBS, and we really want
10951 cf_ncurses_SAVE="$LIBS"
10952 echo "$as_me:10952: checking for Gpm_Open in -lgpm" >&5
10953 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10954 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10955 echo $ECHO_N "(cached) $ECHO_C" >&6
10957 ac_check_lib_save_LIBS=$LIBS
10959 cat >"conftest.$ac_ext" <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10963 /* Override any gcc2 internal prototype to avoid an error. */
10967 /* We use char because int might match the return type of a gcc2
10968 builtin and then its argument prototype would still apply. */
10978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10979 if { (eval echo "$as_me:10979: \"$ac_link\"") >&5
10980 (eval $ac_link) 2>&5
10982 echo "$as_me:10982: \$? = $ac_status" >&5
10983 (exit "$ac_status"); } &&
10984 { ac_try='test -s "conftest$ac_exeext"'
10985 { (eval echo "$as_me:10985: \"$ac_try\"") >&5
10986 (eval $ac_try) 2>&5
10988 echo "$as_me:10988: \$? = $ac_status" >&5
10989 (exit "$ac_status"); }; }; then
10990 ac_cv_lib_gpm_Gpm_Open=yes
10992 echo "$as_me: failed program was:" >&5
10993 cat "conftest.$ac_ext" >&5
10994 ac_cv_lib_gpm_Gpm_Open=no
10996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10997 LIBS=$ac_check_lib_save_LIBS
10999 echo "$as_me:10999: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11000 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11001 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11002 echo "$as_me:11002: checking for initscr in -lgpm" >&5
11003 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11004 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11005 echo $ECHO_N "(cached) $ECHO_C" >&6
11007 ac_check_lib_save_LIBS=$LIBS
11009 cat >"conftest.$ac_ext" <<_ACEOF
11010 #line 11010 "configure"
11011 #include "confdefs.h"
11013 /* Override any gcc2 internal prototype to avoid an error. */
11017 /* We use char because int might match the return type of a gcc2
11018 builtin and then its argument prototype would still apply. */
11028 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11029 if { (eval echo "$as_me:11029: \"$ac_link\"") >&5
11030 (eval $ac_link) 2>&5
11032 echo "$as_me:11032: \$? = $ac_status" >&5
11033 (exit "$ac_status"); } &&
11034 { ac_try='test -s "conftest$ac_exeext"'
11035 { (eval echo "$as_me:11035: \"$ac_try\"") >&5
11036 (eval $ac_try) 2>&5
11038 echo "$as_me:11038: \$? = $ac_status" >&5
11039 (exit "$ac_status"); }; }; then
11040 ac_cv_lib_gpm_initscr=yes
11042 echo "$as_me: failed program was:" >&5
11043 cat "conftest.$ac_ext" >&5
11044 ac_cv_lib_gpm_initscr=no
11046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11047 LIBS=$ac_check_lib_save_LIBS
11049 echo "$as_me:11049: result: $ac_cv_lib_gpm_initscr" >&5
11050 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11051 if test "$ac_cv_lib_gpm_initscr" = yes; then
11052 LIBS="$cf_ncurses_SAVE"
11054 cf_ncurses_LIBS="-lgpm"
11061 # This is only necessary if you are linking against an obsolete
11062 # version of ncurses (but it should do no harm, since it is static).
11063 if test "$cf_nculib_root" = ncurses ; then
11064 echo "$as_me:11064: checking for tgoto in -lmytinfo" >&5
11065 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11066 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11067 echo $ECHO_N "(cached) $ECHO_C" >&6
11069 ac_check_lib_save_LIBS=$LIBS
11070 LIBS="-lmytinfo $LIBS"
11071 cat >"conftest.$ac_ext" <<_ACEOF
11072 #line 11072 "configure"
11073 #include "confdefs.h"
11075 /* Override any gcc2 internal prototype to avoid an error. */
11079 /* We use char because int might match the return type of a gcc2
11080 builtin and then its argument prototype would still apply. */
11090 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11091 if { (eval echo "$as_me:11091: \"$ac_link\"") >&5
11092 (eval $ac_link) 2>&5
11094 echo "$as_me:11094: \$? = $ac_status" >&5
11095 (exit "$ac_status"); } &&
11096 { ac_try='test -s "conftest$ac_exeext"'
11097 { (eval echo "$as_me:11097: \"$ac_try\"") >&5
11098 (eval $ac_try) 2>&5
11100 echo "$as_me:11100: \$? = $ac_status" >&5
11101 (exit "$ac_status"); }; }; then
11102 ac_cv_lib_mytinfo_tgoto=yes
11104 echo "$as_me: failed program was:" >&5
11105 cat "conftest.$ac_ext" >&5
11106 ac_cv_lib_mytinfo_tgoto=no
11108 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11109 LIBS=$ac_check_lib_save_LIBS
11111 echo "$as_me:11111: result: $ac_cv_lib_mytinfo_tgoto" >&5
11112 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11113 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11114 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11121 cf_add_libs="$LIBS"
11124 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11125 # filter duplicates
11126 for cf_add_1lib in $cf_add_0lib; do
11127 for cf_add_2lib in $cf_add_libs; do
11128 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11133 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11135 LIBS="$cf_add_libs"
11137 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11140 cf_add_libs="$LIBS"
11143 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11144 # filter duplicates
11145 for cf_add_1lib in $cf_add_0lib; do
11146 for cf_add_2lib in $cf_add_libs; do
11147 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11152 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11154 LIBS="$cf_add_libs"
11158 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11160 echo "$as_me:11160: checking for initscr" >&5
11161 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11162 if test "${ac_cv_func_initscr+set}" = set; then
11163 echo $ECHO_N "(cached) $ECHO_C" >&6
11165 cat >"conftest.$ac_ext" <<_ACEOF
11166 #line 11166 "configure"
11167 #include "confdefs.h"
11168 #define initscr autoconf_temporary
11169 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11176 /* We use char because int might match the return type of a gcc2
11177 builtin and then its argument prototype would still apply. */
11178 char initscr (void);
11184 /* The GNU C library defines stubs for functions which it implements
11185 to always fail with ENOSYS. Some functions are actually named
11186 something starting with __ and the normal name is an alias. */
11187 #if defined (__stub_initscr) || defined (__stub___initscr)
11188 #error found stub for initscr
11196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11197 if { (eval echo "$as_me:11197: \"$ac_link\"") >&5
11198 (eval $ac_link) 2>&5
11200 echo "$as_me:11200: \$? = $ac_status" >&5
11201 (exit "$ac_status"); } &&
11202 { ac_try='test -s "conftest$ac_exeext"'
11203 { (eval echo "$as_me:11203: \"$ac_try\"") >&5
11204 (eval $ac_try) 2>&5
11206 echo "$as_me:11206: \$? = $ac_status" >&5
11207 (exit "$ac_status"); }; }; then
11208 ac_cv_func_initscr=yes
11210 echo "$as_me: failed program was:" >&5
11211 cat "conftest.$ac_ext" >&5
11212 ac_cv_func_initscr=no
11214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11216 echo "$as_me:11216: result: $ac_cv_func_initscr" >&5
11217 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11218 if test "$ac_cv_func_initscr" = yes; then
11219 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11222 cf_save_LIBS="$LIBS"
11223 echo "$as_me:11223: checking for initscr in -l$cf_nculib_root" >&5
11224 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11225 LIBS="-l$cf_nculib_root $LIBS"
11226 cat >"conftest.$ac_ext" <<_ACEOF
11227 #line 11227 "configure"
11228 #include "confdefs.h"
11229 #include <${cf_cv_ncurses_header:-curses.h}>
11238 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11239 if { (eval echo "$as_me:11239: \"$ac_link\"") >&5
11240 (eval $ac_link) 2>&5
11242 echo "$as_me:11242: \$? = $ac_status" >&5
11243 (exit "$ac_status"); } &&
11244 { ac_try='test -s "conftest$ac_exeext"'
11245 { (eval echo "$as_me:11245: \"$ac_try\"") >&5
11246 (eval $ac_try) 2>&5
11248 echo "$as_me:11248: \$? = $ac_status" >&5
11249 (exit "$ac_status"); }; }; then
11250 echo "$as_me:11250: result: yes" >&5
11251 echo "${ECHO_T}yes" >&6
11252 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11255 echo "$as_me: failed program was:" >&5
11256 cat "conftest.$ac_ext" >&5
11257 echo "$as_me:11257: result: no" >&5
11258 echo "${ECHO_T}no" >&6
11261 cf_library_path_list=""
11262 if test -n "${LDFLAGS}${LIBS}" ; then
11263 for cf_library_path in $LDFLAGS $LIBS
11265 case "$cf_library_path" in
11267 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11269 test "x$cf_library_path" != "xNONE" && \
11270 test -d "$cf_library_path" && \
11272 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11273 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11274 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11275 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11276 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11277 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"
11280 cf_library_path_list="$cf_library_path_list $cf_search"
11288 test "x$prefix" != "xNONE" && \
11289 test -d "$prefix" && \
11291 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11292 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11293 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11294 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11295 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11296 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11299 for cf_subdir_prefix in \
11308 test "x$cf_subdir_prefix" != "x$prefix" && \
11309 test -d "$cf_subdir_prefix" && \
11310 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11311 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11312 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11313 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11314 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11315 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11316 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"
11321 cf_search="$cf_library_path_list $cf_search"
11323 for cf_libdir in $cf_search
11325 echo "$as_me:11325: checking for -l$cf_nculib_root in $cf_libdir" >&5
11326 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11327 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11328 cat >"conftest.$ac_ext" <<_ACEOF
11329 #line 11329 "configure"
11330 #include "confdefs.h"
11331 #include <${cf_cv_ncurses_header:-curses.h}>
11340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11341 if { (eval echo "$as_me:11341: \"$ac_link\"") >&5
11342 (eval $ac_link) 2>&5
11344 echo "$as_me:11344: \$? = $ac_status" >&5
11345 (exit "$ac_status"); } &&
11346 { ac_try='test -s "conftest$ac_exeext"'
11347 { (eval echo "$as_me:11347: \"$ac_try\"") >&5
11348 (eval $ac_try) 2>&5
11350 echo "$as_me:11350: \$? = $ac_status" >&5
11351 (exit "$ac_status"); }; }; then
11352 echo "$as_me:11352: result: yes" >&5
11353 echo "${ECHO_T}yes" >&6
11354 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11357 echo "$as_me: failed program was:" >&5
11358 cat "conftest.$ac_ext" >&5
11359 echo "$as_me:11359: result: no" >&5
11360 echo "${ECHO_T}no" >&6
11361 LIBS="$cf_save_LIBS"
11363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11367 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11371 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11373 if test "$cf_found_library" = no ; then
11374 { { echo "$as_me:11374: error: Cannot link $cf_nculib_root library" >&5
11375 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11376 { (exit 1); exit 1; }; }
11381 if test -n "$cf_ncurses_LIBS" ; then
11382 echo "$as_me:11382: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11383 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11384 cf_ncurses_SAVE="$LIBS"
11385 for p in $cf_ncurses_LIBS ; do
11386 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11387 if test "$q" != "$LIBS" ; then
11391 cat >"conftest.$ac_ext" <<_ACEOF
11392 #line 11392 "configure"
11393 #include "confdefs.h"
11394 #include <${cf_cv_ncurses_header:-curses.h}>
11398 initscr(); mousemask(0,0); tigetstr((char *)0);
11403 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11404 if { (eval echo "$as_me:11404: \"$ac_link\"") >&5
11405 (eval $ac_link) 2>&5
11407 echo "$as_me:11407: \$? = $ac_status" >&5
11408 (exit "$ac_status"); } &&
11409 { ac_try='test -s "conftest$ac_exeext"'
11410 { (eval echo "$as_me:11410: \"$ac_try\"") >&5
11411 (eval $ac_try) 2>&5
11413 echo "$as_me:11413: \$? = $ac_status" >&5
11414 (exit "$ac_status"); }; }; then
11415 echo "$as_me:11415: result: yes" >&5
11416 echo "${ECHO_T}yes" >&6
11418 echo "$as_me: failed program was:" >&5
11419 cat "conftest.$ac_ext" >&5
11420 echo "$as_me:11420: result: no" >&5
11421 echo "${ECHO_T}no" >&6
11422 LIBS="$cf_ncurses_SAVE"
11424 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11427 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11429 cat >>confdefs.h <<EOF
11430 #define $cf_nculib_ROOT 1
11435 NCURSES_CONFIG=none
11440 if test "$NCURSES_CONFIG_PKG" != none ; then
11441 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11443 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11444 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11445 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11447 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11448 if test -z "$cf_cv_abi_version"
11450 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11453 elif test "$NCURSES_CONFIG" != none ; then
11455 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11457 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11458 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11459 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11461 # ABI version is not available from headers
11462 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11466 for cf_name in MAJOR MINOR PATCH
11468 cat >conftest.$ac_ext <<CF_EOF
11469 #include <${cf_cv_ncurses_header:-curses.h}>
11470 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11472 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11473 { (eval echo "$as_me:11473: \"$cf_try\"") >&5
11474 (eval $cf_try) 2>&5
11476 echo "$as_me:11476: \$? = $ac_status" >&5
11477 (exit "$ac_status"); }
11478 if test -f conftest.out ; then
11479 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11480 eval NCURSES_$cf_name=\"$cf_result\"
11481 # cat conftest.$ac_ext
11486 cf_cv_abi_version=${NCURSES_MAJOR}
11490 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11492 cf_cv_timestamp=`date`
11494 echo "$as_me:11494: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11495 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11497 echo "$as_me:11497: checking if you want to have a library-prefix" >&5
11498 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11500 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11501 if test "${with_lib_prefix+set}" = set; then
11502 withval="$with_lib_prefix"
11503 with_lib_prefix=$withval
11505 with_lib_prefix=auto
11507 echo "$as_me:11507: result: $with_lib_prefix" >&5
11508 echo "${ECHO_T}$with_lib_prefix" >&6
11510 if test "$with_lib_prefix" = auto
11513 case "$cf_cv_system_name" in
11515 if test "$DFT_LWR_MODEL" = libtool; then
11524 (*) LIB_PREFIX='lib'
11527 cf_prefix=$LIB_PREFIX
11529 elif test "$with_lib_prefix" = no
11533 LIB_PREFIX=$with_lib_prefix
11538 ###############################################################################
11540 if test X"$CC_G_OPT" = X"" ; then
11542 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11545 echo "$as_me:11545: checking for default loader flags" >&5
11546 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11547 case $DFT_LWR_MODEL in
11548 (normal) LD_MODEL='' ;;
11549 (debug) LD_MODEL=$CC_G_OPT ;;
11550 (profile) LD_MODEL='-pg';;
11551 (shared) LD_MODEL='' ;;
11553 echo "$as_me:11553: result: $LD_MODEL" >&5
11554 echo "${ECHO_T}$LD_MODEL" >&6
11557 if test "x$cf_cv_enable_rpath" != xno
11559 echo "$as_me:11559: checking for an rpath option" >&5
11560 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11561 case "$cf_cv_system_name" in
11563 if test "$GCC" = yes; then
11564 LD_RPATH_OPT="-Wl,-rpath,"
11566 LD_RPATH_OPT="-rpath "
11569 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11570 LD_RPATH_OPT="-Wl,-rpath,"
11572 (openbsd[2-9].*|mirbsd*)
11573 LD_RPATH_OPT="-Wl,-rpath,"
11576 LD_RPATH_OPT="-rpath "
11579 LD_RPATH_OPT="-Wl,-rpath,"
11582 LD_RPATH_OPT="-rpath "
11590 echo "$as_me:11590: result: $LD_RPATH_OPT" >&5
11591 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11593 case "x$LD_RPATH_OPT" in
11595 echo "$as_me:11595: checking if we need a space after rpath option" >&5
11596 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11597 cf_save_LIBS="$LIBS"
11599 cf_add_libs="$LIBS"
11602 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11603 # filter duplicates
11604 for cf_add_1lib in $cf_add_0lib; do
11605 for cf_add_2lib in $cf_add_libs; do
11606 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11611 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11613 LIBS="$cf_add_libs"
11615 cat >"conftest.$ac_ext" <<_ACEOF
11616 #line 11616 "configure"
11617 #include "confdefs.h"
11627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11628 if { (eval echo "$as_me:11628: \"$ac_link\"") >&5
11629 (eval $ac_link) 2>&5
11631 echo "$as_me:11631: \$? = $ac_status" >&5
11632 (exit "$ac_status"); } &&
11633 { ac_try='test -s "conftest$ac_exeext"'
11634 { (eval echo "$as_me:11634: \"$ac_try\"") >&5
11635 (eval $ac_try) 2>&5
11637 echo "$as_me:11637: \$? = $ac_status" >&5
11638 (exit "$ac_status"); }; }; then
11641 echo "$as_me: failed program was:" >&5
11642 cat "conftest.$ac_ext" >&5
11645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11646 LIBS="$cf_save_LIBS"
11647 echo "$as_me:11647: result: $cf_rpath_space" >&5
11648 echo "${ECHO_T}$cf_rpath_space" >&6
11649 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11658 INSTALL_LIB="-m 644"
11659 : ${rel_builddir:=.}
11665 cf_cv_do_symlinks=no
11667 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11669 echo "$as_me:11669: checking if release/abi version should be used for shared libs" >&5
11670 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11672 # Check whether --with-shlib-version or --without-shlib-version was given.
11673 if test "${with_shlib_version+set}" = set; then
11674 withval="$with_shlib_version"
11675 test -z "$withval" && withval=auto
11678 cf_cv_shlib_version=auto
11681 cf_cv_shlib_version=$withval
11684 echo "$as_me:11684: result: $withval" >&5
11685 echo "${ECHO_T}$withval" >&6
11686 { { echo "$as_me:11686: error: option value must be one of: rel, abi, or auto" >&5
11687 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11688 { (exit 1); exit 1; }; }
11693 cf_cv_shlib_version=auto
11695 echo "$as_me:11695: result: $cf_cv_shlib_version" >&5
11696 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11698 cf_cv_rm_so_locs=no
11701 # Some less-capable ports of gcc support only -fpic
11705 if test "$GCC" = yes
11709 case "$cf_cv_system_name" in
11710 (*linux*) # e.g., PGI compiler
11716 if test "$cf_try_fPIC" = yes
11718 echo "$as_me:11718: checking which $CC option to use" >&5
11719 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11720 cf_save_CFLAGS="$CFLAGS"
11721 for CC_SHARED_OPTS in -fPIC -fpic ''
11723 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11724 cat >"conftest.$ac_ext" <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11736 rm -f "conftest.$ac_objext"
11737 if { (eval echo "$as_me:11737: \"$ac_compile\"") >&5
11738 (eval $ac_compile) 2>&5
11740 echo "$as_me:11740: \$? = $ac_status" >&5
11741 (exit "$ac_status"); } &&
11742 { ac_try='test -s "conftest.$ac_objext"'
11743 { (eval echo "$as_me:11743: \"$ac_try\"") >&5
11744 (eval $ac_try) 2>&5
11746 echo "$as_me:11746: \$? = $ac_status" >&5
11747 (exit "$ac_status"); }; }; then
11750 echo "$as_me: failed program was:" >&5
11751 cat "conftest.$ac_ext" >&5
11753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11755 echo "$as_me:11755: result: $CC_SHARED_OPTS" >&5
11756 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11757 CFLAGS="$cf_save_CFLAGS"
11760 cf_cv_shlib_version_infix=no
11762 case "$cf_cv_system_name" in
11763 (aix4.3-9*|aix[5-7]*)
11764 if test "$GCC" = yes; then
11765 CC_SHARED_OPTS='-Wl,-brtl'
11766 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11768 CC_SHARED_OPTS='-brtl'
11769 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11770 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11774 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11778 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11779 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11780 cf_cv_shlib_version=cygdll
11781 cf_cv_shlib_version_infix=cygdll
11784 cat >mk_shared_lib.sh <<-CF_EOF
11787 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11790 Linking shared library
11791 ** SHARED_LIB \$SHARED_LIB
11792 ** IMPORT_LIB \$IMPORT_LIB
11794 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11796 chmod +x mk_shared_lib.sh
11800 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11801 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11802 cf_cv_shlib_version=msysdll
11803 cf_cv_shlib_version_infix=msysdll
11806 cat >mk_shared_lib.sh <<-CF_EOF
11809 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11812 Linking shared library
11813 ** SHARED_LIB \$SHARED_LIB
11814 ** IMPORT_LIB \$IMPORT_LIB
11816 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11818 chmod +x mk_shared_lib.sh
11821 cf_try_cflags="no-cpp-precomp"
11822 CC_SHARED_OPTS="-dynamic"
11823 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11824 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11825 cf_cv_shlib_version_infix=yes
11826 echo "$as_me:11826: checking if ld -search_paths_first works" >&5
11827 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11828 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11829 echo $ECHO_N "(cached) $ECHO_C" >&6
11832 cf_save_LDFLAGS=$LDFLAGS
11833 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11834 cat >"conftest.$ac_ext" <<_ACEOF
11835 #line 11835 "configure"
11836 #include "confdefs.h"
11846 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11847 if { (eval echo "$as_me:11847: \"$ac_link\"") >&5
11848 (eval $ac_link) 2>&5
11850 echo "$as_me:11850: \$? = $ac_status" >&5
11851 (exit "$ac_status"); } &&
11852 { ac_try='test -s "conftest$ac_exeext"'
11853 { (eval echo "$as_me:11853: \"$ac_try\"") >&5
11854 (eval $ac_try) 2>&5
11856 echo "$as_me:11856: \$? = $ac_status" >&5
11857 (exit "$ac_status"); }; }; then
11858 cf_cv_ldflags_search_paths_first=yes
11860 echo "$as_me: failed program was:" >&5
11861 cat "conftest.$ac_ext" >&5
11862 cf_cv_ldflags_search_paths_first=no
11864 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11865 LDFLAGS=$cf_save_LDFLAGS
11867 echo "$as_me:11867: result: $cf_cv_ldflags_search_paths_first" >&5
11868 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11869 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11870 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11875 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11876 if test "$cf_cv_shlib_version" = rel; then
11877 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11879 cf_cv_shared_soname='`basename $@`'
11882 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11885 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11886 if test "$GCC" != yes; then
11887 CC_SHARED_OPTS='+Z'
11889 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11890 INSTALL_LIB="-m 555"
11893 # (tested with gcc 2.7.2 -- I don't have c89)
11894 if test "$GCC" = yes; then
11895 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11897 CC_SHARED_OPTS='+Z'
11898 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11900 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11901 # HP-UX shared libraries must be executable, and should be
11902 # readonly to exploit a quirk in the memory manager.
11903 INSTALL_LIB="-m 555"
11906 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11907 if test "$cf_cv_shlib_version" = rel; then
11908 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11910 cf_shared_soname='`basename $@`'
11913 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11916 if test "$cf_cv_enable_rpath" = yes ; then
11917 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11919 # tested with IRIX 5.2 and 'cc'.
11920 if test "$GCC" != yes; then
11921 CC_SHARED_OPTS='-KPIC'
11922 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11924 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11926 cf_cv_rm_so_locs=yes
11928 (linux*|gnu*|k*bsd*-gnu)
11929 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11930 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11931 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11933 if test "$cf_cv_enable_rpath" = yes ; then
11934 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11937 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11938 if test "$cf_cv_shlib_version" = rel; then
11939 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11941 cf_cv_shared_soname='`basename $@`'
11944 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11947 cf_cv_shlib_version=msvcdll
11948 cf_cv_shlib_version_infix=msvcdll
11951 if test "$DFT_LWR_MODEL" = "shared" ; then
11952 LOCAL_LDFLAGS="-link -dll"
11953 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11954 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11957 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11958 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11959 cat >mk_shared_lib.sh <<-CF_EOF
11962 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11967 Linking shared library
11968 ** SHARED LIB \$SHARED_LIB
11969 ** IMPORT_LIB \$IMPORT_LIB
11971 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11972 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11973 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11975 chmod +x mk_shared_lib.sh
11976 cat >mk_prog.sh <<-CF_EOF
11979 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11982 ldopts=("/subsystem:console")
11985 while test \$# -gt 0; do
11988 # ignore -link argument
11991 # ignore runtime-library option
12006 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12009 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12015 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12016 ldopts+=("\${linkarg}")
12024 ldopts+=("-out:\$1")
12033 if [ "\$isdll" -ne 0 ]; then
12034 for lib in \${libs[*]}; do
12035 ldopts+=("\$lib.dll.lib")
12038 for lib in \${libs[*]}; do
12039 ldopts+=("\$lib.lib")
12044 ** ld options: "\${ldopts[@]}"
12046 exec \$LD \${ldopts[@]}
12048 chmod +x mk_prog.sh
12049 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12050 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12053 cf_cv_shlib_version=mingw
12054 cf_cv_shlib_version_infix=mingw
12057 if test "$DFT_LWR_MODEL" = "shared" ; then
12058 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12059 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12060 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12063 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12064 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12065 cat >mk_shared_lib.sh <<-CF_EOF
12068 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12071 Linking shared library
12072 ** SHARED_LIB \$SHARED_LIB
12073 ** IMPORT_LIB \$IMPORT_LIB
12075 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12077 chmod +x mk_shared_lib.sh
12079 (openbsd[2-9].*|mirbsd*)
12080 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12081 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12082 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12084 if test "$cf_cv_enable_rpath" = yes ; then
12085 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12087 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12089 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12090 if test "$cf_cv_shlib_version" = rel; then
12091 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12093 cf_cv_shared_soname='`basename $@`'
12096 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12100 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12104 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12106 (nto-qnx*|openbsd*|freebsd[12].*)
12107 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12108 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12109 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12111 (dragonfly*|freebsd*)
12112 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12113 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12114 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12115 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12116 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12119 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12120 if test "$cf_cv_shlib_version" = rel; then
12121 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12123 cf_cv_shared_soname='`basename $@`'
12126 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12129 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12130 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12131 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12132 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12133 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12134 if test "$cf_cv_shlib_version" = auto; then
12135 if test -f /usr/libexec/ld.elf_so; then
12136 cf_cv_shlib_version=abi
12138 cf_cv_shlib_version=rel
12142 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12143 if test "$cf_cv_shlib_version" = rel; then
12144 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12146 cf_cv_shared_soname='`basename $@`'
12149 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12151 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12155 # tested with OSF/1 V3.2 and 'cc'
12156 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12157 # link with shared libs).
12158 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12161 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12164 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12165 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12166 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12167 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12169 cf_cv_rm_so_locs=yes
12171 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12172 # tested with osr5.0.5
12173 if test "$GCC" != yes; then
12174 CC_SHARED_OPTS='-belf -KPIC'
12176 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12177 if test "$cf_cv_enable_rpath" = yes ; then
12178 # only way is to set LD_RUN_PATH but no switch for it
12181 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12182 LINK_PROGS='LD_RUN_PATH=${libdir}'
12183 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12186 # tested with SunOS 4.1.1 and gcc 2.7.0
12187 if test "$GCC" != yes; then
12188 CC_SHARED_OPTS='-KPIC'
12190 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12191 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12194 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12195 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12196 if test "$DFT_LWR_MODEL" = "shared" ; then
12197 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12198 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12200 if test "$cf_cv_enable_rpath" = yes ; then
12201 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12204 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12205 if test "$cf_cv_shlib_version" = rel; then
12206 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12208 cf_cv_shared_soname='`basename $@`'
12211 if test "$GCC" != yes; then
12212 cf_save_CFLAGS="$CFLAGS"
12213 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12215 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12216 cat >"conftest.$ac_ext" <<_ACEOF
12217 #line 12217 "configure"
12218 #include "confdefs.h"
12223 printf("Hello\\n");
12228 rm -f "conftest.$ac_objext"
12229 if { (eval echo "$as_me:12229: \"$ac_compile\"") >&5
12230 (eval $ac_compile) 2>&5
12232 echo "$as_me:12232: \$? = $ac_status" >&5
12233 (exit "$ac_status"); } &&
12234 { ac_try='test -s "conftest.$ac_objext"'
12235 { (eval echo "$as_me:12235: \"$ac_try\"") >&5
12236 (eval $ac_try) 2>&5
12238 echo "$as_me:12238: \$? = $ac_status" >&5
12239 (exit "$ac_status"); }; }; then
12242 echo "$as_me: failed program was:" >&5
12243 cat "conftest.$ac_ext" >&5
12245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12247 CFLAGS="$cf_save_CFLAGS"
12248 CC_SHARED_OPTS=$cf_shared_opts
12249 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12251 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12254 (sysv5uw7*|unix_sv*)
12255 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12256 if test "$GCC" != yes; then
12257 CC_SHARED_OPTS='-KPIC'
12259 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12262 CC_SHARED_OPTS='unknown'
12263 MK_SHARED_LIB='echo unknown'
12267 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12268 case "$cf_cv_shlib_version" in
12270 case "$MK_SHARED_LIB" in
12272 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12275 { echo "$as_me:12275: WARNING: ignored --with-shlib-version" >&5
12276 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12282 if test -n "$cf_try_cflags"
12284 cat > conftest.$ac_ext <<EOF
12285 #line 12285 "${as_me:-configure}"
12287 int main(int argc, char *argv[])
12289 printf("hello\\n");
12290 return (argv[argc-1] == 0) ;
12293 cf_save_CFLAGS="$CFLAGS"
12294 for cf_opt in $cf_try_cflags
12296 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12297 echo "$as_me:12297: checking if CFLAGS option -$cf_opt works" >&5
12298 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12299 if { (eval echo "$as_me:12299: \"$ac_compile\"") >&5
12300 (eval $ac_compile) 2>&5
12302 echo "$as_me:12302: \$? = $ac_status" >&5
12303 (exit "$ac_status"); }; then
12304 echo "$as_me:12304: result: yes" >&5
12305 echo "${ECHO_T}yes" >&6
12306 cf_save_CFLAGS="$CFLAGS"
12308 echo "$as_me:12308: result: no" >&5
12309 echo "${ECHO_T}no" >&6
12312 CFLAGS="$cf_save_CFLAGS"
12315 # RPATH_LIST is a colon-separated list of directories
12316 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12317 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12319 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12321 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12323 echo "${as_me:-configure}:12323: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12325 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12327 echo "${as_me:-configure}:12327: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12329 # The test/sample programs in the original tree link using rpath option.
12330 # Make it optional for packagers.
12331 if test -n "$LOCAL_LDFLAGS"
12333 echo "$as_me:12333: checking if you want to link sample programs with rpath option" >&5
12334 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12336 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12337 if test "${enable_rpath_link+set}" = set; then
12338 enableval="$enable_rpath_link"
12339 with_rpath_link=$enableval
12341 with_rpath_link=yes
12343 echo "$as_me:12343: result: $with_rpath_link" >&5
12344 echo "${ECHO_T}$with_rpath_link" >&6
12345 if test "$with_rpath_link" = no
12352 ###############################################################################
12354 ### use option --enable-broken-linker to force on use of broken-linker support
12356 echo "$as_me:12356: checking if you want broken-linker support code" >&5
12357 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12359 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12360 if test "${enable_broken_linker+set}" = set; then
12361 enableval="$enable_broken_linker"
12362 with_broken_linker=$enableval
12364 with_broken_linker=no
12366 echo "$as_me:12366: result: $with_broken_linker" >&5
12367 echo "${ECHO_T}$with_broken_linker" >&6
12369 : "${BROKEN_LINKER:=0}"
12370 if test "x$with_broken_linker" = xyes ; then
12372 cat >>confdefs.h <<\EOF
12373 #define BROKEN_LINKER 1
12379 # Check to define _XOPEN_SOURCE "automatically"
12381 echo "$as_me:12381: checking if the POSIX test-macros are already defined" >&5
12382 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12383 if test "${cf_cv_posix_visible+set}" = set; then
12384 echo $ECHO_N "(cached) $ECHO_C" >&6
12387 cat >"conftest.$ac_ext" <<_ACEOF
12388 #line 12388 "configure"
12389 #include "confdefs.h"
12395 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12396 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12397 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12398 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12399 #error conflicting symbols found
12406 rm -f "conftest.$ac_objext"
12407 if { (eval echo "$as_me:12407: \"$ac_compile\"") >&5
12408 (eval $ac_compile) 2>&5
12410 echo "$as_me:12410: \$? = $ac_status" >&5
12411 (exit "$ac_status"); } &&
12412 { ac_try='test -s "conftest.$ac_objext"'
12413 { (eval echo "$as_me:12413: \"$ac_try\"") >&5
12414 (eval $ac_try) 2>&5
12416 echo "$as_me:12416: \$? = $ac_status" >&5
12417 (exit "$ac_status"); }; }; then
12418 cf_cv_posix_visible=no
12420 echo "$as_me: failed program was:" >&5
12421 cat "conftest.$ac_ext" >&5
12422 cf_cv_posix_visible=yes
12424 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12427 echo "$as_me:12427: result: $cf_cv_posix_visible" >&5
12428 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12430 if test "$cf_cv_posix_visible" = no; then
12432 cf_XOPEN_SOURCE=600
12433 cf_POSIX_C_SOURCE=199506L
12438 cf_xopen_source="-D_ALL_SOURCE"
12441 cf_XOPEN_SOURCE=600
12444 cf_xopen_source="-D_APPLE_C_SOURCE"
12447 cf_xopen_source="-D_DARWIN_C_SOURCE"
12450 (freebsd*|dragonfly*|midnightbsd*)
12451 # 5.x headers associate
12452 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12453 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12454 cf_POSIX_C_SOURCE=200112L
12455 cf_XOPEN_SOURCE=600
12456 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12459 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12462 cf_xopen_source="-D_HPUX_SOURCE"
12465 cf_xopen_source="-D_SGI_SOURCE"
12468 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12470 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12472 echo "$as_me:12472: checking if this is the GNU C library" >&5
12473 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12474 if test "${cf_cv_gnu_library+set}" = set; then
12475 echo $ECHO_N "(cached) $ECHO_C" >&6
12478 cat >"conftest.$ac_ext" <<_ACEOF
12479 #line 12479 "configure"
12480 #include "confdefs.h"
12481 #include <sys/types.h>
12486 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12488 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12491 # error not GNU C library
12497 rm -f "conftest.$ac_objext"
12498 if { (eval echo "$as_me:12498: \"$ac_compile\"") >&5
12499 (eval $ac_compile) 2>&5
12501 echo "$as_me:12501: \$? = $ac_status" >&5
12502 (exit "$ac_status"); } &&
12503 { ac_try='test -s "conftest.$ac_objext"'
12504 { (eval echo "$as_me:12504: \"$ac_try\"") >&5
12505 (eval $ac_try) 2>&5
12507 echo "$as_me:12507: \$? = $ac_status" >&5
12508 (exit "$ac_status"); }; }; then
12509 cf_cv_gnu_library=yes
12511 echo "$as_me: failed program was:" >&5
12512 cat "conftest.$ac_ext" >&5
12513 cf_cv_gnu_library=no
12515 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12518 echo "$as_me:12518: result: $cf_cv_gnu_library" >&5
12519 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12521 if test x$cf_cv_gnu_library = xyes; then
12523 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12524 # was changed to help a little. newlib incorporated the change about 4
12526 echo "$as_me:12526: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12527 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12528 if test "${cf_cv_gnu_library_219+set}" = set; then
12529 echo $ECHO_N "(cached) $ECHO_C" >&6
12532 cf_save="$CPPFLAGS"
12534 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12535 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12537 cat >"conftest.$ac_ext" <<_ACEOF
12538 #line 12538 "configure"
12539 #include "confdefs.h"
12540 #include <sys/types.h>
12545 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12547 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12550 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12556 rm -f "conftest.$ac_objext"
12557 if { (eval echo "$as_me:12557: \"$ac_compile\"") >&5
12558 (eval $ac_compile) 2>&5
12560 echo "$as_me:12560: \$? = $ac_status" >&5
12561 (exit "$ac_status"); } &&
12562 { ac_try='test -s "conftest.$ac_objext"'
12563 { (eval echo "$as_me:12563: \"$ac_try\"") >&5
12564 (eval $ac_try) 2>&5
12566 echo "$as_me:12566: \$? = $ac_status" >&5
12567 (exit "$ac_status"); }; }; then
12568 cf_cv_gnu_library_219=yes
12570 echo "$as_me: failed program was:" >&5
12571 cat "conftest.$ac_ext" >&5
12572 cf_cv_gnu_library_219=no
12574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12575 CPPFLAGS="$cf_save"
12578 echo "$as_me:12578: result: $cf_cv_gnu_library_219" >&5
12579 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12581 if test "x$cf_cv_gnu_library_219" = xyes; then
12582 cf_save="$CPPFLAGS"
12583 echo "$as_me:12583: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12584 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12585 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12586 echo $ECHO_N "(cached) $ECHO_C" >&6
12592 cf_new_extra_cppflags=
12594 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12596 case "$cf_fix_cppflags" in
12598 case "$cf_add_cflags" in
12599 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12600 case "$cf_add_cflags" in
12602 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12605 && test -z "${cf_tst_cflags}" \
12606 && cf_fix_cppflags=yes
12608 if test "$cf_fix_cppflags" = yes ; then
12610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12614 elif test "${cf_tst_cflags}" = "\"'" ; then
12616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12623 case "$CPPFLAGS" in
12627 case "$cf_add_cflags" in
12629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12631 CPPFLAGS=`echo "$CPPFLAGS" | \
12632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12638 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12639 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12646 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12647 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12654 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12655 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12657 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12659 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12660 && test -z "${cf_tst_cflags}" \
12661 && cf_fix_cppflags=no
12666 if test -n "$cf_new_cflags" ; then
12668 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12669 CFLAGS="${CFLAGS}$cf_new_cflags"
12673 if test -n "$cf_new_cppflags" ; then
12675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12676 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12680 if test -n "$cf_new_extra_cppflags" ; then
12682 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12683 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12687 cat >"conftest.$ac_ext" <<_ACEOF
12688 #line 12688 "configure"
12689 #include "confdefs.h"
12691 #include <limits.h>
12692 #include <sys/types.h>
12698 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12701 # error GNU C library is too old
12707 rm -f "conftest.$ac_objext"
12708 if { (eval echo "$as_me:12708: \"$ac_compile\"") >&5
12709 (eval $ac_compile) 2>&5
12711 echo "$as_me:12711: \$? = $ac_status" >&5
12712 (exit "$ac_status"); } &&
12713 { ac_try='test -s "conftest.$ac_objext"'
12714 { (eval echo "$as_me:12714: \"$ac_try\"") >&5
12715 (eval $ac_try) 2>&5
12717 echo "$as_me:12717: \$? = $ac_status" >&5
12718 (exit "$ac_status"); }; }; then
12719 cf_cv_gnu_dftsrc_219=yes
12721 echo "$as_me: failed program was:" >&5
12722 cat "conftest.$ac_ext" >&5
12723 cf_cv_gnu_dftsrc_219=no
12725 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12728 echo "$as_me:12728: result: $cf_cv_gnu_dftsrc_219" >&5
12729 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12730 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12732 cf_cv_gnu_dftsrc_219=maybe
12735 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12737 echo "$as_me:12737: checking if we must define _GNU_SOURCE" >&5
12738 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12739 if test "${cf_cv_gnu_source+set}" = set; then
12740 echo $ECHO_N "(cached) $ECHO_C" >&6
12743 cat >"conftest.$ac_ext" <<_ACEOF
12744 #line 12744 "configure"
12745 #include "confdefs.h"
12746 #include <sys/types.h>
12751 #ifndef _XOPEN_SOURCE
12752 #error expected _XOPEN_SOURCE to be defined
12758 rm -f "conftest.$ac_objext"
12759 if { (eval echo "$as_me:12759: \"$ac_compile\"") >&5
12760 (eval $ac_compile) 2>&5
12762 echo "$as_me:12762: \$? = $ac_status" >&5
12763 (exit "$ac_status"); } &&
12764 { ac_try='test -s "conftest.$ac_objext"'
12765 { (eval echo "$as_me:12765: \"$ac_try\"") >&5
12766 (eval $ac_try) 2>&5
12768 echo "$as_me:12768: \$? = $ac_status" >&5
12769 (exit "$ac_status"); }; }; then
12770 cf_cv_gnu_source=no
12772 echo "$as_me: failed program was:" >&5
12773 cat "conftest.$ac_ext" >&5
12774 cf_save="$CPPFLAGS"
12779 cf_new_extra_cppflags=
12781 for cf_add_cflags in -D_GNU_SOURCE
12783 case "$cf_fix_cppflags" in
12785 case "$cf_add_cflags" in
12786 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12787 case "$cf_add_cflags" in
12789 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12791 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12792 && test -z "${cf_tst_cflags}" \
12793 && cf_fix_cppflags=yes
12795 if test "$cf_fix_cppflags" = yes ; then
12797 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12798 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12801 elif test "${cf_tst_cflags}" = "\"'" ; then
12803 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12804 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12810 case "$CPPFLAGS" in
12814 case "$cf_add_cflags" in
12816 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12818 CPPFLAGS=`echo "$CPPFLAGS" | \
12819 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12820 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12825 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12826 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12833 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12834 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12844 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12846 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12847 && test -z "${cf_tst_cflags}" \
12848 && cf_fix_cppflags=no
12853 if test -n "$cf_new_cflags" ; then
12855 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12856 CFLAGS="${CFLAGS}$cf_new_cflags"
12860 if test -n "$cf_new_cppflags" ; then
12862 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12863 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12867 if test -n "$cf_new_extra_cppflags" ; then
12869 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12870 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12874 cat >"conftest.$ac_ext" <<_ACEOF
12875 #line 12875 "configure"
12876 #include "confdefs.h"
12877 #include <sys/types.h>
12882 #ifdef _XOPEN_SOURCE
12883 #error expected _XOPEN_SOURCE to be undefined
12889 rm -f "conftest.$ac_objext"
12890 if { (eval echo "$as_me:12890: \"$ac_compile\"") >&5
12891 (eval $ac_compile) 2>&5
12893 echo "$as_me:12893: \$? = $ac_status" >&5
12894 (exit "$ac_status"); } &&
12895 { ac_try='test -s "conftest.$ac_objext"'
12896 { (eval echo "$as_me:12896: \"$ac_try\"") >&5
12897 (eval $ac_try) 2>&5
12899 echo "$as_me:12899: \$? = $ac_status" >&5
12900 (exit "$ac_status"); }; }; then
12901 cf_cv_gnu_source=no
12903 echo "$as_me: failed program was:" >&5
12904 cat "conftest.$ac_ext" >&5
12905 cf_cv_gnu_source=yes
12907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12908 CPPFLAGS="$cf_save"
12911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12914 echo "$as_me:12914: result: $cf_cv_gnu_source" >&5
12915 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12917 if test "$cf_cv_gnu_source" = yes
12919 echo "$as_me:12919: checking if we should also define _DEFAULT_SOURCE" >&5
12920 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12921 if test "${cf_cv_default_source+set}" = set; then
12922 echo $ECHO_N "(cached) $ECHO_C" >&6
12925 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12926 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12928 cat >"conftest.$ac_ext" <<_ACEOF
12929 #line 12929 "configure"
12930 #include "confdefs.h"
12931 #include <sys/types.h>
12936 #ifdef _DEFAULT_SOURCE
12937 #error expected _DEFAULT_SOURCE to be undefined
12943 rm -f "conftest.$ac_objext"
12944 if { (eval echo "$as_me:12944: \"$ac_compile\"") >&5
12945 (eval $ac_compile) 2>&5
12947 echo "$as_me:12947: \$? = $ac_status" >&5
12948 (exit "$ac_status"); } &&
12949 { ac_try='test -s "conftest.$ac_objext"'
12950 { (eval echo "$as_me:12950: \"$ac_try\"") >&5
12951 (eval $ac_try) 2>&5
12953 echo "$as_me:12953: \$? = $ac_status" >&5
12954 (exit "$ac_status"); }; }; then
12955 cf_cv_default_source=no
12957 echo "$as_me: failed program was:" >&5
12958 cat "conftest.$ac_ext" >&5
12959 cf_cv_default_source=yes
12961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12964 echo "$as_me:12964: result: $cf_cv_default_source" >&5
12965 echo "${ECHO_T}$cf_cv_default_source" >&6
12966 if test "$cf_cv_default_source" = yes
12969 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12970 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12980 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12983 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12986 if test "$cf_cv_posix_visible" = no; then
12988 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12990 cf_save_CFLAGS="$CFLAGS"
12991 cf_save_CPPFLAGS="$CPPFLAGS"
12993 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12994 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12995 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12997 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12998 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12999 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13001 echo "$as_me:13001: checking if we should define _POSIX_C_SOURCE" >&5
13002 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13003 if test "${cf_cv_posix_c_source+set}" = set; then
13004 echo $ECHO_N "(cached) $ECHO_C" >&6
13007 echo "${as_me:-configure}:13007: testing if the symbol is already defined go no further ..." 1>&5
13009 cat >"conftest.$ac_ext" <<_ACEOF
13010 #line 13010 "configure"
13011 #include "confdefs.h"
13012 #include <sys/types.h>
13017 #ifndef _POSIX_C_SOURCE
13024 rm -f "conftest.$ac_objext"
13025 if { (eval echo "$as_me:13025: \"$ac_compile\"") >&5
13026 (eval $ac_compile) 2>&5
13028 echo "$as_me:13028: \$? = $ac_status" >&5
13029 (exit "$ac_status"); } &&
13030 { ac_try='test -s "conftest.$ac_objext"'
13031 { (eval echo "$as_me:13031: \"$ac_try\"") >&5
13032 (eval $ac_try) 2>&5
13034 echo "$as_me:13034: \$? = $ac_status" >&5
13035 (exit "$ac_status"); }; }; then
13036 cf_cv_posix_c_source=no
13038 echo "$as_me: failed program was:" >&5
13039 cat "conftest.$ac_ext" >&5
13040 cf_want_posix_source=no
13041 case .$cf_POSIX_C_SOURCE in
13043 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13046 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13047 cf_want_posix_source=yes
13050 cf_want_posix_source=yes
13053 if test "$cf_want_posix_source" = yes ; then
13054 cat >"conftest.$ac_ext" <<_ACEOF
13055 #line 13055 "configure"
13056 #include "confdefs.h"
13057 #include <sys/types.h>
13062 #ifdef _POSIX_SOURCE
13069 rm -f "conftest.$ac_objext"
13070 if { (eval echo "$as_me:13070: \"$ac_compile\"") >&5
13071 (eval $ac_compile) 2>&5
13073 echo "$as_me:13073: \$? = $ac_status" >&5
13074 (exit "$ac_status"); } &&
13075 { ac_try='test -s "conftest.$ac_objext"'
13076 { (eval echo "$as_me:13076: \"$ac_try\"") >&5
13077 (eval $ac_try) 2>&5
13079 echo "$as_me:13079: \$? = $ac_status" >&5
13080 (exit "$ac_status"); }; }; then
13083 echo "$as_me: failed program was:" >&5
13084 cat "conftest.$ac_ext" >&5
13085 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13090 echo "${as_me:-configure}:13090: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13092 CFLAGS="$cf_trim_CFLAGS"
13093 CPPFLAGS="$cf_trim_CPPFLAGS"
13095 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13096 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13098 echo "${as_me:-configure}:13098: testing if the second compile does not leave our definition intact error ..." 1>&5
13100 cat >"conftest.$ac_ext" <<_ACEOF
13101 #line 13101 "configure"
13102 #include "confdefs.h"
13103 #include <sys/types.h>
13108 #ifndef _POSIX_C_SOURCE
13115 rm -f "conftest.$ac_objext"
13116 if { (eval echo "$as_me:13116: \"$ac_compile\"") >&5
13117 (eval $ac_compile) 2>&5
13119 echo "$as_me:13119: \$? = $ac_status" >&5
13120 (exit "$ac_status"); } &&
13121 { ac_try='test -s "conftest.$ac_objext"'
13122 { (eval echo "$as_me:13122: \"$ac_try\"") >&5
13123 (eval $ac_try) 2>&5
13125 echo "$as_me:13125: \$? = $ac_status" >&5
13126 (exit "$ac_status"); }; }; then
13129 echo "$as_me: failed program was:" >&5
13130 cat "conftest.$ac_ext" >&5
13131 cf_cv_posix_c_source=no
13133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13134 CFLAGS="$cf_save_CFLAGS"
13135 CPPFLAGS="$cf_save_CPPFLAGS"
13138 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13141 echo "$as_me:13141: result: $cf_cv_posix_c_source" >&5
13142 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13144 if test "$cf_cv_posix_c_source" != no ; then
13145 CFLAGS="$cf_trim_CFLAGS"
13146 CPPFLAGS="$cf_trim_CPPFLAGS"
13151 cf_new_extra_cppflags=
13153 for cf_add_cflags in $cf_cv_posix_c_source
13155 case "$cf_fix_cppflags" in
13157 case "$cf_add_cflags" in
13158 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13159 case "$cf_add_cflags" in
13161 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13163 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13164 && test -z "${cf_tst_cflags}" \
13165 && cf_fix_cppflags=yes
13167 if test "$cf_fix_cppflags" = yes ; then
13169 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13170 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13173 elif test "${cf_tst_cflags}" = "\"'" ; then
13175 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13176 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13182 case "$CPPFLAGS" in
13186 case "$cf_add_cflags" in
13188 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13190 CPPFLAGS=`echo "$CPPFLAGS" | \
13191 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13192 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13197 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13198 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13205 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13206 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13216 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13218 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13219 && test -z "${cf_tst_cflags}" \
13220 && cf_fix_cppflags=no
13225 if test -n "$cf_new_cflags" ; then
13227 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13228 CFLAGS="${CFLAGS}$cf_new_cflags"
13232 if test -n "$cf_new_cppflags" ; then
13234 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13235 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13239 if test -n "$cf_new_extra_cppflags" ; then
13241 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13242 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13248 fi # cf_cv_posix_visible
13252 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13255 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13256 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13257 # Abusing the conformance level is a workaround.
13258 { echo "$as_me:13258: WARNING: this system does not provide usable locale support" >&5
13259 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13260 cf_xopen_source="-D_BSD_SOURCE"
13261 cf_XOPEN_SOURCE=700
13264 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13265 cf_xopen_source="-D_BSD_SOURCE"
13266 cf_XOPEN_SOURCE=600
13269 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13272 cf_xopen_source="-D_OSF_SOURCE"
13275 cf_xopen_source="-D_QNX_SOURCE"
13278 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13281 cf_xopen_source="-D__EXTENSIONS__"
13282 cf_cv_xopen_source=broken
13284 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13290 echo "$as_me:13290: checking if we should define _XOPEN_SOURCE" >&5
13291 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13292 if test "${cf_cv_xopen_source+set}" = set; then
13293 echo $ECHO_N "(cached) $ECHO_C" >&6
13296 cat >"conftest.$ac_ext" <<_ACEOF
13297 #line 13297 "configure"
13298 #include "confdefs.h"
13300 #include <stdlib.h>
13301 #include <string.h>
13302 #include <sys/types.h>
13308 #ifndef _XOPEN_SOURCE
13316 rm -f "conftest.$ac_objext"
13317 if { (eval echo "$as_me:13317: \"$ac_compile\"") >&5
13318 (eval $ac_compile) 2>&5
13320 echo "$as_me:13320: \$? = $ac_status" >&5
13321 (exit "$ac_status"); } &&
13322 { ac_try='test -s "conftest.$ac_objext"'
13323 { (eval echo "$as_me:13323: \"$ac_try\"") >&5
13324 (eval $ac_try) 2>&5
13326 echo "$as_me:13326: \$? = $ac_status" >&5
13327 (exit "$ac_status"); }; }; then
13328 cf_cv_xopen_source=no
13330 echo "$as_me: failed program was:" >&5
13331 cat "conftest.$ac_ext" >&5
13332 cf_save="$CPPFLAGS"
13334 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13335 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13337 cat >"conftest.$ac_ext" <<_ACEOF
13338 #line 13338 "configure"
13339 #include "confdefs.h"
13341 #include <stdlib.h>
13342 #include <string.h>
13343 #include <sys/types.h>
13349 #ifndef _XOPEN_SOURCE
13357 rm -f "conftest.$ac_objext"
13358 if { (eval echo "$as_me:13358: \"$ac_compile\"") >&5
13359 (eval $ac_compile) 2>&5
13361 echo "$as_me:13361: \$? = $ac_status" >&5
13362 (exit "$ac_status"); } &&
13363 { ac_try='test -s "conftest.$ac_objext"'
13364 { (eval echo "$as_me:13364: \"$ac_try\"") >&5
13365 (eval $ac_try) 2>&5
13367 echo "$as_me:13367: \$? = $ac_status" >&5
13368 (exit "$ac_status"); }; }; then
13369 cf_cv_xopen_source=no
13371 echo "$as_me: failed program was:" >&5
13372 cat "conftest.$ac_ext" >&5
13373 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13376 CPPFLAGS="$cf_save"
13379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13382 echo "$as_me:13382: result: $cf_cv_xopen_source" >&5
13383 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13385 if test "$cf_cv_xopen_source" != no ; then
13387 CFLAGS=`echo "$CFLAGS" | \
13388 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13389 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13391 CPPFLAGS=`echo "$CPPFLAGS" | \
13392 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13393 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13395 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13397 for cf_add_cflags in $cf_temp_xopen_source
13399 case "x$cf_add_cflags" in
13402 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13405 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'`
13406 test "$CFLAGS" != "$cf_old_cflag" || break
13408 CFLAGS="$cf_old_cflag"
13411 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13414 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'`
13415 test "$CPPFLAGS" != "$cf_old_cflag" || break
13417 CPPFLAGS="$cf_old_cflag"
13426 cf_new_extra_cppflags=
13428 for cf_add_cflags in $cf_add_cflags
13430 case "$cf_fix_cppflags" in
13432 case "$cf_add_cflags" in
13433 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13434 case "$cf_add_cflags" in
13436 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13438 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13439 && test -z "${cf_tst_cflags}" \
13440 && cf_fix_cppflags=yes
13442 if test "$cf_fix_cppflags" = yes ; then
13444 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13445 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13448 elif test "${cf_tst_cflags}" = "\"'" ; then
13450 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13451 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13457 case "$CPPFLAGS" in
13461 case "$cf_add_cflags" in
13463 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13465 CPPFLAGS=`echo "$CPPFLAGS" | \
13466 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13467 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13472 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13473 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13480 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13481 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13488 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13489 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13491 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13493 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13494 && test -z "${cf_tst_cflags}" \
13495 && cf_fix_cppflags=no
13500 if test -n "$cf_new_cflags" ; then
13502 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13503 CFLAGS="${CFLAGS}$cf_new_cflags"
13507 if test -n "$cf_new_cppflags" ; then
13509 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13510 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13514 if test -n "$cf_new_extra_cppflags" ; then
13516 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13517 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13525 cf_save_xopen_cppflags="$CPPFLAGS"
13527 if test "$cf_cv_posix_visible" = no; then
13529 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13531 cf_save_CFLAGS="$CFLAGS"
13532 cf_save_CPPFLAGS="$CPPFLAGS"
13534 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13535 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13536 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13538 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13539 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13540 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13542 echo "$as_me:13542: checking if we should define _POSIX_C_SOURCE" >&5
13543 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13544 if test "${cf_cv_posix_c_source+set}" = set; then
13545 echo $ECHO_N "(cached) $ECHO_C" >&6
13548 echo "${as_me:-configure}:13548: testing if the symbol is already defined go no further ..." 1>&5
13550 cat >"conftest.$ac_ext" <<_ACEOF
13551 #line 13551 "configure"
13552 #include "confdefs.h"
13553 #include <sys/types.h>
13558 #ifndef _POSIX_C_SOURCE
13565 rm -f "conftest.$ac_objext"
13566 if { (eval echo "$as_me:13566: \"$ac_compile\"") >&5
13567 (eval $ac_compile) 2>&5
13569 echo "$as_me:13569: \$? = $ac_status" >&5
13570 (exit "$ac_status"); } &&
13571 { ac_try='test -s "conftest.$ac_objext"'
13572 { (eval echo "$as_me:13572: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13575 echo "$as_me:13575: \$? = $ac_status" >&5
13576 (exit "$ac_status"); }; }; then
13577 cf_cv_posix_c_source=no
13579 echo "$as_me: failed program was:" >&5
13580 cat "conftest.$ac_ext" >&5
13581 cf_want_posix_source=no
13582 case .$cf_POSIX_C_SOURCE in
13584 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13587 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13588 cf_want_posix_source=yes
13591 cf_want_posix_source=yes
13594 if test "$cf_want_posix_source" = yes ; then
13595 cat >"conftest.$ac_ext" <<_ACEOF
13596 #line 13596 "configure"
13597 #include "confdefs.h"
13598 #include <sys/types.h>
13603 #ifdef _POSIX_SOURCE
13610 rm -f "conftest.$ac_objext"
13611 if { (eval echo "$as_me:13611: \"$ac_compile\"") >&5
13612 (eval $ac_compile) 2>&5
13614 echo "$as_me:13614: \$? = $ac_status" >&5
13615 (exit "$ac_status"); } &&
13616 { ac_try='test -s "conftest.$ac_objext"'
13617 { (eval echo "$as_me:13617: \"$ac_try\"") >&5
13618 (eval $ac_try) 2>&5
13620 echo "$as_me:13620: \$? = $ac_status" >&5
13621 (exit "$ac_status"); }; }; then
13624 echo "$as_me: failed program was:" >&5
13625 cat "conftest.$ac_ext" >&5
13626 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13631 echo "${as_me:-configure}:13631: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13633 CFLAGS="$cf_trim_CFLAGS"
13634 CPPFLAGS="$cf_trim_CPPFLAGS"
13636 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13637 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13639 echo "${as_me:-configure}:13639: testing if the second compile does not leave our definition intact error ..." 1>&5
13641 cat >"conftest.$ac_ext" <<_ACEOF
13642 #line 13642 "configure"
13643 #include "confdefs.h"
13644 #include <sys/types.h>
13649 #ifndef _POSIX_C_SOURCE
13656 rm -f "conftest.$ac_objext"
13657 if { (eval echo "$as_me:13657: \"$ac_compile\"") >&5
13658 (eval $ac_compile) 2>&5
13660 echo "$as_me:13660: \$? = $ac_status" >&5
13661 (exit "$ac_status"); } &&
13662 { ac_try='test -s "conftest.$ac_objext"'
13663 { (eval echo "$as_me:13663: \"$ac_try\"") >&5
13664 (eval $ac_try) 2>&5
13666 echo "$as_me:13666: \$? = $ac_status" >&5
13667 (exit "$ac_status"); }; }; then
13670 echo "$as_me: failed program was:" >&5
13671 cat "conftest.$ac_ext" >&5
13672 cf_cv_posix_c_source=no
13674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13675 CFLAGS="$cf_save_CFLAGS"
13676 CPPFLAGS="$cf_save_CPPFLAGS"
13679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13682 echo "$as_me:13682: result: $cf_cv_posix_c_source" >&5
13683 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13685 if test "$cf_cv_posix_c_source" != no ; then
13686 CFLAGS="$cf_trim_CFLAGS"
13687 CPPFLAGS="$cf_trim_CPPFLAGS"
13692 cf_new_extra_cppflags=
13694 for cf_add_cflags in $cf_cv_posix_c_source
13696 case "$cf_fix_cppflags" in
13698 case "$cf_add_cflags" in
13699 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13700 case "$cf_add_cflags" in
13702 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13704 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13705 && test -z "${cf_tst_cflags}" \
13706 && cf_fix_cppflags=yes
13708 if test "$cf_fix_cppflags" = yes ; then
13710 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13711 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13714 elif test "${cf_tst_cflags}" = "\"'" ; then
13716 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13717 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13723 case "$CPPFLAGS" in
13727 case "$cf_add_cflags" in
13729 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13731 CPPFLAGS=`echo "$CPPFLAGS" | \
13732 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13733 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13738 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13739 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13746 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13747 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13754 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13755 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13757 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13759 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13760 && test -z "${cf_tst_cflags}" \
13761 && cf_fix_cppflags=no
13766 if test -n "$cf_new_cflags" ; then
13768 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13769 CFLAGS="${CFLAGS}$cf_new_cflags"
13773 if test -n "$cf_new_cppflags" ; then
13775 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13776 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13780 if test -n "$cf_new_extra_cppflags" ; then
13782 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13783 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13789 fi # cf_cv_posix_visible
13791 # Some of these niche implementations use copy/paste, double-check...
13792 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13794 echo "${as_me:-configure}:13794: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13796 cat >"conftest.$ac_ext" <<_ACEOF
13797 #line 13797 "configure"
13798 #include "confdefs.h"
13800 #include <stdlib.h>
13801 #include <string.h>
13802 #include <sys/types.h>
13808 #ifndef _XOPEN_SOURCE
13816 rm -f "conftest.$ac_objext"
13817 if { (eval echo "$as_me:13817: \"$ac_compile\"") >&5
13818 (eval $ac_compile) 2>&5
13820 echo "$as_me:13820: \$? = $ac_status" >&5
13821 (exit "$ac_status"); } &&
13822 { ac_try='test -s "conftest.$ac_objext"'
13823 { (eval echo "$as_me:13823: \"$ac_try\"") >&5
13824 (eval $ac_try) 2>&5
13826 echo "$as_me:13826: \$? = $ac_status" >&5
13827 (exit "$ac_status"); }; }; then
13830 echo "$as_me: failed program was:" >&5
13831 cat "conftest.$ac_ext" >&5
13833 { echo "$as_me:13833: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13834 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13835 CPPFLAGS="$cf_save_xopen_cppflags"
13837 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13841 if test -n "$cf_xopen_source" ; then
13843 for cf_add_cflags in $cf_xopen_source
13845 case "x$cf_add_cflags" in
13848 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13851 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'`
13852 test "$CFLAGS" != "$cf_old_cflag" || break
13853 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13855 echo "${as_me:-configure}:13855: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13857 CFLAGS="$cf_old_cflag"
13860 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13863 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'`
13864 test "$CPPFLAGS" != "$cf_old_cflag" || break
13865 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13867 echo "${as_me:-configure}:13867: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13869 CPPFLAGS="$cf_old_cflag"
13878 cf_new_extra_cppflags=
13880 for cf_add_cflags in $cf_add_cflags
13882 case "$cf_fix_cppflags" in
13884 case "$cf_add_cflags" in
13885 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13886 case "$cf_add_cflags" in
13888 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13890 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13891 && test -z "${cf_tst_cflags}" \
13892 && cf_fix_cppflags=yes
13894 if test "$cf_fix_cppflags" = yes ; then
13896 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13897 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13900 elif test "${cf_tst_cflags}" = "\"'" ; then
13902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13909 case "$CPPFLAGS" in
13913 case "$cf_add_cflags" in
13915 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13917 CPPFLAGS=`echo "$CPPFLAGS" | \
13918 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13919 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13924 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13925 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13932 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13933 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13940 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13941 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13943 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13945 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13946 && test -z "${cf_tst_cflags}" \
13947 && cf_fix_cppflags=no
13952 if test -n "$cf_new_cflags" ; then
13953 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13955 echo "${as_me:-configure}:13955: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13957 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13958 CFLAGS="${CFLAGS}$cf_new_cflags"
13962 if test -n "$cf_new_cppflags" ; then
13963 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13965 echo "${as_me:-configure}:13965: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13967 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13968 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13972 if test -n "$cf_new_extra_cppflags" ; then
13973 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13975 echo "${as_me:-configure}:13975: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13977 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13978 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13986 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13987 echo "$as_me:13987: checking if _XOPEN_SOURCE really is set" >&5
13988 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13989 cat >"conftest.$ac_ext" <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992 #include <stdlib.h>
13997 #ifndef _XOPEN_SOURCE
14004 rm -f "conftest.$ac_objext"
14005 if { (eval echo "$as_me:14005: \"$ac_compile\"") >&5
14006 (eval $ac_compile) 2>&5
14008 echo "$as_me:14008: \$? = $ac_status" >&5
14009 (exit "$ac_status"); } &&
14010 { ac_try='test -s "conftest.$ac_objext"'
14011 { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012 (eval $ac_try) 2>&5
14014 echo "$as_me:14014: \$? = $ac_status" >&5
14015 (exit "$ac_status"); }; }; then
14016 cf_XOPEN_SOURCE_set=yes
14018 echo "$as_me: failed program was:" >&5
14019 cat "conftest.$ac_ext" >&5
14020 cf_XOPEN_SOURCE_set=no
14022 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14023 echo "$as_me:14023: result: $cf_XOPEN_SOURCE_set" >&5
14024 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14025 if test "$cf_XOPEN_SOURCE_set" = yes
14027 cat >"conftest.$ac_ext" <<_ACEOF
14028 #line 14028 "configure"
14029 #include "confdefs.h"
14030 #include <stdlib.h>
14035 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14042 rm -f "conftest.$ac_objext"
14043 if { (eval echo "$as_me:14043: \"$ac_compile\"") >&5
14044 (eval $ac_compile) 2>&5
14046 echo "$as_me:14046: \$? = $ac_status" >&5
14047 (exit "$ac_status"); } &&
14048 { ac_try='test -s "conftest.$ac_objext"'
14049 { (eval echo "$as_me:14049: \"$ac_try\"") >&5
14050 (eval $ac_try) 2>&5
14052 echo "$as_me:14052: \$? = $ac_status" >&5
14053 (exit "$ac_status"); }; }; then
14054 cf_XOPEN_SOURCE_set_ok=yes
14056 echo "$as_me: failed program was:" >&5
14057 cat "conftest.$ac_ext" >&5
14058 cf_XOPEN_SOURCE_set_ok=no
14060 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14061 if test "$cf_XOPEN_SOURCE_set_ok" = no
14063 { echo "$as_me:14063: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14064 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14068 echo "$as_me:14068: checking if we should define _XOPEN_SOURCE" >&5
14069 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14070 if test "${cf_cv_xopen_source+set}" = set; then
14071 echo $ECHO_N "(cached) $ECHO_C" >&6
14074 cat >"conftest.$ac_ext" <<_ACEOF
14075 #line 14075 "configure"
14076 #include "confdefs.h"
14078 #include <stdlib.h>
14079 #include <string.h>
14080 #include <sys/types.h>
14086 #ifndef _XOPEN_SOURCE
14094 rm -f "conftest.$ac_objext"
14095 if { (eval echo "$as_me:14095: \"$ac_compile\"") >&5
14096 (eval $ac_compile) 2>&5
14098 echo "$as_me:14098: \$? = $ac_status" >&5
14099 (exit "$ac_status"); } &&
14100 { ac_try='test -s "conftest.$ac_objext"'
14101 { (eval echo "$as_me:14101: \"$ac_try\"") >&5
14102 (eval $ac_try) 2>&5
14104 echo "$as_me:14104: \$? = $ac_status" >&5
14105 (exit "$ac_status"); }; }; then
14106 cf_cv_xopen_source=no
14108 echo "$as_me: failed program was:" >&5
14109 cat "conftest.$ac_ext" >&5
14110 cf_save="$CPPFLAGS"
14112 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14113 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14115 cat >"conftest.$ac_ext" <<_ACEOF
14116 #line 14116 "configure"
14117 #include "confdefs.h"
14119 #include <stdlib.h>
14120 #include <string.h>
14121 #include <sys/types.h>
14127 #ifndef _XOPEN_SOURCE
14135 rm -f "conftest.$ac_objext"
14136 if { (eval echo "$as_me:14136: \"$ac_compile\"") >&5
14137 (eval $ac_compile) 2>&5
14139 echo "$as_me:14139: \$? = $ac_status" >&5
14140 (exit "$ac_status"); } &&
14141 { ac_try='test -s "conftest.$ac_objext"'
14142 { (eval echo "$as_me:14142: \"$ac_try\"") >&5
14143 (eval $ac_try) 2>&5
14145 echo "$as_me:14145: \$? = $ac_status" >&5
14146 (exit "$ac_status"); }; }; then
14147 cf_cv_xopen_source=no
14149 echo "$as_me: failed program was:" >&5
14150 cat "conftest.$ac_ext" >&5
14151 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14154 CPPFLAGS="$cf_save"
14157 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14160 echo "$as_me:14160: result: $cf_cv_xopen_source" >&5
14161 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14163 if test "$cf_cv_xopen_source" != no ; then
14165 CFLAGS=`echo "$CFLAGS" | \
14166 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14167 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14169 CPPFLAGS=`echo "$CPPFLAGS" | \
14170 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14171 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14173 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14175 for cf_add_cflags in $cf_temp_xopen_source
14177 case "x$cf_add_cflags" in
14180 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14183 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'`
14184 test "$CFLAGS" != "$cf_old_cflag" || break
14186 CFLAGS="$cf_old_cflag"
14189 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14192 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'`
14193 test "$CPPFLAGS" != "$cf_old_cflag" || break
14195 CPPFLAGS="$cf_old_cflag"
14204 cf_new_extra_cppflags=
14206 for cf_add_cflags in $cf_add_cflags
14208 case "$cf_fix_cppflags" in
14210 case "$cf_add_cflags" in
14211 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14212 case "$cf_add_cflags" in
14214 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14216 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14217 && test -z "${cf_tst_cflags}" \
14218 && cf_fix_cppflags=yes
14220 if test "$cf_fix_cppflags" = yes ; then
14222 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14223 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14226 elif test "${cf_tst_cflags}" = "\"'" ; then
14228 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14229 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14235 case "$CPPFLAGS" in
14239 case "$cf_add_cflags" in
14241 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14243 CPPFLAGS=`echo "$CPPFLAGS" | \
14244 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14245 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14250 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14251 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14258 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14259 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14269 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14271 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14272 && test -z "${cf_tst_cflags}" \
14273 && cf_fix_cppflags=no
14278 if test -n "$cf_new_cflags" ; then
14280 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14281 CFLAGS="${CFLAGS}$cf_new_cflags"
14285 if test -n "$cf_new_cppflags" ; then
14287 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14288 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14292 if test -n "$cf_new_extra_cppflags" ; then
14294 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14295 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14305 fi # cf_cv_posix_visible
14307 # Check whether --enable-largefile or --disable-largefile was given.
14308 if test "${enable_largefile+set}" = set; then
14309 enableval="$enable_largefile"
14312 if test "$enable_largefile" != no; then
14314 echo "$as_me:14314: checking for special C compiler options needed for large files" >&5
14315 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14316 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14317 echo $ECHO_N "(cached) $ECHO_C" >&6
14319 ac_cv_sys_largefile_CC=no
14320 if test "$GCC" != yes; then
14323 # IRIX 6.2 and later do not support large files by default,
14324 # so use the C compiler's -n32 option if that helps.
14325 cat >"conftest.$ac_ext" <<_ACEOF
14326 #line 14326 "configure"
14327 #include "confdefs.h"
14328 #include <sys/types.h>
14329 /* Check that off_t can represent 2**63 - 1 correctly.
14330 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14331 since some C++ compilers masquerading as C compilers
14332 incorrectly reject 9223372036854775807. */
14333 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14334 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14335 && LARGE_OFF_T % 2147483647 == 1)
14345 rm -f "conftest.$ac_objext"
14346 if { (eval echo "$as_me:14346: \"$ac_compile\"") >&5
14347 (eval $ac_compile) 2>&5
14349 echo "$as_me:14349: \$? = $ac_status" >&5
14350 (exit "$ac_status"); } &&
14351 { ac_try='test -s "conftest.$ac_objext"'
14352 { (eval echo "$as_me:14352: \"$ac_try\"") >&5
14353 (eval $ac_try) 2>&5
14355 echo "$as_me:14355: \$? = $ac_status" >&5
14356 (exit "$ac_status"); }; }; then
14359 echo "$as_me: failed program was:" >&5
14360 cat "conftest.$ac_ext" >&5
14362 rm -f "conftest.$ac_objext"
14364 rm -f "conftest.$ac_objext"
14365 if { (eval echo "$as_me:14365: \"$ac_compile\"") >&5
14366 (eval $ac_compile) 2>&5
14368 echo "$as_me:14368: \$? = $ac_status" >&5
14369 (exit "$ac_status"); } &&
14370 { ac_try='test -s "conftest.$ac_objext"'
14371 { (eval echo "$as_me:14371: \"$ac_try\"") >&5
14372 (eval $ac_try) 2>&5
14374 echo "$as_me:14374: \$? = $ac_status" >&5
14375 (exit "$ac_status"); }; }; then
14376 ac_cv_sys_largefile_CC=' -n32'; break
14378 echo "$as_me: failed program was:" >&5
14379 cat "conftest.$ac_ext" >&5
14381 rm -f "conftest.$ac_objext"
14385 rm -f "conftest.$ac_ext"
14388 echo "$as_me:14388: result: $ac_cv_sys_largefile_CC" >&5
14389 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14390 if test "$ac_cv_sys_largefile_CC" != no; then
14391 CC=$CC$ac_cv_sys_largefile_CC
14394 echo "$as_me:14394: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14395 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14396 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14397 echo $ECHO_N "(cached) $ECHO_C" >&6
14400 ac_cv_sys_file_offset_bits=no
14401 cat >"conftest.$ac_ext" <<_ACEOF
14402 #line 14402 "configure"
14403 #include "confdefs.h"
14404 #include <sys/types.h>
14405 /* Check that off_t can represent 2**63 - 1 correctly.
14406 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14407 since some C++ compilers masquerading as C compilers
14408 incorrectly reject 9223372036854775807. */
14409 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14410 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14411 && LARGE_OFF_T % 2147483647 == 1)
14421 rm -f "conftest.$ac_objext"
14422 if { (eval echo "$as_me:14422: \"$ac_compile\"") >&5
14423 (eval $ac_compile) 2>&5
14425 echo "$as_me:14425: \$? = $ac_status" >&5
14426 (exit "$ac_status"); } &&
14427 { ac_try='test -s "conftest.$ac_objext"'
14428 { (eval echo "$as_me:14428: \"$ac_try\"") >&5
14429 (eval $ac_try) 2>&5
14431 echo "$as_me:14431: \$? = $ac_status" >&5
14432 (exit "$ac_status"); }; }; then
14435 echo "$as_me: failed program was:" >&5
14436 cat "conftest.$ac_ext" >&5
14438 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14439 cat >"conftest.$ac_ext" <<_ACEOF
14440 #line 14440 "configure"
14441 #include "confdefs.h"
14442 #define _FILE_OFFSET_BITS 64
14443 #include <sys/types.h>
14444 /* Check that off_t can represent 2**63 - 1 correctly.
14445 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14446 since some C++ compilers masquerading as C compilers
14447 incorrectly reject 9223372036854775807. */
14448 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14449 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14450 && LARGE_OFF_T % 2147483647 == 1)
14460 rm -f "conftest.$ac_objext"
14461 if { (eval echo "$as_me:14461: \"$ac_compile\"") >&5
14462 (eval $ac_compile) 2>&5
14464 echo "$as_me:14464: \$? = $ac_status" >&5
14465 (exit "$ac_status"); } &&
14466 { ac_try='test -s "conftest.$ac_objext"'
14467 { (eval echo "$as_me:14467: \"$ac_try\"") >&5
14468 (eval $ac_try) 2>&5
14470 echo "$as_me:14470: \$? = $ac_status" >&5
14471 (exit "$ac_status"); }; }; then
14472 ac_cv_sys_file_offset_bits=64; break
14474 echo "$as_me: failed program was:" >&5
14475 cat "conftest.$ac_ext" >&5
14477 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14481 echo "$as_me:14481: result: $ac_cv_sys_file_offset_bits" >&5
14482 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14483 if test "$ac_cv_sys_file_offset_bits" != no; then
14485 cat >>confdefs.h <<EOF
14486 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14491 echo "$as_me:14491: checking for _LARGE_FILES value needed for large files" >&5
14492 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14493 if test "${ac_cv_sys_large_files+set}" = set; then
14494 echo $ECHO_N "(cached) $ECHO_C" >&6
14497 ac_cv_sys_large_files=no
14498 cat >"conftest.$ac_ext" <<_ACEOF
14499 #line 14499 "configure"
14500 #include "confdefs.h"
14501 #include <sys/types.h>
14502 /* Check that off_t can represent 2**63 - 1 correctly.
14503 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14504 since some C++ compilers masquerading as C compilers
14505 incorrectly reject 9223372036854775807. */
14506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14507 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14508 && LARGE_OFF_T % 2147483647 == 1)
14518 rm -f "conftest.$ac_objext"
14519 if { (eval echo "$as_me:14519: \"$ac_compile\"") >&5
14520 (eval $ac_compile) 2>&5
14522 echo "$as_me:14522: \$? = $ac_status" >&5
14523 (exit "$ac_status"); } &&
14524 { ac_try='test -s "conftest.$ac_objext"'
14525 { (eval echo "$as_me:14525: \"$ac_try\"") >&5
14526 (eval $ac_try) 2>&5
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit "$ac_status"); }; }; then
14532 echo "$as_me: failed program was:" >&5
14533 cat "conftest.$ac_ext" >&5
14535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14536 cat >"conftest.$ac_ext" <<_ACEOF
14537 #line 14537 "configure"
14538 #include "confdefs.h"
14539 #define _LARGE_FILES 1
14540 #include <sys/types.h>
14541 /* Check that off_t can represent 2**63 - 1 correctly.
14542 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14543 since some C++ compilers masquerading as C compilers
14544 incorrectly reject 9223372036854775807. */
14545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14546 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14547 && LARGE_OFF_T % 2147483647 == 1)
14557 rm -f "conftest.$ac_objext"
14558 if { (eval echo "$as_me:14558: \"$ac_compile\"") >&5
14559 (eval $ac_compile) 2>&5
14561 echo "$as_me:14561: \$? = $ac_status" >&5
14562 (exit "$ac_status"); } &&
14563 { ac_try='test -s "conftest.$ac_objext"'
14564 { (eval echo "$as_me:14564: \"$ac_try\"") >&5
14565 (eval $ac_try) 2>&5
14567 echo "$as_me:14567: \$? = $ac_status" >&5
14568 (exit "$ac_status"); }; }; then
14569 ac_cv_sys_large_files=1; break
14571 echo "$as_me: failed program was:" >&5
14572 cat "conftest.$ac_ext" >&5
14574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14578 echo "$as_me:14578: result: $ac_cv_sys_large_files" >&5
14579 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14580 if test "$ac_cv_sys_large_files" != no; then
14582 cat >>confdefs.h <<EOF
14583 #define _LARGE_FILES $ac_cv_sys_large_files
14590 if test "$enable_largefile" != no ; then
14591 echo "$as_me:14591: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14592 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14593 if test "${ac_cv_sys_largefile_source+set}" = set; then
14594 echo $ECHO_N "(cached) $ECHO_C" >&6
14597 ac_cv_sys_largefile_source=no
14598 cat >"conftest.$ac_ext" <<_ACEOF
14599 #line 14599 "configure"
14600 #include "confdefs.h"
14610 rm -f "conftest.$ac_objext"
14611 if { (eval echo "$as_me:14611: \"$ac_compile\"") >&5
14612 (eval $ac_compile) 2>&5
14614 echo "$as_me:14614: \$? = $ac_status" >&5
14615 (exit "$ac_status"); } &&
14616 { ac_try='test -s "conftest.$ac_objext"'
14617 { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618 (eval $ac_try) 2>&5
14620 echo "$as_me:14620: \$? = $ac_status" >&5
14621 (exit "$ac_status"); }; }; then
14624 echo "$as_me: failed program was:" >&5
14625 cat "conftest.$ac_ext" >&5
14627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14628 cat >"conftest.$ac_ext" <<_ACEOF
14629 #line 14629 "configure"
14630 #include "confdefs.h"
14631 #define _LARGEFILE_SOURCE 1
14641 rm -f "conftest.$ac_objext"
14642 if { (eval echo "$as_me:14642: \"$ac_compile\"") >&5
14643 (eval $ac_compile) 2>&5
14645 echo "$as_me:14645: \$? = $ac_status" >&5
14646 (exit "$ac_status"); } &&
14647 { ac_try='test -s "conftest.$ac_objext"'
14648 { (eval echo "$as_me:14648: \"$ac_try\"") >&5
14649 (eval $ac_try) 2>&5
14651 echo "$as_me:14651: \$? = $ac_status" >&5
14652 (exit "$ac_status"); }; }; then
14653 ac_cv_sys_largefile_source=1; break
14655 echo "$as_me: failed program was:" >&5
14656 cat "conftest.$ac_ext" >&5
14658 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14662 echo "$as_me:14662: result: $ac_cv_sys_largefile_source" >&5
14663 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14664 if test "$ac_cv_sys_largefile_source" != no; then
14666 cat >>confdefs.h <<EOF
14667 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14673 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14674 # in glibc 2.1.3, but that breaks too many other things.
14675 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14676 echo "$as_me:14676: checking for fseeko" >&5
14677 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14678 if test "${ac_cv_func_fseeko+set}" = set; then
14679 echo $ECHO_N "(cached) $ECHO_C" >&6
14681 cat >"conftest.$ac_ext" <<_ACEOF
14682 #line 14682 "configure"
14683 #include "confdefs.h"
14688 return fseeko && fseeko (stdin, 0, 0);
14693 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14694 if { (eval echo "$as_me:14694: \"$ac_link\"") >&5
14695 (eval $ac_link) 2>&5
14697 echo "$as_me:14697: \$? = $ac_status" >&5
14698 (exit "$ac_status"); } &&
14699 { ac_try='test -s "conftest$ac_exeext"'
14700 { (eval echo "$as_me:14700: \"$ac_try\"") >&5
14701 (eval $ac_try) 2>&5
14703 echo "$as_me:14703: \$? = $ac_status" >&5
14704 (exit "$ac_status"); }; }; then
14705 ac_cv_func_fseeko=yes
14707 echo "$as_me: failed program was:" >&5
14708 cat "conftest.$ac_ext" >&5
14709 ac_cv_func_fseeko=no
14711 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14713 echo "$as_me:14713: result: $ac_cv_func_fseeko" >&5
14714 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14715 if test $ac_cv_func_fseeko = yes; then
14717 cat >>confdefs.h <<\EOF
14718 #define HAVE_FSEEKO 1
14723 # Normally we would collect these definitions in the config.h,
14724 # but (like _XOPEN_SOURCE), some environments rely on having these
14725 # defined before any of the system headers are included. Another
14726 # case comes up with C++, e.g., on AIX the compiler compiles the
14727 # header files by themselves before looking at the body files it is
14728 # told to compile. For ncurses, those header files do not include
14730 if test "$ac_cv_sys_large_files" != no
14733 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14734 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14737 if test "$ac_cv_sys_largefile_source" != no
14740 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14741 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14744 if test "$ac_cv_sys_file_offset_bits" != no
14747 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14748 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14752 echo "$as_me:14752: checking whether to use struct dirent64" >&5
14753 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14754 if test "${cf_cv_struct_dirent64+set}" = set; then
14755 echo $ECHO_N "(cached) $ECHO_C" >&6
14758 cat >"conftest.$ac_ext" <<_ACEOF
14759 #line 14759 "configure"
14760 #include "confdefs.h"
14762 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14763 #include <sys/types.h>
14764 #include <dirent.h>
14770 /* if transitional largefile support is setup, this is true */
14771 extern struct dirent64 * readdir(DIR *);
14772 struct dirent64 *x = readdir((DIR *)0);
14773 struct dirent *y = readdir((DIR *)0);
14781 rm -f "conftest.$ac_objext"
14782 if { (eval echo "$as_me:14782: \"$ac_compile\"") >&5
14783 (eval $ac_compile) 2>&5
14785 echo "$as_me:14785: \$? = $ac_status" >&5
14786 (exit "$ac_status"); } &&
14787 { ac_try='test -s "conftest.$ac_objext"'
14788 { (eval echo "$as_me:14788: \"$ac_try\"") >&5
14789 (eval $ac_try) 2>&5
14791 echo "$as_me:14791: \$? = $ac_status" >&5
14792 (exit "$ac_status"); }; }; then
14793 cf_cv_struct_dirent64=yes
14795 echo "$as_me: failed program was:" >&5
14796 cat "conftest.$ac_ext" >&5
14797 cf_cv_struct_dirent64=no
14799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14802 echo "$as_me:14802: result: $cf_cv_struct_dirent64" >&5
14803 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14804 test "$cf_cv_struct_dirent64" = yes &&
14805 cat >>confdefs.h <<\EOF
14806 #define HAVE_STRUCT_DIRENT64 1
14811 ### Enable compiling-in rcs id's
14812 echo "$as_me:14812: checking if RCS identifiers should be compiled-in" >&5
14813 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14815 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14816 if test "${with_rcs_ids+set}" = set; then
14817 withval="$with_rcs_ids"
14818 with_rcs_ids=$withval
14822 echo "$as_me:14822: result: $with_rcs_ids" >&5
14823 echo "${ECHO_T}$with_rcs_ids" >&6
14824 test "$with_rcs_ids" = yes &&
14825 cat >>confdefs.h <<\EOF
14826 #define USE_RCS_IDS 1
14829 ###############################################################################
14831 ### Note that some functions (such as const) are normally disabled anyway.
14832 echo "$as_me:14832: checking if you want to build with function extensions" >&5
14833 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14835 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14836 if test "${enable_ext_funcs+set}" = set; then
14837 enableval="$enable_ext_funcs"
14838 with_ext_funcs=$enableval
14842 echo "$as_me:14842: result: $with_ext_funcs" >&5
14843 echo "${ECHO_T}$with_ext_funcs" >&6
14844 if test "$with_ext_funcs" = yes ; then
14845 NCURSES_EXT_FUNCS=1
14847 cat >>confdefs.h <<\EOF
14848 #define HAVE_USE_DEFAULT_COLORS 1
14851 cat >>confdefs.h <<\EOF
14852 #define NCURSES_EXT_FUNCS 1
14856 NCURSES_EXT_FUNCS=0
14859 ### use option --enable-const to turn on use of const beyond that in XSI.
14860 echo "$as_me:14860: checking for extended use of const keyword" >&5
14861 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14863 # Check whether --enable-const or --disable-const was given.
14864 if test "${enable_const+set}" = set; then
14865 enableval="$enable_const"
14866 with_ext_const=$enableval
14870 echo "$as_me:14870: result: $with_ext_const" >&5
14871 echo "${ECHO_T}$with_ext_const" >&6
14872 NCURSES_CONST='/*nothing*/'
14873 if test "$with_ext_const" = yes ; then
14874 NCURSES_CONST=const
14877 ###############################################################################
14878 # These options are relatively safe to experiment with.
14880 echo "$as_me:14880: checking if you want all development code" >&5
14881 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14883 # Check whether --with-develop or --without-develop was given.
14884 if test "${with_develop+set}" = set; then
14885 withval="$with_develop"
14886 with_develop=$withval
14890 echo "$as_me:14890: result: $with_develop" >&5
14891 echo "${ECHO_T}$with_develop" >&6
14893 ###############################################################################
14894 # These are just experimental, probably should not be in a package:
14896 # This is still experimental (20080329), but should ultimately be moved to
14897 # the script-block --with-normal, etc.
14899 echo "$as_me:14899: checking if you want to link with the pthread library" >&5
14900 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14902 # Check whether --with-pthread or --without-pthread was given.
14903 if test "${with_pthread+set}" = set; then
14904 withval="$with_pthread"
14905 with_pthread=$withval
14909 echo "$as_me:14909: result: $with_pthread" >&5
14910 echo "${ECHO_T}$with_pthread" >&6
14912 if test "$with_pthread" != no ; then
14913 echo "$as_me:14913: checking for pthread.h" >&5
14914 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14915 if test "${ac_cv_header_pthread_h+set}" = set; then
14916 echo $ECHO_N "(cached) $ECHO_C" >&6
14918 cat >"conftest.$ac_ext" <<_ACEOF
14919 #line 14919 "configure"
14920 #include "confdefs.h"
14921 #include <pthread.h>
14923 if { (eval echo "$as_me:14923: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14924 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14926 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14928 cat conftest.err >&5
14929 echo "$as_me:14929: \$? = $ac_status" >&5
14930 (exit "$ac_status"); } >/dev/null; then
14931 if test -s conftest.err; then
14932 ac_cpp_err=$ac_c_preproc_warn_flag
14939 if test -z "$ac_cpp_err"; then
14940 ac_cv_header_pthread_h=yes
14942 echo "$as_me: failed program was:" >&5
14943 cat "conftest.$ac_ext" >&5
14944 ac_cv_header_pthread_h=no
14946 rm -f conftest.err "conftest.$ac_ext"
14948 echo "$as_me:14948: result: $ac_cv_header_pthread_h" >&5
14949 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14950 if test "$ac_cv_header_pthread_h" = yes; then
14952 cat >>confdefs.h <<\EOF
14953 #define HAVE_PTHREADS_H 1
14956 for cf_lib_pthread in pthread c_r
14958 echo "$as_me:14958: checking if we can link with the $cf_lib_pthread library" >&5
14959 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14960 cf_save_LIBS="$LIBS"
14962 cf_add_libs="$LIBS"
14965 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14966 # filter duplicates
14967 for cf_add_1lib in $cf_add_0lib; do
14968 for cf_add_2lib in $cf_add_libs; do
14969 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14974 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14976 LIBS="$cf_add_libs"
14978 cat >"conftest.$ac_ext" <<_ACEOF
14979 #line 14979 "configure"
14980 #include "confdefs.h"
14982 #include <pthread.h>
14988 int rc = pthread_create(0,0,0,0);
14989 int r2 = pthread_mutexattr_settype(0, 0);
14995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14996 if { (eval echo "$as_me:14996: \"$ac_link\"") >&5
14997 (eval $ac_link) 2>&5
14999 echo "$as_me:14999: \$? = $ac_status" >&5
15000 (exit "$ac_status"); } &&
15001 { ac_try='test -s "conftest$ac_exeext"'
15002 { (eval echo "$as_me:15002: \"$ac_try\"") >&5
15003 (eval $ac_try) 2>&5
15005 echo "$as_me:15005: \$? = $ac_status" >&5
15006 (exit "$ac_status"); }; }; then
15009 echo "$as_me: failed program was:" >&5
15010 cat "conftest.$ac_ext" >&5
15013 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15014 LIBS="$cf_save_LIBS"
15015 echo "$as_me:15015: result: $with_pthread" >&5
15016 echo "${ECHO_T}$with_pthread" >&6
15017 test "$with_pthread" = yes && break
15020 if test "$with_pthread" = yes ; then
15022 cf_add_libs="$LIBS"
15025 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15026 # filter duplicates
15027 for cf_add_1lib in $cf_add_0lib; do
15028 for cf_add_2lib in $cf_add_libs; do
15029 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15034 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15036 LIBS="$cf_add_libs"
15038 cat >>confdefs.h <<\EOF
15039 #define HAVE_LIBPTHREADS 1
15043 { { echo "$as_me:15043: error: Cannot link with pthread library" >&5
15044 echo "$as_me: error: Cannot link with pthread library" >&2;}
15045 { (exit 1); exit 1; }; }
15052 echo "$as_me:15052: checking if you want to use weak-symbols for pthreads" >&5
15053 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15055 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15056 if test "${enable_weak_symbols+set}" = set; then
15057 enableval="$enable_weak_symbols"
15058 use_weak_symbols=$withval
15060 use_weak_symbols=no
15062 echo "$as_me:15062: result: $use_weak_symbols" >&5
15063 echo "${ECHO_T}$use_weak_symbols" >&6
15064 if test "$use_weak_symbols" = yes ; then
15066 echo "$as_me:15066: checking if $CC supports weak symbols" >&5
15067 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15068 if test "${cf_cv_weak_symbols+set}" = set; then
15069 echo $ECHO_N "(cached) $ECHO_C" >&6
15072 cat >"conftest.$ac_ext" <<_ACEOF
15073 #line 15073 "configure"
15074 #include "confdefs.h"
15081 #if defined(__GNUC__)
15082 # if defined __USE_ISOC99
15083 # define _cat_pragma(exp) _Pragma(#exp)
15084 # define _weak_pragma(exp) _cat_pragma(weak name)
15086 # define _weak_pragma(exp)
15088 # define _declare(name) __extension__ extern __typeof__(name) name
15089 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15092 weak_symbol(fopen);
15098 rm -f "conftest.$ac_objext"
15099 if { (eval echo "$as_me:15099: \"$ac_compile\"") >&5
15100 (eval $ac_compile) 2>&5
15102 echo "$as_me:15102: \$? = $ac_status" >&5
15103 (exit "$ac_status"); } &&
15104 { ac_try='test -s "conftest.$ac_objext"'
15105 { (eval echo "$as_me:15105: \"$ac_try\"") >&5
15106 (eval $ac_try) 2>&5
15108 echo "$as_me:15108: \$? = $ac_status" >&5
15109 (exit "$ac_status"); }; }; then
15110 cf_cv_weak_symbols=yes
15112 echo "$as_me: failed program was:" >&5
15113 cat "conftest.$ac_ext" >&5
15114 cf_cv_weak_symbols=no
15116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15119 echo "$as_me:15119: result: $cf_cv_weak_symbols" >&5
15120 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15123 cf_cv_weak_symbols=no
15126 if test $cf_cv_weak_symbols = yes ; then
15128 cat >>confdefs.h <<\EOF
15129 #define USE_WEAK_SYMBOLS 1
15135 if test "$with_pthread" = "yes" ; then
15137 cat >>confdefs.h <<\EOF
15138 #define USE_PTHREADS 1
15141 enable_reentrant=yes
15142 if test $cf_cv_weak_symbols = yes ; then
15147 # OpenSUSE is installing ncurses6, using reentrant option.
15148 echo "$as_me:15148: checking for _nc_TABSIZE" >&5
15149 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15150 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15151 echo $ECHO_N "(cached) $ECHO_C" >&6
15153 cat >"conftest.$ac_ext" <<_ACEOF
15154 #line 15154 "configure"
15155 #include "confdefs.h"
15156 #define _nc_TABSIZE autoconf_temporary
15157 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15164 /* We use char because int might match the return type of a gcc2
15165 builtin and then its argument prototype would still apply. */
15166 char _nc_TABSIZE (void);
15172 /* The GNU C library defines stubs for functions which it implements
15173 to always fail with ENOSYS. Some functions are actually named
15174 something starting with __ and the normal name is an alias. */
15175 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15176 #error found stub for _nc_TABSIZE
15179 return _nc_TABSIZE ();
15184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15185 if { (eval echo "$as_me:15185: \"$ac_link\"") >&5
15186 (eval $ac_link) 2>&5
15188 echo "$as_me:15188: \$? = $ac_status" >&5
15189 (exit "$ac_status"); } &&
15190 { ac_try='test -s "conftest$ac_exeext"'
15191 { (eval echo "$as_me:15191: \"$ac_try\"") >&5
15192 (eval $ac_try) 2>&5
15194 echo "$as_me:15194: \$? = $ac_status" >&5
15195 (exit "$ac_status"); }; }; then
15196 ac_cv_func__nc_TABSIZE=yes
15198 echo "$as_me: failed program was:" >&5
15199 cat "conftest.$ac_ext" >&5
15200 ac_cv_func__nc_TABSIZE=no
15202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15204 echo "$as_me:15204: result: $ac_cv_func__nc_TABSIZE" >&5
15205 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15206 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15207 assume_reentrant=yes
15209 assume_reentrant=no
15212 # Reentrant code has to be opaque; there's little advantage to making ncurses
15213 # opaque outside of that, so there is no --enable-opaque option. We can use
15214 # this option without --with-pthreads, but this will be always set for
15216 echo "$as_me:15216: checking if you want experimental reentrant code" >&5
15217 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15219 # Check whether --enable-reentrant or --disable-reentrant was given.
15220 if test "${enable_reentrant+set}" = set; then
15221 enableval="$enable_reentrant"
15222 with_reentrant=$enableval
15224 with_reentrant=$assume_reentrant
15226 echo "$as_me:15226: result: $with_reentrant" >&5
15227 echo "${ECHO_T}$with_reentrant" >&6
15228 if test "$with_reentrant" = yes ; then
15229 cf_cv_enable_reentrant=1
15230 if test $cf_cv_weak_symbols = yes ; then
15232 # remove pthread library from $LIBS
15233 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15235 elif test "$assume_reentrant" = no ; then
15236 LIB_SUFFIX="t${LIB_SUFFIX}"
15239 cat >>confdefs.h <<\EOF
15240 #define USE_REENTRANT 1
15244 cf_cv_enable_reentrant=0
15247 ### Allow using a different wrap-prefix
15248 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15249 echo "$as_me:15249: checking for prefix used to wrap public variables" >&5
15250 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15252 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15253 if test "${with_wrap_prefix+set}" = set; then
15254 withval="$with_wrap_prefix"
15255 NCURSES_WRAP_PREFIX=$withval
15257 NCURSES_WRAP_PREFIX=_nc_
15259 echo "$as_me:15259: result: $NCURSES_WRAP_PREFIX" >&5
15260 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15262 NCURSES_WRAP_PREFIX=_nc_
15265 cat >>confdefs.h <<EOF
15266 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15269 ###############################################################################
15271 ### use option --disable-echo to suppress full display compiling commands
15273 echo "$as_me:15273: checking if you want to see long compiling messages" >&5
15274 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15276 # Check whether --enable-echo or --disable-echo was given.
15277 if test "${enable_echo+set}" = set; then
15278 enableval="$enable_echo"
15279 test "$enableval" != no && enableval=yes
15280 if test "$enableval" != "yes" ; then
15283 ECHO_LD='@echo linking $@;'
15284 RULE_CC='@echo compiling $<'
15285 SHOW_CC='@echo compiling $@'
15307 echo "$as_me:15307: result: $enableval" >&5
15308 echo "${ECHO_T}$enableval" >&6
15310 echo "$as_me:15310: checking if you want to use C11 _Noreturn feature" >&5
15311 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15313 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15314 if test "${enable_stdnoreturn+set}" = set; then
15315 enableval="$enable_stdnoreturn"
15316 test "$enableval" != yes && enableval=no
15317 if test "$enableval" != "no" ; then
15318 enable_stdnoreturn=yes
15320 enable_stdnoreturn=no
15324 enable_stdnoreturn=no
15327 echo "$as_me:15327: result: $enable_stdnoreturn" >&5
15328 echo "${ECHO_T}$enable_stdnoreturn" >&6
15330 if test $enable_stdnoreturn = yes; then
15331 echo "$as_me:15331: checking for C11 _Noreturn feature" >&5
15332 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15333 if test "${cf_cv_c11_noreturn+set}" = set; then
15334 echo $ECHO_N "(cached) $ECHO_C" >&6
15336 cat >"conftest.$ac_ext" <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15341 #include <stdlib.h>
15342 #include <stdnoreturn.h>
15343 static _Noreturn void giveup(void) { exit(0); }
15348 if (feof(stdin)) giveup()
15353 rm -f "conftest.$ac_objext"
15354 if { (eval echo "$as_me:15354: \"$ac_compile\"") >&5
15355 (eval $ac_compile) 2>&5
15357 echo "$as_me:15357: \$? = $ac_status" >&5
15358 (exit "$ac_status"); } &&
15359 { ac_try='test -s "conftest.$ac_objext"'
15360 { (eval echo "$as_me:15360: \"$ac_try\"") >&5
15361 (eval $ac_try) 2>&5
15363 echo "$as_me:15363: \$? = $ac_status" >&5
15364 (exit "$ac_status"); }; }; then
15365 cf_cv_c11_noreturn=yes
15367 echo "$as_me: failed program was:" >&5
15368 cat "conftest.$ac_ext" >&5
15369 cf_cv_c11_noreturn=no
15371 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15374 echo "$as_me:15374: result: $cf_cv_c11_noreturn" >&5
15375 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15377 cf_cv_c11_noreturn=no,
15380 if test "$cf_cv_c11_noreturn" = yes; then
15382 cat >>confdefs.h <<\EOF
15383 #define HAVE_STDNORETURN_H 1
15386 cat >>confdefs.h <<EOF
15387 #define STDC_NORETURN _Noreturn
15390 HAVE_STDNORETURN_H=1
15392 HAVE_STDNORETURN_H=0
15395 if test "$GCC" = yes || test "$GXX" = yes
15398 if test "$GCC" = yes || test "$GXX" = yes
15403 for cf_temp_scan in $CFLAGS
15405 case "x$cf_temp_scan" in
15408 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15409 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15414 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15415 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15420 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15421 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15426 if test "x$CFLAGS" != "x$cf_temp_flags"
15428 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15430 echo "${as_me:-configure}:15430: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15432 CFLAGS="$cf_temp_flags"
15433 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15435 echo "${as_me:-configure}:15435: testing ... fixed $CFLAGS ..." 1>&5
15437 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15439 echo "${as_me:-configure}:15439: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15446 if test "$GCC" = yes || test "$GXX" = yes
15451 for cf_temp_scan in $CPPFLAGS
15453 case "x$cf_temp_scan" in
15456 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15457 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15462 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15463 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15468 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15469 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15474 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15476 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15478 echo "${as_me:-configure}:15478: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15480 CPPFLAGS="$cf_temp_flags"
15481 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15483 echo "${as_me:-configure}:15483: testing ... fixed $CPPFLAGS ..." 1>&5
15485 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15487 echo "${as_me:-configure}:15487: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15494 if test "$GCC" = yes || test "$GXX" = yes
15499 for cf_temp_scan in $LDFLAGS
15501 case "x$cf_temp_scan" in
15504 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15505 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15510 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15511 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15516 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15517 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15522 if test "x$LDFLAGS" != "x$cf_temp_flags"
15524 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15526 echo "${as_me:-configure}:15526: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15528 LDFLAGS="$cf_temp_flags"
15529 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15531 echo "${as_me:-configure}:15531: testing ... fixed $LDFLAGS ..." 1>&5
15533 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15535 echo "${as_me:-configure}:15535: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15542 echo "$as_me:15542: checking if you want to turn on gcc warnings" >&5
15543 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15545 # Check whether --enable-warnings or --disable-warnings was given.
15546 if test "${enable_warnings+set}" = set; then
15547 enableval="$enable_warnings"
15548 test "$enableval" != yes && enableval=no
15549 if test "$enableval" != "no" ; then
15550 enable_warnings=yes
15559 echo "$as_me:15559: result: $enable_warnings" >&5
15560 echo "${ECHO_T}$enable_warnings" >&6
15561 if test "$enable_warnings" = "yes"
15564 if test "x$have_x" = xyes; then
15566 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15567 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15568 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15569 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15570 for cf_X_CFLAGS in $X_CFLAGS
15572 case "x$cf_X_CFLAGS" in
15574 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15577 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15582 cat >"conftest.$ac_ext" <<_ACEOF
15583 #line 15583 "configure"
15584 #include "confdefs.h"
15586 #include <stdlib.h>
15587 #include <X11/Intrinsic.h>
15592 String foo = malloc(1); free((void*)foo)
15597 rm -f "conftest.$ac_objext"
15598 if { (eval echo "$as_me:15598: \"$ac_compile\"") >&5
15599 (eval $ac_compile) 2>&5
15601 echo "$as_me:15601: \$? = $ac_status" >&5
15602 (exit "$ac_status"); } &&
15603 { ac_try='test -s "conftest.$ac_objext"'
15604 { (eval echo "$as_me:15604: \"$ac_try\"") >&5
15605 (eval $ac_try) 2>&5
15607 echo "$as_me:15607: \$? = $ac_status" >&5
15608 (exit "$ac_status"); }; }; then
15610 echo "$as_me:15610: checking for X11/Xt const-feature" >&5
15611 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15612 if test "${cf_cv_const_x_string+set}" = set; then
15613 echo $ECHO_N "(cached) $ECHO_C" >&6
15616 cat >"conftest.$ac_ext" <<_ACEOF
15617 #line 15617 "configure"
15618 #include "confdefs.h"
15620 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15621 #undef XTSTRINGDEFINES /* X11R5 and later */
15622 #include <stdlib.h>
15623 #include <X11/Intrinsic.h>
15628 String foo = malloc(1); *foo = 0
15633 rm -f "conftest.$ac_objext"
15634 if { (eval echo "$as_me:15634: \"$ac_compile\"") >&5
15635 (eval $ac_compile) 2>&5
15637 echo "$as_me:15637: \$? = $ac_status" >&5
15638 (exit "$ac_status"); } &&
15639 { ac_try='test -s "conftest.$ac_objext"'
15640 { (eval echo "$as_me:15640: \"$ac_try\"") >&5
15641 (eval $ac_try) 2>&5
15643 echo "$as_me:15643: \$? = $ac_status" >&5
15644 (exit "$ac_status"); }; }; then
15646 cf_cv_const_x_string=no
15649 echo "$as_me: failed program was:" >&5
15650 cat "conftest.$ac_ext" >&5
15652 cf_cv_const_x_string=yes
15655 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15658 echo "$as_me:15658: result: $cf_cv_const_x_string" >&5
15659 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15661 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15662 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15663 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15665 case "$cf_cv_const_x_string" in
15668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15669 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15674 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15675 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15681 echo "$as_me: failed program was:" >&5
15682 cat "conftest.$ac_ext" >&5
15684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15686 cat > "conftest.$ac_ext" <<EOF
15687 #line 15687 "${as_me:-configure}"
15688 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15690 if test "$INTEL_COMPILER" = yes
15692 # The "-wdXXX" options suppress warnings:
15693 # remark #1419: external declaration in primary source file
15694 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15695 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15696 # remark #193: zero used for undefined preprocessing identifier
15697 # remark #593: variable "curs_sb_left_arrow" was set but never used
15698 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15699 # remark #869: parameter "tw" was never referenced
15700 # remark #981: operands are evaluated in unspecified order
15701 # warning #279: controlling expression is constant
15703 { echo "$as_me:15703: checking for $CC warning options..." >&5
15704 echo "$as_me: checking for $CC warning options..." >&6;}
15705 cf_save_CFLAGS="$CFLAGS"
15706 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15718 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15719 if { (eval echo "$as_me:15719: \"$ac_compile\"") >&5
15720 (eval $ac_compile) 2>&5
15722 echo "$as_me:15722: \$? = $ac_status" >&5
15723 (exit "$ac_status"); }; then
15724 test -n "$verbose" && echo "$as_me:15724: result: ... -$cf_opt" >&5
15725 echo "${ECHO_T}... -$cf_opt" >&6
15726 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15729 CFLAGS="$cf_save_CFLAGS"
15730 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15732 { echo "$as_me:15732: checking for $CC warning options..." >&5
15733 echo "$as_me: checking for $CC warning options..." >&6;}
15734 cf_save_CFLAGS="$CFLAGS"
15736 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15737 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15738 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15739 for cf_opt in W Wall \
15740 Wbad-function-cast \
15743 Wdeclaration-after-statement \
15746 Wmissing-declarations \
15747 Wmissing-prototypes \
15751 Wstrict-prototypes \
15752 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15754 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15755 if { (eval echo "$as_me:15755: \"$ac_compile\"") >&5
15756 (eval $ac_compile) 2>&5
15758 echo "$as_me:15758: \$? = $ac_status" >&5
15759 (exit "$ac_status"); }; then
15760 test -n "$verbose" && echo "$as_me:15760: result: ... -$cf_opt" >&5
15761 echo "${ECHO_T}... -$cf_opt" >&6
15764 case "$GCC_VERSION" in
15766 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15768 echo "${as_me:-configure}:15768: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15774 case "$GCC_VERSION" in
15776 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15778 echo "${as_me:-configure}:15778: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15784 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15787 CFLAGS="$cf_save_CFLAGS"
15793 if test "$GCC" = yes || test "$GXX" = yes
15795 cat > conftest.i <<EOF
15797 #define GCC_PRINTF 0
15800 #define GCC_SCANF 0
15802 #ifndef GCC_NORETURN
15803 #define GCC_NORETURN /* nothing */
15806 #define GCC_UNUSED /* nothing */
15809 if test "$GCC" = yes
15811 { echo "$as_me:15811: checking for $CC __attribute__ directives..." >&5
15812 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15813 cat > "conftest.$ac_ext" <<EOF
15814 #line 15814 "${as_me:-configure}"
15815 #include "confdefs.h"
15816 #include "conftest.h"
15817 #include "conftest.i"
15819 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15821 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15824 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15826 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15828 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15829 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15830 extern GCC_NORETURN void foo(void);
15831 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15833 cf_printf_attribute=no
15834 cf_scanf_attribute=no
15835 for cf_attribute in scanf printf unused noreturn
15838 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15840 cf_directive="__attribute__(($cf_attribute))"
15841 echo "checking for $CC $cf_directive" 1>&5
15843 case "$cf_attribute" in
15845 cf_printf_attribute=yes
15846 cat >conftest.h <<EOF
15847 #define GCC_$cf_ATTRIBUTE 1
15851 cf_scanf_attribute=yes
15852 cat >conftest.h <<EOF
15853 #define GCC_$cf_ATTRIBUTE 1
15857 cat >conftest.h <<EOF
15858 #define GCC_$cf_ATTRIBUTE $cf_directive
15863 if { (eval echo "$as_me:15863: \"$ac_compile\"") >&5
15864 (eval $ac_compile) 2>&5
15866 echo "$as_me:15866: \$? = $ac_status" >&5
15867 (exit "$ac_status"); }; then
15868 test -n "$verbose" && echo "$as_me:15868: result: ... $cf_attribute" >&5
15869 echo "${ECHO_T}... $cf_attribute" >&6
15870 cat conftest.h >>confdefs.h
15871 case "$cf_attribute" in
15874 cat >>confdefs.h <<EOF
15875 #define GCC_NORETURN $cf_directive
15880 cf_value='/* nothing */'
15881 if test "$cf_printf_attribute" != no ; then
15882 cf_value='__attribute__((format(printf,fmt,var)))'
15884 cat >>confdefs.h <<\EOF
15885 #define GCC_PRINTF 1
15890 cat >>confdefs.h <<EOF
15891 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15896 cf_value='/* nothing */'
15897 if test "$cf_scanf_attribute" != no ; then
15898 cf_value='__attribute__((format(scanf,fmt,var)))'
15900 cat >>confdefs.h <<\EOF
15901 #define GCC_SCANF 1
15906 cat >>confdefs.h <<EOF
15907 #define GCC_SCANFLIKE(fmt,var) $cf_value
15913 cat >>confdefs.h <<EOF
15914 #define GCC_UNUSED $cf_directive
15922 ${FGREP-fgrep} define conftest.i >>confdefs.h
15929 if test "x$enable_warnings" = "xyes"; then
15931 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
15935 ### use option --enable-assertions to turn on generation of assertion code
15936 echo "$as_me:15936: checking if you want to enable runtime assertions" >&5
15937 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15939 # Check whether --enable-assertions or --disable-assertions was given.
15940 if test "${enable_assertions+set}" = set; then
15941 enableval="$enable_assertions"
15942 with_assertions=$enableval
15946 echo "$as_me:15946: result: $with_assertions" >&5
15947 echo "${ECHO_T}$with_assertions" >&6
15950 if test "$with_assertions" = no
15952 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15955 ADAFLAGS="$ADAFLAGS -gnata"
15960 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15962 cat >>confdefs.h <<\EOF
15963 #define HAVE_NC_ALLOC_H 1
15966 ### use option --enable-expanded to generate certain macros as functions
15968 # Check whether --enable-expanded or --disable-expanded was given.
15969 if test "${enable_expanded+set}" = set; then
15970 enableval="$enable_expanded"
15971 test "$enableval" = yes &&
15972 cat >>confdefs.h <<\EOF
15973 #define NCURSES_EXPANDED 1
15978 ### use option --disable-macros to suppress macros in favor of functions
15980 # Check whether --enable-macros or --disable-macros was given.
15981 if test "${enable_macros+set}" = set; then
15982 enableval="$enable_macros"
15983 test "$enableval" = no &&
15984 cat >>confdefs.h <<\EOF
15985 #define NCURSES_NOMACROS 1
15990 # Normally we only add trace() to the debug-library. Allow this to be
15991 # extended to all models of the ncurses library:
15993 case "$CFLAGS $CPPFLAGS" in
15999 echo "$as_me:15999: checking whether to add trace feature to all models" >&5
16000 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16002 # Check whether --with-trace or --without-trace was given.
16003 if test "${with_trace+set}" = set; then
16004 withval="$with_trace"
16005 cf_with_trace=$withval
16007 cf_with_trace=$cf_all_traces
16009 echo "$as_me:16009: result: $cf_with_trace" >&5
16010 echo "${ECHO_T}$cf_with_trace" >&6
16012 if test "$cf_with_trace" = yes ; then
16018 cf_new_extra_cppflags=
16020 for cf_add_cflags in -DTRACE
16022 case "$cf_fix_cppflags" in
16024 case "$cf_add_cflags" in
16025 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16026 case "$cf_add_cflags" in
16028 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16030 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16031 && test -z "${cf_tst_cflags}" \
16032 && cf_fix_cppflags=yes
16034 if test "$cf_fix_cppflags" = yes ; then
16036 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16037 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16040 elif test "${cf_tst_cflags}" = "\"'" ; then
16042 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16043 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16049 case "$CPPFLAGS" in
16053 case "$cf_add_cflags" in
16055 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16057 CPPFLAGS=`echo "$CPPFLAGS" | \
16058 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16059 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16064 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16065 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16072 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16073 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16080 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16081 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16083 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16085 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16086 && test -z "${cf_tst_cflags}" \
16087 && cf_fix_cppflags=no
16092 if test -n "$cf_new_cflags" ; then
16094 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16095 CFLAGS="${CFLAGS}$cf_new_cflags"
16099 if test -n "$cf_new_cppflags" ; then
16101 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16102 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16106 if test -n "$cf_new_extra_cppflags" ; then
16108 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16109 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16117 echo "$as_me:16117: checking if we want to use GNAT projects" >&5
16118 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16120 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16121 if test "${enable_gnat_projects+set}" = set; then
16122 enableval="$enable_gnat_projects"
16123 test "$enableval" != no && enableval=yes
16124 if test "$enableval" != "yes" ; then
16125 enable_gnat_projects=no
16127 enable_gnat_projects=yes
16131 enable_gnat_projects=yes
16134 echo "$as_me:16134: result: $enable_gnat_projects" >&5
16135 echo "${ECHO_T}$enable_gnat_projects" >&6
16137 ### Checks for libraries.
16138 case $cf_cv_system_name in
16141 echo "$as_me:16141: checking if ssp library is needed" >&5
16142 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16143 if test "${cf_cv_need_libssp+set}" = set; then
16144 echo $ECHO_N "(cached) $ECHO_C" >&6
16147 cat >"conftest.$ac_ext" <<_ACEOF
16148 #line 16148 "configure"
16149 #include "confdefs.h"
16151 #include <sys/types.h>
16152 #include <dirent.h>
16158 DIR *dp = opendir(".");
16164 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16165 if { (eval echo "$as_me:16165: \"$ac_link\"") >&5
16166 (eval $ac_link) 2>&5
16168 echo "$as_me:16168: \$? = $ac_status" >&5
16169 (exit "$ac_status"); } &&
16170 { ac_try='test -s "conftest$ac_exeext"'
16171 { (eval echo "$as_me:16171: \"$ac_try\"") >&5
16172 (eval $ac_try) 2>&5
16174 echo "$as_me:16174: \$? = $ac_status" >&5
16175 (exit "$ac_status"); }; }; then
16176 cf_cv_need_libssp=no
16178 echo "$as_me: failed program was:" >&5
16179 cat "conftest.$ac_ext" >&5
16181 cf_save_LIBS="$LIBS"
16183 cat >"conftest.$ac_ext" <<_ACEOF
16184 #line 16184 "configure"
16185 #include "confdefs.h"
16187 #include <sys/types.h>
16188 #include <dirent.h>
16194 DIR *dp = opendir(".");
16200 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16201 if { (eval echo "$as_me:16201: \"$ac_link\"") >&5
16202 (eval $ac_link) 2>&5
16204 echo "$as_me:16204: \$? = $ac_status" >&5
16205 (exit "$ac_status"); } &&
16206 { ac_try='test -s "conftest$ac_exeext"'
16207 { (eval echo "$as_me:16207: \"$ac_try\"") >&5
16208 (eval $ac_try) 2>&5
16210 echo "$as_me:16210: \$? = $ac_status" >&5
16211 (exit "$ac_status"); }; }; then
16212 cf_cv_need_libssp=yes
16214 echo "$as_me: failed program was:" >&5
16215 cat "conftest.$ac_ext" >&5
16216 cf_cv_need_libssp=maybe
16218 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16219 LIBS="$cf_save_LIBS"
16222 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16224 echo "$as_me:16224: result: $cf_cv_need_libssp" >&5
16225 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16227 if test "x$cf_cv_need_libssp" = xyes
16230 cf_add_libs="$LIBS"
16233 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16234 # filter duplicates
16235 for cf_add_1lib in $cf_add_0lib; do
16236 for cf_add_2lib in $cf_add_libs; do
16237 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16242 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16244 LIBS="$cf_add_libs"
16250 echo "$as_me:16250: checking for gettimeofday" >&5
16251 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16252 if test "${ac_cv_func_gettimeofday+set}" = set; then
16253 echo $ECHO_N "(cached) $ECHO_C" >&6
16255 cat >"conftest.$ac_ext" <<_ACEOF
16256 #line 16256 "configure"
16257 #include "confdefs.h"
16258 #define gettimeofday autoconf_temporary
16259 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16260 #undef gettimeofday
16266 /* We use char because int might match the return type of a gcc2
16267 builtin and then its argument prototype would still apply. */
16268 char gettimeofday (void);
16274 /* The GNU C library defines stubs for functions which it implements
16275 to always fail with ENOSYS. Some functions are actually named
16276 something starting with __ and the normal name is an alias. */
16277 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16278 #error found stub for gettimeofday
16281 return gettimeofday ();
16286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16287 if { (eval echo "$as_me:16287: \"$ac_link\"") >&5
16288 (eval $ac_link) 2>&5
16290 echo "$as_me:16290: \$? = $ac_status" >&5
16291 (exit "$ac_status"); } &&
16292 { ac_try='test -s "conftest$ac_exeext"'
16293 { (eval echo "$as_me:16293: \"$ac_try\"") >&5
16294 (eval $ac_try) 2>&5
16296 echo "$as_me:16296: \$? = $ac_status" >&5
16297 (exit "$ac_status"); }; }; then
16298 ac_cv_func_gettimeofday=yes
16300 echo "$as_me: failed program was:" >&5
16301 cat "conftest.$ac_ext" >&5
16302 ac_cv_func_gettimeofday=no
16304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16306 echo "$as_me:16306: result: $ac_cv_func_gettimeofday" >&5
16307 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16308 if test "$ac_cv_func_gettimeofday" = yes; then
16309 cat >>confdefs.h <<\EOF
16310 #define HAVE_GETTIMEOFDAY 1
16315 echo "$as_me:16315: checking for gettimeofday in -lbsd" >&5
16316 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16317 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16318 echo $ECHO_N "(cached) $ECHO_C" >&6
16320 ac_check_lib_save_LIBS=$LIBS
16322 cat >"conftest.$ac_ext" <<_ACEOF
16323 #line 16323 "configure"
16324 #include "confdefs.h"
16326 /* Override any gcc2 internal prototype to avoid an error. */
16330 /* We use char because int might match the return type of a gcc2
16331 builtin and then its argument prototype would still apply. */
16332 char gettimeofday ();
16341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16342 if { (eval echo "$as_me:16342: \"$ac_link\"") >&5
16343 (eval $ac_link) 2>&5
16345 echo "$as_me:16345: \$? = $ac_status" >&5
16346 (exit "$ac_status"); } &&
16347 { ac_try='test -s "conftest$ac_exeext"'
16348 { (eval echo "$as_me:16348: \"$ac_try\"") >&5
16349 (eval $ac_try) 2>&5
16351 echo "$as_me:16351: \$? = $ac_status" >&5
16352 (exit "$ac_status"); }; }; then
16353 ac_cv_lib_bsd_gettimeofday=yes
16355 echo "$as_me: failed program was:" >&5
16356 cat "conftest.$ac_ext" >&5
16357 ac_cv_lib_bsd_gettimeofday=no
16359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16360 LIBS=$ac_check_lib_save_LIBS
16362 echo "$as_me:16362: result: $ac_cv_lib_bsd_gettimeofday" >&5
16363 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16364 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16366 cat >>confdefs.h <<\EOF
16367 #define HAVE_GETTIMEOFDAY 1
16377 ### Checks for header files.
16378 echo "$as_me:16378: checking for ANSI C header files" >&5
16379 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16380 if test "${ac_cv_header_stdc+set}" = set; then
16381 echo $ECHO_N "(cached) $ECHO_C" >&6
16383 cat >"conftest.$ac_ext" <<_ACEOF
16384 #line 16384 "configure"
16385 #include "confdefs.h"
16386 #include <stdlib.h>
16387 #include <stdarg.h>
16388 #include <string.h>
16392 if { (eval echo "$as_me:16392: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16393 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16395 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16397 cat conftest.err >&5
16398 echo "$as_me:16398: \$? = $ac_status" >&5
16399 (exit "$ac_status"); } >/dev/null; then
16400 if test -s conftest.err; then
16401 ac_cpp_err=$ac_c_preproc_warn_flag
16408 if test -z "$ac_cpp_err"; then
16409 ac_cv_header_stdc=yes
16411 echo "$as_me: failed program was:" >&5
16412 cat "conftest.$ac_ext" >&5
16413 ac_cv_header_stdc=no
16415 rm -f conftest.err "conftest.$ac_ext"
16417 if test $ac_cv_header_stdc = yes; then
16418 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16419 cat >"conftest.$ac_ext" <<_ACEOF
16420 #line 16420 "configure"
16421 #include "confdefs.h"
16422 #include <string.h>
16425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16426 $EGREP "memchr" >/dev/null 2>&1; then
16429 ac_cv_header_stdc=no
16435 if test $ac_cv_header_stdc = yes; then
16436 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16437 cat >"conftest.$ac_ext" <<_ACEOF
16438 #line 16438 "configure"
16439 #include "confdefs.h"
16440 #include <stdlib.h>
16443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16444 $EGREP "free" >/dev/null 2>&1; then
16447 ac_cv_header_stdc=no
16453 if test $ac_cv_header_stdc = yes; then
16454 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16455 if test "$cross_compiling" = yes; then
16458 cat >"conftest.$ac_ext" <<_ACEOF
16459 #line 16459 "configure"
16460 #include "confdefs.h"
16462 #if ((' ' & 0x0FF) == 0x020)
16463 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16464 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16466 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16467 || ('j' <= (c) && (c) <= 'r') \
16468 || ('s' <= (c) && (c) <= 'z'))
16469 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16472 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16477 for (i = 0; i < 256; i++)
16478 if (XOR (islower (i), ISLOWER (i))
16479 || toupper (i) != TOUPPER (i))
16480 $ac_main_return(2);
16481 $ac_main_return (0);
16484 rm -f "conftest$ac_exeext"
16485 if { (eval echo "$as_me:16485: \"$ac_link\"") >&5
16486 (eval $ac_link) 2>&5
16488 echo "$as_me:16488: \$? = $ac_status" >&5
16489 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16490 { (eval echo "$as_me:16490: \"$ac_try\"") >&5
16491 (eval $ac_try) 2>&5
16493 echo "$as_me:16493: \$? = $ac_status" >&5
16494 (exit "$ac_status"); }; }; then
16497 echo "$as_me: program exited with status $ac_status" >&5
16498 echo "$as_me: failed program was:" >&5
16499 cat "conftest.$ac_ext" >&5
16500 ac_cv_header_stdc=no
16502 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16506 echo "$as_me:16506: result: $ac_cv_header_stdc" >&5
16507 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16508 if test $ac_cv_header_stdc = yes; then
16510 cat >>confdefs.h <<\EOF
16511 #define STDC_HEADERS 1
16516 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16518 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16519 inttypes.h stdint.h unistd.h
16521 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16522 echo "$as_me:16522: checking for $ac_header" >&5
16523 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16524 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16525 echo $ECHO_N "(cached) $ECHO_C" >&6
16527 cat >"conftest.$ac_ext" <<_ACEOF
16528 #line 16528 "configure"
16529 #include "confdefs.h"
16530 $ac_includes_default
16531 #include <$ac_header>
16533 rm -f "conftest.$ac_objext"
16534 if { (eval echo "$as_me:16534: \"$ac_compile\"") >&5
16535 (eval $ac_compile) 2>&5
16537 echo "$as_me:16537: \$? = $ac_status" >&5
16538 (exit "$ac_status"); } &&
16539 { ac_try='test -s "conftest.$ac_objext"'
16540 { (eval echo "$as_me:16540: \"$ac_try\"") >&5
16541 (eval $ac_try) 2>&5
16543 echo "$as_me:16543: \$? = $ac_status" >&5
16544 (exit "$ac_status"); }; }; then
16545 eval "$as_ac_Header=yes"
16547 echo "$as_me: failed program was:" >&5
16548 cat "conftest.$ac_ext" >&5
16549 eval "$as_ac_Header=no"
16551 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16553 echo "$as_me:16553: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16554 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16555 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16556 cat >>confdefs.h <<EOF
16557 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16563 echo "$as_me:16563: checking for signed char" >&5
16564 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16565 if test "${ac_cv_type_signed_char+set}" = set; then
16566 echo $ECHO_N "(cached) $ECHO_C" >&6
16568 cat >"conftest.$ac_ext" <<_ACEOF
16569 #line 16569 "configure"
16570 #include "confdefs.h"
16571 $ac_includes_default
16575 if ((signed char *) 0)
16577 if (sizeof (signed char))
16583 rm -f "conftest.$ac_objext"
16584 if { (eval echo "$as_me:16584: \"$ac_compile\"") >&5
16585 (eval $ac_compile) 2>&5
16587 echo "$as_me:16587: \$? = $ac_status" >&5
16588 (exit "$ac_status"); } &&
16589 { ac_try='test -s "conftest.$ac_objext"'
16590 { (eval echo "$as_me:16590: \"$ac_try\"") >&5
16591 (eval $ac_try) 2>&5
16593 echo "$as_me:16593: \$? = $ac_status" >&5
16594 (exit "$ac_status"); }; }; then
16595 ac_cv_type_signed_char=yes
16597 echo "$as_me: failed program was:" >&5
16598 cat "conftest.$ac_ext" >&5
16599 ac_cv_type_signed_char=no
16601 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16603 echo "$as_me:16603: result: $ac_cv_type_signed_char" >&5
16604 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16606 echo "$as_me:16606: checking size of signed char" >&5
16607 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16608 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16609 echo $ECHO_N "(cached) $ECHO_C" >&6
16611 if test "$ac_cv_type_signed_char" = yes; then
16612 if test "$cross_compiling" = yes; then
16613 # Depending upon the size, compute the lo and hi bounds.
16614 cat >"conftest.$ac_ext" <<_ACEOF
16615 #line 16615 "configure"
16616 #include "confdefs.h"
16617 $ac_includes_default
16621 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16626 rm -f "conftest.$ac_objext"
16627 if { (eval echo "$as_me:16627: \"$ac_compile\"") >&5
16628 (eval $ac_compile) 2>&5
16630 echo "$as_me:16630: \$? = $ac_status" >&5
16631 (exit "$ac_status"); } &&
16632 { ac_try='test -s "conftest.$ac_objext"'
16633 { (eval echo "$as_me:16633: \"$ac_try\"") >&5
16634 (eval $ac_try) 2>&5
16636 echo "$as_me:16636: \$? = $ac_status" >&5
16637 (exit "$ac_status"); }; }; then
16640 cat >"conftest.$ac_ext" <<_ACEOF
16641 #line 16641 "configure"
16642 #include "confdefs.h"
16643 $ac_includes_default
16647 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16652 rm -f "conftest.$ac_objext"
16653 if { (eval echo "$as_me:16653: \"$ac_compile\"") >&5
16654 (eval $ac_compile) 2>&5
16656 echo "$as_me:16656: \$? = $ac_status" >&5
16657 (exit "$ac_status"); } &&
16658 { ac_try='test -s "conftest.$ac_objext"'
16659 { (eval echo "$as_me:16659: \"$ac_try\"") >&5
16660 (eval $ac_try) 2>&5
16662 echo "$as_me:16662: \$? = $ac_status" >&5
16663 (exit "$ac_status"); }; }; then
16664 ac_hi=$ac_mid; break
16666 echo "$as_me: failed program was:" >&5
16667 cat "conftest.$ac_ext" >&5
16668 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16673 echo "$as_me: failed program was:" >&5
16674 cat "conftest.$ac_ext" >&5
16677 cat >"conftest.$ac_ext" <<_ACEOF
16678 #line 16678 "configure"
16679 #include "confdefs.h"
16680 $ac_includes_default
16684 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16689 rm -f "conftest.$ac_objext"
16690 if { (eval echo "$as_me:16690: \"$ac_compile\"") >&5
16691 (eval $ac_compile) 2>&5
16693 echo "$as_me:16693: \$? = $ac_status" >&5
16694 (exit "$ac_status"); } &&
16695 { ac_try='test -s "conftest.$ac_objext"'
16696 { (eval echo "$as_me:16696: \"$ac_try\"") >&5
16697 (eval $ac_try) 2>&5
16699 echo "$as_me:16699: \$? = $ac_status" >&5
16700 (exit "$ac_status"); }; }; then
16701 ac_lo=$ac_mid; break
16703 echo "$as_me: failed program was:" >&5
16704 cat "conftest.$ac_ext" >&5
16705 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16707 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16710 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16711 # Binary search between lo and hi bounds.
16712 while test "x$ac_lo" != "x$ac_hi"; do
16713 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16714 cat >"conftest.$ac_ext" <<_ACEOF
16715 #line 16715 "configure"
16716 #include "confdefs.h"
16717 $ac_includes_default
16721 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16726 rm -f "conftest.$ac_objext"
16727 if { (eval echo "$as_me:16727: \"$ac_compile\"") >&5
16728 (eval $ac_compile) 2>&5
16730 echo "$as_me:16730: \$? = $ac_status" >&5
16731 (exit "$ac_status"); } &&
16732 { ac_try='test -s "conftest.$ac_objext"'
16733 { (eval echo "$as_me:16733: \"$ac_try\"") >&5
16734 (eval $ac_try) 2>&5
16736 echo "$as_me:16736: \$? = $ac_status" >&5
16737 (exit "$ac_status"); }; }; then
16740 echo "$as_me: failed program was:" >&5
16741 cat "conftest.$ac_ext" >&5
16742 ac_lo=`expr "$ac_mid" + 1`
16744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16746 ac_cv_sizeof_signed_char=$ac_lo
16748 if test "$cross_compiling" = yes; then
16749 { { echo "$as_me:16749: error: cannot run test program while cross compiling" >&5
16750 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16751 { (exit 1); exit 1; }; }
16753 cat >"conftest.$ac_ext" <<_ACEOF
16754 #line 16754 "configure"
16755 #include "confdefs.h"
16756 $ac_includes_default
16760 FILE *f = fopen ("conftest.val", "w");
16762 $ac_main_return (1);
16763 fprintf (f, "%ld", (long)(sizeof (signed char)));
16769 rm -f "conftest$ac_exeext"
16770 if { (eval echo "$as_me:16770: \"$ac_link\"") >&5
16771 (eval $ac_link) 2>&5
16773 echo "$as_me:16773: \$? = $ac_status" >&5
16774 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16775 { (eval echo "$as_me:16775: \"$ac_try\"") >&5
16776 (eval $ac_try) 2>&5
16778 echo "$as_me:16778: \$? = $ac_status" >&5
16779 (exit "$ac_status"); }; }; then
16780 ac_cv_sizeof_signed_char=`cat conftest.val`
16782 echo "$as_me: program exited with status $ac_status" >&5
16783 echo "$as_me: failed program was:" >&5
16784 cat "conftest.$ac_ext" >&5
16786 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16791 ac_cv_sizeof_signed_char=0
16794 echo "$as_me:16794: result: $ac_cv_sizeof_signed_char" >&5
16795 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16796 cat >>confdefs.h <<EOF
16797 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16800 echo "$as_me:16800: checking for ANSI C header files" >&5
16801 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16802 if test "${ac_cv_header_stdc+set}" = set; then
16803 echo $ECHO_N "(cached) $ECHO_C" >&6
16805 cat >"conftest.$ac_ext" <<_ACEOF
16806 #line 16806 "configure"
16807 #include "confdefs.h"
16808 #include <stdlib.h>
16809 #include <stdarg.h>
16810 #include <string.h>
16814 if { (eval echo "$as_me:16814: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16815 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16817 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16819 cat conftest.err >&5
16820 echo "$as_me:16820: \$? = $ac_status" >&5
16821 (exit "$ac_status"); } >/dev/null; then
16822 if test -s conftest.err; then
16823 ac_cpp_err=$ac_c_preproc_warn_flag
16830 if test -z "$ac_cpp_err"; then
16831 ac_cv_header_stdc=yes
16833 echo "$as_me: failed program was:" >&5
16834 cat "conftest.$ac_ext" >&5
16835 ac_cv_header_stdc=no
16837 rm -f conftest.err "conftest.$ac_ext"
16839 if test $ac_cv_header_stdc = yes; then
16840 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16841 cat >"conftest.$ac_ext" <<_ACEOF
16842 #line 16842 "configure"
16843 #include "confdefs.h"
16844 #include <string.h>
16847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16848 $EGREP "memchr" >/dev/null 2>&1; then
16851 ac_cv_header_stdc=no
16857 if test $ac_cv_header_stdc = yes; then
16858 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16859 cat >"conftest.$ac_ext" <<_ACEOF
16860 #line 16860 "configure"
16861 #include "confdefs.h"
16862 #include <stdlib.h>
16865 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16866 $EGREP "free" >/dev/null 2>&1; then
16869 ac_cv_header_stdc=no
16875 if test $ac_cv_header_stdc = yes; then
16876 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16877 if test "$cross_compiling" = yes; then
16880 cat >"conftest.$ac_ext" <<_ACEOF
16881 #line 16881 "configure"
16882 #include "confdefs.h"
16884 #if ((' ' & 0x0FF) == 0x020)
16885 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16886 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16888 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16889 || ('j' <= (c) && (c) <= 'r') \
16890 || ('s' <= (c) && (c) <= 'z'))
16891 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16894 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16899 for (i = 0; i < 256; i++)
16900 if (XOR (islower (i), ISLOWER (i))
16901 || toupper (i) != TOUPPER (i))
16902 $ac_main_return(2);
16903 $ac_main_return (0);
16906 rm -f "conftest$ac_exeext"
16907 if { (eval echo "$as_me:16907: \"$ac_link\"") >&5
16908 (eval $ac_link) 2>&5
16910 echo "$as_me:16910: \$? = $ac_status" >&5
16911 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16912 { (eval echo "$as_me:16912: \"$ac_try\"") >&5
16913 (eval $ac_try) 2>&5
16915 echo "$as_me:16915: \$? = $ac_status" >&5
16916 (exit "$ac_status"); }; }; then
16919 echo "$as_me: program exited with status $ac_status" >&5
16920 echo "$as_me: failed program was:" >&5
16921 cat "conftest.$ac_ext" >&5
16922 ac_cv_header_stdc=no
16924 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16928 echo "$as_me:16928: result: $ac_cv_header_stdc" >&5
16929 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16930 if test $ac_cv_header_stdc = yes; then
16932 cat >>confdefs.h <<\EOF
16933 #define STDC_HEADERS 1
16938 ac_header_dirent=no
16939 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16940 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16941 echo "$as_me:16941: checking for $ac_hdr that defines DIR" >&5
16942 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16943 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16944 echo $ECHO_N "(cached) $ECHO_C" >&6
16946 cat >"conftest.$ac_ext" <<_ACEOF
16947 #line 16947 "configure"
16948 #include "confdefs.h"
16949 #include <sys/types.h>
16961 rm -f "conftest.$ac_objext"
16962 if { (eval echo "$as_me:16962: \"$ac_compile\"") >&5
16963 (eval $ac_compile) 2>&5
16965 echo "$as_me:16965: \$? = $ac_status" >&5
16966 (exit "$ac_status"); } &&
16967 { ac_try='test -s "conftest.$ac_objext"'
16968 { (eval echo "$as_me:16968: \"$ac_try\"") >&5
16969 (eval $ac_try) 2>&5
16971 echo "$as_me:16971: \$? = $ac_status" >&5
16972 (exit "$ac_status"); }; }; then
16973 eval "$as_ac_Header=yes"
16975 echo "$as_me: failed program was:" >&5
16976 cat "conftest.$ac_ext" >&5
16977 eval "$as_ac_Header=no"
16979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16981 echo "$as_me:16981: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16982 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16983 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16984 cat >>confdefs.h <<EOF
16985 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16988 ac_header_dirent=$ac_hdr; break
16992 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16993 if test $ac_header_dirent = dirent.h; then
16994 echo "$as_me:16994: checking for opendir in -ldir" >&5
16995 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16996 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16997 echo $ECHO_N "(cached) $ECHO_C" >&6
16999 ac_check_lib_save_LIBS=$LIBS
17001 cat >"conftest.$ac_ext" <<_ACEOF
17002 #line 17002 "configure"
17003 #include "confdefs.h"
17005 /* Override any gcc2 internal prototype to avoid an error. */
17009 /* We use char because int might match the return type of a gcc2
17010 builtin and then its argument prototype would still apply. */
17020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17021 if { (eval echo "$as_me:17021: \"$ac_link\"") >&5
17022 (eval $ac_link) 2>&5
17024 echo "$as_me:17024: \$? = $ac_status" >&5
17025 (exit "$ac_status"); } &&
17026 { ac_try='test -s "conftest$ac_exeext"'
17027 { (eval echo "$as_me:17027: \"$ac_try\"") >&5
17028 (eval $ac_try) 2>&5
17030 echo "$as_me:17030: \$? = $ac_status" >&5
17031 (exit "$ac_status"); }; }; then
17032 ac_cv_lib_dir_opendir=yes
17034 echo "$as_me: failed program was:" >&5
17035 cat "conftest.$ac_ext" >&5
17036 ac_cv_lib_dir_opendir=no
17038 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17039 LIBS=$ac_check_lib_save_LIBS
17041 echo "$as_me:17041: result: $ac_cv_lib_dir_opendir" >&5
17042 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17043 if test "$ac_cv_lib_dir_opendir" = yes; then
17048 echo "$as_me:17048: checking for opendir in -lx" >&5
17049 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17050 if test "${ac_cv_lib_x_opendir+set}" = set; then
17051 echo $ECHO_N "(cached) $ECHO_C" >&6
17053 ac_check_lib_save_LIBS=$LIBS
17055 cat >"conftest.$ac_ext" <<_ACEOF
17056 #line 17056 "configure"
17057 #include "confdefs.h"
17059 /* Override any gcc2 internal prototype to avoid an error. */
17063 /* We use char because int might match the return type of a gcc2
17064 builtin and then its argument prototype would still apply. */
17074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17075 if { (eval echo "$as_me:17075: \"$ac_link\"") >&5
17076 (eval $ac_link) 2>&5
17078 echo "$as_me:17078: \$? = $ac_status" >&5
17079 (exit "$ac_status"); } &&
17080 { ac_try='test -s "conftest$ac_exeext"'
17081 { (eval echo "$as_me:17081: \"$ac_try\"") >&5
17082 (eval $ac_try) 2>&5
17084 echo "$as_me:17084: \$? = $ac_status" >&5
17085 (exit "$ac_status"); }; }; then
17086 ac_cv_lib_x_opendir=yes
17088 echo "$as_me: failed program was:" >&5
17089 cat "conftest.$ac_ext" >&5
17090 ac_cv_lib_x_opendir=no
17092 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17093 LIBS=$ac_check_lib_save_LIBS
17095 echo "$as_me:17095: result: $ac_cv_lib_x_opendir" >&5
17096 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17097 if test "$ac_cv_lib_x_opendir" = yes; then
17103 echo "$as_me:17103: checking whether time.h and sys/time.h may both be included" >&5
17104 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17105 if test "${ac_cv_header_time+set}" = set; then
17106 echo $ECHO_N "(cached) $ECHO_C" >&6
17108 cat >"conftest.$ac_ext" <<_ACEOF
17109 #line 17109 "configure"
17110 #include "confdefs.h"
17111 #include <sys/types.h>
17112 #include <sys/time.h>
17118 if ((struct tm *) 0)
17124 rm -f "conftest.$ac_objext"
17125 if { (eval echo "$as_me:17125: \"$ac_compile\"") >&5
17126 (eval $ac_compile) 2>&5
17128 echo "$as_me:17128: \$? = $ac_status" >&5
17129 (exit "$ac_status"); } &&
17130 { ac_try='test -s "conftest.$ac_objext"'
17131 { (eval echo "$as_me:17131: \"$ac_try\"") >&5
17132 (eval $ac_try) 2>&5
17134 echo "$as_me:17134: \$? = $ac_status" >&5
17135 (exit "$ac_status"); }; }; then
17136 ac_cv_header_time=yes
17138 echo "$as_me: failed program was:" >&5
17139 cat "conftest.$ac_ext" >&5
17140 ac_cv_header_time=no
17142 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17144 echo "$as_me:17144: result: $ac_cv_header_time" >&5
17145 echo "${ECHO_T}$ac_cv_header_time" >&6
17146 if test $ac_cv_header_time = yes; then
17148 cat >>confdefs.h <<\EOF
17149 #define TIME_WITH_SYS_TIME 1
17154 ### checks for compiler characteristics
17156 ac_cpp='$CPP $CPPFLAGS'
17157 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17158 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17159 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17160 ac_main_return="return"
17162 echo "$as_me:17162: checking for an ANSI C-conforming const" >&5
17163 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17164 if test "${ac_cv_c_const+set}" = set; then
17165 echo $ECHO_N "(cached) $ECHO_C" >&6
17167 cat >"conftest.$ac_ext" <<_ACEOF
17168 #line 17168 "configure"
17169 #include "confdefs.h"
17174 /* FIXME: Include the comments suggested by Paul. */
17175 #ifndef __cplusplus
17176 /* Ultrix mips cc rejects this. */
17177 typedef int charset[2];
17179 /* SunOS 4.1.1 cc rejects this. */
17180 char const *const *ccp;
17182 /* NEC SVR4.0.2 mips cc rejects this. */
17183 struct point {int x, y;};
17184 static struct point const zero = {0,0};
17185 /* AIX XL C 1.02.0.0 rejects this.
17186 It does not let you subtract one const X* pointer from another in
17187 an arm of an if-expression whose if-part is not a constant
17189 const char *g = "string";
17190 ccp = &g + (g ? g-g : 0);
17191 /* HPUX 7.0 cc rejects these. */
17194 ccp = (char const *const *) p;
17195 { /* SCO 3.2v4 cc rejects this. */
17197 char const *s = 0 ? (char *) 0 : (char const *) 0;
17201 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17202 int x[] = {25, 17};
17203 const int *foo = &x[0];
17206 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17207 typedef const int *iptr;
17211 { /* AIX XL C 1.02.0.0 rejects this saying
17212 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17213 struct s { int j; const int *ap[3]; };
17214 struct s *b; b->j = 5;
17216 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17217 const int foo = 10;
17225 rm -f "conftest.$ac_objext"
17226 if { (eval echo "$as_me:17226: \"$ac_compile\"") >&5
17227 (eval $ac_compile) 2>&5
17229 echo "$as_me:17229: \$? = $ac_status" >&5
17230 (exit "$ac_status"); } &&
17231 { ac_try='test -s "conftest.$ac_objext"'
17232 { (eval echo "$as_me:17232: \"$ac_try\"") >&5
17233 (eval $ac_try) 2>&5
17235 echo "$as_me:17235: \$? = $ac_status" >&5
17236 (exit "$ac_status"); }; }; then
17239 echo "$as_me: failed program was:" >&5
17240 cat "conftest.$ac_ext" >&5
17243 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17245 echo "$as_me:17245: result: $ac_cv_c_const" >&5
17246 echo "${ECHO_T}$ac_cv_c_const" >&6
17247 if test $ac_cv_c_const = no; then
17249 cat >>confdefs.h <<\EOF
17255 ### Checks for external-data
17257 echo "$as_me:17257: checking if data-only library module links" >&5
17258 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17259 if test "${cf_cv_link_dataonly+set}" = set; then
17260 echo $ECHO_N "(cached) $ECHO_C" >&6
17264 cat >conftest.$ac_ext <<EOF
17265 #line 17265 "configure"
17266 int testdata[3] = { 123, 456, 789 };
17268 if { (eval echo "$as_me:17268: \"$ac_compile\"") >&5
17269 (eval $ac_compile) 2>&5
17271 echo "$as_me:17271: \$? = $ac_status" >&5
17272 (exit "$ac_status"); } ; then
17273 mv conftest.o data.o && \
17274 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17276 rm -f conftest.$ac_ext data.o
17277 cat >conftest.$ac_ext <<EOF
17278 #line 17278 "configure"
17282 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17284 extern int testdata[3];
17285 return testdata[0] == 123
17286 && testdata[1] == 456
17287 && testdata[2] == 789;
17291 if { (eval echo "$as_me:17291: \"$ac_compile\"") >&5
17292 (eval $ac_compile) 2>&5
17294 echo "$as_me:17294: \$? = $ac_status" >&5
17295 (exit "$ac_status"); }; then
17296 mv conftest.o func.o && \
17297 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17299 rm -f conftest.$ac_ext func.o
17300 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17301 cf_saveLIBS="$LIBS"
17302 LIBS="conftest.a $LIBS"
17303 if test "$cross_compiling" = yes; then
17304 cf_cv_link_dataonly=unknown
17306 cat >"conftest.$ac_ext" <<_ACEOF
17307 #line 17307 "configure"
17308 #include "confdefs.h"
17312 extern int testfunc();
17313 ${cf_cv_main_return:-return} (!testfunc());
17317 rm -f "conftest$ac_exeext"
17318 if { (eval echo "$as_me:17318: \"$ac_link\"") >&5
17319 (eval $ac_link) 2>&5
17321 echo "$as_me:17321: \$? = $ac_status" >&5
17322 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17323 { (eval echo "$as_me:17323: \"$ac_try\"") >&5
17324 (eval $ac_try) 2>&5
17326 echo "$as_me:17326: \$? = $ac_status" >&5
17327 (exit "$ac_status"); }; }; then
17328 cf_cv_link_dataonly=yes
17330 echo "$as_me: program exited with status $ac_status" >&5
17331 echo "$as_me: failed program was:" >&5
17332 cat "conftest.$ac_ext" >&5
17333 cf_cv_link_dataonly=no
17335 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17337 LIBS="$cf_saveLIBS"
17341 echo "$as_me:17341: result: $cf_cv_link_dataonly" >&5
17342 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17344 if test "$cf_cv_link_dataonly" = no ; then
17346 cat >>confdefs.h <<\EOF
17347 #define BROKEN_LINKER 1
17353 ### Checks for library functions.
17359 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17360 echo "$as_me:17360: checking for $ac_header" >&5
17361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17363 echo $ECHO_N "(cached) $ECHO_C" >&6
17365 cat >"conftest.$ac_ext" <<_ACEOF
17366 #line 17366 "configure"
17367 #include "confdefs.h"
17368 #include <$ac_header>
17370 if { (eval echo "$as_me:17370: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17371 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17373 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17375 cat conftest.err >&5
17376 echo "$as_me:17376: \$? = $ac_status" >&5
17377 (exit "$ac_status"); } >/dev/null; then
17378 if test -s conftest.err; then
17379 ac_cpp_err=$ac_c_preproc_warn_flag
17386 if test -z "$ac_cpp_err"; then
17387 eval "$as_ac_Header=yes"
17389 echo "$as_me: failed program was:" >&5
17390 cat "conftest.$ac_ext" >&5
17391 eval "$as_ac_Header=no"
17393 rm -f conftest.err "conftest.$ac_ext"
17395 echo "$as_me:17395: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17396 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17397 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17398 cat >>confdefs.h <<EOF
17399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17405 echo "$as_me:17405: checking for working mkstemp" >&5
17406 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17407 if test "${cf_cv_func_mkstemp+set}" = set; then
17408 echo $ECHO_N "(cached) $ECHO_C" >&6
17412 if test "$cross_compiling" = yes; then
17413 cf_cv_func_mkstemp=maybe
17415 cat >"conftest.$ac_ext" <<_ACEOF
17416 #line 17416 "configure"
17417 #include "confdefs.h"
17419 #include <sys/types.h>
17420 #ifdef HAVE_UNISTD_H
17421 #include <unistd.h>
17423 #include <stdlib.h>
17425 #include <string.h>
17426 #include <sys/stat.h>
17429 char *tmpl = "conftestXXXXXX";
17437 for (n = 0; n < 2; ++n) {
17438 strcpy(name[n], tmpl);
17439 if ((fd = mkstemp(name[n])) >= 0) {
17440 if (!strcmp(name[n], tmpl)
17441 || stat(name[n], &sb) != 0
17442 || (sb.st_mode & S_IFMT) != S_IFREG
17443 || (sb.st_mode & 077) != 0) {
17450 && !strcmp(name[0], name[1]))
17452 ${cf_cv_main_return:-return}(result);
17456 rm -f "conftest$ac_exeext"
17457 if { (eval echo "$as_me:17457: \"$ac_link\"") >&5
17458 (eval $ac_link) 2>&5
17460 echo "$as_me:17460: \$? = $ac_status" >&5
17461 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17462 { (eval echo "$as_me:17462: \"$ac_try\"") >&5
17463 (eval $ac_try) 2>&5
17465 echo "$as_me:17465: \$? = $ac_status" >&5
17466 (exit "$ac_status"); }; }; then
17467 cf_cv_func_mkstemp=yes
17470 echo "$as_me: program exited with status $ac_status" >&5
17471 echo "$as_me: failed program was:" >&5
17472 cat "conftest.$ac_ext" >&5
17473 cf_cv_func_mkstemp=no
17476 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17480 echo "$as_me:17480: result: $cf_cv_func_mkstemp" >&5
17481 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17482 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17483 echo "$as_me:17483: checking for mkstemp" >&5
17484 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17485 if test "${ac_cv_func_mkstemp+set}" = set; then
17486 echo $ECHO_N "(cached) $ECHO_C" >&6
17488 cat >"conftest.$ac_ext" <<_ACEOF
17489 #line 17489 "configure"
17490 #include "confdefs.h"
17491 #define mkstemp autoconf_temporary
17492 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17499 /* We use char because int might match the return type of a gcc2
17500 builtin and then its argument prototype would still apply. */
17501 char mkstemp (void);
17507 /* The GNU C library defines stubs for functions which it implements
17508 to always fail with ENOSYS. Some functions are actually named
17509 something starting with __ and the normal name is an alias. */
17510 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17511 #error found stub for mkstemp
17519 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17520 if { (eval echo "$as_me:17520: \"$ac_link\"") >&5
17521 (eval $ac_link) 2>&5
17523 echo "$as_me:17523: \$? = $ac_status" >&5
17524 (exit "$ac_status"); } &&
17525 { ac_try='test -s "conftest$ac_exeext"'
17526 { (eval echo "$as_me:17526: \"$ac_try\"") >&5
17527 (eval $ac_try) 2>&5
17529 echo "$as_me:17529: \$? = $ac_status" >&5
17530 (exit "$ac_status"); }; }; then
17531 ac_cv_func_mkstemp=yes
17533 echo "$as_me: failed program was:" >&5
17534 cat "conftest.$ac_ext" >&5
17535 ac_cv_func_mkstemp=no
17537 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17539 echo "$as_me:17539: result: $ac_cv_func_mkstemp" >&5
17540 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17543 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17545 cat >>confdefs.h <<\EOF
17546 #define HAVE_MKSTEMP 1
17551 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17552 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17553 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17557 if test "$cf_with_ada" != "no" ; then
17559 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17562 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17564 unset ac_cv_path_cf_TEMP_gnat
17566 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17567 set dummy $cf_prog_gnat; ac_word=$2
17568 echo "$as_me:17568: checking for $ac_word" >&5
17569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17570 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17571 echo $ECHO_N "(cached) $ECHO_C" >&6
17573 case $cf_TEMP_gnat in
17575 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17578 ac_save_IFS=$IFS; IFS=$ac_path_separator
17580 for ac_dir in $ac_dummy; do
17582 test -z "$ac_dir" && ac_dir=.
17583 if $as_executable_p "$ac_dir/$ac_word"; then
17584 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17585 echo "$as_me:17585: found $ac_dir/$ac_word" >&5
17590 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17594 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17596 if test -n "$cf_TEMP_gnat"; then
17597 echo "$as_me:17597: result: $cf_TEMP_gnat" >&5
17598 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17600 echo "$as_me:17600: result: no" >&5
17601 echo "${ECHO_T}no" >&6
17604 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17606 if test "x$cf_TEMP_gnat" != xno; then
17607 unset cf_cv_gnat_version
17610 echo "$as_me:17610: checking for $cf_prog_gnat version" >&5
17611 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17612 if test "${cf_cv_gnat_version+set}" = set; then
17613 echo $ECHO_N "(cached) $ECHO_C" >&6
17616 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17617 grep '[0-9].[0-9][0-9]*' |\
17618 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17621 echo "$as_me:17621: result: $cf_cv_gnat_version" >&5
17622 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17623 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17624 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17627 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17630 unset cf_cv_gnat_version
17631 unset ac_cv_path_cf_TEMP_gnat
17634 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17636 cf_cv_prog_gnat_correct=no
17638 cf_ada_make=gnatmake
17639 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17640 # gprconfig is newer than gnatmake; we can continue...
17643 rm -rf ./conftest* ./*~conftest*
17644 if mkdir conftest.src
17648 for cf_gprconfig in Ada C
17650 echo "$as_me:17650: checking for gprconfig name for $cf_gprconfig" >&5
17651 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17652 if test "$cf_gprconfig" = C
17654 for cf_gprconfig_param in \
17655 "$cf_gprconfig,,,,GNATGCC" \
17656 "$cf_gprconfig,,,,GCC" \
17659 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17660 test -n "$cf_gprconfig_value" && break
17663 cf_gprconfig_param=$cf_gprconfig
17664 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17666 if test -n "$cf_gprconfig_value"
17668 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17669 echo "$as_me:17669: result: $cf_gprconfig_value" >&5
17670 echo "${ECHO_T}$cf_gprconfig_value" >&6
17672 echo "$as_me:17672: result: missing" >&5
17673 echo "${ECHO_T}missing" >&6
17679 rm -rf ./conftest* ./*~conftest*
17682 if test "x$cf_ada_config" != "x#"
17685 echo "$as_me:17685: checking for gnat version" >&5
17686 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17687 if test "${cf_cv_gnat_version+set}" = set; then
17688 echo $ECHO_N "(cached) $ECHO_C" >&6
17691 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17692 grep '[0-9].[0-9][0-9]*' |\
17693 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17696 echo "$as_me:17696: result: $cf_cv_gnat_version" >&5
17697 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17698 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17700 case "$cf_cv_gnat_version" in
17701 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17702 cf_cv_prog_gnat_correct=yes
17705 { echo "$as_me:17705: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17706 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17707 cf_cv_prog_gnat_correct=no
17711 # Extract the first word of "m4", so it can be a program name with args.
17712 set dummy m4; ac_word=$2
17713 echo "$as_me:17713: checking for $ac_word" >&5
17714 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17715 if test "${ac_cv_prog_M4_exists+set}" = set; then
17716 echo $ECHO_N "(cached) $ECHO_C" >&6
17718 if test -n "$M4_exists"; then
17719 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17721 ac_save_IFS=$IFS; IFS=$ac_path_separator
17723 for ac_dir in $ac_dummy; do
17725 test -z "$ac_dir" && ac_dir=.
17726 $as_executable_p "$ac_dir/$ac_word" || continue
17727 ac_cv_prog_M4_exists="yes"
17728 echo "$as_me:17728: found $ac_dir/$ac_word" >&5
17732 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17735 M4_exists=$ac_cv_prog_M4_exists
17736 if test -n "$M4_exists"; then
17737 echo "$as_me:17737: result: $M4_exists" >&5
17738 echo "${ECHO_T}$M4_exists" >&6
17740 echo "$as_me:17740: result: no" >&5
17741 echo "${ECHO_T}no" >&6
17744 if test "$ac_cv_prog_M4_exists" = no; then
17745 cf_cv_prog_gnat_correct=no
17746 { echo "$as_me:17746: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17747 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17749 if test "$cf_cv_prog_gnat_correct" = yes; then
17750 echo "$as_me:17750: checking if GNAT works" >&5
17751 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17753 rm -rf ./conftest* ./*~conftest*
17754 cat >>conftest.ads <<CF_EOF
17755 procedure conftest;
17757 cat >>conftest.adb <<CF_EOF
17760 procedure conftest is
17762 Text_IO.Put ("Hello World");
17764 GNAT.OS_Lib.OS_Exit (0);
17767 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17768 if ( ./conftest 1>&5 2>&1 ) ; then
17769 cf_cv_prog_gnat_correct=yes
17771 cf_cv_prog_gnat_correct=no
17774 cf_cv_prog_gnat_correct=no
17776 rm -rf ./conftest* ./*~conftest*
17778 echo "$as_me:17778: result: $cf_cv_prog_gnat_correct" >&5
17779 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17782 cf_cv_prog_gnat_correct=no
17786 if test "$cf_cv_prog_gnat_correct" = yes; then
17788 echo "$as_me:17788: checking optimization options for ADAFLAGS" >&5
17789 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17793 ADAFLAGS="$ADAFLAGS -g"
17799 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17801 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17805 echo "$as_me:17805: result: $ADAFLAGS" >&5
17806 echo "${ECHO_T}$ADAFLAGS" >&6
17808 echo "$as_me:17808: checking if GNATPREP supports -T option" >&5
17809 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17810 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17811 echo $ECHO_N "(cached) $ECHO_C" >&6
17814 cf_cv_gnatprep_opt_t=no
17815 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17818 echo "$as_me:17818: result: $cf_cv_gnatprep_opt_t" >&5
17819 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17820 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17822 echo "$as_me:17822: checking if GNAT supports generics" >&5
17823 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17824 case "$cf_cv_gnat_version" in
17825 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17826 cf_gnat_generics=yes
17829 cf_gnat_generics=no
17832 echo "$as_me:17832: result: $cf_gnat_generics" >&5
17833 echo "${ECHO_T}$cf_gnat_generics" >&6
17835 if test "$cf_gnat_generics" = yes
17837 cf_compile_generics=generics
17838 cf_generic_objects="\${GENOBJS}"
17840 cf_compile_generics=
17841 cf_generic_objects=
17844 echo "$as_me:17844: checking if GNAT supports SIGINT" >&5
17845 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17846 if test "${cf_cv_gnat_sigint+set}" = set; then
17847 echo $ECHO_N "(cached) $ECHO_C" >&6
17850 rm -rf ./conftest* ./*~conftest*
17851 cat >>conftest.ads <<CF_EOF
17852 with Ada.Interrupts.Names;
17854 package ConfTest is
17856 pragma Warnings (Off); -- the next pragma exists since 3.11p
17857 pragma Unreserve_All_Interrupts;
17858 pragma Warnings (On);
17860 protected Process is
17862 function Continue return Boolean;
17863 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17865 Done : Boolean := False;
17870 cat >>conftest.adb <<CF_EOF
17871 package body ConfTest is
17872 protected body Process is
17877 function Continue return Boolean is
17884 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17885 cf_cv_gnat_sigint=yes
17887 cf_cv_gnat_sigint=no
17889 rm -rf ./conftest* ./*~conftest*
17892 echo "$as_me:17892: result: $cf_cv_gnat_sigint" >&5
17893 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17895 if test "$cf_cv_gnat_sigint" = yes ; then
17898 USE_GNAT_SIGINT="#"
17901 cf_gnat_libraries=no
17902 cf_gnat_projects=no
17904 if test "$enable_gnat_projects" != no ; then
17905 echo "$as_me:17905: checking if GNAT supports project files" >&5
17906 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17907 case "$cf_cv_gnat_version" in
17911 case "$cf_cv_system_name" in
17915 rm -rf ./conftest* ./*~conftest*
17916 if mkdir conftest.src conftest.bin conftest.lib
17919 rm -rf ./conftest* ./*~conftest*
17920 cat >>library.gpr <<CF_EOF
17922 Kind := External ("LIB_KIND");
17923 for Library_Name use "ConfTest";
17924 for Object_Dir use ".";
17925 for Library_ALI_Dir use External("LIBRARY_DIR");
17926 for Library_Version use External ("SONAME");
17927 for Library_Kind use Kind;
17928 for Library_Dir use External("BUILD_DIR");
17929 Source_Dir := External ("SOURCE_DIR");
17930 for Source_Dirs use (Source_Dir);
17933 cat >>confpackage.ads <<CF_EOF
17934 package ConfPackage is
17935 procedure conftest;
17938 cat >>confpackage.adb <<CF_EOF
17940 package body ConfPackage is
17941 procedure conftest is
17943 Text_IO.Put ("Hello World");
17948 if ( "$cf_ada_make" $ADAFLAGS \
17950 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17951 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17952 -XSOURCE_DIR="`pwd`" \
17953 -XSONAME=libConfTest.so.1 \
17954 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17955 cf_gnat_projects=yes
17959 if test -f conftest.lib/confpackage.ali
17961 cf_gnat_libraries=yes
17963 rm -rf ./conftest* ./*~conftest*
17968 echo "$as_me:17968: result: $cf_gnat_projects" >&5
17969 echo "${ECHO_T}$cf_gnat_projects" >&6
17970 fi # enable_gnat_projects
17972 if test "$cf_gnat_projects" = yes
17974 echo "$as_me:17974: checking if GNAT supports libraries" >&5
17975 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17976 echo "$as_me:17976: result: $cf_gnat_libraries" >&5
17977 echo "${ECHO_T}$cf_gnat_libraries" >&6
17980 USE_OLD_MAKERULES=""
17981 USE_GNAT_PROJECTS="#"
17982 USE_GNAT_MAKE_GPR="#"
17983 USE_GNAT_GPRBUILD="#"
17985 if test "$cf_gnat_projects" = yes
17987 USE_OLD_MAKERULES="#"
17988 USE_GNAT_PROJECTS=""
17989 if test "$cf_cv_VERSION_GPRBUILD" != no
17991 USE_GNAT_GPRBUILD=""
17992 elif test "$cf_cv_VERSION_GNATMAKE" != no
17994 USE_GNAT_MAKE_GPR=""
17996 { echo "$as_me:17996: WARNING: use old makefile rules since tools are missing" >&5
17997 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18001 if test "$cf_gnat_libraries" = yes
18003 USE_GNAT_LIBRARIES=""
18005 USE_GNAT_LIBRARIES="#"
18008 echo "$as_me:18008: checking for ada-compiler" >&5
18009 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18011 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18012 if test "${with_ada_compiler+set}" = set; then
18013 withval="$with_ada_compiler"
18014 cf_ada_compiler=$withval
18016 cf_ada_compiler=gnatmake
18019 echo "$as_me:18019: result: $cf_ada_compiler" >&5
18020 echo "${ECHO_T}$cf_ada_compiler" >&6
18022 cf_ada_package=terminal_interface
18024 echo "$as_me:18024: checking for ada-include" >&5
18025 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18027 # Check whether --with-ada-include or --without-ada-include was given.
18028 if test "${with_ada_include+set}" = set; then
18029 withval="$with_ada_include"
18032 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18033 fi; if test -n "$prefix/share/ada/adainclude" ; then
18035 if test "x$prefix" != xNONE; then
18036 cf_path_syntax="$prefix"
18038 cf_path_syntax="$ac_default_prefix"
18041 case ".$withval" in
18042 (.\$\(*\)*|.\'*\'*)
18046 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18048 (.\$\{*prefix\}*|.\$\{*dir\}*)
18049 eval withval="$withval"
18050 case ".$withval" in
18052 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18057 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18060 { { echo "$as_me:18060: error: expected a pathname, not \"$withval\"" >&5
18061 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18062 { (exit 1); exit 1; }; }
18067 eval ADA_INCLUDE="$withval"
18069 echo "$as_me:18069: result: $ADA_INCLUDE" >&5
18070 echo "${ECHO_T}$ADA_INCLUDE" >&6
18072 echo "$as_me:18072: checking for ada-objects" >&5
18073 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18075 # Check whether --with-ada-objects or --without-ada-objects was given.
18076 if test "${with_ada_objects+set}" = set; then
18077 withval="$with_ada_objects"
18080 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18081 fi; if test -n "$prefix/lib/ada/adalib" ; then
18083 if test "x$prefix" != xNONE; then
18084 cf_path_syntax="$prefix"
18086 cf_path_syntax="$ac_default_prefix"
18089 case ".$withval" in
18090 (.\$\(*\)*|.\'*\'*)
18094 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18096 (.\$\{*prefix\}*|.\$\{*dir\}*)
18097 eval withval="$withval"
18098 case ".$withval" in
18100 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18105 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18108 { { echo "$as_me:18108: error: expected a pathname, not \"$withval\"" >&5
18109 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18110 { (exit 1); exit 1; }; }
18115 eval ADA_OBJECTS="$withval"
18117 echo "$as_me:18117: result: $ADA_OBJECTS" >&5
18118 echo "${ECHO_T}$ADA_OBJECTS" >&6
18120 echo "$as_me:18120: checking if an Ada95 shared-library should be built" >&5
18121 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18123 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18124 if test "${with_ada_sharedlib+set}" = set; then
18125 withval="$with_ada_sharedlib"
18126 with_ada_sharedlib=$withval
18128 with_ada_sharedlib=no
18130 echo "$as_me:18130: result: $with_ada_sharedlib" >&5
18131 echo "${ECHO_T}$with_ada_sharedlib" >&6
18133 if test "x$with_ada_sharedlib" != xno
18135 if test "x$cf_gnat_projects" != xyes
18137 { echo "$as_me:18137: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18138 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18139 with_ada_sharedlib=no
18143 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18144 MAKE_ADA_SHAREDLIB="#"
18146 if test "x$with_ada_sharedlib" != xno
18148 MAKE_ADA_SHAREDLIB=
18149 if test "x$with_ada_sharedlib" != xyes
18151 ADA_SHAREDLIB="$with_ada_sharedlib"
18155 # allow the Ada binding to be renamed
18157 echo "$as_me:18157: checking for ada-libname" >&5
18158 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18160 # Check whether --with-ada-libname or --without-ada-libname was given.
18161 if test "${with_ada_libname+set}" = set; then
18162 withval="$with_ada_libname"
18163 ADA_LIBNAME=$withval
18165 ADA_LIBNAME=AdaCurses
18167 case "x$ADA_LIBNAME" in
18169 ADA_LIBNAME=AdaCurses
18173 echo "$as_me:18173: result: $ADA_LIBNAME" >&5
18174 echo "${ECHO_T}$ADA_LIBNAME" >&6
18177 { { echo "$as_me:18177: error: No usable Ada compiler found" >&5
18178 echo "$as_me: error: No usable Ada compiler found" >&2;}
18179 { (exit 1); exit 1; }; }
18182 { { echo "$as_me:18182: error: The Ada compiler is needed for this package" >&5
18183 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18184 { (exit 1); exit 1; }; }
18187 ################################################################################
18194 ### Construct the list of include-directories to be generated
18196 if test "$srcdir" != "."; then
18197 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18199 CPPFLAGS="-I../include $CPPFLAGS"
18200 if test "$srcdir" != "."; then
18201 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18203 CPPFLAGS="-I. $CPPFLAGS"
18205 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18206 if test "$srcdir" != "."; then
18207 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18209 if test "$GCC" != yes; then
18210 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18211 elif test "$includedir" != "/usr/include"; then
18212 if test "$includedir" = '${prefix}/include' ; then
18213 if test x$prefix != x/usr ; then
18214 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18217 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18221 ### Build up pieces for makefile rules
18222 echo "$as_me:18222: checking default library suffix" >&5
18223 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18225 case $DFT_LWR_MODEL in
18226 (libtool) DFT_ARG_SUFFIX='' ;;
18227 (normal) DFT_ARG_SUFFIX='' ;;
18228 (debug) DFT_ARG_SUFFIX='_g' ;;
18229 (profile) DFT_ARG_SUFFIX='_p' ;;
18230 (shared) DFT_ARG_SUFFIX='' ;;
18232 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18233 echo "$as_me:18233: result: $DFT_ARG_SUFFIX" >&5
18234 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18236 echo "$as_me:18236: checking default library-dependency suffix" >&5
18237 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18239 case X$DFT_LWR_MODEL in
18241 DFT_LIB_SUFFIX='.la'
18242 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18245 case "$cf_cv_system_name" in
18247 DFT_LIB_SUFFIX='_g.lib'
18250 DFT_LIB_SUFFIX='_g.a'
18253 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18256 case "$cf_cv_system_name" in
18258 DFT_LIB_SUFFIX='_p.lib'
18261 DFT_LIB_SUFFIX='_p.a'
18264 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18267 case "$cf_cv_system_name" in
18269 DFT_LIB_SUFFIX='.so'
18270 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18273 DFT_LIB_SUFFIX='.dll'
18274 DFT_DEP_SUFFIX='.dll.lib'
18276 (cygwin*|msys*|mingw*)
18277 DFT_LIB_SUFFIX='.dll'
18278 DFT_DEP_SUFFIX='.dll.a'
18281 DFT_LIB_SUFFIX='.dylib'
18282 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18287 DFT_LIB_SUFFIX='.so'
18288 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18291 DFT_LIB_SUFFIX='.sl'
18292 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18297 DFT_LIB_SUFFIX='.so'
18298 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18305 DFT_LIB_SUFFIX='.lib'
18308 DFT_LIB_SUFFIX='.a'
18311 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18314 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18316 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18317 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18319 echo "$as_me:18319: result: $DFT_DEP_SUFFIX" >&5
18320 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18322 echo "$as_me:18322: checking default object directory" >&5
18323 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18325 case $DFT_LWR_MODEL in
18326 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18327 (normal) DFT_OBJ_SUBDIR='objects' ;;
18328 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18329 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18331 case "$cf_cv_system_name" in
18333 DFT_OBJ_SUBDIR='objects' ;;
18335 DFT_OBJ_SUBDIR='obj_s' ;;
18338 echo "$as_me:18338: result: $DFT_OBJ_SUBDIR" >&5
18339 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18341 ### Set up low-level terminfo dependencies for makefiles.
18343 if test "$DFT_LWR_MODEL" = shared ; then
18344 case $cf_cv_system_name in
18346 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18349 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18354 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18356 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18358 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18360 ### Construct the list of subdirectories for which we'll customize makefiles
18361 ### with the appropriate compile-rules.
18363 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18365 cat >>confdefs.h <<EOF
18366 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18369 ################################################################################
18375 NCURSES_SHLIB2="sh -c"
18377 ADA_SUBDIRS="include gen src doc"
18378 if test "x$cf_with_tests" != "xno" ; then
18379 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18381 for cf_dir in $ADA_SUBDIRS
18383 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18390 # match layout used by make-tar.sh
18391 ADAHTML_DIR=../doc/ada
18393 if test "x$cross_compiling" = xyes ; then
18394 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18396 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18399 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"
18400 ac_config_commands="$ac_config_commands default"
18401 cat >confcache <<\_ACEOF
18402 # This file is a shell script that caches the results of configure
18403 # tests run on this system so they can be shared between configure
18404 # scripts and configure runs, see configure's option --config-cache.
18405 # It is not useful on other systems. If it contains results you don't
18406 # want to keep, you may remove or edit it.
18408 # config.status only pays attention to the cache file if you give it
18409 # the --recheck option to rerun configure.
18411 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18412 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18413 # following values.
18417 # The following way of writing the cache mishandles newlines in values,
18418 # but we know of no workaround that is simple, portable, and efficient.
18419 # So, don't put newlines in cache variables' values.
18420 # Ultrix sh set writes to stderr and can't be redirected directly,
18421 # and sets the high bit in the cache file unless we assign to the vars.
18424 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18426 # `set' does not quote correctly, so add quotes (double-quote
18427 # substitution turns \\\\ into \\, and sed turns \\ into \).
18430 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18433 # `set' quotes correctly as required by POSIX, so do not add quotes.
18435 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18442 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18444 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18446 if cmp -s $cache_file confcache; then :; else
18447 if test -w $cache_file; then
18448 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18449 cat confcache >$cache_file
18451 echo "not updating unwritable cache $cache_file"
18456 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18457 # Let make expand exec_prefix.
18458 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18460 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18461 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18462 # trailing colons and then remove the whole line if VPATH becomes empty
18463 # (actually we leave an empty line to preserve line numbers).
18464 if test "x$srcdir" = x.; then
18465 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18466 s/:*\$(srcdir):*/:/;
18467 s/:*\${srcdir}:*/:/;
18469 s/^\([^=]*=[ ]*\):*/\1/;
18475 DEFS=-DHAVE_CONFIG_H
18477 : "${CONFIG_STATUS=./config.status}"
18478 ac_clean_files_save=$ac_clean_files
18479 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18480 { echo "$as_me:18480: creating $CONFIG_STATUS" >&5
18481 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18482 cat >"$CONFIG_STATUS" <<_ACEOF
18484 # Generated automatically by configure.
18485 # Run this file to recreate the current configuration.
18486 # Compiler output produced by configure, useful for debugging
18487 # configure, is in config.log if it exists.
18489 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18492 SHELL=\${CONFIG_SHELL-$SHELL}
18493 ac_cs_invocation="\$0 \$@"
18495 CLICOLOR_FORCE= GREP_OPTIONS=
18496 unset CLICOLOR_FORCE GREP_OPTIONS
18499 cat >>"$CONFIG_STATUS" <<\_ACEOF
18500 # Be Bourne compatible
18501 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18504 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18508 # Name of the executable.
18509 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18511 if expr a : '\(a\)' >/dev/null 2>&1; then
18517 rm -f conf$$ conf$$.exe conf$$.file
18519 if ln -s conf$$.file conf$$ 2>/dev/null; then
18520 # We could just check for DJGPP; but this test a) works b) is more generic
18521 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18522 if test -f conf$$.exe; then
18523 # Don't use ln at all; we don't have any links
18528 elif ln conf$$.file conf$$ 2>/dev/null; then
18533 rm -f conf$$ conf$$.exe conf$$.file
18535 as_executable_p="test -f"
18537 # Support unset when possible.
18538 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18545 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18546 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18547 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18548 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18549 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18550 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18551 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18552 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18555 # We need space, tab and new line, in precisely that order.
18561 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18567 # Files that config.status was made for.
18568 if test -n "$ac_config_files"; then
18569 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18572 if test -n "$ac_config_headers"; then
18573 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18576 if test -n "$ac_config_links"; then
18577 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18580 if test -n "$ac_config_commands"; then
18581 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18584 cat >>"$CONFIG_STATUS" <<\EOF
18587 \`$as_me' instantiates files from templates according to the
18588 current configuration.
18590 Usage: $0 [OPTIONS] [FILE]...
18592 -h, --help print this help, then exit
18593 -V, --version print version number, then exit
18594 -d, --debug don't remove temporary files
18595 --recheck update $as_me by reconfiguring in the same conditions
18596 --file=FILE[:TEMPLATE]
18597 instantiate the configuration file FILE
18598 --header=FILE[:TEMPLATE]
18599 instantiate the configuration header FILE
18601 Configuration files:
18604 Configuration headers:
18607 Configuration commands:
18610 Report bugs to <dickey@invisible-island.net>."
18613 cat >>"$CONFIG_STATUS" <<EOF
18616 configured by $0, generated by GNU Autoconf 2.52.20221009,
18617 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18619 Copyright 2003-2021,2022 Thomas E. Dickey
18620 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18621 Free Software Foundation, Inc.
18622 This config.status script is free software; the Free Software Foundation
18623 gives unlimited permission to copy, distribute and modify it."
18628 cat >>"$CONFIG_STATUS" <<\EOF
18629 # If no file are specified by the user, then we need to provide default
18630 # value. By we need to know if files were specified by the user.
18636 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18637 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18639 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18643 *) # This is not an option, so the user has probably given explicit
18645 ac_need_defaults=false;;
18649 # Handling of the options.
18651 cat >>"$CONFIG_STATUS" <<EOF
18652 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18653 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18654 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18656 cat >>"$CONFIG_STATUS" <<\EOF
18657 --version | --vers* | -V )
18658 echo "$ac_cs_version"; exit 0 ;;
18660 # Conflict between --help and --header
18661 { { echo "$as_me:18661: error: ambiguous option: $1
18662 Try \`$0 --help' for more information." >&5
18663 echo "$as_me: error: ambiguous option: $1
18664 Try \`$0 --help' for more information." >&2;}
18665 { (exit 1); exit 1; }; };;
18666 --help | --hel | -h )
18667 echo "$ac_cs_usage"; exit 0 ;;
18668 --debug | --d* | -d )
18670 --file | --fil | --fi | --f )
18672 CONFIG_FILES="$CONFIG_FILES $1"
18673 ac_need_defaults=false;;
18674 --header | --heade | --head | --hea )
18676 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18677 ac_need_defaults=false;;
18679 # This is an error.
18680 -*) { { echo "$as_me:18680: error: unrecognized option: $1
18681 Try \`$0 --help' for more information." >&5
18682 echo "$as_me: error: unrecognized option: $1
18683 Try \`$0 --help' for more information." >&2;}
18684 { (exit 1); exit 1; }; } ;;
18686 *) ac_config_targets="$ac_config_targets $1" ;;
18695 ## ----------------------- ##
18696 ## Running config.status. ##
18697 ## ----------------------- ##
18699 This file was extended by $as_me 2.52.20221009, executed with
18700 CONFIG_FILES = $CONFIG_FILES
18701 CONFIG_HEADERS = $CONFIG_HEADERS
18702 CONFIG_LINKS = $CONFIG_LINKS
18703 CONFIG_COMMANDS = $CONFIG_COMMANDS
18704 > "$ac_cs_invocation"
18705 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18710 cat >>"$CONFIG_STATUS" <<EOF
18712 # INIT-COMMANDS section.
18715 ### Special initialization commands, used to pass information from the
18716 ### configuration-run into config.status
18719 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18720 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18721 LIB_NAME="$LIB_NAME"
18722 LIB_PREFIX="$LIB_PREFIX"
18723 LIB_SUFFIX="$LIB_SUFFIX"
18725 NCURSES_MAJOR="$NCURSES_MAJOR"
18726 NCURSES_MINOR="$NCURSES_MINOR"
18727 NCURSES_PATCH="$NCURSES_PATCH"
18728 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18729 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18730 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18731 cf_cv_abi_version="$cf_cv_abi_version"
18732 cf_cv_rel_version="$cf_cv_rel_version"
18733 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18734 cf_cv_shared_soname='$cf_cv_shared_soname'
18735 cf_cv_shlib_version="$cf_cv_shlib_version"
18736 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18737 cf_cv_system_name="$cf_cv_system_name"
18743 cat >>"$CONFIG_STATUS" <<\EOF
18744 for ac_config_target in $ac_config_targets
18746 case "$ac_config_target" in
18747 # Handling of arguments.
18748 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18749 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18750 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18751 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18752 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18753 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18754 *) { { echo "$as_me:18754: error: invalid argument: $ac_config_target" >&5
18755 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18756 { (exit 1); exit 1; }; };;
18760 # If the user did not use the arguments to specify the items to instantiate,
18761 # then the envvar interface is used. Set only those that are not.
18762 # We use the long form for the default assignment because of an extremely
18763 # bizarre bug on SunOS 4.1.3.
18764 if "$ac_need_defaults"; then
18765 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18766 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18767 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18770 # Create a temporary directory, and hook for its removal unless debugging.
18773 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18774 trap '{ (exit 1); exit 1; }' 1 2 13 15
18777 # Create a (secure) tmp directory for tmp files.
18780 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18781 test -n "$tmp" && test -d "$tmp"
18784 tmp=$TMPDIR/cs$$-$RANDOM
18785 (umask 077 && mkdir "$tmp")
18788 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18789 { (exit 1); exit 1; }
18794 cat >>"$CONFIG_STATUS" <<EOF
18797 # CONFIG_FILES section.
18800 # No need to generate the scripts if there are no CONFIG_FILES.
18801 # This happens for instance when ./config.status config.h
18802 if test -n "\$CONFIG_FILES"; then
18803 # Protect against being on the right side of a sed subst in config.status.
18804 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18805 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18806 s,@SHELL@,$SHELL,;t t
18807 s,@exec_prefix@,$exec_prefix,;t t
18808 s,@prefix@,$prefix,;t t
18809 s,@program_transform_name@,$program_transform_name,;t t
18810 s,@bindir@,$bindir,;t t
18811 s,@sbindir@,$sbindir,;t t
18812 s,@libexecdir@,$libexecdir,;t t
18813 s,@datarootdir@,$datarootdir,;t t
18814 s,@datadir@,$datadir,;t t
18815 s,@sysconfdir@,$sysconfdir,;t t
18816 s,@sharedstatedir@,$sharedstatedir,;t t
18817 s,@localstatedir@,$localstatedir,;t t
18818 s,@runstatedir@,$runstatedir,;t t
18819 s,@libdir@,$libdir,;t t
18820 s,@includedir@,$includedir,;t t
18821 s,@oldincludedir@,$oldincludedir,;t t
18822 s,@infodir@,$infodir,;t t
18823 s,@mandir@,$mandir,;t t
18824 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18825 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18826 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18827 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18828 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18829 s,@build_alias@,$build_alias,;t t
18830 s,@host_alias@,$host_alias,;t t
18831 s,@target_alias@,$target_alias,;t t
18832 s,@ECHO_C@,$ECHO_C,;t t
18833 s,@ECHO_N@,$ECHO_N,;t t
18834 s,@ECHO_T@,$ECHO_T,;t t
18835 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18836 s,@DEFS@,$DEFS,;t t
18837 s,@LIBS@,$LIBS,;t t
18838 s,@top_builddir@,$top_builddir,;t t
18839 s,@build@,$build,;t t
18840 s,@build_cpu@,$build_cpu,;t t
18841 s,@build_vendor@,$build_vendor,;t t
18842 s,@build_os@,$build_os,;t t
18843 s,@host@,$host,;t t
18844 s,@host_cpu@,$host_cpu,;t t
18845 s,@host_vendor@,$host_vendor,;t t
18846 s,@host_os@,$host_os,;t t
18847 s,@target@,$target,;t t
18848 s,@target_cpu@,$target_cpu,;t t
18849 s,@target_vendor@,$target_vendor,;t t
18850 s,@target_os@,$target_os,;t t
18851 s,@GREP@,$GREP,;t t
18852 s,@FGREP@,$FGREP,;t t
18854 s,@CFLAGS@,$CFLAGS,;t t
18855 s,@LDFLAGS@,$LDFLAGS,;t t
18856 s,@CPPFLAGS@,$CPPFLAGS,;t t
18857 s,@ac_ct_CC@,$ac_ct_CC,;t t
18858 s,@EXEEXT@,$EXEEXT,;t t
18859 s,@OBJEXT@,$OBJEXT,;t t
18860 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18862 s,@EGREP@,$EGREP,;t t
18864 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18865 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18866 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18867 s,@LN_S@,$LN_S,;t t
18868 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18869 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18870 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18871 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18872 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18873 s,@SET_MAKE@,$SET_MAKE,;t t
18874 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18875 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18876 s,@CTAGS@,$CTAGS,;t t
18877 s,@ETAGS@,$ETAGS,;t t
18878 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18879 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18880 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18881 s,@RANLIB@,$RANLIB,;t t
18882 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18884 s,@ac_ct_LD@,$ac_ct_LD,;t t
18886 s,@ac_ct_AR@,$ac_ct_AR,;t t
18887 s,@ARFLAGS@,$ARFLAGS,;t t
18888 s,@DESTDIR@,$DESTDIR,;t t
18889 s,@BUILD_CC@,$BUILD_CC,;t t
18890 s,@BUILD_CPP@,$BUILD_CPP,;t t
18891 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18892 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18893 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18894 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18895 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18896 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18897 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18898 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18899 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18900 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18901 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18902 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18903 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18904 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18905 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18906 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18907 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18908 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18909 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18910 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18911 s,@CC_G_OPT@,$CC_G_OPT,;t t
18912 s,@LD_MODEL@,$LD_MODEL,;t t
18913 s,@shlibdir@,$shlibdir,;t t
18914 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18915 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18916 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18917 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18918 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18919 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18920 s,@LINK_PROGS@,$LINK_PROGS,;t t
18921 s,@LINK_TESTS@,$LINK_TESTS,;t t
18922 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18923 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18924 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18925 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18926 s,@RPATH_LIST@,$RPATH_LIST,;t t
18927 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18928 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18929 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18930 s,@PTHREAD@,$PTHREAD,;t t
18931 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18932 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18933 s,@ECHO_LT@,$ECHO_LT,;t t
18934 s,@ECHO_LD@,$ECHO_LD,;t t
18935 s,@RULE_CC@,$RULE_CC,;t t
18936 s,@SHOW_CC@,$SHOW_CC,;t t
18937 s,@ECHO_CC@,$ECHO_CC,;t t
18938 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18939 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18940 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18941 s,@ADAFLAGS@,$ADAFLAGS,;t t
18942 s,@ADA_TRACE@,$ADA_TRACE,;t t
18943 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18944 s,@M4_exists@,$M4_exists,;t t
18945 s,@cf_ada_make@,$cf_ada_make,;t t
18946 s,@cf_ada_config@,$cf_ada_config,;t t
18947 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18948 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18949 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18950 s,@cf_compile_generics@,$cf_compile_generics,;t t
18951 s,@cf_generic_objects@,$cf_generic_objects,;t t
18952 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18953 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18954 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18955 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18956 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18957 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18958 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18959 s,@cf_ada_package@,$cf_ada_package,;t t
18960 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18961 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18962 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18963 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18964 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18965 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18966 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18967 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18968 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18969 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18970 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18971 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18972 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18973 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18974 s,@TEST_ARG2@,$TEST_ARG2,;t t
18975 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18976 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18977 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18978 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18979 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18980 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18981 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18986 cat >>"$CONFIG_STATUS" <<\EOF
18987 # Split the substitutions into bite-sized pieces for seds with
18988 # small command number limits, like on Digital OSF/1 and HP-UX.
18989 ac_max_sed_lines=48
18990 ac_sed_frag=1 # Number of current file.
18991 ac_beg=1 # First line for current file.
18992 ac_end=$ac_max_sed_lines # Line after last line for current file.
18995 while "$ac_more_lines"; do
18996 if test "$ac_beg" -gt 1; then
18997 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
18999 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19001 if test ! -s "$tmp"/subs.frag; then
19002 ac_more_lines=false
19004 # The purpose of the label and of the branching condition is to
19005 # speed up the sed processing (if there are no `@' at all, there
19006 # is no need to browse any of the substitutions).
19007 # These are the two extra sed commands mentioned above.
19009 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19010 # It is possible to make a multiline substitution using escaped newlines.
19011 # Ensure that we do not split the substitution between script fragments.
19013 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19014 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19015 if test -s "$tmp"/subs.next; then
19016 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19017 if test ! -s "$tmp"/subs.edit; then
19018 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19019 if test ! -s "$tmp"/subs.edit; then
19020 if test "$ac_beg" -gt 1; then
19021 ac_end=`expr "$ac_end" - 1`
19028 if test -z "$ac_sed_cmds"; then
19029 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19031 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19033 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19035 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19038 if test -z "$ac_sed_cmds"; then
19041 fi # test -n "$CONFIG_FILES"
19044 cat >>"$CONFIG_STATUS" <<\EOF
19045 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19046 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19048 - | *:- | *:-:* ) # input from stdin
19050 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19051 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19052 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19053 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19054 * ) ac_file_in=$ac_file.in ;;
19057 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19058 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19059 X"$ac_file" : 'X\(//\)[^/]' \| \
19060 X"$ac_file" : 'X\(//\)$' \| \
19061 X"$ac_file" : 'X\(/\)' \| \
19062 . : '\(.\)' 2>/dev/null ||
19064 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19065 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19066 /^X\(\/\/\)$/{ s//\1/; q; }
19067 /^X\(\/\).*/{ s//\1/; q; }
19069 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19070 { case "$ac_dir" in
19071 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19075 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19076 case $as_mkdir_dir in
19077 # Skip DOS drivespec
19078 ?:) as_incr_dir=$as_mkdir_dir ;;
19080 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19081 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19086 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19087 # A "../" for each directory in $ac_dir_suffix.
19088 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19090 ac_dir_suffix= ac_dots=
19095 if test -z "$ac_dots"; then
19098 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19100 [\\/]* | ?:[\\/]* )
19101 ac_srcdir="$srcdir$ac_dir_suffix";
19102 ac_top_srcdir="$srcdir" ;;
19103 *) # Relative path.
19104 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19105 ac_top_srcdir="$ac_dots$srcdir" ;;
19109 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19110 *) ac_INSTALL=$ac_dots$INSTALL ;;
19113 if test x"$ac_file" != x-; then
19114 { echo "$as_me:19114: creating $ac_file" >&5
19115 echo "$as_me: creating $ac_file" >&6;}
19118 # Let's still pretend it is `configure' which instantiates (i.e., don't
19119 # use $as_me), people would be surprised to read:
19120 # /* config.h. Generated automatically by config.status. */
19121 configure_input="Generated automatically from `echo $ac_file_in |
19122 sed 's,.*/,,'` by configure."
19124 # First look for the input files in the build tree, otherwise in the
19126 ac_file_inputs=`IFS=:
19127 for f in $ac_file_in; do
19129 -) echo "$tmp"/stdin ;;
19131 # Absolute (can't be DOS-style, as IFS=:)
19132 test -f "$f" || { { echo "$as_me:19132: error: cannot find input file: $f" >&5
19133 echo "$as_me: error: cannot find input file: $f" >&2;}
19134 { (exit 1); exit 1; }; }
19137 if test -f "$f"; then
19140 elif test -f "$srcdir/$f"; then
19145 { { echo "$as_me:19145: error: cannot find input file: $f" >&5
19146 echo "$as_me: error: cannot find input file: $f" >&2;}
19147 { (exit 1); exit 1; }; }
19150 done` || { (exit 1); exit 1; }
19152 cat >>"$CONFIG_STATUS" <<\EOF
19153 ac_warn_datarootdir=no
19154 if test x"$ac_file" != x-; then
19155 for ac_item in $ac_file_inputs
19157 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19158 if test -n "$ac_seen"; then
19159 ac_used=`grep '@datarootdir@' "$ac_item"`
19160 if test -z "$ac_used"; then
19161 { echo "$as_me:19161: WARNING: datarootdir was used implicitly but not set:
19163 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19165 ac_warn_datarootdir=yes
19168 ac_seen=`grep '${datarootdir}' "$ac_item"`
19169 if test -n "$ac_seen"; then
19170 { echo "$as_me:19170: WARNING: datarootdir was used explicitly but not set:
19172 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19174 ac_warn_datarootdir=yes
19179 if test "x$ac_warn_datarootdir" = xyes; then
19180 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19184 cat >>"$CONFIG_STATUS" <<EOF
19188 cat >>"$CONFIG_STATUS" <<\EOF
19190 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19191 s,@configure_input@,$configure_input,;t t
19192 s,@srcdir@,$ac_srcdir,;t t
19193 s,@top_srcdir@,$ac_top_srcdir,;t t
19194 s,@INSTALL@,$ac_INSTALL,;t t
19195 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19198 : "${FGREP:=grep -F}"
19199 : "${EGREP:=grep -E}"
19200 cat >>"$CONFIG_STATUS" <<EOF
19201 : "\${FGREP:=$FGREP}"
19202 : "\${EGREP:=$EGREP}"
19204 cat >>"$CONFIG_STATUS" <<\EOF
19205 if test x"$ac_file" != x-; then
19206 cp "$tmp/out" "$ac_file"
19208 for ac_name in prefix exec_prefix datarootdir
19210 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19211 if test -n "$ac_seen"; then
19212 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19213 if test -z "$ac_init"; then
19214 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19215 { echo "$as_me:19215: WARNING: Variable $ac_name is used but was not set:
19217 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19222 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19223 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19224 if test -s "$tmp"/out; then
19225 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19226 { echo "$as_me:19226: WARNING: Some variables may not be substituted:
19228 echo "$as_me: WARNING: Some variables may not be substituted:
19238 cat >>"$CONFIG_STATUS" <<\EOF
19241 # CONFIG_HEADER section.
19244 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19245 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19247 # ac_d sets the value in "#define NAME VALUE" lines.
19248 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19249 ac_dB='[ ].*$,\1#\2'
19252 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19253 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19254 ac_iB='\([ ]\),\1#\2define\3'
19257 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19258 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19259 ac_uB='$,\1#\2define\3'
19263 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19264 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19266 - | *:- | *:-:* ) # input from stdin
19268 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19269 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19270 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19271 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19272 * ) ac_file_in=$ac_file.in ;;
19275 test x"$ac_file" != x- && { echo "$as_me:19275: creating $ac_file" >&5
19276 echo "$as_me: creating $ac_file" >&6;}
19278 # First look for the input files in the build tree, otherwise in the
19280 ac_file_inputs=`IFS=:
19281 for f in $ac_file_in; do
19283 -) echo "$tmp"/stdin ;;
19285 # Absolute (can't be DOS-style, as IFS=:)
19286 test -f "$f" || { { echo "$as_me:19286: error: cannot find input file: $f" >&5
19287 echo "$as_me: error: cannot find input file: $f" >&2;}
19288 { (exit 1); exit 1; }; }
19291 if test -f "$f"; then
19294 elif test -f "$srcdir/$f"; then
19299 { { echo "$as_me:19299: error: cannot find input file: $f" >&5
19300 echo "$as_me: error: cannot find input file: $f" >&2;}
19301 { (exit 1); exit 1; }; }
19304 done` || { (exit 1); exit 1; }
19305 # Remove the trailing spaces.
19306 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19310 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19311 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19312 # be either 'cat' or 'sort'.
19313 cat confdefs.h | uniq >conftest.vals
19315 # Break up conftest.vals because some shells have a limit on
19316 # the size of here documents, and old seds have small limits too.
19318 rm -f conftest.tail
19319 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19320 while grep . conftest.vals >/dev/null
19322 # Write chunks of a limited-size here document to conftest.frag.
19323 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19324 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19325 echo 'CEOF' >> "$CONFIG_STATUS"
19326 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19327 rm -f conftest.vals
19328 mv conftest.tail conftest.vals
19330 rm -f conftest.vals
19332 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19334 echo ' cat >> conftest.edit <<CEOF
19335 /@DEFS@/r conftest.frag
19338 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19340 mv "$tmp"/out "$tmp"/in
19341 rm -f conftest.edit conftest.frag
19342 ' >> "$CONFIG_STATUS"
19344 cat >>"$CONFIG_STATUS" <<\EOF
19345 # Let's still pretend it is `configure' which instantiates (i.e., don't
19346 # use $as_me), people would be surprised to read:
19347 # /* config.h. Generated automatically by config.status. */
19348 if test x"$ac_file" = x-; then
19349 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19351 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19353 cat "$tmp"/in >>"$tmp"/config.h
19355 if test x"$ac_file" != x-; then
19356 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19357 { echo "$as_me:19357: $ac_file is unchanged" >&5
19358 echo "$as_me: $ac_file is unchanged" >&6;}
19360 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19361 X"$ac_file" : 'X\(//\)[^/]' \| \
19362 X"$ac_file" : 'X\(//\)$' \| \
19363 X"$ac_file" : 'X\(/\)' \| \
19364 . : '\(.\)' 2>/dev/null ||
19366 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19367 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19368 /^X\(\/\/\)$/{ s//\1/; q; }
19369 /^X\(\/\).*/{ s//\1/; q; }
19371 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19372 { case "$ac_dir" in
19373 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19377 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19378 case $as_mkdir_dir in
19379 # Skip DOS drivespec
19380 ?:) as_incr_dir=$as_mkdir_dir ;;
19382 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19383 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19390 mv "$tmp/config.h" "$ac_file"
19393 cat "$tmp"/config.h
19394 rm -f "$tmp"/config.h
19398 cat >>"$CONFIG_STATUS" <<\EOF
19400 # CONFIG_COMMANDS section.
19402 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19403 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19404 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19408 if test -z "$USE_OLD_MAKERULES" ; then
19409 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19416 cat >>"$CONFIG_STATUS" <<\EOF
19418 { (exit 0); exit 0; }
19420 chmod +x "$CONFIG_STATUS"
19421 ac_clean_files=$ac_clean_files_save
19423 # configure is writing to config.log, and then calls config.status.
19424 # config.status does its own redirection, appending to config.log.
19425 # Unfortunately, on DOS this fails, as config.log is still kept open
19426 # by configure, so config.status won't be able to write to it; its
19427 # output is simply discarded. So we exec the FD to /dev/null,
19428 # effectively closing config.log, so it can be properly (re)opened and
19429 # appended to by config.status. When coming back to configure, we
19430 # need to make the FD available again.
19431 if test "$no_create" != yes; then
19434 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19436 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19437 # would make configure fail if this is the last instruction.
19438 "$ac_cs_success" || { (exit 1); exit 1; }
19440 ${MAKE:-make} preinstall