2 # From configure.in Revision: 1.88 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
6 # Copyright 2003-2022,2023 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2022,2023 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20230114. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1067 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1068 if test -f "$ac_dir/install-sh"; then
1070 ac_install_sh="$ac_aux_dir/install-sh -c"
1072 elif test -f "$ac_dir/install.sh"; then
1074 ac_install_sh="$ac_aux_dir/install.sh -c"
1076 elif test -f "$ac_dir/shtool"; then
1078 ac_install_sh="$ac_aux_dir/shtool install -c"
1082 if test -z "$ac_aux_dir"; then
1083 { { echo "$as_me:1083: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1084 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1085 { (exit 1); exit 1; }; }
1087 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1088 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1089 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1091 # Make sure we can run config.sub.
1092 $ac_config_sub sun4 >/dev/null 2>&1 ||
1093 { { echo "$as_me:1093: error: cannot run $ac_config_sub" >&5
1094 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1095 { (exit 1); exit 1; }; }
1097 echo "$as_me:1097: checking build system type" >&5
1098 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1099 if test "${ac_cv_build+set}" = set; then
1100 echo $ECHO_N "(cached) $ECHO_C" >&6
1102 ac_cv_build_alias=$build_alias
1103 test -z "$ac_cv_build_alias" &&
1104 ac_cv_build_alias=`$ac_config_guess`
1105 test -z "$ac_cv_build_alias" &&
1106 { { echo "$as_me:1106: error: cannot guess build type; you must specify one" >&5
1107 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1108 { (exit 1); exit 1; }; }
1109 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1110 { { echo "$as_me:1110: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1111 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1112 { (exit 1); exit 1; }; }
1115 echo "$as_me:1115: result: $ac_cv_build" >&5
1116 echo "${ECHO_T}$ac_cv_build" >&6
1118 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1122 echo "$as_me:1122: checking host system type" >&5
1123 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1124 if test "${ac_cv_host+set}" = set; then
1125 echo $ECHO_N "(cached) $ECHO_C" >&6
1127 ac_cv_host_alias=$host_alias
1128 test -z "$ac_cv_host_alias" &&
1129 ac_cv_host_alias=$ac_cv_build_alias
1130 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1131 { { echo "$as_me:1131: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1132 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1133 { (exit 1); exit 1; }; }
1136 echo "$as_me:1136: result: $ac_cv_host" >&5
1137 echo "${ECHO_T}$ac_cv_host" >&6
1139 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1143 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1144 echo "$as_me:1144: checking target system type" >&5
1145 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1146 if test "${ac_cv_target+set}" = set; then
1147 echo $ECHO_N "(cached) $ECHO_C" >&6
1149 ac_cv_target_alias=$target_alias
1150 test "x$ac_cv_target_alias" = "x" &&
1151 ac_cv_target_alias=$ac_cv_host_alias
1152 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1153 { { echo "$as_me:1153: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1154 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1155 { (exit 1); exit 1; }; }
1158 echo "$as_me:1158: result: $ac_cv_target" >&5
1159 echo "${ECHO_T}$ac_cv_target" >&6
1160 target=$ac_cv_target
1161 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1162 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1163 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1165 # The aliases save the names the user supplied, while $host etc.
1166 # will get canonicalized.
1167 test -n "$target_alias" &&
1168 test "$program_prefix$program_suffix$program_transform_name" = \
1170 program_prefix=${target_alias}-
1171 system_name="$host_os"
1173 system_name="`(uname -s -r) 2>/dev/null`"
1174 if test -z "$system_name" ; then
1175 system_name="`(hostname) 2>/dev/null`"
1178 test -n "$system_name" &&
1179 cat >>confdefs.h <<EOF
1180 #define SYSTEM_NAME "$system_name"
1183 if test "${cf_cv_system_name+set}" = set; then
1184 echo $ECHO_N "(cached) $ECHO_C" >&6
1186 cf_cv_system_name="$system_name"
1189 test -z "$system_name" && system_name="$cf_cv_system_name"
1190 test -n "$cf_cv_system_name" && echo "$as_me:1190: result: Configuring for $cf_cv_system_name" >&5
1191 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1193 if test ".$system_name" != ".$cf_cv_system_name" ; then
1194 echo "$as_me:1194: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1195 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1196 { { echo "$as_me:1196: error: \"Please remove config.cache and try again.\"" >&5
1197 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1198 { (exit 1); exit 1; }; }
1201 # Check whether --with-system-type or --without-system-type was given.
1202 if test "${with_system_type+set}" = set; then
1203 withval="$with_system_type"
1204 { echo "$as_me:1204: WARNING: overriding system type to $withval" >&5
1205 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1206 cf_cv_system_name=$withval
1211 ### Save the given $CFLAGS to allow user-override.
1212 cf_user_CFLAGS="$CFLAGS"
1214 ### Default install-location
1215 for ac_prog in ggrep grep
1217 # Extract the first word of "$ac_prog", so it can be a program name with args.
1218 set dummy $ac_prog; ac_word=$2
1219 echo "$as_me:1219: checking for $ac_word" >&5
1220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1221 if test "${ac_cv_prog_GREP+set}" = set; then
1222 echo $ECHO_N "(cached) $ECHO_C" >&6
1224 if test -n "$GREP"; then
1225 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1227 ac_save_IFS=$IFS; IFS=$ac_path_separator
1229 for ac_dir in $ac_dummy; do
1231 test -z "$ac_dir" && ac_dir=.
1232 $as_executable_p "$ac_dir/$ac_word" || continue
1233 ac_cv_prog_GREP="$ac_prog"
1234 echo "$as_me:1234: found $ac_dir/$ac_word" >&5
1240 GREP=$ac_cv_prog_GREP
1241 if test -n "$GREP"; then
1242 echo "$as_me:1242: result: $GREP" >&5
1243 echo "${ECHO_T}$GREP" >&6
1245 echo "$as_me:1245: result: no" >&5
1246 echo "${ECHO_T}no" >&6
1249 test -n "$GREP" && break
1251 test -n "$GREP" || GREP=": "
1253 echo "$as_me:1253: checking for fgrep" >&5
1254 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1255 if test "${ac_cv_path_FGREP+set}" = set; then
1256 echo $ECHO_N "(cached) $ECHO_C" >&6
1258 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1259 then ac_cv_path_FGREP="$GREP -F"
1261 for ac_prog in gfgrep fgrep
1263 # Extract the first word of "$ac_prog", so it can be a program name with args.
1264 set dummy $ac_prog; ac_word=$2
1265 echo "$as_me:1265: checking for $ac_word" >&5
1266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1267 if test "${ac_cv_path_FGREP+set}" = set; then
1268 echo $ECHO_N "(cached) $ECHO_C" >&6
1272 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1275 ac_save_IFS=$IFS; IFS=$ac_path_separator
1277 for ac_dir in $ac_dummy; do
1279 test -z "$ac_dir" && ac_dir=.
1280 if $as_executable_p "$ac_dir/$ac_word"; then
1281 ac_cv_path_FGREP="$ac_dir/$ac_word"
1282 echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1290 FGREP=$ac_cv_path_FGREP
1292 if test -n "$FGREP"; then
1293 echo "$as_me:1293: result: $FGREP" >&5
1294 echo "${ECHO_T}$FGREP" >&6
1296 echo "$as_me:1296: result: no" >&5
1297 echo "${ECHO_T}no" >&6
1300 test -n "$FGREP" && break
1302 test -n "$FGREP" || FGREP=": "
1304 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1304: error: cannot find workable fgrep" >&5
1305 echo "$as_me: error: cannot find workable fgrep" >&2;}
1306 { (exit 1); exit 1; }; }
1309 echo "$as_me:1309: result: $ac_cv_path_FGREP" >&5
1310 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1311 FGREP="$ac_cv_path_FGREP"
1313 echo "$as_me:1313: checking for prefix" >&5
1314 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1315 if test "x$prefix" = "xNONE" ; then
1316 case "$cf_cv_system_name" in
1317 # non-vendor systems don't have a conflict
1318 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1321 (*) prefix=$ac_default_prefix
1325 echo "$as_me:1325: result: $prefix" >&5
1326 echo "${ECHO_T}$prefix" >&6
1328 if test "x$prefix" = "xNONE" ; then
1329 echo "$as_me:1329: checking for default include-directory" >&5
1330 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1331 test -n "$verbose" && echo 1>&6
1334 "$includedir/ncurses" \
1336 "$prefix/include/ncurses" \
1337 /usr/local/include \
1338 /usr/local/include/ncurses \
1340 /usr/include/ncurses
1342 cf_dir=`eval echo "$cf_symbol"`
1343 if test -f "$cf_dir/curses.h" ; then
1344 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1345 includedir="$cf_symbol"
1346 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1350 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1352 echo "$as_me:1352: result: $includedir" >&5
1353 echo "${ECHO_T}$includedir" >&6
1356 ### Checks for programs.
1359 ac_cpp='$CPP $CPPFLAGS'
1360 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1361 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1362 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1363 ac_main_return="return"
1364 if test -n "$ac_tool_prefix"; then
1365 for ac_prog in gnatgcc gcc cc
1367 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1368 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1369 echo "$as_me:1369: checking for $ac_word" >&5
1370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371 if test "${ac_cv_prog_CC+set}" = set; then
1372 echo $ECHO_N "(cached) $ECHO_C" >&6
1374 if test -n "$CC"; then
1375 ac_cv_prog_CC="$CC" # Let the user override the test.
1377 ac_save_IFS=$IFS; IFS=$ac_path_separator
1379 for ac_dir in $ac_dummy; do
1381 test -z "$ac_dir" && ac_dir=.
1382 $as_executable_p "$ac_dir/$ac_word" || continue
1383 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1384 echo "$as_me:1384: found $ac_dir/$ac_word" >&5
1391 if test -n "$CC"; then
1392 echo "$as_me:1392: result: $CC" >&5
1393 echo "${ECHO_T}$CC" >&6
1395 echo "$as_me:1395: result: no" >&5
1396 echo "${ECHO_T}no" >&6
1399 test -n "$CC" && break
1402 if test -z "$CC"; then
1404 for ac_prog in gnatgcc gcc cc
1406 # Extract the first word of "$ac_prog", so it can be a program name with args.
1407 set dummy $ac_prog; ac_word=$2
1408 echo "$as_me:1408: checking for $ac_word" >&5
1409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1411 echo $ECHO_N "(cached) $ECHO_C" >&6
1413 if test -n "$ac_ct_CC"; then
1414 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1416 ac_save_IFS=$IFS; IFS=$ac_path_separator
1418 for ac_dir in $ac_dummy; do
1420 test -z "$ac_dir" && ac_dir=.
1421 $as_executable_p "$ac_dir/$ac_word" || continue
1422 ac_cv_prog_ac_ct_CC="$ac_prog"
1423 echo "$as_me:1423: found $ac_dir/$ac_word" >&5
1429 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1430 if test -n "$ac_ct_CC"; then
1431 echo "$as_me:1431: result: $ac_ct_CC" >&5
1432 echo "${ECHO_T}$ac_ct_CC" >&6
1434 echo "$as_me:1434: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1438 test -n "$ac_ct_CC" && break
1444 test -z "$CC" && { { echo "$as_me:1444: error: no acceptable cc found in \$PATH" >&5
1445 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1446 { (exit 1); exit 1; }; }
1448 # Provide some information about the compiler.
1449 echo "$as_me:1449:" \
1450 "checking for C compiler version" >&5
1451 ac_compiler=`set X $ac_compile; echo "$2"`
1452 { (eval echo "$as_me:1452: \"$ac_compiler --version </dev/null >&5\"") >&5
1453 (eval $ac_compiler --version </dev/null >&5) 2>&5
1455 echo "$as_me:1455: \$? = $ac_status" >&5
1456 (exit "$ac_status"); }
1457 { (eval echo "$as_me:1457: \"$ac_compiler -v </dev/null >&5\"") >&5
1458 (eval $ac_compiler -v </dev/null >&5) 2>&5
1460 echo "$as_me:1460: \$? = $ac_status" >&5
1461 (exit "$ac_status"); }
1462 { (eval echo "$as_me:1462: \"$ac_compiler -V </dev/null >&5\"") >&5
1463 (eval $ac_compiler -V </dev/null >&5) 2>&5
1465 echo "$as_me:1465: \$? = $ac_status" >&5
1466 (exit "$ac_status"); }
1468 cat >"conftest.$ac_ext" <<_ACEOF
1469 #line 1469 "configure"
1470 #include "confdefs.h"
1480 ac_clean_files_save=$ac_clean_files
1481 ac_clean_files="$ac_clean_files a.out a.exe"
1482 # Try to create an executable without -o first, disregard a.out.
1483 # It will help us diagnose broken compilers, and finding out an intuition
1485 echo "$as_me:1485: checking for C compiler default output" >&5
1486 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1487 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1488 if { (eval echo "$as_me:1488: \"$ac_link_default\"") >&5
1489 (eval $ac_link_default) 2>&5
1491 echo "$as_me:1491: \$? = $ac_status" >&5
1492 (exit "$ac_status"); }; then
1493 # Find the output, starting from the most likely. This scheme is
1494 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1496 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1497 ls a.out conftest 2>/dev/null;
1498 ls a.* conftest.* 2>/dev/null`; do
1500 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1501 a.out ) # We found the default executable, but exeext='' is most
1504 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1505 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1512 echo "$as_me: failed program was:" >&5
1513 cat "conftest.$ac_ext" >&5
1514 { { echo "$as_me:1514: error: C compiler cannot create executables" >&5
1515 echo "$as_me: error: C compiler cannot create executables" >&2;}
1516 { (exit 77); exit 77; }; }
1519 ac_exeext=$ac_cv_exeext
1520 echo "$as_me:1520: result: $ac_file" >&5
1521 echo "${ECHO_T}$ac_file" >&6
1523 # Check the compiler produces executables we can run. If not, either
1524 # the compiler is broken, or we cross compile.
1525 echo "$as_me:1525: checking whether the C compiler works" >&5
1526 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1527 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1528 # If not cross compiling, check that we can run a simple program.
1529 if test "$cross_compiling" != yes; then
1530 if { ac_try='./$ac_file'
1531 { (eval echo "$as_me:1531: \"$ac_try\"") >&5
1534 echo "$as_me:1534: \$? = $ac_status" >&5
1535 (exit "$ac_status"); }; }; then
1538 if test "$cross_compiling" = maybe; then
1541 { { echo "$as_me:1541: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&5
1543 echo "$as_me: error: cannot run C compiled programs.
1544 If you meant to cross compile, use \`--host'." >&2;}
1545 { (exit 1); exit 1; }; }
1549 echo "$as_me:1549: result: yes" >&5
1550 echo "${ECHO_T}yes" >&6
1552 rm -f a.out a.exe "conftest$ac_cv_exeext"
1553 ac_clean_files=$ac_clean_files_save
1554 # Check the compiler produces executables we can run. If not, either
1555 # the compiler is broken, or we cross compile.
1556 echo "$as_me:1556: checking whether we are cross compiling" >&5
1557 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1558 echo "$as_me:1558: result: $cross_compiling" >&5
1559 echo "${ECHO_T}$cross_compiling" >&6
1561 echo "$as_me:1561: checking for executable suffix" >&5
1562 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1563 if { (eval echo "$as_me:1563: \"$ac_link\"") >&5
1564 (eval $ac_link) 2>&5
1566 echo "$as_me:1566: \$? = $ac_status" >&5
1567 (exit "$ac_status"); }; then
1568 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1569 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1570 # work properly (i.e., refer to `conftest.exe'), while it won't with
1572 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1574 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1575 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1582 { { echo "$as_me:1582: error: cannot compute EXEEXT: cannot compile and link" >&5
1583 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1584 { (exit 1); exit 1; }; }
1587 rm -f "conftest$ac_cv_exeext"
1588 echo "$as_me:1588: result: $ac_cv_exeext" >&5
1589 echo "${ECHO_T}$ac_cv_exeext" >&6
1591 rm -f "conftest.$ac_ext"
1592 EXEEXT=$ac_cv_exeext
1594 echo "$as_me:1594: checking for object suffix" >&5
1595 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1596 if test "${ac_cv_objext+set}" = set; then
1597 echo $ECHO_N "(cached) $ECHO_C" >&6
1599 cat >"conftest.$ac_ext" <<_ACEOF
1600 #line 1600 "configure"
1601 #include "confdefs.h"
1611 rm -f conftest.o conftest.obj
1612 if { (eval echo "$as_me:1612: \"$ac_compile\"") >&5
1613 (eval $ac_compile) 2>&5
1615 echo "$as_me:1615: \$? = $ac_status" >&5
1616 (exit "$ac_status"); }; then
1617 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1619 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1620 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1625 echo "$as_me: failed program was:" >&5
1626 cat "conftest.$ac_ext" >&5
1627 { { echo "$as_me:1627: error: cannot compute OBJEXT: cannot compile" >&5
1628 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1629 { (exit 1); exit 1; }; }
1632 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1634 echo "$as_me:1634: result: $ac_cv_objext" >&5
1635 echo "${ECHO_T}$ac_cv_objext" >&6
1636 OBJEXT=$ac_cv_objext
1638 echo "$as_me:1638: checking whether we are using the GNU C compiler" >&5
1639 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1640 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1641 echo $ECHO_N "(cached) $ECHO_C" >&6
1643 cat >"conftest.$ac_ext" <<_ACEOF
1644 #line 1644 "configure"
1645 #include "confdefs.h"
1658 rm -f "conftest.$ac_objext"
1659 if { (eval echo "$as_me:1659: \"$ac_compile\"") >&5
1660 (eval $ac_compile) 2>&5
1662 echo "$as_me:1662: \$? = $ac_status" >&5
1663 (exit "$ac_status"); } &&
1664 { ac_try='test -s "conftest.$ac_objext"'
1665 { (eval echo "$as_me:1665: \"$ac_try\"") >&5
1668 echo "$as_me:1668: \$? = $ac_status" >&5
1669 (exit "$ac_status"); }; }; then
1672 echo "$as_me: failed program was:" >&5
1673 cat "conftest.$ac_ext" >&5
1676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1677 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1680 echo "$as_me:1680: result: $ac_cv_c_compiler_gnu" >&5
1681 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1682 GCC=`test $ac_compiler_gnu = yes && echo yes`
1683 ac_test_CFLAGS=${CFLAGS+set}
1684 ac_save_CFLAGS=$CFLAGS
1686 echo "$as_me:1686: checking whether $CC accepts -g" >&5
1687 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1688 if test "${ac_cv_prog_cc_g+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >"conftest.$ac_ext" <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1703 rm -f "conftest.$ac_objext"
1704 if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
1705 (eval $ac_compile) 2>&5
1707 echo "$as_me:1707: \$? = $ac_status" >&5
1708 (exit "$ac_status"); } &&
1709 { ac_try='test -s "conftest.$ac_objext"'
1710 { (eval echo "$as_me:1710: \"$ac_try\"") >&5
1713 echo "$as_me:1713: \$? = $ac_status" >&5
1714 (exit "$ac_status"); }; }; then
1717 echo "$as_me: failed program was:" >&5
1718 cat "conftest.$ac_ext" >&5
1721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1723 echo "$as_me:1723: result: $ac_cv_prog_cc_g" >&5
1724 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1725 if test "$ac_test_CFLAGS" = set; then
1726 CFLAGS=$ac_save_CFLAGS
1727 elif test $ac_cv_prog_cc_g = yes; then
1728 if test "$GCC" = yes; then
1734 if test "$GCC" = yes; then
1740 # Some people use a C++ compiler to compile C. Since we use `exit',
1741 # in C++ we need to declare it. In case someone uses the same compiler
1742 # for both compiling C and C++ we need to have the C++ compiler decide
1743 # the declaration of exit, since it's the most demanding environment.
1744 cat >"conftest.$ac_ext" <<_ACEOF
1749 rm -f "conftest.$ac_objext"
1750 if { (eval echo "$as_me:1750: \"$ac_compile\"") >&5
1751 (eval $ac_compile) 2>&5
1753 echo "$as_me:1753: \$? = $ac_status" >&5
1754 (exit "$ac_status"); } &&
1755 { ac_try='test -s "conftest.$ac_objext"'
1756 { (eval echo "$as_me:1756: \"$ac_try\"") >&5
1759 echo "$as_me:1759: \$? = $ac_status" >&5
1760 (exit "$ac_status"); }; }; then
1761 for ac_declaration in \
1763 '#include <stdlib.h>' \
1764 'extern "C" void std::exit (int) throw (); using std::exit;' \
1765 'extern "C" void std::exit (int); using std::exit;' \
1766 'extern "C" void exit (int) throw ();' \
1767 'extern "C" void exit (int);' \
1770 cat >"conftest.$ac_ext" <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1783 rm -f "conftest.$ac_objext"
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785 (eval $ac_compile) 2>&5
1787 echo "$as_me:1787: \$? = $ac_status" >&5
1788 (exit "$ac_status"); } &&
1789 { ac_try='test -s "conftest.$ac_objext"'
1790 { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1793 echo "$as_me:1793: \$? = $ac_status" >&5
1794 (exit "$ac_status"); }; }; then
1797 echo "$as_me: failed program was:" >&5
1798 cat "conftest.$ac_ext" >&5
1801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1802 cat >"conftest.$ac_ext" <<_ACEOF
1803 #line 1803 "configure"
1804 #include "confdefs.h"
1814 rm -f "conftest.$ac_objext"
1815 if { (eval echo "$as_me:1815: \"$ac_compile\"") >&5
1816 (eval $ac_compile) 2>&5
1818 echo "$as_me:1818: \$? = $ac_status" >&5
1819 (exit "$ac_status"); } &&
1820 { ac_try='test -s "conftest.$ac_objext"'
1821 { (eval echo "$as_me:1821: \"$ac_try\"") >&5
1824 echo "$as_me:1824: \$? = $ac_status" >&5
1825 (exit "$ac_status"); }; }; then
1828 echo "$as_me: failed program was:" >&5
1829 cat "conftest.$ac_ext" >&5
1831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1834 if test -n "$ac_declaration"; then
1835 echo '#ifdef __cplusplus' >>confdefs.h
1836 echo "$ac_declaration" >>confdefs.h
1837 echo '#endif' >>confdefs.h
1841 echo "$as_me: failed program was:" >&5
1842 cat "conftest.$ac_ext" >&5
1844 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1846 ac_cpp='$CPP $CPPFLAGS'
1847 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1848 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1849 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1850 ac_main_return="return"
1853 if test "$GCC" = yes ; then
1854 echo "$as_me:1854: checking version of $CC" >&5
1855 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1856 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1857 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1858 echo "$as_me:1858: result: $GCC_VERSION" >&5
1859 echo "${ECHO_T}$GCC_VERSION" >&6
1864 if test "$GCC" = yes ; then
1867 echo "$as_me:1867: checking if this is really Intel C compiler" >&5
1868 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1869 cf_save_CFLAGS="$CFLAGS"
1870 CFLAGS="$CFLAGS -no-gcc"
1871 cat >"conftest.$ac_ext" <<_ACEOF
1872 #line 1872 "configure"
1873 #include "confdefs.h"
1879 #ifdef __INTEL_COMPILER
1888 rm -f "conftest.$ac_objext"
1889 if { (eval echo "$as_me:1889: \"$ac_compile\"") >&5
1890 (eval $ac_compile) 2>&5
1892 echo "$as_me:1892: \$? = $ac_status" >&5
1893 (exit "$ac_status"); } &&
1894 { ac_try='test -s "conftest.$ac_objext"'
1895 { (eval echo "$as_me:1895: \"$ac_try\"") >&5
1898 echo "$as_me:1898: \$? = $ac_status" >&5
1899 (exit "$ac_status"); }; }; then
1901 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1904 echo "$as_me: failed program was:" >&5
1905 cat "conftest.$ac_ext" >&5
1907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1908 CFLAGS="$cf_save_CFLAGS"
1909 echo "$as_me:1909: result: $INTEL_COMPILER" >&5
1910 echo "${ECHO_T}$INTEL_COMPILER" >&6
1917 if test "$GCC" = yes ; then
1918 echo "$as_me:1918: checking if this is really Clang C compiler" >&5
1919 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1920 cf_save_CFLAGS="$CFLAGS"
1921 cat >"conftest.$ac_ext" <<_ACEOF
1922 #line 1922 "configure"
1923 #include "confdefs.h"
1938 rm -f "conftest.$ac_objext"
1939 if { (eval echo "$as_me:1939: \"$ac_compile\"") >&5
1940 (eval $ac_compile) 2>&5
1942 echo "$as_me:1942: \$? = $ac_status" >&5
1943 (exit "$ac_status"); } &&
1944 { ac_try='test -s "conftest.$ac_objext"'
1945 { (eval echo "$as_me:1945: \"$ac_try\"") >&5
1948 echo "$as_me:1948: \$? = $ac_status" >&5
1949 (exit "$ac_status"); }; }; then
1953 echo "$as_me: failed program was:" >&5
1954 cat "conftest.$ac_ext" >&5
1956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1957 CFLAGS="$cf_save_CFLAGS"
1958 echo "$as_me:1958: result: $CLANG_COMPILER" >&5
1959 echo "${ECHO_T}$CLANG_COMPILER" >&6
1964 if test "x$CLANG_COMPILER" = "xyes" ; then
1966 (c[1-9][0-9]|*/c[1-9][0-9])
1967 { echo "$as_me:1967: WARNING: replacing broken compiler alias $CC" >&5
1968 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1969 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1974 echo "$as_me:1974: checking version of $CC" >&5
1975 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1976 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1977 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1978 echo "$as_me:1978: result: $CLANG_VERSION" >&5
1979 echo "${ECHO_T}$CLANG_VERSION" >&6
1981 for cf_clang_opt in \
1982 -Qunused-arguments \
1983 -Wno-error=implicit-function-declaration
1985 echo "$as_me:1985: checking if option $cf_clang_opt works" >&5
1986 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1987 cf_save_CFLAGS="$CFLAGS"
1988 CFLAGS="$CFLAGS $cf_clang_opt"
1989 cat >"conftest.$ac_ext" <<_ACEOF
1990 #line 1990 "configure"
1991 #include "confdefs.h"
1998 printf("hello!\\n");
2003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2004 if { (eval echo "$as_me:2004: \"$ac_link\"") >&5
2005 (eval $ac_link) 2>&5
2007 echo "$as_me:2007: \$? = $ac_status" >&5
2008 (exit "$ac_status"); } &&
2009 { ac_try='test -s "conftest$ac_exeext"'
2010 { (eval echo "$as_me:2010: \"$ac_try\"") >&5
2013 echo "$as_me:2013: \$? = $ac_status" >&5
2014 (exit "$ac_status"); }; }; then
2018 echo "$as_me: failed program was:" >&5
2019 cat "conftest.$ac_ext" >&5
2023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2024 echo "$as_me:2024: result: $cf_clang_optok" >&5
2025 echo "${ECHO_T}$cf_clang_optok" >&6
2026 CFLAGS="$cf_save_CFLAGS"
2027 if test "$cf_clang_optok" = yes; then
2028 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2030 echo "${as_me:-configure}:2030: testing adding option $cf_clang_opt ..." 1>&5
2032 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2033 CFLAGS="${CFLAGS}$cf_clang_opt"
2039 echo "$as_me:2039: checking for $CC option to accept ANSI C" >&5
2040 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2041 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2042 echo $ECHO_N "(cached) $ECHO_C" >&6
2044 ac_cv_prog_cc_stdc=no
2046 cat >"conftest.$ac_ext" <<_ACEOF
2047 #line 2047 "configure"
2048 #include "confdefs.h"
2051 #include <sys/types.h>
2052 #include <sys/stat.h>
2053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2054 struct buf { int x; };
2055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2056 static char *e (char **p, int i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 # if $PKG_CONFIG_LIBDIR is set, try to use that
3283 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);
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);
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");
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
8274 printf("%s\\n", NCURSES_VERSION);
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);
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");
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);
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);
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");
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=600
12457 cf_xopen_source="-D_APPLE_C_SOURCE"
12460 cf_xopen_source="-D_DARWIN_C_SOURCE"
12463 (freebsd*|dragonfly*|midnightbsd*)
12464 # 5.x headers associate
12465 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12466 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12467 cf_POSIX_C_SOURCE=200112L
12468 cf_XOPEN_SOURCE=600
12469 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12472 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12475 cf_xopen_source="-D_HPUX_SOURCE"
12478 cf_xopen_source="-D_SGI_SOURCE"
12481 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12483 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12485 echo "$as_me:12485: checking if this is the GNU C library" >&5
12486 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12487 if test "${cf_cv_gnu_library+set}" = set; then
12488 echo $ECHO_N "(cached) $ECHO_C" >&6
12491 cat >"conftest.$ac_ext" <<_ACEOF
12492 #line 12492 "configure"
12493 #include "confdefs.h"
12494 #include <sys/types.h>
12499 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12501 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12504 # error not GNU C library
12510 rm -f "conftest.$ac_objext"
12511 if { (eval echo "$as_me:12511: \"$ac_compile\"") >&5
12512 (eval $ac_compile) 2>&5
12514 echo "$as_me:12514: \$? = $ac_status" >&5
12515 (exit "$ac_status"); } &&
12516 { ac_try='test -s "conftest.$ac_objext"'
12517 { (eval echo "$as_me:12517: \"$ac_try\"") >&5
12518 (eval $ac_try) 2>&5
12520 echo "$as_me:12520: \$? = $ac_status" >&5
12521 (exit "$ac_status"); }; }; then
12522 cf_cv_gnu_library=yes
12524 echo "$as_me: failed program was:" >&5
12525 cat "conftest.$ac_ext" >&5
12526 cf_cv_gnu_library=no
12528 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12531 echo "$as_me:12531: result: $cf_cv_gnu_library" >&5
12532 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12534 if test x$cf_cv_gnu_library = xyes; then
12536 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12537 # was changed to help a little. newlib incorporated the change about 4
12539 echo "$as_me:12539: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12540 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12541 if test "${cf_cv_gnu_library_219+set}" = set; then
12542 echo $ECHO_N "(cached) $ECHO_C" >&6
12545 cf_save="$CPPFLAGS"
12547 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12548 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12550 cat >"conftest.$ac_ext" <<_ACEOF
12551 #line 12551 "configure"
12552 #include "confdefs.h"
12553 #include <sys/types.h>
12558 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12560 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12563 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12569 rm -f "conftest.$ac_objext"
12570 if { (eval echo "$as_me:12570: \"$ac_compile\"") >&5
12571 (eval $ac_compile) 2>&5
12573 echo "$as_me:12573: \$? = $ac_status" >&5
12574 (exit "$ac_status"); } &&
12575 { ac_try='test -s "conftest.$ac_objext"'
12576 { (eval echo "$as_me:12576: \"$ac_try\"") >&5
12577 (eval $ac_try) 2>&5
12579 echo "$as_me:12579: \$? = $ac_status" >&5
12580 (exit "$ac_status"); }; }; then
12581 cf_cv_gnu_library_219=yes
12583 echo "$as_me: failed program was:" >&5
12584 cat "conftest.$ac_ext" >&5
12585 cf_cv_gnu_library_219=no
12587 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12588 CPPFLAGS="$cf_save"
12591 echo "$as_me:12591: result: $cf_cv_gnu_library_219" >&5
12592 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12594 if test "x$cf_cv_gnu_library_219" = xyes; then
12595 cf_save="$CPPFLAGS"
12596 echo "$as_me:12596: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12597 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12598 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12599 echo $ECHO_N "(cached) $ECHO_C" >&6
12605 cf_new_extra_cppflags=
12607 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12609 case "$cf_fix_cppflags" in
12611 case "$cf_add_cflags" in
12612 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12613 case "$cf_add_cflags" in
12615 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12617 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12618 && test -z "${cf_tst_cflags}" \
12619 && cf_fix_cppflags=yes
12621 if test "$cf_fix_cppflags" = yes ; then
12623 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12624 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12627 elif test "${cf_tst_cflags}" = "\"'" ; then
12629 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12630 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12636 case "$CPPFLAGS" in
12640 case "$cf_add_cflags" in
12642 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12644 CPPFLAGS=`echo "$CPPFLAGS" | \
12645 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12646 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12651 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12652 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12659 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12660 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12667 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12668 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12670 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12672 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12673 && test -z "${cf_tst_cflags}" \
12674 && cf_fix_cppflags=no
12679 if test -n "$cf_new_cflags" ; then
12681 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12682 CFLAGS="${CFLAGS}$cf_new_cflags"
12686 if test -n "$cf_new_cppflags" ; then
12688 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12689 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12693 if test -n "$cf_new_extra_cppflags" ; then
12695 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12696 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12700 cat >"conftest.$ac_ext" <<_ACEOF
12701 #line 12701 "configure"
12702 #include "confdefs.h"
12704 #include <limits.h>
12705 #include <sys/types.h>
12711 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12714 # error GNU C library is too old
12720 rm -f "conftest.$ac_objext"
12721 if { (eval echo "$as_me:12721: \"$ac_compile\"") >&5
12722 (eval $ac_compile) 2>&5
12724 echo "$as_me:12724: \$? = $ac_status" >&5
12725 (exit "$ac_status"); } &&
12726 { ac_try='test -s "conftest.$ac_objext"'
12727 { (eval echo "$as_me:12727: \"$ac_try\"") >&5
12728 (eval $ac_try) 2>&5
12730 echo "$as_me:12730: \$? = $ac_status" >&5
12731 (exit "$ac_status"); }; }; then
12732 cf_cv_gnu_dftsrc_219=yes
12734 echo "$as_me: failed program was:" >&5
12735 cat "conftest.$ac_ext" >&5
12736 cf_cv_gnu_dftsrc_219=no
12738 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12741 echo "$as_me:12741: result: $cf_cv_gnu_dftsrc_219" >&5
12742 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12743 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12745 cf_cv_gnu_dftsrc_219=maybe
12748 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12750 echo "$as_me:12750: checking if we must define _GNU_SOURCE" >&5
12751 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12752 if test "${cf_cv_gnu_source+set}" = set; then
12753 echo $ECHO_N "(cached) $ECHO_C" >&6
12756 cat >"conftest.$ac_ext" <<_ACEOF
12757 #line 12757 "configure"
12758 #include "confdefs.h"
12759 #include <sys/types.h>
12764 #ifndef _XOPEN_SOURCE
12765 #error expected _XOPEN_SOURCE to be defined
12771 rm -f "conftest.$ac_objext"
12772 if { (eval echo "$as_me:12772: \"$ac_compile\"") >&5
12773 (eval $ac_compile) 2>&5
12775 echo "$as_me:12775: \$? = $ac_status" >&5
12776 (exit "$ac_status"); } &&
12777 { ac_try='test -s "conftest.$ac_objext"'
12778 { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779 (eval $ac_try) 2>&5
12781 echo "$as_me:12781: \$? = $ac_status" >&5
12782 (exit "$ac_status"); }; }; then
12783 cf_cv_gnu_source=no
12785 echo "$as_me: failed program was:" >&5
12786 cat "conftest.$ac_ext" >&5
12787 cf_save="$CPPFLAGS"
12792 cf_new_extra_cppflags=
12794 for cf_add_cflags in -D_GNU_SOURCE
12796 case "$cf_fix_cppflags" in
12798 case "$cf_add_cflags" in
12799 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12800 case "$cf_add_cflags" in
12802 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12804 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12805 && test -z "${cf_tst_cflags}" \
12806 && cf_fix_cppflags=yes
12808 if test "$cf_fix_cppflags" = yes ; then
12810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12814 elif test "${cf_tst_cflags}" = "\"'" ; then
12816 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12817 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12823 case "$CPPFLAGS" in
12827 case "$cf_add_cflags" in
12829 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12831 CPPFLAGS=`echo "$CPPFLAGS" | \
12832 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12833 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12838 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12839 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12846 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12847 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12854 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12855 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12857 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12859 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12860 && test -z "${cf_tst_cflags}" \
12861 && cf_fix_cppflags=no
12866 if test -n "$cf_new_cflags" ; then
12868 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12869 CFLAGS="${CFLAGS}$cf_new_cflags"
12873 if test -n "$cf_new_cppflags" ; then
12875 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12876 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12880 if test -n "$cf_new_extra_cppflags" ; then
12882 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12883 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12887 cat >"conftest.$ac_ext" <<_ACEOF
12888 #line 12888 "configure"
12889 #include "confdefs.h"
12890 #include <sys/types.h>
12895 #ifdef _XOPEN_SOURCE
12896 #error expected _XOPEN_SOURCE to be undefined
12902 rm -f "conftest.$ac_objext"
12903 if { (eval echo "$as_me:12903: \"$ac_compile\"") >&5
12904 (eval $ac_compile) 2>&5
12906 echo "$as_me:12906: \$? = $ac_status" >&5
12907 (exit "$ac_status"); } &&
12908 { ac_try='test -s "conftest.$ac_objext"'
12909 { (eval echo "$as_me:12909: \"$ac_try\"") >&5
12910 (eval $ac_try) 2>&5
12912 echo "$as_me:12912: \$? = $ac_status" >&5
12913 (exit "$ac_status"); }; }; then
12914 cf_cv_gnu_source=no
12916 echo "$as_me: failed program was:" >&5
12917 cat "conftest.$ac_ext" >&5
12918 cf_cv_gnu_source=yes
12920 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12921 CPPFLAGS="$cf_save"
12924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12927 echo "$as_me:12927: result: $cf_cv_gnu_source" >&5
12928 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12930 if test "$cf_cv_gnu_source" = yes
12932 echo "$as_me:12932: checking if we should also define _DEFAULT_SOURCE" >&5
12933 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12934 if test "${cf_cv_default_source+set}" = set; then
12935 echo $ECHO_N "(cached) $ECHO_C" >&6
12938 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12939 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12941 cat >"conftest.$ac_ext" <<_ACEOF
12942 #line 12942 "configure"
12943 #include "confdefs.h"
12944 #include <sys/types.h>
12949 #ifdef _DEFAULT_SOURCE
12950 #error expected _DEFAULT_SOURCE to be undefined
12956 rm -f "conftest.$ac_objext"
12957 if { (eval echo "$as_me:12957: \"$ac_compile\"") >&5
12958 (eval $ac_compile) 2>&5
12960 echo "$as_me:12960: \$? = $ac_status" >&5
12961 (exit "$ac_status"); } &&
12962 { ac_try='test -s "conftest.$ac_objext"'
12963 { (eval echo "$as_me:12963: \"$ac_try\"") >&5
12964 (eval $ac_try) 2>&5
12966 echo "$as_me:12966: \$? = $ac_status" >&5
12967 (exit "$ac_status"); }; }; then
12968 cf_cv_default_source=no
12970 echo "$as_me: failed program was:" >&5
12971 cat "conftest.$ac_ext" >&5
12972 cf_cv_default_source=yes
12974 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12977 echo "$as_me:12977: result: $cf_cv_default_source" >&5
12978 echo "${ECHO_T}$cf_cv_default_source" >&6
12979 if test "$cf_cv_default_source" = yes
12982 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12983 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12993 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12996 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12999 if test "$cf_cv_posix_visible" = no; then
13001 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13003 cf_save_CFLAGS="$CFLAGS"
13004 cf_save_CPPFLAGS="$CPPFLAGS"
13006 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13007 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13008 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13010 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13011 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13012 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13014 echo "$as_me:13014: checking if we should define _POSIX_C_SOURCE" >&5
13015 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13016 if test "${cf_cv_posix_c_source+set}" = set; then
13017 echo $ECHO_N "(cached) $ECHO_C" >&6
13020 echo "${as_me:-configure}:13020: testing if the symbol is already defined go no further ..." 1>&5
13022 cat >"conftest.$ac_ext" <<_ACEOF
13023 #line 13023 "configure"
13024 #include "confdefs.h"
13025 #include <sys/types.h>
13030 #ifndef _POSIX_C_SOURCE
13037 rm -f "conftest.$ac_objext"
13038 if { (eval echo "$as_me:13038: \"$ac_compile\"") >&5
13039 (eval $ac_compile) 2>&5
13041 echo "$as_me:13041: \$? = $ac_status" >&5
13042 (exit "$ac_status"); } &&
13043 { ac_try='test -s "conftest.$ac_objext"'
13044 { (eval echo "$as_me:13044: \"$ac_try\"") >&5
13045 (eval $ac_try) 2>&5
13047 echo "$as_me:13047: \$? = $ac_status" >&5
13048 (exit "$ac_status"); }; }; then
13049 cf_cv_posix_c_source=no
13051 echo "$as_me: failed program was:" >&5
13052 cat "conftest.$ac_ext" >&5
13053 cf_want_posix_source=no
13054 case .$cf_POSIX_C_SOURCE in
13056 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13059 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13060 cf_want_posix_source=yes
13063 cf_want_posix_source=yes
13066 if test "$cf_want_posix_source" = yes ; then
13067 cat >"conftest.$ac_ext" <<_ACEOF
13068 #line 13068 "configure"
13069 #include "confdefs.h"
13070 #include <sys/types.h>
13075 #ifdef _POSIX_SOURCE
13082 rm -f "conftest.$ac_objext"
13083 if { (eval echo "$as_me:13083: \"$ac_compile\"") >&5
13084 (eval $ac_compile) 2>&5
13086 echo "$as_me:13086: \$? = $ac_status" >&5
13087 (exit "$ac_status"); } &&
13088 { ac_try='test -s "conftest.$ac_objext"'
13089 { (eval echo "$as_me:13089: \"$ac_try\"") >&5
13090 (eval $ac_try) 2>&5
13092 echo "$as_me:13092: \$? = $ac_status" >&5
13093 (exit "$ac_status"); }; }; then
13096 echo "$as_me: failed program was:" >&5
13097 cat "conftest.$ac_ext" >&5
13098 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13103 echo "${as_me:-configure}:13103: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13105 CFLAGS="$cf_trim_CFLAGS"
13106 CPPFLAGS="$cf_trim_CPPFLAGS"
13108 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13109 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13111 echo "${as_me:-configure}:13111: testing if the second compile does not leave our definition intact error ..." 1>&5
13113 cat >"conftest.$ac_ext" <<_ACEOF
13114 #line 13114 "configure"
13115 #include "confdefs.h"
13116 #include <sys/types.h>
13121 #ifndef _POSIX_C_SOURCE
13128 rm -f "conftest.$ac_objext"
13129 if { (eval echo "$as_me:13129: \"$ac_compile\"") >&5
13130 (eval $ac_compile) 2>&5
13132 echo "$as_me:13132: \$? = $ac_status" >&5
13133 (exit "$ac_status"); } &&
13134 { ac_try='test -s "conftest.$ac_objext"'
13135 { (eval echo "$as_me:13135: \"$ac_try\"") >&5
13136 (eval $ac_try) 2>&5
13138 echo "$as_me:13138: \$? = $ac_status" >&5
13139 (exit "$ac_status"); }; }; then
13142 echo "$as_me: failed program was:" >&5
13143 cat "conftest.$ac_ext" >&5
13144 cf_cv_posix_c_source=no
13146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13147 CFLAGS="$cf_save_CFLAGS"
13148 CPPFLAGS="$cf_save_CPPFLAGS"
13151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13154 echo "$as_me:13154: result: $cf_cv_posix_c_source" >&5
13155 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13157 if test "$cf_cv_posix_c_source" != no ; then
13158 CFLAGS="$cf_trim_CFLAGS"
13159 CPPFLAGS="$cf_trim_CPPFLAGS"
13164 cf_new_extra_cppflags=
13166 for cf_add_cflags in $cf_cv_posix_c_source
13168 case "$cf_fix_cppflags" in
13170 case "$cf_add_cflags" in
13171 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13172 case "$cf_add_cflags" in
13174 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13176 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13177 && test -z "${cf_tst_cflags}" \
13178 && cf_fix_cppflags=yes
13180 if test "$cf_fix_cppflags" = yes ; then
13182 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13183 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13186 elif test "${cf_tst_cflags}" = "\"'" ; then
13188 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13189 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13195 case "$CPPFLAGS" in
13199 case "$cf_add_cflags" in
13201 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13203 CPPFLAGS=`echo "$CPPFLAGS" | \
13204 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13205 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13210 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13211 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13218 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13219 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13226 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13227 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13229 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13231 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13232 && test -z "${cf_tst_cflags}" \
13233 && cf_fix_cppflags=no
13238 if test -n "$cf_new_cflags" ; then
13240 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13241 CFLAGS="${CFLAGS}$cf_new_cflags"
13245 if test -n "$cf_new_cppflags" ; then
13247 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13248 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13252 if test -n "$cf_new_extra_cppflags" ; then
13254 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13255 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13261 fi # cf_cv_posix_visible
13265 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13268 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13269 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13270 # Abusing the conformance level is a workaround.
13271 { echo "$as_me:13271: WARNING: this system does not provide usable locale support" >&5
13272 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13273 cf_xopen_source="-D_BSD_SOURCE"
13274 cf_XOPEN_SOURCE=700
13277 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13278 cf_xopen_source="-D_BSD_SOURCE"
13279 cf_XOPEN_SOURCE=600
13282 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13285 cf_xopen_source="-D_OSF_SOURCE"
13288 cf_xopen_source="-D_QNX_SOURCE"
13291 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13294 cf_xopen_source="-D__EXTENSIONS__"
13295 cf_cv_xopen_source=broken
13297 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13303 echo "$as_me:13303: checking if we should define _XOPEN_SOURCE" >&5
13304 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13305 if test "${cf_cv_xopen_source+set}" = set; then
13306 echo $ECHO_N "(cached) $ECHO_C" >&6
13309 cat >"conftest.$ac_ext" <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13313 #include <stdlib.h>
13314 #include <string.h>
13315 #include <sys/types.h>
13321 #ifndef _XOPEN_SOURCE
13329 rm -f "conftest.$ac_objext"
13330 if { (eval echo "$as_me:13330: \"$ac_compile\"") >&5
13331 (eval $ac_compile) 2>&5
13333 echo "$as_me:13333: \$? = $ac_status" >&5
13334 (exit "$ac_status"); } &&
13335 { ac_try='test -s "conftest.$ac_objext"'
13336 { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337 (eval $ac_try) 2>&5
13339 echo "$as_me:13339: \$? = $ac_status" >&5
13340 (exit "$ac_status"); }; }; then
13341 cf_cv_xopen_source=no
13343 echo "$as_me: failed program was:" >&5
13344 cat "conftest.$ac_ext" >&5
13345 cf_save="$CPPFLAGS"
13347 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13348 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13350 cat >"conftest.$ac_ext" <<_ACEOF
13351 #line 13351 "configure"
13352 #include "confdefs.h"
13354 #include <stdlib.h>
13355 #include <string.h>
13356 #include <sys/types.h>
13362 #ifndef _XOPEN_SOURCE
13370 rm -f "conftest.$ac_objext"
13371 if { (eval echo "$as_me:13371: \"$ac_compile\"") >&5
13372 (eval $ac_compile) 2>&5
13374 echo "$as_me:13374: \$? = $ac_status" >&5
13375 (exit "$ac_status"); } &&
13376 { ac_try='test -s "conftest.$ac_objext"'
13377 { (eval echo "$as_me:13377: \"$ac_try\"") >&5
13378 (eval $ac_try) 2>&5
13380 echo "$as_me:13380: \$? = $ac_status" >&5
13381 (exit "$ac_status"); }; }; then
13382 cf_cv_xopen_source=no
13384 echo "$as_me: failed program was:" >&5
13385 cat "conftest.$ac_ext" >&5
13386 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13389 CPPFLAGS="$cf_save"
13392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13395 echo "$as_me:13395: result: $cf_cv_xopen_source" >&5
13396 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13398 if test "$cf_cv_xopen_source" != no ; then
13400 CFLAGS=`echo "$CFLAGS" | \
13401 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13402 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13404 CPPFLAGS=`echo "$CPPFLAGS" | \
13405 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13406 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13408 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13410 for cf_add_cflags in $cf_temp_xopen_source
13412 case "x$cf_add_cflags" in
13415 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13418 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'`
13419 test "$CFLAGS" != "$cf_old_cflag" || break
13421 CFLAGS="$cf_old_cflag"
13424 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13427 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'`
13428 test "$CPPFLAGS" != "$cf_old_cflag" || break
13430 CPPFLAGS="$cf_old_cflag"
13439 cf_new_extra_cppflags=
13441 for cf_add_cflags in $cf_add_cflags
13443 case "$cf_fix_cppflags" in
13445 case "$cf_add_cflags" in
13446 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13447 case "$cf_add_cflags" in
13449 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13451 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13452 && test -z "${cf_tst_cflags}" \
13453 && cf_fix_cppflags=yes
13455 if test "$cf_fix_cppflags" = yes ; then
13457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13461 elif test "${cf_tst_cflags}" = "\"'" ; then
13463 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13464 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13470 case "$CPPFLAGS" in
13474 case "$cf_add_cflags" in
13476 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13478 CPPFLAGS=`echo "$CPPFLAGS" | \
13479 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13480 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13485 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13486 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13493 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13494 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13501 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13502 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13504 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13506 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13507 && test -z "${cf_tst_cflags}" \
13508 && cf_fix_cppflags=no
13513 if test -n "$cf_new_cflags" ; then
13515 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13516 CFLAGS="${CFLAGS}$cf_new_cflags"
13520 if test -n "$cf_new_cppflags" ; then
13522 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13523 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13527 if test -n "$cf_new_extra_cppflags" ; then
13529 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13530 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13538 cf_save_xopen_cppflags="$CPPFLAGS"
13540 if test "$cf_cv_posix_visible" = no; then
13542 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13544 cf_save_CFLAGS="$CFLAGS"
13545 cf_save_CPPFLAGS="$CPPFLAGS"
13547 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13548 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13549 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13551 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13552 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13553 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13555 echo "$as_me:13555: checking if we should define _POSIX_C_SOURCE" >&5
13556 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13557 if test "${cf_cv_posix_c_source+set}" = set; then
13558 echo $ECHO_N "(cached) $ECHO_C" >&6
13561 echo "${as_me:-configure}:13561: testing if the symbol is already defined go no further ..." 1>&5
13563 cat >"conftest.$ac_ext" <<_ACEOF
13564 #line 13564 "configure"
13565 #include "confdefs.h"
13566 #include <sys/types.h>
13571 #ifndef _POSIX_C_SOURCE
13578 rm -f "conftest.$ac_objext"
13579 if { (eval echo "$as_me:13579: \"$ac_compile\"") >&5
13580 (eval $ac_compile) 2>&5
13582 echo "$as_me:13582: \$? = $ac_status" >&5
13583 (exit "$ac_status"); } &&
13584 { ac_try='test -s "conftest.$ac_objext"'
13585 { (eval echo "$as_me:13585: \"$ac_try\"") >&5
13586 (eval $ac_try) 2>&5
13588 echo "$as_me:13588: \$? = $ac_status" >&5
13589 (exit "$ac_status"); }; }; then
13590 cf_cv_posix_c_source=no
13592 echo "$as_me: failed program was:" >&5
13593 cat "conftest.$ac_ext" >&5
13594 cf_want_posix_source=no
13595 case .$cf_POSIX_C_SOURCE in
13597 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13600 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13601 cf_want_posix_source=yes
13604 cf_want_posix_source=yes
13607 if test "$cf_want_posix_source" = yes ; then
13608 cat >"conftest.$ac_ext" <<_ACEOF
13609 #line 13609 "configure"
13610 #include "confdefs.h"
13611 #include <sys/types.h>
13616 #ifdef _POSIX_SOURCE
13623 rm -f "conftest.$ac_objext"
13624 if { (eval echo "$as_me:13624: \"$ac_compile\"") >&5
13625 (eval $ac_compile) 2>&5
13627 echo "$as_me:13627: \$? = $ac_status" >&5
13628 (exit "$ac_status"); } &&
13629 { ac_try='test -s "conftest.$ac_objext"'
13630 { (eval echo "$as_me:13630: \"$ac_try\"") >&5
13631 (eval $ac_try) 2>&5
13633 echo "$as_me:13633: \$? = $ac_status" >&5
13634 (exit "$ac_status"); }; }; then
13637 echo "$as_me: failed program was:" >&5
13638 cat "conftest.$ac_ext" >&5
13639 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13641 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13644 echo "${as_me:-configure}:13644: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13646 CFLAGS="$cf_trim_CFLAGS"
13647 CPPFLAGS="$cf_trim_CPPFLAGS"
13649 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13650 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13652 echo "${as_me:-configure}:13652: testing if the second compile does not leave our definition intact error ..." 1>&5
13654 cat >"conftest.$ac_ext" <<_ACEOF
13655 #line 13655 "configure"
13656 #include "confdefs.h"
13657 #include <sys/types.h>
13662 #ifndef _POSIX_C_SOURCE
13669 rm -f "conftest.$ac_objext"
13670 if { (eval echo "$as_me:13670: \"$ac_compile\"") >&5
13671 (eval $ac_compile) 2>&5
13673 echo "$as_me:13673: \$? = $ac_status" >&5
13674 (exit "$ac_status"); } &&
13675 { ac_try='test -s "conftest.$ac_objext"'
13676 { (eval echo "$as_me:13676: \"$ac_try\"") >&5
13677 (eval $ac_try) 2>&5
13679 echo "$as_me:13679: \$? = $ac_status" >&5
13680 (exit "$ac_status"); }; }; then
13683 echo "$as_me: failed program was:" >&5
13684 cat "conftest.$ac_ext" >&5
13685 cf_cv_posix_c_source=no
13687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13688 CFLAGS="$cf_save_CFLAGS"
13689 CPPFLAGS="$cf_save_CPPFLAGS"
13692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13695 echo "$as_me:13695: result: $cf_cv_posix_c_source" >&5
13696 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13698 if test "$cf_cv_posix_c_source" != no ; then
13699 CFLAGS="$cf_trim_CFLAGS"
13700 CPPFLAGS="$cf_trim_CPPFLAGS"
13705 cf_new_extra_cppflags=
13707 for cf_add_cflags in $cf_cv_posix_c_source
13709 case "$cf_fix_cppflags" in
13711 case "$cf_add_cflags" in
13712 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13713 case "$cf_add_cflags" in
13715 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13717 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13718 && test -z "${cf_tst_cflags}" \
13719 && cf_fix_cppflags=yes
13721 if test "$cf_fix_cppflags" = yes ; then
13723 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13724 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13727 elif test "${cf_tst_cflags}" = "\"'" ; then
13729 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13730 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13736 case "$CPPFLAGS" in
13740 case "$cf_add_cflags" in
13742 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13744 CPPFLAGS=`echo "$CPPFLAGS" | \
13745 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13746 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13751 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13752 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13759 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13760 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13767 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13768 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13770 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13772 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13773 && test -z "${cf_tst_cflags}" \
13774 && cf_fix_cppflags=no
13779 if test -n "$cf_new_cflags" ; then
13781 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13782 CFLAGS="${CFLAGS}$cf_new_cflags"
13786 if test -n "$cf_new_cppflags" ; then
13788 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13789 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13793 if test -n "$cf_new_extra_cppflags" ; then
13795 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13796 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13802 fi # cf_cv_posix_visible
13804 # Some of these niche implementations use copy/paste, double-check...
13805 if test "$cf_cv_xopen_source" != no ; then
13806 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE inteferes" 1>&6
13808 echo "${as_me:-configure}:13808: testing checking if _POSIX_C_SOURCE inteferes ..." 1>&5
13810 cat >"conftest.$ac_ext" <<_ACEOF
13811 #line 13811 "configure"
13812 #include "confdefs.h"
13814 #include <stdlib.h>
13815 #include <string.h>
13816 #include <sys/types.h>
13822 #ifndef _XOPEN_SOURCE
13830 rm -f "conftest.$ac_objext"
13831 if { (eval echo "$as_me:13831: \"$ac_compile\"") >&5
13832 (eval $ac_compile) 2>&5
13834 echo "$as_me:13834: \$? = $ac_status" >&5
13835 (exit "$ac_status"); } &&
13836 { ac_try='test -s "conftest.$ac_objext"'
13837 { (eval echo "$as_me:13837: \"$ac_try\"") >&5
13838 (eval $ac_try) 2>&5
13840 echo "$as_me:13840: \$? = $ac_status" >&5
13841 (exit "$ac_status"); }; }; then
13844 echo "$as_me: failed program was:" >&5
13845 cat "conftest.$ac_ext" >&5
13847 { echo "$as_me:13847: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13848 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13849 CPPFLAGS="$cf_save_xopen_cppflags"
13851 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13856 if test -n "$cf_xopen_source" ; then
13858 for cf_add_cflags in $cf_xopen_source
13860 case "x$cf_add_cflags" in
13863 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13866 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'`
13867 test "$CFLAGS" != "$cf_old_cflag" || break
13868 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13870 echo "${as_me:-configure}:13870: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13872 CFLAGS="$cf_old_cflag"
13875 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13878 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'`
13879 test "$CPPFLAGS" != "$cf_old_cflag" || break
13880 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13882 echo "${as_me:-configure}:13882: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13884 CPPFLAGS="$cf_old_cflag"
13893 cf_new_extra_cppflags=
13895 for cf_add_cflags in $cf_add_cflags
13897 case "$cf_fix_cppflags" in
13899 case "$cf_add_cflags" in
13900 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13901 case "$cf_add_cflags" in
13903 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13905 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13906 && test -z "${cf_tst_cflags}" \
13907 && cf_fix_cppflags=yes
13909 if test "$cf_fix_cppflags" = yes ; then
13911 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13912 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13915 elif test "${cf_tst_cflags}" = "\"'" ; then
13917 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13918 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13924 case "$CPPFLAGS" in
13928 case "$cf_add_cflags" in
13930 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13932 CPPFLAGS=`echo "$CPPFLAGS" | \
13933 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13934 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13939 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13940 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13947 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13948 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13955 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13956 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13958 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13960 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13961 && test -z "${cf_tst_cflags}" \
13962 && cf_fix_cppflags=no
13967 if test -n "$cf_new_cflags" ; then
13968 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13970 echo "${as_me:-configure}:13970: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13972 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13973 CFLAGS="${CFLAGS}$cf_new_cflags"
13977 if test -n "$cf_new_cppflags" ; then
13978 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13980 echo "${as_me:-configure}:13980: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13982 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13983 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13987 if test -n "$cf_new_extra_cppflags" ; then
13988 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13990 echo "${as_me:-configure}:13990: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13992 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13993 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14001 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
14002 echo "$as_me:14002: checking if _XOPEN_SOURCE really is set" >&5
14003 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
14004 cat >"conftest.$ac_ext" <<_ACEOF
14005 #line 14005 "configure"
14006 #include "confdefs.h"
14007 #include <stdlib.h>
14012 #ifndef _XOPEN_SOURCE
14019 rm -f "conftest.$ac_objext"
14020 if { (eval echo "$as_me:14020: \"$ac_compile\"") >&5
14021 (eval $ac_compile) 2>&5
14023 echo "$as_me:14023: \$? = $ac_status" >&5
14024 (exit "$ac_status"); } &&
14025 { ac_try='test -s "conftest.$ac_objext"'
14026 { (eval echo "$as_me:14026: \"$ac_try\"") >&5
14027 (eval $ac_try) 2>&5
14029 echo "$as_me:14029: \$? = $ac_status" >&5
14030 (exit "$ac_status"); }; }; then
14031 cf_XOPEN_SOURCE_set=yes
14033 echo "$as_me: failed program was:" >&5
14034 cat "conftest.$ac_ext" >&5
14035 cf_XOPEN_SOURCE_set=no
14037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14038 echo "$as_me:14038: result: $cf_XOPEN_SOURCE_set" >&5
14039 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14040 if test "$cf_XOPEN_SOURCE_set" = yes
14042 cat >"conftest.$ac_ext" <<_ACEOF
14043 #line 14043 "configure"
14044 #include "confdefs.h"
14045 #include <stdlib.h>
14050 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14057 rm -f "conftest.$ac_objext"
14058 if { (eval echo "$as_me:14058: \"$ac_compile\"") >&5
14059 (eval $ac_compile) 2>&5
14061 echo "$as_me:14061: \$? = $ac_status" >&5
14062 (exit "$ac_status"); } &&
14063 { ac_try='test -s "conftest.$ac_objext"'
14064 { (eval echo "$as_me:14064: \"$ac_try\"") >&5
14065 (eval $ac_try) 2>&5
14067 echo "$as_me:14067: \$? = $ac_status" >&5
14068 (exit "$ac_status"); }; }; then
14069 cf_XOPEN_SOURCE_set_ok=yes
14071 echo "$as_me: failed program was:" >&5
14072 cat "conftest.$ac_ext" >&5
14073 cf_XOPEN_SOURCE_set_ok=no
14075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14076 if test "$cf_XOPEN_SOURCE_set_ok" = no
14078 { echo "$as_me:14078: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14079 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14083 echo "$as_me:14083: checking if we should define _XOPEN_SOURCE" >&5
14084 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14085 if test "${cf_cv_xopen_source+set}" = set; then
14086 echo $ECHO_N "(cached) $ECHO_C" >&6
14089 cat >"conftest.$ac_ext" <<_ACEOF
14090 #line 14090 "configure"
14091 #include "confdefs.h"
14093 #include <stdlib.h>
14094 #include <string.h>
14095 #include <sys/types.h>
14101 #ifndef _XOPEN_SOURCE
14109 rm -f "conftest.$ac_objext"
14110 if { (eval echo "$as_me:14110: \"$ac_compile\"") >&5
14111 (eval $ac_compile) 2>&5
14113 echo "$as_me:14113: \$? = $ac_status" >&5
14114 (exit "$ac_status"); } &&
14115 { ac_try='test -s "conftest.$ac_objext"'
14116 { (eval echo "$as_me:14116: \"$ac_try\"") >&5
14117 (eval $ac_try) 2>&5
14119 echo "$as_me:14119: \$? = $ac_status" >&5
14120 (exit "$ac_status"); }; }; then
14121 cf_cv_xopen_source=no
14123 echo "$as_me: failed program was:" >&5
14124 cat "conftest.$ac_ext" >&5
14125 cf_save="$CPPFLAGS"
14127 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14128 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14130 cat >"conftest.$ac_ext" <<_ACEOF
14131 #line 14131 "configure"
14132 #include "confdefs.h"
14134 #include <stdlib.h>
14135 #include <string.h>
14136 #include <sys/types.h>
14142 #ifndef _XOPEN_SOURCE
14150 rm -f "conftest.$ac_objext"
14151 if { (eval echo "$as_me:14151: \"$ac_compile\"") >&5
14152 (eval $ac_compile) 2>&5
14154 echo "$as_me:14154: \$? = $ac_status" >&5
14155 (exit "$ac_status"); } &&
14156 { ac_try='test -s "conftest.$ac_objext"'
14157 { (eval echo "$as_me:14157: \"$ac_try\"") >&5
14158 (eval $ac_try) 2>&5
14160 echo "$as_me:14160: \$? = $ac_status" >&5
14161 (exit "$ac_status"); }; }; then
14162 cf_cv_xopen_source=no
14164 echo "$as_me: failed program was:" >&5
14165 cat "conftest.$ac_ext" >&5
14166 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14169 CPPFLAGS="$cf_save"
14172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14175 echo "$as_me:14175: result: $cf_cv_xopen_source" >&5
14176 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14178 if test "$cf_cv_xopen_source" != no ; then
14180 CFLAGS=`echo "$CFLAGS" | \
14181 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14182 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14184 CPPFLAGS=`echo "$CPPFLAGS" | \
14185 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14186 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14188 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14190 for cf_add_cflags in $cf_temp_xopen_source
14192 case "x$cf_add_cflags" in
14195 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14198 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'`
14199 test "$CFLAGS" != "$cf_old_cflag" || break
14201 CFLAGS="$cf_old_cflag"
14204 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14207 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'`
14208 test "$CPPFLAGS" != "$cf_old_cflag" || break
14210 CPPFLAGS="$cf_old_cflag"
14219 cf_new_extra_cppflags=
14221 for cf_add_cflags in $cf_add_cflags
14223 case "$cf_fix_cppflags" in
14225 case "$cf_add_cflags" in
14226 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14227 case "$cf_add_cflags" in
14229 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14231 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14232 && test -z "${cf_tst_cflags}" \
14233 && cf_fix_cppflags=yes
14235 if test "$cf_fix_cppflags" = yes ; then
14237 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14238 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14241 elif test "${cf_tst_cflags}" = "\"'" ; then
14243 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14244 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14250 case "$CPPFLAGS" in
14254 case "$cf_add_cflags" in
14256 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14258 CPPFLAGS=`echo "$CPPFLAGS" | \
14259 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14260 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14265 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14266 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14273 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14274 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14281 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14282 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14284 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14286 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14287 && test -z "${cf_tst_cflags}" \
14288 && cf_fix_cppflags=no
14293 if test -n "$cf_new_cflags" ; then
14295 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14296 CFLAGS="${CFLAGS}$cf_new_cflags"
14300 if test -n "$cf_new_cppflags" ; then
14302 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14303 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14307 if test -n "$cf_new_extra_cppflags" ; then
14309 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14310 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14320 fi # cf_cv_posix_visible
14322 # Check whether --enable-largefile or --disable-largefile was given.
14323 if test "${enable_largefile+set}" = set; then
14324 enableval="$enable_largefile"
14327 if test "$enable_largefile" != no; then
14329 echo "$as_me:14329: checking for special C compiler options needed for large files" >&5
14330 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14331 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14332 echo $ECHO_N "(cached) $ECHO_C" >&6
14334 ac_cv_sys_largefile_CC=no
14335 if test "$GCC" != yes; then
14338 # IRIX 6.2 and later do not support large files by default,
14339 # so use the C compiler's -n32 option if that helps.
14340 cat >"conftest.$ac_ext" <<_ACEOF
14341 #line 14341 "configure"
14342 #include "confdefs.h"
14343 #include <sys/types.h>
14344 /* Check that off_t can represent 2**63 - 1 correctly.
14345 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14346 since some C++ compilers masquerading as C compilers
14347 incorrectly reject 9223372036854775807. */
14348 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14349 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14350 && LARGE_OFF_T % 2147483647 == 1)
14360 rm -f "conftest.$ac_objext"
14361 if { (eval echo "$as_me:14361: \"$ac_compile\"") >&5
14362 (eval $ac_compile) 2>&5
14364 echo "$as_me:14364: \$? = $ac_status" >&5
14365 (exit "$ac_status"); } &&
14366 { ac_try='test -s "conftest.$ac_objext"'
14367 { (eval echo "$as_me:14367: \"$ac_try\"") >&5
14368 (eval $ac_try) 2>&5
14370 echo "$as_me:14370: \$? = $ac_status" >&5
14371 (exit "$ac_status"); }; }; then
14374 echo "$as_me: failed program was:" >&5
14375 cat "conftest.$ac_ext" >&5
14377 rm -f "conftest.$ac_objext"
14379 rm -f "conftest.$ac_objext"
14380 if { (eval echo "$as_me:14380: \"$ac_compile\"") >&5
14381 (eval $ac_compile) 2>&5
14383 echo "$as_me:14383: \$? = $ac_status" >&5
14384 (exit "$ac_status"); } &&
14385 { ac_try='test -s "conftest.$ac_objext"'
14386 { (eval echo "$as_me:14386: \"$ac_try\"") >&5
14387 (eval $ac_try) 2>&5
14389 echo "$as_me:14389: \$? = $ac_status" >&5
14390 (exit "$ac_status"); }; }; then
14391 ac_cv_sys_largefile_CC=' -n32'; break
14393 echo "$as_me: failed program was:" >&5
14394 cat "conftest.$ac_ext" >&5
14396 rm -f "conftest.$ac_objext"
14400 rm -f "conftest.$ac_ext"
14403 echo "$as_me:14403: result: $ac_cv_sys_largefile_CC" >&5
14404 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14405 if test "$ac_cv_sys_largefile_CC" != no; then
14406 CC=$CC$ac_cv_sys_largefile_CC
14409 echo "$as_me:14409: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14410 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14411 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14412 echo $ECHO_N "(cached) $ECHO_C" >&6
14415 ac_cv_sys_file_offset_bits=no
14416 cat >"conftest.$ac_ext" <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419 #include <sys/types.h>
14420 /* Check that off_t can represent 2**63 - 1 correctly.
14421 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14422 since some C++ compilers masquerading as C compilers
14423 incorrectly reject 9223372036854775807. */
14424 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14425 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14426 && LARGE_OFF_T % 2147483647 == 1)
14436 rm -f "conftest.$ac_objext"
14437 if { (eval echo "$as_me:14437: \"$ac_compile\"") >&5
14438 (eval $ac_compile) 2>&5
14440 echo "$as_me:14440: \$? = $ac_status" >&5
14441 (exit "$ac_status"); } &&
14442 { ac_try='test -s "conftest.$ac_objext"'
14443 { (eval echo "$as_me:14443: \"$ac_try\"") >&5
14444 (eval $ac_try) 2>&5
14446 echo "$as_me:14446: \$? = $ac_status" >&5
14447 (exit "$ac_status"); }; }; then
14450 echo "$as_me: failed program was:" >&5
14451 cat "conftest.$ac_ext" >&5
14453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14454 cat >"conftest.$ac_ext" <<_ACEOF
14455 #line 14455 "configure"
14456 #include "confdefs.h"
14457 #define _FILE_OFFSET_BITS 64
14458 #include <sys/types.h>
14459 /* Check that off_t can represent 2**63 - 1 correctly.
14460 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14461 since some C++ compilers masquerading as C compilers
14462 incorrectly reject 9223372036854775807. */
14463 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14464 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14465 && LARGE_OFF_T % 2147483647 == 1)
14475 rm -f "conftest.$ac_objext"
14476 if { (eval echo "$as_me:14476: \"$ac_compile\"") >&5
14477 (eval $ac_compile) 2>&5
14479 echo "$as_me:14479: \$? = $ac_status" >&5
14480 (exit "$ac_status"); } &&
14481 { ac_try='test -s "conftest.$ac_objext"'
14482 { (eval echo "$as_me:14482: \"$ac_try\"") >&5
14483 (eval $ac_try) 2>&5
14485 echo "$as_me:14485: \$? = $ac_status" >&5
14486 (exit "$ac_status"); }; }; then
14487 ac_cv_sys_file_offset_bits=64; break
14489 echo "$as_me: failed program was:" >&5
14490 cat "conftest.$ac_ext" >&5
14492 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14496 echo "$as_me:14496: result: $ac_cv_sys_file_offset_bits" >&5
14497 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14498 if test "$ac_cv_sys_file_offset_bits" != no; then
14500 cat >>confdefs.h <<EOF
14501 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14506 echo "$as_me:14506: checking for _LARGE_FILES value needed for large files" >&5
14507 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14508 if test "${ac_cv_sys_large_files+set}" = set; then
14509 echo $ECHO_N "(cached) $ECHO_C" >&6
14512 ac_cv_sys_large_files=no
14513 cat >"conftest.$ac_ext" <<_ACEOF
14514 #line 14514 "configure"
14515 #include "confdefs.h"
14516 #include <sys/types.h>
14517 /* Check that off_t can represent 2**63 - 1 correctly.
14518 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14519 since some C++ compilers masquerading as C compilers
14520 incorrectly reject 9223372036854775807. */
14521 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14522 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14523 && LARGE_OFF_T % 2147483647 == 1)
14533 rm -f "conftest.$ac_objext"
14534 if { (eval echo "$as_me:14534: \"$ac_compile\"") >&5
14535 (eval $ac_compile) 2>&5
14537 echo "$as_me:14537: \$? = $ac_status" >&5
14538 (exit "$ac_status"); } &&
14539 { ac_try='test -s "conftest.$ac_objext"'
14540 { (eval echo "$as_me:14540: \"$ac_try\"") >&5
14541 (eval $ac_try) 2>&5
14543 echo "$as_me:14543: \$? = $ac_status" >&5
14544 (exit "$ac_status"); }; }; then
14547 echo "$as_me: failed program was:" >&5
14548 cat "conftest.$ac_ext" >&5
14550 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14551 cat >"conftest.$ac_ext" <<_ACEOF
14552 #line 14552 "configure"
14553 #include "confdefs.h"
14554 #define _LARGE_FILES 1
14555 #include <sys/types.h>
14556 /* Check that off_t can represent 2**63 - 1 correctly.
14557 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14558 since some C++ compilers masquerading as C compilers
14559 incorrectly reject 9223372036854775807. */
14560 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14561 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14562 && LARGE_OFF_T % 2147483647 == 1)
14572 rm -f "conftest.$ac_objext"
14573 if { (eval echo "$as_me:14573: \"$ac_compile\"") >&5
14574 (eval $ac_compile) 2>&5
14576 echo "$as_me:14576: \$? = $ac_status" >&5
14577 (exit "$ac_status"); } &&
14578 { ac_try='test -s "conftest.$ac_objext"'
14579 { (eval echo "$as_me:14579: \"$ac_try\"") >&5
14580 (eval $ac_try) 2>&5
14582 echo "$as_me:14582: \$? = $ac_status" >&5
14583 (exit "$ac_status"); }; }; then
14584 ac_cv_sys_large_files=1; break
14586 echo "$as_me: failed program was:" >&5
14587 cat "conftest.$ac_ext" >&5
14589 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14593 echo "$as_me:14593: result: $ac_cv_sys_large_files" >&5
14594 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14595 if test "$ac_cv_sys_large_files" != no; then
14597 cat >>confdefs.h <<EOF
14598 #define _LARGE_FILES $ac_cv_sys_large_files
14605 if test "$enable_largefile" != no ; then
14606 echo "$as_me:14606: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14607 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14608 if test "${ac_cv_sys_largefile_source+set}" = set; then
14609 echo $ECHO_N "(cached) $ECHO_C" >&6
14612 ac_cv_sys_largefile_source=no
14613 cat >"conftest.$ac_ext" <<_ACEOF
14614 #line 14614 "configure"
14615 #include "confdefs.h"
14625 rm -f "conftest.$ac_objext"
14626 if { (eval echo "$as_me:14626: \"$ac_compile\"") >&5
14627 (eval $ac_compile) 2>&5
14629 echo "$as_me:14629: \$? = $ac_status" >&5
14630 (exit "$ac_status"); } &&
14631 { ac_try='test -s "conftest.$ac_objext"'
14632 { (eval echo "$as_me:14632: \"$ac_try\"") >&5
14633 (eval $ac_try) 2>&5
14635 echo "$as_me:14635: \$? = $ac_status" >&5
14636 (exit "$ac_status"); }; }; then
14639 echo "$as_me: failed program was:" >&5
14640 cat "conftest.$ac_ext" >&5
14642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14643 cat >"conftest.$ac_ext" <<_ACEOF
14644 #line 14644 "configure"
14645 #include "confdefs.h"
14646 #define _LARGEFILE_SOURCE 1
14656 rm -f "conftest.$ac_objext"
14657 if { (eval echo "$as_me:14657: \"$ac_compile\"") >&5
14658 (eval $ac_compile) 2>&5
14660 echo "$as_me:14660: \$? = $ac_status" >&5
14661 (exit "$ac_status"); } &&
14662 { ac_try='test -s "conftest.$ac_objext"'
14663 { (eval echo "$as_me:14663: \"$ac_try\"") >&5
14664 (eval $ac_try) 2>&5
14666 echo "$as_me:14666: \$? = $ac_status" >&5
14667 (exit "$ac_status"); }; }; then
14668 ac_cv_sys_largefile_source=1; break
14670 echo "$as_me: failed program was:" >&5
14671 cat "conftest.$ac_ext" >&5
14673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14677 echo "$as_me:14677: result: $ac_cv_sys_largefile_source" >&5
14678 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14679 if test "$ac_cv_sys_largefile_source" != no; then
14681 cat >>confdefs.h <<EOF
14682 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14688 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14689 # in glibc 2.1.3, but that breaks too many other things.
14690 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14691 echo "$as_me:14691: checking for fseeko" >&5
14692 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14693 if test "${ac_cv_func_fseeko+set}" = set; then
14694 echo $ECHO_N "(cached) $ECHO_C" >&6
14696 cat >"conftest.$ac_ext" <<_ACEOF
14697 #line 14697 "configure"
14698 #include "confdefs.h"
14703 return fseeko && fseeko (stdin, 0, 0);
14708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14709 if { (eval echo "$as_me:14709: \"$ac_link\"") >&5
14710 (eval $ac_link) 2>&5
14712 echo "$as_me:14712: \$? = $ac_status" >&5
14713 (exit "$ac_status"); } &&
14714 { ac_try='test -s "conftest$ac_exeext"'
14715 { (eval echo "$as_me:14715: \"$ac_try\"") >&5
14716 (eval $ac_try) 2>&5
14718 echo "$as_me:14718: \$? = $ac_status" >&5
14719 (exit "$ac_status"); }; }; then
14720 ac_cv_func_fseeko=yes
14722 echo "$as_me: failed program was:" >&5
14723 cat "conftest.$ac_ext" >&5
14724 ac_cv_func_fseeko=no
14726 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14728 echo "$as_me:14728: result: $ac_cv_func_fseeko" >&5
14729 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14730 if test $ac_cv_func_fseeko = yes; then
14732 cat >>confdefs.h <<\EOF
14733 #define HAVE_FSEEKO 1
14738 # Normally we would collect these definitions in the config.h,
14739 # but (like _XOPEN_SOURCE), some environments rely on having these
14740 # defined before any of the system headers are included. Another
14741 # case comes up with C++, e.g., on AIX the compiler compiles the
14742 # header files by themselves before looking at the body files it is
14743 # told to compile. For ncurses, those header files do not include
14745 if test "$ac_cv_sys_large_files" != no
14748 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14749 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14752 if test "$ac_cv_sys_largefile_source" != no
14755 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14756 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14759 if test "$ac_cv_sys_file_offset_bits" != no
14762 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14763 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14767 echo "$as_me:14767: checking whether to use struct dirent64" >&5
14768 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14769 if test "${cf_cv_struct_dirent64+set}" = set; then
14770 echo $ECHO_N "(cached) $ECHO_C" >&6
14773 cat >"conftest.$ac_ext" <<_ACEOF
14774 #line 14774 "configure"
14775 #include "confdefs.h"
14777 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14778 #include <sys/types.h>
14779 #include <dirent.h>
14785 /* if transitional largefile support is setup, this is true */
14786 extern struct dirent64 * readdir(DIR *);
14787 struct dirent64 *x = readdir((DIR *)0);
14788 struct dirent *y = readdir((DIR *)0);
14796 rm -f "conftest.$ac_objext"
14797 if { (eval echo "$as_me:14797: \"$ac_compile\"") >&5
14798 (eval $ac_compile) 2>&5
14800 echo "$as_me:14800: \$? = $ac_status" >&5
14801 (exit "$ac_status"); } &&
14802 { ac_try='test -s "conftest.$ac_objext"'
14803 { (eval echo "$as_me:14803: \"$ac_try\"") >&5
14804 (eval $ac_try) 2>&5
14806 echo "$as_me:14806: \$? = $ac_status" >&5
14807 (exit "$ac_status"); }; }; then
14808 cf_cv_struct_dirent64=yes
14810 echo "$as_me: failed program was:" >&5
14811 cat "conftest.$ac_ext" >&5
14812 cf_cv_struct_dirent64=no
14814 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14817 echo "$as_me:14817: result: $cf_cv_struct_dirent64" >&5
14818 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14819 test "$cf_cv_struct_dirent64" = yes &&
14820 cat >>confdefs.h <<\EOF
14821 #define HAVE_STRUCT_DIRENT64 1
14826 ### Enable compiling-in rcs id's
14827 echo "$as_me:14827: checking if RCS identifiers should be compiled-in" >&5
14828 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14830 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14831 if test "${with_rcs_ids+set}" = set; then
14832 withval="$with_rcs_ids"
14833 with_rcs_ids=$withval
14837 echo "$as_me:14837: result: $with_rcs_ids" >&5
14838 echo "${ECHO_T}$with_rcs_ids" >&6
14839 test "$with_rcs_ids" = yes &&
14840 cat >>confdefs.h <<\EOF
14841 #define USE_RCS_IDS 1
14844 ###############################################################################
14846 ### Note that some functions (such as const) are normally disabled anyway.
14847 echo "$as_me:14847: checking if you want to build with function extensions" >&5
14848 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14850 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14851 if test "${enable_ext_funcs+set}" = set; then
14852 enableval="$enable_ext_funcs"
14853 with_ext_funcs=$enableval
14857 echo "$as_me:14857: result: $with_ext_funcs" >&5
14858 echo "${ECHO_T}$with_ext_funcs" >&6
14859 if test "$with_ext_funcs" = yes ; then
14860 NCURSES_EXT_FUNCS=1
14862 cat >>confdefs.h <<\EOF
14863 #define HAVE_USE_DEFAULT_COLORS 1
14866 cat >>confdefs.h <<\EOF
14867 #define NCURSES_EXT_FUNCS 1
14871 NCURSES_EXT_FUNCS=0
14874 ### use option --enable-const to turn on use of const beyond that in XSI.
14875 echo "$as_me:14875: checking for extended use of const keyword" >&5
14876 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14878 # Check whether --enable-const or --disable-const was given.
14879 if test "${enable_const+set}" = set; then
14880 enableval="$enable_const"
14881 with_ext_const=$enableval
14885 echo "$as_me:14885: result: $with_ext_const" >&5
14886 echo "${ECHO_T}$with_ext_const" >&6
14887 NCURSES_CONST='/*nothing*/'
14888 if test "$with_ext_const" = yes ; then
14889 NCURSES_CONST=const
14892 ###############################################################################
14893 # These options are relatively safe to experiment with.
14895 echo "$as_me:14895: checking if you want all development code" >&5
14896 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14898 # Check whether --with-develop or --without-develop was given.
14899 if test "${with_develop+set}" = set; then
14900 withval="$with_develop"
14901 with_develop=$withval
14905 echo "$as_me:14905: result: $with_develop" >&5
14906 echo "${ECHO_T}$with_develop" >&6
14908 ###############################################################################
14909 # These are just experimental, probably should not be in a package:
14911 # This is still experimental (20080329), but should ultimately be moved to
14912 # the script-block --with-normal, etc.
14914 echo "$as_me:14914: checking if you want to link with the pthread library" >&5
14915 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14917 # Check whether --with-pthread or --without-pthread was given.
14918 if test "${with_pthread+set}" = set; then
14919 withval="$with_pthread"
14920 with_pthread=$withval
14924 echo "$as_me:14924: result: $with_pthread" >&5
14925 echo "${ECHO_T}$with_pthread" >&6
14927 if test "$with_pthread" != no ; then
14928 echo "$as_me:14928: checking for pthread.h" >&5
14929 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14930 if test "${ac_cv_header_pthread_h+set}" = set; then
14931 echo $ECHO_N "(cached) $ECHO_C" >&6
14933 cat >"conftest.$ac_ext" <<_ACEOF
14934 #line 14934 "configure"
14935 #include "confdefs.h"
14936 #include <pthread.h>
14938 if { (eval echo "$as_me:14938: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14939 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14941 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14943 cat conftest.err >&5
14944 echo "$as_me:14944: \$? = $ac_status" >&5
14945 (exit "$ac_status"); } >/dev/null; then
14946 if test -s conftest.err; then
14947 ac_cpp_err=$ac_c_preproc_warn_flag
14954 if test -z "$ac_cpp_err"; then
14955 ac_cv_header_pthread_h=yes
14957 echo "$as_me: failed program was:" >&5
14958 cat "conftest.$ac_ext" >&5
14959 ac_cv_header_pthread_h=no
14961 rm -f conftest.err "conftest.$ac_ext"
14963 echo "$as_me:14963: result: $ac_cv_header_pthread_h" >&5
14964 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14965 if test "$ac_cv_header_pthread_h" = yes; then
14967 cat >>confdefs.h <<\EOF
14968 #define HAVE_PTHREADS_H 1
14971 for cf_lib_pthread in pthread c_r
14973 echo "$as_me:14973: checking if we can link with the $cf_lib_pthread library" >&5
14974 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14975 cf_save_LIBS="$LIBS"
14977 cf_add_libs="$LIBS"
14980 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14981 # filter duplicates
14982 for cf_add_1lib in $cf_add_0lib; do
14983 for cf_add_2lib in $cf_add_libs; do
14984 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14989 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14991 LIBS="$cf_add_libs"
14993 cat >"conftest.$ac_ext" <<_ACEOF
14994 #line 14994 "configure"
14995 #include "confdefs.h"
14997 #include <pthread.h>
15003 int rc = pthread_create(0,0,0,0);
15004 int r2 = pthread_mutexattr_settype(0, 0);
15010 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15011 if { (eval echo "$as_me:15011: \"$ac_link\"") >&5
15012 (eval $ac_link) 2>&5
15014 echo "$as_me:15014: \$? = $ac_status" >&5
15015 (exit "$ac_status"); } &&
15016 { ac_try='test -s "conftest$ac_exeext"'
15017 { (eval echo "$as_me:15017: \"$ac_try\"") >&5
15018 (eval $ac_try) 2>&5
15020 echo "$as_me:15020: \$? = $ac_status" >&5
15021 (exit "$ac_status"); }; }; then
15024 echo "$as_me: failed program was:" >&5
15025 cat "conftest.$ac_ext" >&5
15028 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15029 LIBS="$cf_save_LIBS"
15030 echo "$as_me:15030: result: $with_pthread" >&5
15031 echo "${ECHO_T}$with_pthread" >&6
15032 test "$with_pthread" = yes && break
15035 if test "$with_pthread" = yes ; then
15037 cf_add_libs="$LIBS"
15040 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15041 # filter duplicates
15042 for cf_add_1lib in $cf_add_0lib; do
15043 for cf_add_2lib in $cf_add_libs; do
15044 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15049 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15051 LIBS="$cf_add_libs"
15053 cat >>confdefs.h <<\EOF
15054 #define HAVE_LIBPTHREADS 1
15058 { { echo "$as_me:15058: error: Cannot link with pthread library" >&5
15059 echo "$as_me: error: Cannot link with pthread library" >&2;}
15060 { (exit 1); exit 1; }; }
15067 echo "$as_me:15067: checking if you want to use weak-symbols for pthreads" >&5
15068 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15070 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15071 if test "${enable_weak_symbols+set}" = set; then
15072 enableval="$enable_weak_symbols"
15073 use_weak_symbols=$withval
15075 use_weak_symbols=no
15077 echo "$as_me:15077: result: $use_weak_symbols" >&5
15078 echo "${ECHO_T}$use_weak_symbols" >&6
15079 if test "$use_weak_symbols" = yes ; then
15081 echo "$as_me:15081: checking if $CC supports weak symbols" >&5
15082 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15083 if test "${cf_cv_weak_symbols+set}" = set; then
15084 echo $ECHO_N "(cached) $ECHO_C" >&6
15087 cat >"conftest.$ac_ext" <<_ACEOF
15088 #line 15088 "configure"
15089 #include "confdefs.h"
15096 #if defined(__GNUC__)
15097 # if defined __USE_ISOC99
15098 # define _cat_pragma(exp) _Pragma(#exp)
15099 # define _weak_pragma(exp) _cat_pragma(weak name)
15101 # define _weak_pragma(exp)
15103 # define _declare(name) __extension__ extern __typeof__(name) name
15104 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15107 weak_symbol(fopen);
15113 rm -f "conftest.$ac_objext"
15114 if { (eval echo "$as_me:15114: \"$ac_compile\"") >&5
15115 (eval $ac_compile) 2>&5
15117 echo "$as_me:15117: \$? = $ac_status" >&5
15118 (exit "$ac_status"); } &&
15119 { ac_try='test -s "conftest.$ac_objext"'
15120 { (eval echo "$as_me:15120: \"$ac_try\"") >&5
15121 (eval $ac_try) 2>&5
15123 echo "$as_me:15123: \$? = $ac_status" >&5
15124 (exit "$ac_status"); }; }; then
15125 cf_cv_weak_symbols=yes
15127 echo "$as_me: failed program was:" >&5
15128 cat "conftest.$ac_ext" >&5
15129 cf_cv_weak_symbols=no
15131 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15134 echo "$as_me:15134: result: $cf_cv_weak_symbols" >&5
15135 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15138 cf_cv_weak_symbols=no
15141 if test $cf_cv_weak_symbols = yes ; then
15143 cat >>confdefs.h <<\EOF
15144 #define USE_WEAK_SYMBOLS 1
15150 if test "$with_pthread" = "yes" ; then
15152 cat >>confdefs.h <<\EOF
15153 #define USE_PTHREADS 1
15156 enable_reentrant=yes
15157 if test $cf_cv_weak_symbols = yes ; then
15162 # OpenSUSE is installing ncurses6, using reentrant option.
15163 echo "$as_me:15163: checking for _nc_TABSIZE" >&5
15164 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15165 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15166 echo $ECHO_N "(cached) $ECHO_C" >&6
15168 cat >"conftest.$ac_ext" <<_ACEOF
15169 #line 15169 "configure"
15170 #include "confdefs.h"
15171 #define _nc_TABSIZE autoconf_temporary
15172 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15179 /* We use char because int might match the return type of a gcc2
15180 builtin and then its argument prototype would still apply. */
15181 char _nc_TABSIZE (void);
15187 /* The GNU C library defines stubs for functions which it implements
15188 to always fail with ENOSYS. Some functions are actually named
15189 something starting with __ and the normal name is an alias. */
15190 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15191 #error found stub for _nc_TABSIZE
15194 return _nc_TABSIZE ();
15199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15200 if { (eval echo "$as_me:15200: \"$ac_link\"") >&5
15201 (eval $ac_link) 2>&5
15203 echo "$as_me:15203: \$? = $ac_status" >&5
15204 (exit "$ac_status"); } &&
15205 { ac_try='test -s "conftest$ac_exeext"'
15206 { (eval echo "$as_me:15206: \"$ac_try\"") >&5
15207 (eval $ac_try) 2>&5
15209 echo "$as_me:15209: \$? = $ac_status" >&5
15210 (exit "$ac_status"); }; }; then
15211 ac_cv_func__nc_TABSIZE=yes
15213 echo "$as_me: failed program was:" >&5
15214 cat "conftest.$ac_ext" >&5
15215 ac_cv_func__nc_TABSIZE=no
15217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15219 echo "$as_me:15219: result: $ac_cv_func__nc_TABSIZE" >&5
15220 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15221 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15222 assume_reentrant=yes
15224 assume_reentrant=no
15227 # Reentrant code has to be opaque; there's little advantage to making ncurses
15228 # opaque outside of that, so there is no --enable-opaque option. We can use
15229 # this option without --with-pthreads, but this will be always set for
15231 echo "$as_me:15231: checking if you want experimental reentrant code" >&5
15232 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15234 # Check whether --enable-reentrant or --disable-reentrant was given.
15235 if test "${enable_reentrant+set}" = set; then
15236 enableval="$enable_reentrant"
15237 with_reentrant=$enableval
15239 with_reentrant=$assume_reentrant
15241 echo "$as_me:15241: result: $with_reentrant" >&5
15242 echo "${ECHO_T}$with_reentrant" >&6
15243 if test "$with_reentrant" = yes ; then
15244 cf_cv_enable_reentrant=1
15245 if test $cf_cv_weak_symbols = yes ; then
15247 # remove pthread library from $LIBS
15248 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15250 elif test "$assume_reentrant" = no ; then
15251 LIB_SUFFIX="t${LIB_SUFFIX}"
15254 cat >>confdefs.h <<\EOF
15255 #define USE_REENTRANT 1
15259 cf_cv_enable_reentrant=0
15262 ### Allow using a different wrap-prefix
15263 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15264 echo "$as_me:15264: checking for prefix used to wrap public variables" >&5
15265 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15267 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15268 if test "${with_wrap_prefix+set}" = set; then
15269 withval="$with_wrap_prefix"
15270 NCURSES_WRAP_PREFIX=$withval
15272 NCURSES_WRAP_PREFIX=_nc_
15274 echo "$as_me:15274: result: $NCURSES_WRAP_PREFIX" >&5
15275 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15277 NCURSES_WRAP_PREFIX=_nc_
15280 cat >>confdefs.h <<EOF
15281 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15284 ###############################################################################
15286 ### use option --disable-echo to suppress full display compiling commands
15288 echo "$as_me:15288: checking if you want to see long compiling messages" >&5
15289 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15291 # Check whether --enable-echo or --disable-echo was given.
15292 if test "${enable_echo+set}" = set; then
15293 enableval="$enable_echo"
15294 test "$enableval" != no && enableval=yes
15295 if test "$enableval" != "yes" ; then
15298 ECHO_LD='@echo linking $@;'
15299 RULE_CC='@echo compiling $<'
15300 SHOW_CC='@echo compiling $@'
15322 echo "$as_me:15322: result: $enableval" >&5
15323 echo "${ECHO_T}$enableval" >&6
15325 echo "$as_me:15325: checking if you want to use C11 _Noreturn feature" >&5
15326 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15328 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15329 if test "${enable_stdnoreturn+set}" = set; then
15330 enableval="$enable_stdnoreturn"
15331 test "$enableval" != yes && enableval=no
15332 if test "$enableval" != "no" ; then
15333 enable_stdnoreturn=yes
15335 enable_stdnoreturn=no
15339 enable_stdnoreturn=no
15342 echo "$as_me:15342: result: $enable_stdnoreturn" >&5
15343 echo "${ECHO_T}$enable_stdnoreturn" >&6
15345 if test $enable_stdnoreturn = yes; then
15346 echo "$as_me:15346: checking for C11 _Noreturn feature" >&5
15347 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15348 if test "${cf_cv_c11_noreturn+set}" = set; then
15349 echo $ECHO_N "(cached) $ECHO_C" >&6
15351 cat >"conftest.$ac_ext" <<_ACEOF
15352 #line 15352 "configure"
15353 #include "confdefs.h"
15356 #include <stdlib.h>
15357 #include <stdnoreturn.h>
15358 static _Noreturn void giveup(void) { exit(0); }
15363 if (feof(stdin)) giveup()
15368 rm -f "conftest.$ac_objext"
15369 if { (eval echo "$as_me:15369: \"$ac_compile\"") >&5
15370 (eval $ac_compile) 2>&5
15372 echo "$as_me:15372: \$? = $ac_status" >&5
15373 (exit "$ac_status"); } &&
15374 { ac_try='test -s "conftest.$ac_objext"'
15375 { (eval echo "$as_me:15375: \"$ac_try\"") >&5
15376 (eval $ac_try) 2>&5
15378 echo "$as_me:15378: \$? = $ac_status" >&5
15379 (exit "$ac_status"); }; }; then
15380 cf_cv_c11_noreturn=yes
15382 echo "$as_me: failed program was:" >&5
15383 cat "conftest.$ac_ext" >&5
15384 cf_cv_c11_noreturn=no
15386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15389 echo "$as_me:15389: result: $cf_cv_c11_noreturn" >&5
15390 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15392 cf_cv_c11_noreturn=no,
15395 if test "$cf_cv_c11_noreturn" = yes; then
15397 cat >>confdefs.h <<\EOF
15398 #define HAVE_STDNORETURN_H 1
15401 cat >>confdefs.h <<EOF
15402 #define STDC_NORETURN _Noreturn
15405 HAVE_STDNORETURN_H=1
15407 HAVE_STDNORETURN_H=0
15410 if test "$GCC" = yes || test "$GXX" = yes
15413 if test "$GCC" = yes || test "$GXX" = yes
15418 for cf_temp_scan in $CFLAGS
15420 case "x$cf_temp_scan" in
15423 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15424 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15429 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15430 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15435 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15436 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15441 if test "x$CFLAGS" != "x$cf_temp_flags"
15443 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15445 echo "${as_me:-configure}:15445: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15447 CFLAGS="$cf_temp_flags"
15448 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15450 echo "${as_me:-configure}:15450: testing ... fixed $CFLAGS ..." 1>&5
15452 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15454 echo "${as_me:-configure}:15454: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15461 if test "$GCC" = yes || test "$GXX" = yes
15466 for cf_temp_scan in $CPPFLAGS
15468 case "x$cf_temp_scan" in
15471 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15472 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15477 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15478 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15483 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15484 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15489 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15491 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15493 echo "${as_me:-configure}:15493: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15495 CPPFLAGS="$cf_temp_flags"
15496 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15498 echo "${as_me:-configure}:15498: testing ... fixed $CPPFLAGS ..." 1>&5
15500 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15502 echo "${as_me:-configure}:15502: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15509 if test "$GCC" = yes || test "$GXX" = yes
15514 for cf_temp_scan in $LDFLAGS
15516 case "x$cf_temp_scan" in
15519 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15520 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15525 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15526 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15531 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15532 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15537 if test "x$LDFLAGS" != "x$cf_temp_flags"
15539 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15541 echo "${as_me:-configure}:15541: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15543 LDFLAGS="$cf_temp_flags"
15544 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15546 echo "${as_me:-configure}:15546: testing ... fixed $LDFLAGS ..." 1>&5
15548 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15550 echo "${as_me:-configure}:15550: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15557 echo "$as_me:15557: checking if you want to turn on gcc warnings" >&5
15558 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15560 # Check whether --enable-warnings or --disable-warnings was given.
15561 if test "${enable_warnings+set}" = set; then
15562 enableval="$enable_warnings"
15563 test "$enableval" != yes && enableval=no
15564 if test "$enableval" != "no" ; then
15565 enable_warnings=yes
15574 echo "$as_me:15574: result: $enable_warnings" >&5
15575 echo "${ECHO_T}$enable_warnings" >&6
15576 if test "$enable_warnings" = "yes"
15579 if test "x$have_x" = xyes; then
15581 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15582 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15583 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15584 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15585 for cf_X_CFLAGS in $X_CFLAGS
15587 case "x$cf_X_CFLAGS" in
15589 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15592 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15597 cat >"conftest.$ac_ext" <<_ACEOF
15598 #line 15598 "configure"
15599 #include "confdefs.h"
15601 #include <stdlib.h>
15602 #include <X11/Intrinsic.h>
15607 String foo = malloc(1); free((void*)foo)
15612 rm -f "conftest.$ac_objext"
15613 if { (eval echo "$as_me:15613: \"$ac_compile\"") >&5
15614 (eval $ac_compile) 2>&5
15616 echo "$as_me:15616: \$? = $ac_status" >&5
15617 (exit "$ac_status"); } &&
15618 { ac_try='test -s "conftest.$ac_objext"'
15619 { (eval echo "$as_me:15619: \"$ac_try\"") >&5
15620 (eval $ac_try) 2>&5
15622 echo "$as_me:15622: \$? = $ac_status" >&5
15623 (exit "$ac_status"); }; }; then
15625 echo "$as_me:15625: checking for X11/Xt const-feature" >&5
15626 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15627 if test "${cf_cv_const_x_string+set}" = set; then
15628 echo $ECHO_N "(cached) $ECHO_C" >&6
15631 cat >"conftest.$ac_ext" <<_ACEOF
15632 #line 15632 "configure"
15633 #include "confdefs.h"
15635 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15636 #undef XTSTRINGDEFINES /* X11R5 and later */
15637 #include <stdlib.h>
15638 #include <X11/Intrinsic.h>
15643 String foo = malloc(1); *foo = 0
15648 rm -f "conftest.$ac_objext"
15649 if { (eval echo "$as_me:15649: \"$ac_compile\"") >&5
15650 (eval $ac_compile) 2>&5
15652 echo "$as_me:15652: \$? = $ac_status" >&5
15653 (exit "$ac_status"); } &&
15654 { ac_try='test -s "conftest.$ac_objext"'
15655 { (eval echo "$as_me:15655: \"$ac_try\"") >&5
15656 (eval $ac_try) 2>&5
15658 echo "$as_me:15658: \$? = $ac_status" >&5
15659 (exit "$ac_status"); }; }; then
15661 cf_cv_const_x_string=no
15664 echo "$as_me: failed program was:" >&5
15665 cat "conftest.$ac_ext" >&5
15667 cf_cv_const_x_string=yes
15670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15673 echo "$as_me:15673: result: $cf_cv_const_x_string" >&5
15674 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15676 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15677 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15678 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15680 case "$cf_cv_const_x_string" in
15683 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15684 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15689 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15690 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15696 echo "$as_me: failed program was:" >&5
15697 cat "conftest.$ac_ext" >&5
15699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15701 cat > "conftest.$ac_ext" <<EOF
15702 #line 15702 "${as_me:-configure}"
15703 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15705 if test "$INTEL_COMPILER" = yes
15707 # The "-wdXXX" options suppress warnings:
15708 # remark #1419: external declaration in primary source file
15709 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15710 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15711 # remark #193: zero used for undefined preprocessing identifier
15712 # remark #593: variable "curs_sb_left_arrow" was set but never used
15713 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15714 # remark #869: parameter "tw" was never referenced
15715 # remark #981: operands are evaluated in unspecified order
15716 # warning #279: controlling expression is constant
15718 { echo "$as_me:15718: checking for $CC warning options..." >&5
15719 echo "$as_me: checking for $CC warning options..." >&6;}
15720 cf_save_CFLAGS="$CFLAGS"
15721 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15733 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15734 if { (eval echo "$as_me:15734: \"$ac_compile\"") >&5
15735 (eval $ac_compile) 2>&5
15737 echo "$as_me:15737: \$? = $ac_status" >&5
15738 (exit "$ac_status"); }; then
15739 test -n "$verbose" && echo "$as_me:15739: result: ... -$cf_opt" >&5
15740 echo "${ECHO_T}... -$cf_opt" >&6
15741 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15744 CFLAGS="$cf_save_CFLAGS"
15745 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15747 { echo "$as_me:15747: checking for $CC warning options..." >&5
15748 echo "$as_me: checking for $CC warning options..." >&6;}
15749 cf_save_CFLAGS="$CFLAGS"
15751 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15752 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15753 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15754 for cf_opt in W Wall \
15755 Wbad-function-cast \
15758 Wdeclaration-after-statement \
15761 Wmissing-declarations \
15762 Wmissing-prototypes \
15766 Wstrict-prototypes \
15767 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15769 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15770 if { (eval echo "$as_me:15770: \"$ac_compile\"") >&5
15771 (eval $ac_compile) 2>&5
15773 echo "$as_me:15773: \$? = $ac_status" >&5
15774 (exit "$ac_status"); }; then
15775 test -n "$verbose" && echo "$as_me:15775: result: ... -$cf_opt" >&5
15776 echo "${ECHO_T}... -$cf_opt" >&6
15779 case "$GCC_VERSION" in
15781 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15783 echo "${as_me:-configure}:15783: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15789 case "$GCC_VERSION" in
15791 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15793 echo "${as_me:-configure}:15793: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15799 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15802 CFLAGS="$cf_save_CFLAGS"
15808 if test "$GCC" = yes || test "$GXX" = yes
15810 cat > conftest.i <<EOF
15812 #define GCC_PRINTF 0
15815 #define GCC_SCANF 0
15817 #ifndef GCC_NORETURN
15818 #define GCC_NORETURN /* nothing */
15821 #define GCC_UNUSED /* nothing */
15824 if test "$GCC" = yes
15826 { echo "$as_me:15826: checking for $CC __attribute__ directives..." >&5
15827 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15828 cat > "conftest.$ac_ext" <<EOF
15829 #line 15829 "${as_me:-configure}"
15831 #include "confdefs.h"
15832 #include "conftest.h"
15833 #include "conftest.i"
15835 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15837 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15840 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15842 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15844 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15845 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15846 extern GCC_NORETURN void foo(void);
15847 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15849 cf_printf_attribute=no
15850 cf_scanf_attribute=no
15851 for cf_attribute in scanf printf unused noreturn
15854 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15856 cf_directive="__attribute__(($cf_attribute))"
15857 echo "checking for $CC $cf_directive" 1>&5
15859 case "$cf_attribute" in
15861 cf_printf_attribute=yes
15862 cat >conftest.h <<EOF
15863 #define GCC_$cf_ATTRIBUTE 1
15867 cf_scanf_attribute=yes
15868 cat >conftest.h <<EOF
15869 #define GCC_$cf_ATTRIBUTE 1
15873 cat >conftest.h <<EOF
15874 #define GCC_$cf_ATTRIBUTE $cf_directive
15879 if { (eval echo "$as_me:15879: \"$ac_compile\"") >&5
15880 (eval $ac_compile) 2>&5
15882 echo "$as_me:15882: \$? = $ac_status" >&5
15883 (exit "$ac_status"); }; then
15884 test -n "$verbose" && echo "$as_me:15884: result: ... $cf_attribute" >&5
15885 echo "${ECHO_T}... $cf_attribute" >&6
15886 cat conftest.h >>confdefs.h
15887 case "$cf_attribute" in
15890 cat >>confdefs.h <<EOF
15891 #define GCC_NORETURN $cf_directive
15896 cf_value='/* nothing */'
15897 if test "$cf_printf_attribute" != no ; then
15898 cf_value='__attribute__((format(printf,fmt,var)))'
15900 cat >>confdefs.h <<\EOF
15901 #define GCC_PRINTF 1
15906 cat >>confdefs.h <<EOF
15907 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15912 cf_value='/* nothing */'
15913 if test "$cf_scanf_attribute" != no ; then
15914 cf_value='__attribute__((format(scanf,fmt,var)))'
15916 cat >>confdefs.h <<\EOF
15917 #define GCC_SCANF 1
15922 cat >>confdefs.h <<EOF
15923 #define GCC_SCANFLIKE(fmt,var) $cf_value
15929 cat >>confdefs.h <<EOF
15930 #define GCC_UNUSED $cf_directive
15938 ${FGREP-fgrep} define conftest.i >>confdefs.h
15945 if test "x$enable_warnings" = "xyes"; then
15947 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
15951 ### use option --enable-assertions to turn on generation of assertion code
15952 echo "$as_me:15952: checking if you want to enable runtime assertions" >&5
15953 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15955 # Check whether --enable-assertions or --disable-assertions was given.
15956 if test "${enable_assertions+set}" = set; then
15957 enableval="$enable_assertions"
15958 with_assertions=$enableval
15962 echo "$as_me:15962: result: $with_assertions" >&5
15963 echo "${ECHO_T}$with_assertions" >&6
15966 if test "$with_assertions" = no
15968 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15971 ADAFLAGS="$ADAFLAGS -gnata"
15976 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15978 cat >>confdefs.h <<\EOF
15979 #define HAVE_NC_ALLOC_H 1
15982 ### use option --enable-expanded to generate certain macros as functions
15984 # Check whether --enable-expanded or --disable-expanded was given.
15985 if test "${enable_expanded+set}" = set; then
15986 enableval="$enable_expanded"
15987 test "$enableval" = yes &&
15988 cat >>confdefs.h <<\EOF
15989 #define NCURSES_EXPANDED 1
15994 ### use option --disable-macros to suppress macros in favor of functions
15996 # Check whether --enable-macros or --disable-macros was given.
15997 if test "${enable_macros+set}" = set; then
15998 enableval="$enable_macros"
15999 test "$enableval" = no &&
16000 cat >>confdefs.h <<\EOF
16001 #define NCURSES_NOMACROS 1
16006 # Normally we only add trace() to the debug-library. Allow this to be
16007 # extended to all models of the ncurses library:
16009 case "$CFLAGS $CPPFLAGS" in
16015 echo "$as_me:16015: checking whether to add trace feature to all models" >&5
16016 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16018 # Check whether --with-trace or --without-trace was given.
16019 if test "${with_trace+set}" = set; then
16020 withval="$with_trace"
16021 cf_with_trace=$withval
16023 cf_with_trace=$cf_all_traces
16025 echo "$as_me:16025: result: $cf_with_trace" >&5
16026 echo "${ECHO_T}$cf_with_trace" >&6
16028 if test "$cf_with_trace" = yes ; then
16034 cf_new_extra_cppflags=
16036 for cf_add_cflags in -DTRACE
16038 case "$cf_fix_cppflags" in
16040 case "$cf_add_cflags" in
16041 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16042 case "$cf_add_cflags" in
16044 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16047 && test -z "${cf_tst_cflags}" \
16048 && cf_fix_cppflags=yes
16050 if test "$cf_fix_cppflags" = yes ; then
16052 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16053 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16056 elif test "${cf_tst_cflags}" = "\"'" ; then
16058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16065 case "$CPPFLAGS" in
16069 case "$cf_add_cflags" in
16071 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16073 CPPFLAGS=`echo "$CPPFLAGS" | \
16074 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16075 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16080 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16081 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16088 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16089 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16096 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16097 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16099 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16101 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16102 && test -z "${cf_tst_cflags}" \
16103 && cf_fix_cppflags=no
16108 if test -n "$cf_new_cflags" ; then
16110 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16111 CFLAGS="${CFLAGS}$cf_new_cflags"
16115 if test -n "$cf_new_cppflags" ; then
16117 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16118 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16122 if test -n "$cf_new_extra_cppflags" ; then
16124 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16125 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16133 echo "$as_me:16133: checking if we want to use GNAT projects" >&5
16134 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16136 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16137 if test "${enable_gnat_projects+set}" = set; then
16138 enableval="$enable_gnat_projects"
16139 test "$enableval" != no && enableval=yes
16140 if test "$enableval" != "yes" ; then
16141 enable_gnat_projects=no
16143 enable_gnat_projects=yes
16147 enable_gnat_projects=yes
16150 echo "$as_me:16150: result: $enable_gnat_projects" >&5
16151 echo "${ECHO_T}$enable_gnat_projects" >&6
16153 ### Checks for libraries.
16154 case $cf_cv_system_name in
16157 echo "$as_me:16157: checking if ssp library is needed" >&5
16158 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16159 if test "${cf_cv_need_libssp+set}" = set; then
16160 echo $ECHO_N "(cached) $ECHO_C" >&6
16163 cat >"conftest.$ac_ext" <<_ACEOF
16164 #line 16164 "configure"
16165 #include "confdefs.h"
16167 #include <sys/types.h>
16168 #include <dirent.h>
16174 DIR *dp = opendir(".");
16180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16181 if { (eval echo "$as_me:16181: \"$ac_link\"") >&5
16182 (eval $ac_link) 2>&5
16184 echo "$as_me:16184: \$? = $ac_status" >&5
16185 (exit "$ac_status"); } &&
16186 { ac_try='test -s "conftest$ac_exeext"'
16187 { (eval echo "$as_me:16187: \"$ac_try\"") >&5
16188 (eval $ac_try) 2>&5
16190 echo "$as_me:16190: \$? = $ac_status" >&5
16191 (exit "$ac_status"); }; }; then
16192 cf_cv_need_libssp=no
16194 echo "$as_me: failed program was:" >&5
16195 cat "conftest.$ac_ext" >&5
16197 cf_save_LIBS="$LIBS"
16199 cat >"conftest.$ac_ext" <<_ACEOF
16200 #line 16200 "configure"
16201 #include "confdefs.h"
16203 #include <sys/types.h>
16204 #include <dirent.h>
16210 DIR *dp = opendir(".");
16216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16217 if { (eval echo "$as_me:16217: \"$ac_link\"") >&5
16218 (eval $ac_link) 2>&5
16220 echo "$as_me:16220: \$? = $ac_status" >&5
16221 (exit "$ac_status"); } &&
16222 { ac_try='test -s "conftest$ac_exeext"'
16223 { (eval echo "$as_me:16223: \"$ac_try\"") >&5
16224 (eval $ac_try) 2>&5
16226 echo "$as_me:16226: \$? = $ac_status" >&5
16227 (exit "$ac_status"); }; }; then
16228 cf_cv_need_libssp=yes
16230 echo "$as_me: failed program was:" >&5
16231 cat "conftest.$ac_ext" >&5
16232 cf_cv_need_libssp=maybe
16234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16235 LIBS="$cf_save_LIBS"
16238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16240 echo "$as_me:16240: result: $cf_cv_need_libssp" >&5
16241 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16243 if test "x$cf_cv_need_libssp" = xyes
16246 cf_add_libs="$LIBS"
16249 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16250 # filter duplicates
16251 for cf_add_1lib in $cf_add_0lib; do
16252 for cf_add_2lib in $cf_add_libs; do
16253 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16258 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16260 LIBS="$cf_add_libs"
16266 echo "$as_me:16266: checking for gettimeofday" >&5
16267 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16268 if test "${ac_cv_func_gettimeofday+set}" = set; then
16269 echo $ECHO_N "(cached) $ECHO_C" >&6
16271 cat >"conftest.$ac_ext" <<_ACEOF
16272 #line 16272 "configure"
16273 #include "confdefs.h"
16274 #define gettimeofday autoconf_temporary
16275 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16276 #undef gettimeofday
16282 /* We use char because int might match the return type of a gcc2
16283 builtin and then its argument prototype would still apply. */
16284 char gettimeofday (void);
16290 /* The GNU C library defines stubs for functions which it implements
16291 to always fail with ENOSYS. Some functions are actually named
16292 something starting with __ and the normal name is an alias. */
16293 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16294 #error found stub for gettimeofday
16297 return gettimeofday ();
16302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16303 if { (eval echo "$as_me:16303: \"$ac_link\"") >&5
16304 (eval $ac_link) 2>&5
16306 echo "$as_me:16306: \$? = $ac_status" >&5
16307 (exit "$ac_status"); } &&
16308 { ac_try='test -s "conftest$ac_exeext"'
16309 { (eval echo "$as_me:16309: \"$ac_try\"") >&5
16310 (eval $ac_try) 2>&5
16312 echo "$as_me:16312: \$? = $ac_status" >&5
16313 (exit "$ac_status"); }; }; then
16314 ac_cv_func_gettimeofday=yes
16316 echo "$as_me: failed program was:" >&5
16317 cat "conftest.$ac_ext" >&5
16318 ac_cv_func_gettimeofday=no
16320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16322 echo "$as_me:16322: result: $ac_cv_func_gettimeofday" >&5
16323 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16324 if test "$ac_cv_func_gettimeofday" = yes; then
16325 cat >>confdefs.h <<\EOF
16326 #define HAVE_GETTIMEOFDAY 1
16331 echo "$as_me:16331: checking for gettimeofday in -lbsd" >&5
16332 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16333 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16334 echo $ECHO_N "(cached) $ECHO_C" >&6
16336 ac_check_lib_save_LIBS=$LIBS
16338 cat >"conftest.$ac_ext" <<_ACEOF
16339 #line 16339 "configure"
16340 #include "confdefs.h"
16342 /* Override any gcc2 internal prototype to avoid an error. */
16346 /* We use char because int might match the return type of a gcc2
16347 builtin and then its argument prototype would still apply. */
16348 char gettimeofday ();
16357 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16358 if { (eval echo "$as_me:16358: \"$ac_link\"") >&5
16359 (eval $ac_link) 2>&5
16361 echo "$as_me:16361: \$? = $ac_status" >&5
16362 (exit "$ac_status"); } &&
16363 { ac_try='test -s "conftest$ac_exeext"'
16364 { (eval echo "$as_me:16364: \"$ac_try\"") >&5
16365 (eval $ac_try) 2>&5
16367 echo "$as_me:16367: \$? = $ac_status" >&5
16368 (exit "$ac_status"); }; }; then
16369 ac_cv_lib_bsd_gettimeofday=yes
16371 echo "$as_me: failed program was:" >&5
16372 cat "conftest.$ac_ext" >&5
16373 ac_cv_lib_bsd_gettimeofday=no
16375 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16376 LIBS=$ac_check_lib_save_LIBS
16378 echo "$as_me:16378: result: $ac_cv_lib_bsd_gettimeofday" >&5
16379 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16380 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16382 cat >>confdefs.h <<\EOF
16383 #define HAVE_GETTIMEOFDAY 1
16393 ### Checks for header files.
16394 echo "$as_me:16394: checking for ANSI C header files" >&5
16395 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16396 if test "${ac_cv_header_stdc+set}" = set; then
16397 echo $ECHO_N "(cached) $ECHO_C" >&6
16399 cat >"conftest.$ac_ext" <<_ACEOF
16400 #line 16400 "configure"
16401 #include "confdefs.h"
16402 #include <stdlib.h>
16403 #include <stdarg.h>
16404 #include <string.h>
16408 if { (eval echo "$as_me:16408: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16409 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16411 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16413 cat conftest.err >&5
16414 echo "$as_me:16414: \$? = $ac_status" >&5
16415 (exit "$ac_status"); } >/dev/null; then
16416 if test -s conftest.err; then
16417 ac_cpp_err=$ac_c_preproc_warn_flag
16424 if test -z "$ac_cpp_err"; then
16425 ac_cv_header_stdc=yes
16427 echo "$as_me: failed program was:" >&5
16428 cat "conftest.$ac_ext" >&5
16429 ac_cv_header_stdc=no
16431 rm -f conftest.err "conftest.$ac_ext"
16433 if test $ac_cv_header_stdc = yes; then
16434 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16435 cat >"conftest.$ac_ext" <<_ACEOF
16436 #line 16436 "configure"
16437 #include "confdefs.h"
16438 #include <string.h>
16441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16442 $EGREP "memchr" >/dev/null 2>&1; then
16445 ac_cv_header_stdc=no
16451 if test $ac_cv_header_stdc = yes; then
16452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16453 cat >"conftest.$ac_ext" <<_ACEOF
16454 #line 16454 "configure"
16455 #include "confdefs.h"
16456 #include <stdlib.h>
16459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16460 $EGREP "free" >/dev/null 2>&1; then
16463 ac_cv_header_stdc=no
16469 if test $ac_cv_header_stdc = yes; then
16470 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16471 if test "$cross_compiling" = yes; then
16474 cat >"conftest.$ac_ext" <<_ACEOF
16475 #line 16475 "configure"
16476 #include "confdefs.h"
16478 #if ((' ' & 0x0FF) == 0x020)
16479 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16480 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16482 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16483 || ('j' <= (c) && (c) <= 'r') \
16484 || ('s' <= (c) && (c) <= 'z'))
16485 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16488 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16493 for (i = 0; i < 256; i++)
16494 if (XOR (islower (i), ISLOWER (i))
16495 || toupper (i) != TOUPPER (i))
16496 $ac_main_return(2);
16497 $ac_main_return (0);
16500 rm -f "conftest$ac_exeext"
16501 if { (eval echo "$as_me:16501: \"$ac_link\"") >&5
16502 (eval $ac_link) 2>&5
16504 echo "$as_me:16504: \$? = $ac_status" >&5
16505 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16506 { (eval echo "$as_me:16506: \"$ac_try\"") >&5
16507 (eval $ac_try) 2>&5
16509 echo "$as_me:16509: \$? = $ac_status" >&5
16510 (exit "$ac_status"); }; }; then
16513 echo "$as_me: program exited with status $ac_status" >&5
16514 echo "$as_me: failed program was:" >&5
16515 cat "conftest.$ac_ext" >&5
16516 ac_cv_header_stdc=no
16518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16522 echo "$as_me:16522: result: $ac_cv_header_stdc" >&5
16523 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16524 if test $ac_cv_header_stdc = yes; then
16526 cat >>confdefs.h <<\EOF
16527 #define STDC_HEADERS 1
16532 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
16534 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
16535 inttypes.h stdint.h unistd.h
16537 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16538 echo "$as_me:16538: checking for $ac_header" >&5
16539 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16540 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16541 echo $ECHO_N "(cached) $ECHO_C" >&6
16543 cat >"conftest.$ac_ext" <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16546 $ac_includes_default
16547 #include <$ac_header>
16549 rm -f "conftest.$ac_objext"
16550 if { (eval echo "$as_me:16550: \"$ac_compile\"") >&5
16551 (eval $ac_compile) 2>&5
16553 echo "$as_me:16553: \$? = $ac_status" >&5
16554 (exit "$ac_status"); } &&
16555 { ac_try='test -s "conftest.$ac_objext"'
16556 { (eval echo "$as_me:16556: \"$ac_try\"") >&5
16557 (eval $ac_try) 2>&5
16559 echo "$as_me:16559: \$? = $ac_status" >&5
16560 (exit "$ac_status"); }; }; then
16561 eval "$as_ac_Header=yes"
16563 echo "$as_me: failed program was:" >&5
16564 cat "conftest.$ac_ext" >&5
16565 eval "$as_ac_Header=no"
16567 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16569 echo "$as_me:16569: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16570 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16571 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16572 cat >>confdefs.h <<EOF
16573 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16579 echo "$as_me:16579: checking for signed char" >&5
16580 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16581 if test "${ac_cv_type_signed_char+set}" = set; then
16582 echo $ECHO_N "(cached) $ECHO_C" >&6
16584 cat >"conftest.$ac_ext" <<_ACEOF
16585 #line 16585 "configure"
16586 #include "confdefs.h"
16587 $ac_includes_default
16591 if ((signed char *) 0)
16593 if (sizeof (signed char))
16599 rm -f "conftest.$ac_objext"
16600 if { (eval echo "$as_me:16600: \"$ac_compile\"") >&5
16601 (eval $ac_compile) 2>&5
16603 echo "$as_me:16603: \$? = $ac_status" >&5
16604 (exit "$ac_status"); } &&
16605 { ac_try='test -s "conftest.$ac_objext"'
16606 { (eval echo "$as_me:16606: \"$ac_try\"") >&5
16607 (eval $ac_try) 2>&5
16609 echo "$as_me:16609: \$? = $ac_status" >&5
16610 (exit "$ac_status"); }; }; then
16611 ac_cv_type_signed_char=yes
16613 echo "$as_me: failed program was:" >&5
16614 cat "conftest.$ac_ext" >&5
16615 ac_cv_type_signed_char=no
16617 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16619 echo "$as_me:16619: result: $ac_cv_type_signed_char" >&5
16620 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16622 echo "$as_me:16622: checking size of signed char" >&5
16623 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16624 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16625 echo $ECHO_N "(cached) $ECHO_C" >&6
16627 if test "$ac_cv_type_signed_char" = yes; then
16628 if test "$cross_compiling" = yes; then
16629 # Depending upon the size, compute the lo and hi bounds.
16630 cat >"conftest.$ac_ext" <<_ACEOF
16631 #line 16631 "configure"
16632 #include "confdefs.h"
16633 $ac_includes_default
16637 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16642 rm -f "conftest.$ac_objext"
16643 if { (eval echo "$as_me:16643: \"$ac_compile\"") >&5
16644 (eval $ac_compile) 2>&5
16646 echo "$as_me:16646: \$? = $ac_status" >&5
16647 (exit "$ac_status"); } &&
16648 { ac_try='test -s "conftest.$ac_objext"'
16649 { (eval echo "$as_me:16649: \"$ac_try\"") >&5
16650 (eval $ac_try) 2>&5
16652 echo "$as_me:16652: \$? = $ac_status" >&5
16653 (exit "$ac_status"); }; }; then
16656 cat >"conftest.$ac_ext" <<_ACEOF
16657 #line 16657 "configure"
16658 #include "confdefs.h"
16659 $ac_includes_default
16663 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16668 rm -f "conftest.$ac_objext"
16669 if { (eval echo "$as_me:16669: \"$ac_compile\"") >&5
16670 (eval $ac_compile) 2>&5
16672 echo "$as_me:16672: \$? = $ac_status" >&5
16673 (exit "$ac_status"); } &&
16674 { ac_try='test -s "conftest.$ac_objext"'
16675 { (eval echo "$as_me:16675: \"$ac_try\"") >&5
16676 (eval $ac_try) 2>&5
16678 echo "$as_me:16678: \$? = $ac_status" >&5
16679 (exit "$ac_status"); }; }; then
16680 ac_hi=$ac_mid; break
16682 echo "$as_me: failed program was:" >&5
16683 cat "conftest.$ac_ext" >&5
16684 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16686 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16689 echo "$as_me: failed program was:" >&5
16690 cat "conftest.$ac_ext" >&5
16693 cat >"conftest.$ac_ext" <<_ACEOF
16694 #line 16694 "configure"
16695 #include "confdefs.h"
16696 $ac_includes_default
16700 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16705 rm -f "conftest.$ac_objext"
16706 if { (eval echo "$as_me:16706: \"$ac_compile\"") >&5
16707 (eval $ac_compile) 2>&5
16709 echo "$as_me:16709: \$? = $ac_status" >&5
16710 (exit "$ac_status"); } &&
16711 { ac_try='test -s "conftest.$ac_objext"'
16712 { (eval echo "$as_me:16712: \"$ac_try\"") >&5
16713 (eval $ac_try) 2>&5
16715 echo "$as_me:16715: \$? = $ac_status" >&5
16716 (exit "$ac_status"); }; }; then
16717 ac_lo=$ac_mid; break
16719 echo "$as_me: failed program was:" >&5
16720 cat "conftest.$ac_ext" >&5
16721 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16723 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16726 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16727 # Binary search between lo and hi bounds.
16728 while test "x$ac_lo" != "x$ac_hi"; do
16729 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16730 cat >"conftest.$ac_ext" <<_ACEOF
16731 #line 16731 "configure"
16732 #include "confdefs.h"
16733 $ac_includes_default
16737 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16742 rm -f "conftest.$ac_objext"
16743 if { (eval echo "$as_me:16743: \"$ac_compile\"") >&5
16744 (eval $ac_compile) 2>&5
16746 echo "$as_me:16746: \$? = $ac_status" >&5
16747 (exit "$ac_status"); } &&
16748 { ac_try='test -s "conftest.$ac_objext"'
16749 { (eval echo "$as_me:16749: \"$ac_try\"") >&5
16750 (eval $ac_try) 2>&5
16752 echo "$as_me:16752: \$? = $ac_status" >&5
16753 (exit "$ac_status"); }; }; then
16756 echo "$as_me: failed program was:" >&5
16757 cat "conftest.$ac_ext" >&5
16758 ac_lo=`expr "$ac_mid" + 1`
16760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16762 ac_cv_sizeof_signed_char=$ac_lo
16764 if test "$cross_compiling" = yes; then
16765 { { echo "$as_me:16765: error: cannot run test program while cross compiling" >&5
16766 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16767 { (exit 1); exit 1; }; }
16769 cat >"conftest.$ac_ext" <<_ACEOF
16770 #line 16770 "configure"
16771 #include "confdefs.h"
16772 $ac_includes_default
16776 FILE *f = fopen ("conftest.val", "w");
16778 $ac_main_return (1);
16779 fprintf (f, "%ld", (long)(sizeof (signed char)));
16785 rm -f "conftest$ac_exeext"
16786 if { (eval echo "$as_me:16786: \"$ac_link\"") >&5
16787 (eval $ac_link) 2>&5
16789 echo "$as_me:16789: \$? = $ac_status" >&5
16790 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16791 { (eval echo "$as_me:16791: \"$ac_try\"") >&5
16792 (eval $ac_try) 2>&5
16794 echo "$as_me:16794: \$? = $ac_status" >&5
16795 (exit "$ac_status"); }; }; then
16796 ac_cv_sizeof_signed_char=`cat conftest.val`
16798 echo "$as_me: program exited with status $ac_status" >&5
16799 echo "$as_me: failed program was:" >&5
16800 cat "conftest.$ac_ext" >&5
16802 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16807 ac_cv_sizeof_signed_char=0
16810 echo "$as_me:16810: result: $ac_cv_sizeof_signed_char" >&5
16811 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16812 cat >>confdefs.h <<EOF
16813 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16816 echo "$as_me:16816: checking for ANSI C header files" >&5
16817 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16818 if test "${ac_cv_header_stdc+set}" = set; then
16819 echo $ECHO_N "(cached) $ECHO_C" >&6
16821 cat >"conftest.$ac_ext" <<_ACEOF
16822 #line 16822 "configure"
16823 #include "confdefs.h"
16824 #include <stdlib.h>
16825 #include <stdarg.h>
16826 #include <string.h>
16830 if { (eval echo "$as_me:16830: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16831 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16833 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16835 cat conftest.err >&5
16836 echo "$as_me:16836: \$? = $ac_status" >&5
16837 (exit "$ac_status"); } >/dev/null; then
16838 if test -s conftest.err; then
16839 ac_cpp_err=$ac_c_preproc_warn_flag
16846 if test -z "$ac_cpp_err"; then
16847 ac_cv_header_stdc=yes
16849 echo "$as_me: failed program was:" >&5
16850 cat "conftest.$ac_ext" >&5
16851 ac_cv_header_stdc=no
16853 rm -f conftest.err "conftest.$ac_ext"
16855 if test $ac_cv_header_stdc = yes; then
16856 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16857 cat >"conftest.$ac_ext" <<_ACEOF
16858 #line 16858 "configure"
16859 #include "confdefs.h"
16860 #include <string.h>
16863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16864 $EGREP "memchr" >/dev/null 2>&1; then
16867 ac_cv_header_stdc=no
16873 if test $ac_cv_header_stdc = yes; then
16874 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16875 cat >"conftest.$ac_ext" <<_ACEOF
16876 #line 16876 "configure"
16877 #include "confdefs.h"
16878 #include <stdlib.h>
16881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16882 $EGREP "free" >/dev/null 2>&1; then
16885 ac_cv_header_stdc=no
16891 if test $ac_cv_header_stdc = yes; then
16892 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16893 if test "$cross_compiling" = yes; then
16896 cat >"conftest.$ac_ext" <<_ACEOF
16897 #line 16897 "configure"
16898 #include "confdefs.h"
16900 #if ((' ' & 0x0FF) == 0x020)
16901 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16902 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16904 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16905 || ('j' <= (c) && (c) <= 'r') \
16906 || ('s' <= (c) && (c) <= 'z'))
16907 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16910 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16915 for (i = 0; i < 256; i++)
16916 if (XOR (islower (i), ISLOWER (i))
16917 || toupper (i) != TOUPPER (i))
16918 $ac_main_return(2);
16919 $ac_main_return (0);
16922 rm -f "conftest$ac_exeext"
16923 if { (eval echo "$as_me:16923: \"$ac_link\"") >&5
16924 (eval $ac_link) 2>&5
16926 echo "$as_me:16926: \$? = $ac_status" >&5
16927 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16928 { (eval echo "$as_me:16928: \"$ac_try\"") >&5
16929 (eval $ac_try) 2>&5
16931 echo "$as_me:16931: \$? = $ac_status" >&5
16932 (exit "$ac_status"); }; }; then
16935 echo "$as_me: program exited with status $ac_status" >&5
16936 echo "$as_me: failed program was:" >&5
16937 cat "conftest.$ac_ext" >&5
16938 ac_cv_header_stdc=no
16940 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16944 echo "$as_me:16944: result: $ac_cv_header_stdc" >&5
16945 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16946 if test $ac_cv_header_stdc = yes; then
16948 cat >>confdefs.h <<\EOF
16949 #define STDC_HEADERS 1
16954 ac_header_dirent=no
16955 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16956 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16957 echo "$as_me:16957: checking for $ac_hdr that defines DIR" >&5
16958 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16960 echo $ECHO_N "(cached) $ECHO_C" >&6
16962 cat >"conftest.$ac_ext" <<_ACEOF
16963 #line 16963 "configure"
16964 #include "confdefs.h"
16965 #include <sys/types.h>
16977 rm -f "conftest.$ac_objext"
16978 if { (eval echo "$as_me:16978: \"$ac_compile\"") >&5
16979 (eval $ac_compile) 2>&5
16981 echo "$as_me:16981: \$? = $ac_status" >&5
16982 (exit "$ac_status"); } &&
16983 { ac_try='test -s "conftest.$ac_objext"'
16984 { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985 (eval $ac_try) 2>&5
16987 echo "$as_me:16987: \$? = $ac_status" >&5
16988 (exit "$ac_status"); }; }; then
16989 eval "$as_ac_Header=yes"
16991 echo "$as_me: failed program was:" >&5
16992 cat "conftest.$ac_ext" >&5
16993 eval "$as_ac_Header=no"
16995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16997 echo "$as_me:16997: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16998 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16999 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17000 cat >>confdefs.h <<EOF
17001 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17004 ac_header_dirent=$ac_hdr; break
17008 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17009 if test $ac_header_dirent = dirent.h; then
17010 echo "$as_me:17010: checking for opendir in -ldir" >&5
17011 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17012 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17013 echo $ECHO_N "(cached) $ECHO_C" >&6
17015 ac_check_lib_save_LIBS=$LIBS
17017 cat >"conftest.$ac_ext" <<_ACEOF
17018 #line 17018 "configure"
17019 #include "confdefs.h"
17021 /* Override any gcc2 internal prototype to avoid an error. */
17025 /* We use char because int might match the return type of a gcc2
17026 builtin and then its argument prototype would still apply. */
17036 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17037 if { (eval echo "$as_me:17037: \"$ac_link\"") >&5
17038 (eval $ac_link) 2>&5
17040 echo "$as_me:17040: \$? = $ac_status" >&5
17041 (exit "$ac_status"); } &&
17042 { ac_try='test -s "conftest$ac_exeext"'
17043 { (eval echo "$as_me:17043: \"$ac_try\"") >&5
17044 (eval $ac_try) 2>&5
17046 echo "$as_me:17046: \$? = $ac_status" >&5
17047 (exit "$ac_status"); }; }; then
17048 ac_cv_lib_dir_opendir=yes
17050 echo "$as_me: failed program was:" >&5
17051 cat "conftest.$ac_ext" >&5
17052 ac_cv_lib_dir_opendir=no
17054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17055 LIBS=$ac_check_lib_save_LIBS
17057 echo "$as_me:17057: result: $ac_cv_lib_dir_opendir" >&5
17058 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17059 if test "$ac_cv_lib_dir_opendir" = yes; then
17064 echo "$as_me:17064: checking for opendir in -lx" >&5
17065 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17066 if test "${ac_cv_lib_x_opendir+set}" = set; then
17067 echo $ECHO_N "(cached) $ECHO_C" >&6
17069 ac_check_lib_save_LIBS=$LIBS
17071 cat >"conftest.$ac_ext" <<_ACEOF
17072 #line 17072 "configure"
17073 #include "confdefs.h"
17075 /* Override any gcc2 internal prototype to avoid an error. */
17079 /* We use char because int might match the return type of a gcc2
17080 builtin and then its argument prototype would still apply. */
17090 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17091 if { (eval echo "$as_me:17091: \"$ac_link\"") >&5
17092 (eval $ac_link) 2>&5
17094 echo "$as_me:17094: \$? = $ac_status" >&5
17095 (exit "$ac_status"); } &&
17096 { ac_try='test -s "conftest$ac_exeext"'
17097 { (eval echo "$as_me:17097: \"$ac_try\"") >&5
17098 (eval $ac_try) 2>&5
17100 echo "$as_me:17100: \$? = $ac_status" >&5
17101 (exit "$ac_status"); }; }; then
17102 ac_cv_lib_x_opendir=yes
17104 echo "$as_me: failed program was:" >&5
17105 cat "conftest.$ac_ext" >&5
17106 ac_cv_lib_x_opendir=no
17108 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17109 LIBS=$ac_check_lib_save_LIBS
17111 echo "$as_me:17111: result: $ac_cv_lib_x_opendir" >&5
17112 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17113 if test "$ac_cv_lib_x_opendir" = yes; then
17119 echo "$as_me:17119: checking whether time.h and sys/time.h may both be included" >&5
17120 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17121 if test "${ac_cv_header_time+set}" = set; then
17122 echo $ECHO_N "(cached) $ECHO_C" >&6
17124 cat >"conftest.$ac_ext" <<_ACEOF
17125 #line 17125 "configure"
17126 #include "confdefs.h"
17127 #include <sys/types.h>
17128 #include <sys/time.h>
17134 if ((struct tm *) 0)
17140 rm -f "conftest.$ac_objext"
17141 if { (eval echo "$as_me:17141: \"$ac_compile\"") >&5
17142 (eval $ac_compile) 2>&5
17144 echo "$as_me:17144: \$? = $ac_status" >&5
17145 (exit "$ac_status"); } &&
17146 { ac_try='test -s "conftest.$ac_objext"'
17147 { (eval echo "$as_me:17147: \"$ac_try\"") >&5
17148 (eval $ac_try) 2>&5
17150 echo "$as_me:17150: \$? = $ac_status" >&5
17151 (exit "$ac_status"); }; }; then
17152 ac_cv_header_time=yes
17154 echo "$as_me: failed program was:" >&5
17155 cat "conftest.$ac_ext" >&5
17156 ac_cv_header_time=no
17158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17160 echo "$as_me:17160: result: $ac_cv_header_time" >&5
17161 echo "${ECHO_T}$ac_cv_header_time" >&6
17162 if test $ac_cv_header_time = yes; then
17164 cat >>confdefs.h <<\EOF
17165 #define TIME_WITH_SYS_TIME 1
17170 ### checks for compiler characteristics
17172 ac_cpp='$CPP $CPPFLAGS'
17173 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17174 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17175 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17176 ac_main_return="return"
17178 echo "$as_me:17178: checking for an ANSI C-conforming const" >&5
17179 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17180 if test "${ac_cv_c_const+set}" = set; then
17181 echo $ECHO_N "(cached) $ECHO_C" >&6
17183 cat >"conftest.$ac_ext" <<_ACEOF
17184 #line 17184 "configure"
17185 #include "confdefs.h"
17190 /* FIXME: Include the comments suggested by Paul. */
17191 #ifndef __cplusplus
17192 /* Ultrix mips cc rejects this. */
17193 typedef int charset[2];
17195 /* SunOS 4.1.1 cc rejects this. */
17196 char const *const *ccp;
17198 /* NEC SVR4.0.2 mips cc rejects this. */
17199 struct point {int x, y;};
17200 static struct point const zero = {0,0};
17201 /* AIX XL C 1.02.0.0 rejects this.
17202 It does not let you subtract one const X* pointer from another in
17203 an arm of an if-expression whose if-part is not a constant
17205 const char *g = "string";
17206 ccp = &g + (g ? g-g : 0);
17207 /* HPUX 7.0 cc rejects these. */
17210 ccp = (char const *const *) p;
17211 { /* SCO 3.2v4 cc rejects this. */
17213 char const *s = 0 ? (char *) 0 : (char const *) 0;
17217 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17218 int x[] = {25, 17};
17219 const int *foo = &x[0];
17222 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17223 typedef const int *iptr;
17227 { /* AIX XL C 1.02.0.0 rejects this saying
17228 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17229 struct s { int j; const int *ap[3]; };
17230 struct s *b; b->j = 5;
17232 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17233 const int foo = 10;
17241 rm -f "conftest.$ac_objext"
17242 if { (eval echo "$as_me:17242: \"$ac_compile\"") >&5
17243 (eval $ac_compile) 2>&5
17245 echo "$as_me:17245: \$? = $ac_status" >&5
17246 (exit "$ac_status"); } &&
17247 { ac_try='test -s "conftest.$ac_objext"'
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
17255 echo "$as_me: failed program was:" >&5
17256 cat "conftest.$ac_ext" >&5
17259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17261 echo "$as_me:17261: result: $ac_cv_c_const" >&5
17262 echo "${ECHO_T}$ac_cv_c_const" >&6
17263 if test $ac_cv_c_const = no; then
17265 cat >>confdefs.h <<\EOF
17271 ### Checks for external-data
17273 echo "$as_me:17273: checking if data-only library module links" >&5
17274 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17275 if test "${cf_cv_link_dataonly+set}" = set; then
17276 echo $ECHO_N "(cached) $ECHO_C" >&6
17280 cat >conftest.$ac_ext <<EOF
17281 #line 17281 "configure"
17282 int testdata[3] = { 123, 456, 789 };
17284 if { (eval echo "$as_me:17284: \"$ac_compile\"") >&5
17285 (eval $ac_compile) 2>&5
17287 echo "$as_me:17287: \$? = $ac_status" >&5
17288 (exit "$ac_status"); } ; then
17289 mv conftest.o data.o && \
17290 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17292 rm -f conftest.$ac_ext data.o
17293 cat >conftest.$ac_ext <<EOF
17294 #line 17294 "configure"
17298 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17300 extern int testdata[3];
17301 return testdata[0] == 123
17302 && testdata[1] == 456
17303 && testdata[2] == 789;
17307 if { (eval echo "$as_me:17307: \"$ac_compile\"") >&5
17308 (eval $ac_compile) 2>&5
17310 echo "$as_me:17310: \$? = $ac_status" >&5
17311 (exit "$ac_status"); }; then
17312 mv conftest.o func.o && \
17313 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17315 rm -f conftest.$ac_ext func.o
17316 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17317 cf_saveLIBS="$LIBS"
17318 LIBS="conftest.a $LIBS"
17319 if test "$cross_compiling" = yes; then
17320 cf_cv_link_dataonly=unknown
17322 cat >"conftest.$ac_ext" <<_ACEOF
17323 #line 17323 "configure"
17324 #include "confdefs.h"
17328 extern int testfunc();
17329 ${cf_cv_main_return:-return} (!testfunc());
17333 rm -f "conftest$ac_exeext"
17334 if { (eval echo "$as_me:17334: \"$ac_link\"") >&5
17335 (eval $ac_link) 2>&5
17337 echo "$as_me:17337: \$? = $ac_status" >&5
17338 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17339 { (eval echo "$as_me:17339: \"$ac_try\"") >&5
17340 (eval $ac_try) 2>&5
17342 echo "$as_me:17342: \$? = $ac_status" >&5
17343 (exit "$ac_status"); }; }; then
17344 cf_cv_link_dataonly=yes
17346 echo "$as_me: program exited with status $ac_status" >&5
17347 echo "$as_me: failed program was:" >&5
17348 cat "conftest.$ac_ext" >&5
17349 cf_cv_link_dataonly=no
17351 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17353 LIBS="$cf_saveLIBS"
17357 echo "$as_me:17357: result: $cf_cv_link_dataonly" >&5
17358 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17360 if test "$cf_cv_link_dataonly" = no ; then
17362 cat >>confdefs.h <<\EOF
17363 #define BROKEN_LINKER 1
17369 ### Checks for library functions.
17375 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17376 echo "$as_me:17376: checking for $ac_header" >&5
17377 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17378 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17379 echo $ECHO_N "(cached) $ECHO_C" >&6
17381 cat >"conftest.$ac_ext" <<_ACEOF
17382 #line 17382 "configure"
17383 #include "confdefs.h"
17384 #include <$ac_header>
17386 if { (eval echo "$as_me:17386: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17387 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17389 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17391 cat conftest.err >&5
17392 echo "$as_me:17392: \$? = $ac_status" >&5
17393 (exit "$ac_status"); } >/dev/null; then
17394 if test -s conftest.err; then
17395 ac_cpp_err=$ac_c_preproc_warn_flag
17402 if test -z "$ac_cpp_err"; then
17403 eval "$as_ac_Header=yes"
17405 echo "$as_me: failed program was:" >&5
17406 cat "conftest.$ac_ext" >&5
17407 eval "$as_ac_Header=no"
17409 rm -f conftest.err "conftest.$ac_ext"
17411 echo "$as_me:17411: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17412 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17413 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17414 cat >>confdefs.h <<EOF
17415 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17421 echo "$as_me:17421: checking for working mkstemp" >&5
17422 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17423 if test "${cf_cv_func_mkstemp+set}" = set; then
17424 echo $ECHO_N "(cached) $ECHO_C" >&6
17428 if test "$cross_compiling" = yes; then
17429 cf_cv_func_mkstemp=maybe
17431 cat >"conftest.$ac_ext" <<_ACEOF
17432 #line 17432 "configure"
17433 #include "confdefs.h"
17435 $ac_includes_default
17439 char *tmpl = "conftestXXXXXX";
17447 for (n = 0; n < 2; ++n) {
17448 strcpy(name[n], tmpl);
17449 if ((fd = mkstemp(name[n])) >= 0) {
17450 if (!strcmp(name[n], tmpl)
17451 || stat(name[n], &sb) != 0
17452 || (sb.st_mode & S_IFMT) != S_IFREG
17453 || (sb.st_mode & 077) != 0) {
17460 && !strcmp(name[0], name[1]))
17462 ${cf_cv_main_return:-return}(result);
17466 rm -f "conftest$ac_exeext"
17467 if { (eval echo "$as_me:17467: \"$ac_link\"") >&5
17468 (eval $ac_link) 2>&5
17470 echo "$as_me:17470: \$? = $ac_status" >&5
17471 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17472 { (eval echo "$as_me:17472: \"$ac_try\"") >&5
17473 (eval $ac_try) 2>&5
17475 echo "$as_me:17475: \$? = $ac_status" >&5
17476 (exit "$ac_status"); }; }; then
17477 cf_cv_func_mkstemp=yes
17480 echo "$as_me: program exited with status $ac_status" >&5
17481 echo "$as_me: failed program was:" >&5
17482 cat "conftest.$ac_ext" >&5
17483 cf_cv_func_mkstemp=no
17486 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17490 echo "$as_me:17490: result: $cf_cv_func_mkstemp" >&5
17491 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17492 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17493 echo "$as_me:17493: checking for mkstemp" >&5
17494 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17495 if test "${ac_cv_func_mkstemp+set}" = set; then
17496 echo $ECHO_N "(cached) $ECHO_C" >&6
17498 cat >"conftest.$ac_ext" <<_ACEOF
17499 #line 17499 "configure"
17500 #include "confdefs.h"
17501 #define mkstemp autoconf_temporary
17502 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17509 /* We use char because int might match the return type of a gcc2
17510 builtin and then its argument prototype would still apply. */
17511 char mkstemp (void);
17517 /* The GNU C library defines stubs for functions which it implements
17518 to always fail with ENOSYS. Some functions are actually named
17519 something starting with __ and the normal name is an alias. */
17520 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17521 #error found stub for mkstemp
17529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17530 if { (eval echo "$as_me:17530: \"$ac_link\"") >&5
17531 (eval $ac_link) 2>&5
17533 echo "$as_me:17533: \$? = $ac_status" >&5
17534 (exit "$ac_status"); } &&
17535 { ac_try='test -s "conftest$ac_exeext"'
17536 { (eval echo "$as_me:17536: \"$ac_try\"") >&5
17537 (eval $ac_try) 2>&5
17539 echo "$as_me:17539: \$? = $ac_status" >&5
17540 (exit "$ac_status"); }; }; then
17541 ac_cv_func_mkstemp=yes
17543 echo "$as_me: failed program was:" >&5
17544 cat "conftest.$ac_ext" >&5
17545 ac_cv_func_mkstemp=no
17547 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17549 echo "$as_me:17549: result: $ac_cv_func_mkstemp" >&5
17550 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17553 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17555 cat >>confdefs.h <<\EOF
17556 #define HAVE_MKSTEMP 1
17561 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17562 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17563 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17567 if test "$cf_with_ada" != "no" ; then
17569 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17572 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17574 unset ac_cv_path_cf_TEMP_gnat
17576 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17577 set dummy $cf_prog_gnat; ac_word=$2
17578 echo "$as_me:17578: checking for $ac_word" >&5
17579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17580 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17581 echo $ECHO_N "(cached) $ECHO_C" >&6
17583 case $cf_TEMP_gnat in
17585 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17588 ac_save_IFS=$IFS; IFS=$ac_path_separator
17590 for ac_dir in $ac_dummy; do
17592 test -z "$ac_dir" && ac_dir=.
17593 if $as_executable_p "$ac_dir/$ac_word"; then
17594 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17595 echo "$as_me:17595: found $ac_dir/$ac_word" >&5
17600 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17604 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17606 if test -n "$cf_TEMP_gnat"; then
17607 echo "$as_me:17607: result: $cf_TEMP_gnat" >&5
17608 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17610 echo "$as_me:17610: result: no" >&5
17611 echo "${ECHO_T}no" >&6
17614 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17616 if test "x$cf_TEMP_gnat" != xno; then
17617 unset cf_cv_gnat_version
17620 echo "$as_me:17620: checking for $cf_prog_gnat version" >&5
17621 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17622 if test "${cf_cv_gnat_version+set}" = set; then
17623 echo $ECHO_N "(cached) $ECHO_C" >&6
17626 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17627 grep '[0-9].[0-9][0-9]*' |\
17628 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17631 echo "$as_me:17631: result: $cf_cv_gnat_version" >&5
17632 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17633 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17634 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17637 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17640 unset cf_cv_gnat_version
17641 unset ac_cv_path_cf_TEMP_gnat
17644 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17646 cf_cv_prog_gnat_correct=no
17648 cf_ada_make=gnatmake
17649 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17650 # gprconfig is newer than gnatmake; we can continue...
17653 rm -rf ./conftest* ./*~conftest*
17654 if mkdir conftest.src
17658 for cf_gprconfig in Ada C
17660 echo "$as_me:17660: checking for gprconfig name for $cf_gprconfig" >&5
17661 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17662 if test "$cf_gprconfig" = C
17664 for cf_gprconfig_param in \
17665 "$cf_gprconfig,,,,GNATGCC" \
17666 "$cf_gprconfig,,,,GCC" \
17669 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17670 test -n "$cf_gprconfig_value" && break
17673 cf_gprconfig_param=$cf_gprconfig
17674 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17676 if test -n "$cf_gprconfig_value"
17678 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17679 echo "$as_me:17679: result: $cf_gprconfig_value" >&5
17680 echo "${ECHO_T}$cf_gprconfig_value" >&6
17682 echo "$as_me:17682: result: missing" >&5
17683 echo "${ECHO_T}missing" >&6
17689 rm -rf ./conftest* ./*~conftest*
17692 if test "x$cf_ada_config" != "x#"
17695 echo "$as_me:17695: checking for gnat version" >&5
17696 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17697 if test "${cf_cv_gnat_version+set}" = set; then
17698 echo $ECHO_N "(cached) $ECHO_C" >&6
17701 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17702 grep '[0-9].[0-9][0-9]*' |\
17703 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17706 echo "$as_me:17706: result: $cf_cv_gnat_version" >&5
17707 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17708 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17710 case "$cf_cv_gnat_version" in
17711 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17712 cf_cv_prog_gnat_correct=yes
17715 { echo "$as_me:17715: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17716 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17717 cf_cv_prog_gnat_correct=no
17721 # Extract the first word of "m4", so it can be a program name with args.
17722 set dummy m4; ac_word=$2
17723 echo "$as_me:17723: checking for $ac_word" >&5
17724 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17725 if test "${ac_cv_prog_M4_exists+set}" = set; then
17726 echo $ECHO_N "(cached) $ECHO_C" >&6
17728 if test -n "$M4_exists"; then
17729 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17731 ac_save_IFS=$IFS; IFS=$ac_path_separator
17733 for ac_dir in $ac_dummy; do
17735 test -z "$ac_dir" && ac_dir=.
17736 $as_executable_p "$ac_dir/$ac_word" || continue
17737 ac_cv_prog_M4_exists="yes"
17738 echo "$as_me:17738: found $ac_dir/$ac_word" >&5
17742 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17745 M4_exists=$ac_cv_prog_M4_exists
17746 if test -n "$M4_exists"; then
17747 echo "$as_me:17747: result: $M4_exists" >&5
17748 echo "${ECHO_T}$M4_exists" >&6
17750 echo "$as_me:17750: result: no" >&5
17751 echo "${ECHO_T}no" >&6
17754 if test "$ac_cv_prog_M4_exists" = no; then
17755 cf_cv_prog_gnat_correct=no
17756 { echo "$as_me:17756: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17757 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17759 if test "$cf_cv_prog_gnat_correct" = yes; then
17760 echo "$as_me:17760: checking if GNAT works" >&5
17761 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17763 rm -rf ./conftest* ./*~conftest*
17764 cat >>conftest.ads <<CF_EOF
17765 procedure conftest;
17767 cat >>conftest.adb <<CF_EOF
17770 procedure conftest is
17772 Text_IO.Put ("Hello World");
17774 GNAT.OS_Lib.OS_Exit (0);
17777 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17778 if ( ./conftest 1>&5 2>&1 ) ; then
17779 cf_cv_prog_gnat_correct=yes
17781 cf_cv_prog_gnat_correct=no
17784 cf_cv_prog_gnat_correct=no
17786 rm -rf ./conftest* ./*~conftest*
17788 echo "$as_me:17788: result: $cf_cv_prog_gnat_correct" >&5
17789 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17792 cf_cv_prog_gnat_correct=no
17796 if test "$cf_cv_prog_gnat_correct" = yes; then
17798 echo "$as_me:17798: checking optimization options for ADAFLAGS" >&5
17799 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17803 ADAFLAGS="$ADAFLAGS -g"
17809 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17811 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17815 echo "$as_me:17815: result: $ADAFLAGS" >&5
17816 echo "${ECHO_T}$ADAFLAGS" >&6
17818 echo "$as_me:17818: checking if GNATPREP supports -T option" >&5
17819 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17820 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17821 echo $ECHO_N "(cached) $ECHO_C" >&6
17824 cf_cv_gnatprep_opt_t=no
17825 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17828 echo "$as_me:17828: result: $cf_cv_gnatprep_opt_t" >&5
17829 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17830 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17832 echo "$as_me:17832: checking if GNAT supports generics" >&5
17833 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17834 case "$cf_cv_gnat_version" in
17835 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17836 cf_gnat_generics=yes
17839 cf_gnat_generics=no
17842 echo "$as_me:17842: result: $cf_gnat_generics" >&5
17843 echo "${ECHO_T}$cf_gnat_generics" >&6
17845 if test "$cf_gnat_generics" = yes
17847 cf_compile_generics=generics
17848 cf_generic_objects="\${GENOBJS}"
17850 cf_compile_generics=
17851 cf_generic_objects=
17854 echo "$as_me:17854: checking if GNAT supports SIGINT" >&5
17855 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17856 if test "${cf_cv_gnat_sigint+set}" = set; then
17857 echo $ECHO_N "(cached) $ECHO_C" >&6
17860 rm -rf ./conftest* ./*~conftest*
17861 cat >>conftest.ads <<CF_EOF
17862 with Ada.Interrupts.Names;
17864 package ConfTest is
17866 pragma Warnings (Off); -- the next pragma exists since 3.11p
17867 pragma Unreserve_All_Interrupts;
17868 pragma Warnings (On);
17870 protected Process is
17872 function Continue return Boolean;
17873 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17875 Done : Boolean := False;
17880 cat >>conftest.adb <<CF_EOF
17881 package body ConfTest is
17882 protected body Process is
17887 function Continue return Boolean is
17894 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17895 cf_cv_gnat_sigint=yes
17897 cf_cv_gnat_sigint=no
17899 rm -rf ./conftest* ./*~conftest*
17902 echo "$as_me:17902: result: $cf_cv_gnat_sigint" >&5
17903 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17905 if test "$cf_cv_gnat_sigint" = yes ; then
17908 USE_GNAT_SIGINT="#"
17911 cf_gnat_libraries=no
17912 cf_gnat_projects=no
17914 if test "$enable_gnat_projects" != no ; then
17915 echo "$as_me:17915: checking if GNAT supports project files" >&5
17916 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17917 case "$cf_cv_gnat_version" in
17921 case "$cf_cv_system_name" in
17925 rm -rf ./conftest* ./*~conftest*
17926 if mkdir conftest.src conftest.bin conftest.lib
17929 rm -rf ./conftest* ./*~conftest*
17930 cat >>library.gpr <<CF_EOF
17932 Kind := External ("LIB_KIND");
17933 for Library_Name use "ConfTest";
17934 for Object_Dir use ".";
17935 for Library_ALI_Dir use External("LIBRARY_DIR");
17936 for Library_Version use External ("SONAME");
17937 for Library_Kind use Kind;
17938 for Library_Dir use External("BUILD_DIR");
17939 Source_Dir := External ("SOURCE_DIR");
17940 for Source_Dirs use (Source_Dir);
17943 cat >>confpackage.ads <<CF_EOF
17944 package ConfPackage is
17945 procedure conftest;
17948 cat >>confpackage.adb <<CF_EOF
17950 package body ConfPackage is
17951 procedure conftest is
17953 Text_IO.Put ("Hello World");
17958 if ( "$cf_ada_make" $ADAFLAGS \
17960 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17961 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17962 -XSOURCE_DIR="`pwd`" \
17963 -XSONAME=libConfTest.so.1 \
17964 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17965 cf_gnat_projects=yes
17969 if test -f conftest.lib/confpackage.ali
17971 cf_gnat_libraries=yes
17973 rm -rf ./conftest* ./*~conftest*
17978 echo "$as_me:17978: result: $cf_gnat_projects" >&5
17979 echo "${ECHO_T}$cf_gnat_projects" >&6
17980 fi # enable_gnat_projects
17982 if test "$cf_gnat_projects" = yes
17984 echo "$as_me:17984: checking if GNAT supports libraries" >&5
17985 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17986 echo "$as_me:17986: result: $cf_gnat_libraries" >&5
17987 echo "${ECHO_T}$cf_gnat_libraries" >&6
17990 USE_OLD_MAKERULES=""
17991 USE_GNAT_PROJECTS="#"
17992 USE_GNAT_MAKE_GPR="#"
17993 USE_GNAT_GPRBUILD="#"
17995 if test "$cf_gnat_projects" = yes
17997 USE_OLD_MAKERULES="#"
17998 USE_GNAT_PROJECTS=""
17999 if test "$cf_cv_VERSION_GPRBUILD" != no
18001 USE_GNAT_GPRBUILD=""
18002 elif test "$cf_cv_VERSION_GNATMAKE" != no
18004 USE_GNAT_MAKE_GPR=""
18006 { echo "$as_me:18006: WARNING: use old makefile rules since tools are missing" >&5
18007 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18011 if test "$cf_gnat_libraries" = yes
18013 USE_GNAT_LIBRARIES=""
18015 USE_GNAT_LIBRARIES="#"
18018 echo "$as_me:18018: checking for ada-compiler" >&5
18019 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18021 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18022 if test "${with_ada_compiler+set}" = set; then
18023 withval="$with_ada_compiler"
18024 cf_ada_compiler=$withval
18026 cf_ada_compiler=gnatmake
18029 echo "$as_me:18029: result: $cf_ada_compiler" >&5
18030 echo "${ECHO_T}$cf_ada_compiler" >&6
18032 cf_ada_package=terminal_interface
18034 echo "$as_me:18034: checking for ada-include" >&5
18035 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18037 # Check whether --with-ada-include or --without-ada-include was given.
18038 if test "${with_ada_include+set}" = set; then
18039 withval="$with_ada_include"
18042 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18043 fi; if test -n "$prefix/share/ada/adainclude" ; then
18045 if test "x$prefix" != xNONE; then
18046 cf_path_syntax="$prefix"
18048 cf_path_syntax="$ac_default_prefix"
18051 case ".$withval" in
18052 (.\$\(*\)*|.\'*\'*)
18056 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18058 (.\$\{*prefix\}*|.\$\{*dir\}*)
18059 eval withval="$withval"
18060 case ".$withval" in
18062 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18067 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18070 { { echo "$as_me:18070: error: expected a pathname, not \"$withval\"" >&5
18071 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18072 { (exit 1); exit 1; }; }
18077 eval ADA_INCLUDE="$withval"
18079 echo "$as_me:18079: result: $ADA_INCLUDE" >&5
18080 echo "${ECHO_T}$ADA_INCLUDE" >&6
18082 echo "$as_me:18082: checking for ada-objects" >&5
18083 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18085 # Check whether --with-ada-objects or --without-ada-objects was given.
18086 if test "${with_ada_objects+set}" = set; then
18087 withval="$with_ada_objects"
18090 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18091 fi; if test -n "$prefix/lib/ada/adalib" ; then
18093 if test "x$prefix" != xNONE; then
18094 cf_path_syntax="$prefix"
18096 cf_path_syntax="$ac_default_prefix"
18099 case ".$withval" in
18100 (.\$\(*\)*|.\'*\'*)
18104 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18106 (.\$\{*prefix\}*|.\$\{*dir\}*)
18107 eval withval="$withval"
18108 case ".$withval" in
18110 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18115 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18118 { { echo "$as_me:18118: error: expected a pathname, not \"$withval\"" >&5
18119 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18120 { (exit 1); exit 1; }; }
18125 eval ADA_OBJECTS="$withval"
18127 echo "$as_me:18127: result: $ADA_OBJECTS" >&5
18128 echo "${ECHO_T}$ADA_OBJECTS" >&6
18130 echo "$as_me:18130: checking if an Ada95 shared-library should be built" >&5
18131 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18133 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18134 if test "${with_ada_sharedlib+set}" = set; then
18135 withval="$with_ada_sharedlib"
18136 with_ada_sharedlib=$withval
18138 with_ada_sharedlib=no
18140 echo "$as_me:18140: result: $with_ada_sharedlib" >&5
18141 echo "${ECHO_T}$with_ada_sharedlib" >&6
18143 if test "x$with_ada_sharedlib" != xno
18145 if test "x$cf_gnat_projects" != xyes
18147 { echo "$as_me:18147: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18148 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18149 with_ada_sharedlib=no
18153 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18154 MAKE_ADA_SHAREDLIB="#"
18156 if test "x$with_ada_sharedlib" != xno
18158 MAKE_ADA_SHAREDLIB=
18159 if test "x$with_ada_sharedlib" != xyes
18161 ADA_SHAREDLIB="$with_ada_sharedlib"
18165 # allow the Ada binding to be renamed
18167 echo "$as_me:18167: checking for ada-libname" >&5
18168 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18170 # Check whether --with-ada-libname or --without-ada-libname was given.
18171 if test "${with_ada_libname+set}" = set; then
18172 withval="$with_ada_libname"
18173 ADA_LIBNAME=$withval
18175 ADA_LIBNAME=AdaCurses
18177 case "x$ADA_LIBNAME" in
18179 ADA_LIBNAME=AdaCurses
18183 echo "$as_me:18183: result: $ADA_LIBNAME" >&5
18184 echo "${ECHO_T}$ADA_LIBNAME" >&6
18187 { { echo "$as_me:18187: error: No usable Ada compiler found" >&5
18188 echo "$as_me: error: No usable Ada compiler found" >&2;}
18189 { (exit 1); exit 1; }; }
18192 { { echo "$as_me:18192: error: The Ada compiler is needed for this package" >&5
18193 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18194 { (exit 1); exit 1; }; }
18197 ################################################################################
18204 ### Construct the list of include-directories to be generated
18206 if test "$srcdir" != "."; then
18207 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18209 CPPFLAGS="-I../include $CPPFLAGS"
18210 if test "$srcdir" != "."; then
18211 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18213 CPPFLAGS="-I. $CPPFLAGS"
18215 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18216 if test "$srcdir" != "."; then
18217 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18219 if test "$GCC" != yes; then
18220 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18221 elif test "$includedir" != "/usr/include"; then
18222 if test "$includedir" = '${prefix}/include' ; then
18223 if test x$prefix != x/usr ; then
18224 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18227 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18231 ### Build up pieces for makefile rules
18232 echo "$as_me:18232: checking default library suffix" >&5
18233 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18235 case $DFT_LWR_MODEL in
18236 (libtool) DFT_ARG_SUFFIX='' ;;
18237 (normal) DFT_ARG_SUFFIX='' ;;
18238 (debug) DFT_ARG_SUFFIX='_g' ;;
18239 (profile) DFT_ARG_SUFFIX='_p' ;;
18240 (shared) DFT_ARG_SUFFIX='' ;;
18242 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18243 echo "$as_me:18243: result: $DFT_ARG_SUFFIX" >&5
18244 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18246 echo "$as_me:18246: checking default library-dependency suffix" >&5
18247 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18249 case X$DFT_LWR_MODEL in
18251 DFT_LIB_SUFFIX='.la'
18252 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18255 case "$cf_cv_system_name" in
18257 DFT_LIB_SUFFIX='_g.lib'
18260 DFT_LIB_SUFFIX='_g.a'
18263 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18266 case "$cf_cv_system_name" in
18268 DFT_LIB_SUFFIX='_p.lib'
18271 DFT_LIB_SUFFIX='_p.a'
18274 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18277 case "$cf_cv_system_name" in
18279 DFT_LIB_SUFFIX='.so'
18280 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18283 DFT_LIB_SUFFIX='.dll'
18284 DFT_DEP_SUFFIX='.dll.lib'
18286 (cygwin*|msys*|mingw*)
18287 DFT_LIB_SUFFIX='.dll'
18288 DFT_DEP_SUFFIX='.dll.a'
18291 DFT_LIB_SUFFIX='.dylib'
18292 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18297 DFT_LIB_SUFFIX='.so'
18298 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18301 DFT_LIB_SUFFIX='.sl'
18302 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18307 DFT_LIB_SUFFIX='.so'
18308 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18315 DFT_LIB_SUFFIX='.lib'
18318 DFT_LIB_SUFFIX='.a'
18321 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18324 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18326 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18327 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18329 echo "$as_me:18329: result: $DFT_DEP_SUFFIX" >&5
18330 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18332 echo "$as_me:18332: checking default object directory" >&5
18333 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18335 case $DFT_LWR_MODEL in
18336 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18337 (normal) DFT_OBJ_SUBDIR='objects' ;;
18338 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18339 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18341 case "$cf_cv_system_name" in
18343 DFT_OBJ_SUBDIR='objects' ;;
18345 DFT_OBJ_SUBDIR='obj_s' ;;
18348 echo "$as_me:18348: result: $DFT_OBJ_SUBDIR" >&5
18349 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18351 ### Set up low-level terminfo dependencies for makefiles.
18353 if test "$DFT_LWR_MODEL" = shared ; then
18354 case $cf_cv_system_name in
18356 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18359 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18364 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18366 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18368 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18370 ### Construct the list of subdirectories for which we'll customize makefiles
18371 ### with the appropriate compile-rules.
18373 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18375 cat >>confdefs.h <<EOF
18376 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18379 ################################################################################
18385 NCURSES_SHLIB2="sh -c"
18387 ADA_SUBDIRS="include gen src doc"
18388 if test "x$cf_with_tests" != "xno" ; then
18389 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18391 for cf_dir in $ADA_SUBDIRS
18393 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18400 # match layout used by make-tar.sh
18401 ADAHTML_DIR=../doc/ada
18403 if test "x$cross_compiling" = xyes ; then
18404 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18406 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18409 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"
18410 ac_config_commands="$ac_config_commands default"
18411 cat >confcache <<\_ACEOF
18412 # This file is a shell script that caches the results of configure
18413 # tests run on this system so they can be shared between configure
18414 # scripts and configure runs, see configure's option --config-cache.
18415 # It is not useful on other systems. If it contains results you don't
18416 # want to keep, you may remove or edit it.
18418 # config.status only pays attention to the cache file if you give it
18419 # the --recheck option to rerun configure.
18421 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18422 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18423 # following values.
18427 # The following way of writing the cache mishandles newlines in values,
18428 # but we know of no workaround that is simple, portable, and efficient.
18429 # So, don't put newlines in cache variables' values.
18430 # Ultrix sh set writes to stderr and can't be redirected directly,
18431 # and sets the high bit in the cache file unless we assign to the vars.
18434 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18436 # `set' does not quote correctly, so add quotes (double-quote
18437 # substitution turns \\\\ into \\, and sed turns \\ into \).
18440 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18443 # `set' quotes correctly as required by POSIX, so do not add quotes.
18445 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18452 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18454 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18456 if cmp -s $cache_file confcache; then :; else
18457 if test -w $cache_file; then
18458 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18459 cat confcache >$cache_file
18461 echo "not updating unwritable cache $cache_file"
18466 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18467 # Let make expand exec_prefix.
18468 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18470 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18471 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18472 # trailing colons and then remove the whole line if VPATH becomes empty
18473 # (actually we leave an empty line to preserve line numbers).
18474 if test "x$srcdir" = x.; then
18475 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18476 s/:*\$(srcdir):*/:/;
18477 s/:*\${srcdir}:*/:/;
18479 s/^\([^=]*=[ ]*\):*/\1/;
18485 DEFS=-DHAVE_CONFIG_H
18487 : "${CONFIG_STATUS=./config.status}"
18488 ac_clean_files_save=$ac_clean_files
18489 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18490 { echo "$as_me:18490: creating $CONFIG_STATUS" >&5
18491 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18492 cat >"$CONFIG_STATUS" <<_ACEOF
18494 # Generated automatically by configure.
18495 # Run this file to recreate the current configuration.
18496 # Compiler output produced by configure, useful for debugging
18497 # configure, is in config.log if it exists.
18499 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18502 SHELL=\${CONFIG_SHELL-$SHELL}
18503 ac_cs_invocation="\$0 \$@"
18505 CLICOLOR_FORCE= GREP_OPTIONS=
18506 unset CLICOLOR_FORCE GREP_OPTIONS
18509 cat >>"$CONFIG_STATUS" <<\_ACEOF
18510 # Be Bourne compatible
18511 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18514 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18518 # Name of the executable.
18519 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18521 if expr a : '\(a\)' >/dev/null 2>&1; then
18527 rm -f conf$$ conf$$.exe conf$$.file
18529 if ln -s conf$$.file conf$$ 2>/dev/null; then
18530 # We could just check for DJGPP; but this test a) works b) is more generic
18531 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18532 if test -f conf$$.exe; then
18533 # Don't use ln at all; we don't have any links
18538 elif ln conf$$.file conf$$ 2>/dev/null; then
18543 rm -f conf$$ conf$$.exe conf$$.file
18545 as_executable_p="test -f"
18547 # Support unset when possible.
18548 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18555 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18556 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18557 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18558 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18559 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18560 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18561 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18562 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18565 # We need space, tab and new line, in precisely that order.
18571 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18577 # Files that config.status was made for.
18578 if test -n "$ac_config_files"; then
18579 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18582 if test -n "$ac_config_headers"; then
18583 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18586 if test -n "$ac_config_links"; then
18587 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18590 if test -n "$ac_config_commands"; then
18591 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18594 cat >>"$CONFIG_STATUS" <<\EOF
18597 \`$as_me' instantiates files from templates according to the
18598 current configuration.
18600 Usage: $0 [OPTIONS] [FILE]...
18602 -h, --help print this help, then exit
18603 -V, --version print version number, then exit
18604 -d, --debug don't remove temporary files
18605 --recheck update $as_me by reconfiguring in the same conditions
18606 --file=FILE[:TEMPLATE]
18607 instantiate the configuration file FILE
18608 --header=FILE[:TEMPLATE]
18609 instantiate the configuration header FILE
18611 Configuration files:
18614 Configuration headers:
18617 Configuration commands:
18620 Report bugs to <dickey@invisible-island.net>."
18623 cat >>"$CONFIG_STATUS" <<EOF
18626 configured by $0, generated by GNU Autoconf 2.52.20230114,
18627 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18629 Copyright 2003-2022,2023 Thomas E. Dickey
18630 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18631 Free Software Foundation, Inc.
18632 This config.status script is free software; the Free Software Foundation
18633 gives unlimited permission to copy, distribute and modify it."
18638 cat >>"$CONFIG_STATUS" <<\EOF
18639 # If no file are specified by the user, then we need to provide default
18640 # value. By we need to know if files were specified by the user.
18646 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18647 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18649 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18653 *) # This is not an option, so the user has probably given explicit
18655 ac_need_defaults=false;;
18659 # Handling of the options.
18661 cat >>"$CONFIG_STATUS" <<EOF
18662 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18663 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18664 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18666 cat >>"$CONFIG_STATUS" <<\EOF
18667 --version | --vers* | -V )
18668 echo "$ac_cs_version"; exit 0 ;;
18670 # Conflict between --help and --header
18671 { { echo "$as_me:18671: error: ambiguous option: $1
18672 Try \`$0 --help' for more information." >&5
18673 echo "$as_me: error: ambiguous option: $1
18674 Try \`$0 --help' for more information." >&2;}
18675 { (exit 1); exit 1; }; };;
18676 --help | --hel | -h )
18677 echo "$ac_cs_usage"; exit 0 ;;
18678 --debug | --d* | -d )
18680 --file | --fil | --fi | --f )
18682 CONFIG_FILES="$CONFIG_FILES $1"
18683 ac_need_defaults=false;;
18684 --header | --heade | --head | --hea )
18686 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18687 ac_need_defaults=false;;
18689 # This is an error.
18690 -*) { { echo "$as_me:18690: error: unrecognized option: $1
18691 Try \`$0 --help' for more information." >&5
18692 echo "$as_me: error: unrecognized option: $1
18693 Try \`$0 --help' for more information." >&2;}
18694 { (exit 1); exit 1; }; } ;;
18696 *) ac_config_targets="$ac_config_targets $1" ;;
18705 ## ----------------------- ##
18706 ## Running config.status. ##
18707 ## ----------------------- ##
18709 This file was extended by $as_me 2.52.20230114, executed with
18710 CONFIG_FILES = $CONFIG_FILES
18711 CONFIG_HEADERS = $CONFIG_HEADERS
18712 CONFIG_LINKS = $CONFIG_LINKS
18713 CONFIG_COMMANDS = $CONFIG_COMMANDS
18714 > "$ac_cs_invocation"
18715 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18720 cat >>"$CONFIG_STATUS" <<EOF
18722 # INIT-COMMANDS section.
18725 ### Special initialization commands, used to pass information from the
18726 ### configuration-run into config.status
18729 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18730 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18731 LIB_NAME="$LIB_NAME"
18732 LIB_PREFIX="$LIB_PREFIX"
18733 LIB_SUFFIX="$LIB_SUFFIX"
18735 NCURSES_MAJOR="$NCURSES_MAJOR"
18736 NCURSES_MINOR="$NCURSES_MINOR"
18737 NCURSES_PATCH="$NCURSES_PATCH"
18739 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18740 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18741 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18742 cf_cv_abi_version="$cf_cv_abi_version"
18743 cf_cv_rel_version="$cf_cv_rel_version"
18744 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18745 cf_cv_shared_soname='$cf_cv_shared_soname'
18746 cf_cv_shlib_version="$cf_cv_shlib_version"
18747 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18748 cf_cv_system_name="$cf_cv_system_name"
18754 cat >>"$CONFIG_STATUS" <<\EOF
18755 for ac_config_target in $ac_config_targets
18757 case "$ac_config_target" in
18758 # Handling of arguments.
18759 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18760 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18761 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18762 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18763 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18764 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18765 *) { { echo "$as_me:18765: error: invalid argument: $ac_config_target" >&5
18766 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18767 { (exit 1); exit 1; }; };;
18771 # If the user did not use the arguments to specify the items to instantiate,
18772 # then the envvar interface is used. Set only those that are not.
18773 # We use the long form for the default assignment because of an extremely
18774 # bizarre bug on SunOS 4.1.3.
18775 if "$ac_need_defaults"; then
18776 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18777 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18778 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18781 # Create a temporary directory, and hook for its removal unless debugging.
18784 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18785 trap '{ (exit 1); exit 1; }' 1 2 13 15
18788 # Create a (secure) tmp directory for tmp files.
18791 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18792 test -n "$tmp" && test -d "$tmp"
18795 tmp=$TMPDIR/cs$$-$RANDOM
18796 (umask 077 && mkdir "$tmp")
18799 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18800 { (exit 1); exit 1; }
18805 cat >>"$CONFIG_STATUS" <<EOF
18808 # CONFIG_FILES section.
18811 # No need to generate the scripts if there are no CONFIG_FILES.
18812 # This happens for instance when ./config.status config.h
18813 if test -n "\$CONFIG_FILES"; then
18814 # Protect against being on the right side of a sed subst in config.status.
18815 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18816 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18817 s,@SHELL@,$SHELL,;t t
18818 s,@exec_prefix@,$exec_prefix,;t t
18819 s,@prefix@,$prefix,;t t
18820 s,@program_transform_name@,$program_transform_name,;t t
18821 s,@bindir@,$bindir,;t t
18822 s,@sbindir@,$sbindir,;t t
18823 s,@libexecdir@,$libexecdir,;t t
18824 s,@datarootdir@,$datarootdir,;t t
18825 s,@datadir@,$datadir,;t t
18826 s,@sysconfdir@,$sysconfdir,;t t
18827 s,@sharedstatedir@,$sharedstatedir,;t t
18828 s,@localstatedir@,$localstatedir,;t t
18829 s,@runstatedir@,$runstatedir,;t t
18830 s,@libdir@,$libdir,;t t
18831 s,@includedir@,$includedir,;t t
18832 s,@oldincludedir@,$oldincludedir,;t t
18833 s,@infodir@,$infodir,;t t
18834 s,@mandir@,$mandir,;t t
18835 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18836 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18837 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18838 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18839 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18840 s,@build_alias@,$build_alias,;t t
18841 s,@host_alias@,$host_alias,;t t
18842 s,@target_alias@,$target_alias,;t t
18843 s,@ECHO_C@,$ECHO_C,;t t
18844 s,@ECHO_N@,$ECHO_N,;t t
18845 s,@ECHO_T@,$ECHO_T,;t t
18846 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18847 s,@DEFS@,$DEFS,;t t
18848 s,@LIBS@,$LIBS,;t t
18849 s,@PACKAGE@,$PACKAGE,;t t
18850 s,@top_builddir@,$top_builddir,;t t
18851 s,@build@,$build,;t t
18852 s,@build_cpu@,$build_cpu,;t t
18853 s,@build_vendor@,$build_vendor,;t t
18854 s,@build_os@,$build_os,;t t
18855 s,@host@,$host,;t t
18856 s,@host_cpu@,$host_cpu,;t t
18857 s,@host_vendor@,$host_vendor,;t t
18858 s,@host_os@,$host_os,;t t
18859 s,@target@,$target,;t t
18860 s,@target_cpu@,$target_cpu,;t t
18861 s,@target_vendor@,$target_vendor,;t t
18862 s,@target_os@,$target_os,;t t
18863 s,@GREP@,$GREP,;t t
18864 s,@FGREP@,$FGREP,;t t
18866 s,@CFLAGS@,$CFLAGS,;t t
18867 s,@LDFLAGS@,$LDFLAGS,;t t
18868 s,@CPPFLAGS@,$CPPFLAGS,;t t
18869 s,@ac_ct_CC@,$ac_ct_CC,;t t
18870 s,@EXEEXT@,$EXEEXT,;t t
18871 s,@OBJEXT@,$OBJEXT,;t t
18872 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18874 s,@EGREP@,$EGREP,;t t
18876 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18877 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18878 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18879 s,@LN_S@,$LN_S,;t t
18880 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18881 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18882 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18883 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18884 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18885 s,@SET_MAKE@,$SET_MAKE,;t t
18886 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18887 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18888 s,@CTAGS@,$CTAGS,;t t
18889 s,@ETAGS@,$ETAGS,;t t
18890 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18891 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18892 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18893 s,@RANLIB@,$RANLIB,;t t
18894 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18896 s,@ac_ct_LD@,$ac_ct_LD,;t t
18898 s,@ac_ct_AR@,$ac_ct_AR,;t t
18899 s,@ARFLAGS@,$ARFLAGS,;t t
18900 s,@DESTDIR@,$DESTDIR,;t t
18901 s,@BUILD_CC@,$BUILD_CC,;t t
18902 s,@BUILD_CPP@,$BUILD_CPP,;t t
18903 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18904 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18905 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18906 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18907 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18908 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18909 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18910 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18911 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18912 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18913 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18914 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18915 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18916 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18917 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18918 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18919 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18920 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18921 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18922 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18923 s,@CC_G_OPT@,$CC_G_OPT,;t t
18924 s,@LD_MODEL@,$LD_MODEL,;t t
18925 s,@shlibdir@,$shlibdir,;t t
18926 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18927 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18928 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18929 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18930 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18931 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18932 s,@LINK_PROGS@,$LINK_PROGS,;t t
18933 s,@LINK_TESTS@,$LINK_TESTS,;t t
18934 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18935 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18936 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18937 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18938 s,@RPATH_LIST@,$RPATH_LIST,;t t
18939 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18940 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18941 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18942 s,@PTHREAD@,$PTHREAD,;t t
18943 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18944 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18945 s,@ECHO_LT@,$ECHO_LT,;t t
18946 s,@ECHO_LD@,$ECHO_LD,;t t
18947 s,@RULE_CC@,$RULE_CC,;t t
18948 s,@SHOW_CC@,$SHOW_CC,;t t
18949 s,@ECHO_CC@,$ECHO_CC,;t t
18950 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18951 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18952 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18953 s,@ADAFLAGS@,$ADAFLAGS,;t t
18954 s,@ADA_TRACE@,$ADA_TRACE,;t t
18955 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18956 s,@M4_exists@,$M4_exists,;t t
18957 s,@cf_ada_make@,$cf_ada_make,;t t
18958 s,@cf_ada_config@,$cf_ada_config,;t t
18959 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18960 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18961 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18962 s,@cf_compile_generics@,$cf_compile_generics,;t t
18963 s,@cf_generic_objects@,$cf_generic_objects,;t t
18964 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18965 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18966 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18967 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18968 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18969 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18970 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18971 s,@cf_ada_package@,$cf_ada_package,;t t
18972 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18973 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18974 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18975 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18976 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18977 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18978 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18979 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18980 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18981 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18982 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18983 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18984 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18985 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18986 s,@TEST_ARG2@,$TEST_ARG2,;t t
18987 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18988 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18989 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18990 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18991 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18992 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18993 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18998 cat >>"$CONFIG_STATUS" <<\EOF
18999 # Split the substitutions into bite-sized pieces for seds with
19000 # small command number limits, like on Digital OSF/1 and HP-UX.
19001 ac_max_sed_lines=48
19002 ac_sed_frag=1 # Number of current file.
19003 ac_beg=1 # First line for current file.
19004 ac_end=$ac_max_sed_lines # Line after last line for current file.
19007 while "$ac_more_lines"; do
19008 if test "$ac_beg" -gt 1; then
19009 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19011 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19013 if test ! -s "$tmp"/subs.frag; then
19014 ac_more_lines=false
19016 # The purpose of the label and of the branching condition is to
19017 # speed up the sed processing (if there are no `@' at all, there
19018 # is no need to browse any of the substitutions).
19019 # These are the two extra sed commands mentioned above.
19021 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19022 # It is possible to make a multiline substitution using escaped newlines.
19023 # Ensure that we do not split the substitution between script fragments.
19025 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19026 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19027 if test -s "$tmp"/subs.next; then
19028 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19029 if test ! -s "$tmp"/subs.edit; then
19030 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19031 if test ! -s "$tmp"/subs.edit; then
19032 if test "$ac_beg" -gt 1; then
19033 ac_end=`expr "$ac_end" - 1`
19040 if test -z "$ac_sed_cmds"; then
19041 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19043 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19045 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19047 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19050 if test -z "$ac_sed_cmds"; then
19053 fi # test -n "$CONFIG_FILES"
19056 cat >>"$CONFIG_STATUS" <<\EOF
19057 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19058 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19060 - | *:- | *:-:* ) # input from stdin
19062 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19063 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19064 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19065 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19066 * ) ac_file_in=$ac_file.in ;;
19069 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19070 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19071 X"$ac_file" : 'X\(//\)[^/]' \| \
19072 X"$ac_file" : 'X\(//\)$' \| \
19073 X"$ac_file" : 'X\(/\)' \| \
19074 . : '\(.\)' 2>/dev/null ||
19076 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19077 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19078 /^X\(\/\/\)$/{ s//\1/; q; }
19079 /^X\(\/\).*/{ s//\1/; q; }
19081 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19082 { case "$ac_dir" in
19083 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19087 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19088 case $as_mkdir_dir in
19089 # Skip DOS drivespec
19090 ?:) as_incr_dir=$as_mkdir_dir ;;
19092 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19093 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19098 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19099 # A "../" for each directory in $ac_dir_suffix.
19100 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19102 ac_dir_suffix= ac_dots=
19107 if test -z "$ac_dots"; then
19110 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19112 [\\/]* | ?:[\\/]* )
19113 ac_srcdir="$srcdir$ac_dir_suffix";
19114 ac_top_srcdir="$srcdir" ;;
19115 *) # Relative path.
19116 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19117 ac_top_srcdir="$ac_dots$srcdir" ;;
19121 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19122 *) ac_INSTALL=$ac_dots$INSTALL ;;
19125 if test x"$ac_file" != x-; then
19126 { echo "$as_me:19126: creating $ac_file" >&5
19127 echo "$as_me: creating $ac_file" >&6;}
19130 # Let's still pretend it is `configure' which instantiates (i.e., don't
19131 # use $as_me), people would be surprised to read:
19132 # /* config.h. Generated automatically by config.status. */
19133 configure_input="Generated automatically from `echo $ac_file_in |
19134 sed 's,.*/,,'` by configure."
19136 # First look for the input files in the build tree, otherwise in the
19138 ac_file_inputs=`IFS=:
19139 for f in $ac_file_in; do
19141 -) echo "$tmp"/stdin ;;
19143 # Absolute (can't be DOS-style, as IFS=:)
19144 test -f "$f" || { { echo "$as_me:19144: error: cannot find input file: $f" >&5
19145 echo "$as_me: error: cannot find input file: $f" >&2;}
19146 { (exit 1); exit 1; }; }
19149 if test -f "$f"; then
19152 elif test -f "$srcdir/$f"; then
19157 { { echo "$as_me:19157: error: cannot find input file: $f" >&5
19158 echo "$as_me: error: cannot find input file: $f" >&2;}
19159 { (exit 1); exit 1; }; }
19162 done` || { (exit 1); exit 1; }
19164 cat >>"$CONFIG_STATUS" <<\EOF
19165 ac_warn_datarootdir=no
19166 if test x"$ac_file" != x-; then
19167 for ac_item in $ac_file_inputs
19169 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19170 if test -n "$ac_seen"; then
19171 ac_used=`grep '@datarootdir@' "$ac_item"`
19172 if test -z "$ac_used"; then
19173 { echo "$as_me:19173: WARNING: datarootdir was used implicitly but not set:
19175 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19177 ac_warn_datarootdir=yes
19180 ac_seen=`grep '${datarootdir}' "$ac_item"`
19181 if test -n "$ac_seen"; then
19182 { echo "$as_me:19182: WARNING: datarootdir was used explicitly but not set:
19184 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19186 ac_warn_datarootdir=yes
19191 if test "x$ac_warn_datarootdir" = xyes; then
19192 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19196 cat >>"$CONFIG_STATUS" <<EOF
19200 cat >>"$CONFIG_STATUS" <<\EOF
19202 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19203 s,@configure_input@,$configure_input,;t t
19204 s,@srcdir@,$ac_srcdir,;t t
19205 s,@top_srcdir@,$ac_top_srcdir,;t t
19206 s,@INSTALL@,$ac_INSTALL,;t t
19207 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19210 : "${FGREP:=grep -F}"
19211 : "${EGREP:=grep -E}"
19212 cat >>"$CONFIG_STATUS" <<EOF
19213 : "\${FGREP:=$FGREP}"
19214 : "\${EGREP:=$EGREP}"
19216 cat >>"$CONFIG_STATUS" <<\EOF
19217 if test x"$ac_file" != x-; then
19218 cp "$tmp/out" "$ac_file"
19220 for ac_name in prefix exec_prefix datarootdir
19222 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19223 if test -n "$ac_seen"; then
19224 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19225 if test -z "$ac_init"; then
19226 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19227 { echo "$as_me:19227: WARNING: Variable $ac_name is used but was not set:
19229 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19234 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19235 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19236 if test -s "$tmp"/out; then
19237 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19238 { echo "$as_me:19238: WARNING: Some variables may not be substituted:
19240 echo "$as_me: WARNING: Some variables may not be substituted:
19250 cat >>"$CONFIG_STATUS" <<\EOF
19253 # CONFIG_HEADER section.
19256 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19257 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19259 # ac_d sets the value in "#define NAME VALUE" lines.
19260 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19261 ac_dB='[ ].*$,\1#\2'
19264 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19265 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19266 ac_iB='\([ ]\),\1#\2define\3'
19269 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19270 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19271 ac_uB='$,\1#\2define\3'
19275 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19276 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19278 - | *:- | *:-:* ) # input from stdin
19280 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19281 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19282 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19283 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19284 * ) ac_file_in=$ac_file.in ;;
19287 test x"$ac_file" != x- && { echo "$as_me:19287: creating $ac_file" >&5
19288 echo "$as_me: creating $ac_file" >&6;}
19290 # First look for the input files in the build tree, otherwise in the
19292 ac_file_inputs=`IFS=:
19293 for f in $ac_file_in; do
19295 -) echo "$tmp"/stdin ;;
19297 # Absolute (can't be DOS-style, as IFS=:)
19298 test -f "$f" || { { echo "$as_me:19298: error: cannot find input file: $f" >&5
19299 echo "$as_me: error: cannot find input file: $f" >&2;}
19300 { (exit 1); exit 1; }; }
19303 if test -f "$f"; then
19306 elif test -f "$srcdir/$f"; then
19311 { { echo "$as_me:19311: error: cannot find input file: $f" >&5
19312 echo "$as_me: error: cannot find input file: $f" >&2;}
19313 { (exit 1); exit 1; }; }
19316 done` || { (exit 1); exit 1; }
19317 # Remove the trailing spaces.
19318 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19322 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19323 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19324 # be either 'cat' or 'sort'.
19325 cat confdefs.h | uniq >conftest.vals
19327 # Break up conftest.vals because some shells have a limit on
19328 # the size of here documents, and old seds have small limits too.
19330 rm -f conftest.tail
19331 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19332 while grep . conftest.vals >/dev/null
19334 # Write chunks of a limited-size here document to conftest.frag.
19335 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19336 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19337 echo 'CEOF' >> "$CONFIG_STATUS"
19338 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19339 rm -f conftest.vals
19340 mv conftest.tail conftest.vals
19342 rm -f conftest.vals
19344 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19346 echo ' cat >> conftest.edit <<CEOF
19347 /@DEFS@/r conftest.frag
19350 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19352 mv "$tmp"/out "$tmp"/in
19353 rm -f conftest.edit conftest.frag
19354 ' >> "$CONFIG_STATUS"
19356 cat >>"$CONFIG_STATUS" <<\EOF
19357 # Let's still pretend it is `configure' which instantiates (i.e., don't
19358 # use $as_me), people would be surprised to read:
19359 # /* config.h. Generated automatically by config.status. */
19360 if test x"$ac_file" = x-; then
19361 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19363 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19365 cat "$tmp"/in >>"$tmp"/config.h
19367 if test x"$ac_file" != x-; then
19368 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19369 { echo "$as_me:19369: $ac_file is unchanged" >&5
19370 echo "$as_me: $ac_file is unchanged" >&6;}
19372 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19373 X"$ac_file" : 'X\(//\)[^/]' \| \
19374 X"$ac_file" : 'X\(//\)$' \| \
19375 X"$ac_file" : 'X\(/\)' \| \
19376 . : '\(.\)' 2>/dev/null ||
19378 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19379 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19380 /^X\(\/\/\)$/{ s//\1/; q; }
19381 /^X\(\/\).*/{ s//\1/; q; }
19383 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19384 { case "$ac_dir" in
19385 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19389 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19390 case $as_mkdir_dir in
19391 # Skip DOS drivespec
19392 ?:) as_incr_dir=$as_mkdir_dir ;;
19394 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19395 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19402 mv "$tmp/config.h" "$ac_file"
19405 cat "$tmp"/config.h
19406 rm -f "$tmp"/config.h
19410 cat >>"$CONFIG_STATUS" <<\EOF
19412 # CONFIG_COMMANDS section.
19414 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19415 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19416 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19420 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19421 if test -z "$USE_OLD_MAKERULES" ; then
19422 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19429 cat >>"$CONFIG_STATUS" <<\EOF
19431 { (exit 0); exit 0; }
19433 chmod +x "$CONFIG_STATUS"
19434 ac_clean_files=$ac_clean_files_save
19436 # configure is writing to config.log, and then calls config.status.
19437 # config.status does its own redirection, appending to config.log.
19438 # Unfortunately, on DOS this fails, as config.log is still kept open
19439 # by configure, so config.status won't be able to write to it; its
19440 # output is simply discarded. So we exec the FD to /dev/null,
19441 # effectively closing config.log, so it can be properly (re)opened and
19442 # appended to by config.status. When coming back to configure, we
19443 # need to make the FD available again.
19444 if test "$no_create" != yes; then
19447 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19449 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19450 # would make configure fail if this is the last instruction.
19451 "$ac_cs_success" || { (exit 1); exit 1; }
19453 ${MAKE:-make} preinstall