2 # From configure.in Revision: 1.88 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20221202.
6 # Copyright 2003-2021,2022 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2021,2022 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20221202. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1067 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1068 if test -f "$ac_dir/install-sh"; then
1070 ac_install_sh="$ac_aux_dir/install-sh -c"
1072 elif test -f "$ac_dir/install.sh"; then
1074 ac_install_sh="$ac_aux_dir/install.sh -c"
1076 elif test -f "$ac_dir/shtool"; then
1078 ac_install_sh="$ac_aux_dir/shtool install -c"
1082 if test -z "$ac_aux_dir"; then
1083 { { echo "$as_me:1083: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1084 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1085 { (exit 1); exit 1; }; }
1087 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1088 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1089 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1091 # Make sure we can run config.sub.
1092 $ac_config_sub sun4 >/dev/null 2>&1 ||
1093 { { echo "$as_me:1093: error: cannot run $ac_config_sub" >&5
1094 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1095 { (exit 1); exit 1; }; }
1097 echo "$as_me:1097: checking build system type" >&5
1098 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1099 if test "${ac_cv_build+set}" = set; then
1100 echo $ECHO_N "(cached) $ECHO_C" >&6
1102 ac_cv_build_alias=$build_alias
1103 test -z "$ac_cv_build_alias" &&
1104 ac_cv_build_alias=`$ac_config_guess`
1105 test -z "$ac_cv_build_alias" &&
1106 { { echo "$as_me:1106: error: cannot guess build type; you must specify one" >&5
1107 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1108 { (exit 1); exit 1; }; }
1109 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1110 { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1111 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1112 { (exit 1); exit 1; }; }
1115 echo "$as_me:1115: result: $ac_cv_build" >&5
1116 echo "${ECHO_T}$ac_cv_build" >&6
1118 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122 echo "$as_me:1122: checking host system type" >&5
1123 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1124 if test "${ac_cv_host+set}" = set; then
1125 echo $ECHO_N "(cached) $ECHO_C" >&6
1127 ac_cv_host_alias=$host_alias
1128 test -z "$ac_cv_host_alias" &&
1129 ac_cv_host_alias=$ac_cv_build_alias
1130 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1131 { { echo "$as_me:1131: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1132 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1133 { (exit 1); exit 1; }; }
1136 echo "$as_me:1136: result: $ac_cv_host" >&5
1137 echo "${ECHO_T}$ac_cv_host" >&6
1139 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1144 echo "$as_me:1144: checking target system type" >&5
1145 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1146 if test "${ac_cv_target+set}" = set; then
1147 echo $ECHO_N "(cached) $ECHO_C" >&6
1149 ac_cv_target_alias=$target_alias
1150 test "x$ac_cv_target_alias" = "x" &&
1151 ac_cv_target_alias=$ac_cv_host_alias
1152 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1153 { { echo "$as_me:1153: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1154 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1155 { (exit 1); exit 1; }; }
1158 echo "$as_me:1158: result: $ac_cv_target" >&5
1159 echo "${ECHO_T}$ac_cv_target" >&6
1160 target=$ac_cv_target
1161 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1162 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1163 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1165 # The aliases save the names the user supplied, while $host etc.
1166 # will get canonicalized.
1167 test -n "$target_alias" &&
1168 test "$program_prefix$program_suffix$program_transform_name" = \
1170 program_prefix=${target_alias}-
1171 system_name="$host_os"
1173 system_name="`(uname -s -r) 2>/dev/null`"
1174 if test -z "$system_name" ; then
1175 system_name="`(hostname) 2>/dev/null`"
1178 test -n "$system_name" &&
1179 cat >>confdefs.h <<EOF
1180 #define SYSTEM_NAME "$system_name"
1183 if test "${cf_cv_system_name+set}" = set; then
1184 echo $ECHO_N "(cached) $ECHO_C" >&6
1186 cf_cv_system_name="$system_name"
1189 test -z "$system_name" && system_name="$cf_cv_system_name"
1190 test -n "$cf_cv_system_name" && echo "$as_me:1190: result: Configuring for $cf_cv_system_name" >&5
1191 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1193 if test ".$system_name" != ".$cf_cv_system_name" ; then
1194 echo "$as_me:1194: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1195 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1196 { { echo "$as_me:1196: error: \"Please remove config.cache and try again.\"" >&5
1197 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1198 { (exit 1); exit 1; }; }
1201 # Check whether --with-system-type or --without-system-type was given.
1202 if test "${with_system_type+set}" = set; then
1203 withval="$with_system_type"
1204 { echo "$as_me:1204: WARNING: overriding system type to $withval" >&5
1205 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1206 cf_cv_system_name=$withval
1211 ### Save the given $CFLAGS to allow user-override.
1212 cf_user_CFLAGS="$CFLAGS"
1214 ### Default install-location
1215 for ac_prog in ggrep grep
1217 # Extract the first word of "$ac_prog", so it can be a program name with args.
1218 set dummy $ac_prog; ac_word=$2
1219 echo "$as_me:1219: checking for $ac_word" >&5
1220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1221 if test "${ac_cv_prog_GREP+set}" = set; then
1222 echo $ECHO_N "(cached) $ECHO_C" >&6
1224 if test -n "$GREP"; then
1225 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1227 ac_save_IFS=$IFS; IFS=$ac_path_separator
1229 for ac_dir in $ac_dummy; do
1231 test -z "$ac_dir" && ac_dir=.
1232 $as_executable_p "$ac_dir/$ac_word" || continue
1233 ac_cv_prog_GREP="$ac_prog"
1234 echo "$as_me:1234: found $ac_dir/$ac_word" >&5
1240 GREP=$ac_cv_prog_GREP
1241 if test -n "$GREP"; then
1242 echo "$as_me:1242: result: $GREP" >&5
1243 echo "${ECHO_T}$GREP" >&6
1245 echo "$as_me:1245: result: no" >&5
1246 echo "${ECHO_T}no" >&6
1249 test -n "$GREP" && break
1251 test -n "$GREP" || GREP=": "
1253 echo "$as_me:1253: checking for fgrep" >&5
1254 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1255 if test "${ac_cv_path_FGREP+set}" = set; then
1256 echo $ECHO_N "(cached) $ECHO_C" >&6
1258 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1259 then ac_cv_path_FGREP="$GREP -F"
1261 for ac_prog in gfgrep fgrep
1263 # Extract the first word of "$ac_prog", so it can be a program name with args.
1264 set dummy $ac_prog; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_path_FGREP+set}" = set; then
1268 echo $ECHO_N "(cached) $ECHO_C" >&6
1272 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1275 ac_save_IFS=$IFS; IFS=$ac_path_separator
1277 for ac_dir in $ac_dummy; do
1279 test -z "$ac_dir" && ac_dir=.
1280 if $as_executable_p "$ac_dir/$ac_word"; then
1281 ac_cv_path_FGREP="$ac_dir/$ac_word"
1282 echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1290 FGREP=$ac_cv_path_FGREP
1292 if test -n "$FGREP"; then
1293 echo "$as_me:1293: result: $FGREP" >&5
1294 echo "${ECHO_T}$FGREP" >&6
1296 echo "$as_me:1296: result: no" >&5
1297 echo "${ECHO_T}no" >&6
1300 test -n "$FGREP" && break
1302 test -n "$FGREP" || FGREP=": "
1304 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1304: error: cannot find workable fgrep" >&5
1305 echo "$as_me: error: cannot find workable fgrep" >&2;}
1306 { (exit 1); exit 1; }; }
1309 echo "$as_me:1309: result: $ac_cv_path_FGREP" >&5
1310 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1311 FGREP="$ac_cv_path_FGREP"
1313 echo "$as_me:1313: checking for prefix" >&5
1314 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1315 if test "x$prefix" = "xNONE" ; then
1316 case "$cf_cv_system_name" in
1317 # non-vendor systems don't have a conflict
1318 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1321 (*) prefix=$ac_default_prefix
1325 echo "$as_me:1325: result: $prefix" >&5
1326 echo "${ECHO_T}$prefix" >&6
1328 if test "x$prefix" = "xNONE" ; then
1329 echo "$as_me:1329: checking for default include-directory" >&5
1330 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1331 test -n "$verbose" && echo 1>&6
1334 "$includedir/ncurses" \
1336 "$prefix/include/ncurses" \
1337 /usr/local/include \
1338 /usr/local/include/ncurses \
1340 /usr/include/ncurses
1342 cf_dir=`eval echo "$cf_symbol"`
1343 if test -f "$cf_dir/curses.h" ; then
1344 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1345 includedir="$cf_symbol"
1346 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1350 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1352 echo "$as_me:1352: result: $includedir" >&5
1353 echo "${ECHO_T}$includedir" >&6
1356 ### Checks for programs.
1359 ac_cpp='$CPP $CPPFLAGS'
1360 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1361 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363 ac_main_return="return"
1364 if test -n "$ac_tool_prefix"; then
1365 for ac_prog in gnatgcc gcc cc
1367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1368 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1369 echo "$as_me:1369: checking for $ac_word" >&5
1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371 if test "${ac_cv_prog_CC+set}" = set; then
1372 echo $ECHO_N "(cached) $ECHO_C" >&6
1374 if test -n "$CC"; then
1375 ac_cv_prog_CC="$CC" # Let the user override the test.
1377 ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 for ac_dir in $ac_dummy; do
1381 test -z "$ac_dir" && ac_dir=.
1382 $as_executable_p "$ac_dir/$ac_word" || continue
1383 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1384 echo "$as_me:1384: found $ac_dir/$ac_word" >&5
1391 if test -n "$CC"; then
1392 echo "$as_me:1392: result: $CC" >&5
1393 echo "${ECHO_T}$CC" >&6
1395 echo "$as_me:1395: result: no" >&5
1396 echo "${ECHO_T}no" >&6
1399 test -n "$CC" && break
1402 if test -z "$CC"; then
1404 for ac_prog in gnatgcc gcc cc
1406 # Extract the first word of "$ac_prog", so it can be a program name with args.
1407 set dummy $ac_prog; ac_word=$2
1408 echo "$as_me:1408: checking for $ac_word" >&5
1409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1411 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 if test -n "$ac_ct_CC"; then
1414 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1416 ac_save_IFS=$IFS; IFS=$ac_path_separator
1418 for ac_dir in $ac_dummy; do
1420 test -z "$ac_dir" && ac_dir=.
1421 $as_executable_p "$ac_dir/$ac_word" || continue
1422 ac_cv_prog_ac_ct_CC="$ac_prog"
1423 echo "$as_me:1423: found $ac_dir/$ac_word" >&5
1429 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1430 if test -n "$ac_ct_CC"; then
1431 echo "$as_me:1431: result: $ac_ct_CC" >&5
1432 echo "${ECHO_T}$ac_ct_CC" >&6
1434 echo "$as_me:1434: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1438 test -n "$ac_ct_CC" && break
1444 test -z "$CC" && { { echo "$as_me:1444: error: no acceptable cc found in \$PATH" >&5
1445 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1446 { (exit 1); exit 1; }; }
1448 # Provide some information about the compiler.
1449 echo "$as_me:1449:" \
1450 "checking for C compiler version" >&5
1451 ac_compiler=`set X $ac_compile; echo "$2"`
1452 { (eval echo "$as_me:1452: \"$ac_compiler --version </dev/null >&5\"") >&5
1453 (eval $ac_compiler --version </dev/null >&5) 2>&5
1455 echo "$as_me:1455: \$? = $ac_status" >&5
1456 (exit "$ac_status"); }
1457 { (eval echo "$as_me:1457: \"$ac_compiler -v </dev/null >&5\"") >&5
1458 (eval $ac_compiler -v </dev/null >&5) 2>&5
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit "$ac_status"); }
1462 { (eval echo "$as_me:1462: \"$ac_compiler -V </dev/null >&5\"") >&5
1463 (eval $ac_compiler -V </dev/null >&5) 2>&5
1465 echo "$as_me:1465: \$? = $ac_status" >&5
1466 (exit "$ac_status"); }
1468 cat >"conftest.$ac_ext" <<_ACEOF
1469 #line 1469 "configure"
1470 #include "confdefs.h"
1480 ac_clean_files_save=$ac_clean_files
1481 ac_clean_files="$ac_clean_files a.out a.exe"
1482 # Try to create an executable without -o first, disregard a.out.
1483 # It will help us diagnose broken compilers, and finding out an intuition
1485 echo "$as_me:1485: checking for C compiler default output" >&5
1486 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1487 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1488 if { (eval echo "$as_me:1488: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1491 echo "$as_me:1491: \$? = $ac_status" >&5
1492 (exit "$ac_status"); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1496 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1497 ls a.out conftest 2>/dev/null;
1498 ls a.* conftest.* 2>/dev/null`; do
1500 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1501 a.out ) # We found the default executable, but exeext='' is most
1504 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1505 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512 echo "$as_me: failed program was:" >&5
1513 cat "conftest.$ac_ext" >&5
1514 { { echo "$as_me:1514: error: C compiler cannot create executables" >&5
1515 echo "$as_me: error: C compiler cannot create executables" >&2;}
1516 { (exit 77); exit 77; }; }
1519 ac_exeext=$ac_cv_exeext
1520 echo "$as_me:1520: result: $ac_file" >&5
1521 echo "${ECHO_T}$ac_file" >&6
1523 # Check the compiler produces executables we can run. If not, either
1524 # the compiler is broken, or we cross compile.
1525 echo "$as_me:1525: checking whether the C compiler works" >&5
1526 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1527 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1528 # If not cross compiling, check that we can run a simple program.
1529 if test "$cross_compiling" != yes; then
1530 if { ac_try='./$ac_file'
1531 { (eval echo "$as_me:1531: \"$ac_try\"") >&5
1534 echo "$as_me:1534: \$? = $ac_status" >&5
1535 (exit "$ac_status"); }; }; then
1538 if test "$cross_compiling" = maybe; then
1541 { { echo "$as_me:1541: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&5
1543 echo "$as_me: error: cannot run C compiled programs.
1544 If you meant to cross compile, use \`--host'." >&2;}
1545 { (exit 1); exit 1; }; }
1549 echo "$as_me:1549: result: yes" >&5
1550 echo "${ECHO_T}yes" >&6
1552 rm -f a.out a.exe "conftest$ac_cv_exeext"
1553 ac_clean_files=$ac_clean_files_save
1554 # Check the compiler produces executables we can run. If not, either
1555 # the compiler is broken, or we cross compile.
1556 echo "$as_me:1556: checking whether we are cross compiling" >&5
1557 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1558 echo "$as_me:1558: result: $cross_compiling" >&5
1559 echo "${ECHO_T}$cross_compiling" >&6
1561 echo "$as_me:1561: checking for executable suffix" >&5
1562 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1563 if { (eval echo "$as_me:1563: \"$ac_link\"") >&5
1564 (eval $ac_link) 2>&5
1566 echo "$as_me:1566: \$? = $ac_status" >&5
1567 (exit "$ac_status"); }; then
1568 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1569 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1570 # work properly (i.e., refer to `conftest.exe'), while it won't with
1572 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1575 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582 { { echo "$as_me:1582: error: cannot compute EXEEXT: cannot compile and link" >&5
1583 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1584 { (exit 1); exit 1; }; }
1587 rm -f "conftest$ac_cv_exeext"
1588 echo "$as_me:1588: result: $ac_cv_exeext" >&5
1589 echo "${ECHO_T}$ac_cv_exeext" >&6
1591 rm -f "conftest.$ac_ext"
1592 EXEEXT=$ac_cv_exeext
1594 echo "$as_me:1594: checking for object suffix" >&5
1595 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1596 if test "${ac_cv_objext+set}" = set; then
1597 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 cat >"conftest.$ac_ext" <<_ACEOF
1600 #line 1600 "configure"
1601 #include "confdefs.h"
1611 rm -f conftest.o conftest.obj
1612 if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5
1613 (eval $ac_compile) 2>&5
1615 echo "$as_me:1615: \$? = $ac_status" >&5
1616 (exit "$ac_status"); }; then
1617 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1619 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1620 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1625 echo "$as_me: failed program was:" >&5
1626 cat "conftest.$ac_ext" >&5
1627 { { echo "$as_me:1627: error: cannot compute OBJEXT: cannot compile" >&5
1628 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1629 { (exit 1); exit 1; }; }
1632 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1634 echo "$as_me:1634: result: $ac_cv_objext" >&5
1635 echo "${ECHO_T}$ac_cv_objext" >&6
1636 OBJEXT=$ac_cv_objext
1638 echo "$as_me:1638: checking whether we are using the GNU C compiler" >&5
1639 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1640 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1641 echo $ECHO_N "(cached) $ECHO_C" >&6
1643 cat >"conftest.$ac_ext" <<_ACEOF
1644 #line 1644 "configure"
1645 #include "confdefs.h"
1658 rm -f "conftest.$ac_objext"
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit "$ac_status"); } &&
1664 { ac_try='test -s "conftest.$ac_objext"'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit "$ac_status"); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat "conftest.$ac_ext" >&5
1676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1677 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1680 echo "$as_me:1680: result: $ac_cv_c_compiler_gnu" >&5
1681 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1682 GCC=`test $ac_compiler_gnu = yes && echo yes`
1683 ac_test_CFLAGS=${CFLAGS+set}
1684 ac_save_CFLAGS=$CFLAGS
1686 echo "$as_me:1686: checking whether $CC accepts -g" >&5
1687 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1688 if test "${ac_cv_prog_cc_g+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >"conftest.$ac_ext" <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1703 rm -f "conftest.$ac_objext"
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705 (eval $ac_compile) 2>&5
1707 echo "$as_me:1707: \$? = $ac_status" >&5
1708 (exit "$ac_status"); } &&
1709 { ac_try='test -s "conftest.$ac_objext"'
1710 { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit "$ac_status"); }; }; then
1717 echo "$as_me: failed program was:" >&5
1718 cat "conftest.$ac_ext" >&5
1721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1723 echo "$as_me:1723: result: $ac_cv_prog_cc_g" >&5
1724 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1725 if test "$ac_test_CFLAGS" = set; then
1726 CFLAGS=$ac_save_CFLAGS
1727 elif test $ac_cv_prog_cc_g = yes; then
1728 if test "$GCC" = yes; then
1734 if test "$GCC" = yes; then
1740 # Some people use a C++ compiler to compile C. Since we use `exit',
1741 # in C++ we need to declare it. In case someone uses the same compiler
1742 # for both compiling C and C++ we need to have the C++ compiler decide
1743 # the declaration of exit, since it's the most demanding environment.
1744 cat >"conftest.$ac_ext" <<_ACEOF
1749 rm -f "conftest.$ac_objext"
1750 if { (eval echo "$as_me:1750: \"$ac_compile\"") >&5
1751 (eval $ac_compile) 2>&5
1753 echo "$as_me:1753: \$? = $ac_status" >&5
1754 (exit "$ac_status"); } &&
1755 { ac_try='test -s "conftest.$ac_objext"'
1756 { (eval echo "$as_me:1756: \"$ac_try\"") >&5
1759 echo "$as_me:1759: \$? = $ac_status" >&5
1760 (exit "$ac_status"); }; }; then
1761 for ac_declaration in \
1763 '#include <stdlib.h>' \
1764 'extern "C" void std::exit (int) throw (); using std::exit;' \
1765 'extern "C" void std::exit (int); using std::exit;' \
1766 'extern "C" void exit (int) throw ();' \
1767 'extern "C" void exit (int);' \
1770 cat >"conftest.$ac_ext" <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1783 rm -f "conftest.$ac_objext"
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit "$ac_status"); } &&
1789 { ac_try='test -s "conftest.$ac_objext"'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit "$ac_status"); }; }; then
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1802 cat >"conftest.$ac_ext" <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1814 rm -f "conftest.$ac_objext"
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816 (eval $ac_compile) 2>&5
1818 echo "$as_me:1818: \$? = $ac_status" >&5
1819 (exit "$ac_status"); } &&
1820 { ac_try='test -s "conftest.$ac_objext"'
1821 { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1824 echo "$as_me:1824: \$? = $ac_status" >&5
1825 (exit "$ac_status"); }; }; then
1828 echo "$as_me: failed program was:" >&5
1829 cat "conftest.$ac_ext" >&5
1831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1834 if test -n "$ac_declaration"; then
1835 echo '#ifdef __cplusplus' >>confdefs.h
1836 echo "$ac_declaration" >>confdefs.h
1837 echo '#endif' >>confdefs.h
1841 echo "$as_me: failed program was:" >&5
1842 cat "conftest.$ac_ext" >&5
1844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 ac_cpp='$CPP $CPPFLAGS'
1847 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1848 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1850 ac_main_return="return"
1853 if test "$GCC" = yes ; then
1854 echo "$as_me:1854: checking version of $CC" >&5
1855 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1856 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1857 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1858 echo "$as_me:1858: result: $GCC_VERSION" >&5
1859 echo "${ECHO_T}$GCC_VERSION" >&6
1864 if test "$GCC" = yes ; then
1867 echo "$as_me:1867: checking if this is really Intel C compiler" >&5
1868 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1869 cf_save_CFLAGS="$CFLAGS"
1870 CFLAGS="$CFLAGS -no-gcc"
1871 cat >"conftest.$ac_ext" <<_ACEOF
1872 #line 1872 "configure"
1873 #include "confdefs.h"
1879 #ifdef __INTEL_COMPILER
1888 rm -f "conftest.$ac_objext"
1889 if { (eval echo "$as_me:1889: \"$ac_compile\"") >&5
1890 (eval $ac_compile) 2>&5
1892 echo "$as_me:1892: \$? = $ac_status" >&5
1893 (exit "$ac_status"); } &&
1894 { ac_try='test -s "conftest.$ac_objext"'
1895 { (eval echo "$as_me:1895: \"$ac_try\"") >&5
1898 echo "$as_me:1898: \$? = $ac_status" >&5
1899 (exit "$ac_status"); }; }; then
1901 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1904 echo "$as_me: failed program was:" >&5
1905 cat "conftest.$ac_ext" >&5
1907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1908 CFLAGS="$cf_save_CFLAGS"
1909 echo "$as_me:1909: result: $INTEL_COMPILER" >&5
1910 echo "${ECHO_T}$INTEL_COMPILER" >&6
1917 if test "$GCC" = yes ; then
1918 echo "$as_me:1918: checking if this is really Clang C compiler" >&5
1919 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1920 cf_save_CFLAGS="$CFLAGS"
1921 cat >"conftest.$ac_ext" <<_ACEOF
1922 #line 1922 "configure"
1923 #include "confdefs.h"
1938 rm -f "conftest.$ac_objext"
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940 (eval $ac_compile) 2>&5
1942 echo "$as_me:1942: \$? = $ac_status" >&5
1943 (exit "$ac_status"); } &&
1944 { ac_try='test -s "conftest.$ac_objext"'
1945 { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1948 echo "$as_me:1948: \$? = $ac_status" >&5
1949 (exit "$ac_status"); }; }; then
1953 echo "$as_me: failed program was:" >&5
1954 cat "conftest.$ac_ext" >&5
1956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1957 CFLAGS="$cf_save_CFLAGS"
1958 echo "$as_me:1958: result: $CLANG_COMPILER" >&5
1959 echo "${ECHO_T}$CLANG_COMPILER" >&6
1964 if test "x$CLANG_COMPILER" = "xyes" ; then
1966 (c[1-9][0-9]|*/c[1-9][0-9])
1967 { echo "$as_me:1967: WARNING: replacing broken compiler alias $CC" >&5
1968 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1969 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1974 echo "$as_me:1974: checking version of $CC" >&5
1975 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1976 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1977 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1978 echo "$as_me:1978: result: $CLANG_VERSION" >&5
1979 echo "${ECHO_T}$CLANG_VERSION" >&6
1981 for cf_clang_opt in \
1982 -Qunused-arguments \
1983 -Wno-error=implicit-function-declaration
1985 echo "$as_me:1985: checking if option $cf_clang_opt works" >&5
1986 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1987 cf_save_CFLAGS="$CFLAGS"
1988 CFLAGS="$CFLAGS $cf_clang_opt"
1989 cat >"conftest.$ac_ext" <<_ACEOF
1990 #line 1990 "configure"
1991 #include "confdefs.h"
1998 printf("hello!\\n");
2003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2004 if { (eval echo "$as_me:2004: \"$ac_link\"") >&5
2005 (eval $ac_link) 2>&5
2007 echo "$as_me:2007: \$? = $ac_status" >&5
2008 (exit "$ac_status"); } &&
2009 { ac_try='test -s "conftest$ac_exeext"'
2010 { (eval echo "$as_me:2010: \"$ac_try\"") >&5
2013 echo "$as_me:2013: \$? = $ac_status" >&5
2014 (exit "$ac_status"); }; }; then
2018 echo "$as_me: failed program was:" >&5
2019 cat "conftest.$ac_ext" >&5
2023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2024 echo "$as_me:2024: result: $cf_clang_optok" >&5
2025 echo "${ECHO_T}$cf_clang_optok" >&6
2026 CFLAGS="$cf_save_CFLAGS"
2027 if test "$cf_clang_optok" = yes; then
2028 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2030 echo "${as_me:-configure}:2030: testing adding option $cf_clang_opt ..." 1>&5
2032 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2033 CFLAGS="${CFLAGS}$cf_clang_opt"
2039 echo "$as_me:2039: checking for $CC option to accept ANSI C" >&5
2040 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2041 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2042 echo $ECHO_N "(cached) $ECHO_C" >&6
2044 ac_cv_prog_cc_stdc=no
2046 cat >"conftest.$ac_ext" <<_ACEOF
2047 #line 2047 "configure"
2048 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #include <sys/stat.h>
2053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2054 struct buf { int x; };
2055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2056 static char *e (p, i)
2062 static char *f (char * (*g) (char **, int), char **p, ...)
2067 s = g (p, va_arg (v,int));
2071 int test (int i, double x);
2072 struct s1 {int (*f) (int a);};
2073 struct s2 {int (*f) (double a);};
2074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2080 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2085 # Don't try gcc -ansi; that turns off useful extensions and
2086 # breaks some systems' header files.
2087 # AIX -qlanglvl=ansi
2088 # Ultrix and OSF/1 -std1
2089 # HP-UX 10.20 and later -Ae
2090 # HP-UX older versions -Aa -D_HPUX_SOURCE
2091 # SVR4 -Xc -D__EXTENSIONS__
2092 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2094 CC="$ac_save_CC $ac_arg"
2095 rm -f "conftest.$ac_objext"
2096 if { (eval echo "$as_me:2096: \"$ac_compile\"") >&5
2097 (eval $ac_compile) 2>&5
2099 echo "$as_me:2099: \$? = $ac_status" >&5
2100 (exit "$ac_status"); } &&
2101 { ac_try='test -s "conftest.$ac_objext"'
2102 { (eval echo "$as_me:2102: \"$ac_try\"") >&5
2105 echo "$as_me:2105: \$? = $ac_status" >&5
2106 (exit "$ac_status"); }; }; then
2107 ac_cv_prog_cc_stdc=$ac_arg
2110 echo "$as_me: failed program was:" >&5
2111 cat "conftest.$ac_ext" >&5
2113 rm -f "conftest.$ac_objext"
2115 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2120 case "x$ac_cv_prog_cc_stdc" in
2122 echo "$as_me:2122: result: none needed" >&5
2123 echo "${ECHO_T}none needed" >&6 ;;
2125 echo "$as_me:2125: result: $ac_cv_prog_cc_stdc" >&5
2126 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2127 CC="$CC $ac_cv_prog_cc_stdc" ;;
2130 # This should have been defined by AC_PROG_CC
2133 echo "$as_me:2133: checking \$CFLAGS variable" >&5
2134 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2137 echo "$as_me:2137: result: broken" >&5
2138 echo "${ECHO_T}broken" >&6
2139 { echo "$as_me:2139: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2140 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2143 for cf_arg in $cf_flags
2149 cf_new_extra_cppflags=
2151 for cf_add_cflags in $cf_arg
2153 case "$cf_fix_cppflags" in
2155 case "$cf_add_cflags" in
2156 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2157 case "$cf_add_cflags" in
2159 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2161 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2162 && test -z "${cf_tst_cflags}" \
2163 && cf_fix_cppflags=yes
2165 if test "$cf_fix_cppflags" = yes ; then
2167 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2168 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2171 elif test "${cf_tst_cflags}" = "\"'" ; then
2173 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2174 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2184 case "$cf_add_cflags" in
2186 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2188 CPPFLAGS=`echo "$CPPFLAGS" | \
2189 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2190 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2195 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2196 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2203 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2204 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2211 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2212 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2214 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2216 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2217 && test -z "${cf_tst_cflags}" \
2218 && cf_fix_cppflags=no
2223 if test -n "$cf_new_cflags" ; then
2225 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2226 CFLAGS="${CFLAGS}$cf_new_cflags"
2230 if test -n "$cf_new_cppflags" ; then
2232 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2233 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2237 if test -n "$cf_new_extra_cppflags" ; then
2239 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2240 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2247 echo "$as_me:2247: result: ok" >&5
2248 echo "${ECHO_T}ok" >&6
2252 echo "$as_me:2252: checking \$CC variable" >&5
2253 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2256 echo "$as_me:2256: result: broken" >&5
2257 echo "${ECHO_T}broken" >&6
2258 { echo "$as_me:2258: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2259 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2261 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2262 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2264 for cf_arg in $cf_flags
2272 cf_new_extra_cppflags=
2274 for cf_add_cflags in $cf_arg
2276 case "$cf_fix_cppflags" in
2278 case "$cf_add_cflags" in
2279 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2280 case "$cf_add_cflags" in
2282 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2285 && test -z "${cf_tst_cflags}" \
2286 && cf_fix_cppflags=yes
2288 if test "$cf_fix_cppflags" = yes ; then
2290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2294 elif test "${cf_tst_cflags}" = "\"'" ; then
2296 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2297 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2307 case "$cf_add_cflags" in
2309 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2311 CPPFLAGS=`echo "$CPPFLAGS" | \
2312 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2313 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2318 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2319 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2326 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2327 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2334 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2335 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2337 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2340 && test -z "${cf_tst_cflags}" \
2341 && cf_fix_cppflags=no
2346 if test -n "$cf_new_cflags" ; then
2348 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2349 CFLAGS="${CFLAGS}$cf_new_cflags"
2353 if test -n "$cf_new_cppflags" ; then
2355 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2356 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2360 if test -n "$cf_new_extra_cppflags" ; then
2362 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2363 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2373 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2375 echo "${as_me:-configure}:2375: testing resulting CC: '$CC' ..." 1>&5
2377 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2379 echo "${as_me:-configure}:2379: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2381 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2383 echo "${as_me:-configure}:2383: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2387 echo "$as_me:2387: result: ok" >&5
2388 echo "${ECHO_T}ok" >&6
2392 echo "$as_me:2392: checking for egrep" >&5
2393 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2394 if test "${ac_cv_path_EGREP+set}" = set; then
2395 echo $ECHO_N "(cached) $ECHO_C" >&6
2397 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2398 then ac_cv_path_EGREP="$GREP -E"
2400 for ac_prog in gegrep egrep
2402 # Extract the first word of "$ac_prog", so it can be a program name with args.
2403 set dummy $ac_prog; ac_word=$2
2404 echo "$as_me:2404: checking for $ac_word" >&5
2405 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2406 if test "${ac_cv_path_EGREP+set}" = set; then
2407 echo $ECHO_N "(cached) $ECHO_C" >&6
2411 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2414 ac_save_IFS=$IFS; IFS=$ac_path_separator
2416 for ac_dir in $ac_dummy; do
2418 test -z "$ac_dir" && ac_dir=.
2419 if $as_executable_p "$ac_dir/$ac_word"; then
2420 ac_cv_path_EGREP="$ac_dir/$ac_word"
2421 echo "$as_me:2421: found $ac_dir/$ac_word" >&5
2429 EGREP=$ac_cv_path_EGREP
2431 if test -n "$EGREP"; then
2432 echo "$as_me:2432: result: $EGREP" >&5
2433 echo "${ECHO_T}$EGREP" >&6
2435 echo "$as_me:2435: result: no" >&5
2436 echo "${ECHO_T}no" >&6
2439 test -n "$EGREP" && break
2441 test -n "$EGREP" || EGREP=": "
2443 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2443: error: cannot find workable egrep" >&5
2444 echo "$as_me: error: cannot find workable egrep" >&2;}
2445 { (exit 1); exit 1; }; }
2448 echo "$as_me:2448: result: $ac_cv_path_EGREP" >&5
2449 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2450 EGREP="$ac_cv_path_EGREP"
2453 ac_cpp='$CPP $CPPFLAGS'
2454 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2455 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2457 ac_main_return="return"
2458 echo "$as_me:2458: checking how to run the C preprocessor" >&5
2459 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2460 # On Suns, sometimes $CPP names a directory.
2461 if test -n "$CPP" && test -d "$CPP"; then
2464 if test -z "$CPP"; then
2465 if test "${ac_cv_prog_CPP+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
2468 # Double quotes because CPP needs to be expanded
2469 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2472 for ac_c_preproc_warn_flag in '' yes
2474 # Use a header file that comes with gcc, so configuring glibc
2475 # with a fresh cross-compiler works.
2476 # On the NeXT, cc -E runs the code through the compiler's parser,
2477 # not just through cpp. "Syntax error" is here to catch this case.
2478 cat >"conftest.$ac_ext" <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2484 if { (eval echo "$as_me:2484: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2485 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2487 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2489 cat conftest.err >&5
2490 echo "$as_me:2490: \$? = $ac_status" >&5
2491 (exit "$ac_status"); } >/dev/null; then
2492 if test -s conftest.err; then
2493 ac_cpp_err=$ac_c_preproc_warn_flag
2500 if test -z "$ac_cpp_err"; then
2503 echo "$as_me: failed program was:" >&5
2504 cat "conftest.$ac_ext" >&5
2505 # Broken: fails on valid input.
2508 rm -f conftest.err "conftest.$ac_ext"
2510 # OK, works on sane cases. Now check whether non-existent headers
2511 # can be detected and how.
2512 cat >"conftest.$ac_ext" <<_ACEOF
2513 #line 2513 "configure"
2514 #include "confdefs.h"
2515 #include <ac_nonexistent.h>
2517 if { (eval echo "$as_me:2517: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2518 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2520 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2522 cat conftest.err >&5
2523 echo "$as_me:2523: \$? = $ac_status" >&5
2524 (exit "$ac_status"); } >/dev/null; then
2525 if test -s conftest.err; then
2526 ac_cpp_err=$ac_c_preproc_warn_flag
2533 if test -z "$ac_cpp_err"; then
2534 # Broken: success on invalid input.
2537 echo "$as_me: failed program was:" >&5
2538 cat "conftest.$ac_ext" >&5
2539 # Passes both tests.
2543 rm -f conftest.err "conftest.$ac_ext"
2546 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2547 rm -f conftest.err "conftest.$ac_ext"
2548 if $ac_preproc_ok; then
2560 echo "$as_me:2560: result: $CPP" >&5
2561 echo "${ECHO_T}$CPP" >&6
2563 for ac_c_preproc_warn_flag in '' yes
2565 # Use a header file that comes with gcc, so configuring glibc
2566 # with a fresh cross-compiler works.
2567 # On the NeXT, cc -E runs the code through the compiler's parser,
2568 # not just through cpp. "Syntax error" is here to catch this case.
2569 cat >"conftest.$ac_ext" <<_ACEOF
2570 #line 2570 "configure"
2571 #include "confdefs.h"
2575 if { (eval echo "$as_me:2575: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2576 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2578 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2580 cat conftest.err >&5
2581 echo "$as_me:2581: \$? = $ac_status" >&5
2582 (exit "$ac_status"); } >/dev/null; then
2583 if test -s conftest.err; then
2584 ac_cpp_err=$ac_c_preproc_warn_flag
2591 if test -z "$ac_cpp_err"; then
2594 echo "$as_me: failed program was:" >&5
2595 cat "conftest.$ac_ext" >&5
2596 # Broken: fails on valid input.
2599 rm -f conftest.err "conftest.$ac_ext"
2601 # OK, works on sane cases. Now check whether non-existent headers
2602 # can be detected and how.
2603 cat >"conftest.$ac_ext" <<_ACEOF
2604 #line 2604 "configure"
2605 #include "confdefs.h"
2606 #include <ac_nonexistent.h>
2608 if { (eval echo "$as_me:2608: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2609 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2611 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2613 cat conftest.err >&5
2614 echo "$as_me:2614: \$? = $ac_status" >&5
2615 (exit "$ac_status"); } >/dev/null; then
2616 if test -s conftest.err; then
2617 ac_cpp_err=$ac_c_preproc_warn_flag
2624 if test -z "$ac_cpp_err"; then
2625 # Broken: success on invalid input.
2628 echo "$as_me: failed program was:" >&5
2629 cat "conftest.$ac_ext" >&5
2630 # Passes both tests.
2634 rm -f conftest.err "conftest.$ac_ext"
2637 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2638 rm -f conftest.err "conftest.$ac_ext"
2639 if $ac_preproc_ok; then
2642 { { echo "$as_me:2642: error: C preprocessor \"$CPP\" fails sanity check" >&5
2643 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2644 { (exit 1); exit 1; }; }
2648 ac_cpp='$CPP $CPPFLAGS'
2649 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2650 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2651 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2652 ac_main_return="return"
2654 if test $ac_cv_c_compiler_gnu = yes; then
2655 echo "$as_me:2655: checking whether $CC needs -traditional" >&5
2656 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2657 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2658 echo $ECHO_N "(cached) $ECHO_C" >&6
2660 ac_pattern="Autoconf.*'x'"
2661 cat >"conftest.$ac_ext" <<_ACEOF
2662 #line 2662 "configure"
2663 #include "confdefs.h"
2665 int Autoconf = TIOCGETP;
2667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2668 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2669 ac_cv_prog_gcc_traditional=yes
2671 ac_cv_prog_gcc_traditional=no
2675 if test $ac_cv_prog_gcc_traditional = no; then
2676 cat >"conftest.$ac_ext" <<_ACEOF
2677 #line 2677 "configure"
2678 #include "confdefs.h"
2680 int Autoconf = TCGETA;
2682 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2683 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2684 ac_cv_prog_gcc_traditional=yes
2690 echo "$as_me:2690: result: $ac_cv_prog_gcc_traditional" >&5
2691 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2692 if test $ac_cv_prog_gcc_traditional = yes; then
2693 CC="$CC -traditional"
2697 echo "$as_me:2697: checking whether $CC understands -c and -o together" >&5
2698 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2699 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2700 echo $ECHO_N "(cached) $ECHO_C" >&6
2703 cat > conftest.$ac_ext <<CF_EOF
2706 ${cf_cv_main_return:-return}(0);
2709 # We do the test twice because some compilers refuse to overwrite an
2710 # existing .o file with -o, though they will create one.
2711 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2712 if { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2715 echo "$as_me:2715: \$? = $ac_status" >&5
2716 (exit "$ac_status"); } &&
2717 test -f conftest2.$ac_objext && { (eval echo "$as_me:2717: \"$ac_try\"") >&5
2720 echo "$as_me:2720: \$? = $ac_status" >&5
2721 (exit "$ac_status"); };
2723 eval cf_cv_prog_CC_c_o=yes
2725 eval cf_cv_prog_CC_c_o=no
2730 if test "$cf_cv_prog_CC_c_o" = yes; then
2731 echo "$as_me:2731: result: yes" >&5
2732 echo "${ECHO_T}yes" >&6
2734 echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2738 test "$program_prefix" != NONE &&
2739 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2740 # Use a double $ so make ignores it.
2741 test "$program_suffix" != NONE &&
2742 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2743 # Double any \ or $. echo might interpret backslashes.
2744 # By default was `s,x,x', remove it if useless.
2745 cat <<\_ACEOF >conftest.sed
2746 s/[\\$]/&&/g;s/;s,x,x,$//
2748 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2751 for ac_prog in mawk gawk nawk awk
2753 # Extract the first word of "$ac_prog", so it can be a program name with args.
2754 set dummy $ac_prog; ac_word=$2
2755 echo "$as_me:2755: checking for $ac_word" >&5
2756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2757 if test "${ac_cv_prog_AWK+set}" = set; then
2758 echo $ECHO_N "(cached) $ECHO_C" >&6
2760 if test -n "$AWK"; then
2761 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2763 ac_save_IFS=$IFS; IFS=$ac_path_separator
2765 for ac_dir in $ac_dummy; do
2767 test -z "$ac_dir" && ac_dir=.
2768 $as_executable_p "$ac_dir/$ac_word" || continue
2769 ac_cv_prog_AWK="$ac_prog"
2770 echo "$as_me:2770: found $ac_dir/$ac_word" >&5
2777 if test -n "$AWK"; then
2778 echo "$as_me:2778: result: $AWK" >&5
2779 echo "${ECHO_T}$AWK" >&6
2781 echo "$as_me:2781: result: no" >&5
2782 echo "${ECHO_T}no" >&6
2785 test -n "$AWK" && break
2788 test -z "$AWK" && { { echo "$as_me:2788: error: No awk program found" >&5
2789 echo "$as_me: error: No awk program found" >&2;}
2790 { (exit 1); exit 1; }; }
2792 echo "$as_me:2792: checking for egrep" >&5
2793 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2794 if test "${ac_cv_prog_egrep+set}" = set; then
2795 echo $ECHO_N "(cached) $ECHO_C" >&6
2797 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2798 then ac_cv_prog_egrep='grep -E'
2799 else ac_cv_prog_egrep='egrep'
2802 echo "$as_me:2802: result: $ac_cv_prog_egrep" >&5
2803 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2804 EGREP=$ac_cv_prog_egrep
2806 test -z "$EGREP" && { { echo "$as_me:2806: error: No egrep program found" >&5
2807 echo "$as_me: error: No egrep program found" >&2;}
2808 { (exit 1); exit 1; }; }
2810 # Find a good install program. We prefer a C program (faster),
2811 # so one script is as good as another. But avoid the broken or
2812 # incompatible versions:
2813 # SysV /etc/install, /usr/sbin/install
2814 # SunOS /usr/etc/install
2815 # IRIX /sbin/install
2817 # AmigaOS /C/install, which installs bootblocks on floppy discs
2818 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2819 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2820 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2821 # ./install, which can be erroneously created by make from ./install.sh.
2822 echo "$as_me:2822: checking for a BSD compatible install" >&5
2823 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2824 if test -z "$INSTALL"; then
2825 if test "${ac_cv_path_install+set}" = set; then
2826 echo $ECHO_N "(cached) $ECHO_C" >&6
2828 ac_save_IFS=$IFS; IFS=$ac_path_separator
2829 for ac_dir in $PATH; do
2831 # Account for people who put trailing slashes in PATH elements.
2833 / | ./ | .// | /cC/* \
2834 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2837 # OSF1 and SCO ODT 3.0 have their own names for install.
2838 # Don't use installbsd from OSF since it installs stuff as root
2840 for ac_prog in ginstall scoinst install; do
2841 if $as_executable_p "$ac_dir/$ac_prog"; then
2842 if test $ac_prog = install &&
2843 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2844 # AIX install. It has an incompatible calling convention.
2846 elif test $ac_prog = install &&
2847 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2848 # program-specific install script used by HP pwplus--don't use.
2851 ac_cv_path_install="$ac_dir/$ac_prog -c"
2861 if test "${ac_cv_path_install+set}" = set; then
2862 INSTALL=$ac_cv_path_install
2864 # As a last resort, use the slow shell script. We don't cache a
2865 # path for INSTALL within a source directory, because that will
2866 # break other packages using the cache if that directory is
2867 # removed, or if the path is relative.
2868 INSTALL=$ac_install_sh
2871 echo "$as_me:2871: result: $INSTALL" >&5
2872 echo "${ECHO_T}$INSTALL" >&6
2874 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2875 # It thinks the first close brace ends the variable substitution.
2876 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2878 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2880 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2882 echo "$as_me:2882: checking whether ln -s works" >&5
2883 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2885 if test "$LN_S" = "ln -s"; then
2886 echo "$as_me:2886: result: yes" >&5
2887 echo "${ECHO_T}yes" >&6
2889 echo "$as_me:2889: result: no, using $LN_S" >&5
2890 echo "${ECHO_T}no, using $LN_S" >&6
2893 echo "$as_me:2893: checking if $LN_S -f options work" >&5
2894 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2896 rm -f conf$$.src conf$$dst
2898 echo first >conf$$.src
2899 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2904 rm -f conf$$.dst conf$$src
2905 echo "$as_me:2905: result: $cf_prog_ln_sf" >&5
2906 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2908 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2910 # Find a good install program. We prefer a C program (faster),
2911 # so one script is as good as another. But avoid the broken or
2912 # incompatible versions:
2913 # SysV /etc/install, /usr/sbin/install
2914 # SunOS /usr/etc/install
2915 # IRIX /sbin/install
2917 # AmigaOS /C/install, which installs bootblocks on floppy discs
2918 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2919 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2920 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2921 # ./install, which can be erroneously created by make from ./install.sh.
2922 echo "$as_me:2922: checking for a BSD compatible install" >&5
2923 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2924 if test -z "$INSTALL"; then
2925 if test "${ac_cv_path_install+set}" = set; then
2926 echo $ECHO_N "(cached) $ECHO_C" >&6
2928 ac_save_IFS=$IFS; IFS=$ac_path_separator
2929 for ac_dir in $PATH; do
2931 # Account for people who put trailing slashes in PATH elements.
2933 / | ./ | .// | /cC/* \
2934 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2937 # OSF1 and SCO ODT 3.0 have their own names for install.
2938 # Don't use installbsd from OSF since it installs stuff as root
2940 for ac_prog in ginstall scoinst install; do
2941 if $as_executable_p "$ac_dir/$ac_prog"; then
2942 if test $ac_prog = install &&
2943 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2944 # AIX install. It has an incompatible calling convention.
2946 elif test $ac_prog = install &&
2947 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2948 # program-specific install script used by HP pwplus--don't use.
2951 ac_cv_path_install="$ac_dir/$ac_prog -c"
2961 if test "${ac_cv_path_install+set}" = set; then
2962 INSTALL=$ac_cv_path_install
2964 # As a last resort, use the slow shell script. We don't cache a
2965 # path for INSTALL within a source directory, because that will
2966 # break other packages using the cache if that directory is
2967 # removed, or if the path is relative.
2968 INSTALL=$ac_install_sh
2971 echo "$as_me:2971: result: $INSTALL" >&5
2972 echo "${ECHO_T}$INSTALL" >&6
2974 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2975 # It thinks the first close brace ends the variable substitution.
2976 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2978 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2980 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2986 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2987 test -z "$cf_dir" && cf_dir=.
2988 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2992 echo "$as_me:2992: checking if you want to install stripped executables" >&5
2993 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2995 # Check whether --enable-stripping or --disable-stripping was given.
2996 if test "${enable_stripping+set}" = set; then
2997 enableval="$enable_stripping"
2998 test "$enableval" != no && enableval=yes
2999 if test "$enableval" != "yes" ; then
3002 enable_stripping=yes
3006 enable_stripping=yes
3009 echo "$as_me:3009: result: $enable_stripping" >&5
3010 echo "${ECHO_T}$enable_stripping" >&6
3012 if test "$enable_stripping" = yes
3019 : "${INSTALL:=install}"
3020 echo "$as_me:3020: checking if install accepts -p option" >&5
3021 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3022 if test "${cf_cv_install_p+set}" = set; then
3023 echo $ECHO_N "(cached) $ECHO_C" >&6
3030 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3032 if test -f conftest.out/conftest.in
3034 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3035 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3036 if test -s conftest.err
3051 echo "$as_me:3051: result: $cf_cv_install_p" >&5
3052 echo "${ECHO_T}$cf_cv_install_p" >&6
3054 echo "$as_me:3054: checking if install needs to be told about ownership" >&5
3055 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3056 case `$ac_config_guess` in
3065 echo "$as_me:3065: result: $with_install_o" >&5
3066 echo "${ECHO_T}$with_install_o" >&6
3067 if test "x$with_install_o" = xyes
3069 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3074 echo "$as_me:3074: checking for long file names" >&5
3075 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3076 if test "${ac_cv_sys_long_file_names+set}" = set; then
3077 echo $ECHO_N "(cached) $ECHO_C" >&6
3079 ac_cv_sys_long_file_names=yes
3080 # Test for long file names in all the places we know might matter:
3081 # . the current directory, where building will happen
3082 # $prefix/lib where we will be installing things
3083 # $exec_prefix/lib likewise
3084 # eval it to expand exec_prefix.
3085 # $TMPDIR if set, where it might want to write temporary files
3086 # if $TMPDIR is not set:
3087 # /tmp where it might want to write temporary files
3090 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3093 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3095 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3096 test -d "$ac_dir" || continue
3097 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3098 ac_xdir=$ac_dir/cf$$
3099 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3100 ac_tf1=$ac_xdir/conftest9012345
3101 ac_tf2=$ac_xdir/conftest9012346
3102 (echo 1 >"$ac_tf1") 2>/dev/null
3103 (echo 2 >"$ac_tf2") 2>/dev/null
3104 ac_val=`cat "$ac_tf1" 2>/dev/null`
3105 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3106 ac_cv_sys_long_file_names=no
3107 rm -rf "$ac_xdir" 2>/dev/null
3110 rm -rf "$ac_xdir" 2>/dev/null
3113 echo "$as_me:3113: result: $ac_cv_sys_long_file_names" >&5
3114 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3115 if test "$ac_cv_sys_long_file_names" = yes; then
3117 cat >>confdefs.h <<\EOF
3118 #define HAVE_LONG_FILE_NAMES 1
3123 # if we find pkg-config, check if we should install the ".pc" files.
3125 echo "$as_me:3125: checking if you want to use pkg-config" >&5
3126 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3128 # Check whether --with-pkg-config or --without-pkg-config was given.
3129 if test "${with_pkg_config+set}" = set; then
3130 withval="$with_pkg_config"
3131 cf_pkg_config=$withval
3135 echo "$as_me:3135: result: $cf_pkg_config" >&5
3136 echo "${ECHO_T}$cf_pkg_config" >&6
3138 case "$cf_pkg_config" in
3144 if test -n "$ac_tool_prefix"; then
3145 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3146 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3147 echo "$as_me:3147: checking for $ac_word" >&5
3148 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3149 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3150 echo $ECHO_N "(cached) $ECHO_C" >&6
3154 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3157 ac_save_IFS=$IFS; IFS=$ac_path_separator
3159 for ac_dir in $ac_dummy; do
3161 test -z "$ac_dir" && ac_dir=.
3162 if $as_executable_p "$ac_dir/$ac_word"; then
3163 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3164 echo "$as_me:3164: found $ac_dir/$ac_word" >&5
3172 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3174 if test -n "$PKG_CONFIG"; then
3175 echo "$as_me:3175: result: $PKG_CONFIG" >&5
3176 echo "${ECHO_T}$PKG_CONFIG" >&6
3178 echo "$as_me:3178: result: no" >&5
3179 echo "${ECHO_T}no" >&6
3183 if test -z "$ac_cv_path_PKG_CONFIG"; then
3184 ac_pt_PKG_CONFIG=$PKG_CONFIG
3185 # Extract the first word of "pkg-config", so it can be a program name with args.
3186 set dummy pkg-config; ac_word=$2
3187 echo "$as_me:3187: checking for $ac_word" >&5
3188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3192 case $ac_pt_PKG_CONFIG in
3194 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3197 ac_save_IFS=$IFS; IFS=$ac_path_separator
3199 for ac_dir in $ac_dummy; do
3201 test -z "$ac_dir" && ac_dir=.
3202 if $as_executable_p "$ac_dir/$ac_word"; then
3203 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3204 echo "$as_me:3204: found $ac_dir/$ac_word" >&5
3209 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3213 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3215 if test -n "$ac_pt_PKG_CONFIG"; then
3216 echo "$as_me:3216: result: $ac_pt_PKG_CONFIG" >&5
3217 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3219 echo "$as_me:3219: result: no" >&5
3220 echo "${ECHO_T}no" >&6
3223 PKG_CONFIG=$ac_pt_PKG_CONFIG
3225 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3234 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3235 if test "$PKG_CONFIG" != none ; then
3237 if test "x$prefix" != xNONE; then
3238 cf_path_syntax="$prefix"
3240 cf_path_syntax="$ac_default_prefix"
3243 case ".$PKG_CONFIG" in
3248 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3250 (.\$\{*prefix\}*|.\$\{*dir\}*)
3251 eval PKG_CONFIG="$PKG_CONFIG"
3252 case ".$PKG_CONFIG" in
3254 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3259 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3262 { { echo "$as_me:3262: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3263 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3264 { (exit 1); exit 1; }; }
3268 elif test "x$cf_pkg_config" != xno ; then
3269 { echo "$as_me:3269: WARNING: pkg-config is not installed" >&5
3270 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3273 case "$PKG_CONFIG" in
3275 echo "$as_me:3275: checking for pkg-config library directory" >&5
3276 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3279 echo "$as_me:3279: checking for $PKG_CONFIG library directory" >&5
3280 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3284 # if $PKG_CONFIG_LIBDIR is set, try to use that
3285 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,'`
3287 # if the option is used, let that override. otherwise default to "libdir"
3289 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3290 if test "${with_pkg_config_libdir+set}" = set; then
3291 withval="$with_pkg_config_libdir"
3292 cf_search_path=$withval
3294 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3297 case "x$cf_search_path" in
3299 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3300 echo "$as_me:3300: result: $PKG_CONFIG_LIBDIR" >&5
3301 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3310 PKG_CONFIG_LIBDIR="$cf_search_path"
3311 echo "$as_me:3311: result: $PKG_CONFIG_LIBDIR" >&5
3312 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3316 echo "$as_me:3316: result: auto" >&5
3317 echo "${ECHO_T}auto" >&6
3319 # Look for the library directory using the same prefix as the executable
3320 echo "$as_me:3320: checking for search-list" >&5
3321 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3322 if test "x$PKG_CONFIG" != xnone
3324 # works for pkg-config since version 0.24 (2009)
3325 # works for pkgconf since version 0.8.3 (2012)
3326 for cf_pkg_program in \
3327 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3331 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3332 test -n "$cf_search_path" && break
3335 # works for pkg-config since import in 2005 of original 2001 HP code.
3336 test -z "$cf_search_path" && \
3338 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3339 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3340 sub(\"^[^']*'\",\"\"); \
3341 sub(\"'.*\",\"\"); \
3342 printf \" %s\", \\$0; } \
3347 echo "$as_me:3347: result: $cf_search_path" >&5
3348 echo "${ECHO_T}$cf_search_path" >&6
3351 { { echo "$as_me:3351: error: Unexpected option value: $cf_search_path" >&5
3352 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3353 { (exit 1); exit 1; }; }
3357 if test -n "$cf_search_path"
3359 echo "$as_me:3359: checking for first directory" >&5
3360 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3361 cf_pkg_config_path=none
3362 for cf_config in $cf_search_path
3364 if test -d "$cf_config"
3366 cf_pkg_config_path=$cf_config
3370 echo "$as_me:3370: result: $cf_pkg_config_path" >&5
3371 echo "${ECHO_T}$cf_pkg_config_path" >&6
3373 if test "x$cf_pkg_config_path" != xnone ; then
3374 # limit this to the first directory found
3375 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3378 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3380 echo "$as_me:3380: checking for workaround" >&5
3381 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3382 if test "$prefix" = "NONE" ; then
3383 cf_prefix="$ac_default_prefix"
3387 eval cf_libdir=$libdir
3388 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3390 for cf_config in $cf_search_path
3393 $cf_libdir/pkgconfig)
3394 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3398 test -z "$cf_backup" && cf_backup=$cf_config
3402 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3403 echo "$as_me:3403: result: $PKG_CONFIG_LIBDIR" >&5
3404 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3408 echo "$as_me:3408: checking if you want to build test-programs" >&5
3409 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3411 # Check whether --with-tests or --without-tests was given.
3412 if test "${with_tests+set}" = set; then
3413 withval="$with_tests"
3414 cf_with_tests=$withval
3418 echo "$as_me:3418: result: $cf_with_tests" >&5
3419 echo "${ECHO_T}$cf_with_tests" >&6
3421 echo "$as_me:3421: checking if we should assume mixed-case filenames" >&5
3422 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3424 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3425 if test "${enable_mixed_case+set}" = set; then
3426 enableval="$enable_mixed_case"
3427 enable_mixedcase=$enableval
3429 enable_mixedcase=auto
3431 echo "$as_me:3431: result: $enable_mixedcase" >&5
3432 echo "${ECHO_T}$enable_mixedcase" >&6
3433 if test "$enable_mixedcase" = "auto" ; then
3435 echo "$as_me:3435: checking if filesystem supports mixed-case filenames" >&5
3436 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3437 if test "${cf_cv_mixedcase+set}" = set; then
3438 echo $ECHO_N "(cached) $ECHO_C" >&6
3441 if test "$cross_compiling" = yes ; then
3442 case "$target_alias" in
3443 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3451 rm -f conftest CONFTEST
3453 if test -f CONFTEST ; then
3458 rm -f conftest CONFTEST
3462 echo "$as_me:3462: result: $cf_cv_mixedcase" >&5
3463 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3464 test "$cf_cv_mixedcase" = yes &&
3465 cat >>confdefs.h <<\EOF
3466 #define MIXEDCASE_FILENAMES 1
3470 cf_cv_mixedcase=$enable_mixedcase
3471 if test "$enable_mixedcase" = "yes" ; then
3472 cat >>confdefs.h <<\EOF
3473 #define MIXEDCASE_FILENAMES 1
3479 # do this after mixed-case option (tags/TAGS is not as important as tic).
3480 echo "$as_me:3480: checking whether ${MAKE-make} sets \${MAKE}" >&5
3481 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3482 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3483 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3484 echo $ECHO_N "(cached) $ECHO_C" >&6
3486 cat >conftest.make <<\EOF
3488 @echo 'ac_maketemp="${MAKE}"'
3490 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3491 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3492 if test -n "$ac_maketemp"; then
3493 eval ac_cv_prog_make_${ac_make}_set=yes
3495 eval ac_cv_prog_make_${ac_make}_set=no
3499 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3500 echo "$as_me:3500: result: yes" >&5
3501 echo "${ECHO_T}yes" >&6
3504 echo "$as_me:3504: result: no" >&5
3505 echo "${ECHO_T}no" >&6
3506 SET_MAKE="MAKE=${MAKE-make}"
3509 echo "$as_me:3509: checking for \".PHONY\" make-support" >&5
3510 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3511 if test "${cf_cv_make_PHONY+set}" = set; then
3512 echo $ECHO_N "(cached) $ECHO_C" >&6
3517 mkdir conftest || exit 1
3519 cat >makefile <<'CF_EOF'
3523 @echo "** making $@ $(DATA)"
3525 @echo "** making $@ $(DATA)"
3527 @echo "** making $@ $(DATA)"
3530 @echo "** making $@ $(DATA)"
3533 for cf_data in 1 2 3
3535 ${MAKE:-make} always DATA=$cf_data
3536 ${MAKE:-make} once DATA=$cf_data
3537 ${MAKE:-make} -t always once
3538 if test -f always ; then
3539 echo "no (case 1)" > ../conftest.tmp
3540 elif test ! -f always.out ; then
3541 echo "no (case 2)" > ../conftest.tmp
3542 elif test ! -f once.out ; then
3543 echo "no (case 3)" > ../conftest.tmp
3544 elif ! cmp -s always.out once.out ; then
3545 echo "no (case 4)" > ../conftest.tmp
3546 diff always.out once.out
3548 cf_check="`cat always.out`"
3549 if test "x$cf_check" != "x$cf_data" ; then
3550 echo "no (case 5)" > ../conftest.tmp
3552 echo yes > ../conftest.tmp
3560 cf_cv_make_PHONY="`cat conftest.tmp`"
3564 echo "$as_me:3564: result: $cf_cv_make_PHONY" >&5
3565 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3568 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3569 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3571 for ac_prog in exctags ctags
3573 # Extract the first word of "$ac_prog", so it can be a program name with args.
3574 set dummy $ac_prog; ac_word=$2
3575 echo "$as_me:3575: checking for $ac_word" >&5
3576 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3577 if test "${ac_cv_prog_CTAGS+set}" = set; then
3578 echo $ECHO_N "(cached) $ECHO_C" >&6
3580 if test -n "$CTAGS"; then
3581 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3583 ac_save_IFS=$IFS; IFS=$ac_path_separator
3585 for ac_dir in $ac_dummy; do
3587 test -z "$ac_dir" && ac_dir=.
3588 $as_executable_p "$ac_dir/$ac_word" || continue
3589 ac_cv_prog_CTAGS="$ac_prog"
3590 echo "$as_me:3590: found $ac_dir/$ac_word" >&5
3596 CTAGS=$ac_cv_prog_CTAGS
3597 if test -n "$CTAGS"; then
3598 echo "$as_me:3598: result: $CTAGS" >&5
3599 echo "${ECHO_T}$CTAGS" >&6
3601 echo "$as_me:3601: result: no" >&5
3602 echo "${ECHO_T}no" >&6
3605 test -n "$CTAGS" && break
3608 for ac_prog in exetags etags
3610 # Extract the first word of "$ac_prog", so it can be a program name with args.
3611 set dummy $ac_prog; ac_word=$2
3612 echo "$as_me:3612: checking for $ac_word" >&5
3613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3614 if test "${ac_cv_prog_ETAGS+set}" = set; then
3615 echo $ECHO_N "(cached) $ECHO_C" >&6
3617 if test -n "$ETAGS"; then
3618 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3620 ac_save_IFS=$IFS; IFS=$ac_path_separator
3622 for ac_dir in $ac_dummy; do
3624 test -z "$ac_dir" && ac_dir=.
3625 $as_executable_p "$ac_dir/$ac_word" || continue
3626 ac_cv_prog_ETAGS="$ac_prog"
3627 echo "$as_me:3627: found $ac_dir/$ac_word" >&5
3633 ETAGS=$ac_cv_prog_ETAGS
3634 if test -n "$ETAGS"; then
3635 echo "$as_me:3635: result: $ETAGS" >&5
3636 echo "${ECHO_T}$ETAGS" >&6
3638 echo "$as_me:3638: result: no" >&5
3639 echo "${ECHO_T}no" >&6
3642 test -n "$ETAGS" && break
3645 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3646 set dummy ${CTAGS:-ctags}; ac_word=$2
3647 echo "$as_me:3647: checking for $ac_word" >&5
3648 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3649 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3650 echo $ECHO_N "(cached) $ECHO_C" >&6
3652 if test -n "$MAKE_LOWER_TAGS"; then
3653 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3655 ac_save_IFS=$IFS; IFS=$ac_path_separator
3657 for ac_dir in $ac_dummy; do
3659 test -z "$ac_dir" && ac_dir=.
3660 $as_executable_p "$ac_dir/$ac_word" || continue
3661 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3662 echo "$as_me:3662: found $ac_dir/$ac_word" >&5
3666 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3669 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3670 if test -n "$MAKE_LOWER_TAGS"; then
3671 echo "$as_me:3671: result: $MAKE_LOWER_TAGS" >&5
3672 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3674 echo "$as_me:3674: result: no" >&5
3675 echo "${ECHO_T}no" >&6
3678 if test "$cf_cv_mixedcase" = yes ; then
3679 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3680 set dummy ${ETAGS:-etags}; ac_word=$2
3681 echo "$as_me:3681: checking for $ac_word" >&5
3682 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3683 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3684 echo $ECHO_N "(cached) $ECHO_C" >&6
3686 if test -n "$MAKE_UPPER_TAGS"; then
3687 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3689 ac_save_IFS=$IFS; IFS=$ac_path_separator
3691 for ac_dir in $ac_dummy; do
3693 test -z "$ac_dir" && ac_dir=.
3694 $as_executable_p "$ac_dir/$ac_word" || continue
3695 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3696 echo "$as_me:3696: found $ac_dir/$ac_word" >&5
3700 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3703 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3704 if test -n "$MAKE_UPPER_TAGS"; then
3705 echo "$as_me:3705: result: $MAKE_UPPER_TAGS" >&5
3706 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3708 echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3716 if test "$MAKE_UPPER_TAGS" = yes ; then
3722 if test "$MAKE_LOWER_TAGS" = yes ; then
3728 echo "$as_me:3728: checking for makeflags variable" >&5
3729 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3730 if test "${cf_cv_makeflags+set}" = set; then
3731 echo $ECHO_N "(cached) $ECHO_C" >&6
3735 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3737 cat >cf_makeflags.tmp <<CF_EOF
3740 @ echo '.$cf_option'
3742 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3743 case "$cf_result" in
3745 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3746 case "$cf_result" in
3747 (.*CC=*) cf_cv_makeflags=
3749 (*) cf_cv_makeflags=$cf_option
3758 echo "${as_me:-configure}:3758: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3763 rm -f cf_makeflags.tmp
3766 echo "$as_me:3766: result: $cf_cv_makeflags" >&5
3767 echo "${ECHO_T}$cf_cv_makeflags" >&6
3769 if test -n "$ac_tool_prefix"; then
3770 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3771 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3772 echo "$as_me:3772: checking for $ac_word" >&5
3773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3774 if test "${ac_cv_prog_RANLIB+set}" = set; then
3775 echo $ECHO_N "(cached) $ECHO_C" >&6
3777 if test -n "$RANLIB"; then
3778 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3780 ac_save_IFS=$IFS; IFS=$ac_path_separator
3782 for ac_dir in $ac_dummy; do
3784 test -z "$ac_dir" && ac_dir=.
3785 $as_executable_p "$ac_dir/$ac_word" || continue
3786 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3787 echo "$as_me:3787: found $ac_dir/$ac_word" >&5
3793 RANLIB=$ac_cv_prog_RANLIB
3794 if test -n "$RANLIB"; then
3795 echo "$as_me:3795: result: $RANLIB" >&5
3796 echo "${ECHO_T}$RANLIB" >&6
3798 echo "$as_me:3798: result: no" >&5
3799 echo "${ECHO_T}no" >&6
3803 if test -z "$ac_cv_prog_RANLIB"; then
3804 ac_ct_RANLIB=$RANLIB
3805 # Extract the first word of "ranlib", so it can be a program name with args.
3806 set dummy ranlib; ac_word=$2
3807 echo "$as_me:3807: checking for $ac_word" >&5
3808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3809 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3810 echo $ECHO_N "(cached) $ECHO_C" >&6
3812 if test -n "$ac_ct_RANLIB"; then
3813 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3815 ac_save_IFS=$IFS; IFS=$ac_path_separator
3817 for ac_dir in $ac_dummy; do
3819 test -z "$ac_dir" && ac_dir=.
3820 $as_executable_p "$ac_dir/$ac_word" || continue
3821 ac_cv_prog_ac_ct_RANLIB="ranlib"
3822 echo "$as_me:3822: found $ac_dir/$ac_word" >&5
3826 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3829 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3830 if test -n "$ac_ct_RANLIB"; then
3831 echo "$as_me:3831: result: $ac_ct_RANLIB" >&5
3832 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3834 echo "$as_me:3834: result: no" >&5
3835 echo "${ECHO_T}no" >&6
3838 RANLIB=$ac_ct_RANLIB
3840 RANLIB="$ac_cv_prog_RANLIB"
3843 if test -n "$ac_tool_prefix"; then
3844 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3845 set dummy ${ac_tool_prefix}ld; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_LD+set}" = set; then
3849 echo $ECHO_N "(cached) $ECHO_C" >&6
3851 if test -n "$LD"; then
3852 ac_cv_prog_LD="$LD" # Let the user override the test.
3854 ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 for ac_dir in $ac_dummy; do
3858 test -z "$ac_dir" && ac_dir=.
3859 $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_LD="${ac_tool_prefix}ld"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3868 if test -n "$LD"; then
3869 echo "$as_me:3869: result: $LD" >&5
3870 echo "${ECHO_T}$LD" >&6
3872 echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3877 if test -z "$ac_cv_prog_LD"; then
3879 # Extract the first word of "ld", so it can be a program name with args.
3880 set dummy ld; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3884 echo $ECHO_N "(cached) $ECHO_C" >&6
3886 if test -n "$ac_ct_LD"; then
3887 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3889 ac_save_IFS=$IFS; IFS=$ac_path_separator
3891 for ac_dir in $ac_dummy; do
3893 test -z "$ac_dir" && ac_dir=.
3894 $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_ac_ct_LD="ld"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3900 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3903 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3904 if test -n "$ac_ct_LD"; then
3905 echo "$as_me:3905: result: $ac_ct_LD" >&5
3906 echo "${ECHO_T}$ac_ct_LD" >&6
3908 echo "$as_me:3908: result: no" >&5
3909 echo "${ECHO_T}no" >&6
3917 if test -n "$ac_tool_prefix"; then
3918 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3919 set dummy ${ac_tool_prefix}ar; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_AR+set}" = set; then
3923 echo $ECHO_N "(cached) $ECHO_C" >&6
3925 if test -n "$AR"; then
3926 ac_cv_prog_AR="$AR" # Let the user override the test.
3928 ac_save_IFS=$IFS; IFS=$ac_path_separator
3930 for ac_dir in $ac_dummy; do
3932 test -z "$ac_dir" && ac_dir=.
3933 $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_AR="${ac_tool_prefix}ar"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3942 if test -n "$AR"; then
3943 echo "$as_me:3943: result: $AR" >&5
3944 echo "${ECHO_T}$AR" >&6
3946 echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3951 if test -z "$ac_cv_prog_AR"; then
3953 # Extract the first word of "ar", so it can be a program name with args.
3954 set dummy ar; ac_word=$2
3955 echo "$as_me:3955: checking for $ac_word" >&5
3956 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3957 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3958 echo $ECHO_N "(cached) $ECHO_C" >&6
3960 if test -n "$ac_ct_AR"; then
3961 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3963 ac_save_IFS=$IFS; IFS=$ac_path_separator
3965 for ac_dir in $ac_dummy; do
3967 test -z "$ac_dir" && ac_dir=.
3968 $as_executable_p "$ac_dir/$ac_word" || continue
3969 ac_cv_prog_ac_ct_AR="ar"
3970 echo "$as_me:3970: found $ac_dir/$ac_word" >&5
3974 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3977 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3978 if test -n "$ac_ct_AR"; then
3979 echo "$as_me:3979: result: $ac_ct_AR" >&5
3980 echo "${ECHO_T}$ac_ct_AR" >&6
3982 echo "$as_me:3982: result: no" >&5
3983 echo "${ECHO_T}no" >&6
3991 if test -n "$ac_tool_prefix"; then
3992 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3993 set dummy ${ac_tool_prefix}ar; ac_word=$2
3994 echo "$as_me:3994: checking for $ac_word" >&5
3995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3996 if test "${ac_cv_prog_AR+set}" = set; then
3997 echo $ECHO_N "(cached) $ECHO_C" >&6
3999 if test -n "$AR"; then
4000 ac_cv_prog_AR="$AR" # Let the user override the test.
4002 ac_save_IFS=$IFS; IFS=$ac_path_separator
4004 for ac_dir in $ac_dummy; do
4006 test -z "$ac_dir" && ac_dir=.
4007 $as_executable_p "$ac_dir/$ac_word" || continue
4008 ac_cv_prog_AR="${ac_tool_prefix}ar"
4009 echo "$as_me:4009: found $ac_dir/$ac_word" >&5
4016 if test -n "$AR"; then
4017 echo "$as_me:4017: result: $AR" >&5
4018 echo "${ECHO_T}$AR" >&6
4020 echo "$as_me:4020: result: no" >&5
4021 echo "${ECHO_T}no" >&6
4025 if test -z "$ac_cv_prog_AR"; then
4027 # Extract the first word of "ar", so it can be a program name with args.
4028 set dummy ar; ac_word=$2
4029 echo "$as_me:4029: checking for $ac_word" >&5
4030 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4031 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4032 echo $ECHO_N "(cached) $ECHO_C" >&6
4034 if test -n "$ac_ct_AR"; then
4035 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4037 ac_save_IFS=$IFS; IFS=$ac_path_separator
4039 for ac_dir in $ac_dummy; do
4041 test -z "$ac_dir" && ac_dir=.
4042 $as_executable_p "$ac_dir/$ac_word" || continue
4043 ac_cv_prog_ac_ct_AR="ar"
4044 echo "$as_me:4044: found $ac_dir/$ac_word" >&5
4048 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4051 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4052 if test -n "$ac_ct_AR"; then
4053 echo "$as_me:4053: result: $ac_ct_AR" >&5
4054 echo "${ECHO_T}$ac_ct_AR" >&6
4056 echo "$as_me:4056: result: no" >&5
4057 echo "${ECHO_T}no" >&6
4065 echo "$as_me:4065: checking for options to update archives" >&5
4066 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4067 if test "${cf_cv_ar_flags+set}" = set; then
4068 echo $ECHO_N "(cached) $ECHO_C" >&6
4071 case "$cf_cv_system_name" in
4074 cat >mk_static_lib.sh <<-EOF
4079 exec \$MSVC_BIN -out:"\$out" \$@
4081 chmod +x mk_static_lib.sh
4082 AR=`pwd`/mk_static_lib.sh
4085 cf_cv_ar_flags=unknown
4086 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4089 # check if $ARFLAGS already contains this choice
4090 if test "x$ARFLAGS" != "x" ; then
4091 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4092 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4098 rm -f "conftest.$ac_cv_objext"
4101 cat >"conftest.$ac_ext" <<EOF
4102 #line 4102 "configure"
4103 int testdata[3] = { 123, 456, 789 };
4105 if { (eval echo "$as_me:4105: \"$ac_compile\"") >&5
4106 (eval $ac_compile) 2>&5
4108 echo "$as_me:4108: \$? = $ac_status" >&5
4109 (exit "$ac_status"); } ; then
4110 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4111 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4112 if test -f conftest.a ; then
4113 cf_cv_ar_flags="$cf_ar_flags"
4117 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4119 echo "${as_me:-configure}:4119: testing cannot compile test-program ..." 1>&5
4124 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4129 echo "$as_me:4129: result: $cf_cv_ar_flags" >&5
4130 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4132 if test -n "$ARFLAGS" ; then
4133 if test -n "$cf_cv_ar_flags" ; then
4134 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4137 ARFLAGS=$cf_cv_ar_flags
4140 echo "$as_me:4140: checking for PATH separator" >&5
4141 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4142 case "$cf_cv_system_name" in
4143 (os2*) PATH_SEPARATOR=';' ;;
4144 (*) ${PATH_SEPARATOR:=':'} ;;
4147 echo "$as_me:4147: result: $PATH_SEPARATOR" >&5
4148 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4150 echo "$as_me:4150: checking if you have specified an install-prefix" >&5
4151 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4153 # Check whether --with-install-prefix or --without-install-prefix was given.
4154 if test "${with_install_prefix+set}" = set; then
4155 withval="$with_install_prefix"
4159 (*) DESTDIR="$withval"
4163 echo "$as_me:4163: result: $DESTDIR" >&5
4164 echo "${ECHO_T}$DESTDIR" >&6
4166 ###############################################################################
4168 # If we're cross-compiling, allow the user to override the tools and their
4169 # options. The configure script is oriented toward identifying the host
4170 # compiler, etc., but we need a build compiler to generate parts of the source.
4172 if test "$cross_compiling" = yes ; then
4174 # defaults that we might want to override
4175 : ${BUILD_CFLAGS:=''}
4176 : ${BUILD_CPPFLAGS:=''}
4177 : ${BUILD_LDFLAGS:=''}
4179 : ${BUILD_EXEEXT:='$x'}
4180 : ${BUILD_OBJEXT:='o'}
4182 # Check whether --with-build-cc or --without-build-cc was given.
4183 if test "${with_build_cc+set}" = set; then
4184 withval="$with_build_cc"
4187 for ac_prog in gcc clang c99 c89 cc cl
4189 # Extract the first word of "$ac_prog", so it can be a program name with args.
4190 set dummy $ac_prog; ac_word=$2
4191 echo "$as_me:4191: checking for $ac_word" >&5
4192 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4193 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4194 echo $ECHO_N "(cached) $ECHO_C" >&6
4196 if test -n "$BUILD_CC"; then
4197 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4199 ac_save_IFS=$IFS; IFS=$ac_path_separator
4201 for ac_dir in $ac_dummy; do
4203 test -z "$ac_dir" && ac_dir=.
4204 $as_executable_p "$ac_dir/$ac_word" || continue
4205 ac_cv_prog_BUILD_CC="$ac_prog"
4206 echo "$as_me:4206: found $ac_dir/$ac_word" >&5
4212 BUILD_CC=$ac_cv_prog_BUILD_CC
4213 if test -n "$BUILD_CC"; then
4214 echo "$as_me:4214: result: $BUILD_CC" >&5
4215 echo "${ECHO_T}$BUILD_CC" >&6
4217 echo "$as_me:4217: result: no" >&5
4218 echo "${ECHO_T}no" >&6
4221 test -n "$BUILD_CC" && break
4223 test -n "$BUILD_CC" || BUILD_CC="none"
4226 echo "$as_me:4226: checking for native build C compiler" >&5
4227 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4228 echo "$as_me:4228: result: $BUILD_CC" >&5
4229 echo "${ECHO_T}$BUILD_CC" >&6
4231 echo "$as_me:4231: checking for native build C preprocessor" >&5
4232 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4234 # Check whether --with-build-cpp or --without-build-cpp was given.
4235 if test "${with_build_cpp+set}" = set; then
4236 withval="$with_build_cpp"
4237 BUILD_CPP="$withval"
4239 BUILD_CPP='${BUILD_CC} -E'
4241 echo "$as_me:4241: result: $BUILD_CPP" >&5
4242 echo "${ECHO_T}$BUILD_CPP" >&6
4244 echo "$as_me:4244: checking for native build C flags" >&5
4245 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4247 # Check whether --with-build-cflags or --without-build-cflags was given.
4248 if test "${with_build_cflags+set}" = set; then
4249 withval="$with_build_cflags"
4250 BUILD_CFLAGS="$withval"
4252 echo "$as_me:4252: result: $BUILD_CFLAGS" >&5
4253 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4255 echo "$as_me:4255: checking for native build C preprocessor-flags" >&5
4256 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4258 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4259 if test "${with_build_cppflags+set}" = set; then
4260 withval="$with_build_cppflags"
4261 BUILD_CPPFLAGS="$withval"
4263 echo "$as_me:4263: result: $BUILD_CPPFLAGS" >&5
4264 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4266 echo "$as_me:4266: checking for native build linker-flags" >&5
4267 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4269 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4270 if test "${with_build_ldflags+set}" = set; then
4271 withval="$with_build_ldflags"
4272 BUILD_LDFLAGS="$withval"
4274 echo "$as_me:4274: result: $BUILD_LDFLAGS" >&5
4275 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4277 echo "$as_me:4277: checking for native build linker-libraries" >&5
4278 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4280 # Check whether --with-build-libs or --without-build-libs was given.
4281 if test "${with_build_libs+set}" = set; then
4282 withval="$with_build_libs"
4283 BUILD_LIBS="$withval"
4285 echo "$as_me:4285: result: $BUILD_LIBS" >&5
4286 echo "${ECHO_T}$BUILD_LIBS" >&6
4288 # this assumes we're on Unix.
4292 : ${BUILD_CC:='${CC}'}
4294 echo "$as_me:4294: checking if the build-compiler \"$BUILD_CC\" works" >&5
4295 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4297 cf_save_crossed=$cross_compiling
4298 cf_save_ac_link=$ac_link
4300 cf_build_cppflags=$BUILD_CPPFLAGS
4301 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
4302 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4304 if test "$cross_compiling" = yes; then
4305 cf_ok_build_cc=unknown
4307 cat >"conftest.$ac_ext" <<_ACEOF
4308 #line 4308 "configure"
4309 #include "confdefs.h"
4311 int main(int argc, char *argv[])
4313 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4317 rm -f "conftest$ac_exeext"
4318 if { (eval echo "$as_me:4318: \"$ac_link\"") >&5
4319 (eval $ac_link) 2>&5
4321 echo "$as_me:4321: \$? = $ac_status" >&5
4322 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4323 { (eval echo "$as_me:4323: \"$ac_try\"") >&5
4326 echo "$as_me:4326: \$? = $ac_status" >&5
4327 (exit "$ac_status"); }; }; then
4330 echo "$as_me: program exited with status $ac_status" >&5
4331 echo "$as_me: failed program was:" >&5
4332 cat "conftest.$ac_ext" >&5
4335 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4338 cross_compiling=$cf_save_crossed
4339 ac_link=$cf_save_ac_link
4341 echo "$as_me:4341: result: $cf_ok_build_cc" >&5
4342 echo "${ECHO_T}$cf_ok_build_cc" >&6
4344 if test "$cf_ok_build_cc" != yes
4346 { { echo "$as_me:4346: error: Cross-build requires two compilers.
4347 Use --with-build-cc to specify the native compiler." >&5
4348 echo "$as_me: error: Cross-build requires two compilers.
4349 Use --with-build-cc to specify the native compiler." >&2;}
4350 { (exit 1); exit 1; }; }
4354 : ${BUILD_CC:='${CC}'}
4355 : ${BUILD_CPP:='${CPP}'}
4356 : ${BUILD_CFLAGS:='${CFLAGS}'}
4357 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4358 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4359 : ${BUILD_LIBS:='${LIBS}'}
4360 : ${BUILD_EXEEXT:='$x'}
4361 : ${BUILD_OBJEXT:='o'}
4364 ###############################################################################
4366 ### Options to allow the user to specify the set of libraries which are used.
4367 ### Use "--without-normal --with-shared" to allow the default model to be
4368 ### shared, for example.
4371 echo "$as_me:4371: checking if you want to build shared C-objects" >&5
4372 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4374 # Check whether --with-shared or --without-shared was given.
4375 if test "${with_shared+set}" = set; then
4376 withval="$with_shared"
4377 with_shared=$withval
4381 echo "$as_me:4381: result: $with_shared" >&5
4382 echo "${ECHO_T}$with_shared" >&6
4383 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4385 echo "$as_me:4385: checking for specified models" >&5
4386 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4387 test -z "$cf_list_models" && cf_list_models=normal
4388 echo "$as_me:4388: result: $cf_list_models" >&5
4389 echo "${ECHO_T}$cf_list_models" >&6
4391 ### Use the first model as the default, and save its suffix for use in building
4392 ### up test-applications.
4393 echo "$as_me:4393: checking for default model" >&5
4394 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4395 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4396 echo "$as_me:4396: result: $DFT_LWR_MODEL" >&5
4397 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4399 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4401 echo "$as_me:4401: checking for specific curses-directory" >&5
4402 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4404 # Check whether --with-curses-dir or --without-curses-dir was given.
4405 if test "${with_curses_dir+set}" = set; then
4406 withval="$with_curses_dir"
4407 cf_cv_curses_dir=$withval
4411 echo "$as_me:4411: result: $cf_cv_curses_dir" >&5
4412 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4414 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4417 if test "x$prefix" != xNONE; then
4418 cf_path_syntax="$prefix"
4420 cf_path_syntax="$ac_default_prefix"
4428 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4430 (.\$\{*prefix\}*|.\$\{*dir\}*)
4431 eval withval="$withval"
4434 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4439 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4442 { { echo "$as_me:4442: error: expected a pathname, not \"$withval\"" >&5
4443 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4444 { (exit 1); exit 1; }; }
4448 if test -d "$cf_cv_curses_dir"
4451 if test -n "$cf_cv_curses_dir/include" ; then
4452 for cf_add_incdir in $cf_cv_curses_dir/include
4454 while test "$cf_add_incdir" != /usr/include
4456 if test -d "$cf_add_incdir"
4459 if test -n "$CFLAGS$CPPFLAGS" ; then
4460 # a loop is needed to ensure we can add subdirs of existing dirs
4461 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4462 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4463 cf_have_incdir=yes; break
4468 if test "$cf_have_incdir" = no ; then
4469 if test "$cf_add_incdir" = /usr/local/include ; then
4470 if test "$GCC" = yes
4472 cf_save_CPPFLAGS=$CPPFLAGS
4474 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4475 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4477 cat >"conftest.$ac_ext" <<_ACEOF
4478 #line 4478 "configure"
4479 #include "confdefs.h"
4489 rm -f "conftest.$ac_objext"
4490 if { (eval echo "$as_me:4490: \"$ac_compile\"") >&5
4491 (eval $ac_compile) 2>&5
4493 echo "$as_me:4493: \$? = $ac_status" >&5
4494 (exit "$ac_status"); } &&
4495 { ac_try='test -s "conftest.$ac_objext"'
4496 { (eval echo "$as_me:4496: \"$ac_try\"") >&5
4499 echo "$as_me:4499: \$? = $ac_status" >&5
4500 (exit "$ac_status"); }; }; then
4503 echo "$as_me: failed program was:" >&5
4504 cat "conftest.$ac_ext" >&5
4507 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4508 CPPFLAGS=$cf_save_CPPFLAGS
4513 if test "$cf_have_incdir" = no ; then
4514 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4516 echo "${as_me:-configure}:4516: testing adding $cf_add_incdir to include-path ..." 1>&5
4518 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4520 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4521 test "$cf_top_incdir" = "$cf_add_incdir" && break
4522 cf_add_incdir="$cf_top_incdir"
4533 if test -n "$cf_cv_curses_dir/lib" ; then
4534 for cf_add_libdir in $cf_cv_curses_dir/lib
4536 if test "$cf_add_libdir" = /usr/lib ; then
4538 elif test -d "$cf_add_libdir"
4541 if test -n "$LDFLAGS$LIBS" ; then
4542 # a loop is needed to ensure we can add subdirs of existing dirs
4543 for cf_test_libdir in $LDFLAGS $LIBS ; do
4544 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4545 cf_have_libdir=yes; break
4549 if test "$cf_have_libdir" = no ; then
4550 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4552 echo "${as_me:-configure}:4552: testing adding $cf_add_libdir to library-path ..." 1>&5
4554 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4563 cf_ncuconfig_root=ncurses
4564 cf_have_ncuconfig=no
4566 if test "x${PKG_CONFIG:=none}" != xnone; then
4567 echo "$as_me:4567: checking pkg-config for $cf_ncuconfig_root" >&5
4568 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4569 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4570 echo "$as_me:4570: result: yes" >&5
4571 echo "${ECHO_T}yes" >&6
4573 echo "$as_me:4573: checking if the $cf_ncuconfig_root package files work" >&5
4574 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4575 cf_have_ncuconfig=unknown
4577 cf_save_CFLAGS="$CFLAGS"
4578 cf_save_CPPFLAGS="$CPPFLAGS"
4579 cf_save_LIBS="$LIBS"
4581 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4582 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4584 # while -W for passing linker flags is prevalent, it is not "standard".
4585 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4586 # incompatible _and_ non-standard -W option which gives an error. Work
4587 # around that pitfall.
4588 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4594 cf_new_extra_cppflags=
4596 for cf_add_cflags in $cf_pkg_cflags
4598 case "$cf_fix_cppflags" in
4600 case "$cf_add_cflags" in
4601 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4602 case "$cf_add_cflags" in
4604 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4606 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4607 && test -z "${cf_tst_cflags}" \
4608 && cf_fix_cppflags=yes
4610 if test "$cf_fix_cppflags" = yes ; then
4612 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4613 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4616 elif test "${cf_tst_cflags}" = "\"'" ; then
4618 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4619 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4629 case "$cf_add_cflags" in
4631 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4633 CPPFLAGS=`echo "$CPPFLAGS" | \
4634 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4635 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4640 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4641 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4648 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4649 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4656 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4657 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4659 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4661 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4662 && test -z "${cf_tst_cflags}" \
4663 && cf_fix_cppflags=no
4668 if test -n "$cf_new_cflags" ; then
4670 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4671 CFLAGS="${CFLAGS}$cf_new_cflags"
4675 if test -n "$cf_new_cppflags" ; then
4677 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4678 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4682 if test -n "$cf_new_extra_cppflags" ; then
4684 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4685 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4692 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4694 for cf_add_1lib in $cf_add_0lib; do
4695 for cf_add_2lib in $cf_add_libs; do
4696 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4701 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4705 cat >"conftest.$ac_ext" <<_ACEOF
4706 #line 4706 "configure"
4707 #include "confdefs.h"
4708 #include <${cf_cv_ncurses_header:-curses.h}>
4712 initscr(); mousemask(0,0); tigetstr((char *)0);
4717 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4718 if { (eval echo "$as_me:4718: \"$ac_link\"") >&5
4719 (eval $ac_link) 2>&5
4721 echo "$as_me:4721: \$? = $ac_status" >&5
4722 (exit "$ac_status"); } &&
4723 { ac_try='test -s "conftest$ac_exeext"'
4724 { (eval echo "$as_me:4724: \"$ac_try\"") >&5
4727 echo "$as_me:4727: \$? = $ac_status" >&5
4728 (exit "$ac_status"); }; }; then
4729 if test "$cross_compiling" = yes; then
4730 cf_test_ncuconfig=maybe
4732 cat >"conftest.$ac_ext" <<_ACEOF
4733 #line 4733 "configure"
4734 #include "confdefs.h"
4735 #include <${cf_cv_ncurses_header:-curses.h}>
4737 { const char *xx = curses_version(); return (xx == 0); }
4739 rm -f "conftest$ac_exeext"
4740 if { (eval echo "$as_me:4740: \"$ac_link\"") >&5
4741 (eval $ac_link) 2>&5
4743 echo "$as_me:4743: \$? = $ac_status" >&5
4744 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4745 { (eval echo "$as_me:4745: \"$ac_try\"") >&5
4748 echo "$as_me:4748: \$? = $ac_status" >&5
4749 (exit "$ac_status"); }; }; then
4750 cf_test_ncuconfig=yes
4752 echo "$as_me: program exited with status $ac_status" >&5
4753 echo "$as_me: failed program was:" >&5
4754 cat "conftest.$ac_ext" >&5
4755 cf_test_ncuconfig=no
4757 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4760 echo "$as_me: failed program was:" >&5
4761 cat "conftest.$ac_ext" >&5
4762 cf_test_ncuconfig=no
4764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4766 CFLAGS="$cf_save_CFLAGS"
4767 CPPFLAGS="$cf_save_CPPFLAGS"
4768 LIBS="$cf_save_LIBS"
4770 if test "x$cf_test_ncuconfig" != xyes; then
4771 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4772 cf_pkg_cflags="$cf_temp"
4773 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4774 cf_pkg_libs="$cf_temp"
4779 for cf_add_cflags in $cf_pkg_cflags
4781 case "x$cf_add_cflags" in
4784 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4787 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'`
4788 test "$CFLAGS" != "$cf_old_cflag" || break
4790 CFLAGS="$cf_old_cflag"
4793 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4796 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'`
4797 test "$CPPFLAGS" != "$cf_old_cflag" || break
4799 CPPFLAGS="$cf_old_cflag"
4808 cf_new_extra_cppflags=
4810 for cf_add_cflags in $cf_add_cflags
4812 case "$cf_fix_cppflags" in
4814 case "$cf_add_cflags" in
4815 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4816 case "$cf_add_cflags" in
4818 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4820 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4821 && test -z "${cf_tst_cflags}" \
4822 && cf_fix_cppflags=yes
4824 if test "$cf_fix_cppflags" = yes ; then
4826 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4827 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4830 elif test "${cf_tst_cflags}" = "\"'" ; then
4832 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4833 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4843 case "$cf_add_cflags" in
4845 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4847 CPPFLAGS=`echo "$CPPFLAGS" | \
4848 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4849 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4854 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4855 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4862 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4863 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4870 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4871 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4873 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4875 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4876 && test -z "${cf_tst_cflags}" \
4877 && cf_fix_cppflags=no
4882 if test -n "$cf_new_cflags" ; then
4884 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4885 CFLAGS="${CFLAGS}$cf_new_cflags"
4889 if test -n "$cf_new_cppflags" ; then
4891 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4892 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4896 if test -n "$cf_new_extra_cppflags" ; then
4898 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4899 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4908 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4910 for cf_add_1lib in $cf_add_0lib; do
4911 for cf_add_2lib in $cf_add_libs; do
4912 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4917 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4921 cat >"conftest.$ac_ext" <<_ACEOF
4922 #line 4922 "configure"
4923 #include "confdefs.h"
4924 #include <${cf_cv_ncurses_header:-curses.h}>
4928 initscr(); mousemask(0,0); tigetstr((char *)0);
4933 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4934 if { (eval echo "$as_me:4934: \"$ac_link\"") >&5
4935 (eval $ac_link) 2>&5
4937 echo "$as_me:4937: \$? = $ac_status" >&5
4938 (exit "$ac_status"); } &&
4939 { ac_try='test -s "conftest$ac_exeext"'
4940 { (eval echo "$as_me:4940: \"$ac_try\"") >&5
4943 echo "$as_me:4943: \$? = $ac_status" >&5
4944 (exit "$ac_status"); }; }; then
4945 if test "$cross_compiling" = yes; then
4946 cf_have_ncuconfig=maybe
4948 cat >"conftest.$ac_ext" <<_ACEOF
4949 #line 4949 "configure"
4950 #include "confdefs.h"
4951 #include <${cf_cv_ncurses_header:-curses.h}>
4953 { const char *xx = curses_version(); return (xx == 0); }
4955 rm -f "conftest$ac_exeext"
4956 if { (eval echo "$as_me:4956: \"$ac_link\"") >&5
4957 (eval $ac_link) 2>&5
4959 echo "$as_me:4959: \$? = $ac_status" >&5
4960 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4961 { (eval echo "$as_me:4961: \"$ac_try\"") >&5
4964 echo "$as_me:4964: \$? = $ac_status" >&5
4965 (exit "$ac_status"); }; }; then
4966 cf_have_ncuconfig=yes
4968 echo "$as_me: program exited with status $ac_status" >&5
4969 echo "$as_me: failed program was:" >&5
4970 cat "conftest.$ac_ext" >&5
4971 cf_have_ncuconfig=no
4973 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4976 echo "$as_me: failed program was:" >&5
4977 cat "conftest.$ac_ext" >&5
4978 cf_have_ncuconfig=no
4980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4981 echo "$as_me:4981: result: $cf_have_ncuconfig" >&5
4982 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4983 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4984 if test "$cf_have_ncuconfig" != "yes"
4986 CPPFLAGS="$cf_save_CPPFLAGS"
4987 LIBS="$cf_save_LIBS"
4988 NCURSES_CONFIG_PKG=none
4991 cat >>confdefs.h <<\EOF
4995 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4997 echo "$as_me:4997: checking for terminfo header" >&5
4998 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4999 if test "${cf_cv_term_header+set}" = set; then
5000 echo $ECHO_N "(cached) $ECHO_C" >&6
5003 case "${cf_cv_ncurses_header}" in
5004 (*/ncurses.h|*/ncursesw.h)
5005 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5008 cf_term_header=term.h
5012 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5014 cat >"conftest.$ac_ext" <<_ACEOF
5015 #line 5015 "configure"
5016 #include "confdefs.h"
5018 #include <${cf_cv_ncurses_header:-curses.h}>
5024 int x = auto_left_margin; (void)x
5029 rm -f "conftest.$ac_objext"
5030 if { (eval echo "$as_me:5030: \"$ac_compile\"") >&5
5031 (eval $ac_compile) 2>&5
5033 echo "$as_me:5033: \$? = $ac_status" >&5
5034 (exit "$ac_status"); } &&
5035 { ac_try='test -s "conftest.$ac_objext"'
5036 { (eval echo "$as_me:5036: \"$ac_try\"") >&5
5039 echo "$as_me:5039: \$? = $ac_status" >&5
5040 (exit "$ac_status"); }; }; then
5042 cf_cv_term_header="$cf_test"
5044 echo "$as_me: failed program was:" >&5
5045 cat "conftest.$ac_ext" >&5
5047 cf_cv_term_header=unknown
5050 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5051 test "$cf_cv_term_header" != unknown && break
5055 echo "$as_me:5055: result: $cf_cv_term_header" >&5
5056 echo "${ECHO_T}$cf_cv_term_header" >&6
5058 # Set definitions to allow ifdef'ing to accommodate subdirectories
5060 case "$cf_cv_term_header" in
5063 cat >>confdefs.h <<\EOF
5064 #define HAVE_TERM_H 1
5070 case "$cf_cv_term_header" in
5073 cat >>confdefs.h <<\EOF
5074 #define HAVE_NCURSES_TERM_H 1
5080 cat >>confdefs.h <<\EOF
5081 #define HAVE_NCURSESW_TERM_H 1
5090 echo "$as_me:5090: result: no" >&5
5091 echo "${ECHO_T}no" >&6
5092 NCURSES_CONFIG_PKG=none
5095 NCURSES_CONFIG_PKG=none
5098 if test "x$cf_have_ncuconfig" = "xno"; then
5099 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5101 if test -n "$ac_tool_prefix"; then
5102 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5104 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5105 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5106 echo "$as_me:5106: checking for $ac_word" >&5
5107 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5108 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5109 echo $ECHO_N "(cached) $ECHO_C" >&6
5111 if test -n "$NCURSES_CONFIG"; then
5112 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5114 ac_save_IFS=$IFS; IFS=$ac_path_separator
5116 for ac_dir in $ac_dummy; do
5118 test -z "$ac_dir" && ac_dir=.
5119 $as_executable_p "$ac_dir/$ac_word" || continue
5120 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5121 echo "$as_me:5121: found $ac_dir/$ac_word" >&5
5127 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5128 if test -n "$NCURSES_CONFIG"; then
5129 echo "$as_me:5129: result: $NCURSES_CONFIG" >&5
5130 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5132 echo "$as_me:5132: result: no" >&5
5133 echo "${ECHO_T}no" >&6
5136 test -n "$NCURSES_CONFIG" && break
5139 if test -z "$NCURSES_CONFIG"; then
5140 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5141 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5143 # Extract the first word of "$ac_prog", so it can be a program name with args.
5144 set dummy $ac_prog; ac_word=$2
5145 echo "$as_me:5145: checking for $ac_word" >&5
5146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5147 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5148 echo $ECHO_N "(cached) $ECHO_C" >&6
5150 if test -n "$ac_ct_NCURSES_CONFIG"; then
5151 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5153 ac_save_IFS=$IFS; IFS=$ac_path_separator
5155 for ac_dir in $ac_dummy; do
5157 test -z "$ac_dir" && ac_dir=.
5158 $as_executable_p "$ac_dir/$ac_word" || continue
5159 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5160 echo "$as_me:5160: found $ac_dir/$ac_word" >&5
5166 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5167 if test -n "$ac_ct_NCURSES_CONFIG"; then
5168 echo "$as_me:5168: result: $ac_ct_NCURSES_CONFIG" >&5
5169 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5171 echo "$as_me:5171: result: no" >&5
5172 echo "${ECHO_T}no" >&6
5175 test -n "$ac_ct_NCURSES_CONFIG" && break
5177 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5179 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5182 if test "$NCURSES_CONFIG" != none ; then
5184 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5186 case "x$cf_add_cflags" in
5189 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5192 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'`
5193 test "$CFLAGS" != "$cf_old_cflag" || break
5195 CFLAGS="$cf_old_cflag"
5198 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5201 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'`
5202 test "$CPPFLAGS" != "$cf_old_cflag" || break
5204 CPPFLAGS="$cf_old_cflag"
5213 cf_new_extra_cppflags=
5215 for cf_add_cflags in $cf_add_cflags
5217 case "$cf_fix_cppflags" in
5219 case "$cf_add_cflags" in
5220 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5221 case "$cf_add_cflags" in
5223 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5225 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5226 && test -z "${cf_tst_cflags}" \
5227 && cf_fix_cppflags=yes
5229 if test "$cf_fix_cppflags" = yes ; then
5231 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5232 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5235 elif test "${cf_tst_cflags}" = "\"'" ; then
5237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5248 case "$cf_add_cflags" in
5250 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5252 CPPFLAGS=`echo "$CPPFLAGS" | \
5253 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5254 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5259 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5260 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5267 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5268 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5275 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5276 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5278 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5280 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5281 && test -z "${cf_tst_cflags}" \
5282 && cf_fix_cppflags=no
5287 if test -n "$cf_new_cflags" ; then
5289 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5290 CFLAGS="${CFLAGS}$cf_new_cflags"
5294 if test -n "$cf_new_cppflags" ; then
5296 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5297 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5301 if test -n "$cf_new_extra_cppflags" ; then
5303 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5304 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5313 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5315 for cf_add_1lib in $cf_add_0lib; do
5316 for cf_add_2lib in $cf_add_libs; do
5317 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5322 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5326 # even with config script, some packages use no-override for curses.h
5328 echo "$as_me:5328: checking if we have identified curses headers" >&5
5329 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5330 if test "${cf_cv_ncurses_header+set}" = set; then
5331 echo $ECHO_N "(cached) $ECHO_C" >&6
5334 cf_cv_ncurses_header=none
5336 ncurses.h ncurses/ncurses.h \
5337 curses.h ncurses/curses.h
5339 cat >"conftest.$ac_ext" <<_ACEOF
5340 #line 5340 "configure"
5341 #include "confdefs.h"
5342 #include <${cf_header}>
5351 rm -f "conftest.$ac_objext"
5352 if { (eval echo "$as_me:5352: \"$ac_compile\"") >&5
5353 (eval $ac_compile) 2>&5
5355 echo "$as_me:5355: \$? = $ac_status" >&5
5356 (exit "$ac_status"); } &&
5357 { ac_try='test -s "conftest.$ac_objext"'
5358 { (eval echo "$as_me:5358: \"$ac_try\"") >&5
5361 echo "$as_me:5361: \$? = $ac_status" >&5
5362 (exit "$ac_status"); }; }; then
5363 cf_cv_ncurses_header=$cf_header; break
5365 echo "$as_me: failed program was:" >&5
5366 cat "conftest.$ac_ext" >&5
5368 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5372 echo "$as_me:5372: result: $cf_cv_ncurses_header" >&5
5373 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5375 if test "$cf_cv_ncurses_header" = none ; then
5376 { { echo "$as_me:5376: error: No curses header-files found" >&5
5377 echo "$as_me: error: No curses header-files found" >&2;}
5378 { (exit 1); exit 1; }; }
5381 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5383 for ac_header in $cf_cv_ncurses_header
5385 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5386 echo "$as_me:5386: checking for $ac_header" >&5
5387 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5388 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5389 echo $ECHO_N "(cached) $ECHO_C" >&6
5391 cat >"conftest.$ac_ext" <<_ACEOF
5392 #line 5392 "configure"
5393 #include "confdefs.h"
5394 #include <$ac_header>
5396 if { (eval echo "$as_me:5396: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5397 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5399 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5401 cat conftest.err >&5
5402 echo "$as_me:5402: \$? = $ac_status" >&5
5403 (exit "$ac_status"); } >/dev/null; then
5404 if test -s conftest.err; then
5405 ac_cpp_err=$ac_c_preproc_warn_flag
5412 if test -z "$ac_cpp_err"; then
5413 eval "$as_ac_Header=yes"
5415 echo "$as_me: failed program was:" >&5
5416 cat "conftest.$ac_ext" >&5
5417 eval "$as_ac_Header=no"
5419 rm -f conftest.err "conftest.$ac_ext"
5421 echo "$as_me:5421: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5422 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5423 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5424 cat >>confdefs.h <<EOF
5425 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5431 cat >>confdefs.h <<\EOF
5435 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5437 cat >>confdefs.h <<EOF
5438 #define $cf_nculib_ROOT 1
5441 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5445 cf_ncuhdr_root=ncurses
5447 test -n "$cf_cv_curses_dir" && \
5448 test "$cf_cv_curses_dir" != "no" && { \
5450 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5451 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5453 while test "$cf_add_incdir" != /usr/include
5455 if test -d "$cf_add_incdir"
5458 if test -n "$CFLAGS$CPPFLAGS" ; then
5459 # a loop is needed to ensure we can add subdirs of existing dirs
5460 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5461 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5462 cf_have_incdir=yes; break
5467 if test "$cf_have_incdir" = no ; then
5468 if test "$cf_add_incdir" = /usr/local/include ; then
5469 if test "$GCC" = yes
5471 cf_save_CPPFLAGS=$CPPFLAGS
5473 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5474 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5476 cat >"conftest.$ac_ext" <<_ACEOF
5477 #line 5477 "configure"
5478 #include "confdefs.h"
5488 rm -f "conftest.$ac_objext"
5489 if { (eval echo "$as_me:5489: \"$ac_compile\"") >&5
5490 (eval $ac_compile) 2>&5
5492 echo "$as_me:5492: \$? = $ac_status" >&5
5493 (exit "$ac_status"); } &&
5494 { ac_try='test -s "conftest.$ac_objext"'
5495 { (eval echo "$as_me:5495: \"$ac_try\"") >&5
5498 echo "$as_me:5498: \$? = $ac_status" >&5
5499 (exit "$ac_status"); }; }; then
5502 echo "$as_me: failed program was:" >&5
5503 cat "conftest.$ac_ext" >&5
5506 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5507 CPPFLAGS=$cf_save_CPPFLAGS
5512 if test "$cf_have_incdir" = no ; then
5513 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5515 echo "${as_me:-configure}:5515: testing adding $cf_add_incdir to include-path ..." 1>&5
5517 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5519 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5520 test "$cf_top_incdir" = "$cf_add_incdir" && break
5521 cf_add_incdir="$cf_top_incdir"
5534 echo "$as_me:5534: checking for $cf_ncuhdr_root header in include-path" >&5
5535 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5536 if test "${cf_cv_ncurses_h+set}" = set; then
5537 echo $ECHO_N "(cached) $ECHO_C" >&6
5540 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5541 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5542 for cf_header in $cf_header_list
5545 cat >"conftest.$ac_ext" <<_ACEOF
5546 #line 5546 "configure"
5547 #include "confdefs.h"
5549 #include <$cf_header>
5554 #ifdef NCURSES_VERSION
5556 printf("%s\\n", NCURSES_VERSION);
5569 rm -f "conftest.$ac_objext"
5570 if { (eval echo "$as_me:5570: \"$ac_compile\"") >&5
5571 (eval $ac_compile) 2>&5
5573 echo "$as_me:5573: \$? = $ac_status" >&5
5574 (exit "$ac_status"); } &&
5575 { ac_try='test -s "conftest.$ac_objext"'
5576 { (eval echo "$as_me:5576: \"$ac_try\"") >&5
5579 echo "$as_me:5579: \$? = $ac_status" >&5
5580 (exit "$ac_status"); }; }; then
5581 cf_cv_ncurses_h=$cf_header
5584 echo "$as_me: failed program was:" >&5
5585 cat "conftest.$ac_ext" >&5
5588 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5590 test "$cf_cv_ncurses_h" != no && break
5594 echo "$as_me:5594: result: $cf_cv_ncurses_h" >&5
5595 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5597 if test "$cf_cv_ncurses_h" != no ; then
5598 cf_cv_ncurses_header=$cf_cv_ncurses_h
5601 echo "$as_me:5601: checking for $cf_ncuhdr_root include-path" >&5
5602 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5603 if test "${cf_cv_ncurses_h2+set}" = set; then
5604 echo $ECHO_N "(cached) $ECHO_C" >&6
5607 test -n "$verbose" && echo
5611 # collect the current set of include-directories from compiler flags
5612 cf_header_path_list=""
5613 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5614 for cf_header_path in $CPPFLAGS $CFLAGS
5616 case "$cf_header_path" in
5618 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5620 test "x$cf_header_path" != "xNONE" && \
5621 test -d "$cf_header_path" && \
5623 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5624 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5625 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5626 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5627 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5628 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"
5631 cf_header_path_list="$cf_header_path_list $cf_search"
5637 # add the variations for the package we are looking for
5641 test "x$prefix" != "xNONE" && \
5642 test -d "$prefix" && \
5644 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5645 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5646 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5647 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5648 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5649 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5652 for cf_subdir_prefix in \
5661 test "x$cf_subdir_prefix" != "x$prefix" && \
5662 test -d "$cf_subdir_prefix" && \
5663 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5664 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5665 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5666 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5667 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5668 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5669 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"
5674 test "$includedir" != NONE && \
5675 test "$includedir" != "/usr/include" && \
5676 test -d "$includedir" && {
5677 test -d "$includedir" && cf_search="$cf_search $includedir"
5678 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5681 test "$oldincludedir" != NONE && \
5682 test "$oldincludedir" != "/usr/include" && \
5683 test -d "$oldincludedir" && {
5684 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5685 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5688 cf_search="$cf_search $cf_header_path_list"
5690 test -n "$verbose" && echo "search path $cf_search"
5691 cf_save2_CPPFLAGS="$CPPFLAGS"
5692 for cf_incdir in $cf_search
5695 if test -n "$cf_incdir" ; then
5696 for cf_add_incdir in $cf_incdir
5698 while test "$cf_add_incdir" != /usr/include
5700 if test -d "$cf_add_incdir"
5703 if test -n "$CFLAGS$CPPFLAGS" ; then
5704 # a loop is needed to ensure we can add subdirs of existing dirs
5705 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5706 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5707 cf_have_incdir=yes; break
5712 if test "$cf_have_incdir" = no ; then
5713 if test "$cf_add_incdir" = /usr/local/include ; then
5714 if test "$GCC" = yes
5716 cf_save_CPPFLAGS=$CPPFLAGS
5718 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5719 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5721 cat >"conftest.$ac_ext" <<_ACEOF
5722 #line 5722 "configure"
5723 #include "confdefs.h"
5733 rm -f "conftest.$ac_objext"
5734 if { (eval echo "$as_me:5734: \"$ac_compile\"") >&5
5735 (eval $ac_compile) 2>&5
5737 echo "$as_me:5737: \$? = $ac_status" >&5
5738 (exit "$ac_status"); } &&
5739 { ac_try='test -s "conftest.$ac_objext"'
5740 { (eval echo "$as_me:5740: \"$ac_try\"") >&5
5743 echo "$as_me:5743: \$? = $ac_status" >&5
5744 (exit "$ac_status"); }; }; then
5747 echo "$as_me: failed program was:" >&5
5748 cat "conftest.$ac_ext" >&5
5751 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5752 CPPFLAGS=$cf_save_CPPFLAGS
5757 if test "$cf_have_incdir" = no ; then
5758 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5760 echo "${as_me:-configure}:5760: testing adding $cf_add_incdir to include-path ..." 1>&5
5762 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5764 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5765 test "$cf_top_incdir" = "$cf_add_incdir" && break
5766 cf_add_incdir="$cf_top_incdir"
5782 cat >"conftest.$ac_ext" <<_ACEOF
5783 #line 5783 "configure"
5784 #include "confdefs.h"
5786 #include <$cf_header>
5791 #ifdef NCURSES_VERSION
5793 printf("%s\\n", NCURSES_VERSION);
5806 rm -f "conftest.$ac_objext"
5807 if { (eval echo "$as_me:5807: \"$ac_compile\"") >&5
5808 (eval $ac_compile) 2>&5
5810 echo "$as_me:5810: \$? = $ac_status" >&5
5811 (exit "$ac_status"); } &&
5812 { ac_try='test -s "conftest.$ac_objext"'
5813 { (eval echo "$as_me:5813: \"$ac_try\"") >&5
5816 echo "$as_me:5816: \$? = $ac_status" >&5
5817 (exit "$ac_status"); }; }; then
5818 cf_cv_ncurses_h2=$cf_header
5821 echo "$as_me: failed program was:" >&5
5822 cat "conftest.$ac_ext" >&5
5825 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5827 if test "$cf_cv_ncurses_h2" != no ; then
5828 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5829 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5832 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5834 CPPFLAGS="$cf_save2_CPPFLAGS"
5835 test "$cf_cv_ncurses_h2" != no && break
5837 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5837: error: not found" >&5
5838 echo "$as_me: error: not found" >&2;}
5839 { (exit 1); exit 1; }; }
5842 echo "$as_me:5842: result: $cf_cv_ncurses_h2" >&5
5843 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5845 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5846 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5847 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5848 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5851 if test -n "$cf_1st_incdir" ; then
5852 for cf_add_incdir in $cf_1st_incdir
5854 while test "$cf_add_incdir" != /usr/include
5856 if test -d "$cf_add_incdir"
5859 if test -n "$CFLAGS$CPPFLAGS" ; then
5860 # a loop is needed to ensure we can add subdirs of existing dirs
5861 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5862 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5863 cf_have_incdir=yes; break
5868 if test "$cf_have_incdir" = no ; then
5869 if test "$cf_add_incdir" = /usr/local/include ; then
5870 if test "$GCC" = yes
5872 cf_save_CPPFLAGS=$CPPFLAGS
5874 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5875 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5877 cat >"conftest.$ac_ext" <<_ACEOF
5878 #line 5878 "configure"
5879 #include "confdefs.h"
5889 rm -f "conftest.$ac_objext"
5890 if { (eval echo "$as_me:5890: \"$ac_compile\"") >&5
5891 (eval $ac_compile) 2>&5
5893 echo "$as_me:5893: \$? = $ac_status" >&5
5894 (exit "$ac_status"); } &&
5895 { ac_try='test -s "conftest.$ac_objext"'
5896 { (eval echo "$as_me:5896: \"$ac_try\"") >&5
5899 echo "$as_me:5899: \$? = $ac_status" >&5
5900 (exit "$ac_status"); }; }; then
5903 echo "$as_me: failed program was:" >&5
5904 cat "conftest.$ac_ext" >&5
5907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5908 CPPFLAGS=$cf_save_CPPFLAGS
5913 if test "$cf_have_incdir" = no ; then
5914 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5916 echo "${as_me:-configure}:5916: testing adding $cf_add_incdir to include-path ..." 1>&5
5918 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5920 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5921 test "$cf_top_incdir" = "$cf_add_incdir" && break
5922 cf_add_incdir="$cf_top_incdir"
5935 # Set definitions to allow ifdef'ing for ncurses.h
5937 case "$cf_cv_ncurses_header" in
5940 cat >>confdefs.h <<\EOF
5941 #define HAVE_NCURSES_H 1
5947 case "$cf_cv_ncurses_header" in
5948 (ncurses/curses.h|ncurses/ncurses.h)
5950 cat >>confdefs.h <<\EOF
5951 #define HAVE_NCURSES_NCURSES_H 1
5955 (ncursesw/curses.h|ncursesw/ncurses.h)
5957 cat >>confdefs.h <<\EOF
5958 #define HAVE_NCURSESW_NCURSES_H 1
5964 echo "$as_me:5964: checking for terminfo header" >&5
5965 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5966 if test "${cf_cv_term_header+set}" = set; then
5967 echo $ECHO_N "(cached) $ECHO_C" >&6
5970 case "${cf_cv_ncurses_header}" in
5971 (*/ncurses.h|*/ncursesw.h)
5972 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5975 cf_term_header=term.h
5979 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5981 cat >"conftest.$ac_ext" <<_ACEOF
5982 #line 5982 "configure"
5983 #include "confdefs.h"
5985 #include <${cf_cv_ncurses_header:-curses.h}>
5991 int x = auto_left_margin; (void)x
5996 rm -f "conftest.$ac_objext"
5997 if { (eval echo "$as_me:5997: \"$ac_compile\"") >&5
5998 (eval $ac_compile) 2>&5
6000 echo "$as_me:6000: \$? = $ac_status" >&5
6001 (exit "$ac_status"); } &&
6002 { ac_try='test -s "conftest.$ac_objext"'
6003 { (eval echo "$as_me:6003: \"$ac_try\"") >&5
6006 echo "$as_me:6006: \$? = $ac_status" >&5
6007 (exit "$ac_status"); }; }; then
6009 cf_cv_term_header="$cf_test"
6011 echo "$as_me: failed program was:" >&5
6012 cat "conftest.$ac_ext" >&5
6014 cf_cv_term_header=unknown
6017 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6018 test "$cf_cv_term_header" != unknown && break
6022 echo "$as_me:6022: result: $cf_cv_term_header" >&5
6023 echo "${ECHO_T}$cf_cv_term_header" >&6
6025 # Set definitions to allow ifdef'ing to accommodate subdirectories
6027 case "$cf_cv_term_header" in
6030 cat >>confdefs.h <<\EOF
6031 #define HAVE_TERM_H 1
6037 case "$cf_cv_term_header" in
6040 cat >>confdefs.h <<\EOF
6041 #define HAVE_NCURSES_TERM_H 1
6047 cat >>confdefs.h <<\EOF
6048 #define HAVE_NCURSESW_TERM_H 1
6054 # some applications need this, but should check for NCURSES_VERSION
6056 cat >>confdefs.h <<\EOF
6060 echo "$as_me:6060: checking for ncurses version" >&5
6061 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6062 if test "${cf_cv_ncurses_version+set}" = set; then
6063 echo $ECHO_N "(cached) $ECHO_C" >&6
6066 cf_cv_ncurses_version=no
6068 rm -f "$cf_tempfile"
6069 if test "$cross_compiling" = yes; then
6071 # This will not work if the preprocessor splits the line after the
6072 # Autoconf token. The 'unproto' program does that.
6073 cat > "conftest.$ac_ext" <<EOF
6074 #include <${cf_cv_ncurses_header:-curses.h}>
6076 #ifdef NCURSES_VERSION
6077 Autoconf NCURSES_VERSION
6085 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6086 { (eval echo "$as_me:6086: \"$cf_try\"") >&5
6089 echo "$as_me:6089: \$? = $ac_status" >&5
6090 (exit "$ac_status"); }
6091 if test -f conftest.out ; then
6092 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6093 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6098 cat >"conftest.$ac_ext" <<_ACEOF
6099 #line 6099 "configure"
6100 #include "confdefs.h"
6102 $ac_includes_default
6104 #include <${cf_cv_ncurses_header:-curses.h}>
6108 FILE *fp = fopen("$cf_tempfile", "w");
6109 #ifdef NCURSES_VERSION
6110 # ifdef NCURSES_VERSION_PATCH
6111 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6113 fprintf(fp, "%s\\n", NCURSES_VERSION);
6117 fprintf(fp, "old\\n");
6122 ${cf_cv_main_return:-return}(0);
6125 rm -f "conftest$ac_exeext"
6126 if { (eval echo "$as_me:6126: \"$ac_link\"") >&5
6127 (eval $ac_link) 2>&5
6129 echo "$as_me:6129: \$? = $ac_status" >&5
6130 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6131 { (eval echo "$as_me:6131: \"$ac_try\"") >&5
6134 echo "$as_me:6134: \$? = $ac_status" >&5
6135 (exit "$ac_status"); }; }; then
6137 cf_cv_ncurses_version=`cat $cf_tempfile`
6139 echo "$as_me: program exited with status $ac_status" >&5
6140 echo "$as_me: failed program was:" >&5
6141 cat "conftest.$ac_ext" >&5
6143 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6145 rm -f "$cf_tempfile"
6148 echo "$as_me:6148: result: $cf_cv_ncurses_version" >&5
6149 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6150 test "$cf_cv_ncurses_version" = no ||
6151 cat >>confdefs.h <<\EOF
6155 cf_nculib_root=ncurses
6156 # This works, except for the special case where we find gpm, but
6157 # ncurses is in a nonstandard location via $LIBS, and we really want
6160 cf_ncurses_SAVE="$LIBS"
6161 echo "$as_me:6161: checking for Gpm_Open in -lgpm" >&5
6162 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6163 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6164 echo $ECHO_N "(cached) $ECHO_C" >&6
6166 ac_check_lib_save_LIBS=$LIBS
6168 cat >"conftest.$ac_ext" <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6172 /* Override any gcc2 internal prototype to avoid an error. */
6176 /* We use char because int might match the return type of a gcc2
6177 builtin and then its argument prototype would still apply. */
6187 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6188 if { (eval echo "$as_me:6188: \"$ac_link\"") >&5
6189 (eval $ac_link) 2>&5
6191 echo "$as_me:6191: \$? = $ac_status" >&5
6192 (exit "$ac_status"); } &&
6193 { ac_try='test -s "conftest$ac_exeext"'
6194 { (eval echo "$as_me:6194: \"$ac_try\"") >&5
6197 echo "$as_me:6197: \$? = $ac_status" >&5
6198 (exit "$ac_status"); }; }; then
6199 ac_cv_lib_gpm_Gpm_Open=yes
6201 echo "$as_me: failed program was:" >&5
6202 cat "conftest.$ac_ext" >&5
6203 ac_cv_lib_gpm_Gpm_Open=no
6205 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6206 LIBS=$ac_check_lib_save_LIBS
6208 echo "$as_me:6208: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6209 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6210 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6211 echo "$as_me:6211: checking for initscr in -lgpm" >&5
6212 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6213 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6214 echo $ECHO_N "(cached) $ECHO_C" >&6
6216 ac_check_lib_save_LIBS=$LIBS
6218 cat >"conftest.$ac_ext" <<_ACEOF
6219 #line 6219 "configure"
6220 #include "confdefs.h"
6222 /* Override any gcc2 internal prototype to avoid an error. */
6226 /* We use char because int might match the return type of a gcc2
6227 builtin and then its argument prototype would still apply. */
6237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6238 if { (eval echo "$as_me:6238: \"$ac_link\"") >&5
6239 (eval $ac_link) 2>&5
6241 echo "$as_me:6241: \$? = $ac_status" >&5
6242 (exit "$ac_status"); } &&
6243 { ac_try='test -s "conftest$ac_exeext"'
6244 { (eval echo "$as_me:6244: \"$ac_try\"") >&5
6247 echo "$as_me:6247: \$? = $ac_status" >&5
6248 (exit "$ac_status"); }; }; then
6249 ac_cv_lib_gpm_initscr=yes
6251 echo "$as_me: failed program was:" >&5
6252 cat "conftest.$ac_ext" >&5
6253 ac_cv_lib_gpm_initscr=no
6255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6256 LIBS=$ac_check_lib_save_LIBS
6258 echo "$as_me:6258: result: $ac_cv_lib_gpm_initscr" >&5
6259 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6260 if test "$ac_cv_lib_gpm_initscr" = yes; then
6261 LIBS="$cf_ncurses_SAVE"
6263 cf_ncurses_LIBS="-lgpm"
6270 # This is only necessary if you are linking against an obsolete
6271 # version of ncurses (but it should do no harm, since it is static).
6272 if test "$cf_nculib_root" = ncurses ; then
6273 echo "$as_me:6273: checking for tgoto in -lmytinfo" >&5
6274 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6275 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6276 echo $ECHO_N "(cached) $ECHO_C" >&6
6278 ac_check_lib_save_LIBS=$LIBS
6279 LIBS="-lmytinfo $LIBS"
6280 cat >"conftest.$ac_ext" <<_ACEOF
6281 #line 6281 "configure"
6282 #include "confdefs.h"
6284 /* Override any gcc2 internal prototype to avoid an error. */
6288 /* We use char because int might match the return type of a gcc2
6289 builtin and then its argument prototype would still apply. */
6299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6300 if { (eval echo "$as_me:6300: \"$ac_link\"") >&5
6301 (eval $ac_link) 2>&5
6303 echo "$as_me:6303: \$? = $ac_status" >&5
6304 (exit "$ac_status"); } &&
6305 { ac_try='test -s "conftest$ac_exeext"'
6306 { (eval echo "$as_me:6306: \"$ac_try\"") >&5
6309 echo "$as_me:6309: \$? = $ac_status" >&5
6310 (exit "$ac_status"); }; }; then
6311 ac_cv_lib_mytinfo_tgoto=yes
6313 echo "$as_me: failed program was:" >&5
6314 cat "conftest.$ac_ext" >&5
6315 ac_cv_lib_mytinfo_tgoto=no
6317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6318 LIBS=$ac_check_lib_save_LIBS
6320 echo "$as_me:6320: result: $ac_cv_lib_mytinfo_tgoto" >&5
6321 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6322 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6323 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6333 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6335 for cf_add_1lib in $cf_add_0lib; do
6336 for cf_add_2lib in $cf_add_libs; do
6337 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6342 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6346 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6352 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6354 for cf_add_1lib in $cf_add_0lib; do
6355 for cf_add_2lib in $cf_add_libs; do
6356 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6361 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6367 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6369 echo "$as_me:6369: checking for initscr" >&5
6370 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6371 if test "${ac_cv_func_initscr+set}" = set; then
6372 echo $ECHO_N "(cached) $ECHO_C" >&6
6374 cat >"conftest.$ac_ext" <<_ACEOF
6375 #line 6375 "configure"
6376 #include "confdefs.h"
6377 #define initscr autoconf_temporary
6378 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6385 /* We use char because int might match the return type of a gcc2
6386 builtin and then its argument prototype would still apply. */
6387 char initscr (void);
6393 /* The GNU C library defines stubs for functions which it implements
6394 to always fail with ENOSYS. Some functions are actually named
6395 something starting with __ and the normal name is an alias. */
6396 #if defined (__stub_initscr) || defined (__stub___initscr)
6397 #error found stub for initscr
6405 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6406 if { (eval echo "$as_me:6406: \"$ac_link\"") >&5
6407 (eval $ac_link) 2>&5
6409 echo "$as_me:6409: \$? = $ac_status" >&5
6410 (exit "$ac_status"); } &&
6411 { ac_try='test -s "conftest$ac_exeext"'
6412 { (eval echo "$as_me:6412: \"$ac_try\"") >&5
6415 echo "$as_me:6415: \$? = $ac_status" >&5
6416 (exit "$ac_status"); }; }; then
6417 ac_cv_func_initscr=yes
6419 echo "$as_me: failed program was:" >&5
6420 cat "conftest.$ac_ext" >&5
6421 ac_cv_func_initscr=no
6423 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6425 echo "$as_me:6425: result: $ac_cv_func_initscr" >&5
6426 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6427 if test "$ac_cv_func_initscr" = yes; then
6428 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6431 cf_save_LIBS="$LIBS"
6432 echo "$as_me:6432: checking for initscr in -l$cf_nculib_root" >&5
6433 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6434 LIBS="-l$cf_nculib_root $LIBS"
6435 cat >"conftest.$ac_ext" <<_ACEOF
6436 #line 6436 "configure"
6437 #include "confdefs.h"
6438 #include <${cf_cv_ncurses_header:-curses.h}>
6447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6448 if { (eval echo "$as_me:6448: \"$ac_link\"") >&5
6449 (eval $ac_link) 2>&5
6451 echo "$as_me:6451: \$? = $ac_status" >&5
6452 (exit "$ac_status"); } &&
6453 { ac_try='test -s "conftest$ac_exeext"'
6454 { (eval echo "$as_me:6454: \"$ac_try\"") >&5
6457 echo "$as_me:6457: \$? = $ac_status" >&5
6458 (exit "$ac_status"); }; }; then
6459 echo "$as_me:6459: result: yes" >&5
6460 echo "${ECHO_T}yes" >&6
6461 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6464 echo "$as_me: failed program was:" >&5
6465 cat "conftest.$ac_ext" >&5
6466 echo "$as_me:6466: result: no" >&5
6467 echo "${ECHO_T}no" >&6
6470 cf_library_path_list=""
6471 if test -n "${LDFLAGS}${LIBS}" ; then
6472 for cf_library_path in $LDFLAGS $LIBS
6474 case "$cf_library_path" in
6476 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6478 test "x$cf_library_path" != "xNONE" && \
6479 test -d "$cf_library_path" && \
6481 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6482 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6483 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6484 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6485 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6486 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"
6489 cf_library_path_list="$cf_library_path_list $cf_search"
6497 test "x$prefix" != "xNONE" && \
6498 test -d "$prefix" && \
6500 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6501 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6502 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6503 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6504 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6505 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6508 for cf_subdir_prefix in \
6517 test "x$cf_subdir_prefix" != "x$prefix" && \
6518 test -d "$cf_subdir_prefix" && \
6519 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6520 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6521 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6522 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6523 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6524 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6525 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"
6530 cf_search="$cf_library_path_list $cf_search"
6532 for cf_libdir in $cf_search
6534 echo "$as_me:6534: checking for -l$cf_nculib_root in $cf_libdir" >&5
6535 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6536 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6537 cat >"conftest.$ac_ext" <<_ACEOF
6538 #line 6538 "configure"
6539 #include "confdefs.h"
6540 #include <${cf_cv_ncurses_header:-curses.h}>
6549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6550 if { (eval echo "$as_me:6550: \"$ac_link\"") >&5
6551 (eval $ac_link) 2>&5
6553 echo "$as_me:6553: \$? = $ac_status" >&5
6554 (exit "$ac_status"); } &&
6555 { ac_try='test -s "conftest$ac_exeext"'
6556 { (eval echo "$as_me:6556: \"$ac_try\"") >&5
6559 echo "$as_me:6559: \$? = $ac_status" >&5
6560 (exit "$ac_status"); }; }; then
6561 echo "$as_me:6561: result: yes" >&5
6562 echo "${ECHO_T}yes" >&6
6563 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6566 echo "$as_me: failed program was:" >&5
6567 cat "conftest.$ac_ext" >&5
6568 echo "$as_me:6568: result: no" >&5
6569 echo "${ECHO_T}no" >&6
6570 LIBS="$cf_save_LIBS"
6572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6580 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6582 if test "$cf_found_library" = no ; then
6583 { { echo "$as_me:6583: error: Cannot link $cf_nculib_root library" >&5
6584 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6585 { (exit 1); exit 1; }; }
6590 if test -n "$cf_ncurses_LIBS" ; then
6591 echo "$as_me:6591: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6592 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6593 cf_ncurses_SAVE="$LIBS"
6594 for p in $cf_ncurses_LIBS ; do
6595 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6596 if test "$q" != "$LIBS" ; then
6600 cat >"conftest.$ac_ext" <<_ACEOF
6601 #line 6601 "configure"
6602 #include "confdefs.h"
6603 #include <${cf_cv_ncurses_header:-curses.h}>
6607 initscr(); mousemask(0,0); tigetstr((char *)0);
6612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6613 if { (eval echo "$as_me:6613: \"$ac_link\"") >&5
6614 (eval $ac_link) 2>&5
6616 echo "$as_me:6616: \$? = $ac_status" >&5
6617 (exit "$ac_status"); } &&
6618 { ac_try='test -s "conftest$ac_exeext"'
6619 { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6622 echo "$as_me:6622: \$? = $ac_status" >&5
6623 (exit "$ac_status"); }; }; then
6624 echo "$as_me:6624: result: yes" >&5
6625 echo "${ECHO_T}yes" >&6
6627 echo "$as_me: failed program was:" >&5
6628 cat "conftest.$ac_ext" >&5
6629 echo "$as_me:6629: result: no" >&5
6630 echo "${ECHO_T}no" >&6
6631 LIBS="$cf_ncurses_SAVE"
6633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6636 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6638 cat >>confdefs.h <<EOF
6639 #define $cf_nculib_ROOT 1
6647 echo "$as_me:6647: checking if you want wide-character code" >&5
6648 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6650 # Check whether --enable-widec or --disable-widec was given.
6651 if test "${enable_widec+set}" = set; then
6652 enableval="$enable_widec"
6653 with_widec=$enableval
6657 echo "$as_me:6657: result: $with_widec" >&5
6658 echo "${ECHO_T}$with_widec" >&6
6659 if test "$with_widec" = yes ; then
6661 for ac_header in wchar.h
6663 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6664 echo "$as_me:6664: checking for $ac_header" >&5
6665 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6666 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6667 echo $ECHO_N "(cached) $ECHO_C" >&6
6669 cat >"conftest.$ac_ext" <<_ACEOF
6670 #line 6670 "configure"
6671 #include "confdefs.h"
6672 #include <$ac_header>
6674 if { (eval echo "$as_me:6674: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6675 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6677 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6679 cat conftest.err >&5
6680 echo "$as_me:6680: \$? = $ac_status" >&5
6681 (exit "$ac_status"); } >/dev/null; then
6682 if test -s conftest.err; then
6683 ac_cpp_err=$ac_c_preproc_warn_flag
6690 if test -z "$ac_cpp_err"; then
6691 eval "$as_ac_Header=yes"
6693 echo "$as_me: failed program was:" >&5
6694 cat "conftest.$ac_ext" >&5
6695 eval "$as_ac_Header=no"
6697 rm -f conftest.err "conftest.$ac_ext"
6699 echo "$as_me:6699: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6700 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6701 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6702 cat >>confdefs.h <<EOF
6703 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6709 echo "$as_me:6709: checking for multibyte character support" >&5
6710 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6711 if test "${cf_cv_utf8_lib+set}" = set; then
6712 echo $ECHO_N "(cached) $ECHO_C" >&6
6715 cf_save_LIBS="$LIBS"
6716 cat >"conftest.$ac_ext" <<_ACEOF
6717 #line 6717 "configure"
6718 #include "confdefs.h"
6734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6735 if { (eval echo "$as_me:6735: \"$ac_link\"") >&5
6736 (eval $ac_link) 2>&5
6738 echo "$as_me:6738: \$? = $ac_status" >&5
6739 (exit "$ac_status"); } &&
6740 { ac_try='test -s "conftest$ac_exeext"'
6741 { (eval echo "$as_me:6741: \"$ac_try\"") >&5
6744 echo "$as_me:6744: \$? = $ac_status" >&5
6745 (exit "$ac_status"); }; }; then
6748 echo "$as_me: failed program was:" >&5
6749 cat "conftest.$ac_ext" >&5
6751 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6752 # will be set on completion of the AC_TRY_LINK below.
6753 cf_cv_header_path_utf8=
6754 cf_cv_library_path_utf8=
6756 echo "${as_me:-configure}:6756: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6758 cf_save_LIBS="$LIBS"
6760 cat >"conftest.$ac_ext" <<_ACEOF
6761 #line 6761 "configure"
6762 #include "confdefs.h"
6764 #include <libutf8.h>
6773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6774 if { (eval echo "$as_me:6774: \"$ac_link\"") >&5
6775 (eval $ac_link) 2>&5
6777 echo "$as_me:6777: \$? = $ac_status" >&5
6778 (exit "$ac_status"); } &&
6779 { ac_try='test -s "conftest$ac_exeext"'
6780 { (eval echo "$as_me:6780: \"$ac_try\"") >&5
6783 echo "$as_me:6783: \$? = $ac_status" >&5
6784 (exit "$ac_status"); }; }; then
6786 cf_cv_find_linkage_utf8=yes
6787 cf_cv_header_path_utf8=/usr/include
6788 cf_cv_library_path_utf8=/usr/lib
6791 echo "$as_me: failed program was:" >&5
6792 cat "conftest.$ac_ext" >&5
6794 LIBS="-lutf8 $cf_save_LIBS"
6796 cat >"conftest.$ac_ext" <<_ACEOF
6797 #line 6797 "configure"
6798 #include "confdefs.h"
6800 #include <libutf8.h>
6809 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6810 if { (eval echo "$as_me:6810: \"$ac_link\"") >&5
6811 (eval $ac_link) 2>&5
6813 echo "$as_me:6813: \$? = $ac_status" >&5
6814 (exit "$ac_status"); } &&
6815 { ac_try='test -s "conftest$ac_exeext"'
6816 { (eval echo "$as_me:6816: \"$ac_try\"") >&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit "$ac_status"); }; }; then
6822 cf_cv_find_linkage_utf8=yes
6823 cf_cv_header_path_utf8=/usr/include
6824 cf_cv_library_path_utf8=/usr/lib
6825 cf_cv_library_file_utf8="-lutf8"
6828 echo "$as_me: failed program was:" >&5
6829 cat "conftest.$ac_ext" >&5
6831 cf_cv_find_linkage_utf8=no
6832 LIBS="$cf_save_LIBS"
6834 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6836 echo "${as_me:-configure}:6836: testing find linkage for utf8 library ..." 1>&5
6838 echo "${as_me:-configure}:6838: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6840 cf_save_CPPFLAGS="$CPPFLAGS"
6841 cf_test_CPPFLAGS="$CPPFLAGS"
6845 # collect the current set of include-directories from compiler flags
6846 cf_header_path_list=""
6847 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6848 for cf_header_path in $CPPFLAGS $CFLAGS
6850 case "$cf_header_path" in
6852 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6854 test "x$cf_header_path" != "xNONE" && \
6855 test -d "$cf_header_path" && \
6857 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6858 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6859 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6860 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6861 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6862 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6865 cf_header_path_list="$cf_header_path_list $cf_search"
6871 # add the variations for the package we are looking for
6875 test "x$prefix" != "xNONE" && \
6876 test -d "$prefix" && \
6878 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6879 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6880 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6881 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6882 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6883 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6886 for cf_subdir_prefix in \
6895 test "x$cf_subdir_prefix" != "x$prefix" && \
6896 test -d "$cf_subdir_prefix" && \
6897 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6898 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6899 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6900 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6901 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6902 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6903 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6908 test "$includedir" != NONE && \
6909 test "$includedir" != "/usr/include" && \
6910 test -d "$includedir" && {
6911 test -d "$includedir" && cf_search="$cf_search $includedir"
6912 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6915 test "$oldincludedir" != NONE && \
6916 test "$oldincludedir" != "/usr/include" && \
6917 test -d "$oldincludedir" && {
6918 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6919 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6922 cf_search="$cf_search $cf_header_path_list"
6924 for cf_cv_header_path_utf8 in $cf_search
6926 if test -d "$cf_cv_header_path_utf8" ; then
6927 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6929 echo "${as_me:-configure}:6929: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6931 CPPFLAGS="$cf_save_CPPFLAGS"
6933 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6934 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6936 cat >"conftest.$ac_ext" <<_ACEOF
6937 #line 6937 "configure"
6938 #include "confdefs.h"
6940 #include <libutf8.h>
6949 rm -f "conftest.$ac_objext"
6950 if { (eval echo "$as_me:6950: \"$ac_compile\"") >&5
6951 (eval $ac_compile) 2>&5
6953 echo "$as_me:6953: \$? = $ac_status" >&5
6954 (exit "$ac_status"); } &&
6955 { ac_try='test -s "conftest.$ac_objext"'
6956 { (eval echo "$as_me:6956: \"$ac_try\"") >&5
6959 echo "$as_me:6959: \$? = $ac_status" >&5
6960 (exit "$ac_status"); }; }; then
6962 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6964 echo "${as_me:-configure}:6964: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6966 cf_cv_find_linkage_utf8=maybe
6967 cf_test_CPPFLAGS="$CPPFLAGS"
6970 echo "$as_me: failed program was:" >&5
6971 cat "conftest.$ac_ext" >&5
6973 CPPFLAGS="$cf_save_CPPFLAGS"
6976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6980 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6982 echo "${as_me:-configure}:6982: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6984 cf_save_LIBS="$LIBS"
6985 cf_save_LDFLAGS="$LDFLAGS"
6987 if test "$cf_cv_find_linkage_utf8" != yes ; then
6990 cf_library_path_list=""
6991 if test -n "${LDFLAGS}${LIBS}" ; then
6992 for cf_library_path in $LDFLAGS $LIBS
6994 case "$cf_library_path" in
6996 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6998 test "x$cf_library_path" != "xNONE" && \
6999 test -d "$cf_library_path" && \
7001 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7002 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7003 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7004 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7005 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7006 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7009 cf_library_path_list="$cf_library_path_list $cf_search"
7017 test "x$prefix" != "xNONE" && \
7018 test -d "$prefix" && \
7020 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7021 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7022 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7023 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7024 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7025 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7028 for cf_subdir_prefix in \
7037 test "x$cf_subdir_prefix" != "x$prefix" && \
7038 test -d "$cf_subdir_prefix" && \
7039 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7040 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7041 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7042 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7043 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7044 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7045 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7050 cf_search="$cf_library_path_list $cf_search"
7052 for cf_cv_library_path_utf8 in $cf_search
7054 if test -d "$cf_cv_library_path_utf8" ; then
7055 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7057 echo "${as_me:-configure}:7057: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7059 CPPFLAGS="$cf_test_CPPFLAGS"
7060 LIBS="-lutf8 $cf_save_LIBS"
7061 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7062 cat >"conftest.$ac_ext" <<_ACEOF
7063 #line 7063 "configure"
7064 #include "confdefs.h"
7066 #include <libutf8.h>
7075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7076 if { (eval echo "$as_me:7076: \"$ac_link\"") >&5
7077 (eval $ac_link) 2>&5
7079 echo "$as_me:7079: \$? = $ac_status" >&5
7080 (exit "$ac_status"); } &&
7081 { ac_try='test -s "conftest$ac_exeext"'
7082 { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7085 echo "$as_me:7085: \$? = $ac_status" >&5
7086 (exit "$ac_status"); }; }; then
7088 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7090 echo "${as_me:-configure}:7090: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7092 cf_cv_find_linkage_utf8=yes
7093 cf_cv_library_file_utf8="-lutf8"
7096 echo "$as_me: failed program was:" >&5
7097 cat "conftest.$ac_ext" >&5
7099 CPPFLAGS="$cf_save_CPPFLAGS"
7100 LIBS="$cf_save_LIBS"
7101 LDFLAGS="$cf_save_LDFLAGS"
7104 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7107 CPPFLAGS="$cf_save_CPPFLAGS"
7108 LDFLAGS="$cf_save_LDFLAGS"
7112 cf_cv_find_linkage_utf8=no
7116 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7121 LIBS="$cf_save_LIBS"
7123 if test "$cf_cv_find_linkage_utf8" = yes ; then
7124 cf_cv_utf8_lib=add-on
7130 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7132 echo "$as_me:7132: result: $cf_cv_utf8_lib" >&5
7133 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7135 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7137 if test "$cf_cv_utf8_lib" = "add-on" ; then
7139 cat >>confdefs.h <<\EOF
7140 #define HAVE_LIBUTF8_H 1
7143 if test -n "$cf_cv_header_path_utf8" ; then
7144 for cf_add_incdir in $cf_cv_header_path_utf8
7146 while test "$cf_add_incdir" != /usr/include
7148 if test -d "$cf_add_incdir"
7151 if test -n "$CFLAGS$CPPFLAGS" ; then
7152 # a loop is needed to ensure we can add subdirs of existing dirs
7153 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7154 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7155 cf_have_incdir=yes; break
7160 if test "$cf_have_incdir" = no ; then
7161 if test "$cf_add_incdir" = /usr/local/include ; then
7162 if test "$GCC" = yes
7164 cf_save_CPPFLAGS=$CPPFLAGS
7166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7167 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7169 cat >"conftest.$ac_ext" <<_ACEOF
7170 #line 7170 "configure"
7171 #include "confdefs.h"
7181 rm -f "conftest.$ac_objext"
7182 if { (eval echo "$as_me:7182: \"$ac_compile\"") >&5
7183 (eval $ac_compile) 2>&5
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit "$ac_status"); } &&
7187 { ac_try='test -s "conftest.$ac_objext"'
7188 { (eval echo "$as_me:7188: \"$ac_try\"") >&5
7191 echo "$as_me:7191: \$? = $ac_status" >&5
7192 (exit "$ac_status"); }; }; then
7195 echo "$as_me: failed program was:" >&5
7196 cat "conftest.$ac_ext" >&5
7199 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7200 CPPFLAGS=$cf_save_CPPFLAGS
7205 if test "$cf_have_incdir" = no ; then
7206 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7208 echo "${as_me:-configure}:7208: testing adding $cf_add_incdir to include-path ..." 1>&5
7210 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7212 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7213 test "$cf_top_incdir" = "$cf_add_incdir" && break
7214 cf_add_incdir="$cf_top_incdir"
7225 if test -n "$cf_cv_library_path_utf8" ; then
7226 for cf_add_libdir in $cf_cv_library_path_utf8
7228 if test "$cf_add_libdir" = /usr/lib ; then
7230 elif test -d "$cf_add_libdir"
7233 if test -n "$LDFLAGS$LIBS" ; then
7234 # a loop is needed to ensure we can add subdirs of existing dirs
7235 for cf_test_libdir in $LDFLAGS $LIBS ; do
7236 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7237 cf_have_libdir=yes; break
7241 if test "$cf_have_libdir" = no ; then
7242 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7244 echo "${as_me:-configure}:7244: testing adding $cf_add_libdir to library-path ..." 1>&5
7246 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7255 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7257 for cf_add_1lib in $cf_add_0lib; do
7258 for cf_add_2lib in $cf_add_libs; do
7259 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7264 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7270 cf_ncuconfig_root=ncursesw
7271 cf_have_ncuconfig=no
7273 if test "x${PKG_CONFIG:=none}" != xnone; then
7274 echo "$as_me:7274: checking pkg-config for $cf_ncuconfig_root" >&5
7275 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7276 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7277 echo "$as_me:7277: result: yes" >&5
7278 echo "${ECHO_T}yes" >&6
7280 echo "$as_me:7280: checking if the $cf_ncuconfig_root package files work" >&5
7281 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7282 cf_have_ncuconfig=unknown
7284 cf_save_CFLAGS="$CFLAGS"
7285 cf_save_CPPFLAGS="$CPPFLAGS"
7286 cf_save_LIBS="$LIBS"
7288 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7289 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7291 # while -W for passing linker flags is prevalent, it is not "standard".
7292 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7293 # incompatible _and_ non-standard -W option which gives an error. Work
7294 # around that pitfall.
7295 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7301 cf_new_extra_cppflags=
7303 for cf_add_cflags in $cf_pkg_cflags
7305 case "$cf_fix_cppflags" in
7307 case "$cf_add_cflags" in
7308 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7309 case "$cf_add_cflags" in
7311 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7313 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7314 && test -z "${cf_tst_cflags}" \
7315 && cf_fix_cppflags=yes
7317 if test "$cf_fix_cppflags" = yes ; then
7319 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7320 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7323 elif test "${cf_tst_cflags}" = "\"'" ; then
7325 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7326 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7336 case "$cf_add_cflags" in
7338 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7340 CPPFLAGS=`echo "$CPPFLAGS" | \
7341 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7342 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7347 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7348 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7355 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7356 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7363 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7364 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7366 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7368 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7369 && test -z "${cf_tst_cflags}" \
7370 && cf_fix_cppflags=no
7375 if test -n "$cf_new_cflags" ; then
7377 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7378 CFLAGS="${CFLAGS}$cf_new_cflags"
7382 if test -n "$cf_new_cppflags" ; then
7384 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7385 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7389 if test -n "$cf_new_extra_cppflags" ; then
7391 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7392 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7399 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7401 for cf_add_1lib in $cf_add_0lib; do
7402 for cf_add_2lib in $cf_add_libs; do
7403 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7408 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7412 cat >"conftest.$ac_ext" <<_ACEOF
7413 #line 7413 "configure"
7414 #include "confdefs.h"
7415 #include <${cf_cv_ncurses_header:-curses.h}>
7419 initscr(); mousemask(0,0); tigetstr((char *)0);
7424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7425 if { (eval echo "$as_me:7425: \"$ac_link\"") >&5
7426 (eval $ac_link) 2>&5
7428 echo "$as_me:7428: \$? = $ac_status" >&5
7429 (exit "$ac_status"); } &&
7430 { ac_try='test -s "conftest$ac_exeext"'
7431 { (eval echo "$as_me:7431: \"$ac_try\"") >&5
7434 echo "$as_me:7434: \$? = $ac_status" >&5
7435 (exit "$ac_status"); }; }; then
7436 if test "$cross_compiling" = yes; then
7437 cf_test_ncuconfig=maybe
7439 cat >"conftest.$ac_ext" <<_ACEOF
7440 #line 7440 "configure"
7441 #include "confdefs.h"
7442 #include <${cf_cv_ncurses_header:-curses.h}>
7444 { const char *xx = curses_version(); return (xx == 0); }
7446 rm -f "conftest$ac_exeext"
7447 if { (eval echo "$as_me:7447: \"$ac_link\"") >&5
7448 (eval $ac_link) 2>&5
7450 echo "$as_me:7450: \$? = $ac_status" >&5
7451 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7452 { (eval echo "$as_me:7452: \"$ac_try\"") >&5
7455 echo "$as_me:7455: \$? = $ac_status" >&5
7456 (exit "$ac_status"); }; }; then
7457 cf_test_ncuconfig=yes
7459 echo "$as_me: program exited with status $ac_status" >&5
7460 echo "$as_me: failed program was:" >&5
7461 cat "conftest.$ac_ext" >&5
7462 cf_test_ncuconfig=no
7464 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7467 echo "$as_me: failed program was:" >&5
7468 cat "conftest.$ac_ext" >&5
7469 cf_test_ncuconfig=no
7471 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7473 CFLAGS="$cf_save_CFLAGS"
7474 CPPFLAGS="$cf_save_CPPFLAGS"
7475 LIBS="$cf_save_LIBS"
7477 if test "x$cf_test_ncuconfig" != xyes; then
7478 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7479 cf_pkg_cflags="$cf_temp"
7480 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7481 cf_pkg_libs="$cf_temp"
7486 for cf_add_cflags in $cf_pkg_cflags
7488 case "x$cf_add_cflags" in
7491 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7494 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'`
7495 test "$CFLAGS" != "$cf_old_cflag" || break
7497 CFLAGS="$cf_old_cflag"
7500 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7503 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'`
7504 test "$CPPFLAGS" != "$cf_old_cflag" || break
7506 CPPFLAGS="$cf_old_cflag"
7515 cf_new_extra_cppflags=
7517 for cf_add_cflags in $cf_add_cflags
7519 case "$cf_fix_cppflags" in
7521 case "$cf_add_cflags" in
7522 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7523 case "$cf_add_cflags" in
7525 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7527 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7528 && test -z "${cf_tst_cflags}" \
7529 && cf_fix_cppflags=yes
7531 if test "$cf_fix_cppflags" = yes ; then
7533 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7534 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7537 elif test "${cf_tst_cflags}" = "\"'" ; then
7539 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7540 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7550 case "$cf_add_cflags" in
7552 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7554 CPPFLAGS=`echo "$CPPFLAGS" | \
7555 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7556 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7561 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7562 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7569 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7570 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7577 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7578 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7580 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7582 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7583 && test -z "${cf_tst_cflags}" \
7584 && cf_fix_cppflags=no
7589 if test -n "$cf_new_cflags" ; then
7591 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7592 CFLAGS="${CFLAGS}$cf_new_cflags"
7596 if test -n "$cf_new_cppflags" ; then
7598 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7599 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7603 if test -n "$cf_new_extra_cppflags" ; then
7605 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7606 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7615 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7617 for cf_add_1lib in $cf_add_0lib; do
7618 for cf_add_2lib in $cf_add_libs; do
7619 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7624 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7628 cat >"conftest.$ac_ext" <<_ACEOF
7629 #line 7629 "configure"
7630 #include "confdefs.h"
7631 #include <${cf_cv_ncurses_header:-curses.h}>
7635 initscr(); mousemask(0,0); tigetstr((char *)0);
7640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7641 if { (eval echo "$as_me:7641: \"$ac_link\"") >&5
7642 (eval $ac_link) 2>&5
7644 echo "$as_me:7644: \$? = $ac_status" >&5
7645 (exit "$ac_status"); } &&
7646 { ac_try='test -s "conftest$ac_exeext"'
7647 { (eval echo "$as_me:7647: \"$ac_try\"") >&5
7650 echo "$as_me:7650: \$? = $ac_status" >&5
7651 (exit "$ac_status"); }; }; then
7652 if test "$cross_compiling" = yes; then
7653 cf_have_ncuconfig=maybe
7655 cat >"conftest.$ac_ext" <<_ACEOF
7656 #line 7656 "configure"
7657 #include "confdefs.h"
7658 #include <${cf_cv_ncurses_header:-curses.h}>
7660 { const char *xx = curses_version(); return (xx == 0); }
7662 rm -f "conftest$ac_exeext"
7663 if { (eval echo "$as_me:7663: \"$ac_link\"") >&5
7664 (eval $ac_link) 2>&5
7666 echo "$as_me:7666: \$? = $ac_status" >&5
7667 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7668 { (eval echo "$as_me:7668: \"$ac_try\"") >&5
7671 echo "$as_me:7671: \$? = $ac_status" >&5
7672 (exit "$ac_status"); }; }; then
7673 cf_have_ncuconfig=yes
7675 echo "$as_me: program exited with status $ac_status" >&5
7676 echo "$as_me: failed program was:" >&5
7677 cat "conftest.$ac_ext" >&5
7678 cf_have_ncuconfig=no
7680 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7683 echo "$as_me: failed program was:" >&5
7684 cat "conftest.$ac_ext" >&5
7685 cf_have_ncuconfig=no
7687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7688 echo "$as_me:7688: result: $cf_have_ncuconfig" >&5
7689 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7690 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7691 if test "$cf_have_ncuconfig" != "yes"
7693 CPPFLAGS="$cf_save_CPPFLAGS"
7694 LIBS="$cf_save_LIBS"
7695 NCURSES_CONFIG_PKG=none
7698 cat >>confdefs.h <<\EOF
7702 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7704 echo "$as_me:7704: checking for terminfo header" >&5
7705 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7706 if test "${cf_cv_term_header+set}" = set; then
7707 echo $ECHO_N "(cached) $ECHO_C" >&6
7710 case "${cf_cv_ncurses_header}" in
7711 (*/ncurses.h|*/ncursesw.h)
7712 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7715 cf_term_header=term.h
7719 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7721 cat >"conftest.$ac_ext" <<_ACEOF
7722 #line 7722 "configure"
7723 #include "confdefs.h"
7725 #include <${cf_cv_ncurses_header:-curses.h}>
7731 int x = auto_left_margin; (void)x
7736 rm -f "conftest.$ac_objext"
7737 if { (eval echo "$as_me:7737: \"$ac_compile\"") >&5
7738 (eval $ac_compile) 2>&5
7740 echo "$as_me:7740: \$? = $ac_status" >&5
7741 (exit "$ac_status"); } &&
7742 { ac_try='test -s "conftest.$ac_objext"'
7743 { (eval echo "$as_me:7743: \"$ac_try\"") >&5
7746 echo "$as_me:7746: \$? = $ac_status" >&5
7747 (exit "$ac_status"); }; }; then
7749 cf_cv_term_header="$cf_test"
7751 echo "$as_me: failed program was:" >&5
7752 cat "conftest.$ac_ext" >&5
7754 cf_cv_term_header=unknown
7757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7758 test "$cf_cv_term_header" != unknown && break
7762 echo "$as_me:7762: result: $cf_cv_term_header" >&5
7763 echo "${ECHO_T}$cf_cv_term_header" >&6
7765 # Set definitions to allow ifdef'ing to accommodate subdirectories
7767 case "$cf_cv_term_header" in
7770 cat >>confdefs.h <<\EOF
7771 #define HAVE_TERM_H 1
7777 case "$cf_cv_term_header" in
7780 cat >>confdefs.h <<\EOF
7781 #define HAVE_NCURSES_TERM_H 1
7787 cat >>confdefs.h <<\EOF
7788 #define HAVE_NCURSESW_TERM_H 1
7797 echo "$as_me:7797: result: no" >&5
7798 echo "${ECHO_T}no" >&6
7799 NCURSES_CONFIG_PKG=none
7802 NCURSES_CONFIG_PKG=none
7805 if test "x$cf_have_ncuconfig" = "xno"; then
7806 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7808 if test -n "$ac_tool_prefix"; then
7809 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7811 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7812 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7813 echo "$as_me:7813: checking for $ac_word" >&5
7814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7815 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7816 echo $ECHO_N "(cached) $ECHO_C" >&6
7818 if test -n "$NCURSES_CONFIG"; then
7819 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7821 ac_save_IFS=$IFS; IFS=$ac_path_separator
7823 for ac_dir in $ac_dummy; do
7825 test -z "$ac_dir" && ac_dir=.
7826 $as_executable_p "$ac_dir/$ac_word" || continue
7827 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7828 echo "$as_me:7828: found $ac_dir/$ac_word" >&5
7834 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7835 if test -n "$NCURSES_CONFIG"; then
7836 echo "$as_me:7836: result: $NCURSES_CONFIG" >&5
7837 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7839 echo "$as_me:7839: result: no" >&5
7840 echo "${ECHO_T}no" >&6
7843 test -n "$NCURSES_CONFIG" && break
7846 if test -z "$NCURSES_CONFIG"; then
7847 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7848 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7850 # Extract the first word of "$ac_prog", so it can be a program name with args.
7851 set dummy $ac_prog; ac_word=$2
7852 echo "$as_me:7852: checking for $ac_word" >&5
7853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7854 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7855 echo $ECHO_N "(cached) $ECHO_C" >&6
7857 if test -n "$ac_ct_NCURSES_CONFIG"; then
7858 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7860 ac_save_IFS=$IFS; IFS=$ac_path_separator
7862 for ac_dir in $ac_dummy; do
7864 test -z "$ac_dir" && ac_dir=.
7865 $as_executable_p "$ac_dir/$ac_word" || continue
7866 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7867 echo "$as_me:7867: found $ac_dir/$ac_word" >&5
7873 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7874 if test -n "$ac_ct_NCURSES_CONFIG"; then
7875 echo "$as_me:7875: result: $ac_ct_NCURSES_CONFIG" >&5
7876 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7878 echo "$as_me:7878: result: no" >&5
7879 echo "${ECHO_T}no" >&6
7882 test -n "$ac_ct_NCURSES_CONFIG" && break
7884 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7886 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7889 if test "$NCURSES_CONFIG" != none ; then
7891 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7893 case "x$cf_add_cflags" in
7896 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7899 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'`
7900 test "$CFLAGS" != "$cf_old_cflag" || break
7902 CFLAGS="$cf_old_cflag"
7905 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7908 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'`
7909 test "$CPPFLAGS" != "$cf_old_cflag" || break
7911 CPPFLAGS="$cf_old_cflag"
7920 cf_new_extra_cppflags=
7922 for cf_add_cflags in $cf_add_cflags
7924 case "$cf_fix_cppflags" in
7926 case "$cf_add_cflags" in
7927 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7928 case "$cf_add_cflags" in
7930 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7932 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7933 && test -z "${cf_tst_cflags}" \
7934 && cf_fix_cppflags=yes
7936 if test "$cf_fix_cppflags" = yes ; then
7938 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7939 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7942 elif test "${cf_tst_cflags}" = "\"'" ; then
7944 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7945 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7955 case "$cf_add_cflags" in
7957 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7959 CPPFLAGS=`echo "$CPPFLAGS" | \
7960 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7961 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7966 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7967 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7974 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7975 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7982 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7983 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7985 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7987 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7988 && test -z "${cf_tst_cflags}" \
7989 && cf_fix_cppflags=no
7994 if test -n "$cf_new_cflags" ; then
7996 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7997 CFLAGS="${CFLAGS}$cf_new_cflags"
8001 if test -n "$cf_new_cppflags" ; then
8003 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8004 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8008 if test -n "$cf_new_extra_cppflags" ; then
8010 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8011 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8020 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8022 for cf_add_1lib in $cf_add_0lib; do
8023 for cf_add_2lib in $cf_add_libs; do
8024 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8029 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8033 # even with config script, some packages use no-override for curses.h
8035 echo "$as_me:8035: checking if we have identified curses headers" >&5
8036 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8037 if test "${cf_cv_ncurses_header+set}" = set; then
8038 echo $ECHO_N "(cached) $ECHO_C" >&6
8041 cf_cv_ncurses_header=none
8043 ncurses.h ncursesw/ncurses.h \
8044 curses.h ncursesw/curses.h
8046 cat >"conftest.$ac_ext" <<_ACEOF
8047 #line 8047 "configure"
8048 #include "confdefs.h"
8049 #include <${cf_header}>
8058 rm -f "conftest.$ac_objext"
8059 if { (eval echo "$as_me:8059: \"$ac_compile\"") >&5
8060 (eval $ac_compile) 2>&5
8062 echo "$as_me:8062: \$? = $ac_status" >&5
8063 (exit "$ac_status"); } &&
8064 { ac_try='test -s "conftest.$ac_objext"'
8065 { (eval echo "$as_me:8065: \"$ac_try\"") >&5
8068 echo "$as_me:8068: \$? = $ac_status" >&5
8069 (exit "$ac_status"); }; }; then
8070 cf_cv_ncurses_header=$cf_header; break
8072 echo "$as_me: failed program was:" >&5
8073 cat "conftest.$ac_ext" >&5
8075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8079 echo "$as_me:8079: result: $cf_cv_ncurses_header" >&5
8080 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8082 if test "$cf_cv_ncurses_header" = none ; then
8083 { { echo "$as_me:8083: error: No curses header-files found" >&5
8084 echo "$as_me: error: No curses header-files found" >&2;}
8085 { (exit 1); exit 1; }; }
8088 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8090 for ac_header in $cf_cv_ncurses_header
8092 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8093 echo "$as_me:8093: checking for $ac_header" >&5
8094 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8095 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8096 echo $ECHO_N "(cached) $ECHO_C" >&6
8098 cat >"conftest.$ac_ext" <<_ACEOF
8099 #line 8099 "configure"
8100 #include "confdefs.h"
8101 #include <$ac_header>
8103 if { (eval echo "$as_me:8103: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8104 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8106 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8108 cat conftest.err >&5
8109 echo "$as_me:8109: \$? = $ac_status" >&5
8110 (exit "$ac_status"); } >/dev/null; then
8111 if test -s conftest.err; then
8112 ac_cpp_err=$ac_c_preproc_warn_flag
8119 if test -z "$ac_cpp_err"; then
8120 eval "$as_ac_Header=yes"
8122 echo "$as_me: failed program was:" >&5
8123 cat "conftest.$ac_ext" >&5
8124 eval "$as_ac_Header=no"
8126 rm -f conftest.err "conftest.$ac_ext"
8128 echo "$as_me:8128: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8129 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8130 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8131 cat >>confdefs.h <<EOF
8132 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8138 cat >>confdefs.h <<\EOF
8142 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8144 cat >>confdefs.h <<EOF
8145 #define $cf_nculib_ROOT 1
8148 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8152 cf_ncuhdr_root=ncursesw
8154 test -n "$cf_cv_curses_dir" && \
8155 test "$cf_cv_curses_dir" != "no" && { \
8157 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8158 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8160 while test "$cf_add_incdir" != /usr/include
8162 if test -d "$cf_add_incdir"
8165 if test -n "$CFLAGS$CPPFLAGS" ; then
8166 # a loop is needed to ensure we can add subdirs of existing dirs
8167 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8168 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8169 cf_have_incdir=yes; break
8174 if test "$cf_have_incdir" = no ; then
8175 if test "$cf_add_incdir" = /usr/local/include ; then
8176 if test "$GCC" = yes
8178 cf_save_CPPFLAGS=$CPPFLAGS
8180 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8181 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8183 cat >"conftest.$ac_ext" <<_ACEOF
8184 #line 8184 "configure"
8185 #include "confdefs.h"
8195 rm -f "conftest.$ac_objext"
8196 if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
8197 (eval $ac_compile) 2>&5
8199 echo "$as_me:8199: \$? = $ac_status" >&5
8200 (exit "$ac_status"); } &&
8201 { ac_try='test -s "conftest.$ac_objext"'
8202 { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8205 echo "$as_me:8205: \$? = $ac_status" >&5
8206 (exit "$ac_status"); }; }; then
8209 echo "$as_me: failed program was:" >&5
8210 cat "conftest.$ac_ext" >&5
8213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8214 CPPFLAGS=$cf_save_CPPFLAGS
8219 if test "$cf_have_incdir" = no ; then
8220 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8222 echo "${as_me:-configure}:8222: testing adding $cf_add_incdir to include-path ..." 1>&5
8224 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8226 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8227 test "$cf_top_incdir" = "$cf_add_incdir" && break
8228 cf_add_incdir="$cf_top_incdir"
8241 echo "$as_me:8241: checking for $cf_ncuhdr_root header in include-path" >&5
8242 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8243 if test "${cf_cv_ncurses_h+set}" = set; then
8244 echo $ECHO_N "(cached) $ECHO_C" >&6
8247 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8248 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8249 for cf_header in $cf_header_list
8252 cat >"conftest.$ac_ext" <<_ACEOF
8253 #line 8253 "configure"
8254 #include "confdefs.h"
8256 #define _XOPEN_SOURCE_EXTENDED
8257 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8258 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8260 #include <$cf_header>
8265 #ifdef NCURSES_VERSION
8271 printf("%s\\n", NCURSES_VERSION);
8284 rm -f "conftest.$ac_objext"
8285 if { (eval echo "$as_me:8285: \"$ac_compile\"") >&5
8286 (eval $ac_compile) 2>&5
8288 echo "$as_me:8288: \$? = $ac_status" >&5
8289 (exit "$ac_status"); } &&
8290 { ac_try='test -s "conftest.$ac_objext"'
8291 { (eval echo "$as_me:8291: \"$ac_try\"") >&5
8294 echo "$as_me:8294: \$? = $ac_status" >&5
8295 (exit "$ac_status"); }; }; then
8296 cf_cv_ncurses_h=$cf_header
8299 echo "$as_me: failed program was:" >&5
8300 cat "conftest.$ac_ext" >&5
8303 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8305 test "$cf_cv_ncurses_h" != no && break
8309 echo "$as_me:8309: result: $cf_cv_ncurses_h" >&5
8310 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8312 if test "$cf_cv_ncurses_h" != no ; then
8313 cf_cv_ncurses_header=$cf_cv_ncurses_h
8316 echo "$as_me:8316: checking for $cf_ncuhdr_root include-path" >&5
8317 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8318 if test "${cf_cv_ncurses_h2+set}" = set; then
8319 echo $ECHO_N "(cached) $ECHO_C" >&6
8322 test -n "$verbose" && echo
8326 # collect the current set of include-directories from compiler flags
8327 cf_header_path_list=""
8328 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8329 for cf_header_path in $CPPFLAGS $CFLAGS
8331 case "$cf_header_path" in
8333 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8335 test "x$cf_header_path" != "xNONE" && \
8336 test -d "$cf_header_path" && \
8338 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8339 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8340 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8341 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8342 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8343 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"
8346 cf_header_path_list="$cf_header_path_list $cf_search"
8352 # add the variations for the package we are looking for
8356 test "x$prefix" != "xNONE" && \
8357 test -d "$prefix" && \
8359 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8360 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8361 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8362 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8363 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8364 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8367 for cf_subdir_prefix in \
8376 test "x$cf_subdir_prefix" != "x$prefix" && \
8377 test -d "$cf_subdir_prefix" && \
8378 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8379 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8380 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8381 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8382 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8383 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8384 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"
8389 test "$includedir" != NONE && \
8390 test "$includedir" != "/usr/include" && \
8391 test -d "$includedir" && {
8392 test -d "$includedir" && cf_search="$cf_search $includedir"
8393 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8396 test "$oldincludedir" != NONE && \
8397 test "$oldincludedir" != "/usr/include" && \
8398 test -d "$oldincludedir" && {
8399 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8400 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8403 cf_search="$cf_search $cf_header_path_list"
8405 test -n "$verbose" && echo "search path $cf_search"
8406 cf_save2_CPPFLAGS="$CPPFLAGS"
8407 for cf_incdir in $cf_search
8410 if test -n "$cf_incdir" ; then
8411 for cf_add_incdir in $cf_incdir
8413 while test "$cf_add_incdir" != /usr/include
8415 if test -d "$cf_add_incdir"
8418 if test -n "$CFLAGS$CPPFLAGS" ; then
8419 # a loop is needed to ensure we can add subdirs of existing dirs
8420 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8421 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8422 cf_have_incdir=yes; break
8427 if test "$cf_have_incdir" = no ; then
8428 if test "$cf_add_incdir" = /usr/local/include ; then
8429 if test "$GCC" = yes
8431 cf_save_CPPFLAGS=$CPPFLAGS
8433 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8434 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8436 cat >"conftest.$ac_ext" <<_ACEOF
8437 #line 8437 "configure"
8438 #include "confdefs.h"
8448 rm -f "conftest.$ac_objext"
8449 if { (eval echo "$as_me:8449: \"$ac_compile\"") >&5
8450 (eval $ac_compile) 2>&5
8452 echo "$as_me:8452: \$? = $ac_status" >&5
8453 (exit "$ac_status"); } &&
8454 { ac_try='test -s "conftest.$ac_objext"'
8455 { (eval echo "$as_me:8455: \"$ac_try\"") >&5
8458 echo "$as_me:8458: \$? = $ac_status" >&5
8459 (exit "$ac_status"); }; }; then
8462 echo "$as_me: failed program was:" >&5
8463 cat "conftest.$ac_ext" >&5
8466 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8467 CPPFLAGS=$cf_save_CPPFLAGS
8472 if test "$cf_have_incdir" = no ; then
8473 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8475 echo "${as_me:-configure}:8475: testing adding $cf_add_incdir to include-path ..." 1>&5
8477 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8479 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8480 test "$cf_top_incdir" = "$cf_add_incdir" && break
8481 cf_add_incdir="$cf_top_incdir"
8497 cat >"conftest.$ac_ext" <<_ACEOF
8498 #line 8498 "configure"
8499 #include "confdefs.h"
8501 #include <$cf_header>
8506 #ifdef NCURSES_VERSION
8508 printf("%s\\n", NCURSES_VERSION);
8521 rm -f "conftest.$ac_objext"
8522 if { (eval echo "$as_me:8522: \"$ac_compile\"") >&5
8523 (eval $ac_compile) 2>&5
8525 echo "$as_me:8525: \$? = $ac_status" >&5
8526 (exit "$ac_status"); } &&
8527 { ac_try='test -s "conftest.$ac_objext"'
8528 { (eval echo "$as_me:8528: \"$ac_try\"") >&5
8531 echo "$as_me:8531: \$? = $ac_status" >&5
8532 (exit "$ac_status"); }; }; then
8533 cf_cv_ncurses_h2=$cf_header
8536 echo "$as_me: failed program was:" >&5
8537 cat "conftest.$ac_ext" >&5
8540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8542 if test "$cf_cv_ncurses_h2" != no ; then
8543 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8544 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8547 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8549 CPPFLAGS="$cf_save2_CPPFLAGS"
8550 test "$cf_cv_ncurses_h2" != no && break
8552 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8552: error: not found" >&5
8553 echo "$as_me: error: not found" >&2;}
8554 { (exit 1); exit 1; }; }
8557 echo "$as_me:8557: result: $cf_cv_ncurses_h2" >&5
8558 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8560 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8561 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8562 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8563 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8566 if test -n "$cf_1st_incdir" ; then
8567 for cf_add_incdir in $cf_1st_incdir
8569 while test "$cf_add_incdir" != /usr/include
8571 if test -d "$cf_add_incdir"
8574 if test -n "$CFLAGS$CPPFLAGS" ; then
8575 # a loop is needed to ensure we can add subdirs of existing dirs
8576 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8577 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8578 cf_have_incdir=yes; break
8583 if test "$cf_have_incdir" = no ; then
8584 if test "$cf_add_incdir" = /usr/local/include ; then
8585 if test "$GCC" = yes
8587 cf_save_CPPFLAGS=$CPPFLAGS
8589 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8590 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8592 cat >"conftest.$ac_ext" <<_ACEOF
8593 #line 8593 "configure"
8594 #include "confdefs.h"
8604 rm -f "conftest.$ac_objext"
8605 if { (eval echo "$as_me:8605: \"$ac_compile\"") >&5
8606 (eval $ac_compile) 2>&5
8608 echo "$as_me:8608: \$? = $ac_status" >&5
8609 (exit "$ac_status"); } &&
8610 { ac_try='test -s "conftest.$ac_objext"'
8611 { (eval echo "$as_me:8611: \"$ac_try\"") >&5
8614 echo "$as_me:8614: \$? = $ac_status" >&5
8615 (exit "$ac_status"); }; }; then
8618 echo "$as_me: failed program was:" >&5
8619 cat "conftest.$ac_ext" >&5
8622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8623 CPPFLAGS=$cf_save_CPPFLAGS
8628 if test "$cf_have_incdir" = no ; then
8629 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8631 echo "${as_me:-configure}:8631: testing adding $cf_add_incdir to include-path ..." 1>&5
8633 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8635 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8636 test "$cf_top_incdir" = "$cf_add_incdir" && break
8637 cf_add_incdir="$cf_top_incdir"
8650 # Set definitions to allow ifdef'ing for ncurses.h
8652 case "$cf_cv_ncurses_header" in
8655 cat >>confdefs.h <<\EOF
8656 #define HAVE_NCURSES_H 1
8662 case "$cf_cv_ncurses_header" in
8663 (ncurses/curses.h|ncurses/ncurses.h)
8665 cat >>confdefs.h <<\EOF
8666 #define HAVE_NCURSES_NCURSES_H 1
8670 (ncursesw/curses.h|ncursesw/ncurses.h)
8672 cat >>confdefs.h <<\EOF
8673 #define HAVE_NCURSESW_NCURSES_H 1
8679 echo "$as_me:8679: checking for terminfo header" >&5
8680 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8681 if test "${cf_cv_term_header+set}" = set; then
8682 echo $ECHO_N "(cached) $ECHO_C" >&6
8685 case "${cf_cv_ncurses_header}" in
8686 (*/ncurses.h|*/ncursesw.h)
8687 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8690 cf_term_header=term.h
8694 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8696 cat >"conftest.$ac_ext" <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8700 #include <${cf_cv_ncurses_header:-curses.h}>
8706 int x = auto_left_margin; (void)x
8711 rm -f "conftest.$ac_objext"
8712 if { (eval echo "$as_me:8712: \"$ac_compile\"") >&5
8713 (eval $ac_compile) 2>&5
8715 echo "$as_me:8715: \$? = $ac_status" >&5
8716 (exit "$ac_status"); } &&
8717 { ac_try='test -s "conftest.$ac_objext"'
8718 { (eval echo "$as_me:8718: \"$ac_try\"") >&5
8721 echo "$as_me:8721: \$? = $ac_status" >&5
8722 (exit "$ac_status"); }; }; then
8724 cf_cv_term_header="$cf_test"
8726 echo "$as_me: failed program was:" >&5
8727 cat "conftest.$ac_ext" >&5
8729 cf_cv_term_header=unknown
8732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8733 test "$cf_cv_term_header" != unknown && break
8737 echo "$as_me:8737: result: $cf_cv_term_header" >&5
8738 echo "${ECHO_T}$cf_cv_term_header" >&6
8740 # Set definitions to allow ifdef'ing to accommodate subdirectories
8742 case "$cf_cv_term_header" in
8745 cat >>confdefs.h <<\EOF
8746 #define HAVE_TERM_H 1
8752 case "$cf_cv_term_header" in
8755 cat >>confdefs.h <<\EOF
8756 #define HAVE_NCURSES_TERM_H 1
8762 cat >>confdefs.h <<\EOF
8763 #define HAVE_NCURSESW_TERM_H 1
8769 # some applications need this, but should check for NCURSES_VERSION
8771 cat >>confdefs.h <<\EOF
8775 echo "$as_me:8775: checking for ncurses version" >&5
8776 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8777 if test "${cf_cv_ncurses_version+set}" = set; then
8778 echo $ECHO_N "(cached) $ECHO_C" >&6
8781 cf_cv_ncurses_version=no
8783 rm -f "$cf_tempfile"
8784 if test "$cross_compiling" = yes; then
8786 # This will not work if the preprocessor splits the line after the
8787 # Autoconf token. The 'unproto' program does that.
8788 cat > "conftest.$ac_ext" <<EOF
8789 #include <${cf_cv_ncurses_header:-curses.h}>
8791 #ifdef NCURSES_VERSION
8792 Autoconf NCURSES_VERSION
8800 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8801 { (eval echo "$as_me:8801: \"$cf_try\"") >&5
8804 echo "$as_me:8804: \$? = $ac_status" >&5
8805 (exit "$ac_status"); }
8806 if test -f conftest.out ; then
8807 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8808 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8813 cat >"conftest.$ac_ext" <<_ACEOF
8814 #line 8814 "configure"
8815 #include "confdefs.h"
8817 $ac_includes_default
8819 #include <${cf_cv_ncurses_header:-curses.h}>
8823 FILE *fp = fopen("$cf_tempfile", "w");
8824 #ifdef NCURSES_VERSION
8825 # ifdef NCURSES_VERSION_PATCH
8826 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8828 fprintf(fp, "%s\\n", NCURSES_VERSION);
8832 fprintf(fp, "old\\n");
8837 ${cf_cv_main_return:-return}(0);
8840 rm -f "conftest$ac_exeext"
8841 if { (eval echo "$as_me:8841: \"$ac_link\"") >&5
8842 (eval $ac_link) 2>&5
8844 echo "$as_me:8844: \$? = $ac_status" >&5
8845 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8846 { (eval echo "$as_me:8846: \"$ac_try\"") >&5
8849 echo "$as_me:8849: \$? = $ac_status" >&5
8850 (exit "$ac_status"); }; }; then
8852 cf_cv_ncurses_version=`cat $cf_tempfile`
8854 echo "$as_me: program exited with status $ac_status" >&5
8855 echo "$as_me: failed program was:" >&5
8856 cat "conftest.$ac_ext" >&5
8858 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8860 rm -f "$cf_tempfile"
8863 echo "$as_me:8863: result: $cf_cv_ncurses_version" >&5
8864 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8865 test "$cf_cv_ncurses_version" = no ||
8866 cat >>confdefs.h <<\EOF
8870 cf_nculib_root=ncursesw
8871 # This works, except for the special case where we find gpm, but
8872 # ncurses is in a nonstandard location via $LIBS, and we really want
8875 cf_ncurses_SAVE="$LIBS"
8876 echo "$as_me:8876: checking for Gpm_Open in -lgpm" >&5
8877 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8878 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8879 echo $ECHO_N "(cached) $ECHO_C" >&6
8881 ac_check_lib_save_LIBS=$LIBS
8883 cat >"conftest.$ac_ext" <<_ACEOF
8884 #line 8884 "configure"
8885 #include "confdefs.h"
8887 /* Override any gcc2 internal prototype to avoid an error. */
8891 /* We use char because int might match the return type of a gcc2
8892 builtin and then its argument prototype would still apply. */
8902 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8903 if { (eval echo "$as_me:8903: \"$ac_link\"") >&5
8904 (eval $ac_link) 2>&5
8906 echo "$as_me:8906: \$? = $ac_status" >&5
8907 (exit "$ac_status"); } &&
8908 { ac_try='test -s "conftest$ac_exeext"'
8909 { (eval echo "$as_me:8909: \"$ac_try\"") >&5
8912 echo "$as_me:8912: \$? = $ac_status" >&5
8913 (exit "$ac_status"); }; }; then
8914 ac_cv_lib_gpm_Gpm_Open=yes
8916 echo "$as_me: failed program was:" >&5
8917 cat "conftest.$ac_ext" >&5
8918 ac_cv_lib_gpm_Gpm_Open=no
8920 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8921 LIBS=$ac_check_lib_save_LIBS
8923 echo "$as_me:8923: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8924 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8925 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8926 echo "$as_me:8926: checking for initscr in -lgpm" >&5
8927 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8928 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8929 echo $ECHO_N "(cached) $ECHO_C" >&6
8931 ac_check_lib_save_LIBS=$LIBS
8933 cat >"conftest.$ac_ext" <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8937 /* Override any gcc2 internal prototype to avoid an error. */
8941 /* We use char because int might match the return type of a gcc2
8942 builtin and then its argument prototype would still apply. */
8952 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8953 if { (eval echo "$as_me:8953: \"$ac_link\"") >&5
8954 (eval $ac_link) 2>&5
8956 echo "$as_me:8956: \$? = $ac_status" >&5
8957 (exit "$ac_status"); } &&
8958 { ac_try='test -s "conftest$ac_exeext"'
8959 { (eval echo "$as_me:8959: \"$ac_try\"") >&5
8962 echo "$as_me:8962: \$? = $ac_status" >&5
8963 (exit "$ac_status"); }; }; then
8964 ac_cv_lib_gpm_initscr=yes
8966 echo "$as_me: failed program was:" >&5
8967 cat "conftest.$ac_ext" >&5
8968 ac_cv_lib_gpm_initscr=no
8970 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8971 LIBS=$ac_check_lib_save_LIBS
8973 echo "$as_me:8973: result: $ac_cv_lib_gpm_initscr" >&5
8974 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8975 if test "$ac_cv_lib_gpm_initscr" = yes; then
8976 LIBS="$cf_ncurses_SAVE"
8978 cf_ncurses_LIBS="-lgpm"
8985 # This is only necessary if you are linking against an obsolete
8986 # version of ncurses (but it should do no harm, since it is static).
8987 if test "$cf_nculib_root" = ncurses ; then
8988 echo "$as_me:8988: checking for tgoto in -lmytinfo" >&5
8989 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8990 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8991 echo $ECHO_N "(cached) $ECHO_C" >&6
8993 ac_check_lib_save_LIBS=$LIBS
8994 LIBS="-lmytinfo $LIBS"
8995 cat >"conftest.$ac_ext" <<_ACEOF
8996 #line 8996 "configure"
8997 #include "confdefs.h"
8999 /* Override any gcc2 internal prototype to avoid an error. */
9003 /* We use char because int might match the return type of a gcc2
9004 builtin and then its argument prototype would still apply. */
9014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9015 if { (eval echo "$as_me:9015: \"$ac_link\"") >&5
9016 (eval $ac_link) 2>&5
9018 echo "$as_me:9018: \$? = $ac_status" >&5
9019 (exit "$ac_status"); } &&
9020 { ac_try='test -s "conftest$ac_exeext"'
9021 { (eval echo "$as_me:9021: \"$ac_try\"") >&5
9024 echo "$as_me:9024: \$? = $ac_status" >&5
9025 (exit "$ac_status"); }; }; then
9026 ac_cv_lib_mytinfo_tgoto=yes
9028 echo "$as_me: failed program was:" >&5
9029 cat "conftest.$ac_ext" >&5
9030 ac_cv_lib_mytinfo_tgoto=no
9032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9033 LIBS=$ac_check_lib_save_LIBS
9035 echo "$as_me:9035: result: $ac_cv_lib_mytinfo_tgoto" >&5
9036 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9037 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9038 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9048 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9050 for cf_add_1lib in $cf_add_0lib; do
9051 for cf_add_2lib in $cf_add_libs; do
9052 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9057 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9061 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9067 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9069 for cf_add_1lib in $cf_add_0lib; do
9070 for cf_add_2lib in $cf_add_libs; do
9071 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9076 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9082 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9084 echo "$as_me:9084: checking for initscr" >&5
9085 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9086 if test "${ac_cv_func_initscr+set}" = set; then
9087 echo $ECHO_N "(cached) $ECHO_C" >&6
9089 cat >"conftest.$ac_ext" <<_ACEOF
9090 #line 9090 "configure"
9091 #include "confdefs.h"
9092 #define initscr autoconf_temporary
9093 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9100 /* We use char because int might match the return type of a gcc2
9101 builtin and then its argument prototype would still apply. */
9102 char initscr (void);
9108 /* The GNU C library defines stubs for functions which it implements
9109 to always fail with ENOSYS. Some functions are actually named
9110 something starting with __ and the normal name is an alias. */
9111 #if defined (__stub_initscr) || defined (__stub___initscr)
9112 #error found stub for initscr
9120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9121 if { (eval echo "$as_me:9121: \"$ac_link\"") >&5
9122 (eval $ac_link) 2>&5
9124 echo "$as_me:9124: \$? = $ac_status" >&5
9125 (exit "$ac_status"); } &&
9126 { ac_try='test -s "conftest$ac_exeext"'
9127 { (eval echo "$as_me:9127: \"$ac_try\"") >&5
9130 echo "$as_me:9130: \$? = $ac_status" >&5
9131 (exit "$ac_status"); }; }; then
9132 ac_cv_func_initscr=yes
9134 echo "$as_me: failed program was:" >&5
9135 cat "conftest.$ac_ext" >&5
9136 ac_cv_func_initscr=no
9138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9140 echo "$as_me:9140: result: $ac_cv_func_initscr" >&5
9141 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9142 if test "$ac_cv_func_initscr" = yes; then
9143 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9146 cf_save_LIBS="$LIBS"
9147 echo "$as_me:9147: checking for initscr in -l$cf_nculib_root" >&5
9148 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9149 LIBS="-l$cf_nculib_root $LIBS"
9150 cat >"conftest.$ac_ext" <<_ACEOF
9151 #line 9151 "configure"
9152 #include "confdefs.h"
9153 #include <${cf_cv_ncurses_header:-curses.h}>
9162 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9163 if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
9164 (eval $ac_link) 2>&5
9166 echo "$as_me:9166: \$? = $ac_status" >&5
9167 (exit "$ac_status"); } &&
9168 { ac_try='test -s "conftest$ac_exeext"'
9169 { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9172 echo "$as_me:9172: \$? = $ac_status" >&5
9173 (exit "$ac_status"); }; }; then
9174 echo "$as_me:9174: result: yes" >&5
9175 echo "${ECHO_T}yes" >&6
9176 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9179 echo "$as_me: failed program was:" >&5
9180 cat "conftest.$ac_ext" >&5
9181 echo "$as_me:9181: result: no" >&5
9182 echo "${ECHO_T}no" >&6
9185 cf_library_path_list=""
9186 if test -n "${LDFLAGS}${LIBS}" ; then
9187 for cf_library_path in $LDFLAGS $LIBS
9189 case "$cf_library_path" in
9191 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9193 test "x$cf_library_path" != "xNONE" && \
9194 test -d "$cf_library_path" && \
9196 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9197 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9198 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9199 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9200 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9201 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"
9204 cf_library_path_list="$cf_library_path_list $cf_search"
9212 test "x$prefix" != "xNONE" && \
9213 test -d "$prefix" && \
9215 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9216 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9217 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9218 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9219 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9220 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9223 for cf_subdir_prefix in \
9232 test "x$cf_subdir_prefix" != "x$prefix" && \
9233 test -d "$cf_subdir_prefix" && \
9234 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9235 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9236 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9237 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9238 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9239 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9240 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"
9245 cf_search="$cf_library_path_list $cf_search"
9247 for cf_libdir in $cf_search
9249 echo "$as_me:9249: checking for -l$cf_nculib_root in $cf_libdir" >&5
9250 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9251 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9252 cat >"conftest.$ac_ext" <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 #include <${cf_cv_ncurses_header:-curses.h}>
9264 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9265 if { (eval echo "$as_me:9265: \"$ac_link\"") >&5
9266 (eval $ac_link) 2>&5
9268 echo "$as_me:9268: \$? = $ac_status" >&5
9269 (exit "$ac_status"); } &&
9270 { ac_try='test -s "conftest$ac_exeext"'
9271 { (eval echo "$as_me:9271: \"$ac_try\"") >&5
9274 echo "$as_me:9274: \$? = $ac_status" >&5
9275 (exit "$ac_status"); }; }; then
9276 echo "$as_me:9276: result: yes" >&5
9277 echo "${ECHO_T}yes" >&6
9278 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9281 echo "$as_me: failed program was:" >&5
9282 cat "conftest.$ac_ext" >&5
9283 echo "$as_me:9283: result: no" >&5
9284 echo "${ECHO_T}no" >&6
9285 LIBS="$cf_save_LIBS"
9287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9295 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9297 if test "$cf_found_library" = no ; then
9298 { { echo "$as_me:9298: error: Cannot link $cf_nculib_root library" >&5
9299 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9300 { (exit 1); exit 1; }; }
9305 if test -n "$cf_ncurses_LIBS" ; then
9306 echo "$as_me:9306: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9307 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9308 cf_ncurses_SAVE="$LIBS"
9309 for p in $cf_ncurses_LIBS ; do
9310 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9311 if test "$q" != "$LIBS" ; then
9315 cat >"conftest.$ac_ext" <<_ACEOF
9316 #line 9316 "configure"
9317 #include "confdefs.h"
9318 #include <${cf_cv_ncurses_header:-curses.h}>
9322 initscr(); mousemask(0,0); tigetstr((char *)0);
9327 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9328 if { (eval echo "$as_me:9328: \"$ac_link\"") >&5
9329 (eval $ac_link) 2>&5
9331 echo "$as_me:9331: \$? = $ac_status" >&5
9332 (exit "$ac_status"); } &&
9333 { ac_try='test -s "conftest$ac_exeext"'
9334 { (eval echo "$as_me:9334: \"$ac_try\"") >&5
9337 echo "$as_me:9337: \$? = $ac_status" >&5
9338 (exit "$ac_status"); }; }; then
9339 echo "$as_me:9339: result: yes" >&5
9340 echo "${ECHO_T}yes" >&6
9342 echo "$as_me: failed program was:" >&5
9343 cat "conftest.$ac_ext" >&5
9344 echo "$as_me:9344: result: no" >&5
9345 echo "${ECHO_T}no" >&6
9346 LIBS="$cf_ncurses_SAVE"
9348 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9351 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9353 cat >>confdefs.h <<EOF
9354 #define $cf_nculib_ROOT 1
9364 cf_ncuconfig_root=ncurses
9365 cf_have_ncuconfig=no
9367 if test "x${PKG_CONFIG:=none}" != xnone; then
9368 echo "$as_me:9368: checking pkg-config for $cf_ncuconfig_root" >&5
9369 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9370 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9371 echo "$as_me:9371: result: yes" >&5
9372 echo "${ECHO_T}yes" >&6
9374 echo "$as_me:9374: checking if the $cf_ncuconfig_root package files work" >&5
9375 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9376 cf_have_ncuconfig=unknown
9378 cf_save_CFLAGS="$CFLAGS"
9379 cf_save_CPPFLAGS="$CPPFLAGS"
9380 cf_save_LIBS="$LIBS"
9382 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9383 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9385 # while -W for passing linker flags is prevalent, it is not "standard".
9386 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9387 # incompatible _and_ non-standard -W option which gives an error. Work
9388 # around that pitfall.
9389 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9395 cf_new_extra_cppflags=
9397 for cf_add_cflags in $cf_pkg_cflags
9399 case "$cf_fix_cppflags" in
9401 case "$cf_add_cflags" in
9402 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9403 case "$cf_add_cflags" in
9405 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9407 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9408 && test -z "${cf_tst_cflags}" \
9409 && cf_fix_cppflags=yes
9411 if test "$cf_fix_cppflags" = yes ; then
9413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9417 elif test "${cf_tst_cflags}" = "\"'" ; then
9419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9430 case "$cf_add_cflags" in
9432 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9434 CPPFLAGS=`echo "$CPPFLAGS" | \
9435 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9436 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9441 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9442 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9449 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9450 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9460 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9462 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9463 && test -z "${cf_tst_cflags}" \
9464 && cf_fix_cppflags=no
9469 if test -n "$cf_new_cflags" ; then
9471 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9472 CFLAGS="${CFLAGS}$cf_new_cflags"
9476 if test -n "$cf_new_cppflags" ; then
9478 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9479 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9483 if test -n "$cf_new_extra_cppflags" ; then
9485 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9486 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9493 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9495 for cf_add_1lib in $cf_add_0lib; do
9496 for cf_add_2lib in $cf_add_libs; do
9497 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9502 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9506 cat >"conftest.$ac_ext" <<_ACEOF
9507 #line 9507 "configure"
9508 #include "confdefs.h"
9509 #include <${cf_cv_ncurses_header:-curses.h}>
9513 initscr(); mousemask(0,0); tigetstr((char *)0);
9518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9519 if { (eval echo "$as_me:9519: \"$ac_link\"") >&5
9520 (eval $ac_link) 2>&5
9522 echo "$as_me:9522: \$? = $ac_status" >&5
9523 (exit "$ac_status"); } &&
9524 { ac_try='test -s "conftest$ac_exeext"'
9525 { (eval echo "$as_me:9525: \"$ac_try\"") >&5
9528 echo "$as_me:9528: \$? = $ac_status" >&5
9529 (exit "$ac_status"); }; }; then
9530 if test "$cross_compiling" = yes; then
9531 cf_test_ncuconfig=maybe
9533 cat >"conftest.$ac_ext" <<_ACEOF
9534 #line 9534 "configure"
9535 #include "confdefs.h"
9536 #include <${cf_cv_ncurses_header:-curses.h}>
9538 { const char *xx = curses_version(); return (xx == 0); }
9540 rm -f "conftest$ac_exeext"
9541 if { (eval echo "$as_me:9541: \"$ac_link\"") >&5
9542 (eval $ac_link) 2>&5
9544 echo "$as_me:9544: \$? = $ac_status" >&5
9545 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9546 { (eval echo "$as_me:9546: \"$ac_try\"") >&5
9549 echo "$as_me:9549: \$? = $ac_status" >&5
9550 (exit "$ac_status"); }; }; then
9551 cf_test_ncuconfig=yes
9553 echo "$as_me: program exited with status $ac_status" >&5
9554 echo "$as_me: failed program was:" >&5
9555 cat "conftest.$ac_ext" >&5
9556 cf_test_ncuconfig=no
9558 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9561 echo "$as_me: failed program was:" >&5
9562 cat "conftest.$ac_ext" >&5
9563 cf_test_ncuconfig=no
9565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9567 CFLAGS="$cf_save_CFLAGS"
9568 CPPFLAGS="$cf_save_CPPFLAGS"
9569 LIBS="$cf_save_LIBS"
9571 if test "x$cf_test_ncuconfig" != xyes; then
9572 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9573 cf_pkg_cflags="$cf_temp"
9574 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9575 cf_pkg_libs="$cf_temp"
9580 for cf_add_cflags in $cf_pkg_cflags
9582 case "x$cf_add_cflags" in
9585 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9588 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'`
9589 test "$CFLAGS" != "$cf_old_cflag" || break
9591 CFLAGS="$cf_old_cflag"
9594 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9597 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'`
9598 test "$CPPFLAGS" != "$cf_old_cflag" || break
9600 CPPFLAGS="$cf_old_cflag"
9609 cf_new_extra_cppflags=
9611 for cf_add_cflags in $cf_add_cflags
9613 case "$cf_fix_cppflags" in
9615 case "$cf_add_cflags" in
9616 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9617 case "$cf_add_cflags" in
9619 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9621 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9622 && test -z "${cf_tst_cflags}" \
9623 && cf_fix_cppflags=yes
9625 if test "$cf_fix_cppflags" = yes ; then
9627 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9628 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9631 elif test "${cf_tst_cflags}" = "\"'" ; then
9633 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9634 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9644 case "$cf_add_cflags" in
9646 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9648 CPPFLAGS=`echo "$CPPFLAGS" | \
9649 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9650 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9655 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9656 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9663 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9664 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9671 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9672 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9674 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9676 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9677 && test -z "${cf_tst_cflags}" \
9678 && cf_fix_cppflags=no
9683 if test -n "$cf_new_cflags" ; then
9685 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9686 CFLAGS="${CFLAGS}$cf_new_cflags"
9690 if test -n "$cf_new_cppflags" ; then
9692 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9693 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9697 if test -n "$cf_new_extra_cppflags" ; then
9699 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9700 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9709 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9711 for cf_add_1lib in $cf_add_0lib; do
9712 for cf_add_2lib in $cf_add_libs; do
9713 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9718 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9722 cat >"conftest.$ac_ext" <<_ACEOF
9723 #line 9723 "configure"
9724 #include "confdefs.h"
9725 #include <${cf_cv_ncurses_header:-curses.h}>
9729 initscr(); mousemask(0,0); tigetstr((char *)0);
9734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9735 if { (eval echo "$as_me:9735: \"$ac_link\"") >&5
9736 (eval $ac_link) 2>&5
9738 echo "$as_me:9738: \$? = $ac_status" >&5
9739 (exit "$ac_status"); } &&
9740 { ac_try='test -s "conftest$ac_exeext"'
9741 { (eval echo "$as_me:9741: \"$ac_try\"") >&5
9744 echo "$as_me:9744: \$? = $ac_status" >&5
9745 (exit "$ac_status"); }; }; then
9746 if test "$cross_compiling" = yes; then
9747 cf_have_ncuconfig=maybe
9749 cat >"conftest.$ac_ext" <<_ACEOF
9750 #line 9750 "configure"
9751 #include "confdefs.h"
9752 #include <${cf_cv_ncurses_header:-curses.h}>
9754 { const char *xx = curses_version(); return (xx == 0); }
9756 rm -f "conftest$ac_exeext"
9757 if { (eval echo "$as_me:9757: \"$ac_link\"") >&5
9758 (eval $ac_link) 2>&5
9760 echo "$as_me:9760: \$? = $ac_status" >&5
9761 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9762 { (eval echo "$as_me:9762: \"$ac_try\"") >&5
9765 echo "$as_me:9765: \$? = $ac_status" >&5
9766 (exit "$ac_status"); }; }; then
9767 cf_have_ncuconfig=yes
9769 echo "$as_me: program exited with status $ac_status" >&5
9770 echo "$as_me: failed program was:" >&5
9771 cat "conftest.$ac_ext" >&5
9772 cf_have_ncuconfig=no
9774 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9777 echo "$as_me: failed program was:" >&5
9778 cat "conftest.$ac_ext" >&5
9779 cf_have_ncuconfig=no
9781 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9782 echo "$as_me:9782: result: $cf_have_ncuconfig" >&5
9783 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9784 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9785 if test "$cf_have_ncuconfig" != "yes"
9787 CPPFLAGS="$cf_save_CPPFLAGS"
9788 LIBS="$cf_save_LIBS"
9789 NCURSES_CONFIG_PKG=none
9792 cat >>confdefs.h <<\EOF
9796 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9798 echo "$as_me:9798: checking for terminfo header" >&5
9799 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9800 if test "${cf_cv_term_header+set}" = set; then
9801 echo $ECHO_N "(cached) $ECHO_C" >&6
9804 case "${cf_cv_ncurses_header}" in
9805 (*/ncurses.h|*/ncursesw.h)
9806 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9809 cf_term_header=term.h
9813 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9815 cat >"conftest.$ac_ext" <<_ACEOF
9816 #line 9816 "configure"
9817 #include "confdefs.h"
9819 #include <${cf_cv_ncurses_header:-curses.h}>
9825 int x = auto_left_margin; (void)x
9830 rm -f "conftest.$ac_objext"
9831 if { (eval echo "$as_me:9831: \"$ac_compile\"") >&5
9832 (eval $ac_compile) 2>&5
9834 echo "$as_me:9834: \$? = $ac_status" >&5
9835 (exit "$ac_status"); } &&
9836 { ac_try='test -s "conftest.$ac_objext"'
9837 { (eval echo "$as_me:9837: \"$ac_try\"") >&5
9840 echo "$as_me:9840: \$? = $ac_status" >&5
9841 (exit "$ac_status"); }; }; then
9843 cf_cv_term_header="$cf_test"
9845 echo "$as_me: failed program was:" >&5
9846 cat "conftest.$ac_ext" >&5
9848 cf_cv_term_header=unknown
9851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9852 test "$cf_cv_term_header" != unknown && break
9856 echo "$as_me:9856: result: $cf_cv_term_header" >&5
9857 echo "${ECHO_T}$cf_cv_term_header" >&6
9859 # Set definitions to allow ifdef'ing to accommodate subdirectories
9861 case "$cf_cv_term_header" in
9864 cat >>confdefs.h <<\EOF
9865 #define HAVE_TERM_H 1
9871 case "$cf_cv_term_header" in
9874 cat >>confdefs.h <<\EOF
9875 #define HAVE_NCURSES_TERM_H 1
9881 cat >>confdefs.h <<\EOF
9882 #define HAVE_NCURSESW_TERM_H 1
9891 echo "$as_me:9891: result: no" >&5
9892 echo "${ECHO_T}no" >&6
9893 NCURSES_CONFIG_PKG=none
9896 NCURSES_CONFIG_PKG=none
9899 if test "x$cf_have_ncuconfig" = "xno"; then
9900 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9902 if test -n "$ac_tool_prefix"; then
9903 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9905 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9906 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9907 echo "$as_me:9907: checking for $ac_word" >&5
9908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9909 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9910 echo $ECHO_N "(cached) $ECHO_C" >&6
9912 if test -n "$NCURSES_CONFIG"; then
9913 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9915 ac_save_IFS=$IFS; IFS=$ac_path_separator
9917 for ac_dir in $ac_dummy; do
9919 test -z "$ac_dir" && ac_dir=.
9920 $as_executable_p "$ac_dir/$ac_word" || continue
9921 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9922 echo "$as_me:9922: found $ac_dir/$ac_word" >&5
9928 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9929 if test -n "$NCURSES_CONFIG"; then
9930 echo "$as_me:9930: result: $NCURSES_CONFIG" >&5
9931 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9933 echo "$as_me:9933: result: no" >&5
9934 echo "${ECHO_T}no" >&6
9937 test -n "$NCURSES_CONFIG" && break
9940 if test -z "$NCURSES_CONFIG"; then
9941 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9942 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9944 # Extract the first word of "$ac_prog", so it can be a program name with args.
9945 set dummy $ac_prog; ac_word=$2
9946 echo "$as_me:9946: checking for $ac_word" >&5
9947 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9948 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9949 echo $ECHO_N "(cached) $ECHO_C" >&6
9951 if test -n "$ac_ct_NCURSES_CONFIG"; then
9952 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9954 ac_save_IFS=$IFS; IFS=$ac_path_separator
9956 for ac_dir in $ac_dummy; do
9958 test -z "$ac_dir" && ac_dir=.
9959 $as_executable_p "$ac_dir/$ac_word" || continue
9960 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9961 echo "$as_me:9961: found $ac_dir/$ac_word" >&5
9967 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9968 if test -n "$ac_ct_NCURSES_CONFIG"; then
9969 echo "$as_me:9969: result: $ac_ct_NCURSES_CONFIG" >&5
9970 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9972 echo "$as_me:9972: result: no" >&5
9973 echo "${ECHO_T}no" >&6
9976 test -n "$ac_ct_NCURSES_CONFIG" && break
9978 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9980 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9983 if test "$NCURSES_CONFIG" != none ; then
9985 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9987 case "x$cf_add_cflags" in
9990 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9993 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'`
9994 test "$CFLAGS" != "$cf_old_cflag" || break
9996 CFLAGS="$cf_old_cflag"
9999 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10002 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'`
10003 test "$CPPFLAGS" != "$cf_old_cflag" || break
10005 CPPFLAGS="$cf_old_cflag"
10014 cf_new_extra_cppflags=
10016 for cf_add_cflags in $cf_add_cflags
10018 case "$cf_fix_cppflags" in
10020 case "$cf_add_cflags" in
10021 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10022 case "$cf_add_cflags" in
10024 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10026 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10027 && test -z "${cf_tst_cflags}" \
10028 && cf_fix_cppflags=yes
10030 if test "$cf_fix_cppflags" = yes ; then
10032 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10033 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10036 elif test "${cf_tst_cflags}" = "\"'" ; then
10038 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10039 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10045 case "$CPPFLAGS" in
10049 case "$cf_add_cflags" in
10051 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10053 CPPFLAGS=`echo "$CPPFLAGS" | \
10054 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10055 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10060 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10061 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10068 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10069 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10076 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10077 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10079 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10081 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10082 && test -z "${cf_tst_cflags}" \
10083 && cf_fix_cppflags=no
10088 if test -n "$cf_new_cflags" ; then
10090 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10091 CFLAGS="${CFLAGS}$cf_new_cflags"
10095 if test -n "$cf_new_cppflags" ; then
10097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10098 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10102 if test -n "$cf_new_extra_cppflags" ; then
10104 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10105 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10111 cf_add_libs="$LIBS"
10114 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10115 # filter duplicates
10116 for cf_add_1lib in $cf_add_0lib; do
10117 for cf_add_2lib in $cf_add_libs; do
10118 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10123 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10125 LIBS="$cf_add_libs"
10127 # even with config script, some packages use no-override for curses.h
10129 echo "$as_me:10129: checking if we have identified curses headers" >&5
10130 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10131 if test "${cf_cv_ncurses_header+set}" = set; then
10132 echo $ECHO_N "(cached) $ECHO_C" >&6
10135 cf_cv_ncurses_header=none
10137 ncurses.h ncurses/ncurses.h \
10138 curses.h ncurses/curses.h
10140 cat >"conftest.$ac_ext" <<_ACEOF
10141 #line 10141 "configure"
10142 #include "confdefs.h"
10143 #include <${cf_header}>
10147 initscr(); endwin()
10152 rm -f "conftest.$ac_objext"
10153 if { (eval echo "$as_me:10153: \"$ac_compile\"") >&5
10154 (eval $ac_compile) 2>&5
10156 echo "$as_me:10156: \$? = $ac_status" >&5
10157 (exit "$ac_status"); } &&
10158 { ac_try='test -s "conftest.$ac_objext"'
10159 { (eval echo "$as_me:10159: \"$ac_try\"") >&5
10160 (eval $ac_try) 2>&5
10162 echo "$as_me:10162: \$? = $ac_status" >&5
10163 (exit "$ac_status"); }; }; then
10164 cf_cv_ncurses_header=$cf_header; break
10166 echo "$as_me: failed program was:" >&5
10167 cat "conftest.$ac_ext" >&5
10169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10173 echo "$as_me:10173: result: $cf_cv_ncurses_header" >&5
10174 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10176 if test "$cf_cv_ncurses_header" = none ; then
10177 { { echo "$as_me:10177: error: No curses header-files found" >&5
10178 echo "$as_me: error: No curses header-files found" >&2;}
10179 { (exit 1); exit 1; }; }
10182 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10184 for ac_header in $cf_cv_ncurses_header
10186 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10187 echo "$as_me:10187: checking for $ac_header" >&5
10188 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10189 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10190 echo $ECHO_N "(cached) $ECHO_C" >&6
10192 cat >"conftest.$ac_ext" <<_ACEOF
10193 #line 10193 "configure"
10194 #include "confdefs.h"
10195 #include <$ac_header>
10197 if { (eval echo "$as_me:10197: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10198 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10200 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10202 cat conftest.err >&5
10203 echo "$as_me:10203: \$? = $ac_status" >&5
10204 (exit "$ac_status"); } >/dev/null; then
10205 if test -s conftest.err; then
10206 ac_cpp_err=$ac_c_preproc_warn_flag
10213 if test -z "$ac_cpp_err"; then
10214 eval "$as_ac_Header=yes"
10216 echo "$as_me: failed program was:" >&5
10217 cat "conftest.$ac_ext" >&5
10218 eval "$as_ac_Header=no"
10220 rm -f conftest.err "conftest.$ac_ext"
10222 echo "$as_me:10222: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10223 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10224 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10225 cat >>confdefs.h <<EOF
10226 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10232 cat >>confdefs.h <<\EOF
10236 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10238 cat >>confdefs.h <<EOF
10239 #define $cf_nculib_ROOT 1
10242 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10246 cf_ncuhdr_root=ncurses
10248 test -n "$cf_cv_curses_dir" && \
10249 test "$cf_cv_curses_dir" != "no" && { \
10251 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10252 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10254 while test "$cf_add_incdir" != /usr/include
10256 if test -d "$cf_add_incdir"
10259 if test -n "$CFLAGS$CPPFLAGS" ; then
10260 # a loop is needed to ensure we can add subdirs of existing dirs
10261 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10262 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10263 cf_have_incdir=yes; break
10268 if test "$cf_have_incdir" = no ; then
10269 if test "$cf_add_incdir" = /usr/local/include ; then
10270 if test "$GCC" = yes
10272 cf_save_CPPFLAGS=$CPPFLAGS
10274 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10275 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10277 cat >"conftest.$ac_ext" <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10289 rm -f "conftest.$ac_objext"
10290 if { (eval echo "$as_me:10290: \"$ac_compile\"") >&5
10291 (eval $ac_compile) 2>&5
10293 echo "$as_me:10293: \$? = $ac_status" >&5
10294 (exit "$ac_status"); } &&
10295 { ac_try='test -s "conftest.$ac_objext"'
10296 { (eval echo "$as_me:10296: \"$ac_try\"") >&5
10297 (eval $ac_try) 2>&5
10299 echo "$as_me:10299: \$? = $ac_status" >&5
10300 (exit "$ac_status"); }; }; then
10303 echo "$as_me: failed program was:" >&5
10304 cat "conftest.$ac_ext" >&5
10307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10308 CPPFLAGS=$cf_save_CPPFLAGS
10313 if test "$cf_have_incdir" = no ; then
10314 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10316 echo "${as_me:-configure}:10316: testing adding $cf_add_incdir to include-path ..." 1>&5
10318 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10320 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10321 test "$cf_top_incdir" = "$cf_add_incdir" && break
10322 cf_add_incdir="$cf_top_incdir"
10335 echo "$as_me:10335: checking for $cf_ncuhdr_root header in include-path" >&5
10336 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10337 if test "${cf_cv_ncurses_h+set}" = set; then
10338 echo $ECHO_N "(cached) $ECHO_C" >&6
10341 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10342 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10343 for cf_header in $cf_header_list
10346 cat >"conftest.$ac_ext" <<_ACEOF
10347 #line 10347 "configure"
10348 #include "confdefs.h"
10350 #include <$cf_header>
10355 #ifdef NCURSES_VERSION
10357 printf("%s\\n", NCURSES_VERSION);
10370 rm -f "conftest.$ac_objext"
10371 if { (eval echo "$as_me:10371: \"$ac_compile\"") >&5
10372 (eval $ac_compile) 2>&5
10374 echo "$as_me:10374: \$? = $ac_status" >&5
10375 (exit "$ac_status"); } &&
10376 { ac_try='test -s "conftest.$ac_objext"'
10377 { (eval echo "$as_me:10377: \"$ac_try\"") >&5
10378 (eval $ac_try) 2>&5
10380 echo "$as_me:10380: \$? = $ac_status" >&5
10381 (exit "$ac_status"); }; }; then
10382 cf_cv_ncurses_h=$cf_header
10385 echo "$as_me: failed program was:" >&5
10386 cat "conftest.$ac_ext" >&5
10389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10391 test "$cf_cv_ncurses_h" != no && break
10395 echo "$as_me:10395: result: $cf_cv_ncurses_h" >&5
10396 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10398 if test "$cf_cv_ncurses_h" != no ; then
10399 cf_cv_ncurses_header=$cf_cv_ncurses_h
10402 echo "$as_me:10402: checking for $cf_ncuhdr_root include-path" >&5
10403 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10404 if test "${cf_cv_ncurses_h2+set}" = set; then
10405 echo $ECHO_N "(cached) $ECHO_C" >&6
10408 test -n "$verbose" && echo
10412 # collect the current set of include-directories from compiler flags
10413 cf_header_path_list=""
10414 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10415 for cf_header_path in $CPPFLAGS $CFLAGS
10417 case "$cf_header_path" in
10419 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10421 test "x$cf_header_path" != "xNONE" && \
10422 test -d "$cf_header_path" && \
10424 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10425 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10426 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10427 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10428 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10429 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"
10432 cf_header_path_list="$cf_header_path_list $cf_search"
10438 # add the variations for the package we are looking for
10442 test "x$prefix" != "xNONE" && \
10443 test -d "$prefix" && \
10445 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10446 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10447 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10448 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10449 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10450 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10453 for cf_subdir_prefix in \
10462 test "x$cf_subdir_prefix" != "x$prefix" && \
10463 test -d "$cf_subdir_prefix" && \
10464 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10465 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10466 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10467 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10468 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10469 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10470 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"
10475 test "$includedir" != NONE && \
10476 test "$includedir" != "/usr/include" && \
10477 test -d "$includedir" && {
10478 test -d "$includedir" && cf_search="$cf_search $includedir"
10479 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10482 test "$oldincludedir" != NONE && \
10483 test "$oldincludedir" != "/usr/include" && \
10484 test -d "$oldincludedir" && {
10485 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10486 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10489 cf_search="$cf_search $cf_header_path_list"
10491 test -n "$verbose" && echo "search path $cf_search"
10492 cf_save2_CPPFLAGS="$CPPFLAGS"
10493 for cf_incdir in $cf_search
10496 if test -n "$cf_incdir" ; then
10497 for cf_add_incdir in $cf_incdir
10499 while test "$cf_add_incdir" != /usr/include
10501 if test -d "$cf_add_incdir"
10504 if test -n "$CFLAGS$CPPFLAGS" ; then
10505 # a loop is needed to ensure we can add subdirs of existing dirs
10506 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10507 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10508 cf_have_incdir=yes; break
10513 if test "$cf_have_incdir" = no ; then
10514 if test "$cf_add_incdir" = /usr/local/include ; then
10515 if test "$GCC" = yes
10517 cf_save_CPPFLAGS=$CPPFLAGS
10519 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10520 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10522 cat >"conftest.$ac_ext" <<_ACEOF
10523 #line 10523 "configure"
10524 #include "confdefs.h"
10534 rm -f "conftest.$ac_objext"
10535 if { (eval echo "$as_me:10535: \"$ac_compile\"") >&5
10536 (eval $ac_compile) 2>&5
10538 echo "$as_me:10538: \$? = $ac_status" >&5
10539 (exit "$ac_status"); } &&
10540 { ac_try='test -s "conftest.$ac_objext"'
10541 { (eval echo "$as_me:10541: \"$ac_try\"") >&5
10542 (eval $ac_try) 2>&5
10544 echo "$as_me:10544: \$? = $ac_status" >&5
10545 (exit "$ac_status"); }; }; then
10548 echo "$as_me: failed program was:" >&5
10549 cat "conftest.$ac_ext" >&5
10552 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10553 CPPFLAGS=$cf_save_CPPFLAGS
10558 if test "$cf_have_incdir" = no ; then
10559 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10561 echo "${as_me:-configure}:10561: testing adding $cf_add_incdir to include-path ..." 1>&5
10563 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10565 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10566 test "$cf_top_incdir" = "$cf_add_incdir" && break
10567 cf_add_incdir="$cf_top_incdir"
10583 cat >"conftest.$ac_ext" <<_ACEOF
10584 #line 10584 "configure"
10585 #include "confdefs.h"
10587 #include <$cf_header>
10592 #ifdef NCURSES_VERSION
10594 printf("%s\\n", NCURSES_VERSION);
10607 rm -f "conftest.$ac_objext"
10608 if { (eval echo "$as_me:10608: \"$ac_compile\"") >&5
10609 (eval $ac_compile) 2>&5
10611 echo "$as_me:10611: \$? = $ac_status" >&5
10612 (exit "$ac_status"); } &&
10613 { ac_try='test -s "conftest.$ac_objext"'
10614 { (eval echo "$as_me:10614: \"$ac_try\"") >&5
10615 (eval $ac_try) 2>&5
10617 echo "$as_me:10617: \$? = $ac_status" >&5
10618 (exit "$ac_status"); }; }; then
10619 cf_cv_ncurses_h2=$cf_header
10622 echo "$as_me: failed program was:" >&5
10623 cat "conftest.$ac_ext" >&5
10624 cf_cv_ncurses_h2=no
10626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10628 if test "$cf_cv_ncurses_h2" != no ; then
10629 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10630 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10633 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10635 CPPFLAGS="$cf_save2_CPPFLAGS"
10636 test "$cf_cv_ncurses_h2" != no && break
10638 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10638: error: not found" >&5
10639 echo "$as_me: error: not found" >&2;}
10640 { (exit 1); exit 1; }; }
10643 echo "$as_me:10643: result: $cf_cv_ncurses_h2" >&5
10644 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10646 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10647 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10648 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10649 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10652 if test -n "$cf_1st_incdir" ; then
10653 for cf_add_incdir in $cf_1st_incdir
10655 while test "$cf_add_incdir" != /usr/include
10657 if test -d "$cf_add_incdir"
10660 if test -n "$CFLAGS$CPPFLAGS" ; then
10661 # a loop is needed to ensure we can add subdirs of existing dirs
10662 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10663 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10664 cf_have_incdir=yes; break
10669 if test "$cf_have_incdir" = no ; then
10670 if test "$cf_add_incdir" = /usr/local/include ; then
10671 if test "$GCC" = yes
10673 cf_save_CPPFLAGS=$CPPFLAGS
10675 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10676 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10678 cat >"conftest.$ac_ext" <<_ACEOF
10679 #line 10679 "configure"
10680 #include "confdefs.h"
10690 rm -f "conftest.$ac_objext"
10691 if { (eval echo "$as_me:10691: \"$ac_compile\"") >&5
10692 (eval $ac_compile) 2>&5
10694 echo "$as_me:10694: \$? = $ac_status" >&5
10695 (exit "$ac_status"); } &&
10696 { ac_try='test -s "conftest.$ac_objext"'
10697 { (eval echo "$as_me:10697: \"$ac_try\"") >&5
10698 (eval $ac_try) 2>&5
10700 echo "$as_me:10700: \$? = $ac_status" >&5
10701 (exit "$ac_status"); }; }; then
10704 echo "$as_me: failed program was:" >&5
10705 cat "conftest.$ac_ext" >&5
10708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10709 CPPFLAGS=$cf_save_CPPFLAGS
10714 if test "$cf_have_incdir" = no ; then
10715 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10717 echo "${as_me:-configure}:10717: testing adding $cf_add_incdir to include-path ..." 1>&5
10719 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10721 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10722 test "$cf_top_incdir" = "$cf_add_incdir" && break
10723 cf_add_incdir="$cf_top_incdir"
10736 # Set definitions to allow ifdef'ing for ncurses.h
10738 case "$cf_cv_ncurses_header" in
10741 cat >>confdefs.h <<\EOF
10742 #define HAVE_NCURSES_H 1
10748 case "$cf_cv_ncurses_header" in
10749 (ncurses/curses.h|ncurses/ncurses.h)
10751 cat >>confdefs.h <<\EOF
10752 #define HAVE_NCURSES_NCURSES_H 1
10756 (ncursesw/curses.h|ncursesw/ncurses.h)
10758 cat >>confdefs.h <<\EOF
10759 #define HAVE_NCURSESW_NCURSES_H 1
10765 echo "$as_me:10765: checking for terminfo header" >&5
10766 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10767 if test "${cf_cv_term_header+set}" = set; then
10768 echo $ECHO_N "(cached) $ECHO_C" >&6
10771 case "${cf_cv_ncurses_header}" in
10772 (*/ncurses.h|*/ncursesw.h)
10773 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10776 cf_term_header=term.h
10780 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10782 cat >"conftest.$ac_ext" <<_ACEOF
10783 #line 10783 "configure"
10784 #include "confdefs.h"
10786 #include <${cf_cv_ncurses_header:-curses.h}>
10787 #include <$cf_test>
10792 int x = auto_left_margin; (void)x
10797 rm -f "conftest.$ac_objext"
10798 if { (eval echo "$as_me:10798: \"$ac_compile\"") >&5
10799 (eval $ac_compile) 2>&5
10801 echo "$as_me:10801: \$? = $ac_status" >&5
10802 (exit "$ac_status"); } &&
10803 { ac_try='test -s "conftest.$ac_objext"'
10804 { (eval echo "$as_me:10804: \"$ac_try\"") >&5
10805 (eval $ac_try) 2>&5
10807 echo "$as_me:10807: \$? = $ac_status" >&5
10808 (exit "$ac_status"); }; }; then
10810 cf_cv_term_header="$cf_test"
10812 echo "$as_me: failed program was:" >&5
10813 cat "conftest.$ac_ext" >&5
10815 cf_cv_term_header=unknown
10818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10819 test "$cf_cv_term_header" != unknown && break
10823 echo "$as_me:10823: result: $cf_cv_term_header" >&5
10824 echo "${ECHO_T}$cf_cv_term_header" >&6
10826 # Set definitions to allow ifdef'ing to accommodate subdirectories
10828 case "$cf_cv_term_header" in
10831 cat >>confdefs.h <<\EOF
10832 #define HAVE_TERM_H 1
10838 case "$cf_cv_term_header" in
10841 cat >>confdefs.h <<\EOF
10842 #define HAVE_NCURSES_TERM_H 1
10848 cat >>confdefs.h <<\EOF
10849 #define HAVE_NCURSESW_TERM_H 1
10855 # some applications need this, but should check for NCURSES_VERSION
10857 cat >>confdefs.h <<\EOF
10861 echo "$as_me:10861: checking for ncurses version" >&5
10862 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10863 if test "${cf_cv_ncurses_version+set}" = set; then
10864 echo $ECHO_N "(cached) $ECHO_C" >&6
10867 cf_cv_ncurses_version=no
10869 rm -f "$cf_tempfile"
10870 if test "$cross_compiling" = yes; then
10872 # This will not work if the preprocessor splits the line after the
10873 # Autoconf token. The 'unproto' program does that.
10874 cat > "conftest.$ac_ext" <<EOF
10875 #include <${cf_cv_ncurses_header:-curses.h}>
10877 #ifdef NCURSES_VERSION
10878 Autoconf NCURSES_VERSION
10886 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10887 { (eval echo "$as_me:10887: \"$cf_try\"") >&5
10888 (eval $cf_try) 2>&5
10890 echo "$as_me:10890: \$? = $ac_status" >&5
10891 (exit "$ac_status"); }
10892 if test -f conftest.out ; then
10893 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10894 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10899 cat >"conftest.$ac_ext" <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10903 $ac_includes_default
10905 #include <${cf_cv_ncurses_header:-curses.h}>
10909 FILE *fp = fopen("$cf_tempfile", "w");
10910 #ifdef NCURSES_VERSION
10911 # ifdef NCURSES_VERSION_PATCH
10912 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10914 fprintf(fp, "%s\\n", NCURSES_VERSION);
10917 # ifdef __NCURSES_H
10918 fprintf(fp, "old\\n");
10923 ${cf_cv_main_return:-return}(0);
10926 rm -f "conftest$ac_exeext"
10927 if { (eval echo "$as_me:10927: \"$ac_link\"") >&5
10928 (eval $ac_link) 2>&5
10930 echo "$as_me:10930: \$? = $ac_status" >&5
10931 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10932 { (eval echo "$as_me:10932: \"$ac_try\"") >&5
10933 (eval $ac_try) 2>&5
10935 echo "$as_me:10935: \$? = $ac_status" >&5
10936 (exit "$ac_status"); }; }; then
10938 cf_cv_ncurses_version=`cat $cf_tempfile`
10940 echo "$as_me: program exited with status $ac_status" >&5
10941 echo "$as_me: failed program was:" >&5
10942 cat "conftest.$ac_ext" >&5
10944 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10946 rm -f "$cf_tempfile"
10949 echo "$as_me:10949: result: $cf_cv_ncurses_version" >&5
10950 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10951 test "$cf_cv_ncurses_version" = no ||
10952 cat >>confdefs.h <<\EOF
10956 cf_nculib_root=ncurses
10957 # This works, except for the special case where we find gpm, but
10958 # ncurses is in a nonstandard location via $LIBS, and we really want
10961 cf_ncurses_SAVE="$LIBS"
10962 echo "$as_me:10962: checking for Gpm_Open in -lgpm" >&5
10963 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10964 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10965 echo $ECHO_N "(cached) $ECHO_C" >&6
10967 ac_check_lib_save_LIBS=$LIBS
10969 cat >"conftest.$ac_ext" <<_ACEOF
10970 #line 10970 "configure"
10971 #include "confdefs.h"
10973 /* Override any gcc2 internal prototype to avoid an error. */
10977 /* We use char because int might match the return type of a gcc2
10978 builtin and then its argument prototype would still apply. */
10988 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10989 if { (eval echo "$as_me:10989: \"$ac_link\"") >&5
10990 (eval $ac_link) 2>&5
10992 echo "$as_me:10992: \$? = $ac_status" >&5
10993 (exit "$ac_status"); } &&
10994 { ac_try='test -s "conftest$ac_exeext"'
10995 { (eval echo "$as_me:10995: \"$ac_try\"") >&5
10996 (eval $ac_try) 2>&5
10998 echo "$as_me:10998: \$? = $ac_status" >&5
10999 (exit "$ac_status"); }; }; then
11000 ac_cv_lib_gpm_Gpm_Open=yes
11002 echo "$as_me: failed program was:" >&5
11003 cat "conftest.$ac_ext" >&5
11004 ac_cv_lib_gpm_Gpm_Open=no
11006 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11007 LIBS=$ac_check_lib_save_LIBS
11009 echo "$as_me:11009: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11010 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11011 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11012 echo "$as_me:11012: checking for initscr in -lgpm" >&5
11013 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11014 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11015 echo $ECHO_N "(cached) $ECHO_C" >&6
11017 ac_check_lib_save_LIBS=$LIBS
11019 cat >"conftest.$ac_ext" <<_ACEOF
11020 #line 11020 "configure"
11021 #include "confdefs.h"
11023 /* Override any gcc2 internal prototype to avoid an error. */
11027 /* We use char because int might match the return type of a gcc2
11028 builtin and then its argument prototype would still apply. */
11038 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11039 if { (eval echo "$as_me:11039: \"$ac_link\"") >&5
11040 (eval $ac_link) 2>&5
11042 echo "$as_me:11042: \$? = $ac_status" >&5
11043 (exit "$ac_status"); } &&
11044 { ac_try='test -s "conftest$ac_exeext"'
11045 { (eval echo "$as_me:11045: \"$ac_try\"") >&5
11046 (eval $ac_try) 2>&5
11048 echo "$as_me:11048: \$? = $ac_status" >&5
11049 (exit "$ac_status"); }; }; then
11050 ac_cv_lib_gpm_initscr=yes
11052 echo "$as_me: failed program was:" >&5
11053 cat "conftest.$ac_ext" >&5
11054 ac_cv_lib_gpm_initscr=no
11056 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11057 LIBS=$ac_check_lib_save_LIBS
11059 echo "$as_me:11059: result: $ac_cv_lib_gpm_initscr" >&5
11060 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11061 if test "$ac_cv_lib_gpm_initscr" = yes; then
11062 LIBS="$cf_ncurses_SAVE"
11064 cf_ncurses_LIBS="-lgpm"
11071 # This is only necessary if you are linking against an obsolete
11072 # version of ncurses (but it should do no harm, since it is static).
11073 if test "$cf_nculib_root" = ncurses ; then
11074 echo "$as_me:11074: checking for tgoto in -lmytinfo" >&5
11075 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11076 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11077 echo $ECHO_N "(cached) $ECHO_C" >&6
11079 ac_check_lib_save_LIBS=$LIBS
11080 LIBS="-lmytinfo $LIBS"
11081 cat >"conftest.$ac_ext" <<_ACEOF
11082 #line 11082 "configure"
11083 #include "confdefs.h"
11085 /* Override any gcc2 internal prototype to avoid an error. */
11089 /* We use char because int might match the return type of a gcc2
11090 builtin and then its argument prototype would still apply. */
11100 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11101 if { (eval echo "$as_me:11101: \"$ac_link\"") >&5
11102 (eval $ac_link) 2>&5
11104 echo "$as_me:11104: \$? = $ac_status" >&5
11105 (exit "$ac_status"); } &&
11106 { ac_try='test -s "conftest$ac_exeext"'
11107 { (eval echo "$as_me:11107: \"$ac_try\"") >&5
11108 (eval $ac_try) 2>&5
11110 echo "$as_me:11110: \$? = $ac_status" >&5
11111 (exit "$ac_status"); }; }; then
11112 ac_cv_lib_mytinfo_tgoto=yes
11114 echo "$as_me: failed program was:" >&5
11115 cat "conftest.$ac_ext" >&5
11116 ac_cv_lib_mytinfo_tgoto=no
11118 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11119 LIBS=$ac_check_lib_save_LIBS
11121 echo "$as_me:11121: result: $ac_cv_lib_mytinfo_tgoto" >&5
11122 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11123 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11124 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11131 cf_add_libs="$LIBS"
11134 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11135 # filter duplicates
11136 for cf_add_1lib in $cf_add_0lib; do
11137 for cf_add_2lib in $cf_add_libs; do
11138 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11143 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11145 LIBS="$cf_add_libs"
11147 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11150 cf_add_libs="$LIBS"
11153 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11154 # filter duplicates
11155 for cf_add_1lib in $cf_add_0lib; do
11156 for cf_add_2lib in $cf_add_libs; do
11157 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11162 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11164 LIBS="$cf_add_libs"
11168 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11170 echo "$as_me:11170: checking for initscr" >&5
11171 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11172 if test "${ac_cv_func_initscr+set}" = set; then
11173 echo $ECHO_N "(cached) $ECHO_C" >&6
11175 cat >"conftest.$ac_ext" <<_ACEOF
11176 #line 11176 "configure"
11177 #include "confdefs.h"
11178 #define initscr autoconf_temporary
11179 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11186 /* We use char because int might match the return type of a gcc2
11187 builtin and then its argument prototype would still apply. */
11188 char initscr (void);
11194 /* The GNU C library defines stubs for functions which it implements
11195 to always fail with ENOSYS. Some functions are actually named
11196 something starting with __ and the normal name is an alias. */
11197 #if defined (__stub_initscr) || defined (__stub___initscr)
11198 #error found stub for initscr
11206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11207 if { (eval echo "$as_me:11207: \"$ac_link\"") >&5
11208 (eval $ac_link) 2>&5
11210 echo "$as_me:11210: \$? = $ac_status" >&5
11211 (exit "$ac_status"); } &&
11212 { ac_try='test -s "conftest$ac_exeext"'
11213 { (eval echo "$as_me:11213: \"$ac_try\"") >&5
11214 (eval $ac_try) 2>&5
11216 echo "$as_me:11216: \$? = $ac_status" >&5
11217 (exit "$ac_status"); }; }; then
11218 ac_cv_func_initscr=yes
11220 echo "$as_me: failed program was:" >&5
11221 cat "conftest.$ac_ext" >&5
11222 ac_cv_func_initscr=no
11224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11226 echo "$as_me:11226: result: $ac_cv_func_initscr" >&5
11227 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11228 if test "$ac_cv_func_initscr" = yes; then
11229 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11232 cf_save_LIBS="$LIBS"
11233 echo "$as_me:11233: checking for initscr in -l$cf_nculib_root" >&5
11234 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11235 LIBS="-l$cf_nculib_root $LIBS"
11236 cat >"conftest.$ac_ext" <<_ACEOF
11237 #line 11237 "configure"
11238 #include "confdefs.h"
11239 #include <${cf_cv_ncurses_header:-curses.h}>
11248 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11249 if { (eval echo "$as_me:11249: \"$ac_link\"") >&5
11250 (eval $ac_link) 2>&5
11252 echo "$as_me:11252: \$? = $ac_status" >&5
11253 (exit "$ac_status"); } &&
11254 { ac_try='test -s "conftest$ac_exeext"'
11255 { (eval echo "$as_me:11255: \"$ac_try\"") >&5
11256 (eval $ac_try) 2>&5
11258 echo "$as_me:11258: \$? = $ac_status" >&5
11259 (exit "$ac_status"); }; }; then
11260 echo "$as_me:11260: result: yes" >&5
11261 echo "${ECHO_T}yes" >&6
11262 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11265 echo "$as_me: failed program was:" >&5
11266 cat "conftest.$ac_ext" >&5
11267 echo "$as_me:11267: result: no" >&5
11268 echo "${ECHO_T}no" >&6
11271 cf_library_path_list=""
11272 if test -n "${LDFLAGS}${LIBS}" ; then
11273 for cf_library_path in $LDFLAGS $LIBS
11275 case "$cf_library_path" in
11277 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11279 test "x$cf_library_path" != "xNONE" && \
11280 test -d "$cf_library_path" && \
11282 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11283 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11284 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11285 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11286 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11287 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"
11290 cf_library_path_list="$cf_library_path_list $cf_search"
11298 test "x$prefix" != "xNONE" && \
11299 test -d "$prefix" && \
11301 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11302 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11303 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11304 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11305 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11306 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11309 for cf_subdir_prefix in \
11318 test "x$cf_subdir_prefix" != "x$prefix" && \
11319 test -d "$cf_subdir_prefix" && \
11320 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11321 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11322 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11323 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11324 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11325 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11326 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"
11331 cf_search="$cf_library_path_list $cf_search"
11333 for cf_libdir in $cf_search
11335 echo "$as_me:11335: checking for -l$cf_nculib_root in $cf_libdir" >&5
11336 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11337 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11338 cat >"conftest.$ac_ext" <<_ACEOF
11339 #line 11339 "configure"
11340 #include "confdefs.h"
11341 #include <${cf_cv_ncurses_header:-curses.h}>
11350 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11351 if { (eval echo "$as_me:11351: \"$ac_link\"") >&5
11352 (eval $ac_link) 2>&5
11354 echo "$as_me:11354: \$? = $ac_status" >&5
11355 (exit "$ac_status"); } &&
11356 { ac_try='test -s "conftest$ac_exeext"'
11357 { (eval echo "$as_me:11357: \"$ac_try\"") >&5
11358 (eval $ac_try) 2>&5
11360 echo "$as_me:11360: \$? = $ac_status" >&5
11361 (exit "$ac_status"); }; }; then
11362 echo "$as_me:11362: result: yes" >&5
11363 echo "${ECHO_T}yes" >&6
11364 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11367 echo "$as_me: failed program was:" >&5
11368 cat "conftest.$ac_ext" >&5
11369 echo "$as_me:11369: result: no" >&5
11370 echo "${ECHO_T}no" >&6
11371 LIBS="$cf_save_LIBS"
11373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11381 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11383 if test "$cf_found_library" = no ; then
11384 { { echo "$as_me:11384: error: Cannot link $cf_nculib_root library" >&5
11385 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11386 { (exit 1); exit 1; }; }
11391 if test -n "$cf_ncurses_LIBS" ; then
11392 echo "$as_me:11392: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11393 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11394 cf_ncurses_SAVE="$LIBS"
11395 for p in $cf_ncurses_LIBS ; do
11396 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11397 if test "$q" != "$LIBS" ; then
11401 cat >"conftest.$ac_ext" <<_ACEOF
11402 #line 11402 "configure"
11403 #include "confdefs.h"
11404 #include <${cf_cv_ncurses_header:-curses.h}>
11408 initscr(); mousemask(0,0); tigetstr((char *)0);
11413 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11414 if { (eval echo "$as_me:11414: \"$ac_link\"") >&5
11415 (eval $ac_link) 2>&5
11417 echo "$as_me:11417: \$? = $ac_status" >&5
11418 (exit "$ac_status"); } &&
11419 { ac_try='test -s "conftest$ac_exeext"'
11420 { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421 (eval $ac_try) 2>&5
11423 echo "$as_me:11423: \$? = $ac_status" >&5
11424 (exit "$ac_status"); }; }; then
11425 echo "$as_me:11425: result: yes" >&5
11426 echo "${ECHO_T}yes" >&6
11428 echo "$as_me: failed program was:" >&5
11429 cat "conftest.$ac_ext" >&5
11430 echo "$as_me:11430: result: no" >&5
11431 echo "${ECHO_T}no" >&6
11432 LIBS="$cf_ncurses_SAVE"
11434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11437 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11439 cat >>confdefs.h <<EOF
11440 #define $cf_nculib_ROOT 1
11445 NCURSES_CONFIG=none
11450 if test "$NCURSES_CONFIG_PKG" != none ; then
11451 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11453 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11454 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11455 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11457 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11458 if test -z "$cf_cv_abi_version"
11460 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11463 elif test "$NCURSES_CONFIG" != none ; then
11465 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11467 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11468 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11469 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11471 # ABI version is not available from headers
11472 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11476 for cf_name in MAJOR MINOR PATCH
11478 cat >conftest.$ac_ext <<CF_EOF
11479 #include <${cf_cv_ncurses_header:-curses.h}>
11480 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11482 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11483 { (eval echo "$as_me:11483: \"$cf_try\"") >&5
11484 (eval $cf_try) 2>&5
11486 echo "$as_me:11486: \$? = $ac_status" >&5
11487 (exit "$ac_status"); }
11488 if test -f conftest.out ; then
11489 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11490 eval NCURSES_$cf_name=\"$cf_result\"
11491 # cat conftest.$ac_ext
11496 cf_cv_abi_version=${NCURSES_MAJOR}
11500 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11502 cf_cv_timestamp=`date`
11504 echo "$as_me:11504: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11505 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11507 echo "$as_me:11507: checking if you want to have a library-prefix" >&5
11508 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11510 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11511 if test "${with_lib_prefix+set}" = set; then
11512 withval="$with_lib_prefix"
11513 with_lib_prefix=$withval
11515 with_lib_prefix=auto
11517 echo "$as_me:11517: result: $with_lib_prefix" >&5
11518 echo "${ECHO_T}$with_lib_prefix" >&6
11520 if test "$with_lib_prefix" = auto
11523 case "$cf_cv_system_name" in
11525 if test "$DFT_LWR_MODEL" = libtool; then
11534 (*) LIB_PREFIX='lib'
11537 cf_prefix=$LIB_PREFIX
11539 elif test "$with_lib_prefix" = no
11543 LIB_PREFIX=$with_lib_prefix
11548 ###############################################################################
11550 if test X"$CC_G_OPT" = X"" ; then
11552 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11555 echo "$as_me:11555: checking for default loader flags" >&5
11556 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11557 case $DFT_LWR_MODEL in
11558 (normal) LD_MODEL='' ;;
11559 (debug) LD_MODEL=$CC_G_OPT ;;
11560 (profile) LD_MODEL='-pg';;
11561 (shared) LD_MODEL='' ;;
11563 echo "$as_me:11563: result: $LD_MODEL" >&5
11564 echo "${ECHO_T}$LD_MODEL" >&6
11567 if test "x$cf_cv_enable_rpath" != xno
11569 echo "$as_me:11569: checking for an rpath option" >&5
11570 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11571 case "$cf_cv_system_name" in
11573 if test "$GCC" = yes; then
11574 LD_RPATH_OPT="-Wl,-rpath,"
11576 LD_RPATH_OPT="-rpath "
11579 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11580 LD_RPATH_OPT="-Wl,-rpath,"
11582 (openbsd[2-9].*|mirbsd*)
11583 LD_RPATH_OPT="-Wl,-rpath,"
11586 LD_RPATH_OPT="-rpath "
11589 LD_RPATH_OPT="-Wl,-rpath,"
11592 LD_RPATH_OPT="-rpath "
11600 echo "$as_me:11600: result: $LD_RPATH_OPT" >&5
11601 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11603 case "x$LD_RPATH_OPT" in
11605 echo "$as_me:11605: checking if we need a space after rpath option" >&5
11606 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11607 cf_save_LIBS="$LIBS"
11609 cf_add_libs="$LIBS"
11612 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11613 # filter duplicates
11614 for cf_add_1lib in $cf_add_0lib; do
11615 for cf_add_2lib in $cf_add_libs; do
11616 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11621 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11623 LIBS="$cf_add_libs"
11625 cat >"conftest.$ac_ext" <<_ACEOF
11626 #line 11626 "configure"
11627 #include "confdefs.h"
11637 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11638 if { (eval echo "$as_me:11638: \"$ac_link\"") >&5
11639 (eval $ac_link) 2>&5
11641 echo "$as_me:11641: \$? = $ac_status" >&5
11642 (exit "$ac_status"); } &&
11643 { ac_try='test -s "conftest$ac_exeext"'
11644 { (eval echo "$as_me:11644: \"$ac_try\"") >&5
11645 (eval $ac_try) 2>&5
11647 echo "$as_me:11647: \$? = $ac_status" >&5
11648 (exit "$ac_status"); }; }; then
11651 echo "$as_me: failed program was:" >&5
11652 cat "conftest.$ac_ext" >&5
11655 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11656 LIBS="$cf_save_LIBS"
11657 echo "$as_me:11657: result: $cf_rpath_space" >&5
11658 echo "${ECHO_T}$cf_rpath_space" >&6
11659 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11668 INSTALL_LIB="-m 644"
11669 : ${rel_builddir:=.}
11675 cf_cv_do_symlinks=no
11677 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11679 echo "$as_me:11679: checking if release/abi version should be used for shared libs" >&5
11680 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11682 # Check whether --with-shlib-version or --without-shlib-version was given.
11683 if test "${with_shlib_version+set}" = set; then
11684 withval="$with_shlib_version"
11685 test -z "$withval" && withval=auto
11688 cf_cv_shlib_version=auto
11691 cf_cv_shlib_version=$withval
11694 echo "$as_me:11694: result: $withval" >&5
11695 echo "${ECHO_T}$withval" >&6
11696 { { echo "$as_me:11696: error: option value must be one of: rel, abi, or auto" >&5
11697 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11698 { (exit 1); exit 1; }; }
11703 cf_cv_shlib_version=auto
11705 echo "$as_me:11705: result: $cf_cv_shlib_version" >&5
11706 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11708 cf_cv_rm_so_locs=no
11711 # Some less-capable ports of gcc support only -fpic
11715 if test "$GCC" = yes
11719 case "$cf_cv_system_name" in
11720 (*linux*) # e.g., PGI compiler
11726 if test "$cf_try_fPIC" = yes
11728 echo "$as_me:11728: checking which $CC option to use" >&5
11729 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11730 cf_save_CFLAGS="$CFLAGS"
11731 for CC_SHARED_OPTS in -fPIC -fpic ''
11733 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11734 cat >"conftest.$ac_ext" <<_ACEOF
11735 #line 11735 "configure"
11736 #include "confdefs.h"
11746 rm -f "conftest.$ac_objext"
11747 if { (eval echo "$as_me:11747: \"$ac_compile\"") >&5
11748 (eval $ac_compile) 2>&5
11750 echo "$as_me:11750: \$? = $ac_status" >&5
11751 (exit "$ac_status"); } &&
11752 { ac_try='test -s "conftest.$ac_objext"'
11753 { (eval echo "$as_me:11753: \"$ac_try\"") >&5
11754 (eval $ac_try) 2>&5
11756 echo "$as_me:11756: \$? = $ac_status" >&5
11757 (exit "$ac_status"); }; }; then
11760 echo "$as_me: failed program was:" >&5
11761 cat "conftest.$ac_ext" >&5
11763 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11765 echo "$as_me:11765: result: $CC_SHARED_OPTS" >&5
11766 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11767 CFLAGS="$cf_save_CFLAGS"
11770 cf_cv_shlib_version_infix=no
11772 case "$cf_cv_system_name" in
11773 (aix4.3-9*|aix[5-7]*)
11774 if test "$GCC" = yes; then
11775 CC_SHARED_OPTS='-Wl,-brtl'
11776 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11778 CC_SHARED_OPTS='-brtl'
11779 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11780 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11784 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11788 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11789 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11790 cf_cv_shlib_version=cygdll
11791 cf_cv_shlib_version_infix=cygdll
11794 cat >mk_shared_lib.sh <<-CF_EOF
11797 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11800 Linking shared library
11801 ** SHARED_LIB \$SHARED_LIB
11802 ** IMPORT_LIB \$IMPORT_LIB
11804 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11806 chmod +x mk_shared_lib.sh
11810 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11811 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11812 cf_cv_shlib_version=msysdll
11813 cf_cv_shlib_version_infix=msysdll
11816 cat >mk_shared_lib.sh <<-CF_EOF
11819 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11822 Linking shared library
11823 ** SHARED_LIB \$SHARED_LIB
11824 ** IMPORT_LIB \$IMPORT_LIB
11826 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11828 chmod +x mk_shared_lib.sh
11831 cf_try_cflags="no-cpp-precomp"
11832 CC_SHARED_OPTS="-dynamic"
11833 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11834 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11835 cf_cv_shlib_version_infix=yes
11836 echo "$as_me:11836: checking if ld -search_paths_first works" >&5
11837 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11838 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11839 echo $ECHO_N "(cached) $ECHO_C" >&6
11842 cf_save_LDFLAGS=$LDFLAGS
11843 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11844 cat >"conftest.$ac_ext" <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11856 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11857 if { (eval echo "$as_me:11857: \"$ac_link\"") >&5
11858 (eval $ac_link) 2>&5
11860 echo "$as_me:11860: \$? = $ac_status" >&5
11861 (exit "$ac_status"); } &&
11862 { ac_try='test -s "conftest$ac_exeext"'
11863 { (eval echo "$as_me:11863: \"$ac_try\"") >&5
11864 (eval $ac_try) 2>&5
11866 echo "$as_me:11866: \$? = $ac_status" >&5
11867 (exit "$ac_status"); }; }; then
11868 cf_cv_ldflags_search_paths_first=yes
11870 echo "$as_me: failed program was:" >&5
11871 cat "conftest.$ac_ext" >&5
11872 cf_cv_ldflags_search_paths_first=no
11874 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11875 LDFLAGS=$cf_save_LDFLAGS
11877 echo "$as_me:11877: result: $cf_cv_ldflags_search_paths_first" >&5
11878 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11879 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11880 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11885 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11886 if test "$cf_cv_shlib_version" = rel; then
11887 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11889 cf_cv_shared_soname='`basename $@`'
11892 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11895 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11896 if test "$GCC" != yes; then
11897 CC_SHARED_OPTS='+Z'
11899 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11900 INSTALL_LIB="-m 555"
11903 # (tested with gcc 2.7.2 -- I don't have c89)
11904 if test "$GCC" = yes; then
11905 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11907 CC_SHARED_OPTS='+Z'
11908 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11910 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11911 # HP-UX shared libraries must be executable, and should be
11912 # readonly to exploit a quirk in the memory manager.
11913 INSTALL_LIB="-m 555"
11916 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11917 if test "$cf_cv_shlib_version" = rel; then
11918 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11920 cf_shared_soname='`basename $@`'
11923 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11926 if test "$cf_cv_enable_rpath" = yes ; then
11927 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11929 # tested with IRIX 5.2 and 'cc'.
11930 if test "$GCC" != yes; then
11931 CC_SHARED_OPTS='-KPIC'
11932 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11934 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11936 cf_cv_rm_so_locs=yes
11938 (linux*|gnu*|k*bsd*-gnu)
11939 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11940 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11941 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11943 if test "$cf_cv_enable_rpath" = yes ; then
11944 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11947 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11948 if test "$cf_cv_shlib_version" = rel; then
11949 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11951 cf_cv_shared_soname='`basename $@`'
11954 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11957 cf_cv_shlib_version=msvcdll
11958 cf_cv_shlib_version_infix=msvcdll
11961 if test "$DFT_LWR_MODEL" = "shared" ; then
11962 LOCAL_LDFLAGS="-link -dll"
11963 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11964 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11967 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11968 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11969 cat >mk_shared_lib.sh <<-CF_EOF
11972 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11977 Linking shared library
11978 ** SHARED LIB \$SHARED_LIB
11979 ** IMPORT_LIB \$IMPORT_LIB
11981 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11982 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11983 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11985 chmod +x mk_shared_lib.sh
11986 cat >mk_prog.sh <<-CF_EOF
11989 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11992 ldopts=("/subsystem:console")
11995 while test \$# -gt 0; do
11998 # ignore -link argument
12001 # ignore runtime-library option
12016 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12019 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12025 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12026 ldopts+=("\${linkarg}")
12034 ldopts+=("-out:\$1")
12043 if [ "\$isdll" -ne 0 ]; then
12044 for lib in \${libs[*]}; do
12045 ldopts+=("\$lib.dll.lib")
12048 for lib in \${libs[*]}; do
12049 ldopts+=("\$lib.lib")
12054 ** ld options: "\${ldopts[@]}"
12056 exec \$LD \${ldopts[@]}
12058 chmod +x mk_prog.sh
12059 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12060 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12063 cf_cv_shlib_version=mingw
12064 cf_cv_shlib_version_infix=mingw
12067 if test "$DFT_LWR_MODEL" = "shared" ; then
12068 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12069 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12070 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12073 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12074 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12075 cat >mk_shared_lib.sh <<-CF_EOF
12078 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12081 Linking shared library
12082 ** SHARED_LIB \$SHARED_LIB
12083 ** IMPORT_LIB \$IMPORT_LIB
12085 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12087 chmod +x mk_shared_lib.sh
12089 (openbsd[2-9].*|mirbsd*)
12090 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12091 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12092 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12094 if test "$cf_cv_enable_rpath" = yes ; then
12095 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12097 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12099 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12100 if test "$cf_cv_shlib_version" = rel; then
12101 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12103 cf_cv_shared_soname='`basename $@`'
12106 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12110 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12114 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12116 (nto-qnx*|openbsd*|freebsd[12].*)
12117 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12118 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12119 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12121 (dragonfly*|freebsd*)
12122 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12123 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12124 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12125 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12126 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12129 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12130 if test "$cf_cv_shlib_version" = rel; then
12131 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12133 cf_cv_shared_soname='`basename $@`'
12136 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12139 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12140 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12141 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12142 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12143 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12144 if test "$cf_cv_shlib_version" = auto; then
12145 if test -f /usr/libexec/ld.elf_so; then
12146 cf_cv_shlib_version=abi
12148 cf_cv_shlib_version=rel
12152 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12153 if test "$cf_cv_shlib_version" = rel; then
12154 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12156 cf_cv_shared_soname='`basename $@`'
12159 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12161 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12165 # tested with OSF/1 V3.2 and 'cc'
12166 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12167 # link with shared libs).
12168 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12171 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12174 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12175 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12176 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12177 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12179 cf_cv_rm_so_locs=yes
12181 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12182 # tested with osr5.0.5
12183 if test "$GCC" != yes; then
12184 CC_SHARED_OPTS='-belf -KPIC'
12186 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12187 if test "$cf_cv_enable_rpath" = yes ; then
12188 # only way is to set LD_RUN_PATH but no switch for it
12191 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12192 LINK_PROGS='LD_RUN_PATH=${libdir}'
12193 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12196 # tested with SunOS 4.1.1 and gcc 2.7.0
12197 if test "$GCC" != yes; then
12198 CC_SHARED_OPTS='-KPIC'
12200 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12201 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12204 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12205 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12206 if test "$DFT_LWR_MODEL" = "shared" ; then
12207 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12208 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12210 if test "$cf_cv_enable_rpath" = yes ; then
12211 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12214 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12215 if test "$cf_cv_shlib_version" = rel; then
12216 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12218 cf_cv_shared_soname='`basename $@`'
12221 if test "$GCC" != yes; then
12222 cf_save_CFLAGS="$CFLAGS"
12223 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12225 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12226 cat >"conftest.$ac_ext" <<_ACEOF
12227 #line 12227 "configure"
12228 #include "confdefs.h"
12233 printf("Hello\\n");
12238 rm -f "conftest.$ac_objext"
12239 if { (eval echo "$as_me:12239: \"$ac_compile\"") >&5
12240 (eval $ac_compile) 2>&5
12242 echo "$as_me:12242: \$? = $ac_status" >&5
12243 (exit "$ac_status"); } &&
12244 { ac_try='test -s "conftest.$ac_objext"'
12245 { (eval echo "$as_me:12245: \"$ac_try\"") >&5
12246 (eval $ac_try) 2>&5
12248 echo "$as_me:12248: \$? = $ac_status" >&5
12249 (exit "$ac_status"); }; }; then
12252 echo "$as_me: failed program was:" >&5
12253 cat "conftest.$ac_ext" >&5
12255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12257 CFLAGS="$cf_save_CFLAGS"
12258 CC_SHARED_OPTS=$cf_shared_opts
12259 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12261 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12264 (sysv5uw7*|unix_sv*)
12265 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12266 if test "$GCC" != yes; then
12267 CC_SHARED_OPTS='-KPIC'
12269 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12272 CC_SHARED_OPTS='unknown'
12273 MK_SHARED_LIB='echo unknown'
12277 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12278 case "$cf_cv_shlib_version" in
12280 case "$MK_SHARED_LIB" in
12282 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12285 { echo "$as_me:12285: WARNING: ignored --with-shlib-version" >&5
12286 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12292 if test -n "$cf_try_cflags"
12294 cat > conftest.$ac_ext <<EOF
12295 #line 12295 "${as_me:-configure}"
12297 int main(int argc, char *argv[])
12299 printf("hello\\n");
12300 return (argv[argc-1] == 0) ;
12303 cf_save_CFLAGS="$CFLAGS"
12304 for cf_opt in $cf_try_cflags
12306 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12307 echo "$as_me:12307: checking if CFLAGS option -$cf_opt works" >&5
12308 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12309 if { (eval echo "$as_me:12309: \"$ac_compile\"") >&5
12310 (eval $ac_compile) 2>&5
12312 echo "$as_me:12312: \$? = $ac_status" >&5
12313 (exit "$ac_status"); }; then
12314 echo "$as_me:12314: result: yes" >&5
12315 echo "${ECHO_T}yes" >&6
12316 cf_save_CFLAGS="$CFLAGS"
12318 echo "$as_me:12318: result: no" >&5
12319 echo "${ECHO_T}no" >&6
12322 CFLAGS="$cf_save_CFLAGS"
12325 # RPATH_LIST is a colon-separated list of directories
12326 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12327 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12329 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12331 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12333 echo "${as_me:-configure}:12333: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12335 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12337 echo "${as_me:-configure}:12337: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12339 # The test/sample programs in the original tree link using rpath option.
12340 # Make it optional for packagers.
12341 if test -n "$LOCAL_LDFLAGS"
12343 echo "$as_me:12343: checking if you want to link sample programs with rpath option" >&5
12344 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12346 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12347 if test "${enable_rpath_link+set}" = set; then
12348 enableval="$enable_rpath_link"
12349 with_rpath_link=$enableval
12351 with_rpath_link=yes
12353 echo "$as_me:12353: result: $with_rpath_link" >&5
12354 echo "${ECHO_T}$with_rpath_link" >&6
12355 if test "$with_rpath_link" = no
12362 ###############################################################################
12364 ### use option --enable-broken-linker to force on use of broken-linker support
12366 echo "$as_me:12366: checking if you want broken-linker support code" >&5
12367 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12369 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12370 if test "${enable_broken_linker+set}" = set; then
12371 enableval="$enable_broken_linker"
12372 with_broken_linker=$enableval
12374 with_broken_linker=no
12376 echo "$as_me:12376: result: $with_broken_linker" >&5
12377 echo "${ECHO_T}$with_broken_linker" >&6
12379 : "${BROKEN_LINKER:=0}"
12380 if test "x$with_broken_linker" = xyes ; then
12382 cat >>confdefs.h <<\EOF
12383 #define BROKEN_LINKER 1
12389 # Check to define _XOPEN_SOURCE "automatically"
12391 echo "$as_me:12391: checking if the POSIX test-macros are already defined" >&5
12392 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12393 if test "${cf_cv_posix_visible+set}" = set; then
12394 echo $ECHO_N "(cached) $ECHO_C" >&6
12397 cat >"conftest.$ac_ext" <<_ACEOF
12398 #line 12398 "configure"
12399 #include "confdefs.h"
12405 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12406 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12407 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12408 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12409 #error conflicting symbols found
12416 rm -f "conftest.$ac_objext"
12417 if { (eval echo "$as_me:12417: \"$ac_compile\"") >&5
12418 (eval $ac_compile) 2>&5
12420 echo "$as_me:12420: \$? = $ac_status" >&5
12421 (exit "$ac_status"); } &&
12422 { ac_try='test -s "conftest.$ac_objext"'
12423 { (eval echo "$as_me:12423: \"$ac_try\"") >&5
12424 (eval $ac_try) 2>&5
12426 echo "$as_me:12426: \$? = $ac_status" >&5
12427 (exit "$ac_status"); }; }; then
12428 cf_cv_posix_visible=no
12430 echo "$as_me: failed program was:" >&5
12431 cat "conftest.$ac_ext" >&5
12432 cf_cv_posix_visible=yes
12434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12437 echo "$as_me:12437: result: $cf_cv_posix_visible" >&5
12438 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12440 if test "$cf_cv_posix_visible" = no; then
12442 cf_XOPEN_SOURCE=600
12443 cf_POSIX_C_SOURCE=199506L
12448 cf_xopen_source="-D_ALL_SOURCE"
12451 cf_XOPEN_SOURCE=600
12454 cf_xopen_source="-D_APPLE_C_SOURCE"
12457 cf_xopen_source="-D_DARWIN_C_SOURCE"
12460 (freebsd*|dragonfly*|midnightbsd*)
12461 # 5.x headers associate
12462 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12463 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12464 cf_POSIX_C_SOURCE=200112L
12465 cf_XOPEN_SOURCE=600
12466 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12469 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12472 cf_xopen_source="-D_HPUX_SOURCE"
12475 cf_xopen_source="-D_SGI_SOURCE"
12478 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12480 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12482 echo "$as_me:12482: checking if this is the GNU C library" >&5
12483 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12484 if test "${cf_cv_gnu_library+set}" = set; then
12485 echo $ECHO_N "(cached) $ECHO_C" >&6
12488 cat >"conftest.$ac_ext" <<_ACEOF
12489 #line 12489 "configure"
12490 #include "confdefs.h"
12491 #include <sys/types.h>
12496 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12498 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12501 # error not GNU C library
12507 rm -f "conftest.$ac_objext"
12508 if { (eval echo "$as_me:12508: \"$ac_compile\"") >&5
12509 (eval $ac_compile) 2>&5
12511 echo "$as_me:12511: \$? = $ac_status" >&5
12512 (exit "$ac_status"); } &&
12513 { ac_try='test -s "conftest.$ac_objext"'
12514 { (eval echo "$as_me:12514: \"$ac_try\"") >&5
12515 (eval $ac_try) 2>&5
12517 echo "$as_me:12517: \$? = $ac_status" >&5
12518 (exit "$ac_status"); }; }; then
12519 cf_cv_gnu_library=yes
12521 echo "$as_me: failed program was:" >&5
12522 cat "conftest.$ac_ext" >&5
12523 cf_cv_gnu_library=no
12525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12528 echo "$as_me:12528: result: $cf_cv_gnu_library" >&5
12529 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12531 if test x$cf_cv_gnu_library = xyes; then
12533 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12534 # was changed to help a little. newlib incorporated the change about 4
12536 echo "$as_me:12536: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12537 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12538 if test "${cf_cv_gnu_library_219+set}" = set; then
12539 echo $ECHO_N "(cached) $ECHO_C" >&6
12542 cf_save="$CPPFLAGS"
12544 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12545 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12547 cat >"conftest.$ac_ext" <<_ACEOF
12548 #line 12548 "configure"
12549 #include "confdefs.h"
12550 #include <sys/types.h>
12555 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12557 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12560 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12566 rm -f "conftest.$ac_objext"
12567 if { (eval echo "$as_me:12567: \"$ac_compile\"") >&5
12568 (eval $ac_compile) 2>&5
12570 echo "$as_me:12570: \$? = $ac_status" >&5
12571 (exit "$ac_status"); } &&
12572 { ac_try='test -s "conftest.$ac_objext"'
12573 { (eval echo "$as_me:12573: \"$ac_try\"") >&5
12574 (eval $ac_try) 2>&5
12576 echo "$as_me:12576: \$? = $ac_status" >&5
12577 (exit "$ac_status"); }; }; then
12578 cf_cv_gnu_library_219=yes
12580 echo "$as_me: failed program was:" >&5
12581 cat "conftest.$ac_ext" >&5
12582 cf_cv_gnu_library_219=no
12584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12585 CPPFLAGS="$cf_save"
12588 echo "$as_me:12588: result: $cf_cv_gnu_library_219" >&5
12589 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12591 if test "x$cf_cv_gnu_library_219" = xyes; then
12592 cf_save="$CPPFLAGS"
12593 echo "$as_me:12593: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12594 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12595 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12596 echo $ECHO_N "(cached) $ECHO_C" >&6
12602 cf_new_extra_cppflags=
12604 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12606 case "$cf_fix_cppflags" in
12608 case "$cf_add_cflags" in
12609 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12610 case "$cf_add_cflags" in
12612 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12614 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12615 && test -z "${cf_tst_cflags}" \
12616 && cf_fix_cppflags=yes
12618 if test "$cf_fix_cppflags" = yes ; then
12620 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12621 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12624 elif test "${cf_tst_cflags}" = "\"'" ; then
12626 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12627 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12633 case "$CPPFLAGS" in
12637 case "$cf_add_cflags" in
12639 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12641 CPPFLAGS=`echo "$CPPFLAGS" | \
12642 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12643 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12648 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12649 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12656 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12657 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12664 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12665 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12667 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12669 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12670 && test -z "${cf_tst_cflags}" \
12671 && cf_fix_cppflags=no
12676 if test -n "$cf_new_cflags" ; then
12678 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12679 CFLAGS="${CFLAGS}$cf_new_cflags"
12683 if test -n "$cf_new_cppflags" ; then
12685 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12686 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12690 if test -n "$cf_new_extra_cppflags" ; then
12692 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12693 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12697 cat >"conftest.$ac_ext" <<_ACEOF
12698 #line 12698 "configure"
12699 #include "confdefs.h"
12701 #include <limits.h>
12702 #include <sys/types.h>
12708 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12711 # error GNU C library is too old
12717 rm -f "conftest.$ac_objext"
12718 if { (eval echo "$as_me:12718: \"$ac_compile\"") >&5
12719 (eval $ac_compile) 2>&5
12721 echo "$as_me:12721: \$? = $ac_status" >&5
12722 (exit "$ac_status"); } &&
12723 { ac_try='test -s "conftest.$ac_objext"'
12724 { (eval echo "$as_me:12724: \"$ac_try\"") >&5
12725 (eval $ac_try) 2>&5
12727 echo "$as_me:12727: \$? = $ac_status" >&5
12728 (exit "$ac_status"); }; }; then
12729 cf_cv_gnu_dftsrc_219=yes
12731 echo "$as_me: failed program was:" >&5
12732 cat "conftest.$ac_ext" >&5
12733 cf_cv_gnu_dftsrc_219=no
12735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12738 echo "$as_me:12738: result: $cf_cv_gnu_dftsrc_219" >&5
12739 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12740 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12742 cf_cv_gnu_dftsrc_219=maybe
12745 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12747 echo "$as_me:12747: checking if we must define _GNU_SOURCE" >&5
12748 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12749 if test "${cf_cv_gnu_source+set}" = set; then
12750 echo $ECHO_N "(cached) $ECHO_C" >&6
12753 cat >"conftest.$ac_ext" <<_ACEOF
12754 #line 12754 "configure"
12755 #include "confdefs.h"
12756 #include <sys/types.h>
12761 #ifndef _XOPEN_SOURCE
12762 #error expected _XOPEN_SOURCE to be defined
12768 rm -f "conftest.$ac_objext"
12769 if { (eval echo "$as_me:12769: \"$ac_compile\"") >&5
12770 (eval $ac_compile) 2>&5
12772 echo "$as_me:12772: \$? = $ac_status" >&5
12773 (exit "$ac_status"); } &&
12774 { ac_try='test -s "conftest.$ac_objext"'
12775 { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776 (eval $ac_try) 2>&5
12778 echo "$as_me:12778: \$? = $ac_status" >&5
12779 (exit "$ac_status"); }; }; then
12780 cf_cv_gnu_source=no
12782 echo "$as_me: failed program was:" >&5
12783 cat "conftest.$ac_ext" >&5
12784 cf_save="$CPPFLAGS"
12789 cf_new_extra_cppflags=
12791 for cf_add_cflags in -D_GNU_SOURCE
12793 case "$cf_fix_cppflags" in
12795 case "$cf_add_cflags" in
12796 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12797 case "$cf_add_cflags" in
12799 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12801 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12802 && test -z "${cf_tst_cflags}" \
12803 && cf_fix_cppflags=yes
12805 if test "$cf_fix_cppflags" = yes ; then
12807 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12808 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12811 elif test "${cf_tst_cflags}" = "\"'" ; then
12813 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12814 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12820 case "$CPPFLAGS" in
12824 case "$cf_add_cflags" in
12826 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12828 CPPFLAGS=`echo "$CPPFLAGS" | \
12829 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12830 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12835 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12836 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12843 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12844 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12851 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12852 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12854 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12856 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12857 && test -z "${cf_tst_cflags}" \
12858 && cf_fix_cppflags=no
12863 if test -n "$cf_new_cflags" ; then
12865 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12866 CFLAGS="${CFLAGS}$cf_new_cflags"
12870 if test -n "$cf_new_cppflags" ; then
12872 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12873 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12877 if test -n "$cf_new_extra_cppflags" ; then
12879 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12880 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12884 cat >"conftest.$ac_ext" <<_ACEOF
12885 #line 12885 "configure"
12886 #include "confdefs.h"
12887 #include <sys/types.h>
12892 #ifdef _XOPEN_SOURCE
12893 #error expected _XOPEN_SOURCE to be undefined
12899 rm -f "conftest.$ac_objext"
12900 if { (eval echo "$as_me:12900: \"$ac_compile\"") >&5
12901 (eval $ac_compile) 2>&5
12903 echo "$as_me:12903: \$? = $ac_status" >&5
12904 (exit "$ac_status"); } &&
12905 { ac_try='test -s "conftest.$ac_objext"'
12906 { (eval echo "$as_me:12906: \"$ac_try\"") >&5
12907 (eval $ac_try) 2>&5
12909 echo "$as_me:12909: \$? = $ac_status" >&5
12910 (exit "$ac_status"); }; }; then
12911 cf_cv_gnu_source=no
12913 echo "$as_me: failed program was:" >&5
12914 cat "conftest.$ac_ext" >&5
12915 cf_cv_gnu_source=yes
12917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12918 CPPFLAGS="$cf_save"
12921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12924 echo "$as_me:12924: result: $cf_cv_gnu_source" >&5
12925 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12927 if test "$cf_cv_gnu_source" = yes
12929 echo "$as_me:12929: checking if we should also define _DEFAULT_SOURCE" >&5
12930 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12931 if test "${cf_cv_default_source+set}" = set; then
12932 echo $ECHO_N "(cached) $ECHO_C" >&6
12935 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12936 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12938 cat >"conftest.$ac_ext" <<_ACEOF
12939 #line 12939 "configure"
12940 #include "confdefs.h"
12941 #include <sys/types.h>
12946 #ifdef _DEFAULT_SOURCE
12947 #error expected _DEFAULT_SOURCE to be undefined
12953 rm -f "conftest.$ac_objext"
12954 if { (eval echo "$as_me:12954: \"$ac_compile\"") >&5
12955 (eval $ac_compile) 2>&5
12957 echo "$as_me:12957: \$? = $ac_status" >&5
12958 (exit "$ac_status"); } &&
12959 { ac_try='test -s "conftest.$ac_objext"'
12960 { (eval echo "$as_me:12960: \"$ac_try\"") >&5
12961 (eval $ac_try) 2>&5
12963 echo "$as_me:12963: \$? = $ac_status" >&5
12964 (exit "$ac_status"); }; }; then
12965 cf_cv_default_source=no
12967 echo "$as_me: failed program was:" >&5
12968 cat "conftest.$ac_ext" >&5
12969 cf_cv_default_source=yes
12971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12974 echo "$as_me:12974: result: $cf_cv_default_source" >&5
12975 echo "${ECHO_T}$cf_cv_default_source" >&6
12976 if test "$cf_cv_default_source" = yes
12979 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12980 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12990 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12993 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12996 if test "$cf_cv_posix_visible" = no; then
12998 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13000 cf_save_CFLAGS="$CFLAGS"
13001 cf_save_CPPFLAGS="$CPPFLAGS"
13003 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13004 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13005 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13007 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13008 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13009 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13011 echo "$as_me:13011: checking if we should define _POSIX_C_SOURCE" >&5
13012 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13013 if test "${cf_cv_posix_c_source+set}" = set; then
13014 echo $ECHO_N "(cached) $ECHO_C" >&6
13017 echo "${as_me:-configure}:13017: testing if the symbol is already defined go no further ..." 1>&5
13019 cat >"conftest.$ac_ext" <<_ACEOF
13020 #line 13020 "configure"
13021 #include "confdefs.h"
13022 #include <sys/types.h>
13027 #ifndef _POSIX_C_SOURCE
13034 rm -f "conftest.$ac_objext"
13035 if { (eval echo "$as_me:13035: \"$ac_compile\"") >&5
13036 (eval $ac_compile) 2>&5
13038 echo "$as_me:13038: \$? = $ac_status" >&5
13039 (exit "$ac_status"); } &&
13040 { ac_try='test -s "conftest.$ac_objext"'
13041 { (eval echo "$as_me:13041: \"$ac_try\"") >&5
13042 (eval $ac_try) 2>&5
13044 echo "$as_me:13044: \$? = $ac_status" >&5
13045 (exit "$ac_status"); }; }; then
13046 cf_cv_posix_c_source=no
13048 echo "$as_me: failed program was:" >&5
13049 cat "conftest.$ac_ext" >&5
13050 cf_want_posix_source=no
13051 case .$cf_POSIX_C_SOURCE in
13053 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13056 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13057 cf_want_posix_source=yes
13060 cf_want_posix_source=yes
13063 if test "$cf_want_posix_source" = yes ; then
13064 cat >"conftest.$ac_ext" <<_ACEOF
13065 #line 13065 "configure"
13066 #include "confdefs.h"
13067 #include <sys/types.h>
13072 #ifdef _POSIX_SOURCE
13079 rm -f "conftest.$ac_objext"
13080 if { (eval echo "$as_me:13080: \"$ac_compile\"") >&5
13081 (eval $ac_compile) 2>&5
13083 echo "$as_me:13083: \$? = $ac_status" >&5
13084 (exit "$ac_status"); } &&
13085 { ac_try='test -s "conftest.$ac_objext"'
13086 { (eval echo "$as_me:13086: \"$ac_try\"") >&5
13087 (eval $ac_try) 2>&5
13089 echo "$as_me:13089: \$? = $ac_status" >&5
13090 (exit "$ac_status"); }; }; then
13093 echo "$as_me: failed program was:" >&5
13094 cat "conftest.$ac_ext" >&5
13095 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13100 echo "${as_me:-configure}:13100: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13102 CFLAGS="$cf_trim_CFLAGS"
13103 CPPFLAGS="$cf_trim_CPPFLAGS"
13105 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13106 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13108 echo "${as_me:-configure}:13108: testing if the second compile does not leave our definition intact error ..." 1>&5
13110 cat >"conftest.$ac_ext" <<_ACEOF
13111 #line 13111 "configure"
13112 #include "confdefs.h"
13113 #include <sys/types.h>
13118 #ifndef _POSIX_C_SOURCE
13125 rm -f "conftest.$ac_objext"
13126 if { (eval echo "$as_me:13126: \"$ac_compile\"") >&5
13127 (eval $ac_compile) 2>&5
13129 echo "$as_me:13129: \$? = $ac_status" >&5
13130 (exit "$ac_status"); } &&
13131 { ac_try='test -s "conftest.$ac_objext"'
13132 { (eval echo "$as_me:13132: \"$ac_try\"") >&5
13133 (eval $ac_try) 2>&5
13135 echo "$as_me:13135: \$? = $ac_status" >&5
13136 (exit "$ac_status"); }; }; then
13139 echo "$as_me: failed program was:" >&5
13140 cat "conftest.$ac_ext" >&5
13141 cf_cv_posix_c_source=no
13143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13144 CFLAGS="$cf_save_CFLAGS"
13145 CPPFLAGS="$cf_save_CPPFLAGS"
13148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13151 echo "$as_me:13151: result: $cf_cv_posix_c_source" >&5
13152 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13154 if test "$cf_cv_posix_c_source" != no ; then
13155 CFLAGS="$cf_trim_CFLAGS"
13156 CPPFLAGS="$cf_trim_CPPFLAGS"
13161 cf_new_extra_cppflags=
13163 for cf_add_cflags in $cf_cv_posix_c_source
13165 case "$cf_fix_cppflags" in
13167 case "$cf_add_cflags" in
13168 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13169 case "$cf_add_cflags" in
13171 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13173 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13174 && test -z "${cf_tst_cflags}" \
13175 && cf_fix_cppflags=yes
13177 if test "$cf_fix_cppflags" = yes ; then
13179 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13180 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13183 elif test "${cf_tst_cflags}" = "\"'" ; then
13185 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13186 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13192 case "$CPPFLAGS" in
13196 case "$cf_add_cflags" in
13198 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13200 CPPFLAGS=`echo "$CPPFLAGS" | \
13201 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13202 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13207 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13208 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13215 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13216 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13223 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13224 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13226 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13228 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13229 && test -z "${cf_tst_cflags}" \
13230 && cf_fix_cppflags=no
13235 if test -n "$cf_new_cflags" ; then
13237 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13238 CFLAGS="${CFLAGS}$cf_new_cflags"
13242 if test -n "$cf_new_cppflags" ; then
13244 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13245 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13249 if test -n "$cf_new_extra_cppflags" ; then
13251 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13252 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13258 fi # cf_cv_posix_visible
13262 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13265 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13266 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13267 # Abusing the conformance level is a workaround.
13268 { echo "$as_me:13268: WARNING: this system does not provide usable locale support" >&5
13269 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13270 cf_xopen_source="-D_BSD_SOURCE"
13271 cf_XOPEN_SOURCE=700
13274 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13275 cf_xopen_source="-D_BSD_SOURCE"
13276 cf_XOPEN_SOURCE=600
13279 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13282 cf_xopen_source="-D_OSF_SOURCE"
13285 cf_xopen_source="-D_QNX_SOURCE"
13288 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13291 cf_xopen_source="-D__EXTENSIONS__"
13292 cf_cv_xopen_source=broken
13294 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13300 echo "$as_me:13300: checking if we should define _XOPEN_SOURCE" >&5
13301 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13302 if test "${cf_cv_xopen_source+set}" = set; then
13303 echo $ECHO_N "(cached) $ECHO_C" >&6
13306 cat >"conftest.$ac_ext" <<_ACEOF
13307 #line 13307 "configure"
13308 #include "confdefs.h"
13310 #include <stdlib.h>
13311 #include <string.h>
13312 #include <sys/types.h>
13318 #ifndef _XOPEN_SOURCE
13326 rm -f "conftest.$ac_objext"
13327 if { (eval echo "$as_me:13327: \"$ac_compile\"") >&5
13328 (eval $ac_compile) 2>&5
13330 echo "$as_me:13330: \$? = $ac_status" >&5
13331 (exit "$ac_status"); } &&
13332 { ac_try='test -s "conftest.$ac_objext"'
13333 { (eval echo "$as_me:13333: \"$ac_try\"") >&5
13334 (eval $ac_try) 2>&5
13336 echo "$as_me:13336: \$? = $ac_status" >&5
13337 (exit "$ac_status"); }; }; then
13338 cf_cv_xopen_source=no
13340 echo "$as_me: failed program was:" >&5
13341 cat "conftest.$ac_ext" >&5
13342 cf_save="$CPPFLAGS"
13344 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13345 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13347 cat >"conftest.$ac_ext" <<_ACEOF
13348 #line 13348 "configure"
13349 #include "confdefs.h"
13351 #include <stdlib.h>
13352 #include <string.h>
13353 #include <sys/types.h>
13359 #ifndef _XOPEN_SOURCE
13367 rm -f "conftest.$ac_objext"
13368 if { (eval echo "$as_me:13368: \"$ac_compile\"") >&5
13369 (eval $ac_compile) 2>&5
13371 echo "$as_me:13371: \$? = $ac_status" >&5
13372 (exit "$ac_status"); } &&
13373 { ac_try='test -s "conftest.$ac_objext"'
13374 { (eval echo "$as_me:13374: \"$ac_try\"") >&5
13375 (eval $ac_try) 2>&5
13377 echo "$as_me:13377: \$? = $ac_status" >&5
13378 (exit "$ac_status"); }; }; then
13379 cf_cv_xopen_source=no
13381 echo "$as_me: failed program was:" >&5
13382 cat "conftest.$ac_ext" >&5
13383 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13386 CPPFLAGS="$cf_save"
13389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13392 echo "$as_me:13392: result: $cf_cv_xopen_source" >&5
13393 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13395 if test "$cf_cv_xopen_source" != no ; then
13397 CFLAGS=`echo "$CFLAGS" | \
13398 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13399 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13401 CPPFLAGS=`echo "$CPPFLAGS" | \
13402 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13403 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13405 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13407 for cf_add_cflags in $cf_temp_xopen_source
13409 case "x$cf_add_cflags" in
13412 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13415 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'`
13416 test "$CFLAGS" != "$cf_old_cflag" || break
13418 CFLAGS="$cf_old_cflag"
13421 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13424 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'`
13425 test "$CPPFLAGS" != "$cf_old_cflag" || break
13427 CPPFLAGS="$cf_old_cflag"
13436 cf_new_extra_cppflags=
13438 for cf_add_cflags in $cf_add_cflags
13440 case "$cf_fix_cppflags" in
13442 case "$cf_add_cflags" in
13443 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13444 case "$cf_add_cflags" in
13446 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13448 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13449 && test -z "${cf_tst_cflags}" \
13450 && cf_fix_cppflags=yes
13452 if test "$cf_fix_cppflags" = yes ; then
13454 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13455 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13458 elif test "${cf_tst_cflags}" = "\"'" ; then
13460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13467 case "$CPPFLAGS" in
13471 case "$cf_add_cflags" in
13473 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13475 CPPFLAGS=`echo "$CPPFLAGS" | \
13476 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13477 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13482 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13483 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13490 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13491 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13498 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13499 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13501 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13503 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13504 && test -z "${cf_tst_cflags}" \
13505 && cf_fix_cppflags=no
13510 if test -n "$cf_new_cflags" ; then
13512 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13513 CFLAGS="${CFLAGS}$cf_new_cflags"
13517 if test -n "$cf_new_cppflags" ; then
13519 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13520 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13524 if test -n "$cf_new_extra_cppflags" ; then
13526 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13527 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13535 cf_save_xopen_cppflags="$CPPFLAGS"
13537 if test "$cf_cv_posix_visible" = no; then
13539 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13541 cf_save_CFLAGS="$CFLAGS"
13542 cf_save_CPPFLAGS="$CPPFLAGS"
13544 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13545 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13546 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13548 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13549 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13550 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13552 echo "$as_me:13552: checking if we should define _POSIX_C_SOURCE" >&5
13553 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13554 if test "${cf_cv_posix_c_source+set}" = set; then
13555 echo $ECHO_N "(cached) $ECHO_C" >&6
13558 echo "${as_me:-configure}:13558: testing if the symbol is already defined go no further ..." 1>&5
13560 cat >"conftest.$ac_ext" <<_ACEOF
13561 #line 13561 "configure"
13562 #include "confdefs.h"
13563 #include <sys/types.h>
13568 #ifndef _POSIX_C_SOURCE
13575 rm -f "conftest.$ac_objext"
13576 if { (eval echo "$as_me:13576: \"$ac_compile\"") >&5
13577 (eval $ac_compile) 2>&5
13579 echo "$as_me:13579: \$? = $ac_status" >&5
13580 (exit "$ac_status"); } &&
13581 { ac_try='test -s "conftest.$ac_objext"'
13582 { (eval echo "$as_me:13582: \"$ac_try\"") >&5
13583 (eval $ac_try) 2>&5
13585 echo "$as_me:13585: \$? = $ac_status" >&5
13586 (exit "$ac_status"); }; }; then
13587 cf_cv_posix_c_source=no
13589 echo "$as_me: failed program was:" >&5
13590 cat "conftest.$ac_ext" >&5
13591 cf_want_posix_source=no
13592 case .$cf_POSIX_C_SOURCE in
13594 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13597 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13598 cf_want_posix_source=yes
13601 cf_want_posix_source=yes
13604 if test "$cf_want_posix_source" = yes ; then
13605 cat >"conftest.$ac_ext" <<_ACEOF
13606 #line 13606 "configure"
13607 #include "confdefs.h"
13608 #include <sys/types.h>
13613 #ifdef _POSIX_SOURCE
13620 rm -f "conftest.$ac_objext"
13621 if { (eval echo "$as_me:13621: \"$ac_compile\"") >&5
13622 (eval $ac_compile) 2>&5
13624 echo "$as_me:13624: \$? = $ac_status" >&5
13625 (exit "$ac_status"); } &&
13626 { ac_try='test -s "conftest.$ac_objext"'
13627 { (eval echo "$as_me:13627: \"$ac_try\"") >&5
13628 (eval $ac_try) 2>&5
13630 echo "$as_me:13630: \$? = $ac_status" >&5
13631 (exit "$ac_status"); }; }; then
13634 echo "$as_me: failed program was:" >&5
13635 cat "conftest.$ac_ext" >&5
13636 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13641 echo "${as_me:-configure}:13641: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13643 CFLAGS="$cf_trim_CFLAGS"
13644 CPPFLAGS="$cf_trim_CPPFLAGS"
13646 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13647 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13649 echo "${as_me:-configure}:13649: testing if the second compile does not leave our definition intact error ..." 1>&5
13651 cat >"conftest.$ac_ext" <<_ACEOF
13652 #line 13652 "configure"
13653 #include "confdefs.h"
13654 #include <sys/types.h>
13659 #ifndef _POSIX_C_SOURCE
13666 rm -f "conftest.$ac_objext"
13667 if { (eval echo "$as_me:13667: \"$ac_compile\"") >&5
13668 (eval $ac_compile) 2>&5
13670 echo "$as_me:13670: \$? = $ac_status" >&5
13671 (exit "$ac_status"); } &&
13672 { ac_try='test -s "conftest.$ac_objext"'
13673 { (eval echo "$as_me:13673: \"$ac_try\"") >&5
13674 (eval $ac_try) 2>&5
13676 echo "$as_me:13676: \$? = $ac_status" >&5
13677 (exit "$ac_status"); }; }; then
13680 echo "$as_me: failed program was:" >&5
13681 cat "conftest.$ac_ext" >&5
13682 cf_cv_posix_c_source=no
13684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13685 CFLAGS="$cf_save_CFLAGS"
13686 CPPFLAGS="$cf_save_CPPFLAGS"
13689 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13692 echo "$as_me:13692: result: $cf_cv_posix_c_source" >&5
13693 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13695 if test "$cf_cv_posix_c_source" != no ; then
13696 CFLAGS="$cf_trim_CFLAGS"
13697 CPPFLAGS="$cf_trim_CPPFLAGS"
13702 cf_new_extra_cppflags=
13704 for cf_add_cflags in $cf_cv_posix_c_source
13706 case "$cf_fix_cppflags" in
13708 case "$cf_add_cflags" in
13709 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13710 case "$cf_add_cflags" in
13712 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13714 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13715 && test -z "${cf_tst_cflags}" \
13716 && cf_fix_cppflags=yes
13718 if test "$cf_fix_cppflags" = yes ; then
13720 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13721 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13724 elif test "${cf_tst_cflags}" = "\"'" ; then
13726 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13727 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13733 case "$CPPFLAGS" in
13737 case "$cf_add_cflags" in
13739 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13741 CPPFLAGS=`echo "$CPPFLAGS" | \
13742 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13743 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13748 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13749 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13756 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13757 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13764 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13765 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13767 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13769 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13770 && test -z "${cf_tst_cflags}" \
13771 && cf_fix_cppflags=no
13776 if test -n "$cf_new_cflags" ; then
13778 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13779 CFLAGS="${CFLAGS}$cf_new_cflags"
13783 if test -n "$cf_new_cppflags" ; then
13785 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13786 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13790 if test -n "$cf_new_extra_cppflags" ; then
13792 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13793 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13799 fi # cf_cv_posix_visible
13801 # Some of these niche implementations use copy/paste, double-check...
13802 if test "$cf_cv_xopen_source" != no ; then
13803 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13805 echo "${as_me:-configure}:13805: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13807 cat >"conftest.$ac_ext" <<_ACEOF
13808 #line 13808 "configure"
13809 #include "confdefs.h"
13811 #include <stdlib.h>
13812 #include <string.h>
13813 #include <sys/types.h>
13819 #ifndef _XOPEN_SOURCE
13827 rm -f "conftest.$ac_objext"
13828 if { (eval echo "$as_me:13828: \"$ac_compile\"") >&5
13829 (eval $ac_compile) 2>&5
13831 echo "$as_me:13831: \$? = $ac_status" >&5
13832 (exit "$ac_status"); } &&
13833 { ac_try='test -s "conftest.$ac_objext"'
13834 { (eval echo "$as_me:13834: \"$ac_try\"") >&5
13835 (eval $ac_try) 2>&5
13837 echo "$as_me:13837: \$? = $ac_status" >&5
13838 (exit "$ac_status"); }; }; then
13841 echo "$as_me: failed program was:" >&5
13842 cat "conftest.$ac_ext" >&5
13844 { echo "$as_me:13844: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13845 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13846 CPPFLAGS="$cf_save_xopen_cppflags"
13848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13853 if test -n "$cf_xopen_source" ; then
13855 for cf_add_cflags in $cf_xopen_source
13857 case "x$cf_add_cflags" in
13860 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13863 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'`
13864 test "$CFLAGS" != "$cf_old_cflag" || break
13865 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13867 echo "${as_me:-configure}:13867: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13869 CFLAGS="$cf_old_cflag"
13872 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13875 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'`
13876 test "$CPPFLAGS" != "$cf_old_cflag" || break
13877 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13879 echo "${as_me:-configure}:13879: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13881 CPPFLAGS="$cf_old_cflag"
13890 cf_new_extra_cppflags=
13892 for cf_add_cflags in $cf_add_cflags
13894 case "$cf_fix_cppflags" in
13896 case "$cf_add_cflags" in
13897 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13898 case "$cf_add_cflags" in
13900 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13902 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13903 && test -z "${cf_tst_cflags}" \
13904 && cf_fix_cppflags=yes
13906 if test "$cf_fix_cppflags" = yes ; then
13908 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13909 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13912 elif test "${cf_tst_cflags}" = "\"'" ; then
13914 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13915 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13921 case "$CPPFLAGS" in
13925 case "$cf_add_cflags" in
13927 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13929 CPPFLAGS=`echo "$CPPFLAGS" | \
13930 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13931 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13936 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13937 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13944 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13945 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13952 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13953 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13955 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13957 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13958 && test -z "${cf_tst_cflags}" \
13959 && cf_fix_cppflags=no
13964 if test -n "$cf_new_cflags" ; then
13965 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13967 echo "${as_me:-configure}:13967: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13969 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13970 CFLAGS="${CFLAGS}$cf_new_cflags"
13974 if test -n "$cf_new_cppflags" ; then
13975 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13977 echo "${as_me:-configure}:13977: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13979 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13980 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13984 if test -n "$cf_new_extra_cppflags" ; then
13985 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13987 echo "${as_me:-configure}:13987: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13989 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13990 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13998 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13999 echo "$as_me:13999: checking if _XOPEN_SOURCE really is set" >&5
14000 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
14001 cat >"conftest.$ac_ext" <<_ACEOF
14002 #line 14002 "configure"
14003 #include "confdefs.h"
14004 #include <stdlib.h>
14009 #ifndef _XOPEN_SOURCE
14016 rm -f "conftest.$ac_objext"
14017 if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
14018 (eval $ac_compile) 2>&5
14020 echo "$as_me:14020: \$? = $ac_status" >&5
14021 (exit "$ac_status"); } &&
14022 { ac_try='test -s "conftest.$ac_objext"'
14023 { (eval echo "$as_me:14023: \"$ac_try\"") >&5
14024 (eval $ac_try) 2>&5
14026 echo "$as_me:14026: \$? = $ac_status" >&5
14027 (exit "$ac_status"); }; }; then
14028 cf_XOPEN_SOURCE_set=yes
14030 echo "$as_me: failed program was:" >&5
14031 cat "conftest.$ac_ext" >&5
14032 cf_XOPEN_SOURCE_set=no
14034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14035 echo "$as_me:14035: result: $cf_XOPEN_SOURCE_set" >&5
14036 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14037 if test "$cf_XOPEN_SOURCE_set" = yes
14039 cat >"conftest.$ac_ext" <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042 #include <stdlib.h>
14047 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14054 rm -f "conftest.$ac_objext"
14055 if { (eval echo "$as_me:14055: \"$ac_compile\"") >&5
14056 (eval $ac_compile) 2>&5
14058 echo "$as_me:14058: \$? = $ac_status" >&5
14059 (exit "$ac_status"); } &&
14060 { ac_try='test -s "conftest.$ac_objext"'
14061 { (eval echo "$as_me:14061: \"$ac_try\"") >&5
14062 (eval $ac_try) 2>&5
14064 echo "$as_me:14064: \$? = $ac_status" >&5
14065 (exit "$ac_status"); }; }; then
14066 cf_XOPEN_SOURCE_set_ok=yes
14068 echo "$as_me: failed program was:" >&5
14069 cat "conftest.$ac_ext" >&5
14070 cf_XOPEN_SOURCE_set_ok=no
14072 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14073 if test "$cf_XOPEN_SOURCE_set_ok" = no
14075 { echo "$as_me:14075: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14076 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14080 echo "$as_me:14080: checking if we should define _XOPEN_SOURCE" >&5
14081 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14082 if test "${cf_cv_xopen_source+set}" = set; then
14083 echo $ECHO_N "(cached) $ECHO_C" >&6
14086 cat >"conftest.$ac_ext" <<_ACEOF
14087 #line 14087 "configure"
14088 #include "confdefs.h"
14090 #include <stdlib.h>
14091 #include <string.h>
14092 #include <sys/types.h>
14098 #ifndef _XOPEN_SOURCE
14106 rm -f "conftest.$ac_objext"
14107 if { (eval echo "$as_me:14107: \"$ac_compile\"") >&5
14108 (eval $ac_compile) 2>&5
14110 echo "$as_me:14110: \$? = $ac_status" >&5
14111 (exit "$ac_status"); } &&
14112 { ac_try='test -s "conftest.$ac_objext"'
14113 { (eval echo "$as_me:14113: \"$ac_try\"") >&5
14114 (eval $ac_try) 2>&5
14116 echo "$as_me:14116: \$? = $ac_status" >&5
14117 (exit "$ac_status"); }; }; then
14118 cf_cv_xopen_source=no
14120 echo "$as_me: failed program was:" >&5
14121 cat "conftest.$ac_ext" >&5
14122 cf_save="$CPPFLAGS"
14124 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14125 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14127 cat >"conftest.$ac_ext" <<_ACEOF
14128 #line 14128 "configure"
14129 #include "confdefs.h"
14131 #include <stdlib.h>
14132 #include <string.h>
14133 #include <sys/types.h>
14139 #ifndef _XOPEN_SOURCE
14147 rm -f "conftest.$ac_objext"
14148 if { (eval echo "$as_me:14148: \"$ac_compile\"") >&5
14149 (eval $ac_compile) 2>&5
14151 echo "$as_me:14151: \$? = $ac_status" >&5
14152 (exit "$ac_status"); } &&
14153 { ac_try='test -s "conftest.$ac_objext"'
14154 { (eval echo "$as_me:14154: \"$ac_try\"") >&5
14155 (eval $ac_try) 2>&5
14157 echo "$as_me:14157: \$? = $ac_status" >&5
14158 (exit "$ac_status"); }; }; then
14159 cf_cv_xopen_source=no
14161 echo "$as_me: failed program was:" >&5
14162 cat "conftest.$ac_ext" >&5
14163 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14166 CPPFLAGS="$cf_save"
14169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14172 echo "$as_me:14172: result: $cf_cv_xopen_source" >&5
14173 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14175 if test "$cf_cv_xopen_source" != no ; then
14177 CFLAGS=`echo "$CFLAGS" | \
14178 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14179 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14181 CPPFLAGS=`echo "$CPPFLAGS" | \
14182 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14183 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14185 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14187 for cf_add_cflags in $cf_temp_xopen_source
14189 case "x$cf_add_cflags" in
14192 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14195 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'`
14196 test "$CFLAGS" != "$cf_old_cflag" || break
14198 CFLAGS="$cf_old_cflag"
14201 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14204 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'`
14205 test "$CPPFLAGS" != "$cf_old_cflag" || break
14207 CPPFLAGS="$cf_old_cflag"
14216 cf_new_extra_cppflags=
14218 for cf_add_cflags in $cf_add_cflags
14220 case "$cf_fix_cppflags" in
14222 case "$cf_add_cflags" in
14223 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14224 case "$cf_add_cflags" in
14226 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14228 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14229 && test -z "${cf_tst_cflags}" \
14230 && cf_fix_cppflags=yes
14232 if test "$cf_fix_cppflags" = yes ; then
14234 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14235 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14238 elif test "${cf_tst_cflags}" = "\"'" ; then
14240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14247 case "$CPPFLAGS" in
14251 case "$cf_add_cflags" in
14253 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14255 CPPFLAGS=`echo "$CPPFLAGS" | \
14256 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14257 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14262 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14263 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14270 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14271 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14278 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14279 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14281 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14283 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14284 && test -z "${cf_tst_cflags}" \
14285 && cf_fix_cppflags=no
14290 if test -n "$cf_new_cflags" ; then
14292 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14293 CFLAGS="${CFLAGS}$cf_new_cflags"
14297 if test -n "$cf_new_cppflags" ; then
14299 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14300 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14304 if test -n "$cf_new_extra_cppflags" ; then
14306 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14307 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14317 fi # cf_cv_posix_visible
14319 # Check whether --enable-largefile or --disable-largefile was given.
14320 if test "${enable_largefile+set}" = set; then
14321 enableval="$enable_largefile"
14324 if test "$enable_largefile" != no; then
14326 echo "$as_me:14326: checking for special C compiler options needed for large files" >&5
14327 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14328 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14329 echo $ECHO_N "(cached) $ECHO_C" >&6
14331 ac_cv_sys_largefile_CC=no
14332 if test "$GCC" != yes; then
14335 # IRIX 6.2 and later do not support large files by default,
14336 # so use the C compiler's -n32 option if that helps.
14337 cat >"conftest.$ac_ext" <<_ACEOF
14338 #line 14338 "configure"
14339 #include "confdefs.h"
14340 #include <sys/types.h>
14341 /* Check that off_t can represent 2**63 - 1 correctly.
14342 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14343 since some C++ compilers masquerading as C compilers
14344 incorrectly reject 9223372036854775807. */
14345 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14346 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14347 && LARGE_OFF_T % 2147483647 == 1)
14357 rm -f "conftest.$ac_objext"
14358 if { (eval echo "$as_me:14358: \"$ac_compile\"") >&5
14359 (eval $ac_compile) 2>&5
14361 echo "$as_me:14361: \$? = $ac_status" >&5
14362 (exit "$ac_status"); } &&
14363 { ac_try='test -s "conftest.$ac_objext"'
14364 { (eval echo "$as_me:14364: \"$ac_try\"") >&5
14365 (eval $ac_try) 2>&5
14367 echo "$as_me:14367: \$? = $ac_status" >&5
14368 (exit "$ac_status"); }; }; then
14371 echo "$as_me: failed program was:" >&5
14372 cat "conftest.$ac_ext" >&5
14374 rm -f "conftest.$ac_objext"
14376 rm -f "conftest.$ac_objext"
14377 if { (eval echo "$as_me:14377: \"$ac_compile\"") >&5
14378 (eval $ac_compile) 2>&5
14380 echo "$as_me:14380: \$? = $ac_status" >&5
14381 (exit "$ac_status"); } &&
14382 { ac_try='test -s "conftest.$ac_objext"'
14383 { (eval echo "$as_me:14383: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14386 echo "$as_me:14386: \$? = $ac_status" >&5
14387 (exit "$ac_status"); }; }; then
14388 ac_cv_sys_largefile_CC=' -n32'; break
14390 echo "$as_me: failed program was:" >&5
14391 cat "conftest.$ac_ext" >&5
14393 rm -f "conftest.$ac_objext"
14397 rm -f "conftest.$ac_ext"
14400 echo "$as_me:14400: result: $ac_cv_sys_largefile_CC" >&5
14401 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14402 if test "$ac_cv_sys_largefile_CC" != no; then
14403 CC=$CC$ac_cv_sys_largefile_CC
14406 echo "$as_me:14406: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14407 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14408 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
14412 ac_cv_sys_file_offset_bits=no
14413 cat >"conftest.$ac_ext" <<_ACEOF
14414 #line 14414 "configure"
14415 #include "confdefs.h"
14416 #include <sys/types.h>
14417 /* Check that off_t can represent 2**63 - 1 correctly.
14418 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14419 since some C++ compilers masquerading as C compilers
14420 incorrectly reject 9223372036854775807. */
14421 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14422 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14423 && LARGE_OFF_T % 2147483647 == 1)
14433 rm -f "conftest.$ac_objext"
14434 if { (eval echo "$as_me:14434: \"$ac_compile\"") >&5
14435 (eval $ac_compile) 2>&5
14437 echo "$as_me:14437: \$? = $ac_status" >&5
14438 (exit "$ac_status"); } &&
14439 { ac_try='test -s "conftest.$ac_objext"'
14440 { (eval echo "$as_me:14440: \"$ac_try\"") >&5
14441 (eval $ac_try) 2>&5
14443 echo "$as_me:14443: \$? = $ac_status" >&5
14444 (exit "$ac_status"); }; }; then
14447 echo "$as_me: failed program was:" >&5
14448 cat "conftest.$ac_ext" >&5
14450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14451 cat >"conftest.$ac_ext" <<_ACEOF
14452 #line 14452 "configure"
14453 #include "confdefs.h"
14454 #define _FILE_OFFSET_BITS 64
14455 #include <sys/types.h>
14456 /* Check that off_t can represent 2**63 - 1 correctly.
14457 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14458 since some C++ compilers masquerading as C compilers
14459 incorrectly reject 9223372036854775807. */
14460 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14461 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14462 && LARGE_OFF_T % 2147483647 == 1)
14472 rm -f "conftest.$ac_objext"
14473 if { (eval echo "$as_me:14473: \"$ac_compile\"") >&5
14474 (eval $ac_compile) 2>&5
14476 echo "$as_me:14476: \$? = $ac_status" >&5
14477 (exit "$ac_status"); } &&
14478 { ac_try='test -s "conftest.$ac_objext"'
14479 { (eval echo "$as_me:14479: \"$ac_try\"") >&5
14480 (eval $ac_try) 2>&5
14482 echo "$as_me:14482: \$? = $ac_status" >&5
14483 (exit "$ac_status"); }; }; then
14484 ac_cv_sys_file_offset_bits=64; break
14486 echo "$as_me: failed program was:" >&5
14487 cat "conftest.$ac_ext" >&5
14489 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14493 echo "$as_me:14493: result: $ac_cv_sys_file_offset_bits" >&5
14494 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14495 if test "$ac_cv_sys_file_offset_bits" != no; then
14497 cat >>confdefs.h <<EOF
14498 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14503 echo "$as_me:14503: checking for _LARGE_FILES value needed for large files" >&5
14504 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14505 if test "${ac_cv_sys_large_files+set}" = set; then
14506 echo $ECHO_N "(cached) $ECHO_C" >&6
14509 ac_cv_sys_large_files=no
14510 cat >"conftest.$ac_ext" <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14513 #include <sys/types.h>
14514 /* Check that off_t can represent 2**63 - 1 correctly.
14515 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14516 since some C++ compilers masquerading as C compilers
14517 incorrectly reject 9223372036854775807. */
14518 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14519 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14520 && LARGE_OFF_T % 2147483647 == 1)
14530 rm -f "conftest.$ac_objext"
14531 if { (eval echo "$as_me:14531: \"$ac_compile\"") >&5
14532 (eval $ac_compile) 2>&5
14534 echo "$as_me:14534: \$? = $ac_status" >&5
14535 (exit "$ac_status"); } &&
14536 { ac_try='test -s "conftest.$ac_objext"'
14537 { (eval echo "$as_me:14537: \"$ac_try\"") >&5
14538 (eval $ac_try) 2>&5
14540 echo "$as_me:14540: \$? = $ac_status" >&5
14541 (exit "$ac_status"); }; }; then
14544 echo "$as_me: failed program was:" >&5
14545 cat "conftest.$ac_ext" >&5
14547 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14548 cat >"conftest.$ac_ext" <<_ACEOF
14549 #line 14549 "configure"
14550 #include "confdefs.h"
14551 #define _LARGE_FILES 1
14552 #include <sys/types.h>
14553 /* Check that off_t can represent 2**63 - 1 correctly.
14554 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14555 since some C++ compilers masquerading as C compilers
14556 incorrectly reject 9223372036854775807. */
14557 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14558 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14559 && LARGE_OFF_T % 2147483647 == 1)
14569 rm -f "conftest.$ac_objext"
14570 if { (eval echo "$as_me:14570: \"$ac_compile\"") >&5
14571 (eval $ac_compile) 2>&5
14573 echo "$as_me:14573: \$? = $ac_status" >&5
14574 (exit "$ac_status"); } &&
14575 { ac_try='test -s "conftest.$ac_objext"'
14576 { (eval echo "$as_me:14576: \"$ac_try\"") >&5
14577 (eval $ac_try) 2>&5
14579 echo "$as_me:14579: \$? = $ac_status" >&5
14580 (exit "$ac_status"); }; }; then
14581 ac_cv_sys_large_files=1; break
14583 echo "$as_me: failed program was:" >&5
14584 cat "conftest.$ac_ext" >&5
14586 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14590 echo "$as_me:14590: result: $ac_cv_sys_large_files" >&5
14591 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14592 if test "$ac_cv_sys_large_files" != no; then
14594 cat >>confdefs.h <<EOF
14595 #define _LARGE_FILES $ac_cv_sys_large_files
14602 if test "$enable_largefile" != no ; then
14603 echo "$as_me:14603: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14604 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14605 if test "${ac_cv_sys_largefile_source+set}" = set; then
14606 echo $ECHO_N "(cached) $ECHO_C" >&6
14609 ac_cv_sys_largefile_source=no
14610 cat >"conftest.$ac_ext" <<_ACEOF
14611 #line 14611 "configure"
14612 #include "confdefs.h"
14622 rm -f "conftest.$ac_objext"
14623 if { (eval echo "$as_me:14623: \"$ac_compile\"") >&5
14624 (eval $ac_compile) 2>&5
14626 echo "$as_me:14626: \$? = $ac_status" >&5
14627 (exit "$ac_status"); } &&
14628 { ac_try='test -s "conftest.$ac_objext"'
14629 { (eval echo "$as_me:14629: \"$ac_try\"") >&5
14630 (eval $ac_try) 2>&5
14632 echo "$as_me:14632: \$? = $ac_status" >&5
14633 (exit "$ac_status"); }; }; then
14636 echo "$as_me: failed program was:" >&5
14637 cat "conftest.$ac_ext" >&5
14639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14640 cat >"conftest.$ac_ext" <<_ACEOF
14641 #line 14641 "configure"
14642 #include "confdefs.h"
14643 #define _LARGEFILE_SOURCE 1
14653 rm -f "conftest.$ac_objext"
14654 if { (eval echo "$as_me:14654: \"$ac_compile\"") >&5
14655 (eval $ac_compile) 2>&5
14657 echo "$as_me:14657: \$? = $ac_status" >&5
14658 (exit "$ac_status"); } &&
14659 { ac_try='test -s "conftest.$ac_objext"'
14660 { (eval echo "$as_me:14660: \"$ac_try\"") >&5
14661 (eval $ac_try) 2>&5
14663 echo "$as_me:14663: \$? = $ac_status" >&5
14664 (exit "$ac_status"); }; }; then
14665 ac_cv_sys_largefile_source=1; break
14667 echo "$as_me: failed program was:" >&5
14668 cat "conftest.$ac_ext" >&5
14670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14674 echo "$as_me:14674: result: $ac_cv_sys_largefile_source" >&5
14675 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14676 if test "$ac_cv_sys_largefile_source" != no; then
14678 cat >>confdefs.h <<EOF
14679 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14685 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14686 # in glibc 2.1.3, but that breaks too many other things.
14687 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14688 echo "$as_me:14688: checking for fseeko" >&5
14689 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14690 if test "${ac_cv_func_fseeko+set}" = set; then
14691 echo $ECHO_N "(cached) $ECHO_C" >&6
14693 cat >"conftest.$ac_ext" <<_ACEOF
14694 #line 14694 "configure"
14695 #include "confdefs.h"
14700 return fseeko && fseeko (stdin, 0, 0);
14705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14706 if { (eval echo "$as_me:14706: \"$ac_link\"") >&5
14707 (eval $ac_link) 2>&5
14709 echo "$as_me:14709: \$? = $ac_status" >&5
14710 (exit "$ac_status"); } &&
14711 { ac_try='test -s "conftest$ac_exeext"'
14712 { (eval echo "$as_me:14712: \"$ac_try\"") >&5
14713 (eval $ac_try) 2>&5
14715 echo "$as_me:14715: \$? = $ac_status" >&5
14716 (exit "$ac_status"); }; }; then
14717 ac_cv_func_fseeko=yes
14719 echo "$as_me: failed program was:" >&5
14720 cat "conftest.$ac_ext" >&5
14721 ac_cv_func_fseeko=no
14723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14725 echo "$as_me:14725: result: $ac_cv_func_fseeko" >&5
14726 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14727 if test $ac_cv_func_fseeko = yes; then
14729 cat >>confdefs.h <<\EOF
14730 #define HAVE_FSEEKO 1
14735 # Normally we would collect these definitions in the config.h,
14736 # but (like _XOPEN_SOURCE), some environments rely on having these
14737 # defined before any of the system headers are included. Another
14738 # case comes up with C++, e.g., on AIX the compiler compiles the
14739 # header files by themselves before looking at the body files it is
14740 # told to compile. For ncurses, those header files do not include
14742 if test "$ac_cv_sys_large_files" != no
14745 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14746 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14749 if test "$ac_cv_sys_largefile_source" != no
14752 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14753 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14756 if test "$ac_cv_sys_file_offset_bits" != no
14759 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14760 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14764 echo "$as_me:14764: checking whether to use struct dirent64" >&5
14765 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14766 if test "${cf_cv_struct_dirent64+set}" = set; then
14767 echo $ECHO_N "(cached) $ECHO_C" >&6
14770 cat >"conftest.$ac_ext" <<_ACEOF
14771 #line 14771 "configure"
14772 #include "confdefs.h"
14774 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14775 #include <sys/types.h>
14776 #include <dirent.h>
14782 /* if transitional largefile support is setup, this is true */
14783 extern struct dirent64 * readdir(DIR *);
14784 struct dirent64 *x = readdir((DIR *)0);
14785 struct dirent *y = readdir((DIR *)0);
14793 rm -f "conftest.$ac_objext"
14794 if { (eval echo "$as_me:14794: \"$ac_compile\"") >&5
14795 (eval $ac_compile) 2>&5
14797 echo "$as_me:14797: \$? = $ac_status" >&5
14798 (exit "$ac_status"); } &&
14799 { ac_try='test -s "conftest.$ac_objext"'
14800 { (eval echo "$as_me:14800: \"$ac_try\"") >&5
14801 (eval $ac_try) 2>&5
14803 echo "$as_me:14803: \$? = $ac_status" >&5
14804 (exit "$ac_status"); }; }; then
14805 cf_cv_struct_dirent64=yes
14807 echo "$as_me: failed program was:" >&5
14808 cat "conftest.$ac_ext" >&5
14809 cf_cv_struct_dirent64=no
14811 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14814 echo "$as_me:14814: result: $cf_cv_struct_dirent64" >&5
14815 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14816 test "$cf_cv_struct_dirent64" = yes &&
14817 cat >>confdefs.h <<\EOF
14818 #define HAVE_STRUCT_DIRENT64 1
14823 ### Enable compiling-in rcs id's
14824 echo "$as_me:14824: checking if RCS identifiers should be compiled-in" >&5
14825 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14827 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14828 if test "${with_rcs_ids+set}" = set; then
14829 withval="$with_rcs_ids"
14830 with_rcs_ids=$withval
14834 echo "$as_me:14834: result: $with_rcs_ids" >&5
14835 echo "${ECHO_T}$with_rcs_ids" >&6
14836 test "$with_rcs_ids" = yes &&
14837 cat >>confdefs.h <<\EOF
14838 #define USE_RCS_IDS 1
14841 ###############################################################################
14843 ### Note that some functions (such as const) are normally disabled anyway.
14844 echo "$as_me:14844: checking if you want to build with function extensions" >&5
14845 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14847 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14848 if test "${enable_ext_funcs+set}" = set; then
14849 enableval="$enable_ext_funcs"
14850 with_ext_funcs=$enableval
14854 echo "$as_me:14854: result: $with_ext_funcs" >&5
14855 echo "${ECHO_T}$with_ext_funcs" >&6
14856 if test "$with_ext_funcs" = yes ; then
14857 NCURSES_EXT_FUNCS=1
14859 cat >>confdefs.h <<\EOF
14860 #define HAVE_USE_DEFAULT_COLORS 1
14863 cat >>confdefs.h <<\EOF
14864 #define NCURSES_EXT_FUNCS 1
14868 NCURSES_EXT_FUNCS=0
14871 ### use option --enable-const to turn on use of const beyond that in XSI.
14872 echo "$as_me:14872: checking for extended use of const keyword" >&5
14873 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14875 # Check whether --enable-const or --disable-const was given.
14876 if test "${enable_const+set}" = set; then
14877 enableval="$enable_const"
14878 with_ext_const=$enableval
14882 echo "$as_me:14882: result: $with_ext_const" >&5
14883 echo "${ECHO_T}$with_ext_const" >&6
14884 NCURSES_CONST='/*nothing*/'
14885 if test "$with_ext_const" = yes ; then
14886 NCURSES_CONST=const
14889 ###############################################################################
14890 # These options are relatively safe to experiment with.
14892 echo "$as_me:14892: checking if you want all development code" >&5
14893 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14895 # Check whether --with-develop or --without-develop was given.
14896 if test "${with_develop+set}" = set; then
14897 withval="$with_develop"
14898 with_develop=$withval
14902 echo "$as_me:14902: result: $with_develop" >&5
14903 echo "${ECHO_T}$with_develop" >&6
14905 ###############################################################################
14906 # These are just experimental, probably should not be in a package:
14908 # This is still experimental (20080329), but should ultimately be moved to
14909 # the script-block --with-normal, etc.
14911 echo "$as_me:14911: checking if you want to link with the pthread library" >&5
14912 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14914 # Check whether --with-pthread or --without-pthread was given.
14915 if test "${with_pthread+set}" = set; then
14916 withval="$with_pthread"
14917 with_pthread=$withval
14921 echo "$as_me:14921: result: $with_pthread" >&5
14922 echo "${ECHO_T}$with_pthread" >&6
14924 if test "$with_pthread" != no ; then
14925 echo "$as_me:14925: checking for pthread.h" >&5
14926 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14927 if test "${ac_cv_header_pthread_h+set}" = set; then
14928 echo $ECHO_N "(cached) $ECHO_C" >&6
14930 cat >"conftest.$ac_ext" <<_ACEOF
14931 #line 14931 "configure"
14932 #include "confdefs.h"
14933 #include <pthread.h>
14935 if { (eval echo "$as_me:14935: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14936 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14938 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14940 cat conftest.err >&5
14941 echo "$as_me:14941: \$? = $ac_status" >&5
14942 (exit "$ac_status"); } >/dev/null; then
14943 if test -s conftest.err; then
14944 ac_cpp_err=$ac_c_preproc_warn_flag
14951 if test -z "$ac_cpp_err"; then
14952 ac_cv_header_pthread_h=yes
14954 echo "$as_me: failed program was:" >&5
14955 cat "conftest.$ac_ext" >&5
14956 ac_cv_header_pthread_h=no
14958 rm -f conftest.err "conftest.$ac_ext"
14960 echo "$as_me:14960: result: $ac_cv_header_pthread_h" >&5
14961 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14962 if test "$ac_cv_header_pthread_h" = yes; then
14964 cat >>confdefs.h <<\EOF
14965 #define HAVE_PTHREADS_H 1
14968 for cf_lib_pthread in pthread c_r
14970 echo "$as_me:14970: checking if we can link with the $cf_lib_pthread library" >&5
14971 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14972 cf_save_LIBS="$LIBS"
14974 cf_add_libs="$LIBS"
14977 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14978 # filter duplicates
14979 for cf_add_1lib in $cf_add_0lib; do
14980 for cf_add_2lib in $cf_add_libs; do
14981 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14986 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14988 LIBS="$cf_add_libs"
14990 cat >"conftest.$ac_ext" <<_ACEOF
14991 #line 14991 "configure"
14992 #include "confdefs.h"
14994 #include <pthread.h>
15000 int rc = pthread_create(0,0,0,0);
15001 int r2 = pthread_mutexattr_settype(0, 0);
15007 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15008 if { (eval echo "$as_me:15008: \"$ac_link\"") >&5
15009 (eval $ac_link) 2>&5
15011 echo "$as_me:15011: \$? = $ac_status" >&5
15012 (exit "$ac_status"); } &&
15013 { ac_try='test -s "conftest$ac_exeext"'
15014 { (eval echo "$as_me:15014: \"$ac_try\"") >&5
15015 (eval $ac_try) 2>&5
15017 echo "$as_me:15017: \$? = $ac_status" >&5
15018 (exit "$ac_status"); }; }; then
15021 echo "$as_me: failed program was:" >&5
15022 cat "conftest.$ac_ext" >&5
15025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15026 LIBS="$cf_save_LIBS"
15027 echo "$as_me:15027: result: $with_pthread" >&5
15028 echo "${ECHO_T}$with_pthread" >&6
15029 test "$with_pthread" = yes && break
15032 if test "$with_pthread" = yes ; then
15034 cf_add_libs="$LIBS"
15037 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15038 # filter duplicates
15039 for cf_add_1lib in $cf_add_0lib; do
15040 for cf_add_2lib in $cf_add_libs; do
15041 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15046 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15048 LIBS="$cf_add_libs"
15050 cat >>confdefs.h <<\EOF
15051 #define HAVE_LIBPTHREADS 1
15055 { { echo "$as_me:15055: error: Cannot link with pthread library" >&5
15056 echo "$as_me: error: Cannot link with pthread library" >&2;}
15057 { (exit 1); exit 1; }; }
15064 echo "$as_me:15064: checking if you want to use weak-symbols for pthreads" >&5
15065 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15067 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15068 if test "${enable_weak_symbols+set}" = set; then
15069 enableval="$enable_weak_symbols"
15070 use_weak_symbols=$withval
15072 use_weak_symbols=no
15074 echo "$as_me:15074: result: $use_weak_symbols" >&5
15075 echo "${ECHO_T}$use_weak_symbols" >&6
15076 if test "$use_weak_symbols" = yes ; then
15078 echo "$as_me:15078: checking if $CC supports weak symbols" >&5
15079 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15080 if test "${cf_cv_weak_symbols+set}" = set; then
15081 echo $ECHO_N "(cached) $ECHO_C" >&6
15084 cat >"conftest.$ac_ext" <<_ACEOF
15085 #line 15085 "configure"
15086 #include "confdefs.h"
15093 #if defined(__GNUC__)
15094 # if defined __USE_ISOC99
15095 # define _cat_pragma(exp) _Pragma(#exp)
15096 # define _weak_pragma(exp) _cat_pragma(weak name)
15098 # define _weak_pragma(exp)
15100 # define _declare(name) __extension__ extern __typeof__(name) name
15101 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15104 weak_symbol(fopen);
15110 rm -f "conftest.$ac_objext"
15111 if { (eval echo "$as_me:15111: \"$ac_compile\"") >&5
15112 (eval $ac_compile) 2>&5
15114 echo "$as_me:15114: \$? = $ac_status" >&5
15115 (exit "$ac_status"); } &&
15116 { ac_try='test -s "conftest.$ac_objext"'
15117 { (eval echo "$as_me:15117: \"$ac_try\"") >&5
15118 (eval $ac_try) 2>&5
15120 echo "$as_me:15120: \$? = $ac_status" >&5
15121 (exit "$ac_status"); }; }; then
15122 cf_cv_weak_symbols=yes
15124 echo "$as_me: failed program was:" >&5
15125 cat "conftest.$ac_ext" >&5
15126 cf_cv_weak_symbols=no
15128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15131 echo "$as_me:15131: result: $cf_cv_weak_symbols" >&5
15132 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15135 cf_cv_weak_symbols=no
15138 if test $cf_cv_weak_symbols = yes ; then
15140 cat >>confdefs.h <<\EOF
15141 #define USE_WEAK_SYMBOLS 1
15147 if test "$with_pthread" = "yes" ; then
15149 cat >>confdefs.h <<\EOF
15150 #define USE_PTHREADS 1
15153 enable_reentrant=yes
15154 if test $cf_cv_weak_symbols = yes ; then
15159 # OpenSUSE is installing ncurses6, using reentrant option.
15160 echo "$as_me:15160: checking for _nc_TABSIZE" >&5
15161 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15162 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15163 echo $ECHO_N "(cached) $ECHO_C" >&6
15165 cat >"conftest.$ac_ext" <<_ACEOF
15166 #line 15166 "configure"
15167 #include "confdefs.h"
15168 #define _nc_TABSIZE autoconf_temporary
15169 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15176 /* We use char because int might match the return type of a gcc2
15177 builtin and then its argument prototype would still apply. */
15178 char _nc_TABSIZE (void);
15184 /* The GNU C library defines stubs for functions which it implements
15185 to always fail with ENOSYS. Some functions are actually named
15186 something starting with __ and the normal name is an alias. */
15187 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15188 #error found stub for _nc_TABSIZE
15191 return _nc_TABSIZE ();
15196 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15197 if { (eval echo "$as_me:15197: \"$ac_link\"") >&5
15198 (eval $ac_link) 2>&5
15200 echo "$as_me:15200: \$? = $ac_status" >&5
15201 (exit "$ac_status"); } &&
15202 { ac_try='test -s "conftest$ac_exeext"'
15203 { (eval echo "$as_me:15203: \"$ac_try\"") >&5
15204 (eval $ac_try) 2>&5
15206 echo "$as_me:15206: \$? = $ac_status" >&5
15207 (exit "$ac_status"); }; }; then
15208 ac_cv_func__nc_TABSIZE=yes
15210 echo "$as_me: failed program was:" >&5
15211 cat "conftest.$ac_ext" >&5
15212 ac_cv_func__nc_TABSIZE=no
15214 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15216 echo "$as_me:15216: result: $ac_cv_func__nc_TABSIZE" >&5
15217 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15218 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15219 assume_reentrant=yes
15221 assume_reentrant=no
15224 # Reentrant code has to be opaque; there's little advantage to making ncurses
15225 # opaque outside of that, so there is no --enable-opaque option. We can use
15226 # this option without --with-pthreads, but this will be always set for
15228 echo "$as_me:15228: checking if you want experimental reentrant code" >&5
15229 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15231 # Check whether --enable-reentrant or --disable-reentrant was given.
15232 if test "${enable_reentrant+set}" = set; then
15233 enableval="$enable_reentrant"
15234 with_reentrant=$enableval
15236 with_reentrant=$assume_reentrant
15238 echo "$as_me:15238: result: $with_reentrant" >&5
15239 echo "${ECHO_T}$with_reentrant" >&6
15240 if test "$with_reentrant" = yes ; then
15241 cf_cv_enable_reentrant=1
15242 if test $cf_cv_weak_symbols = yes ; then
15244 # remove pthread library from $LIBS
15245 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15247 elif test "$assume_reentrant" = no ; then
15248 LIB_SUFFIX="t${LIB_SUFFIX}"
15251 cat >>confdefs.h <<\EOF
15252 #define USE_REENTRANT 1
15256 cf_cv_enable_reentrant=0
15259 ### Allow using a different wrap-prefix
15260 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15261 echo "$as_me:15261: checking for prefix used to wrap public variables" >&5
15262 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15264 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15265 if test "${with_wrap_prefix+set}" = set; then
15266 withval="$with_wrap_prefix"
15267 NCURSES_WRAP_PREFIX=$withval
15269 NCURSES_WRAP_PREFIX=_nc_
15271 echo "$as_me:15271: result: $NCURSES_WRAP_PREFIX" >&5
15272 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15274 NCURSES_WRAP_PREFIX=_nc_
15277 cat >>confdefs.h <<EOF
15278 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15281 ###############################################################################
15283 ### use option --disable-echo to suppress full display compiling commands
15285 echo "$as_me:15285: checking if you want to see long compiling messages" >&5
15286 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15288 # Check whether --enable-echo or --disable-echo was given.
15289 if test "${enable_echo+set}" = set; then
15290 enableval="$enable_echo"
15291 test "$enableval" != no && enableval=yes
15292 if test "$enableval" != "yes" ; then
15295 ECHO_LD='@echo linking $@;'
15296 RULE_CC='@echo compiling $<'
15297 SHOW_CC='@echo compiling $@'
15319 echo "$as_me:15319: result: $enableval" >&5
15320 echo "${ECHO_T}$enableval" >&6
15322 echo "$as_me:15322: checking if you want to use C11 _Noreturn feature" >&5
15323 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15325 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15326 if test "${enable_stdnoreturn+set}" = set; then
15327 enableval="$enable_stdnoreturn"
15328 test "$enableval" != yes && enableval=no
15329 if test "$enableval" != "no" ; then
15330 enable_stdnoreturn=yes
15332 enable_stdnoreturn=no
15336 enable_stdnoreturn=no
15339 echo "$as_me:15339: result: $enable_stdnoreturn" >&5
15340 echo "${ECHO_T}$enable_stdnoreturn" >&6
15342 if test $enable_stdnoreturn = yes; then
15343 echo "$as_me:15343: checking for C11 _Noreturn feature" >&5
15344 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15345 if test "${cf_cv_c11_noreturn+set}" = set; then
15346 echo $ECHO_N "(cached) $ECHO_C" >&6
15348 cat >"conftest.$ac_ext" <<_ACEOF
15349 #line 15349 "configure"
15350 #include "confdefs.h"
15353 #include <stdlib.h>
15354 #include <stdnoreturn.h>
15355 static _Noreturn void giveup(void) { exit(0); }
15360 if (feof(stdin)) giveup()
15365 rm -f "conftest.$ac_objext"
15366 if { (eval echo "$as_me:15366: \"$ac_compile\"") >&5
15367 (eval $ac_compile) 2>&5
15369 echo "$as_me:15369: \$? = $ac_status" >&5
15370 (exit "$ac_status"); } &&
15371 { ac_try='test -s "conftest.$ac_objext"'
15372 { (eval echo "$as_me:15372: \"$ac_try\"") >&5
15373 (eval $ac_try) 2>&5
15375 echo "$as_me:15375: \$? = $ac_status" >&5
15376 (exit "$ac_status"); }; }; then
15377 cf_cv_c11_noreturn=yes
15379 echo "$as_me: failed program was:" >&5
15380 cat "conftest.$ac_ext" >&5
15381 cf_cv_c11_noreturn=no
15383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15386 echo "$as_me:15386: result: $cf_cv_c11_noreturn" >&5
15387 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15389 cf_cv_c11_noreturn=no,
15392 if test "$cf_cv_c11_noreturn" = yes; then
15394 cat >>confdefs.h <<\EOF
15395 #define HAVE_STDNORETURN_H 1
15398 cat >>confdefs.h <<EOF
15399 #define STDC_NORETURN _Noreturn
15402 HAVE_STDNORETURN_H=1
15404 HAVE_STDNORETURN_H=0
15407 if test "$GCC" = yes || test "$GXX" = yes
15410 if test "$GCC" = yes || test "$GXX" = yes
15415 for cf_temp_scan in $CFLAGS
15417 case "x$cf_temp_scan" in
15420 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15421 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15426 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15427 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15432 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15433 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15438 if test "x$CFLAGS" != "x$cf_temp_flags"
15440 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15442 echo "${as_me:-configure}:15442: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15444 CFLAGS="$cf_temp_flags"
15445 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15447 echo "${as_me:-configure}:15447: testing ... fixed $CFLAGS ..." 1>&5
15449 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15451 echo "${as_me:-configure}:15451: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15458 if test "$GCC" = yes || test "$GXX" = yes
15463 for cf_temp_scan in $CPPFLAGS
15465 case "x$cf_temp_scan" in
15468 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15469 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15474 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15475 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15480 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15481 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15486 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15488 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15490 echo "${as_me:-configure}:15490: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15492 CPPFLAGS="$cf_temp_flags"
15493 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15495 echo "${as_me:-configure}:15495: testing ... fixed $CPPFLAGS ..." 1>&5
15497 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15499 echo "${as_me:-configure}:15499: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15506 if test "$GCC" = yes || test "$GXX" = yes
15511 for cf_temp_scan in $LDFLAGS
15513 case "x$cf_temp_scan" in
15516 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15517 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15522 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15523 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15528 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15529 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15534 if test "x$LDFLAGS" != "x$cf_temp_flags"
15536 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15538 echo "${as_me:-configure}:15538: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15540 LDFLAGS="$cf_temp_flags"
15541 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15543 echo "${as_me:-configure}:15543: testing ... fixed $LDFLAGS ..." 1>&5
15545 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15547 echo "${as_me:-configure}:15547: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15554 echo "$as_me:15554: checking if you want to turn on gcc warnings" >&5
15555 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15557 # Check whether --enable-warnings or --disable-warnings was given.
15558 if test "${enable_warnings+set}" = set; then
15559 enableval="$enable_warnings"
15560 test "$enableval" != yes && enableval=no
15561 if test "$enableval" != "no" ; then
15562 enable_warnings=yes
15571 echo "$as_me:15571: result: $enable_warnings" >&5
15572 echo "${ECHO_T}$enable_warnings" >&6
15573 if test "$enable_warnings" = "yes"
15576 if test "x$have_x" = xyes; then
15578 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15579 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15580 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15581 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15582 for cf_X_CFLAGS in $X_CFLAGS
15584 case "x$cf_X_CFLAGS" in
15586 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15589 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15594 cat >"conftest.$ac_ext" <<_ACEOF
15595 #line 15595 "configure"
15596 #include "confdefs.h"
15598 #include <stdlib.h>
15599 #include <X11/Intrinsic.h>
15604 String foo = malloc(1); free((void*)foo)
15609 rm -f "conftest.$ac_objext"
15610 if { (eval echo "$as_me:15610: \"$ac_compile\"") >&5
15611 (eval $ac_compile) 2>&5
15613 echo "$as_me:15613: \$? = $ac_status" >&5
15614 (exit "$ac_status"); } &&
15615 { ac_try='test -s "conftest.$ac_objext"'
15616 { (eval echo "$as_me:15616: \"$ac_try\"") >&5
15617 (eval $ac_try) 2>&5
15619 echo "$as_me:15619: \$? = $ac_status" >&5
15620 (exit "$ac_status"); }; }; then
15622 echo "$as_me:15622: checking for X11/Xt const-feature" >&5
15623 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15624 if test "${cf_cv_const_x_string+set}" = set; then
15625 echo $ECHO_N "(cached) $ECHO_C" >&6
15628 cat >"conftest.$ac_ext" <<_ACEOF
15629 #line 15629 "configure"
15630 #include "confdefs.h"
15632 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15633 #undef XTSTRINGDEFINES /* X11R5 and later */
15634 #include <stdlib.h>
15635 #include <X11/Intrinsic.h>
15640 String foo = malloc(1); *foo = 0
15645 rm -f "conftest.$ac_objext"
15646 if { (eval echo "$as_me:15646: \"$ac_compile\"") >&5
15647 (eval $ac_compile) 2>&5
15649 echo "$as_me:15649: \$? = $ac_status" >&5
15650 (exit "$ac_status"); } &&
15651 { ac_try='test -s "conftest.$ac_objext"'
15652 { (eval echo "$as_me:15652: \"$ac_try\"") >&5
15653 (eval $ac_try) 2>&5
15655 echo "$as_me:15655: \$? = $ac_status" >&5
15656 (exit "$ac_status"); }; }; then
15658 cf_cv_const_x_string=no
15661 echo "$as_me: failed program was:" >&5
15662 cat "conftest.$ac_ext" >&5
15664 cf_cv_const_x_string=yes
15667 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15670 echo "$as_me:15670: result: $cf_cv_const_x_string" >&5
15671 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15673 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15674 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15675 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15677 case "$cf_cv_const_x_string" in
15680 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15681 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15686 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15687 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15693 echo "$as_me: failed program was:" >&5
15694 cat "conftest.$ac_ext" >&5
15696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15698 cat > "conftest.$ac_ext" <<EOF
15699 #line 15699 "${as_me:-configure}"
15700 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15702 if test "$INTEL_COMPILER" = yes
15704 # The "-wdXXX" options suppress warnings:
15705 # remark #1419: external declaration in primary source file
15706 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15707 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15708 # remark #193: zero used for undefined preprocessing identifier
15709 # remark #593: variable "curs_sb_left_arrow" was set but never used
15710 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15711 # remark #869: parameter "tw" was never referenced
15712 # remark #981: operands are evaluated in unspecified order
15713 # warning #279: controlling expression is constant
15715 { echo "$as_me:15715: checking for $CC warning options..." >&5
15716 echo "$as_me: checking for $CC warning options..." >&6;}
15717 cf_save_CFLAGS="$CFLAGS"
15718 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15730 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15731 if { (eval echo "$as_me:15731: \"$ac_compile\"") >&5
15732 (eval $ac_compile) 2>&5
15734 echo "$as_me:15734: \$? = $ac_status" >&5
15735 (exit "$ac_status"); }; then
15736 test -n "$verbose" && echo "$as_me:15736: result: ... -$cf_opt" >&5
15737 echo "${ECHO_T}... -$cf_opt" >&6
15738 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15741 CFLAGS="$cf_save_CFLAGS"
15742 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15744 { echo "$as_me:15744: checking for $CC warning options..." >&5
15745 echo "$as_me: checking for $CC warning options..." >&6;}
15746 cf_save_CFLAGS="$CFLAGS"
15748 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15749 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15750 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15751 for cf_opt in W Wall \
15752 Wbad-function-cast \
15755 Wdeclaration-after-statement \
15758 Wmissing-declarations \
15759 Wmissing-prototypes \
15763 Wstrict-prototypes \
15764 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15766 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15767 if { (eval echo "$as_me:15767: \"$ac_compile\"") >&5
15768 (eval $ac_compile) 2>&5
15770 echo "$as_me:15770: \$? = $ac_status" >&5
15771 (exit "$ac_status"); }; then
15772 test -n "$verbose" && echo "$as_me:15772: result: ... -$cf_opt" >&5
15773 echo "${ECHO_T}... -$cf_opt" >&6
15776 case "$GCC_VERSION" in
15778 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15780 echo "${as_me:-configure}:15780: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15786 case "$GCC_VERSION" in
15788 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15790 echo "${as_me:-configure}:15790: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15796 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15799 CFLAGS="$cf_save_CFLAGS"
15805 if test "$GCC" = yes || test "$GXX" = yes
15807 cat > conftest.i <<EOF
15809 #define GCC_PRINTF 0
15812 #define GCC_SCANF 0
15814 #ifndef GCC_NORETURN
15815 #define GCC_NORETURN /* nothing */
15818 #define GCC_UNUSED /* nothing */
15821 if test "$GCC" = yes
15823 { echo "$as_me:15823: checking for $CC __attribute__ directives..." >&5
15824 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15825 cat > "conftest.$ac_ext" <<EOF
15826 #line 15826 "${as_me:-configure}"
15828 #include "confdefs.h"
15829 #include "conftest.h"
15830 #include "conftest.i"
15832 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15834 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15837 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15839 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15841 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15842 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15843 extern GCC_NORETURN void foo(void);
15844 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15846 cf_printf_attribute=no
15847 cf_scanf_attribute=no
15848 for cf_attribute in scanf printf unused noreturn
15851 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15853 cf_directive="__attribute__(($cf_attribute))"
15854 echo "checking for $CC $cf_directive" 1>&5
15856 case "$cf_attribute" in
15858 cf_printf_attribute=yes
15859 cat >conftest.h <<EOF
15860 #define GCC_$cf_ATTRIBUTE 1
15864 cf_scanf_attribute=yes
15865 cat >conftest.h <<EOF
15866 #define GCC_$cf_ATTRIBUTE 1
15870 cat >conftest.h <<EOF
15871 #define GCC_$cf_ATTRIBUTE $cf_directive
15876 if { (eval echo "$as_me:15876: \"$ac_compile\"") >&5
15877 (eval $ac_compile) 2>&5
15879 echo "$as_me:15879: \$? = $ac_status" >&5
15880 (exit "$ac_status"); }; then
15881 test -n "$verbose" && echo "$as_me:15881: result: ... $cf_attribute" >&5
15882 echo "${ECHO_T}... $cf_attribute" >&6
15883 cat conftest.h >>confdefs.h
15884 case "$cf_attribute" in
15887 cat >>confdefs.h <<EOF
15888 #define GCC_NORETURN $cf_directive
15893 cf_value='/* nothing */'
15894 if test "$cf_printf_attribute" != no ; then
15895 cf_value='__attribute__((format(printf,fmt,var)))'
15897 cat >>confdefs.h <<\EOF
15898 #define GCC_PRINTF 1
15903 cat >>confdefs.h <<EOF
15904 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15909 cf_value='/* nothing */'
15910 if test "$cf_scanf_attribute" != no ; then
15911 cf_value='__attribute__((format(scanf,fmt,var)))'
15913 cat >>confdefs.h <<\EOF
15914 #define GCC_SCANF 1
15919 cat >>confdefs.h <<EOF
15920 #define GCC_SCANFLIKE(fmt,var) $cf_value
15926 cat >>confdefs.h <<EOF
15927 #define GCC_UNUSED $cf_directive
15935 ${FGREP-fgrep} define conftest.i >>confdefs.h
15942 if test "x$enable_warnings" = "xyes"; then
15944 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
15948 ### use option --enable-assertions to turn on generation of assertion code
15949 echo "$as_me:15949: checking if you want to enable runtime assertions" >&5
15950 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15952 # Check whether --enable-assertions or --disable-assertions was given.
15953 if test "${enable_assertions+set}" = set; then
15954 enableval="$enable_assertions"
15955 with_assertions=$enableval
15959 echo "$as_me:15959: result: $with_assertions" >&5
15960 echo "${ECHO_T}$with_assertions" >&6
15963 if test "$with_assertions" = no
15965 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15968 ADAFLAGS="$ADAFLAGS -gnata"
15973 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15975 cat >>confdefs.h <<\EOF
15976 #define HAVE_NC_ALLOC_H 1
15979 ### use option --enable-expanded to generate certain macros as functions
15981 # Check whether --enable-expanded or --disable-expanded was given.
15982 if test "${enable_expanded+set}" = set; then
15983 enableval="$enable_expanded"
15984 test "$enableval" = yes &&
15985 cat >>confdefs.h <<\EOF
15986 #define NCURSES_EXPANDED 1
15991 ### use option --disable-macros to suppress macros in favor of functions
15993 # Check whether --enable-macros or --disable-macros was given.
15994 if test "${enable_macros+set}" = set; then
15995 enableval="$enable_macros"
15996 test "$enableval" = no &&
15997 cat >>confdefs.h <<\EOF
15998 #define NCURSES_NOMACROS 1
16003 # Normally we only add trace() to the debug-library. Allow this to be
16004 # extended to all models of the ncurses library:
16006 case "$CFLAGS $CPPFLAGS" in
16012 echo "$as_me:16012: checking whether to add trace feature to all models" >&5
16013 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16015 # Check whether --with-trace or --without-trace was given.
16016 if test "${with_trace+set}" = set; then
16017 withval="$with_trace"
16018 cf_with_trace=$withval
16020 cf_with_trace=$cf_all_traces
16022 echo "$as_me:16022: result: $cf_with_trace" >&5
16023 echo "${ECHO_T}$cf_with_trace" >&6
16025 if test "$cf_with_trace" = yes ; then
16031 cf_new_extra_cppflags=
16033 for cf_add_cflags in -DTRACE
16035 case "$cf_fix_cppflags" in
16037 case "$cf_add_cflags" in
16038 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16039 case "$cf_add_cflags" in
16041 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16043 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16044 && test -z "${cf_tst_cflags}" \
16045 && cf_fix_cppflags=yes
16047 if test "$cf_fix_cppflags" = yes ; then
16049 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16050 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16053 elif test "${cf_tst_cflags}" = "\"'" ; then
16055 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16056 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16062 case "$CPPFLAGS" in
16066 case "$cf_add_cflags" in
16068 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16070 CPPFLAGS=`echo "$CPPFLAGS" | \
16071 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16072 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16077 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16078 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16085 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16086 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16093 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16094 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16096 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16098 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16099 && test -z "${cf_tst_cflags}" \
16100 && cf_fix_cppflags=no
16105 if test -n "$cf_new_cflags" ; then
16107 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16108 CFLAGS="${CFLAGS}$cf_new_cflags"
16112 if test -n "$cf_new_cppflags" ; then
16114 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16115 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16119 if test -n "$cf_new_extra_cppflags" ; then
16121 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16122 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16130 echo "$as_me:16130: checking if we want to use GNAT projects" >&5
16131 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16133 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16134 if test "${enable_gnat_projects+set}" = set; then
16135 enableval="$enable_gnat_projects"
16136 test "$enableval" != no && enableval=yes
16137 if test "$enableval" != "yes" ; then
16138 enable_gnat_projects=no
16140 enable_gnat_projects=yes
16144 enable_gnat_projects=yes
16147 echo "$as_me:16147: result: $enable_gnat_projects" >&5
16148 echo "${ECHO_T}$enable_gnat_projects" >&6
16150 ### Checks for libraries.
16151 case $cf_cv_system_name in
16154 echo "$as_me:16154: checking if ssp library is needed" >&5
16155 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16156 if test "${cf_cv_need_libssp+set}" = set; then
16157 echo $ECHO_N "(cached) $ECHO_C" >&6
16160 cat >"conftest.$ac_ext" <<_ACEOF
16161 #line 16161 "configure"
16162 #include "confdefs.h"
16164 #include <sys/types.h>
16165 #include <dirent.h>
16171 DIR *dp = opendir(".");
16177 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16178 if { (eval echo "$as_me:16178: \"$ac_link\"") >&5
16179 (eval $ac_link) 2>&5
16181 echo "$as_me:16181: \$? = $ac_status" >&5
16182 (exit "$ac_status"); } &&
16183 { ac_try='test -s "conftest$ac_exeext"'
16184 { (eval echo "$as_me:16184: \"$ac_try\"") >&5
16185 (eval $ac_try) 2>&5
16187 echo "$as_me:16187: \$? = $ac_status" >&5
16188 (exit "$ac_status"); }; }; then
16189 cf_cv_need_libssp=no
16191 echo "$as_me: failed program was:" >&5
16192 cat "conftest.$ac_ext" >&5
16194 cf_save_LIBS="$LIBS"
16196 cat >"conftest.$ac_ext" <<_ACEOF
16197 #line 16197 "configure"
16198 #include "confdefs.h"
16200 #include <sys/types.h>
16201 #include <dirent.h>
16207 DIR *dp = opendir(".");
16213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16214 if { (eval echo "$as_me:16214: \"$ac_link\"") >&5
16215 (eval $ac_link) 2>&5
16217 echo "$as_me:16217: \$? = $ac_status" >&5
16218 (exit "$ac_status"); } &&
16219 { ac_try='test -s "conftest$ac_exeext"'
16220 { (eval echo "$as_me:16220: \"$ac_try\"") >&5
16221 (eval $ac_try) 2>&5
16223 echo "$as_me:16223: \$? = $ac_status" >&5
16224 (exit "$ac_status"); }; }; then
16225 cf_cv_need_libssp=yes
16227 echo "$as_me: failed program was:" >&5
16228 cat "conftest.$ac_ext" >&5
16229 cf_cv_need_libssp=maybe
16231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16232 LIBS="$cf_save_LIBS"
16235 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16237 echo "$as_me:16237: result: $cf_cv_need_libssp" >&5
16238 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16240 if test "x$cf_cv_need_libssp" = xyes
16243 cf_add_libs="$LIBS"
16246 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16247 # filter duplicates
16248 for cf_add_1lib in $cf_add_0lib; do
16249 for cf_add_2lib in $cf_add_libs; do
16250 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16255 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16257 LIBS="$cf_add_libs"
16263 echo "$as_me:16263: checking for gettimeofday" >&5
16264 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16265 if test "${ac_cv_func_gettimeofday+set}" = set; then
16266 echo $ECHO_N "(cached) $ECHO_C" >&6
16268 cat >"conftest.$ac_ext" <<_ACEOF
16269 #line 16269 "configure"
16270 #include "confdefs.h"
16271 #define gettimeofday autoconf_temporary
16272 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16273 #undef gettimeofday
16279 /* We use char because int might match the return type of a gcc2
16280 builtin and then its argument prototype would still apply. */
16281 char gettimeofday (void);
16287 /* The GNU C library defines stubs for functions which it implements
16288 to always fail with ENOSYS. Some functions are actually named
16289 something starting with __ and the normal name is an alias. */
16290 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16291 #error found stub for gettimeofday
16294 return gettimeofday ();
16299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16300 if { (eval echo "$as_me:16300: \"$ac_link\"") >&5
16301 (eval $ac_link) 2>&5
16303 echo "$as_me:16303: \$? = $ac_status" >&5
16304 (exit "$ac_status"); } &&
16305 { ac_try='test -s "conftest$ac_exeext"'
16306 { (eval echo "$as_me:16306: \"$ac_try\"") >&5
16307 (eval $ac_try) 2>&5
16309 echo "$as_me:16309: \$? = $ac_status" >&5
16310 (exit "$ac_status"); }; }; then
16311 ac_cv_func_gettimeofday=yes
16313 echo "$as_me: failed program was:" >&5
16314 cat "conftest.$ac_ext" >&5
16315 ac_cv_func_gettimeofday=no
16317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16319 echo "$as_me:16319: result: $ac_cv_func_gettimeofday" >&5
16320 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16321 if test "$ac_cv_func_gettimeofday" = yes; then
16322 cat >>confdefs.h <<\EOF
16323 #define HAVE_GETTIMEOFDAY 1
16328 echo "$as_me:16328: checking for gettimeofday in -lbsd" >&5
16329 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16330 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16331 echo $ECHO_N "(cached) $ECHO_C" >&6
16333 ac_check_lib_save_LIBS=$LIBS
16335 cat >"conftest.$ac_ext" <<_ACEOF
16336 #line 16336 "configure"
16337 #include "confdefs.h"
16339 /* Override any gcc2 internal prototype to avoid an error. */
16343 /* We use char because int might match the return type of a gcc2
16344 builtin and then its argument prototype would still apply. */
16345 char gettimeofday ();
16354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16355 if { (eval echo "$as_me:16355: \"$ac_link\"") >&5
16356 (eval $ac_link) 2>&5
16358 echo "$as_me:16358: \$? = $ac_status" >&5
16359 (exit "$ac_status"); } &&
16360 { ac_try='test -s "conftest$ac_exeext"'
16361 { (eval echo "$as_me:16361: \"$ac_try\"") >&5
16362 (eval $ac_try) 2>&5
16364 echo "$as_me:16364: \$? = $ac_status" >&5
16365 (exit "$ac_status"); }; }; then
16366 ac_cv_lib_bsd_gettimeofday=yes
16368 echo "$as_me: failed program was:" >&5
16369 cat "conftest.$ac_ext" >&5
16370 ac_cv_lib_bsd_gettimeofday=no
16372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16373 LIBS=$ac_check_lib_save_LIBS
16375 echo "$as_me:16375: result: $ac_cv_lib_bsd_gettimeofday" >&5
16376 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16377 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16379 cat >>confdefs.h <<\EOF
16380 #define HAVE_GETTIMEOFDAY 1
16390 ### Checks for header files.
16391 echo "$as_me:16391: checking for ANSI C header files" >&5
16392 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16393 if test "${ac_cv_header_stdc+set}" = set; then
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
16396 cat >"conftest.$ac_ext" <<_ACEOF
16397 #line 16397 "configure"
16398 #include "confdefs.h"
16399 #include <stdlib.h>
16400 #include <stdarg.h>
16401 #include <string.h>
16405 if { (eval echo "$as_me:16405: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16406 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16408 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16410 cat conftest.err >&5
16411 echo "$as_me:16411: \$? = $ac_status" >&5
16412 (exit "$ac_status"); } >/dev/null; then
16413 if test -s conftest.err; then
16414 ac_cpp_err=$ac_c_preproc_warn_flag
16421 if test -z "$ac_cpp_err"; then
16422 ac_cv_header_stdc=yes
16424 echo "$as_me: failed program was:" >&5
16425 cat "conftest.$ac_ext" >&5
16426 ac_cv_header_stdc=no
16428 rm -f conftest.err "conftest.$ac_ext"
16430 if test $ac_cv_header_stdc = yes; then
16431 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16432 cat >"conftest.$ac_ext" <<_ACEOF
16433 #line 16433 "configure"
16434 #include "confdefs.h"
16435 #include <string.h>
16438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16439 $EGREP "memchr" >/dev/null 2>&1; then
16442 ac_cv_header_stdc=no
16448 if test $ac_cv_header_stdc = yes; then
16449 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16450 cat >"conftest.$ac_ext" <<_ACEOF
16451 #line 16451 "configure"
16452 #include "confdefs.h"
16453 #include <stdlib.h>
16456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16457 $EGREP "free" >/dev/null 2>&1; then
16460 ac_cv_header_stdc=no
16466 if test $ac_cv_header_stdc = yes; then
16467 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16468 if test "$cross_compiling" = yes; then
16471 cat >"conftest.$ac_ext" <<_ACEOF
16472 #line 16472 "configure"
16473 #include "confdefs.h"
16475 #if ((' ' & 0x0FF) == 0x020)
16476 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16477 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16479 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16480 || ('j' <= (c) && (c) <= 'r') \
16481 || ('s' <= (c) && (c) <= 'z'))
16482 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16485 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16490 for (i = 0; i < 256; i++)
16491 if (XOR (islower (i), ISLOWER (i))
16492 || toupper (i) != TOUPPER (i))
16493 $ac_main_return(2);
16494 $ac_main_return (0);
16497 rm -f "conftest$ac_exeext"
16498 if { (eval echo "$as_me:16498: \"$ac_link\"") >&5
16499 (eval $ac_link) 2>&5
16501 echo "$as_me:16501: \$? = $ac_status" >&5
16502 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16503 { (eval echo "$as_me:16503: \"$ac_try\"") >&5
16504 (eval $ac_try) 2>&5
16506 echo "$as_me:16506: \$? = $ac_status" >&5
16507 (exit "$ac_status"); }; }; then
16510 echo "$as_me: program exited with status $ac_status" >&5
16511 echo "$as_me: failed program was:" >&5
16512 cat "conftest.$ac_ext" >&5
16513 ac_cv_header_stdc=no
16515 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16519 echo "$as_me:16519: result: $ac_cv_header_stdc" >&5
16520 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16521 if test $ac_cv_header_stdc = yes; then
16523 cat >>confdefs.h <<\EOF
16524 #define STDC_HEADERS 1
16529 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16531 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16532 inttypes.h stdint.h unistd.h
16534 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16535 echo "$as_me:16535: checking for $ac_header" >&5
16536 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16537 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16538 echo $ECHO_N "(cached) $ECHO_C" >&6
16540 cat >"conftest.$ac_ext" <<_ACEOF
16541 #line 16541 "configure"
16542 #include "confdefs.h"
16543 $ac_includes_default
16544 #include <$ac_header>
16546 rm -f "conftest.$ac_objext"
16547 if { (eval echo "$as_me:16547: \"$ac_compile\"") >&5
16548 (eval $ac_compile) 2>&5
16550 echo "$as_me:16550: \$? = $ac_status" >&5
16551 (exit "$ac_status"); } &&
16552 { ac_try='test -s "conftest.$ac_objext"'
16553 { (eval echo "$as_me:16553: \"$ac_try\"") >&5
16554 (eval $ac_try) 2>&5
16556 echo "$as_me:16556: \$? = $ac_status" >&5
16557 (exit "$ac_status"); }; }; then
16558 eval "$as_ac_Header=yes"
16560 echo "$as_me: failed program was:" >&5
16561 cat "conftest.$ac_ext" >&5
16562 eval "$as_ac_Header=no"
16564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16566 echo "$as_me:16566: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16567 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16568 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16569 cat >>confdefs.h <<EOF
16570 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16576 echo "$as_me:16576: checking for signed char" >&5
16577 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16578 if test "${ac_cv_type_signed_char+set}" = set; then
16579 echo $ECHO_N "(cached) $ECHO_C" >&6
16581 cat >"conftest.$ac_ext" <<_ACEOF
16582 #line 16582 "configure"
16583 #include "confdefs.h"
16584 $ac_includes_default
16588 if ((signed char *) 0)
16590 if (sizeof (signed char))
16596 rm -f "conftest.$ac_objext"
16597 if { (eval echo "$as_me:16597: \"$ac_compile\"") >&5
16598 (eval $ac_compile) 2>&5
16600 echo "$as_me:16600: \$? = $ac_status" >&5
16601 (exit "$ac_status"); } &&
16602 { ac_try='test -s "conftest.$ac_objext"'
16603 { (eval echo "$as_me:16603: \"$ac_try\"") >&5
16604 (eval $ac_try) 2>&5
16606 echo "$as_me:16606: \$? = $ac_status" >&5
16607 (exit "$ac_status"); }; }; then
16608 ac_cv_type_signed_char=yes
16610 echo "$as_me: failed program was:" >&5
16611 cat "conftest.$ac_ext" >&5
16612 ac_cv_type_signed_char=no
16614 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16616 echo "$as_me:16616: result: $ac_cv_type_signed_char" >&5
16617 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16619 echo "$as_me:16619: checking size of signed char" >&5
16620 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16621 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16622 echo $ECHO_N "(cached) $ECHO_C" >&6
16624 if test "$ac_cv_type_signed_char" = yes; then
16625 if test "$cross_compiling" = yes; then
16626 # Depending upon the size, compute the lo and hi bounds.
16627 cat >"conftest.$ac_ext" <<_ACEOF
16628 #line 16628 "configure"
16629 #include "confdefs.h"
16630 $ac_includes_default
16634 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16639 rm -f "conftest.$ac_objext"
16640 if { (eval echo "$as_me:16640: \"$ac_compile\"") >&5
16641 (eval $ac_compile) 2>&5
16643 echo "$as_me:16643: \$? = $ac_status" >&5
16644 (exit "$ac_status"); } &&
16645 { ac_try='test -s "conftest.$ac_objext"'
16646 { (eval echo "$as_me:16646: \"$ac_try\"") >&5
16647 (eval $ac_try) 2>&5
16649 echo "$as_me:16649: \$? = $ac_status" >&5
16650 (exit "$ac_status"); }; }; then
16653 cat >"conftest.$ac_ext" <<_ACEOF
16654 #line 16654 "configure"
16655 #include "confdefs.h"
16656 $ac_includes_default
16660 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16665 rm -f "conftest.$ac_objext"
16666 if { (eval echo "$as_me:16666: \"$ac_compile\"") >&5
16667 (eval $ac_compile) 2>&5
16669 echo "$as_me:16669: \$? = $ac_status" >&5
16670 (exit "$ac_status"); } &&
16671 { ac_try='test -s "conftest.$ac_objext"'
16672 { (eval echo "$as_me:16672: \"$ac_try\"") >&5
16673 (eval $ac_try) 2>&5
16675 echo "$as_me:16675: \$? = $ac_status" >&5
16676 (exit "$ac_status"); }; }; then
16677 ac_hi=$ac_mid; break
16679 echo "$as_me: failed program was:" >&5
16680 cat "conftest.$ac_ext" >&5
16681 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16683 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16686 echo "$as_me: failed program was:" >&5
16687 cat "conftest.$ac_ext" >&5
16690 cat >"conftest.$ac_ext" <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16693 $ac_includes_default
16697 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16702 rm -f "conftest.$ac_objext"
16703 if { (eval echo "$as_me:16703: \"$ac_compile\"") >&5
16704 (eval $ac_compile) 2>&5
16706 echo "$as_me:16706: \$? = $ac_status" >&5
16707 (exit "$ac_status"); } &&
16708 { ac_try='test -s "conftest.$ac_objext"'
16709 { (eval echo "$as_me:16709: \"$ac_try\"") >&5
16710 (eval $ac_try) 2>&5
16712 echo "$as_me:16712: \$? = $ac_status" >&5
16713 (exit "$ac_status"); }; }; then
16714 ac_lo=$ac_mid; break
16716 echo "$as_me: failed program was:" >&5
16717 cat "conftest.$ac_ext" >&5
16718 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16720 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16724 # Binary search between lo and hi bounds.
16725 while test "x$ac_lo" != "x$ac_hi"; do
16726 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16727 cat >"conftest.$ac_ext" <<_ACEOF
16728 #line 16728 "configure"
16729 #include "confdefs.h"
16730 $ac_includes_default
16734 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16739 rm -f "conftest.$ac_objext"
16740 if { (eval echo "$as_me:16740: \"$ac_compile\"") >&5
16741 (eval $ac_compile) 2>&5
16743 echo "$as_me:16743: \$? = $ac_status" >&5
16744 (exit "$ac_status"); } &&
16745 { ac_try='test -s "conftest.$ac_objext"'
16746 { (eval echo "$as_me:16746: \"$ac_try\"") >&5
16747 (eval $ac_try) 2>&5
16749 echo "$as_me:16749: \$? = $ac_status" >&5
16750 (exit "$ac_status"); }; }; then
16753 echo "$as_me: failed program was:" >&5
16754 cat "conftest.$ac_ext" >&5
16755 ac_lo=`expr "$ac_mid" + 1`
16757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16759 ac_cv_sizeof_signed_char=$ac_lo
16761 if test "$cross_compiling" = yes; then
16762 { { echo "$as_me:16762: error: cannot run test program while cross compiling" >&5
16763 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16764 { (exit 1); exit 1; }; }
16766 cat >"conftest.$ac_ext" <<_ACEOF
16767 #line 16767 "configure"
16768 #include "confdefs.h"
16769 $ac_includes_default
16773 FILE *f = fopen ("conftest.val", "w");
16775 $ac_main_return (1);
16776 fprintf (f, "%ld", (long)(sizeof (signed char)));
16782 rm -f "conftest$ac_exeext"
16783 if { (eval echo "$as_me:16783: \"$ac_link\"") >&5
16784 (eval $ac_link) 2>&5
16786 echo "$as_me:16786: \$? = $ac_status" >&5
16787 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16788 { (eval echo "$as_me:16788: \"$ac_try\"") >&5
16789 (eval $ac_try) 2>&5
16791 echo "$as_me:16791: \$? = $ac_status" >&5
16792 (exit "$ac_status"); }; }; then
16793 ac_cv_sizeof_signed_char=`cat conftest.val`
16795 echo "$as_me: program exited with status $ac_status" >&5
16796 echo "$as_me: failed program was:" >&5
16797 cat "conftest.$ac_ext" >&5
16799 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16804 ac_cv_sizeof_signed_char=0
16807 echo "$as_me:16807: result: $ac_cv_sizeof_signed_char" >&5
16808 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16809 cat >>confdefs.h <<EOF
16810 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16813 echo "$as_me:16813: checking for ANSI C header files" >&5
16814 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16815 if test "${ac_cv_header_stdc+set}" = set; then
16816 echo $ECHO_N "(cached) $ECHO_C" >&6
16818 cat >"conftest.$ac_ext" <<_ACEOF
16819 #line 16819 "configure"
16820 #include "confdefs.h"
16821 #include <stdlib.h>
16822 #include <stdarg.h>
16823 #include <string.h>
16827 if { (eval echo "$as_me:16827: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16828 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16830 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16832 cat conftest.err >&5
16833 echo "$as_me:16833: \$? = $ac_status" >&5
16834 (exit "$ac_status"); } >/dev/null; then
16835 if test -s conftest.err; then
16836 ac_cpp_err=$ac_c_preproc_warn_flag
16843 if test -z "$ac_cpp_err"; then
16844 ac_cv_header_stdc=yes
16846 echo "$as_me: failed program was:" >&5
16847 cat "conftest.$ac_ext" >&5
16848 ac_cv_header_stdc=no
16850 rm -f conftest.err "conftest.$ac_ext"
16852 if test $ac_cv_header_stdc = yes; then
16853 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16854 cat >"conftest.$ac_ext" <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857 #include <string.h>
16860 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16861 $EGREP "memchr" >/dev/null 2>&1; then
16864 ac_cv_header_stdc=no
16870 if test $ac_cv_header_stdc = yes; then
16871 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16872 cat >"conftest.$ac_ext" <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875 #include <stdlib.h>
16878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16879 $EGREP "free" >/dev/null 2>&1; then
16882 ac_cv_header_stdc=no
16888 if test $ac_cv_header_stdc = yes; then
16889 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16890 if test "$cross_compiling" = yes; then
16893 cat >"conftest.$ac_ext" <<_ACEOF
16894 #line 16894 "configure"
16895 #include "confdefs.h"
16897 #if ((' ' & 0x0FF) == 0x020)
16898 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16899 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16901 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16902 || ('j' <= (c) && (c) <= 'r') \
16903 || ('s' <= (c) && (c) <= 'z'))
16904 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16907 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16912 for (i = 0; i < 256; i++)
16913 if (XOR (islower (i), ISLOWER (i))
16914 || toupper (i) != TOUPPER (i))
16915 $ac_main_return(2);
16916 $ac_main_return (0);
16919 rm -f "conftest$ac_exeext"
16920 if { (eval echo "$as_me:16920: \"$ac_link\"") >&5
16921 (eval $ac_link) 2>&5
16923 echo "$as_me:16923: \$? = $ac_status" >&5
16924 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16925 { (eval echo "$as_me:16925: \"$ac_try\"") >&5
16926 (eval $ac_try) 2>&5
16928 echo "$as_me:16928: \$? = $ac_status" >&5
16929 (exit "$ac_status"); }; }; then
16932 echo "$as_me: program exited with status $ac_status" >&5
16933 echo "$as_me: failed program was:" >&5
16934 cat "conftest.$ac_ext" >&5
16935 ac_cv_header_stdc=no
16937 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16941 echo "$as_me:16941: result: $ac_cv_header_stdc" >&5
16942 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16943 if test $ac_cv_header_stdc = yes; then
16945 cat >>confdefs.h <<\EOF
16946 #define STDC_HEADERS 1
16951 ac_header_dirent=no
16952 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16953 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16954 echo "$as_me:16954: checking for $ac_hdr that defines DIR" >&5
16955 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16956 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16957 echo $ECHO_N "(cached) $ECHO_C" >&6
16959 cat >"conftest.$ac_ext" <<_ACEOF
16960 #line 16960 "configure"
16961 #include "confdefs.h"
16962 #include <sys/types.h>
16974 rm -f "conftest.$ac_objext"
16975 if { (eval echo "$as_me:16975: \"$ac_compile\"") >&5
16976 (eval $ac_compile) 2>&5
16978 echo "$as_me:16978: \$? = $ac_status" >&5
16979 (exit "$ac_status"); } &&
16980 { ac_try='test -s "conftest.$ac_objext"'
16981 { (eval echo "$as_me:16981: \"$ac_try\"") >&5
16982 (eval $ac_try) 2>&5
16984 echo "$as_me:16984: \$? = $ac_status" >&5
16985 (exit "$ac_status"); }; }; then
16986 eval "$as_ac_Header=yes"
16988 echo "$as_me: failed program was:" >&5
16989 cat "conftest.$ac_ext" >&5
16990 eval "$as_ac_Header=no"
16992 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16994 echo "$as_me:16994: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16995 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16996 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16997 cat >>confdefs.h <<EOF
16998 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17001 ac_header_dirent=$ac_hdr; break
17005 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17006 if test $ac_header_dirent = dirent.h; then
17007 echo "$as_me:17007: checking for opendir in -ldir" >&5
17008 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17009 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17010 echo $ECHO_N "(cached) $ECHO_C" >&6
17012 ac_check_lib_save_LIBS=$LIBS
17014 cat >"conftest.$ac_ext" <<_ACEOF
17015 #line 17015 "configure"
17016 #include "confdefs.h"
17018 /* Override any gcc2 internal prototype to avoid an error. */
17022 /* We use char because int might match the return type of a gcc2
17023 builtin and then its argument prototype would still apply. */
17033 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17034 if { (eval echo "$as_me:17034: \"$ac_link\"") >&5
17035 (eval $ac_link) 2>&5
17037 echo "$as_me:17037: \$? = $ac_status" >&5
17038 (exit "$ac_status"); } &&
17039 { ac_try='test -s "conftest$ac_exeext"'
17040 { (eval echo "$as_me:17040: \"$ac_try\"") >&5
17041 (eval $ac_try) 2>&5
17043 echo "$as_me:17043: \$? = $ac_status" >&5
17044 (exit "$ac_status"); }; }; then
17045 ac_cv_lib_dir_opendir=yes
17047 echo "$as_me: failed program was:" >&5
17048 cat "conftest.$ac_ext" >&5
17049 ac_cv_lib_dir_opendir=no
17051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17052 LIBS=$ac_check_lib_save_LIBS
17054 echo "$as_me:17054: result: $ac_cv_lib_dir_opendir" >&5
17055 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17056 if test "$ac_cv_lib_dir_opendir" = yes; then
17061 echo "$as_me:17061: checking for opendir in -lx" >&5
17062 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17063 if test "${ac_cv_lib_x_opendir+set}" = set; then
17064 echo $ECHO_N "(cached) $ECHO_C" >&6
17066 ac_check_lib_save_LIBS=$LIBS
17068 cat >"conftest.$ac_ext" <<_ACEOF
17069 #line 17069 "configure"
17070 #include "confdefs.h"
17072 /* Override any gcc2 internal prototype to avoid an error. */
17076 /* We use char because int might match the return type of a gcc2
17077 builtin and then its argument prototype would still apply. */
17087 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17088 if { (eval echo "$as_me:17088: \"$ac_link\"") >&5
17089 (eval $ac_link) 2>&5
17091 echo "$as_me:17091: \$? = $ac_status" >&5
17092 (exit "$ac_status"); } &&
17093 { ac_try='test -s "conftest$ac_exeext"'
17094 { (eval echo "$as_me:17094: \"$ac_try\"") >&5
17095 (eval $ac_try) 2>&5
17097 echo "$as_me:17097: \$? = $ac_status" >&5
17098 (exit "$ac_status"); }; }; then
17099 ac_cv_lib_x_opendir=yes
17101 echo "$as_me: failed program was:" >&5
17102 cat "conftest.$ac_ext" >&5
17103 ac_cv_lib_x_opendir=no
17105 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17106 LIBS=$ac_check_lib_save_LIBS
17108 echo "$as_me:17108: result: $ac_cv_lib_x_opendir" >&5
17109 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17110 if test "$ac_cv_lib_x_opendir" = yes; then
17116 echo "$as_me:17116: checking whether time.h and sys/time.h may both be included" >&5
17117 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17118 if test "${ac_cv_header_time+set}" = set; then
17119 echo $ECHO_N "(cached) $ECHO_C" >&6
17121 cat >"conftest.$ac_ext" <<_ACEOF
17122 #line 17122 "configure"
17123 #include "confdefs.h"
17124 #include <sys/types.h>
17125 #include <sys/time.h>
17131 if ((struct tm *) 0)
17137 rm -f "conftest.$ac_objext"
17138 if { (eval echo "$as_me:17138: \"$ac_compile\"") >&5
17139 (eval $ac_compile) 2>&5
17141 echo "$as_me:17141: \$? = $ac_status" >&5
17142 (exit "$ac_status"); } &&
17143 { ac_try='test -s "conftest.$ac_objext"'
17144 { (eval echo "$as_me:17144: \"$ac_try\"") >&5
17145 (eval $ac_try) 2>&5
17147 echo "$as_me:17147: \$? = $ac_status" >&5
17148 (exit "$ac_status"); }; }; then
17149 ac_cv_header_time=yes
17151 echo "$as_me: failed program was:" >&5
17152 cat "conftest.$ac_ext" >&5
17153 ac_cv_header_time=no
17155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17157 echo "$as_me:17157: result: $ac_cv_header_time" >&5
17158 echo "${ECHO_T}$ac_cv_header_time" >&6
17159 if test $ac_cv_header_time = yes; then
17161 cat >>confdefs.h <<\EOF
17162 #define TIME_WITH_SYS_TIME 1
17167 ### checks for compiler characteristics
17169 ac_cpp='$CPP $CPPFLAGS'
17170 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17171 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17172 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17173 ac_main_return="return"
17175 echo "$as_me:17175: checking for an ANSI C-conforming const" >&5
17176 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17177 if test "${ac_cv_c_const+set}" = set; then
17178 echo $ECHO_N "(cached) $ECHO_C" >&6
17180 cat >"conftest.$ac_ext" <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17187 /* FIXME: Include the comments suggested by Paul. */
17188 #ifndef __cplusplus
17189 /* Ultrix mips cc rejects this. */
17190 typedef int charset[2];
17192 /* SunOS 4.1.1 cc rejects this. */
17193 char const *const *ccp;
17195 /* NEC SVR4.0.2 mips cc rejects this. */
17196 struct point {int x, y;};
17197 static struct point const zero = {0,0};
17198 /* AIX XL C 1.02.0.0 rejects this.
17199 It does not let you subtract one const X* pointer from another in
17200 an arm of an if-expression whose if-part is not a constant
17202 const char *g = "string";
17203 ccp = &g + (g ? g-g : 0);
17204 /* HPUX 7.0 cc rejects these. */
17207 ccp = (char const *const *) p;
17208 { /* SCO 3.2v4 cc rejects this. */
17210 char const *s = 0 ? (char *) 0 : (char const *) 0;
17214 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17215 int x[] = {25, 17};
17216 const int *foo = &x[0];
17219 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17220 typedef const int *iptr;
17224 { /* AIX XL C 1.02.0.0 rejects this saying
17225 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17226 struct s { int j; const int *ap[3]; };
17227 struct s *b; b->j = 5;
17229 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17230 const int foo = 10;
17238 rm -f "conftest.$ac_objext"
17239 if { (eval echo "$as_me:17239: \"$ac_compile\"") >&5
17240 (eval $ac_compile) 2>&5
17242 echo "$as_me:17242: \$? = $ac_status" >&5
17243 (exit "$ac_status"); } &&
17244 { ac_try='test -s "conftest.$ac_objext"'
17245 { (eval echo "$as_me:17245: \"$ac_try\"") >&5
17246 (eval $ac_try) 2>&5
17248 echo "$as_me:17248: \$? = $ac_status" >&5
17249 (exit "$ac_status"); }; }; then
17252 echo "$as_me: failed program was:" >&5
17253 cat "conftest.$ac_ext" >&5
17256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17258 echo "$as_me:17258: result: $ac_cv_c_const" >&5
17259 echo "${ECHO_T}$ac_cv_c_const" >&6
17260 if test $ac_cv_c_const = no; then
17262 cat >>confdefs.h <<\EOF
17268 ### Checks for external-data
17270 echo "$as_me:17270: checking if data-only library module links" >&5
17271 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17272 if test "${cf_cv_link_dataonly+set}" = set; then
17273 echo $ECHO_N "(cached) $ECHO_C" >&6
17277 cat >conftest.$ac_ext <<EOF
17278 #line 17278 "configure"
17279 int testdata[3] = { 123, 456, 789 };
17281 if { (eval echo "$as_me:17281: \"$ac_compile\"") >&5
17282 (eval $ac_compile) 2>&5
17284 echo "$as_me:17284: \$? = $ac_status" >&5
17285 (exit "$ac_status"); } ; then
17286 mv conftest.o data.o && \
17287 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17289 rm -f conftest.$ac_ext data.o
17290 cat >conftest.$ac_ext <<EOF
17291 #line 17291 "configure"
17295 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17297 extern int testdata[3];
17298 return testdata[0] == 123
17299 && testdata[1] == 456
17300 && testdata[2] == 789;
17304 if { (eval echo "$as_me:17304: \"$ac_compile\"") >&5
17305 (eval $ac_compile) 2>&5
17307 echo "$as_me:17307: \$? = $ac_status" >&5
17308 (exit "$ac_status"); }; then
17309 mv conftest.o func.o && \
17310 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17312 rm -f conftest.$ac_ext func.o
17313 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17314 cf_saveLIBS="$LIBS"
17315 LIBS="conftest.a $LIBS"
17316 if test "$cross_compiling" = yes; then
17317 cf_cv_link_dataonly=unknown
17319 cat >"conftest.$ac_ext" <<_ACEOF
17320 #line 17320 "configure"
17321 #include "confdefs.h"
17325 extern int testfunc();
17326 ${cf_cv_main_return:-return} (!testfunc());
17330 rm -f "conftest$ac_exeext"
17331 if { (eval echo "$as_me:17331: \"$ac_link\"") >&5
17332 (eval $ac_link) 2>&5
17334 echo "$as_me:17334: \$? = $ac_status" >&5
17335 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17336 { (eval echo "$as_me:17336: \"$ac_try\"") >&5
17337 (eval $ac_try) 2>&5
17339 echo "$as_me:17339: \$? = $ac_status" >&5
17340 (exit "$ac_status"); }; }; then
17341 cf_cv_link_dataonly=yes
17343 echo "$as_me: program exited with status $ac_status" >&5
17344 echo "$as_me: failed program was:" >&5
17345 cat "conftest.$ac_ext" >&5
17346 cf_cv_link_dataonly=no
17348 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17350 LIBS="$cf_saveLIBS"
17354 echo "$as_me:17354: result: $cf_cv_link_dataonly" >&5
17355 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17357 if test "$cf_cv_link_dataonly" = no ; then
17359 cat >>confdefs.h <<\EOF
17360 #define BROKEN_LINKER 1
17366 ### Checks for library functions.
17372 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17373 echo "$as_me:17373: checking for $ac_header" >&5
17374 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17375 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17376 echo $ECHO_N "(cached) $ECHO_C" >&6
17378 cat >"conftest.$ac_ext" <<_ACEOF
17379 #line 17379 "configure"
17380 #include "confdefs.h"
17381 #include <$ac_header>
17383 if { (eval echo "$as_me:17383: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17384 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17386 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17388 cat conftest.err >&5
17389 echo "$as_me:17389: \$? = $ac_status" >&5
17390 (exit "$ac_status"); } >/dev/null; then
17391 if test -s conftest.err; then
17392 ac_cpp_err=$ac_c_preproc_warn_flag
17399 if test -z "$ac_cpp_err"; then
17400 eval "$as_ac_Header=yes"
17402 echo "$as_me: failed program was:" >&5
17403 cat "conftest.$ac_ext" >&5
17404 eval "$as_ac_Header=no"
17406 rm -f conftest.err "conftest.$ac_ext"
17408 echo "$as_me:17408: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17409 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17410 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17411 cat >>confdefs.h <<EOF
17412 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17418 echo "$as_me:17418: checking for working mkstemp" >&5
17419 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17420 if test "${cf_cv_func_mkstemp+set}" = set; then
17421 echo $ECHO_N "(cached) $ECHO_C" >&6
17425 if test "$cross_compiling" = yes; then
17426 cf_cv_func_mkstemp=maybe
17428 cat >"conftest.$ac_ext" <<_ACEOF
17429 #line 17429 "configure"
17430 #include "confdefs.h"
17432 $ac_includes_default
17436 char *tmpl = "conftestXXXXXX";
17444 for (n = 0; n < 2; ++n) {
17445 strcpy(name[n], tmpl);
17446 if ((fd = mkstemp(name[n])) >= 0) {
17447 if (!strcmp(name[n], tmpl)
17448 || stat(name[n], &sb) != 0
17449 || (sb.st_mode & S_IFMT) != S_IFREG
17450 || (sb.st_mode & 077) != 0) {
17457 && !strcmp(name[0], name[1]))
17459 ${cf_cv_main_return:-return}(result);
17463 rm -f "conftest$ac_exeext"
17464 if { (eval echo "$as_me:17464: \"$ac_link\"") >&5
17465 (eval $ac_link) 2>&5
17467 echo "$as_me:17467: \$? = $ac_status" >&5
17468 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17469 { (eval echo "$as_me:17469: \"$ac_try\"") >&5
17470 (eval $ac_try) 2>&5
17472 echo "$as_me:17472: \$? = $ac_status" >&5
17473 (exit "$ac_status"); }; }; then
17474 cf_cv_func_mkstemp=yes
17477 echo "$as_me: program exited with status $ac_status" >&5
17478 echo "$as_me: failed program was:" >&5
17479 cat "conftest.$ac_ext" >&5
17480 cf_cv_func_mkstemp=no
17483 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17487 echo "$as_me:17487: result: $cf_cv_func_mkstemp" >&5
17488 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17489 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17490 echo "$as_me:17490: checking for mkstemp" >&5
17491 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17492 if test "${ac_cv_func_mkstemp+set}" = set; then
17493 echo $ECHO_N "(cached) $ECHO_C" >&6
17495 cat >"conftest.$ac_ext" <<_ACEOF
17496 #line 17496 "configure"
17497 #include "confdefs.h"
17498 #define mkstemp autoconf_temporary
17499 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17506 /* We use char because int might match the return type of a gcc2
17507 builtin and then its argument prototype would still apply. */
17508 char mkstemp (void);
17514 /* The GNU C library defines stubs for functions which it implements
17515 to always fail with ENOSYS. Some functions are actually named
17516 something starting with __ and the normal name is an alias. */
17517 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17518 #error found stub for mkstemp
17526 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17527 if { (eval echo "$as_me:17527: \"$ac_link\"") >&5
17528 (eval $ac_link) 2>&5
17530 echo "$as_me:17530: \$? = $ac_status" >&5
17531 (exit "$ac_status"); } &&
17532 { ac_try='test -s "conftest$ac_exeext"'
17533 { (eval echo "$as_me:17533: \"$ac_try\"") >&5
17534 (eval $ac_try) 2>&5
17536 echo "$as_me:17536: \$? = $ac_status" >&5
17537 (exit "$ac_status"); }; }; then
17538 ac_cv_func_mkstemp=yes
17540 echo "$as_me: failed program was:" >&5
17541 cat "conftest.$ac_ext" >&5
17542 ac_cv_func_mkstemp=no
17544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17546 echo "$as_me:17546: result: $ac_cv_func_mkstemp" >&5
17547 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17550 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17552 cat >>confdefs.h <<\EOF
17553 #define HAVE_MKSTEMP 1
17558 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17559 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17560 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17564 if test "$cf_with_ada" != "no" ; then
17566 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17569 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17571 unset ac_cv_path_cf_TEMP_gnat
17573 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17574 set dummy $cf_prog_gnat; ac_word=$2
17575 echo "$as_me:17575: checking for $ac_word" >&5
17576 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17577 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17578 echo $ECHO_N "(cached) $ECHO_C" >&6
17580 case $cf_TEMP_gnat in
17582 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17585 ac_save_IFS=$IFS; IFS=$ac_path_separator
17587 for ac_dir in $ac_dummy; do
17589 test -z "$ac_dir" && ac_dir=.
17590 if $as_executable_p "$ac_dir/$ac_word"; then
17591 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17592 echo "$as_me:17592: found $ac_dir/$ac_word" >&5
17597 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17601 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17603 if test -n "$cf_TEMP_gnat"; then
17604 echo "$as_me:17604: result: $cf_TEMP_gnat" >&5
17605 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17607 echo "$as_me:17607: result: no" >&5
17608 echo "${ECHO_T}no" >&6
17611 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17613 if test "x$cf_TEMP_gnat" != xno; then
17614 unset cf_cv_gnat_version
17617 echo "$as_me:17617: checking for $cf_prog_gnat version" >&5
17618 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17619 if test "${cf_cv_gnat_version+set}" = set; then
17620 echo $ECHO_N "(cached) $ECHO_C" >&6
17623 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17624 grep '[0-9].[0-9][0-9]*' |\
17625 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17628 echo "$as_me:17628: result: $cf_cv_gnat_version" >&5
17629 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17630 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17631 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17634 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17637 unset cf_cv_gnat_version
17638 unset ac_cv_path_cf_TEMP_gnat
17641 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17643 cf_cv_prog_gnat_correct=no
17645 cf_ada_make=gnatmake
17646 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17647 # gprconfig is newer than gnatmake; we can continue...
17650 rm -rf ./conftest* ./*~conftest*
17651 if mkdir conftest.src
17655 for cf_gprconfig in Ada C
17657 echo "$as_me:17657: checking for gprconfig name for $cf_gprconfig" >&5
17658 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17659 if test "$cf_gprconfig" = C
17661 for cf_gprconfig_param in \
17662 "$cf_gprconfig,,,,GNATGCC" \
17663 "$cf_gprconfig,,,,GCC" \
17666 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17667 test -n "$cf_gprconfig_value" && break
17670 cf_gprconfig_param=$cf_gprconfig
17671 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17673 if test -n "$cf_gprconfig_value"
17675 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17676 echo "$as_me:17676: result: $cf_gprconfig_value" >&5
17677 echo "${ECHO_T}$cf_gprconfig_value" >&6
17679 echo "$as_me:17679: result: missing" >&5
17680 echo "${ECHO_T}missing" >&6
17686 rm -rf ./conftest* ./*~conftest*
17689 if test "x$cf_ada_config" != "x#"
17692 echo "$as_me:17692: checking for gnat version" >&5
17693 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17694 if test "${cf_cv_gnat_version+set}" = set; then
17695 echo $ECHO_N "(cached) $ECHO_C" >&6
17698 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17699 grep '[0-9].[0-9][0-9]*' |\
17700 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17703 echo "$as_me:17703: result: $cf_cv_gnat_version" >&5
17704 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17705 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17707 case "$cf_cv_gnat_version" in
17708 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17709 cf_cv_prog_gnat_correct=yes
17712 { echo "$as_me:17712: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17713 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17714 cf_cv_prog_gnat_correct=no
17718 # Extract the first word of "m4", so it can be a program name with args.
17719 set dummy m4; ac_word=$2
17720 echo "$as_me:17720: checking for $ac_word" >&5
17721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17722 if test "${ac_cv_prog_M4_exists+set}" = set; then
17723 echo $ECHO_N "(cached) $ECHO_C" >&6
17725 if test -n "$M4_exists"; then
17726 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17728 ac_save_IFS=$IFS; IFS=$ac_path_separator
17730 for ac_dir in $ac_dummy; do
17732 test -z "$ac_dir" && ac_dir=.
17733 $as_executable_p "$ac_dir/$ac_word" || continue
17734 ac_cv_prog_M4_exists="yes"
17735 echo "$as_me:17735: found $ac_dir/$ac_word" >&5
17739 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17742 M4_exists=$ac_cv_prog_M4_exists
17743 if test -n "$M4_exists"; then
17744 echo "$as_me:17744: result: $M4_exists" >&5
17745 echo "${ECHO_T}$M4_exists" >&6
17747 echo "$as_me:17747: result: no" >&5
17748 echo "${ECHO_T}no" >&6
17751 if test "$ac_cv_prog_M4_exists" = no; then
17752 cf_cv_prog_gnat_correct=no
17753 { echo "$as_me:17753: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17754 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17756 if test "$cf_cv_prog_gnat_correct" = yes; then
17757 echo "$as_me:17757: checking if GNAT works" >&5
17758 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17760 rm -rf ./conftest* ./*~conftest*
17761 cat >>conftest.ads <<CF_EOF
17762 procedure conftest;
17764 cat >>conftest.adb <<CF_EOF
17767 procedure conftest is
17769 Text_IO.Put ("Hello World");
17771 GNAT.OS_Lib.OS_Exit (0);
17774 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17775 if ( ./conftest 1>&5 2>&1 ) ; then
17776 cf_cv_prog_gnat_correct=yes
17778 cf_cv_prog_gnat_correct=no
17781 cf_cv_prog_gnat_correct=no
17783 rm -rf ./conftest* ./*~conftest*
17785 echo "$as_me:17785: result: $cf_cv_prog_gnat_correct" >&5
17786 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17789 cf_cv_prog_gnat_correct=no
17793 if test "$cf_cv_prog_gnat_correct" = yes; then
17795 echo "$as_me:17795: checking optimization options for ADAFLAGS" >&5
17796 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17800 ADAFLAGS="$ADAFLAGS -g"
17806 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17808 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17812 echo "$as_me:17812: result: $ADAFLAGS" >&5
17813 echo "${ECHO_T}$ADAFLAGS" >&6
17815 echo "$as_me:17815: checking if GNATPREP supports -T option" >&5
17816 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17817 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17818 echo $ECHO_N "(cached) $ECHO_C" >&6
17821 cf_cv_gnatprep_opt_t=no
17822 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17825 echo "$as_me:17825: result: $cf_cv_gnatprep_opt_t" >&5
17826 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17827 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17829 echo "$as_me:17829: checking if GNAT supports generics" >&5
17830 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17831 case "$cf_cv_gnat_version" in
17832 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17833 cf_gnat_generics=yes
17836 cf_gnat_generics=no
17839 echo "$as_me:17839: result: $cf_gnat_generics" >&5
17840 echo "${ECHO_T}$cf_gnat_generics" >&6
17842 if test "$cf_gnat_generics" = yes
17844 cf_compile_generics=generics
17845 cf_generic_objects="\${GENOBJS}"
17847 cf_compile_generics=
17848 cf_generic_objects=
17851 echo "$as_me:17851: checking if GNAT supports SIGINT" >&5
17852 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17853 if test "${cf_cv_gnat_sigint+set}" = set; then
17854 echo $ECHO_N "(cached) $ECHO_C" >&6
17857 rm -rf ./conftest* ./*~conftest*
17858 cat >>conftest.ads <<CF_EOF
17859 with Ada.Interrupts.Names;
17861 package ConfTest is
17863 pragma Warnings (Off); -- the next pragma exists since 3.11p
17864 pragma Unreserve_All_Interrupts;
17865 pragma Warnings (On);
17867 protected Process is
17869 function Continue return Boolean;
17870 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17872 Done : Boolean := False;
17877 cat >>conftest.adb <<CF_EOF
17878 package body ConfTest is
17879 protected body Process is
17884 function Continue return Boolean is
17891 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17892 cf_cv_gnat_sigint=yes
17894 cf_cv_gnat_sigint=no
17896 rm -rf ./conftest* ./*~conftest*
17899 echo "$as_me:17899: result: $cf_cv_gnat_sigint" >&5
17900 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17902 if test "$cf_cv_gnat_sigint" = yes ; then
17905 USE_GNAT_SIGINT="#"
17908 cf_gnat_libraries=no
17909 cf_gnat_projects=no
17911 if test "$enable_gnat_projects" != no ; then
17912 echo "$as_me:17912: checking if GNAT supports project files" >&5
17913 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17914 case "$cf_cv_gnat_version" in
17918 case "$cf_cv_system_name" in
17922 rm -rf ./conftest* ./*~conftest*
17923 if mkdir conftest.src conftest.bin conftest.lib
17926 rm -rf ./conftest* ./*~conftest*
17927 cat >>library.gpr <<CF_EOF
17929 Kind := External ("LIB_KIND");
17930 for Library_Name use "ConfTest";
17931 for Object_Dir use ".";
17932 for Library_ALI_Dir use External("LIBRARY_DIR");
17933 for Library_Version use External ("SONAME");
17934 for Library_Kind use Kind;
17935 for Library_Dir use External("BUILD_DIR");
17936 Source_Dir := External ("SOURCE_DIR");
17937 for Source_Dirs use (Source_Dir);
17940 cat >>confpackage.ads <<CF_EOF
17941 package ConfPackage is
17942 procedure conftest;
17945 cat >>confpackage.adb <<CF_EOF
17947 package body ConfPackage is
17948 procedure conftest is
17950 Text_IO.Put ("Hello World");
17955 if ( "$cf_ada_make" $ADAFLAGS \
17957 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17958 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17959 -XSOURCE_DIR="`pwd`" \
17960 -XSONAME=libConfTest.so.1 \
17961 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17962 cf_gnat_projects=yes
17966 if test -f conftest.lib/confpackage.ali
17968 cf_gnat_libraries=yes
17970 rm -rf ./conftest* ./*~conftest*
17975 echo "$as_me:17975: result: $cf_gnat_projects" >&5
17976 echo "${ECHO_T}$cf_gnat_projects" >&6
17977 fi # enable_gnat_projects
17979 if test "$cf_gnat_projects" = yes
17981 echo "$as_me:17981: checking if GNAT supports libraries" >&5
17982 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17983 echo "$as_me:17983: result: $cf_gnat_libraries" >&5
17984 echo "${ECHO_T}$cf_gnat_libraries" >&6
17987 USE_OLD_MAKERULES=""
17988 USE_GNAT_PROJECTS="#"
17989 USE_GNAT_MAKE_GPR="#"
17990 USE_GNAT_GPRBUILD="#"
17992 if test "$cf_gnat_projects" = yes
17994 USE_OLD_MAKERULES="#"
17995 USE_GNAT_PROJECTS=""
17996 if test "$cf_cv_VERSION_GPRBUILD" != no
17998 USE_GNAT_GPRBUILD=""
17999 elif test "$cf_cv_VERSION_GNATMAKE" != no
18001 USE_GNAT_MAKE_GPR=""
18003 { echo "$as_me:18003: WARNING: use old makefile rules since tools are missing" >&5
18004 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18008 if test "$cf_gnat_libraries" = yes
18010 USE_GNAT_LIBRARIES=""
18012 USE_GNAT_LIBRARIES="#"
18015 echo "$as_me:18015: checking for ada-compiler" >&5
18016 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18018 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18019 if test "${with_ada_compiler+set}" = set; then
18020 withval="$with_ada_compiler"
18021 cf_ada_compiler=$withval
18023 cf_ada_compiler=gnatmake
18026 echo "$as_me:18026: result: $cf_ada_compiler" >&5
18027 echo "${ECHO_T}$cf_ada_compiler" >&6
18029 cf_ada_package=terminal_interface
18031 echo "$as_me:18031: checking for ada-include" >&5
18032 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18034 # Check whether --with-ada-include or --without-ada-include was given.
18035 if test "${with_ada_include+set}" = set; then
18036 withval="$with_ada_include"
18039 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18040 fi; if test -n "$prefix/share/ada/adainclude" ; then
18042 if test "x$prefix" != xNONE; then
18043 cf_path_syntax="$prefix"
18045 cf_path_syntax="$ac_default_prefix"
18048 case ".$withval" in
18049 (.\$\(*\)*|.\'*\'*)
18053 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18055 (.\$\{*prefix\}*|.\$\{*dir\}*)
18056 eval withval="$withval"
18057 case ".$withval" in
18059 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18064 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18067 { { echo "$as_me:18067: error: expected a pathname, not \"$withval\"" >&5
18068 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18069 { (exit 1); exit 1; }; }
18074 eval ADA_INCLUDE="$withval"
18076 echo "$as_me:18076: result: $ADA_INCLUDE" >&5
18077 echo "${ECHO_T}$ADA_INCLUDE" >&6
18079 echo "$as_me:18079: checking for ada-objects" >&5
18080 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18082 # Check whether --with-ada-objects or --without-ada-objects was given.
18083 if test "${with_ada_objects+set}" = set; then
18084 withval="$with_ada_objects"
18087 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18088 fi; if test -n "$prefix/lib/ada/adalib" ; then
18090 if test "x$prefix" != xNONE; then
18091 cf_path_syntax="$prefix"
18093 cf_path_syntax="$ac_default_prefix"
18096 case ".$withval" in
18097 (.\$\(*\)*|.\'*\'*)
18101 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18103 (.\$\{*prefix\}*|.\$\{*dir\}*)
18104 eval withval="$withval"
18105 case ".$withval" in
18107 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18112 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18115 { { echo "$as_me:18115: error: expected a pathname, not \"$withval\"" >&5
18116 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18117 { (exit 1); exit 1; }; }
18122 eval ADA_OBJECTS="$withval"
18124 echo "$as_me:18124: result: $ADA_OBJECTS" >&5
18125 echo "${ECHO_T}$ADA_OBJECTS" >&6
18127 echo "$as_me:18127: checking if an Ada95 shared-library should be built" >&5
18128 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18130 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18131 if test "${with_ada_sharedlib+set}" = set; then
18132 withval="$with_ada_sharedlib"
18133 with_ada_sharedlib=$withval
18135 with_ada_sharedlib=no
18137 echo "$as_me:18137: result: $with_ada_sharedlib" >&5
18138 echo "${ECHO_T}$with_ada_sharedlib" >&6
18140 if test "x$with_ada_sharedlib" != xno
18142 if test "x$cf_gnat_projects" != xyes
18144 { echo "$as_me:18144: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18145 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18146 with_ada_sharedlib=no
18150 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18151 MAKE_ADA_SHAREDLIB="#"
18153 if test "x$with_ada_sharedlib" != xno
18155 MAKE_ADA_SHAREDLIB=
18156 if test "x$with_ada_sharedlib" != xyes
18158 ADA_SHAREDLIB="$with_ada_sharedlib"
18162 # allow the Ada binding to be renamed
18164 echo "$as_me:18164: checking for ada-libname" >&5
18165 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18167 # Check whether --with-ada-libname or --without-ada-libname was given.
18168 if test "${with_ada_libname+set}" = set; then
18169 withval="$with_ada_libname"
18170 ADA_LIBNAME=$withval
18172 ADA_LIBNAME=AdaCurses
18174 case "x$ADA_LIBNAME" in
18176 ADA_LIBNAME=AdaCurses
18180 echo "$as_me:18180: result: $ADA_LIBNAME" >&5
18181 echo "${ECHO_T}$ADA_LIBNAME" >&6
18184 { { echo "$as_me:18184: error: No usable Ada compiler found" >&5
18185 echo "$as_me: error: No usable Ada compiler found" >&2;}
18186 { (exit 1); exit 1; }; }
18189 { { echo "$as_me:18189: error: The Ada compiler is needed for this package" >&5
18190 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18191 { (exit 1); exit 1; }; }
18194 ################################################################################
18201 ### Construct the list of include-directories to be generated
18203 if test "$srcdir" != "."; then
18204 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18206 CPPFLAGS="-I../include $CPPFLAGS"
18207 if test "$srcdir" != "."; then
18208 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18210 CPPFLAGS="-I. $CPPFLAGS"
18212 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18213 if test "$srcdir" != "."; then
18214 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18216 if test "$GCC" != yes; then
18217 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18218 elif test "$includedir" != "/usr/include"; then
18219 if test "$includedir" = '${prefix}/include' ; then
18220 if test x$prefix != x/usr ; then
18221 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18224 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18228 ### Build up pieces for makefile rules
18229 echo "$as_me:18229: checking default library suffix" >&5
18230 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18232 case $DFT_LWR_MODEL in
18233 (libtool) DFT_ARG_SUFFIX='' ;;
18234 (normal) DFT_ARG_SUFFIX='' ;;
18235 (debug) DFT_ARG_SUFFIX='_g' ;;
18236 (profile) DFT_ARG_SUFFIX='_p' ;;
18237 (shared) DFT_ARG_SUFFIX='' ;;
18239 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18240 echo "$as_me:18240: result: $DFT_ARG_SUFFIX" >&5
18241 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18243 echo "$as_me:18243: checking default library-dependency suffix" >&5
18244 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18246 case X$DFT_LWR_MODEL in
18248 DFT_LIB_SUFFIX='.la'
18249 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18252 case "$cf_cv_system_name" in
18254 DFT_LIB_SUFFIX='_g.lib'
18257 DFT_LIB_SUFFIX='_g.a'
18260 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18263 case "$cf_cv_system_name" in
18265 DFT_LIB_SUFFIX='_p.lib'
18268 DFT_LIB_SUFFIX='_p.a'
18271 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18274 case "$cf_cv_system_name" in
18276 DFT_LIB_SUFFIX='.so'
18277 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18280 DFT_LIB_SUFFIX='.dll'
18281 DFT_DEP_SUFFIX='.dll.lib'
18283 (cygwin*|msys*|mingw*)
18284 DFT_LIB_SUFFIX='.dll'
18285 DFT_DEP_SUFFIX='.dll.a'
18288 DFT_LIB_SUFFIX='.dylib'
18289 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18294 DFT_LIB_SUFFIX='.so'
18295 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18298 DFT_LIB_SUFFIX='.sl'
18299 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18304 DFT_LIB_SUFFIX='.so'
18305 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18312 DFT_LIB_SUFFIX='.lib'
18315 DFT_LIB_SUFFIX='.a'
18318 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18321 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18323 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18324 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18326 echo "$as_me:18326: result: $DFT_DEP_SUFFIX" >&5
18327 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18329 echo "$as_me:18329: checking default object directory" >&5
18330 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18332 case $DFT_LWR_MODEL in
18333 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18334 (normal) DFT_OBJ_SUBDIR='objects' ;;
18335 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18336 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18338 case "$cf_cv_system_name" in
18340 DFT_OBJ_SUBDIR='objects' ;;
18342 DFT_OBJ_SUBDIR='obj_s' ;;
18345 echo "$as_me:18345: result: $DFT_OBJ_SUBDIR" >&5
18346 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18348 ### Set up low-level terminfo dependencies for makefiles.
18350 if test "$DFT_LWR_MODEL" = shared ; then
18351 case $cf_cv_system_name in
18353 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18356 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18361 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18363 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18365 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18367 ### Construct the list of subdirectories for which we'll customize makefiles
18368 ### with the appropriate compile-rules.
18370 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18372 cat >>confdefs.h <<EOF
18373 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18376 ################################################################################
18382 NCURSES_SHLIB2="sh -c"
18384 ADA_SUBDIRS="include gen src doc"
18385 if test "x$cf_with_tests" != "xno" ; then
18386 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18388 for cf_dir in $ADA_SUBDIRS
18390 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18397 # match layout used by make-tar.sh
18398 ADAHTML_DIR=../doc/ada
18400 if test "x$cross_compiling" = xyes ; then
18401 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18403 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18406 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"
18407 ac_config_commands="$ac_config_commands default"
18408 cat >confcache <<\_ACEOF
18409 # This file is a shell script that caches the results of configure
18410 # tests run on this system so they can be shared between configure
18411 # scripts and configure runs, see configure's option --config-cache.
18412 # It is not useful on other systems. If it contains results you don't
18413 # want to keep, you may remove or edit it.
18415 # config.status only pays attention to the cache file if you give it
18416 # the --recheck option to rerun configure.
18418 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18419 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18420 # following values.
18424 # The following way of writing the cache mishandles newlines in values,
18425 # but we know of no workaround that is simple, portable, and efficient.
18426 # So, don't put newlines in cache variables' values.
18427 # Ultrix sh set writes to stderr and can't be redirected directly,
18428 # and sets the high bit in the cache file unless we assign to the vars.
18431 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18433 # `set' does not quote correctly, so add quotes (double-quote
18434 # substitution turns \\\\ into \\, and sed turns \\ into \).
18437 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18440 # `set' quotes correctly as required by POSIX, so do not add quotes.
18442 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18449 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18451 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18453 if cmp -s $cache_file confcache; then :; else
18454 if test -w $cache_file; then
18455 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18456 cat confcache >$cache_file
18458 echo "not updating unwritable cache $cache_file"
18463 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18464 # Let make expand exec_prefix.
18465 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18467 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18468 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18469 # trailing colons and then remove the whole line if VPATH becomes empty
18470 # (actually we leave an empty line to preserve line numbers).
18471 if test "x$srcdir" = x.; then
18472 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18473 s/:*\$(srcdir):*/:/;
18474 s/:*\${srcdir}:*/:/;
18476 s/^\([^=]*=[ ]*\):*/\1/;
18482 DEFS=-DHAVE_CONFIG_H
18484 : "${CONFIG_STATUS=./config.status}"
18485 ac_clean_files_save=$ac_clean_files
18486 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18487 { echo "$as_me:18487: creating $CONFIG_STATUS" >&5
18488 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18489 cat >"$CONFIG_STATUS" <<_ACEOF
18491 # Generated automatically by configure.
18492 # Run this file to recreate the current configuration.
18493 # Compiler output produced by configure, useful for debugging
18494 # configure, is in config.log if it exists.
18496 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18499 SHELL=\${CONFIG_SHELL-$SHELL}
18500 ac_cs_invocation="\$0 \$@"
18502 CLICOLOR_FORCE= GREP_OPTIONS=
18503 unset CLICOLOR_FORCE GREP_OPTIONS
18506 cat >>"$CONFIG_STATUS" <<\_ACEOF
18507 # Be Bourne compatible
18508 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18511 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18515 # Name of the executable.
18516 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18518 if expr a : '\(a\)' >/dev/null 2>&1; then
18524 rm -f conf$$ conf$$.exe conf$$.file
18526 if ln -s conf$$.file conf$$ 2>/dev/null; then
18527 # We could just check for DJGPP; but this test a) works b) is more generic
18528 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18529 if test -f conf$$.exe; then
18530 # Don't use ln at all; we don't have any links
18535 elif ln conf$$.file conf$$ 2>/dev/null; then
18540 rm -f conf$$ conf$$.exe conf$$.file
18542 as_executable_p="test -f"
18544 # Support unset when possible.
18545 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18552 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18553 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18554 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18555 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18556 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18557 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18558 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18559 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18562 # We need space, tab and new line, in precisely that order.
18568 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18574 # Files that config.status was made for.
18575 if test -n "$ac_config_files"; then
18576 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18579 if test -n "$ac_config_headers"; then
18580 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18583 if test -n "$ac_config_links"; then
18584 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18587 if test -n "$ac_config_commands"; then
18588 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18591 cat >>"$CONFIG_STATUS" <<\EOF
18594 \`$as_me' instantiates files from templates according to the
18595 current configuration.
18597 Usage: $0 [OPTIONS] [FILE]...
18599 -h, --help print this help, then exit
18600 -V, --version print version number, then exit
18601 -d, --debug don't remove temporary files
18602 --recheck update $as_me by reconfiguring in the same conditions
18603 --file=FILE[:TEMPLATE]
18604 instantiate the configuration file FILE
18605 --header=FILE[:TEMPLATE]
18606 instantiate the configuration header FILE
18608 Configuration files:
18611 Configuration headers:
18614 Configuration commands:
18617 Report bugs to <dickey@invisible-island.net>."
18620 cat >>"$CONFIG_STATUS" <<EOF
18623 configured by $0, generated by GNU Autoconf 2.52.20221202,
18624 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18626 Copyright 2003-2021,2022 Thomas E. Dickey
18627 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18628 Free Software Foundation, Inc.
18629 This config.status script is free software; the Free Software Foundation
18630 gives unlimited permission to copy, distribute and modify it."
18635 cat >>"$CONFIG_STATUS" <<\EOF
18636 # If no file are specified by the user, then we need to provide default
18637 # value. By we need to know if files were specified by the user.
18643 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18644 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18646 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18650 *) # This is not an option, so the user has probably given explicit
18652 ac_need_defaults=false;;
18656 # Handling of the options.
18658 cat >>"$CONFIG_STATUS" <<EOF
18659 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18660 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18661 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18663 cat >>"$CONFIG_STATUS" <<\EOF
18664 --version | --vers* | -V )
18665 echo "$ac_cs_version"; exit 0 ;;
18667 # Conflict between --help and --header
18668 { { echo "$as_me:18668: error: ambiguous option: $1
18669 Try \`$0 --help' for more information." >&5
18670 echo "$as_me: error: ambiguous option: $1
18671 Try \`$0 --help' for more information." >&2;}
18672 { (exit 1); exit 1; }; };;
18673 --help | --hel | -h )
18674 echo "$ac_cs_usage"; exit 0 ;;
18675 --debug | --d* | -d )
18677 --file | --fil | --fi | --f )
18679 CONFIG_FILES="$CONFIG_FILES $1"
18680 ac_need_defaults=false;;
18681 --header | --heade | --head | --hea )
18683 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18684 ac_need_defaults=false;;
18686 # This is an error.
18687 -*) { { echo "$as_me:18687: error: unrecognized option: $1
18688 Try \`$0 --help' for more information." >&5
18689 echo "$as_me: error: unrecognized option: $1
18690 Try \`$0 --help' for more information." >&2;}
18691 { (exit 1); exit 1; }; } ;;
18693 *) ac_config_targets="$ac_config_targets $1" ;;
18702 ## ----------------------- ##
18703 ## Running config.status. ##
18704 ## ----------------------- ##
18706 This file was extended by $as_me 2.52.20221202, executed with
18707 CONFIG_FILES = $CONFIG_FILES
18708 CONFIG_HEADERS = $CONFIG_HEADERS
18709 CONFIG_LINKS = $CONFIG_LINKS
18710 CONFIG_COMMANDS = $CONFIG_COMMANDS
18711 > "$ac_cs_invocation"
18712 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18717 cat >>"$CONFIG_STATUS" <<EOF
18719 # INIT-COMMANDS section.
18722 ### Special initialization commands, used to pass information from the
18723 ### configuration-run into config.status
18726 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18727 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18728 LIB_NAME="$LIB_NAME"
18729 LIB_PREFIX="$LIB_PREFIX"
18730 LIB_SUFFIX="$LIB_SUFFIX"
18732 NCURSES_MAJOR="$NCURSES_MAJOR"
18733 NCURSES_MINOR="$NCURSES_MINOR"
18734 NCURSES_PATCH="$NCURSES_PATCH"
18736 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18737 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18738 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18739 cf_cv_abi_version="$cf_cv_abi_version"
18740 cf_cv_rel_version="$cf_cv_rel_version"
18741 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18742 cf_cv_shared_soname='$cf_cv_shared_soname'
18743 cf_cv_shlib_version="$cf_cv_shlib_version"
18744 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18745 cf_cv_system_name="$cf_cv_system_name"
18751 cat >>"$CONFIG_STATUS" <<\EOF
18752 for ac_config_target in $ac_config_targets
18754 case "$ac_config_target" in
18755 # Handling of arguments.
18756 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18757 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18758 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18759 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18760 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18761 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18762 *) { { echo "$as_me:18762: error: invalid argument: $ac_config_target" >&5
18763 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18764 { (exit 1); exit 1; }; };;
18768 # If the user did not use the arguments to specify the items to instantiate,
18769 # then the envvar interface is used. Set only those that are not.
18770 # We use the long form for the default assignment because of an extremely
18771 # bizarre bug on SunOS 4.1.3.
18772 if "$ac_need_defaults"; then
18773 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18774 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18775 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18778 # Create a temporary directory, and hook for its removal unless debugging.
18781 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18782 trap '{ (exit 1); exit 1; }' 1 2 13 15
18785 # Create a (secure) tmp directory for tmp files.
18788 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18789 test -n "$tmp" && test -d "$tmp"
18792 tmp=$TMPDIR/cs$$-$RANDOM
18793 (umask 077 && mkdir "$tmp")
18796 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18797 { (exit 1); exit 1; }
18802 cat >>"$CONFIG_STATUS" <<EOF
18805 # CONFIG_FILES section.
18808 # No need to generate the scripts if there are no CONFIG_FILES.
18809 # This happens for instance when ./config.status config.h
18810 if test -n "\$CONFIG_FILES"; then
18811 # Protect against being on the right side of a sed subst in config.status.
18812 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18813 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18814 s,@SHELL@,$SHELL,;t t
18815 s,@exec_prefix@,$exec_prefix,;t t
18816 s,@prefix@,$prefix,;t t
18817 s,@program_transform_name@,$program_transform_name,;t t
18818 s,@bindir@,$bindir,;t t
18819 s,@sbindir@,$sbindir,;t t
18820 s,@libexecdir@,$libexecdir,;t t
18821 s,@datarootdir@,$datarootdir,;t t
18822 s,@datadir@,$datadir,;t t
18823 s,@sysconfdir@,$sysconfdir,;t t
18824 s,@sharedstatedir@,$sharedstatedir,;t t
18825 s,@localstatedir@,$localstatedir,;t t
18826 s,@runstatedir@,$runstatedir,;t t
18827 s,@libdir@,$libdir,;t t
18828 s,@includedir@,$includedir,;t t
18829 s,@oldincludedir@,$oldincludedir,;t t
18830 s,@infodir@,$infodir,;t t
18831 s,@mandir@,$mandir,;t t
18832 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18833 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18834 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18835 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18836 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18837 s,@build_alias@,$build_alias,;t t
18838 s,@host_alias@,$host_alias,;t t
18839 s,@target_alias@,$target_alias,;t t
18840 s,@ECHO_C@,$ECHO_C,;t t
18841 s,@ECHO_N@,$ECHO_N,;t t
18842 s,@ECHO_T@,$ECHO_T,;t t
18843 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18844 s,@DEFS@,$DEFS,;t t
18845 s,@LIBS@,$LIBS,;t t
18846 s,@PACKAGE@,$PACKAGE,;t t
18847 s,@top_builddir@,$top_builddir,;t t
18848 s,@build@,$build,;t t
18849 s,@build_cpu@,$build_cpu,;t t
18850 s,@build_vendor@,$build_vendor,;t t
18851 s,@build_os@,$build_os,;t t
18852 s,@host@,$host,;t t
18853 s,@host_cpu@,$host_cpu,;t t
18854 s,@host_vendor@,$host_vendor,;t t
18855 s,@host_os@,$host_os,;t t
18856 s,@target@,$target,;t t
18857 s,@target_cpu@,$target_cpu,;t t
18858 s,@target_vendor@,$target_vendor,;t t
18859 s,@target_os@,$target_os,;t t
18860 s,@GREP@,$GREP,;t t
18861 s,@FGREP@,$FGREP,;t t
18863 s,@CFLAGS@,$CFLAGS,;t t
18864 s,@LDFLAGS@,$LDFLAGS,;t t
18865 s,@CPPFLAGS@,$CPPFLAGS,;t t
18866 s,@ac_ct_CC@,$ac_ct_CC,;t t
18867 s,@EXEEXT@,$EXEEXT,;t t
18868 s,@OBJEXT@,$OBJEXT,;t t
18869 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18871 s,@EGREP@,$EGREP,;t t
18873 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18874 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18875 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18876 s,@LN_S@,$LN_S,;t t
18877 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18878 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18879 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18880 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18881 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18882 s,@SET_MAKE@,$SET_MAKE,;t t
18883 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18884 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18885 s,@CTAGS@,$CTAGS,;t t
18886 s,@ETAGS@,$ETAGS,;t t
18887 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18888 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18889 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18890 s,@RANLIB@,$RANLIB,;t t
18891 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18893 s,@ac_ct_LD@,$ac_ct_LD,;t t
18895 s,@ac_ct_AR@,$ac_ct_AR,;t t
18896 s,@ARFLAGS@,$ARFLAGS,;t t
18897 s,@DESTDIR@,$DESTDIR,;t t
18898 s,@BUILD_CC@,$BUILD_CC,;t t
18899 s,@BUILD_CPP@,$BUILD_CPP,;t t
18900 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18901 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18902 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18903 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18904 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18905 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18906 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18907 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18908 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18909 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18910 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18911 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18912 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18913 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18914 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18915 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18916 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18917 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18918 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18919 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18920 s,@CC_G_OPT@,$CC_G_OPT,;t t
18921 s,@LD_MODEL@,$LD_MODEL,;t t
18922 s,@shlibdir@,$shlibdir,;t t
18923 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18924 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18925 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18926 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18927 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18928 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18929 s,@LINK_PROGS@,$LINK_PROGS,;t t
18930 s,@LINK_TESTS@,$LINK_TESTS,;t t
18931 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18932 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18933 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18934 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18935 s,@RPATH_LIST@,$RPATH_LIST,;t t
18936 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18937 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18938 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18939 s,@PTHREAD@,$PTHREAD,;t t
18940 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18941 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18942 s,@ECHO_LT@,$ECHO_LT,;t t
18943 s,@ECHO_LD@,$ECHO_LD,;t t
18944 s,@RULE_CC@,$RULE_CC,;t t
18945 s,@SHOW_CC@,$SHOW_CC,;t t
18946 s,@ECHO_CC@,$ECHO_CC,;t t
18947 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18948 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18949 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18950 s,@ADAFLAGS@,$ADAFLAGS,;t t
18951 s,@ADA_TRACE@,$ADA_TRACE,;t t
18952 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18953 s,@M4_exists@,$M4_exists,;t t
18954 s,@cf_ada_make@,$cf_ada_make,;t t
18955 s,@cf_ada_config@,$cf_ada_config,;t t
18956 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18957 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18958 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18959 s,@cf_compile_generics@,$cf_compile_generics,;t t
18960 s,@cf_generic_objects@,$cf_generic_objects,;t t
18961 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18962 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18963 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18964 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18965 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18966 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18967 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18968 s,@cf_ada_package@,$cf_ada_package,;t t
18969 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18970 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18971 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18972 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18973 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18974 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18975 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18976 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18977 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18978 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18979 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18980 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18981 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18982 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18983 s,@TEST_ARG2@,$TEST_ARG2,;t t
18984 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18985 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18986 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18987 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18988 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18989 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18990 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18995 cat >>"$CONFIG_STATUS" <<\EOF
18996 # Split the substitutions into bite-sized pieces for seds with
18997 # small command number limits, like on Digital OSF/1 and HP-UX.
18998 ac_max_sed_lines=48
18999 ac_sed_frag=1 # Number of current file.
19000 ac_beg=1 # First line for current file.
19001 ac_end=$ac_max_sed_lines # Line after last line for current file.
19004 while "$ac_more_lines"; do
19005 if test "$ac_beg" -gt 1; then
19006 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19008 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19010 if test ! -s "$tmp"/subs.frag; then
19011 ac_more_lines=false
19013 # The purpose of the label and of the branching condition is to
19014 # speed up the sed processing (if there are no `@' at all, there
19015 # is no need to browse any of the substitutions).
19016 # These are the two extra sed commands mentioned above.
19018 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19019 # It is possible to make a multiline substitution using escaped newlines.
19020 # Ensure that we do not split the substitution between script fragments.
19022 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19023 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19024 if test -s "$tmp"/subs.next; then
19025 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19026 if test ! -s "$tmp"/subs.edit; then
19027 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19028 if test ! -s "$tmp"/subs.edit; then
19029 if test "$ac_beg" -gt 1; then
19030 ac_end=`expr "$ac_end" - 1`
19037 if test -z "$ac_sed_cmds"; then
19038 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19040 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19042 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19044 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19047 if test -z "$ac_sed_cmds"; then
19050 fi # test -n "$CONFIG_FILES"
19053 cat >>"$CONFIG_STATUS" <<\EOF
19054 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19055 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19057 - | *:- | *:-:* ) # input from stdin
19059 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19060 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19061 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19062 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19063 * ) ac_file_in=$ac_file.in ;;
19066 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19067 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19068 X"$ac_file" : 'X\(//\)[^/]' \| \
19069 X"$ac_file" : 'X\(//\)$' \| \
19070 X"$ac_file" : 'X\(/\)' \| \
19071 . : '\(.\)' 2>/dev/null ||
19073 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19074 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19075 /^X\(\/\/\)$/{ s//\1/; q; }
19076 /^X\(\/\).*/{ s//\1/; q; }
19078 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19079 { case "$ac_dir" in
19080 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19084 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19085 case $as_mkdir_dir in
19086 # Skip DOS drivespec
19087 ?:) as_incr_dir=$as_mkdir_dir ;;
19089 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19090 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19095 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19096 # A "../" for each directory in $ac_dir_suffix.
19097 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19099 ac_dir_suffix= ac_dots=
19104 if test -z "$ac_dots"; then
19107 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19109 [\\/]* | ?:[\\/]* )
19110 ac_srcdir="$srcdir$ac_dir_suffix";
19111 ac_top_srcdir="$srcdir" ;;
19112 *) # Relative path.
19113 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19114 ac_top_srcdir="$ac_dots$srcdir" ;;
19118 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19119 *) ac_INSTALL=$ac_dots$INSTALL ;;
19122 if test x"$ac_file" != x-; then
19123 { echo "$as_me:19123: creating $ac_file" >&5
19124 echo "$as_me: creating $ac_file" >&6;}
19127 # Let's still pretend it is `configure' which instantiates (i.e., don't
19128 # use $as_me), people would be surprised to read:
19129 # /* config.h. Generated automatically by config.status. */
19130 configure_input="Generated automatically from `echo $ac_file_in |
19131 sed 's,.*/,,'` by configure."
19133 # First look for the input files in the build tree, otherwise in the
19135 ac_file_inputs=`IFS=:
19136 for f in $ac_file_in; do
19138 -) echo "$tmp"/stdin ;;
19140 # Absolute (can't be DOS-style, as IFS=:)
19141 test -f "$f" || { { echo "$as_me:19141: error: cannot find input file: $f" >&5
19142 echo "$as_me: error: cannot find input file: $f" >&2;}
19143 { (exit 1); exit 1; }; }
19146 if test -f "$f"; then
19149 elif test -f "$srcdir/$f"; then
19154 { { echo "$as_me:19154: error: cannot find input file: $f" >&5
19155 echo "$as_me: error: cannot find input file: $f" >&2;}
19156 { (exit 1); exit 1; }; }
19159 done` || { (exit 1); exit 1; }
19161 cat >>"$CONFIG_STATUS" <<\EOF
19162 ac_warn_datarootdir=no
19163 if test x"$ac_file" != x-; then
19164 for ac_item in $ac_file_inputs
19166 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19167 if test -n "$ac_seen"; then
19168 ac_used=`grep '@datarootdir@' "$ac_item"`
19169 if test -z "$ac_used"; then
19170 { echo "$as_me:19170: WARNING: datarootdir was used implicitly but not set:
19172 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19174 ac_warn_datarootdir=yes
19177 ac_seen=`grep '${datarootdir}' "$ac_item"`
19178 if test -n "$ac_seen"; then
19179 { echo "$as_me:19179: WARNING: datarootdir was used explicitly but not set:
19181 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19183 ac_warn_datarootdir=yes
19188 if test "x$ac_warn_datarootdir" = xyes; then
19189 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19193 cat >>"$CONFIG_STATUS" <<EOF
19197 cat >>"$CONFIG_STATUS" <<\EOF
19199 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19200 s,@configure_input@,$configure_input,;t t
19201 s,@srcdir@,$ac_srcdir,;t t
19202 s,@top_srcdir@,$ac_top_srcdir,;t t
19203 s,@INSTALL@,$ac_INSTALL,;t t
19204 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19207 : "${FGREP:=grep -F}"
19208 : "${EGREP:=grep -E}"
19209 cat >>"$CONFIG_STATUS" <<EOF
19210 : "\${FGREP:=$FGREP}"
19211 : "\${EGREP:=$EGREP}"
19213 cat >>"$CONFIG_STATUS" <<\EOF
19214 if test x"$ac_file" != x-; then
19215 cp "$tmp/out" "$ac_file"
19217 for ac_name in prefix exec_prefix datarootdir
19219 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19220 if test -n "$ac_seen"; then
19221 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19222 if test -z "$ac_init"; then
19223 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19224 { echo "$as_me:19224: WARNING: Variable $ac_name is used but was not set:
19226 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19231 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19232 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19233 if test -s "$tmp"/out; then
19234 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19235 { echo "$as_me:19235: WARNING: Some variables may not be substituted:
19237 echo "$as_me: WARNING: Some variables may not be substituted:
19247 cat >>"$CONFIG_STATUS" <<\EOF
19250 # CONFIG_HEADER section.
19253 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19254 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19256 # ac_d sets the value in "#define NAME VALUE" lines.
19257 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19258 ac_dB='[ ].*$,\1#\2'
19261 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19262 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19263 ac_iB='\([ ]\),\1#\2define\3'
19266 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19267 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19268 ac_uB='$,\1#\2define\3'
19272 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19273 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19275 - | *:- | *:-:* ) # input from stdin
19277 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19278 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19279 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19280 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19281 * ) ac_file_in=$ac_file.in ;;
19284 test x"$ac_file" != x- && { echo "$as_me:19284: creating $ac_file" >&5
19285 echo "$as_me: creating $ac_file" >&6;}
19287 # First look for the input files in the build tree, otherwise in the
19289 ac_file_inputs=`IFS=:
19290 for f in $ac_file_in; do
19292 -) echo "$tmp"/stdin ;;
19294 # Absolute (can't be DOS-style, as IFS=:)
19295 test -f "$f" || { { echo "$as_me:19295: error: cannot find input file: $f" >&5
19296 echo "$as_me: error: cannot find input file: $f" >&2;}
19297 { (exit 1); exit 1; }; }
19300 if test -f "$f"; then
19303 elif test -f "$srcdir/$f"; then
19308 { { echo "$as_me:19308: error: cannot find input file: $f" >&5
19309 echo "$as_me: error: cannot find input file: $f" >&2;}
19310 { (exit 1); exit 1; }; }
19313 done` || { (exit 1); exit 1; }
19314 # Remove the trailing spaces.
19315 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19319 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19320 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19321 # be either 'cat' or 'sort'.
19322 cat confdefs.h | uniq >conftest.vals
19324 # Break up conftest.vals because some shells have a limit on
19325 # the size of here documents, and old seds have small limits too.
19327 rm -f conftest.tail
19328 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19329 while grep . conftest.vals >/dev/null
19331 # Write chunks of a limited-size here document to conftest.frag.
19332 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19333 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19334 echo 'CEOF' >> "$CONFIG_STATUS"
19335 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19336 rm -f conftest.vals
19337 mv conftest.tail conftest.vals
19339 rm -f conftest.vals
19341 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19343 echo ' cat >> conftest.edit <<CEOF
19344 /@DEFS@/r conftest.frag
19347 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19349 mv "$tmp"/out "$tmp"/in
19350 rm -f conftest.edit conftest.frag
19351 ' >> "$CONFIG_STATUS"
19353 cat >>"$CONFIG_STATUS" <<\EOF
19354 # Let's still pretend it is `configure' which instantiates (i.e., don't
19355 # use $as_me), people would be surprised to read:
19356 # /* config.h. Generated automatically by config.status. */
19357 if test x"$ac_file" = x-; then
19358 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19360 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19362 cat "$tmp"/in >>"$tmp"/config.h
19364 if test x"$ac_file" != x-; then
19365 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19366 { echo "$as_me:19366: $ac_file is unchanged" >&5
19367 echo "$as_me: $ac_file is unchanged" >&6;}
19369 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19370 X"$ac_file" : 'X\(//\)[^/]' \| \
19371 X"$ac_file" : 'X\(//\)$' \| \
19372 X"$ac_file" : 'X\(/\)' \| \
19373 . : '\(.\)' 2>/dev/null ||
19375 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19376 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19377 /^X\(\/\/\)$/{ s//\1/; q; }
19378 /^X\(\/\).*/{ s//\1/; q; }
19380 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19381 { case "$ac_dir" in
19382 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19386 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19387 case $as_mkdir_dir in
19388 # Skip DOS drivespec
19389 ?:) as_incr_dir=$as_mkdir_dir ;;
19391 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19392 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19399 mv "$tmp/config.h" "$ac_file"
19402 cat "$tmp"/config.h
19403 rm -f "$tmp"/config.h
19407 cat >>"$CONFIG_STATUS" <<\EOF
19409 # CONFIG_COMMANDS section.
19411 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19412 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19413 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19417 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19418 if test -z "$USE_OLD_MAKERULES" ; then
19419 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19426 cat >>"$CONFIG_STATUS" <<\EOF
19428 { (exit 0); exit 0; }
19430 chmod +x "$CONFIG_STATUS"
19431 ac_clean_files=$ac_clean_files_save
19433 # configure is writing to config.log, and then calls config.status.
19434 # config.status does its own redirection, appending to config.log.
19435 # Unfortunately, on DOS this fails, as config.log is still kept open
19436 # by configure, so config.status won't be able to write to it; its
19437 # output is simply discarded. So we exec the FD to /dev/null,
19438 # effectively closing config.log, so it can be properly (re)opened and
19439 # appended to by config.status. When coming back to configure, we
19440 # need to make the FD available again.
19441 if test "$no_create" != yes; then
19444 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19446 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19447 # would make configure fail if this is the last instruction.
19448 "$ac_cs_success" || { (exit 1); exit 1; }
19450 ${MAKE:-make} preinstall