2 # From configure.in Revision: 1.91 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
6 # Copyright 2003-2022,2023 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2022,2023 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20230114. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1067 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1068 if test -f "$ac_dir/install-sh"; then
1070 ac_install_sh="$ac_aux_dir/install-sh -c"
1072 elif test -f "$ac_dir/install.sh"; then
1074 ac_install_sh="$ac_aux_dir/install.sh -c"
1076 elif test -f "$ac_dir/shtool"; then
1078 ac_install_sh="$ac_aux_dir/shtool install -c"
1082 if test -z "$ac_aux_dir"; then
1083 { { echo "$as_me:1083: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1084 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1085 { (exit 1); exit 1; }; }
1087 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1088 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1089 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1091 # Make sure we can run config.sub.
1092 $ac_config_sub sun4 >/dev/null 2>&1 ||
1093 { { echo "$as_me:1093: error: cannot run $ac_config_sub" >&5
1094 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1095 { (exit 1); exit 1; }; }
1097 echo "$as_me:1097: checking build system type" >&5
1098 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1099 if test "${ac_cv_build+set}" = set; then
1100 echo $ECHO_N "(cached) $ECHO_C" >&6
1102 ac_cv_build_alias=$build_alias
1103 test -z "$ac_cv_build_alias" &&
1104 ac_cv_build_alias=`$ac_config_guess`
1105 test -z "$ac_cv_build_alias" &&
1106 { { echo "$as_me:1106: error: cannot guess build type; you must specify one" >&5
1107 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1108 { (exit 1); exit 1; }; }
1109 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1110 { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1111 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1112 { (exit 1); exit 1; }; }
1115 echo "$as_me:1115: result: $ac_cv_build" >&5
1116 echo "${ECHO_T}$ac_cv_build" >&6
1118 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122 echo "$as_me:1122: checking host system type" >&5
1123 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1124 if test "${ac_cv_host+set}" = set; then
1125 echo $ECHO_N "(cached) $ECHO_C" >&6
1127 ac_cv_host_alias=$host_alias
1128 test -z "$ac_cv_host_alias" &&
1129 ac_cv_host_alias=$ac_cv_build_alias
1130 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1131 { { echo "$as_me:1131: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1132 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1133 { (exit 1); exit 1; }; }
1136 echo "$as_me:1136: result: $ac_cv_host" >&5
1137 echo "${ECHO_T}$ac_cv_host" >&6
1139 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1144 echo "$as_me:1144: checking target system type" >&5
1145 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1146 if test "${ac_cv_target+set}" = set; then
1147 echo $ECHO_N "(cached) $ECHO_C" >&6
1149 ac_cv_target_alias=$target_alias
1150 test "x$ac_cv_target_alias" = "x" &&
1151 ac_cv_target_alias=$ac_cv_host_alias
1152 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1153 { { echo "$as_me:1153: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1154 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1155 { (exit 1); exit 1; }; }
1158 echo "$as_me:1158: result: $ac_cv_target" >&5
1159 echo "${ECHO_T}$ac_cv_target" >&6
1160 target=$ac_cv_target
1161 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1162 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1163 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1165 # The aliases save the names the user supplied, while $host etc.
1166 # will get canonicalized.
1167 test -n "$target_alias" &&
1168 test "$program_prefix$program_suffix$program_transform_name" = \
1170 program_prefix=${target_alias}-
1171 system_name="$host_os"
1173 system_name="`(uname -s -r) 2>/dev/null`"
1174 if test -z "$system_name" ; then
1175 system_name="`(hostname) 2>/dev/null`"
1178 test -n "$system_name" &&
1179 cat >>confdefs.h <<EOF
1180 #define SYSTEM_NAME "$system_name"
1183 if test "${cf_cv_system_name+set}" = set; then
1184 echo $ECHO_N "(cached) $ECHO_C" >&6
1186 cf_cv_system_name="$system_name"
1189 test -z "$system_name" && system_name="$cf_cv_system_name"
1190 test -n "$cf_cv_system_name" && echo "$as_me:1190: result: Configuring for $cf_cv_system_name" >&5
1191 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1193 if test ".$system_name" != ".$cf_cv_system_name" ; then
1194 echo "$as_me:1194: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1195 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1196 { { echo "$as_me:1196: error: \"Please remove config.cache and try again.\"" >&5
1197 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1198 { (exit 1); exit 1; }; }
1201 # Check whether --with-system-type or --without-system-type was given.
1202 if test "${with_system_type+set}" = set; then
1203 withval="$with_system_type"
1204 { echo "$as_me:1204: WARNING: overriding system type to $withval" >&5
1205 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1206 cf_cv_system_name=$withval
1211 ### Save the given $CFLAGS to allow user-override.
1212 cf_user_CFLAGS="$CFLAGS"
1214 ### Default install-location
1215 for ac_prog in ggrep grep
1217 # Extract the first word of "$ac_prog", so it can be a program name with args.
1218 set dummy $ac_prog; ac_word=$2
1219 echo "$as_me:1219: checking for $ac_word" >&5
1220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1221 if test "${ac_cv_prog_GREP+set}" = set; then
1222 echo $ECHO_N "(cached) $ECHO_C" >&6
1224 if test -n "$GREP"; then
1225 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1227 ac_save_IFS=$IFS; IFS=$ac_path_separator
1229 for ac_dir in $ac_dummy; do
1231 test -z "$ac_dir" && ac_dir=.
1232 $as_executable_p "$ac_dir/$ac_word" || continue
1233 ac_cv_prog_GREP="$ac_prog"
1234 echo "$as_me:1234: found $ac_dir/$ac_word" >&5
1240 GREP=$ac_cv_prog_GREP
1241 if test -n "$GREP"; then
1242 echo "$as_me:1242: result: $GREP" >&5
1243 echo "${ECHO_T}$GREP" >&6
1245 echo "$as_me:1245: result: no" >&5
1246 echo "${ECHO_T}no" >&6
1249 test -n "$GREP" && break
1251 test -n "$GREP" || GREP=": "
1253 echo "$as_me:1253: checking for fgrep" >&5
1254 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1255 if test "${ac_cv_path_FGREP+set}" = set; then
1256 echo $ECHO_N "(cached) $ECHO_C" >&6
1258 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1259 then ac_cv_path_FGREP="$GREP -F"
1261 for ac_prog in gfgrep fgrep
1263 # Extract the first word of "$ac_prog", so it can be a program name with args.
1264 set dummy $ac_prog; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_path_FGREP+set}" = set; then
1268 echo $ECHO_N "(cached) $ECHO_C" >&6
1272 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1275 ac_save_IFS=$IFS; IFS=$ac_path_separator
1277 for ac_dir in $ac_dummy; do
1279 test -z "$ac_dir" && ac_dir=.
1280 if $as_executable_p "$ac_dir/$ac_word"; then
1281 ac_cv_path_FGREP="$ac_dir/$ac_word"
1282 echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1290 FGREP=$ac_cv_path_FGREP
1292 if test -n "$FGREP"; then
1293 echo "$as_me:1293: result: $FGREP" >&5
1294 echo "${ECHO_T}$FGREP" >&6
1296 echo "$as_me:1296: result: no" >&5
1297 echo "${ECHO_T}no" >&6
1300 test -n "$FGREP" && break
1302 test -n "$FGREP" || FGREP=": "
1304 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1304: error: cannot find workable fgrep" >&5
1305 echo "$as_me: error: cannot find workable fgrep" >&2;}
1306 { (exit 1); exit 1; }; }
1309 echo "$as_me:1309: result: $ac_cv_path_FGREP" >&5
1310 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1311 FGREP="$ac_cv_path_FGREP"
1313 echo "$as_me:1313: checking for prefix" >&5
1314 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1315 if test "x$prefix" = "xNONE" ; then
1316 case "$cf_cv_system_name" in
1317 # non-vendor systems don't have a conflict
1318 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1321 (*) prefix=$ac_default_prefix
1325 echo "$as_me:1325: result: $prefix" >&5
1326 echo "${ECHO_T}$prefix" >&6
1328 if test "x$prefix" = "xNONE" ; then
1329 echo "$as_me:1329: checking for default include-directory" >&5
1330 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1331 test -n "$verbose" && echo 1>&6
1334 "$includedir/ncurses" \
1336 "$prefix/include/ncurses" \
1337 /usr/local/include \
1338 /usr/local/include/ncurses \
1340 /usr/include/ncurses
1342 cf_dir=`eval echo "$cf_symbol"`
1343 if test -f "$cf_dir/curses.h" ; then
1344 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1345 includedir="$cf_symbol"
1346 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1350 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1352 echo "$as_me:1352: result: $includedir" >&5
1353 echo "${ECHO_T}$includedir" >&6
1356 ### Checks for programs.
1359 ac_cpp='$CPP $CPPFLAGS'
1360 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1361 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363 ac_main_return="return"
1364 if test -n "$ac_tool_prefix"; then
1365 for ac_prog in gnatgcc gcc cc
1367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1368 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1369 echo "$as_me:1369: checking for $ac_word" >&5
1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371 if test "${ac_cv_prog_CC+set}" = set; then
1372 echo $ECHO_N "(cached) $ECHO_C" >&6
1374 if test -n "$CC"; then
1375 ac_cv_prog_CC="$CC" # Let the user override the test.
1377 ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 for ac_dir in $ac_dummy; do
1381 test -z "$ac_dir" && ac_dir=.
1382 $as_executable_p "$ac_dir/$ac_word" || continue
1383 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1384 echo "$as_me:1384: found $ac_dir/$ac_word" >&5
1391 if test -n "$CC"; then
1392 echo "$as_me:1392: result: $CC" >&5
1393 echo "${ECHO_T}$CC" >&6
1395 echo "$as_me:1395: result: no" >&5
1396 echo "${ECHO_T}no" >&6
1399 test -n "$CC" && break
1402 if test -z "$CC"; then
1404 for ac_prog in gnatgcc gcc cc
1406 # Extract the first word of "$ac_prog", so it can be a program name with args.
1407 set dummy $ac_prog; ac_word=$2
1408 echo "$as_me:1408: checking for $ac_word" >&5
1409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1411 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 if test -n "$ac_ct_CC"; then
1414 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1416 ac_save_IFS=$IFS; IFS=$ac_path_separator
1418 for ac_dir in $ac_dummy; do
1420 test -z "$ac_dir" && ac_dir=.
1421 $as_executable_p "$ac_dir/$ac_word" || continue
1422 ac_cv_prog_ac_ct_CC="$ac_prog"
1423 echo "$as_me:1423: found $ac_dir/$ac_word" >&5
1429 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1430 if test -n "$ac_ct_CC"; then
1431 echo "$as_me:1431: result: $ac_ct_CC" >&5
1432 echo "${ECHO_T}$ac_ct_CC" >&6
1434 echo "$as_me:1434: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1438 test -n "$ac_ct_CC" && break
1444 test -z "$CC" && { { echo "$as_me:1444: error: no acceptable cc found in \$PATH" >&5
1445 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1446 { (exit 1); exit 1; }; }
1448 # Provide some information about the compiler.
1449 echo "$as_me:1449:" \
1450 "checking for C compiler version" >&5
1451 ac_compiler=`set X $ac_compile; echo "$2"`
1452 { (eval echo "$as_me:1452: \"$ac_compiler --version </dev/null >&5\"") >&5
1453 (eval $ac_compiler --version </dev/null >&5) 2>&5
1455 echo "$as_me:1455: \$? = $ac_status" >&5
1456 (exit "$ac_status"); }
1457 { (eval echo "$as_me:1457: \"$ac_compiler -v </dev/null >&5\"") >&5
1458 (eval $ac_compiler -v </dev/null >&5) 2>&5
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit "$ac_status"); }
1462 { (eval echo "$as_me:1462: \"$ac_compiler -V </dev/null >&5\"") >&5
1463 (eval $ac_compiler -V </dev/null >&5) 2>&5
1465 echo "$as_me:1465: \$? = $ac_status" >&5
1466 (exit "$ac_status"); }
1468 cat >"conftest.$ac_ext" <<_ACEOF
1469 #line 1469 "configure"
1470 #include "confdefs.h"
1480 ac_clean_files_save=$ac_clean_files
1481 ac_clean_files="$ac_clean_files a.out a.exe"
1482 # Try to create an executable without -o first, disregard a.out.
1483 # It will help us diagnose broken compilers, and finding out an intuition
1485 echo "$as_me:1485: checking for C compiler default output" >&5
1486 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1487 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1488 if { (eval echo "$as_me:1488: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1491 echo "$as_me:1491: \$? = $ac_status" >&5
1492 (exit "$ac_status"); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1496 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1497 ls a.out conftest 2>/dev/null;
1498 ls a.* conftest.* 2>/dev/null`; do
1500 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1501 a.out ) # We found the default executable, but exeext='' is most
1504 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1505 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512 echo "$as_me: failed program was:" >&5
1513 cat "conftest.$ac_ext" >&5
1514 { { echo "$as_me:1514: error: C compiler cannot create executables" >&5
1515 echo "$as_me: error: C compiler cannot create executables" >&2;}
1516 { (exit 77); exit 77; }; }
1519 ac_exeext=$ac_cv_exeext
1520 echo "$as_me:1520: result: $ac_file" >&5
1521 echo "${ECHO_T}$ac_file" >&6
1523 # Check the compiler produces executables we can run. If not, either
1524 # the compiler is broken, or we cross compile.
1525 echo "$as_me:1525: checking whether the C compiler works" >&5
1526 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1527 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1528 # If not cross compiling, check that we can run a simple program.
1529 if test "$cross_compiling" != yes; then
1530 if { ac_try='./$ac_file'
1531 { (eval echo "$as_me:1531: \"$ac_try\"") >&5
1534 echo "$as_me:1534: \$? = $ac_status" >&5
1535 (exit "$ac_status"); }; }; then
1538 if test "$cross_compiling" = maybe; then
1541 { { echo "$as_me:1541: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&5
1543 echo "$as_me: error: cannot run C compiled programs.
1544 If you meant to cross compile, use \`--host'." >&2;}
1545 { (exit 1); exit 1; }; }
1549 echo "$as_me:1549: result: yes" >&5
1550 echo "${ECHO_T}yes" >&6
1552 rm -f a.out a.exe "conftest$ac_cv_exeext"
1553 ac_clean_files=$ac_clean_files_save
1554 # Check the compiler produces executables we can run. If not, either
1555 # the compiler is broken, or we cross compile.
1556 echo "$as_me:1556: checking whether we are cross compiling" >&5
1557 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1558 echo "$as_me:1558: result: $cross_compiling" >&5
1559 echo "${ECHO_T}$cross_compiling" >&6
1561 echo "$as_me:1561: checking for executable suffix" >&5
1562 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1563 if { (eval echo "$as_me:1563: \"$ac_link\"") >&5
1564 (eval $ac_link) 2>&5
1566 echo "$as_me:1566: \$? = $ac_status" >&5
1567 (exit "$ac_status"); }; then
1568 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1569 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1570 # work properly (i.e., refer to `conftest.exe'), while it won't with
1572 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1575 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582 { { echo "$as_me:1582: error: cannot compute EXEEXT: cannot compile and link" >&5
1583 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1584 { (exit 1); exit 1; }; }
1587 rm -f "conftest$ac_cv_exeext"
1588 echo "$as_me:1588: result: $ac_cv_exeext" >&5
1589 echo "${ECHO_T}$ac_cv_exeext" >&6
1591 rm -f "conftest.$ac_ext"
1592 EXEEXT=$ac_cv_exeext
1594 echo "$as_me:1594: checking for object suffix" >&5
1595 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1596 if test "${ac_cv_objext+set}" = set; then
1597 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 cat >"conftest.$ac_ext" <<_ACEOF
1600 #line 1600 "configure"
1601 #include "confdefs.h"
1611 rm -f conftest.o conftest.obj
1612 if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5
1613 (eval $ac_compile) 2>&5
1615 echo "$as_me:1615: \$? = $ac_status" >&5
1616 (exit "$ac_status"); }; then
1617 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1619 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1620 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1625 echo "$as_me: failed program was:" >&5
1626 cat "conftest.$ac_ext" >&5
1627 { { echo "$as_me:1627: error: cannot compute OBJEXT: cannot compile" >&5
1628 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1629 { (exit 1); exit 1; }; }
1632 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1634 echo "$as_me:1634: result: $ac_cv_objext" >&5
1635 echo "${ECHO_T}$ac_cv_objext" >&6
1636 OBJEXT=$ac_cv_objext
1638 echo "$as_me:1638: checking whether we are using the GNU C compiler" >&5
1639 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1640 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1641 echo $ECHO_N "(cached) $ECHO_C" >&6
1643 cat >"conftest.$ac_ext" <<_ACEOF
1644 #line 1644 "configure"
1645 #include "confdefs.h"
1658 rm -f "conftest.$ac_objext"
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit "$ac_status"); } &&
1664 { ac_try='test -s "conftest.$ac_objext"'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit "$ac_status"); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat "conftest.$ac_ext" >&5
1676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1677 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1680 echo "$as_me:1680: result: $ac_cv_c_compiler_gnu" >&5
1681 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1682 GCC=`test $ac_compiler_gnu = yes && echo yes`
1683 ac_test_CFLAGS=${CFLAGS+set}
1684 ac_save_CFLAGS=$CFLAGS
1686 echo "$as_me:1686: checking whether $CC accepts -g" >&5
1687 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1688 if test "${ac_cv_prog_cc_g+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >"conftest.$ac_ext" <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1703 rm -f "conftest.$ac_objext"
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705 (eval $ac_compile) 2>&5
1707 echo "$as_me:1707: \$? = $ac_status" >&5
1708 (exit "$ac_status"); } &&
1709 { ac_try='test -s "conftest.$ac_objext"'
1710 { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit "$ac_status"); }; }; then
1717 echo "$as_me: failed program was:" >&5
1718 cat "conftest.$ac_ext" >&5
1721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1723 echo "$as_me:1723: result: $ac_cv_prog_cc_g" >&5
1724 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1725 if test "$ac_test_CFLAGS" = set; then
1726 CFLAGS=$ac_save_CFLAGS
1727 elif test $ac_cv_prog_cc_g = yes; then
1728 if test "$GCC" = yes; then
1734 if test "$GCC" = yes; then
1740 # Some people use a C++ compiler to compile C. Since we use `exit',
1741 # in C++ we need to declare it. In case someone uses the same compiler
1742 # for both compiling C and C++ we need to have the C++ compiler decide
1743 # the declaration of exit, since it's the most demanding environment.
1744 cat >"conftest.$ac_ext" <<_ACEOF
1749 rm -f "conftest.$ac_objext"
1750 if { (eval echo "$as_me:1750: \"$ac_compile\"") >&5
1751 (eval $ac_compile) 2>&5
1753 echo "$as_me:1753: \$? = $ac_status" >&5
1754 (exit "$ac_status"); } &&
1755 { ac_try='test -s "conftest.$ac_objext"'
1756 { (eval echo "$as_me:1756: \"$ac_try\"") >&5
1759 echo "$as_me:1759: \$? = $ac_status" >&5
1760 (exit "$ac_status"); }; }; then
1761 for ac_declaration in \
1763 '#include <stdlib.h>' \
1764 'extern "C" void std::exit (int) throw (); using std::exit;' \
1765 'extern "C" void std::exit (int); using std::exit;' \
1766 'extern "C" void exit (int) throw ();' \
1767 'extern "C" void exit (int);' \
1770 cat >"conftest.$ac_ext" <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1783 rm -f "conftest.$ac_objext"
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit "$ac_status"); } &&
1789 { ac_try='test -s "conftest.$ac_objext"'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit "$ac_status"); }; }; then
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1802 cat >"conftest.$ac_ext" <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1814 rm -f "conftest.$ac_objext"
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816 (eval $ac_compile) 2>&5
1818 echo "$as_me:1818: \$? = $ac_status" >&5
1819 (exit "$ac_status"); } &&
1820 { ac_try='test -s "conftest.$ac_objext"'
1821 { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1824 echo "$as_me:1824: \$? = $ac_status" >&5
1825 (exit "$ac_status"); }; }; then
1828 echo "$as_me: failed program was:" >&5
1829 cat "conftest.$ac_ext" >&5
1831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1834 if test -n "$ac_declaration"; then
1835 echo '#ifdef __cplusplus' >>confdefs.h
1836 echo "$ac_declaration" >>confdefs.h
1837 echo '#endif' >>confdefs.h
1841 echo "$as_me: failed program was:" >&5
1842 cat "conftest.$ac_ext" >&5
1844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 ac_cpp='$CPP $CPPFLAGS'
1847 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1848 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1850 ac_main_return="return"
1853 if test "$GCC" = yes ; then
1854 echo "$as_me:1854: checking version of $CC" >&5
1855 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1856 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1857 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1858 echo "$as_me:1858: result: $GCC_VERSION" >&5
1859 echo "${ECHO_T}$GCC_VERSION" >&6
1864 if test "$GCC" = yes ; then
1867 echo "$as_me:1867: checking if this is really Intel C compiler" >&5
1868 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1869 cf_save_CFLAGS="$CFLAGS"
1870 CFLAGS="$CFLAGS -no-gcc"
1871 cat >"conftest.$ac_ext" <<_ACEOF
1872 #line 1872 "configure"
1873 #include "confdefs.h"
1879 #ifdef __INTEL_COMPILER
1881 #error __INTEL_COMPILER is not defined
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"
1931 #error __clang__ is not defined
1938 rm -f "conftest.$ac_objext"
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940 (eval $ac_compile) 2>&5
1942 echo "$as_me:1942: \$? = $ac_status" >&5
1943 (exit "$ac_status"); } &&
1944 { ac_try='test -s "conftest.$ac_objext"'
1945 { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1948 echo "$as_me:1948: \$? = $ac_status" >&5
1949 (exit "$ac_status"); }; }; then
1953 echo "$as_me: failed program was:" >&5
1954 cat "conftest.$ac_ext" >&5
1956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1957 CFLAGS="$cf_save_CFLAGS"
1958 echo "$as_me:1958: result: $CLANG_COMPILER" >&5
1959 echo "${ECHO_T}$CLANG_COMPILER" >&6
1964 if test "x$CLANG_COMPILER" = "xyes" ; then
1966 (c[1-9][0-9]|*/c[1-9][0-9])
1967 { echo "$as_me:1967: WARNING: replacing broken compiler alias $CC" >&5
1968 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1969 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1974 echo "$as_me:1974: checking version of $CC" >&5
1975 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1976 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1977 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1978 echo "$as_me:1978: result: $CLANG_VERSION" >&5
1979 echo "${ECHO_T}$CLANG_VERSION" >&6
1981 for cf_clang_opt in \
1982 -Qunused-arguments \
1983 -Wno-error=implicit-function-declaration
1985 echo "$as_me:1985: checking if option $cf_clang_opt works" >&5
1986 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1987 cf_save_CFLAGS="$CFLAGS"
1988 CFLAGS="$CFLAGS $cf_clang_opt"
1989 cat >"conftest.$ac_ext" <<_ACEOF
1990 #line 1990 "configure"
1991 #include "confdefs.h"
1998 printf("hello!\\n");
2003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2004 if { (eval echo "$as_me:2004: \"$ac_link\"") >&5
2005 (eval $ac_link) 2>&5
2007 echo "$as_me:2007: \$? = $ac_status" >&5
2008 (exit "$ac_status"); } &&
2009 { ac_try='test -s "conftest$ac_exeext"'
2010 { (eval echo "$as_me:2010: \"$ac_try\"") >&5
2013 echo "$as_me:2013: \$? = $ac_status" >&5
2014 (exit "$ac_status"); }; }; then
2018 echo "$as_me: failed program was:" >&5
2019 cat "conftest.$ac_ext" >&5
2023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2024 echo "$as_me:2024: result: $cf_clang_optok" >&5
2025 echo "${ECHO_T}$cf_clang_optok" >&6
2026 CFLAGS="$cf_save_CFLAGS"
2027 if test "$cf_clang_optok" = yes; then
2028 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2030 echo "${as_me:-configure}:2030: testing adding option $cf_clang_opt ..." 1>&5
2032 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2033 CFLAGS="${CFLAGS}$cf_clang_opt"
2039 echo "$as_me:2039: checking for $CC option to accept ANSI C" >&5
2040 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2041 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2042 echo $ECHO_N "(cached) $ECHO_C" >&6
2044 ac_cv_prog_cc_stdc=no
2046 cat >"conftest.$ac_ext" <<_ACEOF
2047 #line 2047 "configure"
2048 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #include <sys/stat.h>
2053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2054 struct buf { int x; };
2055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2056 static char *e (char **p, int i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 # if $PKG_CONFIG_LIBDIR is set, try to use that
3283 if test -n "$PKG_CONFIG_PATH"; then
3284 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3285 elif test -n "$PKG_CONFIG_LIBDIR"; then
3286 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3291 # if the option is used, let that override. otherwise default to "libdir"
3293 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3294 if test "${with_pkg_config_libdir+set}" = set; then
3295 withval="$with_pkg_config_libdir"
3296 cf_search_path=$withval
3298 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3301 case "x$cf_search_path" in
3303 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3304 echo "$as_me:3304: result: $PKG_CONFIG_LIBDIR" >&5
3305 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3314 PKG_CONFIG_LIBDIR="$cf_search_path"
3315 echo "$as_me:3315: result: $PKG_CONFIG_LIBDIR" >&5
3316 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3320 echo "$as_me:3320: result: auto" >&5
3321 echo "${ECHO_T}auto" >&6
3323 # Look for the library directory using the same prefix as the executable
3324 echo "$as_me:3324: checking for search-list" >&5
3325 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3326 if test "x$PKG_CONFIG" != xnone
3328 # works for pkg-config since version 0.24 (2009)
3329 # works for pkgconf since version 0.8.3 (2012)
3330 for cf_pkg_program in \
3331 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3335 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3336 test -n "$cf_search_path" && break
3339 # works for pkg-config since import in 2005 of original 2001 HP code.
3340 test -z "$cf_search_path" && \
3342 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3343 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3344 sub(\"^[^']*'\",\"\"); \
3345 sub(\"'.*\",\"\"); \
3346 printf \" %s\", \\$0; } \
3351 echo "$as_me:3351: result: $cf_search_path" >&5
3352 echo "${ECHO_T}$cf_search_path" >&6
3355 { { echo "$as_me:3355: error: Unexpected option value: $cf_search_path" >&5
3356 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3357 { (exit 1); exit 1; }; }
3361 if test -n "$cf_search_path"
3363 echo "$as_me:3363: checking for first directory" >&5
3364 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3365 cf_pkg_config_path=none
3366 for cf_config in $cf_search_path
3368 if test -d "$cf_config"
3370 cf_pkg_config_path=$cf_config
3374 echo "$as_me:3374: result: $cf_pkg_config_path" >&5
3375 echo "${ECHO_T}$cf_pkg_config_path" >&6
3377 if test "x$cf_pkg_config_path" != xnone ; then
3378 # limit this to the first directory found
3379 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3382 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3384 echo "$as_me:3384: checking for workaround" >&5
3385 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3386 if test "$prefix" = "NONE" ; then
3387 cf_prefix="$ac_default_prefix"
3391 eval cf_libdir=$libdir
3392 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3394 for cf_config in $cf_search_path
3397 $cf_libdir/pkgconfig)
3398 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3402 test -z "$cf_backup" && cf_backup=$cf_config
3406 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3407 echo "$as_me:3407: result: $PKG_CONFIG_LIBDIR" >&5
3408 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3412 echo "$as_me:3412: checking if you want to build test-programs" >&5
3413 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3415 # Check whether --with-tests or --without-tests was given.
3416 if test "${with_tests+set}" = set; then
3417 withval="$with_tests"
3418 cf_with_tests=$withval
3422 echo "$as_me:3422: result: $cf_with_tests" >&5
3423 echo "${ECHO_T}$cf_with_tests" >&6
3425 echo "$as_me:3425: checking if we should assume mixed-case filenames" >&5
3426 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3428 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3429 if test "${enable_mixed_case+set}" = set; then
3430 enableval="$enable_mixed_case"
3431 enable_mixedcase=$enableval
3433 enable_mixedcase=auto
3435 echo "$as_me:3435: result: $enable_mixedcase" >&5
3436 echo "${ECHO_T}$enable_mixedcase" >&6
3437 if test "$enable_mixedcase" = "auto" ; then
3439 echo "$as_me:3439: checking if filesystem supports mixed-case filenames" >&5
3440 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3441 if test "${cf_cv_mixedcase+set}" = set; then
3442 echo $ECHO_N "(cached) $ECHO_C" >&6
3445 if test "$cross_compiling" = yes ; then
3446 case "$target_alias" in
3447 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3455 rm -f conftest CONFTEST
3457 if test -f CONFTEST ; then
3462 rm -f conftest CONFTEST
3466 echo "$as_me:3466: result: $cf_cv_mixedcase" >&5
3467 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3468 test "$cf_cv_mixedcase" = yes &&
3469 cat >>confdefs.h <<\EOF
3470 #define MIXEDCASE_FILENAMES 1
3474 cf_cv_mixedcase=$enable_mixedcase
3475 if test "$enable_mixedcase" = "yes" ; then
3476 cat >>confdefs.h <<\EOF
3477 #define MIXEDCASE_FILENAMES 1
3483 # do this after mixed-case option (tags/TAGS is not as important as tic).
3484 echo "$as_me:3484: checking whether ${MAKE-make} sets \${MAKE}" >&5
3485 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3486 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3487 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3488 echo $ECHO_N "(cached) $ECHO_C" >&6
3490 cat >conftest.make <<\EOF
3492 @echo 'ac_maketemp="${MAKE}"'
3494 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3495 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3496 if test -n "$ac_maketemp"; then
3497 eval ac_cv_prog_make_${ac_make}_set=yes
3499 eval ac_cv_prog_make_${ac_make}_set=no
3503 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3504 echo "$as_me:3504: result: yes" >&5
3505 echo "${ECHO_T}yes" >&6
3508 echo "$as_me:3508: result: no" >&5
3509 echo "${ECHO_T}no" >&6
3510 SET_MAKE="MAKE=${MAKE-make}"
3513 echo "$as_me:3513: checking for \".PHONY\" make-support" >&5
3514 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3515 if test "${cf_cv_make_PHONY+set}" = set; then
3516 echo $ECHO_N "(cached) $ECHO_C" >&6
3521 mkdir conftest || exit 1
3523 cat >makefile <<'CF_EOF'
3527 @echo "** making $@ $(DATA)"
3529 @echo "** making $@ $(DATA)"
3531 @echo "** making $@ $(DATA)"
3534 @echo "** making $@ $(DATA)"
3537 for cf_data in 1 2 3
3539 ${MAKE:-make} always DATA=$cf_data
3540 ${MAKE:-make} once DATA=$cf_data
3541 ${MAKE:-make} -t always once
3542 if test -f always ; then
3543 echo "no (case 1)" > ../conftest.tmp
3544 elif test ! -f always.out ; then
3545 echo "no (case 2)" > ../conftest.tmp
3546 elif test ! -f once.out ; then
3547 echo "no (case 3)" > ../conftest.tmp
3548 elif ! cmp -s always.out once.out ; then
3549 echo "no (case 4)" > ../conftest.tmp
3550 diff always.out once.out
3552 cf_check="`cat always.out`"
3553 if test "x$cf_check" != "x$cf_data" ; then
3554 echo "no (case 5)" > ../conftest.tmp
3556 echo yes > ../conftest.tmp
3564 cf_cv_make_PHONY="`cat conftest.tmp`"
3568 echo "$as_me:3568: result: $cf_cv_make_PHONY" >&5
3569 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3572 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3573 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3575 for ac_prog in exctags ctags
3577 # Extract the first word of "$ac_prog", so it can be a program name with args.
3578 set dummy $ac_prog; ac_word=$2
3579 echo "$as_me:3579: checking for $ac_word" >&5
3580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3581 if test "${ac_cv_prog_CTAGS+set}" = set; then
3582 echo $ECHO_N "(cached) $ECHO_C" >&6
3584 if test -n "$CTAGS"; then
3585 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3587 ac_save_IFS=$IFS; IFS=$ac_path_separator
3589 for ac_dir in $ac_dummy; do
3591 test -z "$ac_dir" && ac_dir=.
3592 $as_executable_p "$ac_dir/$ac_word" || continue
3593 ac_cv_prog_CTAGS="$ac_prog"
3594 echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3600 CTAGS=$ac_cv_prog_CTAGS
3601 if test -n "$CTAGS"; then
3602 echo "$as_me:3602: result: $CTAGS" >&5
3603 echo "${ECHO_T}$CTAGS" >&6
3605 echo "$as_me:3605: result: no" >&5
3606 echo "${ECHO_T}no" >&6
3609 test -n "$CTAGS" && break
3612 for ac_prog in exetags etags
3614 # Extract the first word of "$ac_prog", so it can be a program name with args.
3615 set dummy $ac_prog; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_ETAGS+set}" = set; then
3619 echo $ECHO_N "(cached) $ECHO_C" >&6
3621 if test -n "$ETAGS"; then
3622 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3624 ac_save_IFS=$IFS; IFS=$ac_path_separator
3626 for ac_dir in $ac_dummy; do
3628 test -z "$ac_dir" && ac_dir=.
3629 $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_ETAGS="$ac_prog"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3637 ETAGS=$ac_cv_prog_ETAGS
3638 if test -n "$ETAGS"; then
3639 echo "$as_me:3639: result: $ETAGS" >&5
3640 echo "${ECHO_T}$ETAGS" >&6
3642 echo "$as_me:3642: result: no" >&5
3643 echo "${ECHO_T}no" >&6
3646 test -n "$ETAGS" && break
3649 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3650 set dummy ${CTAGS:-ctags}; ac_word=$2
3651 echo "$as_me:3651: checking for $ac_word" >&5
3652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3653 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3654 echo $ECHO_N "(cached) $ECHO_C" >&6
3656 if test -n "$MAKE_LOWER_TAGS"; then
3657 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3659 ac_save_IFS=$IFS; IFS=$ac_path_separator
3661 for ac_dir in $ac_dummy; do
3663 test -z "$ac_dir" && ac_dir=.
3664 $as_executable_p "$ac_dir/$ac_word" || continue
3665 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3666 echo "$as_me:3666: found $ac_dir/$ac_word" >&5
3670 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3673 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3674 if test -n "$MAKE_LOWER_TAGS"; then
3675 echo "$as_me:3675: result: $MAKE_LOWER_TAGS" >&5
3676 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3678 echo "$as_me:3678: result: no" >&5
3679 echo "${ECHO_T}no" >&6
3682 if test "$cf_cv_mixedcase" = yes ; then
3683 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3684 set dummy ${ETAGS:-etags}; ac_word=$2
3685 echo "$as_me:3685: checking for $ac_word" >&5
3686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3687 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3688 echo $ECHO_N "(cached) $ECHO_C" >&6
3690 if test -n "$MAKE_UPPER_TAGS"; then
3691 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3693 ac_save_IFS=$IFS; IFS=$ac_path_separator
3695 for ac_dir in $ac_dummy; do
3697 test -z "$ac_dir" && ac_dir=.
3698 $as_executable_p "$ac_dir/$ac_word" || continue
3699 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3700 echo "$as_me:3700: found $ac_dir/$ac_word" >&5
3704 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3707 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3708 if test -n "$MAKE_UPPER_TAGS"; then
3709 echo "$as_me:3709: result: $MAKE_UPPER_TAGS" >&5
3710 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3712 echo "$as_me:3712: result: no" >&5
3713 echo "${ECHO_T}no" >&6
3720 if test "$MAKE_UPPER_TAGS" = yes ; then
3726 if test "$MAKE_LOWER_TAGS" = yes ; then
3732 echo "$as_me:3732: checking for makeflags variable" >&5
3733 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3734 if test "${cf_cv_makeflags+set}" = set; then
3735 echo $ECHO_N "(cached) $ECHO_C" >&6
3739 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3741 cat >cf_makeflags.tmp <<CF_EOF
3744 @ echo '.$cf_option'
3746 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3747 case "$cf_result" in
3749 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3750 case "$cf_result" in
3751 (.*CC=*) cf_cv_makeflags=
3753 (*) cf_cv_makeflags=$cf_option
3762 echo "${as_me:-configure}:3762: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3767 rm -f cf_makeflags.tmp
3770 echo "$as_me:3770: result: $cf_cv_makeflags" >&5
3771 echo "${ECHO_T}$cf_cv_makeflags" >&6
3773 if test -n "$ac_tool_prefix"; then
3774 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3775 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3776 echo "$as_me:3776: checking for $ac_word" >&5
3777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3778 if test "${ac_cv_prog_RANLIB+set}" = set; then
3779 echo $ECHO_N "(cached) $ECHO_C" >&6
3781 if test -n "$RANLIB"; then
3782 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3784 ac_save_IFS=$IFS; IFS=$ac_path_separator
3786 for ac_dir in $ac_dummy; do
3788 test -z "$ac_dir" && ac_dir=.
3789 $as_executable_p "$ac_dir/$ac_word" || continue
3790 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3791 echo "$as_me:3791: found $ac_dir/$ac_word" >&5
3797 RANLIB=$ac_cv_prog_RANLIB
3798 if test -n "$RANLIB"; then
3799 echo "$as_me:3799: result: $RANLIB" >&5
3800 echo "${ECHO_T}$RANLIB" >&6
3802 echo "$as_me:3802: result: no" >&5
3803 echo "${ECHO_T}no" >&6
3807 if test -z "$ac_cv_prog_RANLIB"; then
3808 ac_ct_RANLIB=$RANLIB
3809 # Extract the first word of "ranlib", so it can be a program name with args.
3810 set dummy ranlib; ac_word=$2
3811 echo "$as_me:3811: checking for $ac_word" >&5
3812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3813 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3814 echo $ECHO_N "(cached) $ECHO_C" >&6
3816 if test -n "$ac_ct_RANLIB"; then
3817 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3819 ac_save_IFS=$IFS; IFS=$ac_path_separator
3821 for ac_dir in $ac_dummy; do
3823 test -z "$ac_dir" && ac_dir=.
3824 $as_executable_p "$ac_dir/$ac_word" || continue
3825 ac_cv_prog_ac_ct_RANLIB="ranlib"
3826 echo "$as_me:3826: found $ac_dir/$ac_word" >&5
3830 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3833 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3834 if test -n "$ac_ct_RANLIB"; then
3835 echo "$as_me:3835: result: $ac_ct_RANLIB" >&5
3836 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3838 echo "$as_me:3838: result: no" >&5
3839 echo "${ECHO_T}no" >&6
3842 RANLIB=$ac_ct_RANLIB
3844 RANLIB="$ac_cv_prog_RANLIB"
3847 if test -n "$ac_tool_prefix"; then
3848 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3849 set dummy ${ac_tool_prefix}ld; ac_word=$2
3850 echo "$as_me:3850: checking for $ac_word" >&5
3851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3852 if test "${ac_cv_prog_LD+set}" = set; then
3853 echo $ECHO_N "(cached) $ECHO_C" >&6
3855 if test -n "$LD"; then
3856 ac_cv_prog_LD="$LD" # Let the user override the test.
3858 ac_save_IFS=$IFS; IFS=$ac_path_separator
3860 for ac_dir in $ac_dummy; do
3862 test -z "$ac_dir" && ac_dir=.
3863 $as_executable_p "$ac_dir/$ac_word" || continue
3864 ac_cv_prog_LD="${ac_tool_prefix}ld"
3865 echo "$as_me:3865: found $ac_dir/$ac_word" >&5
3872 if test -n "$LD"; then
3873 echo "$as_me:3873: result: $LD" >&5
3874 echo "${ECHO_T}$LD" >&6
3876 echo "$as_me:3876: result: no" >&5
3877 echo "${ECHO_T}no" >&6
3881 if test -z "$ac_cv_prog_LD"; then
3883 # Extract the first word of "ld", so it can be a program name with args.
3884 set dummy ld; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
3890 if test -n "$ac_ct_LD"; then
3891 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3893 ac_save_IFS=$IFS; IFS=$ac_path_separator
3895 for ac_dir in $ac_dummy; do
3897 test -z "$ac_dir" && ac_dir=.
3898 $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_ac_ct_LD="ld"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3904 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3907 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3908 if test -n "$ac_ct_LD"; then
3909 echo "$as_me:3909: result: $ac_ct_LD" >&5
3910 echo "${ECHO_T}$ac_ct_LD" >&6
3912 echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3921 if test -n "$ac_tool_prefix"; then
3922 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3923 set dummy ${ac_tool_prefix}ar; ac_word=$2
3924 echo "$as_me:3924: checking for $ac_word" >&5
3925 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3926 if test "${ac_cv_prog_AR+set}" = set; then
3927 echo $ECHO_N "(cached) $ECHO_C" >&6
3929 if test -n "$AR"; then
3930 ac_cv_prog_AR="$AR" # Let the user override the test.
3932 ac_save_IFS=$IFS; IFS=$ac_path_separator
3934 for ac_dir in $ac_dummy; do
3936 test -z "$ac_dir" && ac_dir=.
3937 $as_executable_p "$ac_dir/$ac_word" || continue
3938 ac_cv_prog_AR="${ac_tool_prefix}ar"
3939 echo "$as_me:3939: found $ac_dir/$ac_word" >&5
3946 if test -n "$AR"; then
3947 echo "$as_me:3947: result: $AR" >&5
3948 echo "${ECHO_T}$AR" >&6
3950 echo "$as_me:3950: result: no" >&5
3951 echo "${ECHO_T}no" >&6
3955 if test -z "$ac_cv_prog_AR"; then
3957 # Extract the first word of "ar", so it can be a program name with args.
3958 set dummy ar; ac_word=$2
3959 echo "$as_me:3959: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3962 echo $ECHO_N "(cached) $ECHO_C" >&6
3964 if test -n "$ac_ct_AR"; then
3965 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3967 ac_save_IFS=$IFS; IFS=$ac_path_separator
3969 for ac_dir in $ac_dummy; do
3971 test -z "$ac_dir" && ac_dir=.
3972 $as_executable_p "$ac_dir/$ac_word" || continue
3973 ac_cv_prog_ac_ct_AR="ar"
3974 echo "$as_me:3974: found $ac_dir/$ac_word" >&5
3978 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3981 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3982 if test -n "$ac_ct_AR"; then
3983 echo "$as_me:3983: result: $ac_ct_AR" >&5
3984 echo "${ECHO_T}$ac_ct_AR" >&6
3986 echo "$as_me:3986: result: no" >&5
3987 echo "${ECHO_T}no" >&6
3995 if test -n "$ac_tool_prefix"; then
3996 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3997 set dummy ${ac_tool_prefix}ar; ac_word=$2
3998 echo "$as_me:3998: checking for $ac_word" >&5
3999 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4000 if test "${ac_cv_prog_AR+set}" = set; then
4001 echo $ECHO_N "(cached) $ECHO_C" >&6
4003 if test -n "$AR"; then
4004 ac_cv_prog_AR="$AR" # Let the user override the test.
4006 ac_save_IFS=$IFS; IFS=$ac_path_separator
4008 for ac_dir in $ac_dummy; do
4010 test -z "$ac_dir" && ac_dir=.
4011 $as_executable_p "$ac_dir/$ac_word" || continue
4012 ac_cv_prog_AR="${ac_tool_prefix}ar"
4013 echo "$as_me:4013: found $ac_dir/$ac_word" >&5
4020 if test -n "$AR"; then
4021 echo "$as_me:4021: result: $AR" >&5
4022 echo "${ECHO_T}$AR" >&6
4024 echo "$as_me:4024: result: no" >&5
4025 echo "${ECHO_T}no" >&6
4029 if test -z "$ac_cv_prog_AR"; then
4031 # Extract the first word of "ar", so it can be a program name with args.
4032 set dummy ar; ac_word=$2
4033 echo "$as_me:4033: checking for $ac_word" >&5
4034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4035 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4036 echo $ECHO_N "(cached) $ECHO_C" >&6
4038 if test -n "$ac_ct_AR"; then
4039 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4041 ac_save_IFS=$IFS; IFS=$ac_path_separator
4043 for ac_dir in $ac_dummy; do
4045 test -z "$ac_dir" && ac_dir=.
4046 $as_executable_p "$ac_dir/$ac_word" || continue
4047 ac_cv_prog_ac_ct_AR="ar"
4048 echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4052 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4055 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4056 if test -n "$ac_ct_AR"; then
4057 echo "$as_me:4057: result: $ac_ct_AR" >&5
4058 echo "${ECHO_T}$ac_ct_AR" >&6
4060 echo "$as_me:4060: result: no" >&5
4061 echo "${ECHO_T}no" >&6
4069 echo "$as_me:4069: checking for options to update archives" >&5
4070 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4071 if test "${cf_cv_ar_flags+set}" = set; then
4072 echo $ECHO_N "(cached) $ECHO_C" >&6
4075 case "$cf_cv_system_name" in
4078 cat >mk_static_lib.sh <<-EOF
4083 exec \$MSVC_BIN -out:"\$out" \$@
4085 chmod +x mk_static_lib.sh
4086 AR=`pwd`/mk_static_lib.sh
4089 cf_cv_ar_flags=unknown
4090 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4093 # check if $ARFLAGS already contains this choice
4094 if test "x$ARFLAGS" != "x" ; then
4095 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4096 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4102 rm -f "conftest.$ac_cv_objext"
4105 cat >"conftest.$ac_ext" <<EOF
4106 #line 4106 "configure"
4107 int testdata[3] = { 123, 456, 789 };
4109 if { (eval echo "$as_me:4109: \"$ac_compile\"") >&5
4110 (eval $ac_compile) 2>&5
4112 echo "$as_me:4112: \$? = $ac_status" >&5
4113 (exit "$ac_status"); } ; then
4114 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4115 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4116 if test -f conftest.a ; then
4117 cf_cv_ar_flags="$cf_ar_flags"
4121 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4123 echo "${as_me:-configure}:4123: testing cannot compile test-program ..." 1>&5
4128 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4133 echo "$as_me:4133: result: $cf_cv_ar_flags" >&5
4134 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4136 if test -n "$ARFLAGS" ; then
4137 if test -n "$cf_cv_ar_flags" ; then
4138 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4141 ARFLAGS=$cf_cv_ar_flags
4144 echo "$as_me:4144: checking for PATH separator" >&5
4145 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4146 case "$cf_cv_system_name" in
4147 (os2*) PATH_SEPARATOR=';' ;;
4148 (*) ${PATH_SEPARATOR:=':'} ;;
4151 echo "$as_me:4151: result: $PATH_SEPARATOR" >&5
4152 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4154 echo "$as_me:4154: checking if you have specified an install-prefix" >&5
4155 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4157 # Check whether --with-install-prefix or --without-install-prefix was given.
4158 if test "${with_install_prefix+set}" = set; then
4159 withval="$with_install_prefix"
4163 (*) DESTDIR="$withval"
4167 echo "$as_me:4167: result: $DESTDIR" >&5
4168 echo "${ECHO_T}$DESTDIR" >&6
4170 ###############################################################################
4172 # If we're cross-compiling, allow the user to override the tools and their
4173 # options. The configure script is oriented toward identifying the host
4174 # compiler, etc., but we need a build compiler to generate parts of the source.
4176 if test "$cross_compiling" = yes ; then
4178 # defaults that we might want to override
4179 : ${BUILD_CFLAGS:=''}
4180 : ${BUILD_CPPFLAGS:=''}
4181 : ${BUILD_LDFLAGS:=''}
4183 : ${BUILD_EXEEXT:='$x'}
4184 : ${BUILD_OBJEXT:='o'}
4186 # Check whether --with-build-cc or --without-build-cc was given.
4187 if test "${with_build_cc+set}" = set; then
4188 withval="$with_build_cc"
4191 for ac_prog in gcc clang c99 c89 cc cl
4193 # Extract the first word of "$ac_prog", so it can be a program name with args.
4194 set dummy $ac_prog; ac_word=$2
4195 echo "$as_me:4195: checking for $ac_word" >&5
4196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4197 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4198 echo $ECHO_N "(cached) $ECHO_C" >&6
4200 if test -n "$BUILD_CC"; then
4201 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4203 ac_save_IFS=$IFS; IFS=$ac_path_separator
4205 for ac_dir in $ac_dummy; do
4207 test -z "$ac_dir" && ac_dir=.
4208 $as_executable_p "$ac_dir/$ac_word" || continue
4209 ac_cv_prog_BUILD_CC="$ac_prog"
4210 echo "$as_me:4210: found $ac_dir/$ac_word" >&5
4216 BUILD_CC=$ac_cv_prog_BUILD_CC
4217 if test -n "$BUILD_CC"; then
4218 echo "$as_me:4218: result: $BUILD_CC" >&5
4219 echo "${ECHO_T}$BUILD_CC" >&6
4221 echo "$as_me:4221: result: no" >&5
4222 echo "${ECHO_T}no" >&6
4225 test -n "$BUILD_CC" && break
4227 test -n "$BUILD_CC" || BUILD_CC="none"
4230 echo "$as_me:4230: checking for native build C compiler" >&5
4231 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4232 echo "$as_me:4232: result: $BUILD_CC" >&5
4233 echo "${ECHO_T}$BUILD_CC" >&6
4235 echo "$as_me:4235: checking for native build C preprocessor" >&5
4236 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4238 # Check whether --with-build-cpp or --without-build-cpp was given.
4239 if test "${with_build_cpp+set}" = set; then
4240 withval="$with_build_cpp"
4241 BUILD_CPP="$withval"
4243 BUILD_CPP='${BUILD_CC} -E'
4245 echo "$as_me:4245: result: $BUILD_CPP" >&5
4246 echo "${ECHO_T}$BUILD_CPP" >&6
4248 echo "$as_me:4248: checking for native build C flags" >&5
4249 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4251 # Check whether --with-build-cflags or --without-build-cflags was given.
4252 if test "${with_build_cflags+set}" = set; then
4253 withval="$with_build_cflags"
4254 BUILD_CFLAGS="$withval"
4256 echo "$as_me:4256: result: $BUILD_CFLAGS" >&5
4257 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4259 echo "$as_me:4259: checking for native build C preprocessor-flags" >&5
4260 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4262 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4263 if test "${with_build_cppflags+set}" = set; then
4264 withval="$with_build_cppflags"
4265 BUILD_CPPFLAGS="$withval"
4267 echo "$as_me:4267: result: $BUILD_CPPFLAGS" >&5
4268 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4270 echo "$as_me:4270: checking for native build linker-flags" >&5
4271 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4273 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4274 if test "${with_build_ldflags+set}" = set; then
4275 withval="$with_build_ldflags"
4276 BUILD_LDFLAGS="$withval"
4278 echo "$as_me:4278: result: $BUILD_LDFLAGS" >&5
4279 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4281 echo "$as_me:4281: checking for native build linker-libraries" >&5
4282 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4284 # Check whether --with-build-libs or --without-build-libs was given.
4285 if test "${with_build_libs+set}" = set; then
4286 withval="$with_build_libs"
4287 BUILD_LIBS="$withval"
4289 echo "$as_me:4289: result: $BUILD_LIBS" >&5
4290 echo "${ECHO_T}$BUILD_LIBS" >&6
4292 # this assumes we're on Unix.
4296 : ${BUILD_CC:='${CC}'}
4298 echo "$as_me:4298: checking if the build-compiler \"$BUILD_CC\" works" >&5
4299 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4301 cf_save_crossed=$cross_compiling
4302 cf_save_ac_link=$ac_link
4304 cf_build_cppflags=$BUILD_CPPFLAGS
4305 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
4306 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4308 if test "$cross_compiling" = yes; then
4309 cf_ok_build_cc=unknown
4311 cat >"conftest.$ac_ext" <<_ACEOF
4312 #line 4312 "configure"
4313 #include "confdefs.h"
4315 int main(int argc, char *argv[])
4317 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4321 rm -f "conftest$ac_exeext"
4322 if { (eval echo "$as_me:4322: \"$ac_link\"") >&5
4323 (eval $ac_link) 2>&5
4325 echo "$as_me:4325: \$? = $ac_status" >&5
4326 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4327 { (eval echo "$as_me:4327: \"$ac_try\"") >&5
4330 echo "$as_me:4330: \$? = $ac_status" >&5
4331 (exit "$ac_status"); }; }; then
4334 echo "$as_me: program exited with status $ac_status" >&5
4335 echo "$as_me: failed program was:" >&5
4336 cat "conftest.$ac_ext" >&5
4339 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4342 cross_compiling=$cf_save_crossed
4343 ac_link=$cf_save_ac_link
4345 echo "$as_me:4345: result: $cf_ok_build_cc" >&5
4346 echo "${ECHO_T}$cf_ok_build_cc" >&6
4348 if test "$cf_ok_build_cc" != yes
4350 { { echo "$as_me:4350: error: Cross-build requires two compilers.
4351 Use --with-build-cc to specify the native compiler." >&5
4352 echo "$as_me: error: Cross-build requires two compilers.
4353 Use --with-build-cc to specify the native compiler." >&2;}
4354 { (exit 1); exit 1; }; }
4358 : ${BUILD_CC:='${CC}'}
4359 : ${BUILD_CPP:='${CPP}'}
4360 : ${BUILD_CFLAGS:='${CFLAGS}'}
4361 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4362 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4363 : ${BUILD_LIBS:='${LIBS}'}
4364 : ${BUILD_EXEEXT:='$x'}
4365 : ${BUILD_OBJEXT:='o'}
4368 ###############################################################################
4370 ### Options to allow the user to specify the set of libraries which are used.
4371 ### Use "--without-normal --with-shared" to allow the default model to be
4372 ### shared, for example.
4375 echo "$as_me:4375: checking if you want to build shared C-objects" >&5
4376 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4378 # Check whether --with-shared or --without-shared was given.
4379 if test "${with_shared+set}" = set; then
4380 withval="$with_shared"
4381 with_shared=$withval
4385 echo "$as_me:4385: result: $with_shared" >&5
4386 echo "${ECHO_T}$with_shared" >&6
4387 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4389 echo "$as_me:4389: checking for specified models" >&5
4390 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4391 test -z "$cf_list_models" && cf_list_models=normal
4392 echo "$as_me:4392: result: $cf_list_models" >&5
4393 echo "${ECHO_T}$cf_list_models" >&6
4395 ### Use the first model as the default, and save its suffix for use in building
4396 ### up test-applications.
4397 echo "$as_me:4397: checking for default model" >&5
4398 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4399 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4400 echo "$as_me:4400: result: $DFT_LWR_MODEL" >&5
4401 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4403 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4405 echo "$as_me:4405: checking for specific curses-directory" >&5
4406 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4408 # Check whether --with-curses-dir or --without-curses-dir was given.
4409 if test "${with_curses_dir+set}" = set; then
4410 withval="$with_curses_dir"
4411 cf_cv_curses_dir=$withval
4415 echo "$as_me:4415: result: $cf_cv_curses_dir" >&5
4416 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4418 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4421 if test "x$prefix" != xNONE; then
4422 cf_path_syntax="$prefix"
4424 cf_path_syntax="$ac_default_prefix"
4432 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4434 (.\$\{*prefix\}*|.\$\{*dir\}*)
4435 eval withval="$withval"
4438 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4443 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4446 { { echo "$as_me:4446: error: expected a pathname, not \"$withval\"" >&5
4447 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4448 { (exit 1); exit 1; }; }
4452 if test -d "$cf_cv_curses_dir"
4455 if test -n "$cf_cv_curses_dir/include" ; then
4456 for cf_add_incdir in $cf_cv_curses_dir/include
4458 while test "$cf_add_incdir" != /usr/include
4460 if test -d "$cf_add_incdir"
4463 if test -n "$CFLAGS$CPPFLAGS" ; then
4464 # a loop is needed to ensure we can add subdirs of existing dirs
4465 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4466 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4467 cf_have_incdir=yes; break
4472 if test "$cf_have_incdir" = no ; then
4473 if test "$cf_add_incdir" = /usr/local/include ; then
4474 if test "$GCC" = yes
4476 cf_save_CPPFLAGS=$CPPFLAGS
4478 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4479 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4481 cat >"conftest.$ac_ext" <<_ACEOF
4482 #line 4482 "configure"
4483 #include "confdefs.h"
4493 rm -f "conftest.$ac_objext"
4494 if { (eval echo "$as_me:4494: \"$ac_compile\"") >&5
4495 (eval $ac_compile) 2>&5
4497 echo "$as_me:4497: \$? = $ac_status" >&5
4498 (exit "$ac_status"); } &&
4499 { ac_try='test -s "conftest.$ac_objext"'
4500 { (eval echo "$as_me:4500: \"$ac_try\"") >&5
4503 echo "$as_me:4503: \$? = $ac_status" >&5
4504 (exit "$ac_status"); }; }; then
4507 echo "$as_me: failed program was:" >&5
4508 cat "conftest.$ac_ext" >&5
4511 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4512 CPPFLAGS=$cf_save_CPPFLAGS
4517 if test "$cf_have_incdir" = no ; then
4518 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4520 echo "${as_me:-configure}:4520: testing adding $cf_add_incdir to include-path ..." 1>&5
4522 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4524 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4525 test "$cf_top_incdir" = "$cf_add_incdir" && break
4526 cf_add_incdir="$cf_top_incdir"
4537 if test -n "$cf_cv_curses_dir/lib" ; then
4538 for cf_add_libdir in $cf_cv_curses_dir/lib
4540 if test "$cf_add_libdir" = /usr/lib ; then
4542 elif test -d "$cf_add_libdir"
4545 if test -n "$LDFLAGS$LIBS" ; then
4546 # a loop is needed to ensure we can add subdirs of existing dirs
4547 for cf_test_libdir in $LDFLAGS $LIBS ; do
4548 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4549 cf_have_libdir=yes; break
4553 if test "$cf_have_libdir" = no ; then
4554 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4556 echo "${as_me:-configure}:4556: testing adding $cf_add_libdir to library-path ..." 1>&5
4558 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4567 cf_ncuconfig_root=ncurses
4568 cf_have_ncuconfig=no
4570 if test "x${PKG_CONFIG:=none}" != xnone; then
4571 echo "$as_me:4571: checking pkg-config for $cf_ncuconfig_root" >&5
4572 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4573 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4574 echo "$as_me:4574: result: yes" >&5
4575 echo "${ECHO_T}yes" >&6
4577 echo "$as_me:4577: checking if the $cf_ncuconfig_root package files work" >&5
4578 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4579 cf_have_ncuconfig=unknown
4581 cf_save_CFLAGS="$CFLAGS"
4582 cf_save_CPPFLAGS="$CPPFLAGS"
4583 cf_save_LIBS="$LIBS"
4585 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4586 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4588 # while -W for passing linker flags is prevalent, it is not "standard".
4589 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4590 # incompatible _and_ non-standard -W option which gives an error. Work
4591 # around that pitfall.
4592 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4598 cf_new_extra_cppflags=
4600 for cf_add_cflags in $cf_pkg_cflags
4602 case "$cf_fix_cppflags" in
4604 case "$cf_add_cflags" in
4605 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4606 case "$cf_add_cflags" in
4608 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4610 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4611 && test -z "${cf_tst_cflags}" \
4612 && cf_fix_cppflags=yes
4614 if test "$cf_fix_cppflags" = yes ; then
4616 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4617 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4620 elif test "${cf_tst_cflags}" = "\"'" ; then
4622 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4623 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4633 case "$cf_add_cflags" in
4635 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4637 CPPFLAGS=`echo "$CPPFLAGS" | \
4638 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4639 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4644 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4645 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4652 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4653 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4660 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4661 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4663 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4665 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4666 && test -z "${cf_tst_cflags}" \
4667 && cf_fix_cppflags=no
4672 if test -n "$cf_new_cflags" ; then
4674 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4675 CFLAGS="${CFLAGS}$cf_new_cflags"
4679 if test -n "$cf_new_cppflags" ; then
4681 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4682 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4686 if test -n "$cf_new_extra_cppflags" ; then
4688 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4689 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4696 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4698 for cf_add_1lib in $cf_add_0lib; do
4699 for cf_add_2lib in $cf_add_libs; do
4700 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4705 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4709 cat >"conftest.$ac_ext" <<_ACEOF
4710 #line 4710 "configure"
4711 #include "confdefs.h"
4712 #include <${cf_cv_ncurses_header:-curses.h}>
4716 initscr(); mousemask(0,0); tigetstr((char *)0);
4721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4722 if { (eval echo "$as_me:4722: \"$ac_link\"") >&5
4723 (eval $ac_link) 2>&5
4725 echo "$as_me:4725: \$? = $ac_status" >&5
4726 (exit "$ac_status"); } &&
4727 { ac_try='test -s "conftest$ac_exeext"'
4728 { (eval echo "$as_me:4728: \"$ac_try\"") >&5
4731 echo "$as_me:4731: \$? = $ac_status" >&5
4732 (exit "$ac_status"); }; }; then
4733 if test "$cross_compiling" = yes; then
4734 cf_test_ncuconfig=maybe
4736 cat >"conftest.$ac_ext" <<_ACEOF
4737 #line 4737 "configure"
4738 #include "confdefs.h"
4739 #include <${cf_cv_ncurses_header:-curses.h}>
4741 { const char *xx = curses_version(); return (xx == 0); }
4743 rm -f "conftest$ac_exeext"
4744 if { (eval echo "$as_me:4744: \"$ac_link\"") >&5
4745 (eval $ac_link) 2>&5
4747 echo "$as_me:4747: \$? = $ac_status" >&5
4748 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4749 { (eval echo "$as_me:4749: \"$ac_try\"") >&5
4752 echo "$as_me:4752: \$? = $ac_status" >&5
4753 (exit "$ac_status"); }; }; then
4754 cf_test_ncuconfig=yes
4756 echo "$as_me: program exited with status $ac_status" >&5
4757 echo "$as_me: failed program was:" >&5
4758 cat "conftest.$ac_ext" >&5
4759 cf_test_ncuconfig=no
4761 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4764 echo "$as_me: failed program was:" >&5
4765 cat "conftest.$ac_ext" >&5
4766 cf_test_ncuconfig=no
4768 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4770 CFLAGS="$cf_save_CFLAGS"
4771 CPPFLAGS="$cf_save_CPPFLAGS"
4772 LIBS="$cf_save_LIBS"
4774 if test "x$cf_test_ncuconfig" != xyes; then
4775 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4776 cf_pkg_cflags="$cf_temp"
4777 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4778 cf_pkg_libs="$cf_temp"
4783 for cf_add_cflags in $cf_pkg_cflags
4785 case "x$cf_add_cflags" in
4788 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4791 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'`
4792 test "$CFLAGS" != "$cf_old_cflag" || break
4794 CFLAGS="$cf_old_cflag"
4797 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4800 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'`
4801 test "$CPPFLAGS" != "$cf_old_cflag" || break
4803 CPPFLAGS="$cf_old_cflag"
4812 cf_new_extra_cppflags=
4814 for cf_add_cflags in $cf_add_cflags
4816 case "$cf_fix_cppflags" in
4818 case "$cf_add_cflags" in
4819 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4820 case "$cf_add_cflags" in
4822 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4824 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4825 && test -z "${cf_tst_cflags}" \
4826 && cf_fix_cppflags=yes
4828 if test "$cf_fix_cppflags" = yes ; then
4830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4834 elif test "${cf_tst_cflags}" = "\"'" ; then
4836 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4837 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4847 case "$cf_add_cflags" in
4849 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4851 CPPFLAGS=`echo "$CPPFLAGS" | \
4852 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4853 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4858 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4859 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4866 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4867 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4874 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4875 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4877 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4879 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4880 && test -z "${cf_tst_cflags}" \
4881 && cf_fix_cppflags=no
4886 if test -n "$cf_new_cflags" ; then
4888 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4889 CFLAGS="${CFLAGS}$cf_new_cflags"
4893 if test -n "$cf_new_cppflags" ; then
4895 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4896 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4900 if test -n "$cf_new_extra_cppflags" ; then
4902 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4903 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4912 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4914 for cf_add_1lib in $cf_add_0lib; do
4915 for cf_add_2lib in $cf_add_libs; do
4916 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4921 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4925 cat >"conftest.$ac_ext" <<_ACEOF
4926 #line 4926 "configure"
4927 #include "confdefs.h"
4928 #include <${cf_cv_ncurses_header:-curses.h}>
4932 initscr(); mousemask(0,0); tigetstr((char *)0);
4937 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4938 if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
4939 (eval $ac_link) 2>&5
4941 echo "$as_me:4941: \$? = $ac_status" >&5
4942 (exit "$ac_status"); } &&
4943 { ac_try='test -s "conftest$ac_exeext"'
4944 { (eval echo "$as_me:4944: \"$ac_try\"") >&5
4947 echo "$as_me:4947: \$? = $ac_status" >&5
4948 (exit "$ac_status"); }; }; then
4949 if test "$cross_compiling" = yes; then
4950 cf_have_ncuconfig=maybe
4952 cat >"conftest.$ac_ext" <<_ACEOF
4953 #line 4953 "configure"
4954 #include "confdefs.h"
4955 #include <${cf_cv_ncurses_header:-curses.h}>
4957 { const char *xx = curses_version(); return (xx == 0); }
4959 rm -f "conftest$ac_exeext"
4960 if { (eval echo "$as_me:4960: \"$ac_link\"") >&5
4961 (eval $ac_link) 2>&5
4963 echo "$as_me:4963: \$? = $ac_status" >&5
4964 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4965 { (eval echo "$as_me:4965: \"$ac_try\"") >&5
4968 echo "$as_me:4968: \$? = $ac_status" >&5
4969 (exit "$ac_status"); }; }; then
4970 cf_have_ncuconfig=yes
4972 echo "$as_me: program exited with status $ac_status" >&5
4973 echo "$as_me: failed program was:" >&5
4974 cat "conftest.$ac_ext" >&5
4975 cf_have_ncuconfig=no
4977 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4980 echo "$as_me: failed program was:" >&5
4981 cat "conftest.$ac_ext" >&5
4982 cf_have_ncuconfig=no
4984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4985 echo "$as_me:4985: result: $cf_have_ncuconfig" >&5
4986 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4987 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4988 if test "$cf_have_ncuconfig" != "yes"
4990 CPPFLAGS="$cf_save_CPPFLAGS"
4991 LIBS="$cf_save_LIBS"
4992 NCURSES_CONFIG_PKG=none
4995 cat >>confdefs.h <<\EOF
4999 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5001 echo "$as_me:5001: checking for terminfo header" >&5
5002 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5003 if test "${cf_cv_term_header+set}" = set; then
5004 echo $ECHO_N "(cached) $ECHO_C" >&6
5007 case "${cf_cv_ncurses_header}" in
5008 (*/ncurses.h|*/ncursesw.h)
5009 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5012 cf_term_header=term.h
5016 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5018 cat >"conftest.$ac_ext" <<_ACEOF
5019 #line 5019 "configure"
5020 #include "confdefs.h"
5022 #include <${cf_cv_ncurses_header:-curses.h}>
5028 int x = auto_left_margin; (void)x
5033 rm -f "conftest.$ac_objext"
5034 if { (eval echo "$as_me:5034: \"$ac_compile\"") >&5
5035 (eval $ac_compile) 2>&5
5037 echo "$as_me:5037: \$? = $ac_status" >&5
5038 (exit "$ac_status"); } &&
5039 { ac_try='test -s "conftest.$ac_objext"'
5040 { (eval echo "$as_me:5040: \"$ac_try\"") >&5
5043 echo "$as_me:5043: \$? = $ac_status" >&5
5044 (exit "$ac_status"); }; }; then
5046 cf_cv_term_header="$cf_test"
5048 echo "$as_me: failed program was:" >&5
5049 cat "conftest.$ac_ext" >&5
5051 cf_cv_term_header=unknown
5054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5055 test "$cf_cv_term_header" != unknown && break
5059 echo "$as_me:5059: result: $cf_cv_term_header" >&5
5060 echo "${ECHO_T}$cf_cv_term_header" >&6
5062 # Set definitions to allow ifdef'ing to accommodate subdirectories
5064 case "$cf_cv_term_header" in
5067 cat >>confdefs.h <<\EOF
5068 #define HAVE_TERM_H 1
5074 case "$cf_cv_term_header" in
5077 cat >>confdefs.h <<\EOF
5078 #define HAVE_NCURSES_TERM_H 1
5084 cat >>confdefs.h <<\EOF
5085 #define HAVE_NCURSESW_TERM_H 1
5094 echo "$as_me:5094: result: no" >&5
5095 echo "${ECHO_T}no" >&6
5096 NCURSES_CONFIG_PKG=none
5099 NCURSES_CONFIG_PKG=none
5102 if test "x$cf_have_ncuconfig" = "xno"; then
5103 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5105 if test -n "$ac_tool_prefix"; then
5106 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5108 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5109 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5110 echo "$as_me:5110: checking for $ac_word" >&5
5111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5112 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5113 echo $ECHO_N "(cached) $ECHO_C" >&6
5115 if test -n "$NCURSES_CONFIG"; then
5116 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5118 ac_save_IFS=$IFS; IFS=$ac_path_separator
5120 for ac_dir in $ac_dummy; do
5122 test -z "$ac_dir" && ac_dir=.
5123 $as_executable_p "$ac_dir/$ac_word" || continue
5124 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5125 echo "$as_me:5125: found $ac_dir/$ac_word" >&5
5131 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5132 if test -n "$NCURSES_CONFIG"; then
5133 echo "$as_me:5133: result: $NCURSES_CONFIG" >&5
5134 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5136 echo "$as_me:5136: result: no" >&5
5137 echo "${ECHO_T}no" >&6
5140 test -n "$NCURSES_CONFIG" && break
5143 if test -z "$NCURSES_CONFIG"; then
5144 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5145 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5147 # Extract the first word of "$ac_prog", so it can be a program name with args.
5148 set dummy $ac_prog; ac_word=$2
5149 echo "$as_me:5149: checking for $ac_word" >&5
5150 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5151 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5152 echo $ECHO_N "(cached) $ECHO_C" >&6
5154 if test -n "$ac_ct_NCURSES_CONFIG"; then
5155 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5157 ac_save_IFS=$IFS; IFS=$ac_path_separator
5159 for ac_dir in $ac_dummy; do
5161 test -z "$ac_dir" && ac_dir=.
5162 $as_executable_p "$ac_dir/$ac_word" || continue
5163 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5164 echo "$as_me:5164: found $ac_dir/$ac_word" >&5
5170 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5171 if test -n "$ac_ct_NCURSES_CONFIG"; then
5172 echo "$as_me:5172: result: $ac_ct_NCURSES_CONFIG" >&5
5173 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5175 echo "$as_me:5175: result: no" >&5
5176 echo "${ECHO_T}no" >&6
5179 test -n "$ac_ct_NCURSES_CONFIG" && break
5181 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5183 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5186 if test "$NCURSES_CONFIG" != none ; then
5188 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5190 case "x$cf_add_cflags" in
5193 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5196 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'`
5197 test "$CFLAGS" != "$cf_old_cflag" || break
5199 CFLAGS="$cf_old_cflag"
5202 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5205 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'`
5206 test "$CPPFLAGS" != "$cf_old_cflag" || break
5208 CPPFLAGS="$cf_old_cflag"
5217 cf_new_extra_cppflags=
5219 for cf_add_cflags in $cf_add_cflags
5221 case "$cf_fix_cppflags" in
5223 case "$cf_add_cflags" in
5224 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5225 case "$cf_add_cflags" in
5227 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5229 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5230 && test -z "${cf_tst_cflags}" \
5231 && cf_fix_cppflags=yes
5233 if test "$cf_fix_cppflags" = yes ; then
5235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5239 elif test "${cf_tst_cflags}" = "\"'" ; then
5241 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5242 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5252 case "$cf_add_cflags" in
5254 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5256 CPPFLAGS=`echo "$CPPFLAGS" | \
5257 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5258 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5263 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5264 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5271 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5272 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5279 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5280 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5282 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5284 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5285 && test -z "${cf_tst_cflags}" \
5286 && cf_fix_cppflags=no
5291 if test -n "$cf_new_cflags" ; then
5293 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5294 CFLAGS="${CFLAGS}$cf_new_cflags"
5298 if test -n "$cf_new_cppflags" ; then
5300 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5301 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5305 if test -n "$cf_new_extra_cppflags" ; then
5307 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5308 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5317 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5319 for cf_add_1lib in $cf_add_0lib; do
5320 for cf_add_2lib in $cf_add_libs; do
5321 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5326 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5330 # even with config script, some packages use no-override for curses.h
5332 echo "$as_me:5332: checking if we have identified curses headers" >&5
5333 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5334 if test "${cf_cv_ncurses_header+set}" = set; then
5335 echo $ECHO_N "(cached) $ECHO_C" >&6
5338 cf_cv_ncurses_header=none
5340 ncurses.h ncurses/ncurses.h \
5341 curses.h ncurses/curses.h
5343 cat >"conftest.$ac_ext" <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5346 #include <${cf_header}>
5355 rm -f "conftest.$ac_objext"
5356 if { (eval echo "$as_me:5356: \"$ac_compile\"") >&5
5357 (eval $ac_compile) 2>&5
5359 echo "$as_me:5359: \$? = $ac_status" >&5
5360 (exit "$ac_status"); } &&
5361 { ac_try='test -s "conftest.$ac_objext"'
5362 { (eval echo "$as_me:5362: \"$ac_try\"") >&5
5365 echo "$as_me:5365: \$? = $ac_status" >&5
5366 (exit "$ac_status"); }; }; then
5367 cf_cv_ncurses_header=$cf_header; break
5369 echo "$as_me: failed program was:" >&5
5370 cat "conftest.$ac_ext" >&5
5372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5376 echo "$as_me:5376: result: $cf_cv_ncurses_header" >&5
5377 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5379 if test "$cf_cv_ncurses_header" = none ; then
5380 { { echo "$as_me:5380: error: No curses header-files found" >&5
5381 echo "$as_me: error: No curses header-files found" >&2;}
5382 { (exit 1); exit 1; }; }
5385 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5387 for ac_header in $cf_cv_ncurses_header
5389 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5390 echo "$as_me:5390: checking for $ac_header" >&5
5391 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5392 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5393 echo $ECHO_N "(cached) $ECHO_C" >&6
5395 cat >"conftest.$ac_ext" <<_ACEOF
5396 #line 5396 "configure"
5397 #include "confdefs.h"
5398 #include <$ac_header>
5400 if { (eval echo "$as_me:5400: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5401 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5403 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5405 cat conftest.err >&5
5406 echo "$as_me:5406: \$? = $ac_status" >&5
5407 (exit "$ac_status"); } >/dev/null; then
5408 if test -s conftest.err; then
5409 ac_cpp_err=$ac_c_preproc_warn_flag
5416 if test -z "$ac_cpp_err"; then
5417 eval "$as_ac_Header=yes"
5419 echo "$as_me: failed program was:" >&5
5420 cat "conftest.$ac_ext" >&5
5421 eval "$as_ac_Header=no"
5423 rm -f conftest.err "conftest.$ac_ext"
5425 echo "$as_me:5425: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5426 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5427 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5428 cat >>confdefs.h <<EOF
5429 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5435 cat >>confdefs.h <<\EOF
5439 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5441 cat >>confdefs.h <<EOF
5442 #define $cf_nculib_ROOT 1
5445 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5449 cf_ncuhdr_root=ncurses
5451 test -n "$cf_cv_curses_dir" && \
5452 test "$cf_cv_curses_dir" != "no" && { \
5454 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5455 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5457 while test "$cf_add_incdir" != /usr/include
5459 if test -d "$cf_add_incdir"
5462 if test -n "$CFLAGS$CPPFLAGS" ; then
5463 # a loop is needed to ensure we can add subdirs of existing dirs
5464 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5465 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5466 cf_have_incdir=yes; break
5471 if test "$cf_have_incdir" = no ; then
5472 if test "$cf_add_incdir" = /usr/local/include ; then
5473 if test "$GCC" = yes
5475 cf_save_CPPFLAGS=$CPPFLAGS
5477 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5478 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5480 cat >"conftest.$ac_ext" <<_ACEOF
5481 #line 5481 "configure"
5482 #include "confdefs.h"
5492 rm -f "conftest.$ac_objext"
5493 if { (eval echo "$as_me:5493: \"$ac_compile\"") >&5
5494 (eval $ac_compile) 2>&5
5496 echo "$as_me:5496: \$? = $ac_status" >&5
5497 (exit "$ac_status"); } &&
5498 { ac_try='test -s "conftest.$ac_objext"'
5499 { (eval echo "$as_me:5499: \"$ac_try\"") >&5
5502 echo "$as_me:5502: \$? = $ac_status" >&5
5503 (exit "$ac_status"); }; }; then
5506 echo "$as_me: failed program was:" >&5
5507 cat "conftest.$ac_ext" >&5
5510 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5511 CPPFLAGS=$cf_save_CPPFLAGS
5516 if test "$cf_have_incdir" = no ; then
5517 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5519 echo "${as_me:-configure}:5519: testing adding $cf_add_incdir to include-path ..." 1>&5
5521 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5523 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5524 test "$cf_top_incdir" = "$cf_add_incdir" && break
5525 cf_add_incdir="$cf_top_incdir"
5538 echo "$as_me:5538: checking for $cf_ncuhdr_root header in include-path" >&5
5539 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5540 if test "${cf_cv_ncurses_h+set}" = set; then
5541 echo $ECHO_N "(cached) $ECHO_C" >&6
5544 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5545 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5546 for cf_header in $cf_header_list
5549 cat >"conftest.$ac_ext" <<_ACEOF
5550 #line 5550 "configure"
5551 #include "confdefs.h"
5553 #include <$cf_header>
5558 #ifdef NCURSES_VERSION
5560 printf("%s\\n", NCURSES_VERSION);
5565 #error __NCURSES_H is not defined
5573 rm -f "conftest.$ac_objext"
5574 if { (eval echo "$as_me:5574: \"$ac_compile\"") >&5
5575 (eval $ac_compile) 2>&5
5577 echo "$as_me:5577: \$? = $ac_status" >&5
5578 (exit "$ac_status"); } &&
5579 { ac_try='test -s "conftest.$ac_objext"'
5580 { (eval echo "$as_me:5580: \"$ac_try\"") >&5
5583 echo "$as_me:5583: \$? = $ac_status" >&5
5584 (exit "$ac_status"); }; }; then
5585 cf_cv_ncurses_h=$cf_header
5588 echo "$as_me: failed program was:" >&5
5589 cat "conftest.$ac_ext" >&5
5592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5594 test "$cf_cv_ncurses_h" != no && break
5598 echo "$as_me:5598: result: $cf_cv_ncurses_h" >&5
5599 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5601 if test "$cf_cv_ncurses_h" != no ; then
5602 cf_cv_ncurses_header=$cf_cv_ncurses_h
5605 echo "$as_me:5605: checking for $cf_ncuhdr_root include-path" >&5
5606 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5607 if test "${cf_cv_ncurses_h2+set}" = set; then
5608 echo $ECHO_N "(cached) $ECHO_C" >&6
5611 test -n "$verbose" && echo
5615 # collect the current set of include-directories from compiler flags
5616 cf_header_path_list=""
5617 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5618 for cf_header_path in $CPPFLAGS $CFLAGS
5620 case "$cf_header_path" in
5622 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5624 test "x$cf_header_path" != "xNONE" && \
5625 test -d "$cf_header_path" && \
5627 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5628 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5629 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5630 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5631 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5632 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"
5635 cf_header_path_list="$cf_header_path_list $cf_search"
5641 # add the variations for the package we are looking for
5645 test "x$prefix" != "xNONE" && \
5646 test -d "$prefix" && \
5648 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5649 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5650 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5651 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5652 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5653 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5656 for cf_subdir_prefix in \
5665 test "x$cf_subdir_prefix" != "x$prefix" && \
5666 test -d "$cf_subdir_prefix" && \
5667 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5668 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5669 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5670 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5671 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5672 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5673 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"
5678 test "$includedir" != NONE && \
5679 test "$includedir" != "/usr/include" && \
5680 test -d "$includedir" && {
5681 test -d "$includedir" && cf_search="$cf_search $includedir"
5682 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5685 test "$oldincludedir" != NONE && \
5686 test "$oldincludedir" != "/usr/include" && \
5687 test -d "$oldincludedir" && {
5688 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5689 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5692 cf_search="$cf_search $cf_header_path_list"
5694 test -n "$verbose" && echo "search path $cf_search"
5695 cf_save2_CPPFLAGS="$CPPFLAGS"
5696 for cf_incdir in $cf_search
5699 if test -n "$cf_incdir" ; then
5700 for cf_add_incdir in $cf_incdir
5702 while test "$cf_add_incdir" != /usr/include
5704 if test -d "$cf_add_incdir"
5707 if test -n "$CFLAGS$CPPFLAGS" ; then
5708 # a loop is needed to ensure we can add subdirs of existing dirs
5709 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5710 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5711 cf_have_incdir=yes; break
5716 if test "$cf_have_incdir" = no ; then
5717 if test "$cf_add_incdir" = /usr/local/include ; then
5718 if test "$GCC" = yes
5720 cf_save_CPPFLAGS=$CPPFLAGS
5722 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5723 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5725 cat >"conftest.$ac_ext" <<_ACEOF
5726 #line 5726 "configure"
5727 #include "confdefs.h"
5737 rm -f "conftest.$ac_objext"
5738 if { (eval echo "$as_me:5738: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit "$ac_status"); } &&
5743 { ac_try='test -s "conftest.$ac_objext"'
5744 { (eval echo "$as_me:5744: \"$ac_try\"") >&5
5747 echo "$as_me:5747: \$? = $ac_status" >&5
5748 (exit "$ac_status"); }; }; then
5751 echo "$as_me: failed program was:" >&5
5752 cat "conftest.$ac_ext" >&5
5755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5756 CPPFLAGS=$cf_save_CPPFLAGS
5761 if test "$cf_have_incdir" = no ; then
5762 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5764 echo "${as_me:-configure}:5764: testing adding $cf_add_incdir to include-path ..." 1>&5
5766 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5768 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5769 test "$cf_top_incdir" = "$cf_add_incdir" && break
5770 cf_add_incdir="$cf_top_incdir"
5786 cat >"conftest.$ac_ext" <<_ACEOF
5787 #line 5787 "configure"
5788 #include "confdefs.h"
5790 #include <$cf_header>
5795 #ifdef NCURSES_VERSION
5797 printf("%s\\n", NCURSES_VERSION);
5802 #error __NCURSES_H is not defined
5810 rm -f "conftest.$ac_objext"
5811 if { (eval echo "$as_me:5811: \"$ac_compile\"") >&5
5812 (eval $ac_compile) 2>&5
5814 echo "$as_me:5814: \$? = $ac_status" >&5
5815 (exit "$ac_status"); } &&
5816 { ac_try='test -s "conftest.$ac_objext"'
5817 { (eval echo "$as_me:5817: \"$ac_try\"") >&5
5820 echo "$as_me:5820: \$? = $ac_status" >&5
5821 (exit "$ac_status"); }; }; then
5822 cf_cv_ncurses_h2=$cf_header
5825 echo "$as_me: failed program was:" >&5
5826 cat "conftest.$ac_ext" >&5
5829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5831 if test "$cf_cv_ncurses_h2" != no ; then
5832 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5833 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5836 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5838 CPPFLAGS="$cf_save2_CPPFLAGS"
5839 test "$cf_cv_ncurses_h2" != no && break
5841 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5841: error: not found" >&5
5842 echo "$as_me: error: not found" >&2;}
5843 { (exit 1); exit 1; }; }
5846 echo "$as_me:5846: result: $cf_cv_ncurses_h2" >&5
5847 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5849 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5850 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5851 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5852 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5855 if test -n "$cf_1st_incdir" ; then
5856 for cf_add_incdir in $cf_1st_incdir
5858 while test "$cf_add_incdir" != /usr/include
5860 if test -d "$cf_add_incdir"
5863 if test -n "$CFLAGS$CPPFLAGS" ; then
5864 # a loop is needed to ensure we can add subdirs of existing dirs
5865 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5866 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5867 cf_have_incdir=yes; break
5872 if test "$cf_have_incdir" = no ; then
5873 if test "$cf_add_incdir" = /usr/local/include ; then
5874 if test "$GCC" = yes
5876 cf_save_CPPFLAGS=$CPPFLAGS
5878 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5879 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5881 cat >"conftest.$ac_ext" <<_ACEOF
5882 #line 5882 "configure"
5883 #include "confdefs.h"
5893 rm -f "conftest.$ac_objext"
5894 if { (eval echo "$as_me:5894: \"$ac_compile\"") >&5
5895 (eval $ac_compile) 2>&5
5897 echo "$as_me:5897: \$? = $ac_status" >&5
5898 (exit "$ac_status"); } &&
5899 { ac_try='test -s "conftest.$ac_objext"'
5900 { (eval echo "$as_me:5900: \"$ac_try\"") >&5
5903 echo "$as_me:5903: \$? = $ac_status" >&5
5904 (exit "$ac_status"); }; }; then
5907 echo "$as_me: failed program was:" >&5
5908 cat "conftest.$ac_ext" >&5
5911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5912 CPPFLAGS=$cf_save_CPPFLAGS
5917 if test "$cf_have_incdir" = no ; then
5918 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5920 echo "${as_me:-configure}:5920: testing adding $cf_add_incdir to include-path ..." 1>&5
5922 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5924 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5925 test "$cf_top_incdir" = "$cf_add_incdir" && break
5926 cf_add_incdir="$cf_top_incdir"
5939 # Set definitions to allow ifdef'ing for ncurses.h
5941 case "$cf_cv_ncurses_header" in
5944 cat >>confdefs.h <<\EOF
5945 #define HAVE_NCURSES_H 1
5951 case "$cf_cv_ncurses_header" in
5952 (ncurses/curses.h|ncurses/ncurses.h)
5954 cat >>confdefs.h <<\EOF
5955 #define HAVE_NCURSES_NCURSES_H 1
5959 (ncursesw/curses.h|ncursesw/ncurses.h)
5961 cat >>confdefs.h <<\EOF
5962 #define HAVE_NCURSESW_NCURSES_H 1
5968 echo "$as_me:5968: checking for terminfo header" >&5
5969 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5970 if test "${cf_cv_term_header+set}" = set; then
5971 echo $ECHO_N "(cached) $ECHO_C" >&6
5974 case "${cf_cv_ncurses_header}" in
5975 (*/ncurses.h|*/ncursesw.h)
5976 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5979 cf_term_header=term.h
5983 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5985 cat >"conftest.$ac_ext" <<_ACEOF
5986 #line 5986 "configure"
5987 #include "confdefs.h"
5989 #include <${cf_cv_ncurses_header:-curses.h}>
5995 int x = auto_left_margin; (void)x
6000 rm -f "conftest.$ac_objext"
6001 if { (eval echo "$as_me:6001: \"$ac_compile\"") >&5
6002 (eval $ac_compile) 2>&5
6004 echo "$as_me:6004: \$? = $ac_status" >&5
6005 (exit "$ac_status"); } &&
6006 { ac_try='test -s "conftest.$ac_objext"'
6007 { (eval echo "$as_me:6007: \"$ac_try\"") >&5
6010 echo "$as_me:6010: \$? = $ac_status" >&5
6011 (exit "$ac_status"); }; }; then
6013 cf_cv_term_header="$cf_test"
6015 echo "$as_me: failed program was:" >&5
6016 cat "conftest.$ac_ext" >&5
6018 cf_cv_term_header=unknown
6021 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6022 test "$cf_cv_term_header" != unknown && break
6026 echo "$as_me:6026: result: $cf_cv_term_header" >&5
6027 echo "${ECHO_T}$cf_cv_term_header" >&6
6029 # Set definitions to allow ifdef'ing to accommodate subdirectories
6031 case "$cf_cv_term_header" in
6034 cat >>confdefs.h <<\EOF
6035 #define HAVE_TERM_H 1
6041 case "$cf_cv_term_header" in
6044 cat >>confdefs.h <<\EOF
6045 #define HAVE_NCURSES_TERM_H 1
6051 cat >>confdefs.h <<\EOF
6052 #define HAVE_NCURSESW_TERM_H 1
6058 # some applications need this, but should check for NCURSES_VERSION
6060 cat >>confdefs.h <<\EOF
6064 echo "$as_me:6064: checking for ncurses version" >&5
6065 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6066 if test "${cf_cv_ncurses_version+set}" = set; then
6067 echo $ECHO_N "(cached) $ECHO_C" >&6
6070 cf_cv_ncurses_version=no
6072 rm -f "$cf_tempfile"
6073 if test "$cross_compiling" = yes; then
6075 # This will not work if the preprocessor splits the line after the
6076 # Autoconf token. The 'unproto' program does that.
6077 cat > "conftest.$ac_ext" <<EOF
6078 #include <${cf_cv_ncurses_header:-curses.h}>
6080 #ifdef NCURSES_VERSION
6081 Autoconf NCURSES_VERSION
6089 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6090 { (eval echo "$as_me:6090: \"$cf_try\"") >&5
6093 echo "$as_me:6093: \$? = $ac_status" >&5
6094 (exit "$ac_status"); }
6095 if test -f conftest.out ; then
6096 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6097 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6102 cat >"conftest.$ac_ext" <<_ACEOF
6103 #line 6103 "configure"
6104 #include "confdefs.h"
6106 $ac_includes_default
6108 #include <${cf_cv_ncurses_header:-curses.h}>
6112 FILE *fp = fopen("$cf_tempfile", "w");
6113 #ifdef NCURSES_VERSION
6114 # ifdef NCURSES_VERSION_PATCH
6115 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6117 fprintf(fp, "%s\\n", NCURSES_VERSION);
6121 fprintf(fp, "old\\n");
6123 #error __NCURSES_H is not defined
6126 ${cf_cv_main_return:-return}(0);
6129 rm -f "conftest$ac_exeext"
6130 if { (eval echo "$as_me:6130: \"$ac_link\"") >&5
6131 (eval $ac_link) 2>&5
6133 echo "$as_me:6133: \$? = $ac_status" >&5
6134 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6135 { (eval echo "$as_me:6135: \"$ac_try\"") >&5
6138 echo "$as_me:6138: \$? = $ac_status" >&5
6139 (exit "$ac_status"); }; }; then
6141 cf_cv_ncurses_version=`cat $cf_tempfile`
6143 echo "$as_me: program exited with status $ac_status" >&5
6144 echo "$as_me: failed program was:" >&5
6145 cat "conftest.$ac_ext" >&5
6147 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6149 rm -f "$cf_tempfile"
6152 echo "$as_me:6152: result: $cf_cv_ncurses_version" >&5
6153 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6154 test "$cf_cv_ncurses_version" = no ||
6155 cat >>confdefs.h <<\EOF
6159 cf_nculib_root=ncurses
6160 # This works, except for the special case where we find gpm, but
6161 # ncurses is in a nonstandard location via $LIBS, and we really want
6164 cf_ncurses_SAVE="$LIBS"
6165 echo "$as_me:6165: checking for Gpm_Open in -lgpm" >&5
6166 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6167 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6168 echo $ECHO_N "(cached) $ECHO_C" >&6
6170 ac_check_lib_save_LIBS=$LIBS
6172 cat >"conftest.$ac_ext" <<_ACEOF
6173 #line 6173 "configure"
6174 #include "confdefs.h"
6176 /* Override any gcc2 internal prototype to avoid an error. */
6180 /* We use char because int might match the return type of a gcc2
6181 builtin and then its argument prototype would still apply. */
6191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193 (eval $ac_link) 2>&5
6195 echo "$as_me:6195: \$? = $ac_status" >&5
6196 (exit "$ac_status"); } &&
6197 { ac_try='test -s "conftest$ac_exeext"'
6198 { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6201 echo "$as_me:6201: \$? = $ac_status" >&5
6202 (exit "$ac_status"); }; }; then
6203 ac_cv_lib_gpm_Gpm_Open=yes
6205 echo "$as_me: failed program was:" >&5
6206 cat "conftest.$ac_ext" >&5
6207 ac_cv_lib_gpm_Gpm_Open=no
6209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6210 LIBS=$ac_check_lib_save_LIBS
6212 echo "$as_me:6212: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6213 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6214 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6215 echo "$as_me:6215: checking for initscr in -lgpm" >&5
6216 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6217 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6218 echo $ECHO_N "(cached) $ECHO_C" >&6
6220 ac_check_lib_save_LIBS=$LIBS
6222 cat >"conftest.$ac_ext" <<_ACEOF
6223 #line 6223 "configure"
6224 #include "confdefs.h"
6226 /* Override any gcc2 internal prototype to avoid an error. */
6230 /* We use char because int might match the return type of a gcc2
6231 builtin and then its argument prototype would still apply. */
6241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6242 if { (eval echo "$as_me:6242: \"$ac_link\"") >&5
6243 (eval $ac_link) 2>&5
6245 echo "$as_me:6245: \$? = $ac_status" >&5
6246 (exit "$ac_status"); } &&
6247 { ac_try='test -s "conftest$ac_exeext"'
6248 { (eval echo "$as_me:6248: \"$ac_try\"") >&5
6251 echo "$as_me:6251: \$? = $ac_status" >&5
6252 (exit "$ac_status"); }; }; then
6253 ac_cv_lib_gpm_initscr=yes
6255 echo "$as_me: failed program was:" >&5
6256 cat "conftest.$ac_ext" >&5
6257 ac_cv_lib_gpm_initscr=no
6259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6260 LIBS=$ac_check_lib_save_LIBS
6262 echo "$as_me:6262: result: $ac_cv_lib_gpm_initscr" >&5
6263 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6264 if test "$ac_cv_lib_gpm_initscr" = yes; then
6265 LIBS="$cf_ncurses_SAVE"
6267 cf_ncurses_LIBS="-lgpm"
6274 # This is only necessary if you are linking against an obsolete
6275 # version of ncurses (but it should do no harm, since it is static).
6276 if test "$cf_nculib_root" = ncurses ; then
6277 echo "$as_me:6277: checking for tgoto in -lmytinfo" >&5
6278 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6279 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6280 echo $ECHO_N "(cached) $ECHO_C" >&6
6282 ac_check_lib_save_LIBS=$LIBS
6283 LIBS="-lmytinfo $LIBS"
6284 cat >"conftest.$ac_ext" <<_ACEOF
6285 #line 6285 "configure"
6286 #include "confdefs.h"
6288 /* Override any gcc2 internal prototype to avoid an error. */
6292 /* We use char because int might match the return type of a gcc2
6293 builtin and then its argument prototype would still apply. */
6303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6304 if { (eval echo "$as_me:6304: \"$ac_link\"") >&5
6305 (eval $ac_link) 2>&5
6307 echo "$as_me:6307: \$? = $ac_status" >&5
6308 (exit "$ac_status"); } &&
6309 { ac_try='test -s "conftest$ac_exeext"'
6310 { (eval echo "$as_me:6310: \"$ac_try\"") >&5
6313 echo "$as_me:6313: \$? = $ac_status" >&5
6314 (exit "$ac_status"); }; }; then
6315 ac_cv_lib_mytinfo_tgoto=yes
6317 echo "$as_me: failed program was:" >&5
6318 cat "conftest.$ac_ext" >&5
6319 ac_cv_lib_mytinfo_tgoto=no
6321 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6322 LIBS=$ac_check_lib_save_LIBS
6324 echo "$as_me:6324: result: $ac_cv_lib_mytinfo_tgoto" >&5
6325 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6326 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6327 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6337 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6339 for cf_add_1lib in $cf_add_0lib; do
6340 for cf_add_2lib in $cf_add_libs; do
6341 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6346 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6350 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6356 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6358 for cf_add_1lib in $cf_add_0lib; do
6359 for cf_add_2lib in $cf_add_libs; do
6360 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6365 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6371 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6373 echo "$as_me:6373: checking for initscr" >&5
6374 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6375 if test "${ac_cv_func_initscr+set}" = set; then
6376 echo $ECHO_N "(cached) $ECHO_C" >&6
6378 cat >"conftest.$ac_ext" <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #define initscr autoconf_temporary
6382 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6389 /* We use char because int might match the return type of a gcc2
6390 builtin and then its argument prototype would still apply. */
6391 char initscr (void);
6397 /* The GNU C library defines stubs for functions which it implements
6398 to always fail with ENOSYS. Some functions are actually named
6399 something starting with __ and the normal name is an alias. */
6400 #if defined (__stub_initscr) || defined (__stub___initscr)
6401 #error found stub for initscr
6409 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6410 if { (eval echo "$as_me:6410: \"$ac_link\"") >&5
6411 (eval $ac_link) 2>&5
6413 echo "$as_me:6413: \$? = $ac_status" >&5
6414 (exit "$ac_status"); } &&
6415 { ac_try='test -s "conftest$ac_exeext"'
6416 { (eval echo "$as_me:6416: \"$ac_try\"") >&5
6419 echo "$as_me:6419: \$? = $ac_status" >&5
6420 (exit "$ac_status"); }; }; then
6421 ac_cv_func_initscr=yes
6423 echo "$as_me: failed program was:" >&5
6424 cat "conftest.$ac_ext" >&5
6425 ac_cv_func_initscr=no
6427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6429 echo "$as_me:6429: result: $ac_cv_func_initscr" >&5
6430 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6431 if test "$ac_cv_func_initscr" = yes; then
6432 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6435 cf_save_LIBS="$LIBS"
6436 echo "$as_me:6436: checking for initscr in -l$cf_nculib_root" >&5
6437 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6438 LIBS="-l$cf_nculib_root $LIBS"
6439 cat >"conftest.$ac_ext" <<_ACEOF
6440 #line 6440 "configure"
6441 #include "confdefs.h"
6442 #include <${cf_cv_ncurses_header:-curses.h}>
6451 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6452 if { (eval echo "$as_me:6452: \"$ac_link\"") >&5
6453 (eval $ac_link) 2>&5
6455 echo "$as_me:6455: \$? = $ac_status" >&5
6456 (exit "$ac_status"); } &&
6457 { ac_try='test -s "conftest$ac_exeext"'
6458 { (eval echo "$as_me:6458: \"$ac_try\"") >&5
6461 echo "$as_me:6461: \$? = $ac_status" >&5
6462 (exit "$ac_status"); }; }; then
6463 echo "$as_me:6463: result: yes" >&5
6464 echo "${ECHO_T}yes" >&6
6465 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6468 echo "$as_me: failed program was:" >&5
6469 cat "conftest.$ac_ext" >&5
6470 echo "$as_me:6470: result: no" >&5
6471 echo "${ECHO_T}no" >&6
6474 cf_library_path_list=""
6475 if test -n "${LDFLAGS}${LIBS}" ; then
6476 for cf_library_path in $LDFLAGS $LIBS
6478 case "$cf_library_path" in
6480 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6482 test "x$cf_library_path" != "xNONE" && \
6483 test -d "$cf_library_path" && \
6485 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6486 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6487 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6488 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6489 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6490 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"
6493 cf_library_path_list="$cf_library_path_list $cf_search"
6501 test "x$prefix" != "xNONE" && \
6502 test -d "$prefix" && \
6504 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6505 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6506 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6507 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6508 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6509 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6512 for cf_subdir_prefix in \
6521 test "x$cf_subdir_prefix" != "x$prefix" && \
6522 test -d "$cf_subdir_prefix" && \
6523 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6524 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6525 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6526 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6527 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6528 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6529 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"
6534 cf_search="$cf_library_path_list $cf_search"
6536 for cf_libdir in $cf_search
6538 echo "$as_me:6538: checking for -l$cf_nculib_root in $cf_libdir" >&5
6539 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6540 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6541 cat >"conftest.$ac_ext" <<_ACEOF
6542 #line 6542 "configure"
6543 #include "confdefs.h"
6544 #include <${cf_cv_ncurses_header:-curses.h}>
6553 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6554 if { (eval echo "$as_me:6554: \"$ac_link\"") >&5
6555 (eval $ac_link) 2>&5
6557 echo "$as_me:6557: \$? = $ac_status" >&5
6558 (exit "$ac_status"); } &&
6559 { ac_try='test -s "conftest$ac_exeext"'
6560 { (eval echo "$as_me:6560: \"$ac_try\"") >&5
6563 echo "$as_me:6563: \$? = $ac_status" >&5
6564 (exit "$ac_status"); }; }; then
6565 echo "$as_me:6565: result: yes" >&5
6566 echo "${ECHO_T}yes" >&6
6567 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6570 echo "$as_me: failed program was:" >&5
6571 cat "conftest.$ac_ext" >&5
6572 echo "$as_me:6572: result: no" >&5
6573 echo "${ECHO_T}no" >&6
6574 LIBS="$cf_save_LIBS"
6576 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6580 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6584 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6586 if test "$cf_found_library" = no ; then
6587 { { echo "$as_me:6587: error: Cannot link $cf_nculib_root library" >&5
6588 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6589 { (exit 1); exit 1; }; }
6594 if test -n "$cf_ncurses_LIBS" ; then
6595 echo "$as_me:6595: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6596 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6597 cf_ncurses_SAVE="$LIBS"
6598 for p in $cf_ncurses_LIBS ; do
6599 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6600 if test "$q" != "$LIBS" ; then
6604 cat >"conftest.$ac_ext" <<_ACEOF
6605 #line 6605 "configure"
6606 #include "confdefs.h"
6607 #include <${cf_cv_ncurses_header:-curses.h}>
6611 initscr(); mousemask(0,0); tigetstr((char *)0);
6616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6617 if { (eval echo "$as_me:6617: \"$ac_link\"") >&5
6618 (eval $ac_link) 2>&5
6620 echo "$as_me:6620: \$? = $ac_status" >&5
6621 (exit "$ac_status"); } &&
6622 { ac_try='test -s "conftest$ac_exeext"'
6623 { (eval echo "$as_me:6623: \"$ac_try\"") >&5
6626 echo "$as_me:6626: \$? = $ac_status" >&5
6627 (exit "$ac_status"); }; }; then
6628 echo "$as_me:6628: result: yes" >&5
6629 echo "${ECHO_T}yes" >&6
6631 echo "$as_me: failed program was:" >&5
6632 cat "conftest.$ac_ext" >&5
6633 echo "$as_me:6633: result: no" >&5
6634 echo "${ECHO_T}no" >&6
6635 LIBS="$cf_ncurses_SAVE"
6637 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6640 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6642 cat >>confdefs.h <<EOF
6643 #define $cf_nculib_ROOT 1
6651 echo "$as_me:6651: checking if you want wide-character code" >&5
6652 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6654 # Check whether --enable-widec or --disable-widec was given.
6655 if test "${enable_widec+set}" = set; then
6656 enableval="$enable_widec"
6657 with_widec=$enableval
6661 echo "$as_me:6661: result: $with_widec" >&5
6662 echo "${ECHO_T}$with_widec" >&6
6663 if test "$with_widec" = yes ; then
6665 for ac_header in wchar.h
6667 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6668 echo "$as_me:6668: checking for $ac_header" >&5
6669 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6670 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6671 echo $ECHO_N "(cached) $ECHO_C" >&6
6673 cat >"conftest.$ac_ext" <<_ACEOF
6674 #line 6674 "configure"
6675 #include "confdefs.h"
6676 #include <$ac_header>
6678 if { (eval echo "$as_me:6678: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6679 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6681 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6683 cat conftest.err >&5
6684 echo "$as_me:6684: \$? = $ac_status" >&5
6685 (exit "$ac_status"); } >/dev/null; then
6686 if test -s conftest.err; then
6687 ac_cpp_err=$ac_c_preproc_warn_flag
6694 if test -z "$ac_cpp_err"; then
6695 eval "$as_ac_Header=yes"
6697 echo "$as_me: failed program was:" >&5
6698 cat "conftest.$ac_ext" >&5
6699 eval "$as_ac_Header=no"
6701 rm -f conftest.err "conftest.$ac_ext"
6703 echo "$as_me:6703: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6704 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6705 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6706 cat >>confdefs.h <<EOF
6707 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6713 echo "$as_me:6713: checking for multibyte character support" >&5
6714 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6715 if test "${cf_cv_utf8_lib+set}" = set; then
6716 echo $ECHO_N "(cached) $ECHO_C" >&6
6719 cf_save_LIBS="$LIBS"
6720 cat >"conftest.$ac_ext" <<_ACEOF
6721 #line 6721 "configure"
6722 #include "confdefs.h"
6724 $ac_includes_default
6737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6738 if { (eval echo "$as_me:6738: \"$ac_link\"") >&5
6739 (eval $ac_link) 2>&5
6741 echo "$as_me:6741: \$? = $ac_status" >&5
6742 (exit "$ac_status"); } &&
6743 { ac_try='test -s "conftest$ac_exeext"'
6744 { (eval echo "$as_me:6744: \"$ac_try\"") >&5
6747 echo "$as_me:6747: \$? = $ac_status" >&5
6748 (exit "$ac_status"); }; }; then
6751 echo "$as_me: failed program was:" >&5
6752 cat "conftest.$ac_ext" >&5
6754 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6755 # will be set on completion of the AC_TRY_LINK below.
6756 cf_cv_header_path_utf8=
6757 cf_cv_library_path_utf8=
6759 echo "${as_me:-configure}:6759: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6761 cf_save_LIBS="$LIBS"
6763 cat >"conftest.$ac_ext" <<_ACEOF
6764 #line 6764 "configure"
6765 #include "confdefs.h"
6767 #include <libutf8.h>
6776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6777 if { (eval echo "$as_me:6777: \"$ac_link\"") >&5
6778 (eval $ac_link) 2>&5
6780 echo "$as_me:6780: \$? = $ac_status" >&5
6781 (exit "$ac_status"); } &&
6782 { ac_try='test -s "conftest$ac_exeext"'
6783 { (eval echo "$as_me:6783: \"$ac_try\"") >&5
6786 echo "$as_me:6786: \$? = $ac_status" >&5
6787 (exit "$ac_status"); }; }; then
6789 cf_cv_find_linkage_utf8=yes
6790 cf_cv_header_path_utf8=/usr/include
6791 cf_cv_library_path_utf8=/usr/lib
6794 echo "$as_me: failed program was:" >&5
6795 cat "conftest.$ac_ext" >&5
6797 LIBS="-lutf8 $cf_save_LIBS"
6799 cat >"conftest.$ac_ext" <<_ACEOF
6800 #line 6800 "configure"
6801 #include "confdefs.h"
6803 #include <libutf8.h>
6812 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6813 if { (eval echo "$as_me:6813: \"$ac_link\"") >&5
6814 (eval $ac_link) 2>&5
6816 echo "$as_me:6816: \$? = $ac_status" >&5
6817 (exit "$ac_status"); } &&
6818 { ac_try='test -s "conftest$ac_exeext"'
6819 { (eval echo "$as_me:6819: \"$ac_try\"") >&5
6822 echo "$as_me:6822: \$? = $ac_status" >&5
6823 (exit "$ac_status"); }; }; then
6825 cf_cv_find_linkage_utf8=yes
6826 cf_cv_header_path_utf8=/usr/include
6827 cf_cv_library_path_utf8=/usr/lib
6828 cf_cv_library_file_utf8="-lutf8"
6831 echo "$as_me: failed program was:" >&5
6832 cat "conftest.$ac_ext" >&5
6834 cf_cv_find_linkage_utf8=no
6835 LIBS="$cf_save_LIBS"
6837 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6839 echo "${as_me:-configure}:6839: testing find linkage for utf8 library ..." 1>&5
6841 echo "${as_me:-configure}:6841: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6843 cf_save_CPPFLAGS="$CPPFLAGS"
6844 cf_test_CPPFLAGS="$CPPFLAGS"
6848 # collect the current set of include-directories from compiler flags
6849 cf_header_path_list=""
6850 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6851 for cf_header_path in $CPPFLAGS $CFLAGS
6853 case "$cf_header_path" in
6855 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6857 test "x$cf_header_path" != "xNONE" && \
6858 test -d "$cf_header_path" && \
6860 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6861 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6862 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6863 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6864 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6865 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6868 cf_header_path_list="$cf_header_path_list $cf_search"
6874 # add the variations for the package we are looking for
6878 test "x$prefix" != "xNONE" && \
6879 test -d "$prefix" && \
6881 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6882 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6883 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6884 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6885 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6886 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6889 for cf_subdir_prefix in \
6898 test "x$cf_subdir_prefix" != "x$prefix" && \
6899 test -d "$cf_subdir_prefix" && \
6900 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6901 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6902 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6903 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6904 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6905 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6906 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6911 test "$includedir" != NONE && \
6912 test "$includedir" != "/usr/include" && \
6913 test -d "$includedir" && {
6914 test -d "$includedir" && cf_search="$cf_search $includedir"
6915 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6918 test "$oldincludedir" != NONE && \
6919 test "$oldincludedir" != "/usr/include" && \
6920 test -d "$oldincludedir" && {
6921 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6922 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6925 cf_search="$cf_search $cf_header_path_list"
6927 for cf_cv_header_path_utf8 in $cf_search
6929 if test -d "$cf_cv_header_path_utf8" ; then
6930 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6932 echo "${as_me:-configure}:6932: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6934 CPPFLAGS="$cf_save_CPPFLAGS"
6936 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6937 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6939 cat >"conftest.$ac_ext" <<_ACEOF
6940 #line 6940 "configure"
6941 #include "confdefs.h"
6943 #include <libutf8.h>
6952 rm -f "conftest.$ac_objext"
6953 if { (eval echo "$as_me:6953: \"$ac_compile\"") >&5
6954 (eval $ac_compile) 2>&5
6956 echo "$as_me:6956: \$? = $ac_status" >&5
6957 (exit "$ac_status"); } &&
6958 { ac_try='test -s "conftest.$ac_objext"'
6959 { (eval echo "$as_me:6959: \"$ac_try\"") >&5
6962 echo "$as_me:6962: \$? = $ac_status" >&5
6963 (exit "$ac_status"); }; }; then
6965 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6967 echo "${as_me:-configure}:6967: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6969 cf_cv_find_linkage_utf8=maybe
6970 cf_test_CPPFLAGS="$CPPFLAGS"
6973 echo "$as_me: failed program was:" >&5
6974 cat "conftest.$ac_ext" >&5
6976 CPPFLAGS="$cf_save_CPPFLAGS"
6979 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6983 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6985 echo "${as_me:-configure}:6985: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6987 cf_save_LIBS="$LIBS"
6988 cf_save_LDFLAGS="$LDFLAGS"
6990 if test "$cf_cv_find_linkage_utf8" != yes ; then
6993 cf_library_path_list=""
6994 if test -n "${LDFLAGS}${LIBS}" ; then
6995 for cf_library_path in $LDFLAGS $LIBS
6997 case "$cf_library_path" in
6999 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7001 test "x$cf_library_path" != "xNONE" && \
7002 test -d "$cf_library_path" && \
7004 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7005 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7006 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7007 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7008 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7009 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7012 cf_library_path_list="$cf_library_path_list $cf_search"
7020 test "x$prefix" != "xNONE" && \
7021 test -d "$prefix" && \
7023 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7024 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7025 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7026 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7027 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7028 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7031 for cf_subdir_prefix in \
7040 test "x$cf_subdir_prefix" != "x$prefix" && \
7041 test -d "$cf_subdir_prefix" && \
7042 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7043 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7044 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7045 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7046 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7047 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7048 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7053 cf_search="$cf_library_path_list $cf_search"
7055 for cf_cv_library_path_utf8 in $cf_search
7057 if test -d "$cf_cv_library_path_utf8" ; then
7058 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7060 echo "${as_me:-configure}:7060: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7062 CPPFLAGS="$cf_test_CPPFLAGS"
7063 LIBS="-lutf8 $cf_save_LIBS"
7064 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7065 cat >"conftest.$ac_ext" <<_ACEOF
7066 #line 7066 "configure"
7067 #include "confdefs.h"
7069 #include <libutf8.h>
7078 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7079 if { (eval echo "$as_me:7079: \"$ac_link\"") >&5
7080 (eval $ac_link) 2>&5
7082 echo "$as_me:7082: \$? = $ac_status" >&5
7083 (exit "$ac_status"); } &&
7084 { ac_try='test -s "conftest$ac_exeext"'
7085 { (eval echo "$as_me:7085: \"$ac_try\"") >&5
7088 echo "$as_me:7088: \$? = $ac_status" >&5
7089 (exit "$ac_status"); }; }; then
7091 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7093 echo "${as_me:-configure}:7093: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7095 cf_cv_find_linkage_utf8=yes
7096 cf_cv_library_file_utf8="-lutf8"
7099 echo "$as_me: failed program was:" >&5
7100 cat "conftest.$ac_ext" >&5
7102 CPPFLAGS="$cf_save_CPPFLAGS"
7103 LIBS="$cf_save_LIBS"
7104 LDFLAGS="$cf_save_LDFLAGS"
7107 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7110 CPPFLAGS="$cf_save_CPPFLAGS"
7111 LDFLAGS="$cf_save_LDFLAGS"
7115 cf_cv_find_linkage_utf8=no
7119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7122 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7124 LIBS="$cf_save_LIBS"
7126 if test "$cf_cv_find_linkage_utf8" = yes ; then
7127 cf_cv_utf8_lib=add-on
7133 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7135 echo "$as_me:7135: result: $cf_cv_utf8_lib" >&5
7136 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7138 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7140 if test "$cf_cv_utf8_lib" = "add-on" ; then
7142 cat >>confdefs.h <<\EOF
7143 #define HAVE_LIBUTF8_H 1
7146 if test -n "$cf_cv_header_path_utf8" ; then
7147 for cf_add_incdir in $cf_cv_header_path_utf8
7149 while test "$cf_add_incdir" != /usr/include
7151 if test -d "$cf_add_incdir"
7154 if test -n "$CFLAGS$CPPFLAGS" ; then
7155 # a loop is needed to ensure we can add subdirs of existing dirs
7156 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7157 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7158 cf_have_incdir=yes; break
7163 if test "$cf_have_incdir" = no ; then
7164 if test "$cf_add_incdir" = /usr/local/include ; then
7165 if test "$GCC" = yes
7167 cf_save_CPPFLAGS=$CPPFLAGS
7169 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7170 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7172 cat >"conftest.$ac_ext" <<_ACEOF
7173 #line 7173 "configure"
7174 #include "confdefs.h"
7184 rm -f "conftest.$ac_objext"
7185 if { (eval echo "$as_me:7185: \"$ac_compile\"") >&5
7186 (eval $ac_compile) 2>&5
7188 echo "$as_me:7188: \$? = $ac_status" >&5
7189 (exit "$ac_status"); } &&
7190 { ac_try='test -s "conftest.$ac_objext"'
7191 { (eval echo "$as_me:7191: \"$ac_try\"") >&5
7194 echo "$as_me:7194: \$? = $ac_status" >&5
7195 (exit "$ac_status"); }; }; then
7198 echo "$as_me: failed program was:" >&5
7199 cat "conftest.$ac_ext" >&5
7202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7203 CPPFLAGS=$cf_save_CPPFLAGS
7208 if test "$cf_have_incdir" = no ; then
7209 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7211 echo "${as_me:-configure}:7211: testing adding $cf_add_incdir to include-path ..." 1>&5
7213 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7215 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7216 test "$cf_top_incdir" = "$cf_add_incdir" && break
7217 cf_add_incdir="$cf_top_incdir"
7228 if test -n "$cf_cv_library_path_utf8" ; then
7229 for cf_add_libdir in $cf_cv_library_path_utf8
7231 if test "$cf_add_libdir" = /usr/lib ; then
7233 elif test -d "$cf_add_libdir"
7236 if test -n "$LDFLAGS$LIBS" ; then
7237 # a loop is needed to ensure we can add subdirs of existing dirs
7238 for cf_test_libdir in $LDFLAGS $LIBS ; do
7239 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7240 cf_have_libdir=yes; break
7244 if test "$cf_have_libdir" = no ; then
7245 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7247 echo "${as_me:-configure}:7247: testing adding $cf_add_libdir to library-path ..." 1>&5
7249 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7258 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7260 for cf_add_1lib in $cf_add_0lib; do
7261 for cf_add_2lib in $cf_add_libs; do
7262 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7267 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7273 cf_ncuconfig_root=ncursesw
7274 cf_have_ncuconfig=no
7276 if test "x${PKG_CONFIG:=none}" != xnone; then
7277 echo "$as_me:7277: checking pkg-config for $cf_ncuconfig_root" >&5
7278 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7279 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7280 echo "$as_me:7280: result: yes" >&5
7281 echo "${ECHO_T}yes" >&6
7283 echo "$as_me:7283: checking if the $cf_ncuconfig_root package files work" >&5
7284 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7285 cf_have_ncuconfig=unknown
7287 cf_save_CFLAGS="$CFLAGS"
7288 cf_save_CPPFLAGS="$CPPFLAGS"
7289 cf_save_LIBS="$LIBS"
7291 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7292 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7294 # while -W for passing linker flags is prevalent, it is not "standard".
7295 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7296 # incompatible _and_ non-standard -W option which gives an error. Work
7297 # around that pitfall.
7298 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7304 cf_new_extra_cppflags=
7306 for cf_add_cflags in $cf_pkg_cflags
7308 case "$cf_fix_cppflags" in
7310 case "$cf_add_cflags" in
7311 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7312 case "$cf_add_cflags" in
7314 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7316 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7317 && test -z "${cf_tst_cflags}" \
7318 && cf_fix_cppflags=yes
7320 if test "$cf_fix_cppflags" = yes ; then
7322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7326 elif test "${cf_tst_cflags}" = "\"'" ; then
7328 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7329 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7339 case "$cf_add_cflags" in
7341 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7343 CPPFLAGS=`echo "$CPPFLAGS" | \
7344 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7345 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7350 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7351 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7358 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7359 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7366 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7367 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7369 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7372 && test -z "${cf_tst_cflags}" \
7373 && cf_fix_cppflags=no
7378 if test -n "$cf_new_cflags" ; then
7380 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7381 CFLAGS="${CFLAGS}$cf_new_cflags"
7385 if test -n "$cf_new_cppflags" ; then
7387 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7388 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7392 if test -n "$cf_new_extra_cppflags" ; then
7394 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7395 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7402 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7404 for cf_add_1lib in $cf_add_0lib; do
7405 for cf_add_2lib in $cf_add_libs; do
7406 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7411 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7415 cat >"conftest.$ac_ext" <<_ACEOF
7416 #line 7416 "configure"
7417 #include "confdefs.h"
7418 #include <${cf_cv_ncurses_header:-curses.h}>
7422 initscr(); mousemask(0,0); tigetstr((char *)0);
7427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7428 if { (eval echo "$as_me:7428: \"$ac_link\"") >&5
7429 (eval $ac_link) 2>&5
7431 echo "$as_me:7431: \$? = $ac_status" >&5
7432 (exit "$ac_status"); } &&
7433 { ac_try='test -s "conftest$ac_exeext"'
7434 { (eval echo "$as_me:7434: \"$ac_try\"") >&5
7437 echo "$as_me:7437: \$? = $ac_status" >&5
7438 (exit "$ac_status"); }; }; then
7439 if test "$cross_compiling" = yes; then
7440 cf_test_ncuconfig=maybe
7442 cat >"conftest.$ac_ext" <<_ACEOF
7443 #line 7443 "configure"
7444 #include "confdefs.h"
7445 #include <${cf_cv_ncurses_header:-curses.h}>
7447 { const char *xx = curses_version(); return (xx == 0); }
7449 rm -f "conftest$ac_exeext"
7450 if { (eval echo "$as_me:7450: \"$ac_link\"") >&5
7451 (eval $ac_link) 2>&5
7453 echo "$as_me:7453: \$? = $ac_status" >&5
7454 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7455 { (eval echo "$as_me:7455: \"$ac_try\"") >&5
7458 echo "$as_me:7458: \$? = $ac_status" >&5
7459 (exit "$ac_status"); }; }; then
7460 cf_test_ncuconfig=yes
7462 echo "$as_me: program exited with status $ac_status" >&5
7463 echo "$as_me: failed program was:" >&5
7464 cat "conftest.$ac_ext" >&5
7465 cf_test_ncuconfig=no
7467 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7470 echo "$as_me: failed program was:" >&5
7471 cat "conftest.$ac_ext" >&5
7472 cf_test_ncuconfig=no
7474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7476 CFLAGS="$cf_save_CFLAGS"
7477 CPPFLAGS="$cf_save_CPPFLAGS"
7478 LIBS="$cf_save_LIBS"
7480 if test "x$cf_test_ncuconfig" != xyes; then
7481 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7482 cf_pkg_cflags="$cf_temp"
7483 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7484 cf_pkg_libs="$cf_temp"
7489 for cf_add_cflags in $cf_pkg_cflags
7491 case "x$cf_add_cflags" in
7494 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7497 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'`
7498 test "$CFLAGS" != "$cf_old_cflag" || break
7500 CFLAGS="$cf_old_cflag"
7503 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7506 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'`
7507 test "$CPPFLAGS" != "$cf_old_cflag" || break
7509 CPPFLAGS="$cf_old_cflag"
7518 cf_new_extra_cppflags=
7520 for cf_add_cflags in $cf_add_cflags
7522 case "$cf_fix_cppflags" in
7524 case "$cf_add_cflags" in
7525 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7526 case "$cf_add_cflags" in
7528 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7530 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7531 && test -z "${cf_tst_cflags}" \
7532 && cf_fix_cppflags=yes
7534 if test "$cf_fix_cppflags" = yes ; then
7536 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7537 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7540 elif test "${cf_tst_cflags}" = "\"'" ; then
7542 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7543 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7553 case "$cf_add_cflags" in
7555 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7557 CPPFLAGS=`echo "$CPPFLAGS" | \
7558 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7559 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7564 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7565 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7572 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7573 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7580 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7581 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7583 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7585 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7586 && test -z "${cf_tst_cflags}" \
7587 && cf_fix_cppflags=no
7592 if test -n "$cf_new_cflags" ; then
7594 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7595 CFLAGS="${CFLAGS}$cf_new_cflags"
7599 if test -n "$cf_new_cppflags" ; then
7601 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7602 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7606 if test -n "$cf_new_extra_cppflags" ; then
7608 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7609 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7618 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7620 for cf_add_1lib in $cf_add_0lib; do
7621 for cf_add_2lib in $cf_add_libs; do
7622 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7627 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7631 cat >"conftest.$ac_ext" <<_ACEOF
7632 #line 7632 "configure"
7633 #include "confdefs.h"
7634 #include <${cf_cv_ncurses_header:-curses.h}>
7638 initscr(); mousemask(0,0); tigetstr((char *)0);
7643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7644 if { (eval echo "$as_me:7644: \"$ac_link\"") >&5
7645 (eval $ac_link) 2>&5
7647 echo "$as_me:7647: \$? = $ac_status" >&5
7648 (exit "$ac_status"); } &&
7649 { ac_try='test -s "conftest$ac_exeext"'
7650 { (eval echo "$as_me:7650: \"$ac_try\"") >&5
7653 echo "$as_me:7653: \$? = $ac_status" >&5
7654 (exit "$ac_status"); }; }; then
7655 if test "$cross_compiling" = yes; then
7656 cf_have_ncuconfig=maybe
7658 cat >"conftest.$ac_ext" <<_ACEOF
7659 #line 7659 "configure"
7660 #include "confdefs.h"
7661 #include <${cf_cv_ncurses_header:-curses.h}>
7663 { const char *xx = curses_version(); return (xx == 0); }
7665 rm -f "conftest$ac_exeext"
7666 if { (eval echo "$as_me:7666: \"$ac_link\"") >&5
7667 (eval $ac_link) 2>&5
7669 echo "$as_me:7669: \$? = $ac_status" >&5
7670 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7671 { (eval echo "$as_me:7671: \"$ac_try\"") >&5
7674 echo "$as_me:7674: \$? = $ac_status" >&5
7675 (exit "$ac_status"); }; }; then
7676 cf_have_ncuconfig=yes
7678 echo "$as_me: program exited with status $ac_status" >&5
7679 echo "$as_me: failed program was:" >&5
7680 cat "conftest.$ac_ext" >&5
7681 cf_have_ncuconfig=no
7683 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7686 echo "$as_me: failed program was:" >&5
7687 cat "conftest.$ac_ext" >&5
7688 cf_have_ncuconfig=no
7690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7691 echo "$as_me:7691: result: $cf_have_ncuconfig" >&5
7692 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7693 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7694 if test "$cf_have_ncuconfig" != "yes"
7696 CPPFLAGS="$cf_save_CPPFLAGS"
7697 LIBS="$cf_save_LIBS"
7698 NCURSES_CONFIG_PKG=none
7701 cat >>confdefs.h <<\EOF
7705 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7707 echo "$as_me:7707: checking for terminfo header" >&5
7708 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7709 if test "${cf_cv_term_header+set}" = set; then
7710 echo $ECHO_N "(cached) $ECHO_C" >&6
7713 case "${cf_cv_ncurses_header}" in
7714 (*/ncurses.h|*/ncursesw.h)
7715 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7718 cf_term_header=term.h
7722 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7724 cat >"conftest.$ac_ext" <<_ACEOF
7725 #line 7725 "configure"
7726 #include "confdefs.h"
7728 #include <${cf_cv_ncurses_header:-curses.h}>
7734 int x = auto_left_margin; (void)x
7739 rm -f "conftest.$ac_objext"
7740 if { (eval echo "$as_me:7740: \"$ac_compile\"") >&5
7741 (eval $ac_compile) 2>&5
7743 echo "$as_me:7743: \$? = $ac_status" >&5
7744 (exit "$ac_status"); } &&
7745 { ac_try='test -s "conftest.$ac_objext"'
7746 { (eval echo "$as_me:7746: \"$ac_try\"") >&5
7749 echo "$as_me:7749: \$? = $ac_status" >&5
7750 (exit "$ac_status"); }; }; then
7752 cf_cv_term_header="$cf_test"
7754 echo "$as_me: failed program was:" >&5
7755 cat "conftest.$ac_ext" >&5
7757 cf_cv_term_header=unknown
7760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7761 test "$cf_cv_term_header" != unknown && break
7765 echo "$as_me:7765: result: $cf_cv_term_header" >&5
7766 echo "${ECHO_T}$cf_cv_term_header" >&6
7768 # Set definitions to allow ifdef'ing to accommodate subdirectories
7770 case "$cf_cv_term_header" in
7773 cat >>confdefs.h <<\EOF
7774 #define HAVE_TERM_H 1
7780 case "$cf_cv_term_header" in
7783 cat >>confdefs.h <<\EOF
7784 #define HAVE_NCURSES_TERM_H 1
7790 cat >>confdefs.h <<\EOF
7791 #define HAVE_NCURSESW_TERM_H 1
7800 echo "$as_me:7800: result: no" >&5
7801 echo "${ECHO_T}no" >&6
7802 NCURSES_CONFIG_PKG=none
7805 NCURSES_CONFIG_PKG=none
7808 if test "x$cf_have_ncuconfig" = "xno"; then
7809 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7811 if test -n "$ac_tool_prefix"; then
7812 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7814 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7815 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7816 echo "$as_me:7816: checking for $ac_word" >&5
7817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7818 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7819 echo $ECHO_N "(cached) $ECHO_C" >&6
7821 if test -n "$NCURSES_CONFIG"; then
7822 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7824 ac_save_IFS=$IFS; IFS=$ac_path_separator
7826 for ac_dir in $ac_dummy; do
7828 test -z "$ac_dir" && ac_dir=.
7829 $as_executable_p "$ac_dir/$ac_word" || continue
7830 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7831 echo "$as_me:7831: found $ac_dir/$ac_word" >&5
7837 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7838 if test -n "$NCURSES_CONFIG"; then
7839 echo "$as_me:7839: result: $NCURSES_CONFIG" >&5
7840 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7842 echo "$as_me:7842: result: no" >&5
7843 echo "${ECHO_T}no" >&6
7846 test -n "$NCURSES_CONFIG" && break
7849 if test -z "$NCURSES_CONFIG"; then
7850 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7851 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7853 # Extract the first word of "$ac_prog", so it can be a program name with args.
7854 set dummy $ac_prog; ac_word=$2
7855 echo "$as_me:7855: checking for $ac_word" >&5
7856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7857 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7858 echo $ECHO_N "(cached) $ECHO_C" >&6
7860 if test -n "$ac_ct_NCURSES_CONFIG"; then
7861 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7863 ac_save_IFS=$IFS; IFS=$ac_path_separator
7865 for ac_dir in $ac_dummy; do
7867 test -z "$ac_dir" && ac_dir=.
7868 $as_executable_p "$ac_dir/$ac_word" || continue
7869 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7870 echo "$as_me:7870: found $ac_dir/$ac_word" >&5
7876 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7877 if test -n "$ac_ct_NCURSES_CONFIG"; then
7878 echo "$as_me:7878: result: $ac_ct_NCURSES_CONFIG" >&5
7879 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7881 echo "$as_me:7881: result: no" >&5
7882 echo "${ECHO_T}no" >&6
7885 test -n "$ac_ct_NCURSES_CONFIG" && break
7887 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7889 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7892 if test "$NCURSES_CONFIG" != none ; then
7894 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7896 case "x$cf_add_cflags" in
7899 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7902 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'`
7903 test "$CFLAGS" != "$cf_old_cflag" || break
7905 CFLAGS="$cf_old_cflag"
7908 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7911 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'`
7912 test "$CPPFLAGS" != "$cf_old_cflag" || break
7914 CPPFLAGS="$cf_old_cflag"
7923 cf_new_extra_cppflags=
7925 for cf_add_cflags in $cf_add_cflags
7927 case "$cf_fix_cppflags" in
7929 case "$cf_add_cflags" in
7930 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7931 case "$cf_add_cflags" in
7933 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7935 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7936 && test -z "${cf_tst_cflags}" \
7937 && cf_fix_cppflags=yes
7939 if test "$cf_fix_cppflags" = yes ; then
7941 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7942 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7945 elif test "${cf_tst_cflags}" = "\"'" ; then
7947 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7948 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7958 case "$cf_add_cflags" in
7960 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7962 CPPFLAGS=`echo "$CPPFLAGS" | \
7963 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7964 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7969 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7970 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7977 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7978 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7985 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7986 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7988 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7990 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7991 && test -z "${cf_tst_cflags}" \
7992 && cf_fix_cppflags=no
7997 if test -n "$cf_new_cflags" ; then
7999 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8000 CFLAGS="${CFLAGS}$cf_new_cflags"
8004 if test -n "$cf_new_cppflags" ; then
8006 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8007 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8011 if test -n "$cf_new_extra_cppflags" ; then
8013 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8014 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8023 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8025 for cf_add_1lib in $cf_add_0lib; do
8026 for cf_add_2lib in $cf_add_libs; do
8027 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8032 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8036 # even with config script, some packages use no-override for curses.h
8038 echo "$as_me:8038: checking if we have identified curses headers" >&5
8039 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8040 if test "${cf_cv_ncurses_header+set}" = set; then
8041 echo $ECHO_N "(cached) $ECHO_C" >&6
8044 cf_cv_ncurses_header=none
8046 ncurses.h ncursesw/ncurses.h \
8047 curses.h ncursesw/curses.h
8049 cat >"conftest.$ac_ext" <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <${cf_header}>
8061 rm -f "conftest.$ac_objext"
8062 if { (eval echo "$as_me:8062: \"$ac_compile\"") >&5
8063 (eval $ac_compile) 2>&5
8065 echo "$as_me:8065: \$? = $ac_status" >&5
8066 (exit "$ac_status"); } &&
8067 { ac_try='test -s "conftest.$ac_objext"'
8068 { (eval echo "$as_me:8068: \"$ac_try\"") >&5
8071 echo "$as_me:8071: \$? = $ac_status" >&5
8072 (exit "$ac_status"); }; }; then
8073 cf_cv_ncurses_header=$cf_header; break
8075 echo "$as_me: failed program was:" >&5
8076 cat "conftest.$ac_ext" >&5
8078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8082 echo "$as_me:8082: result: $cf_cv_ncurses_header" >&5
8083 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8085 if test "$cf_cv_ncurses_header" = none ; then
8086 { { echo "$as_me:8086: error: No curses header-files found" >&5
8087 echo "$as_me: error: No curses header-files found" >&2;}
8088 { (exit 1); exit 1; }; }
8091 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8093 for ac_header in $cf_cv_ncurses_header
8095 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8096 echo "$as_me:8096: checking for $ac_header" >&5
8097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8099 echo $ECHO_N "(cached) $ECHO_C" >&6
8101 cat >"conftest.$ac_ext" <<_ACEOF
8102 #line 8102 "configure"
8103 #include "confdefs.h"
8104 #include <$ac_header>
8106 if { (eval echo "$as_me:8106: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8107 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8109 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8111 cat conftest.err >&5
8112 echo "$as_me:8112: \$? = $ac_status" >&5
8113 (exit "$ac_status"); } >/dev/null; then
8114 if test -s conftest.err; then
8115 ac_cpp_err=$ac_c_preproc_warn_flag
8122 if test -z "$ac_cpp_err"; then
8123 eval "$as_ac_Header=yes"
8125 echo "$as_me: failed program was:" >&5
8126 cat "conftest.$ac_ext" >&5
8127 eval "$as_ac_Header=no"
8129 rm -f conftest.err "conftest.$ac_ext"
8131 echo "$as_me:8131: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8132 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8133 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8134 cat >>confdefs.h <<EOF
8135 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8141 cat >>confdefs.h <<\EOF
8145 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8147 cat >>confdefs.h <<EOF
8148 #define $cf_nculib_ROOT 1
8151 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8155 cf_ncuhdr_root=ncursesw
8157 test -n "$cf_cv_curses_dir" && \
8158 test "$cf_cv_curses_dir" != "no" && { \
8160 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8161 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8163 while test "$cf_add_incdir" != /usr/include
8165 if test -d "$cf_add_incdir"
8168 if test -n "$CFLAGS$CPPFLAGS" ; then
8169 # a loop is needed to ensure we can add subdirs of existing dirs
8170 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8171 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8172 cf_have_incdir=yes; break
8177 if test "$cf_have_incdir" = no ; then
8178 if test "$cf_add_incdir" = /usr/local/include ; then
8179 if test "$GCC" = yes
8181 cf_save_CPPFLAGS=$CPPFLAGS
8183 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8184 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8186 cat >"conftest.$ac_ext" <<_ACEOF
8187 #line 8187 "configure"
8188 #include "confdefs.h"
8198 rm -f "conftest.$ac_objext"
8199 if { (eval echo "$as_me:8199: \"$ac_compile\"") >&5
8200 (eval $ac_compile) 2>&5
8202 echo "$as_me:8202: \$? = $ac_status" >&5
8203 (exit "$ac_status"); } &&
8204 { ac_try='test -s "conftest.$ac_objext"'
8205 { (eval echo "$as_me:8205: \"$ac_try\"") >&5
8208 echo "$as_me:8208: \$? = $ac_status" >&5
8209 (exit "$ac_status"); }; }; then
8212 echo "$as_me: failed program was:" >&5
8213 cat "conftest.$ac_ext" >&5
8216 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8217 CPPFLAGS=$cf_save_CPPFLAGS
8222 if test "$cf_have_incdir" = no ; then
8223 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8225 echo "${as_me:-configure}:8225: testing adding $cf_add_incdir to include-path ..." 1>&5
8227 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8229 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8230 test "$cf_top_incdir" = "$cf_add_incdir" && break
8231 cf_add_incdir="$cf_top_incdir"
8244 echo "$as_me:8244: checking for $cf_ncuhdr_root header in include-path" >&5
8245 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8246 if test "${cf_cv_ncurses_h+set}" = set; then
8247 echo $ECHO_N "(cached) $ECHO_C" >&6
8250 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8251 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8252 for cf_header in $cf_header_list
8255 cat >"conftest.$ac_ext" <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8259 #define _XOPEN_SOURCE_EXTENDED
8260 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8261 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8263 #include <$cf_header>
8268 #ifdef NCURSES_VERSION
8271 #error WACS_BSSB is not defined
8274 printf("%s\\n", NCURSES_VERSION);
8279 #error __NCURSES_H is not defined
8287 rm -f "conftest.$ac_objext"
8288 if { (eval echo "$as_me:8288: \"$ac_compile\"") >&5
8289 (eval $ac_compile) 2>&5
8291 echo "$as_me:8291: \$? = $ac_status" >&5
8292 (exit "$ac_status"); } &&
8293 { ac_try='test -s "conftest.$ac_objext"'
8294 { (eval echo "$as_me:8294: \"$ac_try\"") >&5
8297 echo "$as_me:8297: \$? = $ac_status" >&5
8298 (exit "$ac_status"); }; }; then
8299 cf_cv_ncurses_h=$cf_header
8302 echo "$as_me: failed program was:" >&5
8303 cat "conftest.$ac_ext" >&5
8306 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8308 test "$cf_cv_ncurses_h" != no && break
8312 echo "$as_me:8312: result: $cf_cv_ncurses_h" >&5
8313 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8315 if test "$cf_cv_ncurses_h" != no ; then
8316 cf_cv_ncurses_header=$cf_cv_ncurses_h
8319 echo "$as_me:8319: checking for $cf_ncuhdr_root include-path" >&5
8320 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8321 if test "${cf_cv_ncurses_h2+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8325 test -n "$verbose" && echo
8329 # collect the current set of include-directories from compiler flags
8330 cf_header_path_list=""
8331 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8332 for cf_header_path in $CPPFLAGS $CFLAGS
8334 case "$cf_header_path" in
8336 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8338 test "x$cf_header_path" != "xNONE" && \
8339 test -d "$cf_header_path" && \
8341 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8342 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8343 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8344 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8345 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8346 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"
8349 cf_header_path_list="$cf_header_path_list $cf_search"
8355 # add the variations for the package we are looking for
8359 test "x$prefix" != "xNONE" && \
8360 test -d "$prefix" && \
8362 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8363 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8364 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8365 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8366 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8367 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8370 for cf_subdir_prefix in \
8379 test "x$cf_subdir_prefix" != "x$prefix" && \
8380 test -d "$cf_subdir_prefix" && \
8381 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8382 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8383 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8384 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8385 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8386 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8387 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"
8392 test "$includedir" != NONE && \
8393 test "$includedir" != "/usr/include" && \
8394 test -d "$includedir" && {
8395 test -d "$includedir" && cf_search="$cf_search $includedir"
8396 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8399 test "$oldincludedir" != NONE && \
8400 test "$oldincludedir" != "/usr/include" && \
8401 test -d "$oldincludedir" && {
8402 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8403 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8406 cf_search="$cf_search $cf_header_path_list"
8408 test -n "$verbose" && echo "search path $cf_search"
8409 cf_save2_CPPFLAGS="$CPPFLAGS"
8410 for cf_incdir in $cf_search
8413 if test -n "$cf_incdir" ; then
8414 for cf_add_incdir in $cf_incdir
8416 while test "$cf_add_incdir" != /usr/include
8418 if test -d "$cf_add_incdir"
8421 if test -n "$CFLAGS$CPPFLAGS" ; then
8422 # a loop is needed to ensure we can add subdirs of existing dirs
8423 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8424 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8425 cf_have_incdir=yes; break
8430 if test "$cf_have_incdir" = no ; then
8431 if test "$cf_add_incdir" = /usr/local/include ; then
8432 if test "$GCC" = yes
8434 cf_save_CPPFLAGS=$CPPFLAGS
8436 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8437 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8439 cat >"conftest.$ac_ext" <<_ACEOF
8440 #line 8440 "configure"
8441 #include "confdefs.h"
8451 rm -f "conftest.$ac_objext"
8452 if { (eval echo "$as_me:8452: \"$ac_compile\"") >&5
8453 (eval $ac_compile) 2>&5
8455 echo "$as_me:8455: \$? = $ac_status" >&5
8456 (exit "$ac_status"); } &&
8457 { ac_try='test -s "conftest.$ac_objext"'
8458 { (eval echo "$as_me:8458: \"$ac_try\"") >&5
8461 echo "$as_me:8461: \$? = $ac_status" >&5
8462 (exit "$ac_status"); }; }; then
8465 echo "$as_me: failed program was:" >&5
8466 cat "conftest.$ac_ext" >&5
8469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8470 CPPFLAGS=$cf_save_CPPFLAGS
8475 if test "$cf_have_incdir" = no ; then
8476 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8478 echo "${as_me:-configure}:8478: testing adding $cf_add_incdir to include-path ..." 1>&5
8480 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8482 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8483 test "$cf_top_incdir" = "$cf_add_incdir" && break
8484 cf_add_incdir="$cf_top_incdir"
8500 cat >"conftest.$ac_ext" <<_ACEOF
8501 #line 8501 "configure"
8502 #include "confdefs.h"
8504 #include <$cf_header>
8509 #ifdef NCURSES_VERSION
8511 printf("%s\\n", NCURSES_VERSION);
8516 #error __NCURSES_H is not defined
8524 rm -f "conftest.$ac_objext"
8525 if { (eval echo "$as_me:8525: \"$ac_compile\"") >&5
8526 (eval $ac_compile) 2>&5
8528 echo "$as_me:8528: \$? = $ac_status" >&5
8529 (exit "$ac_status"); } &&
8530 { ac_try='test -s "conftest.$ac_objext"'
8531 { (eval echo "$as_me:8531: \"$ac_try\"") >&5
8534 echo "$as_me:8534: \$? = $ac_status" >&5
8535 (exit "$ac_status"); }; }; then
8536 cf_cv_ncurses_h2=$cf_header
8539 echo "$as_me: failed program was:" >&5
8540 cat "conftest.$ac_ext" >&5
8543 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8545 if test "$cf_cv_ncurses_h2" != no ; then
8546 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8547 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8550 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8552 CPPFLAGS="$cf_save2_CPPFLAGS"
8553 test "$cf_cv_ncurses_h2" != no && break
8555 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8555: error: not found" >&5
8556 echo "$as_me: error: not found" >&2;}
8557 { (exit 1); exit 1; }; }
8560 echo "$as_me:8560: result: $cf_cv_ncurses_h2" >&5
8561 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8563 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8564 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8565 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8566 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8569 if test -n "$cf_1st_incdir" ; then
8570 for cf_add_incdir in $cf_1st_incdir
8572 while test "$cf_add_incdir" != /usr/include
8574 if test -d "$cf_add_incdir"
8577 if test -n "$CFLAGS$CPPFLAGS" ; then
8578 # a loop is needed to ensure we can add subdirs of existing dirs
8579 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8580 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8581 cf_have_incdir=yes; break
8586 if test "$cf_have_incdir" = no ; then
8587 if test "$cf_add_incdir" = /usr/local/include ; then
8588 if test "$GCC" = yes
8590 cf_save_CPPFLAGS=$CPPFLAGS
8592 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8593 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8595 cat >"conftest.$ac_ext" <<_ACEOF
8596 #line 8596 "configure"
8597 #include "confdefs.h"
8607 rm -f "conftest.$ac_objext"
8608 if { (eval echo "$as_me:8608: \"$ac_compile\"") >&5
8609 (eval $ac_compile) 2>&5
8611 echo "$as_me:8611: \$? = $ac_status" >&5
8612 (exit "$ac_status"); } &&
8613 { ac_try='test -s "conftest.$ac_objext"'
8614 { (eval echo "$as_me:8614: \"$ac_try\"") >&5
8617 echo "$as_me:8617: \$? = $ac_status" >&5
8618 (exit "$ac_status"); }; }; then
8621 echo "$as_me: failed program was:" >&5
8622 cat "conftest.$ac_ext" >&5
8625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8626 CPPFLAGS=$cf_save_CPPFLAGS
8631 if test "$cf_have_incdir" = no ; then
8632 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8634 echo "${as_me:-configure}:8634: testing adding $cf_add_incdir to include-path ..." 1>&5
8636 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8638 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8639 test "$cf_top_incdir" = "$cf_add_incdir" && break
8640 cf_add_incdir="$cf_top_incdir"
8653 # Set definitions to allow ifdef'ing for ncurses.h
8655 case "$cf_cv_ncurses_header" in
8658 cat >>confdefs.h <<\EOF
8659 #define HAVE_NCURSES_H 1
8665 case "$cf_cv_ncurses_header" in
8666 (ncurses/curses.h|ncurses/ncurses.h)
8668 cat >>confdefs.h <<\EOF
8669 #define HAVE_NCURSES_NCURSES_H 1
8673 (ncursesw/curses.h|ncursesw/ncurses.h)
8675 cat >>confdefs.h <<\EOF
8676 #define HAVE_NCURSESW_NCURSES_H 1
8682 echo "$as_me:8682: checking for terminfo header" >&5
8683 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8684 if test "${cf_cv_term_header+set}" = set; then
8685 echo $ECHO_N "(cached) $ECHO_C" >&6
8688 case "${cf_cv_ncurses_header}" in
8689 (*/ncurses.h|*/ncursesw.h)
8690 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8693 cf_term_header=term.h
8697 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8699 cat >"conftest.$ac_ext" <<_ACEOF
8700 #line 8700 "configure"
8701 #include "confdefs.h"
8703 #include <${cf_cv_ncurses_header:-curses.h}>
8709 int x = auto_left_margin; (void)x
8714 rm -f "conftest.$ac_objext"
8715 if { (eval echo "$as_me:8715: \"$ac_compile\"") >&5
8716 (eval $ac_compile) 2>&5
8718 echo "$as_me:8718: \$? = $ac_status" >&5
8719 (exit "$ac_status"); } &&
8720 { ac_try='test -s "conftest.$ac_objext"'
8721 { (eval echo "$as_me:8721: \"$ac_try\"") >&5
8724 echo "$as_me:8724: \$? = $ac_status" >&5
8725 (exit "$ac_status"); }; }; then
8727 cf_cv_term_header="$cf_test"
8729 echo "$as_me: failed program was:" >&5
8730 cat "conftest.$ac_ext" >&5
8732 cf_cv_term_header=unknown
8735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8736 test "$cf_cv_term_header" != unknown && break
8740 echo "$as_me:8740: result: $cf_cv_term_header" >&5
8741 echo "${ECHO_T}$cf_cv_term_header" >&6
8743 # Set definitions to allow ifdef'ing to accommodate subdirectories
8745 case "$cf_cv_term_header" in
8748 cat >>confdefs.h <<\EOF
8749 #define HAVE_TERM_H 1
8755 case "$cf_cv_term_header" in
8758 cat >>confdefs.h <<\EOF
8759 #define HAVE_NCURSES_TERM_H 1
8765 cat >>confdefs.h <<\EOF
8766 #define HAVE_NCURSESW_TERM_H 1
8772 # some applications need this, but should check for NCURSES_VERSION
8774 cat >>confdefs.h <<\EOF
8778 echo "$as_me:8778: checking for ncurses version" >&5
8779 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8780 if test "${cf_cv_ncurses_version+set}" = set; then
8781 echo $ECHO_N "(cached) $ECHO_C" >&6
8784 cf_cv_ncurses_version=no
8786 rm -f "$cf_tempfile"
8787 if test "$cross_compiling" = yes; then
8789 # This will not work if the preprocessor splits the line after the
8790 # Autoconf token. The 'unproto' program does that.
8791 cat > "conftest.$ac_ext" <<EOF
8792 #include <${cf_cv_ncurses_header:-curses.h}>
8794 #ifdef NCURSES_VERSION
8795 Autoconf NCURSES_VERSION
8803 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8804 { (eval echo "$as_me:8804: \"$cf_try\"") >&5
8807 echo "$as_me:8807: \$? = $ac_status" >&5
8808 (exit "$ac_status"); }
8809 if test -f conftest.out ; then
8810 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8811 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8816 cat >"conftest.$ac_ext" <<_ACEOF
8817 #line 8817 "configure"
8818 #include "confdefs.h"
8820 $ac_includes_default
8822 #include <${cf_cv_ncurses_header:-curses.h}>
8826 FILE *fp = fopen("$cf_tempfile", "w");
8827 #ifdef NCURSES_VERSION
8828 # ifdef NCURSES_VERSION_PATCH
8829 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8831 fprintf(fp, "%s\\n", NCURSES_VERSION);
8835 fprintf(fp, "old\\n");
8837 #error __NCURSES_H is not defined
8840 ${cf_cv_main_return:-return}(0);
8843 rm -f "conftest$ac_exeext"
8844 if { (eval echo "$as_me:8844: \"$ac_link\"") >&5
8845 (eval $ac_link) 2>&5
8847 echo "$as_me:8847: \$? = $ac_status" >&5
8848 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8849 { (eval echo "$as_me:8849: \"$ac_try\"") >&5
8852 echo "$as_me:8852: \$? = $ac_status" >&5
8853 (exit "$ac_status"); }; }; then
8855 cf_cv_ncurses_version=`cat $cf_tempfile`
8857 echo "$as_me: program exited with status $ac_status" >&5
8858 echo "$as_me: failed program was:" >&5
8859 cat "conftest.$ac_ext" >&5
8861 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8863 rm -f "$cf_tempfile"
8866 echo "$as_me:8866: result: $cf_cv_ncurses_version" >&5
8867 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8868 test "$cf_cv_ncurses_version" = no ||
8869 cat >>confdefs.h <<\EOF
8873 cf_nculib_root=ncursesw
8874 # This works, except for the special case where we find gpm, but
8875 # ncurses is in a nonstandard location via $LIBS, and we really want
8878 cf_ncurses_SAVE="$LIBS"
8879 echo "$as_me:8879: checking for Gpm_Open in -lgpm" >&5
8880 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8881 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8882 echo $ECHO_N "(cached) $ECHO_C" >&6
8884 ac_check_lib_save_LIBS=$LIBS
8886 cat >"conftest.$ac_ext" <<_ACEOF
8887 #line 8887 "configure"
8888 #include "confdefs.h"
8890 /* Override any gcc2 internal prototype to avoid an error. */
8894 /* We use char because int might match the return type of a gcc2
8895 builtin and then its argument prototype would still apply. */
8905 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8906 if { (eval echo "$as_me:8906: \"$ac_link\"") >&5
8907 (eval $ac_link) 2>&5
8909 echo "$as_me:8909: \$? = $ac_status" >&5
8910 (exit "$ac_status"); } &&
8911 { ac_try='test -s "conftest$ac_exeext"'
8912 { (eval echo "$as_me:8912: \"$ac_try\"") >&5
8915 echo "$as_me:8915: \$? = $ac_status" >&5
8916 (exit "$ac_status"); }; }; then
8917 ac_cv_lib_gpm_Gpm_Open=yes
8919 echo "$as_me: failed program was:" >&5
8920 cat "conftest.$ac_ext" >&5
8921 ac_cv_lib_gpm_Gpm_Open=no
8923 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8924 LIBS=$ac_check_lib_save_LIBS
8926 echo "$as_me:8926: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8927 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8928 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8929 echo "$as_me:8929: checking for initscr in -lgpm" >&5
8930 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8931 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8932 echo $ECHO_N "(cached) $ECHO_C" >&6
8934 ac_check_lib_save_LIBS=$LIBS
8936 cat >"conftest.$ac_ext" <<_ACEOF
8937 #line 8937 "configure"
8938 #include "confdefs.h"
8940 /* Override any gcc2 internal prototype to avoid an error. */
8944 /* We use char because int might match the return type of a gcc2
8945 builtin and then its argument prototype would still apply. */
8955 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8956 if { (eval echo "$as_me:8956: \"$ac_link\"") >&5
8957 (eval $ac_link) 2>&5
8959 echo "$as_me:8959: \$? = $ac_status" >&5
8960 (exit "$ac_status"); } &&
8961 { ac_try='test -s "conftest$ac_exeext"'
8962 { (eval echo "$as_me:8962: \"$ac_try\"") >&5
8965 echo "$as_me:8965: \$? = $ac_status" >&5
8966 (exit "$ac_status"); }; }; then
8967 ac_cv_lib_gpm_initscr=yes
8969 echo "$as_me: failed program was:" >&5
8970 cat "conftest.$ac_ext" >&5
8971 ac_cv_lib_gpm_initscr=no
8973 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8974 LIBS=$ac_check_lib_save_LIBS
8976 echo "$as_me:8976: result: $ac_cv_lib_gpm_initscr" >&5
8977 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8978 if test "$ac_cv_lib_gpm_initscr" = yes; then
8979 LIBS="$cf_ncurses_SAVE"
8981 cf_ncurses_LIBS="-lgpm"
8988 # This is only necessary if you are linking against an obsolete
8989 # version of ncurses (but it should do no harm, since it is static).
8990 if test "$cf_nculib_root" = ncurses ; then
8991 echo "$as_me:8991: checking for tgoto in -lmytinfo" >&5
8992 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8993 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8994 echo $ECHO_N "(cached) $ECHO_C" >&6
8996 ac_check_lib_save_LIBS=$LIBS
8997 LIBS="-lmytinfo $LIBS"
8998 cat >"conftest.$ac_ext" <<_ACEOF
8999 #line 8999 "configure"
9000 #include "confdefs.h"
9002 /* Override any gcc2 internal prototype to avoid an error. */
9006 /* We use char because int might match the return type of a gcc2
9007 builtin and then its argument prototype would still apply. */
9017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9018 if { (eval echo "$as_me:9018: \"$ac_link\"") >&5
9019 (eval $ac_link) 2>&5
9021 echo "$as_me:9021: \$? = $ac_status" >&5
9022 (exit "$ac_status"); } &&
9023 { ac_try='test -s "conftest$ac_exeext"'
9024 { (eval echo "$as_me:9024: \"$ac_try\"") >&5
9027 echo "$as_me:9027: \$? = $ac_status" >&5
9028 (exit "$ac_status"); }; }; then
9029 ac_cv_lib_mytinfo_tgoto=yes
9031 echo "$as_me: failed program was:" >&5
9032 cat "conftest.$ac_ext" >&5
9033 ac_cv_lib_mytinfo_tgoto=no
9035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9036 LIBS=$ac_check_lib_save_LIBS
9038 echo "$as_me:9038: result: $ac_cv_lib_mytinfo_tgoto" >&5
9039 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9040 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9041 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9051 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9053 for cf_add_1lib in $cf_add_0lib; do
9054 for cf_add_2lib in $cf_add_libs; do
9055 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9060 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9064 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9070 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9072 for cf_add_1lib in $cf_add_0lib; do
9073 for cf_add_2lib in $cf_add_libs; do
9074 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9079 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9085 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9087 echo "$as_me:9087: checking for initscr" >&5
9088 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9089 if test "${ac_cv_func_initscr+set}" = set; then
9090 echo $ECHO_N "(cached) $ECHO_C" >&6
9092 cat >"conftest.$ac_ext" <<_ACEOF
9093 #line 9093 "configure"
9094 #include "confdefs.h"
9095 #define initscr autoconf_temporary
9096 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9103 /* We use char because int might match the return type of a gcc2
9104 builtin and then its argument prototype would still apply. */
9105 char initscr (void);
9111 /* The GNU C library defines stubs for functions which it implements
9112 to always fail with ENOSYS. Some functions are actually named
9113 something starting with __ and the normal name is an alias. */
9114 #if defined (__stub_initscr) || defined (__stub___initscr)
9115 #error found stub for initscr
9123 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9124 if { (eval echo "$as_me:9124: \"$ac_link\"") >&5
9125 (eval $ac_link) 2>&5
9127 echo "$as_me:9127: \$? = $ac_status" >&5
9128 (exit "$ac_status"); } &&
9129 { ac_try='test -s "conftest$ac_exeext"'
9130 { (eval echo "$as_me:9130: \"$ac_try\"") >&5
9133 echo "$as_me:9133: \$? = $ac_status" >&5
9134 (exit "$ac_status"); }; }; then
9135 ac_cv_func_initscr=yes
9137 echo "$as_me: failed program was:" >&5
9138 cat "conftest.$ac_ext" >&5
9139 ac_cv_func_initscr=no
9141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9143 echo "$as_me:9143: result: $ac_cv_func_initscr" >&5
9144 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9145 if test "$ac_cv_func_initscr" = yes; then
9146 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9149 cf_save_LIBS="$LIBS"
9150 echo "$as_me:9150: checking for initscr in -l$cf_nculib_root" >&5
9151 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9152 LIBS="-l$cf_nculib_root $LIBS"
9153 cat >"conftest.$ac_ext" <<_ACEOF
9154 #line 9154 "configure"
9155 #include "confdefs.h"
9156 #include <${cf_cv_ncurses_header:-curses.h}>
9165 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9166 if { (eval echo "$as_me:9166: \"$ac_link\"") >&5
9167 (eval $ac_link) 2>&5
9169 echo "$as_me:9169: \$? = $ac_status" >&5
9170 (exit "$ac_status"); } &&
9171 { ac_try='test -s "conftest$ac_exeext"'
9172 { (eval echo "$as_me:9172: \"$ac_try\"") >&5
9175 echo "$as_me:9175: \$? = $ac_status" >&5
9176 (exit "$ac_status"); }; }; then
9177 echo "$as_me:9177: result: yes" >&5
9178 echo "${ECHO_T}yes" >&6
9179 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9182 echo "$as_me: failed program was:" >&5
9183 cat "conftest.$ac_ext" >&5
9184 echo "$as_me:9184: result: no" >&5
9185 echo "${ECHO_T}no" >&6
9188 cf_library_path_list=""
9189 if test -n "${LDFLAGS}${LIBS}" ; then
9190 for cf_library_path in $LDFLAGS $LIBS
9192 case "$cf_library_path" in
9194 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9196 test "x$cf_library_path" != "xNONE" && \
9197 test -d "$cf_library_path" && \
9199 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9200 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9201 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9202 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9203 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9204 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"
9207 cf_library_path_list="$cf_library_path_list $cf_search"
9215 test "x$prefix" != "xNONE" && \
9216 test -d "$prefix" && \
9218 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9219 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9220 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9221 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9222 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9223 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9226 for cf_subdir_prefix in \
9235 test "x$cf_subdir_prefix" != "x$prefix" && \
9236 test -d "$cf_subdir_prefix" && \
9237 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9238 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9239 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9240 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9241 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9242 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9243 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"
9248 cf_search="$cf_library_path_list $cf_search"
9250 for cf_libdir in $cf_search
9252 echo "$as_me:9252: checking for -l$cf_nculib_root in $cf_libdir" >&5
9253 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9254 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9255 cat >"conftest.$ac_ext" <<_ACEOF
9256 #line 9256 "configure"
9257 #include "confdefs.h"
9258 #include <${cf_cv_ncurses_header:-curses.h}>
9267 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9268 if { (eval echo "$as_me:9268: \"$ac_link\"") >&5
9269 (eval $ac_link) 2>&5
9271 echo "$as_me:9271: \$? = $ac_status" >&5
9272 (exit "$ac_status"); } &&
9273 { ac_try='test -s "conftest$ac_exeext"'
9274 { (eval echo "$as_me:9274: \"$ac_try\"") >&5
9277 echo "$as_me:9277: \$? = $ac_status" >&5
9278 (exit "$ac_status"); }; }; then
9279 echo "$as_me:9279: result: yes" >&5
9280 echo "${ECHO_T}yes" >&6
9281 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9284 echo "$as_me: failed program was:" >&5
9285 cat "conftest.$ac_ext" >&5
9286 echo "$as_me:9286: result: no" >&5
9287 echo "${ECHO_T}no" >&6
9288 LIBS="$cf_save_LIBS"
9290 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9298 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9300 if test "$cf_found_library" = no ; then
9301 { { echo "$as_me:9301: error: Cannot link $cf_nculib_root library" >&5
9302 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9303 { (exit 1); exit 1; }; }
9308 if test -n "$cf_ncurses_LIBS" ; then
9309 echo "$as_me:9309: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9310 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9311 cf_ncurses_SAVE="$LIBS"
9312 for p in $cf_ncurses_LIBS ; do
9313 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9314 if test "$q" != "$LIBS" ; then
9318 cat >"conftest.$ac_ext" <<_ACEOF
9319 #line 9319 "configure"
9320 #include "confdefs.h"
9321 #include <${cf_cv_ncurses_header:-curses.h}>
9325 initscr(); mousemask(0,0); tigetstr((char *)0);
9330 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9331 if { (eval echo "$as_me:9331: \"$ac_link\"") >&5
9332 (eval $ac_link) 2>&5
9334 echo "$as_me:9334: \$? = $ac_status" >&5
9335 (exit "$ac_status"); } &&
9336 { ac_try='test -s "conftest$ac_exeext"'
9337 { (eval echo "$as_me:9337: \"$ac_try\"") >&5
9340 echo "$as_me:9340: \$? = $ac_status" >&5
9341 (exit "$ac_status"); }; }; then
9342 echo "$as_me:9342: result: yes" >&5
9343 echo "${ECHO_T}yes" >&6
9345 echo "$as_me: failed program was:" >&5
9346 cat "conftest.$ac_ext" >&5
9347 echo "$as_me:9347: result: no" >&5
9348 echo "${ECHO_T}no" >&6
9349 LIBS="$cf_ncurses_SAVE"
9351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9354 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9356 cat >>confdefs.h <<EOF
9357 #define $cf_nculib_ROOT 1
9367 cf_ncuconfig_root=ncurses
9368 cf_have_ncuconfig=no
9370 if test "x${PKG_CONFIG:=none}" != xnone; then
9371 echo "$as_me:9371: checking pkg-config for $cf_ncuconfig_root" >&5
9372 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9373 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9374 echo "$as_me:9374: result: yes" >&5
9375 echo "${ECHO_T}yes" >&6
9377 echo "$as_me:9377: checking if the $cf_ncuconfig_root package files work" >&5
9378 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9379 cf_have_ncuconfig=unknown
9381 cf_save_CFLAGS="$CFLAGS"
9382 cf_save_CPPFLAGS="$CPPFLAGS"
9383 cf_save_LIBS="$LIBS"
9385 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9386 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9388 # while -W for passing linker flags is prevalent, it is not "standard".
9389 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9390 # incompatible _and_ non-standard -W option which gives an error. Work
9391 # around that pitfall.
9392 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9398 cf_new_extra_cppflags=
9400 for cf_add_cflags in $cf_pkg_cflags
9402 case "$cf_fix_cppflags" in
9404 case "$cf_add_cflags" in
9405 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9406 case "$cf_add_cflags" in
9408 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9410 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9411 && test -z "${cf_tst_cflags}" \
9412 && cf_fix_cppflags=yes
9414 if test "$cf_fix_cppflags" = yes ; then
9416 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9417 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9420 elif test "${cf_tst_cflags}" = "\"'" ; then
9422 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9423 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9433 case "$cf_add_cflags" in
9435 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9437 CPPFLAGS=`echo "$CPPFLAGS" | \
9438 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9439 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9444 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9445 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9452 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9453 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9460 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9461 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9463 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9465 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9466 && test -z "${cf_tst_cflags}" \
9467 && cf_fix_cppflags=no
9472 if test -n "$cf_new_cflags" ; then
9474 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9475 CFLAGS="${CFLAGS}$cf_new_cflags"
9479 if test -n "$cf_new_cppflags" ; then
9481 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9482 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9486 if test -n "$cf_new_extra_cppflags" ; then
9488 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9489 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9496 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9498 for cf_add_1lib in $cf_add_0lib; do
9499 for cf_add_2lib in $cf_add_libs; do
9500 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9505 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9509 cat >"conftest.$ac_ext" <<_ACEOF
9510 #line 9510 "configure"
9511 #include "confdefs.h"
9512 #include <${cf_cv_ncurses_header:-curses.h}>
9516 initscr(); mousemask(0,0); tigetstr((char *)0);
9521 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9522 if { (eval echo "$as_me:9522: \"$ac_link\"") >&5
9523 (eval $ac_link) 2>&5
9525 echo "$as_me:9525: \$? = $ac_status" >&5
9526 (exit "$ac_status"); } &&
9527 { ac_try='test -s "conftest$ac_exeext"'
9528 { (eval echo "$as_me:9528: \"$ac_try\"") >&5
9531 echo "$as_me:9531: \$? = $ac_status" >&5
9532 (exit "$ac_status"); }; }; then
9533 if test "$cross_compiling" = yes; then
9534 cf_test_ncuconfig=maybe
9536 cat >"conftest.$ac_ext" <<_ACEOF
9537 #line 9537 "configure"
9538 #include "confdefs.h"
9539 #include <${cf_cv_ncurses_header:-curses.h}>
9541 { const char *xx = curses_version(); return (xx == 0); }
9543 rm -f "conftest$ac_exeext"
9544 if { (eval echo "$as_me:9544: \"$ac_link\"") >&5
9545 (eval $ac_link) 2>&5
9547 echo "$as_me:9547: \$? = $ac_status" >&5
9548 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9549 { (eval echo "$as_me:9549: \"$ac_try\"") >&5
9552 echo "$as_me:9552: \$? = $ac_status" >&5
9553 (exit "$ac_status"); }; }; then
9554 cf_test_ncuconfig=yes
9556 echo "$as_me: program exited with status $ac_status" >&5
9557 echo "$as_me: failed program was:" >&5
9558 cat "conftest.$ac_ext" >&5
9559 cf_test_ncuconfig=no
9561 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9564 echo "$as_me: failed program was:" >&5
9565 cat "conftest.$ac_ext" >&5
9566 cf_test_ncuconfig=no
9568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9570 CFLAGS="$cf_save_CFLAGS"
9571 CPPFLAGS="$cf_save_CPPFLAGS"
9572 LIBS="$cf_save_LIBS"
9574 if test "x$cf_test_ncuconfig" != xyes; then
9575 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9576 cf_pkg_cflags="$cf_temp"
9577 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9578 cf_pkg_libs="$cf_temp"
9583 for cf_add_cflags in $cf_pkg_cflags
9585 case "x$cf_add_cflags" in
9588 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9591 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'`
9592 test "$CFLAGS" != "$cf_old_cflag" || break
9594 CFLAGS="$cf_old_cflag"
9597 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9600 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'`
9601 test "$CPPFLAGS" != "$cf_old_cflag" || break
9603 CPPFLAGS="$cf_old_cflag"
9612 cf_new_extra_cppflags=
9614 for cf_add_cflags in $cf_add_cflags
9616 case "$cf_fix_cppflags" in
9618 case "$cf_add_cflags" in
9619 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9620 case "$cf_add_cflags" in
9622 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9624 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9625 && test -z "${cf_tst_cflags}" \
9626 && cf_fix_cppflags=yes
9628 if test "$cf_fix_cppflags" = yes ; then
9630 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9631 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9634 elif test "${cf_tst_cflags}" = "\"'" ; then
9636 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9637 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9647 case "$cf_add_cflags" in
9649 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9651 CPPFLAGS=`echo "$CPPFLAGS" | \
9652 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9653 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9658 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9659 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9666 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9667 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9674 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9675 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9677 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9679 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9680 && test -z "${cf_tst_cflags}" \
9681 && cf_fix_cppflags=no
9686 if test -n "$cf_new_cflags" ; then
9688 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9689 CFLAGS="${CFLAGS}$cf_new_cflags"
9693 if test -n "$cf_new_cppflags" ; then
9695 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9696 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9700 if test -n "$cf_new_extra_cppflags" ; then
9702 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9703 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9712 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9714 for cf_add_1lib in $cf_add_0lib; do
9715 for cf_add_2lib in $cf_add_libs; do
9716 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9721 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9725 cat >"conftest.$ac_ext" <<_ACEOF
9726 #line 9726 "configure"
9727 #include "confdefs.h"
9728 #include <${cf_cv_ncurses_header:-curses.h}>
9732 initscr(); mousemask(0,0); tigetstr((char *)0);
9737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9738 if { (eval echo "$as_me:9738: \"$ac_link\"") >&5
9739 (eval $ac_link) 2>&5
9741 echo "$as_me:9741: \$? = $ac_status" >&5
9742 (exit "$ac_status"); } &&
9743 { ac_try='test -s "conftest$ac_exeext"'
9744 { (eval echo "$as_me:9744: \"$ac_try\"") >&5
9747 echo "$as_me:9747: \$? = $ac_status" >&5
9748 (exit "$ac_status"); }; }; then
9749 if test "$cross_compiling" = yes; then
9750 cf_have_ncuconfig=maybe
9752 cat >"conftest.$ac_ext" <<_ACEOF
9753 #line 9753 "configure"
9754 #include "confdefs.h"
9755 #include <${cf_cv_ncurses_header:-curses.h}>
9757 { const char *xx = curses_version(); return (xx == 0); }
9759 rm -f "conftest$ac_exeext"
9760 if { (eval echo "$as_me:9760: \"$ac_link\"") >&5
9761 (eval $ac_link) 2>&5
9763 echo "$as_me:9763: \$? = $ac_status" >&5
9764 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9765 { (eval echo "$as_me:9765: \"$ac_try\"") >&5
9768 echo "$as_me:9768: \$? = $ac_status" >&5
9769 (exit "$ac_status"); }; }; then
9770 cf_have_ncuconfig=yes
9772 echo "$as_me: program exited with status $ac_status" >&5
9773 echo "$as_me: failed program was:" >&5
9774 cat "conftest.$ac_ext" >&5
9775 cf_have_ncuconfig=no
9777 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9780 echo "$as_me: failed program was:" >&5
9781 cat "conftest.$ac_ext" >&5
9782 cf_have_ncuconfig=no
9784 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9785 echo "$as_me:9785: result: $cf_have_ncuconfig" >&5
9786 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9787 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9788 if test "$cf_have_ncuconfig" != "yes"
9790 CPPFLAGS="$cf_save_CPPFLAGS"
9791 LIBS="$cf_save_LIBS"
9792 NCURSES_CONFIG_PKG=none
9795 cat >>confdefs.h <<\EOF
9799 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9801 echo "$as_me:9801: checking for terminfo header" >&5
9802 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9803 if test "${cf_cv_term_header+set}" = set; then
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
9807 case "${cf_cv_ncurses_header}" in
9808 (*/ncurses.h|*/ncursesw.h)
9809 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9812 cf_term_header=term.h
9816 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9818 cat >"conftest.$ac_ext" <<_ACEOF
9819 #line 9819 "configure"
9820 #include "confdefs.h"
9822 #include <${cf_cv_ncurses_header:-curses.h}>
9828 int x = auto_left_margin; (void)x
9833 rm -f "conftest.$ac_objext"
9834 if { (eval echo "$as_me:9834: \"$ac_compile\"") >&5
9835 (eval $ac_compile) 2>&5
9837 echo "$as_me:9837: \$? = $ac_status" >&5
9838 (exit "$ac_status"); } &&
9839 { ac_try='test -s "conftest.$ac_objext"'
9840 { (eval echo "$as_me:9840: \"$ac_try\"") >&5
9843 echo "$as_me:9843: \$? = $ac_status" >&5
9844 (exit "$ac_status"); }; }; then
9846 cf_cv_term_header="$cf_test"
9848 echo "$as_me: failed program was:" >&5
9849 cat "conftest.$ac_ext" >&5
9851 cf_cv_term_header=unknown
9854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9855 test "$cf_cv_term_header" != unknown && break
9859 echo "$as_me:9859: result: $cf_cv_term_header" >&5
9860 echo "${ECHO_T}$cf_cv_term_header" >&6
9862 # Set definitions to allow ifdef'ing to accommodate subdirectories
9864 case "$cf_cv_term_header" in
9867 cat >>confdefs.h <<\EOF
9868 #define HAVE_TERM_H 1
9874 case "$cf_cv_term_header" in
9877 cat >>confdefs.h <<\EOF
9878 #define HAVE_NCURSES_TERM_H 1
9884 cat >>confdefs.h <<\EOF
9885 #define HAVE_NCURSESW_TERM_H 1
9894 echo "$as_me:9894: result: no" >&5
9895 echo "${ECHO_T}no" >&6
9896 NCURSES_CONFIG_PKG=none
9899 NCURSES_CONFIG_PKG=none
9902 if test "x$cf_have_ncuconfig" = "xno"; then
9903 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9905 if test -n "$ac_tool_prefix"; then
9906 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9908 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9909 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9910 echo "$as_me:9910: checking for $ac_word" >&5
9911 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9912 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9913 echo $ECHO_N "(cached) $ECHO_C" >&6
9915 if test -n "$NCURSES_CONFIG"; then
9916 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9918 ac_save_IFS=$IFS; IFS=$ac_path_separator
9920 for ac_dir in $ac_dummy; do
9922 test -z "$ac_dir" && ac_dir=.
9923 $as_executable_p "$ac_dir/$ac_word" || continue
9924 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9925 echo "$as_me:9925: found $ac_dir/$ac_word" >&5
9931 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9932 if test -n "$NCURSES_CONFIG"; then
9933 echo "$as_me:9933: result: $NCURSES_CONFIG" >&5
9934 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9936 echo "$as_me:9936: result: no" >&5
9937 echo "${ECHO_T}no" >&6
9940 test -n "$NCURSES_CONFIG" && break
9943 if test -z "$NCURSES_CONFIG"; then
9944 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9945 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9947 # Extract the first word of "$ac_prog", so it can be a program name with args.
9948 set dummy $ac_prog; ac_word=$2
9949 echo "$as_me:9949: checking for $ac_word" >&5
9950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9951 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9952 echo $ECHO_N "(cached) $ECHO_C" >&6
9954 if test -n "$ac_ct_NCURSES_CONFIG"; then
9955 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9957 ac_save_IFS=$IFS; IFS=$ac_path_separator
9959 for ac_dir in $ac_dummy; do
9961 test -z "$ac_dir" && ac_dir=.
9962 $as_executable_p "$ac_dir/$ac_word" || continue
9963 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9964 echo "$as_me:9964: found $ac_dir/$ac_word" >&5
9970 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9971 if test -n "$ac_ct_NCURSES_CONFIG"; then
9972 echo "$as_me:9972: result: $ac_ct_NCURSES_CONFIG" >&5
9973 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9975 echo "$as_me:9975: result: no" >&5
9976 echo "${ECHO_T}no" >&6
9979 test -n "$ac_ct_NCURSES_CONFIG" && break
9981 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9983 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9986 if test "$NCURSES_CONFIG" != none ; then
9988 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9990 case "x$cf_add_cflags" in
9993 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9996 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'`
9997 test "$CFLAGS" != "$cf_old_cflag" || break
9999 CFLAGS="$cf_old_cflag"
10002 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10005 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'`
10006 test "$CPPFLAGS" != "$cf_old_cflag" || break
10008 CPPFLAGS="$cf_old_cflag"
10017 cf_new_extra_cppflags=
10019 for cf_add_cflags in $cf_add_cflags
10021 case "$cf_fix_cppflags" in
10023 case "$cf_add_cflags" in
10024 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10025 case "$cf_add_cflags" in
10027 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10029 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10030 && test -z "${cf_tst_cflags}" \
10031 && cf_fix_cppflags=yes
10033 if test "$cf_fix_cppflags" = yes ; then
10035 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10036 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039 elif test "${cf_tst_cflags}" = "\"'" ; then
10041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10048 case "$CPPFLAGS" in
10052 case "$cf_add_cflags" in
10054 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10056 CPPFLAGS=`echo "$CPPFLAGS" | \
10057 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10058 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10063 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10064 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10071 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10072 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10079 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10080 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10082 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10084 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10085 && test -z "${cf_tst_cflags}" \
10086 && cf_fix_cppflags=no
10091 if test -n "$cf_new_cflags" ; then
10093 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10094 CFLAGS="${CFLAGS}$cf_new_cflags"
10098 if test -n "$cf_new_cppflags" ; then
10100 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10101 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10105 if test -n "$cf_new_extra_cppflags" ; then
10107 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10108 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10114 cf_add_libs="$LIBS"
10117 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10118 # filter duplicates
10119 for cf_add_1lib in $cf_add_0lib; do
10120 for cf_add_2lib in $cf_add_libs; do
10121 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10126 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10128 LIBS="$cf_add_libs"
10130 # even with config script, some packages use no-override for curses.h
10132 echo "$as_me:10132: checking if we have identified curses headers" >&5
10133 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10134 if test "${cf_cv_ncurses_header+set}" = set; then
10135 echo $ECHO_N "(cached) $ECHO_C" >&6
10138 cf_cv_ncurses_header=none
10140 ncurses.h ncurses/ncurses.h \
10141 curses.h ncurses/curses.h
10143 cat >"conftest.$ac_ext" <<_ACEOF
10144 #line 10144 "configure"
10145 #include "confdefs.h"
10146 #include <${cf_header}>
10150 initscr(); endwin()
10155 rm -f "conftest.$ac_objext"
10156 if { (eval echo "$as_me:10156: \"$ac_compile\"") >&5
10157 (eval $ac_compile) 2>&5
10159 echo "$as_me:10159: \$? = $ac_status" >&5
10160 (exit "$ac_status"); } &&
10161 { ac_try='test -s "conftest.$ac_objext"'
10162 { (eval echo "$as_me:10162: \"$ac_try\"") >&5
10163 (eval $ac_try) 2>&5
10165 echo "$as_me:10165: \$? = $ac_status" >&5
10166 (exit "$ac_status"); }; }; then
10167 cf_cv_ncurses_header=$cf_header; break
10169 echo "$as_me: failed program was:" >&5
10170 cat "conftest.$ac_ext" >&5
10172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10176 echo "$as_me:10176: result: $cf_cv_ncurses_header" >&5
10177 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10179 if test "$cf_cv_ncurses_header" = none ; then
10180 { { echo "$as_me:10180: error: No curses header-files found" >&5
10181 echo "$as_me: error: No curses header-files found" >&2;}
10182 { (exit 1); exit 1; }; }
10185 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10187 for ac_header in $cf_cv_ncurses_header
10189 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10190 echo "$as_me:10190: checking for $ac_header" >&5
10191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10193 echo $ECHO_N "(cached) $ECHO_C" >&6
10195 cat >"conftest.$ac_ext" <<_ACEOF
10196 #line 10196 "configure"
10197 #include "confdefs.h"
10198 #include <$ac_header>
10200 if { (eval echo "$as_me:10200: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10201 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10203 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10205 cat conftest.err >&5
10206 echo "$as_me:10206: \$? = $ac_status" >&5
10207 (exit "$ac_status"); } >/dev/null; then
10208 if test -s conftest.err; then
10209 ac_cpp_err=$ac_c_preproc_warn_flag
10216 if test -z "$ac_cpp_err"; then
10217 eval "$as_ac_Header=yes"
10219 echo "$as_me: failed program was:" >&5
10220 cat "conftest.$ac_ext" >&5
10221 eval "$as_ac_Header=no"
10223 rm -f conftest.err "conftest.$ac_ext"
10225 echo "$as_me:10225: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10226 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10227 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10228 cat >>confdefs.h <<EOF
10229 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10235 cat >>confdefs.h <<\EOF
10239 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10241 cat >>confdefs.h <<EOF
10242 #define $cf_nculib_ROOT 1
10245 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10249 cf_ncuhdr_root=ncurses
10251 test -n "$cf_cv_curses_dir" && \
10252 test "$cf_cv_curses_dir" != "no" && { \
10254 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10255 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10257 while test "$cf_add_incdir" != /usr/include
10259 if test -d "$cf_add_incdir"
10262 if test -n "$CFLAGS$CPPFLAGS" ; then
10263 # a loop is needed to ensure we can add subdirs of existing dirs
10264 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10265 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10266 cf_have_incdir=yes; break
10271 if test "$cf_have_incdir" = no ; then
10272 if test "$cf_add_incdir" = /usr/local/include ; then
10273 if test "$GCC" = yes
10275 cf_save_CPPFLAGS=$CPPFLAGS
10277 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10278 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10280 cat >"conftest.$ac_ext" <<_ACEOF
10281 #line 10281 "configure"
10282 #include "confdefs.h"
10292 rm -f "conftest.$ac_objext"
10293 if { (eval echo "$as_me:10293: \"$ac_compile\"") >&5
10294 (eval $ac_compile) 2>&5
10296 echo "$as_me:10296: \$? = $ac_status" >&5
10297 (exit "$ac_status"); } &&
10298 { ac_try='test -s "conftest.$ac_objext"'
10299 { (eval echo "$as_me:10299: \"$ac_try\"") >&5
10300 (eval $ac_try) 2>&5
10302 echo "$as_me:10302: \$? = $ac_status" >&5
10303 (exit "$ac_status"); }; }; then
10306 echo "$as_me: failed program was:" >&5
10307 cat "conftest.$ac_ext" >&5
10310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10311 CPPFLAGS=$cf_save_CPPFLAGS
10316 if test "$cf_have_incdir" = no ; then
10317 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10319 echo "${as_me:-configure}:10319: testing adding $cf_add_incdir to include-path ..." 1>&5
10321 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10323 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10324 test "$cf_top_incdir" = "$cf_add_incdir" && break
10325 cf_add_incdir="$cf_top_incdir"
10338 echo "$as_me:10338: checking for $cf_ncuhdr_root header in include-path" >&5
10339 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10340 if test "${cf_cv_ncurses_h+set}" = set; then
10341 echo $ECHO_N "(cached) $ECHO_C" >&6
10344 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10345 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10346 for cf_header in $cf_header_list
10349 cat >"conftest.$ac_ext" <<_ACEOF
10350 #line 10350 "configure"
10351 #include "confdefs.h"
10353 #include <$cf_header>
10358 #ifdef NCURSES_VERSION
10360 printf("%s\\n", NCURSES_VERSION);
10365 #error __NCURSES_H is not defined
10373 rm -f "conftest.$ac_objext"
10374 if { (eval echo "$as_me:10374: \"$ac_compile\"") >&5
10375 (eval $ac_compile) 2>&5
10377 echo "$as_me:10377: \$? = $ac_status" >&5
10378 (exit "$ac_status"); } &&
10379 { ac_try='test -s "conftest.$ac_objext"'
10380 { (eval echo "$as_me:10380: \"$ac_try\"") >&5
10381 (eval $ac_try) 2>&5
10383 echo "$as_me:10383: \$? = $ac_status" >&5
10384 (exit "$ac_status"); }; }; then
10385 cf_cv_ncurses_h=$cf_header
10388 echo "$as_me: failed program was:" >&5
10389 cat "conftest.$ac_ext" >&5
10392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10394 test "$cf_cv_ncurses_h" != no && break
10398 echo "$as_me:10398: result: $cf_cv_ncurses_h" >&5
10399 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10401 if test "$cf_cv_ncurses_h" != no ; then
10402 cf_cv_ncurses_header=$cf_cv_ncurses_h
10405 echo "$as_me:10405: checking for $cf_ncuhdr_root include-path" >&5
10406 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10407 if test "${cf_cv_ncurses_h2+set}" = set; then
10408 echo $ECHO_N "(cached) $ECHO_C" >&6
10411 test -n "$verbose" && echo
10415 # collect the current set of include-directories from compiler flags
10416 cf_header_path_list=""
10417 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10418 for cf_header_path in $CPPFLAGS $CFLAGS
10420 case "$cf_header_path" in
10422 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10424 test "x$cf_header_path" != "xNONE" && \
10425 test -d "$cf_header_path" && \
10427 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10428 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10429 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10430 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10431 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10432 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"
10435 cf_header_path_list="$cf_header_path_list $cf_search"
10441 # add the variations for the package we are looking for
10445 test "x$prefix" != "xNONE" && \
10446 test -d "$prefix" && \
10448 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10449 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10450 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10451 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10452 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10453 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10456 for cf_subdir_prefix in \
10465 test "x$cf_subdir_prefix" != "x$prefix" && \
10466 test -d "$cf_subdir_prefix" && \
10467 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10468 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10469 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10470 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10471 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10472 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10473 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"
10478 test "$includedir" != NONE && \
10479 test "$includedir" != "/usr/include" && \
10480 test -d "$includedir" && {
10481 test -d "$includedir" && cf_search="$cf_search $includedir"
10482 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10485 test "$oldincludedir" != NONE && \
10486 test "$oldincludedir" != "/usr/include" && \
10487 test -d "$oldincludedir" && {
10488 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10489 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10492 cf_search="$cf_search $cf_header_path_list"
10494 test -n "$verbose" && echo "search path $cf_search"
10495 cf_save2_CPPFLAGS="$CPPFLAGS"
10496 for cf_incdir in $cf_search
10499 if test -n "$cf_incdir" ; then
10500 for cf_add_incdir in $cf_incdir
10502 while test "$cf_add_incdir" != /usr/include
10504 if test -d "$cf_add_incdir"
10507 if test -n "$CFLAGS$CPPFLAGS" ; then
10508 # a loop is needed to ensure we can add subdirs of existing dirs
10509 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10510 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10511 cf_have_incdir=yes; break
10516 if test "$cf_have_incdir" = no ; then
10517 if test "$cf_add_incdir" = /usr/local/include ; then
10518 if test "$GCC" = yes
10520 cf_save_CPPFLAGS=$CPPFLAGS
10522 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10523 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10525 cat >"conftest.$ac_ext" <<_ACEOF
10526 #line 10526 "configure"
10527 #include "confdefs.h"
10537 rm -f "conftest.$ac_objext"
10538 if { (eval echo "$as_me:10538: \"$ac_compile\"") >&5
10539 (eval $ac_compile) 2>&5
10541 echo "$as_me:10541: \$? = $ac_status" >&5
10542 (exit "$ac_status"); } &&
10543 { ac_try='test -s "conftest.$ac_objext"'
10544 { (eval echo "$as_me:10544: \"$ac_try\"") >&5
10545 (eval $ac_try) 2>&5
10547 echo "$as_me:10547: \$? = $ac_status" >&5
10548 (exit "$ac_status"); }; }; then
10551 echo "$as_me: failed program was:" >&5
10552 cat "conftest.$ac_ext" >&5
10555 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10556 CPPFLAGS=$cf_save_CPPFLAGS
10561 if test "$cf_have_incdir" = no ; then
10562 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10564 echo "${as_me:-configure}:10564: testing adding $cf_add_incdir to include-path ..." 1>&5
10566 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10568 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10569 test "$cf_top_incdir" = "$cf_add_incdir" && break
10570 cf_add_incdir="$cf_top_incdir"
10586 cat >"conftest.$ac_ext" <<_ACEOF
10587 #line 10587 "configure"
10588 #include "confdefs.h"
10590 #include <$cf_header>
10595 #ifdef NCURSES_VERSION
10597 printf("%s\\n", NCURSES_VERSION);
10602 #error __NCURSES_H is not defined
10610 rm -f "conftest.$ac_objext"
10611 if { (eval echo "$as_me:10611: \"$ac_compile\"") >&5
10612 (eval $ac_compile) 2>&5
10614 echo "$as_me:10614: \$? = $ac_status" >&5
10615 (exit "$ac_status"); } &&
10616 { ac_try='test -s "conftest.$ac_objext"'
10617 { (eval echo "$as_me:10617: \"$ac_try\"") >&5
10618 (eval $ac_try) 2>&5
10620 echo "$as_me:10620: \$? = $ac_status" >&5
10621 (exit "$ac_status"); }; }; then
10622 cf_cv_ncurses_h2=$cf_header
10625 echo "$as_me: failed program was:" >&5
10626 cat "conftest.$ac_ext" >&5
10627 cf_cv_ncurses_h2=no
10629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10631 if test "$cf_cv_ncurses_h2" != no ; then
10632 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10633 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10636 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10638 CPPFLAGS="$cf_save2_CPPFLAGS"
10639 test "$cf_cv_ncurses_h2" != no && break
10641 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10641: error: not found" >&5
10642 echo "$as_me: error: not found" >&2;}
10643 { (exit 1); exit 1; }; }
10646 echo "$as_me:10646: result: $cf_cv_ncurses_h2" >&5
10647 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10649 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10650 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10651 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10652 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10655 if test -n "$cf_1st_incdir" ; then
10656 for cf_add_incdir in $cf_1st_incdir
10658 while test "$cf_add_incdir" != /usr/include
10660 if test -d "$cf_add_incdir"
10663 if test -n "$CFLAGS$CPPFLAGS" ; then
10664 # a loop is needed to ensure we can add subdirs of existing dirs
10665 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10666 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10667 cf_have_incdir=yes; break
10672 if test "$cf_have_incdir" = no ; then
10673 if test "$cf_add_incdir" = /usr/local/include ; then
10674 if test "$GCC" = yes
10676 cf_save_CPPFLAGS=$CPPFLAGS
10678 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10679 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10681 cat >"conftest.$ac_ext" <<_ACEOF
10682 #line 10682 "configure"
10683 #include "confdefs.h"
10693 rm -f "conftest.$ac_objext"
10694 if { (eval echo "$as_me:10694: \"$ac_compile\"") >&5
10695 (eval $ac_compile) 2>&5
10697 echo "$as_me:10697: \$? = $ac_status" >&5
10698 (exit "$ac_status"); } &&
10699 { ac_try='test -s "conftest.$ac_objext"'
10700 { (eval echo "$as_me:10700: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10703 echo "$as_me:10703: \$? = $ac_status" >&5
10704 (exit "$ac_status"); }; }; then
10707 echo "$as_me: failed program was:" >&5
10708 cat "conftest.$ac_ext" >&5
10711 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10712 CPPFLAGS=$cf_save_CPPFLAGS
10717 if test "$cf_have_incdir" = no ; then
10718 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10720 echo "${as_me:-configure}:10720: testing adding $cf_add_incdir to include-path ..." 1>&5
10722 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10724 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10725 test "$cf_top_incdir" = "$cf_add_incdir" && break
10726 cf_add_incdir="$cf_top_incdir"
10739 # Set definitions to allow ifdef'ing for ncurses.h
10741 case "$cf_cv_ncurses_header" in
10744 cat >>confdefs.h <<\EOF
10745 #define HAVE_NCURSES_H 1
10751 case "$cf_cv_ncurses_header" in
10752 (ncurses/curses.h|ncurses/ncurses.h)
10754 cat >>confdefs.h <<\EOF
10755 #define HAVE_NCURSES_NCURSES_H 1
10759 (ncursesw/curses.h|ncursesw/ncurses.h)
10761 cat >>confdefs.h <<\EOF
10762 #define HAVE_NCURSESW_NCURSES_H 1
10768 echo "$as_me:10768: checking for terminfo header" >&5
10769 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10770 if test "${cf_cv_term_header+set}" = set; then
10771 echo $ECHO_N "(cached) $ECHO_C" >&6
10774 case "${cf_cv_ncurses_header}" in
10775 (*/ncurses.h|*/ncursesw.h)
10776 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10779 cf_term_header=term.h
10783 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10785 cat >"conftest.$ac_ext" <<_ACEOF
10786 #line 10786 "configure"
10787 #include "confdefs.h"
10789 #include <${cf_cv_ncurses_header:-curses.h}>
10790 #include <$cf_test>
10795 int x = auto_left_margin; (void)x
10800 rm -f "conftest.$ac_objext"
10801 if { (eval echo "$as_me:10801: \"$ac_compile\"") >&5
10802 (eval $ac_compile) 2>&5
10804 echo "$as_me:10804: \$? = $ac_status" >&5
10805 (exit "$ac_status"); } &&
10806 { ac_try='test -s "conftest.$ac_objext"'
10807 { (eval echo "$as_me:10807: \"$ac_try\"") >&5
10808 (eval $ac_try) 2>&5
10810 echo "$as_me:10810: \$? = $ac_status" >&5
10811 (exit "$ac_status"); }; }; then
10813 cf_cv_term_header="$cf_test"
10815 echo "$as_me: failed program was:" >&5
10816 cat "conftest.$ac_ext" >&5
10818 cf_cv_term_header=unknown
10821 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10822 test "$cf_cv_term_header" != unknown && break
10826 echo "$as_me:10826: result: $cf_cv_term_header" >&5
10827 echo "${ECHO_T}$cf_cv_term_header" >&6
10829 # Set definitions to allow ifdef'ing to accommodate subdirectories
10831 case "$cf_cv_term_header" in
10834 cat >>confdefs.h <<\EOF
10835 #define HAVE_TERM_H 1
10841 case "$cf_cv_term_header" in
10844 cat >>confdefs.h <<\EOF
10845 #define HAVE_NCURSES_TERM_H 1
10851 cat >>confdefs.h <<\EOF
10852 #define HAVE_NCURSESW_TERM_H 1
10858 # some applications need this, but should check for NCURSES_VERSION
10860 cat >>confdefs.h <<\EOF
10864 echo "$as_me:10864: checking for ncurses version" >&5
10865 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10866 if test "${cf_cv_ncurses_version+set}" = set; then
10867 echo $ECHO_N "(cached) $ECHO_C" >&6
10870 cf_cv_ncurses_version=no
10872 rm -f "$cf_tempfile"
10873 if test "$cross_compiling" = yes; then
10875 # This will not work if the preprocessor splits the line after the
10876 # Autoconf token. The 'unproto' program does that.
10877 cat > "conftest.$ac_ext" <<EOF
10878 #include <${cf_cv_ncurses_header:-curses.h}>
10880 #ifdef NCURSES_VERSION
10881 Autoconf NCURSES_VERSION
10889 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10890 { (eval echo "$as_me:10890: \"$cf_try\"") >&5
10891 (eval $cf_try) 2>&5
10893 echo "$as_me:10893: \$? = $ac_status" >&5
10894 (exit "$ac_status"); }
10895 if test -f conftest.out ; then
10896 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10897 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10902 cat >"conftest.$ac_ext" <<_ACEOF
10903 #line 10903 "configure"
10904 #include "confdefs.h"
10906 $ac_includes_default
10908 #include <${cf_cv_ncurses_header:-curses.h}>
10912 FILE *fp = fopen("$cf_tempfile", "w");
10913 #ifdef NCURSES_VERSION
10914 # ifdef NCURSES_VERSION_PATCH
10915 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10917 fprintf(fp, "%s\\n", NCURSES_VERSION);
10920 # ifdef __NCURSES_H
10921 fprintf(fp, "old\\n");
10923 #error __NCURSES_H is not defined
10926 ${cf_cv_main_return:-return}(0);
10929 rm -f "conftest$ac_exeext"
10930 if { (eval echo "$as_me:10930: \"$ac_link\"") >&5
10931 (eval $ac_link) 2>&5
10933 echo "$as_me:10933: \$? = $ac_status" >&5
10934 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10935 { (eval echo "$as_me:10935: \"$ac_try\"") >&5
10936 (eval $ac_try) 2>&5
10938 echo "$as_me:10938: \$? = $ac_status" >&5
10939 (exit "$ac_status"); }; }; then
10941 cf_cv_ncurses_version=`cat $cf_tempfile`
10943 echo "$as_me: program exited with status $ac_status" >&5
10944 echo "$as_me: failed program was:" >&5
10945 cat "conftest.$ac_ext" >&5
10947 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10949 rm -f "$cf_tempfile"
10952 echo "$as_me:10952: result: $cf_cv_ncurses_version" >&5
10953 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10954 test "$cf_cv_ncurses_version" = no ||
10955 cat >>confdefs.h <<\EOF
10959 cf_nculib_root=ncurses
10960 # This works, except for the special case where we find gpm, but
10961 # ncurses is in a nonstandard location via $LIBS, and we really want
10964 cf_ncurses_SAVE="$LIBS"
10965 echo "$as_me:10965: checking for Gpm_Open in -lgpm" >&5
10966 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10967 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10968 echo $ECHO_N "(cached) $ECHO_C" >&6
10970 ac_check_lib_save_LIBS=$LIBS
10972 cat >"conftest.$ac_ext" <<_ACEOF
10973 #line 10973 "configure"
10974 #include "confdefs.h"
10976 /* Override any gcc2 internal prototype to avoid an error. */
10980 /* We use char because int might match the return type of a gcc2
10981 builtin and then its argument prototype would still apply. */
10991 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10992 if { (eval echo "$as_me:10992: \"$ac_link\"") >&5
10993 (eval $ac_link) 2>&5
10995 echo "$as_me:10995: \$? = $ac_status" >&5
10996 (exit "$ac_status"); } &&
10997 { ac_try='test -s "conftest$ac_exeext"'
10998 { (eval echo "$as_me:10998: \"$ac_try\"") >&5
10999 (eval $ac_try) 2>&5
11001 echo "$as_me:11001: \$? = $ac_status" >&5
11002 (exit "$ac_status"); }; }; then
11003 ac_cv_lib_gpm_Gpm_Open=yes
11005 echo "$as_me: failed program was:" >&5
11006 cat "conftest.$ac_ext" >&5
11007 ac_cv_lib_gpm_Gpm_Open=no
11009 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11010 LIBS=$ac_check_lib_save_LIBS
11012 echo "$as_me:11012: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11013 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11014 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11015 echo "$as_me:11015: checking for initscr in -lgpm" >&5
11016 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11017 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11020 ac_check_lib_save_LIBS=$LIBS
11022 cat >"conftest.$ac_ext" <<_ACEOF
11023 #line 11023 "configure"
11024 #include "confdefs.h"
11026 /* Override any gcc2 internal prototype to avoid an error. */
11030 /* We use char because int might match the return type of a gcc2
11031 builtin and then its argument prototype would still apply. */
11041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11042 if { (eval echo "$as_me:11042: \"$ac_link\"") >&5
11043 (eval $ac_link) 2>&5
11045 echo "$as_me:11045: \$? = $ac_status" >&5
11046 (exit "$ac_status"); } &&
11047 { ac_try='test -s "conftest$ac_exeext"'
11048 { (eval echo "$as_me:11048: \"$ac_try\"") >&5
11049 (eval $ac_try) 2>&5
11051 echo "$as_me:11051: \$? = $ac_status" >&5
11052 (exit "$ac_status"); }; }; then
11053 ac_cv_lib_gpm_initscr=yes
11055 echo "$as_me: failed program was:" >&5
11056 cat "conftest.$ac_ext" >&5
11057 ac_cv_lib_gpm_initscr=no
11059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11060 LIBS=$ac_check_lib_save_LIBS
11062 echo "$as_me:11062: result: $ac_cv_lib_gpm_initscr" >&5
11063 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11064 if test "$ac_cv_lib_gpm_initscr" = yes; then
11065 LIBS="$cf_ncurses_SAVE"
11067 cf_ncurses_LIBS="-lgpm"
11074 # This is only necessary if you are linking against an obsolete
11075 # version of ncurses (but it should do no harm, since it is static).
11076 if test "$cf_nculib_root" = ncurses ; then
11077 echo "$as_me:11077: checking for tgoto in -lmytinfo" >&5
11078 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11079 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11080 echo $ECHO_N "(cached) $ECHO_C" >&6
11082 ac_check_lib_save_LIBS=$LIBS
11083 LIBS="-lmytinfo $LIBS"
11084 cat >"conftest.$ac_ext" <<_ACEOF
11085 #line 11085 "configure"
11086 #include "confdefs.h"
11088 /* Override any gcc2 internal prototype to avoid an error. */
11092 /* We use char because int might match the return type of a gcc2
11093 builtin and then its argument prototype would still apply. */
11103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11104 if { (eval echo "$as_me:11104: \"$ac_link\"") >&5
11105 (eval $ac_link) 2>&5
11107 echo "$as_me:11107: \$? = $ac_status" >&5
11108 (exit "$ac_status"); } &&
11109 { ac_try='test -s "conftest$ac_exeext"'
11110 { (eval echo "$as_me:11110: \"$ac_try\"") >&5
11111 (eval $ac_try) 2>&5
11113 echo "$as_me:11113: \$? = $ac_status" >&5
11114 (exit "$ac_status"); }; }; then
11115 ac_cv_lib_mytinfo_tgoto=yes
11117 echo "$as_me: failed program was:" >&5
11118 cat "conftest.$ac_ext" >&5
11119 ac_cv_lib_mytinfo_tgoto=no
11121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11122 LIBS=$ac_check_lib_save_LIBS
11124 echo "$as_me:11124: result: $ac_cv_lib_mytinfo_tgoto" >&5
11125 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11126 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11127 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11134 cf_add_libs="$LIBS"
11137 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11138 # filter duplicates
11139 for cf_add_1lib in $cf_add_0lib; do
11140 for cf_add_2lib in $cf_add_libs; do
11141 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11146 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11148 LIBS="$cf_add_libs"
11150 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11153 cf_add_libs="$LIBS"
11156 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11157 # filter duplicates
11158 for cf_add_1lib in $cf_add_0lib; do
11159 for cf_add_2lib in $cf_add_libs; do
11160 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11165 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11167 LIBS="$cf_add_libs"
11171 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11173 echo "$as_me:11173: checking for initscr" >&5
11174 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11175 if test "${ac_cv_func_initscr+set}" = set; then
11176 echo $ECHO_N "(cached) $ECHO_C" >&6
11178 cat >"conftest.$ac_ext" <<_ACEOF
11179 #line 11179 "configure"
11180 #include "confdefs.h"
11181 #define initscr autoconf_temporary
11182 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11189 /* We use char because int might match the return type of a gcc2
11190 builtin and then its argument prototype would still apply. */
11191 char initscr (void);
11197 /* The GNU C library defines stubs for functions which it implements
11198 to always fail with ENOSYS. Some functions are actually named
11199 something starting with __ and the normal name is an alias. */
11200 #if defined (__stub_initscr) || defined (__stub___initscr)
11201 #error found stub for initscr
11209 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11210 if { (eval echo "$as_me:11210: \"$ac_link\"") >&5
11211 (eval $ac_link) 2>&5
11213 echo "$as_me:11213: \$? = $ac_status" >&5
11214 (exit "$ac_status"); } &&
11215 { ac_try='test -s "conftest$ac_exeext"'
11216 { (eval echo "$as_me:11216: \"$ac_try\"") >&5
11217 (eval $ac_try) 2>&5
11219 echo "$as_me:11219: \$? = $ac_status" >&5
11220 (exit "$ac_status"); }; }; then
11221 ac_cv_func_initscr=yes
11223 echo "$as_me: failed program was:" >&5
11224 cat "conftest.$ac_ext" >&5
11225 ac_cv_func_initscr=no
11227 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11229 echo "$as_me:11229: result: $ac_cv_func_initscr" >&5
11230 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11231 if test "$ac_cv_func_initscr" = yes; then
11232 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11235 cf_save_LIBS="$LIBS"
11236 echo "$as_me:11236: checking for initscr in -l$cf_nculib_root" >&5
11237 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11238 LIBS="-l$cf_nculib_root $LIBS"
11239 cat >"conftest.$ac_ext" <<_ACEOF
11240 #line 11240 "configure"
11241 #include "confdefs.h"
11242 #include <${cf_cv_ncurses_header:-curses.h}>
11251 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11252 if { (eval echo "$as_me:11252: \"$ac_link\"") >&5
11253 (eval $ac_link) 2>&5
11255 echo "$as_me:11255: \$? = $ac_status" >&5
11256 (exit "$ac_status"); } &&
11257 { ac_try='test -s "conftest$ac_exeext"'
11258 { (eval echo "$as_me:11258: \"$ac_try\"") >&5
11259 (eval $ac_try) 2>&5
11261 echo "$as_me:11261: \$? = $ac_status" >&5
11262 (exit "$ac_status"); }; }; then
11263 echo "$as_me:11263: result: yes" >&5
11264 echo "${ECHO_T}yes" >&6
11265 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11268 echo "$as_me: failed program was:" >&5
11269 cat "conftest.$ac_ext" >&5
11270 echo "$as_me:11270: result: no" >&5
11271 echo "${ECHO_T}no" >&6
11274 cf_library_path_list=""
11275 if test -n "${LDFLAGS}${LIBS}" ; then
11276 for cf_library_path in $LDFLAGS $LIBS
11278 case "$cf_library_path" in
11280 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11282 test "x$cf_library_path" != "xNONE" && \
11283 test -d "$cf_library_path" && \
11285 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11286 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11287 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11288 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11289 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11290 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"
11293 cf_library_path_list="$cf_library_path_list $cf_search"
11301 test "x$prefix" != "xNONE" && \
11302 test -d "$prefix" && \
11304 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11305 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11306 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11307 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11308 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11309 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11312 for cf_subdir_prefix in \
11321 test "x$cf_subdir_prefix" != "x$prefix" && \
11322 test -d "$cf_subdir_prefix" && \
11323 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11324 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11325 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11326 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11327 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11328 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11329 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"
11334 cf_search="$cf_library_path_list $cf_search"
11336 for cf_libdir in $cf_search
11338 echo "$as_me:11338: checking for -l$cf_nculib_root in $cf_libdir" >&5
11339 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11340 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11341 cat >"conftest.$ac_ext" <<_ACEOF
11342 #line 11342 "configure"
11343 #include "confdefs.h"
11344 #include <${cf_cv_ncurses_header:-curses.h}>
11353 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11354 if { (eval echo "$as_me:11354: \"$ac_link\"") >&5
11355 (eval $ac_link) 2>&5
11357 echo "$as_me:11357: \$? = $ac_status" >&5
11358 (exit "$ac_status"); } &&
11359 { ac_try='test -s "conftest$ac_exeext"'
11360 { (eval echo "$as_me:11360: \"$ac_try\"") >&5
11361 (eval $ac_try) 2>&5
11363 echo "$as_me:11363: \$? = $ac_status" >&5
11364 (exit "$ac_status"); }; }; then
11365 echo "$as_me:11365: result: yes" >&5
11366 echo "${ECHO_T}yes" >&6
11367 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11370 echo "$as_me: failed program was:" >&5
11371 cat "conftest.$ac_ext" >&5
11372 echo "$as_me:11372: result: no" >&5
11373 echo "${ECHO_T}no" >&6
11374 LIBS="$cf_save_LIBS"
11376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11380 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11384 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11386 if test "$cf_found_library" = no ; then
11387 { { echo "$as_me:11387: error: Cannot link $cf_nculib_root library" >&5
11388 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11389 { (exit 1); exit 1; }; }
11394 if test -n "$cf_ncurses_LIBS" ; then
11395 echo "$as_me:11395: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11396 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11397 cf_ncurses_SAVE="$LIBS"
11398 for p in $cf_ncurses_LIBS ; do
11399 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11400 if test "$q" != "$LIBS" ; then
11404 cat >"conftest.$ac_ext" <<_ACEOF
11405 #line 11405 "configure"
11406 #include "confdefs.h"
11407 #include <${cf_cv_ncurses_header:-curses.h}>
11411 initscr(); mousemask(0,0); tigetstr((char *)0);
11416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11417 if { (eval echo "$as_me:11417: \"$ac_link\"") >&5
11418 (eval $ac_link) 2>&5
11420 echo "$as_me:11420: \$? = $ac_status" >&5
11421 (exit "$ac_status"); } &&
11422 { ac_try='test -s "conftest$ac_exeext"'
11423 { (eval echo "$as_me:11423: \"$ac_try\"") >&5
11424 (eval $ac_try) 2>&5
11426 echo "$as_me:11426: \$? = $ac_status" >&5
11427 (exit "$ac_status"); }; }; then
11428 echo "$as_me:11428: result: yes" >&5
11429 echo "${ECHO_T}yes" >&6
11431 echo "$as_me: failed program was:" >&5
11432 cat "conftest.$ac_ext" >&5
11433 echo "$as_me:11433: result: no" >&5
11434 echo "${ECHO_T}no" >&6
11435 LIBS="$cf_ncurses_SAVE"
11437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11440 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11442 cat >>confdefs.h <<EOF
11443 #define $cf_nculib_ROOT 1
11448 NCURSES_CONFIG=none
11453 if test "$NCURSES_CONFIG_PKG" != none ; then
11454 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11456 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11457 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11458 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11460 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11461 if test -z "$cf_cv_abi_version"
11463 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11466 elif test "$NCURSES_CONFIG" != none ; then
11468 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11470 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11471 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11472 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11474 # ABI version is not available from headers
11475 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11479 for cf_name in MAJOR MINOR PATCH
11481 cat >conftest.$ac_ext <<CF_EOF
11482 #include <${cf_cv_ncurses_header:-curses.h}>
11483 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11485 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11486 { (eval echo "$as_me:11486: \"$cf_try\"") >&5
11487 (eval $cf_try) 2>&5
11489 echo "$as_me:11489: \$? = $ac_status" >&5
11490 (exit "$ac_status"); }
11491 if test -f conftest.out ; then
11492 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11493 eval NCURSES_$cf_name=\"$cf_result\"
11494 # cat conftest.$ac_ext
11499 cf_cv_abi_version=${NCURSES_MAJOR}
11503 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11505 cf_cv_timestamp=`date`
11507 echo "$as_me:11507: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11508 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11510 echo "$as_me:11510: checking if you want to have a library-prefix" >&5
11511 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11513 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11514 if test "${with_lib_prefix+set}" = set; then
11515 withval="$with_lib_prefix"
11516 with_lib_prefix=$withval
11518 with_lib_prefix=auto
11520 echo "$as_me:11520: result: $with_lib_prefix" >&5
11521 echo "${ECHO_T}$with_lib_prefix" >&6
11523 if test "$with_lib_prefix" = auto
11526 case "$cf_cv_system_name" in
11528 if test "$DFT_LWR_MODEL" = libtool; then
11537 (*) LIB_PREFIX='lib'
11540 cf_prefix=$LIB_PREFIX
11542 elif test "$with_lib_prefix" = no
11546 LIB_PREFIX=$with_lib_prefix
11551 ###############################################################################
11553 if test X"$CC_G_OPT" = X"" ; then
11555 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11558 echo "$as_me:11558: checking for default loader flags" >&5
11559 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11560 case $DFT_LWR_MODEL in
11561 (normal) LD_MODEL='' ;;
11562 (debug) LD_MODEL=$CC_G_OPT ;;
11563 (profile) LD_MODEL='-pg';;
11564 (shared) LD_MODEL='' ;;
11566 echo "$as_me:11566: result: $LD_MODEL" >&5
11567 echo "${ECHO_T}$LD_MODEL" >&6
11570 if test "x$cf_cv_enable_rpath" != xno
11572 echo "$as_me:11572: checking for an rpath option" >&5
11573 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11574 case "$cf_cv_system_name" in
11576 if test "$GCC" = yes; then
11577 LD_RPATH_OPT="-Wl,-rpath,"
11579 LD_RPATH_OPT="-rpath "
11582 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11583 LD_RPATH_OPT="-Wl,-rpath,"
11585 (openbsd[2-9].*|mirbsd*)
11586 LD_RPATH_OPT="-Wl,-rpath,"
11589 LD_RPATH_OPT="-rpath "
11592 LD_RPATH_OPT="-Wl,-rpath,"
11595 LD_RPATH_OPT="-rpath "
11603 echo "$as_me:11603: result: $LD_RPATH_OPT" >&5
11604 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11606 case "x$LD_RPATH_OPT" in
11608 echo "$as_me:11608: checking if we need a space after rpath option" >&5
11609 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11610 cf_save_LIBS="$LIBS"
11612 cf_add_libs="$LIBS"
11615 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11616 # filter duplicates
11617 for cf_add_1lib in $cf_add_0lib; do
11618 for cf_add_2lib in $cf_add_libs; do
11619 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11624 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11626 LIBS="$cf_add_libs"
11628 cat >"conftest.$ac_ext" <<_ACEOF
11629 #line 11629 "configure"
11630 #include "confdefs.h"
11640 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11641 if { (eval echo "$as_me:11641: \"$ac_link\"") >&5
11642 (eval $ac_link) 2>&5
11644 echo "$as_me:11644: \$? = $ac_status" >&5
11645 (exit "$ac_status"); } &&
11646 { ac_try='test -s "conftest$ac_exeext"'
11647 { (eval echo "$as_me:11647: \"$ac_try\"") >&5
11648 (eval $ac_try) 2>&5
11650 echo "$as_me:11650: \$? = $ac_status" >&5
11651 (exit "$ac_status"); }; }; then
11654 echo "$as_me: failed program was:" >&5
11655 cat "conftest.$ac_ext" >&5
11658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11659 LIBS="$cf_save_LIBS"
11660 echo "$as_me:11660: result: $cf_rpath_space" >&5
11661 echo "${ECHO_T}$cf_rpath_space" >&6
11662 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11671 INSTALL_LIB="-m 644"
11672 : ${rel_builddir:=.}
11678 cf_cv_do_symlinks=no
11680 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11682 echo "$as_me:11682: checking if release/abi version should be used for shared libs" >&5
11683 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11685 # Check whether --with-shlib-version or --without-shlib-version was given.
11686 if test "${with_shlib_version+set}" = set; then
11687 withval="$with_shlib_version"
11688 test -z "$withval" && withval=auto
11691 cf_cv_shlib_version=auto
11694 cf_cv_shlib_version=$withval
11697 echo "$as_me:11697: result: $withval" >&5
11698 echo "${ECHO_T}$withval" >&6
11699 { { echo "$as_me:11699: error: option value must be one of: rel, abi, or auto" >&5
11700 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11701 { (exit 1); exit 1; }; }
11706 cf_cv_shlib_version=auto
11708 echo "$as_me:11708: result: $cf_cv_shlib_version" >&5
11709 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11711 cf_cv_rm_so_locs=no
11714 # Some less-capable ports of gcc support only -fpic
11718 if test "$GCC" = yes
11722 case "$cf_cv_system_name" in
11723 (*linux*) # e.g., PGI compiler
11729 if test "$cf_try_fPIC" = yes
11731 echo "$as_me:11731: checking which $CC option to use" >&5
11732 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11733 cf_save_CFLAGS="$CFLAGS"
11734 for CC_SHARED_OPTS in -fPIC -fpic ''
11736 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11737 cat >"conftest.$ac_ext" <<_ACEOF
11738 #line 11738 "configure"
11739 #include "confdefs.h"
11749 rm -f "conftest.$ac_objext"
11750 if { (eval echo "$as_me:11750: \"$ac_compile\"") >&5
11751 (eval $ac_compile) 2>&5
11753 echo "$as_me:11753: \$? = $ac_status" >&5
11754 (exit "$ac_status"); } &&
11755 { ac_try='test -s "conftest.$ac_objext"'
11756 { (eval echo "$as_me:11756: \"$ac_try\"") >&5
11757 (eval $ac_try) 2>&5
11759 echo "$as_me:11759: \$? = $ac_status" >&5
11760 (exit "$ac_status"); }; }; then
11763 echo "$as_me: failed program was:" >&5
11764 cat "conftest.$ac_ext" >&5
11766 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11768 echo "$as_me:11768: result: $CC_SHARED_OPTS" >&5
11769 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11770 CFLAGS="$cf_save_CFLAGS"
11773 cf_cv_shlib_version_infix=no
11775 case "$cf_cv_system_name" in
11776 (aix4.3-9*|aix[5-7]*)
11777 if test "$GCC" = yes; then
11778 CC_SHARED_OPTS='-Wl,-brtl'
11779 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11781 CC_SHARED_OPTS='-brtl'
11782 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11783 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11787 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11791 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11792 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11793 cf_cv_shlib_version=cygdll
11794 cf_cv_shlib_version_infix=cygdll
11797 cat >mk_shared_lib.sh <<-CF_EOF
11800 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11803 Linking shared library
11804 ** SHARED_LIB \$SHARED_LIB
11805 ** IMPORT_LIB \$IMPORT_LIB
11807 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11809 chmod +x mk_shared_lib.sh
11813 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11814 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11815 cf_cv_shlib_version=msysdll
11816 cf_cv_shlib_version_infix=msysdll
11819 cat >mk_shared_lib.sh <<-CF_EOF
11822 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11825 Linking shared library
11826 ** SHARED_LIB \$SHARED_LIB
11827 ** IMPORT_LIB \$IMPORT_LIB
11829 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11831 chmod +x mk_shared_lib.sh
11834 cf_try_cflags="no-cpp-precomp"
11835 CC_SHARED_OPTS="-dynamic"
11836 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11837 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11838 cf_cv_shlib_version_infix=yes
11839 echo "$as_me:11839: checking if ld -search_paths_first works" >&5
11840 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11841 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11842 echo $ECHO_N "(cached) $ECHO_C" >&6
11845 cf_save_LDFLAGS=$LDFLAGS
11846 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11847 cat >"conftest.$ac_ext" <<_ACEOF
11848 #line 11848 "configure"
11849 #include "confdefs.h"
11859 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11860 if { (eval echo "$as_me:11860: \"$ac_link\"") >&5
11861 (eval $ac_link) 2>&5
11863 echo "$as_me:11863: \$? = $ac_status" >&5
11864 (exit "$ac_status"); } &&
11865 { ac_try='test -s "conftest$ac_exeext"'
11866 { (eval echo "$as_me:11866: \"$ac_try\"") >&5
11867 (eval $ac_try) 2>&5
11869 echo "$as_me:11869: \$? = $ac_status" >&5
11870 (exit "$ac_status"); }; }; then
11871 cf_cv_ldflags_search_paths_first=yes
11873 echo "$as_me: failed program was:" >&5
11874 cat "conftest.$ac_ext" >&5
11875 cf_cv_ldflags_search_paths_first=no
11877 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11878 LDFLAGS=$cf_save_LDFLAGS
11880 echo "$as_me:11880: result: $cf_cv_ldflags_search_paths_first" >&5
11881 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11882 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11883 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11888 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11889 if test "$cf_cv_shlib_version" = rel; then
11890 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11892 cf_cv_shared_soname='`basename $@`'
11895 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11898 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11899 if test "$GCC" != yes; then
11900 CC_SHARED_OPTS='+Z'
11902 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11903 INSTALL_LIB="-m 555"
11906 # (tested with gcc 2.7.2 -- I don't have c89)
11907 if test "$GCC" = yes; then
11908 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11910 CC_SHARED_OPTS='+Z'
11911 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11913 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11914 # HP-UX shared libraries must be executable, and should be
11915 # readonly to exploit a quirk in the memory manager.
11916 INSTALL_LIB="-m 555"
11919 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11920 if test "$cf_cv_shlib_version" = rel; then
11921 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11923 cf_shared_soname='`basename $@`'
11926 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11929 if test "$cf_cv_enable_rpath" = yes ; then
11930 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11932 # tested with IRIX 5.2 and 'cc'.
11933 if test "$GCC" != yes; then
11934 CC_SHARED_OPTS='-KPIC'
11935 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11937 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11939 cf_cv_rm_so_locs=yes
11941 (linux*|gnu*|k*bsd*-gnu)
11942 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11943 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11944 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11946 if test "$cf_cv_enable_rpath" = yes ; then
11947 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11950 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11951 if test "$cf_cv_shlib_version" = rel; then
11952 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11954 cf_cv_shared_soname='`basename $@`'
11957 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11960 cf_cv_shlib_version=msvcdll
11961 cf_cv_shlib_version_infix=msvcdll
11964 if test "$DFT_LWR_MODEL" = "shared" ; then
11965 LOCAL_LDFLAGS="-link -dll"
11966 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11967 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11970 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11971 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11972 cat >mk_shared_lib.sh <<-CF_EOF
11975 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11980 Linking shared library
11981 ** SHARED LIB \$SHARED_LIB
11982 ** IMPORT_LIB \$IMPORT_LIB
11984 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11985 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11986 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11988 chmod +x mk_shared_lib.sh
11989 cat >mk_prog.sh <<-CF_EOF
11992 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11995 ldopts=("/subsystem:console")
11998 while test \$# -gt 0; do
12001 # ignore -link argument
12004 # ignore runtime-library option
12019 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12022 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12028 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12029 ldopts+=("\${linkarg}")
12037 ldopts+=("-out:\$1")
12046 if [ "\$isdll" -ne 0 ]; then
12047 for lib in \${libs[*]}; do
12048 ldopts+=("\$lib.dll.lib")
12051 for lib in \${libs[*]}; do
12052 ldopts+=("\$lib.lib")
12057 ** ld options: "\${ldopts[@]}"
12059 exec \$LD \${ldopts[@]}
12061 chmod +x mk_prog.sh
12062 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12063 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12066 cf_cv_shlib_version=mingw
12067 cf_cv_shlib_version_infix=mingw
12070 if test "$DFT_LWR_MODEL" = "shared" ; then
12071 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12072 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12073 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12076 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12077 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12078 cat >mk_shared_lib.sh <<-CF_EOF
12081 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12084 Linking shared library
12085 ** SHARED_LIB \$SHARED_LIB
12086 ** IMPORT_LIB \$IMPORT_LIB
12088 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12090 chmod +x mk_shared_lib.sh
12092 (openbsd[2-9].*|mirbsd*)
12093 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12094 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12095 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12097 if test "$cf_cv_enable_rpath" = yes ; then
12098 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12100 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12102 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12103 if test "$cf_cv_shlib_version" = rel; then
12104 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12106 cf_cv_shared_soname='`basename $@`'
12109 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12113 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12117 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12119 (nto-qnx*|openbsd*|freebsd[12].*)
12120 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12121 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12122 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12124 (dragonfly*|freebsd*)
12125 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12126 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12127 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12128 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12129 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12132 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12133 if test "$cf_cv_shlib_version" = rel; then
12134 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12136 cf_cv_shared_soname='`basename $@`'
12139 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12142 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12143 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12144 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12145 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12146 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12147 if test "$cf_cv_shlib_version" = auto; then
12148 if test -f /usr/libexec/ld.elf_so; then
12149 cf_cv_shlib_version=abi
12151 cf_cv_shlib_version=rel
12155 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12156 if test "$cf_cv_shlib_version" = rel; then
12157 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12159 cf_cv_shared_soname='`basename $@`'
12162 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12164 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12168 # tested with OSF/1 V3.2 and 'cc'
12169 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12170 # link with shared libs).
12171 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12174 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12177 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12178 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12179 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12180 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12182 cf_cv_rm_so_locs=yes
12184 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12185 # tested with osr5.0.5
12186 if test "$GCC" != yes; then
12187 CC_SHARED_OPTS='-belf -KPIC'
12189 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12190 if test "$cf_cv_enable_rpath" = yes ; then
12191 # only way is to set LD_RUN_PATH but no switch for it
12194 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12195 LINK_PROGS='LD_RUN_PATH=${libdir}'
12196 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12199 # tested with SunOS 4.1.1 and gcc 2.7.0
12200 if test "$GCC" != yes; then
12201 CC_SHARED_OPTS='-KPIC'
12203 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12204 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12207 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12208 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12209 if test "$DFT_LWR_MODEL" = "shared" ; then
12210 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12211 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12213 if test "$cf_cv_enable_rpath" = yes ; then
12214 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12217 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12218 if test "$cf_cv_shlib_version" = rel; then
12219 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12221 cf_cv_shared_soname='`basename $@`'
12224 if test "$GCC" != yes; then
12225 cf_save_CFLAGS="$CFLAGS"
12226 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12228 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12229 cat >"conftest.$ac_ext" <<_ACEOF
12230 #line 12230 "configure"
12231 #include "confdefs.h"
12236 printf("Hello\\n");
12241 rm -f "conftest.$ac_objext"
12242 if { (eval echo "$as_me:12242: \"$ac_compile\"") >&5
12243 (eval $ac_compile) 2>&5
12245 echo "$as_me:12245: \$? = $ac_status" >&5
12246 (exit "$ac_status"); } &&
12247 { ac_try='test -s "conftest.$ac_objext"'
12248 { (eval echo "$as_me:12248: \"$ac_try\"") >&5
12249 (eval $ac_try) 2>&5
12251 echo "$as_me:12251: \$? = $ac_status" >&5
12252 (exit "$ac_status"); }; }; then
12255 echo "$as_me: failed program was:" >&5
12256 cat "conftest.$ac_ext" >&5
12258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12260 CFLAGS="$cf_save_CFLAGS"
12261 CC_SHARED_OPTS=$cf_shared_opts
12262 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12264 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12267 (sysv5uw7*|unix_sv*)
12268 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12269 if test "$GCC" != yes; then
12270 CC_SHARED_OPTS='-KPIC'
12272 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12275 CC_SHARED_OPTS='unknown'
12276 MK_SHARED_LIB='echo unknown'
12280 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12281 case "$cf_cv_shlib_version" in
12283 case "$MK_SHARED_LIB" in
12285 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12288 { echo "$as_me:12288: WARNING: ignored --with-shlib-version" >&5
12289 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12295 if test -n "$cf_try_cflags"
12297 cat > conftest.$ac_ext <<EOF
12298 #line 12298 "${as_me:-configure}"
12300 int main(int argc, char *argv[])
12302 printf("hello\\n");
12303 return (argv[argc-1] == 0) ;
12306 cf_save_CFLAGS="$CFLAGS"
12307 for cf_opt in $cf_try_cflags
12309 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12310 echo "$as_me:12310: checking if CFLAGS option -$cf_opt works" >&5
12311 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12312 if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5
12313 (eval $ac_compile) 2>&5
12315 echo "$as_me:12315: \$? = $ac_status" >&5
12316 (exit "$ac_status"); }; then
12317 echo "$as_me:12317: result: yes" >&5
12318 echo "${ECHO_T}yes" >&6
12319 cf_save_CFLAGS="$CFLAGS"
12321 echo "$as_me:12321: result: no" >&5
12322 echo "${ECHO_T}no" >&6
12325 CFLAGS="$cf_save_CFLAGS"
12328 # RPATH_LIST is a colon-separated list of directories
12329 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12330 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12332 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12334 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12336 echo "${as_me:-configure}:12336: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12338 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12340 echo "${as_me:-configure}:12340: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12342 # The test/sample programs in the original tree link using rpath option.
12343 # Make it optional for packagers.
12344 if test -n "$LOCAL_LDFLAGS"
12346 echo "$as_me:12346: checking if you want to link sample programs with rpath option" >&5
12347 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12349 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12350 if test "${enable_rpath_link+set}" = set; then
12351 enableval="$enable_rpath_link"
12352 with_rpath_link=$enableval
12354 with_rpath_link=yes
12356 echo "$as_me:12356: result: $with_rpath_link" >&5
12357 echo "${ECHO_T}$with_rpath_link" >&6
12358 if test "$with_rpath_link" = no
12365 ###############################################################################
12367 ### use option --enable-broken-linker to force on use of broken-linker support
12369 echo "$as_me:12369: checking if you want broken-linker support code" >&5
12370 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12372 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12373 if test "${enable_broken_linker+set}" = set; then
12374 enableval="$enable_broken_linker"
12375 with_broken_linker=$enableval
12377 with_broken_linker=no
12379 echo "$as_me:12379: result: $with_broken_linker" >&5
12380 echo "${ECHO_T}$with_broken_linker" >&6
12382 : "${BROKEN_LINKER:=0}"
12383 if test "x$with_broken_linker" = xyes ; then
12385 cat >>confdefs.h <<\EOF
12386 #define BROKEN_LINKER 1
12392 # Check to define _XOPEN_SOURCE "automatically"
12394 echo "$as_me:12394: checking if the POSIX test-macros are already defined" >&5
12395 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12396 if test "${cf_cv_posix_visible+set}" = set; then
12397 echo $ECHO_N "(cached) $ECHO_C" >&6
12400 cat >"conftest.$ac_ext" <<_ACEOF
12401 #line 12401 "configure"
12402 #include "confdefs.h"
12408 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12409 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12410 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12411 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12412 #error conflicting symbols found
12419 rm -f "conftest.$ac_objext"
12420 if { (eval echo "$as_me:12420: \"$ac_compile\"") >&5
12421 (eval $ac_compile) 2>&5
12423 echo "$as_me:12423: \$? = $ac_status" >&5
12424 (exit "$ac_status"); } &&
12425 { ac_try='test -s "conftest.$ac_objext"'
12426 { (eval echo "$as_me:12426: \"$ac_try\"") >&5
12427 (eval $ac_try) 2>&5
12429 echo "$as_me:12429: \$? = $ac_status" >&5
12430 (exit "$ac_status"); }; }; then
12431 cf_cv_posix_visible=no
12433 echo "$as_me: failed program was:" >&5
12434 cat "conftest.$ac_ext" >&5
12435 cf_cv_posix_visible=yes
12437 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12440 echo "$as_me:12440: result: $cf_cv_posix_visible" >&5
12441 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12443 if test "$cf_cv_posix_visible" = no; then
12445 cf_XOPEN_SOURCE=600
12446 cf_POSIX_C_SOURCE=199506L
12451 cf_xopen_source="-D_ALL_SOURCE"
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|msys)
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
13028 #error _POSIX_C_SOURCE is not defined
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
13073 #error _POSIX_SOURCE is defined
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
13119 #error _POSIX_C_SOURCE is not defined
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 $ac_includes_default
13316 #ifndef _XOPEN_SOURCE
13317 #error _XOPEN_SOURCE is not defined
13324 rm -f "conftest.$ac_objext"
13325 if { (eval echo "$as_me:13325: \"$ac_compile\"") >&5
13326 (eval $ac_compile) 2>&5
13328 echo "$as_me:13328: \$? = $ac_status" >&5
13329 (exit "$ac_status"); } &&
13330 { ac_try='test -s "conftest.$ac_objext"'
13331 { (eval echo "$as_me:13331: \"$ac_try\"") >&5
13332 (eval $ac_try) 2>&5
13334 echo "$as_me:13334: \$? = $ac_status" >&5
13335 (exit "$ac_status"); }; }; then
13336 cf_cv_xopen_source=no
13338 echo "$as_me: failed program was:" >&5
13339 cat "conftest.$ac_ext" >&5
13340 cf_save="$CPPFLAGS"
13342 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13343 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13345 cat >"conftest.$ac_ext" <<_ACEOF
13346 #line 13346 "configure"
13347 #include "confdefs.h"
13349 $ac_includes_default
13355 #ifndef _XOPEN_SOURCE
13356 #error _XOPEN_SOURCE is not defined
13363 rm -f "conftest.$ac_objext"
13364 if { (eval echo "$as_me:13364: \"$ac_compile\"") >&5
13365 (eval $ac_compile) 2>&5
13367 echo "$as_me:13367: \$? = $ac_status" >&5
13368 (exit "$ac_status"); } &&
13369 { ac_try='test -s "conftest.$ac_objext"'
13370 { (eval echo "$as_me:13370: \"$ac_try\"") >&5
13371 (eval $ac_try) 2>&5
13373 echo "$as_me:13373: \$? = $ac_status" >&5
13374 (exit "$ac_status"); }; }; then
13375 cf_cv_xopen_source=no
13377 echo "$as_me: failed program was:" >&5
13378 cat "conftest.$ac_ext" >&5
13379 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13382 CPPFLAGS="$cf_save"
13385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13388 echo "$as_me:13388: result: $cf_cv_xopen_source" >&5
13389 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13391 if test "$cf_cv_xopen_source" != no ; then
13393 CFLAGS=`echo "$CFLAGS" | \
13394 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13395 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13397 CPPFLAGS=`echo "$CPPFLAGS" | \
13398 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13399 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13401 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13403 for cf_add_cflags in $cf_temp_xopen_source
13405 case "x$cf_add_cflags" in
13408 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13411 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'`
13412 test "$CFLAGS" != "$cf_old_cflag" || break
13414 CFLAGS="$cf_old_cflag"
13417 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13420 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'`
13421 test "$CPPFLAGS" != "$cf_old_cflag" || break
13423 CPPFLAGS="$cf_old_cflag"
13432 cf_new_extra_cppflags=
13434 for cf_add_cflags in $cf_add_cflags
13436 case "$cf_fix_cppflags" in
13438 case "$cf_add_cflags" in
13439 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13440 case "$cf_add_cflags" in
13442 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13444 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13445 && test -z "${cf_tst_cflags}" \
13446 && cf_fix_cppflags=yes
13448 if test "$cf_fix_cppflags" = yes ; then
13450 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13451 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13454 elif test "${cf_tst_cflags}" = "\"'" ; then
13456 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13457 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13463 case "$CPPFLAGS" in
13467 case "$cf_add_cflags" in
13469 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13471 CPPFLAGS=`echo "$CPPFLAGS" | \
13472 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13473 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13478 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13479 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13486 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13487 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13494 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13495 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13497 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13499 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13500 && test -z "${cf_tst_cflags}" \
13501 && cf_fix_cppflags=no
13506 if test -n "$cf_new_cflags" ; then
13508 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13509 CFLAGS="${CFLAGS}$cf_new_cflags"
13513 if test -n "$cf_new_cppflags" ; then
13515 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13516 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13520 if test -n "$cf_new_extra_cppflags" ; then
13522 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13523 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13531 cf_save_xopen_cppflags="$CPPFLAGS"
13533 if test "$cf_cv_posix_visible" = no; then
13535 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13537 cf_save_CFLAGS="$CFLAGS"
13538 cf_save_CPPFLAGS="$CPPFLAGS"
13540 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13541 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13542 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13544 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13545 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13546 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13548 echo "$as_me:13548: checking if we should define _POSIX_C_SOURCE" >&5
13549 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13550 if test "${cf_cv_posix_c_source+set}" = set; then
13551 echo $ECHO_N "(cached) $ECHO_C" >&6
13554 echo "${as_me:-configure}:13554: testing if the symbol is already defined go no further ..." 1>&5
13556 cat >"conftest.$ac_ext" <<_ACEOF
13557 #line 13557 "configure"
13558 #include "confdefs.h"
13559 #include <sys/types.h>
13564 #ifndef _POSIX_C_SOURCE
13565 #error _POSIX_C_SOURCE is not defined
13571 rm -f "conftest.$ac_objext"
13572 if { (eval echo "$as_me:13572: \"$ac_compile\"") >&5
13573 (eval $ac_compile) 2>&5
13575 echo "$as_me:13575: \$? = $ac_status" >&5
13576 (exit "$ac_status"); } &&
13577 { ac_try='test -s "conftest.$ac_objext"'
13578 { (eval echo "$as_me:13578: \"$ac_try\"") >&5
13579 (eval $ac_try) 2>&5
13581 echo "$as_me:13581: \$? = $ac_status" >&5
13582 (exit "$ac_status"); }; }; then
13583 cf_cv_posix_c_source=no
13585 echo "$as_me: failed program was:" >&5
13586 cat "conftest.$ac_ext" >&5
13587 cf_want_posix_source=no
13588 case .$cf_POSIX_C_SOURCE in
13590 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13593 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13594 cf_want_posix_source=yes
13597 cf_want_posix_source=yes
13600 if test "$cf_want_posix_source" = yes ; then
13601 cat >"conftest.$ac_ext" <<_ACEOF
13602 #line 13602 "configure"
13603 #include "confdefs.h"
13604 #include <sys/types.h>
13609 #ifdef _POSIX_SOURCE
13610 #error _POSIX_SOURCE is defined
13616 rm -f "conftest.$ac_objext"
13617 if { (eval echo "$as_me:13617: \"$ac_compile\"") >&5
13618 (eval $ac_compile) 2>&5
13620 echo "$as_me:13620: \$? = $ac_status" >&5
13621 (exit "$ac_status"); } &&
13622 { ac_try='test -s "conftest.$ac_objext"'
13623 { (eval echo "$as_me:13623: \"$ac_try\"") >&5
13624 (eval $ac_try) 2>&5
13626 echo "$as_me:13626: \$? = $ac_status" >&5
13627 (exit "$ac_status"); }; }; then
13630 echo "$as_me: failed program was:" >&5
13631 cat "conftest.$ac_ext" >&5
13632 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13634 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13637 echo "${as_me:-configure}:13637: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13639 CFLAGS="$cf_trim_CFLAGS"
13640 CPPFLAGS="$cf_trim_CPPFLAGS"
13642 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13643 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13645 echo "${as_me:-configure}:13645: testing if the second compile does not leave our definition intact error ..." 1>&5
13647 cat >"conftest.$ac_ext" <<_ACEOF
13648 #line 13648 "configure"
13649 #include "confdefs.h"
13650 #include <sys/types.h>
13655 #ifndef _POSIX_C_SOURCE
13656 #error _POSIX_C_SOURCE is not defined
13662 rm -f "conftest.$ac_objext"
13663 if { (eval echo "$as_me:13663: \"$ac_compile\"") >&5
13664 (eval $ac_compile) 2>&5
13666 echo "$as_me:13666: \$? = $ac_status" >&5
13667 (exit "$ac_status"); } &&
13668 { ac_try='test -s "conftest.$ac_objext"'
13669 { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670 (eval $ac_try) 2>&5
13672 echo "$as_me:13672: \$? = $ac_status" >&5
13673 (exit "$ac_status"); }; }; then
13676 echo "$as_me: failed program was:" >&5
13677 cat "conftest.$ac_ext" >&5
13678 cf_cv_posix_c_source=no
13680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13681 CFLAGS="$cf_save_CFLAGS"
13682 CPPFLAGS="$cf_save_CPPFLAGS"
13685 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13688 echo "$as_me:13688: result: $cf_cv_posix_c_source" >&5
13689 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13691 if test "$cf_cv_posix_c_source" != no ; then
13692 CFLAGS="$cf_trim_CFLAGS"
13693 CPPFLAGS="$cf_trim_CPPFLAGS"
13698 cf_new_extra_cppflags=
13700 for cf_add_cflags in $cf_cv_posix_c_source
13702 case "$cf_fix_cppflags" in
13704 case "$cf_add_cflags" in
13705 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13706 case "$cf_add_cflags" in
13708 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13710 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13711 && test -z "${cf_tst_cflags}" \
13712 && cf_fix_cppflags=yes
13714 if test "$cf_fix_cppflags" = yes ; then
13716 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13717 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13720 elif test "${cf_tst_cflags}" = "\"'" ; then
13722 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13723 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13729 case "$CPPFLAGS" in
13733 case "$cf_add_cflags" in
13735 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13737 CPPFLAGS=`echo "$CPPFLAGS" | \
13738 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13739 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13744 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13745 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13752 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13753 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13760 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13761 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13763 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13765 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13766 && test -z "${cf_tst_cflags}" \
13767 && cf_fix_cppflags=no
13772 if test -n "$cf_new_cflags" ; then
13774 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13775 CFLAGS="${CFLAGS}$cf_new_cflags"
13779 if test -n "$cf_new_cppflags" ; then
13781 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13782 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13786 if test -n "$cf_new_extra_cppflags" ; then
13788 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13789 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13795 fi # cf_cv_posix_visible
13797 # Some of these niche implementations use copy/paste, double-check...
13798 if test "$cf_cv_xopen_source" != no ; then
13799 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13801 echo "${as_me:-configure}:13801: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13803 cat >"conftest.$ac_ext" <<_ACEOF
13804 #line 13804 "configure"
13805 #include "confdefs.h"
13807 $ac_includes_default
13813 #ifndef _XOPEN_SOURCE
13814 #error _XOPEN_SOURCE is not defined
13821 rm -f "conftest.$ac_objext"
13822 if { (eval echo "$as_me:13822: \"$ac_compile\"") >&5
13823 (eval $ac_compile) 2>&5
13825 echo "$as_me:13825: \$? = $ac_status" >&5
13826 (exit "$ac_status"); } &&
13827 { ac_try='test -s "conftest.$ac_objext"'
13828 { (eval echo "$as_me:13828: \"$ac_try\"") >&5
13829 (eval $ac_try) 2>&5
13831 echo "$as_me:13831: \$? = $ac_status" >&5
13832 (exit "$ac_status"); }; }; then
13835 echo "$as_me: failed program was:" >&5
13836 cat "conftest.$ac_ext" >&5
13838 { echo "$as_me:13838: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13839 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13840 CPPFLAGS="$cf_save_xopen_cppflags"
13842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13847 if test -n "$cf_xopen_source" ; then
13849 for cf_add_cflags in $cf_xopen_source
13851 case "x$cf_add_cflags" in
13854 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13857 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'`
13858 test "$CFLAGS" != "$cf_old_cflag" || break
13859 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13861 echo "${as_me:-configure}:13861: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13863 CFLAGS="$cf_old_cflag"
13866 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13869 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'`
13870 test "$CPPFLAGS" != "$cf_old_cflag" || break
13871 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13873 echo "${as_me:-configure}:13873: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13875 CPPFLAGS="$cf_old_cflag"
13884 cf_new_extra_cppflags=
13886 for cf_add_cflags in $cf_add_cflags
13888 case "$cf_fix_cppflags" in
13890 case "$cf_add_cflags" in
13891 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13892 case "$cf_add_cflags" in
13894 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13896 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13897 && test -z "${cf_tst_cflags}" \
13898 && cf_fix_cppflags=yes
13900 if test "$cf_fix_cppflags" = yes ; then
13902 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13903 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13906 elif test "${cf_tst_cflags}" = "\"'" ; 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"
13915 case "$CPPFLAGS" in
13919 case "$cf_add_cflags" in
13921 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13923 CPPFLAGS=`echo "$CPPFLAGS" | \
13924 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13925 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13930 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13931 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13938 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13939 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13946 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13947 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13949 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13951 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13952 && test -z "${cf_tst_cflags}" \
13953 && cf_fix_cppflags=no
13958 if test -n "$cf_new_cflags" ; then
13959 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13961 echo "${as_me:-configure}:13961: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13963 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13964 CFLAGS="${CFLAGS}$cf_new_cflags"
13968 if test -n "$cf_new_cppflags" ; then
13969 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13971 echo "${as_me:-configure}:13971: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13973 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13974 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13978 if test -n "$cf_new_extra_cppflags" ; then
13979 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13981 echo "${as_me:-configure}:13981: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13983 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13984 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13992 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13993 echo "$as_me:13993: checking if _XOPEN_SOURCE really is set" >&5
13994 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13995 cat >"conftest.$ac_ext" <<_ACEOF
13996 #line 13996 "configure"
13997 #include "confdefs.h"
13998 #include <stdlib.h>
14003 #ifndef _XOPEN_SOURCE
14004 #error _XOPEN_SOURCE is not defined
14010 rm -f "conftest.$ac_objext"
14011 if { (eval echo "$as_me:14011: \"$ac_compile\"") >&5
14012 (eval $ac_compile) 2>&5
14014 echo "$as_me:14014: \$? = $ac_status" >&5
14015 (exit "$ac_status"); } &&
14016 { ac_try='test -s "conftest.$ac_objext"'
14017 { (eval echo "$as_me:14017: \"$ac_try\"") >&5
14018 (eval $ac_try) 2>&5
14020 echo "$as_me:14020: \$? = $ac_status" >&5
14021 (exit "$ac_status"); }; }; then
14022 cf_XOPEN_SOURCE_set=yes
14024 echo "$as_me: failed program was:" >&5
14025 cat "conftest.$ac_ext" >&5
14026 cf_XOPEN_SOURCE_set=no
14028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14029 echo "$as_me:14029: result: $cf_XOPEN_SOURCE_set" >&5
14030 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14031 if test "$cf_XOPEN_SOURCE_set" = yes
14033 cat >"conftest.$ac_ext" <<_ACEOF
14034 #line 14034 "configure"
14035 #include "confdefs.h"
14036 #include <stdlib.h>
14041 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14042 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14048 rm -f "conftest.$ac_objext"
14049 if { (eval echo "$as_me:14049: \"$ac_compile\"") >&5
14050 (eval $ac_compile) 2>&5
14052 echo "$as_me:14052: \$? = $ac_status" >&5
14053 (exit "$ac_status"); } &&
14054 { ac_try='test -s "conftest.$ac_objext"'
14055 { (eval echo "$as_me:14055: \"$ac_try\"") >&5
14056 (eval $ac_try) 2>&5
14058 echo "$as_me:14058: \$? = $ac_status" >&5
14059 (exit "$ac_status"); }; }; then
14060 cf_XOPEN_SOURCE_set_ok=yes
14062 echo "$as_me: failed program was:" >&5
14063 cat "conftest.$ac_ext" >&5
14064 cf_XOPEN_SOURCE_set_ok=no
14066 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14067 if test "$cf_XOPEN_SOURCE_set_ok" = no
14069 { echo "$as_me:14069: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14070 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14074 echo "$as_me:14074: checking if we should define _XOPEN_SOURCE" >&5
14075 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14076 if test "${cf_cv_xopen_source+set}" = set; then
14077 echo $ECHO_N "(cached) $ECHO_C" >&6
14080 cat >"conftest.$ac_ext" <<_ACEOF
14081 #line 14081 "configure"
14082 #include "confdefs.h"
14084 $ac_includes_default
14090 #ifndef _XOPEN_SOURCE
14091 #error _XOPEN_SOURCE is not defined
14098 rm -f "conftest.$ac_objext"
14099 if { (eval echo "$as_me:14099: \"$ac_compile\"") >&5
14100 (eval $ac_compile) 2>&5
14102 echo "$as_me:14102: \$? = $ac_status" >&5
14103 (exit "$ac_status"); } &&
14104 { ac_try='test -s "conftest.$ac_objext"'
14105 { (eval echo "$as_me:14105: \"$ac_try\"") >&5
14106 (eval $ac_try) 2>&5
14108 echo "$as_me:14108: \$? = $ac_status" >&5
14109 (exit "$ac_status"); }; }; then
14110 cf_cv_xopen_source=no
14112 echo "$as_me: failed program was:" >&5
14113 cat "conftest.$ac_ext" >&5
14114 cf_save="$CPPFLAGS"
14116 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14117 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14119 cat >"conftest.$ac_ext" <<_ACEOF
14120 #line 14120 "configure"
14121 #include "confdefs.h"
14123 $ac_includes_default
14129 #ifndef _XOPEN_SOURCE
14130 #error _XOPEN_SOURCE is not defined
14137 rm -f "conftest.$ac_objext"
14138 if { (eval echo "$as_me:14138: \"$ac_compile\"") >&5
14139 (eval $ac_compile) 2>&5
14141 echo "$as_me:14141: \$? = $ac_status" >&5
14142 (exit "$ac_status"); } &&
14143 { ac_try='test -s "conftest.$ac_objext"'
14144 { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145 (eval $ac_try) 2>&5
14147 echo "$as_me:14147: \$? = $ac_status" >&5
14148 (exit "$ac_status"); }; }; then
14149 cf_cv_xopen_source=no
14151 echo "$as_me: failed program was:" >&5
14152 cat "conftest.$ac_ext" >&5
14153 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14155 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14156 CPPFLAGS="$cf_save"
14159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14162 echo "$as_me:14162: result: $cf_cv_xopen_source" >&5
14163 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14165 if test "$cf_cv_xopen_source" != no ; then
14167 CFLAGS=`echo "$CFLAGS" | \
14168 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14169 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14171 CPPFLAGS=`echo "$CPPFLAGS" | \
14172 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14173 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14175 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14177 for cf_add_cflags in $cf_temp_xopen_source
14179 case "x$cf_add_cflags" in
14182 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14185 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14186 test "$CFLAGS" != "$cf_old_cflag" || break
14188 CFLAGS="$cf_old_cflag"
14191 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14194 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
14195 test "$CPPFLAGS" != "$cf_old_cflag" || break
14197 CPPFLAGS="$cf_old_cflag"
14206 cf_new_extra_cppflags=
14208 for cf_add_cflags in $cf_add_cflags
14210 case "$cf_fix_cppflags" in
14212 case "$cf_add_cflags" in
14213 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14214 case "$cf_add_cflags" in
14216 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14218 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14219 && test -z "${cf_tst_cflags}" \
14220 && cf_fix_cppflags=yes
14222 if test "$cf_fix_cppflags" = yes ; then
14224 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14225 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14228 elif test "${cf_tst_cflags}" = "\"'" ; then
14230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14237 case "$CPPFLAGS" in
14241 case "$cf_add_cflags" in
14243 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14245 CPPFLAGS=`echo "$CPPFLAGS" | \
14246 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14247 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14252 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14253 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14260 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14261 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14268 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14269 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14271 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14273 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14274 && test -z "${cf_tst_cflags}" \
14275 && cf_fix_cppflags=no
14280 if test -n "$cf_new_cflags" ; then
14282 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14283 CFLAGS="${CFLAGS}$cf_new_cflags"
14287 if test -n "$cf_new_cppflags" ; then
14289 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14290 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14294 if test -n "$cf_new_extra_cppflags" ; then
14296 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14297 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14307 fi # cf_cv_posix_visible
14309 echo "$as_me:14309: checking for ANSI C header files" >&5
14310 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14311 if test "${ac_cv_header_stdc+set}" = set; then
14312 echo $ECHO_N "(cached) $ECHO_C" >&6
14314 cat >"conftest.$ac_ext" <<_ACEOF
14315 #line 14315 "configure"
14316 #include "confdefs.h"
14317 #include <stdlib.h>
14318 #include <stdarg.h>
14319 #include <string.h>
14323 if { (eval echo "$as_me:14323: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14324 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14326 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14328 cat conftest.err >&5
14329 echo "$as_me:14329: \$? = $ac_status" >&5
14330 (exit "$ac_status"); } >/dev/null; then
14331 if test -s conftest.err; then
14332 ac_cpp_err=$ac_c_preproc_warn_flag
14339 if test -z "$ac_cpp_err"; then
14340 ac_cv_header_stdc=yes
14342 echo "$as_me: failed program was:" >&5
14343 cat "conftest.$ac_ext" >&5
14344 ac_cv_header_stdc=no
14346 rm -f conftest.err "conftest.$ac_ext"
14348 if test $ac_cv_header_stdc = yes; then
14349 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14350 cat >"conftest.$ac_ext" <<_ACEOF
14351 #line 14351 "configure"
14352 #include "confdefs.h"
14353 #include <string.h>
14356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14357 $EGREP "memchr" >/dev/null 2>&1; then
14360 ac_cv_header_stdc=no
14366 if test $ac_cv_header_stdc = yes; then
14367 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14368 cat >"conftest.$ac_ext" <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14371 #include <stdlib.h>
14374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14375 $EGREP "free" >/dev/null 2>&1; then
14378 ac_cv_header_stdc=no
14384 if test $ac_cv_header_stdc = yes; then
14385 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14386 if test "$cross_compiling" = yes; then
14389 cat >"conftest.$ac_ext" <<_ACEOF
14390 #line 14390 "configure"
14391 #include "confdefs.h"
14393 #if ((' ' & 0x0FF) == 0x020)
14394 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14395 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14397 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14398 || ('j' <= (c) && (c) <= 'r') \
14399 || ('s' <= (c) && (c) <= 'z'))
14400 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14403 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14408 for (i = 0; i < 256; i++)
14409 if (XOR (islower (i), ISLOWER (i))
14410 || toupper (i) != TOUPPER (i))
14411 $ac_main_return(2);
14412 $ac_main_return (0);
14415 rm -f "conftest$ac_exeext"
14416 if { (eval echo "$as_me:14416: \"$ac_link\"") >&5
14417 (eval $ac_link) 2>&5
14419 echo "$as_me:14419: \$? = $ac_status" >&5
14420 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14421 { (eval echo "$as_me:14421: \"$ac_try\"") >&5
14422 (eval $ac_try) 2>&5
14424 echo "$as_me:14424: \$? = $ac_status" >&5
14425 (exit "$ac_status"); }; }; then
14428 echo "$as_me: program exited with status $ac_status" >&5
14429 echo "$as_me: failed program was:" >&5
14430 cat "conftest.$ac_ext" >&5
14431 ac_cv_header_stdc=no
14433 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14437 echo "$as_me:14437: result: $ac_cv_header_stdc" >&5
14438 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14439 if test $ac_cv_header_stdc = yes; then
14441 cat >>confdefs.h <<\EOF
14442 #define STDC_HEADERS 1
14447 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14449 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14450 inttypes.h stdint.h unistd.h
14452 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14453 echo "$as_me:14453: checking for $ac_header" >&5
14454 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14455 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14456 echo $ECHO_N "(cached) $ECHO_C" >&6
14458 cat >"conftest.$ac_ext" <<_ACEOF
14459 #line 14459 "configure"
14460 #include "confdefs.h"
14461 $ac_includes_default
14462 #include <$ac_header>
14464 rm -f "conftest.$ac_objext"
14465 if { (eval echo "$as_me:14465: \"$ac_compile\"") >&5
14466 (eval $ac_compile) 2>&5
14468 echo "$as_me:14468: \$? = $ac_status" >&5
14469 (exit "$ac_status"); } &&
14470 { ac_try='test -s "conftest.$ac_objext"'
14471 { (eval echo "$as_me:14471: \"$ac_try\"") >&5
14472 (eval $ac_try) 2>&5
14474 echo "$as_me:14474: \$? = $ac_status" >&5
14475 (exit "$ac_status"); }; }; then
14476 eval "$as_ac_Header=yes"
14478 echo "$as_me: failed program was:" >&5
14479 cat "conftest.$ac_ext" >&5
14480 eval "$as_ac_Header=no"
14482 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14484 echo "$as_me:14484: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14485 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14486 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14487 cat >>confdefs.h <<EOF
14488 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14494 echo "$as_me:14494: checking whether exit is declared" >&5
14495 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
14496 if test "${ac_cv_have_decl_exit+set}" = set; then
14497 echo $ECHO_N "(cached) $ECHO_C" >&6
14499 cat >"conftest.$ac_ext" <<_ACEOF
14500 #line 14500 "configure"
14501 #include "confdefs.h"
14502 $ac_includes_default
14507 char *p = (char *) exit; (void) p;
14514 rm -f "conftest.$ac_objext"
14515 if { (eval echo "$as_me:14515: \"$ac_compile\"") >&5
14516 (eval $ac_compile) 2>&5
14518 echo "$as_me:14518: \$? = $ac_status" >&5
14519 (exit "$ac_status"); } &&
14520 { ac_try='test -s "conftest.$ac_objext"'
14521 { (eval echo "$as_me:14521: \"$ac_try\"") >&5
14522 (eval $ac_try) 2>&5
14524 echo "$as_me:14524: \$? = $ac_status" >&5
14525 (exit "$ac_status"); }; }; then
14526 ac_cv_have_decl_exit=yes
14528 echo "$as_me: failed program was:" >&5
14529 cat "conftest.$ac_ext" >&5
14530 ac_cv_have_decl_exit=no
14532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14534 echo "$as_me:14534: result: $ac_cv_have_decl_exit" >&5
14535 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
14537 # Check whether --enable-largefile or --disable-largefile was given.
14538 if test "${enable_largefile+set}" = set; then
14539 enableval="$enable_largefile"
14542 if test "$enable_largefile" != no; then
14544 echo "$as_me:14544: checking for special C compiler options needed for large files" >&5
14545 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14546 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14547 echo $ECHO_N "(cached) $ECHO_C" >&6
14549 ac_cv_sys_largefile_CC=no
14550 if test "$GCC" != yes; then
14553 # IRIX 6.2 and later do not support large files by default,
14554 # so use the C compiler's -n32 option if that helps.
14555 cat >"conftest.$ac_ext" <<_ACEOF
14556 #line 14556 "configure"
14557 #include "confdefs.h"
14558 #include <sys/types.h>
14559 /* Check that off_t can represent 2**63 - 1 correctly.
14560 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14561 since some C++ compilers masquerading as C compilers
14562 incorrectly reject 9223372036854775807. */
14563 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14564 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14565 && LARGE_OFF_T % 2147483647 == 1)
14575 rm -f "conftest.$ac_objext"
14576 if { (eval echo "$as_me:14576: \"$ac_compile\"") >&5
14577 (eval $ac_compile) 2>&5
14579 echo "$as_me:14579: \$? = $ac_status" >&5
14580 (exit "$ac_status"); } &&
14581 { ac_try='test -s "conftest.$ac_objext"'
14582 { (eval echo "$as_me:14582: \"$ac_try\"") >&5
14583 (eval $ac_try) 2>&5
14585 echo "$as_me:14585: \$? = $ac_status" >&5
14586 (exit "$ac_status"); }; }; then
14589 echo "$as_me: failed program was:" >&5
14590 cat "conftest.$ac_ext" >&5
14592 rm -f "conftest.$ac_objext"
14594 rm -f "conftest.$ac_objext"
14595 if { (eval echo "$as_me:14595: \"$ac_compile\"") >&5
14596 (eval $ac_compile) 2>&5
14598 echo "$as_me:14598: \$? = $ac_status" >&5
14599 (exit "$ac_status"); } &&
14600 { ac_try='test -s "conftest.$ac_objext"'
14601 { (eval echo "$as_me:14601: \"$ac_try\"") >&5
14602 (eval $ac_try) 2>&5
14604 echo "$as_me:14604: \$? = $ac_status" >&5
14605 (exit "$ac_status"); }; }; then
14606 ac_cv_sys_largefile_CC=' -n32'; break
14608 echo "$as_me: failed program was:" >&5
14609 cat "conftest.$ac_ext" >&5
14611 rm -f "conftest.$ac_objext"
14615 rm -f "conftest.$ac_ext"
14618 echo "$as_me:14618: result: $ac_cv_sys_largefile_CC" >&5
14619 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14620 if test "$ac_cv_sys_largefile_CC" != no; then
14621 CC=$CC$ac_cv_sys_largefile_CC
14624 echo "$as_me:14624: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14625 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14626 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14627 echo $ECHO_N "(cached) $ECHO_C" >&6
14630 ac_cv_sys_file_offset_bits=no
14631 cat >"conftest.$ac_ext" <<_ACEOF
14632 #line 14632 "configure"
14633 #include "confdefs.h"
14634 #include <sys/types.h>
14635 /* Check that off_t can represent 2**63 - 1 correctly.
14636 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14637 since some C++ compilers masquerading as C compilers
14638 incorrectly reject 9223372036854775807. */
14639 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14640 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14641 && LARGE_OFF_T % 2147483647 == 1)
14651 rm -f "conftest.$ac_objext"
14652 if { (eval echo "$as_me:14652: \"$ac_compile\"") >&5
14653 (eval $ac_compile) 2>&5
14655 echo "$as_me:14655: \$? = $ac_status" >&5
14656 (exit "$ac_status"); } &&
14657 { ac_try='test -s "conftest.$ac_objext"'
14658 { (eval echo "$as_me:14658: \"$ac_try\"") >&5
14659 (eval $ac_try) 2>&5
14661 echo "$as_me:14661: \$? = $ac_status" >&5
14662 (exit "$ac_status"); }; }; then
14665 echo "$as_me: failed program was:" >&5
14666 cat "conftest.$ac_ext" >&5
14668 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14669 cat >"conftest.$ac_ext" <<_ACEOF
14670 #line 14670 "configure"
14671 #include "confdefs.h"
14672 #define _FILE_OFFSET_BITS 64
14673 #include <sys/types.h>
14674 /* Check that off_t can represent 2**63 - 1 correctly.
14675 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14676 since some C++ compilers masquerading as C compilers
14677 incorrectly reject 9223372036854775807. */
14678 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14679 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14680 && LARGE_OFF_T % 2147483647 == 1)
14690 rm -f "conftest.$ac_objext"
14691 if { (eval echo "$as_me:14691: \"$ac_compile\"") >&5
14692 (eval $ac_compile) 2>&5
14694 echo "$as_me:14694: \$? = $ac_status" >&5
14695 (exit "$ac_status"); } &&
14696 { ac_try='test -s "conftest.$ac_objext"'
14697 { (eval echo "$as_me:14697: \"$ac_try\"") >&5
14698 (eval $ac_try) 2>&5
14700 echo "$as_me:14700: \$? = $ac_status" >&5
14701 (exit "$ac_status"); }; }; then
14702 ac_cv_sys_file_offset_bits=64; break
14704 echo "$as_me: failed program was:" >&5
14705 cat "conftest.$ac_ext" >&5
14707 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14711 echo "$as_me:14711: result: $ac_cv_sys_file_offset_bits" >&5
14712 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14713 if test "$ac_cv_sys_file_offset_bits" != no; then
14715 cat >>confdefs.h <<EOF
14716 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14721 echo "$as_me:14721: checking for _LARGE_FILES value needed for large files" >&5
14722 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14723 if test "${ac_cv_sys_large_files+set}" = set; then
14724 echo $ECHO_N "(cached) $ECHO_C" >&6
14727 ac_cv_sys_large_files=no
14728 cat >"conftest.$ac_ext" <<_ACEOF
14729 #line 14729 "configure"
14730 #include "confdefs.h"
14731 #include <sys/types.h>
14732 /* Check that off_t can represent 2**63 - 1 correctly.
14733 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14734 since some C++ compilers masquerading as C compilers
14735 incorrectly reject 9223372036854775807. */
14736 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14737 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14738 && LARGE_OFF_T % 2147483647 == 1)
14748 rm -f "conftest.$ac_objext"
14749 if { (eval echo "$as_me:14749: \"$ac_compile\"") >&5
14750 (eval $ac_compile) 2>&5
14752 echo "$as_me:14752: \$? = $ac_status" >&5
14753 (exit "$ac_status"); } &&
14754 { ac_try='test -s "conftest.$ac_objext"'
14755 { (eval echo "$as_me:14755: \"$ac_try\"") >&5
14756 (eval $ac_try) 2>&5
14758 echo "$as_me:14758: \$? = $ac_status" >&5
14759 (exit "$ac_status"); }; }; then
14762 echo "$as_me: failed program was:" >&5
14763 cat "conftest.$ac_ext" >&5
14765 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14766 cat >"conftest.$ac_ext" <<_ACEOF
14767 #line 14767 "configure"
14768 #include "confdefs.h"
14769 #define _LARGE_FILES 1
14770 #include <sys/types.h>
14771 /* Check that off_t can represent 2**63 - 1 correctly.
14772 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14773 since some C++ compilers masquerading as C compilers
14774 incorrectly reject 9223372036854775807. */
14775 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14776 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14777 && LARGE_OFF_T % 2147483647 == 1)
14787 rm -f "conftest.$ac_objext"
14788 if { (eval echo "$as_me:14788: \"$ac_compile\"") >&5
14789 (eval $ac_compile) 2>&5
14791 echo "$as_me:14791: \$? = $ac_status" >&5
14792 (exit "$ac_status"); } &&
14793 { ac_try='test -s "conftest.$ac_objext"'
14794 { (eval echo "$as_me:14794: \"$ac_try\"") >&5
14795 (eval $ac_try) 2>&5
14797 echo "$as_me:14797: \$? = $ac_status" >&5
14798 (exit "$ac_status"); }; }; then
14799 ac_cv_sys_large_files=1; break
14801 echo "$as_me: failed program was:" >&5
14802 cat "conftest.$ac_ext" >&5
14804 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14808 echo "$as_me:14808: result: $ac_cv_sys_large_files" >&5
14809 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14810 if test "$ac_cv_sys_large_files" != no; then
14812 cat >>confdefs.h <<EOF
14813 #define _LARGE_FILES $ac_cv_sys_large_files
14820 if test "$enable_largefile" != no ; then
14821 echo "$as_me:14821: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14822 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14823 if test "${ac_cv_sys_largefile_source+set}" = set; then
14824 echo $ECHO_N "(cached) $ECHO_C" >&6
14827 ac_cv_sys_largefile_source=no
14828 cat >"conftest.$ac_ext" <<_ACEOF
14829 #line 14829 "configure"
14830 #include "confdefs.h"
14840 rm -f "conftest.$ac_objext"
14841 if { (eval echo "$as_me:14841: \"$ac_compile\"") >&5
14842 (eval $ac_compile) 2>&5
14844 echo "$as_me:14844: \$? = $ac_status" >&5
14845 (exit "$ac_status"); } &&
14846 { ac_try='test -s "conftest.$ac_objext"'
14847 { (eval echo "$as_me:14847: \"$ac_try\"") >&5
14848 (eval $ac_try) 2>&5
14850 echo "$as_me:14850: \$? = $ac_status" >&5
14851 (exit "$ac_status"); }; }; then
14854 echo "$as_me: failed program was:" >&5
14855 cat "conftest.$ac_ext" >&5
14857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14858 cat >"conftest.$ac_ext" <<_ACEOF
14859 #line 14859 "configure"
14860 #include "confdefs.h"
14861 #define _LARGEFILE_SOURCE 1
14871 rm -f "conftest.$ac_objext"
14872 if { (eval echo "$as_me:14872: \"$ac_compile\"") >&5
14873 (eval $ac_compile) 2>&5
14875 echo "$as_me:14875: \$? = $ac_status" >&5
14876 (exit "$ac_status"); } &&
14877 { ac_try='test -s "conftest.$ac_objext"'
14878 { (eval echo "$as_me:14878: \"$ac_try\"") >&5
14879 (eval $ac_try) 2>&5
14881 echo "$as_me:14881: \$? = $ac_status" >&5
14882 (exit "$ac_status"); }; }; then
14883 ac_cv_sys_largefile_source=1; break
14885 echo "$as_me: failed program was:" >&5
14886 cat "conftest.$ac_ext" >&5
14888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14892 echo "$as_me:14892: result: $ac_cv_sys_largefile_source" >&5
14893 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14894 if test "$ac_cv_sys_largefile_source" != no; then
14896 cat >>confdefs.h <<EOF
14897 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14903 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14904 # in glibc 2.1.3, but that breaks too many other things.
14905 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14906 echo "$as_me:14906: checking for fseeko" >&5
14907 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14908 if test "${ac_cv_func_fseeko+set}" = set; then
14909 echo $ECHO_N "(cached) $ECHO_C" >&6
14911 cat >"conftest.$ac_ext" <<_ACEOF
14912 #line 14912 "configure"
14913 #include "confdefs.h"
14918 return fseeko && fseeko (stdin, 0, 0);
14923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14924 if { (eval echo "$as_me:14924: \"$ac_link\"") >&5
14925 (eval $ac_link) 2>&5
14927 echo "$as_me:14927: \$? = $ac_status" >&5
14928 (exit "$ac_status"); } &&
14929 { ac_try='test -s "conftest$ac_exeext"'
14930 { (eval echo "$as_me:14930: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14933 echo "$as_me:14933: \$? = $ac_status" >&5
14934 (exit "$ac_status"); }; }; then
14935 ac_cv_func_fseeko=yes
14937 echo "$as_me: failed program was:" >&5
14938 cat "conftest.$ac_ext" >&5
14939 ac_cv_func_fseeko=no
14941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14943 echo "$as_me:14943: result: $ac_cv_func_fseeko" >&5
14944 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14945 if test $ac_cv_func_fseeko = yes; then
14947 cat >>confdefs.h <<\EOF
14948 #define HAVE_FSEEKO 1
14953 # Normally we would collect these definitions in the config.h,
14954 # but (like _XOPEN_SOURCE), some environments rely on having these
14955 # defined before any of the system headers are included. Another
14956 # case comes up with C++, e.g., on AIX the compiler compiles the
14957 # header files by themselves before looking at the body files it is
14958 # told to compile. For ncurses, those header files do not include
14960 if test "$ac_cv_sys_large_files" != no
14963 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14964 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14967 if test "$ac_cv_sys_largefile_source" != no
14970 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14971 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14974 if test "$ac_cv_sys_file_offset_bits" != no
14977 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14978 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14982 echo "$as_me:14982: checking whether to use struct dirent64" >&5
14983 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14984 if test "${cf_cv_struct_dirent64+set}" = set; then
14985 echo $ECHO_N "(cached) $ECHO_C" >&6
14988 cat >"conftest.$ac_ext" <<_ACEOF
14989 #line 14989 "configure"
14990 #include "confdefs.h"
14992 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14993 #include <sys/types.h>
14994 #include <dirent.h>
15000 /* if transitional largefile support is setup, this is true */
15001 extern struct dirent64 * readdir(DIR *);
15002 struct dirent64 *x = readdir((DIR *)0);
15003 struct dirent *y = readdir((DIR *)0);
15011 rm -f "conftest.$ac_objext"
15012 if { (eval echo "$as_me:15012: \"$ac_compile\"") >&5
15013 (eval $ac_compile) 2>&5
15015 echo "$as_me:15015: \$? = $ac_status" >&5
15016 (exit "$ac_status"); } &&
15017 { ac_try='test -s "conftest.$ac_objext"'
15018 { (eval echo "$as_me:15018: \"$ac_try\"") >&5
15019 (eval $ac_try) 2>&5
15021 echo "$as_me:15021: \$? = $ac_status" >&5
15022 (exit "$ac_status"); }; }; then
15023 cf_cv_struct_dirent64=yes
15025 echo "$as_me: failed program was:" >&5
15026 cat "conftest.$ac_ext" >&5
15027 cf_cv_struct_dirent64=no
15029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15032 echo "$as_me:15032: result: $cf_cv_struct_dirent64" >&5
15033 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
15034 test "$cf_cv_struct_dirent64" = yes &&
15035 cat >>confdefs.h <<\EOF
15036 #define HAVE_STRUCT_DIRENT64 1
15041 ### Enable compiling-in rcs id's
15042 echo "$as_me:15042: checking if RCS identifiers should be compiled-in" >&5
15043 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15045 # Check whether --with-rcs-ids or --without-rcs-ids was given.
15046 if test "${with_rcs_ids+set}" = set; then
15047 withval="$with_rcs_ids"
15048 with_rcs_ids=$withval
15052 echo "$as_me:15052: result: $with_rcs_ids" >&5
15053 echo "${ECHO_T}$with_rcs_ids" >&6
15054 test "$with_rcs_ids" = yes &&
15055 cat >>confdefs.h <<\EOF
15056 #define USE_RCS_IDS 1
15059 ###############################################################################
15061 ### Note that some functions (such as const) are normally disabled anyway.
15062 echo "$as_me:15062: checking if you want to build with function extensions" >&5
15063 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15065 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15066 if test "${enable_ext_funcs+set}" = set; then
15067 enableval="$enable_ext_funcs"
15068 with_ext_funcs=$enableval
15072 echo "$as_me:15072: result: $with_ext_funcs" >&5
15073 echo "${ECHO_T}$with_ext_funcs" >&6
15074 if test "$with_ext_funcs" = yes ; then
15075 NCURSES_EXT_FUNCS=1
15077 cat >>confdefs.h <<\EOF
15078 #define HAVE_USE_DEFAULT_COLORS 1
15081 cat >>confdefs.h <<\EOF
15082 #define NCURSES_EXT_FUNCS 1
15086 NCURSES_EXT_FUNCS=0
15089 ### use option --enable-const to turn on use of const beyond that in XSI.
15090 echo "$as_me:15090: checking for extended use of const keyword" >&5
15091 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15093 # Check whether --enable-const or --disable-const was given.
15094 if test "${enable_const+set}" = set; then
15095 enableval="$enable_const"
15096 with_ext_const=$enableval
15100 echo "$as_me:15100: result: $with_ext_const" >&5
15101 echo "${ECHO_T}$with_ext_const" >&6
15102 NCURSES_CONST='/*nothing*/'
15103 if test "$with_ext_const" = yes ; then
15104 NCURSES_CONST=const
15107 ###############################################################################
15108 # These options are relatively safe to experiment with.
15110 echo "$as_me:15110: checking if you want all development code" >&5
15111 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15113 # Check whether --with-develop or --without-develop was given.
15114 if test "${with_develop+set}" = set; then
15115 withval="$with_develop"
15116 with_develop=$withval
15120 echo "$as_me:15120: result: $with_develop" >&5
15121 echo "${ECHO_T}$with_develop" >&6
15123 ###############################################################################
15124 # These are just experimental, probably should not be in a package:
15126 # This is still experimental (20080329), but should ultimately be moved to
15127 # the script-block --with-normal, etc.
15129 echo "$as_me:15129: checking if you want to link with the pthread library" >&5
15130 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15132 # Check whether --with-pthread or --without-pthread was given.
15133 if test "${with_pthread+set}" = set; then
15134 withval="$with_pthread"
15135 with_pthread=$withval
15139 echo "$as_me:15139: result: $with_pthread" >&5
15140 echo "${ECHO_T}$with_pthread" >&6
15142 if test "$with_pthread" != no ; then
15143 echo "$as_me:15143: checking for pthread.h" >&5
15144 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15145 if test "${ac_cv_header_pthread_h+set}" = set; then
15146 echo $ECHO_N "(cached) $ECHO_C" >&6
15148 cat >"conftest.$ac_ext" <<_ACEOF
15149 #line 15149 "configure"
15150 #include "confdefs.h"
15151 #include <pthread.h>
15153 if { (eval echo "$as_me:15153: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15154 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15156 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15158 cat conftest.err >&5
15159 echo "$as_me:15159: \$? = $ac_status" >&5
15160 (exit "$ac_status"); } >/dev/null; then
15161 if test -s conftest.err; then
15162 ac_cpp_err=$ac_c_preproc_warn_flag
15169 if test -z "$ac_cpp_err"; then
15170 ac_cv_header_pthread_h=yes
15172 echo "$as_me: failed program was:" >&5
15173 cat "conftest.$ac_ext" >&5
15174 ac_cv_header_pthread_h=no
15176 rm -f conftest.err "conftest.$ac_ext"
15178 echo "$as_me:15178: result: $ac_cv_header_pthread_h" >&5
15179 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15180 if test "$ac_cv_header_pthread_h" = yes; then
15182 cat >>confdefs.h <<\EOF
15183 #define HAVE_PTHREADS_H 1
15186 for cf_lib_pthread in pthread c_r
15188 echo "$as_me:15188: checking if we can link with the $cf_lib_pthread library" >&5
15189 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15190 cf_save_LIBS="$LIBS"
15192 cf_add_libs="$LIBS"
15195 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15196 # filter duplicates
15197 for cf_add_1lib in $cf_add_0lib; do
15198 for cf_add_2lib in $cf_add_libs; do
15199 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15204 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15206 LIBS="$cf_add_libs"
15208 cat >"conftest.$ac_ext" <<_ACEOF
15209 #line 15209 "configure"
15210 #include "confdefs.h"
15212 #include <pthread.h>
15218 int rc = pthread_create(0,0,0,0);
15219 int r2 = pthread_mutexattr_settype(0, 0);
15225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15226 if { (eval echo "$as_me:15226: \"$ac_link\"") >&5
15227 (eval $ac_link) 2>&5
15229 echo "$as_me:15229: \$? = $ac_status" >&5
15230 (exit "$ac_status"); } &&
15231 { ac_try='test -s "conftest$ac_exeext"'
15232 { (eval echo "$as_me:15232: \"$ac_try\"") >&5
15233 (eval $ac_try) 2>&5
15235 echo "$as_me:15235: \$? = $ac_status" >&5
15236 (exit "$ac_status"); }; }; then
15239 echo "$as_me: failed program was:" >&5
15240 cat "conftest.$ac_ext" >&5
15243 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15244 LIBS="$cf_save_LIBS"
15245 echo "$as_me:15245: result: $with_pthread" >&5
15246 echo "${ECHO_T}$with_pthread" >&6
15247 test "$with_pthread" = yes && break
15250 if test "$with_pthread" = yes ; then
15252 cf_add_libs="$LIBS"
15255 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15256 # filter duplicates
15257 for cf_add_1lib in $cf_add_0lib; do
15258 for cf_add_2lib in $cf_add_libs; do
15259 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15264 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15266 LIBS="$cf_add_libs"
15268 cat >>confdefs.h <<\EOF
15269 #define HAVE_LIBPTHREADS 1
15273 { { echo "$as_me:15273: error: Cannot link with pthread library" >&5
15274 echo "$as_me: error: Cannot link with pthread library" >&2;}
15275 { (exit 1); exit 1; }; }
15282 echo "$as_me:15282: checking if you want to use weak-symbols for pthreads" >&5
15283 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15285 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15286 if test "${enable_weak_symbols+set}" = set; then
15287 enableval="$enable_weak_symbols"
15288 use_weak_symbols=$withval
15290 use_weak_symbols=no
15292 echo "$as_me:15292: result: $use_weak_symbols" >&5
15293 echo "${ECHO_T}$use_weak_symbols" >&6
15294 if test "$use_weak_symbols" = yes ; then
15296 echo "$as_me:15296: checking if $CC supports weak symbols" >&5
15297 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15298 if test "${cf_cv_weak_symbols+set}" = set; then
15299 echo $ECHO_N "(cached) $ECHO_C" >&6
15302 cat >"conftest.$ac_ext" <<_ACEOF
15303 #line 15303 "configure"
15304 #include "confdefs.h"
15311 #if defined(__GNUC__)
15312 # if defined __USE_ISOC99
15313 # define _cat_pragma(exp) _Pragma(#exp)
15314 # define _weak_pragma(exp) _cat_pragma(weak name)
15316 # define _weak_pragma(exp)
15318 # define _declare(name) __extension__ extern __typeof__(name) name
15319 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15322 weak_symbol(fopen);
15328 rm -f "conftest.$ac_objext"
15329 if { (eval echo "$as_me:15329: \"$ac_compile\"") >&5
15330 (eval $ac_compile) 2>&5
15332 echo "$as_me:15332: \$? = $ac_status" >&5
15333 (exit "$ac_status"); } &&
15334 { ac_try='test -s "conftest.$ac_objext"'
15335 { (eval echo "$as_me:15335: \"$ac_try\"") >&5
15336 (eval $ac_try) 2>&5
15338 echo "$as_me:15338: \$? = $ac_status" >&5
15339 (exit "$ac_status"); }; }; then
15340 cf_cv_weak_symbols=yes
15342 echo "$as_me: failed program was:" >&5
15343 cat "conftest.$ac_ext" >&5
15344 cf_cv_weak_symbols=no
15346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15349 echo "$as_me:15349: result: $cf_cv_weak_symbols" >&5
15350 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15353 cf_cv_weak_symbols=no
15356 if test $cf_cv_weak_symbols = yes ; then
15358 cat >>confdefs.h <<\EOF
15359 #define USE_WEAK_SYMBOLS 1
15365 if test "$with_pthread" = "yes" ; then
15367 cat >>confdefs.h <<\EOF
15368 #define USE_PTHREADS 1
15371 enable_reentrant=yes
15372 if test $cf_cv_weak_symbols = yes ; then
15377 # OpenSUSE is installing ncurses6, using reentrant option.
15378 echo "$as_me:15378: checking for _nc_TABSIZE" >&5
15379 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15380 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15381 echo $ECHO_N "(cached) $ECHO_C" >&6
15383 cat >"conftest.$ac_ext" <<_ACEOF
15384 #line 15384 "configure"
15385 #include "confdefs.h"
15386 #define _nc_TABSIZE autoconf_temporary
15387 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15394 /* We use char because int might match the return type of a gcc2
15395 builtin and then its argument prototype would still apply. */
15396 char _nc_TABSIZE (void);
15402 /* The GNU C library defines stubs for functions which it implements
15403 to always fail with ENOSYS. Some functions are actually named
15404 something starting with __ and the normal name is an alias. */
15405 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15406 #error found stub for _nc_TABSIZE
15409 return _nc_TABSIZE ();
15414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15415 if { (eval echo "$as_me:15415: \"$ac_link\"") >&5
15416 (eval $ac_link) 2>&5
15418 echo "$as_me:15418: \$? = $ac_status" >&5
15419 (exit "$ac_status"); } &&
15420 { ac_try='test -s "conftest$ac_exeext"'
15421 { (eval echo "$as_me:15421: \"$ac_try\"") >&5
15422 (eval $ac_try) 2>&5
15424 echo "$as_me:15424: \$? = $ac_status" >&5
15425 (exit "$ac_status"); }; }; then
15426 ac_cv_func__nc_TABSIZE=yes
15428 echo "$as_me: failed program was:" >&5
15429 cat "conftest.$ac_ext" >&5
15430 ac_cv_func__nc_TABSIZE=no
15432 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15434 echo "$as_me:15434: result: $ac_cv_func__nc_TABSIZE" >&5
15435 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15436 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15437 assume_reentrant=yes
15439 assume_reentrant=no
15442 # Reentrant code has to be opaque; there's little advantage to making ncurses
15443 # opaque outside of that, so there is no --enable-opaque option. We can use
15444 # this option without --with-pthreads, but this will be always set for
15446 echo "$as_me:15446: checking if you want experimental reentrant code" >&5
15447 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15449 # Check whether --enable-reentrant or --disable-reentrant was given.
15450 if test "${enable_reentrant+set}" = set; then
15451 enableval="$enable_reentrant"
15452 with_reentrant=$enableval
15454 with_reentrant=$assume_reentrant
15456 echo "$as_me:15456: result: $with_reentrant" >&5
15457 echo "${ECHO_T}$with_reentrant" >&6
15458 if test "$with_reentrant" = yes ; then
15459 cf_cv_enable_reentrant=1
15460 if test $cf_cv_weak_symbols = yes ; then
15462 # remove pthread library from $LIBS
15463 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15465 elif test "$assume_reentrant" = no ; then
15466 LIB_SUFFIX="t${LIB_SUFFIX}"
15469 cat >>confdefs.h <<\EOF
15470 #define USE_REENTRANT 1
15474 cf_cv_enable_reentrant=0
15477 ### Allow using a different wrap-prefix
15478 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15479 echo "$as_me:15479: checking for prefix used to wrap public variables" >&5
15480 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15482 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15483 if test "${with_wrap_prefix+set}" = set; then
15484 withval="$with_wrap_prefix"
15485 NCURSES_WRAP_PREFIX=$withval
15487 NCURSES_WRAP_PREFIX=_nc_
15489 echo "$as_me:15489: result: $NCURSES_WRAP_PREFIX" >&5
15490 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15492 NCURSES_WRAP_PREFIX=_nc_
15495 cat >>confdefs.h <<EOF
15496 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15499 ###############################################################################
15501 ### use option --disable-echo to suppress full display compiling commands
15503 echo "$as_me:15503: checking if you want to see long compiling messages" >&5
15504 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15506 # Check whether --enable-echo or --disable-echo was given.
15507 if test "${enable_echo+set}" = set; then
15508 enableval="$enable_echo"
15509 test "$enableval" != no && enableval=yes
15510 if test "$enableval" != "yes" ; then
15513 ECHO_LD='@echo linking $@;'
15514 RULE_CC='@echo compiling $<'
15515 SHOW_CC='@echo compiling $@'
15537 echo "$as_me:15537: result: $enableval" >&5
15538 echo "${ECHO_T}$enableval" >&6
15540 echo "$as_me:15540: checking if you want to use C11 _Noreturn feature" >&5
15541 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15543 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15544 if test "${enable_stdnoreturn+set}" = set; then
15545 enableval="$enable_stdnoreturn"
15546 test "$enableval" != yes && enableval=no
15547 if test "$enableval" != "no" ; then
15548 enable_stdnoreturn=yes
15550 enable_stdnoreturn=no
15554 enable_stdnoreturn=no
15557 echo "$as_me:15557: result: $enable_stdnoreturn" >&5
15558 echo "${ECHO_T}$enable_stdnoreturn" >&6
15560 if test $enable_stdnoreturn = yes; then
15561 echo "$as_me:15561: checking for C11 _Noreturn feature" >&5
15562 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15563 if test "${cf_cv_c11_noreturn+set}" = set; then
15564 echo $ECHO_N "(cached) $ECHO_C" >&6
15566 cat >"conftest.$ac_ext" <<_ACEOF
15567 #line 15567 "configure"
15568 #include "confdefs.h"
15570 $ac_includes_default
15571 #include <stdnoreturn.h>
15572 static _Noreturn void giveup(void) { exit(0); }
15577 if (feof(stdin)) giveup()
15582 rm -f "conftest.$ac_objext"
15583 if { (eval echo "$as_me:15583: \"$ac_compile\"") >&5
15584 (eval $ac_compile) 2>&5
15586 echo "$as_me:15586: \$? = $ac_status" >&5
15587 (exit "$ac_status"); } &&
15588 { ac_try='test -s "conftest.$ac_objext"'
15589 { (eval echo "$as_me:15589: \"$ac_try\"") >&5
15590 (eval $ac_try) 2>&5
15592 echo "$as_me:15592: \$? = $ac_status" >&5
15593 (exit "$ac_status"); }; }; then
15594 cf_cv_c11_noreturn=yes
15596 echo "$as_me: failed program was:" >&5
15597 cat "conftest.$ac_ext" >&5
15598 cf_cv_c11_noreturn=no
15600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15603 echo "$as_me:15603: result: $cf_cv_c11_noreturn" >&5
15604 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15606 cf_cv_c11_noreturn=no,
15609 if test "$cf_cv_c11_noreturn" = yes; then
15611 cat >>confdefs.h <<\EOF
15612 #define HAVE_STDNORETURN_H 1
15615 cat >>confdefs.h <<EOF
15616 #define STDC_NORETURN _Noreturn
15619 HAVE_STDNORETURN_H=1
15621 HAVE_STDNORETURN_H=0
15624 if test "$GCC" = yes || test "$GXX" = yes
15627 if test "$GCC" = yes || test "$GXX" = yes
15632 for cf_temp_scan in $CFLAGS
15634 case "x$cf_temp_scan" in
15637 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15638 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15643 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15644 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15649 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15650 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15655 if test "x$CFLAGS" != "x$cf_temp_flags"
15657 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15659 echo "${as_me:-configure}:15659: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15661 CFLAGS="$cf_temp_flags"
15662 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15664 echo "${as_me:-configure}:15664: testing ... fixed $CFLAGS ..." 1>&5
15666 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15668 echo "${as_me:-configure}:15668: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15675 if test "$GCC" = yes || test "$GXX" = yes
15680 for cf_temp_scan in $CPPFLAGS
15682 case "x$cf_temp_scan" in
15685 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15686 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15691 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15692 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15697 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15698 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15703 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15705 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15707 echo "${as_me:-configure}:15707: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15709 CPPFLAGS="$cf_temp_flags"
15710 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15712 echo "${as_me:-configure}:15712: testing ... fixed $CPPFLAGS ..." 1>&5
15714 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15716 echo "${as_me:-configure}:15716: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15723 if test "$GCC" = yes || test "$GXX" = yes
15728 for cf_temp_scan in $LDFLAGS
15730 case "x$cf_temp_scan" in
15733 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15734 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15739 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15740 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15745 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15746 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15751 if test "x$LDFLAGS" != "x$cf_temp_flags"
15753 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15755 echo "${as_me:-configure}:15755: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15757 LDFLAGS="$cf_temp_flags"
15758 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15760 echo "${as_me:-configure}:15760: testing ... fixed $LDFLAGS ..." 1>&5
15762 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15764 echo "${as_me:-configure}:15764: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15771 echo "$as_me:15771: checking if you want to turn on gcc warnings" >&5
15772 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15774 # Check whether --enable-warnings or --disable-warnings was given.
15775 if test "${enable_warnings+set}" = set; then
15776 enableval="$enable_warnings"
15777 test "$enableval" != yes && enableval=no
15778 if test "$enableval" != "no" ; then
15779 enable_warnings=yes
15788 echo "$as_me:15788: result: $enable_warnings" >&5
15789 echo "${ECHO_T}$enable_warnings" >&6
15790 if test "$enable_warnings" = "yes"
15793 if test "x$have_x" = xyes; then
15795 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15796 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15797 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15798 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15799 for cf_X_CFLAGS in $X_CFLAGS
15801 case "x$cf_X_CFLAGS" in
15803 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15806 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15811 cat >"conftest.$ac_ext" <<_ACEOF
15812 #line 15812 "configure"
15813 #include "confdefs.h"
15815 #include <stdlib.h>
15816 #include <X11/Intrinsic.h>
15821 String foo = malloc(1); free((void*)foo)
15826 rm -f "conftest.$ac_objext"
15827 if { (eval echo "$as_me:15827: \"$ac_compile\"") >&5
15828 (eval $ac_compile) 2>&5
15830 echo "$as_me:15830: \$? = $ac_status" >&5
15831 (exit "$ac_status"); } &&
15832 { ac_try='test -s "conftest.$ac_objext"'
15833 { (eval echo "$as_me:15833: \"$ac_try\"") >&5
15834 (eval $ac_try) 2>&5
15836 echo "$as_me:15836: \$? = $ac_status" >&5
15837 (exit "$ac_status"); }; }; then
15839 echo "$as_me:15839: checking for X11/Xt const-feature" >&5
15840 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15841 if test "${cf_cv_const_x_string+set}" = set; then
15842 echo $ECHO_N "(cached) $ECHO_C" >&6
15845 cat >"conftest.$ac_ext" <<_ACEOF
15846 #line 15846 "configure"
15847 #include "confdefs.h"
15849 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15850 #undef XTSTRINGDEFINES /* X11R5 and later */
15851 #include <stdlib.h>
15852 #include <X11/Intrinsic.h>
15857 String foo = malloc(1); *foo = 0
15862 rm -f "conftest.$ac_objext"
15863 if { (eval echo "$as_me:15863: \"$ac_compile\"") >&5
15864 (eval $ac_compile) 2>&5
15866 echo "$as_me:15866: \$? = $ac_status" >&5
15867 (exit "$ac_status"); } &&
15868 { ac_try='test -s "conftest.$ac_objext"'
15869 { (eval echo "$as_me:15869: \"$ac_try\"") >&5
15870 (eval $ac_try) 2>&5
15872 echo "$as_me:15872: \$? = $ac_status" >&5
15873 (exit "$ac_status"); }; }; then
15875 cf_cv_const_x_string=no
15878 echo "$as_me: failed program was:" >&5
15879 cat "conftest.$ac_ext" >&5
15881 cf_cv_const_x_string=yes
15884 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15887 echo "$as_me:15887: result: $cf_cv_const_x_string" >&5
15888 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15890 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15891 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15892 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15894 case "$cf_cv_const_x_string" in
15897 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15898 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15903 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15904 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15910 echo "$as_me: failed program was:" >&5
15911 cat "conftest.$ac_ext" >&5
15913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15915 cat > "conftest.$ac_ext" <<EOF
15916 #line 15916 "${as_me:-configure}"
15917 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15919 if test "$INTEL_COMPILER" = yes
15921 # The "-wdXXX" options suppress warnings:
15922 # remark #1419: external declaration in primary source file
15923 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15924 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15925 # remark #193: zero used for undefined preprocessing identifier
15926 # remark #593: variable "curs_sb_left_arrow" was set but never used
15927 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15928 # remark #869: parameter "tw" was never referenced
15929 # remark #981: operands are evaluated in unspecified order
15930 # warning #279: controlling expression is constant
15932 { echo "$as_me:15932: checking for $CC warning options..." >&5
15933 echo "$as_me: checking for $CC warning options..." >&6;}
15934 cf_save_CFLAGS="$CFLAGS"
15935 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15947 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15948 if { (eval echo "$as_me:15948: \"$ac_compile\"") >&5
15949 (eval $ac_compile) 2>&5
15951 echo "$as_me:15951: \$? = $ac_status" >&5
15952 (exit "$ac_status"); }; then
15953 test -n "$verbose" && echo "$as_me:15953: result: ... -$cf_opt" >&5
15954 echo "${ECHO_T}... -$cf_opt" >&6
15955 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15958 CFLAGS="$cf_save_CFLAGS"
15959 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15961 { echo "$as_me:15961: checking for $CC warning options..." >&5
15962 echo "$as_me: checking for $CC warning options..." >&6;}
15963 cf_save_CFLAGS="$CFLAGS"
15965 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15966 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15967 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15968 for cf_opt in W Wall \
15969 Wbad-function-cast \
15972 Wdeclaration-after-statement \
15975 Wmissing-declarations \
15976 Wmissing-prototypes \
15980 Wstrict-prototypes \
15981 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15983 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15984 if { (eval echo "$as_me:15984: \"$ac_compile\"") >&5
15985 (eval $ac_compile) 2>&5
15987 echo "$as_me:15987: \$? = $ac_status" >&5
15988 (exit "$ac_status"); }; then
15989 test -n "$verbose" && echo "$as_me:15989: result: ... -$cf_opt" >&5
15990 echo "${ECHO_T}... -$cf_opt" >&6
15993 case "$GCC_VERSION" in
15995 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15997 echo "${as_me:-configure}:15997: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16003 case "$GCC_VERSION" in
16005 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16007 echo "${as_me:-configure}:16007: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16013 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16016 CFLAGS="$cf_save_CFLAGS"
16022 if test "$GCC" = yes || test "$GXX" = yes
16024 cat > conftest.i <<EOF
16026 #define GCC_PRINTF 0
16029 #define GCC_SCANF 0
16031 #ifndef GCC_NORETURN
16032 #define GCC_NORETURN /* nothing */
16035 #define GCC_UNUSED /* nothing */
16038 if test "$GCC" = yes
16040 { echo "$as_me:16040: checking for $CC __attribute__ directives..." >&5
16041 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16042 cat > "conftest.$ac_ext" <<EOF
16043 #line 16043 "${as_me:-configure}"
16045 #include "confdefs.h"
16046 #include "conftest.h"
16047 #include "conftest.i"
16049 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16051 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16054 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16056 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16058 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16059 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16060 extern GCC_NORETURN void foo(void);
16061 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16063 cf_printf_attribute=no
16064 cf_scanf_attribute=no
16065 for cf_attribute in scanf printf unused noreturn
16068 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16070 cf_directive="__attribute__(($cf_attribute))"
16071 echo "checking for $CC $cf_directive" 1>&5
16073 case "$cf_attribute" in
16075 cf_printf_attribute=yes
16076 cat >conftest.h <<EOF
16077 #define GCC_$cf_ATTRIBUTE 1
16081 cf_scanf_attribute=yes
16082 cat >conftest.h <<EOF
16083 #define GCC_$cf_ATTRIBUTE 1
16087 cat >conftest.h <<EOF
16088 #define GCC_$cf_ATTRIBUTE $cf_directive
16093 if { (eval echo "$as_me:16093: \"$ac_compile\"") >&5
16094 (eval $ac_compile) 2>&5
16096 echo "$as_me:16096: \$? = $ac_status" >&5
16097 (exit "$ac_status"); }; then
16098 test -n "$verbose" && echo "$as_me:16098: result: ... $cf_attribute" >&5
16099 echo "${ECHO_T}... $cf_attribute" >&6
16100 cat conftest.h >>confdefs.h
16101 case "$cf_attribute" in
16104 cat >>confdefs.h <<EOF
16105 #define GCC_NORETURN $cf_directive
16110 cf_value='/* nothing */'
16111 if test "$cf_printf_attribute" != no ; then
16112 cf_value='__attribute__((format(printf,fmt,var)))'
16114 cat >>confdefs.h <<\EOF
16115 #define GCC_PRINTF 1
16120 cat >>confdefs.h <<EOF
16121 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16126 cf_value='/* nothing */'
16127 if test "$cf_scanf_attribute" != no ; then
16128 cf_value='__attribute__((format(scanf,fmt,var)))'
16130 cat >>confdefs.h <<\EOF
16131 #define GCC_SCANF 1
16136 cat >>confdefs.h <<EOF
16137 #define GCC_SCANFLIKE(fmt,var) $cf_value
16143 cat >>confdefs.h <<EOF
16144 #define GCC_UNUSED $cf_directive
16152 ${FGREP-fgrep} define conftest.i >>confdefs.h
16159 if test "x$enable_warnings" = "xyes"; then
16161 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
16165 ### use option --enable-assertions to turn on generation of assertion code
16166 echo "$as_me:16166: checking if you want to enable runtime assertions" >&5
16167 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16169 # Check whether --enable-assertions or --disable-assertions was given.
16170 if test "${enable_assertions+set}" = set; then
16171 enableval="$enable_assertions"
16172 with_assertions=$enableval
16176 echo "$as_me:16176: result: $with_assertions" >&5
16177 echo "${ECHO_T}$with_assertions" >&6
16180 if test "$with_assertions" = no
16182 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16185 ADAFLAGS="$ADAFLAGS -gnata"
16190 ### use option --disable-leaks to suppress "permanent" leaks, for testing
16192 cat >>confdefs.h <<\EOF
16193 #define HAVE_NC_ALLOC_H 1
16196 ### use option --enable-expanded to generate certain macros as functions
16198 # Check whether --enable-expanded or --disable-expanded was given.
16199 if test "${enable_expanded+set}" = set; then
16200 enableval="$enable_expanded"
16201 test "$enableval" = yes &&
16202 cat >>confdefs.h <<\EOF
16203 #define NCURSES_EXPANDED 1
16208 ### use option --disable-macros to suppress macros in favor of functions
16210 # Check whether --enable-macros or --disable-macros was given.
16211 if test "${enable_macros+set}" = set; then
16212 enableval="$enable_macros"
16213 test "$enableval" = no &&
16214 cat >>confdefs.h <<\EOF
16215 #define NCURSES_NOMACROS 1
16220 # Normally we only add trace() to the debug-library. Allow this to be
16221 # extended to all models of the ncurses library:
16223 case "$CFLAGS $CPPFLAGS" in
16229 echo "$as_me:16229: checking whether to add trace feature to all models" >&5
16230 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16232 # Check whether --with-trace or --without-trace was given.
16233 if test "${with_trace+set}" = set; then
16234 withval="$with_trace"
16235 cf_with_trace=$withval
16237 cf_with_trace=$cf_all_traces
16239 echo "$as_me:16239: result: $cf_with_trace" >&5
16240 echo "${ECHO_T}$cf_with_trace" >&6
16242 if test "$cf_with_trace" = yes ; then
16248 cf_new_extra_cppflags=
16250 for cf_add_cflags in -DTRACE
16252 case "$cf_fix_cppflags" in
16254 case "$cf_add_cflags" in
16255 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16256 case "$cf_add_cflags" in
16258 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16260 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16261 && test -z "${cf_tst_cflags}" \
16262 && cf_fix_cppflags=yes
16264 if test "$cf_fix_cppflags" = yes ; then
16266 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16267 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16270 elif test "${cf_tst_cflags}" = "\"'" ; then
16272 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16273 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16279 case "$CPPFLAGS" in
16283 case "$cf_add_cflags" in
16285 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16287 CPPFLAGS=`echo "$CPPFLAGS" | \
16288 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16289 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16294 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16295 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16302 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16303 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16310 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16311 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16313 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16315 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16316 && test -z "${cf_tst_cflags}" \
16317 && cf_fix_cppflags=no
16322 if test -n "$cf_new_cflags" ; then
16324 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16325 CFLAGS="${CFLAGS}$cf_new_cflags"
16329 if test -n "$cf_new_cppflags" ; then
16331 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16332 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16336 if test -n "$cf_new_extra_cppflags" ; then
16338 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16339 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16347 echo "$as_me:16347: checking if we want to use GNAT projects" >&5
16348 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16350 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16351 if test "${enable_gnat_projects+set}" = set; then
16352 enableval="$enable_gnat_projects"
16353 test "$enableval" != no && enableval=yes
16354 if test "$enableval" != "yes" ; then
16355 enable_gnat_projects=no
16357 enable_gnat_projects=yes
16361 enable_gnat_projects=yes
16364 echo "$as_me:16364: result: $enable_gnat_projects" >&5
16365 echo "${ECHO_T}$enable_gnat_projects" >&6
16367 ### Checks for libraries.
16368 case $cf_cv_system_name in
16371 echo "$as_me:16371: checking if ssp library is needed" >&5
16372 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16373 if test "${cf_cv_need_libssp+set}" = set; then
16374 echo $ECHO_N "(cached) $ECHO_C" >&6
16377 cat >"conftest.$ac_ext" <<_ACEOF
16378 #line 16378 "configure"
16379 #include "confdefs.h"
16381 #include <sys/types.h>
16382 #include <dirent.h>
16388 DIR *dp = opendir(".");
16394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16395 if { (eval echo "$as_me:16395: \"$ac_link\"") >&5
16396 (eval $ac_link) 2>&5
16398 echo "$as_me:16398: \$? = $ac_status" >&5
16399 (exit "$ac_status"); } &&
16400 { ac_try='test -s "conftest$ac_exeext"'
16401 { (eval echo "$as_me:16401: \"$ac_try\"") >&5
16402 (eval $ac_try) 2>&5
16404 echo "$as_me:16404: \$? = $ac_status" >&5
16405 (exit "$ac_status"); }; }; then
16406 cf_cv_need_libssp=no
16408 echo "$as_me: failed program was:" >&5
16409 cat "conftest.$ac_ext" >&5
16411 cf_save_LIBS="$LIBS"
16413 cat >"conftest.$ac_ext" <<_ACEOF
16414 #line 16414 "configure"
16415 #include "confdefs.h"
16417 #include <sys/types.h>
16418 #include <dirent.h>
16424 DIR *dp = opendir(".");
16430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16431 if { (eval echo "$as_me:16431: \"$ac_link\"") >&5
16432 (eval $ac_link) 2>&5
16434 echo "$as_me:16434: \$? = $ac_status" >&5
16435 (exit "$ac_status"); } &&
16436 { ac_try='test -s "conftest$ac_exeext"'
16437 { (eval echo "$as_me:16437: \"$ac_try\"") >&5
16438 (eval $ac_try) 2>&5
16440 echo "$as_me:16440: \$? = $ac_status" >&5
16441 (exit "$ac_status"); }; }; then
16442 cf_cv_need_libssp=yes
16444 echo "$as_me: failed program was:" >&5
16445 cat "conftest.$ac_ext" >&5
16446 cf_cv_need_libssp=maybe
16448 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16449 LIBS="$cf_save_LIBS"
16452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16454 echo "$as_me:16454: result: $cf_cv_need_libssp" >&5
16455 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16457 if test "x$cf_cv_need_libssp" = xyes
16460 cf_add_libs="$LIBS"
16463 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16464 # filter duplicates
16465 for cf_add_1lib in $cf_add_0lib; do
16466 for cf_add_2lib in $cf_add_libs; do
16467 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16472 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16474 LIBS="$cf_add_libs"
16481 echo "$as_me:16481: checking for gettimeofday" >&5
16482 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16483 if test "${ac_cv_func_gettimeofday+set}" = set; then
16484 echo $ECHO_N "(cached) $ECHO_C" >&6
16486 cat >"conftest.$ac_ext" <<_ACEOF
16487 #line 16487 "configure"
16488 #include "confdefs.h"
16489 #define gettimeofday autoconf_temporary
16490 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16491 #undef gettimeofday
16497 /* We use char because int might match the return type of a gcc2
16498 builtin and then its argument prototype would still apply. */
16499 char gettimeofday (void);
16505 /* The GNU C library defines stubs for functions which it implements
16506 to always fail with ENOSYS. Some functions are actually named
16507 something starting with __ and the normal name is an alias. */
16508 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16509 #error found stub for gettimeofday
16512 return gettimeofday ();
16517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16518 if { (eval echo "$as_me:16518: \"$ac_link\"") >&5
16519 (eval $ac_link) 2>&5
16521 echo "$as_me:16521: \$? = $ac_status" >&5
16522 (exit "$ac_status"); } &&
16523 { ac_try='test -s "conftest$ac_exeext"'
16524 { (eval echo "$as_me:16524: \"$ac_try\"") >&5
16525 (eval $ac_try) 2>&5
16527 echo "$as_me:16527: \$? = $ac_status" >&5
16528 (exit "$ac_status"); }; }; then
16529 ac_cv_func_gettimeofday=yes
16531 echo "$as_me: failed program was:" >&5
16532 cat "conftest.$ac_ext" >&5
16533 ac_cv_func_gettimeofday=no
16535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16537 echo "$as_me:16537: result: $ac_cv_func_gettimeofday" >&5
16538 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16539 if test "$ac_cv_func_gettimeofday" = yes; then
16541 cat >>confdefs.h <<\EOF
16542 #define HAVE_GETTIMEOFDAY 1
16547 echo "$as_me:16547: checking for gettimeofday in -lbsd" >&5
16548 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16549 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16550 echo $ECHO_N "(cached) $ECHO_C" >&6
16552 ac_check_lib_save_LIBS=$LIBS
16554 cat >"conftest.$ac_ext" <<_ACEOF
16555 #line 16555 "configure"
16556 #include "confdefs.h"
16558 /* Override any gcc2 internal prototype to avoid an error. */
16562 /* We use char because int might match the return type of a gcc2
16563 builtin and then its argument prototype would still apply. */
16564 char gettimeofday ();
16573 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16574 if { (eval echo "$as_me:16574: \"$ac_link\"") >&5
16575 (eval $ac_link) 2>&5
16577 echo "$as_me:16577: \$? = $ac_status" >&5
16578 (exit "$ac_status"); } &&
16579 { ac_try='test -s "conftest$ac_exeext"'
16580 { (eval echo "$as_me:16580: \"$ac_try\"") >&5
16581 (eval $ac_try) 2>&5
16583 echo "$as_me:16583: \$? = $ac_status" >&5
16584 (exit "$ac_status"); }; }; then
16585 ac_cv_lib_bsd_gettimeofday=yes
16587 echo "$as_me: failed program was:" >&5
16588 cat "conftest.$ac_ext" >&5
16589 ac_cv_lib_bsd_gettimeofday=no
16591 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16592 LIBS=$ac_check_lib_save_LIBS
16594 echo "$as_me:16594: result: $ac_cv_lib_bsd_gettimeofday" >&5
16595 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16596 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16598 cat >>confdefs.h <<\EOF
16599 #define HAVE_GETTIMEOFDAY 1
16602 cf_add_libs="$LIBS"
16605 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16606 # filter duplicates
16607 for cf_add_1lib in $cf_add_0lib; do
16608 for cf_add_2lib in $cf_add_libs; do
16609 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16614 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16616 LIBS="$cf_add_libs"
16625 ### Checks for header files.
16626 echo "$as_me:16626: checking for signed char" >&5
16627 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16628 if test "${ac_cv_type_signed_char+set}" = set; then
16629 echo $ECHO_N "(cached) $ECHO_C" >&6
16631 cat >"conftest.$ac_ext" <<_ACEOF
16632 #line 16632 "configure"
16633 #include "confdefs.h"
16634 $ac_includes_default
16638 if ((signed char *) 0)
16640 if (sizeof (signed char))
16646 rm -f "conftest.$ac_objext"
16647 if { (eval echo "$as_me:16647: \"$ac_compile\"") >&5
16648 (eval $ac_compile) 2>&5
16650 echo "$as_me:16650: \$? = $ac_status" >&5
16651 (exit "$ac_status"); } &&
16652 { ac_try='test -s "conftest.$ac_objext"'
16653 { (eval echo "$as_me:16653: \"$ac_try\"") >&5
16654 (eval $ac_try) 2>&5
16656 echo "$as_me:16656: \$? = $ac_status" >&5
16657 (exit "$ac_status"); }; }; then
16658 ac_cv_type_signed_char=yes
16660 echo "$as_me: failed program was:" >&5
16661 cat "conftest.$ac_ext" >&5
16662 ac_cv_type_signed_char=no
16664 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16666 echo "$as_me:16666: result: $ac_cv_type_signed_char" >&5
16667 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16669 echo "$as_me:16669: checking size of signed char" >&5
16670 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16671 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16672 echo $ECHO_N "(cached) $ECHO_C" >&6
16674 if test "$ac_cv_type_signed_char" = yes; then
16675 if test "$cross_compiling" = yes; then
16676 # Depending upon the size, compute the lo and hi bounds.
16677 cat >"conftest.$ac_ext" <<_ACEOF
16678 #line 16678 "configure"
16679 #include "confdefs.h"
16680 $ac_includes_default
16684 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16689 rm -f "conftest.$ac_objext"
16690 if { (eval echo "$as_me:16690: \"$ac_compile\"") >&5
16691 (eval $ac_compile) 2>&5
16693 echo "$as_me:16693: \$? = $ac_status" >&5
16694 (exit "$ac_status"); } &&
16695 { ac_try='test -s "conftest.$ac_objext"'
16696 { (eval echo "$as_me:16696: \"$ac_try\"") >&5
16697 (eval $ac_try) 2>&5
16699 echo "$as_me:16699: \$? = $ac_status" >&5
16700 (exit "$ac_status"); }; }; then
16703 cat >"conftest.$ac_ext" <<_ACEOF
16704 #line 16704 "configure"
16705 #include "confdefs.h"
16706 $ac_includes_default
16710 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16715 rm -f "conftest.$ac_objext"
16716 if { (eval echo "$as_me:16716: \"$ac_compile\"") >&5
16717 (eval $ac_compile) 2>&5
16719 echo "$as_me:16719: \$? = $ac_status" >&5
16720 (exit "$ac_status"); } &&
16721 { ac_try='test -s "conftest.$ac_objext"'
16722 { (eval echo "$as_me:16722: \"$ac_try\"") >&5
16723 (eval $ac_try) 2>&5
16725 echo "$as_me:16725: \$? = $ac_status" >&5
16726 (exit "$ac_status"); }; }; then
16727 ac_hi=$ac_mid; break
16729 echo "$as_me: failed program was:" >&5
16730 cat "conftest.$ac_ext" >&5
16731 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16733 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16736 echo "$as_me: failed program was:" >&5
16737 cat "conftest.$ac_ext" >&5
16740 cat >"conftest.$ac_ext" <<_ACEOF
16741 #line 16741 "configure"
16742 #include "confdefs.h"
16743 $ac_includes_default
16747 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16752 rm -f "conftest.$ac_objext"
16753 if { (eval echo "$as_me:16753: \"$ac_compile\"") >&5
16754 (eval $ac_compile) 2>&5
16756 echo "$as_me:16756: \$? = $ac_status" >&5
16757 (exit "$ac_status"); } &&
16758 { ac_try='test -s "conftest.$ac_objext"'
16759 { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760 (eval $ac_try) 2>&5
16762 echo "$as_me:16762: \$? = $ac_status" >&5
16763 (exit "$ac_status"); }; }; then
16764 ac_lo=$ac_mid; break
16766 echo "$as_me: failed program was:" >&5
16767 cat "conftest.$ac_ext" >&5
16768 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16770 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16773 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16774 # Binary search between lo and hi bounds.
16775 while test "x$ac_lo" != "x$ac_hi"; do
16776 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16777 cat >"conftest.$ac_ext" <<_ACEOF
16778 #line 16778 "configure"
16779 #include "confdefs.h"
16780 $ac_includes_default
16784 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16789 rm -f "conftest.$ac_objext"
16790 if { (eval echo "$as_me:16790: \"$ac_compile\"") >&5
16791 (eval $ac_compile) 2>&5
16793 echo "$as_me:16793: \$? = $ac_status" >&5
16794 (exit "$ac_status"); } &&
16795 { ac_try='test -s "conftest.$ac_objext"'
16796 { (eval echo "$as_me:16796: \"$ac_try\"") >&5
16797 (eval $ac_try) 2>&5
16799 echo "$as_me:16799: \$? = $ac_status" >&5
16800 (exit "$ac_status"); }; }; then
16803 echo "$as_me: failed program was:" >&5
16804 cat "conftest.$ac_ext" >&5
16805 ac_lo=`expr "$ac_mid" + 1`
16807 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16809 ac_cv_sizeof_signed_char=$ac_lo
16811 if test "$cross_compiling" = yes; then
16812 { { echo "$as_me:16812: error: cannot run test program while cross compiling" >&5
16813 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16814 { (exit 1); exit 1; }; }
16816 cat >"conftest.$ac_ext" <<_ACEOF
16817 #line 16817 "configure"
16818 #include "confdefs.h"
16819 $ac_includes_default
16823 FILE *f = fopen ("conftest.val", "w");
16825 $ac_main_return (1);
16826 fprintf (f, "%ld", (long)(sizeof (signed char)));
16832 rm -f "conftest$ac_exeext"
16833 if { (eval echo "$as_me:16833: \"$ac_link\"") >&5
16834 (eval $ac_link) 2>&5
16836 echo "$as_me:16836: \$? = $ac_status" >&5
16837 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16838 { (eval echo "$as_me:16838: \"$ac_try\"") >&5
16839 (eval $ac_try) 2>&5
16841 echo "$as_me:16841: \$? = $ac_status" >&5
16842 (exit "$ac_status"); }; }; then
16843 ac_cv_sizeof_signed_char=`cat conftest.val`
16845 echo "$as_me: program exited with status $ac_status" >&5
16846 echo "$as_me: failed program was:" >&5
16847 cat "conftest.$ac_ext" >&5
16849 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16854 ac_cv_sizeof_signed_char=0
16857 echo "$as_me:16857: result: $ac_cv_sizeof_signed_char" >&5
16858 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16859 cat >>confdefs.h <<EOF
16860 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16863 ac_header_dirent=no
16864 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16865 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16866 echo "$as_me:16866: checking for $ac_hdr that defines DIR" >&5
16867 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16868 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16869 echo $ECHO_N "(cached) $ECHO_C" >&6
16871 cat >"conftest.$ac_ext" <<_ACEOF
16872 #line 16872 "configure"
16873 #include "confdefs.h"
16874 #include <sys/types.h>
16886 rm -f "conftest.$ac_objext"
16887 if { (eval echo "$as_me:16887: \"$ac_compile\"") >&5
16888 (eval $ac_compile) 2>&5
16890 echo "$as_me:16890: \$? = $ac_status" >&5
16891 (exit "$ac_status"); } &&
16892 { ac_try='test -s "conftest.$ac_objext"'
16893 { (eval echo "$as_me:16893: \"$ac_try\"") >&5
16894 (eval $ac_try) 2>&5
16896 echo "$as_me:16896: \$? = $ac_status" >&5
16897 (exit "$ac_status"); }; }; then
16898 eval "$as_ac_Header=yes"
16900 echo "$as_me: failed program was:" >&5
16901 cat "conftest.$ac_ext" >&5
16902 eval "$as_ac_Header=no"
16904 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16906 echo "$as_me:16906: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16907 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16908 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16909 cat >>confdefs.h <<EOF
16910 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16913 ac_header_dirent=$ac_hdr; break
16917 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16918 if test $ac_header_dirent = dirent.h; then
16919 echo "$as_me:16919: checking for opendir in -ldir" >&5
16920 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16921 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16922 echo $ECHO_N "(cached) $ECHO_C" >&6
16924 ac_check_lib_save_LIBS=$LIBS
16926 cat >"conftest.$ac_ext" <<_ACEOF
16927 #line 16927 "configure"
16928 #include "confdefs.h"
16930 /* Override any gcc2 internal prototype to avoid an error. */
16934 /* We use char because int might match the return type of a gcc2
16935 builtin and then its argument prototype would still apply. */
16945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16946 if { (eval echo "$as_me:16946: \"$ac_link\"") >&5
16947 (eval $ac_link) 2>&5
16949 echo "$as_me:16949: \$? = $ac_status" >&5
16950 (exit "$ac_status"); } &&
16951 { ac_try='test -s "conftest$ac_exeext"'
16952 { (eval echo "$as_me:16952: \"$ac_try\"") >&5
16953 (eval $ac_try) 2>&5
16955 echo "$as_me:16955: \$? = $ac_status" >&5
16956 (exit "$ac_status"); }; }; then
16957 ac_cv_lib_dir_opendir=yes
16959 echo "$as_me: failed program was:" >&5
16960 cat "conftest.$ac_ext" >&5
16961 ac_cv_lib_dir_opendir=no
16963 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16964 LIBS=$ac_check_lib_save_LIBS
16966 echo "$as_me:16966: result: $ac_cv_lib_dir_opendir" >&5
16967 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16968 if test "$ac_cv_lib_dir_opendir" = yes; then
16973 echo "$as_me:16973: checking for opendir in -lx" >&5
16974 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16975 if test "${ac_cv_lib_x_opendir+set}" = set; then
16976 echo $ECHO_N "(cached) $ECHO_C" >&6
16978 ac_check_lib_save_LIBS=$LIBS
16980 cat >"conftest.$ac_ext" <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16984 /* Override any gcc2 internal prototype to avoid an error. */
16988 /* We use char because int might match the return type of a gcc2
16989 builtin and then its argument prototype would still apply. */
16999 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17000 if { (eval echo "$as_me:17000: \"$ac_link\"") >&5
17001 (eval $ac_link) 2>&5
17003 echo "$as_me:17003: \$? = $ac_status" >&5
17004 (exit "$ac_status"); } &&
17005 { ac_try='test -s "conftest$ac_exeext"'
17006 { (eval echo "$as_me:17006: \"$ac_try\"") >&5
17007 (eval $ac_try) 2>&5
17009 echo "$as_me:17009: \$? = $ac_status" >&5
17010 (exit "$ac_status"); }; }; then
17011 ac_cv_lib_x_opendir=yes
17013 echo "$as_me: failed program was:" >&5
17014 cat "conftest.$ac_ext" >&5
17015 ac_cv_lib_x_opendir=no
17017 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17018 LIBS=$ac_check_lib_save_LIBS
17020 echo "$as_me:17020: result: $ac_cv_lib_x_opendir" >&5
17021 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17022 if test "$ac_cv_lib_x_opendir" = yes; then
17028 echo "$as_me:17028: checking whether time.h and sys/time.h may both be included" >&5
17029 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17030 if test "${ac_cv_header_time+set}" = set; then
17031 echo $ECHO_N "(cached) $ECHO_C" >&6
17033 cat >"conftest.$ac_ext" <<_ACEOF
17034 #line 17034 "configure"
17035 #include "confdefs.h"
17036 #include <sys/types.h>
17037 #include <sys/time.h>
17043 if ((struct tm *) 0)
17049 rm -f "conftest.$ac_objext"
17050 if { (eval echo "$as_me:17050: \"$ac_compile\"") >&5
17051 (eval $ac_compile) 2>&5
17053 echo "$as_me:17053: \$? = $ac_status" >&5
17054 (exit "$ac_status"); } &&
17055 { ac_try='test -s "conftest.$ac_objext"'
17056 { (eval echo "$as_me:17056: \"$ac_try\"") >&5
17057 (eval $ac_try) 2>&5
17059 echo "$as_me:17059: \$? = $ac_status" >&5
17060 (exit "$ac_status"); }; }; then
17061 ac_cv_header_time=yes
17063 echo "$as_me: failed program was:" >&5
17064 cat "conftest.$ac_ext" >&5
17065 ac_cv_header_time=no
17067 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17069 echo "$as_me:17069: result: $ac_cv_header_time" >&5
17070 echo "${ECHO_T}$ac_cv_header_time" >&6
17071 if test $ac_cv_header_time = yes; then
17073 cat >>confdefs.h <<\EOF
17074 #define TIME_WITH_SYS_TIME 1
17079 ### checks for compiler characteristics
17081 ac_cpp='$CPP $CPPFLAGS'
17082 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17083 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17085 ac_main_return="return"
17087 echo "$as_me:17087: checking for an ANSI C-conforming const" >&5
17088 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17089 if test "${ac_cv_c_const+set}" = set; then
17090 echo $ECHO_N "(cached) $ECHO_C" >&6
17092 cat >"conftest.$ac_ext" <<_ACEOF
17093 #line 17093 "configure"
17094 #include "confdefs.h"
17099 /* FIXME: Include the comments suggested by Paul. */
17100 #ifndef __cplusplus
17101 /* Ultrix mips cc rejects this. */
17102 typedef int charset[2];
17104 /* SunOS 4.1.1 cc rejects this. */
17105 char const *const *ccp;
17107 /* NEC SVR4.0.2 mips cc rejects this. */
17108 struct point {int x, y;};
17109 static struct point const zero = {0,0};
17110 /* AIX XL C 1.02.0.0 rejects this.
17111 It does not let you subtract one const X* pointer from another in
17112 an arm of an if-expression whose if-part is not a constant
17114 const char *g = "string";
17115 ccp = &g + (g ? g-g : 0);
17116 /* HPUX 7.0 cc rejects these. */
17119 ccp = (char const *const *) p;
17120 { /* SCO 3.2v4 cc rejects this. */
17122 char const *s = 0 ? (char *) 0 : (char const *) 0;
17126 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17127 int x[] = {25, 17};
17128 const int *foo = &x[0];
17131 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17132 typedef const int *iptr;
17136 { /* AIX XL C 1.02.0.0 rejects this saying
17137 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17138 struct s { int j; const int *ap[3]; };
17139 struct s *b; b->j = 5;
17141 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17142 const int foo = 10;
17150 rm -f "conftest.$ac_objext"
17151 if { (eval echo "$as_me:17151: \"$ac_compile\"") >&5
17152 (eval $ac_compile) 2>&5
17154 echo "$as_me:17154: \$? = $ac_status" >&5
17155 (exit "$ac_status"); } &&
17156 { ac_try='test -s "conftest.$ac_objext"'
17157 { (eval echo "$as_me:17157: \"$ac_try\"") >&5
17158 (eval $ac_try) 2>&5
17160 echo "$as_me:17160: \$? = $ac_status" >&5
17161 (exit "$ac_status"); }; }; then
17164 echo "$as_me: failed program was:" >&5
17165 cat "conftest.$ac_ext" >&5
17168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17170 echo "$as_me:17170: result: $ac_cv_c_const" >&5
17171 echo "${ECHO_T}$ac_cv_c_const" >&6
17172 if test $ac_cv_c_const = no; then
17174 cat >>confdefs.h <<\EOF
17180 ### Checks for external-data
17182 echo "$as_me:17182: checking if data-only library module links" >&5
17183 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17184 if test "${cf_cv_link_dataonly+set}" = set; then
17185 echo $ECHO_N "(cached) $ECHO_C" >&6
17189 cat >conftest.$ac_ext <<EOF
17190 #line 17190 "configure"
17191 int testdata[3] = { 123, 456, 789 };
17193 if { (eval echo "$as_me:17193: \"$ac_compile\"") >&5
17194 (eval $ac_compile) 2>&5
17196 echo "$as_me:17196: \$? = $ac_status" >&5
17197 (exit "$ac_status"); } ; then
17198 mv conftest.o data.o && \
17199 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17201 rm -f conftest.$ac_ext data.o
17202 cat >conftest.$ac_ext <<EOF
17203 #line 17203 "configure"
17207 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17209 extern int testdata[3];
17210 return testdata[0] == 123
17211 && testdata[1] == 456
17212 && testdata[2] == 789;
17216 if { (eval echo "$as_me:17216: \"$ac_compile\"") >&5
17217 (eval $ac_compile) 2>&5
17219 echo "$as_me:17219: \$? = $ac_status" >&5
17220 (exit "$ac_status"); }; then
17221 mv conftest.o func.o && \
17222 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17224 rm -f conftest.$ac_ext func.o
17225 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17226 cf_saveLIBS="$LIBS"
17227 LIBS="conftest.a $LIBS"
17228 if test "$cross_compiling" = yes; then
17229 cf_cv_link_dataonly=unknown
17231 cat >"conftest.$ac_ext" <<_ACEOF
17232 #line 17232 "configure"
17233 #include "confdefs.h"
17237 extern int testfunc();
17238 ${cf_cv_main_return:-return} (!testfunc());
17242 rm -f "conftest$ac_exeext"
17243 if { (eval echo "$as_me:17243: \"$ac_link\"") >&5
17244 (eval $ac_link) 2>&5
17246 echo "$as_me:17246: \$? = $ac_status" >&5
17247 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17248 { (eval echo "$as_me:17248: \"$ac_try\"") >&5
17249 (eval $ac_try) 2>&5
17251 echo "$as_me:17251: \$? = $ac_status" >&5
17252 (exit "$ac_status"); }; }; then
17253 cf_cv_link_dataonly=yes
17255 echo "$as_me: program exited with status $ac_status" >&5
17256 echo "$as_me: failed program was:" >&5
17257 cat "conftest.$ac_ext" >&5
17258 cf_cv_link_dataonly=no
17260 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17262 LIBS="$cf_saveLIBS"
17266 echo "$as_me:17266: result: $cf_cv_link_dataonly" >&5
17267 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17269 if test "$cf_cv_link_dataonly" = no ; then
17271 cat >>confdefs.h <<\EOF
17272 #define BROKEN_LINKER 1
17278 ### Checks for library functions.
17284 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17285 echo "$as_me:17285: checking for $ac_header" >&5
17286 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17287 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17288 echo $ECHO_N "(cached) $ECHO_C" >&6
17290 cat >"conftest.$ac_ext" <<_ACEOF
17291 #line 17291 "configure"
17292 #include "confdefs.h"
17293 #include <$ac_header>
17295 if { (eval echo "$as_me:17295: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17296 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17298 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17300 cat conftest.err >&5
17301 echo "$as_me:17301: \$? = $ac_status" >&5
17302 (exit "$ac_status"); } >/dev/null; then
17303 if test -s conftest.err; then
17304 ac_cpp_err=$ac_c_preproc_warn_flag
17311 if test -z "$ac_cpp_err"; then
17312 eval "$as_ac_Header=yes"
17314 echo "$as_me: failed program was:" >&5
17315 cat "conftest.$ac_ext" >&5
17316 eval "$as_ac_Header=no"
17318 rm -f conftest.err "conftest.$ac_ext"
17320 echo "$as_me:17320: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17321 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17322 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17323 cat >>confdefs.h <<EOF
17324 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17330 echo "$as_me:17330: checking for working mkstemp" >&5
17331 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17332 if test "${cf_cv_func_mkstemp+set}" = set; then
17333 echo $ECHO_N "(cached) $ECHO_C" >&6
17337 if test "$cross_compiling" = yes; then
17338 cf_cv_func_mkstemp=maybe
17340 cat >"conftest.$ac_ext" <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17344 $ac_includes_default
17348 char *tmpl = "conftestXXXXXX";
17356 for (n = 0; n < 2; ++n) {
17357 strcpy(name[n], tmpl);
17358 if ((fd = mkstemp(name[n])) >= 0) {
17359 if (!strcmp(name[n], tmpl)
17360 || stat(name[n], &sb) != 0
17361 || (sb.st_mode & S_IFMT) != S_IFREG
17362 || (sb.st_mode & 077) != 0) {
17369 && !strcmp(name[0], name[1]))
17371 ${cf_cv_main_return:-return}(result);
17375 rm -f "conftest$ac_exeext"
17376 if { (eval echo "$as_me:17376: \"$ac_link\"") >&5
17377 (eval $ac_link) 2>&5
17379 echo "$as_me:17379: \$? = $ac_status" >&5
17380 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17381 { (eval echo "$as_me:17381: \"$ac_try\"") >&5
17382 (eval $ac_try) 2>&5
17384 echo "$as_me:17384: \$? = $ac_status" >&5
17385 (exit "$ac_status"); }; }; then
17386 cf_cv_func_mkstemp=yes
17389 echo "$as_me: program exited with status $ac_status" >&5
17390 echo "$as_me: failed program was:" >&5
17391 cat "conftest.$ac_ext" >&5
17392 cf_cv_func_mkstemp=no
17395 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17399 echo "$as_me:17399: result: $cf_cv_func_mkstemp" >&5
17400 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17401 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17402 echo "$as_me:17402: checking for mkstemp" >&5
17403 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17404 if test "${ac_cv_func_mkstemp+set}" = set; then
17405 echo $ECHO_N "(cached) $ECHO_C" >&6
17407 cat >"conftest.$ac_ext" <<_ACEOF
17408 #line 17408 "configure"
17409 #include "confdefs.h"
17410 #define mkstemp autoconf_temporary
17411 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17418 /* We use char because int might match the return type of a gcc2
17419 builtin and then its argument prototype would still apply. */
17420 char mkstemp (void);
17426 /* The GNU C library defines stubs for functions which it implements
17427 to always fail with ENOSYS. Some functions are actually named
17428 something starting with __ and the normal name is an alias. */
17429 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17430 #error found stub for mkstemp
17438 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17439 if { (eval echo "$as_me:17439: \"$ac_link\"") >&5
17440 (eval $ac_link) 2>&5
17442 echo "$as_me:17442: \$? = $ac_status" >&5
17443 (exit "$ac_status"); } &&
17444 { ac_try='test -s "conftest$ac_exeext"'
17445 { (eval echo "$as_me:17445: \"$ac_try\"") >&5
17446 (eval $ac_try) 2>&5
17448 echo "$as_me:17448: \$? = $ac_status" >&5
17449 (exit "$ac_status"); }; }; then
17450 ac_cv_func_mkstemp=yes
17452 echo "$as_me: failed program was:" >&5
17453 cat "conftest.$ac_ext" >&5
17454 ac_cv_func_mkstemp=no
17456 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17458 echo "$as_me:17458: result: $ac_cv_func_mkstemp" >&5
17459 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17462 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17464 cat >>confdefs.h <<\EOF
17465 #define HAVE_MKSTEMP 1
17470 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17471 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17472 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17476 if test "$cf_with_ada" != "no" ; then
17478 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17481 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17483 unset ac_cv_path_cf_TEMP_gnat
17485 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17486 set dummy $cf_prog_gnat; ac_word=$2
17487 echo "$as_me:17487: checking for $ac_word" >&5
17488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17489 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17490 echo $ECHO_N "(cached) $ECHO_C" >&6
17492 case $cf_TEMP_gnat in
17494 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17497 ac_save_IFS=$IFS; IFS=$ac_path_separator
17499 for ac_dir in $ac_dummy; do
17501 test -z "$ac_dir" && ac_dir=.
17502 if $as_executable_p "$ac_dir/$ac_word"; then
17503 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17504 echo "$as_me:17504: found $ac_dir/$ac_word" >&5
17509 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17513 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17515 if test -n "$cf_TEMP_gnat"; then
17516 echo "$as_me:17516: result: $cf_TEMP_gnat" >&5
17517 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17519 echo "$as_me:17519: result: no" >&5
17520 echo "${ECHO_T}no" >&6
17523 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17525 if test "x$cf_TEMP_gnat" != xno; then
17526 unset cf_cv_gnat_version
17529 echo "$as_me:17529: checking for $cf_prog_gnat version" >&5
17530 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17531 if test "${cf_cv_gnat_version+set}" = set; then
17532 echo $ECHO_N "(cached) $ECHO_C" >&6
17535 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17536 grep '[0-9].[0-9][0-9]*' |\
17537 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17540 echo "$as_me:17540: result: $cf_cv_gnat_version" >&5
17541 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17542 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17543 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17546 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17549 unset cf_cv_gnat_version
17550 unset ac_cv_path_cf_TEMP_gnat
17553 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17555 cf_cv_prog_gnat_correct=no
17557 cf_ada_make=gnatmake
17558 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17559 # gprconfig is newer than gnatmake; we can continue...
17562 rm -rf ./conftest* ./*~conftest*
17563 if mkdir conftest.src
17567 for cf_gprconfig in Ada C
17569 echo "$as_me:17569: checking for gprconfig name for $cf_gprconfig" >&5
17570 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17571 if test "$cf_gprconfig" = C
17573 for cf_gprconfig_param in \
17574 "$cf_gprconfig,,,,GNATGCC" \
17575 "$cf_gprconfig,,,,GCC" \
17578 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17579 test -n "$cf_gprconfig_value" && break
17582 cf_gprconfig_param=$cf_gprconfig
17583 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17585 if test -n "$cf_gprconfig_value"
17587 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17588 echo "$as_me:17588: result: $cf_gprconfig_value" >&5
17589 echo "${ECHO_T}$cf_gprconfig_value" >&6
17591 echo "$as_me:17591: result: missing" >&5
17592 echo "${ECHO_T}missing" >&6
17598 rm -rf ./conftest* ./*~conftest*
17601 if test "x$cf_ada_config" != "x#"
17604 echo "$as_me:17604: checking for gnat version" >&5
17605 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17606 if test "${cf_cv_gnat_version+set}" = set; then
17607 echo $ECHO_N "(cached) $ECHO_C" >&6
17610 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17611 grep '[0-9].[0-9][0-9]*' |\
17612 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17615 echo "$as_me:17615: result: $cf_cv_gnat_version" >&5
17616 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17617 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17619 case "$cf_cv_gnat_version" in
17620 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17621 cf_cv_prog_gnat_correct=yes
17624 { echo "$as_me:17624: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17625 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17626 cf_cv_prog_gnat_correct=no
17630 # Extract the first word of "m4", so it can be a program name with args.
17631 set dummy m4; ac_word=$2
17632 echo "$as_me:17632: checking for $ac_word" >&5
17633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17634 if test "${ac_cv_prog_M4_exists+set}" = set; then
17635 echo $ECHO_N "(cached) $ECHO_C" >&6
17637 if test -n "$M4_exists"; then
17638 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17640 ac_save_IFS=$IFS; IFS=$ac_path_separator
17642 for ac_dir in $ac_dummy; do
17644 test -z "$ac_dir" && ac_dir=.
17645 $as_executable_p "$ac_dir/$ac_word" || continue
17646 ac_cv_prog_M4_exists="yes"
17647 echo "$as_me:17647: found $ac_dir/$ac_word" >&5
17651 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17654 M4_exists=$ac_cv_prog_M4_exists
17655 if test -n "$M4_exists"; then
17656 echo "$as_me:17656: result: $M4_exists" >&5
17657 echo "${ECHO_T}$M4_exists" >&6
17659 echo "$as_me:17659: result: no" >&5
17660 echo "${ECHO_T}no" >&6
17663 if test "$ac_cv_prog_M4_exists" = no; then
17664 cf_cv_prog_gnat_correct=no
17665 { echo "$as_me:17665: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17666 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17668 if test "$cf_cv_prog_gnat_correct" = yes; then
17669 echo "$as_me:17669: checking if GNAT works" >&5
17670 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17672 rm -rf ./conftest* ./*~conftest*
17673 cat >>conftest.ads <<CF_EOF
17674 procedure conftest;
17676 cat >>conftest.adb <<CF_EOF
17679 procedure conftest is
17681 Text_IO.Put ("Hello World");
17683 GNAT.OS_Lib.OS_Exit (0);
17686 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17687 if ( ./conftest 1>&5 2>&1 ) ; then
17688 cf_cv_prog_gnat_correct=yes
17690 cf_cv_prog_gnat_correct=no
17693 cf_cv_prog_gnat_correct=no
17695 rm -rf ./conftest* ./*~conftest*
17697 echo "$as_me:17697: result: $cf_cv_prog_gnat_correct" >&5
17698 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17701 cf_cv_prog_gnat_correct=no
17705 if test "$cf_cv_prog_gnat_correct" = yes; then
17707 echo "$as_me:17707: checking optimization options for ADAFLAGS" >&5
17708 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17712 ADAFLAGS="$ADAFLAGS -g"
17718 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17720 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17724 echo "$as_me:17724: result: $ADAFLAGS" >&5
17725 echo "${ECHO_T}$ADAFLAGS" >&6
17727 echo "$as_me:17727: checking if GNATPREP supports -T option" >&5
17728 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17729 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17730 echo $ECHO_N "(cached) $ECHO_C" >&6
17733 cf_cv_gnatprep_opt_t=no
17734 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17737 echo "$as_me:17737: result: $cf_cv_gnatprep_opt_t" >&5
17738 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17739 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17741 echo "$as_me:17741: checking if GNAT supports generics" >&5
17742 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17743 case "$cf_cv_gnat_version" in
17744 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17745 cf_gnat_generics=yes
17748 cf_gnat_generics=no
17751 echo "$as_me:17751: result: $cf_gnat_generics" >&5
17752 echo "${ECHO_T}$cf_gnat_generics" >&6
17754 if test "$cf_gnat_generics" = yes
17756 cf_compile_generics=generics
17757 cf_generic_objects="\${GENOBJS}"
17759 cf_compile_generics=
17760 cf_generic_objects=
17763 echo "$as_me:17763: checking if GNAT supports SIGINT" >&5
17764 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17765 if test "${cf_cv_gnat_sigint+set}" = set; then
17766 echo $ECHO_N "(cached) $ECHO_C" >&6
17769 rm -rf ./conftest* ./*~conftest*
17770 cat >>conftest.ads <<CF_EOF
17771 with Ada.Interrupts.Names;
17773 package ConfTest is
17775 pragma Warnings (Off); -- the next pragma exists since 3.11p
17776 pragma Unreserve_All_Interrupts;
17777 pragma Warnings (On);
17779 protected Process is
17781 function Continue return Boolean;
17782 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17784 Done : Boolean := False;
17789 cat >>conftest.adb <<CF_EOF
17790 package body ConfTest is
17791 protected body Process is
17796 function Continue return Boolean is
17803 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17804 cf_cv_gnat_sigint=yes
17806 cf_cv_gnat_sigint=no
17808 rm -rf ./conftest* ./*~conftest*
17811 echo "$as_me:17811: result: $cf_cv_gnat_sigint" >&5
17812 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17814 if test "$cf_cv_gnat_sigint" = yes ; then
17817 USE_GNAT_SIGINT="#"
17820 cf_gnat_libraries=no
17821 cf_gnat_projects=no
17823 if test "$enable_gnat_projects" != no ; then
17824 echo "$as_me:17824: checking if GNAT supports project files" >&5
17825 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17826 case "$cf_cv_gnat_version" in
17830 case "$cf_cv_system_name" in
17834 rm -rf ./conftest* ./*~conftest*
17835 if mkdir conftest.src conftest.bin conftest.lib
17838 rm -rf ./conftest* ./*~conftest*
17839 cat >>library.gpr <<CF_EOF
17841 Kind := External ("LIB_KIND");
17842 for Library_Name use "ConfTest";
17843 for Object_Dir use ".";
17844 for Library_ALI_Dir use External("LIBRARY_DIR");
17845 for Library_Version use External ("SONAME");
17846 for Library_Kind use Kind;
17847 for Library_Dir use External("BUILD_DIR");
17848 Source_Dir := External ("SOURCE_DIR");
17849 for Source_Dirs use (Source_Dir);
17852 cat >>confpackage.ads <<CF_EOF
17853 package ConfPackage is
17854 procedure conftest;
17857 cat >>confpackage.adb <<CF_EOF
17859 package body ConfPackage is
17860 procedure conftest is
17862 Text_IO.Put ("Hello World");
17867 if ( "$cf_ada_make" $ADAFLAGS \
17869 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17870 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17871 -XSOURCE_DIR="`pwd`" \
17872 -XSONAME=libConfTest.so.1 \
17873 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17874 cf_gnat_projects=yes
17878 if test -f conftest.lib/confpackage.ali
17880 cf_gnat_libraries=yes
17882 rm -rf ./conftest* ./*~conftest*
17887 echo "$as_me:17887: result: $cf_gnat_projects" >&5
17888 echo "${ECHO_T}$cf_gnat_projects" >&6
17889 fi # enable_gnat_projects
17891 if test "$cf_gnat_projects" = yes
17893 echo "$as_me:17893: checking if GNAT supports libraries" >&5
17894 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17895 echo "$as_me:17895: result: $cf_gnat_libraries" >&5
17896 echo "${ECHO_T}$cf_gnat_libraries" >&6
17899 USE_OLD_MAKERULES=""
17900 USE_GNAT_PROJECTS="#"
17901 USE_GNAT_MAKE_GPR="#"
17902 USE_GNAT_GPRBUILD="#"
17904 if test "$cf_gnat_projects" = yes
17906 USE_OLD_MAKERULES="#"
17907 USE_GNAT_PROJECTS=""
17908 if test "$cf_cv_VERSION_GPRBUILD" != no
17910 USE_GNAT_GPRBUILD=""
17911 elif test "$cf_cv_VERSION_GNATMAKE" != no
17913 USE_GNAT_MAKE_GPR=""
17915 { echo "$as_me:17915: WARNING: use old makefile rules since tools are missing" >&5
17916 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17920 if test "$cf_gnat_libraries" = yes
17922 USE_GNAT_LIBRARIES=""
17924 USE_GNAT_LIBRARIES="#"
17927 echo "$as_me:17927: checking for ada-compiler" >&5
17928 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17930 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17931 if test "${with_ada_compiler+set}" = set; then
17932 withval="$with_ada_compiler"
17933 cf_ada_compiler=$withval
17935 cf_ada_compiler=gnatmake
17938 echo "$as_me:17938: result: $cf_ada_compiler" >&5
17939 echo "${ECHO_T}$cf_ada_compiler" >&6
17941 cf_ada_package=terminal_interface
17943 echo "$as_me:17943: checking for ada-include" >&5
17944 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17946 # Check whether --with-ada-include or --without-ada-include was given.
17947 if test "${with_ada_include+set}" = set; then
17948 withval="$with_ada_include"
17951 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17952 fi; if test -n "$prefix/share/ada/adainclude" ; then
17954 if test "x$prefix" != xNONE; then
17955 cf_path_syntax="$prefix"
17957 cf_path_syntax="$ac_default_prefix"
17960 case ".$withval" in
17961 (.\$\(*\)*|.\'*\'*)
17965 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17967 (.\$\{*prefix\}*|.\$\{*dir\}*)
17968 eval withval="$withval"
17969 case ".$withval" in
17971 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17976 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17979 { { echo "$as_me:17979: error: expected a pathname, not \"$withval\"" >&5
17980 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17981 { (exit 1); exit 1; }; }
17986 eval ADA_INCLUDE="$withval"
17988 echo "$as_me:17988: result: $ADA_INCLUDE" >&5
17989 echo "${ECHO_T}$ADA_INCLUDE" >&6
17991 echo "$as_me:17991: checking for ada-objects" >&5
17992 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17994 # Check whether --with-ada-objects or --without-ada-objects was given.
17995 if test "${with_ada_objects+set}" = set; then
17996 withval="$with_ada_objects"
17999 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18000 fi; if test -n "$prefix/lib/ada/adalib" ; then
18002 if test "x$prefix" != xNONE; then
18003 cf_path_syntax="$prefix"
18005 cf_path_syntax="$ac_default_prefix"
18008 case ".$withval" in
18009 (.\$\(*\)*|.\'*\'*)
18013 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18015 (.\$\{*prefix\}*|.\$\{*dir\}*)
18016 eval withval="$withval"
18017 case ".$withval" in
18019 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18024 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18027 { { echo "$as_me:18027: error: expected a pathname, not \"$withval\"" >&5
18028 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18029 { (exit 1); exit 1; }; }
18034 eval ADA_OBJECTS="$withval"
18036 echo "$as_me:18036: result: $ADA_OBJECTS" >&5
18037 echo "${ECHO_T}$ADA_OBJECTS" >&6
18039 echo "$as_me:18039: checking if an Ada95 shared-library should be built" >&5
18040 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18042 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18043 if test "${with_ada_sharedlib+set}" = set; then
18044 withval="$with_ada_sharedlib"
18045 with_ada_sharedlib=$withval
18047 with_ada_sharedlib=no
18049 echo "$as_me:18049: result: $with_ada_sharedlib" >&5
18050 echo "${ECHO_T}$with_ada_sharedlib" >&6
18052 if test "x$with_ada_sharedlib" != xno
18054 if test "x$cf_gnat_projects" != xyes
18056 { echo "$as_me:18056: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18057 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18058 with_ada_sharedlib=no
18062 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18063 MAKE_ADA_SHAREDLIB="#"
18065 if test "x$with_ada_sharedlib" != xno
18067 MAKE_ADA_SHAREDLIB=
18068 if test "x$with_ada_sharedlib" != xyes
18070 ADA_SHAREDLIB="$with_ada_sharedlib"
18074 # allow the Ada binding to be renamed
18076 echo "$as_me:18076: checking for ada-libname" >&5
18077 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18079 # Check whether --with-ada-libname or --without-ada-libname was given.
18080 if test "${with_ada_libname+set}" = set; then
18081 withval="$with_ada_libname"
18082 ADA_LIBNAME=$withval
18084 ADA_LIBNAME=AdaCurses
18086 case "x$ADA_LIBNAME" in
18088 ADA_LIBNAME=AdaCurses
18092 echo "$as_me:18092: result: $ADA_LIBNAME" >&5
18093 echo "${ECHO_T}$ADA_LIBNAME" >&6
18096 { { echo "$as_me:18096: error: No usable Ada compiler found" >&5
18097 echo "$as_me: error: No usable Ada compiler found" >&2;}
18098 { (exit 1); exit 1; }; }
18101 { { echo "$as_me:18101: error: The Ada compiler is needed for this package" >&5
18102 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18103 { (exit 1); exit 1; }; }
18106 ################################################################################
18113 ### Construct the list of include-directories to be generated
18115 if test "$srcdir" != "."; then
18116 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18118 CPPFLAGS="-I../include $CPPFLAGS"
18119 if test "$srcdir" != "."; then
18120 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18122 CPPFLAGS="-I. $CPPFLAGS"
18124 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18125 if test "$srcdir" != "."; then
18126 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18128 if test "$GCC" != yes; then
18129 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18130 elif test "$includedir" != "/usr/include"; then
18131 if test "$includedir" = '${prefix}/include' ; then
18132 if test x$prefix != x/usr ; then
18133 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18136 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18140 ### Build up pieces for makefile rules
18141 echo "$as_me:18141: checking default library suffix" >&5
18142 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18144 case $DFT_LWR_MODEL in
18145 (libtool) DFT_ARG_SUFFIX='' ;;
18146 (normal) DFT_ARG_SUFFIX='' ;;
18147 (debug) DFT_ARG_SUFFIX='_g' ;;
18148 (profile) DFT_ARG_SUFFIX='_p' ;;
18149 (shared) DFT_ARG_SUFFIX='' ;;
18151 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18152 echo "$as_me:18152: result: $DFT_ARG_SUFFIX" >&5
18153 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18155 echo "$as_me:18155: checking default library-dependency suffix" >&5
18156 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18158 case X$DFT_LWR_MODEL in
18160 DFT_LIB_SUFFIX='.la'
18161 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18164 case "$cf_cv_system_name" in
18166 DFT_LIB_SUFFIX='_g.lib'
18169 DFT_LIB_SUFFIX='_g.a'
18172 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18175 case "$cf_cv_system_name" in
18177 DFT_LIB_SUFFIX='_p.lib'
18180 DFT_LIB_SUFFIX='_p.a'
18183 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18186 case "$cf_cv_system_name" in
18188 DFT_LIB_SUFFIX='.so'
18189 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18192 DFT_LIB_SUFFIX='.dll'
18193 DFT_DEP_SUFFIX='.dll.lib'
18195 (cygwin*|msys*|mingw*)
18196 DFT_LIB_SUFFIX='.dll'
18197 DFT_DEP_SUFFIX='.dll.a'
18200 DFT_LIB_SUFFIX='.dylib'
18201 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18206 DFT_LIB_SUFFIX='.so'
18207 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18210 DFT_LIB_SUFFIX='.sl'
18211 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18216 DFT_LIB_SUFFIX='.so'
18217 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18224 DFT_LIB_SUFFIX='.lib'
18227 DFT_LIB_SUFFIX='.a'
18230 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18233 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18235 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18236 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18238 echo "$as_me:18238: result: $DFT_DEP_SUFFIX" >&5
18239 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18241 echo "$as_me:18241: checking default object directory" >&5
18242 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18244 case $DFT_LWR_MODEL in
18245 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18246 (normal) DFT_OBJ_SUBDIR='objects' ;;
18247 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18248 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18250 case "$cf_cv_system_name" in
18252 DFT_OBJ_SUBDIR='objects' ;;
18254 DFT_OBJ_SUBDIR='obj_s' ;;
18257 echo "$as_me:18257: result: $DFT_OBJ_SUBDIR" >&5
18258 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18260 ### Set up low-level terminfo dependencies for makefiles.
18262 if test "$DFT_LWR_MODEL" = shared ; then
18263 case $cf_cv_system_name in
18265 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18268 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18273 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18275 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18277 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18279 ### Construct the list of subdirectories for which we'll customize makefiles
18280 ### with the appropriate compile-rules.
18282 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18284 cat >>confdefs.h <<EOF
18285 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18288 ################################################################################
18294 NCURSES_SHLIB2="sh -c"
18296 ADA_SUBDIRS="include gen src doc"
18297 if test "x$cf_with_tests" != "xno" ; then
18298 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18300 for cf_dir in $ADA_SUBDIRS
18302 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18309 # match layout used by make-tar.sh
18310 ADAHTML_DIR=../doc/ada
18312 if test "x$cross_compiling" = xyes ; then
18313 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18315 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18318 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"
18319 ac_config_commands="$ac_config_commands default"
18320 cat >confcache <<\_ACEOF
18321 # This file is a shell script that caches the results of configure
18322 # tests run on this system so they can be shared between configure
18323 # scripts and configure runs, see configure's option --config-cache.
18324 # It is not useful on other systems. If it contains results you don't
18325 # want to keep, you may remove or edit it.
18327 # config.status only pays attention to the cache file if you give it
18328 # the --recheck option to rerun configure.
18330 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18331 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18332 # following values.
18336 # The following way of writing the cache mishandles newlines in values,
18337 # but we know of no workaround that is simple, portable, and efficient.
18338 # So, don't put newlines in cache variables' values.
18339 # Ultrix sh set writes to stderr and can't be redirected directly,
18340 # and sets the high bit in the cache file unless we assign to the vars.
18343 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18345 # `set' does not quote correctly, so add quotes (double-quote
18346 # substitution turns \\\\ into \\, and sed turns \\ into \).
18349 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18352 # `set' quotes correctly as required by POSIX, so do not add quotes.
18354 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18361 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18363 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18365 if cmp -s $cache_file confcache; then :; else
18366 if test -w $cache_file; then
18367 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18368 cat confcache >$cache_file
18370 echo "not updating unwritable cache $cache_file"
18375 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18376 # Let make expand exec_prefix.
18377 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18379 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18380 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18381 # trailing colons and then remove the whole line if VPATH becomes empty
18382 # (actually we leave an empty line to preserve line numbers).
18383 if test "x$srcdir" = x.; then
18384 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18385 s/:*\$(srcdir):*/:/;
18386 s/:*\${srcdir}:*/:/;
18388 s/^\([^=]*=[ ]*\):*/\1/;
18394 DEFS=-DHAVE_CONFIG_H
18396 : "${CONFIG_STATUS=./config.status}"
18397 ac_clean_files_save=$ac_clean_files
18398 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18399 { echo "$as_me:18399: creating $CONFIG_STATUS" >&5
18400 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18401 cat >"$CONFIG_STATUS" <<_ACEOF
18403 # Generated automatically by configure.
18404 # Run this file to recreate the current configuration.
18405 # Compiler output produced by configure, useful for debugging
18406 # configure, is in config.log if it exists.
18408 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18411 SHELL=\${CONFIG_SHELL-$SHELL}
18412 ac_cs_invocation="\$0 \$@"
18414 CLICOLOR_FORCE= GREP_OPTIONS=
18415 unset CLICOLOR_FORCE GREP_OPTIONS
18418 cat >>"$CONFIG_STATUS" <<\_ACEOF
18419 # Be Bourne compatible
18420 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18423 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18427 # Name of the executable.
18428 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18430 if expr a : '\(a\)' >/dev/null 2>&1; then
18436 rm -f conf$$ conf$$.exe conf$$.file
18438 if ln -s conf$$.file conf$$ 2>/dev/null; then
18439 # We could just check for DJGPP; but this test a) works b) is more generic
18440 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18441 if test -f conf$$.exe; then
18442 # Don't use ln at all; we don't have any links
18447 elif ln conf$$.file conf$$ 2>/dev/null; then
18452 rm -f conf$$ conf$$.exe conf$$.file
18454 as_executable_p="test -f"
18456 # Support unset when possible.
18457 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18464 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18465 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18466 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18467 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18468 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18469 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18470 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18471 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18474 # We need space, tab and new line, in precisely that order.
18480 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18486 # Files that config.status was made for.
18487 if test -n "$ac_config_files"; then
18488 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18491 if test -n "$ac_config_headers"; then
18492 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18495 if test -n "$ac_config_links"; then
18496 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18499 if test -n "$ac_config_commands"; then
18500 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18503 cat >>"$CONFIG_STATUS" <<\EOF
18506 \`$as_me' instantiates files from templates according to the
18507 current configuration.
18509 Usage: $0 [OPTIONS] [FILE]...
18511 -h, --help print this help, then exit
18512 -V, --version print version number, then exit
18513 -d, --debug don't remove temporary files
18514 --recheck update $as_me by reconfiguring in the same conditions
18515 --file=FILE[:TEMPLATE]
18516 instantiate the configuration file FILE
18517 --header=FILE[:TEMPLATE]
18518 instantiate the configuration header FILE
18520 Configuration files:
18523 Configuration headers:
18526 Configuration commands:
18529 Report bugs to <dickey@invisible-island.net>."
18532 cat >>"$CONFIG_STATUS" <<EOF
18535 configured by $0, generated by GNU Autoconf 2.52.20230114,
18536 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18538 Copyright 2003-2022,2023 Thomas E. Dickey
18539 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18540 Free Software Foundation, Inc.
18541 This config.status script is free software; the Free Software Foundation
18542 gives unlimited permission to copy, distribute and modify it."
18547 cat >>"$CONFIG_STATUS" <<\EOF
18548 # If no file are specified by the user, then we need to provide default
18549 # value. By we need to know if files were specified by the user.
18555 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18556 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18558 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18562 *) # This is not an option, so the user has probably given explicit
18564 ac_need_defaults=false;;
18568 # Handling of the options.
18570 cat >>"$CONFIG_STATUS" <<EOF
18571 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18572 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18573 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18575 cat >>"$CONFIG_STATUS" <<\EOF
18576 --version | --vers* | -V )
18577 echo "$ac_cs_version"; exit 0 ;;
18579 # Conflict between --help and --header
18580 { { echo "$as_me:18580: error: ambiguous option: $1
18581 Try \`$0 --help' for more information." >&5
18582 echo "$as_me: error: ambiguous option: $1
18583 Try \`$0 --help' for more information." >&2;}
18584 { (exit 1); exit 1; }; };;
18585 --help | --hel | -h )
18586 echo "$ac_cs_usage"; exit 0 ;;
18587 --debug | --d* | -d )
18589 --file | --fil | --fi | --f )
18591 CONFIG_FILES="$CONFIG_FILES $1"
18592 ac_need_defaults=false;;
18593 --header | --heade | --head | --hea )
18595 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18596 ac_need_defaults=false;;
18598 # This is an error.
18599 -*) { { echo "$as_me:18599: error: unrecognized option: $1
18600 Try \`$0 --help' for more information." >&5
18601 echo "$as_me: error: unrecognized option: $1
18602 Try \`$0 --help' for more information." >&2;}
18603 { (exit 1); exit 1; }; } ;;
18605 *) ac_config_targets="$ac_config_targets $1" ;;
18614 ## ----------------------- ##
18615 ## Running config.status. ##
18616 ## ----------------------- ##
18618 This file was extended by $as_me 2.52.20230114, executed with
18619 CONFIG_FILES = $CONFIG_FILES
18620 CONFIG_HEADERS = $CONFIG_HEADERS
18621 CONFIG_LINKS = $CONFIG_LINKS
18622 CONFIG_COMMANDS = $CONFIG_COMMANDS
18623 > "$ac_cs_invocation"
18624 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18629 cat >>"$CONFIG_STATUS" <<EOF
18631 # INIT-COMMANDS section.
18634 ### Special initialization commands, used to pass information from the
18635 ### configuration-run into config.status
18638 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18639 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18640 LIB_NAME="$LIB_NAME"
18641 LIB_PREFIX="$LIB_PREFIX"
18642 LIB_SUFFIX="$LIB_SUFFIX"
18644 NCURSES_MAJOR="$NCURSES_MAJOR"
18645 NCURSES_MINOR="$NCURSES_MINOR"
18646 NCURSES_PATCH="$NCURSES_PATCH"
18648 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18649 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18650 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18651 cf_cv_abi_version="$cf_cv_abi_version"
18652 cf_cv_rel_version="$cf_cv_rel_version"
18653 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18654 cf_cv_shared_soname='$cf_cv_shared_soname'
18655 cf_cv_shlib_version="$cf_cv_shlib_version"
18656 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18657 cf_cv_system_name="$cf_cv_system_name"
18663 cat >>"$CONFIG_STATUS" <<\EOF
18664 for ac_config_target in $ac_config_targets
18666 case "$ac_config_target" in
18667 # Handling of arguments.
18668 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18669 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18670 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18671 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18672 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18673 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18674 *) { { echo "$as_me:18674: error: invalid argument: $ac_config_target" >&5
18675 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18676 { (exit 1); exit 1; }; };;
18680 # If the user did not use the arguments to specify the items to instantiate,
18681 # then the envvar interface is used. Set only those that are not.
18682 # We use the long form for the default assignment because of an extremely
18683 # bizarre bug on SunOS 4.1.3.
18684 if "$ac_need_defaults"; then
18685 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18686 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18687 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18690 # Create a temporary directory, and hook for its removal unless debugging.
18693 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18694 trap '{ (exit 1); exit 1; }' 1 2 13 15
18697 # Create a (secure) tmp directory for tmp files.
18700 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18701 test -n "$tmp" && test -d "$tmp"
18704 tmp=$TMPDIR/cs$$-$RANDOM
18705 (umask 077 && mkdir "$tmp")
18708 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18709 { (exit 1); exit 1; }
18714 cat >>"$CONFIG_STATUS" <<EOF
18717 # CONFIG_FILES section.
18720 # No need to generate the scripts if there are no CONFIG_FILES.
18721 # This happens for instance when ./config.status config.h
18722 if test -n "\$CONFIG_FILES"; then
18723 # Protect against being on the right side of a sed subst in config.status.
18724 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18725 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18726 s,@SHELL@,$SHELL,;t t
18727 s,@exec_prefix@,$exec_prefix,;t t
18728 s,@prefix@,$prefix,;t t
18729 s,@program_transform_name@,$program_transform_name,;t t
18730 s,@bindir@,$bindir,;t t
18731 s,@sbindir@,$sbindir,;t t
18732 s,@libexecdir@,$libexecdir,;t t
18733 s,@datarootdir@,$datarootdir,;t t
18734 s,@datadir@,$datadir,;t t
18735 s,@sysconfdir@,$sysconfdir,;t t
18736 s,@sharedstatedir@,$sharedstatedir,;t t
18737 s,@localstatedir@,$localstatedir,;t t
18738 s,@runstatedir@,$runstatedir,;t t
18739 s,@libdir@,$libdir,;t t
18740 s,@includedir@,$includedir,;t t
18741 s,@oldincludedir@,$oldincludedir,;t t
18742 s,@infodir@,$infodir,;t t
18743 s,@mandir@,$mandir,;t t
18744 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18745 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18746 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18747 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18748 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18749 s,@build_alias@,$build_alias,;t t
18750 s,@host_alias@,$host_alias,;t t
18751 s,@target_alias@,$target_alias,;t t
18752 s,@ECHO_C@,$ECHO_C,;t t
18753 s,@ECHO_N@,$ECHO_N,;t t
18754 s,@ECHO_T@,$ECHO_T,;t t
18755 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18756 s,@DEFS@,$DEFS,;t t
18757 s,@LIBS@,$LIBS,;t t
18758 s,@PACKAGE@,$PACKAGE,;t t
18759 s,@top_builddir@,$top_builddir,;t t
18760 s,@build@,$build,;t t
18761 s,@build_cpu@,$build_cpu,;t t
18762 s,@build_vendor@,$build_vendor,;t t
18763 s,@build_os@,$build_os,;t t
18764 s,@host@,$host,;t t
18765 s,@host_cpu@,$host_cpu,;t t
18766 s,@host_vendor@,$host_vendor,;t t
18767 s,@host_os@,$host_os,;t t
18768 s,@target@,$target,;t t
18769 s,@target_cpu@,$target_cpu,;t t
18770 s,@target_vendor@,$target_vendor,;t t
18771 s,@target_os@,$target_os,;t t
18772 s,@GREP@,$GREP,;t t
18773 s,@FGREP@,$FGREP,;t t
18775 s,@CFLAGS@,$CFLAGS,;t t
18776 s,@LDFLAGS@,$LDFLAGS,;t t
18777 s,@CPPFLAGS@,$CPPFLAGS,;t t
18778 s,@ac_ct_CC@,$ac_ct_CC,;t t
18779 s,@EXEEXT@,$EXEEXT,;t t
18780 s,@OBJEXT@,$OBJEXT,;t t
18781 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18783 s,@EGREP@,$EGREP,;t t
18785 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18786 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18787 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18788 s,@LN_S@,$LN_S,;t t
18789 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18790 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18791 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18792 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18793 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18794 s,@SET_MAKE@,$SET_MAKE,;t t
18795 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18796 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18797 s,@CTAGS@,$CTAGS,;t t
18798 s,@ETAGS@,$ETAGS,;t t
18799 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18800 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18801 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18802 s,@RANLIB@,$RANLIB,;t t
18803 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18805 s,@ac_ct_LD@,$ac_ct_LD,;t t
18807 s,@ac_ct_AR@,$ac_ct_AR,;t t
18808 s,@ARFLAGS@,$ARFLAGS,;t t
18809 s,@DESTDIR@,$DESTDIR,;t t
18810 s,@BUILD_CC@,$BUILD_CC,;t t
18811 s,@BUILD_CPP@,$BUILD_CPP,;t t
18812 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18813 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18814 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18815 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18816 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18817 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18818 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18819 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18820 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18821 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18822 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18823 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18824 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18825 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18826 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18827 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18828 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18829 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18830 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18831 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18832 s,@CC_G_OPT@,$CC_G_OPT,;t t
18833 s,@LD_MODEL@,$LD_MODEL,;t t
18834 s,@shlibdir@,$shlibdir,;t t
18835 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18836 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18837 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18838 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18839 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18840 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18841 s,@LINK_PROGS@,$LINK_PROGS,;t t
18842 s,@LINK_TESTS@,$LINK_TESTS,;t t
18843 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18844 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18845 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18846 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18847 s,@RPATH_LIST@,$RPATH_LIST,;t t
18848 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18849 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18850 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18851 s,@PTHREAD@,$PTHREAD,;t t
18852 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18853 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18854 s,@ECHO_LT@,$ECHO_LT,;t t
18855 s,@ECHO_LD@,$ECHO_LD,;t t
18856 s,@RULE_CC@,$RULE_CC,;t t
18857 s,@SHOW_CC@,$SHOW_CC,;t t
18858 s,@ECHO_CC@,$ECHO_CC,;t t
18859 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18860 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18861 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18862 s,@ADAFLAGS@,$ADAFLAGS,;t t
18863 s,@ADA_TRACE@,$ADA_TRACE,;t t
18864 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18865 s,@M4_exists@,$M4_exists,;t t
18866 s,@cf_ada_make@,$cf_ada_make,;t t
18867 s,@cf_ada_config@,$cf_ada_config,;t t
18868 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18869 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18870 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18871 s,@cf_compile_generics@,$cf_compile_generics,;t t
18872 s,@cf_generic_objects@,$cf_generic_objects,;t t
18873 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18874 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18875 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18876 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18877 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18878 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18879 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18880 s,@cf_ada_package@,$cf_ada_package,;t t
18881 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18882 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18883 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18884 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18885 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18886 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18887 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18888 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18889 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18890 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18891 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18892 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18893 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18894 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18895 s,@TEST_ARG2@,$TEST_ARG2,;t t
18896 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18897 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18898 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18899 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18900 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18901 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18902 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18907 cat >>"$CONFIG_STATUS" <<\EOF
18908 # Split the substitutions into bite-sized pieces for seds with
18909 # small command number limits, like on Digital OSF/1 and HP-UX.
18910 ac_max_sed_lines=48
18911 ac_sed_frag=1 # Number of current file.
18912 ac_beg=1 # First line for current file.
18913 ac_end=$ac_max_sed_lines # Line after last line for current file.
18916 while "$ac_more_lines"; do
18917 if test "$ac_beg" -gt 1; then
18918 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
18920 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
18922 if test ! -s "$tmp"/subs.frag; then
18923 ac_more_lines=false
18925 # The purpose of the label and of the branching condition is to
18926 # speed up the sed processing (if there are no `@' at all, there
18927 # is no need to browse any of the substitutions).
18928 # These are the two extra sed commands mentioned above.
18930 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
18931 # It is possible to make a multiline substitution using escaped newlines.
18932 # Ensure that we do not split the substitution between script fragments.
18934 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18935 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
18936 if test -s "$tmp"/subs.next; then
18937 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
18938 if test ! -s "$tmp"/subs.edit; then
18939 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
18940 if test ! -s "$tmp"/subs.edit; then
18941 if test "$ac_beg" -gt 1; then
18942 ac_end=`expr "$ac_end" - 1`
18949 if test -z "$ac_sed_cmds"; then
18950 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
18952 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
18954 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18956 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18959 if test -z "$ac_sed_cmds"; then
18962 fi # test -n "$CONFIG_FILES"
18965 cat >>"$CONFIG_STATUS" <<\EOF
18966 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18967 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18969 - | *:- | *:-:* ) # input from stdin
18971 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18972 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18973 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18974 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18975 * ) ac_file_in=$ac_file.in ;;
18978 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18979 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18980 X"$ac_file" : 'X\(//\)[^/]' \| \
18981 X"$ac_file" : 'X\(//\)$' \| \
18982 X"$ac_file" : 'X\(/\)' \| \
18983 . : '\(.\)' 2>/dev/null ||
18985 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18986 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18987 /^X\(\/\/\)$/{ s//\1/; q; }
18988 /^X\(\/\).*/{ s//\1/; q; }
18990 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18991 { case "$ac_dir" in
18992 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18996 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18997 case $as_mkdir_dir in
18998 # Skip DOS drivespec
18999 ?:) as_incr_dir=$as_mkdir_dir ;;
19001 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19002 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19007 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19008 # A "../" for each directory in $ac_dir_suffix.
19009 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19011 ac_dir_suffix= ac_dots=
19016 if test -z "$ac_dots"; then
19019 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19021 [\\/]* | ?:[\\/]* )
19022 ac_srcdir="$srcdir$ac_dir_suffix";
19023 ac_top_srcdir="$srcdir" ;;
19024 *) # Relative path.
19025 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19026 ac_top_srcdir="$ac_dots$srcdir" ;;
19030 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19031 *) ac_INSTALL=$ac_dots$INSTALL ;;
19034 if test x"$ac_file" != x-; then
19035 { echo "$as_me:19035: creating $ac_file" >&5
19036 echo "$as_me: creating $ac_file" >&6;}
19039 # Let's still pretend it is `configure' which instantiates (i.e., don't
19040 # use $as_me), people would be surprised to read:
19041 # /* config.h. Generated automatically by config.status. */
19042 configure_input="Generated automatically from `echo $ac_file_in |
19043 sed 's,.*/,,'` by configure."
19045 # First look for the input files in the build tree, otherwise in the
19047 ac_file_inputs=`IFS=:
19048 for f in $ac_file_in; do
19050 -) echo "$tmp"/stdin ;;
19052 # Absolute (can't be DOS-style, as IFS=:)
19053 test -f "$f" || { { echo "$as_me:19053: error: cannot find input file: $f" >&5
19054 echo "$as_me: error: cannot find input file: $f" >&2;}
19055 { (exit 1); exit 1; }; }
19058 if test -f "$f"; then
19061 elif test -f "$srcdir/$f"; then
19066 { { echo "$as_me:19066: error: cannot find input file: $f" >&5
19067 echo "$as_me: error: cannot find input file: $f" >&2;}
19068 { (exit 1); exit 1; }; }
19071 done` || { (exit 1); exit 1; }
19073 cat >>"$CONFIG_STATUS" <<\EOF
19074 ac_warn_datarootdir=no
19075 if test x"$ac_file" != x-; then
19076 for ac_item in $ac_file_inputs
19078 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19079 if test -n "$ac_seen"; then
19080 ac_used=`grep '@datarootdir@' "$ac_item"`
19081 if test -z "$ac_used"; then
19082 { echo "$as_me:19082: WARNING: datarootdir was used implicitly but not set:
19084 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19086 ac_warn_datarootdir=yes
19089 ac_seen=`grep '${datarootdir}' "$ac_item"`
19090 if test -n "$ac_seen"; then
19091 { echo "$as_me:19091: WARNING: datarootdir was used explicitly but not set:
19093 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19095 ac_warn_datarootdir=yes
19100 if test "x$ac_warn_datarootdir" = xyes; then
19101 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19105 cat >>"$CONFIG_STATUS" <<EOF
19109 cat >>"$CONFIG_STATUS" <<\EOF
19111 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19112 s,@configure_input@,$configure_input,;t t
19113 s,@srcdir@,$ac_srcdir,;t t
19114 s,@top_srcdir@,$ac_top_srcdir,;t t
19115 s,@INSTALL@,$ac_INSTALL,;t t
19116 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19119 : "${FGREP:=grep -F}"
19120 : "${EGREP:=grep -E}"
19121 cat >>"$CONFIG_STATUS" <<EOF
19122 : "\${FGREP:=$FGREP}"
19123 : "\${EGREP:=$EGREP}"
19125 cat >>"$CONFIG_STATUS" <<\EOF
19126 if test x"$ac_file" != x-; then
19127 cp "$tmp/out" "$ac_file"
19129 for ac_name in prefix exec_prefix datarootdir
19131 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19132 if test -n "$ac_seen"; then
19133 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19134 if test -z "$ac_init"; then
19135 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19136 { echo "$as_me:19136: WARNING: Variable $ac_name is used but was not set:
19138 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19143 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19144 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19145 if test -s "$tmp"/out; then
19146 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19147 { echo "$as_me:19147: WARNING: Some variables may not be substituted:
19149 echo "$as_me: WARNING: Some variables may not be substituted:
19159 cat >>"$CONFIG_STATUS" <<\EOF
19162 # CONFIG_HEADER section.
19165 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19166 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19168 # ac_d sets the value in "#define NAME VALUE" lines.
19169 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19170 ac_dB='[ ].*$,\1#\2'
19173 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19174 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19175 ac_iB='\([ ]\),\1#\2define\3'
19178 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19179 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19180 ac_uB='$,\1#\2define\3'
19184 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19185 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19187 - | *:- | *:-:* ) # input from stdin
19189 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19190 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19191 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19192 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19193 * ) ac_file_in=$ac_file.in ;;
19196 test x"$ac_file" != x- && { echo "$as_me:19196: creating $ac_file" >&5
19197 echo "$as_me: creating $ac_file" >&6;}
19199 # First look for the input files in the build tree, otherwise in the
19201 ac_file_inputs=`IFS=:
19202 for f in $ac_file_in; do
19204 -) echo "$tmp"/stdin ;;
19206 # Absolute (can't be DOS-style, as IFS=:)
19207 test -f "$f" || { { echo "$as_me:19207: error: cannot find input file: $f" >&5
19208 echo "$as_me: error: cannot find input file: $f" >&2;}
19209 { (exit 1); exit 1; }; }
19212 if test -f "$f"; then
19215 elif test -f "$srcdir/$f"; then
19220 { { echo "$as_me:19220: error: cannot find input file: $f" >&5
19221 echo "$as_me: error: cannot find input file: $f" >&2;}
19222 { (exit 1); exit 1; }; }
19225 done` || { (exit 1); exit 1; }
19226 # Remove the trailing spaces.
19227 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19231 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19232 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19233 # be either 'cat' or 'sort'.
19234 cat confdefs.h | uniq >conftest.vals
19236 # Break up conftest.vals because some shells have a limit on
19237 # the size of here documents, and old seds have small limits too.
19239 rm -f conftest.tail
19240 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19241 while grep . conftest.vals >/dev/null
19243 # Write chunks of a limited-size here document to conftest.frag.
19244 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19245 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19246 echo 'CEOF' >> "$CONFIG_STATUS"
19247 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19248 rm -f conftest.vals
19249 mv conftest.tail conftest.vals
19251 rm -f conftest.vals
19253 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19255 echo ' cat >> conftest.edit <<CEOF
19256 /@DEFS@/r conftest.frag
19259 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19261 mv "$tmp"/out "$tmp"/in
19262 rm -f conftest.edit conftest.frag
19263 ' >> "$CONFIG_STATUS"
19265 cat >>"$CONFIG_STATUS" <<\EOF
19266 # Let's still pretend it is `configure' which instantiates (i.e., don't
19267 # use $as_me), people would be surprised to read:
19268 # /* config.h. Generated automatically by config.status. */
19269 if test x"$ac_file" = x-; then
19270 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19272 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19274 cat "$tmp"/in >>"$tmp"/config.h
19276 if test x"$ac_file" != x-; then
19277 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19278 { echo "$as_me:19278: $ac_file is unchanged" >&5
19279 echo "$as_me: $ac_file is unchanged" >&6;}
19281 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19282 X"$ac_file" : 'X\(//\)[^/]' \| \
19283 X"$ac_file" : 'X\(//\)$' \| \
19284 X"$ac_file" : 'X\(/\)' \| \
19285 . : '\(.\)' 2>/dev/null ||
19287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19288 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19289 /^X\(\/\/\)$/{ s//\1/; q; }
19290 /^X\(\/\).*/{ s//\1/; q; }
19292 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19293 { case "$ac_dir" in
19294 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19298 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19299 case $as_mkdir_dir in
19300 # Skip DOS drivespec
19301 ?:) as_incr_dir=$as_mkdir_dir ;;
19303 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19304 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19311 mv "$tmp/config.h" "$ac_file"
19314 cat "$tmp"/config.h
19315 rm -f "$tmp"/config.h
19319 cat >>"$CONFIG_STATUS" <<\EOF
19321 # CONFIG_COMMANDS section.
19323 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19324 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19325 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19329 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19330 if test -z "$USE_OLD_MAKERULES" ; then
19331 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19338 cat >>"$CONFIG_STATUS" <<\EOF
19340 { (exit 0); exit 0; }
19342 chmod +x "$CONFIG_STATUS"
19343 ac_clean_files=$ac_clean_files_save
19345 # configure is writing to config.log, and then calls config.status.
19346 # config.status does its own redirection, appending to config.log.
19347 # Unfortunately, on DOS this fails, as config.log is still kept open
19348 # by configure, so config.status won't be able to write to it; its
19349 # output is simply discarded. So we exec the FD to /dev/null,
19350 # effectively closing config.log, so it can be properly (re)opened and
19351 # appended to by config.status. When coming back to configure, we
19352 # need to make the FD available again.
19353 if test "$no_create" != yes; then
19356 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19358 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19359 # would make configure fail if this is the last instruction.
19360 "$ac_cs_success" || { (exit 1); exit 1; }
19362 ${MAKE:-make} preinstall