2 # From configure.in Revision: 1.88 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
6 # Copyright 2003-2022,2023 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-2022,2023 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.20230114. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1067 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1068 if test -f "$ac_dir/install-sh"; then
1070 ac_install_sh="$ac_aux_dir/install-sh -c"
1072 elif test -f "$ac_dir/install.sh"; then
1074 ac_install_sh="$ac_aux_dir/install.sh -c"
1076 elif test -f "$ac_dir/shtool"; then
1078 ac_install_sh="$ac_aux_dir/shtool install -c"
1082 if test -z "$ac_aux_dir"; then
1083 { { echo "$as_me:1083: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1084 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1085 { (exit 1); exit 1; }; }
1087 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1088 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1089 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1091 # Make sure we can run config.sub.
1092 $ac_config_sub sun4 >/dev/null 2>&1 ||
1093 { { echo "$as_me:1093: error: cannot run $ac_config_sub" >&5
1094 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1095 { (exit 1); exit 1; }; }
1097 echo "$as_me:1097: checking build system type" >&5
1098 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1099 if test "${ac_cv_build+set}" = set; then
1100 echo $ECHO_N "(cached) $ECHO_C" >&6
1102 ac_cv_build_alias=$build_alias
1103 test -z "$ac_cv_build_alias" &&
1104 ac_cv_build_alias=`$ac_config_guess`
1105 test -z "$ac_cv_build_alias" &&
1106 { { echo "$as_me:1106: error: cannot guess build type; you must specify one" >&5
1107 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1108 { (exit 1); exit 1; }; }
1109 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1110 { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1111 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1112 { (exit 1); exit 1; }; }
1115 echo "$as_me:1115: result: $ac_cv_build" >&5
1116 echo "${ECHO_T}$ac_cv_build" >&6
1118 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122 echo "$as_me:1122: checking host system type" >&5
1123 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1124 if test "${ac_cv_host+set}" = set; then
1125 echo $ECHO_N "(cached) $ECHO_C" >&6
1127 ac_cv_host_alias=$host_alias
1128 test -z "$ac_cv_host_alias" &&
1129 ac_cv_host_alias=$ac_cv_build_alias
1130 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1131 { { echo "$as_me:1131: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1132 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1133 { (exit 1); exit 1; }; }
1136 echo "$as_me:1136: result: $ac_cv_host" >&5
1137 echo "${ECHO_T}$ac_cv_host" >&6
1139 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1144 echo "$as_me:1144: checking target system type" >&5
1145 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1146 if test "${ac_cv_target+set}" = set; then
1147 echo $ECHO_N "(cached) $ECHO_C" >&6
1149 ac_cv_target_alias=$target_alias
1150 test "x$ac_cv_target_alias" = "x" &&
1151 ac_cv_target_alias=$ac_cv_host_alias
1152 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1153 { { echo "$as_me:1153: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1154 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1155 { (exit 1); exit 1; }; }
1158 echo "$as_me:1158: result: $ac_cv_target" >&5
1159 echo "${ECHO_T}$ac_cv_target" >&6
1160 target=$ac_cv_target
1161 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1162 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1163 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1165 # The aliases save the names the user supplied, while $host etc.
1166 # will get canonicalized.
1167 test -n "$target_alias" &&
1168 test "$program_prefix$program_suffix$program_transform_name" = \
1170 program_prefix=${target_alias}-
1171 system_name="$host_os"
1173 system_name="`(uname -s -r) 2>/dev/null`"
1174 if test -z "$system_name" ; then
1175 system_name="`(hostname) 2>/dev/null`"
1178 test -n "$system_name" &&
1179 cat >>confdefs.h <<EOF
1180 #define SYSTEM_NAME "$system_name"
1183 if test "${cf_cv_system_name+set}" = set; then
1184 echo $ECHO_N "(cached) $ECHO_C" >&6
1186 cf_cv_system_name="$system_name"
1189 test -z "$system_name" && system_name="$cf_cv_system_name"
1190 test -n "$cf_cv_system_name" && echo "$as_me:1190: result: Configuring for $cf_cv_system_name" >&5
1191 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1193 if test ".$system_name" != ".$cf_cv_system_name" ; then
1194 echo "$as_me:1194: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1195 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1196 { { echo "$as_me:1196: error: \"Please remove config.cache and try again.\"" >&5
1197 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1198 { (exit 1); exit 1; }; }
1201 # Check whether --with-system-type or --without-system-type was given.
1202 if test "${with_system_type+set}" = set; then
1203 withval="$with_system_type"
1204 { echo "$as_me:1204: WARNING: overriding system type to $withval" >&5
1205 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1206 cf_cv_system_name=$withval
1211 ### Save the given $CFLAGS to allow user-override.
1212 cf_user_CFLAGS="$CFLAGS"
1214 ### Default install-location
1215 for ac_prog in ggrep grep
1217 # Extract the first word of "$ac_prog", so it can be a program name with args.
1218 set dummy $ac_prog; ac_word=$2
1219 echo "$as_me:1219: checking for $ac_word" >&5
1220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1221 if test "${ac_cv_prog_GREP+set}" = set; then
1222 echo $ECHO_N "(cached) $ECHO_C" >&6
1224 if test -n "$GREP"; then
1225 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1227 ac_save_IFS=$IFS; IFS=$ac_path_separator
1229 for ac_dir in $ac_dummy; do
1231 test -z "$ac_dir" && ac_dir=.
1232 $as_executable_p "$ac_dir/$ac_word" || continue
1233 ac_cv_prog_GREP="$ac_prog"
1234 echo "$as_me:1234: found $ac_dir/$ac_word" >&5
1240 GREP=$ac_cv_prog_GREP
1241 if test -n "$GREP"; then
1242 echo "$as_me:1242: result: $GREP" >&5
1243 echo "${ECHO_T}$GREP" >&6
1245 echo "$as_me:1245: result: no" >&5
1246 echo "${ECHO_T}no" >&6
1249 test -n "$GREP" && break
1251 test -n "$GREP" || GREP=": "
1253 echo "$as_me:1253: checking for fgrep" >&5
1254 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1255 if test "${ac_cv_path_FGREP+set}" = set; then
1256 echo $ECHO_N "(cached) $ECHO_C" >&6
1258 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1259 then ac_cv_path_FGREP="$GREP -F"
1261 for ac_prog in gfgrep fgrep
1263 # Extract the first word of "$ac_prog", so it can be a program name with args.
1264 set dummy $ac_prog; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_path_FGREP+set}" = set; then
1268 echo $ECHO_N "(cached) $ECHO_C" >&6
1272 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1275 ac_save_IFS=$IFS; IFS=$ac_path_separator
1277 for ac_dir in $ac_dummy; do
1279 test -z "$ac_dir" && ac_dir=.
1280 if $as_executable_p "$ac_dir/$ac_word"; then
1281 ac_cv_path_FGREP="$ac_dir/$ac_word"
1282 echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1290 FGREP=$ac_cv_path_FGREP
1292 if test -n "$FGREP"; then
1293 echo "$as_me:1293: result: $FGREP" >&5
1294 echo "${ECHO_T}$FGREP" >&6
1296 echo "$as_me:1296: result: no" >&5
1297 echo "${ECHO_T}no" >&6
1300 test -n "$FGREP" && break
1302 test -n "$FGREP" || FGREP=": "
1304 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1304: error: cannot find workable fgrep" >&5
1305 echo "$as_me: error: cannot find workable fgrep" >&2;}
1306 { (exit 1); exit 1; }; }
1309 echo "$as_me:1309: result: $ac_cv_path_FGREP" >&5
1310 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1311 FGREP="$ac_cv_path_FGREP"
1313 echo "$as_me:1313: checking for prefix" >&5
1314 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1315 if test "x$prefix" = "xNONE" ; then
1316 case "$cf_cv_system_name" in
1317 # non-vendor systems don't have a conflict
1318 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1321 (*) prefix=$ac_default_prefix
1325 echo "$as_me:1325: result: $prefix" >&5
1326 echo "${ECHO_T}$prefix" >&6
1328 if test "x$prefix" = "xNONE" ; then
1329 echo "$as_me:1329: checking for default include-directory" >&5
1330 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1331 test -n "$verbose" && echo 1>&6
1334 "$includedir/ncurses" \
1336 "$prefix/include/ncurses" \
1337 /usr/local/include \
1338 /usr/local/include/ncurses \
1340 /usr/include/ncurses
1342 cf_dir=`eval echo "$cf_symbol"`
1343 if test -f "$cf_dir/curses.h" ; then
1344 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1345 includedir="$cf_symbol"
1346 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1350 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1352 echo "$as_me:1352: result: $includedir" >&5
1353 echo "${ECHO_T}$includedir" >&6
1356 ### Checks for programs.
1359 ac_cpp='$CPP $CPPFLAGS'
1360 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1361 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363 ac_main_return="return"
1364 if test -n "$ac_tool_prefix"; then
1365 for ac_prog in gnatgcc gcc cc
1367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1368 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1369 echo "$as_me:1369: checking for $ac_word" >&5
1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371 if test "${ac_cv_prog_CC+set}" = set; then
1372 echo $ECHO_N "(cached) $ECHO_C" >&6
1374 if test -n "$CC"; then
1375 ac_cv_prog_CC="$CC" # Let the user override the test.
1377 ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 for ac_dir in $ac_dummy; do
1381 test -z "$ac_dir" && ac_dir=.
1382 $as_executable_p "$ac_dir/$ac_word" || continue
1383 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1384 echo "$as_me:1384: found $ac_dir/$ac_word" >&5
1391 if test -n "$CC"; then
1392 echo "$as_me:1392: result: $CC" >&5
1393 echo "${ECHO_T}$CC" >&6
1395 echo "$as_me:1395: result: no" >&5
1396 echo "${ECHO_T}no" >&6
1399 test -n "$CC" && break
1402 if test -z "$CC"; then
1404 for ac_prog in gnatgcc gcc cc
1406 # Extract the first word of "$ac_prog", so it can be a program name with args.
1407 set dummy $ac_prog; ac_word=$2
1408 echo "$as_me:1408: checking for $ac_word" >&5
1409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1411 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 if test -n "$ac_ct_CC"; then
1414 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1416 ac_save_IFS=$IFS; IFS=$ac_path_separator
1418 for ac_dir in $ac_dummy; do
1420 test -z "$ac_dir" && ac_dir=.
1421 $as_executable_p "$ac_dir/$ac_word" || continue
1422 ac_cv_prog_ac_ct_CC="$ac_prog"
1423 echo "$as_me:1423: found $ac_dir/$ac_word" >&5
1429 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1430 if test -n "$ac_ct_CC"; then
1431 echo "$as_me:1431: result: $ac_ct_CC" >&5
1432 echo "${ECHO_T}$ac_ct_CC" >&6
1434 echo "$as_me:1434: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1438 test -n "$ac_ct_CC" && break
1444 test -z "$CC" && { { echo "$as_me:1444: error: no acceptable cc found in \$PATH" >&5
1445 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1446 { (exit 1); exit 1; }; }
1448 # Provide some information about the compiler.
1449 echo "$as_me:1449:" \
1450 "checking for C compiler version" >&5
1451 ac_compiler=`set X $ac_compile; echo "$2"`
1452 { (eval echo "$as_me:1452: \"$ac_compiler --version </dev/null >&5\"") >&5
1453 (eval $ac_compiler --version </dev/null >&5) 2>&5
1455 echo "$as_me:1455: \$? = $ac_status" >&5
1456 (exit "$ac_status"); }
1457 { (eval echo "$as_me:1457: \"$ac_compiler -v </dev/null >&5\"") >&5
1458 (eval $ac_compiler -v </dev/null >&5) 2>&5
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit "$ac_status"); }
1462 { (eval echo "$as_me:1462: \"$ac_compiler -V </dev/null >&5\"") >&5
1463 (eval $ac_compiler -V </dev/null >&5) 2>&5
1465 echo "$as_me:1465: \$? = $ac_status" >&5
1466 (exit "$ac_status"); }
1468 cat >"conftest.$ac_ext" <<_ACEOF
1469 #line 1469 "configure"
1470 #include "confdefs.h"
1480 ac_clean_files_save=$ac_clean_files
1481 ac_clean_files="$ac_clean_files a.out a.exe"
1482 # Try to create an executable without -o first, disregard a.out.
1483 # It will help us diagnose broken compilers, and finding out an intuition
1485 echo "$as_me:1485: checking for C compiler default output" >&5
1486 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1487 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1488 if { (eval echo "$as_me:1488: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1491 echo "$as_me:1491: \$? = $ac_status" >&5
1492 (exit "$ac_status"); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1496 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1497 ls a.out conftest 2>/dev/null;
1498 ls a.* conftest.* 2>/dev/null`; do
1500 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1501 a.out ) # We found the default executable, but exeext='' is most
1504 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1505 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512 echo "$as_me: failed program was:" >&5
1513 cat "conftest.$ac_ext" >&5
1514 { { echo "$as_me:1514: error: C compiler cannot create executables" >&5
1515 echo "$as_me: error: C compiler cannot create executables" >&2;}
1516 { (exit 77); exit 77; }; }
1519 ac_exeext=$ac_cv_exeext
1520 echo "$as_me:1520: result: $ac_file" >&5
1521 echo "${ECHO_T}$ac_file" >&6
1523 # Check the compiler produces executables we can run. If not, either
1524 # the compiler is broken, or we cross compile.
1525 echo "$as_me:1525: checking whether the C compiler works" >&5
1526 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1527 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1528 # If not cross compiling, check that we can run a simple program.
1529 if test "$cross_compiling" != yes; then
1530 if { ac_try='./$ac_file'
1531 { (eval echo "$as_me:1531: \"$ac_try\"") >&5
1534 echo "$as_me:1534: \$? = $ac_status" >&5
1535 (exit "$ac_status"); }; }; then
1538 if test "$cross_compiling" = maybe; then
1541 { { echo "$as_me:1541: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&5
1543 echo "$as_me: error: cannot run C compiled programs.
1544 If you meant to cross compile, use \`--host'." >&2;}
1545 { (exit 1); exit 1; }; }
1549 echo "$as_me:1549: result: yes" >&5
1550 echo "${ECHO_T}yes" >&6
1552 rm -f a.out a.exe "conftest$ac_cv_exeext"
1553 ac_clean_files=$ac_clean_files_save
1554 # Check the compiler produces executables we can run. If not, either
1555 # the compiler is broken, or we cross compile.
1556 echo "$as_me:1556: checking whether we are cross compiling" >&5
1557 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1558 echo "$as_me:1558: result: $cross_compiling" >&5
1559 echo "${ECHO_T}$cross_compiling" >&6
1561 echo "$as_me:1561: checking for executable suffix" >&5
1562 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1563 if { (eval echo "$as_me:1563: \"$ac_link\"") >&5
1564 (eval $ac_link) 2>&5
1566 echo "$as_me:1566: \$? = $ac_status" >&5
1567 (exit "$ac_status"); }; then
1568 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1569 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1570 # work properly (i.e., refer to `conftest.exe'), while it won't with
1572 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1575 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582 { { echo "$as_me:1582: error: cannot compute EXEEXT: cannot compile and link" >&5
1583 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1584 { (exit 1); exit 1; }; }
1587 rm -f "conftest$ac_cv_exeext"
1588 echo "$as_me:1588: result: $ac_cv_exeext" >&5
1589 echo "${ECHO_T}$ac_cv_exeext" >&6
1591 rm -f "conftest.$ac_ext"
1592 EXEEXT=$ac_cv_exeext
1594 echo "$as_me:1594: checking for object suffix" >&5
1595 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1596 if test "${ac_cv_objext+set}" = set; then
1597 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 cat >"conftest.$ac_ext" <<_ACEOF
1600 #line 1600 "configure"
1601 #include "confdefs.h"
1611 rm -f conftest.o conftest.obj
1612 if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5
1613 (eval $ac_compile) 2>&5
1615 echo "$as_me:1615: \$? = $ac_status" >&5
1616 (exit "$ac_status"); }; then
1617 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1619 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1620 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1625 echo "$as_me: failed program was:" >&5
1626 cat "conftest.$ac_ext" >&5
1627 { { echo "$as_me:1627: error: cannot compute OBJEXT: cannot compile" >&5
1628 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1629 { (exit 1); exit 1; }; }
1632 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1634 echo "$as_me:1634: result: $ac_cv_objext" >&5
1635 echo "${ECHO_T}$ac_cv_objext" >&6
1636 OBJEXT=$ac_cv_objext
1638 echo "$as_me:1638: checking whether we are using the GNU C compiler" >&5
1639 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1640 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1641 echo $ECHO_N "(cached) $ECHO_C" >&6
1643 cat >"conftest.$ac_ext" <<_ACEOF
1644 #line 1644 "configure"
1645 #include "confdefs.h"
1658 rm -f "conftest.$ac_objext"
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit "$ac_status"); } &&
1664 { ac_try='test -s "conftest.$ac_objext"'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit "$ac_status"); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat "conftest.$ac_ext" >&5
1676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1677 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1680 echo "$as_me:1680: result: $ac_cv_c_compiler_gnu" >&5
1681 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1682 GCC=`test $ac_compiler_gnu = yes && echo yes`
1683 ac_test_CFLAGS=${CFLAGS+set}
1684 ac_save_CFLAGS=$CFLAGS
1686 echo "$as_me:1686: checking whether $CC accepts -g" >&5
1687 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1688 if test "${ac_cv_prog_cc_g+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >"conftest.$ac_ext" <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1703 rm -f "conftest.$ac_objext"
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705 (eval $ac_compile) 2>&5
1707 echo "$as_me:1707: \$? = $ac_status" >&5
1708 (exit "$ac_status"); } &&
1709 { ac_try='test -s "conftest.$ac_objext"'
1710 { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit "$ac_status"); }; }; then
1717 echo "$as_me: failed program was:" >&5
1718 cat "conftest.$ac_ext" >&5
1721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1723 echo "$as_me:1723: result: $ac_cv_prog_cc_g" >&5
1724 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1725 if test "$ac_test_CFLAGS" = set; then
1726 CFLAGS=$ac_save_CFLAGS
1727 elif test $ac_cv_prog_cc_g = yes; then
1728 if test "$GCC" = yes; then
1734 if test "$GCC" = yes; then
1740 # Some people use a C++ compiler to compile C. Since we use `exit',
1741 # in C++ we need to declare it. In case someone uses the same compiler
1742 # for both compiling C and C++ we need to have the C++ compiler decide
1743 # the declaration of exit, since it's the most demanding environment.
1744 cat >"conftest.$ac_ext" <<_ACEOF
1749 rm -f "conftest.$ac_objext"
1750 if { (eval echo "$as_me:1750: \"$ac_compile\"") >&5
1751 (eval $ac_compile) 2>&5
1753 echo "$as_me:1753: \$? = $ac_status" >&5
1754 (exit "$ac_status"); } &&
1755 { ac_try='test -s "conftest.$ac_objext"'
1756 { (eval echo "$as_me:1756: \"$ac_try\"") >&5
1759 echo "$as_me:1759: \$? = $ac_status" >&5
1760 (exit "$ac_status"); }; }; then
1761 for ac_declaration in \
1763 '#include <stdlib.h>' \
1764 'extern "C" void std::exit (int) throw (); using std::exit;' \
1765 'extern "C" void std::exit (int); using std::exit;' \
1766 'extern "C" void exit (int) throw ();' \
1767 'extern "C" void exit (int);' \
1770 cat >"conftest.$ac_ext" <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1783 rm -f "conftest.$ac_objext"
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit "$ac_status"); } &&
1789 { ac_try='test -s "conftest.$ac_objext"'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit "$ac_status"); }; }; then
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1802 cat >"conftest.$ac_ext" <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1814 rm -f "conftest.$ac_objext"
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816 (eval $ac_compile) 2>&5
1818 echo "$as_me:1818: \$? = $ac_status" >&5
1819 (exit "$ac_status"); } &&
1820 { ac_try='test -s "conftest.$ac_objext"'
1821 { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1824 echo "$as_me:1824: \$? = $ac_status" >&5
1825 (exit "$ac_status"); }; }; then
1828 echo "$as_me: failed program was:" >&5
1829 cat "conftest.$ac_ext" >&5
1831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1834 if test -n "$ac_declaration"; then
1835 echo '#ifdef __cplusplus' >>confdefs.h
1836 echo "$ac_declaration" >>confdefs.h
1837 echo '#endif' >>confdefs.h
1841 echo "$as_me: failed program was:" >&5
1842 cat "conftest.$ac_ext" >&5
1844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 ac_cpp='$CPP $CPPFLAGS'
1847 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1848 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1850 ac_main_return="return"
1853 if test "$GCC" = yes ; then
1854 echo "$as_me:1854: checking version of $CC" >&5
1855 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1856 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1857 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1858 echo "$as_me:1858: result: $GCC_VERSION" >&5
1859 echo "${ECHO_T}$GCC_VERSION" >&6
1864 if test "$GCC" = yes ; then
1867 echo "$as_me:1867: checking if this is really Intel C compiler" >&5
1868 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1869 cf_save_CFLAGS="$CFLAGS"
1870 CFLAGS="$CFLAGS -no-gcc"
1871 cat >"conftest.$ac_ext" <<_ACEOF
1872 #line 1872 "configure"
1873 #include "confdefs.h"
1879 #ifdef __INTEL_COMPILER
1888 rm -f "conftest.$ac_objext"
1889 if { (eval echo "$as_me:1889: \"$ac_compile\"") >&5
1890 (eval $ac_compile) 2>&5
1892 echo "$as_me:1892: \$? = $ac_status" >&5
1893 (exit "$ac_status"); } &&
1894 { ac_try='test -s "conftest.$ac_objext"'
1895 { (eval echo "$as_me:1895: \"$ac_try\"") >&5
1898 echo "$as_me:1898: \$? = $ac_status" >&5
1899 (exit "$ac_status"); }; }; then
1901 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1904 echo "$as_me: failed program was:" >&5
1905 cat "conftest.$ac_ext" >&5
1907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1908 CFLAGS="$cf_save_CFLAGS"
1909 echo "$as_me:1909: result: $INTEL_COMPILER" >&5
1910 echo "${ECHO_T}$INTEL_COMPILER" >&6
1917 if test "$GCC" = yes ; then
1918 echo "$as_me:1918: checking if this is really Clang C compiler" >&5
1919 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1920 cf_save_CFLAGS="$CFLAGS"
1921 cat >"conftest.$ac_ext" <<_ACEOF
1922 #line 1922 "configure"
1923 #include "confdefs.h"
1938 rm -f "conftest.$ac_objext"
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940 (eval $ac_compile) 2>&5
1942 echo "$as_me:1942: \$? = $ac_status" >&5
1943 (exit "$ac_status"); } &&
1944 { ac_try='test -s "conftest.$ac_objext"'
1945 { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1948 echo "$as_me:1948: \$? = $ac_status" >&5
1949 (exit "$ac_status"); }; }; then
1953 echo "$as_me: failed program was:" >&5
1954 cat "conftest.$ac_ext" >&5
1956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1957 CFLAGS="$cf_save_CFLAGS"
1958 echo "$as_me:1958: result: $CLANG_COMPILER" >&5
1959 echo "${ECHO_T}$CLANG_COMPILER" >&6
1964 if test "x$CLANG_COMPILER" = "xyes" ; then
1966 (c[1-9][0-9]|*/c[1-9][0-9])
1967 { echo "$as_me:1967: WARNING: replacing broken compiler alias $CC" >&5
1968 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1969 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1974 echo "$as_me:1974: checking version of $CC" >&5
1975 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1976 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1977 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1978 echo "$as_me:1978: result: $CLANG_VERSION" >&5
1979 echo "${ECHO_T}$CLANG_VERSION" >&6
1981 for cf_clang_opt in \
1982 -Qunused-arguments \
1983 -Wno-error=implicit-function-declaration
1985 echo "$as_me:1985: checking if option $cf_clang_opt works" >&5
1986 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1987 cf_save_CFLAGS="$CFLAGS"
1988 CFLAGS="$CFLAGS $cf_clang_opt"
1989 cat >"conftest.$ac_ext" <<_ACEOF
1990 #line 1990 "configure"
1991 #include "confdefs.h"
1998 printf("hello!\\n");
2003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2004 if { (eval echo "$as_me:2004: \"$ac_link\"") >&5
2005 (eval $ac_link) 2>&5
2007 echo "$as_me:2007: \$? = $ac_status" >&5
2008 (exit "$ac_status"); } &&
2009 { ac_try='test -s "conftest$ac_exeext"'
2010 { (eval echo "$as_me:2010: \"$ac_try\"") >&5
2013 echo "$as_me:2013: \$? = $ac_status" >&5
2014 (exit "$ac_status"); }; }; then
2018 echo "$as_me: failed program was:" >&5
2019 cat "conftest.$ac_ext" >&5
2023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2024 echo "$as_me:2024: result: $cf_clang_optok" >&5
2025 echo "${ECHO_T}$cf_clang_optok" >&6
2026 CFLAGS="$cf_save_CFLAGS"
2027 if test "$cf_clang_optok" = yes; then
2028 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2030 echo "${as_me:-configure}:2030: testing adding option $cf_clang_opt ..." 1>&5
2032 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2033 CFLAGS="${CFLAGS}$cf_clang_opt"
2039 echo "$as_me:2039: checking for $CC option to accept ANSI C" >&5
2040 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2041 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2042 echo $ECHO_N "(cached) $ECHO_C" >&6
2044 ac_cv_prog_cc_stdc=no
2046 cat >"conftest.$ac_ext" <<_ACEOF
2047 #line 2047 "configure"
2048 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #include <sys/stat.h>
2053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2054 struct buf { int x; };
2055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2056 static char *e (char **p, int 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 cf_build_cppflags=$BUILD_CPPFLAGS
4299 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
4300 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4302 if test "$cross_compiling" = yes; then
4303 cf_ok_build_cc=unknown
4305 cat >"conftest.$ac_ext" <<_ACEOF
4306 #line 4306 "configure"
4307 #include "confdefs.h"
4309 int main(int argc, char *argv[])
4311 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4315 rm -f "conftest$ac_exeext"
4316 if { (eval echo "$as_me:4316: \"$ac_link\"") >&5
4317 (eval $ac_link) 2>&5
4319 echo "$as_me:4319: \$? = $ac_status" >&5
4320 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4321 { (eval echo "$as_me:4321: \"$ac_try\"") >&5
4324 echo "$as_me:4324: \$? = $ac_status" >&5
4325 (exit "$ac_status"); }; }; then
4328 echo "$as_me: program exited with status $ac_status" >&5
4329 echo "$as_me: failed program was:" >&5
4330 cat "conftest.$ac_ext" >&5
4333 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4336 cross_compiling=$cf_save_crossed
4337 ac_link=$cf_save_ac_link
4339 echo "$as_me:4339: result: $cf_ok_build_cc" >&5
4340 echo "${ECHO_T}$cf_ok_build_cc" >&6
4342 if test "$cf_ok_build_cc" != yes
4344 { { echo "$as_me:4344: error: Cross-build requires two compilers.
4345 Use --with-build-cc to specify the native compiler." >&5
4346 echo "$as_me: error: Cross-build requires two compilers.
4347 Use --with-build-cc to specify the native compiler." >&2;}
4348 { (exit 1); exit 1; }; }
4352 : ${BUILD_CC:='${CC}'}
4353 : ${BUILD_CPP:='${CPP}'}
4354 : ${BUILD_CFLAGS:='${CFLAGS}'}
4355 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4356 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4357 : ${BUILD_LIBS:='${LIBS}'}
4358 : ${BUILD_EXEEXT:='$x'}
4359 : ${BUILD_OBJEXT:='o'}
4362 ###############################################################################
4364 ### Options to allow the user to specify the set of libraries which are used.
4365 ### Use "--without-normal --with-shared" to allow the default model to be
4366 ### shared, for example.
4369 echo "$as_me:4369: checking if you want to build shared C-objects" >&5
4370 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4372 # Check whether --with-shared or --without-shared was given.
4373 if test "${with_shared+set}" = set; then
4374 withval="$with_shared"
4375 with_shared=$withval
4379 echo "$as_me:4379: result: $with_shared" >&5
4380 echo "${ECHO_T}$with_shared" >&6
4381 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4383 echo "$as_me:4383: checking for specified models" >&5
4384 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4385 test -z "$cf_list_models" && cf_list_models=normal
4386 echo "$as_me:4386: result: $cf_list_models" >&5
4387 echo "${ECHO_T}$cf_list_models" >&6
4389 ### Use the first model as the default, and save its suffix for use in building
4390 ### up test-applications.
4391 echo "$as_me:4391: checking for default model" >&5
4392 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4393 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4394 echo "$as_me:4394: result: $DFT_LWR_MODEL" >&5
4395 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4397 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4399 echo "$as_me:4399: checking for specific curses-directory" >&5
4400 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4402 # Check whether --with-curses-dir or --without-curses-dir was given.
4403 if test "${with_curses_dir+set}" = set; then
4404 withval="$with_curses_dir"
4405 cf_cv_curses_dir=$withval
4409 echo "$as_me:4409: result: $cf_cv_curses_dir" >&5
4410 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4412 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4415 if test "x$prefix" != xNONE; then
4416 cf_path_syntax="$prefix"
4418 cf_path_syntax="$ac_default_prefix"
4426 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4428 (.\$\{*prefix\}*|.\$\{*dir\}*)
4429 eval withval="$withval"
4432 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4437 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4440 { { echo "$as_me:4440: error: expected a pathname, not \"$withval\"" >&5
4441 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4442 { (exit 1); exit 1; }; }
4446 if test -d "$cf_cv_curses_dir"
4449 if test -n "$cf_cv_curses_dir/include" ; then
4450 for cf_add_incdir in $cf_cv_curses_dir/include
4452 while test "$cf_add_incdir" != /usr/include
4454 if test -d "$cf_add_incdir"
4457 if test -n "$CFLAGS$CPPFLAGS" ; then
4458 # a loop is needed to ensure we can add subdirs of existing dirs
4459 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4460 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4461 cf_have_incdir=yes; break
4466 if test "$cf_have_incdir" = no ; then
4467 if test "$cf_add_incdir" = /usr/local/include ; then
4468 if test "$GCC" = yes
4470 cf_save_CPPFLAGS=$CPPFLAGS
4472 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4473 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4475 cat >"conftest.$ac_ext" <<_ACEOF
4476 #line 4476 "configure"
4477 #include "confdefs.h"
4487 rm -f "conftest.$ac_objext"
4488 if { (eval echo "$as_me:4488: \"$ac_compile\"") >&5
4489 (eval $ac_compile) 2>&5
4491 echo "$as_me:4491: \$? = $ac_status" >&5
4492 (exit "$ac_status"); } &&
4493 { ac_try='test -s "conftest.$ac_objext"'
4494 { (eval echo "$as_me:4494: \"$ac_try\"") >&5
4497 echo "$as_me:4497: \$? = $ac_status" >&5
4498 (exit "$ac_status"); }; }; then
4501 echo "$as_me: failed program was:" >&5
4502 cat "conftest.$ac_ext" >&5
4505 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4506 CPPFLAGS=$cf_save_CPPFLAGS
4511 if test "$cf_have_incdir" = no ; then
4512 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4514 echo "${as_me:-configure}:4514: testing adding $cf_add_incdir to include-path ..." 1>&5
4516 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4518 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4519 test "$cf_top_incdir" = "$cf_add_incdir" && break
4520 cf_add_incdir="$cf_top_incdir"
4531 if test -n "$cf_cv_curses_dir/lib" ; then
4532 for cf_add_libdir in $cf_cv_curses_dir/lib
4534 if test "$cf_add_libdir" = /usr/lib ; then
4536 elif test -d "$cf_add_libdir"
4539 if test -n "$LDFLAGS$LIBS" ; then
4540 # a loop is needed to ensure we can add subdirs of existing dirs
4541 for cf_test_libdir in $LDFLAGS $LIBS ; do
4542 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4543 cf_have_libdir=yes; break
4547 if test "$cf_have_libdir" = no ; then
4548 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4550 echo "${as_me:-configure}:4550: testing adding $cf_add_libdir to library-path ..." 1>&5
4552 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4561 cf_ncuconfig_root=ncurses
4562 cf_have_ncuconfig=no
4564 if test "x${PKG_CONFIG:=none}" != xnone; then
4565 echo "$as_me:4565: checking pkg-config for $cf_ncuconfig_root" >&5
4566 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4567 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4568 echo "$as_me:4568: result: yes" >&5
4569 echo "${ECHO_T}yes" >&6
4571 echo "$as_me:4571: checking if the $cf_ncuconfig_root package files work" >&5
4572 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4573 cf_have_ncuconfig=unknown
4575 cf_save_CFLAGS="$CFLAGS"
4576 cf_save_CPPFLAGS="$CPPFLAGS"
4577 cf_save_LIBS="$LIBS"
4579 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4580 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4582 # while -W for passing linker flags is prevalent, it is not "standard".
4583 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4584 # incompatible _and_ non-standard -W option which gives an error. Work
4585 # around that pitfall.
4586 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4592 cf_new_extra_cppflags=
4594 for cf_add_cflags in $cf_pkg_cflags
4596 case "$cf_fix_cppflags" in
4598 case "$cf_add_cflags" in
4599 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4600 case "$cf_add_cflags" in
4602 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4604 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4605 && test -z "${cf_tst_cflags}" \
4606 && cf_fix_cppflags=yes
4608 if test "$cf_fix_cppflags" = yes ; then
4610 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4611 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4614 elif test "${cf_tst_cflags}" = "\"'" ; then
4616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4627 case "$cf_add_cflags" in
4629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4631 CPPFLAGS=`echo "$CPPFLAGS" | \
4632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4638 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4639 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4646 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4647 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4654 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4655 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4657 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4659 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4660 && test -z "${cf_tst_cflags}" \
4661 && cf_fix_cppflags=no
4666 if test -n "$cf_new_cflags" ; then
4668 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4669 CFLAGS="${CFLAGS}$cf_new_cflags"
4673 if test -n "$cf_new_cppflags" ; then
4675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4676 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4680 if test -n "$cf_new_extra_cppflags" ; then
4682 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4683 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4690 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4692 for cf_add_1lib in $cf_add_0lib; do
4693 for cf_add_2lib in $cf_add_libs; do
4694 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4699 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4703 cat >"conftest.$ac_ext" <<_ACEOF
4704 #line 4704 "configure"
4705 #include "confdefs.h"
4706 #include <${cf_cv_ncurses_header:-curses.h}>
4710 initscr(); mousemask(0,0); tigetstr((char *)0);
4715 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4716 if { (eval echo "$as_me:4716: \"$ac_link\"") >&5
4717 (eval $ac_link) 2>&5
4719 echo "$as_me:4719: \$? = $ac_status" >&5
4720 (exit "$ac_status"); } &&
4721 { ac_try='test -s "conftest$ac_exeext"'
4722 { (eval echo "$as_me:4722: \"$ac_try\"") >&5
4725 echo "$as_me:4725: \$? = $ac_status" >&5
4726 (exit "$ac_status"); }; }; then
4727 if test "$cross_compiling" = yes; then
4728 cf_test_ncuconfig=maybe
4730 cat >"conftest.$ac_ext" <<_ACEOF
4731 #line 4731 "configure"
4732 #include "confdefs.h"
4733 #include <${cf_cv_ncurses_header:-curses.h}>
4735 { const char *xx = curses_version(); return (xx == 0); }
4737 rm -f "conftest$ac_exeext"
4738 if { (eval echo "$as_me:4738: \"$ac_link\"") >&5
4739 (eval $ac_link) 2>&5
4741 echo "$as_me:4741: \$? = $ac_status" >&5
4742 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4743 { (eval echo "$as_me:4743: \"$ac_try\"") >&5
4746 echo "$as_me:4746: \$? = $ac_status" >&5
4747 (exit "$ac_status"); }; }; then
4748 cf_test_ncuconfig=yes
4750 echo "$as_me: program exited with status $ac_status" >&5
4751 echo "$as_me: failed program was:" >&5
4752 cat "conftest.$ac_ext" >&5
4753 cf_test_ncuconfig=no
4755 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4758 echo "$as_me: failed program was:" >&5
4759 cat "conftest.$ac_ext" >&5
4760 cf_test_ncuconfig=no
4762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4764 CFLAGS="$cf_save_CFLAGS"
4765 CPPFLAGS="$cf_save_CPPFLAGS"
4766 LIBS="$cf_save_LIBS"
4768 if test "x$cf_test_ncuconfig" != xyes; then
4769 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4770 cf_pkg_cflags="$cf_temp"
4771 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4772 cf_pkg_libs="$cf_temp"
4777 for cf_add_cflags in $cf_pkg_cflags
4779 case "x$cf_add_cflags" in
4782 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4785 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4786 test "$CFLAGS" != "$cf_old_cflag" || break
4788 CFLAGS="$cf_old_cflag"
4791 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4794 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4795 test "$CPPFLAGS" != "$cf_old_cflag" || break
4797 CPPFLAGS="$cf_old_cflag"
4806 cf_new_extra_cppflags=
4808 for cf_add_cflags in $cf_add_cflags
4810 case "$cf_fix_cppflags" in
4812 case "$cf_add_cflags" in
4813 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4814 case "$cf_add_cflags" in
4816 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4818 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4819 && test -z "${cf_tst_cflags}" \
4820 && cf_fix_cppflags=yes
4822 if test "$cf_fix_cppflags" = yes ; then
4824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4828 elif test "${cf_tst_cflags}" = "\"'" ; then
4830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4841 case "$cf_add_cflags" in
4843 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4845 CPPFLAGS=`echo "$CPPFLAGS" | \
4846 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4847 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4852 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4853 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4860 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4861 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4868 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4869 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4871 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4873 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4874 && test -z "${cf_tst_cflags}" \
4875 && cf_fix_cppflags=no
4880 if test -n "$cf_new_cflags" ; then
4882 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4883 CFLAGS="${CFLAGS}$cf_new_cflags"
4887 if test -n "$cf_new_cppflags" ; then
4889 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4890 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4894 if test -n "$cf_new_extra_cppflags" ; then
4896 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4897 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4906 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4908 for cf_add_1lib in $cf_add_0lib; do
4909 for cf_add_2lib in $cf_add_libs; do
4910 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4915 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4919 cat >"conftest.$ac_ext" <<_ACEOF
4920 #line 4920 "configure"
4921 #include "confdefs.h"
4922 #include <${cf_cv_ncurses_header:-curses.h}>
4926 initscr(); mousemask(0,0); tigetstr((char *)0);
4931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4932 if { (eval echo "$as_me:4932: \"$ac_link\"") >&5
4933 (eval $ac_link) 2>&5
4935 echo "$as_me:4935: \$? = $ac_status" >&5
4936 (exit "$ac_status"); } &&
4937 { ac_try='test -s "conftest$ac_exeext"'
4938 { (eval echo "$as_me:4938: \"$ac_try\"") >&5
4941 echo "$as_me:4941: \$? = $ac_status" >&5
4942 (exit "$ac_status"); }; }; then
4943 if test "$cross_compiling" = yes; then
4944 cf_have_ncuconfig=maybe
4946 cat >"conftest.$ac_ext" <<_ACEOF
4947 #line 4947 "configure"
4948 #include "confdefs.h"
4949 #include <${cf_cv_ncurses_header:-curses.h}>
4951 { const char *xx = curses_version(); return (xx == 0); }
4953 rm -f "conftest$ac_exeext"
4954 if { (eval echo "$as_me:4954: \"$ac_link\"") >&5
4955 (eval $ac_link) 2>&5
4957 echo "$as_me:4957: \$? = $ac_status" >&5
4958 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4959 { (eval echo "$as_me:4959: \"$ac_try\"") >&5
4962 echo "$as_me:4962: \$? = $ac_status" >&5
4963 (exit "$ac_status"); }; }; then
4964 cf_have_ncuconfig=yes
4966 echo "$as_me: program exited with status $ac_status" >&5
4967 echo "$as_me: failed program was:" >&5
4968 cat "conftest.$ac_ext" >&5
4969 cf_have_ncuconfig=no
4971 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4974 echo "$as_me: failed program was:" >&5
4975 cat "conftest.$ac_ext" >&5
4976 cf_have_ncuconfig=no
4978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4979 echo "$as_me:4979: result: $cf_have_ncuconfig" >&5
4980 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4981 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4982 if test "$cf_have_ncuconfig" != "yes"
4984 CPPFLAGS="$cf_save_CPPFLAGS"
4985 LIBS="$cf_save_LIBS"
4986 NCURSES_CONFIG_PKG=none
4989 cat >>confdefs.h <<\EOF
4993 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4995 echo "$as_me:4995: checking for terminfo header" >&5
4996 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4997 if test "${cf_cv_term_header+set}" = set; then
4998 echo $ECHO_N "(cached) $ECHO_C" >&6
5001 case "${cf_cv_ncurses_header}" in
5002 (*/ncurses.h|*/ncursesw.h)
5003 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5006 cf_term_header=term.h
5010 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5012 cat >"conftest.$ac_ext" <<_ACEOF
5013 #line 5013 "configure"
5014 #include "confdefs.h"
5016 #include <${cf_cv_ncurses_header:-curses.h}>
5022 int x = auto_left_margin; (void)x
5027 rm -f "conftest.$ac_objext"
5028 if { (eval echo "$as_me:5028: \"$ac_compile\"") >&5
5029 (eval $ac_compile) 2>&5
5031 echo "$as_me:5031: \$? = $ac_status" >&5
5032 (exit "$ac_status"); } &&
5033 { ac_try='test -s "conftest.$ac_objext"'
5034 { (eval echo "$as_me:5034: \"$ac_try\"") >&5
5037 echo "$as_me:5037: \$? = $ac_status" >&5
5038 (exit "$ac_status"); }; }; then
5040 cf_cv_term_header="$cf_test"
5042 echo "$as_me: failed program was:" >&5
5043 cat "conftest.$ac_ext" >&5
5045 cf_cv_term_header=unknown
5048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5049 test "$cf_cv_term_header" != unknown && break
5053 echo "$as_me:5053: result: $cf_cv_term_header" >&5
5054 echo "${ECHO_T}$cf_cv_term_header" >&6
5056 # Set definitions to allow ifdef'ing to accommodate subdirectories
5058 case "$cf_cv_term_header" in
5061 cat >>confdefs.h <<\EOF
5062 #define HAVE_TERM_H 1
5068 case "$cf_cv_term_header" in
5071 cat >>confdefs.h <<\EOF
5072 #define HAVE_NCURSES_TERM_H 1
5078 cat >>confdefs.h <<\EOF
5079 #define HAVE_NCURSESW_TERM_H 1
5088 echo "$as_me:5088: result: no" >&5
5089 echo "${ECHO_T}no" >&6
5090 NCURSES_CONFIG_PKG=none
5093 NCURSES_CONFIG_PKG=none
5096 if test "x$cf_have_ncuconfig" = "xno"; then
5097 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5099 if test -n "$ac_tool_prefix"; then
5100 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5102 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5103 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5104 echo "$as_me:5104: checking for $ac_word" >&5
5105 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5106 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5107 echo $ECHO_N "(cached) $ECHO_C" >&6
5109 if test -n "$NCURSES_CONFIG"; then
5110 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5112 ac_save_IFS=$IFS; IFS=$ac_path_separator
5114 for ac_dir in $ac_dummy; do
5116 test -z "$ac_dir" && ac_dir=.
5117 $as_executable_p "$ac_dir/$ac_word" || continue
5118 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5119 echo "$as_me:5119: found $ac_dir/$ac_word" >&5
5125 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5126 if test -n "$NCURSES_CONFIG"; then
5127 echo "$as_me:5127: result: $NCURSES_CONFIG" >&5
5128 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5130 echo "$as_me:5130: result: no" >&5
5131 echo "${ECHO_T}no" >&6
5134 test -n "$NCURSES_CONFIG" && break
5137 if test -z "$NCURSES_CONFIG"; then
5138 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5139 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5141 # Extract the first word of "$ac_prog", so it can be a program name with args.
5142 set dummy $ac_prog; ac_word=$2
5143 echo "$as_me:5143: checking for $ac_word" >&5
5144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5145 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5146 echo $ECHO_N "(cached) $ECHO_C" >&6
5148 if test -n "$ac_ct_NCURSES_CONFIG"; then
5149 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5151 ac_save_IFS=$IFS; IFS=$ac_path_separator
5153 for ac_dir in $ac_dummy; do
5155 test -z "$ac_dir" && ac_dir=.
5156 $as_executable_p "$ac_dir/$ac_word" || continue
5157 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5158 echo "$as_me:5158: found $ac_dir/$ac_word" >&5
5164 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5165 if test -n "$ac_ct_NCURSES_CONFIG"; then
5166 echo "$as_me:5166: result: $ac_ct_NCURSES_CONFIG" >&5
5167 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5169 echo "$as_me:5169: result: no" >&5
5170 echo "${ECHO_T}no" >&6
5173 test -n "$ac_ct_NCURSES_CONFIG" && break
5175 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5177 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5180 if test "$NCURSES_CONFIG" != none ; then
5182 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5184 case "x$cf_add_cflags" in
5187 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5190 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5191 test "$CFLAGS" != "$cf_old_cflag" || break
5193 CFLAGS="$cf_old_cflag"
5196 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5199 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5200 test "$CPPFLAGS" != "$cf_old_cflag" || break
5202 CPPFLAGS="$cf_old_cflag"
5211 cf_new_extra_cppflags=
5213 for cf_add_cflags in $cf_add_cflags
5215 case "$cf_fix_cppflags" in
5217 case "$cf_add_cflags" in
5218 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5219 case "$cf_add_cflags" in
5221 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5223 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5224 && test -z "${cf_tst_cflags}" \
5225 && cf_fix_cppflags=yes
5227 if test "$cf_fix_cppflags" = yes ; then
5229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5233 elif test "${cf_tst_cflags}" = "\"'" ; then
5235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5246 case "$cf_add_cflags" in
5248 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5250 CPPFLAGS=`echo "$CPPFLAGS" | \
5251 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5252 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5257 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5258 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5265 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5266 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5276 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5278 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5279 && test -z "${cf_tst_cflags}" \
5280 && cf_fix_cppflags=no
5285 if test -n "$cf_new_cflags" ; then
5287 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5288 CFLAGS="${CFLAGS}$cf_new_cflags"
5292 if test -n "$cf_new_cppflags" ; then
5294 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5295 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5299 if test -n "$cf_new_extra_cppflags" ; then
5301 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5302 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5311 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5313 for cf_add_1lib in $cf_add_0lib; do
5314 for cf_add_2lib in $cf_add_libs; do
5315 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5320 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5324 # even with config script, some packages use no-override for curses.h
5326 echo "$as_me:5326: checking if we have identified curses headers" >&5
5327 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5328 if test "${cf_cv_ncurses_header+set}" = set; then
5329 echo $ECHO_N "(cached) $ECHO_C" >&6
5332 cf_cv_ncurses_header=none
5334 ncurses.h ncurses/ncurses.h \
5335 curses.h ncurses/curses.h
5337 cat >"conftest.$ac_ext" <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5340 #include <${cf_header}>
5349 rm -f "conftest.$ac_objext"
5350 if { (eval echo "$as_me:5350: \"$ac_compile\"") >&5
5351 (eval $ac_compile) 2>&5
5353 echo "$as_me:5353: \$? = $ac_status" >&5
5354 (exit "$ac_status"); } &&
5355 { ac_try='test -s "conftest.$ac_objext"'
5356 { (eval echo "$as_me:5356: \"$ac_try\"") >&5
5359 echo "$as_me:5359: \$? = $ac_status" >&5
5360 (exit "$ac_status"); }; }; then
5361 cf_cv_ncurses_header=$cf_header; break
5363 echo "$as_me: failed program was:" >&5
5364 cat "conftest.$ac_ext" >&5
5366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5370 echo "$as_me:5370: result: $cf_cv_ncurses_header" >&5
5371 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5373 if test "$cf_cv_ncurses_header" = none ; then
5374 { { echo "$as_me:5374: error: No curses header-files found" >&5
5375 echo "$as_me: error: No curses header-files found" >&2;}
5376 { (exit 1); exit 1; }; }
5379 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5381 for ac_header in $cf_cv_ncurses_header
5383 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5384 echo "$as_me:5384: checking for $ac_header" >&5
5385 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5386 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5387 echo $ECHO_N "(cached) $ECHO_C" >&6
5389 cat >"conftest.$ac_ext" <<_ACEOF
5390 #line 5390 "configure"
5391 #include "confdefs.h"
5392 #include <$ac_header>
5394 if { (eval echo "$as_me:5394: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5395 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5397 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5399 cat conftest.err >&5
5400 echo "$as_me:5400: \$? = $ac_status" >&5
5401 (exit "$ac_status"); } >/dev/null; then
5402 if test -s conftest.err; then
5403 ac_cpp_err=$ac_c_preproc_warn_flag
5410 if test -z "$ac_cpp_err"; then
5411 eval "$as_ac_Header=yes"
5413 echo "$as_me: failed program was:" >&5
5414 cat "conftest.$ac_ext" >&5
5415 eval "$as_ac_Header=no"
5417 rm -f conftest.err "conftest.$ac_ext"
5419 echo "$as_me:5419: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5420 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5421 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5422 cat >>confdefs.h <<EOF
5423 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5429 cat >>confdefs.h <<\EOF
5433 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5435 cat >>confdefs.h <<EOF
5436 #define $cf_nculib_ROOT 1
5439 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5443 cf_ncuhdr_root=ncurses
5445 test -n "$cf_cv_curses_dir" && \
5446 test "$cf_cv_curses_dir" != "no" && { \
5448 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5449 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5451 while test "$cf_add_incdir" != /usr/include
5453 if test -d "$cf_add_incdir"
5456 if test -n "$CFLAGS$CPPFLAGS" ; then
5457 # a loop is needed to ensure we can add subdirs of existing dirs
5458 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5459 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5460 cf_have_incdir=yes; break
5465 if test "$cf_have_incdir" = no ; then
5466 if test "$cf_add_incdir" = /usr/local/include ; then
5467 if test "$GCC" = yes
5469 cf_save_CPPFLAGS=$CPPFLAGS
5471 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5472 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5474 cat >"conftest.$ac_ext" <<_ACEOF
5475 #line 5475 "configure"
5476 #include "confdefs.h"
5486 rm -f "conftest.$ac_objext"
5487 if { (eval echo "$as_me:5487: \"$ac_compile\"") >&5
5488 (eval $ac_compile) 2>&5
5490 echo "$as_me:5490: \$? = $ac_status" >&5
5491 (exit "$ac_status"); } &&
5492 { ac_try='test -s "conftest.$ac_objext"'
5493 { (eval echo "$as_me:5493: \"$ac_try\"") >&5
5496 echo "$as_me:5496: \$? = $ac_status" >&5
5497 (exit "$ac_status"); }; }; then
5500 echo "$as_me: failed program was:" >&5
5501 cat "conftest.$ac_ext" >&5
5504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5505 CPPFLAGS=$cf_save_CPPFLAGS
5510 if test "$cf_have_incdir" = no ; then
5511 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5513 echo "${as_me:-configure}:5513: testing adding $cf_add_incdir to include-path ..." 1>&5
5515 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5517 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5518 test "$cf_top_incdir" = "$cf_add_incdir" && break
5519 cf_add_incdir="$cf_top_incdir"
5532 echo "$as_me:5532: checking for $cf_ncuhdr_root header in include-path" >&5
5533 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5534 if test "${cf_cv_ncurses_h+set}" = set; then
5535 echo $ECHO_N "(cached) $ECHO_C" >&6
5538 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5539 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5540 for cf_header in $cf_header_list
5543 cat >"conftest.$ac_ext" <<_ACEOF
5544 #line 5544 "configure"
5545 #include "confdefs.h"
5547 #include <$cf_header>
5552 #ifdef NCURSES_VERSION
5554 printf("%s\\n", NCURSES_VERSION);
5567 rm -f "conftest.$ac_objext"
5568 if { (eval echo "$as_me:5568: \"$ac_compile\"") >&5
5569 (eval $ac_compile) 2>&5
5571 echo "$as_me:5571: \$? = $ac_status" >&5
5572 (exit "$ac_status"); } &&
5573 { ac_try='test -s "conftest.$ac_objext"'
5574 { (eval echo "$as_me:5574: \"$ac_try\"") >&5
5577 echo "$as_me:5577: \$? = $ac_status" >&5
5578 (exit "$ac_status"); }; }; then
5579 cf_cv_ncurses_h=$cf_header
5582 echo "$as_me: failed program was:" >&5
5583 cat "conftest.$ac_ext" >&5
5586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5588 test "$cf_cv_ncurses_h" != no && break
5592 echo "$as_me:5592: result: $cf_cv_ncurses_h" >&5
5593 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5595 if test "$cf_cv_ncurses_h" != no ; then
5596 cf_cv_ncurses_header=$cf_cv_ncurses_h
5599 echo "$as_me:5599: checking for $cf_ncuhdr_root include-path" >&5
5600 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5601 if test "${cf_cv_ncurses_h2+set}" = set; then
5602 echo $ECHO_N "(cached) $ECHO_C" >&6
5605 test -n "$verbose" && echo
5609 # collect the current set of include-directories from compiler flags
5610 cf_header_path_list=""
5611 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5612 for cf_header_path in $CPPFLAGS $CFLAGS
5614 case "$cf_header_path" in
5616 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5618 test "x$cf_header_path" != "xNONE" && \
5619 test -d "$cf_header_path" && \
5621 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5622 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5623 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5624 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5625 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5626 test -d "$cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5629 cf_header_path_list="$cf_header_path_list $cf_search"
5635 # add the variations for the package we are looking for
5639 test "x$prefix" != "xNONE" && \
5640 test -d "$prefix" && \
5642 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5643 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5644 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5645 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5646 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5647 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5650 for cf_subdir_prefix in \
5659 test "x$cf_subdir_prefix" != "x$prefix" && \
5660 test -d "$cf_subdir_prefix" && \
5661 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5662 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5663 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5664 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5665 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5666 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5667 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5672 test "$includedir" != NONE && \
5673 test "$includedir" != "/usr/include" && \
5674 test -d "$includedir" && {
5675 test -d "$includedir" && cf_search="$cf_search $includedir"
5676 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5679 test "$oldincludedir" != NONE && \
5680 test "$oldincludedir" != "/usr/include" && \
5681 test -d "$oldincludedir" && {
5682 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5683 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5686 cf_search="$cf_search $cf_header_path_list"
5688 test -n "$verbose" && echo "search path $cf_search"
5689 cf_save2_CPPFLAGS="$CPPFLAGS"
5690 for cf_incdir in $cf_search
5693 if test -n "$cf_incdir" ; then
5694 for cf_add_incdir in $cf_incdir
5696 while test "$cf_add_incdir" != /usr/include
5698 if test -d "$cf_add_incdir"
5701 if test -n "$CFLAGS$CPPFLAGS" ; then
5702 # a loop is needed to ensure we can add subdirs of existing dirs
5703 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5704 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5705 cf_have_incdir=yes; break
5710 if test "$cf_have_incdir" = no ; then
5711 if test "$cf_add_incdir" = /usr/local/include ; then
5712 if test "$GCC" = yes
5714 cf_save_CPPFLAGS=$CPPFLAGS
5716 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5717 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5719 cat >"conftest.$ac_ext" <<_ACEOF
5720 #line 5720 "configure"
5721 #include "confdefs.h"
5731 rm -f "conftest.$ac_objext"
5732 if { (eval echo "$as_me:5732: \"$ac_compile\"") >&5
5733 (eval $ac_compile) 2>&5
5735 echo "$as_me:5735: \$? = $ac_status" >&5
5736 (exit "$ac_status"); } &&
5737 { ac_try='test -s "conftest.$ac_objext"'
5738 { (eval echo "$as_me:5738: \"$ac_try\"") >&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit "$ac_status"); }; }; then
5745 echo "$as_me: failed program was:" >&5
5746 cat "conftest.$ac_ext" >&5
5749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5750 CPPFLAGS=$cf_save_CPPFLAGS
5755 if test "$cf_have_incdir" = no ; then
5756 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5758 echo "${as_me:-configure}:5758: testing adding $cf_add_incdir to include-path ..." 1>&5
5760 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5762 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5763 test "$cf_top_incdir" = "$cf_add_incdir" && break
5764 cf_add_incdir="$cf_top_incdir"
5780 cat >"conftest.$ac_ext" <<_ACEOF
5781 #line 5781 "configure"
5782 #include "confdefs.h"
5784 #include <$cf_header>
5789 #ifdef NCURSES_VERSION
5791 printf("%s\\n", NCURSES_VERSION);
5804 rm -f "conftest.$ac_objext"
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806 (eval $ac_compile) 2>&5
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit "$ac_status"); } &&
5810 { ac_try='test -s "conftest.$ac_objext"'
5811 { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5814 echo "$as_me:5814: \$? = $ac_status" >&5
5815 (exit "$ac_status"); }; }; then
5816 cf_cv_ncurses_h2=$cf_header
5819 echo "$as_me: failed program was:" >&5
5820 cat "conftest.$ac_ext" >&5
5823 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5825 if test "$cf_cv_ncurses_h2" != no ; then
5826 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5827 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5830 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5832 CPPFLAGS="$cf_save2_CPPFLAGS"
5833 test "$cf_cv_ncurses_h2" != no && break
5835 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5835: error: not found" >&5
5836 echo "$as_me: error: not found" >&2;}
5837 { (exit 1); exit 1; }; }
5840 echo "$as_me:5840: result: $cf_cv_ncurses_h2" >&5
5841 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5843 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5844 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5845 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5846 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5849 if test -n "$cf_1st_incdir" ; then
5850 for cf_add_incdir in $cf_1st_incdir
5852 while test "$cf_add_incdir" != /usr/include
5854 if test -d "$cf_add_incdir"
5857 if test -n "$CFLAGS$CPPFLAGS" ; then
5858 # a loop is needed to ensure we can add subdirs of existing dirs
5859 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5860 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5861 cf_have_incdir=yes; break
5866 if test "$cf_have_incdir" = no ; then
5867 if test "$cf_add_incdir" = /usr/local/include ; then
5868 if test "$GCC" = yes
5870 cf_save_CPPFLAGS=$CPPFLAGS
5872 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5873 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5875 cat >"conftest.$ac_ext" <<_ACEOF
5876 #line 5876 "configure"
5877 #include "confdefs.h"
5887 rm -f "conftest.$ac_objext"
5888 if { (eval echo "$as_me:5888: \"$ac_compile\"") >&5
5889 (eval $ac_compile) 2>&5
5891 echo "$as_me:5891: \$? = $ac_status" >&5
5892 (exit "$ac_status"); } &&
5893 { ac_try='test -s "conftest.$ac_objext"'
5894 { (eval echo "$as_me:5894: \"$ac_try\"") >&5
5897 echo "$as_me:5897: \$? = $ac_status" >&5
5898 (exit "$ac_status"); }; }; then
5901 echo "$as_me: failed program was:" >&5
5902 cat "conftest.$ac_ext" >&5
5905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5906 CPPFLAGS=$cf_save_CPPFLAGS
5911 if test "$cf_have_incdir" = no ; then
5912 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5914 echo "${as_me:-configure}:5914: testing adding $cf_add_incdir to include-path ..." 1>&5
5916 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5918 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5919 test "$cf_top_incdir" = "$cf_add_incdir" && break
5920 cf_add_incdir="$cf_top_incdir"
5933 # Set definitions to allow ifdef'ing for ncurses.h
5935 case "$cf_cv_ncurses_header" in
5938 cat >>confdefs.h <<\EOF
5939 #define HAVE_NCURSES_H 1
5945 case "$cf_cv_ncurses_header" in
5946 (ncurses/curses.h|ncurses/ncurses.h)
5948 cat >>confdefs.h <<\EOF
5949 #define HAVE_NCURSES_NCURSES_H 1
5953 (ncursesw/curses.h|ncursesw/ncurses.h)
5955 cat >>confdefs.h <<\EOF
5956 #define HAVE_NCURSESW_NCURSES_H 1
5962 echo "$as_me:5962: checking for terminfo header" >&5
5963 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5964 if test "${cf_cv_term_header+set}" = set; then
5965 echo $ECHO_N "(cached) $ECHO_C" >&6
5968 case "${cf_cv_ncurses_header}" in
5969 (*/ncurses.h|*/ncursesw.h)
5970 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5973 cf_term_header=term.h
5977 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5979 cat >"conftest.$ac_ext" <<_ACEOF
5980 #line 5980 "configure"
5981 #include "confdefs.h"
5983 #include <${cf_cv_ncurses_header:-curses.h}>
5989 int x = auto_left_margin; (void)x
5994 rm -f "conftest.$ac_objext"
5995 if { (eval echo "$as_me:5995: \"$ac_compile\"") >&5
5996 (eval $ac_compile) 2>&5
5998 echo "$as_me:5998: \$? = $ac_status" >&5
5999 (exit "$ac_status"); } &&
6000 { ac_try='test -s "conftest.$ac_objext"'
6001 { (eval echo "$as_me:6001: \"$ac_try\"") >&5
6004 echo "$as_me:6004: \$? = $ac_status" >&5
6005 (exit "$ac_status"); }; }; then
6007 cf_cv_term_header="$cf_test"
6009 echo "$as_me: failed program was:" >&5
6010 cat "conftest.$ac_ext" >&5
6012 cf_cv_term_header=unknown
6015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6016 test "$cf_cv_term_header" != unknown && break
6020 echo "$as_me:6020: result: $cf_cv_term_header" >&5
6021 echo "${ECHO_T}$cf_cv_term_header" >&6
6023 # Set definitions to allow ifdef'ing to accommodate subdirectories
6025 case "$cf_cv_term_header" in
6028 cat >>confdefs.h <<\EOF
6029 #define HAVE_TERM_H 1
6035 case "$cf_cv_term_header" in
6038 cat >>confdefs.h <<\EOF
6039 #define HAVE_NCURSES_TERM_H 1
6045 cat >>confdefs.h <<\EOF
6046 #define HAVE_NCURSESW_TERM_H 1
6052 # some applications need this, but should check for NCURSES_VERSION
6054 cat >>confdefs.h <<\EOF
6058 echo "$as_me:6058: checking for ncurses version" >&5
6059 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6060 if test "${cf_cv_ncurses_version+set}" = set; then
6061 echo $ECHO_N "(cached) $ECHO_C" >&6
6064 cf_cv_ncurses_version=no
6066 rm -f "$cf_tempfile"
6067 if test "$cross_compiling" = yes; then
6069 # This will not work if the preprocessor splits the line after the
6070 # Autoconf token. The 'unproto' program does that.
6071 cat > "conftest.$ac_ext" <<EOF
6072 #include <${cf_cv_ncurses_header:-curses.h}>
6074 #ifdef NCURSES_VERSION
6075 Autoconf NCURSES_VERSION
6083 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6084 { (eval echo "$as_me:6084: \"$cf_try\"") >&5
6087 echo "$as_me:6087: \$? = $ac_status" >&5
6088 (exit "$ac_status"); }
6089 if test -f conftest.out ; then
6090 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6091 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6096 cat >"conftest.$ac_ext" <<_ACEOF
6097 #line 6097 "configure"
6098 #include "confdefs.h"
6100 $ac_includes_default
6102 #include <${cf_cv_ncurses_header:-curses.h}>
6106 FILE *fp = fopen("$cf_tempfile", "w");
6107 #ifdef NCURSES_VERSION
6108 # ifdef NCURSES_VERSION_PATCH
6109 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6111 fprintf(fp, "%s\\n", NCURSES_VERSION);
6115 fprintf(fp, "old\\n");
6120 ${cf_cv_main_return:-return}(0);
6123 rm -f "conftest$ac_exeext"
6124 if { (eval echo "$as_me:6124: \"$ac_link\"") >&5
6125 (eval $ac_link) 2>&5
6127 echo "$as_me:6127: \$? = $ac_status" >&5
6128 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6129 { (eval echo "$as_me:6129: \"$ac_try\"") >&5
6132 echo "$as_me:6132: \$? = $ac_status" >&5
6133 (exit "$ac_status"); }; }; then
6135 cf_cv_ncurses_version=`cat $cf_tempfile`
6137 echo "$as_me: program exited with status $ac_status" >&5
6138 echo "$as_me: failed program was:" >&5
6139 cat "conftest.$ac_ext" >&5
6141 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6143 rm -f "$cf_tempfile"
6146 echo "$as_me:6146: result: $cf_cv_ncurses_version" >&5
6147 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6148 test "$cf_cv_ncurses_version" = no ||
6149 cat >>confdefs.h <<\EOF
6153 cf_nculib_root=ncurses
6154 # This works, except for the special case where we find gpm, but
6155 # ncurses is in a nonstandard location via $LIBS, and we really want
6158 cf_ncurses_SAVE="$LIBS"
6159 echo "$as_me:6159: checking for Gpm_Open in -lgpm" >&5
6160 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6161 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6162 echo $ECHO_N "(cached) $ECHO_C" >&6
6164 ac_check_lib_save_LIBS=$LIBS
6166 cat >"conftest.$ac_ext" <<_ACEOF
6167 #line 6167 "configure"
6168 #include "confdefs.h"
6170 /* Override any gcc2 internal prototype to avoid an error. */
6174 /* We use char because int might match the return type of a gcc2
6175 builtin and then its argument prototype would still apply. */
6185 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6186 if { (eval echo "$as_me:6186: \"$ac_link\"") >&5
6187 (eval $ac_link) 2>&5
6189 echo "$as_me:6189: \$? = $ac_status" >&5
6190 (exit "$ac_status"); } &&
6191 { ac_try='test -s "conftest$ac_exeext"'
6192 { (eval echo "$as_me:6192: \"$ac_try\"") >&5
6195 echo "$as_me:6195: \$? = $ac_status" >&5
6196 (exit "$ac_status"); }; }; then
6197 ac_cv_lib_gpm_Gpm_Open=yes
6199 echo "$as_me: failed program was:" >&5
6200 cat "conftest.$ac_ext" >&5
6201 ac_cv_lib_gpm_Gpm_Open=no
6203 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6204 LIBS=$ac_check_lib_save_LIBS
6206 echo "$as_me:6206: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6207 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6208 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6209 echo "$as_me:6209: checking for initscr in -lgpm" >&5
6210 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6211 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6212 echo $ECHO_N "(cached) $ECHO_C" >&6
6214 ac_check_lib_save_LIBS=$LIBS
6216 cat >"conftest.$ac_ext" <<_ACEOF
6217 #line 6217 "configure"
6218 #include "confdefs.h"
6220 /* Override any gcc2 internal prototype to avoid an error. */
6224 /* We use char because int might match the return type of a gcc2
6225 builtin and then its argument prototype would still apply. */
6235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6236 if { (eval echo "$as_me:6236: \"$ac_link\"") >&5
6237 (eval $ac_link) 2>&5
6239 echo "$as_me:6239: \$? = $ac_status" >&5
6240 (exit "$ac_status"); } &&
6241 { ac_try='test -s "conftest$ac_exeext"'
6242 { (eval echo "$as_me:6242: \"$ac_try\"") >&5
6245 echo "$as_me:6245: \$? = $ac_status" >&5
6246 (exit "$ac_status"); }; }; then
6247 ac_cv_lib_gpm_initscr=yes
6249 echo "$as_me: failed program was:" >&5
6250 cat "conftest.$ac_ext" >&5
6251 ac_cv_lib_gpm_initscr=no
6253 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6254 LIBS=$ac_check_lib_save_LIBS
6256 echo "$as_me:6256: result: $ac_cv_lib_gpm_initscr" >&5
6257 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6258 if test "$ac_cv_lib_gpm_initscr" = yes; then
6259 LIBS="$cf_ncurses_SAVE"
6261 cf_ncurses_LIBS="-lgpm"
6268 # This is only necessary if you are linking against an obsolete
6269 # version of ncurses (but it should do no harm, since it is static).
6270 if test "$cf_nculib_root" = ncurses ; then
6271 echo "$as_me:6271: checking for tgoto in -lmytinfo" >&5
6272 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6273 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6274 echo $ECHO_N "(cached) $ECHO_C" >&6
6276 ac_check_lib_save_LIBS=$LIBS
6277 LIBS="-lmytinfo $LIBS"
6278 cat >"conftest.$ac_ext" <<_ACEOF
6279 #line 6279 "configure"
6280 #include "confdefs.h"
6282 /* Override any gcc2 internal prototype to avoid an error. */
6286 /* We use char because int might match the return type of a gcc2
6287 builtin and then its argument prototype would still apply. */
6297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6298 if { (eval echo "$as_me:6298: \"$ac_link\"") >&5
6299 (eval $ac_link) 2>&5
6301 echo "$as_me:6301: \$? = $ac_status" >&5
6302 (exit "$ac_status"); } &&
6303 { ac_try='test -s "conftest$ac_exeext"'
6304 { (eval echo "$as_me:6304: \"$ac_try\"") >&5
6307 echo "$as_me:6307: \$? = $ac_status" >&5
6308 (exit "$ac_status"); }; }; then
6309 ac_cv_lib_mytinfo_tgoto=yes
6311 echo "$as_me: failed program was:" >&5
6312 cat "conftest.$ac_ext" >&5
6313 ac_cv_lib_mytinfo_tgoto=no
6315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6316 LIBS=$ac_check_lib_save_LIBS
6318 echo "$as_me:6318: result: $ac_cv_lib_mytinfo_tgoto" >&5
6319 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6320 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6321 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6331 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6333 for cf_add_1lib in $cf_add_0lib; do
6334 for cf_add_2lib in $cf_add_libs; do
6335 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6340 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6344 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6350 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6352 for cf_add_1lib in $cf_add_0lib; do
6353 for cf_add_2lib in $cf_add_libs; do
6354 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6359 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6365 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6367 echo "$as_me:6367: checking for initscr" >&5
6368 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6369 if test "${ac_cv_func_initscr+set}" = set; then
6370 echo $ECHO_N "(cached) $ECHO_C" >&6
6372 cat >"conftest.$ac_ext" <<_ACEOF
6373 #line 6373 "configure"
6374 #include "confdefs.h"
6375 #define initscr autoconf_temporary
6376 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6383 /* We use char because int might match the return type of a gcc2
6384 builtin and then its argument prototype would still apply. */
6385 char initscr (void);
6391 /* The GNU C library defines stubs for functions which it implements
6392 to always fail with ENOSYS. Some functions are actually named
6393 something starting with __ and the normal name is an alias. */
6394 #if defined (__stub_initscr) || defined (__stub___initscr)
6395 #error found stub for initscr
6403 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6404 if { (eval echo "$as_me:6404: \"$ac_link\"") >&5
6405 (eval $ac_link) 2>&5
6407 echo "$as_me:6407: \$? = $ac_status" >&5
6408 (exit "$ac_status"); } &&
6409 { ac_try='test -s "conftest$ac_exeext"'
6410 { (eval echo "$as_me:6410: \"$ac_try\"") >&5
6413 echo "$as_me:6413: \$? = $ac_status" >&5
6414 (exit "$ac_status"); }; }; then
6415 ac_cv_func_initscr=yes
6417 echo "$as_me: failed program was:" >&5
6418 cat "conftest.$ac_ext" >&5
6419 ac_cv_func_initscr=no
6421 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6423 echo "$as_me:6423: result: $ac_cv_func_initscr" >&5
6424 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6425 if test "$ac_cv_func_initscr" = yes; then
6426 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6429 cf_save_LIBS="$LIBS"
6430 echo "$as_me:6430: checking for initscr in -l$cf_nculib_root" >&5
6431 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6432 LIBS="-l$cf_nculib_root $LIBS"
6433 cat >"conftest.$ac_ext" <<_ACEOF
6434 #line 6434 "configure"
6435 #include "confdefs.h"
6436 #include <${cf_cv_ncurses_header:-curses.h}>
6445 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6446 if { (eval echo "$as_me:6446: \"$ac_link\"") >&5
6447 (eval $ac_link) 2>&5
6449 echo "$as_me:6449: \$? = $ac_status" >&5
6450 (exit "$ac_status"); } &&
6451 { ac_try='test -s "conftest$ac_exeext"'
6452 { (eval echo "$as_me:6452: \"$ac_try\"") >&5
6455 echo "$as_me:6455: \$? = $ac_status" >&5
6456 (exit "$ac_status"); }; }; then
6457 echo "$as_me:6457: result: yes" >&5
6458 echo "${ECHO_T}yes" >&6
6459 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6462 echo "$as_me: failed program was:" >&5
6463 cat "conftest.$ac_ext" >&5
6464 echo "$as_me:6464: result: no" >&5
6465 echo "${ECHO_T}no" >&6
6468 cf_library_path_list=""
6469 if test -n "${LDFLAGS}${LIBS}" ; then
6470 for cf_library_path in $LDFLAGS $LIBS
6472 case "$cf_library_path" in
6474 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6476 test "x$cf_library_path" != "xNONE" && \
6477 test -d "$cf_library_path" && \
6479 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6480 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6481 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6482 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6483 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6484 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"
6487 cf_library_path_list="$cf_library_path_list $cf_search"
6495 test "x$prefix" != "xNONE" && \
6496 test -d "$prefix" && \
6498 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6499 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6500 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6501 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6502 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6503 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6506 for cf_subdir_prefix in \
6515 test "x$cf_subdir_prefix" != "x$prefix" && \
6516 test -d "$cf_subdir_prefix" && \
6517 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6518 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6519 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6520 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6521 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6522 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6523 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"
6528 cf_search="$cf_library_path_list $cf_search"
6530 for cf_libdir in $cf_search
6532 echo "$as_me:6532: checking for -l$cf_nculib_root in $cf_libdir" >&5
6533 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6534 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6535 cat >"conftest.$ac_ext" <<_ACEOF
6536 #line 6536 "configure"
6537 #include "confdefs.h"
6538 #include <${cf_cv_ncurses_header:-curses.h}>
6547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6548 if { (eval echo "$as_me:6548: \"$ac_link\"") >&5
6549 (eval $ac_link) 2>&5
6551 echo "$as_me:6551: \$? = $ac_status" >&5
6552 (exit "$ac_status"); } &&
6553 { ac_try='test -s "conftest$ac_exeext"'
6554 { (eval echo "$as_me:6554: \"$ac_try\"") >&5
6557 echo "$as_me:6557: \$? = $ac_status" >&5
6558 (exit "$ac_status"); }; }; then
6559 echo "$as_me:6559: result: yes" >&5
6560 echo "${ECHO_T}yes" >&6
6561 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6564 echo "$as_me: failed program was:" >&5
6565 cat "conftest.$ac_ext" >&5
6566 echo "$as_me:6566: result: no" >&5
6567 echo "${ECHO_T}no" >&6
6568 LIBS="$cf_save_LIBS"
6570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6578 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6580 if test "$cf_found_library" = no ; then
6581 { { echo "$as_me:6581: error: Cannot link $cf_nculib_root library" >&5
6582 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6583 { (exit 1); exit 1; }; }
6588 if test -n "$cf_ncurses_LIBS" ; then
6589 echo "$as_me:6589: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6590 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6591 cf_ncurses_SAVE="$LIBS"
6592 for p in $cf_ncurses_LIBS ; do
6593 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6594 if test "$q" != "$LIBS" ; then
6598 cat >"conftest.$ac_ext" <<_ACEOF
6599 #line 6599 "configure"
6600 #include "confdefs.h"
6601 #include <${cf_cv_ncurses_header:-curses.h}>
6605 initscr(); mousemask(0,0); tigetstr((char *)0);
6610 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6611 if { (eval echo "$as_me:6611: \"$ac_link\"") >&5
6612 (eval $ac_link) 2>&5
6614 echo "$as_me:6614: \$? = $ac_status" >&5
6615 (exit "$ac_status"); } &&
6616 { ac_try='test -s "conftest$ac_exeext"'
6617 { (eval echo "$as_me:6617: \"$ac_try\"") >&5
6620 echo "$as_me:6620: \$? = $ac_status" >&5
6621 (exit "$ac_status"); }; }; then
6622 echo "$as_me:6622: result: yes" >&5
6623 echo "${ECHO_T}yes" >&6
6625 echo "$as_me: failed program was:" >&5
6626 cat "conftest.$ac_ext" >&5
6627 echo "$as_me:6627: result: no" >&5
6628 echo "${ECHO_T}no" >&6
6629 LIBS="$cf_ncurses_SAVE"
6631 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6634 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6636 cat >>confdefs.h <<EOF
6637 #define $cf_nculib_ROOT 1
6645 echo "$as_me:6645: checking if you want wide-character code" >&5
6646 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6648 # Check whether --enable-widec or --disable-widec was given.
6649 if test "${enable_widec+set}" = set; then
6650 enableval="$enable_widec"
6651 with_widec=$enableval
6655 echo "$as_me:6655: result: $with_widec" >&5
6656 echo "${ECHO_T}$with_widec" >&6
6657 if test "$with_widec" = yes ; then
6659 for ac_header in wchar.h
6661 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6662 echo "$as_me:6662: checking for $ac_header" >&5
6663 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6664 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6665 echo $ECHO_N "(cached) $ECHO_C" >&6
6667 cat >"conftest.$ac_ext" <<_ACEOF
6668 #line 6668 "configure"
6669 #include "confdefs.h"
6670 #include <$ac_header>
6672 if { (eval echo "$as_me:6672: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6673 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6675 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6677 cat conftest.err >&5
6678 echo "$as_me:6678: \$? = $ac_status" >&5
6679 (exit "$ac_status"); } >/dev/null; then
6680 if test -s conftest.err; then
6681 ac_cpp_err=$ac_c_preproc_warn_flag
6688 if test -z "$ac_cpp_err"; then
6689 eval "$as_ac_Header=yes"
6691 echo "$as_me: failed program was:" >&5
6692 cat "conftest.$ac_ext" >&5
6693 eval "$as_ac_Header=no"
6695 rm -f conftest.err "conftest.$ac_ext"
6697 echo "$as_me:6697: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6698 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6699 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6700 cat >>confdefs.h <<EOF
6701 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6707 echo "$as_me:6707: checking for multibyte character support" >&5
6708 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6709 if test "${cf_cv_utf8_lib+set}" = set; then
6710 echo $ECHO_N "(cached) $ECHO_C" >&6
6713 cf_save_LIBS="$LIBS"
6714 cat >"conftest.$ac_ext" <<_ACEOF
6715 #line 6715 "configure"
6716 #include "confdefs.h"
6718 $ac_includes_default
6731 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6732 if { (eval echo "$as_me:6732: \"$ac_link\"") >&5
6733 (eval $ac_link) 2>&5
6735 echo "$as_me:6735: \$? = $ac_status" >&5
6736 (exit "$ac_status"); } &&
6737 { ac_try='test -s "conftest$ac_exeext"'
6738 { (eval echo "$as_me:6738: \"$ac_try\"") >&5
6741 echo "$as_me:6741: \$? = $ac_status" >&5
6742 (exit "$ac_status"); }; }; then
6745 echo "$as_me: failed program was:" >&5
6746 cat "conftest.$ac_ext" >&5
6748 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6749 # will be set on completion of the AC_TRY_LINK below.
6750 cf_cv_header_path_utf8=
6751 cf_cv_library_path_utf8=
6753 echo "${as_me:-configure}:6753: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6755 cf_save_LIBS="$LIBS"
6757 cat >"conftest.$ac_ext" <<_ACEOF
6758 #line 6758 "configure"
6759 #include "confdefs.h"
6761 #include <libutf8.h>
6770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6771 if { (eval echo "$as_me:6771: \"$ac_link\"") >&5
6772 (eval $ac_link) 2>&5
6774 echo "$as_me:6774: \$? = $ac_status" >&5
6775 (exit "$ac_status"); } &&
6776 { ac_try='test -s "conftest$ac_exeext"'
6777 { (eval echo "$as_me:6777: \"$ac_try\"") >&5
6780 echo "$as_me:6780: \$? = $ac_status" >&5
6781 (exit "$ac_status"); }; }; then
6783 cf_cv_find_linkage_utf8=yes
6784 cf_cv_header_path_utf8=/usr/include
6785 cf_cv_library_path_utf8=/usr/lib
6788 echo "$as_me: failed program was:" >&5
6789 cat "conftest.$ac_ext" >&5
6791 LIBS="-lutf8 $cf_save_LIBS"
6793 cat >"conftest.$ac_ext" <<_ACEOF
6794 #line 6794 "configure"
6795 #include "confdefs.h"
6797 #include <libutf8.h>
6806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6807 if { (eval echo "$as_me:6807: \"$ac_link\"") >&5
6808 (eval $ac_link) 2>&5
6810 echo "$as_me:6810: \$? = $ac_status" >&5
6811 (exit "$ac_status"); } &&
6812 { ac_try='test -s "conftest$ac_exeext"'
6813 { (eval echo "$as_me:6813: \"$ac_try\"") >&5
6816 echo "$as_me:6816: \$? = $ac_status" >&5
6817 (exit "$ac_status"); }; }; then
6819 cf_cv_find_linkage_utf8=yes
6820 cf_cv_header_path_utf8=/usr/include
6821 cf_cv_library_path_utf8=/usr/lib
6822 cf_cv_library_file_utf8="-lutf8"
6825 echo "$as_me: failed program was:" >&5
6826 cat "conftest.$ac_ext" >&5
6828 cf_cv_find_linkage_utf8=no
6829 LIBS="$cf_save_LIBS"
6831 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6833 echo "${as_me:-configure}:6833: testing find linkage for utf8 library ..." 1>&5
6835 echo "${as_me:-configure}:6835: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6837 cf_save_CPPFLAGS="$CPPFLAGS"
6838 cf_test_CPPFLAGS="$CPPFLAGS"
6842 # collect the current set of include-directories from compiler flags
6843 cf_header_path_list=""
6844 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6845 for cf_header_path in $CPPFLAGS $CFLAGS
6847 case "$cf_header_path" in
6849 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6851 test "x$cf_header_path" != "xNONE" && \
6852 test -d "$cf_header_path" && \
6854 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6855 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6856 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6857 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6858 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6859 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6862 cf_header_path_list="$cf_header_path_list $cf_search"
6868 # add the variations for the package we are looking for
6872 test "x$prefix" != "xNONE" && \
6873 test -d "$prefix" && \
6875 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6876 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6877 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6878 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6879 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6880 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6883 for cf_subdir_prefix in \
6892 test "x$cf_subdir_prefix" != "x$prefix" && \
6893 test -d "$cf_subdir_prefix" && \
6894 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6895 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6896 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6897 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6898 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6899 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6900 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6905 test "$includedir" != NONE && \
6906 test "$includedir" != "/usr/include" && \
6907 test -d "$includedir" && {
6908 test -d "$includedir" && cf_search="$cf_search $includedir"
6909 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6912 test "$oldincludedir" != NONE && \
6913 test "$oldincludedir" != "/usr/include" && \
6914 test -d "$oldincludedir" && {
6915 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6916 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6919 cf_search="$cf_search $cf_header_path_list"
6921 for cf_cv_header_path_utf8 in $cf_search
6923 if test -d "$cf_cv_header_path_utf8" ; then
6924 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6926 echo "${as_me:-configure}:6926: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6928 CPPFLAGS="$cf_save_CPPFLAGS"
6930 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6931 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6933 cat >"conftest.$ac_ext" <<_ACEOF
6934 #line 6934 "configure"
6935 #include "confdefs.h"
6937 #include <libutf8.h>
6946 rm -f "conftest.$ac_objext"
6947 if { (eval echo "$as_me:6947: \"$ac_compile\"") >&5
6948 (eval $ac_compile) 2>&5
6950 echo "$as_me:6950: \$? = $ac_status" >&5
6951 (exit "$ac_status"); } &&
6952 { ac_try='test -s "conftest.$ac_objext"'
6953 { (eval echo "$as_me:6953: \"$ac_try\"") >&5
6956 echo "$as_me:6956: \$? = $ac_status" >&5
6957 (exit "$ac_status"); }; }; then
6959 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6961 echo "${as_me:-configure}:6961: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6963 cf_cv_find_linkage_utf8=maybe
6964 cf_test_CPPFLAGS="$CPPFLAGS"
6967 echo "$as_me: failed program was:" >&5
6968 cat "conftest.$ac_ext" >&5
6970 CPPFLAGS="$cf_save_CPPFLAGS"
6973 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6977 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6979 echo "${as_me:-configure}:6979: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6981 cf_save_LIBS="$LIBS"
6982 cf_save_LDFLAGS="$LDFLAGS"
6984 if test "$cf_cv_find_linkage_utf8" != yes ; then
6987 cf_library_path_list=""
6988 if test -n "${LDFLAGS}${LIBS}" ; then
6989 for cf_library_path in $LDFLAGS $LIBS
6991 case "$cf_library_path" in
6993 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6995 test "x$cf_library_path" != "xNONE" && \
6996 test -d "$cf_library_path" && \
6998 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6999 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7000 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7001 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7002 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7003 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7006 cf_library_path_list="$cf_library_path_list $cf_search"
7014 test "x$prefix" != "xNONE" && \
7015 test -d "$prefix" && \
7017 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7018 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7019 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7020 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7021 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7022 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7025 for cf_subdir_prefix in \
7034 test "x$cf_subdir_prefix" != "x$prefix" && \
7035 test -d "$cf_subdir_prefix" && \
7036 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7037 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7038 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7039 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7040 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7041 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7042 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7047 cf_search="$cf_library_path_list $cf_search"
7049 for cf_cv_library_path_utf8 in $cf_search
7051 if test -d "$cf_cv_library_path_utf8" ; then
7052 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7054 echo "${as_me:-configure}:7054: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7056 CPPFLAGS="$cf_test_CPPFLAGS"
7057 LIBS="-lutf8 $cf_save_LIBS"
7058 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7059 cat >"conftest.$ac_ext" <<_ACEOF
7060 #line 7060 "configure"
7061 #include "confdefs.h"
7063 #include <libutf8.h>
7072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7073 if { (eval echo "$as_me:7073: \"$ac_link\"") >&5
7074 (eval $ac_link) 2>&5
7076 echo "$as_me:7076: \$? = $ac_status" >&5
7077 (exit "$ac_status"); } &&
7078 { ac_try='test -s "conftest$ac_exeext"'
7079 { (eval echo "$as_me:7079: \"$ac_try\"") >&5
7082 echo "$as_me:7082: \$? = $ac_status" >&5
7083 (exit "$ac_status"); }; }; then
7085 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7087 echo "${as_me:-configure}:7087: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7089 cf_cv_find_linkage_utf8=yes
7090 cf_cv_library_file_utf8="-lutf8"
7093 echo "$as_me: failed program was:" >&5
7094 cat "conftest.$ac_ext" >&5
7096 CPPFLAGS="$cf_save_CPPFLAGS"
7097 LIBS="$cf_save_LIBS"
7098 LDFLAGS="$cf_save_LDFLAGS"
7101 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7104 CPPFLAGS="$cf_save_CPPFLAGS"
7105 LDFLAGS="$cf_save_LDFLAGS"
7109 cf_cv_find_linkage_utf8=no
7113 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7118 LIBS="$cf_save_LIBS"
7120 if test "$cf_cv_find_linkage_utf8" = yes ; then
7121 cf_cv_utf8_lib=add-on
7127 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7129 echo "$as_me:7129: result: $cf_cv_utf8_lib" >&5
7130 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7132 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7134 if test "$cf_cv_utf8_lib" = "add-on" ; then
7136 cat >>confdefs.h <<\EOF
7137 #define HAVE_LIBUTF8_H 1
7140 if test -n "$cf_cv_header_path_utf8" ; then
7141 for cf_add_incdir in $cf_cv_header_path_utf8
7143 while test "$cf_add_incdir" != /usr/include
7145 if test -d "$cf_add_incdir"
7148 if test -n "$CFLAGS$CPPFLAGS" ; then
7149 # a loop is needed to ensure we can add subdirs of existing dirs
7150 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7151 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7152 cf_have_incdir=yes; break
7157 if test "$cf_have_incdir" = no ; then
7158 if test "$cf_add_incdir" = /usr/local/include ; then
7159 if test "$GCC" = yes
7161 cf_save_CPPFLAGS=$CPPFLAGS
7163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7164 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7166 cat >"conftest.$ac_ext" <<_ACEOF
7167 #line 7167 "configure"
7168 #include "confdefs.h"
7178 rm -f "conftest.$ac_objext"
7179 if { (eval echo "$as_me:7179: \"$ac_compile\"") >&5
7180 (eval $ac_compile) 2>&5
7182 echo "$as_me:7182: \$? = $ac_status" >&5
7183 (exit "$ac_status"); } &&
7184 { ac_try='test -s "conftest.$ac_objext"'
7185 { (eval echo "$as_me:7185: \"$ac_try\"") >&5
7188 echo "$as_me:7188: \$? = $ac_status" >&5
7189 (exit "$ac_status"); }; }; then
7192 echo "$as_me: failed program was:" >&5
7193 cat "conftest.$ac_ext" >&5
7196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7197 CPPFLAGS=$cf_save_CPPFLAGS
7202 if test "$cf_have_incdir" = no ; then
7203 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7205 echo "${as_me:-configure}:7205: testing adding $cf_add_incdir to include-path ..." 1>&5
7207 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7209 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7210 test "$cf_top_incdir" = "$cf_add_incdir" && break
7211 cf_add_incdir="$cf_top_incdir"
7222 if test -n "$cf_cv_library_path_utf8" ; then
7223 for cf_add_libdir in $cf_cv_library_path_utf8
7225 if test "$cf_add_libdir" = /usr/lib ; then
7227 elif test -d "$cf_add_libdir"
7230 if test -n "$LDFLAGS$LIBS" ; then
7231 # a loop is needed to ensure we can add subdirs of existing dirs
7232 for cf_test_libdir in $LDFLAGS $LIBS ; do
7233 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7234 cf_have_libdir=yes; break
7238 if test "$cf_have_libdir" = no ; then
7239 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7241 echo "${as_me:-configure}:7241: testing adding $cf_add_libdir to library-path ..." 1>&5
7243 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7252 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7254 for cf_add_1lib in $cf_add_0lib; do
7255 for cf_add_2lib in $cf_add_libs; do
7256 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7261 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7267 cf_ncuconfig_root=ncursesw
7268 cf_have_ncuconfig=no
7270 if test "x${PKG_CONFIG:=none}" != xnone; then
7271 echo "$as_me:7271: checking pkg-config for $cf_ncuconfig_root" >&5
7272 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7273 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7274 echo "$as_me:7274: result: yes" >&5
7275 echo "${ECHO_T}yes" >&6
7277 echo "$as_me:7277: checking if the $cf_ncuconfig_root package files work" >&5
7278 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7279 cf_have_ncuconfig=unknown
7281 cf_save_CFLAGS="$CFLAGS"
7282 cf_save_CPPFLAGS="$CPPFLAGS"
7283 cf_save_LIBS="$LIBS"
7285 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7286 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7288 # while -W for passing linker flags is prevalent, it is not "standard".
7289 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7290 # incompatible _and_ non-standard -W option which gives an error. Work
7291 # around that pitfall.
7292 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7298 cf_new_extra_cppflags=
7300 for cf_add_cflags in $cf_pkg_cflags
7302 case "$cf_fix_cppflags" in
7304 case "$cf_add_cflags" in
7305 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7306 case "$cf_add_cflags" in
7308 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7310 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7311 && test -z "${cf_tst_cflags}" \
7312 && cf_fix_cppflags=yes
7314 if test "$cf_fix_cppflags" = yes ; then
7316 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7317 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7320 elif test "${cf_tst_cflags}" = "\"'" ; then
7322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7333 case "$cf_add_cflags" in
7335 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7337 CPPFLAGS=`echo "$CPPFLAGS" | \
7338 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7339 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7344 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7345 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7352 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7353 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7360 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7361 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7363 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7365 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7366 && test -z "${cf_tst_cflags}" \
7367 && cf_fix_cppflags=no
7372 if test -n "$cf_new_cflags" ; then
7374 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7375 CFLAGS="${CFLAGS}$cf_new_cflags"
7379 if test -n "$cf_new_cppflags" ; then
7381 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7382 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7386 if test -n "$cf_new_extra_cppflags" ; then
7388 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7389 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7396 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7398 for cf_add_1lib in $cf_add_0lib; do
7399 for cf_add_2lib in $cf_add_libs; do
7400 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7405 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7409 cat >"conftest.$ac_ext" <<_ACEOF
7410 #line 7410 "configure"
7411 #include "confdefs.h"
7412 #include <${cf_cv_ncurses_header:-curses.h}>
7416 initscr(); mousemask(0,0); tigetstr((char *)0);
7421 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7422 if { (eval echo "$as_me:7422: \"$ac_link\"") >&5
7423 (eval $ac_link) 2>&5
7425 echo "$as_me:7425: \$? = $ac_status" >&5
7426 (exit "$ac_status"); } &&
7427 { ac_try='test -s "conftest$ac_exeext"'
7428 { (eval echo "$as_me:7428: \"$ac_try\"") >&5
7431 echo "$as_me:7431: \$? = $ac_status" >&5
7432 (exit "$ac_status"); }; }; then
7433 if test "$cross_compiling" = yes; then
7434 cf_test_ncuconfig=maybe
7436 cat >"conftest.$ac_ext" <<_ACEOF
7437 #line 7437 "configure"
7438 #include "confdefs.h"
7439 #include <${cf_cv_ncurses_header:-curses.h}>
7441 { const char *xx = curses_version(); return (xx == 0); }
7443 rm -f "conftest$ac_exeext"
7444 if { (eval echo "$as_me:7444: \"$ac_link\"") >&5
7445 (eval $ac_link) 2>&5
7447 echo "$as_me:7447: \$? = $ac_status" >&5
7448 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7449 { (eval echo "$as_me:7449: \"$ac_try\"") >&5
7452 echo "$as_me:7452: \$? = $ac_status" >&5
7453 (exit "$ac_status"); }; }; then
7454 cf_test_ncuconfig=yes
7456 echo "$as_me: program exited with status $ac_status" >&5
7457 echo "$as_me: failed program was:" >&5
7458 cat "conftest.$ac_ext" >&5
7459 cf_test_ncuconfig=no
7461 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7464 echo "$as_me: failed program was:" >&5
7465 cat "conftest.$ac_ext" >&5
7466 cf_test_ncuconfig=no
7468 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7470 CFLAGS="$cf_save_CFLAGS"
7471 CPPFLAGS="$cf_save_CPPFLAGS"
7472 LIBS="$cf_save_LIBS"
7474 if test "x$cf_test_ncuconfig" != xyes; then
7475 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7476 cf_pkg_cflags="$cf_temp"
7477 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7478 cf_pkg_libs="$cf_temp"
7483 for cf_add_cflags in $cf_pkg_cflags
7485 case "x$cf_add_cflags" in
7488 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7491 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'`
7492 test "$CFLAGS" != "$cf_old_cflag" || break
7494 CFLAGS="$cf_old_cflag"
7497 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7500 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'`
7501 test "$CPPFLAGS" != "$cf_old_cflag" || break
7503 CPPFLAGS="$cf_old_cflag"
7512 cf_new_extra_cppflags=
7514 for cf_add_cflags in $cf_add_cflags
7516 case "$cf_fix_cppflags" in
7518 case "$cf_add_cflags" in
7519 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7520 case "$cf_add_cflags" in
7522 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7524 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7525 && test -z "${cf_tst_cflags}" \
7526 && cf_fix_cppflags=yes
7528 if test "$cf_fix_cppflags" = yes ; then
7530 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7531 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7534 elif test "${cf_tst_cflags}" = "\"'" ; then
7536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7547 case "$cf_add_cflags" in
7549 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7551 CPPFLAGS=`echo "$CPPFLAGS" | \
7552 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7553 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7558 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7559 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7566 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7567 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7574 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7575 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7577 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7579 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7580 && test -z "${cf_tst_cflags}" \
7581 && cf_fix_cppflags=no
7586 if test -n "$cf_new_cflags" ; then
7588 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7589 CFLAGS="${CFLAGS}$cf_new_cflags"
7593 if test -n "$cf_new_cppflags" ; then
7595 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7596 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7600 if test -n "$cf_new_extra_cppflags" ; then
7602 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7603 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7612 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7614 for cf_add_1lib in $cf_add_0lib; do
7615 for cf_add_2lib in $cf_add_libs; do
7616 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7621 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7625 cat >"conftest.$ac_ext" <<_ACEOF
7626 #line 7626 "configure"
7627 #include "confdefs.h"
7628 #include <${cf_cv_ncurses_header:-curses.h}>
7632 initscr(); mousemask(0,0); tigetstr((char *)0);
7637 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7638 if { (eval echo "$as_me:7638: \"$ac_link\"") >&5
7639 (eval $ac_link) 2>&5
7641 echo "$as_me:7641: \$? = $ac_status" >&5
7642 (exit "$ac_status"); } &&
7643 { ac_try='test -s "conftest$ac_exeext"'
7644 { (eval echo "$as_me:7644: \"$ac_try\"") >&5
7647 echo "$as_me:7647: \$? = $ac_status" >&5
7648 (exit "$ac_status"); }; }; then
7649 if test "$cross_compiling" = yes; then
7650 cf_have_ncuconfig=maybe
7652 cat >"conftest.$ac_ext" <<_ACEOF
7653 #line 7653 "configure"
7654 #include "confdefs.h"
7655 #include <${cf_cv_ncurses_header:-curses.h}>
7657 { const char *xx = curses_version(); return (xx == 0); }
7659 rm -f "conftest$ac_exeext"
7660 if { (eval echo "$as_me:7660: \"$ac_link\"") >&5
7661 (eval $ac_link) 2>&5
7663 echo "$as_me:7663: \$? = $ac_status" >&5
7664 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7665 { (eval echo "$as_me:7665: \"$ac_try\"") >&5
7668 echo "$as_me:7668: \$? = $ac_status" >&5
7669 (exit "$ac_status"); }; }; then
7670 cf_have_ncuconfig=yes
7672 echo "$as_me: program exited with status $ac_status" >&5
7673 echo "$as_me: failed program was:" >&5
7674 cat "conftest.$ac_ext" >&5
7675 cf_have_ncuconfig=no
7677 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7680 echo "$as_me: failed program was:" >&5
7681 cat "conftest.$ac_ext" >&5
7682 cf_have_ncuconfig=no
7684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7685 echo "$as_me:7685: result: $cf_have_ncuconfig" >&5
7686 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7687 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7688 if test "$cf_have_ncuconfig" != "yes"
7690 CPPFLAGS="$cf_save_CPPFLAGS"
7691 LIBS="$cf_save_LIBS"
7692 NCURSES_CONFIG_PKG=none
7695 cat >>confdefs.h <<\EOF
7699 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7701 echo "$as_me:7701: checking for terminfo header" >&5
7702 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7703 if test "${cf_cv_term_header+set}" = set; then
7704 echo $ECHO_N "(cached) $ECHO_C" >&6
7707 case "${cf_cv_ncurses_header}" in
7708 (*/ncurses.h|*/ncursesw.h)
7709 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7712 cf_term_header=term.h
7716 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7718 cat >"conftest.$ac_ext" <<_ACEOF
7719 #line 7719 "configure"
7720 #include "confdefs.h"
7722 #include <${cf_cv_ncurses_header:-curses.h}>
7728 int x = auto_left_margin; (void)x
7733 rm -f "conftest.$ac_objext"
7734 if { (eval echo "$as_me:7734: \"$ac_compile\"") >&5
7735 (eval $ac_compile) 2>&5
7737 echo "$as_me:7737: \$? = $ac_status" >&5
7738 (exit "$ac_status"); } &&
7739 { ac_try='test -s "conftest.$ac_objext"'
7740 { (eval echo "$as_me:7740: \"$ac_try\"") >&5
7743 echo "$as_me:7743: \$? = $ac_status" >&5
7744 (exit "$ac_status"); }; }; then
7746 cf_cv_term_header="$cf_test"
7748 echo "$as_me: failed program was:" >&5
7749 cat "conftest.$ac_ext" >&5
7751 cf_cv_term_header=unknown
7754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7755 test "$cf_cv_term_header" != unknown && break
7759 echo "$as_me:7759: result: $cf_cv_term_header" >&5
7760 echo "${ECHO_T}$cf_cv_term_header" >&6
7762 # Set definitions to allow ifdef'ing to accommodate subdirectories
7764 case "$cf_cv_term_header" in
7767 cat >>confdefs.h <<\EOF
7768 #define HAVE_TERM_H 1
7774 case "$cf_cv_term_header" in
7777 cat >>confdefs.h <<\EOF
7778 #define HAVE_NCURSES_TERM_H 1
7784 cat >>confdefs.h <<\EOF
7785 #define HAVE_NCURSESW_TERM_H 1
7794 echo "$as_me:7794: result: no" >&5
7795 echo "${ECHO_T}no" >&6
7796 NCURSES_CONFIG_PKG=none
7799 NCURSES_CONFIG_PKG=none
7802 if test "x$cf_have_ncuconfig" = "xno"; then
7803 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7805 if test -n "$ac_tool_prefix"; then
7806 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7809 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7810 echo "$as_me:7810: checking for $ac_word" >&5
7811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7812 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7813 echo $ECHO_N "(cached) $ECHO_C" >&6
7815 if test -n "$NCURSES_CONFIG"; then
7816 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7818 ac_save_IFS=$IFS; IFS=$ac_path_separator
7820 for ac_dir in $ac_dummy; do
7822 test -z "$ac_dir" && ac_dir=.
7823 $as_executable_p "$ac_dir/$ac_word" || continue
7824 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7825 echo "$as_me:7825: found $ac_dir/$ac_word" >&5
7831 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7832 if test -n "$NCURSES_CONFIG"; then
7833 echo "$as_me:7833: result: $NCURSES_CONFIG" >&5
7834 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7836 echo "$as_me:7836: result: no" >&5
7837 echo "${ECHO_T}no" >&6
7840 test -n "$NCURSES_CONFIG" && break
7843 if test -z "$NCURSES_CONFIG"; then
7844 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7845 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7847 # Extract the first word of "$ac_prog", so it can be a program name with args.
7848 set dummy $ac_prog; ac_word=$2
7849 echo "$as_me:7849: checking for $ac_word" >&5
7850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7851 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7852 echo $ECHO_N "(cached) $ECHO_C" >&6
7854 if test -n "$ac_ct_NCURSES_CONFIG"; then
7855 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7857 ac_save_IFS=$IFS; IFS=$ac_path_separator
7859 for ac_dir in $ac_dummy; do
7861 test -z "$ac_dir" && ac_dir=.
7862 $as_executable_p "$ac_dir/$ac_word" || continue
7863 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7864 echo "$as_me:7864: found $ac_dir/$ac_word" >&5
7870 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7871 if test -n "$ac_ct_NCURSES_CONFIG"; then
7872 echo "$as_me:7872: result: $ac_ct_NCURSES_CONFIG" >&5
7873 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7875 echo "$as_me:7875: result: no" >&5
7876 echo "${ECHO_T}no" >&6
7879 test -n "$ac_ct_NCURSES_CONFIG" && break
7881 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7883 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7886 if test "$NCURSES_CONFIG" != none ; then
7888 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7890 case "x$cf_add_cflags" in
7893 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7896 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'`
7897 test "$CFLAGS" != "$cf_old_cflag" || break
7899 CFLAGS="$cf_old_cflag"
7902 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7905 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'`
7906 test "$CPPFLAGS" != "$cf_old_cflag" || break
7908 CPPFLAGS="$cf_old_cflag"
7917 cf_new_extra_cppflags=
7919 for cf_add_cflags in $cf_add_cflags
7921 case "$cf_fix_cppflags" in
7923 case "$cf_add_cflags" in
7924 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7925 case "$cf_add_cflags" in
7927 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7929 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7930 && test -z "${cf_tst_cflags}" \
7931 && cf_fix_cppflags=yes
7933 if test "$cf_fix_cppflags" = yes ; then
7935 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7936 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7939 elif test "${cf_tst_cflags}" = "\"'" ; then
7941 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7942 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7952 case "$cf_add_cflags" in
7954 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7956 CPPFLAGS=`echo "$CPPFLAGS" | \
7957 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7958 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7963 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7964 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7971 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7972 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7979 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7980 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7982 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7984 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7985 && test -z "${cf_tst_cflags}" \
7986 && cf_fix_cppflags=no
7991 if test -n "$cf_new_cflags" ; then
7993 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7994 CFLAGS="${CFLAGS}$cf_new_cflags"
7998 if test -n "$cf_new_cppflags" ; then
8000 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8001 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8005 if test -n "$cf_new_extra_cppflags" ; then
8007 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8008 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8017 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8019 for cf_add_1lib in $cf_add_0lib; do
8020 for cf_add_2lib in $cf_add_libs; do
8021 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8026 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8030 # even with config script, some packages use no-override for curses.h
8032 echo "$as_me:8032: checking if we have identified curses headers" >&5
8033 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8034 if test "${cf_cv_ncurses_header+set}" = set; then
8035 echo $ECHO_N "(cached) $ECHO_C" >&6
8038 cf_cv_ncurses_header=none
8040 ncurses.h ncursesw/ncurses.h \
8041 curses.h ncursesw/curses.h
8043 cat >"conftest.$ac_ext" <<_ACEOF
8044 #line 8044 "configure"
8045 #include "confdefs.h"
8046 #include <${cf_header}>
8055 rm -f "conftest.$ac_objext"
8056 if { (eval echo "$as_me:8056: \"$ac_compile\"") >&5
8057 (eval $ac_compile) 2>&5
8059 echo "$as_me:8059: \$? = $ac_status" >&5
8060 (exit "$ac_status"); } &&
8061 { ac_try='test -s "conftest.$ac_objext"'
8062 { (eval echo "$as_me:8062: \"$ac_try\"") >&5
8065 echo "$as_me:8065: \$? = $ac_status" >&5
8066 (exit "$ac_status"); }; }; then
8067 cf_cv_ncurses_header=$cf_header; break
8069 echo "$as_me: failed program was:" >&5
8070 cat "conftest.$ac_ext" >&5
8072 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8076 echo "$as_me:8076: result: $cf_cv_ncurses_header" >&5
8077 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8079 if test "$cf_cv_ncurses_header" = none ; then
8080 { { echo "$as_me:8080: error: No curses header-files found" >&5
8081 echo "$as_me: error: No curses header-files found" >&2;}
8082 { (exit 1); exit 1; }; }
8085 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8087 for ac_header in $cf_cv_ncurses_header
8089 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8090 echo "$as_me:8090: checking for $ac_header" >&5
8091 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8092 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8093 echo $ECHO_N "(cached) $ECHO_C" >&6
8095 cat >"conftest.$ac_ext" <<_ACEOF
8096 #line 8096 "configure"
8097 #include "confdefs.h"
8098 #include <$ac_header>
8100 if { (eval echo "$as_me:8100: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8101 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8103 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8105 cat conftest.err >&5
8106 echo "$as_me:8106: \$? = $ac_status" >&5
8107 (exit "$ac_status"); } >/dev/null; then
8108 if test -s conftest.err; then
8109 ac_cpp_err=$ac_c_preproc_warn_flag
8116 if test -z "$ac_cpp_err"; then
8117 eval "$as_ac_Header=yes"
8119 echo "$as_me: failed program was:" >&5
8120 cat "conftest.$ac_ext" >&5
8121 eval "$as_ac_Header=no"
8123 rm -f conftest.err "conftest.$ac_ext"
8125 echo "$as_me:8125: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8126 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8127 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8128 cat >>confdefs.h <<EOF
8129 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8135 cat >>confdefs.h <<\EOF
8139 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8141 cat >>confdefs.h <<EOF
8142 #define $cf_nculib_ROOT 1
8145 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8149 cf_ncuhdr_root=ncursesw
8151 test -n "$cf_cv_curses_dir" && \
8152 test "$cf_cv_curses_dir" != "no" && { \
8154 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8155 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8157 while test "$cf_add_incdir" != /usr/include
8159 if test -d "$cf_add_incdir"
8162 if test -n "$CFLAGS$CPPFLAGS" ; then
8163 # a loop is needed to ensure we can add subdirs of existing dirs
8164 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8165 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8166 cf_have_incdir=yes; break
8171 if test "$cf_have_incdir" = no ; then
8172 if test "$cf_add_incdir" = /usr/local/include ; then
8173 if test "$GCC" = yes
8175 cf_save_CPPFLAGS=$CPPFLAGS
8177 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8178 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8180 cat >"conftest.$ac_ext" <<_ACEOF
8181 #line 8181 "configure"
8182 #include "confdefs.h"
8192 rm -f "conftest.$ac_objext"
8193 if { (eval echo "$as_me:8193: \"$ac_compile\"") >&5
8194 (eval $ac_compile) 2>&5
8196 echo "$as_me:8196: \$? = $ac_status" >&5
8197 (exit "$ac_status"); } &&
8198 { ac_try='test -s "conftest.$ac_objext"'
8199 { (eval echo "$as_me:8199: \"$ac_try\"") >&5
8202 echo "$as_me:8202: \$? = $ac_status" >&5
8203 (exit "$ac_status"); }; }; then
8206 echo "$as_me: failed program was:" >&5
8207 cat "conftest.$ac_ext" >&5
8210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8211 CPPFLAGS=$cf_save_CPPFLAGS
8216 if test "$cf_have_incdir" = no ; then
8217 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8219 echo "${as_me:-configure}:8219: testing adding $cf_add_incdir to include-path ..." 1>&5
8221 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8223 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8224 test "$cf_top_incdir" = "$cf_add_incdir" && break
8225 cf_add_incdir="$cf_top_incdir"
8238 echo "$as_me:8238: checking for $cf_ncuhdr_root header in include-path" >&5
8239 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8240 if test "${cf_cv_ncurses_h+set}" = set; then
8241 echo $ECHO_N "(cached) $ECHO_C" >&6
8244 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8245 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8246 for cf_header in $cf_header_list
8249 cat >"conftest.$ac_ext" <<_ACEOF
8250 #line 8250 "configure"
8251 #include "confdefs.h"
8253 #define _XOPEN_SOURCE_EXTENDED
8254 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8255 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8257 #include <$cf_header>
8262 #ifdef NCURSES_VERSION
8268 printf("%s\\n", NCURSES_VERSION);
8281 rm -f "conftest.$ac_objext"
8282 if { (eval echo "$as_me:8282: \"$ac_compile\"") >&5
8283 (eval $ac_compile) 2>&5
8285 echo "$as_me:8285: \$? = $ac_status" >&5
8286 (exit "$ac_status"); } &&
8287 { ac_try='test -s "conftest.$ac_objext"'
8288 { (eval echo "$as_me:8288: \"$ac_try\"") >&5
8291 echo "$as_me:8291: \$? = $ac_status" >&5
8292 (exit "$ac_status"); }; }; then
8293 cf_cv_ncurses_h=$cf_header
8296 echo "$as_me: failed program was:" >&5
8297 cat "conftest.$ac_ext" >&5
8300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8302 test "$cf_cv_ncurses_h" != no && break
8306 echo "$as_me:8306: result: $cf_cv_ncurses_h" >&5
8307 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8309 if test "$cf_cv_ncurses_h" != no ; then
8310 cf_cv_ncurses_header=$cf_cv_ncurses_h
8313 echo "$as_me:8313: checking for $cf_ncuhdr_root include-path" >&5
8314 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8315 if test "${cf_cv_ncurses_h2+set}" = set; then
8316 echo $ECHO_N "(cached) $ECHO_C" >&6
8319 test -n "$verbose" && echo
8323 # collect the current set of include-directories from compiler flags
8324 cf_header_path_list=""
8325 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8326 for cf_header_path in $CPPFLAGS $CFLAGS
8328 case "$cf_header_path" in
8330 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8332 test "x$cf_header_path" != "xNONE" && \
8333 test -d "$cf_header_path" && \
8335 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8336 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8337 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8338 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8339 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8340 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"
8343 cf_header_path_list="$cf_header_path_list $cf_search"
8349 # add the variations for the package we are looking for
8353 test "x$prefix" != "xNONE" && \
8354 test -d "$prefix" && \
8356 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8357 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8358 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8359 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8360 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8361 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8364 for cf_subdir_prefix in \
8373 test "x$cf_subdir_prefix" != "x$prefix" && \
8374 test -d "$cf_subdir_prefix" && \
8375 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8376 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8377 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8378 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8379 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8380 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8381 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"
8386 test "$includedir" != NONE && \
8387 test "$includedir" != "/usr/include" && \
8388 test -d "$includedir" && {
8389 test -d "$includedir" && cf_search="$cf_search $includedir"
8390 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8393 test "$oldincludedir" != NONE && \
8394 test "$oldincludedir" != "/usr/include" && \
8395 test -d "$oldincludedir" && {
8396 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8397 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8400 cf_search="$cf_search $cf_header_path_list"
8402 test -n "$verbose" && echo "search path $cf_search"
8403 cf_save2_CPPFLAGS="$CPPFLAGS"
8404 for cf_incdir in $cf_search
8407 if test -n "$cf_incdir" ; then
8408 for cf_add_incdir in $cf_incdir
8410 while test "$cf_add_incdir" != /usr/include
8412 if test -d "$cf_add_incdir"
8415 if test -n "$CFLAGS$CPPFLAGS" ; then
8416 # a loop is needed to ensure we can add subdirs of existing dirs
8417 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8418 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8419 cf_have_incdir=yes; break
8424 if test "$cf_have_incdir" = no ; then
8425 if test "$cf_add_incdir" = /usr/local/include ; then
8426 if test "$GCC" = yes
8428 cf_save_CPPFLAGS=$CPPFLAGS
8430 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8431 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8433 cat >"conftest.$ac_ext" <<_ACEOF
8434 #line 8434 "configure"
8435 #include "confdefs.h"
8445 rm -f "conftest.$ac_objext"
8446 if { (eval echo "$as_me:8446: \"$ac_compile\"") >&5
8447 (eval $ac_compile) 2>&5
8449 echo "$as_me:8449: \$? = $ac_status" >&5
8450 (exit "$ac_status"); } &&
8451 { ac_try='test -s "conftest.$ac_objext"'
8452 { (eval echo "$as_me:8452: \"$ac_try\"") >&5
8455 echo "$as_me:8455: \$? = $ac_status" >&5
8456 (exit "$ac_status"); }; }; then
8459 echo "$as_me: failed program was:" >&5
8460 cat "conftest.$ac_ext" >&5
8463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8464 CPPFLAGS=$cf_save_CPPFLAGS
8469 if test "$cf_have_incdir" = no ; then
8470 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8472 echo "${as_me:-configure}:8472: testing adding $cf_add_incdir to include-path ..." 1>&5
8474 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8476 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8477 test "$cf_top_incdir" = "$cf_add_incdir" && break
8478 cf_add_incdir="$cf_top_incdir"
8494 cat >"conftest.$ac_ext" <<_ACEOF
8495 #line 8495 "configure"
8496 #include "confdefs.h"
8498 #include <$cf_header>
8503 #ifdef NCURSES_VERSION
8505 printf("%s\\n", NCURSES_VERSION);
8518 rm -f "conftest.$ac_objext"
8519 if { (eval echo "$as_me:8519: \"$ac_compile\"") >&5
8520 (eval $ac_compile) 2>&5
8522 echo "$as_me:8522: \$? = $ac_status" >&5
8523 (exit "$ac_status"); } &&
8524 { ac_try='test -s "conftest.$ac_objext"'
8525 { (eval echo "$as_me:8525: \"$ac_try\"") >&5
8528 echo "$as_me:8528: \$? = $ac_status" >&5
8529 (exit "$ac_status"); }; }; then
8530 cf_cv_ncurses_h2=$cf_header
8533 echo "$as_me: failed program was:" >&5
8534 cat "conftest.$ac_ext" >&5
8537 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8539 if test "$cf_cv_ncurses_h2" != no ; then
8540 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8541 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8544 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8546 CPPFLAGS="$cf_save2_CPPFLAGS"
8547 test "$cf_cv_ncurses_h2" != no && break
8549 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8549: error: not found" >&5
8550 echo "$as_me: error: not found" >&2;}
8551 { (exit 1); exit 1; }; }
8554 echo "$as_me:8554: result: $cf_cv_ncurses_h2" >&5
8555 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8557 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8558 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8559 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8560 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8563 if test -n "$cf_1st_incdir" ; then
8564 for cf_add_incdir in $cf_1st_incdir
8566 while test "$cf_add_incdir" != /usr/include
8568 if test -d "$cf_add_incdir"
8571 if test -n "$CFLAGS$CPPFLAGS" ; then
8572 # a loop is needed to ensure we can add subdirs of existing dirs
8573 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8574 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8575 cf_have_incdir=yes; break
8580 if test "$cf_have_incdir" = no ; then
8581 if test "$cf_add_incdir" = /usr/local/include ; then
8582 if test "$GCC" = yes
8584 cf_save_CPPFLAGS=$CPPFLAGS
8586 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8587 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8589 cat >"conftest.$ac_ext" <<_ACEOF
8590 #line 8590 "configure"
8591 #include "confdefs.h"
8601 rm -f "conftest.$ac_objext"
8602 if { (eval echo "$as_me:8602: \"$ac_compile\"") >&5
8603 (eval $ac_compile) 2>&5
8605 echo "$as_me:8605: \$? = $ac_status" >&5
8606 (exit "$ac_status"); } &&
8607 { ac_try='test -s "conftest.$ac_objext"'
8608 { (eval echo "$as_me:8608: \"$ac_try\"") >&5
8611 echo "$as_me:8611: \$? = $ac_status" >&5
8612 (exit "$ac_status"); }; }; then
8615 echo "$as_me: failed program was:" >&5
8616 cat "conftest.$ac_ext" >&5
8619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8620 CPPFLAGS=$cf_save_CPPFLAGS
8625 if test "$cf_have_incdir" = no ; then
8626 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8628 echo "${as_me:-configure}:8628: testing adding $cf_add_incdir to include-path ..." 1>&5
8630 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8632 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8633 test "$cf_top_incdir" = "$cf_add_incdir" && break
8634 cf_add_incdir="$cf_top_incdir"
8647 # Set definitions to allow ifdef'ing for ncurses.h
8649 case "$cf_cv_ncurses_header" in
8652 cat >>confdefs.h <<\EOF
8653 #define HAVE_NCURSES_H 1
8659 case "$cf_cv_ncurses_header" in
8660 (ncurses/curses.h|ncurses/ncurses.h)
8662 cat >>confdefs.h <<\EOF
8663 #define HAVE_NCURSES_NCURSES_H 1
8667 (ncursesw/curses.h|ncursesw/ncurses.h)
8669 cat >>confdefs.h <<\EOF
8670 #define HAVE_NCURSESW_NCURSES_H 1
8676 echo "$as_me:8676: checking for terminfo header" >&5
8677 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8678 if test "${cf_cv_term_header+set}" = set; then
8679 echo $ECHO_N "(cached) $ECHO_C" >&6
8682 case "${cf_cv_ncurses_header}" in
8683 (*/ncurses.h|*/ncursesw.h)
8684 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8687 cf_term_header=term.h
8691 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8693 cat >"conftest.$ac_ext" <<_ACEOF
8694 #line 8694 "configure"
8695 #include "confdefs.h"
8697 #include <${cf_cv_ncurses_header:-curses.h}>
8703 int x = auto_left_margin; (void)x
8708 rm -f "conftest.$ac_objext"
8709 if { (eval echo "$as_me:8709: \"$ac_compile\"") >&5
8710 (eval $ac_compile) 2>&5
8712 echo "$as_me:8712: \$? = $ac_status" >&5
8713 (exit "$ac_status"); } &&
8714 { ac_try='test -s "conftest.$ac_objext"'
8715 { (eval echo "$as_me:8715: \"$ac_try\"") >&5
8718 echo "$as_me:8718: \$? = $ac_status" >&5
8719 (exit "$ac_status"); }; }; then
8721 cf_cv_term_header="$cf_test"
8723 echo "$as_me: failed program was:" >&5
8724 cat "conftest.$ac_ext" >&5
8726 cf_cv_term_header=unknown
8729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8730 test "$cf_cv_term_header" != unknown && break
8734 echo "$as_me:8734: result: $cf_cv_term_header" >&5
8735 echo "${ECHO_T}$cf_cv_term_header" >&6
8737 # Set definitions to allow ifdef'ing to accommodate subdirectories
8739 case "$cf_cv_term_header" in
8742 cat >>confdefs.h <<\EOF
8743 #define HAVE_TERM_H 1
8749 case "$cf_cv_term_header" in
8752 cat >>confdefs.h <<\EOF
8753 #define HAVE_NCURSES_TERM_H 1
8759 cat >>confdefs.h <<\EOF
8760 #define HAVE_NCURSESW_TERM_H 1
8766 # some applications need this, but should check for NCURSES_VERSION
8768 cat >>confdefs.h <<\EOF
8772 echo "$as_me:8772: checking for ncurses version" >&5
8773 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8774 if test "${cf_cv_ncurses_version+set}" = set; then
8775 echo $ECHO_N "(cached) $ECHO_C" >&6
8778 cf_cv_ncurses_version=no
8780 rm -f "$cf_tempfile"
8781 if test "$cross_compiling" = yes; then
8783 # This will not work if the preprocessor splits the line after the
8784 # Autoconf token. The 'unproto' program does that.
8785 cat > "conftest.$ac_ext" <<EOF
8786 #include <${cf_cv_ncurses_header:-curses.h}>
8788 #ifdef NCURSES_VERSION
8789 Autoconf NCURSES_VERSION
8797 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8798 { (eval echo "$as_me:8798: \"$cf_try\"") >&5
8801 echo "$as_me:8801: \$? = $ac_status" >&5
8802 (exit "$ac_status"); }
8803 if test -f conftest.out ; then
8804 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8805 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8810 cat >"conftest.$ac_ext" <<_ACEOF
8811 #line 8811 "configure"
8812 #include "confdefs.h"
8814 $ac_includes_default
8816 #include <${cf_cv_ncurses_header:-curses.h}>
8820 FILE *fp = fopen("$cf_tempfile", "w");
8821 #ifdef NCURSES_VERSION
8822 # ifdef NCURSES_VERSION_PATCH
8823 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8825 fprintf(fp, "%s\\n", NCURSES_VERSION);
8829 fprintf(fp, "old\\n");
8834 ${cf_cv_main_return:-return}(0);
8837 rm -f "conftest$ac_exeext"
8838 if { (eval echo "$as_me:8838: \"$ac_link\"") >&5
8839 (eval $ac_link) 2>&5
8841 echo "$as_me:8841: \$? = $ac_status" >&5
8842 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8843 { (eval echo "$as_me:8843: \"$ac_try\"") >&5
8846 echo "$as_me:8846: \$? = $ac_status" >&5
8847 (exit "$ac_status"); }; }; then
8849 cf_cv_ncurses_version=`cat $cf_tempfile`
8851 echo "$as_me: program exited with status $ac_status" >&5
8852 echo "$as_me: failed program was:" >&5
8853 cat "conftest.$ac_ext" >&5
8855 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8857 rm -f "$cf_tempfile"
8860 echo "$as_me:8860: result: $cf_cv_ncurses_version" >&5
8861 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8862 test "$cf_cv_ncurses_version" = no ||
8863 cat >>confdefs.h <<\EOF
8867 cf_nculib_root=ncursesw
8868 # This works, except for the special case where we find gpm, but
8869 # ncurses is in a nonstandard location via $LIBS, and we really want
8872 cf_ncurses_SAVE="$LIBS"
8873 echo "$as_me:8873: checking for Gpm_Open in -lgpm" >&5
8874 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8875 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8876 echo $ECHO_N "(cached) $ECHO_C" >&6
8878 ac_check_lib_save_LIBS=$LIBS
8880 cat >"conftest.$ac_ext" <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8884 /* Override any gcc2 internal prototype to avoid an error. */
8888 /* We use char because int might match the return type of a gcc2
8889 builtin and then its argument prototype would still apply. */
8899 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8900 if { (eval echo "$as_me:8900: \"$ac_link\"") >&5
8901 (eval $ac_link) 2>&5
8903 echo "$as_me:8903: \$? = $ac_status" >&5
8904 (exit "$ac_status"); } &&
8905 { ac_try='test -s "conftest$ac_exeext"'
8906 { (eval echo "$as_me:8906: \"$ac_try\"") >&5
8909 echo "$as_me:8909: \$? = $ac_status" >&5
8910 (exit "$ac_status"); }; }; then
8911 ac_cv_lib_gpm_Gpm_Open=yes
8913 echo "$as_me: failed program was:" >&5
8914 cat "conftest.$ac_ext" >&5
8915 ac_cv_lib_gpm_Gpm_Open=no
8917 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8918 LIBS=$ac_check_lib_save_LIBS
8920 echo "$as_me:8920: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8921 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8922 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8923 echo "$as_me:8923: checking for initscr in -lgpm" >&5
8924 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8925 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8926 echo $ECHO_N "(cached) $ECHO_C" >&6
8928 ac_check_lib_save_LIBS=$LIBS
8930 cat >"conftest.$ac_ext" <<_ACEOF
8931 #line 8931 "configure"
8932 #include "confdefs.h"
8934 /* Override any gcc2 internal prototype to avoid an error. */
8938 /* We use char because int might match the return type of a gcc2
8939 builtin and then its argument prototype would still apply. */
8949 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8950 if { (eval echo "$as_me:8950: \"$ac_link\"") >&5
8951 (eval $ac_link) 2>&5
8953 echo "$as_me:8953: \$? = $ac_status" >&5
8954 (exit "$ac_status"); } &&
8955 { ac_try='test -s "conftest$ac_exeext"'
8956 { (eval echo "$as_me:8956: \"$ac_try\"") >&5
8959 echo "$as_me:8959: \$? = $ac_status" >&5
8960 (exit "$ac_status"); }; }; then
8961 ac_cv_lib_gpm_initscr=yes
8963 echo "$as_me: failed program was:" >&5
8964 cat "conftest.$ac_ext" >&5
8965 ac_cv_lib_gpm_initscr=no
8967 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8968 LIBS=$ac_check_lib_save_LIBS
8970 echo "$as_me:8970: result: $ac_cv_lib_gpm_initscr" >&5
8971 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8972 if test "$ac_cv_lib_gpm_initscr" = yes; then
8973 LIBS="$cf_ncurses_SAVE"
8975 cf_ncurses_LIBS="-lgpm"
8982 # This is only necessary if you are linking against an obsolete
8983 # version of ncurses (but it should do no harm, since it is static).
8984 if test "$cf_nculib_root" = ncurses ; then
8985 echo "$as_me:8985: checking for tgoto in -lmytinfo" >&5
8986 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8987 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8988 echo $ECHO_N "(cached) $ECHO_C" >&6
8990 ac_check_lib_save_LIBS=$LIBS
8991 LIBS="-lmytinfo $LIBS"
8992 cat >"conftest.$ac_ext" <<_ACEOF
8993 #line 8993 "configure"
8994 #include "confdefs.h"
8996 /* Override any gcc2 internal prototype to avoid an error. */
9000 /* We use char because int might match the return type of a gcc2
9001 builtin and then its argument prototype would still apply. */
9011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9012 if { (eval echo "$as_me:9012: \"$ac_link\"") >&5
9013 (eval $ac_link) 2>&5
9015 echo "$as_me:9015: \$? = $ac_status" >&5
9016 (exit "$ac_status"); } &&
9017 { ac_try='test -s "conftest$ac_exeext"'
9018 { (eval echo "$as_me:9018: \"$ac_try\"") >&5
9021 echo "$as_me:9021: \$? = $ac_status" >&5
9022 (exit "$ac_status"); }; }; then
9023 ac_cv_lib_mytinfo_tgoto=yes
9025 echo "$as_me: failed program was:" >&5
9026 cat "conftest.$ac_ext" >&5
9027 ac_cv_lib_mytinfo_tgoto=no
9029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9030 LIBS=$ac_check_lib_save_LIBS
9032 echo "$as_me:9032: result: $ac_cv_lib_mytinfo_tgoto" >&5
9033 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9034 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9035 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9045 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9047 for cf_add_1lib in $cf_add_0lib; do
9048 for cf_add_2lib in $cf_add_libs; do
9049 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9054 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9058 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9064 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9066 for cf_add_1lib in $cf_add_0lib; do
9067 for cf_add_2lib in $cf_add_libs; do
9068 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9073 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9079 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9081 echo "$as_me:9081: checking for initscr" >&5
9082 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9083 if test "${ac_cv_func_initscr+set}" = set; then
9084 echo $ECHO_N "(cached) $ECHO_C" >&6
9086 cat >"conftest.$ac_ext" <<_ACEOF
9087 #line 9087 "configure"
9088 #include "confdefs.h"
9089 #define initscr autoconf_temporary
9090 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9097 /* We use char because int might match the return type of a gcc2
9098 builtin and then its argument prototype would still apply. */
9099 char initscr (void);
9105 /* The GNU C library defines stubs for functions which it implements
9106 to always fail with ENOSYS. Some functions are actually named
9107 something starting with __ and the normal name is an alias. */
9108 #if defined (__stub_initscr) || defined (__stub___initscr)
9109 #error found stub for initscr
9117 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9118 if { (eval echo "$as_me:9118: \"$ac_link\"") >&5
9119 (eval $ac_link) 2>&5
9121 echo "$as_me:9121: \$? = $ac_status" >&5
9122 (exit "$ac_status"); } &&
9123 { ac_try='test -s "conftest$ac_exeext"'
9124 { (eval echo "$as_me:9124: \"$ac_try\"") >&5
9127 echo "$as_me:9127: \$? = $ac_status" >&5
9128 (exit "$ac_status"); }; }; then
9129 ac_cv_func_initscr=yes
9131 echo "$as_me: failed program was:" >&5
9132 cat "conftest.$ac_ext" >&5
9133 ac_cv_func_initscr=no
9135 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9137 echo "$as_me:9137: result: $ac_cv_func_initscr" >&5
9138 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9139 if test "$ac_cv_func_initscr" = yes; then
9140 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9143 cf_save_LIBS="$LIBS"
9144 echo "$as_me:9144: checking for initscr in -l$cf_nculib_root" >&5
9145 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9146 LIBS="-l$cf_nculib_root $LIBS"
9147 cat >"conftest.$ac_ext" <<_ACEOF
9148 #line 9148 "configure"
9149 #include "confdefs.h"
9150 #include <${cf_cv_ncurses_header:-curses.h}>
9159 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9160 if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
9161 (eval $ac_link) 2>&5
9163 echo "$as_me:9163: \$? = $ac_status" >&5
9164 (exit "$ac_status"); } &&
9165 { ac_try='test -s "conftest$ac_exeext"'
9166 { (eval echo "$as_me:9166: \"$ac_try\"") >&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit "$ac_status"); }; }; then
9171 echo "$as_me:9171: result: yes" >&5
9172 echo "${ECHO_T}yes" >&6
9173 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9176 echo "$as_me: failed program was:" >&5
9177 cat "conftest.$ac_ext" >&5
9178 echo "$as_me:9178: result: no" >&5
9179 echo "${ECHO_T}no" >&6
9182 cf_library_path_list=""
9183 if test -n "${LDFLAGS}${LIBS}" ; then
9184 for cf_library_path in $LDFLAGS $LIBS
9186 case "$cf_library_path" in
9188 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9190 test "x$cf_library_path" != "xNONE" && \
9191 test -d "$cf_library_path" && \
9193 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9194 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9195 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9196 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9197 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9198 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"
9201 cf_library_path_list="$cf_library_path_list $cf_search"
9209 test "x$prefix" != "xNONE" && \
9210 test -d "$prefix" && \
9212 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9213 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9214 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9215 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9216 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9217 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9220 for cf_subdir_prefix in \
9229 test "x$cf_subdir_prefix" != "x$prefix" && \
9230 test -d "$cf_subdir_prefix" && \
9231 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9232 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9233 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9234 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9235 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9236 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9237 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"
9242 cf_search="$cf_library_path_list $cf_search"
9244 for cf_libdir in $cf_search
9246 echo "$as_me:9246: checking for -l$cf_nculib_root in $cf_libdir" >&5
9247 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9248 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9249 cat >"conftest.$ac_ext" <<_ACEOF
9250 #line 9250 "configure"
9251 #include "confdefs.h"
9252 #include <${cf_cv_ncurses_header:-curses.h}>
9261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9262 if { (eval echo "$as_me:9262: \"$ac_link\"") >&5
9263 (eval $ac_link) 2>&5
9265 echo "$as_me:9265: \$? = $ac_status" >&5
9266 (exit "$ac_status"); } &&
9267 { ac_try='test -s "conftest$ac_exeext"'
9268 { (eval echo "$as_me:9268: \"$ac_try\"") >&5
9271 echo "$as_me:9271: \$? = $ac_status" >&5
9272 (exit "$ac_status"); }; }; then
9273 echo "$as_me:9273: result: yes" >&5
9274 echo "${ECHO_T}yes" >&6
9275 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9278 echo "$as_me: failed program was:" >&5
9279 cat "conftest.$ac_ext" >&5
9280 echo "$as_me:9280: result: no" >&5
9281 echo "${ECHO_T}no" >&6
9282 LIBS="$cf_save_LIBS"
9284 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9292 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9294 if test "$cf_found_library" = no ; then
9295 { { echo "$as_me:9295: error: Cannot link $cf_nculib_root library" >&5
9296 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9297 { (exit 1); exit 1; }; }
9302 if test -n "$cf_ncurses_LIBS" ; then
9303 echo "$as_me:9303: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9304 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9305 cf_ncurses_SAVE="$LIBS"
9306 for p in $cf_ncurses_LIBS ; do
9307 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9308 if test "$q" != "$LIBS" ; then
9312 cat >"conftest.$ac_ext" <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9315 #include <${cf_cv_ncurses_header:-curses.h}>
9319 initscr(); mousemask(0,0); tigetstr((char *)0);
9324 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9325 if { (eval echo "$as_me:9325: \"$ac_link\"") >&5
9326 (eval $ac_link) 2>&5
9328 echo "$as_me:9328: \$? = $ac_status" >&5
9329 (exit "$ac_status"); } &&
9330 { ac_try='test -s "conftest$ac_exeext"'
9331 { (eval echo "$as_me:9331: \"$ac_try\"") >&5
9334 echo "$as_me:9334: \$? = $ac_status" >&5
9335 (exit "$ac_status"); }; }; then
9336 echo "$as_me:9336: result: yes" >&5
9337 echo "${ECHO_T}yes" >&6
9339 echo "$as_me: failed program was:" >&5
9340 cat "conftest.$ac_ext" >&5
9341 echo "$as_me:9341: result: no" >&5
9342 echo "${ECHO_T}no" >&6
9343 LIBS="$cf_ncurses_SAVE"
9345 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9348 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9350 cat >>confdefs.h <<EOF
9351 #define $cf_nculib_ROOT 1
9361 cf_ncuconfig_root=ncurses
9362 cf_have_ncuconfig=no
9364 if test "x${PKG_CONFIG:=none}" != xnone; then
9365 echo "$as_me:9365: checking pkg-config for $cf_ncuconfig_root" >&5
9366 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9367 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9368 echo "$as_me:9368: result: yes" >&5
9369 echo "${ECHO_T}yes" >&6
9371 echo "$as_me:9371: checking if the $cf_ncuconfig_root package files work" >&5
9372 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9373 cf_have_ncuconfig=unknown
9375 cf_save_CFLAGS="$CFLAGS"
9376 cf_save_CPPFLAGS="$CPPFLAGS"
9377 cf_save_LIBS="$LIBS"
9379 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9380 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9382 # while -W for passing linker flags is prevalent, it is not "standard".
9383 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9384 # incompatible _and_ non-standard -W option which gives an error. Work
9385 # around that pitfall.
9386 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9392 cf_new_extra_cppflags=
9394 for cf_add_cflags in $cf_pkg_cflags
9396 case "$cf_fix_cppflags" in
9398 case "$cf_add_cflags" in
9399 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9400 case "$cf_add_cflags" in
9402 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9404 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9405 && test -z "${cf_tst_cflags}" \
9406 && cf_fix_cppflags=yes
9408 if test "$cf_fix_cppflags" = yes ; then
9410 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9411 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9414 elif test "${cf_tst_cflags}" = "\"'" ; then
9416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9427 case "$cf_add_cflags" in
9429 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9431 CPPFLAGS=`echo "$CPPFLAGS" | \
9432 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9433 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9438 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9439 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9446 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9447 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9457 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9459 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9460 && test -z "${cf_tst_cflags}" \
9461 && cf_fix_cppflags=no
9466 if test -n "$cf_new_cflags" ; then
9468 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9469 CFLAGS="${CFLAGS}$cf_new_cflags"
9473 if test -n "$cf_new_cppflags" ; then
9475 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9476 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9480 if test -n "$cf_new_extra_cppflags" ; then
9482 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9483 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9490 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9492 for cf_add_1lib in $cf_add_0lib; do
9493 for cf_add_2lib in $cf_add_libs; do
9494 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9499 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9503 cat >"conftest.$ac_ext" <<_ACEOF
9504 #line 9504 "configure"
9505 #include "confdefs.h"
9506 #include <${cf_cv_ncurses_header:-curses.h}>
9510 initscr(); mousemask(0,0); tigetstr((char *)0);
9515 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9516 if { (eval echo "$as_me:9516: \"$ac_link\"") >&5
9517 (eval $ac_link) 2>&5
9519 echo "$as_me:9519: \$? = $ac_status" >&5
9520 (exit "$ac_status"); } &&
9521 { ac_try='test -s "conftest$ac_exeext"'
9522 { (eval echo "$as_me:9522: \"$ac_try\"") >&5
9525 echo "$as_me:9525: \$? = $ac_status" >&5
9526 (exit "$ac_status"); }; }; then
9527 if test "$cross_compiling" = yes; then
9528 cf_test_ncuconfig=maybe
9530 cat >"conftest.$ac_ext" <<_ACEOF
9531 #line 9531 "configure"
9532 #include "confdefs.h"
9533 #include <${cf_cv_ncurses_header:-curses.h}>
9535 { const char *xx = curses_version(); return (xx == 0); }
9537 rm -f "conftest$ac_exeext"
9538 if { (eval echo "$as_me:9538: \"$ac_link\"") >&5
9539 (eval $ac_link) 2>&5
9541 echo "$as_me:9541: \$? = $ac_status" >&5
9542 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9543 { (eval echo "$as_me:9543: \"$ac_try\"") >&5
9546 echo "$as_me:9546: \$? = $ac_status" >&5
9547 (exit "$ac_status"); }; }; then
9548 cf_test_ncuconfig=yes
9550 echo "$as_me: program exited with status $ac_status" >&5
9551 echo "$as_me: failed program was:" >&5
9552 cat "conftest.$ac_ext" >&5
9553 cf_test_ncuconfig=no
9555 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9558 echo "$as_me: failed program was:" >&5
9559 cat "conftest.$ac_ext" >&5
9560 cf_test_ncuconfig=no
9562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9564 CFLAGS="$cf_save_CFLAGS"
9565 CPPFLAGS="$cf_save_CPPFLAGS"
9566 LIBS="$cf_save_LIBS"
9568 if test "x$cf_test_ncuconfig" != xyes; then
9569 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9570 cf_pkg_cflags="$cf_temp"
9571 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9572 cf_pkg_libs="$cf_temp"
9577 for cf_add_cflags in $cf_pkg_cflags
9579 case "x$cf_add_cflags" in
9582 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9585 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'`
9586 test "$CFLAGS" != "$cf_old_cflag" || break
9588 CFLAGS="$cf_old_cflag"
9591 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9594 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'`
9595 test "$CPPFLAGS" != "$cf_old_cflag" || break
9597 CPPFLAGS="$cf_old_cflag"
9606 cf_new_extra_cppflags=
9608 for cf_add_cflags in $cf_add_cflags
9610 case "$cf_fix_cppflags" in
9612 case "$cf_add_cflags" in
9613 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9614 case "$cf_add_cflags" in
9616 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9618 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9619 && test -z "${cf_tst_cflags}" \
9620 && cf_fix_cppflags=yes
9622 if test "$cf_fix_cppflags" = yes ; then
9624 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9625 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9628 elif test "${cf_tst_cflags}" = "\"'" ; then
9630 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9631 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9641 case "$cf_add_cflags" in
9643 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9645 CPPFLAGS=`echo "$CPPFLAGS" | \
9646 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9647 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9652 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9653 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9660 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9661 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9668 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9669 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9671 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9673 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9674 && test -z "${cf_tst_cflags}" \
9675 && cf_fix_cppflags=no
9680 if test -n "$cf_new_cflags" ; then
9682 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9683 CFLAGS="${CFLAGS}$cf_new_cflags"
9687 if test -n "$cf_new_cppflags" ; then
9689 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9690 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9694 if test -n "$cf_new_extra_cppflags" ; then
9696 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9697 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9706 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9708 for cf_add_1lib in $cf_add_0lib; do
9709 for cf_add_2lib in $cf_add_libs; do
9710 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9715 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9719 cat >"conftest.$ac_ext" <<_ACEOF
9720 #line 9720 "configure"
9721 #include "confdefs.h"
9722 #include <${cf_cv_ncurses_header:-curses.h}>
9726 initscr(); mousemask(0,0); tigetstr((char *)0);
9731 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9732 if { (eval echo "$as_me:9732: \"$ac_link\"") >&5
9733 (eval $ac_link) 2>&5
9735 echo "$as_me:9735: \$? = $ac_status" >&5
9736 (exit "$ac_status"); } &&
9737 { ac_try='test -s "conftest$ac_exeext"'
9738 { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9741 echo "$as_me:9741: \$? = $ac_status" >&5
9742 (exit "$ac_status"); }; }; then
9743 if test "$cross_compiling" = yes; then
9744 cf_have_ncuconfig=maybe
9746 cat >"conftest.$ac_ext" <<_ACEOF
9747 #line 9747 "configure"
9748 #include "confdefs.h"
9749 #include <${cf_cv_ncurses_header:-curses.h}>
9751 { const char *xx = curses_version(); return (xx == 0); }
9753 rm -f "conftest$ac_exeext"
9754 if { (eval echo "$as_me:9754: \"$ac_link\"") >&5
9755 (eval $ac_link) 2>&5
9757 echo "$as_me:9757: \$? = $ac_status" >&5
9758 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9759 { (eval echo "$as_me:9759: \"$ac_try\"") >&5
9762 echo "$as_me:9762: \$? = $ac_status" >&5
9763 (exit "$ac_status"); }; }; then
9764 cf_have_ncuconfig=yes
9766 echo "$as_me: program exited with status $ac_status" >&5
9767 echo "$as_me: failed program was:" >&5
9768 cat "conftest.$ac_ext" >&5
9769 cf_have_ncuconfig=no
9771 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9774 echo "$as_me: failed program was:" >&5
9775 cat "conftest.$ac_ext" >&5
9776 cf_have_ncuconfig=no
9778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9779 echo "$as_me:9779: result: $cf_have_ncuconfig" >&5
9780 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9781 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9782 if test "$cf_have_ncuconfig" != "yes"
9784 CPPFLAGS="$cf_save_CPPFLAGS"
9785 LIBS="$cf_save_LIBS"
9786 NCURSES_CONFIG_PKG=none
9789 cat >>confdefs.h <<\EOF
9793 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9795 echo "$as_me:9795: checking for terminfo header" >&5
9796 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9797 if test "${cf_cv_term_header+set}" = set; then
9798 echo $ECHO_N "(cached) $ECHO_C" >&6
9801 case "${cf_cv_ncurses_header}" in
9802 (*/ncurses.h|*/ncursesw.h)
9803 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9806 cf_term_header=term.h
9810 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9812 cat >"conftest.$ac_ext" <<_ACEOF
9813 #line 9813 "configure"
9814 #include "confdefs.h"
9816 #include <${cf_cv_ncurses_header:-curses.h}>
9822 int x = auto_left_margin; (void)x
9827 rm -f "conftest.$ac_objext"
9828 if { (eval echo "$as_me:9828: \"$ac_compile\"") >&5
9829 (eval $ac_compile) 2>&5
9831 echo "$as_me:9831: \$? = $ac_status" >&5
9832 (exit "$ac_status"); } &&
9833 { ac_try='test -s "conftest.$ac_objext"'
9834 { (eval echo "$as_me:9834: \"$ac_try\"") >&5
9837 echo "$as_me:9837: \$? = $ac_status" >&5
9838 (exit "$ac_status"); }; }; then
9840 cf_cv_term_header="$cf_test"
9842 echo "$as_me: failed program was:" >&5
9843 cat "conftest.$ac_ext" >&5
9845 cf_cv_term_header=unknown
9848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9849 test "$cf_cv_term_header" != unknown && break
9853 echo "$as_me:9853: result: $cf_cv_term_header" >&5
9854 echo "${ECHO_T}$cf_cv_term_header" >&6
9856 # Set definitions to allow ifdef'ing to accommodate subdirectories
9858 case "$cf_cv_term_header" in
9861 cat >>confdefs.h <<\EOF
9862 #define HAVE_TERM_H 1
9868 case "$cf_cv_term_header" in
9871 cat >>confdefs.h <<\EOF
9872 #define HAVE_NCURSES_TERM_H 1
9878 cat >>confdefs.h <<\EOF
9879 #define HAVE_NCURSESW_TERM_H 1
9888 echo "$as_me:9888: result: no" >&5
9889 echo "${ECHO_T}no" >&6
9890 NCURSES_CONFIG_PKG=none
9893 NCURSES_CONFIG_PKG=none
9896 if test "x$cf_have_ncuconfig" = "xno"; then
9897 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9899 if test -n "$ac_tool_prefix"; then
9900 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9903 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9904 echo "$as_me:9904: checking for $ac_word" >&5
9905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9906 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9907 echo $ECHO_N "(cached) $ECHO_C" >&6
9909 if test -n "$NCURSES_CONFIG"; then
9910 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9912 ac_save_IFS=$IFS; IFS=$ac_path_separator
9914 for ac_dir in $ac_dummy; do
9916 test -z "$ac_dir" && ac_dir=.
9917 $as_executable_p "$ac_dir/$ac_word" || continue
9918 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9919 echo "$as_me:9919: found $ac_dir/$ac_word" >&5
9925 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9926 if test -n "$NCURSES_CONFIG"; then
9927 echo "$as_me:9927: result: $NCURSES_CONFIG" >&5
9928 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9930 echo "$as_me:9930: result: no" >&5
9931 echo "${ECHO_T}no" >&6
9934 test -n "$NCURSES_CONFIG" && break
9937 if test -z "$NCURSES_CONFIG"; then
9938 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9939 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9941 # Extract the first word of "$ac_prog", so it can be a program name with args.
9942 set dummy $ac_prog; ac_word=$2
9943 echo "$as_me:9943: checking for $ac_word" >&5
9944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9945 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9946 echo $ECHO_N "(cached) $ECHO_C" >&6
9948 if test -n "$ac_ct_NCURSES_CONFIG"; then
9949 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9951 ac_save_IFS=$IFS; IFS=$ac_path_separator
9953 for ac_dir in $ac_dummy; do
9955 test -z "$ac_dir" && ac_dir=.
9956 $as_executable_p "$ac_dir/$ac_word" || continue
9957 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9958 echo "$as_me:9958: found $ac_dir/$ac_word" >&5
9964 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9965 if test -n "$ac_ct_NCURSES_CONFIG"; then
9966 echo "$as_me:9966: result: $ac_ct_NCURSES_CONFIG" >&5
9967 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9969 echo "$as_me:9969: result: no" >&5
9970 echo "${ECHO_T}no" >&6
9973 test -n "$ac_ct_NCURSES_CONFIG" && break
9975 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9977 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9980 if test "$NCURSES_CONFIG" != none ; then
9982 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9984 case "x$cf_add_cflags" in
9987 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9990 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'`
9991 test "$CFLAGS" != "$cf_old_cflag" || break
9993 CFLAGS="$cf_old_cflag"
9996 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9999 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'`
10000 test "$CPPFLAGS" != "$cf_old_cflag" || break
10002 CPPFLAGS="$cf_old_cflag"
10011 cf_new_extra_cppflags=
10013 for cf_add_cflags in $cf_add_cflags
10015 case "$cf_fix_cppflags" in
10017 case "$cf_add_cflags" in
10018 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10019 case "$cf_add_cflags" in
10021 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10023 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10024 && test -z "${cf_tst_cflags}" \
10025 && cf_fix_cppflags=yes
10027 if test "$cf_fix_cppflags" = yes ; then
10029 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10030 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10033 elif test "${cf_tst_cflags}" = "\"'" ; then
10035 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10036 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10042 case "$CPPFLAGS" in
10046 case "$cf_add_cflags" in
10048 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10050 CPPFLAGS=`echo "$CPPFLAGS" | \
10051 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10052 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10057 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10058 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10065 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10066 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10073 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10074 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10076 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10078 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10079 && test -z "${cf_tst_cflags}" \
10080 && cf_fix_cppflags=no
10085 if test -n "$cf_new_cflags" ; then
10087 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10088 CFLAGS="${CFLAGS}$cf_new_cflags"
10092 if test -n "$cf_new_cppflags" ; then
10094 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10095 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10099 if test -n "$cf_new_extra_cppflags" ; then
10101 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10102 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10108 cf_add_libs="$LIBS"
10111 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10112 # filter duplicates
10113 for cf_add_1lib in $cf_add_0lib; do
10114 for cf_add_2lib in $cf_add_libs; do
10115 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10120 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10122 LIBS="$cf_add_libs"
10124 # even with config script, some packages use no-override for curses.h
10126 echo "$as_me:10126: checking if we have identified curses headers" >&5
10127 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10128 if test "${cf_cv_ncurses_header+set}" = set; then
10129 echo $ECHO_N "(cached) $ECHO_C" >&6
10132 cf_cv_ncurses_header=none
10134 ncurses.h ncurses/ncurses.h \
10135 curses.h ncurses/curses.h
10137 cat >"conftest.$ac_ext" <<_ACEOF
10138 #line 10138 "configure"
10139 #include "confdefs.h"
10140 #include <${cf_header}>
10144 initscr(); endwin()
10149 rm -f "conftest.$ac_objext"
10150 if { (eval echo "$as_me:10150: \"$ac_compile\"") >&5
10151 (eval $ac_compile) 2>&5
10153 echo "$as_me:10153: \$? = $ac_status" >&5
10154 (exit "$ac_status"); } &&
10155 { ac_try='test -s "conftest.$ac_objext"'
10156 { (eval echo "$as_me:10156: \"$ac_try\"") >&5
10157 (eval $ac_try) 2>&5
10159 echo "$as_me:10159: \$? = $ac_status" >&5
10160 (exit "$ac_status"); }; }; then
10161 cf_cv_ncurses_header=$cf_header; break
10163 echo "$as_me: failed program was:" >&5
10164 cat "conftest.$ac_ext" >&5
10166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10170 echo "$as_me:10170: result: $cf_cv_ncurses_header" >&5
10171 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10173 if test "$cf_cv_ncurses_header" = none ; then
10174 { { echo "$as_me:10174: error: No curses header-files found" >&5
10175 echo "$as_me: error: No curses header-files found" >&2;}
10176 { (exit 1); exit 1; }; }
10179 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10181 for ac_header in $cf_cv_ncurses_header
10183 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10184 echo "$as_me:10184: checking for $ac_header" >&5
10185 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10186 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10187 echo $ECHO_N "(cached) $ECHO_C" >&6
10189 cat >"conftest.$ac_ext" <<_ACEOF
10190 #line 10190 "configure"
10191 #include "confdefs.h"
10192 #include <$ac_header>
10194 if { (eval echo "$as_me:10194: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10195 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10197 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10199 cat conftest.err >&5
10200 echo "$as_me:10200: \$? = $ac_status" >&5
10201 (exit "$ac_status"); } >/dev/null; then
10202 if test -s conftest.err; then
10203 ac_cpp_err=$ac_c_preproc_warn_flag
10210 if test -z "$ac_cpp_err"; then
10211 eval "$as_ac_Header=yes"
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10215 eval "$as_ac_Header=no"
10217 rm -f conftest.err "conftest.$ac_ext"
10219 echo "$as_me:10219: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10220 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10221 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10222 cat >>confdefs.h <<EOF
10223 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10229 cat >>confdefs.h <<\EOF
10233 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10235 cat >>confdefs.h <<EOF
10236 #define $cf_nculib_ROOT 1
10239 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10243 cf_ncuhdr_root=ncurses
10245 test -n "$cf_cv_curses_dir" && \
10246 test "$cf_cv_curses_dir" != "no" && { \
10248 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10249 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10251 while test "$cf_add_incdir" != /usr/include
10253 if test -d "$cf_add_incdir"
10256 if test -n "$CFLAGS$CPPFLAGS" ; then
10257 # a loop is needed to ensure we can add subdirs of existing dirs
10258 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10259 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10260 cf_have_incdir=yes; break
10265 if test "$cf_have_incdir" = no ; then
10266 if test "$cf_add_incdir" = /usr/local/include ; then
10267 if test "$GCC" = yes
10269 cf_save_CPPFLAGS=$CPPFLAGS
10271 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10272 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10274 cat >"conftest.$ac_ext" <<_ACEOF
10275 #line 10275 "configure"
10276 #include "confdefs.h"
10286 rm -f "conftest.$ac_objext"
10287 if { (eval echo "$as_me:10287: \"$ac_compile\"") >&5
10288 (eval $ac_compile) 2>&5
10290 echo "$as_me:10290: \$? = $ac_status" >&5
10291 (exit "$ac_status"); } &&
10292 { ac_try='test -s "conftest.$ac_objext"'
10293 { (eval echo "$as_me:10293: \"$ac_try\"") >&5
10294 (eval $ac_try) 2>&5
10296 echo "$as_me:10296: \$? = $ac_status" >&5
10297 (exit "$ac_status"); }; }; then
10300 echo "$as_me: failed program was:" >&5
10301 cat "conftest.$ac_ext" >&5
10304 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10305 CPPFLAGS=$cf_save_CPPFLAGS
10310 if test "$cf_have_incdir" = no ; then
10311 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10313 echo "${as_me:-configure}:10313: testing adding $cf_add_incdir to include-path ..." 1>&5
10315 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10317 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10318 test "$cf_top_incdir" = "$cf_add_incdir" && break
10319 cf_add_incdir="$cf_top_incdir"
10332 echo "$as_me:10332: checking for $cf_ncuhdr_root header in include-path" >&5
10333 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10334 if test "${cf_cv_ncurses_h+set}" = set; then
10335 echo $ECHO_N "(cached) $ECHO_C" >&6
10338 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10339 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10340 for cf_header in $cf_header_list
10343 cat >"conftest.$ac_ext" <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10347 #include <$cf_header>
10352 #ifdef NCURSES_VERSION
10354 printf("%s\\n", NCURSES_VERSION);
10367 rm -f "conftest.$ac_objext"
10368 if { (eval echo "$as_me:10368: \"$ac_compile\"") >&5
10369 (eval $ac_compile) 2>&5
10371 echo "$as_me:10371: \$? = $ac_status" >&5
10372 (exit "$ac_status"); } &&
10373 { ac_try='test -s "conftest.$ac_objext"'
10374 { (eval echo "$as_me:10374: \"$ac_try\"") >&5
10375 (eval $ac_try) 2>&5
10377 echo "$as_me:10377: \$? = $ac_status" >&5
10378 (exit "$ac_status"); }; }; then
10379 cf_cv_ncurses_h=$cf_header
10382 echo "$as_me: failed program was:" >&5
10383 cat "conftest.$ac_ext" >&5
10386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10388 test "$cf_cv_ncurses_h" != no && break
10392 echo "$as_me:10392: result: $cf_cv_ncurses_h" >&5
10393 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10395 if test "$cf_cv_ncurses_h" != no ; then
10396 cf_cv_ncurses_header=$cf_cv_ncurses_h
10399 echo "$as_me:10399: checking for $cf_ncuhdr_root include-path" >&5
10400 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10401 if test "${cf_cv_ncurses_h2+set}" = set; then
10402 echo $ECHO_N "(cached) $ECHO_C" >&6
10405 test -n "$verbose" && echo
10409 # collect the current set of include-directories from compiler flags
10410 cf_header_path_list=""
10411 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10412 for cf_header_path in $CPPFLAGS $CFLAGS
10414 case "$cf_header_path" in
10416 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10418 test "x$cf_header_path" != "xNONE" && \
10419 test -d "$cf_header_path" && \
10421 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10422 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10423 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10424 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10425 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10426 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"
10429 cf_header_path_list="$cf_header_path_list $cf_search"
10435 # add the variations for the package we are looking for
10439 test "x$prefix" != "xNONE" && \
10440 test -d "$prefix" && \
10442 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10443 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10444 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10445 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10446 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10447 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10450 for cf_subdir_prefix in \
10459 test "x$cf_subdir_prefix" != "x$prefix" && \
10460 test -d "$cf_subdir_prefix" && \
10461 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10462 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10463 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10464 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10465 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10466 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10467 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"
10472 test "$includedir" != NONE && \
10473 test "$includedir" != "/usr/include" && \
10474 test -d "$includedir" && {
10475 test -d "$includedir" && cf_search="$cf_search $includedir"
10476 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10479 test "$oldincludedir" != NONE && \
10480 test "$oldincludedir" != "/usr/include" && \
10481 test -d "$oldincludedir" && {
10482 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10483 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10486 cf_search="$cf_search $cf_header_path_list"
10488 test -n "$verbose" && echo "search path $cf_search"
10489 cf_save2_CPPFLAGS="$CPPFLAGS"
10490 for cf_incdir in $cf_search
10493 if test -n "$cf_incdir" ; then
10494 for cf_add_incdir in $cf_incdir
10496 while test "$cf_add_incdir" != /usr/include
10498 if test -d "$cf_add_incdir"
10501 if test -n "$CFLAGS$CPPFLAGS" ; then
10502 # a loop is needed to ensure we can add subdirs of existing dirs
10503 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10504 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10505 cf_have_incdir=yes; break
10510 if test "$cf_have_incdir" = no ; then
10511 if test "$cf_add_incdir" = /usr/local/include ; then
10512 if test "$GCC" = yes
10514 cf_save_CPPFLAGS=$CPPFLAGS
10516 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10517 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10519 cat >"conftest.$ac_ext" <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10531 rm -f "conftest.$ac_objext"
10532 if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5
10533 (eval $ac_compile) 2>&5
10535 echo "$as_me:10535: \$? = $ac_status" >&5
10536 (exit "$ac_status"); } &&
10537 { ac_try='test -s "conftest.$ac_objext"'
10538 { (eval echo "$as_me:10538: \"$ac_try\"") >&5
10539 (eval $ac_try) 2>&5
10541 echo "$as_me:10541: \$? = $ac_status" >&5
10542 (exit "$ac_status"); }; }; then
10545 echo "$as_me: failed program was:" >&5
10546 cat "conftest.$ac_ext" >&5
10549 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10550 CPPFLAGS=$cf_save_CPPFLAGS
10555 if test "$cf_have_incdir" = no ; then
10556 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10558 echo "${as_me:-configure}:10558: testing adding $cf_add_incdir to include-path ..." 1>&5
10560 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10562 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10563 test "$cf_top_incdir" = "$cf_add_incdir" && break
10564 cf_add_incdir="$cf_top_incdir"
10580 cat >"conftest.$ac_ext" <<_ACEOF
10581 #line 10581 "configure"
10582 #include "confdefs.h"
10584 #include <$cf_header>
10589 #ifdef NCURSES_VERSION
10591 printf("%s\\n", NCURSES_VERSION);
10604 rm -f "conftest.$ac_objext"
10605 if { (eval echo "$as_me:10605: \"$ac_compile\"") >&5
10606 (eval $ac_compile) 2>&5
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit "$ac_status"); } &&
10610 { ac_try='test -s "conftest.$ac_objext"'
10611 { (eval echo "$as_me:10611: \"$ac_try\"") >&5
10612 (eval $ac_try) 2>&5
10614 echo "$as_me:10614: \$? = $ac_status" >&5
10615 (exit "$ac_status"); }; }; then
10616 cf_cv_ncurses_h2=$cf_header
10619 echo "$as_me: failed program was:" >&5
10620 cat "conftest.$ac_ext" >&5
10621 cf_cv_ncurses_h2=no
10623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10625 if test "$cf_cv_ncurses_h2" != no ; then
10626 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10627 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10630 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10632 CPPFLAGS="$cf_save2_CPPFLAGS"
10633 test "$cf_cv_ncurses_h2" != no && break
10635 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10635: error: not found" >&5
10636 echo "$as_me: error: not found" >&2;}
10637 { (exit 1); exit 1; }; }
10640 echo "$as_me:10640: result: $cf_cv_ncurses_h2" >&5
10641 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10643 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10644 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10645 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10646 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10649 if test -n "$cf_1st_incdir" ; then
10650 for cf_add_incdir in $cf_1st_incdir
10652 while test "$cf_add_incdir" != /usr/include
10654 if test -d "$cf_add_incdir"
10657 if test -n "$CFLAGS$CPPFLAGS" ; then
10658 # a loop is needed to ensure we can add subdirs of existing dirs
10659 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10660 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10661 cf_have_incdir=yes; break
10666 if test "$cf_have_incdir" = no ; then
10667 if test "$cf_add_incdir" = /usr/local/include ; then
10668 if test "$GCC" = yes
10670 cf_save_CPPFLAGS=$CPPFLAGS
10672 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10673 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10675 cat >"conftest.$ac_ext" <<_ACEOF
10676 #line 10676 "configure"
10677 #include "confdefs.h"
10687 rm -f "conftest.$ac_objext"
10688 if { (eval echo "$as_me:10688: \"$ac_compile\"") >&5
10689 (eval $ac_compile) 2>&5
10691 echo "$as_me:10691: \$? = $ac_status" >&5
10692 (exit "$ac_status"); } &&
10693 { ac_try='test -s "conftest.$ac_objext"'
10694 { (eval echo "$as_me:10694: \"$ac_try\"") >&5
10695 (eval $ac_try) 2>&5
10697 echo "$as_me:10697: \$? = $ac_status" >&5
10698 (exit "$ac_status"); }; }; then
10701 echo "$as_me: failed program was:" >&5
10702 cat "conftest.$ac_ext" >&5
10705 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10706 CPPFLAGS=$cf_save_CPPFLAGS
10711 if test "$cf_have_incdir" = no ; then
10712 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10714 echo "${as_me:-configure}:10714: testing adding $cf_add_incdir to include-path ..." 1>&5
10716 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10718 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10719 test "$cf_top_incdir" = "$cf_add_incdir" && break
10720 cf_add_incdir="$cf_top_incdir"
10733 # Set definitions to allow ifdef'ing for ncurses.h
10735 case "$cf_cv_ncurses_header" in
10738 cat >>confdefs.h <<\EOF
10739 #define HAVE_NCURSES_H 1
10745 case "$cf_cv_ncurses_header" in
10746 (ncurses/curses.h|ncurses/ncurses.h)
10748 cat >>confdefs.h <<\EOF
10749 #define HAVE_NCURSES_NCURSES_H 1
10753 (ncursesw/curses.h|ncursesw/ncurses.h)
10755 cat >>confdefs.h <<\EOF
10756 #define HAVE_NCURSESW_NCURSES_H 1
10762 echo "$as_me:10762: checking for terminfo header" >&5
10763 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10764 if test "${cf_cv_term_header+set}" = set; then
10765 echo $ECHO_N "(cached) $ECHO_C" >&6
10768 case "${cf_cv_ncurses_header}" in
10769 (*/ncurses.h|*/ncursesw.h)
10770 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10773 cf_term_header=term.h
10777 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10779 cat >"conftest.$ac_ext" <<_ACEOF
10780 #line 10780 "configure"
10781 #include "confdefs.h"
10783 #include <${cf_cv_ncurses_header:-curses.h}>
10784 #include <$cf_test>
10789 int x = auto_left_margin; (void)x
10794 rm -f "conftest.$ac_objext"
10795 if { (eval echo "$as_me:10795: \"$ac_compile\"") >&5
10796 (eval $ac_compile) 2>&5
10798 echo "$as_me:10798: \$? = $ac_status" >&5
10799 (exit "$ac_status"); } &&
10800 { ac_try='test -s "conftest.$ac_objext"'
10801 { (eval echo "$as_me:10801: \"$ac_try\"") >&5
10802 (eval $ac_try) 2>&5
10804 echo "$as_me:10804: \$? = $ac_status" >&5
10805 (exit "$ac_status"); }; }; then
10807 cf_cv_term_header="$cf_test"
10809 echo "$as_me: failed program was:" >&5
10810 cat "conftest.$ac_ext" >&5
10812 cf_cv_term_header=unknown
10815 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10816 test "$cf_cv_term_header" != unknown && break
10820 echo "$as_me:10820: result: $cf_cv_term_header" >&5
10821 echo "${ECHO_T}$cf_cv_term_header" >&6
10823 # Set definitions to allow ifdef'ing to accommodate subdirectories
10825 case "$cf_cv_term_header" in
10828 cat >>confdefs.h <<\EOF
10829 #define HAVE_TERM_H 1
10835 case "$cf_cv_term_header" in
10838 cat >>confdefs.h <<\EOF
10839 #define HAVE_NCURSES_TERM_H 1
10845 cat >>confdefs.h <<\EOF
10846 #define HAVE_NCURSESW_TERM_H 1
10852 # some applications need this, but should check for NCURSES_VERSION
10854 cat >>confdefs.h <<\EOF
10858 echo "$as_me:10858: checking for ncurses version" >&5
10859 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10860 if test "${cf_cv_ncurses_version+set}" = set; then
10861 echo $ECHO_N "(cached) $ECHO_C" >&6
10864 cf_cv_ncurses_version=no
10866 rm -f "$cf_tempfile"
10867 if test "$cross_compiling" = yes; then
10869 # This will not work if the preprocessor splits the line after the
10870 # Autoconf token. The 'unproto' program does that.
10871 cat > "conftest.$ac_ext" <<EOF
10872 #include <${cf_cv_ncurses_header:-curses.h}>
10874 #ifdef NCURSES_VERSION
10875 Autoconf NCURSES_VERSION
10883 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10884 { (eval echo "$as_me:10884: \"$cf_try\"") >&5
10885 (eval $cf_try) 2>&5
10887 echo "$as_me:10887: \$? = $ac_status" >&5
10888 (exit "$ac_status"); }
10889 if test -f conftest.out ; then
10890 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10891 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10896 cat >"conftest.$ac_ext" <<_ACEOF
10897 #line 10897 "configure"
10898 #include "confdefs.h"
10900 $ac_includes_default
10902 #include <${cf_cv_ncurses_header:-curses.h}>
10906 FILE *fp = fopen("$cf_tempfile", "w");
10907 #ifdef NCURSES_VERSION
10908 # ifdef NCURSES_VERSION_PATCH
10909 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10911 fprintf(fp, "%s\\n", NCURSES_VERSION);
10914 # ifdef __NCURSES_H
10915 fprintf(fp, "old\\n");
10920 ${cf_cv_main_return:-return}(0);
10923 rm -f "conftest$ac_exeext"
10924 if { (eval echo "$as_me:10924: \"$ac_link\"") >&5
10925 (eval $ac_link) 2>&5
10927 echo "$as_me:10927: \$? = $ac_status" >&5
10928 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10929 { (eval echo "$as_me:10929: \"$ac_try\"") >&5
10930 (eval $ac_try) 2>&5
10932 echo "$as_me:10932: \$? = $ac_status" >&5
10933 (exit "$ac_status"); }; }; then
10935 cf_cv_ncurses_version=`cat $cf_tempfile`
10937 echo "$as_me: program exited with status $ac_status" >&5
10938 echo "$as_me: failed program was:" >&5
10939 cat "conftest.$ac_ext" >&5
10941 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10943 rm -f "$cf_tempfile"
10946 echo "$as_me:10946: result: $cf_cv_ncurses_version" >&5
10947 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10948 test "$cf_cv_ncurses_version" = no ||
10949 cat >>confdefs.h <<\EOF
10953 cf_nculib_root=ncurses
10954 # This works, except for the special case where we find gpm, but
10955 # ncurses is in a nonstandard location via $LIBS, and we really want
10958 cf_ncurses_SAVE="$LIBS"
10959 echo "$as_me:10959: checking for Gpm_Open in -lgpm" >&5
10960 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10961 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10962 echo $ECHO_N "(cached) $ECHO_C" >&6
10964 ac_check_lib_save_LIBS=$LIBS
10966 cat >"conftest.$ac_ext" <<_ACEOF
10967 #line 10967 "configure"
10968 #include "confdefs.h"
10970 /* Override any gcc2 internal prototype to avoid an error. */
10974 /* We use char because int might match the return type of a gcc2
10975 builtin and then its argument prototype would still apply. */
10985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10986 if { (eval echo "$as_me:10986: \"$ac_link\"") >&5
10987 (eval $ac_link) 2>&5
10989 echo "$as_me:10989: \$? = $ac_status" >&5
10990 (exit "$ac_status"); } &&
10991 { ac_try='test -s "conftest$ac_exeext"'
10992 { (eval echo "$as_me:10992: \"$ac_try\"") >&5
10993 (eval $ac_try) 2>&5
10995 echo "$as_me:10995: \$? = $ac_status" >&5
10996 (exit "$ac_status"); }; }; then
10997 ac_cv_lib_gpm_Gpm_Open=yes
10999 echo "$as_me: failed program was:" >&5
11000 cat "conftest.$ac_ext" >&5
11001 ac_cv_lib_gpm_Gpm_Open=no
11003 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11004 LIBS=$ac_check_lib_save_LIBS
11006 echo "$as_me:11006: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11007 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11008 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11009 echo "$as_me:11009: checking for initscr in -lgpm" >&5
11010 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11011 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11012 echo $ECHO_N "(cached) $ECHO_C" >&6
11014 ac_check_lib_save_LIBS=$LIBS
11016 cat >"conftest.$ac_ext" <<_ACEOF
11017 #line 11017 "configure"
11018 #include "confdefs.h"
11020 /* Override any gcc2 internal prototype to avoid an error. */
11024 /* We use char because int might match the return type of a gcc2
11025 builtin and then its argument prototype would still apply. */
11035 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11036 if { (eval echo "$as_me:11036: \"$ac_link\"") >&5
11037 (eval $ac_link) 2>&5
11039 echo "$as_me:11039: \$? = $ac_status" >&5
11040 (exit "$ac_status"); } &&
11041 { ac_try='test -s "conftest$ac_exeext"'
11042 { (eval echo "$as_me:11042: \"$ac_try\"") >&5
11043 (eval $ac_try) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit "$ac_status"); }; }; then
11047 ac_cv_lib_gpm_initscr=yes
11049 echo "$as_me: failed program was:" >&5
11050 cat "conftest.$ac_ext" >&5
11051 ac_cv_lib_gpm_initscr=no
11053 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11054 LIBS=$ac_check_lib_save_LIBS
11056 echo "$as_me:11056: result: $ac_cv_lib_gpm_initscr" >&5
11057 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11058 if test "$ac_cv_lib_gpm_initscr" = yes; then
11059 LIBS="$cf_ncurses_SAVE"
11061 cf_ncurses_LIBS="-lgpm"
11068 # This is only necessary if you are linking against an obsolete
11069 # version of ncurses (but it should do no harm, since it is static).
11070 if test "$cf_nculib_root" = ncurses ; then
11071 echo "$as_me:11071: checking for tgoto in -lmytinfo" >&5
11072 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11073 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11074 echo $ECHO_N "(cached) $ECHO_C" >&6
11076 ac_check_lib_save_LIBS=$LIBS
11077 LIBS="-lmytinfo $LIBS"
11078 cat >"conftest.$ac_ext" <<_ACEOF
11079 #line 11079 "configure"
11080 #include "confdefs.h"
11082 /* Override any gcc2 internal prototype to avoid an error. */
11086 /* We use char because int might match the return type of a gcc2
11087 builtin and then its argument prototype would still apply. */
11097 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11098 if { (eval echo "$as_me:11098: \"$ac_link\"") >&5
11099 (eval $ac_link) 2>&5
11101 echo "$as_me:11101: \$? = $ac_status" >&5
11102 (exit "$ac_status"); } &&
11103 { ac_try='test -s "conftest$ac_exeext"'
11104 { (eval echo "$as_me:11104: \"$ac_try\"") >&5
11105 (eval $ac_try) 2>&5
11107 echo "$as_me:11107: \$? = $ac_status" >&5
11108 (exit "$ac_status"); }; }; then
11109 ac_cv_lib_mytinfo_tgoto=yes
11111 echo "$as_me: failed program was:" >&5
11112 cat "conftest.$ac_ext" >&5
11113 ac_cv_lib_mytinfo_tgoto=no
11115 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11116 LIBS=$ac_check_lib_save_LIBS
11118 echo "$as_me:11118: result: $ac_cv_lib_mytinfo_tgoto" >&5
11119 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11120 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11121 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11128 cf_add_libs="$LIBS"
11131 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11132 # filter duplicates
11133 for cf_add_1lib in $cf_add_0lib; do
11134 for cf_add_2lib in $cf_add_libs; do
11135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11142 LIBS="$cf_add_libs"
11144 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11147 cf_add_libs="$LIBS"
11150 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11151 # filter duplicates
11152 for cf_add_1lib in $cf_add_0lib; do
11153 for cf_add_2lib in $cf_add_libs; do
11154 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11159 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11161 LIBS="$cf_add_libs"
11165 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11167 echo "$as_me:11167: checking for initscr" >&5
11168 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11169 if test "${ac_cv_func_initscr+set}" = set; then
11170 echo $ECHO_N "(cached) $ECHO_C" >&6
11172 cat >"conftest.$ac_ext" <<_ACEOF
11173 #line 11173 "configure"
11174 #include "confdefs.h"
11175 #define initscr autoconf_temporary
11176 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11183 /* We use char because int might match the return type of a gcc2
11184 builtin and then its argument prototype would still apply. */
11185 char initscr (void);
11191 /* The GNU C library defines stubs for functions which it implements
11192 to always fail with ENOSYS. Some functions are actually named
11193 something starting with __ and the normal name is an alias. */
11194 #if defined (__stub_initscr) || defined (__stub___initscr)
11195 #error found stub for initscr
11203 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11204 if { (eval echo "$as_me:11204: \"$ac_link\"") >&5
11205 (eval $ac_link) 2>&5
11207 echo "$as_me:11207: \$? = $ac_status" >&5
11208 (exit "$ac_status"); } &&
11209 { ac_try='test -s "conftest$ac_exeext"'
11210 { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211 (eval $ac_try) 2>&5
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit "$ac_status"); }; }; then
11215 ac_cv_func_initscr=yes
11217 echo "$as_me: failed program was:" >&5
11218 cat "conftest.$ac_ext" >&5
11219 ac_cv_func_initscr=no
11221 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11223 echo "$as_me:11223: result: $ac_cv_func_initscr" >&5
11224 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11225 if test "$ac_cv_func_initscr" = yes; then
11226 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11229 cf_save_LIBS="$LIBS"
11230 echo "$as_me:11230: checking for initscr in -l$cf_nculib_root" >&5
11231 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11232 LIBS="-l$cf_nculib_root $LIBS"
11233 cat >"conftest.$ac_ext" <<_ACEOF
11234 #line 11234 "configure"
11235 #include "confdefs.h"
11236 #include <${cf_cv_ncurses_header:-curses.h}>
11245 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11246 if { (eval echo "$as_me:11246: \"$ac_link\"") >&5
11247 (eval $ac_link) 2>&5
11249 echo "$as_me:11249: \$? = $ac_status" >&5
11250 (exit "$ac_status"); } &&
11251 { ac_try='test -s "conftest$ac_exeext"'
11252 { (eval echo "$as_me:11252: \"$ac_try\"") >&5
11253 (eval $ac_try) 2>&5
11255 echo "$as_me:11255: \$? = $ac_status" >&5
11256 (exit "$ac_status"); }; }; then
11257 echo "$as_me:11257: result: yes" >&5
11258 echo "${ECHO_T}yes" >&6
11259 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11262 echo "$as_me: failed program was:" >&5
11263 cat "conftest.$ac_ext" >&5
11264 echo "$as_me:11264: result: no" >&5
11265 echo "${ECHO_T}no" >&6
11268 cf_library_path_list=""
11269 if test -n "${LDFLAGS}${LIBS}" ; then
11270 for cf_library_path in $LDFLAGS $LIBS
11272 case "$cf_library_path" in
11274 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11276 test "x$cf_library_path" != "xNONE" && \
11277 test -d "$cf_library_path" && \
11279 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11280 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11281 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11282 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11283 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11284 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"
11287 cf_library_path_list="$cf_library_path_list $cf_search"
11295 test "x$prefix" != "xNONE" && \
11296 test -d "$prefix" && \
11298 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11299 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11300 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11301 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11302 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11303 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11306 for cf_subdir_prefix in \
11315 test "x$cf_subdir_prefix" != "x$prefix" && \
11316 test -d "$cf_subdir_prefix" && \
11317 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11318 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11319 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11320 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11321 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11322 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11323 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"
11328 cf_search="$cf_library_path_list $cf_search"
11330 for cf_libdir in $cf_search
11332 echo "$as_me:11332: checking for -l$cf_nculib_root in $cf_libdir" >&5
11333 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11334 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11335 cat >"conftest.$ac_ext" <<_ACEOF
11336 #line 11336 "configure"
11337 #include "confdefs.h"
11338 #include <${cf_cv_ncurses_header:-curses.h}>
11347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11348 if { (eval echo "$as_me:11348: \"$ac_link\"") >&5
11349 (eval $ac_link) 2>&5
11351 echo "$as_me:11351: \$? = $ac_status" >&5
11352 (exit "$ac_status"); } &&
11353 { ac_try='test -s "conftest$ac_exeext"'
11354 { (eval echo "$as_me:11354: \"$ac_try\"") >&5
11355 (eval $ac_try) 2>&5
11357 echo "$as_me:11357: \$? = $ac_status" >&5
11358 (exit "$ac_status"); }; }; then
11359 echo "$as_me:11359: result: yes" >&5
11360 echo "${ECHO_T}yes" >&6
11361 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11364 echo "$as_me: failed program was:" >&5
11365 cat "conftest.$ac_ext" >&5
11366 echo "$as_me:11366: result: no" >&5
11367 echo "${ECHO_T}no" >&6
11368 LIBS="$cf_save_LIBS"
11370 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11374 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11378 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11380 if test "$cf_found_library" = no ; then
11381 { { echo "$as_me:11381: error: Cannot link $cf_nculib_root library" >&5
11382 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11383 { (exit 1); exit 1; }; }
11388 if test -n "$cf_ncurses_LIBS" ; then
11389 echo "$as_me:11389: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11390 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11391 cf_ncurses_SAVE="$LIBS"
11392 for p in $cf_ncurses_LIBS ; do
11393 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11394 if test "$q" != "$LIBS" ; then
11398 cat >"conftest.$ac_ext" <<_ACEOF
11399 #line 11399 "configure"
11400 #include "confdefs.h"
11401 #include <${cf_cv_ncurses_header:-curses.h}>
11405 initscr(); mousemask(0,0); tigetstr((char *)0);
11410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11411 if { (eval echo "$as_me:11411: \"$ac_link\"") >&5
11412 (eval $ac_link) 2>&5
11414 echo "$as_me:11414: \$? = $ac_status" >&5
11415 (exit "$ac_status"); } &&
11416 { ac_try='test -s "conftest$ac_exeext"'
11417 { (eval echo "$as_me:11417: \"$ac_try\"") >&5
11418 (eval $ac_try) 2>&5
11420 echo "$as_me:11420: \$? = $ac_status" >&5
11421 (exit "$ac_status"); }; }; then
11422 echo "$as_me:11422: result: yes" >&5
11423 echo "${ECHO_T}yes" >&6
11425 echo "$as_me: failed program was:" >&5
11426 cat "conftest.$ac_ext" >&5
11427 echo "$as_me:11427: result: no" >&5
11428 echo "${ECHO_T}no" >&6
11429 LIBS="$cf_ncurses_SAVE"
11431 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11434 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11436 cat >>confdefs.h <<EOF
11437 #define $cf_nculib_ROOT 1
11442 NCURSES_CONFIG=none
11447 if test "$NCURSES_CONFIG_PKG" != none ; then
11448 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11450 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11451 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11452 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11454 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11455 if test -z "$cf_cv_abi_version"
11457 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11460 elif test "$NCURSES_CONFIG" != none ; then
11462 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11464 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11465 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11466 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11468 # ABI version is not available from headers
11469 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11473 for cf_name in MAJOR MINOR PATCH
11475 cat >conftest.$ac_ext <<CF_EOF
11476 #include <${cf_cv_ncurses_header:-curses.h}>
11477 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11479 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11480 { (eval echo "$as_me:11480: \"$cf_try\"") >&5
11481 (eval $cf_try) 2>&5
11483 echo "$as_me:11483: \$? = $ac_status" >&5
11484 (exit "$ac_status"); }
11485 if test -f conftest.out ; then
11486 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11487 eval NCURSES_$cf_name=\"$cf_result\"
11488 # cat conftest.$ac_ext
11493 cf_cv_abi_version=${NCURSES_MAJOR}
11497 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11499 cf_cv_timestamp=`date`
11501 echo "$as_me:11501: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11502 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11504 echo "$as_me:11504: checking if you want to have a library-prefix" >&5
11505 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11507 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11508 if test "${with_lib_prefix+set}" = set; then
11509 withval="$with_lib_prefix"
11510 with_lib_prefix=$withval
11512 with_lib_prefix=auto
11514 echo "$as_me:11514: result: $with_lib_prefix" >&5
11515 echo "${ECHO_T}$with_lib_prefix" >&6
11517 if test "$with_lib_prefix" = auto
11520 case "$cf_cv_system_name" in
11522 if test "$DFT_LWR_MODEL" = libtool; then
11531 (*) LIB_PREFIX='lib'
11534 cf_prefix=$LIB_PREFIX
11536 elif test "$with_lib_prefix" = no
11540 LIB_PREFIX=$with_lib_prefix
11545 ###############################################################################
11547 if test X"$CC_G_OPT" = X"" ; then
11549 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11552 echo "$as_me:11552: checking for default loader flags" >&5
11553 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11554 case $DFT_LWR_MODEL in
11555 (normal) LD_MODEL='' ;;
11556 (debug) LD_MODEL=$CC_G_OPT ;;
11557 (profile) LD_MODEL='-pg';;
11558 (shared) LD_MODEL='' ;;
11560 echo "$as_me:11560: result: $LD_MODEL" >&5
11561 echo "${ECHO_T}$LD_MODEL" >&6
11564 if test "x$cf_cv_enable_rpath" != xno
11566 echo "$as_me:11566: checking for an rpath option" >&5
11567 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11568 case "$cf_cv_system_name" in
11570 if test "$GCC" = yes; then
11571 LD_RPATH_OPT="-Wl,-rpath,"
11573 LD_RPATH_OPT="-rpath "
11576 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11577 LD_RPATH_OPT="-Wl,-rpath,"
11579 (openbsd[2-9].*|mirbsd*)
11580 LD_RPATH_OPT="-Wl,-rpath,"
11583 LD_RPATH_OPT="-rpath "
11586 LD_RPATH_OPT="-Wl,-rpath,"
11589 LD_RPATH_OPT="-rpath "
11597 echo "$as_me:11597: result: $LD_RPATH_OPT" >&5
11598 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11600 case "x$LD_RPATH_OPT" in
11602 echo "$as_me:11602: checking if we need a space after rpath option" >&5
11603 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11604 cf_save_LIBS="$LIBS"
11606 cf_add_libs="$LIBS"
11609 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11610 # filter duplicates
11611 for cf_add_1lib in $cf_add_0lib; do
11612 for cf_add_2lib in $cf_add_libs; do
11613 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11618 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11620 LIBS="$cf_add_libs"
11622 cat >"conftest.$ac_ext" <<_ACEOF
11623 #line 11623 "configure"
11624 #include "confdefs.h"
11634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11635 if { (eval echo "$as_me:11635: \"$ac_link\"") >&5
11636 (eval $ac_link) 2>&5
11638 echo "$as_me:11638: \$? = $ac_status" >&5
11639 (exit "$ac_status"); } &&
11640 { ac_try='test -s "conftest$ac_exeext"'
11641 { (eval echo "$as_me:11641: \"$ac_try\"") >&5
11642 (eval $ac_try) 2>&5
11644 echo "$as_me:11644: \$? = $ac_status" >&5
11645 (exit "$ac_status"); }; }; then
11648 echo "$as_me: failed program was:" >&5
11649 cat "conftest.$ac_ext" >&5
11652 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11653 LIBS="$cf_save_LIBS"
11654 echo "$as_me:11654: result: $cf_rpath_space" >&5
11655 echo "${ECHO_T}$cf_rpath_space" >&6
11656 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11665 INSTALL_LIB="-m 644"
11666 : ${rel_builddir:=.}
11672 cf_cv_do_symlinks=no
11674 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11676 echo "$as_me:11676: checking if release/abi version should be used for shared libs" >&5
11677 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11679 # Check whether --with-shlib-version or --without-shlib-version was given.
11680 if test "${with_shlib_version+set}" = set; then
11681 withval="$with_shlib_version"
11682 test -z "$withval" && withval=auto
11685 cf_cv_shlib_version=auto
11688 cf_cv_shlib_version=$withval
11691 echo "$as_me:11691: result: $withval" >&5
11692 echo "${ECHO_T}$withval" >&6
11693 { { echo "$as_me:11693: error: option value must be one of: rel, abi, or auto" >&5
11694 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11695 { (exit 1); exit 1; }; }
11700 cf_cv_shlib_version=auto
11702 echo "$as_me:11702: result: $cf_cv_shlib_version" >&5
11703 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11705 cf_cv_rm_so_locs=no
11708 # Some less-capable ports of gcc support only -fpic
11712 if test "$GCC" = yes
11716 case "$cf_cv_system_name" in
11717 (*linux*) # e.g., PGI compiler
11723 if test "$cf_try_fPIC" = yes
11725 echo "$as_me:11725: checking which $CC option to use" >&5
11726 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11727 cf_save_CFLAGS="$CFLAGS"
11728 for CC_SHARED_OPTS in -fPIC -fpic ''
11730 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11731 cat >"conftest.$ac_ext" <<_ACEOF
11732 #line 11732 "configure"
11733 #include "confdefs.h"
11743 rm -f "conftest.$ac_objext"
11744 if { (eval echo "$as_me:11744: \"$ac_compile\"") >&5
11745 (eval $ac_compile) 2>&5
11747 echo "$as_me:11747: \$? = $ac_status" >&5
11748 (exit "$ac_status"); } &&
11749 { ac_try='test -s "conftest.$ac_objext"'
11750 { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751 (eval $ac_try) 2>&5
11753 echo "$as_me:11753: \$? = $ac_status" >&5
11754 (exit "$ac_status"); }; }; then
11757 echo "$as_me: failed program was:" >&5
11758 cat "conftest.$ac_ext" >&5
11760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11762 echo "$as_me:11762: result: $CC_SHARED_OPTS" >&5
11763 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11764 CFLAGS="$cf_save_CFLAGS"
11767 cf_cv_shlib_version_infix=no
11769 case "$cf_cv_system_name" in
11770 (aix4.3-9*|aix[5-7]*)
11771 if test "$GCC" = yes; then
11772 CC_SHARED_OPTS='-Wl,-brtl'
11773 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11775 CC_SHARED_OPTS='-brtl'
11776 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11777 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11781 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11785 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11786 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11787 cf_cv_shlib_version=cygdll
11788 cf_cv_shlib_version_infix=cygdll
11791 cat >mk_shared_lib.sh <<-CF_EOF
11794 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11797 Linking shared library
11798 ** SHARED_LIB \$SHARED_LIB
11799 ** IMPORT_LIB \$IMPORT_LIB
11801 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11803 chmod +x mk_shared_lib.sh
11807 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11808 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11809 cf_cv_shlib_version=msysdll
11810 cf_cv_shlib_version_infix=msysdll
11813 cat >mk_shared_lib.sh <<-CF_EOF
11816 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11819 Linking shared library
11820 ** SHARED_LIB \$SHARED_LIB
11821 ** IMPORT_LIB \$IMPORT_LIB
11823 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11825 chmod +x mk_shared_lib.sh
11828 cf_try_cflags="no-cpp-precomp"
11829 CC_SHARED_OPTS="-dynamic"
11830 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11831 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11832 cf_cv_shlib_version_infix=yes
11833 echo "$as_me:11833: checking if ld -search_paths_first works" >&5
11834 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11835 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11836 echo $ECHO_N "(cached) $ECHO_C" >&6
11839 cf_save_LDFLAGS=$LDFLAGS
11840 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11841 cat >"conftest.$ac_ext" <<_ACEOF
11842 #line 11842 "configure"
11843 #include "confdefs.h"
11853 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11854 if { (eval echo "$as_me:11854: \"$ac_link\"") >&5
11855 (eval $ac_link) 2>&5
11857 echo "$as_me:11857: \$? = $ac_status" >&5
11858 (exit "$ac_status"); } &&
11859 { ac_try='test -s "conftest$ac_exeext"'
11860 { (eval echo "$as_me:11860: \"$ac_try\"") >&5
11861 (eval $ac_try) 2>&5
11863 echo "$as_me:11863: \$? = $ac_status" >&5
11864 (exit "$ac_status"); }; }; then
11865 cf_cv_ldflags_search_paths_first=yes
11867 echo "$as_me: failed program was:" >&5
11868 cat "conftest.$ac_ext" >&5
11869 cf_cv_ldflags_search_paths_first=no
11871 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11872 LDFLAGS=$cf_save_LDFLAGS
11874 echo "$as_me:11874: result: $cf_cv_ldflags_search_paths_first" >&5
11875 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11876 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11877 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11882 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11883 if test "$cf_cv_shlib_version" = rel; then
11884 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11886 cf_cv_shared_soname='`basename $@`'
11889 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11892 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11893 if test "$GCC" != yes; then
11894 CC_SHARED_OPTS='+Z'
11896 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11897 INSTALL_LIB="-m 555"
11900 # (tested with gcc 2.7.2 -- I don't have c89)
11901 if test "$GCC" = yes; then
11902 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11904 CC_SHARED_OPTS='+Z'
11905 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11907 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11908 # HP-UX shared libraries must be executable, and should be
11909 # readonly to exploit a quirk in the memory manager.
11910 INSTALL_LIB="-m 555"
11913 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11914 if test "$cf_cv_shlib_version" = rel; then
11915 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11917 cf_shared_soname='`basename $@`'
11920 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11923 if test "$cf_cv_enable_rpath" = yes ; then
11924 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11926 # tested with IRIX 5.2 and 'cc'.
11927 if test "$GCC" != yes; then
11928 CC_SHARED_OPTS='-KPIC'
11929 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11931 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11933 cf_cv_rm_so_locs=yes
11935 (linux*|gnu*|k*bsd*-gnu)
11936 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11937 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11938 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11940 if test "$cf_cv_enable_rpath" = yes ; then
11941 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11944 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11945 if test "$cf_cv_shlib_version" = rel; then
11946 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11948 cf_cv_shared_soname='`basename $@`'
11951 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11954 cf_cv_shlib_version=msvcdll
11955 cf_cv_shlib_version_infix=msvcdll
11958 if test "$DFT_LWR_MODEL" = "shared" ; then
11959 LOCAL_LDFLAGS="-link -dll"
11960 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11961 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11964 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11965 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11966 cat >mk_shared_lib.sh <<-CF_EOF
11969 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11974 Linking shared library
11975 ** SHARED LIB \$SHARED_LIB
11976 ** IMPORT_LIB \$IMPORT_LIB
11978 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11979 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11980 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11982 chmod +x mk_shared_lib.sh
11983 cat >mk_prog.sh <<-CF_EOF
11986 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11989 ldopts=("/subsystem:console")
11992 while test \$# -gt 0; do
11995 # ignore -link argument
11998 # ignore runtime-library option
12013 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12016 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12022 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12023 ldopts+=("\${linkarg}")
12031 ldopts+=("-out:\$1")
12040 if [ "\$isdll" -ne 0 ]; then
12041 for lib in \${libs[*]}; do
12042 ldopts+=("\$lib.dll.lib")
12045 for lib in \${libs[*]}; do
12046 ldopts+=("\$lib.lib")
12051 ** ld options: "\${ldopts[@]}"
12053 exec \$LD \${ldopts[@]}
12055 chmod +x mk_prog.sh
12056 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12057 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12060 cf_cv_shlib_version=mingw
12061 cf_cv_shlib_version_infix=mingw
12064 if test "$DFT_LWR_MODEL" = "shared" ; then
12065 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12066 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12067 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12070 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12071 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12072 cat >mk_shared_lib.sh <<-CF_EOF
12075 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12078 Linking shared library
12079 ** SHARED_LIB \$SHARED_LIB
12080 ** IMPORT_LIB \$IMPORT_LIB
12082 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12084 chmod +x mk_shared_lib.sh
12086 (openbsd[2-9].*|mirbsd*)
12087 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12088 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12089 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12091 if test "$cf_cv_enable_rpath" = yes ; then
12092 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12094 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12096 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12097 if test "$cf_cv_shlib_version" = rel; then
12098 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12100 cf_cv_shared_soname='`basename $@`'
12103 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12107 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12111 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12113 (nto-qnx*|openbsd*|freebsd[12].*)
12114 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12115 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12116 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12118 (dragonfly*|freebsd*)
12119 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12120 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12121 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12122 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12123 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12126 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12127 if test "$cf_cv_shlib_version" = rel; then
12128 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12130 cf_cv_shared_soname='`basename $@`'
12133 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12136 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12137 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12138 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12139 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12140 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12141 if test "$cf_cv_shlib_version" = auto; then
12142 if test -f /usr/libexec/ld.elf_so; then
12143 cf_cv_shlib_version=abi
12145 cf_cv_shlib_version=rel
12149 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12150 if test "$cf_cv_shlib_version" = rel; then
12151 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12153 cf_cv_shared_soname='`basename $@`'
12156 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12158 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12162 # tested with OSF/1 V3.2 and 'cc'
12163 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12164 # link with shared libs).
12165 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12168 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12171 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12172 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12173 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12174 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12176 cf_cv_rm_so_locs=yes
12178 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12179 # tested with osr5.0.5
12180 if test "$GCC" != yes; then
12181 CC_SHARED_OPTS='-belf -KPIC'
12183 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12184 if test "$cf_cv_enable_rpath" = yes ; then
12185 # only way is to set LD_RUN_PATH but no switch for it
12188 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12189 LINK_PROGS='LD_RUN_PATH=${libdir}'
12190 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12193 # tested with SunOS 4.1.1 and gcc 2.7.0
12194 if test "$GCC" != yes; then
12195 CC_SHARED_OPTS='-KPIC'
12197 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12198 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12201 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12202 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12203 if test "$DFT_LWR_MODEL" = "shared" ; then
12204 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12205 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12207 if test "$cf_cv_enable_rpath" = yes ; then
12208 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12211 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12212 if test "$cf_cv_shlib_version" = rel; then
12213 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12215 cf_cv_shared_soname='`basename $@`'
12218 if test "$GCC" != yes; then
12219 cf_save_CFLAGS="$CFLAGS"
12220 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12222 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12223 cat >"conftest.$ac_ext" <<_ACEOF
12224 #line 12224 "configure"
12225 #include "confdefs.h"
12230 printf("Hello\\n");
12235 rm -f "conftest.$ac_objext"
12236 if { (eval echo "$as_me:12236: \"$ac_compile\"") >&5
12237 (eval $ac_compile) 2>&5
12239 echo "$as_me:12239: \$? = $ac_status" >&5
12240 (exit "$ac_status"); } &&
12241 { ac_try='test -s "conftest.$ac_objext"'
12242 { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243 (eval $ac_try) 2>&5
12245 echo "$as_me:12245: \$? = $ac_status" >&5
12246 (exit "$ac_status"); }; }; then
12249 echo "$as_me: failed program was:" >&5
12250 cat "conftest.$ac_ext" >&5
12252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12254 CFLAGS="$cf_save_CFLAGS"
12255 CC_SHARED_OPTS=$cf_shared_opts
12256 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12258 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12261 (sysv5uw7*|unix_sv*)
12262 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12263 if test "$GCC" != yes; then
12264 CC_SHARED_OPTS='-KPIC'
12266 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12269 CC_SHARED_OPTS='unknown'
12270 MK_SHARED_LIB='echo unknown'
12274 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12275 case "$cf_cv_shlib_version" in
12277 case "$MK_SHARED_LIB" in
12279 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12282 { echo "$as_me:12282: WARNING: ignored --with-shlib-version" >&5
12283 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12289 if test -n "$cf_try_cflags"
12291 cat > conftest.$ac_ext <<EOF
12292 #line 12292 "${as_me:-configure}"
12294 int main(int argc, char *argv[])
12296 printf("hello\\n");
12297 return (argv[argc-1] == 0) ;
12300 cf_save_CFLAGS="$CFLAGS"
12301 for cf_opt in $cf_try_cflags
12303 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12304 echo "$as_me:12304: checking if CFLAGS option -$cf_opt works" >&5
12305 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12306 if { (eval echo "$as_me:12306: \"$ac_compile\"") >&5
12307 (eval $ac_compile) 2>&5
12309 echo "$as_me:12309: \$? = $ac_status" >&5
12310 (exit "$ac_status"); }; then
12311 echo "$as_me:12311: result: yes" >&5
12312 echo "${ECHO_T}yes" >&6
12313 cf_save_CFLAGS="$CFLAGS"
12315 echo "$as_me:12315: result: no" >&5
12316 echo "${ECHO_T}no" >&6
12319 CFLAGS="$cf_save_CFLAGS"
12322 # RPATH_LIST is a colon-separated list of directories
12323 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12324 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12326 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12328 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12330 echo "${as_me:-configure}:12330: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12332 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12334 echo "${as_me:-configure}:12334: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12336 # The test/sample programs in the original tree link using rpath option.
12337 # Make it optional for packagers.
12338 if test -n "$LOCAL_LDFLAGS"
12340 echo "$as_me:12340: checking if you want to link sample programs with rpath option" >&5
12341 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12343 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12344 if test "${enable_rpath_link+set}" = set; then
12345 enableval="$enable_rpath_link"
12346 with_rpath_link=$enableval
12348 with_rpath_link=yes
12350 echo "$as_me:12350: result: $with_rpath_link" >&5
12351 echo "${ECHO_T}$with_rpath_link" >&6
12352 if test "$with_rpath_link" = no
12359 ###############################################################################
12361 ### use option --enable-broken-linker to force on use of broken-linker support
12363 echo "$as_me:12363: checking if you want broken-linker support code" >&5
12364 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12366 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12367 if test "${enable_broken_linker+set}" = set; then
12368 enableval="$enable_broken_linker"
12369 with_broken_linker=$enableval
12371 with_broken_linker=no
12373 echo "$as_me:12373: result: $with_broken_linker" >&5
12374 echo "${ECHO_T}$with_broken_linker" >&6
12376 : "${BROKEN_LINKER:=0}"
12377 if test "x$with_broken_linker" = xyes ; then
12379 cat >>confdefs.h <<\EOF
12380 #define BROKEN_LINKER 1
12386 # Check to define _XOPEN_SOURCE "automatically"
12388 echo "$as_me:12388: checking if the POSIX test-macros are already defined" >&5
12389 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12390 if test "${cf_cv_posix_visible+set}" = set; then
12391 echo $ECHO_N "(cached) $ECHO_C" >&6
12394 cat >"conftest.$ac_ext" <<_ACEOF
12395 #line 12395 "configure"
12396 #include "confdefs.h"
12402 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12403 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12404 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12405 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12406 #error conflicting symbols found
12413 rm -f "conftest.$ac_objext"
12414 if { (eval echo "$as_me:12414: \"$ac_compile\"") >&5
12415 (eval $ac_compile) 2>&5
12417 echo "$as_me:12417: \$? = $ac_status" >&5
12418 (exit "$ac_status"); } &&
12419 { ac_try='test -s "conftest.$ac_objext"'
12420 { (eval echo "$as_me:12420: \"$ac_try\"") >&5
12421 (eval $ac_try) 2>&5
12423 echo "$as_me:12423: \$? = $ac_status" >&5
12424 (exit "$ac_status"); }; }; then
12425 cf_cv_posix_visible=no
12427 echo "$as_me: failed program was:" >&5
12428 cat "conftest.$ac_ext" >&5
12429 cf_cv_posix_visible=yes
12431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12434 echo "$as_me:12434: result: $cf_cv_posix_visible" >&5
12435 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12437 if test "$cf_cv_posix_visible" = no; then
12439 cf_XOPEN_SOURCE=600
12440 cf_POSIX_C_SOURCE=199506L
12445 cf_xopen_source="-D_ALL_SOURCE"
12448 cf_XOPEN_SOURCE=600
12451 cf_xopen_source="-D_APPLE_C_SOURCE"
12454 cf_xopen_source="-D_DARWIN_C_SOURCE"
12457 (freebsd*|dragonfly*|midnightbsd*)
12458 # 5.x headers associate
12459 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12460 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12461 cf_POSIX_C_SOURCE=200112L
12462 cf_XOPEN_SOURCE=600
12463 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12466 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12469 cf_xopen_source="-D_HPUX_SOURCE"
12472 cf_xopen_source="-D_SGI_SOURCE"
12475 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12477 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12479 echo "$as_me:12479: checking if this is the GNU C library" >&5
12480 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12481 if test "${cf_cv_gnu_library+set}" = set; then
12482 echo $ECHO_N "(cached) $ECHO_C" >&6
12485 cat >"conftest.$ac_ext" <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12488 #include <sys/types.h>
12493 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12495 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12498 # error not GNU C library
12504 rm -f "conftest.$ac_objext"
12505 if { (eval echo "$as_me:12505: \"$ac_compile\"") >&5
12506 (eval $ac_compile) 2>&5
12508 echo "$as_me:12508: \$? = $ac_status" >&5
12509 (exit "$ac_status"); } &&
12510 { ac_try='test -s "conftest.$ac_objext"'
12511 { (eval echo "$as_me:12511: \"$ac_try\"") >&5
12512 (eval $ac_try) 2>&5
12514 echo "$as_me:12514: \$? = $ac_status" >&5
12515 (exit "$ac_status"); }; }; then
12516 cf_cv_gnu_library=yes
12518 echo "$as_me: failed program was:" >&5
12519 cat "conftest.$ac_ext" >&5
12520 cf_cv_gnu_library=no
12522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12525 echo "$as_me:12525: result: $cf_cv_gnu_library" >&5
12526 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12528 if test x$cf_cv_gnu_library = xyes; then
12530 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12531 # was changed to help a little. newlib incorporated the change about 4
12533 echo "$as_me:12533: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12534 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12535 if test "${cf_cv_gnu_library_219+set}" = set; then
12536 echo $ECHO_N "(cached) $ECHO_C" >&6
12539 cf_save="$CPPFLAGS"
12541 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12542 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12544 cat >"conftest.$ac_ext" <<_ACEOF
12545 #line 12545 "configure"
12546 #include "confdefs.h"
12547 #include <sys/types.h>
12552 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12554 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12557 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12563 rm -f "conftest.$ac_objext"
12564 if { (eval echo "$as_me:12564: \"$ac_compile\"") >&5
12565 (eval $ac_compile) 2>&5
12567 echo "$as_me:12567: \$? = $ac_status" >&5
12568 (exit "$ac_status"); } &&
12569 { ac_try='test -s "conftest.$ac_objext"'
12570 { (eval echo "$as_me:12570: \"$ac_try\"") >&5
12571 (eval $ac_try) 2>&5
12573 echo "$as_me:12573: \$? = $ac_status" >&5
12574 (exit "$ac_status"); }; }; then
12575 cf_cv_gnu_library_219=yes
12577 echo "$as_me: failed program was:" >&5
12578 cat "conftest.$ac_ext" >&5
12579 cf_cv_gnu_library_219=no
12581 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12582 CPPFLAGS="$cf_save"
12585 echo "$as_me:12585: result: $cf_cv_gnu_library_219" >&5
12586 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12588 if test "x$cf_cv_gnu_library_219" = xyes; then
12589 cf_save="$CPPFLAGS"
12590 echo "$as_me:12590: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12591 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12592 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12593 echo $ECHO_N "(cached) $ECHO_C" >&6
12599 cf_new_extra_cppflags=
12601 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12603 case "$cf_fix_cppflags" in
12605 case "$cf_add_cflags" in
12606 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12607 case "$cf_add_cflags" in
12609 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12611 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12612 && test -z "${cf_tst_cflags}" \
12613 && cf_fix_cppflags=yes
12615 if test "$cf_fix_cppflags" = yes ; then
12617 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12618 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12621 elif test "${cf_tst_cflags}" = "\"'" ; then
12623 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12624 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12630 case "$CPPFLAGS" in
12634 case "$cf_add_cflags" in
12636 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12638 CPPFLAGS=`echo "$CPPFLAGS" | \
12639 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12640 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12645 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12646 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12653 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12654 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12661 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12662 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12664 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12666 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12667 && test -z "${cf_tst_cflags}" \
12668 && cf_fix_cppflags=no
12673 if test -n "$cf_new_cflags" ; then
12675 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12676 CFLAGS="${CFLAGS}$cf_new_cflags"
12680 if test -n "$cf_new_cppflags" ; then
12682 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12683 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12687 if test -n "$cf_new_extra_cppflags" ; then
12689 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12690 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12694 cat >"conftest.$ac_ext" <<_ACEOF
12695 #line 12695 "configure"
12696 #include "confdefs.h"
12698 #include <limits.h>
12699 #include <sys/types.h>
12705 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12708 # error GNU C library is too old
12714 rm -f "conftest.$ac_objext"
12715 if { (eval echo "$as_me:12715: \"$ac_compile\"") >&5
12716 (eval $ac_compile) 2>&5
12718 echo "$as_me:12718: \$? = $ac_status" >&5
12719 (exit "$ac_status"); } &&
12720 { ac_try='test -s "conftest.$ac_objext"'
12721 { (eval echo "$as_me:12721: \"$ac_try\"") >&5
12722 (eval $ac_try) 2>&5
12724 echo "$as_me:12724: \$? = $ac_status" >&5
12725 (exit "$ac_status"); }; }; then
12726 cf_cv_gnu_dftsrc_219=yes
12728 echo "$as_me: failed program was:" >&5
12729 cat "conftest.$ac_ext" >&5
12730 cf_cv_gnu_dftsrc_219=no
12732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12735 echo "$as_me:12735: result: $cf_cv_gnu_dftsrc_219" >&5
12736 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12737 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12739 cf_cv_gnu_dftsrc_219=maybe
12742 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12744 echo "$as_me:12744: checking if we must define _GNU_SOURCE" >&5
12745 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12746 if test "${cf_cv_gnu_source+set}" = set; then
12747 echo $ECHO_N "(cached) $ECHO_C" >&6
12750 cat >"conftest.$ac_ext" <<_ACEOF
12751 #line 12751 "configure"
12752 #include "confdefs.h"
12753 #include <sys/types.h>
12758 #ifndef _XOPEN_SOURCE
12759 #error expected _XOPEN_SOURCE to be defined
12765 rm -f "conftest.$ac_objext"
12766 if { (eval echo "$as_me:12766: \"$ac_compile\"") >&5
12767 (eval $ac_compile) 2>&5
12769 echo "$as_me:12769: \$? = $ac_status" >&5
12770 (exit "$ac_status"); } &&
12771 { ac_try='test -s "conftest.$ac_objext"'
12772 { (eval echo "$as_me:12772: \"$ac_try\"") >&5
12773 (eval $ac_try) 2>&5
12775 echo "$as_me:12775: \$? = $ac_status" >&5
12776 (exit "$ac_status"); }; }; then
12777 cf_cv_gnu_source=no
12779 echo "$as_me: failed program was:" >&5
12780 cat "conftest.$ac_ext" >&5
12781 cf_save="$CPPFLAGS"
12786 cf_new_extra_cppflags=
12788 for cf_add_cflags in -D_GNU_SOURCE
12790 case "$cf_fix_cppflags" in
12792 case "$cf_add_cflags" in
12793 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12794 case "$cf_add_cflags" in
12796 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12799 && test -z "${cf_tst_cflags}" \
12800 && cf_fix_cppflags=yes
12802 if test "$cf_fix_cppflags" = yes ; then
12804 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12805 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12808 elif test "${cf_tst_cflags}" = "\"'" ; then
12810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12817 case "$CPPFLAGS" in
12821 case "$cf_add_cflags" in
12823 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12825 CPPFLAGS=`echo "$CPPFLAGS" | \
12826 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12827 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12832 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12833 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12840 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12841 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12851 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12854 && test -z "${cf_tst_cflags}" \
12855 && cf_fix_cppflags=no
12860 if test -n "$cf_new_cflags" ; then
12862 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12863 CFLAGS="${CFLAGS}$cf_new_cflags"
12867 if test -n "$cf_new_cppflags" ; then
12869 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12870 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12874 if test -n "$cf_new_extra_cppflags" ; then
12876 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12877 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12881 cat >"conftest.$ac_ext" <<_ACEOF
12882 #line 12882 "configure"
12883 #include "confdefs.h"
12884 #include <sys/types.h>
12889 #ifdef _XOPEN_SOURCE
12890 #error expected _XOPEN_SOURCE to be undefined
12896 rm -f "conftest.$ac_objext"
12897 if { (eval echo "$as_me:12897: \"$ac_compile\"") >&5
12898 (eval $ac_compile) 2>&5
12900 echo "$as_me:12900: \$? = $ac_status" >&5
12901 (exit "$ac_status"); } &&
12902 { ac_try='test -s "conftest.$ac_objext"'
12903 { (eval echo "$as_me:12903: \"$ac_try\"") >&5
12904 (eval $ac_try) 2>&5
12906 echo "$as_me:12906: \$? = $ac_status" >&5
12907 (exit "$ac_status"); }; }; then
12908 cf_cv_gnu_source=no
12910 echo "$as_me: failed program was:" >&5
12911 cat "conftest.$ac_ext" >&5
12912 cf_cv_gnu_source=yes
12914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12915 CPPFLAGS="$cf_save"
12918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12921 echo "$as_me:12921: result: $cf_cv_gnu_source" >&5
12922 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12924 if test "$cf_cv_gnu_source" = yes
12926 echo "$as_me:12926: checking if we should also define _DEFAULT_SOURCE" >&5
12927 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12928 if test "${cf_cv_default_source+set}" = set; then
12929 echo $ECHO_N "(cached) $ECHO_C" >&6
12932 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12933 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12935 cat >"conftest.$ac_ext" <<_ACEOF
12936 #line 12936 "configure"
12937 #include "confdefs.h"
12938 #include <sys/types.h>
12943 #ifdef _DEFAULT_SOURCE
12944 #error expected _DEFAULT_SOURCE to be undefined
12950 rm -f "conftest.$ac_objext"
12951 if { (eval echo "$as_me:12951: \"$ac_compile\"") >&5
12952 (eval $ac_compile) 2>&5
12954 echo "$as_me:12954: \$? = $ac_status" >&5
12955 (exit "$ac_status"); } &&
12956 { ac_try='test -s "conftest.$ac_objext"'
12957 { (eval echo "$as_me:12957: \"$ac_try\"") >&5
12958 (eval $ac_try) 2>&5
12960 echo "$as_me:12960: \$? = $ac_status" >&5
12961 (exit "$ac_status"); }; }; then
12962 cf_cv_default_source=no
12964 echo "$as_me: failed program was:" >&5
12965 cat "conftest.$ac_ext" >&5
12966 cf_cv_default_source=yes
12968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12971 echo "$as_me:12971: result: $cf_cv_default_source" >&5
12972 echo "${ECHO_T}$cf_cv_default_source" >&6
12973 if test "$cf_cv_default_source" = yes
12976 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12977 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12987 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12990 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12993 if test "$cf_cv_posix_visible" = no; then
12995 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12997 cf_save_CFLAGS="$CFLAGS"
12998 cf_save_CPPFLAGS="$CPPFLAGS"
13000 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13001 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13002 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13004 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13005 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13006 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13008 echo "$as_me:13008: checking if we should define _POSIX_C_SOURCE" >&5
13009 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13010 if test "${cf_cv_posix_c_source+set}" = set; then
13011 echo $ECHO_N "(cached) $ECHO_C" >&6
13014 echo "${as_me:-configure}:13014: testing if the symbol is already defined go no further ..." 1>&5
13016 cat >"conftest.$ac_ext" <<_ACEOF
13017 #line 13017 "configure"
13018 #include "confdefs.h"
13019 #include <sys/types.h>
13024 #ifndef _POSIX_C_SOURCE
13031 rm -f "conftest.$ac_objext"
13032 if { (eval echo "$as_me:13032: \"$ac_compile\"") >&5
13033 (eval $ac_compile) 2>&5
13035 echo "$as_me:13035: \$? = $ac_status" >&5
13036 (exit "$ac_status"); } &&
13037 { ac_try='test -s "conftest.$ac_objext"'
13038 { (eval echo "$as_me:13038: \"$ac_try\"") >&5
13039 (eval $ac_try) 2>&5
13041 echo "$as_me:13041: \$? = $ac_status" >&5
13042 (exit "$ac_status"); }; }; then
13043 cf_cv_posix_c_source=no
13045 echo "$as_me: failed program was:" >&5
13046 cat "conftest.$ac_ext" >&5
13047 cf_want_posix_source=no
13048 case .$cf_POSIX_C_SOURCE in
13050 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13053 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13054 cf_want_posix_source=yes
13057 cf_want_posix_source=yes
13060 if test "$cf_want_posix_source" = yes ; then
13061 cat >"conftest.$ac_ext" <<_ACEOF
13062 #line 13062 "configure"
13063 #include "confdefs.h"
13064 #include <sys/types.h>
13069 #ifdef _POSIX_SOURCE
13076 rm -f "conftest.$ac_objext"
13077 if { (eval echo "$as_me:13077: \"$ac_compile\"") >&5
13078 (eval $ac_compile) 2>&5
13080 echo "$as_me:13080: \$? = $ac_status" >&5
13081 (exit "$ac_status"); } &&
13082 { ac_try='test -s "conftest.$ac_objext"'
13083 { (eval echo "$as_me:13083: \"$ac_try\"") >&5
13084 (eval $ac_try) 2>&5
13086 echo "$as_me:13086: \$? = $ac_status" >&5
13087 (exit "$ac_status"); }; }; then
13090 echo "$as_me: failed program was:" >&5
13091 cat "conftest.$ac_ext" >&5
13092 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13097 echo "${as_me:-configure}:13097: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13099 CFLAGS="$cf_trim_CFLAGS"
13100 CPPFLAGS="$cf_trim_CPPFLAGS"
13102 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13103 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13105 echo "${as_me:-configure}:13105: testing if the second compile does not leave our definition intact error ..." 1>&5
13107 cat >"conftest.$ac_ext" <<_ACEOF
13108 #line 13108 "configure"
13109 #include "confdefs.h"
13110 #include <sys/types.h>
13115 #ifndef _POSIX_C_SOURCE
13122 rm -f "conftest.$ac_objext"
13123 if { (eval echo "$as_me:13123: \"$ac_compile\"") >&5
13124 (eval $ac_compile) 2>&5
13126 echo "$as_me:13126: \$? = $ac_status" >&5
13127 (exit "$ac_status"); } &&
13128 { ac_try='test -s "conftest.$ac_objext"'
13129 { (eval echo "$as_me:13129: \"$ac_try\"") >&5
13130 (eval $ac_try) 2>&5
13132 echo "$as_me:13132: \$? = $ac_status" >&5
13133 (exit "$ac_status"); }; }; then
13136 echo "$as_me: failed program was:" >&5
13137 cat "conftest.$ac_ext" >&5
13138 cf_cv_posix_c_source=no
13140 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13141 CFLAGS="$cf_save_CFLAGS"
13142 CPPFLAGS="$cf_save_CPPFLAGS"
13145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13148 echo "$as_me:13148: result: $cf_cv_posix_c_source" >&5
13149 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13151 if test "$cf_cv_posix_c_source" != no ; then
13152 CFLAGS="$cf_trim_CFLAGS"
13153 CPPFLAGS="$cf_trim_CPPFLAGS"
13158 cf_new_extra_cppflags=
13160 for cf_add_cflags in $cf_cv_posix_c_source
13162 case "$cf_fix_cppflags" in
13164 case "$cf_add_cflags" in
13165 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13166 case "$cf_add_cflags" in
13168 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13170 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13171 && test -z "${cf_tst_cflags}" \
13172 && cf_fix_cppflags=yes
13174 if test "$cf_fix_cppflags" = yes ; then
13176 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13177 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13180 elif test "${cf_tst_cflags}" = "\"'" ; then
13182 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13183 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13189 case "$CPPFLAGS" in
13193 case "$cf_add_cflags" in
13195 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13197 CPPFLAGS=`echo "$CPPFLAGS" | \
13198 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13199 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13204 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13205 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13212 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13213 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13220 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13221 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13223 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13225 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13226 && test -z "${cf_tst_cflags}" \
13227 && cf_fix_cppflags=no
13232 if test -n "$cf_new_cflags" ; then
13234 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13235 CFLAGS="${CFLAGS}$cf_new_cflags"
13239 if test -n "$cf_new_cppflags" ; then
13241 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13242 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13246 if test -n "$cf_new_extra_cppflags" ; then
13248 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13249 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13255 fi # cf_cv_posix_visible
13259 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13262 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13263 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13264 # Abusing the conformance level is a workaround.
13265 { echo "$as_me:13265: WARNING: this system does not provide usable locale support" >&5
13266 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13267 cf_xopen_source="-D_BSD_SOURCE"
13268 cf_XOPEN_SOURCE=700
13271 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13272 cf_xopen_source="-D_BSD_SOURCE"
13273 cf_XOPEN_SOURCE=600
13276 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13279 cf_xopen_source="-D_OSF_SOURCE"
13282 cf_xopen_source="-D_QNX_SOURCE"
13285 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13288 cf_xopen_source="-D__EXTENSIONS__"
13289 cf_cv_xopen_source=broken
13291 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13297 echo "$as_me:13297: checking if we should define _XOPEN_SOURCE" >&5
13298 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13299 if test "${cf_cv_xopen_source+set}" = set; then
13300 echo $ECHO_N "(cached) $ECHO_C" >&6
13303 cat >"conftest.$ac_ext" <<_ACEOF
13304 #line 13304 "configure"
13305 #include "confdefs.h"
13307 #include <stdlib.h>
13308 #include <string.h>
13309 #include <sys/types.h>
13315 #ifndef _XOPEN_SOURCE
13323 rm -f "conftest.$ac_objext"
13324 if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5
13325 (eval $ac_compile) 2>&5
13327 echo "$as_me:13327: \$? = $ac_status" >&5
13328 (exit "$ac_status"); } &&
13329 { ac_try='test -s "conftest.$ac_objext"'
13330 { (eval echo "$as_me:13330: \"$ac_try\"") >&5
13331 (eval $ac_try) 2>&5
13333 echo "$as_me:13333: \$? = $ac_status" >&5
13334 (exit "$ac_status"); }; }; then
13335 cf_cv_xopen_source=no
13337 echo "$as_me: failed program was:" >&5
13338 cat "conftest.$ac_ext" >&5
13339 cf_save="$CPPFLAGS"
13341 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13342 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13344 cat >"conftest.$ac_ext" <<_ACEOF
13345 #line 13345 "configure"
13346 #include "confdefs.h"
13348 #include <stdlib.h>
13349 #include <string.h>
13350 #include <sys/types.h>
13356 #ifndef _XOPEN_SOURCE
13364 rm -f "conftest.$ac_objext"
13365 if { (eval echo "$as_me:13365: \"$ac_compile\"") >&5
13366 (eval $ac_compile) 2>&5
13368 echo "$as_me:13368: \$? = $ac_status" >&5
13369 (exit "$ac_status"); } &&
13370 { ac_try='test -s "conftest.$ac_objext"'
13371 { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372 (eval $ac_try) 2>&5
13374 echo "$as_me:13374: \$? = $ac_status" >&5
13375 (exit "$ac_status"); }; }; then
13376 cf_cv_xopen_source=no
13378 echo "$as_me: failed program was:" >&5
13379 cat "conftest.$ac_ext" >&5
13380 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13383 CPPFLAGS="$cf_save"
13386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13389 echo "$as_me:13389: result: $cf_cv_xopen_source" >&5
13390 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13392 if test "$cf_cv_xopen_source" != no ; then
13394 CFLAGS=`echo "$CFLAGS" | \
13395 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13396 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13398 CPPFLAGS=`echo "$CPPFLAGS" | \
13399 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13400 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13402 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13404 for cf_add_cflags in $cf_temp_xopen_source
13406 case "x$cf_add_cflags" in
13409 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13412 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'`
13413 test "$CFLAGS" != "$cf_old_cflag" || break
13415 CFLAGS="$cf_old_cflag"
13418 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13421 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'`
13422 test "$CPPFLAGS" != "$cf_old_cflag" || break
13424 CPPFLAGS="$cf_old_cflag"
13433 cf_new_extra_cppflags=
13435 for cf_add_cflags in $cf_add_cflags
13437 case "$cf_fix_cppflags" in
13439 case "$cf_add_cflags" in
13440 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13441 case "$cf_add_cflags" in
13443 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13445 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13446 && test -z "${cf_tst_cflags}" \
13447 && cf_fix_cppflags=yes
13449 if test "$cf_fix_cppflags" = yes ; then
13451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13455 elif test "${cf_tst_cflags}" = "\"'" ; then
13457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13464 case "$CPPFLAGS" in
13468 case "$cf_add_cflags" in
13470 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13472 CPPFLAGS=`echo "$CPPFLAGS" | \
13473 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13474 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13479 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13480 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13487 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13488 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13495 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13496 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13498 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13500 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13501 && test -z "${cf_tst_cflags}" \
13502 && cf_fix_cppflags=no
13507 if test -n "$cf_new_cflags" ; then
13509 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13510 CFLAGS="${CFLAGS}$cf_new_cflags"
13514 if test -n "$cf_new_cppflags" ; then
13516 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13517 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13521 if test -n "$cf_new_extra_cppflags" ; then
13523 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13524 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13532 cf_save_xopen_cppflags="$CPPFLAGS"
13534 if test "$cf_cv_posix_visible" = no; then
13536 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13538 cf_save_CFLAGS="$CFLAGS"
13539 cf_save_CPPFLAGS="$CPPFLAGS"
13541 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13542 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13543 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13545 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13546 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13547 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13549 echo "$as_me:13549: checking if we should define _POSIX_C_SOURCE" >&5
13550 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13551 if test "${cf_cv_posix_c_source+set}" = set; then
13552 echo $ECHO_N "(cached) $ECHO_C" >&6
13555 echo "${as_me:-configure}:13555: testing if the symbol is already defined go no further ..." 1>&5
13557 cat >"conftest.$ac_ext" <<_ACEOF
13558 #line 13558 "configure"
13559 #include "confdefs.h"
13560 #include <sys/types.h>
13565 #ifndef _POSIX_C_SOURCE
13572 rm -f "conftest.$ac_objext"
13573 if { (eval echo "$as_me:13573: \"$ac_compile\"") >&5
13574 (eval $ac_compile) 2>&5
13576 echo "$as_me:13576: \$? = $ac_status" >&5
13577 (exit "$ac_status"); } &&
13578 { ac_try='test -s "conftest.$ac_objext"'
13579 { (eval echo "$as_me:13579: \"$ac_try\"") >&5
13580 (eval $ac_try) 2>&5
13582 echo "$as_me:13582: \$? = $ac_status" >&5
13583 (exit "$ac_status"); }; }; then
13584 cf_cv_posix_c_source=no
13586 echo "$as_me: failed program was:" >&5
13587 cat "conftest.$ac_ext" >&5
13588 cf_want_posix_source=no
13589 case .$cf_POSIX_C_SOURCE in
13591 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13594 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13595 cf_want_posix_source=yes
13598 cf_want_posix_source=yes
13601 if test "$cf_want_posix_source" = yes ; then
13602 cat >"conftest.$ac_ext" <<_ACEOF
13603 #line 13603 "configure"
13604 #include "confdefs.h"
13605 #include <sys/types.h>
13610 #ifdef _POSIX_SOURCE
13617 rm -f "conftest.$ac_objext"
13618 if { (eval echo "$as_me:13618: \"$ac_compile\"") >&5
13619 (eval $ac_compile) 2>&5
13621 echo "$as_me:13621: \$? = $ac_status" >&5
13622 (exit "$ac_status"); } &&
13623 { ac_try='test -s "conftest.$ac_objext"'
13624 { (eval echo "$as_me:13624: \"$ac_try\"") >&5
13625 (eval $ac_try) 2>&5
13627 echo "$as_me:13627: \$? = $ac_status" >&5
13628 (exit "$ac_status"); }; }; then
13631 echo "$as_me: failed program was:" >&5
13632 cat "conftest.$ac_ext" >&5
13633 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13638 echo "${as_me:-configure}:13638: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13640 CFLAGS="$cf_trim_CFLAGS"
13641 CPPFLAGS="$cf_trim_CPPFLAGS"
13643 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13644 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13646 echo "${as_me:-configure}:13646: testing if the second compile does not leave our definition intact error ..." 1>&5
13648 cat >"conftest.$ac_ext" <<_ACEOF
13649 #line 13649 "configure"
13650 #include "confdefs.h"
13651 #include <sys/types.h>
13656 #ifndef _POSIX_C_SOURCE
13663 rm -f "conftest.$ac_objext"
13664 if { (eval echo "$as_me:13664: \"$ac_compile\"") >&5
13665 (eval $ac_compile) 2>&5
13667 echo "$as_me:13667: \$? = $ac_status" >&5
13668 (exit "$ac_status"); } &&
13669 { ac_try='test -s "conftest.$ac_objext"'
13670 { (eval echo "$as_me:13670: \"$ac_try\"") >&5
13671 (eval $ac_try) 2>&5
13673 echo "$as_me:13673: \$? = $ac_status" >&5
13674 (exit "$ac_status"); }; }; then
13677 echo "$as_me: failed program was:" >&5
13678 cat "conftest.$ac_ext" >&5
13679 cf_cv_posix_c_source=no
13681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13682 CFLAGS="$cf_save_CFLAGS"
13683 CPPFLAGS="$cf_save_CPPFLAGS"
13686 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13689 echo "$as_me:13689: result: $cf_cv_posix_c_source" >&5
13690 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13692 if test "$cf_cv_posix_c_source" != no ; then
13693 CFLAGS="$cf_trim_CFLAGS"
13694 CPPFLAGS="$cf_trim_CPPFLAGS"
13699 cf_new_extra_cppflags=
13701 for cf_add_cflags in $cf_cv_posix_c_source
13703 case "$cf_fix_cppflags" in
13705 case "$cf_add_cflags" in
13706 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13707 case "$cf_add_cflags" in
13709 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13711 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13712 && test -z "${cf_tst_cflags}" \
13713 && cf_fix_cppflags=yes
13715 if test "$cf_fix_cppflags" = yes ; then
13717 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13718 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13721 elif test "${cf_tst_cflags}" = "\"'" ; then
13723 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13724 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13730 case "$CPPFLAGS" in
13734 case "$cf_add_cflags" in
13736 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13738 CPPFLAGS=`echo "$CPPFLAGS" | \
13739 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13740 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13745 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13746 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13753 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13754 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13761 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13762 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13764 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13767 && test -z "${cf_tst_cflags}" \
13768 && cf_fix_cppflags=no
13773 if test -n "$cf_new_cflags" ; then
13775 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13776 CFLAGS="${CFLAGS}$cf_new_cflags"
13780 if test -n "$cf_new_cppflags" ; then
13782 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13783 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13787 if test -n "$cf_new_extra_cppflags" ; then
13789 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13790 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13796 fi # cf_cv_posix_visible
13798 # Some of these niche implementations use copy/paste, double-check...
13799 if test "$cf_cv_xopen_source" != no ; then
13800 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13802 echo "${as_me:-configure}:13802: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13804 cat >"conftest.$ac_ext" <<_ACEOF
13805 #line 13805 "configure"
13806 #include "confdefs.h"
13808 #include <stdlib.h>
13809 #include <string.h>
13810 #include <sys/types.h>
13816 #ifndef _XOPEN_SOURCE
13824 rm -f "conftest.$ac_objext"
13825 if { (eval echo "$as_me:13825: \"$ac_compile\"") >&5
13826 (eval $ac_compile) 2>&5
13828 echo "$as_me:13828: \$? = $ac_status" >&5
13829 (exit "$ac_status"); } &&
13830 { ac_try='test -s "conftest.$ac_objext"'
13831 { (eval echo "$as_me:13831: \"$ac_try\"") >&5
13832 (eval $ac_try) 2>&5
13834 echo "$as_me:13834: \$? = $ac_status" >&5
13835 (exit "$ac_status"); }; }; then
13838 echo "$as_me: failed program was:" >&5
13839 cat "conftest.$ac_ext" >&5
13841 { echo "$as_me:13841: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13842 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13843 CPPFLAGS="$cf_save_xopen_cppflags"
13845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13850 if test -n "$cf_xopen_source" ; then
13852 for cf_add_cflags in $cf_xopen_source
13854 case "x$cf_add_cflags" in
13857 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13860 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'`
13861 test "$CFLAGS" != "$cf_old_cflag" || break
13862 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13864 echo "${as_me:-configure}:13864: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13866 CFLAGS="$cf_old_cflag"
13869 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13872 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'`
13873 test "$CPPFLAGS" != "$cf_old_cflag" || break
13874 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13876 echo "${as_me:-configure}:13876: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13878 CPPFLAGS="$cf_old_cflag"
13887 cf_new_extra_cppflags=
13889 for cf_add_cflags in $cf_add_cflags
13891 case "$cf_fix_cppflags" in
13893 case "$cf_add_cflags" in
13894 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13895 case "$cf_add_cflags" in
13897 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13899 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13900 && test -z "${cf_tst_cflags}" \
13901 && cf_fix_cppflags=yes
13903 if test "$cf_fix_cppflags" = yes ; then
13905 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13906 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13909 elif test "${cf_tst_cflags}" = "\"'" ; then
13911 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13912 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13918 case "$CPPFLAGS" in
13922 case "$cf_add_cflags" in
13924 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13926 CPPFLAGS=`echo "$CPPFLAGS" | \
13927 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13928 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13933 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13934 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13941 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13942 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13949 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13950 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13952 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13954 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13955 && test -z "${cf_tst_cflags}" \
13956 && cf_fix_cppflags=no
13961 if test -n "$cf_new_cflags" ; then
13962 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13964 echo "${as_me:-configure}:13964: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13966 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13967 CFLAGS="${CFLAGS}$cf_new_cflags"
13971 if test -n "$cf_new_cppflags" ; then
13972 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13974 echo "${as_me:-configure}:13974: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13976 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13977 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13981 if test -n "$cf_new_extra_cppflags" ; then
13982 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13984 echo "${as_me:-configure}:13984: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13986 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13987 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13995 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13996 echo "$as_me:13996: checking if _XOPEN_SOURCE really is set" >&5
13997 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13998 cat >"conftest.$ac_ext" <<_ACEOF
13999 #line 13999 "configure"
14000 #include "confdefs.h"
14001 #include <stdlib.h>
14006 #ifndef _XOPEN_SOURCE
14013 rm -f "conftest.$ac_objext"
14014 if { (eval echo "$as_me:14014: \"$ac_compile\"") >&5
14015 (eval $ac_compile) 2>&5
14017 echo "$as_me:14017: \$? = $ac_status" >&5
14018 (exit "$ac_status"); } &&
14019 { ac_try='test -s "conftest.$ac_objext"'
14020 { (eval echo "$as_me:14020: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14023 echo "$as_me:14023: \$? = $ac_status" >&5
14024 (exit "$ac_status"); }; }; then
14025 cf_XOPEN_SOURCE_set=yes
14027 echo "$as_me: failed program was:" >&5
14028 cat "conftest.$ac_ext" >&5
14029 cf_XOPEN_SOURCE_set=no
14031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14032 echo "$as_me:14032: result: $cf_XOPEN_SOURCE_set" >&5
14033 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14034 if test "$cf_XOPEN_SOURCE_set" = yes
14036 cat >"conftest.$ac_ext" <<_ACEOF
14037 #line 14037 "configure"
14038 #include "confdefs.h"
14039 #include <stdlib.h>
14044 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14051 rm -f "conftest.$ac_objext"
14052 if { (eval echo "$as_me:14052: \"$ac_compile\"") >&5
14053 (eval $ac_compile) 2>&5
14055 echo "$as_me:14055: \$? = $ac_status" >&5
14056 (exit "$ac_status"); } &&
14057 { ac_try='test -s "conftest.$ac_objext"'
14058 { (eval echo "$as_me:14058: \"$ac_try\"") >&5
14059 (eval $ac_try) 2>&5
14061 echo "$as_me:14061: \$? = $ac_status" >&5
14062 (exit "$ac_status"); }; }; then
14063 cf_XOPEN_SOURCE_set_ok=yes
14065 echo "$as_me: failed program was:" >&5
14066 cat "conftest.$ac_ext" >&5
14067 cf_XOPEN_SOURCE_set_ok=no
14069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14070 if test "$cf_XOPEN_SOURCE_set_ok" = no
14072 { echo "$as_me:14072: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14073 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14077 echo "$as_me:14077: checking if we should define _XOPEN_SOURCE" >&5
14078 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14079 if test "${cf_cv_xopen_source+set}" = set; then
14080 echo $ECHO_N "(cached) $ECHO_C" >&6
14083 cat >"conftest.$ac_ext" <<_ACEOF
14084 #line 14084 "configure"
14085 #include "confdefs.h"
14087 #include <stdlib.h>
14088 #include <string.h>
14089 #include <sys/types.h>
14095 #ifndef _XOPEN_SOURCE
14103 rm -f "conftest.$ac_objext"
14104 if { (eval echo "$as_me:14104: \"$ac_compile\"") >&5
14105 (eval $ac_compile) 2>&5
14107 echo "$as_me:14107: \$? = $ac_status" >&5
14108 (exit "$ac_status"); } &&
14109 { ac_try='test -s "conftest.$ac_objext"'
14110 { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111 (eval $ac_try) 2>&5
14113 echo "$as_me:14113: \$? = $ac_status" >&5
14114 (exit "$ac_status"); }; }; then
14115 cf_cv_xopen_source=no
14117 echo "$as_me: failed program was:" >&5
14118 cat "conftest.$ac_ext" >&5
14119 cf_save="$CPPFLAGS"
14121 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14122 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14124 cat >"conftest.$ac_ext" <<_ACEOF
14125 #line 14125 "configure"
14126 #include "confdefs.h"
14128 #include <stdlib.h>
14129 #include <string.h>
14130 #include <sys/types.h>
14136 #ifndef _XOPEN_SOURCE
14144 rm -f "conftest.$ac_objext"
14145 if { (eval echo "$as_me:14145: \"$ac_compile\"") >&5
14146 (eval $ac_compile) 2>&5
14148 echo "$as_me:14148: \$? = $ac_status" >&5
14149 (exit "$ac_status"); } &&
14150 { ac_try='test -s "conftest.$ac_objext"'
14151 { (eval echo "$as_me:14151: \"$ac_try\"") >&5
14152 (eval $ac_try) 2>&5
14154 echo "$as_me:14154: \$? = $ac_status" >&5
14155 (exit "$ac_status"); }; }; then
14156 cf_cv_xopen_source=no
14158 echo "$as_me: failed program was:" >&5
14159 cat "conftest.$ac_ext" >&5
14160 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14163 CPPFLAGS="$cf_save"
14166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14169 echo "$as_me:14169: result: $cf_cv_xopen_source" >&5
14170 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14172 if test "$cf_cv_xopen_source" != no ; then
14174 CFLAGS=`echo "$CFLAGS" | \
14175 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14176 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14178 CPPFLAGS=`echo "$CPPFLAGS" | \
14179 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14180 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14182 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14184 for cf_add_cflags in $cf_temp_xopen_source
14186 case "x$cf_add_cflags" in
14189 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14192 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'`
14193 test "$CFLAGS" != "$cf_old_cflag" || break
14195 CFLAGS="$cf_old_cflag"
14198 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14201 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'`
14202 test "$CPPFLAGS" != "$cf_old_cflag" || break
14204 CPPFLAGS="$cf_old_cflag"
14213 cf_new_extra_cppflags=
14215 for cf_add_cflags in $cf_add_cflags
14217 case "$cf_fix_cppflags" in
14219 case "$cf_add_cflags" in
14220 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14221 case "$cf_add_cflags" in
14223 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14225 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14226 && test -z "${cf_tst_cflags}" \
14227 && cf_fix_cppflags=yes
14229 if test "$cf_fix_cppflags" = yes ; then
14231 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14232 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14235 elif test "${cf_tst_cflags}" = "\"'" ; then
14237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14244 case "$CPPFLAGS" in
14248 case "$cf_add_cflags" in
14250 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14252 CPPFLAGS=`echo "$CPPFLAGS" | \
14253 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14254 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14259 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14260 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14267 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14268 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14275 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14276 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14278 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14280 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14281 && test -z "${cf_tst_cflags}" \
14282 && cf_fix_cppflags=no
14287 if test -n "$cf_new_cflags" ; then
14289 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14290 CFLAGS="${CFLAGS}$cf_new_cflags"
14294 if test -n "$cf_new_cppflags" ; then
14296 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14297 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14301 if test -n "$cf_new_extra_cppflags" ; then
14303 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14304 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14314 fi # cf_cv_posix_visible
14316 # Check whether --enable-largefile or --disable-largefile was given.
14317 if test "${enable_largefile+set}" = set; then
14318 enableval="$enable_largefile"
14321 if test "$enable_largefile" != no; then
14323 echo "$as_me:14323: checking for special C compiler options needed for large files" >&5
14324 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14325 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14326 echo $ECHO_N "(cached) $ECHO_C" >&6
14328 ac_cv_sys_largefile_CC=no
14329 if test "$GCC" != yes; then
14332 # IRIX 6.2 and later do not support large files by default,
14333 # so use the C compiler's -n32 option if that helps.
14334 cat >"conftest.$ac_ext" <<_ACEOF
14335 #line 14335 "configure"
14336 #include "confdefs.h"
14337 #include <sys/types.h>
14338 /* Check that off_t can represent 2**63 - 1 correctly.
14339 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14340 since some C++ compilers masquerading as C compilers
14341 incorrectly reject 9223372036854775807. */
14342 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14343 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14344 && LARGE_OFF_T % 2147483647 == 1)
14354 rm -f "conftest.$ac_objext"
14355 if { (eval echo "$as_me:14355: \"$ac_compile\"") >&5
14356 (eval $ac_compile) 2>&5
14358 echo "$as_me:14358: \$? = $ac_status" >&5
14359 (exit "$ac_status"); } &&
14360 { ac_try='test -s "conftest.$ac_objext"'
14361 { (eval echo "$as_me:14361: \"$ac_try\"") >&5
14362 (eval $ac_try) 2>&5
14364 echo "$as_me:14364: \$? = $ac_status" >&5
14365 (exit "$ac_status"); }; }; then
14368 echo "$as_me: failed program was:" >&5
14369 cat "conftest.$ac_ext" >&5
14371 rm -f "conftest.$ac_objext"
14373 rm -f "conftest.$ac_objext"
14374 if { (eval echo "$as_me:14374: \"$ac_compile\"") >&5
14375 (eval $ac_compile) 2>&5
14377 echo "$as_me:14377: \$? = $ac_status" >&5
14378 (exit "$ac_status"); } &&
14379 { ac_try='test -s "conftest.$ac_objext"'
14380 { (eval echo "$as_me:14380: \"$ac_try\"") >&5
14381 (eval $ac_try) 2>&5
14383 echo "$as_me:14383: \$? = $ac_status" >&5
14384 (exit "$ac_status"); }; }; then
14385 ac_cv_sys_largefile_CC=' -n32'; break
14387 echo "$as_me: failed program was:" >&5
14388 cat "conftest.$ac_ext" >&5
14390 rm -f "conftest.$ac_objext"
14394 rm -f "conftest.$ac_ext"
14397 echo "$as_me:14397: result: $ac_cv_sys_largefile_CC" >&5
14398 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14399 if test "$ac_cv_sys_largefile_CC" != no; then
14400 CC=$CC$ac_cv_sys_largefile_CC
14403 echo "$as_me:14403: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14404 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14405 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14406 echo $ECHO_N "(cached) $ECHO_C" >&6
14409 ac_cv_sys_file_offset_bits=no
14410 cat >"conftest.$ac_ext" <<_ACEOF
14411 #line 14411 "configure"
14412 #include "confdefs.h"
14413 #include <sys/types.h>
14414 /* Check that off_t can represent 2**63 - 1 correctly.
14415 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14416 since some C++ compilers masquerading as C compilers
14417 incorrectly reject 9223372036854775807. */
14418 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14419 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14420 && LARGE_OFF_T % 2147483647 == 1)
14430 rm -f "conftest.$ac_objext"
14431 if { (eval echo "$as_me:14431: \"$ac_compile\"") >&5
14432 (eval $ac_compile) 2>&5
14434 echo "$as_me:14434: \$? = $ac_status" >&5
14435 (exit "$ac_status"); } &&
14436 { ac_try='test -s "conftest.$ac_objext"'
14437 { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438 (eval $ac_try) 2>&5
14440 echo "$as_me:14440: \$? = $ac_status" >&5
14441 (exit "$ac_status"); }; }; then
14444 echo "$as_me: failed program was:" >&5
14445 cat "conftest.$ac_ext" >&5
14447 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14448 cat >"conftest.$ac_ext" <<_ACEOF
14449 #line 14449 "configure"
14450 #include "confdefs.h"
14451 #define _FILE_OFFSET_BITS 64
14452 #include <sys/types.h>
14453 /* Check that off_t can represent 2**63 - 1 correctly.
14454 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14455 since some C++ compilers masquerading as C compilers
14456 incorrectly reject 9223372036854775807. */
14457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14458 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14459 && LARGE_OFF_T % 2147483647 == 1)
14469 rm -f "conftest.$ac_objext"
14470 if { (eval echo "$as_me:14470: \"$ac_compile\"") >&5
14471 (eval $ac_compile) 2>&5
14473 echo "$as_me:14473: \$? = $ac_status" >&5
14474 (exit "$ac_status"); } &&
14475 { ac_try='test -s "conftest.$ac_objext"'
14476 { (eval echo "$as_me:14476: \"$ac_try\"") >&5
14477 (eval $ac_try) 2>&5
14479 echo "$as_me:14479: \$? = $ac_status" >&5
14480 (exit "$ac_status"); }; }; then
14481 ac_cv_sys_file_offset_bits=64; break
14483 echo "$as_me: failed program was:" >&5
14484 cat "conftest.$ac_ext" >&5
14486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14490 echo "$as_me:14490: result: $ac_cv_sys_file_offset_bits" >&5
14491 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14492 if test "$ac_cv_sys_file_offset_bits" != no; then
14494 cat >>confdefs.h <<EOF
14495 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14500 echo "$as_me:14500: checking for _LARGE_FILES value needed for large files" >&5
14501 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14502 if test "${ac_cv_sys_large_files+set}" = set; then
14503 echo $ECHO_N "(cached) $ECHO_C" >&6
14506 ac_cv_sys_large_files=no
14507 cat >"conftest.$ac_ext" <<_ACEOF
14508 #line 14508 "configure"
14509 #include "confdefs.h"
14510 #include <sys/types.h>
14511 /* Check that off_t can represent 2**63 - 1 correctly.
14512 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14513 since some C++ compilers masquerading as C compilers
14514 incorrectly reject 9223372036854775807. */
14515 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14516 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14517 && LARGE_OFF_T % 2147483647 == 1)
14527 rm -f "conftest.$ac_objext"
14528 if { (eval echo "$as_me:14528: \"$ac_compile\"") >&5
14529 (eval $ac_compile) 2>&5
14531 echo "$as_me:14531: \$? = $ac_status" >&5
14532 (exit "$ac_status"); } &&
14533 { ac_try='test -s "conftest.$ac_objext"'
14534 { (eval echo "$as_me:14534: \"$ac_try\"") >&5
14535 (eval $ac_try) 2>&5
14537 echo "$as_me:14537: \$? = $ac_status" >&5
14538 (exit "$ac_status"); }; }; then
14541 echo "$as_me: failed program was:" >&5
14542 cat "conftest.$ac_ext" >&5
14544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14545 cat >"conftest.$ac_ext" <<_ACEOF
14546 #line 14546 "configure"
14547 #include "confdefs.h"
14548 #define _LARGE_FILES 1
14549 #include <sys/types.h>
14550 /* Check that off_t can represent 2**63 - 1 correctly.
14551 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14552 since some C++ compilers masquerading as C compilers
14553 incorrectly reject 9223372036854775807. */
14554 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14555 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14556 && LARGE_OFF_T % 2147483647 == 1)
14566 rm -f "conftest.$ac_objext"
14567 if { (eval echo "$as_me:14567: \"$ac_compile\"") >&5
14568 (eval $ac_compile) 2>&5
14570 echo "$as_me:14570: \$? = $ac_status" >&5
14571 (exit "$ac_status"); } &&
14572 { ac_try='test -s "conftest.$ac_objext"'
14573 { (eval echo "$as_me:14573: \"$ac_try\"") >&5
14574 (eval $ac_try) 2>&5
14576 echo "$as_me:14576: \$? = $ac_status" >&5
14577 (exit "$ac_status"); }; }; then
14578 ac_cv_sys_large_files=1; break
14580 echo "$as_me: failed program was:" >&5
14581 cat "conftest.$ac_ext" >&5
14583 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14587 echo "$as_me:14587: result: $ac_cv_sys_large_files" >&5
14588 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14589 if test "$ac_cv_sys_large_files" != no; then
14591 cat >>confdefs.h <<EOF
14592 #define _LARGE_FILES $ac_cv_sys_large_files
14599 if test "$enable_largefile" != no ; then
14600 echo "$as_me:14600: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14601 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14602 if test "${ac_cv_sys_largefile_source+set}" = set; then
14603 echo $ECHO_N "(cached) $ECHO_C" >&6
14606 ac_cv_sys_largefile_source=no
14607 cat >"conftest.$ac_ext" <<_ACEOF
14608 #line 14608 "configure"
14609 #include "confdefs.h"
14619 rm -f "conftest.$ac_objext"
14620 if { (eval echo "$as_me:14620: \"$ac_compile\"") >&5
14621 (eval $ac_compile) 2>&5
14623 echo "$as_me:14623: \$? = $ac_status" >&5
14624 (exit "$ac_status"); } &&
14625 { ac_try='test -s "conftest.$ac_objext"'
14626 { (eval echo "$as_me:14626: \"$ac_try\"") >&5
14627 (eval $ac_try) 2>&5
14629 echo "$as_me:14629: \$? = $ac_status" >&5
14630 (exit "$ac_status"); }; }; then
14633 echo "$as_me: failed program was:" >&5
14634 cat "conftest.$ac_ext" >&5
14636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14637 cat >"conftest.$ac_ext" <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14640 #define _LARGEFILE_SOURCE 1
14650 rm -f "conftest.$ac_objext"
14651 if { (eval echo "$as_me:14651: \"$ac_compile\"") >&5
14652 (eval $ac_compile) 2>&5
14654 echo "$as_me:14654: \$? = $ac_status" >&5
14655 (exit "$ac_status"); } &&
14656 { ac_try='test -s "conftest.$ac_objext"'
14657 { (eval echo "$as_me:14657: \"$ac_try\"") >&5
14658 (eval $ac_try) 2>&5
14660 echo "$as_me:14660: \$? = $ac_status" >&5
14661 (exit "$ac_status"); }; }; then
14662 ac_cv_sys_largefile_source=1; break
14664 echo "$as_me: failed program was:" >&5
14665 cat "conftest.$ac_ext" >&5
14667 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14671 echo "$as_me:14671: result: $ac_cv_sys_largefile_source" >&5
14672 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14673 if test "$ac_cv_sys_largefile_source" != no; then
14675 cat >>confdefs.h <<EOF
14676 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14682 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14683 # in glibc 2.1.3, but that breaks too many other things.
14684 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14685 echo "$as_me:14685: checking for fseeko" >&5
14686 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14687 if test "${ac_cv_func_fseeko+set}" = set; then
14688 echo $ECHO_N "(cached) $ECHO_C" >&6
14690 cat >"conftest.$ac_ext" <<_ACEOF
14691 #line 14691 "configure"
14692 #include "confdefs.h"
14697 return fseeko && fseeko (stdin, 0, 0);
14702 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14703 if { (eval echo "$as_me:14703: \"$ac_link\"") >&5
14704 (eval $ac_link) 2>&5
14706 echo "$as_me:14706: \$? = $ac_status" >&5
14707 (exit "$ac_status"); } &&
14708 { ac_try='test -s "conftest$ac_exeext"'
14709 { (eval echo "$as_me:14709: \"$ac_try\"") >&5
14710 (eval $ac_try) 2>&5
14712 echo "$as_me:14712: \$? = $ac_status" >&5
14713 (exit "$ac_status"); }; }; then
14714 ac_cv_func_fseeko=yes
14716 echo "$as_me: failed program was:" >&5
14717 cat "conftest.$ac_ext" >&5
14718 ac_cv_func_fseeko=no
14720 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14722 echo "$as_me:14722: result: $ac_cv_func_fseeko" >&5
14723 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14724 if test $ac_cv_func_fseeko = yes; then
14726 cat >>confdefs.h <<\EOF
14727 #define HAVE_FSEEKO 1
14732 # Normally we would collect these definitions in the config.h,
14733 # but (like _XOPEN_SOURCE), some environments rely on having these
14734 # defined before any of the system headers are included. Another
14735 # case comes up with C++, e.g., on AIX the compiler compiles the
14736 # header files by themselves before looking at the body files it is
14737 # told to compile. For ncurses, those header files do not include
14739 if test "$ac_cv_sys_large_files" != no
14742 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14743 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14746 if test "$ac_cv_sys_largefile_source" != no
14749 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14750 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14753 if test "$ac_cv_sys_file_offset_bits" != no
14756 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14757 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14761 echo "$as_me:14761: checking whether to use struct dirent64" >&5
14762 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14763 if test "${cf_cv_struct_dirent64+set}" = set; then
14764 echo $ECHO_N "(cached) $ECHO_C" >&6
14767 cat >"conftest.$ac_ext" <<_ACEOF
14768 #line 14768 "configure"
14769 #include "confdefs.h"
14771 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14772 #include <sys/types.h>
14773 #include <dirent.h>
14779 /* if transitional largefile support is setup, this is true */
14780 extern struct dirent64 * readdir(DIR *);
14781 struct dirent64 *x = readdir((DIR *)0);
14782 struct dirent *y = readdir((DIR *)0);
14790 rm -f "conftest.$ac_objext"
14791 if { (eval echo "$as_me:14791: \"$ac_compile\"") >&5
14792 (eval $ac_compile) 2>&5
14794 echo "$as_me:14794: \$? = $ac_status" >&5
14795 (exit "$ac_status"); } &&
14796 { ac_try='test -s "conftest.$ac_objext"'
14797 { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798 (eval $ac_try) 2>&5
14800 echo "$as_me:14800: \$? = $ac_status" >&5
14801 (exit "$ac_status"); }; }; then
14802 cf_cv_struct_dirent64=yes
14804 echo "$as_me: failed program was:" >&5
14805 cat "conftest.$ac_ext" >&5
14806 cf_cv_struct_dirent64=no
14808 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14811 echo "$as_me:14811: result: $cf_cv_struct_dirent64" >&5
14812 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14813 test "$cf_cv_struct_dirent64" = yes &&
14814 cat >>confdefs.h <<\EOF
14815 #define HAVE_STRUCT_DIRENT64 1
14820 ### Enable compiling-in rcs id's
14821 echo "$as_me:14821: checking if RCS identifiers should be compiled-in" >&5
14822 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14824 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14825 if test "${with_rcs_ids+set}" = set; then
14826 withval="$with_rcs_ids"
14827 with_rcs_ids=$withval
14831 echo "$as_me:14831: result: $with_rcs_ids" >&5
14832 echo "${ECHO_T}$with_rcs_ids" >&6
14833 test "$with_rcs_ids" = yes &&
14834 cat >>confdefs.h <<\EOF
14835 #define USE_RCS_IDS 1
14838 ###############################################################################
14840 ### Note that some functions (such as const) are normally disabled anyway.
14841 echo "$as_me:14841: checking if you want to build with function extensions" >&5
14842 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14844 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14845 if test "${enable_ext_funcs+set}" = set; then
14846 enableval="$enable_ext_funcs"
14847 with_ext_funcs=$enableval
14851 echo "$as_me:14851: result: $with_ext_funcs" >&5
14852 echo "${ECHO_T}$with_ext_funcs" >&6
14853 if test "$with_ext_funcs" = yes ; then
14854 NCURSES_EXT_FUNCS=1
14856 cat >>confdefs.h <<\EOF
14857 #define HAVE_USE_DEFAULT_COLORS 1
14860 cat >>confdefs.h <<\EOF
14861 #define NCURSES_EXT_FUNCS 1
14865 NCURSES_EXT_FUNCS=0
14868 ### use option --enable-const to turn on use of const beyond that in XSI.
14869 echo "$as_me:14869: checking for extended use of const keyword" >&5
14870 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14872 # Check whether --enable-const or --disable-const was given.
14873 if test "${enable_const+set}" = set; then
14874 enableval="$enable_const"
14875 with_ext_const=$enableval
14879 echo "$as_me:14879: result: $with_ext_const" >&5
14880 echo "${ECHO_T}$with_ext_const" >&6
14881 NCURSES_CONST='/*nothing*/'
14882 if test "$with_ext_const" = yes ; then
14883 NCURSES_CONST=const
14886 ###############################################################################
14887 # These options are relatively safe to experiment with.
14889 echo "$as_me:14889: checking if you want all development code" >&5
14890 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14892 # Check whether --with-develop or --without-develop was given.
14893 if test "${with_develop+set}" = set; then
14894 withval="$with_develop"
14895 with_develop=$withval
14899 echo "$as_me:14899: result: $with_develop" >&5
14900 echo "${ECHO_T}$with_develop" >&6
14902 ###############################################################################
14903 # These are just experimental, probably should not be in a package:
14905 # This is still experimental (20080329), but should ultimately be moved to
14906 # the script-block --with-normal, etc.
14908 echo "$as_me:14908: checking if you want to link with the pthread library" >&5
14909 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14911 # Check whether --with-pthread or --without-pthread was given.
14912 if test "${with_pthread+set}" = set; then
14913 withval="$with_pthread"
14914 with_pthread=$withval
14918 echo "$as_me:14918: result: $with_pthread" >&5
14919 echo "${ECHO_T}$with_pthread" >&6
14921 if test "$with_pthread" != no ; then
14922 echo "$as_me:14922: checking for pthread.h" >&5
14923 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14924 if test "${ac_cv_header_pthread_h+set}" = set; then
14925 echo $ECHO_N "(cached) $ECHO_C" >&6
14927 cat >"conftest.$ac_ext" <<_ACEOF
14928 #line 14928 "configure"
14929 #include "confdefs.h"
14930 #include <pthread.h>
14932 if { (eval echo "$as_me:14932: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14933 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14935 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14937 cat conftest.err >&5
14938 echo "$as_me:14938: \$? = $ac_status" >&5
14939 (exit "$ac_status"); } >/dev/null; then
14940 if test -s conftest.err; then
14941 ac_cpp_err=$ac_c_preproc_warn_flag
14948 if test -z "$ac_cpp_err"; then
14949 ac_cv_header_pthread_h=yes
14951 echo "$as_me: failed program was:" >&5
14952 cat "conftest.$ac_ext" >&5
14953 ac_cv_header_pthread_h=no
14955 rm -f conftest.err "conftest.$ac_ext"
14957 echo "$as_me:14957: result: $ac_cv_header_pthread_h" >&5
14958 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14959 if test "$ac_cv_header_pthread_h" = yes; then
14961 cat >>confdefs.h <<\EOF
14962 #define HAVE_PTHREADS_H 1
14965 for cf_lib_pthread in pthread c_r
14967 echo "$as_me:14967: checking if we can link with the $cf_lib_pthread library" >&5
14968 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14969 cf_save_LIBS="$LIBS"
14971 cf_add_libs="$LIBS"
14974 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14975 # filter duplicates
14976 for cf_add_1lib in $cf_add_0lib; do
14977 for cf_add_2lib in $cf_add_libs; do
14978 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14983 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14985 LIBS="$cf_add_libs"
14987 cat >"conftest.$ac_ext" <<_ACEOF
14988 #line 14988 "configure"
14989 #include "confdefs.h"
14991 #include <pthread.h>
14997 int rc = pthread_create(0,0,0,0);
14998 int r2 = pthread_mutexattr_settype(0, 0);
15004 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15005 if { (eval echo "$as_me:15005: \"$ac_link\"") >&5
15006 (eval $ac_link) 2>&5
15008 echo "$as_me:15008: \$? = $ac_status" >&5
15009 (exit "$ac_status"); } &&
15010 { ac_try='test -s "conftest$ac_exeext"'
15011 { (eval echo "$as_me:15011: \"$ac_try\"") >&5
15012 (eval $ac_try) 2>&5
15014 echo "$as_me:15014: \$? = $ac_status" >&5
15015 (exit "$ac_status"); }; }; then
15018 echo "$as_me: failed program was:" >&5
15019 cat "conftest.$ac_ext" >&5
15022 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15023 LIBS="$cf_save_LIBS"
15024 echo "$as_me:15024: result: $with_pthread" >&5
15025 echo "${ECHO_T}$with_pthread" >&6
15026 test "$with_pthread" = yes && break
15029 if test "$with_pthread" = yes ; then
15031 cf_add_libs="$LIBS"
15034 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15035 # filter duplicates
15036 for cf_add_1lib in $cf_add_0lib; do
15037 for cf_add_2lib in $cf_add_libs; do
15038 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15043 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15045 LIBS="$cf_add_libs"
15047 cat >>confdefs.h <<\EOF
15048 #define HAVE_LIBPTHREADS 1
15052 { { echo "$as_me:15052: error: Cannot link with pthread library" >&5
15053 echo "$as_me: error: Cannot link with pthread library" >&2;}
15054 { (exit 1); exit 1; }; }
15061 echo "$as_me:15061: checking if you want to use weak-symbols for pthreads" >&5
15062 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15064 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15065 if test "${enable_weak_symbols+set}" = set; then
15066 enableval="$enable_weak_symbols"
15067 use_weak_symbols=$withval
15069 use_weak_symbols=no
15071 echo "$as_me:15071: result: $use_weak_symbols" >&5
15072 echo "${ECHO_T}$use_weak_symbols" >&6
15073 if test "$use_weak_symbols" = yes ; then
15075 echo "$as_me:15075: checking if $CC supports weak symbols" >&5
15076 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15077 if test "${cf_cv_weak_symbols+set}" = set; then
15078 echo $ECHO_N "(cached) $ECHO_C" >&6
15081 cat >"conftest.$ac_ext" <<_ACEOF
15082 #line 15082 "configure"
15083 #include "confdefs.h"
15090 #if defined(__GNUC__)
15091 # if defined __USE_ISOC99
15092 # define _cat_pragma(exp) _Pragma(#exp)
15093 # define _weak_pragma(exp) _cat_pragma(weak name)
15095 # define _weak_pragma(exp)
15097 # define _declare(name) __extension__ extern __typeof__(name) name
15098 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15101 weak_symbol(fopen);
15107 rm -f "conftest.$ac_objext"
15108 if { (eval echo "$as_me:15108: \"$ac_compile\"") >&5
15109 (eval $ac_compile) 2>&5
15111 echo "$as_me:15111: \$? = $ac_status" >&5
15112 (exit "$ac_status"); } &&
15113 { ac_try='test -s "conftest.$ac_objext"'
15114 { (eval echo "$as_me:15114: \"$ac_try\"") >&5
15115 (eval $ac_try) 2>&5
15117 echo "$as_me:15117: \$? = $ac_status" >&5
15118 (exit "$ac_status"); }; }; then
15119 cf_cv_weak_symbols=yes
15121 echo "$as_me: failed program was:" >&5
15122 cat "conftest.$ac_ext" >&5
15123 cf_cv_weak_symbols=no
15125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15128 echo "$as_me:15128: result: $cf_cv_weak_symbols" >&5
15129 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15132 cf_cv_weak_symbols=no
15135 if test $cf_cv_weak_symbols = yes ; then
15137 cat >>confdefs.h <<\EOF
15138 #define USE_WEAK_SYMBOLS 1
15144 if test "$with_pthread" = "yes" ; then
15146 cat >>confdefs.h <<\EOF
15147 #define USE_PTHREADS 1
15150 enable_reentrant=yes
15151 if test $cf_cv_weak_symbols = yes ; then
15156 # OpenSUSE is installing ncurses6, using reentrant option.
15157 echo "$as_me:15157: checking for _nc_TABSIZE" >&5
15158 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15159 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15160 echo $ECHO_N "(cached) $ECHO_C" >&6
15162 cat >"conftest.$ac_ext" <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165 #define _nc_TABSIZE autoconf_temporary
15166 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15173 /* We use char because int might match the return type of a gcc2
15174 builtin and then its argument prototype would still apply. */
15175 char _nc_TABSIZE (void);
15181 /* The GNU C library defines stubs for functions which it implements
15182 to always fail with ENOSYS. Some functions are actually named
15183 something starting with __ and the normal name is an alias. */
15184 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15185 #error found stub for _nc_TABSIZE
15188 return _nc_TABSIZE ();
15193 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15194 if { (eval echo "$as_me:15194: \"$ac_link\"") >&5
15195 (eval $ac_link) 2>&5
15197 echo "$as_me:15197: \$? = $ac_status" >&5
15198 (exit "$ac_status"); } &&
15199 { ac_try='test -s "conftest$ac_exeext"'
15200 { (eval echo "$as_me:15200: \"$ac_try\"") >&5
15201 (eval $ac_try) 2>&5
15203 echo "$as_me:15203: \$? = $ac_status" >&5
15204 (exit "$ac_status"); }; }; then
15205 ac_cv_func__nc_TABSIZE=yes
15207 echo "$as_me: failed program was:" >&5
15208 cat "conftest.$ac_ext" >&5
15209 ac_cv_func__nc_TABSIZE=no
15211 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15213 echo "$as_me:15213: result: $ac_cv_func__nc_TABSIZE" >&5
15214 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15215 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15216 assume_reentrant=yes
15218 assume_reentrant=no
15221 # Reentrant code has to be opaque; there's little advantage to making ncurses
15222 # opaque outside of that, so there is no --enable-opaque option. We can use
15223 # this option without --with-pthreads, but this will be always set for
15225 echo "$as_me:15225: checking if you want experimental reentrant code" >&5
15226 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15228 # Check whether --enable-reentrant or --disable-reentrant was given.
15229 if test "${enable_reentrant+set}" = set; then
15230 enableval="$enable_reentrant"
15231 with_reentrant=$enableval
15233 with_reentrant=$assume_reentrant
15235 echo "$as_me:15235: result: $with_reentrant" >&5
15236 echo "${ECHO_T}$with_reentrant" >&6
15237 if test "$with_reentrant" = yes ; then
15238 cf_cv_enable_reentrant=1
15239 if test $cf_cv_weak_symbols = yes ; then
15241 # remove pthread library from $LIBS
15242 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15244 elif test "$assume_reentrant" = no ; then
15245 LIB_SUFFIX="t${LIB_SUFFIX}"
15248 cat >>confdefs.h <<\EOF
15249 #define USE_REENTRANT 1
15253 cf_cv_enable_reentrant=0
15256 ### Allow using a different wrap-prefix
15257 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15258 echo "$as_me:15258: checking for prefix used to wrap public variables" >&5
15259 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15261 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15262 if test "${with_wrap_prefix+set}" = set; then
15263 withval="$with_wrap_prefix"
15264 NCURSES_WRAP_PREFIX=$withval
15266 NCURSES_WRAP_PREFIX=_nc_
15268 echo "$as_me:15268: result: $NCURSES_WRAP_PREFIX" >&5
15269 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15271 NCURSES_WRAP_PREFIX=_nc_
15274 cat >>confdefs.h <<EOF
15275 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15278 ###############################################################################
15280 ### use option --disable-echo to suppress full display compiling commands
15282 echo "$as_me:15282: checking if you want to see long compiling messages" >&5
15283 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15285 # Check whether --enable-echo or --disable-echo was given.
15286 if test "${enable_echo+set}" = set; then
15287 enableval="$enable_echo"
15288 test "$enableval" != no && enableval=yes
15289 if test "$enableval" != "yes" ; then
15292 ECHO_LD='@echo linking $@;'
15293 RULE_CC='@echo compiling $<'
15294 SHOW_CC='@echo compiling $@'
15316 echo "$as_me:15316: result: $enableval" >&5
15317 echo "${ECHO_T}$enableval" >&6
15319 echo "$as_me:15319: checking if you want to use C11 _Noreturn feature" >&5
15320 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15322 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15323 if test "${enable_stdnoreturn+set}" = set; then
15324 enableval="$enable_stdnoreturn"
15325 test "$enableval" != yes && enableval=no
15326 if test "$enableval" != "no" ; then
15327 enable_stdnoreturn=yes
15329 enable_stdnoreturn=no
15333 enable_stdnoreturn=no
15336 echo "$as_me:15336: result: $enable_stdnoreturn" >&5
15337 echo "${ECHO_T}$enable_stdnoreturn" >&6
15339 if test $enable_stdnoreturn = yes; then
15340 echo "$as_me:15340: checking for C11 _Noreturn feature" >&5
15341 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15342 if test "${cf_cv_c11_noreturn+set}" = set; then
15343 echo $ECHO_N "(cached) $ECHO_C" >&6
15345 cat >"conftest.$ac_ext" <<_ACEOF
15346 #line 15346 "configure"
15347 #include "confdefs.h"
15350 #include <stdlib.h>
15351 #include <stdnoreturn.h>
15352 static _Noreturn void giveup(void) { exit(0); }
15357 if (feof(stdin)) giveup()
15362 rm -f "conftest.$ac_objext"
15363 if { (eval echo "$as_me:15363: \"$ac_compile\"") >&5
15364 (eval $ac_compile) 2>&5
15366 echo "$as_me:15366: \$? = $ac_status" >&5
15367 (exit "$ac_status"); } &&
15368 { ac_try='test -s "conftest.$ac_objext"'
15369 { (eval echo "$as_me:15369: \"$ac_try\"") >&5
15370 (eval $ac_try) 2>&5
15372 echo "$as_me:15372: \$? = $ac_status" >&5
15373 (exit "$ac_status"); }; }; then
15374 cf_cv_c11_noreturn=yes
15376 echo "$as_me: failed program was:" >&5
15377 cat "conftest.$ac_ext" >&5
15378 cf_cv_c11_noreturn=no
15380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15383 echo "$as_me:15383: result: $cf_cv_c11_noreturn" >&5
15384 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15386 cf_cv_c11_noreturn=no,
15389 if test "$cf_cv_c11_noreturn" = yes; then
15391 cat >>confdefs.h <<\EOF
15392 #define HAVE_STDNORETURN_H 1
15395 cat >>confdefs.h <<EOF
15396 #define STDC_NORETURN _Noreturn
15399 HAVE_STDNORETURN_H=1
15401 HAVE_STDNORETURN_H=0
15404 if test "$GCC" = yes || test "$GXX" = yes
15407 if test "$GCC" = yes || test "$GXX" = yes
15412 for cf_temp_scan in $CFLAGS
15414 case "x$cf_temp_scan" in
15417 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15418 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15423 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15424 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15429 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15430 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15435 if test "x$CFLAGS" != "x$cf_temp_flags"
15437 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15439 echo "${as_me:-configure}:15439: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15441 CFLAGS="$cf_temp_flags"
15442 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15444 echo "${as_me:-configure}:15444: testing ... fixed $CFLAGS ..." 1>&5
15446 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15448 echo "${as_me:-configure}:15448: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15455 if test "$GCC" = yes || test "$GXX" = yes
15460 for cf_temp_scan in $CPPFLAGS
15462 case "x$cf_temp_scan" in
15465 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15466 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15471 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15472 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15477 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15478 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15483 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15485 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15487 echo "${as_me:-configure}:15487: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15489 CPPFLAGS="$cf_temp_flags"
15490 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15492 echo "${as_me:-configure}:15492: testing ... fixed $CPPFLAGS ..." 1>&5
15494 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15496 echo "${as_me:-configure}:15496: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15503 if test "$GCC" = yes || test "$GXX" = yes
15508 for cf_temp_scan in $LDFLAGS
15510 case "x$cf_temp_scan" in
15513 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15514 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15519 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15520 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15525 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15526 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15531 if test "x$LDFLAGS" != "x$cf_temp_flags"
15533 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15535 echo "${as_me:-configure}:15535: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15537 LDFLAGS="$cf_temp_flags"
15538 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15540 echo "${as_me:-configure}:15540: testing ... fixed $LDFLAGS ..." 1>&5
15542 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15544 echo "${as_me:-configure}:15544: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15551 echo "$as_me:15551: checking if you want to turn on gcc warnings" >&5
15552 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15554 # Check whether --enable-warnings or --disable-warnings was given.
15555 if test "${enable_warnings+set}" = set; then
15556 enableval="$enable_warnings"
15557 test "$enableval" != yes && enableval=no
15558 if test "$enableval" != "no" ; then
15559 enable_warnings=yes
15568 echo "$as_me:15568: result: $enable_warnings" >&5
15569 echo "${ECHO_T}$enable_warnings" >&6
15570 if test "$enable_warnings" = "yes"
15573 if test "x$have_x" = xyes; then
15575 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15576 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15577 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15578 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15579 for cf_X_CFLAGS in $X_CFLAGS
15581 case "x$cf_X_CFLAGS" in
15583 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15586 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15591 cat >"conftest.$ac_ext" <<_ACEOF
15592 #line 15592 "configure"
15593 #include "confdefs.h"
15595 #include <stdlib.h>
15596 #include <X11/Intrinsic.h>
15601 String foo = malloc(1); free((void*)foo)
15606 rm -f "conftest.$ac_objext"
15607 if { (eval echo "$as_me:15607: \"$ac_compile\"") >&5
15608 (eval $ac_compile) 2>&5
15610 echo "$as_me:15610: \$? = $ac_status" >&5
15611 (exit "$ac_status"); } &&
15612 { ac_try='test -s "conftest.$ac_objext"'
15613 { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614 (eval $ac_try) 2>&5
15616 echo "$as_me:15616: \$? = $ac_status" >&5
15617 (exit "$ac_status"); }; }; then
15619 echo "$as_me:15619: checking for X11/Xt const-feature" >&5
15620 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15621 if test "${cf_cv_const_x_string+set}" = set; then
15622 echo $ECHO_N "(cached) $ECHO_C" >&6
15625 cat >"conftest.$ac_ext" <<_ACEOF
15626 #line 15626 "configure"
15627 #include "confdefs.h"
15629 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15630 #undef XTSTRINGDEFINES /* X11R5 and later */
15631 #include <stdlib.h>
15632 #include <X11/Intrinsic.h>
15637 String foo = malloc(1); *foo = 0
15642 rm -f "conftest.$ac_objext"
15643 if { (eval echo "$as_me:15643: \"$ac_compile\"") >&5
15644 (eval $ac_compile) 2>&5
15646 echo "$as_me:15646: \$? = $ac_status" >&5
15647 (exit "$ac_status"); } &&
15648 { ac_try='test -s "conftest.$ac_objext"'
15649 { (eval echo "$as_me:15649: \"$ac_try\"") >&5
15650 (eval $ac_try) 2>&5
15652 echo "$as_me:15652: \$? = $ac_status" >&5
15653 (exit "$ac_status"); }; }; then
15655 cf_cv_const_x_string=no
15658 echo "$as_me: failed program was:" >&5
15659 cat "conftest.$ac_ext" >&5
15661 cf_cv_const_x_string=yes
15664 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15667 echo "$as_me:15667: result: $cf_cv_const_x_string" >&5
15668 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15670 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15671 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15672 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15674 case "$cf_cv_const_x_string" in
15677 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15678 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15683 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15684 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15690 echo "$as_me: failed program was:" >&5
15691 cat "conftest.$ac_ext" >&5
15693 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15695 cat > "conftest.$ac_ext" <<EOF
15696 #line 15696 "${as_me:-configure}"
15697 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15699 if test "$INTEL_COMPILER" = yes
15701 # The "-wdXXX" options suppress warnings:
15702 # remark #1419: external declaration in primary source file
15703 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15704 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15705 # remark #193: zero used for undefined preprocessing identifier
15706 # remark #593: variable "curs_sb_left_arrow" was set but never used
15707 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15708 # remark #869: parameter "tw" was never referenced
15709 # remark #981: operands are evaluated in unspecified order
15710 # warning #279: controlling expression is constant
15712 { echo "$as_me:15712: checking for $CC warning options..." >&5
15713 echo "$as_me: checking for $CC warning options..." >&6;}
15714 cf_save_CFLAGS="$CFLAGS"
15715 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15727 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15728 if { (eval echo "$as_me:15728: \"$ac_compile\"") >&5
15729 (eval $ac_compile) 2>&5
15731 echo "$as_me:15731: \$? = $ac_status" >&5
15732 (exit "$ac_status"); }; then
15733 test -n "$verbose" && echo "$as_me:15733: result: ... -$cf_opt" >&5
15734 echo "${ECHO_T}... -$cf_opt" >&6
15735 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15738 CFLAGS="$cf_save_CFLAGS"
15739 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15741 { echo "$as_me:15741: checking for $CC warning options..." >&5
15742 echo "$as_me: checking for $CC warning options..." >&6;}
15743 cf_save_CFLAGS="$CFLAGS"
15745 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15746 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15747 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15748 for cf_opt in W Wall \
15749 Wbad-function-cast \
15752 Wdeclaration-after-statement \
15755 Wmissing-declarations \
15756 Wmissing-prototypes \
15760 Wstrict-prototypes \
15761 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15763 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15764 if { (eval echo "$as_me:15764: \"$ac_compile\"") >&5
15765 (eval $ac_compile) 2>&5
15767 echo "$as_me:15767: \$? = $ac_status" >&5
15768 (exit "$ac_status"); }; then
15769 test -n "$verbose" && echo "$as_me:15769: result: ... -$cf_opt" >&5
15770 echo "${ECHO_T}... -$cf_opt" >&6
15773 case "$GCC_VERSION" in
15775 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15777 echo "${as_me:-configure}:15777: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15783 case "$GCC_VERSION" in
15785 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15787 echo "${as_me:-configure}:15787: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15793 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15796 CFLAGS="$cf_save_CFLAGS"
15802 if test "$GCC" = yes || test "$GXX" = yes
15804 cat > conftest.i <<EOF
15806 #define GCC_PRINTF 0
15809 #define GCC_SCANF 0
15811 #ifndef GCC_NORETURN
15812 #define GCC_NORETURN /* nothing */
15815 #define GCC_UNUSED /* nothing */
15818 if test "$GCC" = yes
15820 { echo "$as_me:15820: checking for $CC __attribute__ directives..." >&5
15821 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15822 cat > "conftest.$ac_ext" <<EOF
15823 #line 15823 "${as_me:-configure}"
15825 #include "confdefs.h"
15826 #include "conftest.h"
15827 #include "conftest.i"
15829 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15831 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15834 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15836 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15838 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15839 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15840 extern GCC_NORETURN void foo(void);
15841 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15843 cf_printf_attribute=no
15844 cf_scanf_attribute=no
15845 for cf_attribute in scanf printf unused noreturn
15848 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15850 cf_directive="__attribute__(($cf_attribute))"
15851 echo "checking for $CC $cf_directive" 1>&5
15853 case "$cf_attribute" in
15855 cf_printf_attribute=yes
15856 cat >conftest.h <<EOF
15857 #define GCC_$cf_ATTRIBUTE 1
15861 cf_scanf_attribute=yes
15862 cat >conftest.h <<EOF
15863 #define GCC_$cf_ATTRIBUTE 1
15867 cat >conftest.h <<EOF
15868 #define GCC_$cf_ATTRIBUTE $cf_directive
15873 if { (eval echo "$as_me:15873: \"$ac_compile\"") >&5
15874 (eval $ac_compile) 2>&5
15876 echo "$as_me:15876: \$? = $ac_status" >&5
15877 (exit "$ac_status"); }; then
15878 test -n "$verbose" && echo "$as_me:15878: result: ... $cf_attribute" >&5
15879 echo "${ECHO_T}... $cf_attribute" >&6
15880 cat conftest.h >>confdefs.h
15881 case "$cf_attribute" in
15884 cat >>confdefs.h <<EOF
15885 #define GCC_NORETURN $cf_directive
15890 cf_value='/* nothing */'
15891 if test "$cf_printf_attribute" != no ; then
15892 cf_value='__attribute__((format(printf,fmt,var)))'
15894 cat >>confdefs.h <<\EOF
15895 #define GCC_PRINTF 1
15900 cat >>confdefs.h <<EOF
15901 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15906 cf_value='/* nothing */'
15907 if test "$cf_scanf_attribute" != no ; then
15908 cf_value='__attribute__((format(scanf,fmt,var)))'
15910 cat >>confdefs.h <<\EOF
15911 #define GCC_SCANF 1
15916 cat >>confdefs.h <<EOF
15917 #define GCC_SCANFLIKE(fmt,var) $cf_value
15923 cat >>confdefs.h <<EOF
15924 #define GCC_UNUSED $cf_directive
15932 ${FGREP-fgrep} define conftest.i >>confdefs.h
15939 if test "x$enable_warnings" = "xyes"; then
15941 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
15945 ### use option --enable-assertions to turn on generation of assertion code
15946 echo "$as_me:15946: checking if you want to enable runtime assertions" >&5
15947 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15949 # Check whether --enable-assertions or --disable-assertions was given.
15950 if test "${enable_assertions+set}" = set; then
15951 enableval="$enable_assertions"
15952 with_assertions=$enableval
15956 echo "$as_me:15956: result: $with_assertions" >&5
15957 echo "${ECHO_T}$with_assertions" >&6
15960 if test "$with_assertions" = no
15962 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15965 ADAFLAGS="$ADAFLAGS -gnata"
15970 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15972 cat >>confdefs.h <<\EOF
15973 #define HAVE_NC_ALLOC_H 1
15976 ### use option --enable-expanded to generate certain macros as functions
15978 # Check whether --enable-expanded or --disable-expanded was given.
15979 if test "${enable_expanded+set}" = set; then
15980 enableval="$enable_expanded"
15981 test "$enableval" = yes &&
15982 cat >>confdefs.h <<\EOF
15983 #define NCURSES_EXPANDED 1
15988 ### use option --disable-macros to suppress macros in favor of functions
15990 # Check whether --enable-macros or --disable-macros was given.
15991 if test "${enable_macros+set}" = set; then
15992 enableval="$enable_macros"
15993 test "$enableval" = no &&
15994 cat >>confdefs.h <<\EOF
15995 #define NCURSES_NOMACROS 1
16000 # Normally we only add trace() to the debug-library. Allow this to be
16001 # extended to all models of the ncurses library:
16003 case "$CFLAGS $CPPFLAGS" in
16009 echo "$as_me:16009: checking whether to add trace feature to all models" >&5
16010 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16012 # Check whether --with-trace or --without-trace was given.
16013 if test "${with_trace+set}" = set; then
16014 withval="$with_trace"
16015 cf_with_trace=$withval
16017 cf_with_trace=$cf_all_traces
16019 echo "$as_me:16019: result: $cf_with_trace" >&5
16020 echo "${ECHO_T}$cf_with_trace" >&6
16022 if test "$cf_with_trace" = yes ; then
16028 cf_new_extra_cppflags=
16030 for cf_add_cflags in -DTRACE
16032 case "$cf_fix_cppflags" in
16034 case "$cf_add_cflags" in
16035 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16036 case "$cf_add_cflags" in
16038 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16040 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16041 && test -z "${cf_tst_cflags}" \
16042 && cf_fix_cppflags=yes
16044 if test "$cf_fix_cppflags" = yes ; then
16046 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16047 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16050 elif test "${cf_tst_cflags}" = "\"'" ; then
16052 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16053 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16059 case "$CPPFLAGS" in
16063 case "$cf_add_cflags" in
16065 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16067 CPPFLAGS=`echo "$CPPFLAGS" | \
16068 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16069 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16074 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16075 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16082 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16083 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16090 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16091 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16093 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16095 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16096 && test -z "${cf_tst_cflags}" \
16097 && cf_fix_cppflags=no
16102 if test -n "$cf_new_cflags" ; then
16104 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16105 CFLAGS="${CFLAGS}$cf_new_cflags"
16109 if test -n "$cf_new_cppflags" ; then
16111 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16112 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16116 if test -n "$cf_new_extra_cppflags" ; then
16118 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16119 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16127 echo "$as_me:16127: checking if we want to use GNAT projects" >&5
16128 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16130 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16131 if test "${enable_gnat_projects+set}" = set; then
16132 enableval="$enable_gnat_projects"
16133 test "$enableval" != no && enableval=yes
16134 if test "$enableval" != "yes" ; then
16135 enable_gnat_projects=no
16137 enable_gnat_projects=yes
16141 enable_gnat_projects=yes
16144 echo "$as_me:16144: result: $enable_gnat_projects" >&5
16145 echo "${ECHO_T}$enable_gnat_projects" >&6
16147 ### Checks for libraries.
16148 case $cf_cv_system_name in
16151 echo "$as_me:16151: checking if ssp library is needed" >&5
16152 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16153 if test "${cf_cv_need_libssp+set}" = set; then
16154 echo $ECHO_N "(cached) $ECHO_C" >&6
16157 cat >"conftest.$ac_ext" <<_ACEOF
16158 #line 16158 "configure"
16159 #include "confdefs.h"
16161 #include <sys/types.h>
16162 #include <dirent.h>
16168 DIR *dp = opendir(".");
16174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16175 if { (eval echo "$as_me:16175: \"$ac_link\"") >&5
16176 (eval $ac_link) 2>&5
16178 echo "$as_me:16178: \$? = $ac_status" >&5
16179 (exit "$ac_status"); } &&
16180 { ac_try='test -s "conftest$ac_exeext"'
16181 { (eval echo "$as_me:16181: \"$ac_try\"") >&5
16182 (eval $ac_try) 2>&5
16184 echo "$as_me:16184: \$? = $ac_status" >&5
16185 (exit "$ac_status"); }; }; then
16186 cf_cv_need_libssp=no
16188 echo "$as_me: failed program was:" >&5
16189 cat "conftest.$ac_ext" >&5
16191 cf_save_LIBS="$LIBS"
16193 cat >"conftest.$ac_ext" <<_ACEOF
16194 #line 16194 "configure"
16195 #include "confdefs.h"
16197 #include <sys/types.h>
16198 #include <dirent.h>
16204 DIR *dp = opendir(".");
16210 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16211 if { (eval echo "$as_me:16211: \"$ac_link\"") >&5
16212 (eval $ac_link) 2>&5
16214 echo "$as_me:16214: \$? = $ac_status" >&5
16215 (exit "$ac_status"); } &&
16216 { ac_try='test -s "conftest$ac_exeext"'
16217 { (eval echo "$as_me:16217: \"$ac_try\"") >&5
16218 (eval $ac_try) 2>&5
16220 echo "$as_me:16220: \$? = $ac_status" >&5
16221 (exit "$ac_status"); }; }; then
16222 cf_cv_need_libssp=yes
16224 echo "$as_me: failed program was:" >&5
16225 cat "conftest.$ac_ext" >&5
16226 cf_cv_need_libssp=maybe
16228 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16229 LIBS="$cf_save_LIBS"
16232 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16234 echo "$as_me:16234: result: $cf_cv_need_libssp" >&5
16235 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16237 if test "x$cf_cv_need_libssp" = xyes
16240 cf_add_libs="$LIBS"
16243 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16244 # filter duplicates
16245 for cf_add_1lib in $cf_add_0lib; do
16246 for cf_add_2lib in $cf_add_libs; do
16247 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16252 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16254 LIBS="$cf_add_libs"
16260 echo "$as_me:16260: checking for gettimeofday" >&5
16261 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16262 if test "${ac_cv_func_gettimeofday+set}" = set; then
16263 echo $ECHO_N "(cached) $ECHO_C" >&6
16265 cat >"conftest.$ac_ext" <<_ACEOF
16266 #line 16266 "configure"
16267 #include "confdefs.h"
16268 #define gettimeofday autoconf_temporary
16269 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16270 #undef gettimeofday
16276 /* We use char because int might match the return type of a gcc2
16277 builtin and then its argument prototype would still apply. */
16278 char gettimeofday (void);
16284 /* The GNU C library defines stubs for functions which it implements
16285 to always fail with ENOSYS. Some functions are actually named
16286 something starting with __ and the normal name is an alias. */
16287 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16288 #error found stub for gettimeofday
16291 return gettimeofday ();
16296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16297 if { (eval echo "$as_me:16297: \"$ac_link\"") >&5
16298 (eval $ac_link) 2>&5
16300 echo "$as_me:16300: \$? = $ac_status" >&5
16301 (exit "$ac_status"); } &&
16302 { ac_try='test -s "conftest$ac_exeext"'
16303 { (eval echo "$as_me:16303: \"$ac_try\"") >&5
16304 (eval $ac_try) 2>&5
16306 echo "$as_me:16306: \$? = $ac_status" >&5
16307 (exit "$ac_status"); }; }; then
16308 ac_cv_func_gettimeofday=yes
16310 echo "$as_me: failed program was:" >&5
16311 cat "conftest.$ac_ext" >&5
16312 ac_cv_func_gettimeofday=no
16314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16316 echo "$as_me:16316: result: $ac_cv_func_gettimeofday" >&5
16317 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16318 if test "$ac_cv_func_gettimeofday" = yes; then
16319 cat >>confdefs.h <<\EOF
16320 #define HAVE_GETTIMEOFDAY 1
16325 echo "$as_me:16325: checking for gettimeofday in -lbsd" >&5
16326 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16327 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16328 echo $ECHO_N "(cached) $ECHO_C" >&6
16330 ac_check_lib_save_LIBS=$LIBS
16332 cat >"conftest.$ac_ext" <<_ACEOF
16333 #line 16333 "configure"
16334 #include "confdefs.h"
16336 /* Override any gcc2 internal prototype to avoid an error. */
16340 /* We use char because int might match the return type of a gcc2
16341 builtin and then its argument prototype would still apply. */
16342 char gettimeofday ();
16351 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16352 if { (eval echo "$as_me:16352: \"$ac_link\"") >&5
16353 (eval $ac_link) 2>&5
16355 echo "$as_me:16355: \$? = $ac_status" >&5
16356 (exit "$ac_status"); } &&
16357 { ac_try='test -s "conftest$ac_exeext"'
16358 { (eval echo "$as_me:16358: \"$ac_try\"") >&5
16359 (eval $ac_try) 2>&5
16361 echo "$as_me:16361: \$? = $ac_status" >&5
16362 (exit "$ac_status"); }; }; then
16363 ac_cv_lib_bsd_gettimeofday=yes
16365 echo "$as_me: failed program was:" >&5
16366 cat "conftest.$ac_ext" >&5
16367 ac_cv_lib_bsd_gettimeofday=no
16369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16370 LIBS=$ac_check_lib_save_LIBS
16372 echo "$as_me:16372: result: $ac_cv_lib_bsd_gettimeofday" >&5
16373 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16374 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16376 cat >>confdefs.h <<\EOF
16377 #define HAVE_GETTIMEOFDAY 1
16387 ### Checks for header files.
16388 echo "$as_me:16388: checking for ANSI C header files" >&5
16389 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16390 if test "${ac_cv_header_stdc+set}" = set; then
16391 echo $ECHO_N "(cached) $ECHO_C" >&6
16393 cat >"conftest.$ac_ext" <<_ACEOF
16394 #line 16394 "configure"
16395 #include "confdefs.h"
16396 #include <stdlib.h>
16397 #include <stdarg.h>
16398 #include <string.h>
16402 if { (eval echo "$as_me:16402: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16403 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16405 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16407 cat conftest.err >&5
16408 echo "$as_me:16408: \$? = $ac_status" >&5
16409 (exit "$ac_status"); } >/dev/null; then
16410 if test -s conftest.err; then
16411 ac_cpp_err=$ac_c_preproc_warn_flag
16418 if test -z "$ac_cpp_err"; then
16419 ac_cv_header_stdc=yes
16421 echo "$as_me: failed program was:" >&5
16422 cat "conftest.$ac_ext" >&5
16423 ac_cv_header_stdc=no
16425 rm -f conftest.err "conftest.$ac_ext"
16427 if test $ac_cv_header_stdc = yes; then
16428 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16429 cat >"conftest.$ac_ext" <<_ACEOF
16430 #line 16430 "configure"
16431 #include "confdefs.h"
16432 #include <string.h>
16435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16436 $EGREP "memchr" >/dev/null 2>&1; then
16439 ac_cv_header_stdc=no
16445 if test $ac_cv_header_stdc = yes; then
16446 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16447 cat >"conftest.$ac_ext" <<_ACEOF
16448 #line 16448 "configure"
16449 #include "confdefs.h"
16450 #include <stdlib.h>
16453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16454 $EGREP "free" >/dev/null 2>&1; then
16457 ac_cv_header_stdc=no
16463 if test $ac_cv_header_stdc = yes; then
16464 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16465 if test "$cross_compiling" = yes; then
16468 cat >"conftest.$ac_ext" <<_ACEOF
16469 #line 16469 "configure"
16470 #include "confdefs.h"
16472 #if ((' ' & 0x0FF) == 0x020)
16473 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16474 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16476 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16477 || ('j' <= (c) && (c) <= 'r') \
16478 || ('s' <= (c) && (c) <= 'z'))
16479 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16482 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16487 for (i = 0; i < 256; i++)
16488 if (XOR (islower (i), ISLOWER (i))
16489 || toupper (i) != TOUPPER (i))
16490 $ac_main_return(2);
16491 $ac_main_return (0);
16494 rm -f "conftest$ac_exeext"
16495 if { (eval echo "$as_me:16495: \"$ac_link\"") >&5
16496 (eval $ac_link) 2>&5
16498 echo "$as_me:16498: \$? = $ac_status" >&5
16499 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16500 { (eval echo "$as_me:16500: \"$ac_try\"") >&5
16501 (eval $ac_try) 2>&5
16503 echo "$as_me:16503: \$? = $ac_status" >&5
16504 (exit "$ac_status"); }; }; then
16507 echo "$as_me: program exited with status $ac_status" >&5
16508 echo "$as_me: failed program was:" >&5
16509 cat "conftest.$ac_ext" >&5
16510 ac_cv_header_stdc=no
16512 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16516 echo "$as_me:16516: result: $ac_cv_header_stdc" >&5
16517 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16518 if test $ac_cv_header_stdc = yes; then
16520 cat >>confdefs.h <<\EOF
16521 #define STDC_HEADERS 1
16526 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16528 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16529 inttypes.h stdint.h unistd.h
16531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16532 echo "$as_me:16532: checking for $ac_header" >&5
16533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16535 echo $ECHO_N "(cached) $ECHO_C" >&6
16537 cat >"conftest.$ac_ext" <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540 $ac_includes_default
16541 #include <$ac_header>
16543 rm -f "conftest.$ac_objext"
16544 if { (eval echo "$as_me:16544: \"$ac_compile\"") >&5
16545 (eval $ac_compile) 2>&5
16547 echo "$as_me:16547: \$? = $ac_status" >&5
16548 (exit "$ac_status"); } &&
16549 { ac_try='test -s "conftest.$ac_objext"'
16550 { (eval echo "$as_me:16550: \"$ac_try\"") >&5
16551 (eval $ac_try) 2>&5
16553 echo "$as_me:16553: \$? = $ac_status" >&5
16554 (exit "$ac_status"); }; }; then
16555 eval "$as_ac_Header=yes"
16557 echo "$as_me: failed program was:" >&5
16558 cat "conftest.$ac_ext" >&5
16559 eval "$as_ac_Header=no"
16561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16563 echo "$as_me:16563: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16564 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16565 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16566 cat >>confdefs.h <<EOF
16567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16573 echo "$as_me:16573: checking for signed char" >&5
16574 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16575 if test "${ac_cv_type_signed_char+set}" = set; then
16576 echo $ECHO_N "(cached) $ECHO_C" >&6
16578 cat >"conftest.$ac_ext" <<_ACEOF
16579 #line 16579 "configure"
16580 #include "confdefs.h"
16581 $ac_includes_default
16585 if ((signed char *) 0)
16587 if (sizeof (signed char))
16593 rm -f "conftest.$ac_objext"
16594 if { (eval echo "$as_me:16594: \"$ac_compile\"") >&5
16595 (eval $ac_compile) 2>&5
16597 echo "$as_me:16597: \$? = $ac_status" >&5
16598 (exit "$ac_status"); } &&
16599 { ac_try='test -s "conftest.$ac_objext"'
16600 { (eval echo "$as_me:16600: \"$ac_try\"") >&5
16601 (eval $ac_try) 2>&5
16603 echo "$as_me:16603: \$? = $ac_status" >&5
16604 (exit "$ac_status"); }; }; then
16605 ac_cv_type_signed_char=yes
16607 echo "$as_me: failed program was:" >&5
16608 cat "conftest.$ac_ext" >&5
16609 ac_cv_type_signed_char=no
16611 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16613 echo "$as_me:16613: result: $ac_cv_type_signed_char" >&5
16614 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16616 echo "$as_me:16616: checking size of signed char" >&5
16617 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16618 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16619 echo $ECHO_N "(cached) $ECHO_C" >&6
16621 if test "$ac_cv_type_signed_char" = yes; then
16622 if test "$cross_compiling" = yes; then
16623 # Depending upon the size, compute the lo and hi bounds.
16624 cat >"conftest.$ac_ext" <<_ACEOF
16625 #line 16625 "configure"
16626 #include "confdefs.h"
16627 $ac_includes_default
16631 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16636 rm -f "conftest.$ac_objext"
16637 if { (eval echo "$as_me:16637: \"$ac_compile\"") >&5
16638 (eval $ac_compile) 2>&5
16640 echo "$as_me:16640: \$? = $ac_status" >&5
16641 (exit "$ac_status"); } &&
16642 { ac_try='test -s "conftest.$ac_objext"'
16643 { (eval echo "$as_me:16643: \"$ac_try\"") >&5
16644 (eval $ac_try) 2>&5
16646 echo "$as_me:16646: \$? = $ac_status" >&5
16647 (exit "$ac_status"); }; }; then
16650 cat >"conftest.$ac_ext" <<_ACEOF
16651 #line 16651 "configure"
16652 #include "confdefs.h"
16653 $ac_includes_default
16657 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16662 rm -f "conftest.$ac_objext"
16663 if { (eval echo "$as_me:16663: \"$ac_compile\"") >&5
16664 (eval $ac_compile) 2>&5
16666 echo "$as_me:16666: \$? = $ac_status" >&5
16667 (exit "$ac_status"); } &&
16668 { ac_try='test -s "conftest.$ac_objext"'
16669 { (eval echo "$as_me:16669: \"$ac_try\"") >&5
16670 (eval $ac_try) 2>&5
16672 echo "$as_me:16672: \$? = $ac_status" >&5
16673 (exit "$ac_status"); }; }; then
16674 ac_hi=$ac_mid; break
16676 echo "$as_me: failed program was:" >&5
16677 cat "conftest.$ac_ext" >&5
16678 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16683 echo "$as_me: failed program was:" >&5
16684 cat "conftest.$ac_ext" >&5
16687 cat >"conftest.$ac_ext" <<_ACEOF
16688 #line 16688 "configure"
16689 #include "confdefs.h"
16690 $ac_includes_default
16694 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16699 rm -f "conftest.$ac_objext"
16700 if { (eval echo "$as_me:16700: \"$ac_compile\"") >&5
16701 (eval $ac_compile) 2>&5
16703 echo "$as_me:16703: \$? = $ac_status" >&5
16704 (exit "$ac_status"); } &&
16705 { ac_try='test -s "conftest.$ac_objext"'
16706 { (eval echo "$as_me:16706: \"$ac_try\"") >&5
16707 (eval $ac_try) 2>&5
16709 echo "$as_me:16709: \$? = $ac_status" >&5
16710 (exit "$ac_status"); }; }; then
16711 ac_lo=$ac_mid; break
16713 echo "$as_me: failed program was:" >&5
16714 cat "conftest.$ac_ext" >&5
16715 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16717 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16720 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16721 # Binary search between lo and hi bounds.
16722 while test "x$ac_lo" != "x$ac_hi"; do
16723 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16724 cat >"conftest.$ac_ext" <<_ACEOF
16725 #line 16725 "configure"
16726 #include "confdefs.h"
16727 $ac_includes_default
16731 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16736 rm -f "conftest.$ac_objext"
16737 if { (eval echo "$as_me:16737: \"$ac_compile\"") >&5
16738 (eval $ac_compile) 2>&5
16740 echo "$as_me:16740: \$? = $ac_status" >&5
16741 (exit "$ac_status"); } &&
16742 { ac_try='test -s "conftest.$ac_objext"'
16743 { (eval echo "$as_me:16743: \"$ac_try\"") >&5
16744 (eval $ac_try) 2>&5
16746 echo "$as_me:16746: \$? = $ac_status" >&5
16747 (exit "$ac_status"); }; }; then
16750 echo "$as_me: failed program was:" >&5
16751 cat "conftest.$ac_ext" >&5
16752 ac_lo=`expr "$ac_mid" + 1`
16754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16756 ac_cv_sizeof_signed_char=$ac_lo
16758 if test "$cross_compiling" = yes; then
16759 { { echo "$as_me:16759: error: cannot run test program while cross compiling" >&5
16760 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16761 { (exit 1); exit 1; }; }
16763 cat >"conftest.$ac_ext" <<_ACEOF
16764 #line 16764 "configure"
16765 #include "confdefs.h"
16766 $ac_includes_default
16770 FILE *f = fopen ("conftest.val", "w");
16772 $ac_main_return (1);
16773 fprintf (f, "%ld", (long)(sizeof (signed char)));
16779 rm -f "conftest$ac_exeext"
16780 if { (eval echo "$as_me:16780: \"$ac_link\"") >&5
16781 (eval $ac_link) 2>&5
16783 echo "$as_me:16783: \$? = $ac_status" >&5
16784 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16785 { (eval echo "$as_me:16785: \"$ac_try\"") >&5
16786 (eval $ac_try) 2>&5
16788 echo "$as_me:16788: \$? = $ac_status" >&5
16789 (exit "$ac_status"); }; }; then
16790 ac_cv_sizeof_signed_char=`cat conftest.val`
16792 echo "$as_me: program exited with status $ac_status" >&5
16793 echo "$as_me: failed program was:" >&5
16794 cat "conftest.$ac_ext" >&5
16796 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16801 ac_cv_sizeof_signed_char=0
16804 echo "$as_me:16804: result: $ac_cv_sizeof_signed_char" >&5
16805 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16806 cat >>confdefs.h <<EOF
16807 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16810 echo "$as_me:16810: checking for ANSI C header files" >&5
16811 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16812 if test "${ac_cv_header_stdc+set}" = set; then
16813 echo $ECHO_N "(cached) $ECHO_C" >&6
16815 cat >"conftest.$ac_ext" <<_ACEOF
16816 #line 16816 "configure"
16817 #include "confdefs.h"
16818 #include <stdlib.h>
16819 #include <stdarg.h>
16820 #include <string.h>
16824 if { (eval echo "$as_me:16824: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16825 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16827 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16829 cat conftest.err >&5
16830 echo "$as_me:16830: \$? = $ac_status" >&5
16831 (exit "$ac_status"); } >/dev/null; then
16832 if test -s conftest.err; then
16833 ac_cpp_err=$ac_c_preproc_warn_flag
16840 if test -z "$ac_cpp_err"; then
16841 ac_cv_header_stdc=yes
16843 echo "$as_me: failed program was:" >&5
16844 cat "conftest.$ac_ext" >&5
16845 ac_cv_header_stdc=no
16847 rm -f conftest.err "conftest.$ac_ext"
16849 if test $ac_cv_header_stdc = yes; then
16850 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16851 cat >"conftest.$ac_ext" <<_ACEOF
16852 #line 16852 "configure"
16853 #include "confdefs.h"
16854 #include <string.h>
16857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16858 $EGREP "memchr" >/dev/null 2>&1; then
16861 ac_cv_header_stdc=no
16867 if test $ac_cv_header_stdc = yes; then
16868 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16869 cat >"conftest.$ac_ext" <<_ACEOF
16870 #line 16870 "configure"
16871 #include "confdefs.h"
16872 #include <stdlib.h>
16875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16876 $EGREP "free" >/dev/null 2>&1; then
16879 ac_cv_header_stdc=no
16885 if test $ac_cv_header_stdc = yes; then
16886 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16887 if test "$cross_compiling" = yes; then
16890 cat >"conftest.$ac_ext" <<_ACEOF
16891 #line 16891 "configure"
16892 #include "confdefs.h"
16894 #if ((' ' & 0x0FF) == 0x020)
16895 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16896 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16898 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16899 || ('j' <= (c) && (c) <= 'r') \
16900 || ('s' <= (c) && (c) <= 'z'))
16901 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16904 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16909 for (i = 0; i < 256; i++)
16910 if (XOR (islower (i), ISLOWER (i))
16911 || toupper (i) != TOUPPER (i))
16912 $ac_main_return(2);
16913 $ac_main_return (0);
16916 rm -f "conftest$ac_exeext"
16917 if { (eval echo "$as_me:16917: \"$ac_link\"") >&5
16918 (eval $ac_link) 2>&5
16920 echo "$as_me:16920: \$? = $ac_status" >&5
16921 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16922 { (eval echo "$as_me:16922: \"$ac_try\"") >&5
16923 (eval $ac_try) 2>&5
16925 echo "$as_me:16925: \$? = $ac_status" >&5
16926 (exit "$ac_status"); }; }; then
16929 echo "$as_me: program exited with status $ac_status" >&5
16930 echo "$as_me: failed program was:" >&5
16931 cat "conftest.$ac_ext" >&5
16932 ac_cv_header_stdc=no
16934 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16938 echo "$as_me:16938: result: $ac_cv_header_stdc" >&5
16939 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16940 if test $ac_cv_header_stdc = yes; then
16942 cat >>confdefs.h <<\EOF
16943 #define STDC_HEADERS 1
16948 ac_header_dirent=no
16949 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16950 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16951 echo "$as_me:16951: checking for $ac_hdr that defines DIR" >&5
16952 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16953 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16954 echo $ECHO_N "(cached) $ECHO_C" >&6
16956 cat >"conftest.$ac_ext" <<_ACEOF
16957 #line 16957 "configure"
16958 #include "confdefs.h"
16959 #include <sys/types.h>
16971 rm -f "conftest.$ac_objext"
16972 if { (eval echo "$as_me:16972: \"$ac_compile\"") >&5
16973 (eval $ac_compile) 2>&5
16975 echo "$as_me:16975: \$? = $ac_status" >&5
16976 (exit "$ac_status"); } &&
16977 { ac_try='test -s "conftest.$ac_objext"'
16978 { (eval echo "$as_me:16978: \"$ac_try\"") >&5
16979 (eval $ac_try) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit "$ac_status"); }; }; then
16983 eval "$as_ac_Header=yes"
16985 echo "$as_me: failed program was:" >&5
16986 cat "conftest.$ac_ext" >&5
16987 eval "$as_ac_Header=no"
16989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16991 echo "$as_me:16991: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16992 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16993 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16994 cat >>confdefs.h <<EOF
16995 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16998 ac_header_dirent=$ac_hdr; break
17002 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17003 if test $ac_header_dirent = dirent.h; then
17004 echo "$as_me:17004: checking for opendir in -ldir" >&5
17005 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17006 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17007 echo $ECHO_N "(cached) $ECHO_C" >&6
17009 ac_check_lib_save_LIBS=$LIBS
17011 cat >"conftest.$ac_ext" <<_ACEOF
17012 #line 17012 "configure"
17013 #include "confdefs.h"
17015 /* Override any gcc2 internal prototype to avoid an error. */
17019 /* We use char because int might match the return type of a gcc2
17020 builtin and then its argument prototype would still apply. */
17030 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17031 if { (eval echo "$as_me:17031: \"$ac_link\"") >&5
17032 (eval $ac_link) 2>&5
17034 echo "$as_me:17034: \$? = $ac_status" >&5
17035 (exit "$ac_status"); } &&
17036 { ac_try='test -s "conftest$ac_exeext"'
17037 { (eval echo "$as_me:17037: \"$ac_try\"") >&5
17038 (eval $ac_try) 2>&5
17040 echo "$as_me:17040: \$? = $ac_status" >&5
17041 (exit "$ac_status"); }; }; then
17042 ac_cv_lib_dir_opendir=yes
17044 echo "$as_me: failed program was:" >&5
17045 cat "conftest.$ac_ext" >&5
17046 ac_cv_lib_dir_opendir=no
17048 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17049 LIBS=$ac_check_lib_save_LIBS
17051 echo "$as_me:17051: result: $ac_cv_lib_dir_opendir" >&5
17052 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17053 if test "$ac_cv_lib_dir_opendir" = yes; then
17058 echo "$as_me:17058: checking for opendir in -lx" >&5
17059 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17060 if test "${ac_cv_lib_x_opendir+set}" = set; then
17061 echo $ECHO_N "(cached) $ECHO_C" >&6
17063 ac_check_lib_save_LIBS=$LIBS
17065 cat >"conftest.$ac_ext" <<_ACEOF
17066 #line 17066 "configure"
17067 #include "confdefs.h"
17069 /* Override any gcc2 internal prototype to avoid an error. */
17073 /* We use char because int might match the return type of a gcc2
17074 builtin and then its argument prototype would still apply. */
17084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17085 if { (eval echo "$as_me:17085: \"$ac_link\"") >&5
17086 (eval $ac_link) 2>&5
17088 echo "$as_me:17088: \$? = $ac_status" >&5
17089 (exit "$ac_status"); } &&
17090 { ac_try='test -s "conftest$ac_exeext"'
17091 { (eval echo "$as_me:17091: \"$ac_try\"") >&5
17092 (eval $ac_try) 2>&5
17094 echo "$as_me:17094: \$? = $ac_status" >&5
17095 (exit "$ac_status"); }; }; then
17096 ac_cv_lib_x_opendir=yes
17098 echo "$as_me: failed program was:" >&5
17099 cat "conftest.$ac_ext" >&5
17100 ac_cv_lib_x_opendir=no
17102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17103 LIBS=$ac_check_lib_save_LIBS
17105 echo "$as_me:17105: result: $ac_cv_lib_x_opendir" >&5
17106 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17107 if test "$ac_cv_lib_x_opendir" = yes; then
17113 echo "$as_me:17113: checking whether time.h and sys/time.h may both be included" >&5
17114 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17115 if test "${ac_cv_header_time+set}" = set; then
17116 echo $ECHO_N "(cached) $ECHO_C" >&6
17118 cat >"conftest.$ac_ext" <<_ACEOF
17119 #line 17119 "configure"
17120 #include "confdefs.h"
17121 #include <sys/types.h>
17122 #include <sys/time.h>
17128 if ((struct tm *) 0)
17134 rm -f "conftest.$ac_objext"
17135 if { (eval echo "$as_me:17135: \"$ac_compile\"") >&5
17136 (eval $ac_compile) 2>&5
17138 echo "$as_me:17138: \$? = $ac_status" >&5
17139 (exit "$ac_status"); } &&
17140 { ac_try='test -s "conftest.$ac_objext"'
17141 { (eval echo "$as_me:17141: \"$ac_try\"") >&5
17142 (eval $ac_try) 2>&5
17144 echo "$as_me:17144: \$? = $ac_status" >&5
17145 (exit "$ac_status"); }; }; then
17146 ac_cv_header_time=yes
17148 echo "$as_me: failed program was:" >&5
17149 cat "conftest.$ac_ext" >&5
17150 ac_cv_header_time=no
17152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17154 echo "$as_me:17154: result: $ac_cv_header_time" >&5
17155 echo "${ECHO_T}$ac_cv_header_time" >&6
17156 if test $ac_cv_header_time = yes; then
17158 cat >>confdefs.h <<\EOF
17159 #define TIME_WITH_SYS_TIME 1
17164 ### checks for compiler characteristics
17166 ac_cpp='$CPP $CPPFLAGS'
17167 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17168 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17169 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17170 ac_main_return="return"
17172 echo "$as_me:17172: checking for an ANSI C-conforming const" >&5
17173 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17174 if test "${ac_cv_c_const+set}" = set; then
17175 echo $ECHO_N "(cached) $ECHO_C" >&6
17177 cat >"conftest.$ac_ext" <<_ACEOF
17178 #line 17178 "configure"
17179 #include "confdefs.h"
17184 /* FIXME: Include the comments suggested by Paul. */
17185 #ifndef __cplusplus
17186 /* Ultrix mips cc rejects this. */
17187 typedef int charset[2];
17189 /* SunOS 4.1.1 cc rejects this. */
17190 char const *const *ccp;
17192 /* NEC SVR4.0.2 mips cc rejects this. */
17193 struct point {int x, y;};
17194 static struct point const zero = {0,0};
17195 /* AIX XL C 1.02.0.0 rejects this.
17196 It does not let you subtract one const X* pointer from another in
17197 an arm of an if-expression whose if-part is not a constant
17199 const char *g = "string";
17200 ccp = &g + (g ? g-g : 0);
17201 /* HPUX 7.0 cc rejects these. */
17204 ccp = (char const *const *) p;
17205 { /* SCO 3.2v4 cc rejects this. */
17207 char const *s = 0 ? (char *) 0 : (char const *) 0;
17211 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17212 int x[] = {25, 17};
17213 const int *foo = &x[0];
17216 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17217 typedef const int *iptr;
17221 { /* AIX XL C 1.02.0.0 rejects this saying
17222 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17223 struct s { int j; const int *ap[3]; };
17224 struct s *b; b->j = 5;
17226 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17227 const int foo = 10;
17235 rm -f "conftest.$ac_objext"
17236 if { (eval echo "$as_me:17236: \"$ac_compile\"") >&5
17237 (eval $ac_compile) 2>&5
17239 echo "$as_me:17239: \$? = $ac_status" >&5
17240 (exit "$ac_status"); } &&
17241 { ac_try='test -s "conftest.$ac_objext"'
17242 { (eval echo "$as_me:17242: \"$ac_try\"") >&5
17243 (eval $ac_try) 2>&5
17245 echo "$as_me:17245: \$? = $ac_status" >&5
17246 (exit "$ac_status"); }; }; then
17249 echo "$as_me: failed program was:" >&5
17250 cat "conftest.$ac_ext" >&5
17253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17255 echo "$as_me:17255: result: $ac_cv_c_const" >&5
17256 echo "${ECHO_T}$ac_cv_c_const" >&6
17257 if test $ac_cv_c_const = no; then
17259 cat >>confdefs.h <<\EOF
17265 ### Checks for external-data
17267 echo "$as_me:17267: checking if data-only library module links" >&5
17268 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17269 if test "${cf_cv_link_dataonly+set}" = set; then
17270 echo $ECHO_N "(cached) $ECHO_C" >&6
17274 cat >conftest.$ac_ext <<EOF
17275 #line 17275 "configure"
17276 int testdata[3] = { 123, 456, 789 };
17278 if { (eval echo "$as_me:17278: \"$ac_compile\"") >&5
17279 (eval $ac_compile) 2>&5
17281 echo "$as_me:17281: \$? = $ac_status" >&5
17282 (exit "$ac_status"); } ; then
17283 mv conftest.o data.o && \
17284 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17286 rm -f conftest.$ac_ext data.o
17287 cat >conftest.$ac_ext <<EOF
17288 #line 17288 "configure"
17292 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17294 extern int testdata[3];
17295 return testdata[0] == 123
17296 && testdata[1] == 456
17297 && testdata[2] == 789;
17301 if { (eval echo "$as_me:17301: \"$ac_compile\"") >&5
17302 (eval $ac_compile) 2>&5
17304 echo "$as_me:17304: \$? = $ac_status" >&5
17305 (exit "$ac_status"); }; then
17306 mv conftest.o func.o && \
17307 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17309 rm -f conftest.$ac_ext func.o
17310 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17311 cf_saveLIBS="$LIBS"
17312 LIBS="conftest.a $LIBS"
17313 if test "$cross_compiling" = yes; then
17314 cf_cv_link_dataonly=unknown
17316 cat >"conftest.$ac_ext" <<_ACEOF
17317 #line 17317 "configure"
17318 #include "confdefs.h"
17322 extern int testfunc();
17323 ${cf_cv_main_return:-return} (!testfunc());
17327 rm -f "conftest$ac_exeext"
17328 if { (eval echo "$as_me:17328: \"$ac_link\"") >&5
17329 (eval $ac_link) 2>&5
17331 echo "$as_me:17331: \$? = $ac_status" >&5
17332 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17333 { (eval echo "$as_me:17333: \"$ac_try\"") >&5
17334 (eval $ac_try) 2>&5
17336 echo "$as_me:17336: \$? = $ac_status" >&5
17337 (exit "$ac_status"); }; }; then
17338 cf_cv_link_dataonly=yes
17340 echo "$as_me: program exited with status $ac_status" >&5
17341 echo "$as_me: failed program was:" >&5
17342 cat "conftest.$ac_ext" >&5
17343 cf_cv_link_dataonly=no
17345 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17347 LIBS="$cf_saveLIBS"
17351 echo "$as_me:17351: result: $cf_cv_link_dataonly" >&5
17352 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17354 if test "$cf_cv_link_dataonly" = no ; then
17356 cat >>confdefs.h <<\EOF
17357 #define BROKEN_LINKER 1
17363 ### Checks for library functions.
17369 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17370 echo "$as_me:17370: checking for $ac_header" >&5
17371 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17372 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17373 echo $ECHO_N "(cached) $ECHO_C" >&6
17375 cat >"conftest.$ac_ext" <<_ACEOF
17376 #line 17376 "configure"
17377 #include "confdefs.h"
17378 #include <$ac_header>
17380 if { (eval echo "$as_me:17380: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17381 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17383 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17385 cat conftest.err >&5
17386 echo "$as_me:17386: \$? = $ac_status" >&5
17387 (exit "$ac_status"); } >/dev/null; then
17388 if test -s conftest.err; then
17389 ac_cpp_err=$ac_c_preproc_warn_flag
17396 if test -z "$ac_cpp_err"; then
17397 eval "$as_ac_Header=yes"
17399 echo "$as_me: failed program was:" >&5
17400 cat "conftest.$ac_ext" >&5
17401 eval "$as_ac_Header=no"
17403 rm -f conftest.err "conftest.$ac_ext"
17405 echo "$as_me:17405: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17406 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17407 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17408 cat >>confdefs.h <<EOF
17409 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17415 echo "$as_me:17415: checking for working mkstemp" >&5
17416 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17417 if test "${cf_cv_func_mkstemp+set}" = set; then
17418 echo $ECHO_N "(cached) $ECHO_C" >&6
17422 if test "$cross_compiling" = yes; then
17423 cf_cv_func_mkstemp=maybe
17425 cat >"conftest.$ac_ext" <<_ACEOF
17426 #line 17426 "configure"
17427 #include "confdefs.h"
17429 $ac_includes_default
17433 char *tmpl = "conftestXXXXXX";
17441 for (n = 0; n < 2; ++n) {
17442 strcpy(name[n], tmpl);
17443 if ((fd = mkstemp(name[n])) >= 0) {
17444 if (!strcmp(name[n], tmpl)
17445 || stat(name[n], &sb) != 0
17446 || (sb.st_mode & S_IFMT) != S_IFREG
17447 || (sb.st_mode & 077) != 0) {
17454 && !strcmp(name[0], name[1]))
17456 ${cf_cv_main_return:-return}(result);
17460 rm -f "conftest$ac_exeext"
17461 if { (eval echo "$as_me:17461: \"$ac_link\"") >&5
17462 (eval $ac_link) 2>&5
17464 echo "$as_me:17464: \$? = $ac_status" >&5
17465 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17466 { (eval echo "$as_me:17466: \"$ac_try\"") >&5
17467 (eval $ac_try) 2>&5
17469 echo "$as_me:17469: \$? = $ac_status" >&5
17470 (exit "$ac_status"); }; }; then
17471 cf_cv_func_mkstemp=yes
17474 echo "$as_me: program exited with status $ac_status" >&5
17475 echo "$as_me: failed program was:" >&5
17476 cat "conftest.$ac_ext" >&5
17477 cf_cv_func_mkstemp=no
17480 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17484 echo "$as_me:17484: result: $cf_cv_func_mkstemp" >&5
17485 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17486 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17487 echo "$as_me:17487: checking for mkstemp" >&5
17488 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17489 if test "${ac_cv_func_mkstemp+set}" = set; then
17490 echo $ECHO_N "(cached) $ECHO_C" >&6
17492 cat >"conftest.$ac_ext" <<_ACEOF
17493 #line 17493 "configure"
17494 #include "confdefs.h"
17495 #define mkstemp autoconf_temporary
17496 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17503 /* We use char because int might match the return type of a gcc2
17504 builtin and then its argument prototype would still apply. */
17505 char mkstemp (void);
17511 /* The GNU C library defines stubs for functions which it implements
17512 to always fail with ENOSYS. Some functions are actually named
17513 something starting with __ and the normal name is an alias. */
17514 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17515 #error found stub for mkstemp
17523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17524 if { (eval echo "$as_me:17524: \"$ac_link\"") >&5
17525 (eval $ac_link) 2>&5
17527 echo "$as_me:17527: \$? = $ac_status" >&5
17528 (exit "$ac_status"); } &&
17529 { ac_try='test -s "conftest$ac_exeext"'
17530 { (eval echo "$as_me:17530: \"$ac_try\"") >&5
17531 (eval $ac_try) 2>&5
17533 echo "$as_me:17533: \$? = $ac_status" >&5
17534 (exit "$ac_status"); }; }; then
17535 ac_cv_func_mkstemp=yes
17537 echo "$as_me: failed program was:" >&5
17538 cat "conftest.$ac_ext" >&5
17539 ac_cv_func_mkstemp=no
17541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17543 echo "$as_me:17543: result: $ac_cv_func_mkstemp" >&5
17544 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17547 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17549 cat >>confdefs.h <<\EOF
17550 #define HAVE_MKSTEMP 1
17555 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17556 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17557 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17561 if test "$cf_with_ada" != "no" ; then
17563 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17566 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17568 unset ac_cv_path_cf_TEMP_gnat
17570 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17571 set dummy $cf_prog_gnat; ac_word=$2
17572 echo "$as_me:17572: checking for $ac_word" >&5
17573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17574 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17575 echo $ECHO_N "(cached) $ECHO_C" >&6
17577 case $cf_TEMP_gnat in
17579 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17582 ac_save_IFS=$IFS; IFS=$ac_path_separator
17584 for ac_dir in $ac_dummy; do
17586 test -z "$ac_dir" && ac_dir=.
17587 if $as_executable_p "$ac_dir/$ac_word"; then
17588 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17589 echo "$as_me:17589: found $ac_dir/$ac_word" >&5
17594 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17598 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17600 if test -n "$cf_TEMP_gnat"; then
17601 echo "$as_me:17601: result: $cf_TEMP_gnat" >&5
17602 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17604 echo "$as_me:17604: result: no" >&5
17605 echo "${ECHO_T}no" >&6
17608 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17610 if test "x$cf_TEMP_gnat" != xno; then
17611 unset cf_cv_gnat_version
17614 echo "$as_me:17614: checking for $cf_prog_gnat version" >&5
17615 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17616 if test "${cf_cv_gnat_version+set}" = set; then
17617 echo $ECHO_N "(cached) $ECHO_C" >&6
17620 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17621 grep '[0-9].[0-9][0-9]*' |\
17622 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17625 echo "$as_me:17625: result: $cf_cv_gnat_version" >&5
17626 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17627 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17628 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17631 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17634 unset cf_cv_gnat_version
17635 unset ac_cv_path_cf_TEMP_gnat
17638 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17640 cf_cv_prog_gnat_correct=no
17642 cf_ada_make=gnatmake
17643 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17644 # gprconfig is newer than gnatmake; we can continue...
17647 rm -rf ./conftest* ./*~conftest*
17648 if mkdir conftest.src
17652 for cf_gprconfig in Ada C
17654 echo "$as_me:17654: checking for gprconfig name for $cf_gprconfig" >&5
17655 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17656 if test "$cf_gprconfig" = C
17658 for cf_gprconfig_param in \
17659 "$cf_gprconfig,,,,GNATGCC" \
17660 "$cf_gprconfig,,,,GCC" \
17663 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17664 test -n "$cf_gprconfig_value" && break
17667 cf_gprconfig_param=$cf_gprconfig
17668 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17670 if test -n "$cf_gprconfig_value"
17672 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17673 echo "$as_me:17673: result: $cf_gprconfig_value" >&5
17674 echo "${ECHO_T}$cf_gprconfig_value" >&6
17676 echo "$as_me:17676: result: missing" >&5
17677 echo "${ECHO_T}missing" >&6
17683 rm -rf ./conftest* ./*~conftest*
17686 if test "x$cf_ada_config" != "x#"
17689 echo "$as_me:17689: checking for gnat version" >&5
17690 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17691 if test "${cf_cv_gnat_version+set}" = set; then
17692 echo $ECHO_N "(cached) $ECHO_C" >&6
17695 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17696 grep '[0-9].[0-9][0-9]*' |\
17697 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17700 echo "$as_me:17700: result: $cf_cv_gnat_version" >&5
17701 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17702 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17704 case "$cf_cv_gnat_version" in
17705 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17706 cf_cv_prog_gnat_correct=yes
17709 { echo "$as_me:17709: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17710 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17711 cf_cv_prog_gnat_correct=no
17715 # Extract the first word of "m4", so it can be a program name with args.
17716 set dummy m4; ac_word=$2
17717 echo "$as_me:17717: checking for $ac_word" >&5
17718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17719 if test "${ac_cv_prog_M4_exists+set}" = set; then
17720 echo $ECHO_N "(cached) $ECHO_C" >&6
17722 if test -n "$M4_exists"; then
17723 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17725 ac_save_IFS=$IFS; IFS=$ac_path_separator
17727 for ac_dir in $ac_dummy; do
17729 test -z "$ac_dir" && ac_dir=.
17730 $as_executable_p "$ac_dir/$ac_word" || continue
17731 ac_cv_prog_M4_exists="yes"
17732 echo "$as_me:17732: found $ac_dir/$ac_word" >&5
17736 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17739 M4_exists=$ac_cv_prog_M4_exists
17740 if test -n "$M4_exists"; then
17741 echo "$as_me:17741: result: $M4_exists" >&5
17742 echo "${ECHO_T}$M4_exists" >&6
17744 echo "$as_me:17744: result: no" >&5
17745 echo "${ECHO_T}no" >&6
17748 if test "$ac_cv_prog_M4_exists" = no; then
17749 cf_cv_prog_gnat_correct=no
17750 { echo "$as_me:17750: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17751 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17753 if test "$cf_cv_prog_gnat_correct" = yes; then
17754 echo "$as_me:17754: checking if GNAT works" >&5
17755 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17757 rm -rf ./conftest* ./*~conftest*
17758 cat >>conftest.ads <<CF_EOF
17759 procedure conftest;
17761 cat >>conftest.adb <<CF_EOF
17764 procedure conftest is
17766 Text_IO.Put ("Hello World");
17768 GNAT.OS_Lib.OS_Exit (0);
17771 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17772 if ( ./conftest 1>&5 2>&1 ) ; then
17773 cf_cv_prog_gnat_correct=yes
17775 cf_cv_prog_gnat_correct=no
17778 cf_cv_prog_gnat_correct=no
17780 rm -rf ./conftest* ./*~conftest*
17782 echo "$as_me:17782: result: $cf_cv_prog_gnat_correct" >&5
17783 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17786 cf_cv_prog_gnat_correct=no
17790 if test "$cf_cv_prog_gnat_correct" = yes; then
17792 echo "$as_me:17792: checking optimization options for ADAFLAGS" >&5
17793 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17797 ADAFLAGS="$ADAFLAGS -g"
17803 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17805 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17809 echo "$as_me:17809: result: $ADAFLAGS" >&5
17810 echo "${ECHO_T}$ADAFLAGS" >&6
17812 echo "$as_me:17812: checking if GNATPREP supports -T option" >&5
17813 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17814 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17815 echo $ECHO_N "(cached) $ECHO_C" >&6
17818 cf_cv_gnatprep_opt_t=no
17819 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17822 echo "$as_me:17822: result: $cf_cv_gnatprep_opt_t" >&5
17823 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17824 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17826 echo "$as_me:17826: checking if GNAT supports generics" >&5
17827 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17828 case "$cf_cv_gnat_version" in
17829 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17830 cf_gnat_generics=yes
17833 cf_gnat_generics=no
17836 echo "$as_me:17836: result: $cf_gnat_generics" >&5
17837 echo "${ECHO_T}$cf_gnat_generics" >&6
17839 if test "$cf_gnat_generics" = yes
17841 cf_compile_generics=generics
17842 cf_generic_objects="\${GENOBJS}"
17844 cf_compile_generics=
17845 cf_generic_objects=
17848 echo "$as_me:17848: checking if GNAT supports SIGINT" >&5
17849 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17850 if test "${cf_cv_gnat_sigint+set}" = set; then
17851 echo $ECHO_N "(cached) $ECHO_C" >&6
17854 rm -rf ./conftest* ./*~conftest*
17855 cat >>conftest.ads <<CF_EOF
17856 with Ada.Interrupts.Names;
17858 package ConfTest is
17860 pragma Warnings (Off); -- the next pragma exists since 3.11p
17861 pragma Unreserve_All_Interrupts;
17862 pragma Warnings (On);
17864 protected Process is
17866 function Continue return Boolean;
17867 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17869 Done : Boolean := False;
17874 cat >>conftest.adb <<CF_EOF
17875 package body ConfTest is
17876 protected body Process is
17881 function Continue return Boolean is
17888 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17889 cf_cv_gnat_sigint=yes
17891 cf_cv_gnat_sigint=no
17893 rm -rf ./conftest* ./*~conftest*
17896 echo "$as_me:17896: result: $cf_cv_gnat_sigint" >&5
17897 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17899 if test "$cf_cv_gnat_sigint" = yes ; then
17902 USE_GNAT_SIGINT="#"
17905 cf_gnat_libraries=no
17906 cf_gnat_projects=no
17908 if test "$enable_gnat_projects" != no ; then
17909 echo "$as_me:17909: checking if GNAT supports project files" >&5
17910 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17911 case "$cf_cv_gnat_version" in
17915 case "$cf_cv_system_name" in
17919 rm -rf ./conftest* ./*~conftest*
17920 if mkdir conftest.src conftest.bin conftest.lib
17923 rm -rf ./conftest* ./*~conftest*
17924 cat >>library.gpr <<CF_EOF
17926 Kind := External ("LIB_KIND");
17927 for Library_Name use "ConfTest";
17928 for Object_Dir use ".";
17929 for Library_ALI_Dir use External("LIBRARY_DIR");
17930 for Library_Version use External ("SONAME");
17931 for Library_Kind use Kind;
17932 for Library_Dir use External("BUILD_DIR");
17933 Source_Dir := External ("SOURCE_DIR");
17934 for Source_Dirs use (Source_Dir);
17937 cat >>confpackage.ads <<CF_EOF
17938 package ConfPackage is
17939 procedure conftest;
17942 cat >>confpackage.adb <<CF_EOF
17944 package body ConfPackage is
17945 procedure conftest is
17947 Text_IO.Put ("Hello World");
17952 if ( "$cf_ada_make" $ADAFLAGS \
17954 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17955 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17956 -XSOURCE_DIR="`pwd`" \
17957 -XSONAME=libConfTest.so.1 \
17958 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17959 cf_gnat_projects=yes
17963 if test -f conftest.lib/confpackage.ali
17965 cf_gnat_libraries=yes
17967 rm -rf ./conftest* ./*~conftest*
17972 echo "$as_me:17972: result: $cf_gnat_projects" >&5
17973 echo "${ECHO_T}$cf_gnat_projects" >&6
17974 fi # enable_gnat_projects
17976 if test "$cf_gnat_projects" = yes
17978 echo "$as_me:17978: checking if GNAT supports libraries" >&5
17979 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17980 echo "$as_me:17980: result: $cf_gnat_libraries" >&5
17981 echo "${ECHO_T}$cf_gnat_libraries" >&6
17984 USE_OLD_MAKERULES=""
17985 USE_GNAT_PROJECTS="#"
17986 USE_GNAT_MAKE_GPR="#"
17987 USE_GNAT_GPRBUILD="#"
17989 if test "$cf_gnat_projects" = yes
17991 USE_OLD_MAKERULES="#"
17992 USE_GNAT_PROJECTS=""
17993 if test "$cf_cv_VERSION_GPRBUILD" != no
17995 USE_GNAT_GPRBUILD=""
17996 elif test "$cf_cv_VERSION_GNATMAKE" != no
17998 USE_GNAT_MAKE_GPR=""
18000 { echo "$as_me:18000: WARNING: use old makefile rules since tools are missing" >&5
18001 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18005 if test "$cf_gnat_libraries" = yes
18007 USE_GNAT_LIBRARIES=""
18009 USE_GNAT_LIBRARIES="#"
18012 echo "$as_me:18012: checking for ada-compiler" >&5
18013 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18015 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18016 if test "${with_ada_compiler+set}" = set; then
18017 withval="$with_ada_compiler"
18018 cf_ada_compiler=$withval
18020 cf_ada_compiler=gnatmake
18023 echo "$as_me:18023: result: $cf_ada_compiler" >&5
18024 echo "${ECHO_T}$cf_ada_compiler" >&6
18026 cf_ada_package=terminal_interface
18028 echo "$as_me:18028: checking for ada-include" >&5
18029 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18031 # Check whether --with-ada-include or --without-ada-include was given.
18032 if test "${with_ada_include+set}" = set; then
18033 withval="$with_ada_include"
18036 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18037 fi; if test -n "$prefix/share/ada/adainclude" ; then
18039 if test "x$prefix" != xNONE; then
18040 cf_path_syntax="$prefix"
18042 cf_path_syntax="$ac_default_prefix"
18045 case ".$withval" in
18046 (.\$\(*\)*|.\'*\'*)
18050 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18052 (.\$\{*prefix\}*|.\$\{*dir\}*)
18053 eval withval="$withval"
18054 case ".$withval" in
18056 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18061 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18064 { { echo "$as_me:18064: error: expected a pathname, not \"$withval\"" >&5
18065 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18066 { (exit 1); exit 1; }; }
18071 eval ADA_INCLUDE="$withval"
18073 echo "$as_me:18073: result: $ADA_INCLUDE" >&5
18074 echo "${ECHO_T}$ADA_INCLUDE" >&6
18076 echo "$as_me:18076: checking for ada-objects" >&5
18077 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18079 # Check whether --with-ada-objects or --without-ada-objects was given.
18080 if test "${with_ada_objects+set}" = set; then
18081 withval="$with_ada_objects"
18084 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18085 fi; if test -n "$prefix/lib/ada/adalib" ; then
18087 if test "x$prefix" != xNONE; then
18088 cf_path_syntax="$prefix"
18090 cf_path_syntax="$ac_default_prefix"
18093 case ".$withval" in
18094 (.\$\(*\)*|.\'*\'*)
18098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18100 (.\$\{*prefix\}*|.\$\{*dir\}*)
18101 eval withval="$withval"
18102 case ".$withval" in
18104 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18109 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18112 { { echo "$as_me:18112: error: expected a pathname, not \"$withval\"" >&5
18113 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18114 { (exit 1); exit 1; }; }
18119 eval ADA_OBJECTS="$withval"
18121 echo "$as_me:18121: result: $ADA_OBJECTS" >&5
18122 echo "${ECHO_T}$ADA_OBJECTS" >&6
18124 echo "$as_me:18124: checking if an Ada95 shared-library should be built" >&5
18125 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18127 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18128 if test "${with_ada_sharedlib+set}" = set; then
18129 withval="$with_ada_sharedlib"
18130 with_ada_sharedlib=$withval
18132 with_ada_sharedlib=no
18134 echo "$as_me:18134: result: $with_ada_sharedlib" >&5
18135 echo "${ECHO_T}$with_ada_sharedlib" >&6
18137 if test "x$with_ada_sharedlib" != xno
18139 if test "x$cf_gnat_projects" != xyes
18141 { echo "$as_me:18141: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18142 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18143 with_ada_sharedlib=no
18147 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18148 MAKE_ADA_SHAREDLIB="#"
18150 if test "x$with_ada_sharedlib" != xno
18152 MAKE_ADA_SHAREDLIB=
18153 if test "x$with_ada_sharedlib" != xyes
18155 ADA_SHAREDLIB="$with_ada_sharedlib"
18159 # allow the Ada binding to be renamed
18161 echo "$as_me:18161: checking for ada-libname" >&5
18162 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18164 # Check whether --with-ada-libname or --without-ada-libname was given.
18165 if test "${with_ada_libname+set}" = set; then
18166 withval="$with_ada_libname"
18167 ADA_LIBNAME=$withval
18169 ADA_LIBNAME=AdaCurses
18171 case "x$ADA_LIBNAME" in
18173 ADA_LIBNAME=AdaCurses
18177 echo "$as_me:18177: result: $ADA_LIBNAME" >&5
18178 echo "${ECHO_T}$ADA_LIBNAME" >&6
18181 { { echo "$as_me:18181: error: No usable Ada compiler found" >&5
18182 echo "$as_me: error: No usable Ada compiler found" >&2;}
18183 { (exit 1); exit 1; }; }
18186 { { echo "$as_me:18186: error: The Ada compiler is needed for this package" >&5
18187 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18188 { (exit 1); exit 1; }; }
18191 ################################################################################
18198 ### Construct the list of include-directories to be generated
18200 if test "$srcdir" != "."; then
18201 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18203 CPPFLAGS="-I../include $CPPFLAGS"
18204 if test "$srcdir" != "."; then
18205 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18207 CPPFLAGS="-I. $CPPFLAGS"
18209 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18210 if test "$srcdir" != "."; then
18211 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18213 if test "$GCC" != yes; then
18214 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18215 elif test "$includedir" != "/usr/include"; then
18216 if test "$includedir" = '${prefix}/include' ; then
18217 if test x$prefix != x/usr ; then
18218 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18221 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18225 ### Build up pieces for makefile rules
18226 echo "$as_me:18226: checking default library suffix" >&5
18227 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18229 case $DFT_LWR_MODEL in
18230 (libtool) DFT_ARG_SUFFIX='' ;;
18231 (normal) DFT_ARG_SUFFIX='' ;;
18232 (debug) DFT_ARG_SUFFIX='_g' ;;
18233 (profile) DFT_ARG_SUFFIX='_p' ;;
18234 (shared) DFT_ARG_SUFFIX='' ;;
18236 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18237 echo "$as_me:18237: result: $DFT_ARG_SUFFIX" >&5
18238 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18240 echo "$as_me:18240: checking default library-dependency suffix" >&5
18241 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18243 case X$DFT_LWR_MODEL in
18245 DFT_LIB_SUFFIX='.la'
18246 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18249 case "$cf_cv_system_name" in
18251 DFT_LIB_SUFFIX='_g.lib'
18254 DFT_LIB_SUFFIX='_g.a'
18257 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18260 case "$cf_cv_system_name" in
18262 DFT_LIB_SUFFIX='_p.lib'
18265 DFT_LIB_SUFFIX='_p.a'
18268 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18271 case "$cf_cv_system_name" in
18273 DFT_LIB_SUFFIX='.so'
18274 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18277 DFT_LIB_SUFFIX='.dll'
18278 DFT_DEP_SUFFIX='.dll.lib'
18280 (cygwin*|msys*|mingw*)
18281 DFT_LIB_SUFFIX='.dll'
18282 DFT_DEP_SUFFIX='.dll.a'
18285 DFT_LIB_SUFFIX='.dylib'
18286 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18291 DFT_LIB_SUFFIX='.so'
18292 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18295 DFT_LIB_SUFFIX='.sl'
18296 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18301 DFT_LIB_SUFFIX='.so'
18302 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18309 DFT_LIB_SUFFIX='.lib'
18312 DFT_LIB_SUFFIX='.a'
18315 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18318 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18320 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18321 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18323 echo "$as_me:18323: result: $DFT_DEP_SUFFIX" >&5
18324 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18326 echo "$as_me:18326: checking default object directory" >&5
18327 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18329 case $DFT_LWR_MODEL in
18330 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18331 (normal) DFT_OBJ_SUBDIR='objects' ;;
18332 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18333 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18335 case "$cf_cv_system_name" in
18337 DFT_OBJ_SUBDIR='objects' ;;
18339 DFT_OBJ_SUBDIR='obj_s' ;;
18342 echo "$as_me:18342: result: $DFT_OBJ_SUBDIR" >&5
18343 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18345 ### Set up low-level terminfo dependencies for makefiles.
18347 if test "$DFT_LWR_MODEL" = shared ; then
18348 case $cf_cv_system_name in
18350 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18353 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18358 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18360 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18362 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18364 ### Construct the list of subdirectories for which we'll customize makefiles
18365 ### with the appropriate compile-rules.
18367 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18369 cat >>confdefs.h <<EOF
18370 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18373 ################################################################################
18379 NCURSES_SHLIB2="sh -c"
18381 ADA_SUBDIRS="include gen src doc"
18382 if test "x$cf_with_tests" != "xno" ; then
18383 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18385 for cf_dir in $ADA_SUBDIRS
18387 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18394 # match layout used by make-tar.sh
18395 ADAHTML_DIR=../doc/ada
18397 if test "x$cross_compiling" = xyes ; then
18398 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18400 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18403 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"
18404 ac_config_commands="$ac_config_commands default"
18405 cat >confcache <<\_ACEOF
18406 # This file is a shell script that caches the results of configure
18407 # tests run on this system so they can be shared between configure
18408 # scripts and configure runs, see configure's option --config-cache.
18409 # It is not useful on other systems. If it contains results you don't
18410 # want to keep, you may remove or edit it.
18412 # config.status only pays attention to the cache file if you give it
18413 # the --recheck option to rerun configure.
18415 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18416 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18417 # following values.
18421 # The following way of writing the cache mishandles newlines in values,
18422 # but we know of no workaround that is simple, portable, and efficient.
18423 # So, don't put newlines in cache variables' values.
18424 # Ultrix sh set writes to stderr and can't be redirected directly,
18425 # and sets the high bit in the cache file unless we assign to the vars.
18428 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18430 # `set' does not quote correctly, so add quotes (double-quote
18431 # substitution turns \\\\ into \\, and sed turns \\ into \).
18434 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18437 # `set' quotes correctly as required by POSIX, so do not add quotes.
18439 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18446 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18448 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18450 if cmp -s $cache_file confcache; then :; else
18451 if test -w $cache_file; then
18452 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18453 cat confcache >$cache_file
18455 echo "not updating unwritable cache $cache_file"
18460 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18461 # Let make expand exec_prefix.
18462 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18464 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18465 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18466 # trailing colons and then remove the whole line if VPATH becomes empty
18467 # (actually we leave an empty line to preserve line numbers).
18468 if test "x$srcdir" = x.; then
18469 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18470 s/:*\$(srcdir):*/:/;
18471 s/:*\${srcdir}:*/:/;
18473 s/^\([^=]*=[ ]*\):*/\1/;
18479 DEFS=-DHAVE_CONFIG_H
18481 : "${CONFIG_STATUS=./config.status}"
18482 ac_clean_files_save=$ac_clean_files
18483 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18484 { echo "$as_me:18484: creating $CONFIG_STATUS" >&5
18485 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18486 cat >"$CONFIG_STATUS" <<_ACEOF
18488 # Generated automatically by configure.
18489 # Run this file to recreate the current configuration.
18490 # Compiler output produced by configure, useful for debugging
18491 # configure, is in config.log if it exists.
18493 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18496 SHELL=\${CONFIG_SHELL-$SHELL}
18497 ac_cs_invocation="\$0 \$@"
18499 CLICOLOR_FORCE= GREP_OPTIONS=
18500 unset CLICOLOR_FORCE GREP_OPTIONS
18503 cat >>"$CONFIG_STATUS" <<\_ACEOF
18504 # Be Bourne compatible
18505 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18508 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18512 # Name of the executable.
18513 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18515 if expr a : '\(a\)' >/dev/null 2>&1; then
18521 rm -f conf$$ conf$$.exe conf$$.file
18523 if ln -s conf$$.file conf$$ 2>/dev/null; then
18524 # We could just check for DJGPP; but this test a) works b) is more generic
18525 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18526 if test -f conf$$.exe; then
18527 # Don't use ln at all; we don't have any links
18532 elif ln conf$$.file conf$$ 2>/dev/null; then
18537 rm -f conf$$ conf$$.exe conf$$.file
18539 as_executable_p="test -f"
18541 # Support unset when possible.
18542 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18549 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18550 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18551 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18552 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18553 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18554 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18555 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18556 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18559 # We need space, tab and new line, in precisely that order.
18565 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18571 # Files that config.status was made for.
18572 if test -n "$ac_config_files"; then
18573 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18576 if test -n "$ac_config_headers"; then
18577 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18580 if test -n "$ac_config_links"; then
18581 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18584 if test -n "$ac_config_commands"; then
18585 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18588 cat >>"$CONFIG_STATUS" <<\EOF
18591 \`$as_me' instantiates files from templates according to the
18592 current configuration.
18594 Usage: $0 [OPTIONS] [FILE]...
18596 -h, --help print this help, then exit
18597 -V, --version print version number, then exit
18598 -d, --debug don't remove temporary files
18599 --recheck update $as_me by reconfiguring in the same conditions
18600 --file=FILE[:TEMPLATE]
18601 instantiate the configuration file FILE
18602 --header=FILE[:TEMPLATE]
18603 instantiate the configuration header FILE
18605 Configuration files:
18608 Configuration headers:
18611 Configuration commands:
18614 Report bugs to <dickey@invisible-island.net>."
18617 cat >>"$CONFIG_STATUS" <<EOF
18620 configured by $0, generated by GNU Autoconf 2.52.20230114,
18621 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18623 Copyright 2003-2022,2023 Thomas E. Dickey
18624 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18625 Free Software Foundation, Inc.
18626 This config.status script is free software; the Free Software Foundation
18627 gives unlimited permission to copy, distribute and modify it."
18632 cat >>"$CONFIG_STATUS" <<\EOF
18633 # If no file are specified by the user, then we need to provide default
18634 # value. By we need to know if files were specified by the user.
18640 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18641 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18643 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18647 *) # This is not an option, so the user has probably given explicit
18649 ac_need_defaults=false;;
18653 # Handling of the options.
18655 cat >>"$CONFIG_STATUS" <<EOF
18656 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18657 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18658 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18660 cat >>"$CONFIG_STATUS" <<\EOF
18661 --version | --vers* | -V )
18662 echo "$ac_cs_version"; exit 0 ;;
18664 # Conflict between --help and --header
18665 { { echo "$as_me:18665: error: ambiguous option: $1
18666 Try \`$0 --help' for more information." >&5
18667 echo "$as_me: error: ambiguous option: $1
18668 Try \`$0 --help' for more information." >&2;}
18669 { (exit 1); exit 1; }; };;
18670 --help | --hel | -h )
18671 echo "$ac_cs_usage"; exit 0 ;;
18672 --debug | --d* | -d )
18674 --file | --fil | --fi | --f )
18676 CONFIG_FILES="$CONFIG_FILES $1"
18677 ac_need_defaults=false;;
18678 --header | --heade | --head | --hea )
18680 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18681 ac_need_defaults=false;;
18683 # This is an error.
18684 -*) { { echo "$as_me:18684: error: unrecognized option: $1
18685 Try \`$0 --help' for more information." >&5
18686 echo "$as_me: error: unrecognized option: $1
18687 Try \`$0 --help' for more information." >&2;}
18688 { (exit 1); exit 1; }; } ;;
18690 *) ac_config_targets="$ac_config_targets $1" ;;
18699 ## ----------------------- ##
18700 ## Running config.status. ##
18701 ## ----------------------- ##
18703 This file was extended by $as_me 2.52.20230114, executed with
18704 CONFIG_FILES = $CONFIG_FILES
18705 CONFIG_HEADERS = $CONFIG_HEADERS
18706 CONFIG_LINKS = $CONFIG_LINKS
18707 CONFIG_COMMANDS = $CONFIG_COMMANDS
18708 > "$ac_cs_invocation"
18709 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18714 cat >>"$CONFIG_STATUS" <<EOF
18716 # INIT-COMMANDS section.
18719 ### Special initialization commands, used to pass information from the
18720 ### configuration-run into config.status
18723 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18724 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18725 LIB_NAME="$LIB_NAME"
18726 LIB_PREFIX="$LIB_PREFIX"
18727 LIB_SUFFIX="$LIB_SUFFIX"
18729 NCURSES_MAJOR="$NCURSES_MAJOR"
18730 NCURSES_MINOR="$NCURSES_MINOR"
18731 NCURSES_PATCH="$NCURSES_PATCH"
18733 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18734 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18735 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18736 cf_cv_abi_version="$cf_cv_abi_version"
18737 cf_cv_rel_version="$cf_cv_rel_version"
18738 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18739 cf_cv_shared_soname='$cf_cv_shared_soname'
18740 cf_cv_shlib_version="$cf_cv_shlib_version"
18741 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18742 cf_cv_system_name="$cf_cv_system_name"
18748 cat >>"$CONFIG_STATUS" <<\EOF
18749 for ac_config_target in $ac_config_targets
18751 case "$ac_config_target" in
18752 # Handling of arguments.
18753 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18754 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18755 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18756 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18757 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18758 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18759 *) { { echo "$as_me:18759: error: invalid argument: $ac_config_target" >&5
18760 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18761 { (exit 1); exit 1; }; };;
18765 # If the user did not use the arguments to specify the items to instantiate,
18766 # then the envvar interface is used. Set only those that are not.
18767 # We use the long form for the default assignment because of an extremely
18768 # bizarre bug on SunOS 4.1.3.
18769 if "$ac_need_defaults"; then
18770 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18771 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18772 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18775 # Create a temporary directory, and hook for its removal unless debugging.
18778 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18779 trap '{ (exit 1); exit 1; }' 1 2 13 15
18782 # Create a (secure) tmp directory for tmp files.
18785 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18786 test -n "$tmp" && test -d "$tmp"
18789 tmp=$TMPDIR/cs$$-$RANDOM
18790 (umask 077 && mkdir "$tmp")
18793 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18794 { (exit 1); exit 1; }
18799 cat >>"$CONFIG_STATUS" <<EOF
18802 # CONFIG_FILES section.
18805 # No need to generate the scripts if there are no CONFIG_FILES.
18806 # This happens for instance when ./config.status config.h
18807 if test -n "\$CONFIG_FILES"; then
18808 # Protect against being on the right side of a sed subst in config.status.
18809 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18810 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18811 s,@SHELL@,$SHELL,;t t
18812 s,@exec_prefix@,$exec_prefix,;t t
18813 s,@prefix@,$prefix,;t t
18814 s,@program_transform_name@,$program_transform_name,;t t
18815 s,@bindir@,$bindir,;t t
18816 s,@sbindir@,$sbindir,;t t
18817 s,@libexecdir@,$libexecdir,;t t
18818 s,@datarootdir@,$datarootdir,;t t
18819 s,@datadir@,$datadir,;t t
18820 s,@sysconfdir@,$sysconfdir,;t t
18821 s,@sharedstatedir@,$sharedstatedir,;t t
18822 s,@localstatedir@,$localstatedir,;t t
18823 s,@runstatedir@,$runstatedir,;t t
18824 s,@libdir@,$libdir,;t t
18825 s,@includedir@,$includedir,;t t
18826 s,@oldincludedir@,$oldincludedir,;t t
18827 s,@infodir@,$infodir,;t t
18828 s,@mandir@,$mandir,;t t
18829 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18830 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18831 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18832 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18833 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18834 s,@build_alias@,$build_alias,;t t
18835 s,@host_alias@,$host_alias,;t t
18836 s,@target_alias@,$target_alias,;t t
18837 s,@ECHO_C@,$ECHO_C,;t t
18838 s,@ECHO_N@,$ECHO_N,;t t
18839 s,@ECHO_T@,$ECHO_T,;t t
18840 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18841 s,@DEFS@,$DEFS,;t t
18842 s,@LIBS@,$LIBS,;t t
18843 s,@PACKAGE@,$PACKAGE,;t t
18844 s,@top_builddir@,$top_builddir,;t t
18845 s,@build@,$build,;t t
18846 s,@build_cpu@,$build_cpu,;t t
18847 s,@build_vendor@,$build_vendor,;t t
18848 s,@build_os@,$build_os,;t t
18849 s,@host@,$host,;t t
18850 s,@host_cpu@,$host_cpu,;t t
18851 s,@host_vendor@,$host_vendor,;t t
18852 s,@host_os@,$host_os,;t t
18853 s,@target@,$target,;t t
18854 s,@target_cpu@,$target_cpu,;t t
18855 s,@target_vendor@,$target_vendor,;t t
18856 s,@target_os@,$target_os,;t t
18857 s,@GREP@,$GREP,;t t
18858 s,@FGREP@,$FGREP,;t t
18860 s,@CFLAGS@,$CFLAGS,;t t
18861 s,@LDFLAGS@,$LDFLAGS,;t t
18862 s,@CPPFLAGS@,$CPPFLAGS,;t t
18863 s,@ac_ct_CC@,$ac_ct_CC,;t t
18864 s,@EXEEXT@,$EXEEXT,;t t
18865 s,@OBJEXT@,$OBJEXT,;t t
18866 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18868 s,@EGREP@,$EGREP,;t t
18870 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18871 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18872 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18873 s,@LN_S@,$LN_S,;t t
18874 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18875 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18876 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18877 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18878 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18879 s,@SET_MAKE@,$SET_MAKE,;t t
18880 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18881 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18882 s,@CTAGS@,$CTAGS,;t t
18883 s,@ETAGS@,$ETAGS,;t t
18884 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18885 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18886 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18887 s,@RANLIB@,$RANLIB,;t t
18888 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18890 s,@ac_ct_LD@,$ac_ct_LD,;t t
18892 s,@ac_ct_AR@,$ac_ct_AR,;t t
18893 s,@ARFLAGS@,$ARFLAGS,;t t
18894 s,@DESTDIR@,$DESTDIR,;t t
18895 s,@BUILD_CC@,$BUILD_CC,;t t
18896 s,@BUILD_CPP@,$BUILD_CPP,;t t
18897 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18898 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18899 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18900 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18901 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18902 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18903 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18904 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18905 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18906 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18907 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18908 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18909 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18910 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18911 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18912 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18913 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18914 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18915 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18916 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18917 s,@CC_G_OPT@,$CC_G_OPT,;t t
18918 s,@LD_MODEL@,$LD_MODEL,;t t
18919 s,@shlibdir@,$shlibdir,;t t
18920 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18921 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18922 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18923 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18924 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18925 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18926 s,@LINK_PROGS@,$LINK_PROGS,;t t
18927 s,@LINK_TESTS@,$LINK_TESTS,;t t
18928 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18929 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18930 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18931 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18932 s,@RPATH_LIST@,$RPATH_LIST,;t t
18933 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18934 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18935 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18936 s,@PTHREAD@,$PTHREAD,;t t
18937 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18938 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18939 s,@ECHO_LT@,$ECHO_LT,;t t
18940 s,@ECHO_LD@,$ECHO_LD,;t t
18941 s,@RULE_CC@,$RULE_CC,;t t
18942 s,@SHOW_CC@,$SHOW_CC,;t t
18943 s,@ECHO_CC@,$ECHO_CC,;t t
18944 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18945 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18946 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18947 s,@ADAFLAGS@,$ADAFLAGS,;t t
18948 s,@ADA_TRACE@,$ADA_TRACE,;t t
18949 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18950 s,@M4_exists@,$M4_exists,;t t
18951 s,@cf_ada_make@,$cf_ada_make,;t t
18952 s,@cf_ada_config@,$cf_ada_config,;t t
18953 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18954 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18955 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18956 s,@cf_compile_generics@,$cf_compile_generics,;t t
18957 s,@cf_generic_objects@,$cf_generic_objects,;t t
18958 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18959 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18960 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18961 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18962 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18963 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18964 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18965 s,@cf_ada_package@,$cf_ada_package,;t t
18966 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18967 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18968 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18969 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18970 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18971 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18972 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18973 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18974 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18975 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18976 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18977 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18978 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18979 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18980 s,@TEST_ARG2@,$TEST_ARG2,;t t
18981 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18982 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18983 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18984 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18985 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18986 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18987 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18992 cat >>"$CONFIG_STATUS" <<\EOF
18993 # Split the substitutions into bite-sized pieces for seds with
18994 # small command number limits, like on Digital OSF/1 and HP-UX.
18995 ac_max_sed_lines=48
18996 ac_sed_frag=1 # Number of current file.
18997 ac_beg=1 # First line for current file.
18998 ac_end=$ac_max_sed_lines # Line after last line for current file.
19001 while "$ac_more_lines"; do
19002 if test "$ac_beg" -gt 1; then
19003 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19005 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19007 if test ! -s "$tmp"/subs.frag; then
19008 ac_more_lines=false
19010 # The purpose of the label and of the branching condition is to
19011 # speed up the sed processing (if there are no `@' at all, there
19012 # is no need to browse any of the substitutions).
19013 # These are the two extra sed commands mentioned above.
19015 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19016 # It is possible to make a multiline substitution using escaped newlines.
19017 # Ensure that we do not split the substitution between script fragments.
19019 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19020 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19021 if test -s "$tmp"/subs.next; then
19022 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19023 if test ! -s "$tmp"/subs.edit; then
19024 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19025 if test ! -s "$tmp"/subs.edit; then
19026 if test "$ac_beg" -gt 1; then
19027 ac_end=`expr "$ac_end" - 1`
19034 if test -z "$ac_sed_cmds"; then
19035 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19037 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19039 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19041 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19044 if test -z "$ac_sed_cmds"; then
19047 fi # test -n "$CONFIG_FILES"
19050 cat >>"$CONFIG_STATUS" <<\EOF
19051 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19052 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19054 - | *:- | *:-:* ) # input from stdin
19056 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19057 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19058 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19059 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19060 * ) ac_file_in=$ac_file.in ;;
19063 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19064 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19065 X"$ac_file" : 'X\(//\)[^/]' \| \
19066 X"$ac_file" : 'X\(//\)$' \| \
19067 X"$ac_file" : 'X\(/\)' \| \
19068 . : '\(.\)' 2>/dev/null ||
19070 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19071 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19072 /^X\(\/\/\)$/{ s//\1/; q; }
19073 /^X\(\/\).*/{ s//\1/; q; }
19075 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19076 { case "$ac_dir" in
19077 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19081 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19082 case $as_mkdir_dir in
19083 # Skip DOS drivespec
19084 ?:) as_incr_dir=$as_mkdir_dir ;;
19086 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19087 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19092 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19093 # A "../" for each directory in $ac_dir_suffix.
19094 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19096 ac_dir_suffix= ac_dots=
19101 if test -z "$ac_dots"; then
19104 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19106 [\\/]* | ?:[\\/]* )
19107 ac_srcdir="$srcdir$ac_dir_suffix";
19108 ac_top_srcdir="$srcdir" ;;
19109 *) # Relative path.
19110 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19111 ac_top_srcdir="$ac_dots$srcdir" ;;
19115 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19116 *) ac_INSTALL=$ac_dots$INSTALL ;;
19119 if test x"$ac_file" != x-; then
19120 { echo "$as_me:19120: creating $ac_file" >&5
19121 echo "$as_me: creating $ac_file" >&6;}
19124 # Let's still pretend it is `configure' which instantiates (i.e., don't
19125 # use $as_me), people would be surprised to read:
19126 # /* config.h. Generated automatically by config.status. */
19127 configure_input="Generated automatically from `echo $ac_file_in |
19128 sed 's,.*/,,'` by configure."
19130 # First look for the input files in the build tree, otherwise in the
19132 ac_file_inputs=`IFS=:
19133 for f in $ac_file_in; do
19135 -) echo "$tmp"/stdin ;;
19137 # Absolute (can't be DOS-style, as IFS=:)
19138 test -f "$f" || { { echo "$as_me:19138: error: cannot find input file: $f" >&5
19139 echo "$as_me: error: cannot find input file: $f" >&2;}
19140 { (exit 1); exit 1; }; }
19143 if test -f "$f"; then
19146 elif test -f "$srcdir/$f"; then
19151 { { echo "$as_me:19151: error: cannot find input file: $f" >&5
19152 echo "$as_me: error: cannot find input file: $f" >&2;}
19153 { (exit 1); exit 1; }; }
19156 done` || { (exit 1); exit 1; }
19158 cat >>"$CONFIG_STATUS" <<\EOF
19159 ac_warn_datarootdir=no
19160 if test x"$ac_file" != x-; then
19161 for ac_item in $ac_file_inputs
19163 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19164 if test -n "$ac_seen"; then
19165 ac_used=`grep '@datarootdir@' "$ac_item"`
19166 if test -z "$ac_used"; then
19167 { echo "$as_me:19167: WARNING: datarootdir was used implicitly but not set:
19169 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19171 ac_warn_datarootdir=yes
19174 ac_seen=`grep '${datarootdir}' "$ac_item"`
19175 if test -n "$ac_seen"; then
19176 { echo "$as_me:19176: WARNING: datarootdir was used explicitly but not set:
19178 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19180 ac_warn_datarootdir=yes
19185 if test "x$ac_warn_datarootdir" = xyes; then
19186 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19190 cat >>"$CONFIG_STATUS" <<EOF
19194 cat >>"$CONFIG_STATUS" <<\EOF
19196 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19197 s,@configure_input@,$configure_input,;t t
19198 s,@srcdir@,$ac_srcdir,;t t
19199 s,@top_srcdir@,$ac_top_srcdir,;t t
19200 s,@INSTALL@,$ac_INSTALL,;t t
19201 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19204 : "${FGREP:=grep -F}"
19205 : "${EGREP:=grep -E}"
19206 cat >>"$CONFIG_STATUS" <<EOF
19207 : "\${FGREP:=$FGREP}"
19208 : "\${EGREP:=$EGREP}"
19210 cat >>"$CONFIG_STATUS" <<\EOF
19211 if test x"$ac_file" != x-; then
19212 cp "$tmp/out" "$ac_file"
19214 for ac_name in prefix exec_prefix datarootdir
19216 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19217 if test -n "$ac_seen"; then
19218 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19219 if test -z "$ac_init"; then
19220 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19221 { echo "$as_me:19221: WARNING: Variable $ac_name is used but was not set:
19223 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19228 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19229 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19230 if test -s "$tmp"/out; then
19231 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19232 { echo "$as_me:19232: WARNING: Some variables may not be substituted:
19234 echo "$as_me: WARNING: Some variables may not be substituted:
19244 cat >>"$CONFIG_STATUS" <<\EOF
19247 # CONFIG_HEADER section.
19250 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19251 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19253 # ac_d sets the value in "#define NAME VALUE" lines.
19254 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19255 ac_dB='[ ].*$,\1#\2'
19258 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19259 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19260 ac_iB='\([ ]\),\1#\2define\3'
19263 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19264 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19265 ac_uB='$,\1#\2define\3'
19269 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19270 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19272 - | *:- | *:-:* ) # input from stdin
19274 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19275 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19276 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19277 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19278 * ) ac_file_in=$ac_file.in ;;
19281 test x"$ac_file" != x- && { echo "$as_me:19281: creating $ac_file" >&5
19282 echo "$as_me: creating $ac_file" >&6;}
19284 # First look for the input files in the build tree, otherwise in the
19286 ac_file_inputs=`IFS=:
19287 for f in $ac_file_in; do
19289 -) echo "$tmp"/stdin ;;
19291 # Absolute (can't be DOS-style, as IFS=:)
19292 test -f "$f" || { { echo "$as_me:19292: error: cannot find input file: $f" >&5
19293 echo "$as_me: error: cannot find input file: $f" >&2;}
19294 { (exit 1); exit 1; }; }
19297 if test -f "$f"; then
19300 elif test -f "$srcdir/$f"; then
19305 { { echo "$as_me:19305: error: cannot find input file: $f" >&5
19306 echo "$as_me: error: cannot find input file: $f" >&2;}
19307 { (exit 1); exit 1; }; }
19310 done` || { (exit 1); exit 1; }
19311 # Remove the trailing spaces.
19312 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19316 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19317 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19318 # be either 'cat' or 'sort'.
19319 cat confdefs.h | uniq >conftest.vals
19321 # Break up conftest.vals because some shells have a limit on
19322 # the size of here documents, and old seds have small limits too.
19324 rm -f conftest.tail
19325 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19326 while grep . conftest.vals >/dev/null
19328 # Write chunks of a limited-size here document to conftest.frag.
19329 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19330 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19331 echo 'CEOF' >> "$CONFIG_STATUS"
19332 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19333 rm -f conftest.vals
19334 mv conftest.tail conftest.vals
19336 rm -f conftest.vals
19338 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19340 echo ' cat >> conftest.edit <<CEOF
19341 /@DEFS@/r conftest.frag
19344 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19346 mv "$tmp"/out "$tmp"/in
19347 rm -f conftest.edit conftest.frag
19348 ' >> "$CONFIG_STATUS"
19350 cat >>"$CONFIG_STATUS" <<\EOF
19351 # Let's still pretend it is `configure' which instantiates (i.e., don't
19352 # use $as_me), people would be surprised to read:
19353 # /* config.h. Generated automatically by config.status. */
19354 if test x"$ac_file" = x-; then
19355 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19357 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19359 cat "$tmp"/in >>"$tmp"/config.h
19361 if test x"$ac_file" != x-; then
19362 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19363 { echo "$as_me:19363: $ac_file is unchanged" >&5
19364 echo "$as_me: $ac_file is unchanged" >&6;}
19366 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19367 X"$ac_file" : 'X\(//\)[^/]' \| \
19368 X"$ac_file" : 'X\(//\)$' \| \
19369 X"$ac_file" : 'X\(/\)' \| \
19370 . : '\(.\)' 2>/dev/null ||
19372 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19373 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19374 /^X\(\/\/\)$/{ s//\1/; q; }
19375 /^X\(\/\).*/{ s//\1/; q; }
19377 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19378 { case "$ac_dir" in
19379 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19383 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19384 case $as_mkdir_dir in
19385 # Skip DOS drivespec
19386 ?:) as_incr_dir=$as_mkdir_dir ;;
19388 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19389 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19396 mv "$tmp/config.h" "$ac_file"
19399 cat "$tmp"/config.h
19400 rm -f "$tmp"/config.h
19404 cat >>"$CONFIG_STATUS" <<\EOF
19406 # CONFIG_COMMANDS section.
19408 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19409 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19410 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19414 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19415 if test -z "$USE_OLD_MAKERULES" ; then
19416 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19423 cat >>"$CONFIG_STATUS" <<\EOF
19425 { (exit 0); exit 0; }
19427 chmod +x "$CONFIG_STATUS"
19428 ac_clean_files=$ac_clean_files_save
19430 # configure is writing to config.log, and then calls config.status.
19431 # config.status does its own redirection, appending to config.log.
19432 # Unfortunately, on DOS this fails, as config.log is still kept open
19433 # by configure, so config.status won't be able to write to it; its
19434 # output is simply discarded. So we exec the FD to /dev/null,
19435 # effectively closing config.log, so it can be properly (re)opened and
19436 # appended to by config.status. When coming back to configure, we
19437 # need to make the FD available again.
19438 if test "$no_create" != yes; then
19441 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19443 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19444 # would make configure fail if this is the last instruction.
19445 "$ac_cs_success" || { (exit 1); exit 1; }
19447 ${MAKE:-make} preinstall