2 # From configure.in Revision: 1.91 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230903.
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-strip-program=XX specify program to use when stripping in install
708 --with-pkg-config{=path} enable/disable use of pkg-config
709 --with-pkg-config-libdir=XXX use given directory for installing pc-files
710 --without-tests suppress build with test-programs
711 --enable-mixed-case tic should assume mixed-case filenames
712 --with-install-prefix prefixes actual install-location ($DESTDIR)
713 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
714 --with-build-cc=XXX the build C compiler ($BUILD_CC)
715 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
716 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
717 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
718 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
719 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
720 Options to Specify the Libraries Built/Used:
721 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
722 --with-curses-dir=DIR directory in which (n)curses is installed
723 --enable-widec compile with wide-char/UTF-8 code
724 --with-lib-prefix override library-prefix
725 --with-shlib-version=X Specify rel or abi version for shared libs
726 --enable-rpath-link link sample programs with rpath option
727 Fine-Tuning Your Configuration:
728 --enable-broken_linker compile with broken-linker support code
729 --disable-largefile omit support for large files
730 --with-rcs-ids compile-in RCS identifiers
732 --disable-ext-funcs disable function-extensions
733 --enable-const compile with extra/non-standard const
735 --without-develop disable development options
737 --with-pthread use POSIX thread library
738 --enable-weak-symbols enable weak-symbols for pthreads
739 --enable-reentrant compile with experimental reentrant code
740 --with-wrap-prefix=XXX override prefix used for public variables
741 Testing/development Options:
742 --disable-echo do not display "compiling" commands
743 --enable-warnings test: turn on gcc compiler warnings
744 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
745 --enable-assertions test: turn on generation of assertion code
746 --enable-expanded test: generate functions for certain macros
747 --disable-macros test: use functions rather than macros
748 --with-trace test: add trace() function to all models of ncurses
749 --disable-gnat-projects test: disable GNAT projects even if usable
750 Ada95 Binding Options:
751 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
752 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
753 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
754 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
755 --with-ada-libname=XXX override default Ada library-name
757 Some influential environment variables:
758 CC C compiler command
759 CFLAGS C compiler flags
760 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
761 nonstandard directory <lib dir>
762 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
763 headers in a nonstandard directory <include dir>
766 Use these variables to override the choices made by `configure' or to help
767 it to find libraries and programs with nonstandard names/locations.
772 if test "$ac_init_help" = "recursive"; then
773 # If there are subdirs, report their specific --help.
775 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
777 # A "../" for each directory in /$ac_subdir.
778 ac_dots=`echo "$ac_subdir" |
779 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
782 .) # No --srcdir option. We are building in place.
783 ac_sub_srcdir="$srcdir" ;;
784 [\\/]* | ?:[\\/]* ) # Absolute path.
785 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
787 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
790 # Check for guested configure; otherwise get Cygnus style configure.
791 if test -f "$ac_sub_srcdir/configure.gnu"; then
793 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
794 elif test -f "$ac_sub_srcdir/configure"; then
796 $SHELL "$ac_sub_srcdir/configure" --help=recursive
797 elif test -f "$ac_sub_srcdir/configure.ac" ||
798 test -f "$ac_sub_srcdir/configure.in"; then
800 "$ac_configure" --help
802 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
808 test -n "$ac_init_help" && exit 0
809 if "$ac_init_version"; then
812 Copyright 2003-2022,2023 Thomas E. Dickey
813 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
814 Free Software Foundation, Inc.
815 This configure script is free software; the Free Software Foundation
816 gives unlimited permission to copy, distribute and modify it.
822 This file contains any messages produced by compilers while
823 running configure, to aid debugging if configure makes a mistake.
825 It was created by $as_me, which was
826 generated by GNU Autoconf 2.52.20230903. Invocation command line was
837 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
838 uname -m = `(uname -m) 2>/dev/null || echo unknown`
839 uname -r = `(uname -r) 2>/dev/null || echo unknown`
840 uname -s = `(uname -s) 2>/dev/null || echo unknown`
841 uname -v = `(uname -v) 2>/dev/null || echo unknown`
843 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
844 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
846 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
847 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
848 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
849 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
850 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
851 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
852 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
866 # Keep a trace of the command line.
867 # Strip out --no-create and --no-recursion so they do not pile up.
868 # Also quote any args containing shell meta-characters.
874 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
875 | --no-cr | --no-c) ;;
876 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
877 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
878 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
879 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
880 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
882 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
885 # Get rid of the leading space.
888 # When interrupted or exit'd, cleanup temporary files, and complete
889 # config.log. We remove comments because anyway the quotes in there
890 # would cause problems or look ugly.
892 # Save into config.log some information that might help in debugging.
894 echo "## ----------------- ##" >&5
895 echo "## Cache variables. ##" >&5
896 echo "## ----------------- ##" >&5
898 # The following way of writing the cache mishandles newlines in values,
901 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
904 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
905 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
909 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
913 sed "/^$/d" confdefs.h >conftest.log
914 if test -s conftest.log; then
916 echo "## ------------ ##" >&5
917 echo "## confdefs.h. ##" >&5
918 echo "## ------------ ##" >&5
923 test "$ac_signal" != 0 &&
924 echo "$as_me: caught signal $ac_signal" >&5
925 echo "$as_me: exit $exit_status" >&5
926 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
929 for ac_signal in 1 2 13 15; do
930 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
934 # confdefs.h avoids OS command line length limits that DEFS can exceed.
935 rm -rf conftest* confdefs.h
936 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
939 # Let the site file select an alternate cache file if it wants to.
940 # Prefer explicitly selected file to automatically selected ones.
941 if test -z "$CONFIG_SITE"; then
942 if test "x$prefix" != xNONE; then
943 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
945 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
948 for ac_site_file in $CONFIG_SITE; do
949 if test -r "$ac_site_file"; then
950 { echo "$as_me:950: loading site script $ac_site_file" >&5
951 echo "$as_me: loading site script $ac_site_file" >&6;}
952 cat "$ac_site_file" >&5
957 if test -r "$cache_file"; then
958 # Some versions of bash will fail to source /dev/null (special
959 # files actually), so we avoid doing that.
960 if test -f "$cache_file"; then
961 { echo "$as_me:961: loading cache $cache_file" >&5
962 echo "$as_me: loading cache $cache_file" >&6;}
964 [\\/]* | ?:[\\/]* ) . $cache_file;;
969 { echo "$as_me:969: creating cache $cache_file" >&5
970 echo "$as_me: creating cache $cache_file" >&6;}
974 # Check that the precious variables saved in the cache have kept the same
976 ac_cache_corrupted=false
977 for ac_var in `(set) 2>&1 |
978 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
979 eval ac_old_set=\$ac_cv_env_${ac_var}_set
980 eval ac_new_set=\$ac_env_${ac_var}_set
981 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
982 eval ac_new_val="\$ac_env_${ac_var}_value"
983 case "$ac_old_set,$ac_new_set" in
985 { echo "$as_me:985: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
986 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
987 ac_cache_corrupted=: ;;
989 { echo "$as_me:989: error: \`$ac_var' was not set in the previous run" >&5
990 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
991 ac_cache_corrupted=: ;;
994 if test "x$ac_old_val" != "x$ac_new_val"; then
995 { echo "$as_me:995: error: \`$ac_var' has changed since the previous run:" >&5
996 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
997 { echo "$as_me:997: former value: $ac_old_val" >&5
998 echo "$as_me: former value: $ac_old_val" >&2;}
999 { echo "$as_me:999: current value: $ac_new_val" >&5
1000 echo "$as_me: current value: $ac_new_val" >&2;}
1001 ac_cache_corrupted=:
1004 # Pass precious variables to config.status. It doesn't matter if
1005 # we pass some twice (in addition to the command line arguments).
1006 if test "$ac_new_set" = set; then
1007 case "$ac_new_val" in
1008 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1009 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1010 ac_configure_args="$ac_configure_args '$ac_arg'"
1012 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1017 if "$ac_cache_corrupted"; then
1018 { echo "$as_me:1018: error: changes in the environment can compromise the build" >&5
1019 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1020 { { echo "$as_me:1020: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1021 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1022 { (exit 1); exit 1; }; }
1026 ac_cpp='$CPP $CPPFLAGS'
1027 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1028 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1030 ac_main_return="return"
1032 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1034 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1046 echo "#! $SHELL" >conftest.sh
1047 echo "exit 0" >>conftest.sh
1048 chmod +x conftest.sh
1049 if { (echo "$as_me:1049: PATH=\".;.\"; conftest.sh") >&5
1050 (PATH=".;."; conftest.sh) 2>&5
1052 echo "$as_me:1052: \$? = $ac_status" >&5
1053 (exit "$ac_status"); }; then
1054 ac_path_separator=';'
1058 PATH_SEPARATOR="$ac_path_separator"
1061 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1068 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1069 if test -f "$ac_dir/install-sh"; then
1071 ac_install_sh="$ac_aux_dir/install-sh -c"
1073 elif test -f "$ac_dir/install.sh"; then
1075 ac_install_sh="$ac_aux_dir/install.sh -c"
1077 elif test -f "$ac_dir/shtool"; then
1079 ac_install_sh="$ac_aux_dir/shtool install -c"
1083 if test -z "$ac_aux_dir"; then
1084 { { echo "$as_me:1084: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1085 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1086 { (exit 1); exit 1; }; }
1088 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1089 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1090 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1092 # Make sure we can run config.sub.
1093 $ac_config_sub sun4 >/dev/null 2>&1 ||
1094 { { echo "$as_me:1094: error: cannot run $ac_config_sub" >&5
1095 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1096 { (exit 1); exit 1; }; }
1098 echo "$as_me:1098: checking build system type" >&5
1099 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1100 if test "${ac_cv_build+set}" = set; then
1101 echo $ECHO_N "(cached) $ECHO_C" >&6
1103 ac_cv_build_alias=$build_alias
1104 test -z "$ac_cv_build_alias" &&
1105 ac_cv_build_alias=`$ac_config_guess`
1106 test -z "$ac_cv_build_alias" &&
1107 { { echo "$as_me:1107: error: cannot guess build type; you must specify one" >&5
1108 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1109 { (exit 1); exit 1; }; }
1110 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1111 { { echo "$as_me:1111: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1112 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1113 { (exit 1); exit 1; }; }
1116 echo "$as_me:1116: result: $ac_cv_build" >&5
1117 echo "${ECHO_T}$ac_cv_build" >&6
1119 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1120 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1121 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123 echo "$as_me:1123: checking host system type" >&5
1124 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1125 if test "${ac_cv_host+set}" = set; then
1126 echo $ECHO_N "(cached) $ECHO_C" >&6
1128 ac_cv_host_alias=$host_alias
1129 test -z "$ac_cv_host_alias" &&
1130 ac_cv_host_alias=$ac_cv_build_alias
1131 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1132 { { echo "$as_me:1132: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1133 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1134 { (exit 1); exit 1; }; }
1137 echo "$as_me:1137: result: $ac_cv_host" >&5
1138 echo "${ECHO_T}$ac_cv_host" >&6
1140 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1141 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1142 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1144 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1145 echo "$as_me:1145: checking target system type" >&5
1146 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1147 if test "${ac_cv_target+set}" = set; then
1148 echo $ECHO_N "(cached) $ECHO_C" >&6
1150 ac_cv_target_alias=$target_alias
1151 test "x$ac_cv_target_alias" = "x" &&
1152 ac_cv_target_alias=$ac_cv_host_alias
1153 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1154 { { echo "$as_me:1154: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1155 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1156 { (exit 1); exit 1; }; }
1159 echo "$as_me:1159: result: $ac_cv_target" >&5
1160 echo "${ECHO_T}$ac_cv_target" >&6
1161 target=$ac_cv_target
1162 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1163 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1164 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1166 # The aliases save the names the user supplied, while $host etc.
1167 # will get canonicalized.
1168 test -n "$target_alias" &&
1169 test "$program_prefix$program_suffix$program_transform_name" = \
1171 program_prefix=${target_alias}-
1172 system_name="$host_os"
1174 system_name="`(uname -s -r) 2>/dev/null`"
1175 if test -z "$system_name" ; then
1176 system_name="`(hostname) 2>/dev/null`"
1179 test -n "$system_name" &&
1180 cat >>confdefs.h <<EOF
1181 #define SYSTEM_NAME "$system_name"
1184 if test "${cf_cv_system_name+set}" = set; then
1185 echo $ECHO_N "(cached) $ECHO_C" >&6
1187 cf_cv_system_name="$system_name"
1190 test -z "$system_name" && system_name="$cf_cv_system_name"
1191 test -n "$cf_cv_system_name" && echo "$as_me:1191: result: Configuring for $cf_cv_system_name" >&5
1192 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1194 if test ".$system_name" != ".$cf_cv_system_name" ; then
1195 echo "$as_me:1195: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1196 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1197 { { echo "$as_me:1197: error: \"Please remove config.cache and try again.\"" >&5
1198 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1199 { (exit 1); exit 1; }; }
1202 # Check whether --with-system-type or --without-system-type was given.
1203 if test "${with_system_type+set}" = set; then
1204 withval="$with_system_type"
1205 { echo "$as_me:1205: WARNING: overriding system type to $withval" >&5
1206 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1207 cf_cv_system_name=$withval
1212 ### Save the given $CFLAGS to allow user-override.
1213 cf_user_CFLAGS="$CFLAGS"
1215 ### Default install-location
1216 for ac_prog in ggrep grep
1218 # Extract the first word of "$ac_prog", so it can be a program name with args.
1219 set dummy $ac_prog; ac_word=$2
1220 echo "$as_me:1220: checking for $ac_word" >&5
1221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1222 if test "${ac_cv_prog_GREP+set}" = set; then
1223 echo $ECHO_N "(cached) $ECHO_C" >&6
1225 if test -n "$GREP"; then
1226 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1228 ac_save_IFS=$IFS; IFS=$ac_path_separator
1230 for ac_dir in $ac_dummy; do
1232 test -z "$ac_dir" && ac_dir=.
1233 $as_executable_p "$ac_dir/$ac_word" || continue
1234 ac_cv_prog_GREP="$ac_prog"
1235 echo "$as_me:1235: found $ac_dir/$ac_word" >&5
1241 GREP=$ac_cv_prog_GREP
1242 if test -n "$GREP"; then
1243 echo "$as_me:1243: result: $GREP" >&5
1244 echo "${ECHO_T}$GREP" >&6
1246 echo "$as_me:1246: result: no" >&5
1247 echo "${ECHO_T}no" >&6
1250 test -n "$GREP" && break
1252 test -n "$GREP" || GREP=": "
1254 echo "$as_me:1254: checking for fgrep" >&5
1255 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1256 if test "${ac_cv_path_FGREP+set}" = set; then
1257 echo $ECHO_N "(cached) $ECHO_C" >&6
1259 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1260 then ac_cv_path_FGREP="$GREP -F"
1262 for ac_prog in gfgrep fgrep
1264 # Extract the first word of "$ac_prog", so it can be a program name with args.
1265 set dummy $ac_prog; ac_word=$2
1266 echo "$as_me:1266: checking for $ac_word" >&5
1267 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1268 if test "${ac_cv_path_FGREP+set}" = set; then
1269 echo $ECHO_N "(cached) $ECHO_C" >&6
1273 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1276 ac_save_IFS=$IFS; IFS=$ac_path_separator
1278 for ac_dir in $ac_dummy; do
1280 test -z "$ac_dir" && ac_dir=.
1281 if $as_executable_p "$ac_dir/$ac_word"; then
1282 ac_cv_path_FGREP="$ac_dir/$ac_word"
1283 echo "$as_me:1283: found $ac_dir/$ac_word" >&5
1291 FGREP=$ac_cv_path_FGREP
1293 if test -n "$FGREP"; then
1294 echo "$as_me:1294: result: $FGREP" >&5
1295 echo "${ECHO_T}$FGREP" >&6
1297 echo "$as_me:1297: result: no" >&5
1298 echo "${ECHO_T}no" >&6
1301 test -n "$FGREP" && break
1303 test -n "$FGREP" || FGREP=": "
1305 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1305: error: cannot find workable fgrep" >&5
1306 echo "$as_me: error: cannot find workable fgrep" >&2;}
1307 { (exit 1); exit 1; }; }
1310 echo "$as_me:1310: result: $ac_cv_path_FGREP" >&5
1311 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1312 FGREP="$ac_cv_path_FGREP"
1314 echo "$as_me:1314: checking for prefix" >&5
1315 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1316 if test "x$prefix" = "xNONE" ; then
1317 case "$cf_cv_system_name" in
1318 # non-vendor systems don't have a conflict
1319 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1322 (*) prefix=$ac_default_prefix
1326 echo "$as_me:1326: result: $prefix" >&5
1327 echo "${ECHO_T}$prefix" >&6
1329 if test "x$prefix" = "xNONE" ; then
1330 echo "$as_me:1330: checking for default include-directory" >&5
1331 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1332 test -n "$verbose" && echo 1>&6
1335 "$includedir/ncurses" \
1337 "$prefix/include/ncurses" \
1338 /usr/local/include \
1339 /usr/local/include/ncurses \
1341 /usr/include/ncurses
1343 cf_dir=`eval echo "$cf_symbol"`
1344 if test -f "$cf_dir/curses.h" ; then
1345 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1346 includedir="$cf_symbol"
1347 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1351 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1353 echo "$as_me:1353: result: $includedir" >&5
1354 echo "${ECHO_T}$includedir" >&6
1357 ### Checks for programs.
1360 ac_cpp='$CPP $CPPFLAGS'
1361 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1362 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1363 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1364 ac_main_return="return"
1365 if test -n "$ac_tool_prefix"; then
1366 for ac_prog in gnatgcc gcc cc
1368 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1369 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1370 echo "$as_me:1370: checking for $ac_word" >&5
1371 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1372 if test "${ac_cv_prog_CC+set}" = set; then
1373 echo $ECHO_N "(cached) $ECHO_C" >&6
1375 if test -n "$CC"; then
1376 ac_cv_prog_CC="$CC" # Let the user override the test.
1378 ac_save_IFS=$IFS; IFS=$ac_path_separator
1380 for ac_dir in $ac_dummy; do
1382 test -z "$ac_dir" && ac_dir=.
1383 $as_executable_p "$ac_dir/$ac_word" || continue
1384 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1385 echo "$as_me:1385: found $ac_dir/$ac_word" >&5
1392 if test -n "$CC"; then
1393 echo "$as_me:1393: result: $CC" >&5
1394 echo "${ECHO_T}$CC" >&6
1396 echo "$as_me:1396: result: no" >&5
1397 echo "${ECHO_T}no" >&6
1400 test -n "$CC" && break
1403 if test -z "$CC"; then
1405 for ac_prog in gnatgcc gcc cc
1407 # Extract the first word of "$ac_prog", so it can be a program name with args.
1408 set dummy $ac_prog; ac_word=$2
1409 echo "$as_me:1409: checking for $ac_word" >&5
1410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1411 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1412 echo $ECHO_N "(cached) $ECHO_C" >&6
1414 if test -n "$ac_ct_CC"; then
1415 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1417 ac_save_IFS=$IFS; IFS=$ac_path_separator
1419 for ac_dir in $ac_dummy; do
1421 test -z "$ac_dir" && ac_dir=.
1422 $as_executable_p "$ac_dir/$ac_word" || continue
1423 ac_cv_prog_ac_ct_CC="$ac_prog"
1424 echo "$as_me:1424: found $ac_dir/$ac_word" >&5
1430 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1431 if test -n "$ac_ct_CC"; then
1432 echo "$as_me:1432: result: $ac_ct_CC" >&5
1433 echo "${ECHO_T}$ac_ct_CC" >&6
1435 echo "$as_me:1435: result: no" >&5
1436 echo "${ECHO_T}no" >&6
1439 test -n "$ac_ct_CC" && break
1445 test -z "$CC" && { { echo "$as_me:1445: error: no acceptable cc found in \$PATH" >&5
1446 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1447 { (exit 1); exit 1; }; }
1449 # Provide some information about the compiler.
1450 echo "$as_me:1450:" \
1451 "checking for C compiler version" >&5
1452 ac_compiler=`set X $ac_compile; echo "$2"`
1453 { (eval echo "$as_me:1453: \"$ac_compiler --version </dev/null >&5\"") >&5
1454 (eval $ac_compiler --version </dev/null >&5) 2>&5
1456 echo "$as_me:1456: \$? = $ac_status" >&5
1457 (exit "$ac_status"); }
1458 { (eval echo "$as_me:1458: \"$ac_compiler -v </dev/null >&5\"") >&5
1459 (eval $ac_compiler -v </dev/null >&5) 2>&5
1461 echo "$as_me:1461: \$? = $ac_status" >&5
1462 (exit "$ac_status"); }
1463 { (eval echo "$as_me:1463: \"$ac_compiler -V </dev/null >&5\"") >&5
1464 (eval $ac_compiler -V </dev/null >&5) 2>&5
1466 echo "$as_me:1466: \$? = $ac_status" >&5
1467 (exit "$ac_status"); }
1469 cat >"conftest.$ac_ext" <<_ACEOF
1470 #line 1470 "configure"
1471 #include "confdefs.h"
1481 ac_clean_files_save=$ac_clean_files
1482 ac_clean_files="$ac_clean_files a.out a.exe"
1483 # Try to create an executable without -o first, disregard a.out.
1484 # It will help us diagnose broken compilers, and finding out an intuition
1486 echo "$as_me:1486: checking for C compiler default output" >&5
1487 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1488 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1489 if { (eval echo "$as_me:1489: \"$ac_link_default\"") >&5
1490 (eval $ac_link_default) 2>&5
1492 echo "$as_me:1492: \$? = $ac_status" >&5
1493 (exit "$ac_status"); }; then
1494 # Find the output, starting from the most likely. This scheme is
1495 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1497 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1498 ls a.out conftest 2>/dev/null;
1499 ls a.* conftest.* 2>/dev/null`; do
1501 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1502 a.out ) # We found the default executable, but exeext='' is most
1505 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1506 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1513 echo "$as_me: failed program was:" >&5
1514 cat "conftest.$ac_ext" >&5
1515 { { echo "$as_me:1515: error: C compiler cannot create executables" >&5
1516 echo "$as_me: error: C compiler cannot create executables" >&2;}
1517 { (exit 77); exit 77; }; }
1520 ac_exeext=$ac_cv_exeext
1521 echo "$as_me:1521: result: $ac_file" >&5
1522 echo "${ECHO_T}$ac_file" >&6
1524 # Check the compiler produces executables we can run. If not, either
1525 # the compiler is broken, or we cross compile.
1526 echo "$as_me:1526: checking whether the C compiler works" >&5
1527 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1528 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1529 # If not cross compiling, check that we can run a simple program.
1530 if test "$cross_compiling" != yes; then
1531 if { ac_try='./$ac_file'
1532 { (eval echo "$as_me:1532: \"$ac_try\"") >&5
1535 echo "$as_me:1535: \$? = $ac_status" >&5
1536 (exit "$ac_status"); }; }; then
1539 if test "$cross_compiling" = maybe; then
1542 { { echo "$as_me:1542: error: cannot run C compiled programs.
1543 If you meant to cross compile, use \`--host'." >&5
1544 echo "$as_me: error: cannot run C compiled programs.
1545 If you meant to cross compile, use \`--host'." >&2;}
1546 { (exit 1); exit 1; }; }
1550 echo "$as_me:1550: result: yes" >&5
1551 echo "${ECHO_T}yes" >&6
1553 rm -f a.out a.exe "conftest$ac_cv_exeext"
1554 ac_clean_files=$ac_clean_files_save
1555 # Check the compiler produces executables we can run. If not, either
1556 # the compiler is broken, or we cross compile.
1557 echo "$as_me:1557: checking whether we are cross compiling" >&5
1558 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1559 echo "$as_me:1559: result: $cross_compiling" >&5
1560 echo "${ECHO_T}$cross_compiling" >&6
1562 echo "$as_me:1562: checking for executable suffix" >&5
1563 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1564 if { (eval echo "$as_me:1564: \"$ac_link\"") >&5
1565 (eval $ac_link) 2>&5
1567 echo "$as_me:1567: \$? = $ac_status" >&5
1568 (exit "$ac_status"); }; then
1569 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1570 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1571 # work properly (i.e., refer to `conftest.exe'), while it won't with
1573 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1575 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1576 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1583 { { echo "$as_me:1583: error: cannot compute EXEEXT: cannot compile and link" >&5
1584 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1585 { (exit 1); exit 1; }; }
1588 rm -f "conftest$ac_cv_exeext"
1589 echo "$as_me:1589: result: $ac_cv_exeext" >&5
1590 echo "${ECHO_T}$ac_cv_exeext" >&6
1592 rm -f "conftest.$ac_ext"
1593 EXEEXT=$ac_cv_exeext
1595 echo "$as_me:1595: checking for object suffix" >&5
1596 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1597 if test "${ac_cv_objext+set}" = set; then
1598 echo $ECHO_N "(cached) $ECHO_C" >&6
1600 cat >"conftest.$ac_ext" <<_ACEOF
1601 #line 1601 "configure"
1602 #include "confdefs.h"
1612 rm -f conftest.o conftest.obj
1613 if { (eval echo "$as_me:1613: \"$ac_compile\"") >&5
1614 (eval $ac_compile) 2>&5
1616 echo "$as_me:1616: \$? = $ac_status" >&5
1617 (exit "$ac_status"); }; then
1618 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1620 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1621 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1626 echo "$as_me: failed program was:" >&5
1627 cat "conftest.$ac_ext" >&5
1628 { { echo "$as_me:1628: error: cannot compute OBJEXT: cannot compile" >&5
1629 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1630 { (exit 1); exit 1; }; }
1633 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1635 echo "$as_me:1635: result: $ac_cv_objext" >&5
1636 echo "${ECHO_T}$ac_cv_objext" >&6
1637 OBJEXT=$ac_cv_objext
1639 echo "$as_me:1639: checking whether we are using the GNU C compiler" >&5
1640 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1641 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1642 echo $ECHO_N "(cached) $ECHO_C" >&6
1644 cat >"conftest.$ac_ext" <<_ACEOF
1645 #line 1645 "configure"
1646 #include "confdefs.h"
1659 rm -f "conftest.$ac_objext"
1660 if { (eval echo "$as_me:1660: \"$ac_compile\"") >&5
1661 (eval $ac_compile) 2>&5
1663 echo "$as_me:1663: \$? = $ac_status" >&5
1664 (exit "$ac_status"); } &&
1665 { ac_try='test -s "conftest.$ac_objext"'
1666 { (eval echo "$as_me:1666: \"$ac_try\"") >&5
1669 echo "$as_me:1669: \$? = $ac_status" >&5
1670 (exit "$ac_status"); }; }; then
1673 echo "$as_me: failed program was:" >&5
1674 cat "conftest.$ac_ext" >&5
1677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1678 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1681 echo "$as_me:1681: result: $ac_cv_c_compiler_gnu" >&5
1682 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1683 GCC=`test $ac_compiler_gnu = yes && echo yes`
1684 ac_test_CFLAGS=${CFLAGS+set}
1685 ac_save_CFLAGS=$CFLAGS
1687 echo "$as_me:1687: checking whether $CC accepts -g" >&5
1688 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1689 if test "${ac_cv_prog_cc_g+set}" = set; then
1690 echo $ECHO_N "(cached) $ECHO_C" >&6
1692 cat >"conftest.$ac_ext" <<_ACEOF
1693 #line 1693 "configure"
1694 #include "confdefs.h"
1704 rm -f "conftest.$ac_objext"
1705 if { (eval echo "$as_me:1705: \"$ac_compile\"") >&5
1706 (eval $ac_compile) 2>&5
1708 echo "$as_me:1708: \$? = $ac_status" >&5
1709 (exit "$ac_status"); } &&
1710 { ac_try='test -s "conftest.$ac_objext"'
1711 { (eval echo "$as_me:1711: \"$ac_try\"") >&5
1714 echo "$as_me:1714: \$? = $ac_status" >&5
1715 (exit "$ac_status"); }; }; then
1718 echo "$as_me: failed program was:" >&5
1719 cat "conftest.$ac_ext" >&5
1722 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1724 echo "$as_me:1724: result: $ac_cv_prog_cc_g" >&5
1725 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1726 if test "$ac_test_CFLAGS" = set; then
1727 CFLAGS=$ac_save_CFLAGS
1728 elif test $ac_cv_prog_cc_g = yes; then
1729 if test "$GCC" = yes; then
1735 if test "$GCC" = yes; then
1741 # Some people use a C++ compiler to compile C. Since we use `exit',
1742 # in C++ we need to declare it. In case someone uses the same compiler
1743 # for both compiling C and C++ we need to have the C++ compiler decide
1744 # the declaration of exit, since it's the most demanding environment.
1745 cat >"conftest.$ac_ext" <<_ACEOF
1750 rm -f "conftest.$ac_objext"
1751 if { (eval echo "$as_me:1751: \"$ac_compile\"") >&5
1752 (eval $ac_compile) 2>&5
1754 echo "$as_me:1754: \$? = $ac_status" >&5
1755 (exit "$ac_status"); } &&
1756 { ac_try='test -s "conftest.$ac_objext"'
1757 { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1760 echo "$as_me:1760: \$? = $ac_status" >&5
1761 (exit "$ac_status"); }; }; then
1762 for ac_declaration in \
1764 '#include <stdlib.h>' \
1765 'extern "C" void std::exit (int) throw (); using std::exit;' \
1766 'extern "C" void std::exit (int); using std::exit;' \
1767 'extern "C" void exit (int) throw ();' \
1768 'extern "C" void exit (int);' \
1771 cat >"conftest.$ac_ext" <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1784 rm -f "conftest.$ac_objext"
1785 if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
1786 (eval $ac_compile) 2>&5
1788 echo "$as_me:1788: \$? = $ac_status" >&5
1789 (exit "$ac_status"); } &&
1790 { ac_try='test -s "conftest.$ac_objext"'
1791 { (eval echo "$as_me:1791: \"$ac_try\"") >&5
1794 echo "$as_me:1794: \$? = $ac_status" >&5
1795 (exit "$ac_status"); }; }; then
1798 echo "$as_me: failed program was:" >&5
1799 cat "conftest.$ac_ext" >&5
1802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1803 cat >"conftest.$ac_ext" <<_ACEOF
1804 #line 1804 "configure"
1805 #include "confdefs.h"
1815 rm -f "conftest.$ac_objext"
1816 if { (eval echo "$as_me:1816: \"$ac_compile\"") >&5
1817 (eval $ac_compile) 2>&5
1819 echo "$as_me:1819: \$? = $ac_status" >&5
1820 (exit "$ac_status"); } &&
1821 { ac_try='test -s "conftest.$ac_objext"'
1822 { (eval echo "$as_me:1822: \"$ac_try\"") >&5
1825 echo "$as_me:1825: \$? = $ac_status" >&5
1826 (exit "$ac_status"); }; }; then
1829 echo "$as_me: failed program was:" >&5
1830 cat "conftest.$ac_ext" >&5
1832 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1835 if test -n "$ac_declaration"; then
1836 echo '#ifdef __cplusplus' >>confdefs.h
1837 echo "$ac_declaration" >>confdefs.h
1838 echo '#endif' >>confdefs.h
1842 echo "$as_me: failed program was:" >&5
1843 cat "conftest.$ac_ext" >&5
1845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1847 ac_cpp='$CPP $CPPFLAGS'
1848 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1849 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1851 ac_main_return="return"
1854 if test "$GCC" = yes ; then
1855 echo "$as_me:1855: checking version of $CC" >&5
1856 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1857 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1858 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1859 echo "$as_me:1859: result: $GCC_VERSION" >&5
1860 echo "${ECHO_T}$GCC_VERSION" >&6
1865 if test "$GCC" = yes ; then
1868 echo "$as_me:1868: checking if this is really Intel C compiler" >&5
1869 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1870 cf_save_CFLAGS="$CFLAGS"
1871 CFLAGS="$CFLAGS -no-gcc"
1872 cat >"conftest.$ac_ext" <<_ACEOF
1873 #line 1873 "configure"
1874 #include "confdefs.h"
1880 #ifdef __INTEL_COMPILER
1882 #error __INTEL_COMPILER is not defined
1889 rm -f "conftest.$ac_objext"
1890 if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5
1891 (eval $ac_compile) 2>&5
1893 echo "$as_me:1893: \$? = $ac_status" >&5
1894 (exit "$ac_status"); } &&
1895 { ac_try='test -s "conftest.$ac_objext"'
1896 { (eval echo "$as_me:1896: \"$ac_try\"") >&5
1899 echo "$as_me:1899: \$? = $ac_status" >&5
1900 (exit "$ac_status"); }; }; then
1902 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1905 echo "$as_me: failed program was:" >&5
1906 cat "conftest.$ac_ext" >&5
1908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1909 CFLAGS="$cf_save_CFLAGS"
1910 echo "$as_me:1910: result: $INTEL_COMPILER" >&5
1911 echo "${ECHO_T}$INTEL_COMPILER" >&6
1918 if test "$GCC" = yes ; then
1919 echo "$as_me:1919: checking if this is really Clang C compiler" >&5
1920 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1921 cf_save_CFLAGS="$CFLAGS"
1922 cat >"conftest.$ac_ext" <<_ACEOF
1923 #line 1923 "configure"
1924 #include "confdefs.h"
1932 #error __clang__ is not defined
1939 rm -f "conftest.$ac_objext"
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941 (eval $ac_compile) 2>&5
1943 echo "$as_me:1943: \$? = $ac_status" >&5
1944 (exit "$ac_status"); } &&
1945 { ac_try='test -s "conftest.$ac_objext"'
1946 { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1949 echo "$as_me:1949: \$? = $ac_status" >&5
1950 (exit "$ac_status"); }; }; then
1954 echo "$as_me: failed program was:" >&5
1955 cat "conftest.$ac_ext" >&5
1957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1958 CFLAGS="$cf_save_CFLAGS"
1959 echo "$as_me:1959: result: $CLANG_COMPILER" >&5
1960 echo "${ECHO_T}$CLANG_COMPILER" >&6
1965 if test "x$CLANG_COMPILER" = "xyes" ; then
1967 (c[1-9][0-9]|*/c[1-9][0-9])
1968 { echo "$as_me:1968: WARNING: replacing broken compiler alias $CC" >&5
1969 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1970 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1975 echo "$as_me:1975: checking version of $CC" >&5
1976 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1977 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.].*//'`"
1978 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1979 echo "$as_me:1979: result: $CLANG_VERSION" >&5
1980 echo "${ECHO_T}$CLANG_VERSION" >&6
1982 for cf_clang_opt in \
1983 -Qunused-arguments \
1984 -Wno-error=implicit-function-declaration
1986 echo "$as_me:1986: checking if option $cf_clang_opt works" >&5
1987 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1988 cf_save_CFLAGS="$CFLAGS"
1989 CFLAGS="$CFLAGS $cf_clang_opt"
1990 cat >"conftest.$ac_ext" <<_ACEOF
1991 #line 1991 "configure"
1992 #include "confdefs.h"
1999 printf("hello!\\n");
2004 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2005 if { (eval echo "$as_me:2005: \"$ac_link\"") >&5
2006 (eval $ac_link) 2>&5
2008 echo "$as_me:2008: \$? = $ac_status" >&5
2009 (exit "$ac_status"); } &&
2010 { ac_try='test -s "conftest$ac_exeext"'
2011 { (eval echo "$as_me:2011: \"$ac_try\"") >&5
2014 echo "$as_me:2014: \$? = $ac_status" >&5
2015 (exit "$ac_status"); }; }; then
2019 echo "$as_me: failed program was:" >&5
2020 cat "conftest.$ac_ext" >&5
2024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2025 echo "$as_me:2025: result: $cf_clang_optok" >&5
2026 echo "${ECHO_T}$cf_clang_optok" >&6
2027 CFLAGS="$cf_save_CFLAGS"
2028 if test "$cf_clang_optok" = yes; then
2029 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2031 echo "${as_me:-configure}:2031: testing adding option $cf_clang_opt ..." 1>&5
2033 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2034 CFLAGS="${CFLAGS}$cf_clang_opt"
2040 echo "$as_me:2040: checking for $CC option to accept ANSI C" >&5
2041 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2042 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2043 echo $ECHO_N "(cached) $ECHO_C" >&6
2045 ac_cv_prog_cc_stdc=no
2047 cat >"conftest.$ac_ext" <<_ACEOF
2048 #line 2048 "configure"
2049 #include "confdefs.h"
2052 #include <sys/types.h>
2053 #include <sys/stat.h>
2054 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2055 struct buf { int x; };
2056 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2057 static char *e (char **p, int i)
2061 static char *f (char * (*g) (char **, int), char **p, ...)
2066 s = g (p, va_arg (v,int));
2070 int test (int i, double x);
2071 struct s1 {int (*f) (int a);};
2072 struct s2 {int (*f) (double a);};
2073 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2079 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2084 # Don't try gcc -ansi; that turns off useful extensions and
2085 # breaks some systems' header files.
2086 # AIX -qlanglvl=ansi
2087 # Ultrix and OSF/1 -std1
2088 # HP-UX 10.20 and later -Ae
2089 # HP-UX older versions -Aa -D_HPUX_SOURCE
2090 # SVR4 -Xc -D__EXTENSIONS__
2091 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2093 CC="$ac_save_CC $ac_arg"
2094 rm -f "conftest.$ac_objext"
2095 if { (eval echo "$as_me:2095: \"$ac_compile\"") >&5
2096 (eval $ac_compile) 2>&5
2098 echo "$as_me:2098: \$? = $ac_status" >&5
2099 (exit "$ac_status"); } &&
2100 { ac_try='test -s "conftest.$ac_objext"'
2101 { (eval echo "$as_me:2101: \"$ac_try\"") >&5
2104 echo "$as_me:2104: \$? = $ac_status" >&5
2105 (exit "$ac_status"); }; }; then
2106 ac_cv_prog_cc_stdc=$ac_arg
2109 echo "$as_me: failed program was:" >&5
2110 cat "conftest.$ac_ext" >&5
2112 rm -f "conftest.$ac_objext"
2114 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2119 case "x$ac_cv_prog_cc_stdc" in
2121 echo "$as_me:2121: result: none needed" >&5
2122 echo "${ECHO_T}none needed" >&6 ;;
2124 echo "$as_me:2124: result: $ac_cv_prog_cc_stdc" >&5
2125 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2126 CC="$CC $ac_cv_prog_cc_stdc" ;;
2129 # This should have been defined by AC_PROG_CC
2132 echo "$as_me:2132: checking \$CFLAGS variable" >&5
2133 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2136 echo "$as_me:2136: result: broken" >&5
2137 echo "${ECHO_T}broken" >&6
2138 { echo "$as_me:2138: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2139 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2142 for cf_arg in $cf_flags
2148 cf_new_extra_cppflags=
2150 for cf_add_cflags in $cf_arg
2152 case "$cf_fix_cppflags" in
2154 case "$cf_add_cflags" in
2155 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2156 case "$cf_add_cflags" in
2158 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2160 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2161 && test -z "${cf_tst_cflags}" \
2162 && cf_fix_cppflags=yes
2164 if test "$cf_fix_cppflags" = yes ; then
2166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2170 elif test "${cf_tst_cflags}" = "\"'" ; then
2172 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2173 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2183 case "$cf_add_cflags" in
2185 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2187 CPPFLAGS=`echo "$CPPFLAGS" | \
2188 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2189 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2194 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2195 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2202 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2203 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2210 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2211 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2213 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2215 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2216 && test -z "${cf_tst_cflags}" \
2217 && cf_fix_cppflags=no
2222 if test -n "$cf_new_cflags" ; then
2224 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2225 CFLAGS="${CFLAGS}$cf_new_cflags"
2229 if test -n "$cf_new_cppflags" ; then
2231 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2232 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2236 if test -n "$cf_new_extra_cppflags" ; then
2238 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2239 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2246 echo "$as_me:2246: result: ok" >&5
2247 echo "${ECHO_T}ok" >&6
2251 echo "$as_me:2251: checking \$CC variable" >&5
2252 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2255 echo "$as_me:2255: result: broken" >&5
2256 echo "${ECHO_T}broken" >&6
2257 { echo "$as_me:2257: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2258 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2260 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2261 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2263 for cf_arg in $cf_flags
2271 cf_new_extra_cppflags=
2273 for cf_add_cflags in $cf_arg
2275 case "$cf_fix_cppflags" in
2277 case "$cf_add_cflags" in
2278 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2279 case "$cf_add_cflags" in
2281 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2283 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2284 && test -z "${cf_tst_cflags}" \
2285 && cf_fix_cppflags=yes
2287 if test "$cf_fix_cppflags" = yes ; then
2289 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2290 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2293 elif test "${cf_tst_cflags}" = "\"'" ; then
2295 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2296 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2306 case "$cf_add_cflags" in
2308 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2310 CPPFLAGS=`echo "$CPPFLAGS" | \
2311 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2312 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2317 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2318 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2325 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2326 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2333 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2334 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2336 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2338 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2339 && test -z "${cf_tst_cflags}" \
2340 && cf_fix_cppflags=no
2345 if test -n "$cf_new_cflags" ; then
2347 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2348 CFLAGS="${CFLAGS}$cf_new_cflags"
2352 if test -n "$cf_new_cppflags" ; then
2354 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2355 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2359 if test -n "$cf_new_extra_cppflags" ; then
2361 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2362 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2372 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2374 echo "${as_me:-configure}:2374: testing resulting CC: '$CC' ..." 1>&5
2376 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2378 echo "${as_me:-configure}:2378: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2380 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2382 echo "${as_me:-configure}:2382: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2386 echo "$as_me:2386: result: ok" >&5
2387 echo "${ECHO_T}ok" >&6
2391 echo "$as_me:2391: checking for egrep" >&5
2392 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2393 if test "${ac_cv_path_EGREP+set}" = set; then
2394 echo $ECHO_N "(cached) $ECHO_C" >&6
2396 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2397 then ac_cv_path_EGREP="$GREP -E"
2399 for ac_prog in gegrep egrep
2401 # Extract the first word of "$ac_prog", so it can be a program name with args.
2402 set dummy $ac_prog; ac_word=$2
2403 echo "$as_me:2403: checking for $ac_word" >&5
2404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2405 if test "${ac_cv_path_EGREP+set}" = set; then
2406 echo $ECHO_N "(cached) $ECHO_C" >&6
2410 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2413 ac_save_IFS=$IFS; IFS=$ac_path_separator
2415 for ac_dir in $ac_dummy; do
2417 test -z "$ac_dir" && ac_dir=.
2418 if $as_executable_p "$ac_dir/$ac_word"; then
2419 ac_cv_path_EGREP="$ac_dir/$ac_word"
2420 echo "$as_me:2420: found $ac_dir/$ac_word" >&5
2428 EGREP=$ac_cv_path_EGREP
2430 if test -n "$EGREP"; then
2431 echo "$as_me:2431: result: $EGREP" >&5
2432 echo "${ECHO_T}$EGREP" >&6
2434 echo "$as_me:2434: result: no" >&5
2435 echo "${ECHO_T}no" >&6
2438 test -n "$EGREP" && break
2440 test -n "$EGREP" || EGREP=": "
2442 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2442: error: cannot find workable egrep" >&5
2443 echo "$as_me: error: cannot find workable egrep" >&2;}
2444 { (exit 1); exit 1; }; }
2447 echo "$as_me:2447: result: $ac_cv_path_EGREP" >&5
2448 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2449 EGREP="$ac_cv_path_EGREP"
2452 ac_cpp='$CPP $CPPFLAGS'
2453 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2454 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2456 ac_main_return="return"
2457 echo "$as_me:2457: checking how to run the C preprocessor" >&5
2458 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2459 # On Suns, sometimes $CPP names a directory.
2460 if test -n "$CPP" && test -d "$CPP"; then
2463 if test -z "$CPP"; then
2464 if test "${ac_cv_prog_CPP+set}" = set; then
2465 echo $ECHO_N "(cached) $ECHO_C" >&6
2467 # Double quotes because CPP needs to be expanded
2468 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2471 for ac_c_preproc_warn_flag in '' yes
2473 # Use a header file that comes with gcc, so configuring glibc
2474 # with a fresh cross-compiler works.
2475 # On the NeXT, cc -E runs the code through the compiler's parser,
2476 # not just through cpp. "Syntax error" is here to catch this case.
2477 cat >"conftest.$ac_ext" <<_ACEOF
2478 #line 2478 "configure"
2479 #include "confdefs.h"
2483 if { (eval echo "$as_me:2483: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2484 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2486 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2488 cat conftest.err >&5
2489 echo "$as_me:2489: \$? = $ac_status" >&5
2490 (exit "$ac_status"); } >/dev/null; then
2491 if test -s conftest.err; then
2492 ac_cpp_err=$ac_c_preproc_warn_flag
2499 if test -z "$ac_cpp_err"; then
2502 echo "$as_me: failed program was:" >&5
2503 cat "conftest.$ac_ext" >&5
2504 # Broken: fails on valid input.
2507 rm -f conftest.err "conftest.$ac_ext"
2509 # OK, works on sane cases. Now check whether non-existent headers
2510 # can be detected and how.
2511 cat >"conftest.$ac_ext" <<_ACEOF
2512 #line 2512 "configure"
2513 #include "confdefs.h"
2514 #include <ac_nonexistent.h>
2516 if { (eval echo "$as_me:2516: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2517 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2519 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2521 cat conftest.err >&5
2522 echo "$as_me:2522: \$? = $ac_status" >&5
2523 (exit "$ac_status"); } >/dev/null; then
2524 if test -s conftest.err; then
2525 ac_cpp_err=$ac_c_preproc_warn_flag
2532 if test -z "$ac_cpp_err"; then
2533 # Broken: success on invalid input.
2536 echo "$as_me: failed program was:" >&5
2537 cat "conftest.$ac_ext" >&5
2538 # Passes both tests.
2542 rm -f conftest.err "conftest.$ac_ext"
2545 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2546 rm -f conftest.err "conftest.$ac_ext"
2547 if $ac_preproc_ok; then
2559 echo "$as_me:2559: result: $CPP" >&5
2560 echo "${ECHO_T}$CPP" >&6
2562 for ac_c_preproc_warn_flag in '' yes
2564 # Use a header file that comes with gcc, so configuring glibc
2565 # with a fresh cross-compiler works.
2566 # On the NeXT, cc -E runs the code through the compiler's parser,
2567 # not just through cpp. "Syntax error" is here to catch this case.
2568 cat >"conftest.$ac_ext" <<_ACEOF
2569 #line 2569 "configure"
2570 #include "confdefs.h"
2574 if { (eval echo "$as_me:2574: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2575 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2577 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2579 cat conftest.err >&5
2580 echo "$as_me:2580: \$? = $ac_status" >&5
2581 (exit "$ac_status"); } >/dev/null; then
2582 if test -s conftest.err; then
2583 ac_cpp_err=$ac_c_preproc_warn_flag
2590 if test -z "$ac_cpp_err"; then
2593 echo "$as_me: failed program was:" >&5
2594 cat "conftest.$ac_ext" >&5
2595 # Broken: fails on valid input.
2598 rm -f conftest.err "conftest.$ac_ext"
2600 # OK, works on sane cases. Now check whether non-existent headers
2601 # can be detected and how.
2602 cat >"conftest.$ac_ext" <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605 #include <ac_nonexistent.h>
2607 if { (eval echo "$as_me:2607: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2608 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2610 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2612 cat conftest.err >&5
2613 echo "$as_me:2613: \$? = $ac_status" >&5
2614 (exit "$ac_status"); } >/dev/null; then
2615 if test -s conftest.err; then
2616 ac_cpp_err=$ac_c_preproc_warn_flag
2623 if test -z "$ac_cpp_err"; then
2624 # Broken: success on invalid input.
2627 echo "$as_me: failed program was:" >&5
2628 cat "conftest.$ac_ext" >&5
2629 # Passes both tests.
2633 rm -f conftest.err "conftest.$ac_ext"
2636 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2637 rm -f conftest.err "conftest.$ac_ext"
2638 if $ac_preproc_ok; then
2641 { { echo "$as_me:2641: error: C preprocessor \"$CPP\" fails sanity check" >&5
2642 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2643 { (exit 1); exit 1; }; }
2647 ac_cpp='$CPP $CPPFLAGS'
2648 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2649 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2650 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2651 ac_main_return="return"
2653 if test $ac_cv_c_compiler_gnu = yes; then
2654 echo "$as_me:2654: checking whether $CC needs -traditional" >&5
2655 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2656 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2657 echo $ECHO_N "(cached) $ECHO_C" >&6
2659 ac_pattern="Autoconf.*'x'"
2660 cat >"conftest.$ac_ext" <<_ACEOF
2661 #line 2661 "configure"
2662 #include "confdefs.h"
2664 int Autoconf = TIOCGETP;
2666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2667 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2668 ac_cv_prog_gcc_traditional=yes
2670 ac_cv_prog_gcc_traditional=no
2674 if test $ac_cv_prog_gcc_traditional = no; then
2675 cat >"conftest.$ac_ext" <<_ACEOF
2676 #line 2676 "configure"
2677 #include "confdefs.h"
2679 int Autoconf = TCGETA;
2681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2682 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2683 ac_cv_prog_gcc_traditional=yes
2689 echo "$as_me:2689: result: $ac_cv_prog_gcc_traditional" >&5
2690 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2691 if test $ac_cv_prog_gcc_traditional = yes; then
2692 CC="$CC -traditional"
2696 echo "$as_me:2696: checking whether $CC understands -c and -o together" >&5
2697 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2698 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2699 echo $ECHO_N "(cached) $ECHO_C" >&6
2702 cat > conftest.$ac_ext <<CF_EOF
2705 ${cf_cv_main_return:-return}(0);
2708 # We do the test twice because some compilers refuse to overwrite an
2709 # existing .o file with -o, though they will create one.
2710 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2711 if { (eval echo "$as_me:2711: \"$ac_try\"") >&5
2714 echo "$as_me:2714: \$? = $ac_status" >&5
2715 (exit "$ac_status"); } &&
2716 test -f conftest2.$ac_objext && { (eval echo "$as_me:2716: \"$ac_try\"") >&5
2719 echo "$as_me:2719: \$? = $ac_status" >&5
2720 (exit "$ac_status"); };
2722 eval cf_cv_prog_CC_c_o=yes
2724 eval cf_cv_prog_CC_c_o=no
2729 if test "$cf_cv_prog_CC_c_o" = yes; then
2730 echo "$as_me:2730: result: yes" >&5
2731 echo "${ECHO_T}yes" >&6
2733 echo "$as_me:2733: result: no" >&5
2734 echo "${ECHO_T}no" >&6
2737 test "$program_prefix" != NONE &&
2738 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2739 # Use a double $ so make ignores it.
2740 test "$program_suffix" != NONE &&
2741 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2742 # Double any \ or $. echo might interpret backslashes.
2743 # By default was `s,x,x', remove it if useless.
2744 cat <<\_ACEOF >conftest.sed
2745 s/[\\$]/&&/g;s/;s,x,x,$//
2747 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2750 for ac_prog in mawk gawk nawk awk
2752 # Extract the first word of "$ac_prog", so it can be a program name with args.
2753 set dummy $ac_prog; ac_word=$2
2754 echo "$as_me:2754: checking for $ac_word" >&5
2755 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2756 if test "${ac_cv_prog_AWK+set}" = set; then
2757 echo $ECHO_N "(cached) $ECHO_C" >&6
2759 if test -n "$AWK"; then
2760 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2762 ac_save_IFS=$IFS; IFS=$ac_path_separator
2764 for ac_dir in $ac_dummy; do
2766 test -z "$ac_dir" && ac_dir=.
2767 $as_executable_p "$ac_dir/$ac_word" || continue
2768 ac_cv_prog_AWK="$ac_prog"
2769 echo "$as_me:2769: found $ac_dir/$ac_word" >&5
2776 if test -n "$AWK"; then
2777 echo "$as_me:2777: result: $AWK" >&5
2778 echo "${ECHO_T}$AWK" >&6
2780 echo "$as_me:2780: result: no" >&5
2781 echo "${ECHO_T}no" >&6
2784 test -n "$AWK" && break
2787 test -z "$AWK" && { { echo "$as_me:2787: error: No awk program found" >&5
2788 echo "$as_me: error: No awk program found" >&2;}
2789 { (exit 1); exit 1; }; }
2791 echo "$as_me:2791: checking for egrep" >&5
2792 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2793 if test "${ac_cv_prog_egrep+set}" = set; then
2794 echo $ECHO_N "(cached) $ECHO_C" >&6
2796 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2797 then ac_cv_prog_egrep='grep -E'
2798 else ac_cv_prog_egrep='egrep'
2801 echo "$as_me:2801: result: $ac_cv_prog_egrep" >&5
2802 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2803 EGREP=$ac_cv_prog_egrep
2805 test -z "$EGREP" && { { echo "$as_me:2805: error: No egrep program found" >&5
2806 echo "$as_me: error: No egrep program found" >&2;}
2807 { (exit 1); exit 1; }; }
2809 # Find a good install program. We prefer a C program (faster),
2810 # so one script is as good as another. But avoid the broken or
2811 # incompatible versions:
2812 # SysV /etc/install, /usr/sbin/install
2813 # SunOS /usr/etc/install
2814 # IRIX /sbin/install
2816 # AmigaOS /C/install, which installs bootblocks on floppy discs
2817 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2818 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2819 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2820 # ./install, which can be erroneously created by make from ./install.sh.
2821 echo "$as_me:2821: checking for a BSD compatible install" >&5
2822 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2823 if test -z "$INSTALL"; then
2824 if test "${ac_cv_path_install+set}" = set; then
2825 echo $ECHO_N "(cached) $ECHO_C" >&6
2827 ac_save_IFS=$IFS; IFS=$ac_path_separator
2828 for ac_dir in $PATH; do
2830 # Account for people who put trailing slashes in PATH elements.
2832 / | ./ | .// | /cC/* \
2833 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2836 # OSF1 and SCO ODT 3.0 have their own names for install.
2837 # Don't use installbsd from OSF since it installs stuff as root
2839 for ac_prog in ginstall scoinst install; do
2840 if $as_executable_p "$ac_dir/$ac_prog"; then
2841 if test $ac_prog = install &&
2842 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2843 # AIX install. It has an incompatible calling convention.
2845 elif test $ac_prog = install &&
2846 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2847 # program-specific install script used by HP pwplus--don't use.
2850 ac_cv_path_install="$ac_dir/$ac_prog -c"
2860 if test "${ac_cv_path_install+set}" = set; then
2861 INSTALL=$ac_cv_path_install
2863 # As a last resort, use the slow shell script. We don't cache a
2864 # path for INSTALL within a source directory, because that will
2865 # break other packages using the cache if that directory is
2866 # removed, or if the path is relative.
2867 INSTALL=$ac_install_sh
2870 echo "$as_me:2870: result: $INSTALL" >&5
2871 echo "${ECHO_T}$INSTALL" >&6
2873 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2874 # It thinks the first close brace ends the variable substitution.
2875 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2877 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2879 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2881 echo "$as_me:2881: checking whether ln -s works" >&5
2882 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2884 if test "$LN_S" = "ln -s"; then
2885 echo "$as_me:2885: result: yes" >&5
2886 echo "${ECHO_T}yes" >&6
2888 echo "$as_me:2888: result: no, using $LN_S" >&5
2889 echo "${ECHO_T}no, using $LN_S" >&6
2892 echo "$as_me:2892: checking if $LN_S -f options work" >&5
2893 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2895 rm -f conf$$.src conf$$dst
2897 echo first >conf$$.src
2898 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2903 rm -f conf$$.dst conf$$src
2904 echo "$as_me:2904: result: $cf_prog_ln_sf" >&5
2905 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2907 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2909 # Find a good install program. We prefer a C program (faster),
2910 # so one script is as good as another. But avoid the broken or
2911 # incompatible versions:
2912 # SysV /etc/install, /usr/sbin/install
2913 # SunOS /usr/etc/install
2914 # IRIX /sbin/install
2916 # AmigaOS /C/install, which installs bootblocks on floppy discs
2917 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2918 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2919 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2920 # ./install, which can be erroneously created by make from ./install.sh.
2921 echo "$as_me:2921: checking for a BSD compatible install" >&5
2922 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2923 if test -z "$INSTALL"; then
2924 if test "${ac_cv_path_install+set}" = set; then
2925 echo $ECHO_N "(cached) $ECHO_C" >&6
2927 ac_save_IFS=$IFS; IFS=$ac_path_separator
2928 for ac_dir in $PATH; do
2930 # Account for people who put trailing slashes in PATH elements.
2932 / | ./ | .// | /cC/* \
2933 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2936 # OSF1 and SCO ODT 3.0 have their own names for install.
2937 # Don't use installbsd from OSF since it installs stuff as root
2939 for ac_prog in ginstall scoinst install; do
2940 if $as_executable_p "$ac_dir/$ac_prog"; then
2941 if test $ac_prog = install &&
2942 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2943 # AIX install. It has an incompatible calling convention.
2945 elif test $ac_prog = install &&
2946 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2947 # program-specific install script used by HP pwplus--don't use.
2950 ac_cv_path_install="$ac_dir/$ac_prog -c"
2960 if test "${ac_cv_path_install+set}" = set; then
2961 INSTALL=$ac_cv_path_install
2963 # As a last resort, use the slow shell script. We don't cache a
2964 # path for INSTALL within a source directory, because that will
2965 # break other packages using the cache if that directory is
2966 # removed, or if the path is relative.
2967 INSTALL=$ac_install_sh
2970 echo "$as_me:2970: result: $INSTALL" >&5
2971 echo "${ECHO_T}$INSTALL" >&6
2973 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2974 # It thinks the first close brace ends the variable substitution.
2975 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2977 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2979 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2985 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2986 test -z "$cf_dir" && cf_dir=.
2987 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2991 echo "$as_me:2991: checking if you want to install stripped executables" >&5
2992 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2994 # Check whether --enable-stripping or --disable-stripping was given.
2995 if test "${enable_stripping+set}" = set; then
2996 enableval="$enable_stripping"
2997 test "$enableval" != no && enableval=yes
2998 if test "$enableval" != "yes" ; then
3001 enable_stripping=yes
3005 enable_stripping=yes
3008 echo "$as_me:3008: result: $enable_stripping" >&5
3009 echo "${ECHO_T}$enable_stripping" >&6
3011 if test "$enable_stripping" = yes
3018 : "${INSTALL:=install}"
3019 echo "$as_me:3019: checking if install accepts -p option" >&5
3020 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3021 if test "${cf_cv_install_p+set}" = set; then
3022 echo $ECHO_N "(cached) $ECHO_C" >&6
3029 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3031 if test -f conftest.out/conftest.in
3033 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3034 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3035 if test -s conftest.err
3050 echo "$as_me:3050: result: $cf_cv_install_p" >&5
3051 echo "${ECHO_T}$cf_cv_install_p" >&6
3053 echo "$as_me:3053: checking if install needs to be told about ownership" >&5
3054 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3055 case `$ac_config_guess` in
3064 echo "$as_me:3064: result: $with_install_o" >&5
3065 echo "${ECHO_T}$with_install_o" >&6
3066 if test "x$with_install_o" = xyes
3068 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'`"
3073 if test -n "$INSTALL_OPT_S"
3075 echo "$as_me:3075: checking if you want to specify strip-program" >&5
3076 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
3078 # Check whether --with-strip-program or --without-strip-program was given.
3079 if test "${with_strip_program+set}" = set; then
3080 withval="$with_strip_program"
3081 with_strip_program=$withval
3083 with_strip_program=no
3085 echo "$as_me:3085: result: $with_strip_program" >&5
3086 echo "${ECHO_T}$with_strip_program" >&6
3087 if test "$with_strip_program" != no
3089 echo "$as_me:3089: checking if strip-program is supported with this installer" >&5
3090 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
3091 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
3092 check_install_strip=no
3093 if test -f "$cf_install_program"
3095 check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
3096 if test -n "$check_install_version"
3098 check_install_strip="option"
3100 for check_strip_variable in STRIPBIN STRIP
3102 if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
3104 check_install_strip="environ"
3110 echo "$as_me:3110: result: $check_install_strip" >&5
3111 echo "${ECHO_T}$check_install_strip" >&6
3112 case "$check_install_strip" in
3114 { echo "$as_me:3114: WARNING: $cf_install_program does not support strip program option" >&5
3115 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
3116 with_strip_program=no
3119 cat >install.tmp <<-CF_EOF
3121 STRIPBIN="$with_strip_program" \\
3122 STRIP="$with_strip_program" \\
3125 INSTALL="`pwd`/install.tmp"
3127 test -n "$verbose" && echo " created $INSTALL" 1>&6
3129 echo "${as_me:-configure}:3129: testing created $INSTALL ..." 1>&5
3133 INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
3139 echo "$as_me:3139: checking for long file names" >&5
3140 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3141 if test "${ac_cv_sys_long_file_names+set}" = set; then
3142 echo $ECHO_N "(cached) $ECHO_C" >&6
3144 ac_cv_sys_long_file_names=yes
3145 # Test for long file names in all the places we know might matter:
3146 # . the current directory, where building will happen
3147 # $prefix/lib where we will be installing things
3148 # $exec_prefix/lib likewise
3149 # eval it to expand exec_prefix.
3150 # $TMPDIR if set, where it might want to write temporary files
3151 # if $TMPDIR is not set:
3152 # /tmp where it might want to write temporary files
3155 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3158 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3160 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3161 test -d "$ac_dir" || continue
3162 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3163 ac_xdir=$ac_dir/cf$$
3164 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3165 ac_tf1=$ac_xdir/conftest9012345
3166 ac_tf2=$ac_xdir/conftest9012346
3167 (echo 1 >"$ac_tf1") 2>/dev/null
3168 (echo 2 >"$ac_tf2") 2>/dev/null
3169 ac_val=`cat "$ac_tf1" 2>/dev/null`
3170 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3171 ac_cv_sys_long_file_names=no
3172 rm -rf "$ac_xdir" 2>/dev/null
3175 rm -rf "$ac_xdir" 2>/dev/null
3178 echo "$as_me:3178: result: $ac_cv_sys_long_file_names" >&5
3179 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3180 if test "$ac_cv_sys_long_file_names" = yes; then
3182 cat >>confdefs.h <<\EOF
3183 #define HAVE_LONG_FILE_NAMES 1
3188 # if we find pkg-config, check if we should install the ".pc" files.
3190 echo "$as_me:3190: checking if you want to use pkg-config" >&5
3191 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3193 # Check whether --with-pkg-config or --without-pkg-config was given.
3194 if test "${with_pkg_config+set}" = set; then
3195 withval="$with_pkg_config"
3196 cf_pkg_config=$withval
3200 echo "$as_me:3200: result: $cf_pkg_config" >&5
3201 echo "${ECHO_T}$cf_pkg_config" >&6
3203 case "$cf_pkg_config" in
3209 if test -n "$ac_tool_prefix"; then
3210 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3211 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3212 echo "$as_me:3212: checking for $ac_word" >&5
3213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3214 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3215 echo $ECHO_N "(cached) $ECHO_C" >&6
3219 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3222 ac_save_IFS=$IFS; IFS=$ac_path_separator
3224 for ac_dir in $ac_dummy; do
3226 test -z "$ac_dir" && ac_dir=.
3227 if $as_executable_p "$ac_dir/$ac_word"; then
3228 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3229 echo "$as_me:3229: found $ac_dir/$ac_word" >&5
3237 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3239 if test -n "$PKG_CONFIG"; then
3240 echo "$as_me:3240: result: $PKG_CONFIG" >&5
3241 echo "${ECHO_T}$PKG_CONFIG" >&6
3243 echo "$as_me:3243: result: no" >&5
3244 echo "${ECHO_T}no" >&6
3248 if test -z "$ac_cv_path_PKG_CONFIG"; then
3249 ac_pt_PKG_CONFIG=$PKG_CONFIG
3250 # Extract the first word of "pkg-config", so it can be a program name with args.
3251 set dummy pkg-config; ac_word=$2
3252 echo "$as_me:3252: checking for $ac_word" >&5
3253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3254 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3255 echo $ECHO_N "(cached) $ECHO_C" >&6
3257 case $ac_pt_PKG_CONFIG in
3259 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3262 ac_save_IFS=$IFS; IFS=$ac_path_separator
3264 for ac_dir in $ac_dummy; do
3266 test -z "$ac_dir" && ac_dir=.
3267 if $as_executable_p "$ac_dir/$ac_word"; then
3268 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3269 echo "$as_me:3269: found $ac_dir/$ac_word" >&5
3274 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3278 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3280 if test -n "$ac_pt_PKG_CONFIG"; then
3281 echo "$as_me:3281: result: $ac_pt_PKG_CONFIG" >&5
3282 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3284 echo "$as_me:3284: result: no" >&5
3285 echo "${ECHO_T}no" >&6
3288 PKG_CONFIG=$ac_pt_PKG_CONFIG
3290 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3299 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3300 if test "$PKG_CONFIG" != none ; then
3302 if test "x$prefix" != xNONE; then
3303 cf_path_syntax="$prefix"
3305 cf_path_syntax="$ac_default_prefix"
3308 case ".$PKG_CONFIG" in
3313 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3315 (.\$\{*prefix\}*|.\$\{*dir\}*)
3316 eval PKG_CONFIG="$PKG_CONFIG"
3317 case ".$PKG_CONFIG" in
3319 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3324 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3327 { { echo "$as_me:3327: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3328 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3329 { (exit 1); exit 1; }; }
3333 elif test "x$cf_pkg_config" != xno ; then
3334 { echo "$as_me:3334: WARNING: pkg-config is not installed" >&5
3335 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3338 case "$PKG_CONFIG" in
3340 echo "$as_me:3340: checking for pkg-config library directory" >&5
3341 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3344 echo "$as_me:3344: checking for $PKG_CONFIG library directory" >&5
3345 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3349 # if $PKG_CONFIG_LIBDIR is set, try to use that
3350 if test -n "$PKG_CONFIG_PATH"; then
3351 cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3352 elif test -n "$PKG_CONFIG_LIBDIR"; then
3353 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[ ]*,,' -e 's,[ ]*$,,'`
3358 # if the option is used, let that override. otherwise default to "libdir"
3360 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3361 if test "${with_pkg_config_libdir+set}" = set; then
3362 withval="$with_pkg_config_libdir"
3363 cf_search_path=$withval
3365 test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
3368 case "x$cf_search_path" in
3370 PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
3371 echo "$as_me:3371: result: $PKG_CONFIG_LIBDIR" >&5
3372 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3381 PKG_CONFIG_LIBDIR="$cf_search_path"
3382 echo "$as_me:3382: result: $PKG_CONFIG_LIBDIR" >&5
3383 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3387 echo "$as_me:3387: result: auto" >&5
3388 echo "${ECHO_T}auto" >&6
3390 # Look for the library directory using the same prefix as the executable
3391 echo "$as_me:3391: checking for search-list" >&5
3392 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
3393 if test "x$PKG_CONFIG" != xnone
3395 # works for pkg-config since version 0.24 (2009)
3396 # works for pkgconf since version 0.8.3 (2012)
3397 for cf_pkg_program in \
3398 `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
3402 cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
3403 test -n "$cf_search_path" && break
3406 # works for pkg-config since import in 2005 of original 2001 HP code.
3407 test -z "$cf_search_path" && \
3409 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
3410 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
3411 sub(\"^[^']*'\",\"\"); \
3412 sub(\"'.*\",\"\"); \
3413 printf \" %s\", \\$0; } \
3418 echo "$as_me:3418: result: $cf_search_path" >&5
3419 echo "${ECHO_T}$cf_search_path" >&6
3422 { { echo "$as_me:3422: error: Unexpected option value: $cf_search_path" >&5
3423 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
3424 { (exit 1); exit 1; }; }
3428 if test -n "$cf_search_path"
3430 echo "$as_me:3430: checking for first directory" >&5
3431 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
3432 cf_pkg_config_path=none
3433 for cf_config in $cf_search_path
3435 if test -d "$cf_config"
3437 cf_pkg_config_path=$cf_config
3441 echo "$as_me:3441: result: $cf_pkg_config_path" >&5
3442 echo "${ECHO_T}$cf_pkg_config_path" >&6
3444 if test "x$cf_pkg_config_path" != xnone ; then
3445 # limit this to the first directory found
3446 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
3449 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
3451 echo "$as_me:3451: checking for workaround" >&5
3452 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
3453 if test "$prefix" = "NONE" ; then
3454 cf_prefix="$ac_default_prefix"
3458 eval cf_libdir=$libdir
3459 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
3461 for cf_config in $cf_search_path
3464 $cf_libdir/pkgconfig)
3465 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
3469 test -z "$cf_backup" && cf_backup=$cf_config
3473 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
3474 echo "$as_me:3474: result: $PKG_CONFIG_LIBDIR" >&5
3475 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3479 echo "$as_me:3479: checking if you want to build test-programs" >&5
3480 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3482 # Check whether --with-tests or --without-tests was given.
3483 if test "${with_tests+set}" = set; then
3484 withval="$with_tests"
3485 cf_with_tests=$withval
3489 echo "$as_me:3489: result: $cf_with_tests" >&5
3490 echo "${ECHO_T}$cf_with_tests" >&6
3492 echo "$as_me:3492: checking if we should assume mixed-case filenames" >&5
3493 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3495 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3496 if test "${enable_mixed_case+set}" = set; then
3497 enableval="$enable_mixed_case"
3498 enable_mixedcase=$enableval
3500 enable_mixedcase=auto
3502 echo "$as_me:3502: result: $enable_mixedcase" >&5
3503 echo "${ECHO_T}$enable_mixedcase" >&6
3504 if test "$enable_mixedcase" = "auto" ; then
3506 echo "$as_me:3506: checking if filesystem supports mixed-case filenames" >&5
3507 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3508 if test "${cf_cv_mixedcase+set}" = set; then
3509 echo $ECHO_N "(cached) $ECHO_C" >&6
3512 if test "$cross_compiling" = yes ; then
3513 case "$target_alias" in
3514 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3522 rm -f conftest CONFTEST
3524 if test -f CONFTEST ; then
3529 rm -f conftest CONFTEST
3533 echo "$as_me:3533: result: $cf_cv_mixedcase" >&5
3534 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3535 test "$cf_cv_mixedcase" = yes &&
3536 cat >>confdefs.h <<\EOF
3537 #define MIXEDCASE_FILENAMES 1
3541 cf_cv_mixedcase=$enable_mixedcase
3542 if test "$enable_mixedcase" = "yes" ; then
3543 cat >>confdefs.h <<\EOF
3544 #define MIXEDCASE_FILENAMES 1
3550 # do this after mixed-case option (tags/TAGS is not as important as tic).
3551 echo "$as_me:3551: checking whether ${MAKE-make} sets \${MAKE}" >&5
3552 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3553 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3554 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3555 echo $ECHO_N "(cached) $ECHO_C" >&6
3557 cat >conftest.make <<\EOF
3559 @echo 'ac_maketemp="${MAKE}"'
3561 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3562 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3563 if test -n "$ac_maketemp"; then
3564 eval ac_cv_prog_make_${ac_make}_set=yes
3566 eval ac_cv_prog_make_${ac_make}_set=no
3570 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3571 echo "$as_me:3571: result: yes" >&5
3572 echo "${ECHO_T}yes" >&6
3575 echo "$as_me:3575: result: no" >&5
3576 echo "${ECHO_T}no" >&6
3577 SET_MAKE="MAKE=${MAKE-make}"
3580 echo "$as_me:3580: checking for \".PHONY\" make-support" >&5
3581 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3582 if test "${cf_cv_make_PHONY+set}" = set; then
3583 echo $ECHO_N "(cached) $ECHO_C" >&6
3588 mkdir conftest || exit 1
3590 cat >makefile <<'CF_EOF'
3594 @echo "** making $@ $(DATA)"
3596 @echo "** making $@ $(DATA)"
3598 @echo "** making $@ $(DATA)"
3601 @echo "** making $@ $(DATA)"
3604 for cf_data in 1 2 3
3606 ${MAKE:-make} always DATA=$cf_data
3607 ${MAKE:-make} once DATA=$cf_data
3608 ${MAKE:-make} -t always once
3609 if test -f always ; then
3610 echo "no (case 1)" > ../conftest.tmp
3611 elif test ! -f always.out ; then
3612 echo "no (case 2)" > ../conftest.tmp
3613 elif test ! -f once.out ; then
3614 echo "no (case 3)" > ../conftest.tmp
3615 elif ! cmp -s always.out once.out ; then
3616 echo "no (case 4)" > ../conftest.tmp
3617 diff always.out once.out
3619 cf_check="`cat always.out`"
3620 if test "x$cf_check" != "x$cf_data" ; then
3621 echo "no (case 5)" > ../conftest.tmp
3623 echo yes > ../conftest.tmp
3631 cf_cv_make_PHONY="`cat conftest.tmp`"
3635 echo "$as_me:3635: result: $cf_cv_make_PHONY" >&5
3636 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3639 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3640 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3642 for ac_prog in exctags ctags
3644 # Extract the first word of "$ac_prog", so it can be a program name with args.
3645 set dummy $ac_prog; ac_word=$2
3646 echo "$as_me:3646: checking for $ac_word" >&5
3647 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3648 if test "${ac_cv_prog_CTAGS+set}" = set; then
3649 echo $ECHO_N "(cached) $ECHO_C" >&6
3651 if test -n "$CTAGS"; then
3652 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3654 ac_save_IFS=$IFS; IFS=$ac_path_separator
3656 for ac_dir in $ac_dummy; do
3658 test -z "$ac_dir" && ac_dir=.
3659 $as_executable_p "$ac_dir/$ac_word" || continue
3660 ac_cv_prog_CTAGS="$ac_prog"
3661 echo "$as_me:3661: found $ac_dir/$ac_word" >&5
3667 CTAGS=$ac_cv_prog_CTAGS
3668 if test -n "$CTAGS"; then
3669 echo "$as_me:3669: result: $CTAGS" >&5
3670 echo "${ECHO_T}$CTAGS" >&6
3672 echo "$as_me:3672: result: no" >&5
3673 echo "${ECHO_T}no" >&6
3676 test -n "$CTAGS" && break
3679 for ac_prog in exetags etags
3681 # Extract the first word of "$ac_prog", so it can be a program name with args.
3682 set dummy $ac_prog; ac_word=$2
3683 echo "$as_me:3683: checking for $ac_word" >&5
3684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3685 if test "${ac_cv_prog_ETAGS+set}" = set; then
3686 echo $ECHO_N "(cached) $ECHO_C" >&6
3688 if test -n "$ETAGS"; then
3689 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3691 ac_save_IFS=$IFS; IFS=$ac_path_separator
3693 for ac_dir in $ac_dummy; do
3695 test -z "$ac_dir" && ac_dir=.
3696 $as_executable_p "$ac_dir/$ac_word" || continue
3697 ac_cv_prog_ETAGS="$ac_prog"
3698 echo "$as_me:3698: found $ac_dir/$ac_word" >&5
3704 ETAGS=$ac_cv_prog_ETAGS
3705 if test -n "$ETAGS"; then
3706 echo "$as_me:3706: result: $ETAGS" >&5
3707 echo "${ECHO_T}$ETAGS" >&6
3709 echo "$as_me:3709: result: no" >&5
3710 echo "${ECHO_T}no" >&6
3713 test -n "$ETAGS" && break
3716 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3717 set dummy ${CTAGS:-ctags}; ac_word=$2
3718 echo "$as_me:3718: checking for $ac_word" >&5
3719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3720 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3721 echo $ECHO_N "(cached) $ECHO_C" >&6
3723 if test -n "$MAKE_LOWER_TAGS"; then
3724 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3726 ac_save_IFS=$IFS; IFS=$ac_path_separator
3728 for ac_dir in $ac_dummy; do
3730 test -z "$ac_dir" && ac_dir=.
3731 $as_executable_p "$ac_dir/$ac_word" || continue
3732 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3733 echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3737 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3740 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3741 if test -n "$MAKE_LOWER_TAGS"; then
3742 echo "$as_me:3742: result: $MAKE_LOWER_TAGS" >&5
3743 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3745 echo "$as_me:3745: result: no" >&5
3746 echo "${ECHO_T}no" >&6
3749 if test "$cf_cv_mixedcase" = yes ; then
3750 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3751 set dummy ${ETAGS:-etags}; ac_word=$2
3752 echo "$as_me:3752: checking for $ac_word" >&5
3753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3754 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3755 echo $ECHO_N "(cached) $ECHO_C" >&6
3757 if test -n "$MAKE_UPPER_TAGS"; then
3758 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3760 ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 for ac_dir in $ac_dummy; do
3764 test -z "$ac_dir" && ac_dir=.
3765 $as_executable_p "$ac_dir/$ac_word" || continue
3766 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3767 echo "$as_me:3767: found $ac_dir/$ac_word" >&5
3771 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3774 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3775 if test -n "$MAKE_UPPER_TAGS"; then
3776 echo "$as_me:3776: result: $MAKE_UPPER_TAGS" >&5
3777 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3779 echo "$as_me:3779: result: no" >&5
3780 echo "${ECHO_T}no" >&6
3787 if test "$MAKE_UPPER_TAGS" = yes ; then
3793 if test "$MAKE_LOWER_TAGS" = yes ; then
3799 echo "$as_me:3799: checking for makeflags variable" >&5
3800 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3801 if test "${cf_cv_makeflags+set}" = set; then
3802 echo $ECHO_N "(cached) $ECHO_C" >&6
3806 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3808 cat >cf_makeflags.tmp <<CF_EOF
3811 @ echo '.$cf_option'
3813 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3814 case "$cf_result" in
3816 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3817 case "$cf_result" in
3818 (.*CC=*) cf_cv_makeflags=
3820 (*) cf_cv_makeflags=$cf_option
3829 echo "${as_me:-configure}:3829: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3834 rm -f cf_makeflags.tmp
3837 echo "$as_me:3837: result: $cf_cv_makeflags" >&5
3838 echo "${ECHO_T}$cf_cv_makeflags" >&6
3840 if test -n "$ac_tool_prefix"; then
3841 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3842 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3843 echo "$as_me:3843: checking for $ac_word" >&5
3844 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3845 if test "${ac_cv_prog_RANLIB+set}" = set; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
3848 if test -n "$RANLIB"; then
3849 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3851 ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 for ac_dir in $ac_dummy; do
3855 test -z "$ac_dir" && ac_dir=.
3856 $as_executable_p "$ac_dir/$ac_word" || continue
3857 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3858 echo "$as_me:3858: found $ac_dir/$ac_word" >&5
3864 RANLIB=$ac_cv_prog_RANLIB
3865 if test -n "$RANLIB"; then
3866 echo "$as_me:3866: result: $RANLIB" >&5
3867 echo "${ECHO_T}$RANLIB" >&6
3869 echo "$as_me:3869: result: no" >&5
3870 echo "${ECHO_T}no" >&6
3874 if test -z "$ac_cv_prog_RANLIB"; then
3875 ac_ct_RANLIB=$RANLIB
3876 # Extract the first word of "ranlib", so it can be a program name with args.
3877 set dummy ranlib; ac_word=$2
3878 echo "$as_me:3878: checking for $ac_word" >&5
3879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3880 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3881 echo $ECHO_N "(cached) $ECHO_C" >&6
3883 if test -n "$ac_ct_RANLIB"; then
3884 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3886 ac_save_IFS=$IFS; IFS=$ac_path_separator
3888 for ac_dir in $ac_dummy; do
3890 test -z "$ac_dir" && ac_dir=.
3891 $as_executable_p "$ac_dir/$ac_word" || continue
3892 ac_cv_prog_ac_ct_RANLIB="ranlib"
3893 echo "$as_me:3893: found $ac_dir/$ac_word" >&5
3897 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3900 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3901 if test -n "$ac_ct_RANLIB"; then
3902 echo "$as_me:3902: result: $ac_ct_RANLIB" >&5
3903 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3905 echo "$as_me:3905: result: no" >&5
3906 echo "${ECHO_T}no" >&6
3909 RANLIB=$ac_ct_RANLIB
3911 RANLIB="$ac_cv_prog_RANLIB"
3914 if test -n "$ac_tool_prefix"; then
3915 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3916 set dummy ${ac_tool_prefix}ld; ac_word=$2
3917 echo "$as_me:3917: checking for $ac_word" >&5
3918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3919 if test "${ac_cv_prog_LD+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3922 if test -n "$LD"; then
3923 ac_cv_prog_LD="$LD" # Let the user override the test.
3925 ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 for ac_dir in $ac_dummy; do
3929 test -z "$ac_dir" && ac_dir=.
3930 $as_executable_p "$ac_dir/$ac_word" || continue
3931 ac_cv_prog_LD="${ac_tool_prefix}ld"
3932 echo "$as_me:3932: found $ac_dir/$ac_word" >&5
3939 if test -n "$LD"; then
3940 echo "$as_me:3940: result: $LD" >&5
3941 echo "${ECHO_T}$LD" >&6
3943 echo "$as_me:3943: result: no" >&5
3944 echo "${ECHO_T}no" >&6
3948 if test -z "$ac_cv_prog_LD"; then
3950 # Extract the first word of "ld", so it can be a program name with args.
3951 set dummy ld; ac_word=$2
3952 echo "$as_me:3952: checking for $ac_word" >&5
3953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3954 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3955 echo $ECHO_N "(cached) $ECHO_C" >&6
3957 if test -n "$ac_ct_LD"; then
3958 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3960 ac_save_IFS=$IFS; IFS=$ac_path_separator
3962 for ac_dir in $ac_dummy; do
3964 test -z "$ac_dir" && ac_dir=.
3965 $as_executable_p "$ac_dir/$ac_word" || continue
3966 ac_cv_prog_ac_ct_LD="ld"
3967 echo "$as_me:3967: found $ac_dir/$ac_word" >&5
3971 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3974 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3975 if test -n "$ac_ct_LD"; then
3976 echo "$as_me:3976: result: $ac_ct_LD" >&5
3977 echo "${ECHO_T}$ac_ct_LD" >&6
3979 echo "$as_me:3979: result: no" >&5
3980 echo "${ECHO_T}no" >&6
3988 if test -n "$ac_tool_prefix"; then
3989 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3990 set dummy ${ac_tool_prefix}ar; ac_word=$2
3991 echo "$as_me:3991: checking for $ac_word" >&5
3992 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3993 if test "${ac_cv_prog_AR+set}" = set; then
3994 echo $ECHO_N "(cached) $ECHO_C" >&6
3996 if test -n "$AR"; then
3997 ac_cv_prog_AR="$AR" # Let the user override the test.
3999 ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 for ac_dir in $ac_dummy; do
4003 test -z "$ac_dir" && ac_dir=.
4004 $as_executable_p "$ac_dir/$ac_word" || continue
4005 ac_cv_prog_AR="${ac_tool_prefix}ar"
4006 echo "$as_me:4006: found $ac_dir/$ac_word" >&5
4013 if test -n "$AR"; then
4014 echo "$as_me:4014: result: $AR" >&5
4015 echo "${ECHO_T}$AR" >&6
4017 echo "$as_me:4017: result: no" >&5
4018 echo "${ECHO_T}no" >&6
4022 if test -z "$ac_cv_prog_AR"; then
4024 # Extract the first word of "ar", so it can be a program name with args.
4025 set dummy ar; ac_word=$2
4026 echo "$as_me:4026: checking for $ac_word" >&5
4027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4028 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4029 echo $ECHO_N "(cached) $ECHO_C" >&6
4031 if test -n "$ac_ct_AR"; then
4032 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4034 ac_save_IFS=$IFS; IFS=$ac_path_separator
4036 for ac_dir in $ac_dummy; do
4038 test -z "$ac_dir" && ac_dir=.
4039 $as_executable_p "$ac_dir/$ac_word" || continue
4040 ac_cv_prog_ac_ct_AR="ar"
4041 echo "$as_me:4041: found $ac_dir/$ac_word" >&5
4045 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4048 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4049 if test -n "$ac_ct_AR"; then
4050 echo "$as_me:4050: result: $ac_ct_AR" >&5
4051 echo "${ECHO_T}$ac_ct_AR" >&6
4053 echo "$as_me:4053: result: no" >&5
4054 echo "${ECHO_T}no" >&6
4062 if test -n "$ac_tool_prefix"; then
4063 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4064 set dummy ${ac_tool_prefix}ar; ac_word=$2
4065 echo "$as_me:4065: checking for $ac_word" >&5
4066 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4067 if test "${ac_cv_prog_AR+set}" = set; then
4068 echo $ECHO_N "(cached) $ECHO_C" >&6
4070 if test -n "$AR"; then
4071 ac_cv_prog_AR="$AR" # Let the user override the test.
4073 ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 for ac_dir in $ac_dummy; do
4077 test -z "$ac_dir" && ac_dir=.
4078 $as_executable_p "$ac_dir/$ac_word" || continue
4079 ac_cv_prog_AR="${ac_tool_prefix}ar"
4080 echo "$as_me:4080: found $ac_dir/$ac_word" >&5
4087 if test -n "$AR"; then
4088 echo "$as_me:4088: result: $AR" >&5
4089 echo "${ECHO_T}$AR" >&6
4091 echo "$as_me:4091: result: no" >&5
4092 echo "${ECHO_T}no" >&6
4096 if test -z "$ac_cv_prog_AR"; then
4098 # Extract the first word of "ar", so it can be a program name with args.
4099 set dummy ar; ac_word=$2
4100 echo "$as_me:4100: checking for $ac_word" >&5
4101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4102 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4103 echo $ECHO_N "(cached) $ECHO_C" >&6
4105 if test -n "$ac_ct_AR"; then
4106 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4108 ac_save_IFS=$IFS; IFS=$ac_path_separator
4110 for ac_dir in $ac_dummy; do
4112 test -z "$ac_dir" && ac_dir=.
4113 $as_executable_p "$ac_dir/$ac_word" || continue
4114 ac_cv_prog_ac_ct_AR="ar"
4115 echo "$as_me:4115: found $ac_dir/$ac_word" >&5
4119 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4122 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4123 if test -n "$ac_ct_AR"; then
4124 echo "$as_me:4124: result: $ac_ct_AR" >&5
4125 echo "${ECHO_T}$ac_ct_AR" >&6
4127 echo "$as_me:4127: result: no" >&5
4128 echo "${ECHO_T}no" >&6
4136 echo "$as_me:4136: checking for options to update archives" >&5
4137 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4138 if test "${cf_cv_ar_flags+set}" = set; then
4139 echo $ECHO_N "(cached) $ECHO_C" >&6
4142 case "$cf_cv_system_name" in
4145 cat >mk_static_lib.sh <<-EOF
4150 exec \$MSVC_BIN -out:"\$out" \$@
4152 chmod +x mk_static_lib.sh
4153 AR=`pwd`/mk_static_lib.sh
4156 cf_cv_ar_flags=unknown
4157 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4160 # check if $ARFLAGS already contains this choice
4161 if test "x$ARFLAGS" != "x" ; then
4162 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4163 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4169 rm -f "conftest.$ac_cv_objext"
4172 cat >"conftest.$ac_ext" <<EOF
4173 #line 4173 "configure"
4174 int testdata[3] = { 123, 456, 789 };
4176 if { (eval echo "$as_me:4176: \"$ac_compile\"") >&5
4177 (eval $ac_compile) 2>&5
4179 echo "$as_me:4179: \$? = $ac_status" >&5
4180 (exit "$ac_status"); } ; then
4181 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4182 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4183 if test -f conftest.a ; then
4184 cf_cv_ar_flags="$cf_ar_flags"
4188 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4190 echo "${as_me:-configure}:4190: testing cannot compile test-program ..." 1>&5
4195 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4200 echo "$as_me:4200: result: $cf_cv_ar_flags" >&5
4201 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4203 if test -n "$ARFLAGS" ; then
4204 if test -n "$cf_cv_ar_flags" ; then
4205 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4208 ARFLAGS=$cf_cv_ar_flags
4211 echo "$as_me:4211: checking for PATH separator" >&5
4212 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4213 case "$cf_cv_system_name" in
4214 (os2*) PATH_SEPARATOR=';' ;;
4215 (*) ${PATH_SEPARATOR:=':'} ;;
4218 echo "$as_me:4218: result: $PATH_SEPARATOR" >&5
4219 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4221 echo "$as_me:4221: checking if you have specified an install-prefix" >&5
4222 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4224 # Check whether --with-install-prefix or --without-install-prefix was given.
4225 if test "${with_install_prefix+set}" = set; then
4226 withval="$with_install_prefix"
4230 (*) DESTDIR="$withval"
4234 echo "$as_me:4234: result: $DESTDIR" >&5
4235 echo "${ECHO_T}$DESTDIR" >&6
4237 ###############################################################################
4239 # If we're cross-compiling, allow the user to override the tools and their
4240 # options. The configure script is oriented toward identifying the host
4241 # compiler, etc., but we need a build compiler to generate parts of the source.
4243 if test "$cross_compiling" = yes ; then
4245 # defaults that we might want to override
4246 : ${BUILD_CFLAGS:=''}
4247 : ${BUILD_CPPFLAGS:=''}
4248 : ${BUILD_LDFLAGS:=''}
4250 : ${BUILD_EXEEXT:='$x'}
4251 : ${BUILD_OBJEXT:='o'}
4253 # Check whether --with-build-cc or --without-build-cc was given.
4254 if test "${with_build_cc+set}" = set; then
4255 withval="$with_build_cc"
4258 for ac_prog in gcc clang c99 c89 cc cl
4260 # Extract the first word of "$ac_prog", so it can be a program name with args.
4261 set dummy $ac_prog; ac_word=$2
4262 echo "$as_me:4262: checking for $ac_word" >&5
4263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4264 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4265 echo $ECHO_N "(cached) $ECHO_C" >&6
4267 if test -n "$BUILD_CC"; then
4268 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4270 ac_save_IFS=$IFS; IFS=$ac_path_separator
4272 for ac_dir in $ac_dummy; do
4274 test -z "$ac_dir" && ac_dir=.
4275 $as_executable_p "$ac_dir/$ac_word" || continue
4276 ac_cv_prog_BUILD_CC="$ac_prog"
4277 echo "$as_me:4277: found $ac_dir/$ac_word" >&5
4283 BUILD_CC=$ac_cv_prog_BUILD_CC
4284 if test -n "$BUILD_CC"; then
4285 echo "$as_me:4285: result: $BUILD_CC" >&5
4286 echo "${ECHO_T}$BUILD_CC" >&6
4288 echo "$as_me:4288: result: no" >&5
4289 echo "${ECHO_T}no" >&6
4292 test -n "$BUILD_CC" && break
4294 test -n "$BUILD_CC" || BUILD_CC="none"
4297 echo "$as_me:4297: checking for native build C compiler" >&5
4298 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4299 echo "$as_me:4299: result: $BUILD_CC" >&5
4300 echo "${ECHO_T}$BUILD_CC" >&6
4302 echo "$as_me:4302: checking for native build C preprocessor" >&5
4303 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4305 # Check whether --with-build-cpp or --without-build-cpp was given.
4306 if test "${with_build_cpp+set}" = set; then
4307 withval="$with_build_cpp"
4308 BUILD_CPP="$withval"
4310 BUILD_CPP='${BUILD_CC} -E'
4312 echo "$as_me:4312: result: $BUILD_CPP" >&5
4313 echo "${ECHO_T}$BUILD_CPP" >&6
4315 echo "$as_me:4315: checking for native build C flags" >&5
4316 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4318 # Check whether --with-build-cflags or --without-build-cflags was given.
4319 if test "${with_build_cflags+set}" = set; then
4320 withval="$with_build_cflags"
4321 BUILD_CFLAGS="$withval"
4323 echo "$as_me:4323: result: $BUILD_CFLAGS" >&5
4324 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4326 echo "$as_me:4326: checking for native build C preprocessor-flags" >&5
4327 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4329 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4330 if test "${with_build_cppflags+set}" = set; then
4331 withval="$with_build_cppflags"
4332 BUILD_CPPFLAGS="$withval"
4334 echo "$as_me:4334: result: $BUILD_CPPFLAGS" >&5
4335 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4337 echo "$as_me:4337: checking for native build linker-flags" >&5
4338 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4340 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4341 if test "${with_build_ldflags+set}" = set; then
4342 withval="$with_build_ldflags"
4343 BUILD_LDFLAGS="$withval"
4345 echo "$as_me:4345: result: $BUILD_LDFLAGS" >&5
4346 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4348 echo "$as_me:4348: checking for native build linker-libraries" >&5
4349 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4351 # Check whether --with-build-libs or --without-build-libs was given.
4352 if test "${with_build_libs+set}" = set; then
4353 withval="$with_build_libs"
4354 BUILD_LIBS="$withval"
4356 echo "$as_me:4356: result: $BUILD_LIBS" >&5
4357 echo "${ECHO_T}$BUILD_LIBS" >&6
4359 # this assumes we're on Unix.
4363 : ${BUILD_CC:='${CC}'}
4365 echo "$as_me:4365: checking if the build-compiler \"$BUILD_CC\" works" >&5
4366 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
4368 cf_save_crossed=$cross_compiling
4369 cf_save_ac_link=$ac_link
4371 cf_build_cppflags=$BUILD_CPPFLAGS
4372 test "$cf_build_cppflags" = "#" && cf_build_cppflags=
4373 ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
4375 if test "$cross_compiling" = yes; then
4376 cf_ok_build_cc=unknown
4378 cat >"conftest.$ac_ext" <<_ACEOF
4379 #line 4379 "configure"
4380 #include "confdefs.h"
4382 int main(int argc, char *argv[])
4384 ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
4388 rm -f "conftest$ac_exeext"
4389 if { (eval echo "$as_me:4389: \"$ac_link\"") >&5
4390 (eval $ac_link) 2>&5
4392 echo "$as_me:4392: \$? = $ac_status" >&5
4393 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4394 { (eval echo "$as_me:4394: \"$ac_try\"") >&5
4397 echo "$as_me:4397: \$? = $ac_status" >&5
4398 (exit "$ac_status"); }; }; then
4401 echo "$as_me: program exited with status $ac_status" >&5
4402 echo "$as_me: failed program was:" >&5
4403 cat "conftest.$ac_ext" >&5
4406 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4409 cross_compiling=$cf_save_crossed
4410 ac_link=$cf_save_ac_link
4412 echo "$as_me:4412: result: $cf_ok_build_cc" >&5
4413 echo "${ECHO_T}$cf_ok_build_cc" >&6
4415 if test "$cf_ok_build_cc" != yes
4417 { { echo "$as_me:4417: error: Cross-build requires two compilers.
4418 Use --with-build-cc to specify the native compiler." >&5
4419 echo "$as_me: error: Cross-build requires two compilers.
4420 Use --with-build-cc to specify the native compiler." >&2;}
4421 { (exit 1); exit 1; }; }
4425 : ${BUILD_CC:='${CC}'}
4426 : ${BUILD_CPP:='${CPP}'}
4427 : ${BUILD_CFLAGS:='${CFLAGS}'}
4428 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4429 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4430 : ${BUILD_LIBS:='${LIBS}'}
4431 : ${BUILD_EXEEXT:='$x'}
4432 : ${BUILD_OBJEXT:='o'}
4435 ###############################################################################
4437 ### Options to allow the user to specify the set of libraries which are used.
4438 ### Use "--without-normal --with-shared" to allow the default model to be
4439 ### shared, for example.
4442 echo "$as_me:4442: checking if you want to build shared C-objects" >&5
4443 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4445 # Check whether --with-shared or --without-shared was given.
4446 if test "${with_shared+set}" = set; then
4447 withval="$with_shared"
4448 with_shared=$withval
4452 echo "$as_me:4452: result: $with_shared" >&5
4453 echo "${ECHO_T}$with_shared" >&6
4454 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4456 echo "$as_me:4456: checking for specified models" >&5
4457 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4458 test -z "$cf_list_models" && cf_list_models=normal
4459 echo "$as_me:4459: result: $cf_list_models" >&5
4460 echo "${ECHO_T}$cf_list_models" >&6
4462 ### Use the first model as the default, and save its suffix for use in building
4463 ### up test-applications.
4464 echo "$as_me:4464: checking for default model" >&5
4465 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4466 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4467 echo "$as_me:4467: result: $DFT_LWR_MODEL" >&5
4468 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4470 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4472 echo "$as_me:4472: checking for specific curses-directory" >&5
4473 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4475 # Check whether --with-curses-dir or --without-curses-dir was given.
4476 if test "${with_curses_dir+set}" = set; then
4477 withval="$with_curses_dir"
4478 cf_cv_curses_dir=$withval
4482 echo "$as_me:4482: result: $cf_cv_curses_dir" >&5
4483 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4485 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4488 if test "x$prefix" != xNONE; then
4489 cf_path_syntax="$prefix"
4491 cf_path_syntax="$ac_default_prefix"
4499 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4501 (.\$\{*prefix\}*|.\$\{*dir\}*)
4502 eval withval="$withval"
4505 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4510 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4513 { { echo "$as_me:4513: error: expected a pathname, not \"$withval\"" >&5
4514 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4515 { (exit 1); exit 1; }; }
4519 if test -d "$cf_cv_curses_dir"
4522 if test -n "$cf_cv_curses_dir/include" ; then
4523 for cf_add_incdir in $cf_cv_curses_dir/include
4525 while test "$cf_add_incdir" != /usr/include
4527 if test -d "$cf_add_incdir"
4530 if test -n "$CFLAGS$CPPFLAGS" ; then
4531 # a loop is needed to ensure we can add subdirs of existing dirs
4532 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4533 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4534 cf_have_incdir=yes; break
4539 if test "$cf_have_incdir" = no ; then
4540 if test "$cf_add_incdir" = /usr/local/include ; then
4541 if test "$GCC" = yes
4543 cf_save_CPPFLAGS=$CPPFLAGS
4545 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4546 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4548 cat >"conftest.$ac_ext" <<_ACEOF
4549 #line 4549 "configure"
4550 #include "confdefs.h"
4560 rm -f "conftest.$ac_objext"
4561 if { (eval echo "$as_me:4561: \"$ac_compile\"") >&5
4562 (eval $ac_compile) 2>&5
4564 echo "$as_me:4564: \$? = $ac_status" >&5
4565 (exit "$ac_status"); } &&
4566 { ac_try='test -s "conftest.$ac_objext"'
4567 { (eval echo "$as_me:4567: \"$ac_try\"") >&5
4570 echo "$as_me:4570: \$? = $ac_status" >&5
4571 (exit "$ac_status"); }; }; then
4574 echo "$as_me: failed program was:" >&5
4575 cat "conftest.$ac_ext" >&5
4578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4579 CPPFLAGS=$cf_save_CPPFLAGS
4584 if test "$cf_have_incdir" = no ; then
4585 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4587 echo "${as_me:-configure}:4587: testing adding $cf_add_incdir to include-path ..." 1>&5
4589 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4591 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4592 test "$cf_top_incdir" = "$cf_add_incdir" && break
4593 cf_add_incdir="$cf_top_incdir"
4604 if test -n "$cf_cv_curses_dir/lib" ; then
4605 for cf_add_libdir in $cf_cv_curses_dir/lib
4607 if test "$cf_add_libdir" = /usr/lib ; then
4609 elif test -d "$cf_add_libdir"
4612 if test -n "$LDFLAGS$LIBS" ; then
4613 # a loop is needed to ensure we can add subdirs of existing dirs
4614 for cf_test_libdir in $LDFLAGS $LIBS ; do
4615 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4616 cf_have_libdir=yes; break
4620 if test "$cf_have_libdir" = no ; then
4621 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4623 echo "${as_me:-configure}:4623: testing adding $cf_add_libdir to library-path ..." 1>&5
4625 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4634 cf_ncuconfig_root=ncurses
4635 cf_have_ncuconfig=no
4637 if test "x${PKG_CONFIG:=none}" != xnone; then
4638 echo "$as_me:4638: checking pkg-config for $cf_ncuconfig_root" >&5
4639 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4640 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4641 echo "$as_me:4641: result: yes" >&5
4642 echo "${ECHO_T}yes" >&6
4644 echo "$as_me:4644: checking if the $cf_ncuconfig_root package files work" >&5
4645 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4646 cf_have_ncuconfig=unknown
4648 cf_save_CFLAGS="$CFLAGS"
4649 cf_save_CPPFLAGS="$CPPFLAGS"
4650 cf_save_LIBS="$LIBS"
4652 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4653 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4655 # while -W for passing linker flags is prevalent, it is not "standard".
4656 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4657 # incompatible _and_ non-standard -W option which gives an error. Work
4658 # around that pitfall.
4659 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4665 cf_new_extra_cppflags=
4667 for cf_add_cflags in $cf_pkg_cflags
4669 case "$cf_fix_cppflags" in
4671 case "$cf_add_cflags" in
4672 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4673 case "$cf_add_cflags" in
4675 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4677 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4678 && test -z "${cf_tst_cflags}" \
4679 && cf_fix_cppflags=yes
4681 if test "$cf_fix_cppflags" = yes ; then
4683 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4684 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4687 elif test "${cf_tst_cflags}" = "\"'" ; then
4689 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4690 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4700 case "$cf_add_cflags" in
4702 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4704 CPPFLAGS=`echo "$CPPFLAGS" | \
4705 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4706 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4711 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4712 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4719 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4720 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4727 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4728 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4730 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4732 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4733 && test -z "${cf_tst_cflags}" \
4734 && cf_fix_cppflags=no
4739 if test -n "$cf_new_cflags" ; then
4741 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4742 CFLAGS="${CFLAGS}$cf_new_cflags"
4746 if test -n "$cf_new_cppflags" ; then
4748 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4749 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4753 if test -n "$cf_new_extra_cppflags" ; then
4755 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4756 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4763 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4765 for cf_add_1lib in $cf_add_0lib; do
4766 for cf_add_2lib in $cf_add_libs; do
4767 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4772 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4776 cat >"conftest.$ac_ext" <<_ACEOF
4777 #line 4777 "configure"
4778 #include "confdefs.h"
4779 #include <${cf_cv_ncurses_header:-curses.h}>
4783 initscr(); mousemask(0,0); tigetstr((char *)0);
4788 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4789 if { (eval echo "$as_me:4789: \"$ac_link\"") >&5
4790 (eval $ac_link) 2>&5
4792 echo "$as_me:4792: \$? = $ac_status" >&5
4793 (exit "$ac_status"); } &&
4794 { ac_try='test -s "conftest$ac_exeext"'
4795 { (eval echo "$as_me:4795: \"$ac_try\"") >&5
4798 echo "$as_me:4798: \$? = $ac_status" >&5
4799 (exit "$ac_status"); }; }; then
4800 if test "$cross_compiling" = yes; then
4801 cf_test_ncuconfig=maybe
4803 cat >"conftest.$ac_ext" <<_ACEOF
4804 #line 4804 "configure"
4805 #include "confdefs.h"
4806 #include <${cf_cv_ncurses_header:-curses.h}>
4808 { const char *xx = curses_version(); return (xx == 0); }
4810 rm -f "conftest$ac_exeext"
4811 if { (eval echo "$as_me:4811: \"$ac_link\"") >&5
4812 (eval $ac_link) 2>&5
4814 echo "$as_me:4814: \$? = $ac_status" >&5
4815 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4816 { (eval echo "$as_me:4816: \"$ac_try\"") >&5
4819 echo "$as_me:4819: \$? = $ac_status" >&5
4820 (exit "$ac_status"); }; }; then
4821 cf_test_ncuconfig=yes
4823 echo "$as_me: program exited with status $ac_status" >&5
4824 echo "$as_me: failed program was:" >&5
4825 cat "conftest.$ac_ext" >&5
4826 cf_test_ncuconfig=no
4828 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4831 echo "$as_me: failed program was:" >&5
4832 cat "conftest.$ac_ext" >&5
4833 cf_test_ncuconfig=no
4835 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4837 CFLAGS="$cf_save_CFLAGS"
4838 CPPFLAGS="$cf_save_CPPFLAGS"
4839 LIBS="$cf_save_LIBS"
4841 if test "x$cf_test_ncuconfig" != xyes; then
4842 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4843 cf_pkg_cflags="$cf_temp"
4844 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4845 cf_pkg_libs="$cf_temp"
4850 for cf_add_cflags in $cf_pkg_cflags
4852 case "x$cf_add_cflags" in
4855 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4858 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'`
4859 test "$CFLAGS" != "$cf_old_cflag" || break
4861 CFLAGS="$cf_old_cflag"
4864 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4867 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'`
4868 test "$CPPFLAGS" != "$cf_old_cflag" || break
4870 CPPFLAGS="$cf_old_cflag"
4879 cf_new_extra_cppflags=
4881 for cf_add_cflags in $cf_add_cflags
4883 case "$cf_fix_cppflags" in
4885 case "$cf_add_cflags" in
4886 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4887 case "$cf_add_cflags" in
4889 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4891 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4892 && test -z "${cf_tst_cflags}" \
4893 && cf_fix_cppflags=yes
4895 if test "$cf_fix_cppflags" = yes ; then
4897 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4898 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4901 elif test "${cf_tst_cflags}" = "\"'" ; then
4903 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4904 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4914 case "$cf_add_cflags" in
4916 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4918 CPPFLAGS=`echo "$CPPFLAGS" | \
4919 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4920 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4925 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4926 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4933 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4934 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4941 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4942 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4944 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4946 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4947 && test -z "${cf_tst_cflags}" \
4948 && cf_fix_cppflags=no
4953 if test -n "$cf_new_cflags" ; then
4955 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4956 CFLAGS="${CFLAGS}$cf_new_cflags"
4960 if test -n "$cf_new_cppflags" ; then
4962 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4963 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4967 if test -n "$cf_new_extra_cppflags" ; then
4969 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4970 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4979 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4981 for cf_add_1lib in $cf_add_0lib; do
4982 for cf_add_2lib in $cf_add_libs; do
4983 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4988 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4992 cat >"conftest.$ac_ext" <<_ACEOF
4993 #line 4993 "configure"
4994 #include "confdefs.h"
4995 #include <${cf_cv_ncurses_header:-curses.h}>
4999 initscr(); mousemask(0,0); tigetstr((char *)0);
5004 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5005 if { (eval echo "$as_me:5005: \"$ac_link\"") >&5
5006 (eval $ac_link) 2>&5
5008 echo "$as_me:5008: \$? = $ac_status" >&5
5009 (exit "$ac_status"); } &&
5010 { ac_try='test -s "conftest$ac_exeext"'
5011 { (eval echo "$as_me:5011: \"$ac_try\"") >&5
5014 echo "$as_me:5014: \$? = $ac_status" >&5
5015 (exit "$ac_status"); }; }; then
5016 if test "$cross_compiling" = yes; then
5017 cf_have_ncuconfig=maybe
5019 cat >"conftest.$ac_ext" <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022 #include <${cf_cv_ncurses_header:-curses.h}>
5024 { const char *xx = curses_version(); return (xx == 0); }
5026 rm -f "conftest$ac_exeext"
5027 if { (eval echo "$as_me:5027: \"$ac_link\"") >&5
5028 (eval $ac_link) 2>&5
5030 echo "$as_me:5030: \$? = $ac_status" >&5
5031 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5032 { (eval echo "$as_me:5032: \"$ac_try\"") >&5
5035 echo "$as_me:5035: \$? = $ac_status" >&5
5036 (exit "$ac_status"); }; }; then
5037 cf_have_ncuconfig=yes
5039 echo "$as_me: program exited with status $ac_status" >&5
5040 echo "$as_me: failed program was:" >&5
5041 cat "conftest.$ac_ext" >&5
5042 cf_have_ncuconfig=no
5044 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5047 echo "$as_me: failed program was:" >&5
5048 cat "conftest.$ac_ext" >&5
5049 cf_have_ncuconfig=no
5051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5052 echo "$as_me:5052: result: $cf_have_ncuconfig" >&5
5053 echo "${ECHO_T}$cf_have_ncuconfig" >&6
5054 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
5055 if test "$cf_have_ncuconfig" != "yes"
5057 CPPFLAGS="$cf_save_CPPFLAGS"
5058 LIBS="$cf_save_LIBS"
5059 NCURSES_CONFIG_PKG=none
5062 cat >>confdefs.h <<\EOF
5066 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
5068 echo "$as_me:5068: checking for terminfo header" >&5
5069 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5070 if test "${cf_cv_term_header+set}" = set; then
5071 echo $ECHO_N "(cached) $ECHO_C" >&6
5074 case "${cf_cv_ncurses_header}" in
5075 (*/ncurses.h|*/ncursesw.h)
5076 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5079 cf_term_header=term.h
5083 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5085 cat >"conftest.$ac_ext" <<_ACEOF
5086 #line 5086 "configure"
5087 #include "confdefs.h"
5089 #include <${cf_cv_ncurses_header:-curses.h}>
5095 int x = auto_left_margin; (void)x
5100 rm -f "conftest.$ac_objext"
5101 if { (eval echo "$as_me:5101: \"$ac_compile\"") >&5
5102 (eval $ac_compile) 2>&5
5104 echo "$as_me:5104: \$? = $ac_status" >&5
5105 (exit "$ac_status"); } &&
5106 { ac_try='test -s "conftest.$ac_objext"'
5107 { (eval echo "$as_me:5107: \"$ac_try\"") >&5
5110 echo "$as_me:5110: \$? = $ac_status" >&5
5111 (exit "$ac_status"); }; }; then
5113 cf_cv_term_header="$cf_test"
5115 echo "$as_me: failed program was:" >&5
5116 cat "conftest.$ac_ext" >&5
5118 cf_cv_term_header=unknown
5121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5122 test "$cf_cv_term_header" != unknown && break
5126 echo "$as_me:5126: result: $cf_cv_term_header" >&5
5127 echo "${ECHO_T}$cf_cv_term_header" >&6
5129 # Set definitions to allow ifdef'ing to accommodate subdirectories
5131 case "$cf_cv_term_header" in
5134 cat >>confdefs.h <<\EOF
5135 #define HAVE_TERM_H 1
5141 case "$cf_cv_term_header" in
5144 cat >>confdefs.h <<\EOF
5145 #define HAVE_NCURSES_TERM_H 1
5151 cat >>confdefs.h <<\EOF
5152 #define HAVE_NCURSESW_TERM_H 1
5161 echo "$as_me:5161: result: no" >&5
5162 echo "${ECHO_T}no" >&6
5163 NCURSES_CONFIG_PKG=none
5166 NCURSES_CONFIG_PKG=none
5169 if test "x$cf_have_ncuconfig" = "xno"; then
5170 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
5172 if test -n "$ac_tool_prefix"; then
5173 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5175 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5176 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5177 echo "$as_me:5177: checking for $ac_word" >&5
5178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5179 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5182 if test -n "$NCURSES_CONFIG"; then
5183 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
5185 ac_save_IFS=$IFS; IFS=$ac_path_separator
5187 for ac_dir in $ac_dummy; do
5189 test -z "$ac_dir" && ac_dir=.
5190 $as_executable_p "$ac_dir/$ac_word" || continue
5191 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
5192 echo "$as_me:5192: found $ac_dir/$ac_word" >&5
5198 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
5199 if test -n "$NCURSES_CONFIG"; then
5200 echo "$as_me:5200: result: $NCURSES_CONFIG" >&5
5201 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5203 echo "$as_me:5203: result: no" >&5
5204 echo "${ECHO_T}no" >&6
5207 test -n "$NCURSES_CONFIG" && break
5210 if test -z "$NCURSES_CONFIG"; then
5211 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5212 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5214 # Extract the first word of "$ac_prog", so it can be a program name with args.
5215 set dummy $ac_prog; ac_word=$2
5216 echo "$as_me:5216: checking for $ac_word" >&5
5217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5218 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5219 echo $ECHO_N "(cached) $ECHO_C" >&6
5221 if test -n "$ac_ct_NCURSES_CONFIG"; then
5222 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5224 ac_save_IFS=$IFS; IFS=$ac_path_separator
5226 for ac_dir in $ac_dummy; do
5228 test -z "$ac_dir" && ac_dir=.
5229 $as_executable_p "$ac_dir/$ac_word" || continue
5230 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5231 echo "$as_me:5231: found $ac_dir/$ac_word" >&5
5237 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5238 if test -n "$ac_ct_NCURSES_CONFIG"; then
5239 echo "$as_me:5239: result: $ac_ct_NCURSES_CONFIG" >&5
5240 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5242 echo "$as_me:5242: result: no" >&5
5243 echo "${ECHO_T}no" >&6
5246 test -n "$ac_ct_NCURSES_CONFIG" && break
5248 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5250 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5253 if test "$NCURSES_CONFIG" != none ; then
5255 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5257 case "x$cf_add_cflags" in
5260 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5263 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'`
5264 test "$CFLAGS" != "$cf_old_cflag" || break
5266 CFLAGS="$cf_old_cflag"
5269 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5272 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'`
5273 test "$CPPFLAGS" != "$cf_old_cflag" || break
5275 CPPFLAGS="$cf_old_cflag"
5284 cf_new_extra_cppflags=
5286 for cf_add_cflags in $cf_add_cflags
5288 case "$cf_fix_cppflags" in
5290 case "$cf_add_cflags" in
5291 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5292 case "$cf_add_cflags" in
5294 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5296 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5297 && test -z "${cf_tst_cflags}" \
5298 && cf_fix_cppflags=yes
5300 if test "$cf_fix_cppflags" = yes ; then
5302 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5303 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5306 elif test "${cf_tst_cflags}" = "\"'" ; then
5308 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5309 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5319 case "$cf_add_cflags" in
5321 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5323 CPPFLAGS=`echo "$CPPFLAGS" | \
5324 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5325 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5330 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5331 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5338 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5339 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5349 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5351 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5352 && test -z "${cf_tst_cflags}" \
5353 && cf_fix_cppflags=no
5358 if test -n "$cf_new_cflags" ; then
5360 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5361 CFLAGS="${CFLAGS}$cf_new_cflags"
5365 if test -n "$cf_new_cppflags" ; then
5367 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5368 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5372 if test -n "$cf_new_extra_cppflags" ; then
5374 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5375 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5384 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5386 for cf_add_1lib in $cf_add_0lib; do
5387 for cf_add_2lib in $cf_add_libs; do
5388 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5393 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5397 # even with config script, some packages use no-override for curses.h
5399 echo "$as_me:5399: checking if we have identified curses headers" >&5
5400 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5401 if test "${cf_cv_ncurses_header+set}" = set; then
5402 echo $ECHO_N "(cached) $ECHO_C" >&6
5405 cf_cv_ncurses_header=none
5407 ncurses.h ncurses/ncurses.h \
5408 curses.h ncurses/curses.h
5410 cat >"conftest.$ac_ext" <<_ACEOF
5411 #line 5411 "configure"
5412 #include "confdefs.h"
5413 #include <${cf_header}>
5422 rm -f "conftest.$ac_objext"
5423 if { (eval echo "$as_me:5423: \"$ac_compile\"") >&5
5424 (eval $ac_compile) 2>&5
5426 echo "$as_me:5426: \$? = $ac_status" >&5
5427 (exit "$ac_status"); } &&
5428 { ac_try='test -s "conftest.$ac_objext"'
5429 { (eval echo "$as_me:5429: \"$ac_try\"") >&5
5432 echo "$as_me:5432: \$? = $ac_status" >&5
5433 (exit "$ac_status"); }; }; then
5434 cf_cv_ncurses_header=$cf_header; break
5436 echo "$as_me: failed program was:" >&5
5437 cat "conftest.$ac_ext" >&5
5439 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5443 echo "$as_me:5443: result: $cf_cv_ncurses_header" >&5
5444 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5446 if test "$cf_cv_ncurses_header" = none ; then
5447 { { echo "$as_me:5447: error: No curses header-files found" >&5
5448 echo "$as_me: error: No curses header-files found" >&2;}
5449 { (exit 1); exit 1; }; }
5452 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5454 for ac_header in $cf_cv_ncurses_header
5456 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5457 echo "$as_me:5457: checking for $ac_header" >&5
5458 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5459 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5460 echo $ECHO_N "(cached) $ECHO_C" >&6
5462 cat >"conftest.$ac_ext" <<_ACEOF
5463 #line 5463 "configure"
5464 #include "confdefs.h"
5465 #include <$ac_header>
5467 if { (eval echo "$as_me:5467: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5468 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5470 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5472 cat conftest.err >&5
5473 echo "$as_me:5473: \$? = $ac_status" >&5
5474 (exit "$ac_status"); } >/dev/null; then
5475 if test -s conftest.err; then
5476 ac_cpp_err=$ac_c_preproc_warn_flag
5483 if test -z "$ac_cpp_err"; then
5484 eval "$as_ac_Header=yes"
5486 echo "$as_me: failed program was:" >&5
5487 cat "conftest.$ac_ext" >&5
5488 eval "$as_ac_Header=no"
5490 rm -f conftest.err "conftest.$ac_ext"
5492 echo "$as_me:5492: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5493 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5494 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5495 cat >>confdefs.h <<EOF
5496 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5502 cat >>confdefs.h <<\EOF
5506 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5508 cat >>confdefs.h <<EOF
5509 #define $cf_nculib_ROOT 1
5512 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5516 cf_ncuhdr_root=ncurses
5518 test -n "$cf_cv_curses_dir" && \
5519 test "$cf_cv_curses_dir" != "no" && { \
5521 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5522 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5524 while test "$cf_add_incdir" != /usr/include
5526 if test -d "$cf_add_incdir"
5529 if test -n "$CFLAGS$CPPFLAGS" ; then
5530 # a loop is needed to ensure we can add subdirs of existing dirs
5531 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5532 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5533 cf_have_incdir=yes; break
5538 if test "$cf_have_incdir" = no ; then
5539 if test "$cf_add_incdir" = /usr/local/include ; then
5540 if test "$GCC" = yes
5542 cf_save_CPPFLAGS=$CPPFLAGS
5544 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5545 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5547 cat >"conftest.$ac_ext" <<_ACEOF
5548 #line 5548 "configure"
5549 #include "confdefs.h"
5559 rm -f "conftest.$ac_objext"
5560 if { (eval echo "$as_me:5560: \"$ac_compile\"") >&5
5561 (eval $ac_compile) 2>&5
5563 echo "$as_me:5563: \$? = $ac_status" >&5
5564 (exit "$ac_status"); } &&
5565 { ac_try='test -s "conftest.$ac_objext"'
5566 { (eval echo "$as_me:5566: \"$ac_try\"") >&5
5569 echo "$as_me:5569: \$? = $ac_status" >&5
5570 (exit "$ac_status"); }; }; then
5573 echo "$as_me: failed program was:" >&5
5574 cat "conftest.$ac_ext" >&5
5577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5578 CPPFLAGS=$cf_save_CPPFLAGS
5583 if test "$cf_have_incdir" = no ; then
5584 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5586 echo "${as_me:-configure}:5586: testing adding $cf_add_incdir to include-path ..." 1>&5
5588 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5590 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5591 test "$cf_top_incdir" = "$cf_add_incdir" && break
5592 cf_add_incdir="$cf_top_incdir"
5605 echo "$as_me:5605: checking for $cf_ncuhdr_root header in include-path" >&5
5606 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5607 if test "${cf_cv_ncurses_h+set}" = set; then
5608 echo $ECHO_N "(cached) $ECHO_C" >&6
5611 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5612 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5613 for cf_header in $cf_header_list
5616 cat >"conftest.$ac_ext" <<_ACEOF
5617 #line 5617 "configure"
5618 #include "confdefs.h"
5620 #include <$cf_header>
5625 #ifdef NCURSES_VERSION
5627 printf("%s\\n", NCURSES_VERSION);
5632 #error __NCURSES_H is not defined
5640 rm -f "conftest.$ac_objext"
5641 if { (eval echo "$as_me:5641: \"$ac_compile\"") >&5
5642 (eval $ac_compile) 2>&5
5644 echo "$as_me:5644: \$? = $ac_status" >&5
5645 (exit "$ac_status"); } &&
5646 { ac_try='test -s "conftest.$ac_objext"'
5647 { (eval echo "$as_me:5647: \"$ac_try\"") >&5
5650 echo "$as_me:5650: \$? = $ac_status" >&5
5651 (exit "$ac_status"); }; }; then
5652 cf_cv_ncurses_h=$cf_header
5655 echo "$as_me: failed program was:" >&5
5656 cat "conftest.$ac_ext" >&5
5659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5661 test "$cf_cv_ncurses_h" != no && break
5665 echo "$as_me:5665: result: $cf_cv_ncurses_h" >&5
5666 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5668 if test "$cf_cv_ncurses_h" != no ; then
5669 cf_cv_ncurses_header=$cf_cv_ncurses_h
5672 echo "$as_me:5672: checking for $cf_ncuhdr_root include-path" >&5
5673 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5674 if test "${cf_cv_ncurses_h2+set}" = set; then
5675 echo $ECHO_N "(cached) $ECHO_C" >&6
5678 test -n "$verbose" && echo
5682 # collect the current set of include-directories from compiler flags
5683 cf_header_path_list=""
5684 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5685 for cf_header_path in $CPPFLAGS $CFLAGS
5687 case "$cf_header_path" in
5689 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5691 test "x$cf_header_path" != "xNONE" && \
5692 test -d "$cf_header_path" && \
5694 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5695 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5696 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5697 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5698 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5699 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"
5702 cf_header_path_list="$cf_header_path_list $cf_search"
5708 # add the variations for the package we are looking for
5712 test "x$prefix" != "xNONE" && \
5713 test -d "$prefix" && \
5715 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5716 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5717 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5718 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5719 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5720 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5723 for cf_subdir_prefix in \
5732 test "x$cf_subdir_prefix" != "x$prefix" && \
5733 test -d "$cf_subdir_prefix" && \
5734 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5735 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5736 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5737 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5738 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5739 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5740 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"
5745 test "$includedir" != NONE && \
5746 test "$includedir" != "/usr/include" && \
5747 test -d "$includedir" && {
5748 test -d "$includedir" && cf_search="$cf_search $includedir"
5749 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5752 test "$oldincludedir" != NONE && \
5753 test "$oldincludedir" != "/usr/include" && \
5754 test -d "$oldincludedir" && {
5755 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5756 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5759 cf_search="$cf_search $cf_header_path_list"
5761 test -n "$verbose" && echo "search path $cf_search"
5762 cf_save2_CPPFLAGS="$CPPFLAGS"
5763 for cf_incdir in $cf_search
5766 if test -n "$cf_incdir" ; then
5767 for cf_add_incdir in $cf_incdir
5769 while test "$cf_add_incdir" != /usr/include
5771 if test -d "$cf_add_incdir"
5774 if test -n "$CFLAGS$CPPFLAGS" ; then
5775 # a loop is needed to ensure we can add subdirs of existing dirs
5776 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5777 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5778 cf_have_incdir=yes; break
5783 if test "$cf_have_incdir" = no ; then
5784 if test "$cf_add_incdir" = /usr/local/include ; then
5785 if test "$GCC" = yes
5787 cf_save_CPPFLAGS=$CPPFLAGS
5789 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5790 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5792 cat >"conftest.$ac_ext" <<_ACEOF
5793 #line 5793 "configure"
5794 #include "confdefs.h"
5804 rm -f "conftest.$ac_objext"
5805 if { (eval echo "$as_me:5805: \"$ac_compile\"") >&5
5806 (eval $ac_compile) 2>&5
5808 echo "$as_me:5808: \$? = $ac_status" >&5
5809 (exit "$ac_status"); } &&
5810 { ac_try='test -s "conftest.$ac_objext"'
5811 { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5814 echo "$as_me:5814: \$? = $ac_status" >&5
5815 (exit "$ac_status"); }; }; then
5818 echo "$as_me: failed program was:" >&5
5819 cat "conftest.$ac_ext" >&5
5822 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5823 CPPFLAGS=$cf_save_CPPFLAGS
5828 if test "$cf_have_incdir" = no ; then
5829 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5831 echo "${as_me:-configure}:5831: testing adding $cf_add_incdir to include-path ..." 1>&5
5833 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5835 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5836 test "$cf_top_incdir" = "$cf_add_incdir" && break
5837 cf_add_incdir="$cf_top_incdir"
5853 cat >"conftest.$ac_ext" <<_ACEOF
5854 #line 5854 "configure"
5855 #include "confdefs.h"
5857 #include <$cf_header>
5862 #ifdef NCURSES_VERSION
5864 printf("%s\\n", NCURSES_VERSION);
5869 #error __NCURSES_H is not defined
5877 rm -f "conftest.$ac_objext"
5878 if { (eval echo "$as_me:5878: \"$ac_compile\"") >&5
5879 (eval $ac_compile) 2>&5
5881 echo "$as_me:5881: \$? = $ac_status" >&5
5882 (exit "$ac_status"); } &&
5883 { ac_try='test -s "conftest.$ac_objext"'
5884 { (eval echo "$as_me:5884: \"$ac_try\"") >&5
5887 echo "$as_me:5887: \$? = $ac_status" >&5
5888 (exit "$ac_status"); }; }; then
5889 cf_cv_ncurses_h2=$cf_header
5892 echo "$as_me: failed program was:" >&5
5893 cat "conftest.$ac_ext" >&5
5896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5898 if test "$cf_cv_ncurses_h2" != no ; then
5899 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5900 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5903 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5905 CPPFLAGS="$cf_save2_CPPFLAGS"
5906 test "$cf_cv_ncurses_h2" != no && break
5908 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5908: error: not found" >&5
5909 echo "$as_me: error: not found" >&2;}
5910 { (exit 1); exit 1; }; }
5913 echo "$as_me:5913: result: $cf_cv_ncurses_h2" >&5
5914 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5916 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5917 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5918 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5919 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5922 if test -n "$cf_1st_incdir" ; then
5923 for cf_add_incdir in $cf_1st_incdir
5925 while test "$cf_add_incdir" != /usr/include
5927 if test -d "$cf_add_incdir"
5930 if test -n "$CFLAGS$CPPFLAGS" ; then
5931 # a loop is needed to ensure we can add subdirs of existing dirs
5932 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5933 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5934 cf_have_incdir=yes; break
5939 if test "$cf_have_incdir" = no ; then
5940 if test "$cf_add_incdir" = /usr/local/include ; then
5941 if test "$GCC" = yes
5943 cf_save_CPPFLAGS=$CPPFLAGS
5945 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5946 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5948 cat >"conftest.$ac_ext" <<_ACEOF
5949 #line 5949 "configure"
5950 #include "confdefs.h"
5960 rm -f "conftest.$ac_objext"
5961 if { (eval echo "$as_me:5961: \"$ac_compile\"") >&5
5962 (eval $ac_compile) 2>&5
5964 echo "$as_me:5964: \$? = $ac_status" >&5
5965 (exit "$ac_status"); } &&
5966 { ac_try='test -s "conftest.$ac_objext"'
5967 { (eval echo "$as_me:5967: \"$ac_try\"") >&5
5970 echo "$as_me:5970: \$? = $ac_status" >&5
5971 (exit "$ac_status"); }; }; then
5974 echo "$as_me: failed program was:" >&5
5975 cat "conftest.$ac_ext" >&5
5978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5979 CPPFLAGS=$cf_save_CPPFLAGS
5984 if test "$cf_have_incdir" = no ; then
5985 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5987 echo "${as_me:-configure}:5987: testing adding $cf_add_incdir to include-path ..." 1>&5
5989 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5991 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5992 test "$cf_top_incdir" = "$cf_add_incdir" && break
5993 cf_add_incdir="$cf_top_incdir"
6006 # Set definitions to allow ifdef'ing for ncurses.h
6008 case "$cf_cv_ncurses_header" in
6011 cat >>confdefs.h <<\EOF
6012 #define HAVE_NCURSES_H 1
6018 case "$cf_cv_ncurses_header" in
6019 (ncurses/curses.h|ncurses/ncurses.h)
6021 cat >>confdefs.h <<\EOF
6022 #define HAVE_NCURSES_NCURSES_H 1
6026 (ncursesw/curses.h|ncursesw/ncurses.h)
6028 cat >>confdefs.h <<\EOF
6029 #define HAVE_NCURSESW_NCURSES_H 1
6035 echo "$as_me:6035: checking for terminfo header" >&5
6036 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6037 if test "${cf_cv_term_header+set}" = set; then
6038 echo $ECHO_N "(cached) $ECHO_C" >&6
6041 case "${cf_cv_ncurses_header}" in
6042 (*/ncurses.h|*/ncursesw.h)
6043 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6046 cf_term_header=term.h
6050 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6052 cat >"conftest.$ac_ext" <<_ACEOF
6053 #line 6053 "configure"
6054 #include "confdefs.h"
6056 #include <${cf_cv_ncurses_header:-curses.h}>
6062 int x = auto_left_margin; (void)x
6067 rm -f "conftest.$ac_objext"
6068 if { (eval echo "$as_me:6068: \"$ac_compile\"") >&5
6069 (eval $ac_compile) 2>&5
6071 echo "$as_me:6071: \$? = $ac_status" >&5
6072 (exit "$ac_status"); } &&
6073 { ac_try='test -s "conftest.$ac_objext"'
6074 { (eval echo "$as_me:6074: \"$ac_try\"") >&5
6077 echo "$as_me:6077: \$? = $ac_status" >&5
6078 (exit "$ac_status"); }; }; then
6080 cf_cv_term_header="$cf_test"
6082 echo "$as_me: failed program was:" >&5
6083 cat "conftest.$ac_ext" >&5
6085 cf_cv_term_header=unknown
6088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6089 test "$cf_cv_term_header" != unknown && break
6093 echo "$as_me:6093: result: $cf_cv_term_header" >&5
6094 echo "${ECHO_T}$cf_cv_term_header" >&6
6096 # Set definitions to allow ifdef'ing to accommodate subdirectories
6098 case "$cf_cv_term_header" in
6101 cat >>confdefs.h <<\EOF
6102 #define HAVE_TERM_H 1
6108 case "$cf_cv_term_header" in
6111 cat >>confdefs.h <<\EOF
6112 #define HAVE_NCURSES_TERM_H 1
6118 cat >>confdefs.h <<\EOF
6119 #define HAVE_NCURSESW_TERM_H 1
6125 # some applications need this, but should check for NCURSES_VERSION
6127 cat >>confdefs.h <<\EOF
6131 echo "$as_me:6131: checking for ncurses version" >&5
6132 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
6133 if test "${cf_cv_ncurses_version+set}" = set; then
6134 echo $ECHO_N "(cached) $ECHO_C" >&6
6137 cf_cv_ncurses_version=no
6139 rm -f "$cf_tempfile"
6140 if test "$cross_compiling" = yes; then
6142 # This will not work if the preprocessor splits the line after the
6143 # Autoconf token. The 'unproto' program does that.
6144 cat > "conftest.$ac_ext" <<EOF
6145 #include <${cf_cv_ncurses_header:-curses.h}>
6147 #ifdef NCURSES_VERSION
6148 Autoconf NCURSES_VERSION
6156 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6157 { (eval echo "$as_me:6157: \"$cf_try\"") >&5
6160 echo "$as_me:6160: \$? = $ac_status" >&5
6161 (exit "$ac_status"); }
6162 if test -f conftest.out ; then
6163 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
6164 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6169 cat >"conftest.$ac_ext" <<_ACEOF
6170 #line 6170 "configure"
6171 #include "confdefs.h"
6173 $ac_includes_default
6175 #include <${cf_cv_ncurses_header:-curses.h}>
6179 FILE *fp = fopen("$cf_tempfile", "w");
6180 #ifdef NCURSES_VERSION
6181 # ifdef NCURSES_VERSION_PATCH
6182 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6184 fprintf(fp, "%s\\n", NCURSES_VERSION);
6188 fprintf(fp, "old\\n");
6193 ${cf_cv_main_return:-return}(0);
6196 rm -f "conftest$ac_exeext"
6197 if { (eval echo "$as_me:6197: \"$ac_link\"") >&5
6198 (eval $ac_link) 2>&5
6200 echo "$as_me:6200: \$? = $ac_status" >&5
6201 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6202 { (eval echo "$as_me:6202: \"$ac_try\"") >&5
6205 echo "$as_me:6205: \$? = $ac_status" >&5
6206 (exit "$ac_status"); }; }; then
6208 cf_cv_ncurses_version=`cat $cf_tempfile`
6210 echo "$as_me: program exited with status $ac_status" >&5
6211 echo "$as_me: failed program was:" >&5
6212 cat "conftest.$ac_ext" >&5
6214 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6216 rm -f "$cf_tempfile"
6219 echo "$as_me:6219: result: $cf_cv_ncurses_version" >&5
6220 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
6221 test "$cf_cv_ncurses_version" = no ||
6222 cat >>confdefs.h <<\EOF
6226 cf_nculib_root=ncurses
6227 # This works, except for the special case where we find gpm, but
6228 # ncurses is in a nonstandard location via $LIBS, and we really want
6231 cf_ncurses_SAVE="$LIBS"
6232 echo "$as_me:6232: checking for Gpm_Open in -lgpm" >&5
6233 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6234 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6235 echo $ECHO_N "(cached) $ECHO_C" >&6
6237 ac_check_lib_save_LIBS=$LIBS
6239 cat >"conftest.$ac_ext" <<_ACEOF
6240 #line 6240 "configure"
6241 #include "confdefs.h"
6243 /* Override any gcc2 internal prototype to avoid an error. */
6247 /* We use char because int might match the return type of a gcc2
6248 builtin and then its argument prototype would still apply. */
6258 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6259 if { (eval echo "$as_me:6259: \"$ac_link\"") >&5
6260 (eval $ac_link) 2>&5
6262 echo "$as_me:6262: \$? = $ac_status" >&5
6263 (exit "$ac_status"); } &&
6264 { ac_try='test -s "conftest$ac_exeext"'
6265 { (eval echo "$as_me:6265: \"$ac_try\"") >&5
6268 echo "$as_me:6268: \$? = $ac_status" >&5
6269 (exit "$ac_status"); }; }; then
6270 ac_cv_lib_gpm_Gpm_Open=yes
6272 echo "$as_me: failed program was:" >&5
6273 cat "conftest.$ac_ext" >&5
6274 ac_cv_lib_gpm_Gpm_Open=no
6276 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6277 LIBS=$ac_check_lib_save_LIBS
6279 echo "$as_me:6279: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6280 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6281 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6282 echo "$as_me:6282: checking for initscr in -lgpm" >&5
6283 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6284 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6285 echo $ECHO_N "(cached) $ECHO_C" >&6
6287 ac_check_lib_save_LIBS=$LIBS
6289 cat >"conftest.$ac_ext" <<_ACEOF
6290 #line 6290 "configure"
6291 #include "confdefs.h"
6293 /* Override any gcc2 internal prototype to avoid an error. */
6297 /* We use char because int might match the return type of a gcc2
6298 builtin and then its argument prototype would still apply. */
6308 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6309 if { (eval echo "$as_me:6309: \"$ac_link\"") >&5
6310 (eval $ac_link) 2>&5
6312 echo "$as_me:6312: \$? = $ac_status" >&5
6313 (exit "$ac_status"); } &&
6314 { ac_try='test -s "conftest$ac_exeext"'
6315 { (eval echo "$as_me:6315: \"$ac_try\"") >&5
6318 echo "$as_me:6318: \$? = $ac_status" >&5
6319 (exit "$ac_status"); }; }; then
6320 ac_cv_lib_gpm_initscr=yes
6322 echo "$as_me: failed program was:" >&5
6323 cat "conftest.$ac_ext" >&5
6324 ac_cv_lib_gpm_initscr=no
6326 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6327 LIBS=$ac_check_lib_save_LIBS
6329 echo "$as_me:6329: result: $ac_cv_lib_gpm_initscr" >&5
6330 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6331 if test "$ac_cv_lib_gpm_initscr" = yes; then
6332 LIBS="$cf_ncurses_SAVE"
6334 cf_ncurses_LIBS="-lgpm"
6341 # This is only necessary if you are linking against an obsolete
6342 # version of ncurses (but it should do no harm, since it is static).
6343 if test "$cf_nculib_root" = ncurses ; then
6344 echo "$as_me:6344: checking for tgoto in -lmytinfo" >&5
6345 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6346 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6347 echo $ECHO_N "(cached) $ECHO_C" >&6
6349 ac_check_lib_save_LIBS=$LIBS
6350 LIBS="-lmytinfo $LIBS"
6351 cat >"conftest.$ac_ext" <<_ACEOF
6352 #line 6352 "configure"
6353 #include "confdefs.h"
6355 /* Override any gcc2 internal prototype to avoid an error. */
6359 /* We use char because int might match the return type of a gcc2
6360 builtin and then its argument prototype would still apply. */
6370 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6371 if { (eval echo "$as_me:6371: \"$ac_link\"") >&5
6372 (eval $ac_link) 2>&5
6374 echo "$as_me:6374: \$? = $ac_status" >&5
6375 (exit "$ac_status"); } &&
6376 { ac_try='test -s "conftest$ac_exeext"'
6377 { (eval echo "$as_me:6377: \"$ac_try\"") >&5
6380 echo "$as_me:6380: \$? = $ac_status" >&5
6381 (exit "$ac_status"); }; }; then
6382 ac_cv_lib_mytinfo_tgoto=yes
6384 echo "$as_me: failed program was:" >&5
6385 cat "conftest.$ac_ext" >&5
6386 ac_cv_lib_mytinfo_tgoto=no
6388 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6389 LIBS=$ac_check_lib_save_LIBS
6391 echo "$as_me:6391: result: $ac_cv_lib_mytinfo_tgoto" >&5
6392 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6393 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6394 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6404 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6406 for cf_add_1lib in $cf_add_0lib; do
6407 for cf_add_2lib in $cf_add_libs; do
6408 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6413 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6417 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6423 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6425 for cf_add_1lib in $cf_add_0lib; do
6426 for cf_add_2lib in $cf_add_libs; do
6427 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6432 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6438 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6440 echo "$as_me:6440: checking for initscr" >&5
6441 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6442 if test "${ac_cv_func_initscr+set}" = set; then
6443 echo $ECHO_N "(cached) $ECHO_C" >&6
6445 cat >"conftest.$ac_ext" <<_ACEOF
6446 #line 6446 "configure"
6447 #include "confdefs.h"
6448 #define initscr autoconf_temporary
6449 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6456 /* We use char because int might match the return type of a gcc2
6457 builtin and then its argument prototype would still apply. */
6458 char initscr (void);
6464 /* The GNU C library defines stubs for functions which it implements
6465 to always fail with ENOSYS. Some functions are actually named
6466 something starting with __ and the normal name is an alias. */
6467 #if defined (__stub_initscr) || defined (__stub___initscr)
6468 #error found stub for initscr
6476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6477 if { (eval echo "$as_me:6477: \"$ac_link\"") >&5
6478 (eval $ac_link) 2>&5
6480 echo "$as_me:6480: \$? = $ac_status" >&5
6481 (exit "$ac_status"); } &&
6482 { ac_try='test -s "conftest$ac_exeext"'
6483 { (eval echo "$as_me:6483: \"$ac_try\"") >&5
6486 echo "$as_me:6486: \$? = $ac_status" >&5
6487 (exit "$ac_status"); }; }; then
6488 ac_cv_func_initscr=yes
6490 echo "$as_me: failed program was:" >&5
6491 cat "conftest.$ac_ext" >&5
6492 ac_cv_func_initscr=no
6494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6496 echo "$as_me:6496: result: $ac_cv_func_initscr" >&5
6497 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6498 if test "$ac_cv_func_initscr" = yes; then
6499 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6502 cf_save_LIBS="$LIBS"
6503 echo "$as_me:6503: checking for initscr in -l$cf_nculib_root" >&5
6504 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6505 LIBS="-l$cf_nculib_root $LIBS"
6506 cat >"conftest.$ac_ext" <<_ACEOF
6507 #line 6507 "configure"
6508 #include "confdefs.h"
6509 #include <${cf_cv_ncurses_header:-curses.h}>
6518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6519 if { (eval echo "$as_me:6519: \"$ac_link\"") >&5
6520 (eval $ac_link) 2>&5
6522 echo "$as_me:6522: \$? = $ac_status" >&5
6523 (exit "$ac_status"); } &&
6524 { ac_try='test -s "conftest$ac_exeext"'
6525 { (eval echo "$as_me:6525: \"$ac_try\"") >&5
6528 echo "$as_me:6528: \$? = $ac_status" >&5
6529 (exit "$ac_status"); }; }; then
6530 echo "$as_me:6530: result: yes" >&5
6531 echo "${ECHO_T}yes" >&6
6532 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6535 echo "$as_me: failed program was:" >&5
6536 cat "conftest.$ac_ext" >&5
6537 echo "$as_me:6537: result: no" >&5
6538 echo "${ECHO_T}no" >&6
6541 cf_library_path_list=""
6542 if test -n "${LDFLAGS}${LIBS}" ; then
6543 for cf_library_path in $LDFLAGS $LIBS
6545 case "$cf_library_path" in
6547 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6549 test "x$cf_library_path" != "xNONE" && \
6550 test -d "$cf_library_path" && \
6552 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6553 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6554 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6555 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6556 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6557 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"
6560 cf_library_path_list="$cf_library_path_list $cf_search"
6568 test "x$prefix" != "xNONE" && \
6569 test -d "$prefix" && \
6571 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6572 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6573 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6574 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6575 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6576 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6579 for cf_subdir_prefix in \
6588 test "x$cf_subdir_prefix" != "x$prefix" && \
6589 test -d "$cf_subdir_prefix" && \
6590 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6591 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6592 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6593 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6594 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6595 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6596 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"
6601 cf_search="$cf_library_path_list $cf_search"
6603 for cf_libdir in $cf_search
6605 echo "$as_me:6605: checking for -l$cf_nculib_root in $cf_libdir" >&5
6606 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6607 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6608 cat >"conftest.$ac_ext" <<_ACEOF
6609 #line 6609 "configure"
6610 #include "confdefs.h"
6611 #include <${cf_cv_ncurses_header:-curses.h}>
6620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6621 if { (eval echo "$as_me:6621: \"$ac_link\"") >&5
6622 (eval $ac_link) 2>&5
6624 echo "$as_me:6624: \$? = $ac_status" >&5
6625 (exit "$ac_status"); } &&
6626 { ac_try='test -s "conftest$ac_exeext"'
6627 { (eval echo "$as_me:6627: \"$ac_try\"") >&5
6630 echo "$as_me:6630: \$? = $ac_status" >&5
6631 (exit "$ac_status"); }; }; then
6632 echo "$as_me:6632: result: yes" >&5
6633 echo "${ECHO_T}yes" >&6
6634 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6637 echo "$as_me: failed program was:" >&5
6638 cat "conftest.$ac_ext" >&5
6639 echo "$as_me:6639: result: no" >&5
6640 echo "${ECHO_T}no" >&6
6641 LIBS="$cf_save_LIBS"
6643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6651 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6653 if test "$cf_found_library" = no ; then
6654 { { echo "$as_me:6654: error: Cannot link $cf_nculib_root library" >&5
6655 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6656 { (exit 1); exit 1; }; }
6661 if test -n "$cf_ncurses_LIBS" ; then
6662 echo "$as_me:6662: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6663 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6664 cf_ncurses_SAVE="$LIBS"
6665 for p in $cf_ncurses_LIBS ; do
6666 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6667 if test "$q" != "$LIBS" ; then
6671 cat >"conftest.$ac_ext" <<_ACEOF
6672 #line 6672 "configure"
6673 #include "confdefs.h"
6674 #include <${cf_cv_ncurses_header:-curses.h}>
6678 initscr(); mousemask(0,0); tigetstr((char *)0);
6683 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6684 if { (eval echo "$as_me:6684: \"$ac_link\"") >&5
6685 (eval $ac_link) 2>&5
6687 echo "$as_me:6687: \$? = $ac_status" >&5
6688 (exit "$ac_status"); } &&
6689 { ac_try='test -s "conftest$ac_exeext"'
6690 { (eval echo "$as_me:6690: \"$ac_try\"") >&5
6693 echo "$as_me:6693: \$? = $ac_status" >&5
6694 (exit "$ac_status"); }; }; then
6695 echo "$as_me:6695: result: yes" >&5
6696 echo "${ECHO_T}yes" >&6
6698 echo "$as_me: failed program was:" >&5
6699 cat "conftest.$ac_ext" >&5
6700 echo "$as_me:6700: result: no" >&5
6701 echo "${ECHO_T}no" >&6
6702 LIBS="$cf_ncurses_SAVE"
6704 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6707 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6709 cat >>confdefs.h <<EOF
6710 #define $cf_nculib_ROOT 1
6718 echo "$as_me:6718: checking if you want wide-character code" >&5
6719 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6721 # Check whether --enable-widec or --disable-widec was given.
6722 if test "${enable_widec+set}" = set; then
6723 enableval="$enable_widec"
6724 with_widec=$enableval
6728 echo "$as_me:6728: result: $with_widec" >&5
6729 echo "${ECHO_T}$with_widec" >&6
6730 if test "$with_widec" = yes ; then
6732 for ac_header in wchar.h
6734 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6735 echo "$as_me:6735: checking for $ac_header" >&5
6736 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6737 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6738 echo $ECHO_N "(cached) $ECHO_C" >&6
6740 cat >"conftest.$ac_ext" <<_ACEOF
6741 #line 6741 "configure"
6742 #include "confdefs.h"
6743 #include <$ac_header>
6745 if { (eval echo "$as_me:6745: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6746 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6748 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6750 cat conftest.err >&5
6751 echo "$as_me:6751: \$? = $ac_status" >&5
6752 (exit "$ac_status"); } >/dev/null; then
6753 if test -s conftest.err; then
6754 ac_cpp_err=$ac_c_preproc_warn_flag
6761 if test -z "$ac_cpp_err"; then
6762 eval "$as_ac_Header=yes"
6764 echo "$as_me: failed program was:" >&5
6765 cat "conftest.$ac_ext" >&5
6766 eval "$as_ac_Header=no"
6768 rm -f conftest.err "conftest.$ac_ext"
6770 echo "$as_me:6770: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6771 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6772 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6773 cat >>confdefs.h <<EOF
6774 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6780 echo "$as_me:6780: checking for multibyte character support" >&5
6781 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6782 if test "${cf_cv_utf8_lib+set}" = set; then
6783 echo $ECHO_N "(cached) $ECHO_C" >&6
6786 cf_save_LIBS="$LIBS"
6787 cat >"conftest.$ac_ext" <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6791 $ac_includes_default
6804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6805 if { (eval echo "$as_me:6805: \"$ac_link\"") >&5
6806 (eval $ac_link) 2>&5
6808 echo "$as_me:6808: \$? = $ac_status" >&5
6809 (exit "$ac_status"); } &&
6810 { ac_try='test -s "conftest$ac_exeext"'
6811 { (eval echo "$as_me:6811: \"$ac_try\"") >&5
6814 echo "$as_me:6814: \$? = $ac_status" >&5
6815 (exit "$ac_status"); }; }; then
6818 echo "$as_me: failed program was:" >&5
6819 cat "conftest.$ac_ext" >&5
6821 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6822 # will be set on completion of the AC_TRY_LINK below.
6823 cf_cv_header_path_utf8=
6824 cf_cv_library_path_utf8=
6826 echo "${as_me:-configure}:6826: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6828 cf_save_LIBS="$LIBS"
6830 cat >"conftest.$ac_ext" <<_ACEOF
6831 #line 6831 "configure"
6832 #include "confdefs.h"
6834 #include <libutf8.h>
6843 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6844 if { (eval echo "$as_me:6844: \"$ac_link\"") >&5
6845 (eval $ac_link) 2>&5
6847 echo "$as_me:6847: \$? = $ac_status" >&5
6848 (exit "$ac_status"); } &&
6849 { ac_try='test -s "conftest$ac_exeext"'
6850 { (eval echo "$as_me:6850: \"$ac_try\"") >&5
6853 echo "$as_me:6853: \$? = $ac_status" >&5
6854 (exit "$ac_status"); }; }; then
6856 cf_cv_find_linkage_utf8=yes
6857 cf_cv_header_path_utf8=/usr/include
6858 cf_cv_library_path_utf8=/usr/lib
6861 echo "$as_me: failed program was:" >&5
6862 cat "conftest.$ac_ext" >&5
6864 LIBS="-lutf8 $cf_save_LIBS"
6866 cat >"conftest.$ac_ext" <<_ACEOF
6867 #line 6867 "configure"
6868 #include "confdefs.h"
6870 #include <libutf8.h>
6879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6880 if { (eval echo "$as_me:6880: \"$ac_link\"") >&5
6881 (eval $ac_link) 2>&5
6883 echo "$as_me:6883: \$? = $ac_status" >&5
6884 (exit "$ac_status"); } &&
6885 { ac_try='test -s "conftest$ac_exeext"'
6886 { (eval echo "$as_me:6886: \"$ac_try\"") >&5
6889 echo "$as_me:6889: \$? = $ac_status" >&5
6890 (exit "$ac_status"); }; }; then
6892 cf_cv_find_linkage_utf8=yes
6893 cf_cv_header_path_utf8=/usr/include
6894 cf_cv_library_path_utf8=/usr/lib
6895 cf_cv_library_file_utf8="-lutf8"
6898 echo "$as_me: failed program was:" >&5
6899 cat "conftest.$ac_ext" >&5
6901 cf_cv_find_linkage_utf8=no
6902 LIBS="$cf_save_LIBS"
6904 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6906 echo "${as_me:-configure}:6906: testing find linkage for utf8 library ..." 1>&5
6908 echo "${as_me:-configure}:6908: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6910 cf_save_CPPFLAGS="$CPPFLAGS"
6911 cf_test_CPPFLAGS="$CPPFLAGS"
6915 # collect the current set of include-directories from compiler flags
6916 cf_header_path_list=""
6917 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6918 for cf_header_path in $CPPFLAGS $CFLAGS
6920 case "$cf_header_path" in
6922 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6924 test "x$cf_header_path" != "xNONE" && \
6925 test -d "$cf_header_path" && \
6927 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6928 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6929 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6930 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6931 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6932 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6935 cf_header_path_list="$cf_header_path_list $cf_search"
6941 # add the variations for the package we are looking for
6945 test "x$prefix" != "xNONE" && \
6946 test -d "$prefix" && \
6948 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6949 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6950 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6951 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6952 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6953 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6956 for cf_subdir_prefix in \
6965 test "x$cf_subdir_prefix" != "x$prefix" && \
6966 test -d "$cf_subdir_prefix" && \
6967 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6968 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6969 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6970 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6971 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6972 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6973 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6978 test "$includedir" != NONE && \
6979 test "$includedir" != "/usr/include" && \
6980 test -d "$includedir" && {
6981 test -d "$includedir" && cf_search="$cf_search $includedir"
6982 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6985 test "$oldincludedir" != NONE && \
6986 test "$oldincludedir" != "/usr/include" && \
6987 test -d "$oldincludedir" && {
6988 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6989 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6992 cf_search="$cf_search $cf_header_path_list"
6994 for cf_cv_header_path_utf8 in $cf_search
6996 if test -d "$cf_cv_header_path_utf8" ; then
6997 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6999 echo "${as_me:-configure}:6999: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7001 CPPFLAGS="$cf_save_CPPFLAGS"
7003 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7004 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
7006 cat >"conftest.$ac_ext" <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7010 #include <libutf8.h>
7019 rm -f "conftest.$ac_objext"
7020 if { (eval echo "$as_me:7020: \"$ac_compile\"") >&5
7021 (eval $ac_compile) 2>&5
7023 echo "$as_me:7023: \$? = $ac_status" >&5
7024 (exit "$ac_status"); } &&
7025 { ac_try='test -s "conftest.$ac_objext"'
7026 { (eval echo "$as_me:7026: \"$ac_try\"") >&5
7029 echo "$as_me:7029: \$? = $ac_status" >&5
7030 (exit "$ac_status"); }; }; then
7032 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7034 echo "${as_me:-configure}:7034: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7036 cf_cv_find_linkage_utf8=maybe
7037 cf_test_CPPFLAGS="$CPPFLAGS"
7040 echo "$as_me: failed program was:" >&5
7041 cat "conftest.$ac_ext" >&5
7043 CPPFLAGS="$cf_save_CPPFLAGS"
7046 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7050 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7052 echo "${as_me:-configure}:7052: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7054 cf_save_LIBS="$LIBS"
7055 cf_save_LDFLAGS="$LDFLAGS"
7057 if test "$cf_cv_find_linkage_utf8" != yes ; then
7060 cf_library_path_list=""
7061 if test -n "${LDFLAGS}${LIBS}" ; then
7062 for cf_library_path in $LDFLAGS $LIBS
7064 case "$cf_library_path" in
7066 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7068 test "x$cf_library_path" != "xNONE" && \
7069 test -d "$cf_library_path" && \
7071 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7072 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
7073 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
7074 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7075 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
7076 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7079 cf_library_path_list="$cf_library_path_list $cf_search"
7087 test "x$prefix" != "xNONE" && \
7088 test -d "$prefix" && \
7090 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7091 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
7092 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
7093 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
7094 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
7095 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
7098 for cf_subdir_prefix in \
7107 test "x$cf_subdir_prefix" != "x$prefix" && \
7108 test -d "$cf_subdir_prefix" && \
7109 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
7110 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
7111 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
7112 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
7113 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
7114 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
7115 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
7120 cf_search="$cf_library_path_list $cf_search"
7122 for cf_cv_library_path_utf8 in $cf_search
7124 if test -d "$cf_cv_library_path_utf8" ; then
7125 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
7127 echo "${as_me:-configure}:7127: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7129 CPPFLAGS="$cf_test_CPPFLAGS"
7130 LIBS="-lutf8 $cf_save_LIBS"
7131 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7132 cat >"conftest.$ac_ext" <<_ACEOF
7133 #line 7133 "configure"
7134 #include "confdefs.h"
7136 #include <libutf8.h>
7145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7146 if { (eval echo "$as_me:7146: \"$ac_link\"") >&5
7147 (eval $ac_link) 2>&5
7149 echo "$as_me:7149: \$? = $ac_status" >&5
7150 (exit "$ac_status"); } &&
7151 { ac_try='test -s "conftest$ac_exeext"'
7152 { (eval echo "$as_me:7152: \"$ac_try\"") >&5
7155 echo "$as_me:7155: \$? = $ac_status" >&5
7156 (exit "$ac_status"); }; }; then
7158 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7160 echo "${as_me:-configure}:7160: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7162 cf_cv_find_linkage_utf8=yes
7163 cf_cv_library_file_utf8="-lutf8"
7166 echo "$as_me: failed program was:" >&5
7167 cat "conftest.$ac_ext" >&5
7169 CPPFLAGS="$cf_save_CPPFLAGS"
7170 LIBS="$cf_save_LIBS"
7171 LDFLAGS="$cf_save_LDFLAGS"
7174 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7177 CPPFLAGS="$cf_save_CPPFLAGS"
7178 LDFLAGS="$cf_save_LDFLAGS"
7182 cf_cv_find_linkage_utf8=no
7186 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7191 LIBS="$cf_save_LIBS"
7193 if test "$cf_cv_find_linkage_utf8" = yes ; then
7194 cf_cv_utf8_lib=add-on
7200 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7202 echo "$as_me:7202: result: $cf_cv_utf8_lib" >&5
7203 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7205 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7207 if test "$cf_cv_utf8_lib" = "add-on" ; then
7209 cat >>confdefs.h <<\EOF
7210 #define HAVE_LIBUTF8_H 1
7213 if test -n "$cf_cv_header_path_utf8" ; then
7214 for cf_add_incdir in $cf_cv_header_path_utf8
7216 while test "$cf_add_incdir" != /usr/include
7218 if test -d "$cf_add_incdir"
7221 if test -n "$CFLAGS$CPPFLAGS" ; then
7222 # a loop is needed to ensure we can add subdirs of existing dirs
7223 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7224 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7225 cf_have_incdir=yes; break
7230 if test "$cf_have_incdir" = no ; then
7231 if test "$cf_add_incdir" = /usr/local/include ; then
7232 if test "$GCC" = yes
7234 cf_save_CPPFLAGS=$CPPFLAGS
7236 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7237 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7239 cat >"conftest.$ac_ext" <<_ACEOF
7240 #line 7240 "configure"
7241 #include "confdefs.h"
7251 rm -f "conftest.$ac_objext"
7252 if { (eval echo "$as_me:7252: \"$ac_compile\"") >&5
7253 (eval $ac_compile) 2>&5
7255 echo "$as_me:7255: \$? = $ac_status" >&5
7256 (exit "$ac_status"); } &&
7257 { ac_try='test -s "conftest.$ac_objext"'
7258 { (eval echo "$as_me:7258: \"$ac_try\"") >&5
7261 echo "$as_me:7261: \$? = $ac_status" >&5
7262 (exit "$ac_status"); }; }; then
7265 echo "$as_me: failed program was:" >&5
7266 cat "conftest.$ac_ext" >&5
7269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7270 CPPFLAGS=$cf_save_CPPFLAGS
7275 if test "$cf_have_incdir" = no ; then
7276 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7278 echo "${as_me:-configure}:7278: testing adding $cf_add_incdir to include-path ..." 1>&5
7280 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7282 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7283 test "$cf_top_incdir" = "$cf_add_incdir" && break
7284 cf_add_incdir="$cf_top_incdir"
7295 if test -n "$cf_cv_library_path_utf8" ; then
7296 for cf_add_libdir in $cf_cv_library_path_utf8
7298 if test "$cf_add_libdir" = /usr/lib ; then
7300 elif test -d "$cf_add_libdir"
7303 if test -n "$LDFLAGS$LIBS" ; then
7304 # a loop is needed to ensure we can add subdirs of existing dirs
7305 for cf_test_libdir in $LDFLAGS $LIBS ; do
7306 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7307 cf_have_libdir=yes; break
7311 if test "$cf_have_libdir" = no ; then
7312 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7314 echo "${as_me:-configure}:7314: testing adding $cf_add_libdir to library-path ..." 1>&5
7316 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7325 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7327 for cf_add_1lib in $cf_add_0lib; do
7328 for cf_add_2lib in $cf_add_libs; do
7329 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7334 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7340 cf_ncuconfig_root=ncursesw
7341 cf_have_ncuconfig=no
7343 if test "x${PKG_CONFIG:=none}" != xnone; then
7344 echo "$as_me:7344: checking pkg-config for $cf_ncuconfig_root" >&5
7345 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7346 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7347 echo "$as_me:7347: result: yes" >&5
7348 echo "${ECHO_T}yes" >&6
7350 echo "$as_me:7350: checking if the $cf_ncuconfig_root package files work" >&5
7351 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7352 cf_have_ncuconfig=unknown
7354 cf_save_CFLAGS="$CFLAGS"
7355 cf_save_CPPFLAGS="$CPPFLAGS"
7356 cf_save_LIBS="$LIBS"
7358 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7359 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7361 # while -W for passing linker flags is prevalent, it is not "standard".
7362 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7363 # incompatible _and_ non-standard -W option which gives an error. Work
7364 # around that pitfall.
7365 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7371 cf_new_extra_cppflags=
7373 for cf_add_cflags in $cf_pkg_cflags
7375 case "$cf_fix_cppflags" in
7377 case "$cf_add_cflags" in
7378 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7379 case "$cf_add_cflags" in
7381 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7383 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7384 && test -z "${cf_tst_cflags}" \
7385 && cf_fix_cppflags=yes
7387 if test "$cf_fix_cppflags" = yes ; then
7389 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7390 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7393 elif test "${cf_tst_cflags}" = "\"'" ; then
7395 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7396 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7406 case "$cf_add_cflags" in
7408 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7410 CPPFLAGS=`echo "$CPPFLAGS" | \
7411 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7412 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7417 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7418 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7425 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7426 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7433 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7434 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7436 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7438 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7439 && test -z "${cf_tst_cflags}" \
7440 && cf_fix_cppflags=no
7445 if test -n "$cf_new_cflags" ; then
7447 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7448 CFLAGS="${CFLAGS}$cf_new_cflags"
7452 if test -n "$cf_new_cppflags" ; then
7454 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7455 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7459 if test -n "$cf_new_extra_cppflags" ; then
7461 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7462 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7469 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7471 for cf_add_1lib in $cf_add_0lib; do
7472 for cf_add_2lib in $cf_add_libs; do
7473 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7478 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7482 cat >"conftest.$ac_ext" <<_ACEOF
7483 #line 7483 "configure"
7484 #include "confdefs.h"
7485 #include <${cf_cv_ncurses_header:-curses.h}>
7489 initscr(); mousemask(0,0); tigetstr((char *)0);
7494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7495 if { (eval echo "$as_me:7495: \"$ac_link\"") >&5
7496 (eval $ac_link) 2>&5
7498 echo "$as_me:7498: \$? = $ac_status" >&5
7499 (exit "$ac_status"); } &&
7500 { ac_try='test -s "conftest$ac_exeext"'
7501 { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7504 echo "$as_me:7504: \$? = $ac_status" >&5
7505 (exit "$ac_status"); }; }; then
7506 if test "$cross_compiling" = yes; then
7507 cf_test_ncuconfig=maybe
7509 cat >"conftest.$ac_ext" <<_ACEOF
7510 #line 7510 "configure"
7511 #include "confdefs.h"
7512 #include <${cf_cv_ncurses_header:-curses.h}>
7514 { const char *xx = curses_version(); return (xx == 0); }
7516 rm -f "conftest$ac_exeext"
7517 if { (eval echo "$as_me:7517: \"$ac_link\"") >&5
7518 (eval $ac_link) 2>&5
7520 echo "$as_me:7520: \$? = $ac_status" >&5
7521 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7522 { (eval echo "$as_me:7522: \"$ac_try\"") >&5
7525 echo "$as_me:7525: \$? = $ac_status" >&5
7526 (exit "$ac_status"); }; }; then
7527 cf_test_ncuconfig=yes
7529 echo "$as_me: program exited with status $ac_status" >&5
7530 echo "$as_me: failed program was:" >&5
7531 cat "conftest.$ac_ext" >&5
7532 cf_test_ncuconfig=no
7534 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7537 echo "$as_me: failed program was:" >&5
7538 cat "conftest.$ac_ext" >&5
7539 cf_test_ncuconfig=no
7541 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7543 CFLAGS="$cf_save_CFLAGS"
7544 CPPFLAGS="$cf_save_CPPFLAGS"
7545 LIBS="$cf_save_LIBS"
7547 if test "x$cf_test_ncuconfig" != xyes; then
7548 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7549 cf_pkg_cflags="$cf_temp"
7550 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7551 cf_pkg_libs="$cf_temp"
7556 for cf_add_cflags in $cf_pkg_cflags
7558 case "x$cf_add_cflags" in
7561 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7564 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'`
7565 test "$CFLAGS" != "$cf_old_cflag" || break
7567 CFLAGS="$cf_old_cflag"
7570 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7573 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'`
7574 test "$CPPFLAGS" != "$cf_old_cflag" || break
7576 CPPFLAGS="$cf_old_cflag"
7585 cf_new_extra_cppflags=
7587 for cf_add_cflags in $cf_add_cflags
7589 case "$cf_fix_cppflags" in
7591 case "$cf_add_cflags" in
7592 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7593 case "$cf_add_cflags" in
7595 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7597 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7598 && test -z "${cf_tst_cflags}" \
7599 && cf_fix_cppflags=yes
7601 if test "$cf_fix_cppflags" = yes ; then
7603 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7604 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7607 elif test "${cf_tst_cflags}" = "\"'" ; then
7609 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7610 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7620 case "$cf_add_cflags" in
7622 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7624 CPPFLAGS=`echo "$CPPFLAGS" | \
7625 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7626 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7631 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7632 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7639 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7640 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7647 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7648 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7650 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7652 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7653 && test -z "${cf_tst_cflags}" \
7654 && cf_fix_cppflags=no
7659 if test -n "$cf_new_cflags" ; then
7661 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7662 CFLAGS="${CFLAGS}$cf_new_cflags"
7666 if test -n "$cf_new_cppflags" ; then
7668 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7669 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7673 if test -n "$cf_new_extra_cppflags" ; then
7675 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7676 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7685 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7687 for cf_add_1lib in $cf_add_0lib; do
7688 for cf_add_2lib in $cf_add_libs; do
7689 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7694 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7698 cat >"conftest.$ac_ext" <<_ACEOF
7699 #line 7699 "configure"
7700 #include "confdefs.h"
7701 #include <${cf_cv_ncurses_header:-curses.h}>
7705 initscr(); mousemask(0,0); tigetstr((char *)0);
7710 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7711 if { (eval echo "$as_me:7711: \"$ac_link\"") >&5
7712 (eval $ac_link) 2>&5
7714 echo "$as_me:7714: \$? = $ac_status" >&5
7715 (exit "$ac_status"); } &&
7716 { ac_try='test -s "conftest$ac_exeext"'
7717 { (eval echo "$as_me:7717: \"$ac_try\"") >&5
7720 echo "$as_me:7720: \$? = $ac_status" >&5
7721 (exit "$ac_status"); }; }; then
7722 if test "$cross_compiling" = yes; then
7723 cf_have_ncuconfig=maybe
7725 cat >"conftest.$ac_ext" <<_ACEOF
7726 #line 7726 "configure"
7727 #include "confdefs.h"
7728 #include <${cf_cv_ncurses_header:-curses.h}>
7730 { const char *xx = curses_version(); return (xx == 0); }
7732 rm -f "conftest$ac_exeext"
7733 if { (eval echo "$as_me:7733: \"$ac_link\"") >&5
7734 (eval $ac_link) 2>&5
7736 echo "$as_me:7736: \$? = $ac_status" >&5
7737 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7738 { (eval echo "$as_me:7738: \"$ac_try\"") >&5
7741 echo "$as_me:7741: \$? = $ac_status" >&5
7742 (exit "$ac_status"); }; }; then
7743 cf_have_ncuconfig=yes
7745 echo "$as_me: program exited with status $ac_status" >&5
7746 echo "$as_me: failed program was:" >&5
7747 cat "conftest.$ac_ext" >&5
7748 cf_have_ncuconfig=no
7750 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7753 echo "$as_me: failed program was:" >&5
7754 cat "conftest.$ac_ext" >&5
7755 cf_have_ncuconfig=no
7757 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7758 echo "$as_me:7758: result: $cf_have_ncuconfig" >&5
7759 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7760 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7761 if test "$cf_have_ncuconfig" != "yes"
7763 CPPFLAGS="$cf_save_CPPFLAGS"
7764 LIBS="$cf_save_LIBS"
7765 NCURSES_CONFIG_PKG=none
7768 cat >>confdefs.h <<\EOF
7772 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7774 echo "$as_me:7774: checking for terminfo header" >&5
7775 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7776 if test "${cf_cv_term_header+set}" = set; then
7777 echo $ECHO_N "(cached) $ECHO_C" >&6
7780 case "${cf_cv_ncurses_header}" in
7781 (*/ncurses.h|*/ncursesw.h)
7782 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7785 cf_term_header=term.h
7789 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7791 cat >"conftest.$ac_ext" <<_ACEOF
7792 #line 7792 "configure"
7793 #include "confdefs.h"
7795 #include <${cf_cv_ncurses_header:-curses.h}>
7801 int x = auto_left_margin; (void)x
7806 rm -f "conftest.$ac_objext"
7807 if { (eval echo "$as_me:7807: \"$ac_compile\"") >&5
7808 (eval $ac_compile) 2>&5
7810 echo "$as_me:7810: \$? = $ac_status" >&5
7811 (exit "$ac_status"); } &&
7812 { ac_try='test -s "conftest.$ac_objext"'
7813 { (eval echo "$as_me:7813: \"$ac_try\"") >&5
7816 echo "$as_me:7816: \$? = $ac_status" >&5
7817 (exit "$ac_status"); }; }; then
7819 cf_cv_term_header="$cf_test"
7821 echo "$as_me: failed program was:" >&5
7822 cat "conftest.$ac_ext" >&5
7824 cf_cv_term_header=unknown
7827 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7828 test "$cf_cv_term_header" != unknown && break
7832 echo "$as_me:7832: result: $cf_cv_term_header" >&5
7833 echo "${ECHO_T}$cf_cv_term_header" >&6
7835 # Set definitions to allow ifdef'ing to accommodate subdirectories
7837 case "$cf_cv_term_header" in
7840 cat >>confdefs.h <<\EOF
7841 #define HAVE_TERM_H 1
7847 case "$cf_cv_term_header" in
7850 cat >>confdefs.h <<\EOF
7851 #define HAVE_NCURSES_TERM_H 1
7857 cat >>confdefs.h <<\EOF
7858 #define HAVE_NCURSESW_TERM_H 1
7867 echo "$as_me:7867: result: no" >&5
7868 echo "${ECHO_T}no" >&6
7869 NCURSES_CONFIG_PKG=none
7872 NCURSES_CONFIG_PKG=none
7875 if test "x$cf_have_ncuconfig" = "xno"; then
7876 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7878 if test -n "$ac_tool_prefix"; then
7879 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7881 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7882 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7883 echo "$as_me:7883: checking for $ac_word" >&5
7884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7885 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7886 echo $ECHO_N "(cached) $ECHO_C" >&6
7888 if test -n "$NCURSES_CONFIG"; then
7889 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7891 ac_save_IFS=$IFS; IFS=$ac_path_separator
7893 for ac_dir in $ac_dummy; do
7895 test -z "$ac_dir" && ac_dir=.
7896 $as_executable_p "$ac_dir/$ac_word" || continue
7897 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7898 echo "$as_me:7898: found $ac_dir/$ac_word" >&5
7904 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7905 if test -n "$NCURSES_CONFIG"; then
7906 echo "$as_me:7906: result: $NCURSES_CONFIG" >&5
7907 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7909 echo "$as_me:7909: result: no" >&5
7910 echo "${ECHO_T}no" >&6
7913 test -n "$NCURSES_CONFIG" && break
7916 if test -z "$NCURSES_CONFIG"; then
7917 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7918 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7920 # Extract the first word of "$ac_prog", so it can be a program name with args.
7921 set dummy $ac_prog; ac_word=$2
7922 echo "$as_me:7922: checking for $ac_word" >&5
7923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7924 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7925 echo $ECHO_N "(cached) $ECHO_C" >&6
7927 if test -n "$ac_ct_NCURSES_CONFIG"; then
7928 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7930 ac_save_IFS=$IFS; IFS=$ac_path_separator
7932 for ac_dir in $ac_dummy; do
7934 test -z "$ac_dir" && ac_dir=.
7935 $as_executable_p "$ac_dir/$ac_word" || continue
7936 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7937 echo "$as_me:7937: found $ac_dir/$ac_word" >&5
7943 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7944 if test -n "$ac_ct_NCURSES_CONFIG"; then
7945 echo "$as_me:7945: result: $ac_ct_NCURSES_CONFIG" >&5
7946 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7948 echo "$as_me:7948: result: no" >&5
7949 echo "${ECHO_T}no" >&6
7952 test -n "$ac_ct_NCURSES_CONFIG" && break
7954 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7956 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7959 if test "$NCURSES_CONFIG" != none ; then
7961 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7963 case "x$cf_add_cflags" in
7966 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7969 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'`
7970 test "$CFLAGS" != "$cf_old_cflag" || break
7972 CFLAGS="$cf_old_cflag"
7975 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
7978 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'`
7979 test "$CPPFLAGS" != "$cf_old_cflag" || break
7981 CPPFLAGS="$cf_old_cflag"
7990 cf_new_extra_cppflags=
7992 for cf_add_cflags in $cf_add_cflags
7994 case "$cf_fix_cppflags" in
7996 case "$cf_add_cflags" in
7997 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7998 case "$cf_add_cflags" in
8000 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8002 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8003 && test -z "${cf_tst_cflags}" \
8004 && cf_fix_cppflags=yes
8006 if test "$cf_fix_cppflags" = yes ; then
8008 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8009 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8012 elif test "${cf_tst_cflags}" = "\"'" ; then
8014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8025 case "$cf_add_cflags" in
8027 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8029 CPPFLAGS=`echo "$CPPFLAGS" | \
8030 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8031 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8036 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8037 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8044 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8045 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8052 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8053 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8055 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8057 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8058 && test -z "${cf_tst_cflags}" \
8059 && cf_fix_cppflags=no
8064 if test -n "$cf_new_cflags" ; then
8066 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8067 CFLAGS="${CFLAGS}$cf_new_cflags"
8071 if test -n "$cf_new_cppflags" ; then
8073 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8074 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8078 if test -n "$cf_new_extra_cppflags" ; then
8080 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8081 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8090 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8092 for cf_add_1lib in $cf_add_0lib; do
8093 for cf_add_2lib in $cf_add_libs; do
8094 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8099 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8103 # even with config script, some packages use no-override for curses.h
8105 echo "$as_me:8105: checking if we have identified curses headers" >&5
8106 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8107 if test "${cf_cv_ncurses_header+set}" = set; then
8108 echo $ECHO_N "(cached) $ECHO_C" >&6
8111 cf_cv_ncurses_header=none
8113 ncurses.h ncursesw/ncurses.h \
8114 curses.h ncursesw/curses.h
8116 cat >"conftest.$ac_ext" <<_ACEOF
8117 #line 8117 "configure"
8118 #include "confdefs.h"
8119 #include <${cf_header}>
8128 rm -f "conftest.$ac_objext"
8129 if { (eval echo "$as_me:8129: \"$ac_compile\"") >&5
8130 (eval $ac_compile) 2>&5
8132 echo "$as_me:8132: \$? = $ac_status" >&5
8133 (exit "$ac_status"); } &&
8134 { ac_try='test -s "conftest.$ac_objext"'
8135 { (eval echo "$as_me:8135: \"$ac_try\"") >&5
8138 echo "$as_me:8138: \$? = $ac_status" >&5
8139 (exit "$ac_status"); }; }; then
8140 cf_cv_ncurses_header=$cf_header; break
8142 echo "$as_me: failed program was:" >&5
8143 cat "conftest.$ac_ext" >&5
8145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8149 echo "$as_me:8149: result: $cf_cv_ncurses_header" >&5
8150 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8152 if test "$cf_cv_ncurses_header" = none ; then
8153 { { echo "$as_me:8153: error: No curses header-files found" >&5
8154 echo "$as_me: error: No curses header-files found" >&2;}
8155 { (exit 1); exit 1; }; }
8158 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8160 for ac_header in $cf_cv_ncurses_header
8162 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8163 echo "$as_me:8163: checking for $ac_header" >&5
8164 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8165 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8166 echo $ECHO_N "(cached) $ECHO_C" >&6
8168 cat >"conftest.$ac_ext" <<_ACEOF
8169 #line 8169 "configure"
8170 #include "confdefs.h"
8171 #include <$ac_header>
8173 if { (eval echo "$as_me:8173: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8174 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8176 $EGREP -v '^ *\+' conftest.er1 >conftest.err
8178 cat conftest.err >&5
8179 echo "$as_me:8179: \$? = $ac_status" >&5
8180 (exit "$ac_status"); } >/dev/null; then
8181 if test -s conftest.err; then
8182 ac_cpp_err=$ac_c_preproc_warn_flag
8189 if test -z "$ac_cpp_err"; then
8190 eval "$as_ac_Header=yes"
8192 echo "$as_me: failed program was:" >&5
8193 cat "conftest.$ac_ext" >&5
8194 eval "$as_ac_Header=no"
8196 rm -f conftest.err "conftest.$ac_ext"
8198 echo "$as_me:8198: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8199 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8200 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8201 cat >>confdefs.h <<EOF
8202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8208 cat >>confdefs.h <<\EOF
8212 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8214 cat >>confdefs.h <<EOF
8215 #define $cf_nculib_ROOT 1
8218 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
8222 cf_ncuhdr_root=ncursesw
8224 test -n "$cf_cv_curses_dir" && \
8225 test "$cf_cv_curses_dir" != "no" && { \
8227 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8228 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8230 while test "$cf_add_incdir" != /usr/include
8232 if test -d "$cf_add_incdir"
8235 if test -n "$CFLAGS$CPPFLAGS" ; then
8236 # a loop is needed to ensure we can add subdirs of existing dirs
8237 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8238 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8239 cf_have_incdir=yes; break
8244 if test "$cf_have_incdir" = no ; then
8245 if test "$cf_add_incdir" = /usr/local/include ; then
8246 if test "$GCC" = yes
8248 cf_save_CPPFLAGS=$CPPFLAGS
8250 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8251 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8253 cat >"conftest.$ac_ext" <<_ACEOF
8254 #line 8254 "configure"
8255 #include "confdefs.h"
8265 rm -f "conftest.$ac_objext"
8266 if { (eval echo "$as_me:8266: \"$ac_compile\"") >&5
8267 (eval $ac_compile) 2>&5
8269 echo "$as_me:8269: \$? = $ac_status" >&5
8270 (exit "$ac_status"); } &&
8271 { ac_try='test -s "conftest.$ac_objext"'
8272 { (eval echo "$as_me:8272: \"$ac_try\"") >&5
8275 echo "$as_me:8275: \$? = $ac_status" >&5
8276 (exit "$ac_status"); }; }; then
8279 echo "$as_me: failed program was:" >&5
8280 cat "conftest.$ac_ext" >&5
8283 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8284 CPPFLAGS=$cf_save_CPPFLAGS
8289 if test "$cf_have_incdir" = no ; then
8290 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8292 echo "${as_me:-configure}:8292: testing adding $cf_add_incdir to include-path ..." 1>&5
8294 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8296 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8297 test "$cf_top_incdir" = "$cf_add_incdir" && break
8298 cf_add_incdir="$cf_top_incdir"
8311 echo "$as_me:8311: checking for $cf_ncuhdr_root header in include-path" >&5
8312 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8313 if test "${cf_cv_ncurses_h+set}" = set; then
8314 echo $ECHO_N "(cached) $ECHO_C" >&6
8317 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8318 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8319 for cf_header in $cf_header_list
8322 cat >"conftest.$ac_ext" <<_ACEOF
8323 #line 8323 "configure"
8324 #include "confdefs.h"
8326 #define _XOPEN_SOURCE_EXTENDED
8327 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8328 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8330 #include <$cf_header>
8335 #ifdef NCURSES_VERSION
8338 #error WACS_BSSB is not defined
8341 printf("%s\\n", NCURSES_VERSION);
8346 #error __NCURSES_H is not defined
8354 rm -f "conftest.$ac_objext"
8355 if { (eval echo "$as_me:8355: \"$ac_compile\"") >&5
8356 (eval $ac_compile) 2>&5
8358 echo "$as_me:8358: \$? = $ac_status" >&5
8359 (exit "$ac_status"); } &&
8360 { ac_try='test -s "conftest.$ac_objext"'
8361 { (eval echo "$as_me:8361: \"$ac_try\"") >&5
8364 echo "$as_me:8364: \$? = $ac_status" >&5
8365 (exit "$ac_status"); }; }; then
8366 cf_cv_ncurses_h=$cf_header
8369 echo "$as_me: failed program was:" >&5
8370 cat "conftest.$ac_ext" >&5
8373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8375 test "$cf_cv_ncurses_h" != no && break
8379 echo "$as_me:8379: result: $cf_cv_ncurses_h" >&5
8380 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8382 if test "$cf_cv_ncurses_h" != no ; then
8383 cf_cv_ncurses_header=$cf_cv_ncurses_h
8386 echo "$as_me:8386: checking for $cf_ncuhdr_root include-path" >&5
8387 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8388 if test "${cf_cv_ncurses_h2+set}" = set; then
8389 echo $ECHO_N "(cached) $ECHO_C" >&6
8392 test -n "$verbose" && echo
8396 # collect the current set of include-directories from compiler flags
8397 cf_header_path_list=""
8398 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8399 for cf_header_path in $CPPFLAGS $CFLAGS
8401 case "$cf_header_path" in
8403 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8405 test "x$cf_header_path" != "xNONE" && \
8406 test -d "$cf_header_path" && \
8408 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8409 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8410 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8411 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8412 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8413 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"
8416 cf_header_path_list="$cf_header_path_list $cf_search"
8422 # add the variations for the package we are looking for
8426 test "x$prefix" != "xNONE" && \
8427 test -d "$prefix" && \
8429 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8430 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8431 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8432 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8433 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8434 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8437 for cf_subdir_prefix in \
8446 test "x$cf_subdir_prefix" != "x$prefix" && \
8447 test -d "$cf_subdir_prefix" && \
8448 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8449 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8450 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8451 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8452 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8453 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8454 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"
8459 test "$includedir" != NONE && \
8460 test "$includedir" != "/usr/include" && \
8461 test -d "$includedir" && {
8462 test -d "$includedir" && cf_search="$cf_search $includedir"
8463 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8466 test "$oldincludedir" != NONE && \
8467 test "$oldincludedir" != "/usr/include" && \
8468 test -d "$oldincludedir" && {
8469 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8470 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8473 cf_search="$cf_search $cf_header_path_list"
8475 test -n "$verbose" && echo "search path $cf_search"
8476 cf_save2_CPPFLAGS="$CPPFLAGS"
8477 for cf_incdir in $cf_search
8480 if test -n "$cf_incdir" ; then
8481 for cf_add_incdir in $cf_incdir
8483 while test "$cf_add_incdir" != /usr/include
8485 if test -d "$cf_add_incdir"
8488 if test -n "$CFLAGS$CPPFLAGS" ; then
8489 # a loop is needed to ensure we can add subdirs of existing dirs
8490 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8491 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8492 cf_have_incdir=yes; break
8497 if test "$cf_have_incdir" = no ; then
8498 if test "$cf_add_incdir" = /usr/local/include ; then
8499 if test "$GCC" = yes
8501 cf_save_CPPFLAGS=$CPPFLAGS
8503 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8504 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8506 cat >"conftest.$ac_ext" <<_ACEOF
8507 #line 8507 "configure"
8508 #include "confdefs.h"
8518 rm -f "conftest.$ac_objext"
8519 if { (eval echo "$as_me:8519: \"$ac_compile\"") >&5
8520 (eval $ac_compile) 2>&5
8522 echo "$as_me:8522: \$? = $ac_status" >&5
8523 (exit "$ac_status"); } &&
8524 { ac_try='test -s "conftest.$ac_objext"'
8525 { (eval echo "$as_me:8525: \"$ac_try\"") >&5
8528 echo "$as_me:8528: \$? = $ac_status" >&5
8529 (exit "$ac_status"); }; }; then
8532 echo "$as_me: failed program was:" >&5
8533 cat "conftest.$ac_ext" >&5
8536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8537 CPPFLAGS=$cf_save_CPPFLAGS
8542 if test "$cf_have_incdir" = no ; then
8543 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8545 echo "${as_me:-configure}:8545: testing adding $cf_add_incdir to include-path ..." 1>&5
8547 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8549 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8550 test "$cf_top_incdir" = "$cf_add_incdir" && break
8551 cf_add_incdir="$cf_top_incdir"
8567 cat >"conftest.$ac_ext" <<_ACEOF
8568 #line 8568 "configure"
8569 #include "confdefs.h"
8571 #include <$cf_header>
8576 #ifdef NCURSES_VERSION
8578 printf("%s\\n", NCURSES_VERSION);
8583 #error __NCURSES_H is not defined
8591 rm -f "conftest.$ac_objext"
8592 if { (eval echo "$as_me:8592: \"$ac_compile\"") >&5
8593 (eval $ac_compile) 2>&5
8595 echo "$as_me:8595: \$? = $ac_status" >&5
8596 (exit "$ac_status"); } &&
8597 { ac_try='test -s "conftest.$ac_objext"'
8598 { (eval echo "$as_me:8598: \"$ac_try\"") >&5
8601 echo "$as_me:8601: \$? = $ac_status" >&5
8602 (exit "$ac_status"); }; }; then
8603 cf_cv_ncurses_h2=$cf_header
8606 echo "$as_me: failed program was:" >&5
8607 cat "conftest.$ac_ext" >&5
8610 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8612 if test "$cf_cv_ncurses_h2" != no ; then
8613 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8614 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8617 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8619 CPPFLAGS="$cf_save2_CPPFLAGS"
8620 test "$cf_cv_ncurses_h2" != no && break
8622 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8622: error: not found" >&5
8623 echo "$as_me: error: not found" >&2;}
8624 { (exit 1); exit 1; }; }
8627 echo "$as_me:8627: result: $cf_cv_ncurses_h2" >&5
8628 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8630 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8631 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8632 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8633 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8636 if test -n "$cf_1st_incdir" ; then
8637 for cf_add_incdir in $cf_1st_incdir
8639 while test "$cf_add_incdir" != /usr/include
8641 if test -d "$cf_add_incdir"
8644 if test -n "$CFLAGS$CPPFLAGS" ; then
8645 # a loop is needed to ensure we can add subdirs of existing dirs
8646 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8647 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8648 cf_have_incdir=yes; break
8653 if test "$cf_have_incdir" = no ; then
8654 if test "$cf_add_incdir" = /usr/local/include ; then
8655 if test "$GCC" = yes
8657 cf_save_CPPFLAGS=$CPPFLAGS
8659 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8660 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8662 cat >"conftest.$ac_ext" <<_ACEOF
8663 #line 8663 "configure"
8664 #include "confdefs.h"
8674 rm -f "conftest.$ac_objext"
8675 if { (eval echo "$as_me:8675: \"$ac_compile\"") >&5
8676 (eval $ac_compile) 2>&5
8678 echo "$as_me:8678: \$? = $ac_status" >&5
8679 (exit "$ac_status"); } &&
8680 { ac_try='test -s "conftest.$ac_objext"'
8681 { (eval echo "$as_me:8681: \"$ac_try\"") >&5
8684 echo "$as_me:8684: \$? = $ac_status" >&5
8685 (exit "$ac_status"); }; }; then
8688 echo "$as_me: failed program was:" >&5
8689 cat "conftest.$ac_ext" >&5
8692 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8693 CPPFLAGS=$cf_save_CPPFLAGS
8698 if test "$cf_have_incdir" = no ; then
8699 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8701 echo "${as_me:-configure}:8701: testing adding $cf_add_incdir to include-path ..." 1>&5
8703 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8705 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8706 test "$cf_top_incdir" = "$cf_add_incdir" && break
8707 cf_add_incdir="$cf_top_incdir"
8720 # Set definitions to allow ifdef'ing for ncurses.h
8722 case "$cf_cv_ncurses_header" in
8725 cat >>confdefs.h <<\EOF
8726 #define HAVE_NCURSES_H 1
8732 case "$cf_cv_ncurses_header" in
8733 (ncurses/curses.h|ncurses/ncurses.h)
8735 cat >>confdefs.h <<\EOF
8736 #define HAVE_NCURSES_NCURSES_H 1
8740 (ncursesw/curses.h|ncursesw/ncurses.h)
8742 cat >>confdefs.h <<\EOF
8743 #define HAVE_NCURSESW_NCURSES_H 1
8749 echo "$as_me:8749: checking for terminfo header" >&5
8750 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8751 if test "${cf_cv_term_header+set}" = set; then
8752 echo $ECHO_N "(cached) $ECHO_C" >&6
8755 case "${cf_cv_ncurses_header}" in
8756 (*/ncurses.h|*/ncursesw.h)
8757 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8760 cf_term_header=term.h
8764 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8766 cat >"conftest.$ac_ext" <<_ACEOF
8767 #line 8767 "configure"
8768 #include "confdefs.h"
8770 #include <${cf_cv_ncurses_header:-curses.h}>
8776 int x = auto_left_margin; (void)x
8781 rm -f "conftest.$ac_objext"
8782 if { (eval echo "$as_me:8782: \"$ac_compile\"") >&5
8783 (eval $ac_compile) 2>&5
8785 echo "$as_me:8785: \$? = $ac_status" >&5
8786 (exit "$ac_status"); } &&
8787 { ac_try='test -s "conftest.$ac_objext"'
8788 { (eval echo "$as_me:8788: \"$ac_try\"") >&5
8791 echo "$as_me:8791: \$? = $ac_status" >&5
8792 (exit "$ac_status"); }; }; then
8794 cf_cv_term_header="$cf_test"
8796 echo "$as_me: failed program was:" >&5
8797 cat "conftest.$ac_ext" >&5
8799 cf_cv_term_header=unknown
8802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8803 test "$cf_cv_term_header" != unknown && break
8807 echo "$as_me:8807: result: $cf_cv_term_header" >&5
8808 echo "${ECHO_T}$cf_cv_term_header" >&6
8810 # Set definitions to allow ifdef'ing to accommodate subdirectories
8812 case "$cf_cv_term_header" in
8815 cat >>confdefs.h <<\EOF
8816 #define HAVE_TERM_H 1
8822 case "$cf_cv_term_header" in
8825 cat >>confdefs.h <<\EOF
8826 #define HAVE_NCURSES_TERM_H 1
8832 cat >>confdefs.h <<\EOF
8833 #define HAVE_NCURSESW_TERM_H 1
8839 # some applications need this, but should check for NCURSES_VERSION
8841 cat >>confdefs.h <<\EOF
8845 echo "$as_me:8845: checking for ncurses version" >&5
8846 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8847 if test "${cf_cv_ncurses_version+set}" = set; then
8848 echo $ECHO_N "(cached) $ECHO_C" >&6
8851 cf_cv_ncurses_version=no
8853 rm -f "$cf_tempfile"
8854 if test "$cross_compiling" = yes; then
8856 # This will not work if the preprocessor splits the line after the
8857 # Autoconf token. The 'unproto' program does that.
8858 cat > "conftest.$ac_ext" <<EOF
8859 #include <${cf_cv_ncurses_header:-curses.h}>
8861 #ifdef NCURSES_VERSION
8862 Autoconf NCURSES_VERSION
8870 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8871 { (eval echo "$as_me:8871: \"$cf_try\"") >&5
8874 echo "$as_me:8874: \$? = $ac_status" >&5
8875 (exit "$ac_status"); }
8876 if test -f conftest.out ; then
8877 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8878 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8883 cat >"conftest.$ac_ext" <<_ACEOF
8884 #line 8884 "configure"
8885 #include "confdefs.h"
8887 $ac_includes_default
8889 #include <${cf_cv_ncurses_header:-curses.h}>
8893 FILE *fp = fopen("$cf_tempfile", "w");
8894 #ifdef NCURSES_VERSION
8895 # ifdef NCURSES_VERSION_PATCH
8896 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8898 fprintf(fp, "%s\\n", NCURSES_VERSION);
8902 fprintf(fp, "old\\n");
8907 ${cf_cv_main_return:-return}(0);
8910 rm -f "conftest$ac_exeext"
8911 if { (eval echo "$as_me:8911: \"$ac_link\"") >&5
8912 (eval $ac_link) 2>&5
8914 echo "$as_me:8914: \$? = $ac_status" >&5
8915 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8916 { (eval echo "$as_me:8916: \"$ac_try\"") >&5
8919 echo "$as_me:8919: \$? = $ac_status" >&5
8920 (exit "$ac_status"); }; }; then
8922 cf_cv_ncurses_version=`cat $cf_tempfile`
8924 echo "$as_me: program exited with status $ac_status" >&5
8925 echo "$as_me: failed program was:" >&5
8926 cat "conftest.$ac_ext" >&5
8928 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8930 rm -f "$cf_tempfile"
8933 echo "$as_me:8933: result: $cf_cv_ncurses_version" >&5
8934 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8935 test "$cf_cv_ncurses_version" = no ||
8936 cat >>confdefs.h <<\EOF
8940 cf_nculib_root=ncursesw
8941 # This works, except for the special case where we find gpm, but
8942 # ncurses is in a nonstandard location via $LIBS, and we really want
8945 cf_ncurses_SAVE="$LIBS"
8946 echo "$as_me:8946: checking for Gpm_Open in -lgpm" >&5
8947 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8948 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8949 echo $ECHO_N "(cached) $ECHO_C" >&6
8951 ac_check_lib_save_LIBS=$LIBS
8953 cat >"conftest.$ac_ext" <<_ACEOF
8954 #line 8954 "configure"
8955 #include "confdefs.h"
8957 /* Override any gcc2 internal prototype to avoid an error. */
8961 /* We use char because int might match the return type of a gcc2
8962 builtin and then its argument prototype would still apply. */
8972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8973 if { (eval echo "$as_me:8973: \"$ac_link\"") >&5
8974 (eval $ac_link) 2>&5
8976 echo "$as_me:8976: \$? = $ac_status" >&5
8977 (exit "$ac_status"); } &&
8978 { ac_try='test -s "conftest$ac_exeext"'
8979 { (eval echo "$as_me:8979: \"$ac_try\"") >&5
8982 echo "$as_me:8982: \$? = $ac_status" >&5
8983 (exit "$ac_status"); }; }; then
8984 ac_cv_lib_gpm_Gpm_Open=yes
8986 echo "$as_me: failed program was:" >&5
8987 cat "conftest.$ac_ext" >&5
8988 ac_cv_lib_gpm_Gpm_Open=no
8990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8991 LIBS=$ac_check_lib_save_LIBS
8993 echo "$as_me:8993: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8994 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8995 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8996 echo "$as_me:8996: checking for initscr in -lgpm" >&5
8997 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8998 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8999 echo $ECHO_N "(cached) $ECHO_C" >&6
9001 ac_check_lib_save_LIBS=$LIBS
9003 cat >"conftest.$ac_ext" <<_ACEOF
9004 #line 9004 "configure"
9005 #include "confdefs.h"
9007 /* Override any gcc2 internal prototype to avoid an error. */
9011 /* We use char because int might match the return type of a gcc2
9012 builtin and then its argument prototype would still apply. */
9022 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9023 if { (eval echo "$as_me:9023: \"$ac_link\"") >&5
9024 (eval $ac_link) 2>&5
9026 echo "$as_me:9026: \$? = $ac_status" >&5
9027 (exit "$ac_status"); } &&
9028 { ac_try='test -s "conftest$ac_exeext"'
9029 { (eval echo "$as_me:9029: \"$ac_try\"") >&5
9032 echo "$as_me:9032: \$? = $ac_status" >&5
9033 (exit "$ac_status"); }; }; then
9034 ac_cv_lib_gpm_initscr=yes
9036 echo "$as_me: failed program was:" >&5
9037 cat "conftest.$ac_ext" >&5
9038 ac_cv_lib_gpm_initscr=no
9040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9041 LIBS=$ac_check_lib_save_LIBS
9043 echo "$as_me:9043: result: $ac_cv_lib_gpm_initscr" >&5
9044 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9045 if test "$ac_cv_lib_gpm_initscr" = yes; then
9046 LIBS="$cf_ncurses_SAVE"
9048 cf_ncurses_LIBS="-lgpm"
9055 # This is only necessary if you are linking against an obsolete
9056 # version of ncurses (but it should do no harm, since it is static).
9057 if test "$cf_nculib_root" = ncurses ; then
9058 echo "$as_me:9058: checking for tgoto in -lmytinfo" >&5
9059 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9060 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9061 echo $ECHO_N "(cached) $ECHO_C" >&6
9063 ac_check_lib_save_LIBS=$LIBS
9064 LIBS="-lmytinfo $LIBS"
9065 cat >"conftest.$ac_ext" <<_ACEOF
9066 #line 9066 "configure"
9067 #include "confdefs.h"
9069 /* Override any gcc2 internal prototype to avoid an error. */
9073 /* We use char because int might match the return type of a gcc2
9074 builtin and then its argument prototype would still apply. */
9084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9085 if { (eval echo "$as_me:9085: \"$ac_link\"") >&5
9086 (eval $ac_link) 2>&5
9088 echo "$as_me:9088: \$? = $ac_status" >&5
9089 (exit "$ac_status"); } &&
9090 { ac_try='test -s "conftest$ac_exeext"'
9091 { (eval echo "$as_me:9091: \"$ac_try\"") >&5
9094 echo "$as_me:9094: \$? = $ac_status" >&5
9095 (exit "$ac_status"); }; }; then
9096 ac_cv_lib_mytinfo_tgoto=yes
9098 echo "$as_me: failed program was:" >&5
9099 cat "conftest.$ac_ext" >&5
9100 ac_cv_lib_mytinfo_tgoto=no
9102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9103 LIBS=$ac_check_lib_save_LIBS
9105 echo "$as_me:9105: result: $ac_cv_lib_mytinfo_tgoto" >&5
9106 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9107 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
9108 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9118 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9120 for cf_add_1lib in $cf_add_0lib; do
9121 for cf_add_2lib in $cf_add_libs; do
9122 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9127 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9131 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
9137 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9139 for cf_add_1lib in $cf_add_0lib; do
9140 for cf_add_2lib in $cf_add_libs; do
9141 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9146 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9152 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
9154 echo "$as_me:9154: checking for initscr" >&5
9155 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9156 if test "${ac_cv_func_initscr+set}" = set; then
9157 echo $ECHO_N "(cached) $ECHO_C" >&6
9159 cat >"conftest.$ac_ext" <<_ACEOF
9160 #line 9160 "configure"
9161 #include "confdefs.h"
9162 #define initscr autoconf_temporary
9163 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
9170 /* We use char because int might match the return type of a gcc2
9171 builtin and then its argument prototype would still apply. */
9172 char initscr (void);
9178 /* The GNU C library defines stubs for functions which it implements
9179 to always fail with ENOSYS. Some functions are actually named
9180 something starting with __ and the normal name is an alias. */
9181 #if defined (__stub_initscr) || defined (__stub___initscr)
9182 #error found stub for initscr
9190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9191 if { (eval echo "$as_me:9191: \"$ac_link\"") >&5
9192 (eval $ac_link) 2>&5
9194 echo "$as_me:9194: \$? = $ac_status" >&5
9195 (exit "$ac_status"); } &&
9196 { ac_try='test -s "conftest$ac_exeext"'
9197 { (eval echo "$as_me:9197: \"$ac_try\"") >&5
9200 echo "$as_me:9200: \$? = $ac_status" >&5
9201 (exit "$ac_status"); }; }; then
9202 ac_cv_func_initscr=yes
9204 echo "$as_me: failed program was:" >&5
9205 cat "conftest.$ac_ext" >&5
9206 ac_cv_func_initscr=no
9208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9210 echo "$as_me:9210: result: $ac_cv_func_initscr" >&5
9211 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9212 if test "$ac_cv_func_initscr" = yes; then
9213 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9216 cf_save_LIBS="$LIBS"
9217 echo "$as_me:9217: checking for initscr in -l$cf_nculib_root" >&5
9218 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9219 LIBS="-l$cf_nculib_root $LIBS"
9220 cat >"conftest.$ac_ext" <<_ACEOF
9221 #line 9221 "configure"
9222 #include "confdefs.h"
9223 #include <${cf_cv_ncurses_header:-curses.h}>
9232 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9233 if { (eval echo "$as_me:9233: \"$ac_link\"") >&5
9234 (eval $ac_link) 2>&5
9236 echo "$as_me:9236: \$? = $ac_status" >&5
9237 (exit "$ac_status"); } &&
9238 { ac_try='test -s "conftest$ac_exeext"'
9239 { (eval echo "$as_me:9239: \"$ac_try\"") >&5
9242 echo "$as_me:9242: \$? = $ac_status" >&5
9243 (exit "$ac_status"); }; }; then
9244 echo "$as_me:9244: result: yes" >&5
9245 echo "${ECHO_T}yes" >&6
9246 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9249 echo "$as_me: failed program was:" >&5
9250 cat "conftest.$ac_ext" >&5
9251 echo "$as_me:9251: result: no" >&5
9252 echo "${ECHO_T}no" >&6
9255 cf_library_path_list=""
9256 if test -n "${LDFLAGS}${LIBS}" ; then
9257 for cf_library_path in $LDFLAGS $LIBS
9259 case "$cf_library_path" in
9261 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9263 test "x$cf_library_path" != "xNONE" && \
9264 test -d "$cf_library_path" && \
9266 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9267 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
9268 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9269 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9270 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9271 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"
9274 cf_library_path_list="$cf_library_path_list $cf_search"
9282 test "x$prefix" != "xNONE" && \
9283 test -d "$prefix" && \
9285 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9286 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9287 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9288 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9289 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9290 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9293 for cf_subdir_prefix in \
9302 test "x$cf_subdir_prefix" != "x$prefix" && \
9303 test -d "$cf_subdir_prefix" && \
9304 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9305 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9306 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9307 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9308 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9309 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9310 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"
9315 cf_search="$cf_library_path_list $cf_search"
9317 for cf_libdir in $cf_search
9319 echo "$as_me:9319: checking for -l$cf_nculib_root in $cf_libdir" >&5
9320 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9321 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9322 cat >"conftest.$ac_ext" <<_ACEOF
9323 #line 9323 "configure"
9324 #include "confdefs.h"
9325 #include <${cf_cv_ncurses_header:-curses.h}>
9334 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9335 if { (eval echo "$as_me:9335: \"$ac_link\"") >&5
9336 (eval $ac_link) 2>&5
9338 echo "$as_me:9338: \$? = $ac_status" >&5
9339 (exit "$ac_status"); } &&
9340 { ac_try='test -s "conftest$ac_exeext"'
9341 { (eval echo "$as_me:9341: \"$ac_try\"") >&5
9344 echo "$as_me:9344: \$? = $ac_status" >&5
9345 (exit "$ac_status"); }; }; then
9346 echo "$as_me:9346: result: yes" >&5
9347 echo "${ECHO_T}yes" >&6
9348 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9351 echo "$as_me: failed program was:" >&5
9352 cat "conftest.$ac_ext" >&5
9353 echo "$as_me:9353: result: no" >&5
9354 echo "${ECHO_T}no" >&6
9355 LIBS="$cf_save_LIBS"
9357 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9361 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9365 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9367 if test "$cf_found_library" = no ; then
9368 { { echo "$as_me:9368: error: Cannot link $cf_nculib_root library" >&5
9369 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9370 { (exit 1); exit 1; }; }
9375 if test -n "$cf_ncurses_LIBS" ; then
9376 echo "$as_me:9376: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9377 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9378 cf_ncurses_SAVE="$LIBS"
9379 for p in $cf_ncurses_LIBS ; do
9380 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9381 if test "$q" != "$LIBS" ; then
9385 cat >"conftest.$ac_ext" <<_ACEOF
9386 #line 9386 "configure"
9387 #include "confdefs.h"
9388 #include <${cf_cv_ncurses_header:-curses.h}>
9392 initscr(); mousemask(0,0); tigetstr((char *)0);
9397 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9398 if { (eval echo "$as_me:9398: \"$ac_link\"") >&5
9399 (eval $ac_link) 2>&5
9401 echo "$as_me:9401: \$? = $ac_status" >&5
9402 (exit "$ac_status"); } &&
9403 { ac_try='test -s "conftest$ac_exeext"'
9404 { (eval echo "$as_me:9404: \"$ac_try\"") >&5
9407 echo "$as_me:9407: \$? = $ac_status" >&5
9408 (exit "$ac_status"); }; }; then
9409 echo "$as_me:9409: result: yes" >&5
9410 echo "${ECHO_T}yes" >&6
9412 echo "$as_me: failed program was:" >&5
9413 cat "conftest.$ac_ext" >&5
9414 echo "$as_me:9414: result: no" >&5
9415 echo "${ECHO_T}no" >&6
9416 LIBS="$cf_ncurses_SAVE"
9418 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9421 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9423 cat >>confdefs.h <<EOF
9424 #define $cf_nculib_ROOT 1
9434 cf_ncuconfig_root=ncurses
9435 cf_have_ncuconfig=no
9437 if test "x${PKG_CONFIG:=none}" != xnone; then
9438 echo "$as_me:9438: checking pkg-config for $cf_ncuconfig_root" >&5
9439 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9440 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9441 echo "$as_me:9441: result: yes" >&5
9442 echo "${ECHO_T}yes" >&6
9444 echo "$as_me:9444: checking if the $cf_ncuconfig_root package files work" >&5
9445 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9446 cf_have_ncuconfig=unknown
9448 cf_save_CFLAGS="$CFLAGS"
9449 cf_save_CPPFLAGS="$CPPFLAGS"
9450 cf_save_LIBS="$LIBS"
9452 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9453 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9455 # while -W for passing linker flags is prevalent, it is not "standard".
9456 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9457 # incompatible _and_ non-standard -W option which gives an error. Work
9458 # around that pitfall.
9459 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9465 cf_new_extra_cppflags=
9467 for cf_add_cflags in $cf_pkg_cflags
9469 case "$cf_fix_cppflags" in
9471 case "$cf_add_cflags" in
9472 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9473 case "$cf_add_cflags" in
9475 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9477 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9478 && test -z "${cf_tst_cflags}" \
9479 && cf_fix_cppflags=yes
9481 if test "$cf_fix_cppflags" = yes ; then
9483 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9484 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9487 elif test "${cf_tst_cflags}" = "\"'" ; then
9489 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9490 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9500 case "$cf_add_cflags" in
9502 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9504 CPPFLAGS=`echo "$CPPFLAGS" | \
9505 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9506 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9511 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9512 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9519 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9520 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9527 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9528 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9530 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9532 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9533 && test -z "${cf_tst_cflags}" \
9534 && cf_fix_cppflags=no
9539 if test -n "$cf_new_cflags" ; then
9541 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9542 CFLAGS="${CFLAGS}$cf_new_cflags"
9546 if test -n "$cf_new_cppflags" ; then
9548 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9549 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9553 if test -n "$cf_new_extra_cppflags" ; then
9555 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9556 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9563 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9565 for cf_add_1lib in $cf_add_0lib; do
9566 for cf_add_2lib in $cf_add_libs; do
9567 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9572 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9576 cat >"conftest.$ac_ext" <<_ACEOF
9577 #line 9577 "configure"
9578 #include "confdefs.h"
9579 #include <${cf_cv_ncurses_header:-curses.h}>
9583 initscr(); mousemask(0,0); tigetstr((char *)0);
9588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9589 if { (eval echo "$as_me:9589: \"$ac_link\"") >&5
9590 (eval $ac_link) 2>&5
9592 echo "$as_me:9592: \$? = $ac_status" >&5
9593 (exit "$ac_status"); } &&
9594 { ac_try='test -s "conftest$ac_exeext"'
9595 { (eval echo "$as_me:9595: \"$ac_try\"") >&5
9598 echo "$as_me:9598: \$? = $ac_status" >&5
9599 (exit "$ac_status"); }; }; then
9600 if test "$cross_compiling" = yes; then
9601 cf_test_ncuconfig=maybe
9603 cat >"conftest.$ac_ext" <<_ACEOF
9604 #line 9604 "configure"
9605 #include "confdefs.h"
9606 #include <${cf_cv_ncurses_header:-curses.h}>
9608 { const char *xx = curses_version(); return (xx == 0); }
9610 rm -f "conftest$ac_exeext"
9611 if { (eval echo "$as_me:9611: \"$ac_link\"") >&5
9612 (eval $ac_link) 2>&5
9614 echo "$as_me:9614: \$? = $ac_status" >&5
9615 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9616 { (eval echo "$as_me:9616: \"$ac_try\"") >&5
9619 echo "$as_me:9619: \$? = $ac_status" >&5
9620 (exit "$ac_status"); }; }; then
9621 cf_test_ncuconfig=yes
9623 echo "$as_me: program exited with status $ac_status" >&5
9624 echo "$as_me: failed program was:" >&5
9625 cat "conftest.$ac_ext" >&5
9626 cf_test_ncuconfig=no
9628 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9631 echo "$as_me: failed program was:" >&5
9632 cat "conftest.$ac_ext" >&5
9633 cf_test_ncuconfig=no
9635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9637 CFLAGS="$cf_save_CFLAGS"
9638 CPPFLAGS="$cf_save_CPPFLAGS"
9639 LIBS="$cf_save_LIBS"
9641 if test "x$cf_test_ncuconfig" != xyes; then
9642 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9643 cf_pkg_cflags="$cf_temp"
9644 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9645 cf_pkg_libs="$cf_temp"
9650 for cf_add_cflags in $cf_pkg_cflags
9652 case "x$cf_add_cflags" in
9655 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9658 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'`
9659 test "$CFLAGS" != "$cf_old_cflag" || break
9661 CFLAGS="$cf_old_cflag"
9664 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9667 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'`
9668 test "$CPPFLAGS" != "$cf_old_cflag" || break
9670 CPPFLAGS="$cf_old_cflag"
9679 cf_new_extra_cppflags=
9681 for cf_add_cflags in $cf_add_cflags
9683 case "$cf_fix_cppflags" in
9685 case "$cf_add_cflags" in
9686 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9687 case "$cf_add_cflags" in
9689 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9691 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9692 && test -z "${cf_tst_cflags}" \
9693 && cf_fix_cppflags=yes
9695 if test "$cf_fix_cppflags" = yes ; then
9697 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9698 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9701 elif test "${cf_tst_cflags}" = "\"'" ; then
9703 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9704 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9714 case "$cf_add_cflags" in
9716 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9718 CPPFLAGS=`echo "$CPPFLAGS" | \
9719 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9720 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9725 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9726 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9733 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9734 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9741 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9742 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9744 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9746 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9747 && test -z "${cf_tst_cflags}" \
9748 && cf_fix_cppflags=no
9753 if test -n "$cf_new_cflags" ; then
9755 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9756 CFLAGS="${CFLAGS}$cf_new_cflags"
9760 if test -n "$cf_new_cppflags" ; then
9762 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9763 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9767 if test -n "$cf_new_extra_cppflags" ; then
9769 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9770 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9779 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9781 for cf_add_1lib in $cf_add_0lib; do
9782 for cf_add_2lib in $cf_add_libs; do
9783 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9788 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9792 cat >"conftest.$ac_ext" <<_ACEOF
9793 #line 9793 "configure"
9794 #include "confdefs.h"
9795 #include <${cf_cv_ncurses_header:-curses.h}>
9799 initscr(); mousemask(0,0); tigetstr((char *)0);
9804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9805 if { (eval echo "$as_me:9805: \"$ac_link\"") >&5
9806 (eval $ac_link) 2>&5
9808 echo "$as_me:9808: \$? = $ac_status" >&5
9809 (exit "$ac_status"); } &&
9810 { ac_try='test -s "conftest$ac_exeext"'
9811 { (eval echo "$as_me:9811: \"$ac_try\"") >&5
9814 echo "$as_me:9814: \$? = $ac_status" >&5
9815 (exit "$ac_status"); }; }; then
9816 if test "$cross_compiling" = yes; then
9817 cf_have_ncuconfig=maybe
9819 cat >"conftest.$ac_ext" <<_ACEOF
9820 #line 9820 "configure"
9821 #include "confdefs.h"
9822 #include <${cf_cv_ncurses_header:-curses.h}>
9824 { const char *xx = curses_version(); return (xx == 0); }
9826 rm -f "conftest$ac_exeext"
9827 if { (eval echo "$as_me:9827: \"$ac_link\"") >&5
9828 (eval $ac_link) 2>&5
9830 echo "$as_me:9830: \$? = $ac_status" >&5
9831 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9832 { (eval echo "$as_me:9832: \"$ac_try\"") >&5
9835 echo "$as_me:9835: \$? = $ac_status" >&5
9836 (exit "$ac_status"); }; }; then
9837 cf_have_ncuconfig=yes
9839 echo "$as_me: program exited with status $ac_status" >&5
9840 echo "$as_me: failed program was:" >&5
9841 cat "conftest.$ac_ext" >&5
9842 cf_have_ncuconfig=no
9844 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9847 echo "$as_me: failed program was:" >&5
9848 cat "conftest.$ac_ext" >&5
9849 cf_have_ncuconfig=no
9851 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9852 echo "$as_me:9852: result: $cf_have_ncuconfig" >&5
9853 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9854 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9855 if test "$cf_have_ncuconfig" != "yes"
9857 CPPFLAGS="$cf_save_CPPFLAGS"
9858 LIBS="$cf_save_LIBS"
9859 NCURSES_CONFIG_PKG=none
9862 cat >>confdefs.h <<\EOF
9866 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9868 echo "$as_me:9868: checking for terminfo header" >&5
9869 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9870 if test "${cf_cv_term_header+set}" = set; then
9871 echo $ECHO_N "(cached) $ECHO_C" >&6
9874 case "${cf_cv_ncurses_header}" in
9875 (*/ncurses.h|*/ncursesw.h)
9876 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9879 cf_term_header=term.h
9883 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9885 cat >"conftest.$ac_ext" <<_ACEOF
9886 #line 9886 "configure"
9887 #include "confdefs.h"
9889 #include <${cf_cv_ncurses_header:-curses.h}>
9895 int x = auto_left_margin; (void)x
9900 rm -f "conftest.$ac_objext"
9901 if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
9902 (eval $ac_compile) 2>&5
9904 echo "$as_me:9904: \$? = $ac_status" >&5
9905 (exit "$ac_status"); } &&
9906 { ac_try='test -s "conftest.$ac_objext"'
9907 { (eval echo "$as_me:9907: \"$ac_try\"") >&5
9910 echo "$as_me:9910: \$? = $ac_status" >&5
9911 (exit "$ac_status"); }; }; then
9913 cf_cv_term_header="$cf_test"
9915 echo "$as_me: failed program was:" >&5
9916 cat "conftest.$ac_ext" >&5
9918 cf_cv_term_header=unknown
9921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9922 test "$cf_cv_term_header" != unknown && break
9926 echo "$as_me:9926: result: $cf_cv_term_header" >&5
9927 echo "${ECHO_T}$cf_cv_term_header" >&6
9929 # Set definitions to allow ifdef'ing to accommodate subdirectories
9931 case "$cf_cv_term_header" in
9934 cat >>confdefs.h <<\EOF
9935 #define HAVE_TERM_H 1
9941 case "$cf_cv_term_header" in
9944 cat >>confdefs.h <<\EOF
9945 #define HAVE_NCURSES_TERM_H 1
9951 cat >>confdefs.h <<\EOF
9952 #define HAVE_NCURSESW_TERM_H 1
9961 echo "$as_me:9961: result: no" >&5
9962 echo "${ECHO_T}no" >&6
9963 NCURSES_CONFIG_PKG=none
9966 NCURSES_CONFIG_PKG=none
9969 if test "x$cf_have_ncuconfig" = "xno"; then
9970 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9972 if test -n "$ac_tool_prefix"; then
9973 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9975 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9976 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9977 echo "$as_me:9977: checking for $ac_word" >&5
9978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9979 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9980 echo $ECHO_N "(cached) $ECHO_C" >&6
9982 if test -n "$NCURSES_CONFIG"; then
9983 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9985 ac_save_IFS=$IFS; IFS=$ac_path_separator
9987 for ac_dir in $ac_dummy; do
9989 test -z "$ac_dir" && ac_dir=.
9990 $as_executable_p "$ac_dir/$ac_word" || continue
9991 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9992 echo "$as_me:9992: found $ac_dir/$ac_word" >&5
9998 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9999 if test -n "$NCURSES_CONFIG"; then
10000 echo "$as_me:10000: result: $NCURSES_CONFIG" >&5
10001 echo "${ECHO_T}$NCURSES_CONFIG" >&6
10003 echo "$as_me:10003: result: no" >&5
10004 echo "${ECHO_T}no" >&6
10007 test -n "$NCURSES_CONFIG" && break
10010 if test -z "$NCURSES_CONFIG"; then
10011 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
10012 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
10014 # Extract the first word of "$ac_prog", so it can be a program name with args.
10015 set dummy $ac_prog; ac_word=$2
10016 echo "$as_me:10016: checking for $ac_word" >&5
10017 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10018 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
10019 echo $ECHO_N "(cached) $ECHO_C" >&6
10021 if test -n "$ac_ct_NCURSES_CONFIG"; then
10022 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
10024 ac_save_IFS=$IFS; IFS=$ac_path_separator
10026 for ac_dir in $ac_dummy; do
10028 test -z "$ac_dir" && ac_dir=.
10029 $as_executable_p "$ac_dir/$ac_word" || continue
10030 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
10031 echo "$as_me:10031: found $ac_dir/$ac_word" >&5
10037 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
10038 if test -n "$ac_ct_NCURSES_CONFIG"; then
10039 echo "$as_me:10039: result: $ac_ct_NCURSES_CONFIG" >&5
10040 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
10042 echo "$as_me:10042: result: no" >&5
10043 echo "${ECHO_T}no" >&6
10046 test -n "$ac_ct_NCURSES_CONFIG" && break
10048 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
10050 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
10053 if test "$NCURSES_CONFIG" != none ; then
10055 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
10057 case "x$cf_add_cflags" in
10060 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10063 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'`
10064 test "$CFLAGS" != "$cf_old_cflag" || break
10066 CFLAGS="$cf_old_cflag"
10069 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10072 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'`
10073 test "$CPPFLAGS" != "$cf_old_cflag" || break
10075 CPPFLAGS="$cf_old_cflag"
10084 cf_new_extra_cppflags=
10086 for cf_add_cflags in $cf_add_cflags
10088 case "$cf_fix_cppflags" in
10090 case "$cf_add_cflags" in
10091 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10092 case "$cf_add_cflags" in
10094 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10096 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10097 && test -z "${cf_tst_cflags}" \
10098 && cf_fix_cppflags=yes
10100 if test "$cf_fix_cppflags" = yes ; then
10102 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10103 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10106 elif test "${cf_tst_cflags}" = "\"'" ; then
10108 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10109 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10115 case "$CPPFLAGS" in
10119 case "$cf_add_cflags" in
10121 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10123 CPPFLAGS=`echo "$CPPFLAGS" | \
10124 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10125 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10130 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10131 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10138 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10139 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10146 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10147 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10149 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10151 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10152 && test -z "${cf_tst_cflags}" \
10153 && cf_fix_cppflags=no
10158 if test -n "$cf_new_cflags" ; then
10160 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10161 CFLAGS="${CFLAGS}$cf_new_cflags"
10165 if test -n "$cf_new_cppflags" ; then
10167 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10168 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10172 if test -n "$cf_new_extra_cppflags" ; then
10174 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10175 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10181 cf_add_libs="$LIBS"
10184 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10185 # filter duplicates
10186 for cf_add_1lib in $cf_add_0lib; do
10187 for cf_add_2lib in $cf_add_libs; do
10188 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10193 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10195 LIBS="$cf_add_libs"
10197 # even with config script, some packages use no-override for curses.h
10199 echo "$as_me:10199: checking if we have identified curses headers" >&5
10200 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
10201 if test "${cf_cv_ncurses_header+set}" = set; then
10202 echo $ECHO_N "(cached) $ECHO_C" >&6
10205 cf_cv_ncurses_header=none
10207 ncurses.h ncurses/ncurses.h \
10208 curses.h ncurses/curses.h
10210 cat >"conftest.$ac_ext" <<_ACEOF
10211 #line 10211 "configure"
10212 #include "confdefs.h"
10213 #include <${cf_header}>
10217 initscr(); endwin()
10222 rm -f "conftest.$ac_objext"
10223 if { (eval echo "$as_me:10223: \"$ac_compile\"") >&5
10224 (eval $ac_compile) 2>&5
10226 echo "$as_me:10226: \$? = $ac_status" >&5
10227 (exit "$ac_status"); } &&
10228 { ac_try='test -s "conftest.$ac_objext"'
10229 { (eval echo "$as_me:10229: \"$ac_try\"") >&5
10230 (eval $ac_try) 2>&5
10232 echo "$as_me:10232: \$? = $ac_status" >&5
10233 (exit "$ac_status"); }; }; then
10234 cf_cv_ncurses_header=$cf_header; break
10236 echo "$as_me: failed program was:" >&5
10237 cat "conftest.$ac_ext" >&5
10239 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10243 echo "$as_me:10243: result: $cf_cv_ncurses_header" >&5
10244 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
10246 if test "$cf_cv_ncurses_header" = none ; then
10247 { { echo "$as_me:10247: error: No curses header-files found" >&5
10248 echo "$as_me: error: No curses header-files found" >&2;}
10249 { (exit 1); exit 1; }; }
10252 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
10254 for ac_header in $cf_cv_ncurses_header
10256 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10257 echo "$as_me:10257: checking for $ac_header" >&5
10258 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10259 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10260 echo $ECHO_N "(cached) $ECHO_C" >&6
10262 cat >"conftest.$ac_ext" <<_ACEOF
10263 #line 10263 "configure"
10264 #include "confdefs.h"
10265 #include <$ac_header>
10267 if { (eval echo "$as_me:10267: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10268 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10270 $EGREP -v '^ *\+' conftest.er1 >conftest.err
10272 cat conftest.err >&5
10273 echo "$as_me:10273: \$? = $ac_status" >&5
10274 (exit "$ac_status"); } >/dev/null; then
10275 if test -s conftest.err; then
10276 ac_cpp_err=$ac_c_preproc_warn_flag
10283 if test -z "$ac_cpp_err"; then
10284 eval "$as_ac_Header=yes"
10286 echo "$as_me: failed program was:" >&5
10287 cat "conftest.$ac_ext" >&5
10288 eval "$as_ac_Header=no"
10290 rm -f conftest.err "conftest.$ac_ext"
10292 echo "$as_me:10292: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10293 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10294 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10295 cat >>confdefs.h <<EOF
10296 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10302 cat >>confdefs.h <<\EOF
10306 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10308 cat >>confdefs.h <<EOF
10309 #define $cf_nculib_ROOT 1
10312 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
10316 cf_ncuhdr_root=ncurses
10318 test -n "$cf_cv_curses_dir" && \
10319 test "$cf_cv_curses_dir" != "no" && { \
10321 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
10322 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
10324 while test "$cf_add_incdir" != /usr/include
10326 if test -d "$cf_add_incdir"
10329 if test -n "$CFLAGS$CPPFLAGS" ; then
10330 # a loop is needed to ensure we can add subdirs of existing dirs
10331 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10332 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10333 cf_have_incdir=yes; break
10338 if test "$cf_have_incdir" = no ; then
10339 if test "$cf_add_incdir" = /usr/local/include ; then
10340 if test "$GCC" = yes
10342 cf_save_CPPFLAGS=$CPPFLAGS
10344 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10345 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10347 cat >"conftest.$ac_ext" <<_ACEOF
10348 #line 10348 "configure"
10349 #include "confdefs.h"
10359 rm -f "conftest.$ac_objext"
10360 if { (eval echo "$as_me:10360: \"$ac_compile\"") >&5
10361 (eval $ac_compile) 2>&5
10363 echo "$as_me:10363: \$? = $ac_status" >&5
10364 (exit "$ac_status"); } &&
10365 { ac_try='test -s "conftest.$ac_objext"'
10366 { (eval echo "$as_me:10366: \"$ac_try\"") >&5
10367 (eval $ac_try) 2>&5
10369 echo "$as_me:10369: \$? = $ac_status" >&5
10370 (exit "$ac_status"); }; }; then
10373 echo "$as_me: failed program was:" >&5
10374 cat "conftest.$ac_ext" >&5
10377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10378 CPPFLAGS=$cf_save_CPPFLAGS
10383 if test "$cf_have_incdir" = no ; then
10384 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10386 echo "${as_me:-configure}:10386: testing adding $cf_add_incdir to include-path ..." 1>&5
10388 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10390 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10391 test "$cf_top_incdir" = "$cf_add_incdir" && break
10392 cf_add_incdir="$cf_top_incdir"
10405 echo "$as_me:10405: checking for $cf_ncuhdr_root header in include-path" >&5
10406 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10407 if test "${cf_cv_ncurses_h+set}" = set; then
10408 echo $ECHO_N "(cached) $ECHO_C" >&6
10411 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10412 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10413 for cf_header in $cf_header_list
10416 cat >"conftest.$ac_ext" <<_ACEOF
10417 #line 10417 "configure"
10418 #include "confdefs.h"
10420 #include <$cf_header>
10425 #ifdef NCURSES_VERSION
10427 printf("%s\\n", NCURSES_VERSION);
10432 #error __NCURSES_H is not defined
10440 rm -f "conftest.$ac_objext"
10441 if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5
10442 (eval $ac_compile) 2>&5
10444 echo "$as_me:10444: \$? = $ac_status" >&5
10445 (exit "$ac_status"); } &&
10446 { ac_try='test -s "conftest.$ac_objext"'
10447 { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448 (eval $ac_try) 2>&5
10450 echo "$as_me:10450: \$? = $ac_status" >&5
10451 (exit "$ac_status"); }; }; then
10452 cf_cv_ncurses_h=$cf_header
10455 echo "$as_me: failed program was:" >&5
10456 cat "conftest.$ac_ext" >&5
10459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10461 test "$cf_cv_ncurses_h" != no && break
10465 echo "$as_me:10465: result: $cf_cv_ncurses_h" >&5
10466 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10468 if test "$cf_cv_ncurses_h" != no ; then
10469 cf_cv_ncurses_header=$cf_cv_ncurses_h
10472 echo "$as_me:10472: checking for $cf_ncuhdr_root include-path" >&5
10473 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10474 if test "${cf_cv_ncurses_h2+set}" = set; then
10475 echo $ECHO_N "(cached) $ECHO_C" >&6
10478 test -n "$verbose" && echo
10482 # collect the current set of include-directories from compiler flags
10483 cf_header_path_list=""
10484 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10485 for cf_header_path in $CPPFLAGS $CFLAGS
10487 case "$cf_header_path" in
10489 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10491 test "x$cf_header_path" != "xNONE" && \
10492 test -d "$cf_header_path" && \
10494 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10495 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10496 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10497 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10498 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10499 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"
10502 cf_header_path_list="$cf_header_path_list $cf_search"
10508 # add the variations for the package we are looking for
10512 test "x$prefix" != "xNONE" && \
10513 test -d "$prefix" && \
10515 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10516 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10517 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10518 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10519 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10520 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10523 for cf_subdir_prefix in \
10532 test "x$cf_subdir_prefix" != "x$prefix" && \
10533 test -d "$cf_subdir_prefix" && \
10534 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10535 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10536 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10537 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10538 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10539 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10540 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"
10545 test "$includedir" != NONE && \
10546 test "$includedir" != "/usr/include" && \
10547 test -d "$includedir" && {
10548 test -d "$includedir" && cf_search="$cf_search $includedir"
10549 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10552 test "$oldincludedir" != NONE && \
10553 test "$oldincludedir" != "/usr/include" && \
10554 test -d "$oldincludedir" && {
10555 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10556 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10559 cf_search="$cf_search $cf_header_path_list"
10561 test -n "$verbose" && echo "search path $cf_search"
10562 cf_save2_CPPFLAGS="$CPPFLAGS"
10563 for cf_incdir in $cf_search
10566 if test -n "$cf_incdir" ; then
10567 for cf_add_incdir in $cf_incdir
10569 while test "$cf_add_incdir" != /usr/include
10571 if test -d "$cf_add_incdir"
10574 if test -n "$CFLAGS$CPPFLAGS" ; then
10575 # a loop is needed to ensure we can add subdirs of existing dirs
10576 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10577 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10578 cf_have_incdir=yes; break
10583 if test "$cf_have_incdir" = no ; then
10584 if test "$cf_add_incdir" = /usr/local/include ; then
10585 if test "$GCC" = yes
10587 cf_save_CPPFLAGS=$CPPFLAGS
10589 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10590 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10592 cat >"conftest.$ac_ext" <<_ACEOF
10593 #line 10593 "configure"
10594 #include "confdefs.h"
10604 rm -f "conftest.$ac_objext"
10605 if { (eval echo "$as_me:10605: \"$ac_compile\"") >&5
10606 (eval $ac_compile) 2>&5
10608 echo "$as_me:10608: \$? = $ac_status" >&5
10609 (exit "$ac_status"); } &&
10610 { ac_try='test -s "conftest.$ac_objext"'
10611 { (eval echo "$as_me:10611: \"$ac_try\"") >&5
10612 (eval $ac_try) 2>&5
10614 echo "$as_me:10614: \$? = $ac_status" >&5
10615 (exit "$ac_status"); }; }; then
10618 echo "$as_me: failed program was:" >&5
10619 cat "conftest.$ac_ext" >&5
10622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10623 CPPFLAGS=$cf_save_CPPFLAGS
10628 if test "$cf_have_incdir" = no ; then
10629 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10631 echo "${as_me:-configure}:10631: testing adding $cf_add_incdir to include-path ..." 1>&5
10633 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10635 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10636 test "$cf_top_incdir" = "$cf_add_incdir" && break
10637 cf_add_incdir="$cf_top_incdir"
10653 cat >"conftest.$ac_ext" <<_ACEOF
10654 #line 10654 "configure"
10655 #include "confdefs.h"
10657 #include <$cf_header>
10662 #ifdef NCURSES_VERSION
10664 printf("%s\\n", NCURSES_VERSION);
10669 #error __NCURSES_H is not defined
10677 rm -f "conftest.$ac_objext"
10678 if { (eval echo "$as_me:10678: \"$ac_compile\"") >&5
10679 (eval $ac_compile) 2>&5
10681 echo "$as_me:10681: \$? = $ac_status" >&5
10682 (exit "$ac_status"); } &&
10683 { ac_try='test -s "conftest.$ac_objext"'
10684 { (eval echo "$as_me:10684: \"$ac_try\"") >&5
10685 (eval $ac_try) 2>&5
10687 echo "$as_me:10687: \$? = $ac_status" >&5
10688 (exit "$ac_status"); }; }; then
10689 cf_cv_ncurses_h2=$cf_header
10692 echo "$as_me: failed program was:" >&5
10693 cat "conftest.$ac_ext" >&5
10694 cf_cv_ncurses_h2=no
10696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10698 if test "$cf_cv_ncurses_h2" != no ; then
10699 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10700 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10703 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10705 CPPFLAGS="$cf_save2_CPPFLAGS"
10706 test "$cf_cv_ncurses_h2" != no && break
10708 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10708: error: not found" >&5
10709 echo "$as_me: error: not found" >&2;}
10710 { (exit 1); exit 1; }; }
10713 echo "$as_me:10713: result: $cf_cv_ncurses_h2" >&5
10714 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10716 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10717 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10718 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10719 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10722 if test -n "$cf_1st_incdir" ; then
10723 for cf_add_incdir in $cf_1st_incdir
10725 while test "$cf_add_incdir" != /usr/include
10727 if test -d "$cf_add_incdir"
10730 if test -n "$CFLAGS$CPPFLAGS" ; then
10731 # a loop is needed to ensure we can add subdirs of existing dirs
10732 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10733 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10734 cf_have_incdir=yes; break
10739 if test "$cf_have_incdir" = no ; then
10740 if test "$cf_add_incdir" = /usr/local/include ; then
10741 if test "$GCC" = yes
10743 cf_save_CPPFLAGS=$CPPFLAGS
10745 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10746 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10748 cat >"conftest.$ac_ext" <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10760 rm -f "conftest.$ac_objext"
10761 if { (eval echo "$as_me:10761: \"$ac_compile\"") >&5
10762 (eval $ac_compile) 2>&5
10764 echo "$as_me:10764: \$? = $ac_status" >&5
10765 (exit "$ac_status"); } &&
10766 { ac_try='test -s "conftest.$ac_objext"'
10767 { (eval echo "$as_me:10767: \"$ac_try\"") >&5
10768 (eval $ac_try) 2>&5
10770 echo "$as_me:10770: \$? = $ac_status" >&5
10771 (exit "$ac_status"); }; }; then
10774 echo "$as_me: failed program was:" >&5
10775 cat "conftest.$ac_ext" >&5
10778 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10779 CPPFLAGS=$cf_save_CPPFLAGS
10784 if test "$cf_have_incdir" = no ; then
10785 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10787 echo "${as_me:-configure}:10787: testing adding $cf_add_incdir to include-path ..." 1>&5
10789 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10791 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10792 test "$cf_top_incdir" = "$cf_add_incdir" && break
10793 cf_add_incdir="$cf_top_incdir"
10806 # Set definitions to allow ifdef'ing for ncurses.h
10808 case "$cf_cv_ncurses_header" in
10811 cat >>confdefs.h <<\EOF
10812 #define HAVE_NCURSES_H 1
10818 case "$cf_cv_ncurses_header" in
10819 (ncurses/curses.h|ncurses/ncurses.h)
10821 cat >>confdefs.h <<\EOF
10822 #define HAVE_NCURSES_NCURSES_H 1
10826 (ncursesw/curses.h|ncursesw/ncurses.h)
10828 cat >>confdefs.h <<\EOF
10829 #define HAVE_NCURSESW_NCURSES_H 1
10835 echo "$as_me:10835: checking for terminfo header" >&5
10836 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10837 if test "${cf_cv_term_header+set}" = set; then
10838 echo $ECHO_N "(cached) $ECHO_C" >&6
10841 case "${cf_cv_ncurses_header}" in
10842 (*/ncurses.h|*/ncursesw.h)
10843 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10846 cf_term_header=term.h
10850 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10852 cat >"conftest.$ac_ext" <<_ACEOF
10853 #line 10853 "configure"
10854 #include "confdefs.h"
10856 #include <${cf_cv_ncurses_header:-curses.h}>
10857 #include <$cf_test>
10862 int x = auto_left_margin; (void)x
10867 rm -f "conftest.$ac_objext"
10868 if { (eval echo "$as_me:10868: \"$ac_compile\"") >&5
10869 (eval $ac_compile) 2>&5
10871 echo "$as_me:10871: \$? = $ac_status" >&5
10872 (exit "$ac_status"); } &&
10873 { ac_try='test -s "conftest.$ac_objext"'
10874 { (eval echo "$as_me:10874: \"$ac_try\"") >&5
10875 (eval $ac_try) 2>&5
10877 echo "$as_me:10877: \$? = $ac_status" >&5
10878 (exit "$ac_status"); }; }; then
10880 cf_cv_term_header="$cf_test"
10882 echo "$as_me: failed program was:" >&5
10883 cat "conftest.$ac_ext" >&5
10885 cf_cv_term_header=unknown
10888 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10889 test "$cf_cv_term_header" != unknown && break
10893 echo "$as_me:10893: result: $cf_cv_term_header" >&5
10894 echo "${ECHO_T}$cf_cv_term_header" >&6
10896 # Set definitions to allow ifdef'ing to accommodate subdirectories
10898 case "$cf_cv_term_header" in
10901 cat >>confdefs.h <<\EOF
10902 #define HAVE_TERM_H 1
10908 case "$cf_cv_term_header" in
10911 cat >>confdefs.h <<\EOF
10912 #define HAVE_NCURSES_TERM_H 1
10918 cat >>confdefs.h <<\EOF
10919 #define HAVE_NCURSESW_TERM_H 1
10925 # some applications need this, but should check for NCURSES_VERSION
10927 cat >>confdefs.h <<\EOF
10931 echo "$as_me:10931: checking for ncurses version" >&5
10932 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10933 if test "${cf_cv_ncurses_version+set}" = set; then
10934 echo $ECHO_N "(cached) $ECHO_C" >&6
10937 cf_cv_ncurses_version=no
10939 rm -f "$cf_tempfile"
10940 if test "$cross_compiling" = yes; then
10942 # This will not work if the preprocessor splits the line after the
10943 # Autoconf token. The 'unproto' program does that.
10944 cat > "conftest.$ac_ext" <<EOF
10945 #include <${cf_cv_ncurses_header:-curses.h}>
10947 #ifdef NCURSES_VERSION
10948 Autoconf NCURSES_VERSION
10956 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10957 { (eval echo "$as_me:10957: \"$cf_try\"") >&5
10958 (eval $cf_try) 2>&5
10960 echo "$as_me:10960: \$? = $ac_status" >&5
10961 (exit "$ac_status"); }
10962 if test -f conftest.out ; then
10963 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10964 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10969 cat >"conftest.$ac_ext" <<_ACEOF
10970 #line 10970 "configure"
10971 #include "confdefs.h"
10973 $ac_includes_default
10975 #include <${cf_cv_ncurses_header:-curses.h}>
10979 FILE *fp = fopen("$cf_tempfile", "w");
10980 #ifdef NCURSES_VERSION
10981 # ifdef NCURSES_VERSION_PATCH
10982 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10984 fprintf(fp, "%s\\n", NCURSES_VERSION);
10987 # ifdef __NCURSES_H
10988 fprintf(fp, "old\\n");
10993 ${cf_cv_main_return:-return}(0);
10996 rm -f "conftest$ac_exeext"
10997 if { (eval echo "$as_me:10997: \"$ac_link\"") >&5
10998 (eval $ac_link) 2>&5
11000 echo "$as_me:11000: \$? = $ac_status" >&5
11001 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
11002 { (eval echo "$as_me:11002: \"$ac_try\"") >&5
11003 (eval $ac_try) 2>&5
11005 echo "$as_me:11005: \$? = $ac_status" >&5
11006 (exit "$ac_status"); }; }; then
11008 cf_cv_ncurses_version=`cat $cf_tempfile`
11010 echo "$as_me: program exited with status $ac_status" >&5
11011 echo "$as_me: failed program was:" >&5
11012 cat "conftest.$ac_ext" >&5
11014 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
11016 rm -f "$cf_tempfile"
11019 echo "$as_me:11019: result: $cf_cv_ncurses_version" >&5
11020 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
11021 test "$cf_cv_ncurses_version" = no ||
11022 cat >>confdefs.h <<\EOF
11026 cf_nculib_root=ncurses
11027 # This works, except for the special case where we find gpm, but
11028 # ncurses is in a nonstandard location via $LIBS, and we really want
11031 cf_ncurses_SAVE="$LIBS"
11032 echo "$as_me:11032: checking for Gpm_Open in -lgpm" >&5
11033 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
11034 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
11035 echo $ECHO_N "(cached) $ECHO_C" >&6
11037 ac_check_lib_save_LIBS=$LIBS
11039 cat >"conftest.$ac_ext" <<_ACEOF
11040 #line 11040 "configure"
11041 #include "confdefs.h"
11043 /* Override any gcc2 internal prototype to avoid an error. */
11047 /* We use char because int might match the return type of a gcc2
11048 builtin and then its argument prototype would still apply. */
11058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11059 if { (eval echo "$as_me:11059: \"$ac_link\"") >&5
11060 (eval $ac_link) 2>&5
11062 echo "$as_me:11062: \$? = $ac_status" >&5
11063 (exit "$ac_status"); } &&
11064 { ac_try='test -s "conftest$ac_exeext"'
11065 { (eval echo "$as_me:11065: \"$ac_try\"") >&5
11066 (eval $ac_try) 2>&5
11068 echo "$as_me:11068: \$? = $ac_status" >&5
11069 (exit "$ac_status"); }; }; then
11070 ac_cv_lib_gpm_Gpm_Open=yes
11072 echo "$as_me: failed program was:" >&5
11073 cat "conftest.$ac_ext" >&5
11074 ac_cv_lib_gpm_Gpm_Open=no
11076 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11077 LIBS=$ac_check_lib_save_LIBS
11079 echo "$as_me:11079: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11080 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
11081 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
11082 echo "$as_me:11082: checking for initscr in -lgpm" >&5
11083 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
11084 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
11085 echo $ECHO_N "(cached) $ECHO_C" >&6
11087 ac_check_lib_save_LIBS=$LIBS
11089 cat >"conftest.$ac_ext" <<_ACEOF
11090 #line 11090 "configure"
11091 #include "confdefs.h"
11093 /* Override any gcc2 internal prototype to avoid an error. */
11097 /* We use char because int might match the return type of a gcc2
11098 builtin and then its argument prototype would still apply. */
11108 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11109 if { (eval echo "$as_me:11109: \"$ac_link\"") >&5
11110 (eval $ac_link) 2>&5
11112 echo "$as_me:11112: \$? = $ac_status" >&5
11113 (exit "$ac_status"); } &&
11114 { ac_try='test -s "conftest$ac_exeext"'
11115 { (eval echo "$as_me:11115: \"$ac_try\"") >&5
11116 (eval $ac_try) 2>&5
11118 echo "$as_me:11118: \$? = $ac_status" >&5
11119 (exit "$ac_status"); }; }; then
11120 ac_cv_lib_gpm_initscr=yes
11122 echo "$as_me: failed program was:" >&5
11123 cat "conftest.$ac_ext" >&5
11124 ac_cv_lib_gpm_initscr=no
11126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11127 LIBS=$ac_check_lib_save_LIBS
11129 echo "$as_me:11129: result: $ac_cv_lib_gpm_initscr" >&5
11130 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
11131 if test "$ac_cv_lib_gpm_initscr" = yes; then
11132 LIBS="$cf_ncurses_SAVE"
11134 cf_ncurses_LIBS="-lgpm"
11141 # This is only necessary if you are linking against an obsolete
11142 # version of ncurses (but it should do no harm, since it is static).
11143 if test "$cf_nculib_root" = ncurses ; then
11144 echo "$as_me:11144: checking for tgoto in -lmytinfo" >&5
11145 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
11146 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
11147 echo $ECHO_N "(cached) $ECHO_C" >&6
11149 ac_check_lib_save_LIBS=$LIBS
11150 LIBS="-lmytinfo $LIBS"
11151 cat >"conftest.$ac_ext" <<_ACEOF
11152 #line 11152 "configure"
11153 #include "confdefs.h"
11155 /* Override any gcc2 internal prototype to avoid an error. */
11159 /* We use char because int might match the return type of a gcc2
11160 builtin and then its argument prototype would still apply. */
11170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11171 if { (eval echo "$as_me:11171: \"$ac_link\"") >&5
11172 (eval $ac_link) 2>&5
11174 echo "$as_me:11174: \$? = $ac_status" >&5
11175 (exit "$ac_status"); } &&
11176 { ac_try='test -s "conftest$ac_exeext"'
11177 { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178 (eval $ac_try) 2>&5
11180 echo "$as_me:11180: \$? = $ac_status" >&5
11181 (exit "$ac_status"); }; }; then
11182 ac_cv_lib_mytinfo_tgoto=yes
11184 echo "$as_me: failed program was:" >&5
11185 cat "conftest.$ac_ext" >&5
11186 ac_cv_lib_mytinfo_tgoto=no
11188 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11189 LIBS=$ac_check_lib_save_LIBS
11191 echo "$as_me:11191: result: $ac_cv_lib_mytinfo_tgoto" >&5
11192 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
11193 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
11194 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
11201 cf_add_libs="$LIBS"
11204 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11205 # filter duplicates
11206 for cf_add_1lib in $cf_add_0lib; do
11207 for cf_add_2lib in $cf_add_libs; do
11208 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11213 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11215 LIBS="$cf_add_libs"
11217 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
11220 cf_add_libs="$LIBS"
11223 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11224 # filter duplicates
11225 for cf_add_1lib in $cf_add_0lib; do
11226 for cf_add_2lib in $cf_add_libs; do
11227 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11232 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11234 LIBS="$cf_add_libs"
11238 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
11240 echo "$as_me:11240: checking for initscr" >&5
11241 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
11242 if test "${ac_cv_func_initscr+set}" = set; then
11243 echo $ECHO_N "(cached) $ECHO_C" >&6
11245 cat >"conftest.$ac_ext" <<_ACEOF
11246 #line 11246 "configure"
11247 #include "confdefs.h"
11248 #define initscr autoconf_temporary
11249 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
11256 /* We use char because int might match the return type of a gcc2
11257 builtin and then its argument prototype would still apply. */
11258 char initscr (void);
11264 /* The GNU C library defines stubs for functions which it implements
11265 to always fail with ENOSYS. Some functions are actually named
11266 something starting with __ and the normal name is an alias. */
11267 #if defined (__stub_initscr) || defined (__stub___initscr)
11268 #error found stub for initscr
11276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11277 if { (eval echo "$as_me:11277: \"$ac_link\"") >&5
11278 (eval $ac_link) 2>&5
11280 echo "$as_me:11280: \$? = $ac_status" >&5
11281 (exit "$ac_status"); } &&
11282 { ac_try='test -s "conftest$ac_exeext"'
11283 { (eval echo "$as_me:11283: \"$ac_try\"") >&5
11284 (eval $ac_try) 2>&5
11286 echo "$as_me:11286: \$? = $ac_status" >&5
11287 (exit "$ac_status"); }; }; then
11288 ac_cv_func_initscr=yes
11290 echo "$as_me: failed program was:" >&5
11291 cat "conftest.$ac_ext" >&5
11292 ac_cv_func_initscr=no
11294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11296 echo "$as_me:11296: result: $ac_cv_func_initscr" >&5
11297 echo "${ECHO_T}$ac_cv_func_initscr" >&6
11298 if test "$ac_cv_func_initscr" = yes; then
11299 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11302 cf_save_LIBS="$LIBS"
11303 echo "$as_me:11303: checking for initscr in -l$cf_nculib_root" >&5
11304 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
11305 LIBS="-l$cf_nculib_root $LIBS"
11306 cat >"conftest.$ac_ext" <<_ACEOF
11307 #line 11307 "configure"
11308 #include "confdefs.h"
11309 #include <${cf_cv_ncurses_header:-curses.h}>
11318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11319 if { (eval echo "$as_me:11319: \"$ac_link\"") >&5
11320 (eval $ac_link) 2>&5
11322 echo "$as_me:11322: \$? = $ac_status" >&5
11323 (exit "$ac_status"); } &&
11324 { ac_try='test -s "conftest$ac_exeext"'
11325 { (eval echo "$as_me:11325: \"$ac_try\"") >&5
11326 (eval $ac_try) 2>&5
11328 echo "$as_me:11328: \$? = $ac_status" >&5
11329 (exit "$ac_status"); }; }; then
11330 echo "$as_me:11330: result: yes" >&5
11331 echo "${ECHO_T}yes" >&6
11332 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11335 echo "$as_me: failed program was:" >&5
11336 cat "conftest.$ac_ext" >&5
11337 echo "$as_me:11337: result: no" >&5
11338 echo "${ECHO_T}no" >&6
11341 cf_library_path_list=""
11342 if test -n "${LDFLAGS}${LIBS}" ; then
11343 for cf_library_path in $LDFLAGS $LIBS
11345 case "$cf_library_path" in
11347 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11349 test "x$cf_library_path" != "xNONE" && \
11350 test -d "$cf_library_path" && \
11352 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11353 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11354 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11355 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11356 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11357 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"
11360 cf_library_path_list="$cf_library_path_list $cf_search"
11368 test "x$prefix" != "xNONE" && \
11369 test -d "$prefix" && \
11371 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11372 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11373 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11374 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11375 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11376 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11379 for cf_subdir_prefix in \
11388 test "x$cf_subdir_prefix" != "x$prefix" && \
11389 test -d "$cf_subdir_prefix" && \
11390 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11391 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11392 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11393 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11394 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11395 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11396 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"
11401 cf_search="$cf_library_path_list $cf_search"
11403 for cf_libdir in $cf_search
11405 echo "$as_me:11405: checking for -l$cf_nculib_root in $cf_libdir" >&5
11406 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11407 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11408 cat >"conftest.$ac_ext" <<_ACEOF
11409 #line 11409 "configure"
11410 #include "confdefs.h"
11411 #include <${cf_cv_ncurses_header:-curses.h}>
11420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11421 if { (eval echo "$as_me:11421: \"$ac_link\"") >&5
11422 (eval $ac_link) 2>&5
11424 echo "$as_me:11424: \$? = $ac_status" >&5
11425 (exit "$ac_status"); } &&
11426 { ac_try='test -s "conftest$ac_exeext"'
11427 { (eval echo "$as_me:11427: \"$ac_try\"") >&5
11428 (eval $ac_try) 2>&5
11430 echo "$as_me:11430: \$? = $ac_status" >&5
11431 (exit "$ac_status"); }; }; then
11432 echo "$as_me:11432: result: yes" >&5
11433 echo "${ECHO_T}yes" >&6
11434 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11437 echo "$as_me: failed program was:" >&5
11438 cat "conftest.$ac_ext" >&5
11439 echo "$as_me:11439: result: no" >&5
11440 echo "${ECHO_T}no" >&6
11441 LIBS="$cf_save_LIBS"
11443 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11451 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11453 if test "$cf_found_library" = no ; then
11454 { { echo "$as_me:11454: error: Cannot link $cf_nculib_root library" >&5
11455 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11456 { (exit 1); exit 1; }; }
11461 if test -n "$cf_ncurses_LIBS" ; then
11462 echo "$as_me:11462: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11463 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11464 cf_ncurses_SAVE="$LIBS"
11465 for p in $cf_ncurses_LIBS ; do
11466 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11467 if test "$q" != "$LIBS" ; then
11471 cat >"conftest.$ac_ext" <<_ACEOF
11472 #line 11472 "configure"
11473 #include "confdefs.h"
11474 #include <${cf_cv_ncurses_header:-curses.h}>
11478 initscr(); mousemask(0,0); tigetstr((char *)0);
11483 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11484 if { (eval echo "$as_me:11484: \"$ac_link\"") >&5
11485 (eval $ac_link) 2>&5
11487 echo "$as_me:11487: \$? = $ac_status" >&5
11488 (exit "$ac_status"); } &&
11489 { ac_try='test -s "conftest$ac_exeext"'
11490 { (eval echo "$as_me:11490: \"$ac_try\"") >&5
11491 (eval $ac_try) 2>&5
11493 echo "$as_me:11493: \$? = $ac_status" >&5
11494 (exit "$ac_status"); }; }; then
11495 echo "$as_me:11495: result: yes" >&5
11496 echo "${ECHO_T}yes" >&6
11498 echo "$as_me: failed program was:" >&5
11499 cat "conftest.$ac_ext" >&5
11500 echo "$as_me:11500: result: no" >&5
11501 echo "${ECHO_T}no" >&6
11502 LIBS="$cf_ncurses_SAVE"
11504 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11507 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11509 cat >>confdefs.h <<EOF
11510 #define $cf_nculib_ROOT 1
11515 NCURSES_CONFIG=none
11520 if test "$NCURSES_CONFIG_PKG" != none ; then
11521 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11523 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11524 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11525 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11527 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11528 if test -z "$cf_cv_abi_version"
11530 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11533 elif test "$NCURSES_CONFIG" != none ; then
11535 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11537 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11538 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11539 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11541 # ABI version is not available from headers
11542 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11546 for cf_name in MAJOR MINOR PATCH
11548 cat >conftest.$ac_ext <<CF_EOF
11549 #include <${cf_cv_ncurses_header:-curses.h}>
11550 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11552 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11553 { (eval echo "$as_me:11553: \"$cf_try\"") >&5
11554 (eval $cf_try) 2>&5
11556 echo "$as_me:11556: \$? = $ac_status" >&5
11557 (exit "$ac_status"); }
11558 if test -f conftest.out ; then
11559 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11560 eval NCURSES_$cf_name=\"$cf_result\"
11561 # cat conftest.$ac_ext
11566 cf_cv_abi_version=${NCURSES_MAJOR}
11570 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11572 cf_cv_timestamp=`date`
11574 echo "$as_me:11574: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11575 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11577 echo "$as_me:11577: checking if you want to have a library-prefix" >&5
11578 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11580 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11581 if test "${with_lib_prefix+set}" = set; then
11582 withval="$with_lib_prefix"
11583 with_lib_prefix=$withval
11585 with_lib_prefix=auto
11587 echo "$as_me:11587: result: $with_lib_prefix" >&5
11588 echo "${ECHO_T}$with_lib_prefix" >&6
11590 if test "$with_lib_prefix" = auto
11593 case "$cf_cv_system_name" in
11595 if test "$DFT_LWR_MODEL" = libtool; then
11604 (*) LIB_PREFIX='lib'
11607 cf_prefix=$LIB_PREFIX
11609 elif test "$with_lib_prefix" = no
11613 LIB_PREFIX=$with_lib_prefix
11618 ###############################################################################
11620 if test X"$CC_G_OPT" = X"" ; then
11622 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11625 echo "$as_me:11625: checking for default loader flags" >&5
11626 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11627 case $DFT_LWR_MODEL in
11628 (normal) LD_MODEL='' ;;
11629 (debug) LD_MODEL=$CC_G_OPT ;;
11630 (profile) LD_MODEL='-pg';;
11631 (shared) LD_MODEL='' ;;
11633 echo "$as_me:11633: result: $LD_MODEL" >&5
11634 echo "${ECHO_T}$LD_MODEL" >&6
11637 if test "x$cf_cv_enable_rpath" != xno
11639 echo "$as_me:11639: checking for an rpath option" >&5
11640 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11641 case "$cf_cv_system_name" in
11643 if test "$GCC" = yes; then
11644 LD_RPATH_OPT="-Wl,-rpath,"
11646 LD_RPATH_OPT="-rpath "
11649 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11650 LD_RPATH_OPT="-Wl,-rpath,"
11652 (openbsd[2-9].*|mirbsd*)
11653 LD_RPATH_OPT="-Wl,-rpath,"
11656 LD_RPATH_OPT="-rpath "
11659 LD_RPATH_OPT="-Wl,-rpath,"
11662 LD_RPATH_OPT="-rpath "
11670 echo "$as_me:11670: result: $LD_RPATH_OPT" >&5
11671 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11673 case "x$LD_RPATH_OPT" in
11675 echo "$as_me:11675: checking if we need a space after rpath option" >&5
11676 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11677 cf_save_LIBS="$LIBS"
11679 cf_add_libs="$LIBS"
11682 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11683 # filter duplicates
11684 for cf_add_1lib in $cf_add_0lib; do
11685 for cf_add_2lib in $cf_add_libs; do
11686 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11691 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11693 LIBS="$cf_add_libs"
11695 cat >"conftest.$ac_ext" <<_ACEOF
11696 #line 11696 "configure"
11697 #include "confdefs.h"
11707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11708 if { (eval echo "$as_me:11708: \"$ac_link\"") >&5
11709 (eval $ac_link) 2>&5
11711 echo "$as_me:11711: \$? = $ac_status" >&5
11712 (exit "$ac_status"); } &&
11713 { ac_try='test -s "conftest$ac_exeext"'
11714 { (eval echo "$as_me:11714: \"$ac_try\"") >&5
11715 (eval $ac_try) 2>&5
11717 echo "$as_me:11717: \$? = $ac_status" >&5
11718 (exit "$ac_status"); }; }; then
11721 echo "$as_me: failed program was:" >&5
11722 cat "conftest.$ac_ext" >&5
11725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11726 LIBS="$cf_save_LIBS"
11727 echo "$as_me:11727: result: $cf_rpath_space" >&5
11728 echo "${ECHO_T}$cf_rpath_space" >&6
11729 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11738 INSTALL_LIB="-m 644"
11739 : ${rel_builddir:=.}
11745 cf_cv_do_symlinks=no
11747 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11749 echo "$as_me:11749: checking if release/abi version should be used for shared libs" >&5
11750 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11752 # Check whether --with-shlib-version or --without-shlib-version was given.
11753 if test "${with_shlib_version+set}" = set; then
11754 withval="$with_shlib_version"
11755 test -z "$withval" && withval=auto
11758 cf_cv_shlib_version=auto
11761 cf_cv_shlib_version=$withval
11764 echo "$as_me:11764: result: $withval" >&5
11765 echo "${ECHO_T}$withval" >&6
11766 { { echo "$as_me:11766: error: option value must be one of: rel, abi, or auto" >&5
11767 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11768 { (exit 1); exit 1; }; }
11773 cf_cv_shlib_version=auto
11775 echo "$as_me:11775: result: $cf_cv_shlib_version" >&5
11776 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11778 cf_cv_rm_so_locs=no
11781 # Some less-capable ports of gcc support only -fpic
11785 if test "$GCC" = yes
11789 case "$cf_cv_system_name" in
11790 (*linux*) # e.g., PGI compiler
11796 if test "$cf_try_fPIC" = yes
11798 echo "$as_me:11798: checking which $CC option to use" >&5
11799 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11800 cf_save_CFLAGS="$CFLAGS"
11801 for CC_SHARED_OPTS in -fPIC -fpic ''
11803 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11804 cat >"conftest.$ac_ext" <<_ACEOF
11805 #line 11805 "configure"
11806 #include "confdefs.h"
11816 rm -f "conftest.$ac_objext"
11817 if { (eval echo "$as_me:11817: \"$ac_compile\"") >&5
11818 (eval $ac_compile) 2>&5
11820 echo "$as_me:11820: \$? = $ac_status" >&5
11821 (exit "$ac_status"); } &&
11822 { ac_try='test -s "conftest.$ac_objext"'
11823 { (eval echo "$as_me:11823: \"$ac_try\"") >&5
11824 (eval $ac_try) 2>&5
11826 echo "$as_me:11826: \$? = $ac_status" >&5
11827 (exit "$ac_status"); }; }; then
11830 echo "$as_me: failed program was:" >&5
11831 cat "conftest.$ac_ext" >&5
11833 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11835 echo "$as_me:11835: result: $CC_SHARED_OPTS" >&5
11836 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11837 CFLAGS="$cf_save_CFLAGS"
11840 cf_cv_shlib_version_infix=no
11842 case "$cf_cv_system_name" in
11843 (aix4.3-9*|aix[5-7]*)
11844 if test "$GCC" = yes; then
11845 CC_SHARED_OPTS='-Wl,-brtl'
11846 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11848 CC_SHARED_OPTS='-brtl'
11849 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11850 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11854 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11858 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11859 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11860 cf_cv_shlib_version=cygdll
11861 cf_cv_shlib_version_infix=cygdll
11864 cat >mk_shared_lib.sh <<-CF_EOF
11867 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11870 Linking shared library
11871 ** SHARED_LIB \$SHARED_LIB
11872 ** IMPORT_LIB \$IMPORT_LIB
11874 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11876 chmod +x mk_shared_lib.sh
11880 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11881 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11882 cf_cv_shlib_version=msysdll
11883 cf_cv_shlib_version_infix=msysdll
11886 cat >mk_shared_lib.sh <<-CF_EOF
11889 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11892 Linking shared library
11893 ** SHARED_LIB \$SHARED_LIB
11894 ** IMPORT_LIB \$IMPORT_LIB
11896 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11898 chmod +x mk_shared_lib.sh
11901 cf_try_cflags="no-cpp-precomp"
11902 CC_SHARED_OPTS="-dynamic"
11903 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11904 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11905 cf_cv_shlib_version_infix=yes
11906 echo "$as_me:11906: checking if ld -search_paths_first works" >&5
11907 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11908 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11909 echo $ECHO_N "(cached) $ECHO_C" >&6
11912 cf_save_LDFLAGS=$LDFLAGS
11913 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11914 cat >"conftest.$ac_ext" <<_ACEOF
11915 #line 11915 "configure"
11916 #include "confdefs.h"
11926 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11927 if { (eval echo "$as_me:11927: \"$ac_link\"") >&5
11928 (eval $ac_link) 2>&5
11930 echo "$as_me:11930: \$? = $ac_status" >&5
11931 (exit "$ac_status"); } &&
11932 { ac_try='test -s "conftest$ac_exeext"'
11933 { (eval echo "$as_me:11933: \"$ac_try\"") >&5
11934 (eval $ac_try) 2>&5
11936 echo "$as_me:11936: \$? = $ac_status" >&5
11937 (exit "$ac_status"); }; }; then
11938 cf_cv_ldflags_search_paths_first=yes
11940 echo "$as_me: failed program was:" >&5
11941 cat "conftest.$ac_ext" >&5
11942 cf_cv_ldflags_search_paths_first=no
11944 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11945 LDFLAGS=$cf_save_LDFLAGS
11947 echo "$as_me:11947: result: $cf_cv_ldflags_search_paths_first" >&5
11948 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11949 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11950 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11955 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11956 if test "$cf_cv_shlib_version" = rel; then
11957 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11959 cf_cv_shared_soname='`basename $@`'
11962 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11965 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11966 if test "$GCC" != yes; then
11967 CC_SHARED_OPTS='+Z'
11969 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11970 INSTALL_LIB="-m 555"
11973 # (tested with gcc 2.7.2 -- I don't have c89)
11974 if test "$GCC" = yes; then
11975 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11977 CC_SHARED_OPTS='+Z'
11978 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11980 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11981 # HP-UX shared libraries must be executable, and should be
11982 # readonly to exploit a quirk in the memory manager.
11983 INSTALL_LIB="-m 555"
11986 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11987 if test "$cf_cv_shlib_version" = rel; then
11988 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11990 cf_shared_soname='`basename $@`'
11993 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11996 if test "$cf_cv_enable_rpath" = yes ; then
11997 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11999 # tested with IRIX 5.2 and 'cc'.
12000 if test "$GCC" != yes; then
12001 CC_SHARED_OPTS='-KPIC'
12002 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
12004 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
12006 cf_cv_rm_so_locs=yes
12008 (linux*|gnu*|k*bsd*-gnu)
12009 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12010 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12011 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12013 if test "$cf_cv_enable_rpath" = yes ; then
12014 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12017 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12018 if test "$cf_cv_shlib_version" = rel; then
12019 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12021 cf_cv_shared_soname='`basename $@`'
12024 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12027 cf_cv_shlib_version=msvcdll
12028 cf_cv_shlib_version_infix=msvcdll
12031 if test "$DFT_LWR_MODEL" = "shared" ; then
12032 LOCAL_LDFLAGS="-link -dll"
12033 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12034 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
12037 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
12038 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
12039 cat >mk_shared_lib.sh <<-CF_EOF
12042 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
12047 Linking shared library
12048 ** SHARED LIB \$SHARED_LIB
12049 ** IMPORT_LIB \$IMPORT_LIB
12051 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
12052 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
12053 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
12055 chmod +x mk_shared_lib.sh
12056 cat >mk_prog.sh <<-CF_EOF
12059 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
12062 ldopts=("/subsystem:console")
12065 while test \$# -gt 0; do
12068 # ignore -link argument
12071 # ignore runtime-library option
12086 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
12089 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
12095 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
12096 ldopts+=("\${linkarg}")
12104 ldopts+=("-out:\$1")
12113 if [ "\$isdll" -ne 0 ]; then
12114 for lib in \${libs[*]}; do
12115 ldopts+=("\$lib.dll.lib")
12118 for lib in \${libs[*]}; do
12119 ldopts+=("\$lib.lib")
12124 ** ld options: "\${ldopts[@]}"
12126 exec \$LD \${ldopts[@]}
12128 chmod +x mk_prog.sh
12129 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
12130 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
12133 cf_cv_shlib_version=mingw
12134 cf_cv_shlib_version_infix=mingw
12137 if test "$DFT_LWR_MODEL" = "shared" ; then
12138 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
12139 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12140 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
12143 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
12144 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
12145 cat >mk_shared_lib.sh <<-CF_EOF
12148 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
12151 Linking shared library
12152 ** SHARED_LIB \$SHARED_LIB
12153 ** IMPORT_LIB \$IMPORT_LIB
12155 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
12157 chmod +x mk_shared_lib.sh
12159 (openbsd[2-9].*|mirbsd*)
12160 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12161 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12162 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12164 if test "$cf_cv_enable_rpath" = yes ; then
12165 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12167 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12169 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12170 if test "$cf_cv_shlib_version" = rel; then
12171 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12173 cf_cv_shared_soname='`basename $@`'
12176 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12180 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
12184 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
12186 (nto-qnx*|openbsd*|freebsd[12].*)
12187 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12188 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
12189 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12191 (dragonfly*|freebsd*)
12192 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12193 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12194 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12195 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
12196 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12199 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12200 if test "$cf_cv_shlib_version" = rel; then
12201 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12203 cf_cv_shared_soname='`basename $@`'
12206 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
12209 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
12210 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
12211 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
12212 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12213 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
12214 if test "$cf_cv_shlib_version" = auto; then
12215 if test -f /usr/libexec/ld.elf_so; then
12216 cf_cv_shlib_version=abi
12218 cf_cv_shlib_version=rel
12222 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12223 if test "$cf_cv_shlib_version" = rel; then
12224 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12226 cf_cv_shared_soname='`basename $@`'
12229 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
12231 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
12235 # tested with OSF/1 V3.2 and 'cc'
12236 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
12237 # link with shared libs).
12238 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
12241 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
12244 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
12245 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
12246 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
12247 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12249 cf_cv_rm_so_locs=yes
12251 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
12252 # tested with osr5.0.5
12253 if test "$GCC" != yes; then
12254 CC_SHARED_OPTS='-belf -KPIC'
12256 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
12257 if test "$cf_cv_enable_rpath" = yes ; then
12258 # only way is to set LD_RUN_PATH but no switch for it
12261 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12262 LINK_PROGS='LD_RUN_PATH=${libdir}'
12263 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
12266 # tested with SunOS 4.1.1 and gcc 2.7.0
12267 if test "$GCC" != yes; then
12268 CC_SHARED_OPTS='-KPIC'
12270 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
12271 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12274 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
12275 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
12276 if test "$DFT_LWR_MODEL" = "shared" ; then
12277 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
12278 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
12280 if test "$cf_cv_enable_rpath" = yes ; then
12281 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
12284 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
12285 if test "$cf_cv_shlib_version" = rel; then
12286 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
12288 cf_cv_shared_soname='`basename $@`'
12291 if test "$GCC" != yes; then
12292 cf_save_CFLAGS="$CFLAGS"
12293 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
12295 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
12296 cat >"conftest.$ac_ext" <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12303 printf("Hello\\n");
12308 rm -f "conftest.$ac_objext"
12309 if { (eval echo "$as_me:12309: \"$ac_compile\"") >&5
12310 (eval $ac_compile) 2>&5
12312 echo "$as_me:12312: \$? = $ac_status" >&5
12313 (exit "$ac_status"); } &&
12314 { ac_try='test -s "conftest.$ac_objext"'
12315 { (eval echo "$as_me:12315: \"$ac_try\"") >&5
12316 (eval $ac_try) 2>&5
12318 echo "$as_me:12318: \$? = $ac_status" >&5
12319 (exit "$ac_status"); }; }; then
12322 echo "$as_me: failed program was:" >&5
12323 cat "conftest.$ac_ext" >&5
12325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12327 CFLAGS="$cf_save_CFLAGS"
12328 CC_SHARED_OPTS=$cf_shared_opts
12329 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
12331 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
12334 (sysv5uw7*|unix_sv*)
12335 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
12336 if test "$GCC" != yes; then
12337 CC_SHARED_OPTS='-KPIC'
12339 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
12342 CC_SHARED_OPTS='unknown'
12343 MK_SHARED_LIB='echo unknown'
12347 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12348 case "$cf_cv_shlib_version" in
12350 case "$MK_SHARED_LIB" in
12352 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12355 { echo "$as_me:12355: WARNING: ignored --with-shlib-version" >&5
12356 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12362 if test -n "$cf_try_cflags"
12364 cat > conftest.$ac_ext <<EOF
12365 #line 12365 "${as_me:-configure}"
12367 int main(int argc, char *argv[])
12369 printf("hello\\n");
12370 return (argv[argc-1] == 0) ;
12373 cf_save_CFLAGS="$CFLAGS"
12374 for cf_opt in $cf_try_cflags
12376 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12377 echo "$as_me:12377: checking if CFLAGS option -$cf_opt works" >&5
12378 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12379 if { (eval echo "$as_me:12379: \"$ac_compile\"") >&5
12380 (eval $ac_compile) 2>&5
12382 echo "$as_me:12382: \$? = $ac_status" >&5
12383 (exit "$ac_status"); }; then
12384 echo "$as_me:12384: result: yes" >&5
12385 echo "${ECHO_T}yes" >&6
12386 cf_save_CFLAGS="$CFLAGS"
12388 echo "$as_me:12388: result: no" >&5
12389 echo "${ECHO_T}no" >&6
12392 CFLAGS="$cf_save_CFLAGS"
12395 # RPATH_LIST is a colon-separated list of directories
12396 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12397 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12399 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12401 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12403 echo "${as_me:-configure}:12403: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12405 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12407 echo "${as_me:-configure}:12407: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12409 # The test/sample programs in the original tree link using rpath option.
12410 # Make it optional for packagers.
12411 if test -n "$LOCAL_LDFLAGS"
12413 echo "$as_me:12413: checking if you want to link sample programs with rpath option" >&5
12414 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12416 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12417 if test "${enable_rpath_link+set}" = set; then
12418 enableval="$enable_rpath_link"
12419 with_rpath_link=$enableval
12421 with_rpath_link=yes
12423 echo "$as_me:12423: result: $with_rpath_link" >&5
12424 echo "${ECHO_T}$with_rpath_link" >&6
12425 if test "$with_rpath_link" = no
12432 ###############################################################################
12434 ### use option --enable-broken-linker to force on use of broken-linker support
12436 echo "$as_me:12436: checking if you want broken-linker support code" >&5
12437 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12439 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12440 if test "${enable_broken_linker+set}" = set; then
12441 enableval="$enable_broken_linker"
12442 with_broken_linker=$enableval
12444 with_broken_linker=no
12446 echo "$as_me:12446: result: $with_broken_linker" >&5
12447 echo "${ECHO_T}$with_broken_linker" >&6
12449 : "${BROKEN_LINKER:=0}"
12450 if test "x$with_broken_linker" = xyes ; then
12452 cat >>confdefs.h <<\EOF
12453 #define BROKEN_LINKER 1
12459 # Check to define _XOPEN_SOURCE "automatically"
12461 echo "$as_me:12461: checking if the POSIX test-macros are already defined" >&5
12462 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12463 if test "${cf_cv_posix_visible+set}" = set; then
12464 echo $ECHO_N "(cached) $ECHO_C" >&6
12467 cat >"conftest.$ac_ext" <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12475 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12476 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12477 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12478 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12479 #error conflicting symbols found
12486 rm -f "conftest.$ac_objext"
12487 if { (eval echo "$as_me:12487: \"$ac_compile\"") >&5
12488 (eval $ac_compile) 2>&5
12490 echo "$as_me:12490: \$? = $ac_status" >&5
12491 (exit "$ac_status"); } &&
12492 { ac_try='test -s "conftest.$ac_objext"'
12493 { (eval echo "$as_me:12493: \"$ac_try\"") >&5
12494 (eval $ac_try) 2>&5
12496 echo "$as_me:12496: \$? = $ac_status" >&5
12497 (exit "$ac_status"); }; }; then
12498 cf_cv_posix_visible=no
12500 echo "$as_me: failed program was:" >&5
12501 cat "conftest.$ac_ext" >&5
12502 cf_cv_posix_visible=yes
12504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12507 echo "$as_me:12507: result: $cf_cv_posix_visible" >&5
12508 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12510 if test "$cf_cv_posix_visible" = no; then
12512 cf_XOPEN_SOURCE=600
12513 cf_POSIX_C_SOURCE=199506L
12518 cf_xopen_source="-D_ALL_SOURCE"
12521 cf_xopen_source="-D_APPLE_C_SOURCE"
12524 cf_xopen_source="-D_DARWIN_C_SOURCE"
12527 (freebsd*|dragonfly*|midnightbsd*)
12528 # 5.x headers associate
12529 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12530 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12531 cf_POSIX_C_SOURCE=200112L
12532 cf_XOPEN_SOURCE=600
12533 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12536 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12539 cf_xopen_source="-D_HPUX_SOURCE"
12542 cf_xopen_source="-D_SGI_SOURCE"
12545 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
12547 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12549 echo "$as_me:12549: checking if this is the GNU C library" >&5
12550 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12551 if test "${cf_cv_gnu_library+set}" = set; then
12552 echo $ECHO_N "(cached) $ECHO_C" >&6
12555 cat >"conftest.$ac_ext" <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558 #include <sys/types.h>
12563 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12565 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12568 # error not GNU C library
12574 rm -f "conftest.$ac_objext"
12575 if { (eval echo "$as_me:12575: \"$ac_compile\"") >&5
12576 (eval $ac_compile) 2>&5
12578 echo "$as_me:12578: \$? = $ac_status" >&5
12579 (exit "$ac_status"); } &&
12580 { ac_try='test -s "conftest.$ac_objext"'
12581 { (eval echo "$as_me:12581: \"$ac_try\"") >&5
12582 (eval $ac_try) 2>&5
12584 echo "$as_me:12584: \$? = $ac_status" >&5
12585 (exit "$ac_status"); }; }; then
12586 cf_cv_gnu_library=yes
12588 echo "$as_me: failed program was:" >&5
12589 cat "conftest.$ac_ext" >&5
12590 cf_cv_gnu_library=no
12592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12595 echo "$as_me:12595: result: $cf_cv_gnu_library" >&5
12596 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12598 if test x$cf_cv_gnu_library = xyes; then
12600 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12601 # was changed to help a little. newlib incorporated the change about 4
12603 echo "$as_me:12603: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12604 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12605 if test "${cf_cv_gnu_library_219+set}" = set; then
12606 echo $ECHO_N "(cached) $ECHO_C" >&6
12609 cf_save="$CPPFLAGS"
12611 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12612 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12614 cat >"conftest.$ac_ext" <<_ACEOF
12615 #line 12615 "configure"
12616 #include "confdefs.h"
12617 #include <sys/types.h>
12622 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12624 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12627 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12633 rm -f "conftest.$ac_objext"
12634 if { (eval echo "$as_me:12634: \"$ac_compile\"") >&5
12635 (eval $ac_compile) 2>&5
12637 echo "$as_me:12637: \$? = $ac_status" >&5
12638 (exit "$ac_status"); } &&
12639 { ac_try='test -s "conftest.$ac_objext"'
12640 { (eval echo "$as_me:12640: \"$ac_try\"") >&5
12641 (eval $ac_try) 2>&5
12643 echo "$as_me:12643: \$? = $ac_status" >&5
12644 (exit "$ac_status"); }; }; then
12645 cf_cv_gnu_library_219=yes
12647 echo "$as_me: failed program was:" >&5
12648 cat "conftest.$ac_ext" >&5
12649 cf_cv_gnu_library_219=no
12651 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12652 CPPFLAGS="$cf_save"
12655 echo "$as_me:12655: result: $cf_cv_gnu_library_219" >&5
12656 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12658 if test "x$cf_cv_gnu_library_219" = xyes; then
12659 cf_save="$CPPFLAGS"
12660 echo "$as_me:12660: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12661 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12662 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12663 echo $ECHO_N "(cached) $ECHO_C" >&6
12669 cf_new_extra_cppflags=
12671 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12673 case "$cf_fix_cppflags" in
12675 case "$cf_add_cflags" in
12676 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12677 case "$cf_add_cflags" in
12679 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12681 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12682 && test -z "${cf_tst_cflags}" \
12683 && cf_fix_cppflags=yes
12685 if test "$cf_fix_cppflags" = yes ; then
12687 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12688 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12691 elif test "${cf_tst_cflags}" = "\"'" ; then
12693 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12694 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12700 case "$CPPFLAGS" in
12704 case "$cf_add_cflags" in
12706 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12708 CPPFLAGS=`echo "$CPPFLAGS" | \
12709 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12710 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12715 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12716 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12723 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12724 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12731 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12732 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12734 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12736 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12737 && test -z "${cf_tst_cflags}" \
12738 && cf_fix_cppflags=no
12743 if test -n "$cf_new_cflags" ; then
12745 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12746 CFLAGS="${CFLAGS}$cf_new_cflags"
12750 if test -n "$cf_new_cppflags" ; then
12752 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12753 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12757 if test -n "$cf_new_extra_cppflags" ; then
12759 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12760 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12764 cat >"conftest.$ac_ext" <<_ACEOF
12765 #line 12765 "configure"
12766 #include "confdefs.h"
12768 #include <limits.h>
12769 #include <sys/types.h>
12775 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12778 # error GNU C library is too old
12784 rm -f "conftest.$ac_objext"
12785 if { (eval echo "$as_me:12785: \"$ac_compile\"") >&5
12786 (eval $ac_compile) 2>&5
12788 echo "$as_me:12788: \$? = $ac_status" >&5
12789 (exit "$ac_status"); } &&
12790 { ac_try='test -s "conftest.$ac_objext"'
12791 { (eval echo "$as_me:12791: \"$ac_try\"") >&5
12792 (eval $ac_try) 2>&5
12794 echo "$as_me:12794: \$? = $ac_status" >&5
12795 (exit "$ac_status"); }; }; then
12796 cf_cv_gnu_dftsrc_219=yes
12798 echo "$as_me: failed program was:" >&5
12799 cat "conftest.$ac_ext" >&5
12800 cf_cv_gnu_dftsrc_219=no
12802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12805 echo "$as_me:12805: result: $cf_cv_gnu_dftsrc_219" >&5
12806 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12807 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12809 cf_cv_gnu_dftsrc_219=maybe
12812 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12814 echo "$as_me:12814: checking if we must define _GNU_SOURCE" >&5
12815 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12816 if test "${cf_cv_gnu_source+set}" = set; then
12817 echo $ECHO_N "(cached) $ECHO_C" >&6
12820 cat >"conftest.$ac_ext" <<_ACEOF
12821 #line 12821 "configure"
12822 #include "confdefs.h"
12823 #include <sys/types.h>
12828 #ifndef _XOPEN_SOURCE
12829 #error expected _XOPEN_SOURCE to be defined
12835 rm -f "conftest.$ac_objext"
12836 if { (eval echo "$as_me:12836: \"$ac_compile\"") >&5
12837 (eval $ac_compile) 2>&5
12839 echo "$as_me:12839: \$? = $ac_status" >&5
12840 (exit "$ac_status"); } &&
12841 { ac_try='test -s "conftest.$ac_objext"'
12842 { (eval echo "$as_me:12842: \"$ac_try\"") >&5
12843 (eval $ac_try) 2>&5
12845 echo "$as_me:12845: \$? = $ac_status" >&5
12846 (exit "$ac_status"); }; }; then
12847 cf_cv_gnu_source=no
12849 echo "$as_me: failed program was:" >&5
12850 cat "conftest.$ac_ext" >&5
12851 cf_save="$CPPFLAGS"
12856 cf_new_extra_cppflags=
12858 for cf_add_cflags in -D_GNU_SOURCE
12860 case "$cf_fix_cppflags" in
12862 case "$cf_add_cflags" in
12863 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12864 case "$cf_add_cflags" in
12866 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12868 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12869 && test -z "${cf_tst_cflags}" \
12870 && cf_fix_cppflags=yes
12872 if test "$cf_fix_cppflags" = yes ; then
12874 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12875 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12878 elif test "${cf_tst_cflags}" = "\"'" ; then
12880 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12881 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12887 case "$CPPFLAGS" in
12891 case "$cf_add_cflags" in
12893 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12895 CPPFLAGS=`echo "$CPPFLAGS" | \
12896 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12897 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12902 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12903 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12910 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12911 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12918 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12919 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12921 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12923 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12924 && test -z "${cf_tst_cflags}" \
12925 && cf_fix_cppflags=no
12930 if test -n "$cf_new_cflags" ; then
12932 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12933 CFLAGS="${CFLAGS}$cf_new_cflags"
12937 if test -n "$cf_new_cppflags" ; then
12939 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12940 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12944 if test -n "$cf_new_extra_cppflags" ; then
12946 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12947 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12951 cat >"conftest.$ac_ext" <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <sys/types.h>
12959 #ifdef _XOPEN_SOURCE
12960 #error expected _XOPEN_SOURCE to be undefined
12966 rm -f "conftest.$ac_objext"
12967 if { (eval echo "$as_me:12967: \"$ac_compile\"") >&5
12968 (eval $ac_compile) 2>&5
12970 echo "$as_me:12970: \$? = $ac_status" >&5
12971 (exit "$ac_status"); } &&
12972 { ac_try='test -s "conftest.$ac_objext"'
12973 { (eval echo "$as_me:12973: \"$ac_try\"") >&5
12974 (eval $ac_try) 2>&5
12976 echo "$as_me:12976: \$? = $ac_status" >&5
12977 (exit "$ac_status"); }; }; then
12978 cf_cv_gnu_source=no
12980 echo "$as_me: failed program was:" >&5
12981 cat "conftest.$ac_ext" >&5
12982 cf_cv_gnu_source=yes
12984 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12985 CPPFLAGS="$cf_save"
12988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12991 echo "$as_me:12991: result: $cf_cv_gnu_source" >&5
12992 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12994 if test "$cf_cv_gnu_source" = yes
12996 echo "$as_me:12996: checking if we should also define _DEFAULT_SOURCE" >&5
12997 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12998 if test "${cf_cv_default_source+set}" = set; then
12999 echo $ECHO_N "(cached) $ECHO_C" >&6
13002 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13003 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
13005 cat >"conftest.$ac_ext" <<_ACEOF
13006 #line 13006 "configure"
13007 #include "confdefs.h"
13008 #include <sys/types.h>
13013 #ifdef _DEFAULT_SOURCE
13014 #error expected _DEFAULT_SOURCE to be undefined
13020 rm -f "conftest.$ac_objext"
13021 if { (eval echo "$as_me:13021: \"$ac_compile\"") >&5
13022 (eval $ac_compile) 2>&5
13024 echo "$as_me:13024: \$? = $ac_status" >&5
13025 (exit "$ac_status"); } &&
13026 { ac_try='test -s "conftest.$ac_objext"'
13027 { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028 (eval $ac_try) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit "$ac_status"); }; }; then
13032 cf_cv_default_source=no
13034 echo "$as_me: failed program was:" >&5
13035 cat "conftest.$ac_ext" >&5
13036 cf_cv_default_source=yes
13038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13041 echo "$as_me:13041: result: $cf_cv_default_source" >&5
13042 echo "${ECHO_T}$cf_cv_default_source" >&6
13043 if test "$cf_cv_default_source" = yes
13046 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13047 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
13057 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
13060 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
13063 if test "$cf_cv_posix_visible" = no; then
13065 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13067 cf_save_CFLAGS="$CFLAGS"
13068 cf_save_CPPFLAGS="$CPPFLAGS"
13070 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13071 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13072 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13074 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13075 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13076 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13078 echo "$as_me:13078: checking if we should define _POSIX_C_SOURCE" >&5
13079 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13080 if test "${cf_cv_posix_c_source+set}" = set; then
13081 echo $ECHO_N "(cached) $ECHO_C" >&6
13084 echo "${as_me:-configure}:13084: testing if the symbol is already defined go no further ..." 1>&5
13086 cat >"conftest.$ac_ext" <<_ACEOF
13087 #line 13087 "configure"
13088 #include "confdefs.h"
13089 #include <sys/types.h>
13094 #ifndef _POSIX_C_SOURCE
13095 #error _POSIX_C_SOURCE is not defined
13101 rm -f "conftest.$ac_objext"
13102 if { (eval echo "$as_me:13102: \"$ac_compile\"") >&5
13103 (eval $ac_compile) 2>&5
13105 echo "$as_me:13105: \$? = $ac_status" >&5
13106 (exit "$ac_status"); } &&
13107 { ac_try='test -s "conftest.$ac_objext"'
13108 { (eval echo "$as_me:13108: \"$ac_try\"") >&5
13109 (eval $ac_try) 2>&5
13111 echo "$as_me:13111: \$? = $ac_status" >&5
13112 (exit "$ac_status"); }; }; then
13113 cf_cv_posix_c_source=no
13115 echo "$as_me: failed program was:" >&5
13116 cat "conftest.$ac_ext" >&5
13117 cf_want_posix_source=no
13118 case .$cf_POSIX_C_SOURCE in
13120 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13123 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13124 cf_want_posix_source=yes
13127 cf_want_posix_source=yes
13130 if test "$cf_want_posix_source" = yes ; then
13131 cat >"conftest.$ac_ext" <<_ACEOF
13132 #line 13132 "configure"
13133 #include "confdefs.h"
13134 #include <sys/types.h>
13139 #ifdef _POSIX_SOURCE
13140 #error _POSIX_SOURCE is defined
13146 rm -f "conftest.$ac_objext"
13147 if { (eval echo "$as_me:13147: \"$ac_compile\"") >&5
13148 (eval $ac_compile) 2>&5
13150 echo "$as_me:13150: \$? = $ac_status" >&5
13151 (exit "$ac_status"); } &&
13152 { ac_try='test -s "conftest.$ac_objext"'
13153 { (eval echo "$as_me:13153: \"$ac_try\"") >&5
13154 (eval $ac_try) 2>&5
13156 echo "$as_me:13156: \$? = $ac_status" >&5
13157 (exit "$ac_status"); }; }; then
13160 echo "$as_me: failed program was:" >&5
13161 cat "conftest.$ac_ext" >&5
13162 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13167 echo "${as_me:-configure}:13167: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13169 CFLAGS="$cf_trim_CFLAGS"
13170 CPPFLAGS="$cf_trim_CPPFLAGS"
13172 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13173 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13175 echo "${as_me:-configure}:13175: testing if the second compile does not leave our definition intact error ..." 1>&5
13177 cat >"conftest.$ac_ext" <<_ACEOF
13178 #line 13178 "configure"
13179 #include "confdefs.h"
13180 #include <sys/types.h>
13185 #ifndef _POSIX_C_SOURCE
13186 #error _POSIX_C_SOURCE is not defined
13192 rm -f "conftest.$ac_objext"
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194 (eval $ac_compile) 2>&5
13196 echo "$as_me:13196: \$? = $ac_status" >&5
13197 (exit "$ac_status"); } &&
13198 { ac_try='test -s "conftest.$ac_objext"'
13199 { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200 (eval $ac_try) 2>&5
13202 echo "$as_me:13202: \$? = $ac_status" >&5
13203 (exit "$ac_status"); }; }; then
13206 echo "$as_me: failed program was:" >&5
13207 cat "conftest.$ac_ext" >&5
13208 cf_cv_posix_c_source=no
13210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13211 CFLAGS="$cf_save_CFLAGS"
13212 CPPFLAGS="$cf_save_CPPFLAGS"
13215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13218 echo "$as_me:13218: result: $cf_cv_posix_c_source" >&5
13219 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13221 if test "$cf_cv_posix_c_source" != no ; then
13222 CFLAGS="$cf_trim_CFLAGS"
13223 CPPFLAGS="$cf_trim_CPPFLAGS"
13228 cf_new_extra_cppflags=
13230 for cf_add_cflags in $cf_cv_posix_c_source
13232 case "$cf_fix_cppflags" in
13234 case "$cf_add_cflags" in
13235 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13236 case "$cf_add_cflags" in
13238 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13240 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13241 && test -z "${cf_tst_cflags}" \
13242 && cf_fix_cppflags=yes
13244 if test "$cf_fix_cppflags" = yes ; then
13246 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13247 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13250 elif test "${cf_tst_cflags}" = "\"'" ; then
13252 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13253 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13259 case "$CPPFLAGS" in
13263 case "$cf_add_cflags" in
13265 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13267 CPPFLAGS=`echo "$CPPFLAGS" | \
13268 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13269 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13274 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13275 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13282 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13283 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13290 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13291 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13293 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13295 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13296 && test -z "${cf_tst_cflags}" \
13297 && cf_fix_cppflags=no
13302 if test -n "$cf_new_cflags" ; then
13304 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13305 CFLAGS="${CFLAGS}$cf_new_cflags"
13309 if test -n "$cf_new_cppflags" ; then
13311 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13312 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13316 if test -n "$cf_new_extra_cppflags" ; then
13318 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13319 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13325 fi # cf_cv_posix_visible
13329 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
13332 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
13333 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
13334 # Abusing the conformance level is a workaround.
13335 { echo "$as_me:13335: WARNING: this system does not provide usable locale support" >&5
13336 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
13337 cf_xopen_source="-D_BSD_SOURCE"
13338 cf_XOPEN_SOURCE=700
13341 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13342 cf_xopen_source="-D_BSD_SOURCE"
13343 cf_XOPEN_SOURCE=600
13346 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13349 cf_xopen_source="-D_OSF_SOURCE"
13352 cf_xopen_source="-D_QNX_SOURCE"
13355 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13358 cf_xopen_source="-D__EXTENSIONS__"
13359 cf_cv_xopen_source=broken
13361 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13367 echo "$as_me:13367: checking if we should define _XOPEN_SOURCE" >&5
13368 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13369 if test "${cf_cv_xopen_source+set}" = set; then
13370 echo $ECHO_N "(cached) $ECHO_C" >&6
13373 cat >"conftest.$ac_ext" <<_ACEOF
13374 #line 13374 "configure"
13375 #include "confdefs.h"
13377 $ac_includes_default
13383 #ifndef _XOPEN_SOURCE
13384 #error _XOPEN_SOURCE is not defined
13391 rm -f "conftest.$ac_objext"
13392 if { (eval echo "$as_me:13392: \"$ac_compile\"") >&5
13393 (eval $ac_compile) 2>&5
13395 echo "$as_me:13395: \$? = $ac_status" >&5
13396 (exit "$ac_status"); } &&
13397 { ac_try='test -s "conftest.$ac_objext"'
13398 { (eval echo "$as_me:13398: \"$ac_try\"") >&5
13399 (eval $ac_try) 2>&5
13401 echo "$as_me:13401: \$? = $ac_status" >&5
13402 (exit "$ac_status"); }; }; then
13403 cf_cv_xopen_source=no
13405 echo "$as_me: failed program was:" >&5
13406 cat "conftest.$ac_ext" >&5
13407 cf_save="$CPPFLAGS"
13409 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13410 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13412 cat >"conftest.$ac_ext" <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13416 $ac_includes_default
13422 #ifndef _XOPEN_SOURCE
13423 #error _XOPEN_SOURCE is not defined
13430 rm -f "conftest.$ac_objext"
13431 if { (eval echo "$as_me:13431: \"$ac_compile\"") >&5
13432 (eval $ac_compile) 2>&5
13434 echo "$as_me:13434: \$? = $ac_status" >&5
13435 (exit "$ac_status"); } &&
13436 { ac_try='test -s "conftest.$ac_objext"'
13437 { (eval echo "$as_me:13437: \"$ac_try\"") >&5
13438 (eval $ac_try) 2>&5
13440 echo "$as_me:13440: \$? = $ac_status" >&5
13441 (exit "$ac_status"); }; }; then
13442 cf_cv_xopen_source=no
13444 echo "$as_me: failed program was:" >&5
13445 cat "conftest.$ac_ext" >&5
13446 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13449 CPPFLAGS="$cf_save"
13452 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13455 echo "$as_me:13455: result: $cf_cv_xopen_source" >&5
13456 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13458 if test "$cf_cv_xopen_source" != no ; then
13460 CFLAGS=`echo "$CFLAGS" | \
13461 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13462 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13464 CPPFLAGS=`echo "$CPPFLAGS" | \
13465 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13466 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13468 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13470 for cf_add_cflags in $cf_temp_xopen_source
13472 case "x$cf_add_cflags" in
13475 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13478 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'`
13479 test "$CFLAGS" != "$cf_old_cflag" || break
13481 CFLAGS="$cf_old_cflag"
13484 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13487 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'`
13488 test "$CPPFLAGS" != "$cf_old_cflag" || break
13490 CPPFLAGS="$cf_old_cflag"
13499 cf_new_extra_cppflags=
13501 for cf_add_cflags in $cf_add_cflags
13503 case "$cf_fix_cppflags" in
13505 case "$cf_add_cflags" in
13506 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13507 case "$cf_add_cflags" in
13509 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13511 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13512 && test -z "${cf_tst_cflags}" \
13513 && cf_fix_cppflags=yes
13515 if test "$cf_fix_cppflags" = yes ; then
13517 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13518 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13521 elif test "${cf_tst_cflags}" = "\"'" ; then
13523 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13524 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13530 case "$CPPFLAGS" in
13534 case "$cf_add_cflags" in
13536 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13538 CPPFLAGS=`echo "$CPPFLAGS" | \
13539 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13540 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13545 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13546 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13553 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13554 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13561 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13562 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13564 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13566 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13567 && test -z "${cf_tst_cflags}" \
13568 && cf_fix_cppflags=no
13573 if test -n "$cf_new_cflags" ; then
13575 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13576 CFLAGS="${CFLAGS}$cf_new_cflags"
13580 if test -n "$cf_new_cppflags" ; then
13582 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13583 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13587 if test -n "$cf_new_extra_cppflags" ; then
13589 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13590 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13598 cf_save_xopen_cppflags="$CPPFLAGS"
13600 if test "$cf_cv_posix_visible" = no; then
13602 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13604 cf_save_CFLAGS="$CFLAGS"
13605 cf_save_CPPFLAGS="$CPPFLAGS"
13607 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13608 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13609 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13611 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13612 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13613 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13615 echo "$as_me:13615: checking if we should define _POSIX_C_SOURCE" >&5
13616 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13617 if test "${cf_cv_posix_c_source+set}" = set; then
13618 echo $ECHO_N "(cached) $ECHO_C" >&6
13621 echo "${as_me:-configure}:13621: testing if the symbol is already defined go no further ..." 1>&5
13623 cat >"conftest.$ac_ext" <<_ACEOF
13624 #line 13624 "configure"
13625 #include "confdefs.h"
13626 #include <sys/types.h>
13631 #ifndef _POSIX_C_SOURCE
13632 #error _POSIX_C_SOURCE is not defined
13638 rm -f "conftest.$ac_objext"
13639 if { (eval echo "$as_me:13639: \"$ac_compile\"") >&5
13640 (eval $ac_compile) 2>&5
13642 echo "$as_me:13642: \$? = $ac_status" >&5
13643 (exit "$ac_status"); } &&
13644 { ac_try='test -s "conftest.$ac_objext"'
13645 { (eval echo "$as_me:13645: \"$ac_try\"") >&5
13646 (eval $ac_try) 2>&5
13648 echo "$as_me:13648: \$? = $ac_status" >&5
13649 (exit "$ac_status"); }; }; then
13650 cf_cv_posix_c_source=no
13652 echo "$as_me: failed program was:" >&5
13653 cat "conftest.$ac_ext" >&5
13654 cf_want_posix_source=no
13655 case .$cf_POSIX_C_SOURCE in
13657 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13660 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13661 cf_want_posix_source=yes
13664 cf_want_posix_source=yes
13667 if test "$cf_want_posix_source" = yes ; then
13668 cat >"conftest.$ac_ext" <<_ACEOF
13669 #line 13669 "configure"
13670 #include "confdefs.h"
13671 #include <sys/types.h>
13676 #ifdef _POSIX_SOURCE
13677 #error _POSIX_SOURCE is defined
13683 rm -f "conftest.$ac_objext"
13684 if { (eval echo "$as_me:13684: \"$ac_compile\"") >&5
13685 (eval $ac_compile) 2>&5
13687 echo "$as_me:13687: \$? = $ac_status" >&5
13688 (exit "$ac_status"); } &&
13689 { ac_try='test -s "conftest.$ac_objext"'
13690 { (eval echo "$as_me:13690: \"$ac_try\"") >&5
13691 (eval $ac_try) 2>&5
13693 echo "$as_me:13693: \$? = $ac_status" >&5
13694 (exit "$ac_status"); }; }; then
13697 echo "$as_me: failed program was:" >&5
13698 cat "conftest.$ac_ext" >&5
13699 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13704 echo "${as_me:-configure}:13704: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13706 CFLAGS="$cf_trim_CFLAGS"
13707 CPPFLAGS="$cf_trim_CPPFLAGS"
13709 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13710 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13712 echo "${as_me:-configure}:13712: testing if the second compile does not leave our definition intact error ..." 1>&5
13714 cat >"conftest.$ac_ext" <<_ACEOF
13715 #line 13715 "configure"
13716 #include "confdefs.h"
13717 #include <sys/types.h>
13722 #ifndef _POSIX_C_SOURCE
13723 #error _POSIX_C_SOURCE is not defined
13729 rm -f "conftest.$ac_objext"
13730 if { (eval echo "$as_me:13730: \"$ac_compile\"") >&5
13731 (eval $ac_compile) 2>&5
13733 echo "$as_me:13733: \$? = $ac_status" >&5
13734 (exit "$ac_status"); } &&
13735 { ac_try='test -s "conftest.$ac_objext"'
13736 { (eval echo "$as_me:13736: \"$ac_try\"") >&5
13737 (eval $ac_try) 2>&5
13739 echo "$as_me:13739: \$? = $ac_status" >&5
13740 (exit "$ac_status"); }; }; then
13743 echo "$as_me: failed program was:" >&5
13744 cat "conftest.$ac_ext" >&5
13745 cf_cv_posix_c_source=no
13747 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13748 CFLAGS="$cf_save_CFLAGS"
13749 CPPFLAGS="$cf_save_CPPFLAGS"
13752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13755 echo "$as_me:13755: result: $cf_cv_posix_c_source" >&5
13756 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13758 if test "$cf_cv_posix_c_source" != no ; then
13759 CFLAGS="$cf_trim_CFLAGS"
13760 CPPFLAGS="$cf_trim_CPPFLAGS"
13765 cf_new_extra_cppflags=
13767 for cf_add_cflags in $cf_cv_posix_c_source
13769 case "$cf_fix_cppflags" in
13771 case "$cf_add_cflags" in
13772 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13773 case "$cf_add_cflags" in
13775 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13777 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13778 && test -z "${cf_tst_cflags}" \
13779 && cf_fix_cppflags=yes
13781 if test "$cf_fix_cppflags" = yes ; then
13783 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13784 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13787 elif test "${cf_tst_cflags}" = "\"'" ; then
13789 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13790 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13796 case "$CPPFLAGS" in
13800 case "$cf_add_cflags" in
13802 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13804 CPPFLAGS=`echo "$CPPFLAGS" | \
13805 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13806 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13811 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13812 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13819 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13820 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13827 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13828 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13830 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13832 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13833 && test -z "${cf_tst_cflags}" \
13834 && cf_fix_cppflags=no
13839 if test -n "$cf_new_cflags" ; then
13841 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13842 CFLAGS="${CFLAGS}$cf_new_cflags"
13846 if test -n "$cf_new_cppflags" ; then
13848 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13849 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13853 if test -n "$cf_new_extra_cppflags" ; then
13855 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13856 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13862 fi # cf_cv_posix_visible
13864 # Some of these niche implementations use copy/paste, double-check...
13865 if test "$cf_cv_xopen_source" = no ; then
13866 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
13868 echo "${as_me:-configure}:13868: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
13870 cat >"conftest.$ac_ext" <<_ACEOF
13871 #line 13871 "configure"
13872 #include "confdefs.h"
13874 $ac_includes_default
13880 #ifndef _XOPEN_SOURCE
13881 #error _XOPEN_SOURCE is not defined
13888 rm -f "conftest.$ac_objext"
13889 if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5
13890 (eval $ac_compile) 2>&5
13892 echo "$as_me:13892: \$? = $ac_status" >&5
13893 (exit "$ac_status"); } &&
13894 { ac_try='test -s "conftest.$ac_objext"'
13895 { (eval echo "$as_me:13895: \"$ac_try\"") >&5
13896 (eval $ac_try) 2>&5
13898 echo "$as_me:13898: \$? = $ac_status" >&5
13899 (exit "$ac_status"); }; }; then
13902 echo "$as_me: failed program was:" >&5
13903 cat "conftest.$ac_ext" >&5
13905 { echo "$as_me:13905: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
13906 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
13907 CPPFLAGS="$cf_save_xopen_cppflags"
13909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13914 if test -n "$cf_xopen_source" ; then
13916 for cf_add_cflags in $cf_xopen_source
13918 case "x$cf_add_cflags" in
13921 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13924 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'`
13925 test "$CFLAGS" != "$cf_old_cflag" || break
13926 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
13928 echo "${as_me:-configure}:13928: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
13930 CFLAGS="$cf_old_cflag"
13933 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
13936 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'`
13937 test "$CPPFLAGS" != "$cf_old_cflag" || break
13938 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
13940 echo "${as_me:-configure}:13940: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
13942 CPPFLAGS="$cf_old_cflag"
13951 cf_new_extra_cppflags=
13953 for cf_add_cflags in $cf_add_cflags
13955 case "$cf_fix_cppflags" in
13957 case "$cf_add_cflags" in
13958 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13959 case "$cf_add_cflags" in
13961 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13963 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13964 && test -z "${cf_tst_cflags}" \
13965 && cf_fix_cppflags=yes
13967 if test "$cf_fix_cppflags" = yes ; then
13969 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13970 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13973 elif test "${cf_tst_cflags}" = "\"'" ; then
13975 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13976 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13982 case "$CPPFLAGS" in
13986 case "$cf_add_cflags" in
13988 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13990 CPPFLAGS=`echo "$CPPFLAGS" | \
13991 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13992 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13997 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13998 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14005 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14006 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14013 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14014 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14016 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14018 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14019 && test -z "${cf_tst_cflags}" \
14020 && cf_fix_cppflags=no
14025 if test -n "$cf_new_cflags" ; then
14026 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
14028 echo "${as_me:-configure}:14028: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14031 CFLAGS="${CFLAGS}$cf_new_cflags"
14035 if test -n "$cf_new_cppflags" ; then
14036 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14038 echo "${as_me:-configure}:14038: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14040 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14041 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14045 if test -n "$cf_new_extra_cppflags" ; then
14046 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14048 echo "${as_me:-configure}:14048: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14050 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14051 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14059 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
14060 echo "$as_me:14060: checking if _XOPEN_SOURCE really is set" >&5
14061 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
14062 cat >"conftest.$ac_ext" <<_ACEOF
14063 #line 14063 "configure"
14064 #include "confdefs.h"
14065 #include <stdlib.h>
14070 #ifndef _XOPEN_SOURCE
14071 #error _XOPEN_SOURCE is not defined
14077 rm -f "conftest.$ac_objext"
14078 if { (eval echo "$as_me:14078: \"$ac_compile\"") >&5
14079 (eval $ac_compile) 2>&5
14081 echo "$as_me:14081: \$? = $ac_status" >&5
14082 (exit "$ac_status"); } &&
14083 { ac_try='test -s "conftest.$ac_objext"'
14084 { (eval echo "$as_me:14084: \"$ac_try\"") >&5
14085 (eval $ac_try) 2>&5
14087 echo "$as_me:14087: \$? = $ac_status" >&5
14088 (exit "$ac_status"); }; }; then
14089 cf_XOPEN_SOURCE_set=yes
14091 echo "$as_me: failed program was:" >&5
14092 cat "conftest.$ac_ext" >&5
14093 cf_XOPEN_SOURCE_set=no
14095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14096 echo "$as_me:14096: result: $cf_XOPEN_SOURCE_set" >&5
14097 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
14098 if test "$cf_XOPEN_SOURCE_set" = yes
14100 cat >"conftest.$ac_ext" <<_ACEOF
14101 #line 14101 "configure"
14102 #include "confdefs.h"
14103 #include <stdlib.h>
14108 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14109 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
14115 rm -f "conftest.$ac_objext"
14116 if { (eval echo "$as_me:14116: \"$ac_compile\"") >&5
14117 (eval $ac_compile) 2>&5
14119 echo "$as_me:14119: \$? = $ac_status" >&5
14120 (exit "$ac_status"); } &&
14121 { ac_try='test -s "conftest.$ac_objext"'
14122 { (eval echo "$as_me:14122: \"$ac_try\"") >&5
14123 (eval $ac_try) 2>&5
14125 echo "$as_me:14125: \$? = $ac_status" >&5
14126 (exit "$ac_status"); }; }; then
14127 cf_XOPEN_SOURCE_set_ok=yes
14129 echo "$as_me: failed program was:" >&5
14130 cat "conftest.$ac_ext" >&5
14131 cf_XOPEN_SOURCE_set_ok=no
14133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14134 if test "$cf_XOPEN_SOURCE_set_ok" = no
14136 { echo "$as_me:14136: WARNING: _XOPEN_SOURCE is lower than requested" >&5
14137 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
14141 echo "$as_me:14141: checking if we should define _XOPEN_SOURCE" >&5
14142 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
14143 if test "${cf_cv_xopen_source+set}" = set; then
14144 echo $ECHO_N "(cached) $ECHO_C" >&6
14147 cat >"conftest.$ac_ext" <<_ACEOF
14148 #line 14148 "configure"
14149 #include "confdefs.h"
14151 $ac_includes_default
14157 #ifndef _XOPEN_SOURCE
14158 #error _XOPEN_SOURCE is not defined
14165 rm -f "conftest.$ac_objext"
14166 if { (eval echo "$as_me:14166: \"$ac_compile\"") >&5
14167 (eval $ac_compile) 2>&5
14169 echo "$as_me:14169: \$? = $ac_status" >&5
14170 (exit "$ac_status"); } &&
14171 { ac_try='test -s "conftest.$ac_objext"'
14172 { (eval echo "$as_me:14172: \"$ac_try\"") >&5
14173 (eval $ac_try) 2>&5
14175 echo "$as_me:14175: \$? = $ac_status" >&5
14176 (exit "$ac_status"); }; }; then
14177 cf_cv_xopen_source=no
14179 echo "$as_me: failed program was:" >&5
14180 cat "conftest.$ac_ext" >&5
14181 cf_save="$CPPFLAGS"
14183 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14184 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
14186 cat >"conftest.$ac_ext" <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14190 $ac_includes_default
14196 #ifndef _XOPEN_SOURCE
14197 #error _XOPEN_SOURCE is not defined
14204 rm -f "conftest.$ac_objext"
14205 if { (eval echo "$as_me:14205: \"$ac_compile\"") >&5
14206 (eval $ac_compile) 2>&5
14208 echo "$as_me:14208: \$? = $ac_status" >&5
14209 (exit "$ac_status"); } &&
14210 { ac_try='test -s "conftest.$ac_objext"'
14211 { (eval echo "$as_me:14211: \"$ac_try\"") >&5
14212 (eval $ac_try) 2>&5
14214 echo "$as_me:14214: \$? = $ac_status" >&5
14215 (exit "$ac_status"); }; }; then
14216 cf_cv_xopen_source=no
14218 echo "$as_me: failed program was:" >&5
14219 cat "conftest.$ac_ext" >&5
14220 cf_cv_xopen_source=$cf_XOPEN_SOURCE
14222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14223 CPPFLAGS="$cf_save"
14226 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14229 echo "$as_me:14229: result: $cf_cv_xopen_source" >&5
14230 echo "${ECHO_T}$cf_cv_xopen_source" >&6
14232 if test "$cf_cv_xopen_source" != no ; then
14234 CFLAGS=`echo "$CFLAGS" | \
14235 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14236 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14238 CPPFLAGS=`echo "$CPPFLAGS" | \
14239 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
14240 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
14242 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
14244 for cf_add_cflags in $cf_temp_xopen_source
14246 case "x$cf_add_cflags" in
14249 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14252 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'`
14253 test "$CFLAGS" != "$cf_old_cflag" || break
14255 CFLAGS="$cf_old_cflag"
14258 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
14261 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'`
14262 test "$CPPFLAGS" != "$cf_old_cflag" || break
14264 CPPFLAGS="$cf_old_cflag"
14273 cf_new_extra_cppflags=
14275 for cf_add_cflags in $cf_add_cflags
14277 case "$cf_fix_cppflags" in
14279 case "$cf_add_cflags" in
14280 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14281 case "$cf_add_cflags" in
14283 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14285 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14286 && test -z "${cf_tst_cflags}" \
14287 && cf_fix_cppflags=yes
14289 if test "$cf_fix_cppflags" = yes ; then
14291 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14292 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14295 elif test "${cf_tst_cflags}" = "\"'" ; then
14297 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14298 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14304 case "$CPPFLAGS" in
14308 case "$cf_add_cflags" in
14310 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14312 CPPFLAGS=`echo "$CPPFLAGS" | \
14313 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14314 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14319 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14320 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14327 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14328 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14335 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14336 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14338 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14340 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14341 && test -z "${cf_tst_cflags}" \
14342 && cf_fix_cppflags=no
14347 if test -n "$cf_new_cflags" ; then
14349 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14350 CFLAGS="${CFLAGS}$cf_new_cflags"
14354 if test -n "$cf_new_cppflags" ; then
14356 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14357 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14361 if test -n "$cf_new_extra_cppflags" ; then
14363 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14364 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14374 fi # cf_cv_posix_visible
14376 echo "$as_me:14376: checking for ANSI C header files" >&5
14377 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14378 if test "${ac_cv_header_stdc+set}" = set; then
14379 echo $ECHO_N "(cached) $ECHO_C" >&6
14381 cat >"conftest.$ac_ext" <<_ACEOF
14382 #line 14382 "configure"
14383 #include "confdefs.h"
14384 #include <stdlib.h>
14385 #include <stdarg.h>
14386 #include <string.h>
14390 if { (eval echo "$as_me:14390: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14391 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14393 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14395 cat conftest.err >&5
14396 echo "$as_me:14396: \$? = $ac_status" >&5
14397 (exit "$ac_status"); } >/dev/null; then
14398 if test -s conftest.err; then
14399 ac_cpp_err=$ac_c_preproc_warn_flag
14406 if test -z "$ac_cpp_err"; then
14407 ac_cv_header_stdc=yes
14409 echo "$as_me: failed program was:" >&5
14410 cat "conftest.$ac_ext" >&5
14411 ac_cv_header_stdc=no
14413 rm -f conftest.err "conftest.$ac_ext"
14415 if test $ac_cv_header_stdc = yes; then
14416 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14417 cat >"conftest.$ac_ext" <<_ACEOF
14418 #line 14418 "configure"
14419 #include "confdefs.h"
14420 #include <string.h>
14423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14424 $EGREP "memchr" >/dev/null 2>&1; then
14427 ac_cv_header_stdc=no
14433 if test $ac_cv_header_stdc = yes; then
14434 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14435 cat >"conftest.$ac_ext" <<_ACEOF
14436 #line 14436 "configure"
14437 #include "confdefs.h"
14438 #include <stdlib.h>
14441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14442 $EGREP "free" >/dev/null 2>&1; then
14445 ac_cv_header_stdc=no
14451 if test $ac_cv_header_stdc = yes; then
14452 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14453 if test "$cross_compiling" = yes; then
14456 cat >"conftest.$ac_ext" <<_ACEOF
14457 #line 14457 "configure"
14458 #include "confdefs.h"
14460 #if ((' ' & 0x0FF) == 0x020)
14461 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14462 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14464 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14465 || ('j' <= (c) && (c) <= 'r') \
14466 || ('s' <= (c) && (c) <= 'z'))
14467 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14470 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14475 for (i = 0; i < 256; i++)
14476 if (XOR (islower (i), ISLOWER (i))
14477 || toupper (i) != TOUPPER (i))
14478 $ac_main_return(2);
14479 $ac_main_return (0);
14482 rm -f "conftest$ac_exeext"
14483 if { (eval echo "$as_me:14483: \"$ac_link\"") >&5
14484 (eval $ac_link) 2>&5
14486 echo "$as_me:14486: \$? = $ac_status" >&5
14487 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14488 { (eval echo "$as_me:14488: \"$ac_try\"") >&5
14489 (eval $ac_try) 2>&5
14491 echo "$as_me:14491: \$? = $ac_status" >&5
14492 (exit "$ac_status"); }; }; then
14495 echo "$as_me: program exited with status $ac_status" >&5
14496 echo "$as_me: failed program was:" >&5
14497 cat "conftest.$ac_ext" >&5
14498 ac_cv_header_stdc=no
14500 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14504 echo "$as_me:14504: result: $ac_cv_header_stdc" >&5
14505 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14506 if test $ac_cv_header_stdc = yes; then
14508 cat >>confdefs.h <<\EOF
14509 #define STDC_HEADERS 1
14514 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14516 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14517 inttypes.h stdint.h unistd.h
14519 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14520 echo "$as_me:14520: checking for $ac_header" >&5
14521 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14522 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14523 echo $ECHO_N "(cached) $ECHO_C" >&6
14525 cat >"conftest.$ac_ext" <<_ACEOF
14526 #line 14526 "configure"
14527 #include "confdefs.h"
14528 $ac_includes_default
14529 #include <$ac_header>
14531 rm -f "conftest.$ac_objext"
14532 if { (eval echo "$as_me:14532: \"$ac_compile\"") >&5
14533 (eval $ac_compile) 2>&5
14535 echo "$as_me:14535: \$? = $ac_status" >&5
14536 (exit "$ac_status"); } &&
14537 { ac_try='test -s "conftest.$ac_objext"'
14538 { (eval echo "$as_me:14538: \"$ac_try\"") >&5
14539 (eval $ac_try) 2>&5
14541 echo "$as_me:14541: \$? = $ac_status" >&5
14542 (exit "$ac_status"); }; }; then
14543 eval "$as_ac_Header=yes"
14545 echo "$as_me: failed program was:" >&5
14546 cat "conftest.$ac_ext" >&5
14547 eval "$as_ac_Header=no"
14549 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14551 echo "$as_me:14551: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14552 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14553 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14554 cat >>confdefs.h <<EOF
14555 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14561 echo "$as_me:14561: checking whether exit is declared" >&5
14562 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
14563 if test "${ac_cv_have_decl_exit+set}" = set; then
14564 echo $ECHO_N "(cached) $ECHO_C" >&6
14566 cat >"conftest.$ac_ext" <<_ACEOF
14567 #line 14567 "configure"
14568 #include "confdefs.h"
14569 $ac_includes_default
14574 char *p = (char *) exit; (void) p;
14581 rm -f "conftest.$ac_objext"
14582 if { (eval echo "$as_me:14582: \"$ac_compile\"") >&5
14583 (eval $ac_compile) 2>&5
14585 echo "$as_me:14585: \$? = $ac_status" >&5
14586 (exit "$ac_status"); } &&
14587 { ac_try='test -s "conftest.$ac_objext"'
14588 { (eval echo "$as_me:14588: \"$ac_try\"") >&5
14589 (eval $ac_try) 2>&5
14591 echo "$as_me:14591: \$? = $ac_status" >&5
14592 (exit "$ac_status"); }; }; then
14593 ac_cv_have_decl_exit=yes
14595 echo "$as_me: failed program was:" >&5
14596 cat "conftest.$ac_ext" >&5
14597 ac_cv_have_decl_exit=no
14599 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14601 echo "$as_me:14601: result: $ac_cv_have_decl_exit" >&5
14602 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
14604 # Check whether --enable-largefile or --disable-largefile was given.
14605 if test "${enable_largefile+set}" = set; then
14606 enableval="$enable_largefile"
14609 if test "$enable_largefile" != no; then
14611 echo "$as_me:14611: checking for special C compiler options needed for large files" >&5
14612 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14613 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14614 echo $ECHO_N "(cached) $ECHO_C" >&6
14616 ac_cv_sys_largefile_CC=no
14617 if test "$GCC" != yes; then
14620 # IRIX 6.2 and later do not support large files by default,
14621 # so use the C compiler's -n32 option if that helps.
14622 cat >"conftest.$ac_ext" <<_ACEOF
14623 #line 14623 "configure"
14624 #include "confdefs.h"
14625 #include <sys/types.h>
14626 /* Check that off_t can represent 2**63 - 1 correctly.
14627 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14628 since some C++ compilers masquerading as C compilers
14629 incorrectly reject 9223372036854775807. */
14630 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14631 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14632 && LARGE_OFF_T % 2147483647 == 1)
14642 rm -f "conftest.$ac_objext"
14643 if { (eval echo "$as_me:14643: \"$ac_compile\"") >&5
14644 (eval $ac_compile) 2>&5
14646 echo "$as_me:14646: \$? = $ac_status" >&5
14647 (exit "$ac_status"); } &&
14648 { ac_try='test -s "conftest.$ac_objext"'
14649 { (eval echo "$as_me:14649: \"$ac_try\"") >&5
14650 (eval $ac_try) 2>&5
14652 echo "$as_me:14652: \$? = $ac_status" >&5
14653 (exit "$ac_status"); }; }; then
14656 echo "$as_me: failed program was:" >&5
14657 cat "conftest.$ac_ext" >&5
14659 rm -f "conftest.$ac_objext"
14661 rm -f "conftest.$ac_objext"
14662 if { (eval echo "$as_me:14662: \"$ac_compile\"") >&5
14663 (eval $ac_compile) 2>&5
14665 echo "$as_me:14665: \$? = $ac_status" >&5
14666 (exit "$ac_status"); } &&
14667 { ac_try='test -s "conftest.$ac_objext"'
14668 { (eval echo "$as_me:14668: \"$ac_try\"") >&5
14669 (eval $ac_try) 2>&5
14671 echo "$as_me:14671: \$? = $ac_status" >&5
14672 (exit "$ac_status"); }; }; then
14673 ac_cv_sys_largefile_CC=' -n32'; break
14675 echo "$as_me: failed program was:" >&5
14676 cat "conftest.$ac_ext" >&5
14678 rm -f "conftest.$ac_objext"
14682 rm -f "conftest.$ac_ext"
14685 echo "$as_me:14685: result: $ac_cv_sys_largefile_CC" >&5
14686 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14687 if test "$ac_cv_sys_largefile_CC" != no; then
14688 CC=$CC$ac_cv_sys_largefile_CC
14691 echo "$as_me:14691: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14692 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14693 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14694 echo $ECHO_N "(cached) $ECHO_C" >&6
14697 ac_cv_sys_file_offset_bits=no
14698 cat >"conftest.$ac_ext" <<_ACEOF
14699 #line 14699 "configure"
14700 #include "confdefs.h"
14701 #include <sys/types.h>
14702 /* Check that off_t can represent 2**63 - 1 correctly.
14703 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14704 since some C++ compilers masquerading as C compilers
14705 incorrectly reject 9223372036854775807. */
14706 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14707 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14708 && LARGE_OFF_T % 2147483647 == 1)
14718 rm -f "conftest.$ac_objext"
14719 if { (eval echo "$as_me:14719: \"$ac_compile\"") >&5
14720 (eval $ac_compile) 2>&5
14722 echo "$as_me:14722: \$? = $ac_status" >&5
14723 (exit "$ac_status"); } &&
14724 { ac_try='test -s "conftest.$ac_objext"'
14725 { (eval echo "$as_me:14725: \"$ac_try\"") >&5
14726 (eval $ac_try) 2>&5
14728 echo "$as_me:14728: \$? = $ac_status" >&5
14729 (exit "$ac_status"); }; }; then
14732 echo "$as_me: failed program was:" >&5
14733 cat "conftest.$ac_ext" >&5
14735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14736 cat >"conftest.$ac_ext" <<_ACEOF
14737 #line 14737 "configure"
14738 #include "confdefs.h"
14739 #define _FILE_OFFSET_BITS 64
14740 #include <sys/types.h>
14741 /* Check that off_t can represent 2**63 - 1 correctly.
14742 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14743 since some C++ compilers masquerading as C compilers
14744 incorrectly reject 9223372036854775807. */
14745 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14746 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14747 && LARGE_OFF_T % 2147483647 == 1)
14757 rm -f "conftest.$ac_objext"
14758 if { (eval echo "$as_me:14758: \"$ac_compile\"") >&5
14759 (eval $ac_compile) 2>&5
14761 echo "$as_me:14761: \$? = $ac_status" >&5
14762 (exit "$ac_status"); } &&
14763 { ac_try='test -s "conftest.$ac_objext"'
14764 { (eval echo "$as_me:14764: \"$ac_try\"") >&5
14765 (eval $ac_try) 2>&5
14767 echo "$as_me:14767: \$? = $ac_status" >&5
14768 (exit "$ac_status"); }; }; then
14769 ac_cv_sys_file_offset_bits=64; break
14771 echo "$as_me: failed program was:" >&5
14772 cat "conftest.$ac_ext" >&5
14774 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14778 echo "$as_me:14778: result: $ac_cv_sys_file_offset_bits" >&5
14779 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14780 if test "$ac_cv_sys_file_offset_bits" != no; then
14782 cat >>confdefs.h <<EOF
14783 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14788 echo "$as_me:14788: checking for _LARGE_FILES value needed for large files" >&5
14789 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14790 if test "${ac_cv_sys_large_files+set}" = set; then
14791 echo $ECHO_N "(cached) $ECHO_C" >&6
14794 ac_cv_sys_large_files=no
14795 cat >"conftest.$ac_ext" <<_ACEOF
14796 #line 14796 "configure"
14797 #include "confdefs.h"
14798 #include <sys/types.h>
14799 /* Check that off_t can represent 2**63 - 1 correctly.
14800 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14801 since some C++ compilers masquerading as C compilers
14802 incorrectly reject 9223372036854775807. */
14803 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14804 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14805 && LARGE_OFF_T % 2147483647 == 1)
14815 rm -f "conftest.$ac_objext"
14816 if { (eval echo "$as_me:14816: \"$ac_compile\"") >&5
14817 (eval $ac_compile) 2>&5
14819 echo "$as_me:14819: \$? = $ac_status" >&5
14820 (exit "$ac_status"); } &&
14821 { ac_try='test -s "conftest.$ac_objext"'
14822 { (eval echo "$as_me:14822: \"$ac_try\"") >&5
14823 (eval $ac_try) 2>&5
14825 echo "$as_me:14825: \$? = $ac_status" >&5
14826 (exit "$ac_status"); }; }; then
14829 echo "$as_me: failed program was:" >&5
14830 cat "conftest.$ac_ext" >&5
14832 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14833 cat >"conftest.$ac_ext" <<_ACEOF
14834 #line 14834 "configure"
14835 #include "confdefs.h"
14836 #define _LARGE_FILES 1
14837 #include <sys/types.h>
14838 /* Check that off_t can represent 2**63 - 1 correctly.
14839 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14840 since some C++ compilers masquerading as C compilers
14841 incorrectly reject 9223372036854775807. */
14842 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14843 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14844 && LARGE_OFF_T % 2147483647 == 1)
14854 rm -f "conftest.$ac_objext"
14855 if { (eval echo "$as_me:14855: \"$ac_compile\"") >&5
14856 (eval $ac_compile) 2>&5
14858 echo "$as_me:14858: \$? = $ac_status" >&5
14859 (exit "$ac_status"); } &&
14860 { ac_try='test -s "conftest.$ac_objext"'
14861 { (eval echo "$as_me:14861: \"$ac_try\"") >&5
14862 (eval $ac_try) 2>&5
14864 echo "$as_me:14864: \$? = $ac_status" >&5
14865 (exit "$ac_status"); }; }; then
14866 ac_cv_sys_large_files=1; break
14868 echo "$as_me: failed program was:" >&5
14869 cat "conftest.$ac_ext" >&5
14871 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14875 echo "$as_me:14875: result: $ac_cv_sys_large_files" >&5
14876 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14877 if test "$ac_cv_sys_large_files" != no; then
14879 cat >>confdefs.h <<EOF
14880 #define _LARGE_FILES $ac_cv_sys_large_files
14887 if test "$enable_largefile" != no ; then
14888 echo "$as_me:14888: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14889 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14890 if test "${ac_cv_sys_largefile_source+set}" = set; then
14891 echo $ECHO_N "(cached) $ECHO_C" >&6
14894 ac_cv_sys_largefile_source=no
14895 cat >"conftest.$ac_ext" <<_ACEOF
14896 #line 14896 "configure"
14897 #include "confdefs.h"
14907 rm -f "conftest.$ac_objext"
14908 if { (eval echo "$as_me:14908: \"$ac_compile\"") >&5
14909 (eval $ac_compile) 2>&5
14911 echo "$as_me:14911: \$? = $ac_status" >&5
14912 (exit "$ac_status"); } &&
14913 { ac_try='test -s "conftest.$ac_objext"'
14914 { (eval echo "$as_me:14914: \"$ac_try\"") >&5
14915 (eval $ac_try) 2>&5
14917 echo "$as_me:14917: \$? = $ac_status" >&5
14918 (exit "$ac_status"); }; }; then
14921 echo "$as_me: failed program was:" >&5
14922 cat "conftest.$ac_ext" >&5
14924 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14925 cat >"conftest.$ac_ext" <<_ACEOF
14926 #line 14926 "configure"
14927 #include "confdefs.h"
14928 #define _LARGEFILE_SOURCE 1
14938 rm -f "conftest.$ac_objext"
14939 if { (eval echo "$as_me:14939: \"$ac_compile\"") >&5
14940 (eval $ac_compile) 2>&5
14942 echo "$as_me:14942: \$? = $ac_status" >&5
14943 (exit "$ac_status"); } &&
14944 { ac_try='test -s "conftest.$ac_objext"'
14945 { (eval echo "$as_me:14945: \"$ac_try\"") >&5
14946 (eval $ac_try) 2>&5
14948 echo "$as_me:14948: \$? = $ac_status" >&5
14949 (exit "$ac_status"); }; }; then
14950 ac_cv_sys_largefile_source=1; break
14952 echo "$as_me: failed program was:" >&5
14953 cat "conftest.$ac_ext" >&5
14955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14959 echo "$as_me:14959: result: $ac_cv_sys_largefile_source" >&5
14960 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14961 if test "$ac_cv_sys_largefile_source" != no; then
14963 cat >>confdefs.h <<EOF
14964 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14970 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14971 # in glibc 2.1.3, but that breaks too many other things.
14972 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14973 echo "$as_me:14973: checking for fseeko" >&5
14974 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14975 if test "${ac_cv_func_fseeko+set}" = set; then
14976 echo $ECHO_N "(cached) $ECHO_C" >&6
14978 cat >"conftest.$ac_ext" <<_ACEOF
14979 #line 14979 "configure"
14980 #include "confdefs.h"
14985 return fseeko && fseeko (stdin, 0, 0);
14990 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14991 if { (eval echo "$as_me:14991: \"$ac_link\"") >&5
14992 (eval $ac_link) 2>&5
14994 echo "$as_me:14994: \$? = $ac_status" >&5
14995 (exit "$ac_status"); } &&
14996 { ac_try='test -s "conftest$ac_exeext"'
14997 { (eval echo "$as_me:14997: \"$ac_try\"") >&5
14998 (eval $ac_try) 2>&5
15000 echo "$as_me:15000: \$? = $ac_status" >&5
15001 (exit "$ac_status"); }; }; then
15002 ac_cv_func_fseeko=yes
15004 echo "$as_me: failed program was:" >&5
15005 cat "conftest.$ac_ext" >&5
15006 ac_cv_func_fseeko=no
15008 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15010 echo "$as_me:15010: result: $ac_cv_func_fseeko" >&5
15011 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
15012 if test $ac_cv_func_fseeko = yes; then
15014 cat >>confdefs.h <<\EOF
15015 #define HAVE_FSEEKO 1
15020 # Normally we would collect these definitions in the config.h,
15021 # but (like _XOPEN_SOURCE), some environments rely on having these
15022 # defined before any of the system headers are included. Another
15023 # case comes up with C++, e.g., on AIX the compiler compiles the
15024 # header files by themselves before looking at the body files it is
15025 # told to compile. For ncurses, those header files do not include
15027 if test "$ac_cv_sys_large_files" != no
15030 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15031 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
15034 if test "$ac_cv_sys_largefile_source" != no
15037 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15038 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
15041 if test "$ac_cv_sys_file_offset_bits" != no
15044 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15045 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
15049 echo "$as_me:15049: checking whether to use struct dirent64" >&5
15050 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
15051 if test "${cf_cv_struct_dirent64+set}" = set; then
15052 echo $ECHO_N "(cached) $ECHO_C" >&6
15055 cat >"conftest.$ac_ext" <<_ACEOF
15056 #line 15056 "configure"
15057 #include "confdefs.h"
15059 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
15060 #include <sys/types.h>
15061 #include <dirent.h>
15067 /* if transitional largefile support is setup, this is true */
15068 extern struct dirent64 * readdir(DIR *);
15069 struct dirent64 *x = readdir((DIR *)0);
15070 struct dirent *y = readdir((DIR *)0);
15078 rm -f "conftest.$ac_objext"
15079 if { (eval echo "$as_me:15079: \"$ac_compile\"") >&5
15080 (eval $ac_compile) 2>&5
15082 echo "$as_me:15082: \$? = $ac_status" >&5
15083 (exit "$ac_status"); } &&
15084 { ac_try='test -s "conftest.$ac_objext"'
15085 { (eval echo "$as_me:15085: \"$ac_try\"") >&5
15086 (eval $ac_try) 2>&5
15088 echo "$as_me:15088: \$? = $ac_status" >&5
15089 (exit "$ac_status"); }; }; then
15090 cf_cv_struct_dirent64=yes
15092 echo "$as_me: failed program was:" >&5
15093 cat "conftest.$ac_ext" >&5
15094 cf_cv_struct_dirent64=no
15096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15099 echo "$as_me:15099: result: $cf_cv_struct_dirent64" >&5
15100 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
15101 test "$cf_cv_struct_dirent64" = yes &&
15102 cat >>confdefs.h <<\EOF
15103 #define HAVE_STRUCT_DIRENT64 1
15108 ### Enable compiling-in rcs id's
15109 echo "$as_me:15109: checking if RCS identifiers should be compiled-in" >&5
15110 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15112 # Check whether --with-rcs-ids or --without-rcs-ids was given.
15113 if test "${with_rcs_ids+set}" = set; then
15114 withval="$with_rcs_ids"
15115 with_rcs_ids=$withval
15119 echo "$as_me:15119: result: $with_rcs_ids" >&5
15120 echo "${ECHO_T}$with_rcs_ids" >&6
15121 test "$with_rcs_ids" = yes &&
15122 cat >>confdefs.h <<\EOF
15123 #define USE_RCS_IDS 1
15126 ###############################################################################
15128 ### Note that some functions (such as const) are normally disabled anyway.
15129 echo "$as_me:15129: checking if you want to build with function extensions" >&5
15130 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15132 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15133 if test "${enable_ext_funcs+set}" = set; then
15134 enableval="$enable_ext_funcs"
15135 with_ext_funcs=$enableval
15139 echo "$as_me:15139: result: $with_ext_funcs" >&5
15140 echo "${ECHO_T}$with_ext_funcs" >&6
15141 if test "$with_ext_funcs" = yes ; then
15142 NCURSES_EXT_FUNCS=1
15144 cat >>confdefs.h <<\EOF
15145 #define HAVE_USE_DEFAULT_COLORS 1
15148 cat >>confdefs.h <<\EOF
15149 #define NCURSES_EXT_FUNCS 1
15153 NCURSES_EXT_FUNCS=0
15156 ### use option --enable-const to turn on use of const beyond that in XSI.
15157 echo "$as_me:15157: checking for extended use of const keyword" >&5
15158 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15160 # Check whether --enable-const or --disable-const was given.
15161 if test "${enable_const+set}" = set; then
15162 enableval="$enable_const"
15163 with_ext_const=$enableval
15167 echo "$as_me:15167: result: $with_ext_const" >&5
15168 echo "${ECHO_T}$with_ext_const" >&6
15169 NCURSES_CONST='/*nothing*/'
15170 if test "$with_ext_const" = yes ; then
15171 NCURSES_CONST=const
15174 ###############################################################################
15175 # These options are relatively safe to experiment with.
15177 echo "$as_me:15177: checking if you want all development code" >&5
15178 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15180 # Check whether --with-develop or --without-develop was given.
15181 if test "${with_develop+set}" = set; then
15182 withval="$with_develop"
15183 with_develop=$withval
15187 echo "$as_me:15187: result: $with_develop" >&5
15188 echo "${ECHO_T}$with_develop" >&6
15190 ###############################################################################
15191 # These are just experimental, probably should not be in a package:
15193 # This is still experimental (20080329), but should ultimately be moved to
15194 # the script-block --with-normal, etc.
15196 echo "$as_me:15196: checking if you want to link with the pthread library" >&5
15197 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15199 # Check whether --with-pthread or --without-pthread was given.
15200 if test "${with_pthread+set}" = set; then
15201 withval="$with_pthread"
15202 with_pthread=$withval
15206 echo "$as_me:15206: result: $with_pthread" >&5
15207 echo "${ECHO_T}$with_pthread" >&6
15209 if test "$with_pthread" != no ; then
15210 echo "$as_me:15210: checking for pthread.h" >&5
15211 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15212 if test "${ac_cv_header_pthread_h+set}" = set; then
15213 echo $ECHO_N "(cached) $ECHO_C" >&6
15215 cat >"conftest.$ac_ext" <<_ACEOF
15216 #line 15216 "configure"
15217 #include "confdefs.h"
15218 #include <pthread.h>
15220 if { (eval echo "$as_me:15220: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15221 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15223 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15225 cat conftest.err >&5
15226 echo "$as_me:15226: \$? = $ac_status" >&5
15227 (exit "$ac_status"); } >/dev/null; then
15228 if test -s conftest.err; then
15229 ac_cpp_err=$ac_c_preproc_warn_flag
15236 if test -z "$ac_cpp_err"; then
15237 ac_cv_header_pthread_h=yes
15239 echo "$as_me: failed program was:" >&5
15240 cat "conftest.$ac_ext" >&5
15241 ac_cv_header_pthread_h=no
15243 rm -f conftest.err "conftest.$ac_ext"
15245 echo "$as_me:15245: result: $ac_cv_header_pthread_h" >&5
15246 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15247 if test "$ac_cv_header_pthread_h" = yes; then
15249 cat >>confdefs.h <<\EOF
15250 #define HAVE_PTHREADS_H 1
15253 for cf_lib_pthread in pthread c_r
15255 echo "$as_me:15255: checking if we can link with the $cf_lib_pthread library" >&5
15256 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15257 cf_save_LIBS="$LIBS"
15259 cf_add_libs="$LIBS"
15262 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15263 # filter duplicates
15264 for cf_add_1lib in $cf_add_0lib; do
15265 for cf_add_2lib in $cf_add_libs; do
15266 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15271 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15273 LIBS="$cf_add_libs"
15275 cat >"conftest.$ac_ext" <<_ACEOF
15276 #line 15276 "configure"
15277 #include "confdefs.h"
15279 #include <pthread.h>
15285 int rc = pthread_create(0,0,0,0);
15286 int r2 = pthread_mutexattr_settype(0, 0);
15292 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15293 if { (eval echo "$as_me:15293: \"$ac_link\"") >&5
15294 (eval $ac_link) 2>&5
15296 echo "$as_me:15296: \$? = $ac_status" >&5
15297 (exit "$ac_status"); } &&
15298 { ac_try='test -s "conftest$ac_exeext"'
15299 { (eval echo "$as_me:15299: \"$ac_try\"") >&5
15300 (eval $ac_try) 2>&5
15302 echo "$as_me:15302: \$? = $ac_status" >&5
15303 (exit "$ac_status"); }; }; then
15306 echo "$as_me: failed program was:" >&5
15307 cat "conftest.$ac_ext" >&5
15310 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15311 LIBS="$cf_save_LIBS"
15312 echo "$as_me:15312: result: $with_pthread" >&5
15313 echo "${ECHO_T}$with_pthread" >&6
15314 test "$with_pthread" = yes && break
15317 if test "$with_pthread" = yes ; then
15319 cf_add_libs="$LIBS"
15322 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15323 # filter duplicates
15324 for cf_add_1lib in $cf_add_0lib; do
15325 for cf_add_2lib in $cf_add_libs; do
15326 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15331 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15333 LIBS="$cf_add_libs"
15335 cat >>confdefs.h <<\EOF
15336 #define HAVE_LIBPTHREADS 1
15340 { { echo "$as_me:15340: error: Cannot link with pthread library" >&5
15341 echo "$as_me: error: Cannot link with pthread library" >&2;}
15342 { (exit 1); exit 1; }; }
15349 echo "$as_me:15349: checking if you want to use weak-symbols for pthreads" >&5
15350 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15352 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15353 if test "${enable_weak_symbols+set}" = set; then
15354 enableval="$enable_weak_symbols"
15355 use_weak_symbols=$withval
15357 use_weak_symbols=no
15359 echo "$as_me:15359: result: $use_weak_symbols" >&5
15360 echo "${ECHO_T}$use_weak_symbols" >&6
15361 if test "$use_weak_symbols" = yes ; then
15363 echo "$as_me:15363: checking if $CC supports weak symbols" >&5
15364 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15365 if test "${cf_cv_weak_symbols+set}" = set; then
15366 echo $ECHO_N "(cached) $ECHO_C" >&6
15369 cat >"conftest.$ac_ext" <<_ACEOF
15370 #line 15370 "configure"
15371 #include "confdefs.h"
15378 #if defined(__GNUC__)
15379 # if defined __USE_ISOC99
15380 # define _cat_pragma(exp) _Pragma(#exp)
15381 # define _weak_pragma(exp) _cat_pragma(weak name)
15383 # define _weak_pragma(exp)
15385 # define _declare(name) __extension__ extern __typeof__(name) name
15386 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
15389 weak_symbol(fopen);
15395 rm -f "conftest.$ac_objext"
15396 if { (eval echo "$as_me:15396: \"$ac_compile\"") >&5
15397 (eval $ac_compile) 2>&5
15399 echo "$as_me:15399: \$? = $ac_status" >&5
15400 (exit "$ac_status"); } &&
15401 { ac_try='test -s "conftest.$ac_objext"'
15402 { (eval echo "$as_me:15402: \"$ac_try\"") >&5
15403 (eval $ac_try) 2>&5
15405 echo "$as_me:15405: \$? = $ac_status" >&5
15406 (exit "$ac_status"); }; }; then
15407 cf_cv_weak_symbols=yes
15409 echo "$as_me: failed program was:" >&5
15410 cat "conftest.$ac_ext" >&5
15411 cf_cv_weak_symbols=no
15413 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15416 echo "$as_me:15416: result: $cf_cv_weak_symbols" >&5
15417 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15420 cf_cv_weak_symbols=no
15423 if test $cf_cv_weak_symbols = yes ; then
15425 cat >>confdefs.h <<\EOF
15426 #define USE_WEAK_SYMBOLS 1
15432 if test "$with_pthread" = "yes" ; then
15434 cat >>confdefs.h <<\EOF
15435 #define USE_PTHREADS 1
15438 enable_reentrant=yes
15439 if test $cf_cv_weak_symbols = yes ; then
15444 # OpenSUSE is installing ncurses6, using reentrant option.
15445 echo "$as_me:15445: checking for _nc_TABSIZE" >&5
15446 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
15447 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
15448 echo $ECHO_N "(cached) $ECHO_C" >&6
15450 cat >"conftest.$ac_ext" <<_ACEOF
15451 #line 15451 "configure"
15452 #include "confdefs.h"
15453 #define _nc_TABSIZE autoconf_temporary
15454 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15461 /* We use char because int might match the return type of a gcc2
15462 builtin and then its argument prototype would still apply. */
15463 char _nc_TABSIZE (void);
15469 /* The GNU C library defines stubs for functions which it implements
15470 to always fail with ENOSYS. Some functions are actually named
15471 something starting with __ and the normal name is an alias. */
15472 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
15473 #error found stub for _nc_TABSIZE
15476 return _nc_TABSIZE ();
15481 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15482 if { (eval echo "$as_me:15482: \"$ac_link\"") >&5
15483 (eval $ac_link) 2>&5
15485 echo "$as_me:15485: \$? = $ac_status" >&5
15486 (exit "$ac_status"); } &&
15487 { ac_try='test -s "conftest$ac_exeext"'
15488 { (eval echo "$as_me:15488: \"$ac_try\"") >&5
15489 (eval $ac_try) 2>&5
15491 echo "$as_me:15491: \$? = $ac_status" >&5
15492 (exit "$ac_status"); }; }; then
15493 ac_cv_func__nc_TABSIZE=yes
15495 echo "$as_me: failed program was:" >&5
15496 cat "conftest.$ac_ext" >&5
15497 ac_cv_func__nc_TABSIZE=no
15499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15501 echo "$as_me:15501: result: $ac_cv_func__nc_TABSIZE" >&5
15502 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
15503 if test "$ac_cv_func__nc_TABSIZE" = yes; then
15504 assume_reentrant=yes
15506 assume_reentrant=no
15509 # Reentrant code has to be opaque; there's little advantage to making ncurses
15510 # opaque outside of that, so there is no --enable-opaque option. We can use
15511 # this option without --with-pthreads, but this will be always set for
15513 echo "$as_me:15513: checking if you want experimental reentrant code" >&5
15514 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
15516 # Check whether --enable-reentrant or --disable-reentrant was given.
15517 if test "${enable_reentrant+set}" = set; then
15518 enableval="$enable_reentrant"
15519 with_reentrant=$enableval
15521 with_reentrant=$assume_reentrant
15523 echo "$as_me:15523: result: $with_reentrant" >&5
15524 echo "${ECHO_T}$with_reentrant" >&6
15525 if test "$with_reentrant" = yes ; then
15526 cf_cv_enable_reentrant=1
15527 if test $cf_cv_weak_symbols = yes ; then
15529 # remove pthread library from $LIBS
15530 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
15532 elif test "$assume_reentrant" = no ; then
15533 LIB_SUFFIX="t${LIB_SUFFIX}"
15536 cat >>confdefs.h <<\EOF
15537 #define USE_REENTRANT 1
15541 cf_cv_enable_reentrant=0
15544 ### Allow using a different wrap-prefix
15545 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15546 echo "$as_me:15546: checking for prefix used to wrap public variables" >&5
15547 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15549 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15550 if test "${with_wrap_prefix+set}" = set; then
15551 withval="$with_wrap_prefix"
15552 NCURSES_WRAP_PREFIX=$withval
15554 NCURSES_WRAP_PREFIX=_nc_
15556 echo "$as_me:15556: result: $NCURSES_WRAP_PREFIX" >&5
15557 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15559 NCURSES_WRAP_PREFIX=_nc_
15562 cat >>confdefs.h <<EOF
15563 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15566 ###############################################################################
15568 ### use option --disable-echo to suppress full display compiling commands
15570 echo "$as_me:15570: checking if you want to see long compiling messages" >&5
15571 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15573 # Check whether --enable-echo or --disable-echo was given.
15574 if test "${enable_echo+set}" = set; then
15575 enableval="$enable_echo"
15576 test "$enableval" != no && enableval=yes
15577 if test "$enableval" != "yes" ; then
15580 ECHO_LD='@echo linking $@;'
15581 RULE_CC='@echo compiling $<'
15582 SHOW_CC='@echo compiling $@'
15604 echo "$as_me:15604: result: $enableval" >&5
15605 echo "${ECHO_T}$enableval" >&6
15607 echo "$as_me:15607: checking if you want to use C11 _Noreturn feature" >&5
15608 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
15610 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
15611 if test "${enable_stdnoreturn+set}" = set; then
15612 enableval="$enable_stdnoreturn"
15613 test "$enableval" != yes && enableval=no
15614 if test "$enableval" != "no" ; then
15615 enable_stdnoreturn=yes
15617 enable_stdnoreturn=no
15621 enable_stdnoreturn=no
15624 echo "$as_me:15624: result: $enable_stdnoreturn" >&5
15625 echo "${ECHO_T}$enable_stdnoreturn" >&6
15627 if test $enable_stdnoreturn = yes; then
15628 echo "$as_me:15628: checking for C11 _Noreturn feature" >&5
15629 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
15630 if test "${cf_cv_c11_noreturn+set}" = set; then
15631 echo $ECHO_N "(cached) $ECHO_C" >&6
15633 cat >"conftest.$ac_ext" <<_ACEOF
15634 #line 15634 "configure"
15635 #include "confdefs.h"
15637 $ac_includes_default
15638 #include <stdnoreturn.h>
15639 static _Noreturn void giveup(void) { exit(0); }
15644 if (feof(stdin)) giveup()
15649 rm -f "conftest.$ac_objext"
15650 if { (eval echo "$as_me:15650: \"$ac_compile\"") >&5
15651 (eval $ac_compile) 2>&5
15653 echo "$as_me:15653: \$? = $ac_status" >&5
15654 (exit "$ac_status"); } &&
15655 { ac_try='test -s "conftest.$ac_objext"'
15656 { (eval echo "$as_me:15656: \"$ac_try\"") >&5
15657 (eval $ac_try) 2>&5
15659 echo "$as_me:15659: \$? = $ac_status" >&5
15660 (exit "$ac_status"); }; }; then
15661 cf_cv_c11_noreturn=yes
15663 echo "$as_me: failed program was:" >&5
15664 cat "conftest.$ac_ext" >&5
15665 cf_cv_c11_noreturn=no
15667 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15670 echo "$as_me:15670: result: $cf_cv_c11_noreturn" >&5
15671 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
15673 cf_cv_c11_noreturn=no,
15676 if test "$cf_cv_c11_noreturn" = yes; then
15678 cat >>confdefs.h <<\EOF
15679 #define HAVE_STDNORETURN_H 1
15682 cat >>confdefs.h <<EOF
15683 #define STDC_NORETURN _Noreturn
15686 HAVE_STDNORETURN_H=1
15688 HAVE_STDNORETURN_H=0
15691 if test "$GCC" = yes || test "$GXX" = yes
15694 if test "$GCC" = yes || test "$GXX" = yes
15699 for cf_temp_scan in $CFLAGS
15701 case "x$cf_temp_scan" in
15704 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15705 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15710 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15711 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15716 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15717 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15722 if test "x$CFLAGS" != "x$cf_temp_flags"
15724 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
15726 echo "${as_me:-configure}:15726: testing repairing CFLAGS: $CFLAGS ..." 1>&5
15728 CFLAGS="$cf_temp_flags"
15729 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15731 echo "${as_me:-configure}:15731: testing ... fixed $CFLAGS ..." 1>&5
15733 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15735 echo "${as_me:-configure}:15735: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15742 if test "$GCC" = yes || test "$GXX" = yes
15747 for cf_temp_scan in $CPPFLAGS
15749 case "x$cf_temp_scan" in
15752 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15753 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15758 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15759 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15764 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15765 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15770 if test "x$CPPFLAGS" != "x$cf_temp_flags"
15772 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15774 echo "${as_me:-configure}:15774: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15776 CPPFLAGS="$cf_temp_flags"
15777 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15779 echo "${as_me:-configure}:15779: testing ... fixed $CPPFLAGS ..." 1>&5
15781 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15783 echo "${as_me:-configure}:15783: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15790 if test "$GCC" = yes || test "$GXX" = yes
15795 for cf_temp_scan in $LDFLAGS
15797 case "x$cf_temp_scan" in
15800 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15801 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15806 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15807 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15812 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15813 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15818 if test "x$LDFLAGS" != "x$cf_temp_flags"
15820 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15822 echo "${as_me:-configure}:15822: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15824 LDFLAGS="$cf_temp_flags"
15825 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15827 echo "${as_me:-configure}:15827: testing ... fixed $LDFLAGS ..." 1>&5
15829 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15831 echo "${as_me:-configure}:15831: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15838 echo "$as_me:15838: checking if you want to turn on gcc warnings" >&5
15839 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15841 # Check whether --enable-warnings or --disable-warnings was given.
15842 if test "${enable_warnings+set}" = set; then
15843 enableval="$enable_warnings"
15844 test "$enableval" != yes && enableval=no
15845 if test "$enableval" != "no" ; then
15846 enable_warnings=yes
15855 echo "$as_me:15855: result: $enable_warnings" >&5
15856 echo "${ECHO_T}$enable_warnings" >&6
15857 if test "$enable_warnings" = "yes"
15860 if test "x$have_x" = xyes; then
15862 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15863 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15864 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15865 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15866 for cf_X_CFLAGS in $X_CFLAGS
15868 case "x$cf_X_CFLAGS" in
15870 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15873 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15878 cat >"conftest.$ac_ext" <<_ACEOF
15879 #line 15879 "configure"
15880 #include "confdefs.h"
15882 #include <stdlib.h>
15883 #include <X11/Intrinsic.h>
15888 String foo = malloc(1); free((void*)foo)
15893 rm -f "conftest.$ac_objext"
15894 if { (eval echo "$as_me:15894: \"$ac_compile\"") >&5
15895 (eval $ac_compile) 2>&5
15897 echo "$as_me:15897: \$? = $ac_status" >&5
15898 (exit "$ac_status"); } &&
15899 { ac_try='test -s "conftest.$ac_objext"'
15900 { (eval echo "$as_me:15900: \"$ac_try\"") >&5
15901 (eval $ac_try) 2>&5
15903 echo "$as_me:15903: \$? = $ac_status" >&5
15904 (exit "$ac_status"); }; }; then
15906 echo "$as_me:15906: checking for X11/Xt const-feature" >&5
15907 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15908 if test "${cf_cv_const_x_string+set}" = set; then
15909 echo $ECHO_N "(cached) $ECHO_C" >&6
15912 cat >"conftest.$ac_ext" <<_ACEOF
15913 #line 15913 "configure"
15914 #include "confdefs.h"
15916 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15917 #undef XTSTRINGDEFINES /* X11R5 and later */
15918 #include <stdlib.h>
15919 #include <X11/Intrinsic.h>
15924 String foo = malloc(1); *foo = 0
15929 rm -f "conftest.$ac_objext"
15930 if { (eval echo "$as_me:15930: \"$ac_compile\"") >&5
15931 (eval $ac_compile) 2>&5
15933 echo "$as_me:15933: \$? = $ac_status" >&5
15934 (exit "$ac_status"); } &&
15935 { ac_try='test -s "conftest.$ac_objext"'
15936 { (eval echo "$as_me:15936: \"$ac_try\"") >&5
15937 (eval $ac_try) 2>&5
15939 echo "$as_me:15939: \$? = $ac_status" >&5
15940 (exit "$ac_status"); }; }; then
15942 cf_cv_const_x_string=no
15945 echo "$as_me: failed program was:" >&5
15946 cat "conftest.$ac_ext" >&5
15948 cf_cv_const_x_string=yes
15951 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15954 echo "$as_me:15954: result: $cf_cv_const_x_string" >&5
15955 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15957 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15958 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15959 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15961 case "$cf_cv_const_x_string" in
15964 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15965 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15970 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15971 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15977 echo "$as_me: failed program was:" >&5
15978 cat "conftest.$ac_ext" >&5
15980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15982 cat > "conftest.$ac_ext" <<EOF
15983 #line 15983 "${as_me:-configure}"
15984 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15986 if test "$INTEL_COMPILER" = yes
15988 # The "-wdXXX" options suppress warnings:
15989 # remark #1419: external declaration in primary source file
15990 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15991 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15992 # remark #193: zero used for undefined preprocessing identifier
15993 # remark #593: variable "curs_sb_left_arrow" was set but never used
15994 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15995 # remark #869: parameter "tw" was never referenced
15996 # remark #981: operands are evaluated in unspecified order
15997 # warning #279: controlling expression is constant
15999 { echo "$as_me:15999: checking for $CC warning options..." >&5
16000 echo "$as_me: checking for $CC warning options..." >&6;}
16001 cf_save_CFLAGS="$CFLAGS"
16002 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16014 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16015 if { (eval echo "$as_me:16015: \"$ac_compile\"") >&5
16016 (eval $ac_compile) 2>&5
16018 echo "$as_me:16018: \$? = $ac_status" >&5
16019 (exit "$ac_status"); }; then
16020 test -n "$verbose" && echo "$as_me:16020: result: ... -$cf_opt" >&5
16021 echo "${ECHO_T}... -$cf_opt" >&6
16022 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16025 CFLAGS="$cf_save_CFLAGS"
16026 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16028 { echo "$as_me:16028: checking for $CC warning options..." >&5
16029 echo "$as_me: checking for $CC warning options..." >&6;}
16030 cf_save_CFLAGS="$CFLAGS"
16032 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16033 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16034 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16035 for cf_opt in W Wall \
16036 Wbad-function-cast \
16039 Wdeclaration-after-statement \
16042 Wmissing-declarations \
16043 Wmissing-prototypes \
16047 Wstrict-prototypes \
16048 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16050 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16051 if { (eval echo "$as_me:16051: \"$ac_compile\"") >&5
16052 (eval $ac_compile) 2>&5
16054 echo "$as_me:16054: \$? = $ac_status" >&5
16055 (exit "$ac_status"); }; then
16056 test -n "$verbose" && echo "$as_me:16056: result: ... -$cf_opt" >&5
16057 echo "${ECHO_T}... -$cf_opt" >&6
16060 case "$GCC_VERSION" in
16062 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16064 echo "${as_me:-configure}:16064: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16070 case "$GCC_VERSION" in
16072 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
16074 echo "${as_me:-configure}:16074: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16080 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16083 CFLAGS="$cf_save_CFLAGS"
16089 if test "$GCC" = yes || test "$GXX" = yes
16091 cat > conftest.i <<EOF
16093 #define GCC_PRINTF 0
16096 #define GCC_SCANF 0
16098 #ifndef GCC_NORETURN
16099 #define GCC_NORETURN /* nothing */
16102 #define GCC_UNUSED /* nothing */
16105 if test "$GCC" = yes
16107 { echo "$as_me:16107: checking for $CC __attribute__ directives..." >&5
16108 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16109 cat > "conftest.$ac_ext" <<EOF
16110 #line 16110 "${as_me:-configure}"
16112 #include "confdefs.h"
16113 #include "conftest.h"
16114 #include "conftest.i"
16116 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16118 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16121 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
16123 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
16125 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16126 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
16127 extern GCC_NORETURN void foo(void);
16128 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16130 cf_printf_attribute=no
16131 cf_scanf_attribute=no
16132 for cf_attribute in scanf printf unused noreturn
16135 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16137 cf_directive="__attribute__(($cf_attribute))"
16138 echo "checking for $CC $cf_directive" 1>&5
16140 case "$cf_attribute" in
16142 cf_printf_attribute=yes
16143 cat >conftest.h <<EOF
16144 #define GCC_$cf_ATTRIBUTE 1
16148 cf_scanf_attribute=yes
16149 cat >conftest.h <<EOF
16150 #define GCC_$cf_ATTRIBUTE 1
16154 cat >conftest.h <<EOF
16155 #define GCC_$cf_ATTRIBUTE $cf_directive
16160 if { (eval echo "$as_me:16160: \"$ac_compile\"") >&5
16161 (eval $ac_compile) 2>&5
16163 echo "$as_me:16163: \$? = $ac_status" >&5
16164 (exit "$ac_status"); }; then
16165 test -n "$verbose" && echo "$as_me:16165: result: ... $cf_attribute" >&5
16166 echo "${ECHO_T}... $cf_attribute" >&6
16167 cat conftest.h >>confdefs.h
16168 case "$cf_attribute" in
16171 cat >>confdefs.h <<EOF
16172 #define GCC_NORETURN $cf_directive
16177 cf_value='/* nothing */'
16178 if test "$cf_printf_attribute" != no ; then
16179 cf_value='__attribute__((format(printf,fmt,var)))'
16181 cat >>confdefs.h <<\EOF
16182 #define GCC_PRINTF 1
16187 cat >>confdefs.h <<EOF
16188 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16193 cf_value='/* nothing */'
16194 if test "$cf_scanf_attribute" != no ; then
16195 cf_value='__attribute__((format(scanf,fmt,var)))'
16197 cat >>confdefs.h <<\EOF
16198 #define GCC_SCANF 1
16203 cat >>confdefs.h <<EOF
16204 #define GCC_SCANFLIKE(fmt,var) $cf_value
16210 cat >>confdefs.h <<EOF
16211 #define GCC_UNUSED $cf_directive
16219 ${FGREP-fgrep} define conftest.i >>confdefs.h
16226 if test "x$enable_warnings" = "xyes"; then
16228 ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
16232 ### use option --enable-assertions to turn on generation of assertion code
16233 echo "$as_me:16233: checking if you want to enable runtime assertions" >&5
16234 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16236 # Check whether --enable-assertions or --disable-assertions was given.
16237 if test "${enable_assertions+set}" = set; then
16238 enableval="$enable_assertions"
16239 with_assertions=$enableval
16243 echo "$as_me:16243: result: $with_assertions" >&5
16244 echo "${ECHO_T}$with_assertions" >&6
16247 if test "$with_assertions" = no
16249 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16252 ADAFLAGS="$ADAFLAGS -gnata"
16257 ### use option --disable-leaks to suppress "permanent" leaks, for testing
16259 cat >>confdefs.h <<\EOF
16260 #define HAVE_NC_ALLOC_H 1
16263 ### use option --enable-expanded to generate certain macros as functions
16265 # Check whether --enable-expanded or --disable-expanded was given.
16266 if test "${enable_expanded+set}" = set; then
16267 enableval="$enable_expanded"
16268 test "$enableval" = yes &&
16269 cat >>confdefs.h <<\EOF
16270 #define NCURSES_EXPANDED 1
16275 ### use option --disable-macros to suppress macros in favor of functions
16277 # Check whether --enable-macros or --disable-macros was given.
16278 if test "${enable_macros+set}" = set; then
16279 enableval="$enable_macros"
16280 test "$enableval" = no &&
16281 cat >>confdefs.h <<\EOF
16282 #define NCURSES_NOMACROS 1
16287 # Normally we only add trace() to the debug-library. Allow this to be
16288 # extended to all models of the ncurses library:
16290 case "$CFLAGS $CPPFLAGS" in
16296 echo "$as_me:16296: checking whether to add trace feature to all models" >&5
16297 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16299 # Check whether --with-trace or --without-trace was given.
16300 if test "${with_trace+set}" = set; then
16301 withval="$with_trace"
16302 cf_with_trace=$withval
16304 cf_with_trace=$cf_all_traces
16306 echo "$as_me:16306: result: $cf_with_trace" >&5
16307 echo "${ECHO_T}$cf_with_trace" >&6
16309 if test "$cf_with_trace" = yes ; then
16315 cf_new_extra_cppflags=
16317 for cf_add_cflags in -DTRACE
16319 case "$cf_fix_cppflags" in
16321 case "$cf_add_cflags" in
16322 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16323 case "$cf_add_cflags" in
16325 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16327 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16328 && test -z "${cf_tst_cflags}" \
16329 && cf_fix_cppflags=yes
16331 if test "$cf_fix_cppflags" = yes ; then
16333 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16334 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16337 elif test "${cf_tst_cflags}" = "\"'" ; then
16339 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16340 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16346 case "$CPPFLAGS" in
16350 case "$cf_add_cflags" in
16352 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16354 CPPFLAGS=`echo "$CPPFLAGS" | \
16355 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16356 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16361 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16362 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16369 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16370 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16377 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16378 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16380 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16382 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16383 && test -z "${cf_tst_cflags}" \
16384 && cf_fix_cppflags=no
16389 if test -n "$cf_new_cflags" ; then
16391 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16392 CFLAGS="${CFLAGS}$cf_new_cflags"
16396 if test -n "$cf_new_cppflags" ; then
16398 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16399 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16403 if test -n "$cf_new_extra_cppflags" ; then
16405 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16406 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16414 echo "$as_me:16414: checking if we want to use GNAT projects" >&5
16415 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16417 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16418 if test "${enable_gnat_projects+set}" = set; then
16419 enableval="$enable_gnat_projects"
16420 test "$enableval" != no && enableval=yes
16421 if test "$enableval" != "yes" ; then
16422 enable_gnat_projects=no
16424 enable_gnat_projects=yes
16428 enable_gnat_projects=yes
16431 echo "$as_me:16431: result: $enable_gnat_projects" >&5
16432 echo "${ECHO_T}$enable_gnat_projects" >&6
16434 ### Checks for libraries.
16435 case $cf_cv_system_name in
16438 echo "$as_me:16438: checking if ssp library is needed" >&5
16439 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
16440 if test "${cf_cv_need_libssp+set}" = set; then
16441 echo $ECHO_N "(cached) $ECHO_C" >&6
16444 cat >"conftest.$ac_ext" <<_ACEOF
16445 #line 16445 "configure"
16446 #include "confdefs.h"
16448 #include <sys/types.h>
16449 #include <dirent.h>
16455 DIR *dp = opendir(".");
16461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16462 if { (eval echo "$as_me:16462: \"$ac_link\"") >&5
16463 (eval $ac_link) 2>&5
16465 echo "$as_me:16465: \$? = $ac_status" >&5
16466 (exit "$ac_status"); } &&
16467 { ac_try='test -s "conftest$ac_exeext"'
16468 { (eval echo "$as_me:16468: \"$ac_try\"") >&5
16469 (eval $ac_try) 2>&5
16471 echo "$as_me:16471: \$? = $ac_status" >&5
16472 (exit "$ac_status"); }; }; then
16473 cf_cv_need_libssp=no
16475 echo "$as_me: failed program was:" >&5
16476 cat "conftest.$ac_ext" >&5
16478 cf_save_LIBS="$LIBS"
16480 cat >"conftest.$ac_ext" <<_ACEOF
16481 #line 16481 "configure"
16482 #include "confdefs.h"
16484 #include <sys/types.h>
16485 #include <dirent.h>
16491 DIR *dp = opendir(".");
16497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16498 if { (eval echo "$as_me:16498: \"$ac_link\"") >&5
16499 (eval $ac_link) 2>&5
16501 echo "$as_me:16501: \$? = $ac_status" >&5
16502 (exit "$ac_status"); } &&
16503 { ac_try='test -s "conftest$ac_exeext"'
16504 { (eval echo "$as_me:16504: \"$ac_try\"") >&5
16505 (eval $ac_try) 2>&5
16507 echo "$as_me:16507: \$? = $ac_status" >&5
16508 (exit "$ac_status"); }; }; then
16509 cf_cv_need_libssp=yes
16511 echo "$as_me: failed program was:" >&5
16512 cat "conftest.$ac_ext" >&5
16513 cf_cv_need_libssp=maybe
16515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16516 LIBS="$cf_save_LIBS"
16519 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16521 echo "$as_me:16521: result: $cf_cv_need_libssp" >&5
16522 echo "${ECHO_T}$cf_cv_need_libssp" >&6
16524 if test "x$cf_cv_need_libssp" = xyes
16527 cf_add_libs="$LIBS"
16530 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16531 # filter duplicates
16532 for cf_add_1lib in $cf_add_0lib; do
16533 for cf_add_2lib in $cf_add_libs; do
16534 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16539 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16541 LIBS="$cf_add_libs"
16548 echo "$as_me:16548: checking for clock_gettime" >&5
16549 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
16550 if test "${cf_cv_func_clock_gettime+set}" = set; then
16551 echo $ECHO_N "(cached) $ECHO_C" >&6
16554 cat >"conftest.$ac_ext" <<_ACEOF
16555 #line 16555 "configure"
16556 #include "confdefs.h"
16561 struct timespec ts;
16562 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
16567 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16568 if { (eval echo "$as_me:16568: \"$ac_link\"") >&5
16569 (eval $ac_link) 2>&5
16571 echo "$as_me:16571: \$? = $ac_status" >&5
16572 (exit "$ac_status"); } &&
16573 { ac_try='test -s "conftest$ac_exeext"'
16574 { (eval echo "$as_me:16574: \"$ac_try\"") >&5
16575 (eval $ac_try) 2>&5
16577 echo "$as_me:16577: \$? = $ac_status" >&5
16578 (exit "$ac_status"); }; }; then
16579 cf_cv_func_clock_gettime=yes
16581 echo "$as_me: failed program was:" >&5
16582 cat "conftest.$ac_ext" >&5
16583 cf_cv_func_clock_gettime=no
16585 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16588 echo "$as_me:16588: result: $cf_cv_func_clock_gettime" >&5
16589 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
16591 if test "$cf_cv_func_clock_gettime" = yes
16594 cat >>confdefs.h <<\EOF
16595 #define HAVE_CLOCK_GETTIME 1
16599 echo "$as_me:16599: checking for gettimeofday" >&5
16600 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16601 if test "${ac_cv_func_gettimeofday+set}" = set; then
16602 echo $ECHO_N "(cached) $ECHO_C" >&6
16604 cat >"conftest.$ac_ext" <<_ACEOF
16605 #line 16605 "configure"
16606 #include "confdefs.h"
16607 #define gettimeofday autoconf_temporary
16608 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16609 #undef gettimeofday
16615 /* We use char because int might match the return type of a gcc2
16616 builtin and then its argument prototype would still apply. */
16617 char gettimeofday (void);
16623 /* The GNU C library defines stubs for functions which it implements
16624 to always fail with ENOSYS. Some functions are actually named
16625 something starting with __ and the normal name is an alias. */
16626 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16627 #error found stub for gettimeofday
16630 return gettimeofday ();
16635 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16636 if { (eval echo "$as_me:16636: \"$ac_link\"") >&5
16637 (eval $ac_link) 2>&5
16639 echo "$as_me:16639: \$? = $ac_status" >&5
16640 (exit "$ac_status"); } &&
16641 { ac_try='test -s "conftest$ac_exeext"'
16642 { (eval echo "$as_me:16642: \"$ac_try\"") >&5
16643 (eval $ac_try) 2>&5
16645 echo "$as_me:16645: \$? = $ac_status" >&5
16646 (exit "$ac_status"); }; }; then
16647 ac_cv_func_gettimeofday=yes
16649 echo "$as_me: failed program was:" >&5
16650 cat "conftest.$ac_ext" >&5
16651 ac_cv_func_gettimeofday=no
16653 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16655 echo "$as_me:16655: result: $ac_cv_func_gettimeofday" >&5
16656 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16657 if test "$ac_cv_func_gettimeofday" = yes; then
16659 cat >>confdefs.h <<\EOF
16660 #define HAVE_GETTIMEOFDAY 1
16665 echo "$as_me:16665: checking for gettimeofday in -lbsd" >&5
16666 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16667 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16668 echo $ECHO_N "(cached) $ECHO_C" >&6
16670 ac_check_lib_save_LIBS=$LIBS
16672 cat >"conftest.$ac_ext" <<_ACEOF
16673 #line 16673 "configure"
16674 #include "confdefs.h"
16676 /* Override any gcc2 internal prototype to avoid an error. */
16680 /* We use char because int might match the return type of a gcc2
16681 builtin and then its argument prototype would still apply. */
16682 char gettimeofday ();
16691 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16692 if { (eval echo "$as_me:16692: \"$ac_link\"") >&5
16693 (eval $ac_link) 2>&5
16695 echo "$as_me:16695: \$? = $ac_status" >&5
16696 (exit "$ac_status"); } &&
16697 { ac_try='test -s "conftest$ac_exeext"'
16698 { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699 (eval $ac_try) 2>&5
16701 echo "$as_me:16701: \$? = $ac_status" >&5
16702 (exit "$ac_status"); }; }; then
16703 ac_cv_lib_bsd_gettimeofday=yes
16705 echo "$as_me: failed program was:" >&5
16706 cat "conftest.$ac_ext" >&5
16707 ac_cv_lib_bsd_gettimeofday=no
16709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16710 LIBS=$ac_check_lib_save_LIBS
16712 echo "$as_me:16712: result: $ac_cv_lib_bsd_gettimeofday" >&5
16713 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16714 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
16716 cat >>confdefs.h <<\EOF
16717 #define HAVE_GETTIMEOFDAY 1
16720 cf_add_libs="$LIBS"
16723 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16724 # filter duplicates
16725 for cf_add_1lib in $cf_add_0lib; do
16726 for cf_add_2lib in $cf_add_libs; do
16727 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16732 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16734 LIBS="$cf_add_libs"
16744 ### Checks for header files.
16745 echo "$as_me:16745: checking for signed char" >&5
16746 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16747 if test "${ac_cv_type_signed_char+set}" = set; then
16748 echo $ECHO_N "(cached) $ECHO_C" >&6
16750 cat >"conftest.$ac_ext" <<_ACEOF
16751 #line 16751 "configure"
16752 #include "confdefs.h"
16753 $ac_includes_default
16757 if ((signed char *) 0)
16759 if (sizeof (signed char))
16765 rm -f "conftest.$ac_objext"
16766 if { (eval echo "$as_me:16766: \"$ac_compile\"") >&5
16767 (eval $ac_compile) 2>&5
16769 echo "$as_me:16769: \$? = $ac_status" >&5
16770 (exit "$ac_status"); } &&
16771 { ac_try='test -s "conftest.$ac_objext"'
16772 { (eval echo "$as_me:16772: \"$ac_try\"") >&5
16773 (eval $ac_try) 2>&5
16775 echo "$as_me:16775: \$? = $ac_status" >&5
16776 (exit "$ac_status"); }; }; then
16777 ac_cv_type_signed_char=yes
16779 echo "$as_me: failed program was:" >&5
16780 cat "conftest.$ac_ext" >&5
16781 ac_cv_type_signed_char=no
16783 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16785 echo "$as_me:16785: result: $ac_cv_type_signed_char" >&5
16786 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16788 echo "$as_me:16788: checking size of signed char" >&5
16789 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16790 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16791 echo $ECHO_N "(cached) $ECHO_C" >&6
16793 if test "$ac_cv_type_signed_char" = yes; then
16794 if test "$cross_compiling" = yes; then
16795 # Depending upon the size, compute the lo and hi bounds.
16796 cat >"conftest.$ac_ext" <<_ACEOF
16797 #line 16797 "configure"
16798 #include "confdefs.h"
16799 $ac_includes_default
16803 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16808 rm -f "conftest.$ac_objext"
16809 if { (eval echo "$as_me:16809: \"$ac_compile\"") >&5
16810 (eval $ac_compile) 2>&5
16812 echo "$as_me:16812: \$? = $ac_status" >&5
16813 (exit "$ac_status"); } &&
16814 { ac_try='test -s "conftest.$ac_objext"'
16815 { (eval echo "$as_me:16815: \"$ac_try\"") >&5
16816 (eval $ac_try) 2>&5
16818 echo "$as_me:16818: \$? = $ac_status" >&5
16819 (exit "$ac_status"); }; }; then
16822 cat >"conftest.$ac_ext" <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16825 $ac_includes_default
16829 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16834 rm -f "conftest.$ac_objext"
16835 if { (eval echo "$as_me:16835: \"$ac_compile\"") >&5
16836 (eval $ac_compile) 2>&5
16838 echo "$as_me:16838: \$? = $ac_status" >&5
16839 (exit "$ac_status"); } &&
16840 { ac_try='test -s "conftest.$ac_objext"'
16841 { (eval echo "$as_me:16841: \"$ac_try\"") >&5
16842 (eval $ac_try) 2>&5
16844 echo "$as_me:16844: \$? = $ac_status" >&5
16845 (exit "$ac_status"); }; }; then
16846 ac_hi=$ac_mid; break
16848 echo "$as_me: failed program was:" >&5
16849 cat "conftest.$ac_ext" >&5
16850 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16855 echo "$as_me: failed program was:" >&5
16856 cat "conftest.$ac_ext" >&5
16859 cat >"conftest.$ac_ext" <<_ACEOF
16860 #line 16860 "configure"
16861 #include "confdefs.h"
16862 $ac_includes_default
16866 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16871 rm -f "conftest.$ac_objext"
16872 if { (eval echo "$as_me:16872: \"$ac_compile\"") >&5
16873 (eval $ac_compile) 2>&5
16875 echo "$as_me:16875: \$? = $ac_status" >&5
16876 (exit "$ac_status"); } &&
16877 { ac_try='test -s "conftest.$ac_objext"'
16878 { (eval echo "$as_me:16878: \"$ac_try\"") >&5
16879 (eval $ac_try) 2>&5
16881 echo "$as_me:16881: \$? = $ac_status" >&5
16882 (exit "$ac_status"); }; }; then
16883 ac_lo=$ac_mid; break
16885 echo "$as_me: failed program was:" >&5
16886 cat "conftest.$ac_ext" >&5
16887 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16889 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16893 # Binary search between lo and hi bounds.
16894 while test "x$ac_lo" != "x$ac_hi"; do
16895 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16896 cat >"conftest.$ac_ext" <<_ACEOF
16897 #line 16897 "configure"
16898 #include "confdefs.h"
16899 $ac_includes_default
16903 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16908 rm -f "conftest.$ac_objext"
16909 if { (eval echo "$as_me:16909: \"$ac_compile\"") >&5
16910 (eval $ac_compile) 2>&5
16912 echo "$as_me:16912: \$? = $ac_status" >&5
16913 (exit "$ac_status"); } &&
16914 { ac_try='test -s "conftest.$ac_objext"'
16915 { (eval echo "$as_me:16915: \"$ac_try\"") >&5
16916 (eval $ac_try) 2>&5
16918 echo "$as_me:16918: \$? = $ac_status" >&5
16919 (exit "$ac_status"); }; }; then
16922 echo "$as_me: failed program was:" >&5
16923 cat "conftest.$ac_ext" >&5
16924 ac_lo=`expr "$ac_mid" + 1`
16926 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16928 ac_cv_sizeof_signed_char=$ac_lo
16930 if test "$cross_compiling" = yes; then
16931 { { echo "$as_me:16931: error: cannot run test program while cross compiling" >&5
16932 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16933 { (exit 1); exit 1; }; }
16935 cat >"conftest.$ac_ext" <<_ACEOF
16936 #line 16936 "configure"
16937 #include "confdefs.h"
16938 $ac_includes_default
16942 FILE *f = fopen ("conftest.val", "w");
16944 $ac_main_return (1);
16945 fprintf (f, "%ld", (long)(sizeof (signed char)));
16951 rm -f "conftest$ac_exeext"
16952 if { (eval echo "$as_me:16952: \"$ac_link\"") >&5
16953 (eval $ac_link) 2>&5
16955 echo "$as_me:16955: \$? = $ac_status" >&5
16956 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16957 { (eval echo "$as_me:16957: \"$ac_try\"") >&5
16958 (eval $ac_try) 2>&5
16960 echo "$as_me:16960: \$? = $ac_status" >&5
16961 (exit "$ac_status"); }; }; then
16962 ac_cv_sizeof_signed_char=`cat conftest.val`
16964 echo "$as_me: program exited with status $ac_status" >&5
16965 echo "$as_me: failed program was:" >&5
16966 cat "conftest.$ac_ext" >&5
16968 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16973 ac_cv_sizeof_signed_char=0
16976 echo "$as_me:16976: result: $ac_cv_sizeof_signed_char" >&5
16977 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16978 cat >>confdefs.h <<EOF
16979 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16982 ac_header_dirent=no
16983 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16984 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16985 echo "$as_me:16985: checking for $ac_hdr that defines DIR" >&5
16986 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16987 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16988 echo $ECHO_N "(cached) $ECHO_C" >&6
16990 cat >"conftest.$ac_ext" <<_ACEOF
16991 #line 16991 "configure"
16992 #include "confdefs.h"
16993 #include <sys/types.h>
17005 rm -f "conftest.$ac_objext"
17006 if { (eval echo "$as_me:17006: \"$ac_compile\"") >&5
17007 (eval $ac_compile) 2>&5
17009 echo "$as_me:17009: \$? = $ac_status" >&5
17010 (exit "$ac_status"); } &&
17011 { ac_try='test -s "conftest.$ac_objext"'
17012 { (eval echo "$as_me:17012: \"$ac_try\"") >&5
17013 (eval $ac_try) 2>&5
17015 echo "$as_me:17015: \$? = $ac_status" >&5
17016 (exit "$ac_status"); }; }; then
17017 eval "$as_ac_Header=yes"
17019 echo "$as_me: failed program was:" >&5
17020 cat "conftest.$ac_ext" >&5
17021 eval "$as_ac_Header=no"
17023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17025 echo "$as_me:17025: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17026 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17027 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17028 cat >>confdefs.h <<EOF
17029 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17032 ac_header_dirent=$ac_hdr; break
17036 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17037 if test $ac_header_dirent = dirent.h; then
17038 echo "$as_me:17038: checking for opendir in -ldir" >&5
17039 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17040 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17041 echo $ECHO_N "(cached) $ECHO_C" >&6
17043 ac_check_lib_save_LIBS=$LIBS
17045 cat >"conftest.$ac_ext" <<_ACEOF
17046 #line 17046 "configure"
17047 #include "confdefs.h"
17049 /* Override any gcc2 internal prototype to avoid an error. */
17053 /* We use char because int might match the return type of a gcc2
17054 builtin and then its argument prototype would still apply. */
17064 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17065 if { (eval echo "$as_me:17065: \"$ac_link\"") >&5
17066 (eval $ac_link) 2>&5
17068 echo "$as_me:17068: \$? = $ac_status" >&5
17069 (exit "$ac_status"); } &&
17070 { ac_try='test -s "conftest$ac_exeext"'
17071 { (eval echo "$as_me:17071: \"$ac_try\"") >&5
17072 (eval $ac_try) 2>&5
17074 echo "$as_me:17074: \$? = $ac_status" >&5
17075 (exit "$ac_status"); }; }; then
17076 ac_cv_lib_dir_opendir=yes
17078 echo "$as_me: failed program was:" >&5
17079 cat "conftest.$ac_ext" >&5
17080 ac_cv_lib_dir_opendir=no
17082 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17083 LIBS=$ac_check_lib_save_LIBS
17085 echo "$as_me:17085: result: $ac_cv_lib_dir_opendir" >&5
17086 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17087 if test "$ac_cv_lib_dir_opendir" = yes; then
17092 echo "$as_me:17092: checking for opendir in -lx" >&5
17093 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17094 if test "${ac_cv_lib_x_opendir+set}" = set; then
17095 echo $ECHO_N "(cached) $ECHO_C" >&6
17097 ac_check_lib_save_LIBS=$LIBS
17099 cat >"conftest.$ac_ext" <<_ACEOF
17100 #line 17100 "configure"
17101 #include "confdefs.h"
17103 /* Override any gcc2 internal prototype to avoid an error. */
17107 /* We use char because int might match the return type of a gcc2
17108 builtin and then its argument prototype would still apply. */
17118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17119 if { (eval echo "$as_me:17119: \"$ac_link\"") >&5
17120 (eval $ac_link) 2>&5
17122 echo "$as_me:17122: \$? = $ac_status" >&5
17123 (exit "$ac_status"); } &&
17124 { ac_try='test -s "conftest$ac_exeext"'
17125 { (eval echo "$as_me:17125: \"$ac_try\"") >&5
17126 (eval $ac_try) 2>&5
17128 echo "$as_me:17128: \$? = $ac_status" >&5
17129 (exit "$ac_status"); }; }; then
17130 ac_cv_lib_x_opendir=yes
17132 echo "$as_me: failed program was:" >&5
17133 cat "conftest.$ac_ext" >&5
17134 ac_cv_lib_x_opendir=no
17136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17137 LIBS=$ac_check_lib_save_LIBS
17139 echo "$as_me:17139: result: $ac_cv_lib_x_opendir" >&5
17140 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17141 if test "$ac_cv_lib_x_opendir" = yes; then
17147 echo "$as_me:17147: checking whether time.h and sys/time.h may both be included" >&5
17148 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17149 if test "${ac_cv_header_time+set}" = set; then
17150 echo $ECHO_N "(cached) $ECHO_C" >&6
17152 cat >"conftest.$ac_ext" <<_ACEOF
17153 #line 17153 "configure"
17154 #include "confdefs.h"
17155 #include <sys/types.h>
17156 #include <sys/time.h>
17162 if ((struct tm *) 0)
17168 rm -f "conftest.$ac_objext"
17169 if { (eval echo "$as_me:17169: \"$ac_compile\"") >&5
17170 (eval $ac_compile) 2>&5
17172 echo "$as_me:17172: \$? = $ac_status" >&5
17173 (exit "$ac_status"); } &&
17174 { ac_try='test -s "conftest.$ac_objext"'
17175 { (eval echo "$as_me:17175: \"$ac_try\"") >&5
17176 (eval $ac_try) 2>&5
17178 echo "$as_me:17178: \$? = $ac_status" >&5
17179 (exit "$ac_status"); }; }; then
17180 ac_cv_header_time=yes
17182 echo "$as_me: failed program was:" >&5
17183 cat "conftest.$ac_ext" >&5
17184 ac_cv_header_time=no
17186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17188 echo "$as_me:17188: result: $ac_cv_header_time" >&5
17189 echo "${ECHO_T}$ac_cv_header_time" >&6
17190 if test $ac_cv_header_time = yes; then
17192 cat >>confdefs.h <<\EOF
17193 #define TIME_WITH_SYS_TIME 1
17198 ### checks for compiler characteristics
17200 ac_cpp='$CPP $CPPFLAGS'
17201 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17202 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17203 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17204 ac_main_return="return"
17206 echo "$as_me:17206: checking for an ANSI C-conforming const" >&5
17207 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17208 if test "${ac_cv_c_const+set}" = set; then
17209 echo $ECHO_N "(cached) $ECHO_C" >&6
17211 cat >"conftest.$ac_ext" <<_ACEOF
17212 #line 17212 "configure"
17213 #include "confdefs.h"
17218 /* FIXME: Include the comments suggested by Paul. */
17219 #ifndef __cplusplus
17220 /* Ultrix mips cc rejects this. */
17221 typedef int charset[2];
17223 /* SunOS 4.1.1 cc rejects this. */
17224 char const *const *ccp;
17226 /* NEC SVR4.0.2 mips cc rejects this. */
17227 struct point {int x, y;};
17228 static struct point const zero = {0,0};
17229 /* AIX XL C 1.02.0.0 rejects this.
17230 It does not let you subtract one const X* pointer from another in
17231 an arm of an if-expression whose if-part is not a constant
17233 const char *g = "string";
17234 ccp = &g + (g ? g-g : 0);
17235 /* HPUX 7.0 cc rejects these. */
17238 ccp = (char const *const *) p;
17239 { /* SCO 3.2v4 cc rejects this. */
17241 char const *s = 0 ? (char *) 0 : (char const *) 0;
17245 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
17246 int x[] = {25, 17};
17247 const int *foo = &x[0];
17250 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17251 typedef const int *iptr;
17255 { /* AIX XL C 1.02.0.0 rejects this saying
17256 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17257 struct s { int j; const int *ap[3]; };
17258 struct s *b; b->j = 5;
17260 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17261 const int foo = 10;
17269 rm -f "conftest.$ac_objext"
17270 if { (eval echo "$as_me:17270: \"$ac_compile\"") >&5
17271 (eval $ac_compile) 2>&5
17273 echo "$as_me:17273: \$? = $ac_status" >&5
17274 (exit "$ac_status"); } &&
17275 { ac_try='test -s "conftest.$ac_objext"'
17276 { (eval echo "$as_me:17276: \"$ac_try\"") >&5
17277 (eval $ac_try) 2>&5
17279 echo "$as_me:17279: \$? = $ac_status" >&5
17280 (exit "$ac_status"); }; }; then
17283 echo "$as_me: failed program was:" >&5
17284 cat "conftest.$ac_ext" >&5
17287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17289 echo "$as_me:17289: result: $ac_cv_c_const" >&5
17290 echo "${ECHO_T}$ac_cv_c_const" >&6
17291 if test $ac_cv_c_const = no; then
17293 cat >>confdefs.h <<\EOF
17299 ### Checks for external-data
17301 echo "$as_me:17301: checking if data-only library module links" >&5
17302 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17303 if test "${cf_cv_link_dataonly+set}" = set; then
17304 echo $ECHO_N "(cached) $ECHO_C" >&6
17308 cat >conftest.$ac_ext <<EOF
17309 #line 17309 "configure"
17310 int testdata[3] = { 123, 456, 789 };
17312 if { (eval echo "$as_me:17312: \"$ac_compile\"") >&5
17313 (eval $ac_compile) 2>&5
17315 echo "$as_me:17315: \$? = $ac_status" >&5
17316 (exit "$ac_status"); } ; then
17317 mv conftest.o data.o && \
17318 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17320 rm -f conftest.$ac_ext data.o
17321 cat >conftest.$ac_ext <<EOF
17322 #line 17322 "configure"
17326 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
17328 extern int testdata[3];
17329 return testdata[0] == 123
17330 && testdata[1] == 456
17331 && testdata[2] == 789;
17335 if { (eval echo "$as_me:17335: \"$ac_compile\"") >&5
17336 (eval $ac_compile) 2>&5
17338 echo "$as_me:17338: \$? = $ac_status" >&5
17339 (exit "$ac_status"); }; then
17340 mv conftest.o func.o && \
17341 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17343 rm -f conftest.$ac_ext func.o
17344 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17345 cf_saveLIBS="$LIBS"
17346 LIBS="conftest.a $LIBS"
17347 if test "$cross_compiling" = yes; then
17348 cf_cv_link_dataonly=unknown
17350 cat >"conftest.$ac_ext" <<_ACEOF
17351 #line 17351 "configure"
17352 #include "confdefs.h"
17356 extern int testfunc();
17357 ${cf_cv_main_return:-return} (!testfunc());
17361 rm -f "conftest$ac_exeext"
17362 if { (eval echo "$as_me:17362: \"$ac_link\"") >&5
17363 (eval $ac_link) 2>&5
17365 echo "$as_me:17365: \$? = $ac_status" >&5
17366 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17367 { (eval echo "$as_me:17367: \"$ac_try\"") >&5
17368 (eval $ac_try) 2>&5
17370 echo "$as_me:17370: \$? = $ac_status" >&5
17371 (exit "$ac_status"); }; }; then
17372 cf_cv_link_dataonly=yes
17374 echo "$as_me: program exited with status $ac_status" >&5
17375 echo "$as_me: failed program was:" >&5
17376 cat "conftest.$ac_ext" >&5
17377 cf_cv_link_dataonly=no
17379 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17381 LIBS="$cf_saveLIBS"
17385 echo "$as_me:17385: result: $cf_cv_link_dataonly" >&5
17386 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17388 if test "$cf_cv_link_dataonly" = no ; then
17390 cat >>confdefs.h <<\EOF
17391 #define BROKEN_LINKER 1
17397 ### Checks for library functions.
17403 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17404 echo "$as_me:17404: checking for $ac_header" >&5
17405 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17406 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17407 echo $ECHO_N "(cached) $ECHO_C" >&6
17409 cat >"conftest.$ac_ext" <<_ACEOF
17410 #line 17410 "configure"
17411 #include "confdefs.h"
17412 #include <$ac_header>
17414 if { (eval echo "$as_me:17414: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17415 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17417 $EGREP -v '^ *\+' conftest.er1 >conftest.err
17419 cat conftest.err >&5
17420 echo "$as_me:17420: \$? = $ac_status" >&5
17421 (exit "$ac_status"); } >/dev/null; then
17422 if test -s conftest.err; then
17423 ac_cpp_err=$ac_c_preproc_warn_flag
17430 if test -z "$ac_cpp_err"; then
17431 eval "$as_ac_Header=yes"
17433 echo "$as_me: failed program was:" >&5
17434 cat "conftest.$ac_ext" >&5
17435 eval "$as_ac_Header=no"
17437 rm -f conftest.err "conftest.$ac_ext"
17439 echo "$as_me:17439: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17440 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17441 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17442 cat >>confdefs.h <<EOF
17443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17449 echo "$as_me:17449: checking for working mkstemp" >&5
17450 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17451 if test "${cf_cv_func_mkstemp+set}" = set; then
17452 echo $ECHO_N "(cached) $ECHO_C" >&6
17456 if test "$cross_compiling" = yes; then
17457 cf_cv_func_mkstemp=maybe
17459 cat >"conftest.$ac_ext" <<_ACEOF
17460 #line 17460 "configure"
17461 #include "confdefs.h"
17463 $ac_includes_default
17467 char *tmpl = "conftestXXXXXX";
17475 for (n = 0; n < 2; ++n) {
17476 strcpy(name[n], tmpl);
17477 if ((fd = mkstemp(name[n])) >= 0) {
17478 if (!strcmp(name[n], tmpl)
17479 || stat(name[n], &sb) != 0
17480 || (sb.st_mode & S_IFMT) != S_IFREG
17481 || (sb.st_mode & 077) != 0) {
17488 && !strcmp(name[0], name[1]))
17490 ${cf_cv_main_return:-return}(result);
17494 rm -f "conftest$ac_exeext"
17495 if { (eval echo "$as_me:17495: \"$ac_link\"") >&5
17496 (eval $ac_link) 2>&5
17498 echo "$as_me:17498: \$? = $ac_status" >&5
17499 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17500 { (eval echo "$as_me:17500: \"$ac_try\"") >&5
17501 (eval $ac_try) 2>&5
17503 echo "$as_me:17503: \$? = $ac_status" >&5
17504 (exit "$ac_status"); }; }; then
17505 cf_cv_func_mkstemp=yes
17508 echo "$as_me: program exited with status $ac_status" >&5
17509 echo "$as_me: failed program was:" >&5
17510 cat "conftest.$ac_ext" >&5
17511 cf_cv_func_mkstemp=no
17514 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17518 echo "$as_me:17518: result: $cf_cv_func_mkstemp" >&5
17519 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17520 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17521 echo "$as_me:17521: checking for mkstemp" >&5
17522 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17523 if test "${ac_cv_func_mkstemp+set}" = set; then
17524 echo $ECHO_N "(cached) $ECHO_C" >&6
17526 cat >"conftest.$ac_ext" <<_ACEOF
17527 #line 17527 "configure"
17528 #include "confdefs.h"
17529 #define mkstemp autoconf_temporary
17530 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
17537 /* We use char because int might match the return type of a gcc2
17538 builtin and then its argument prototype would still apply. */
17539 char mkstemp (void);
17545 /* The GNU C library defines stubs for functions which it implements
17546 to always fail with ENOSYS. Some functions are actually named
17547 something starting with __ and the normal name is an alias. */
17548 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17549 #error found stub for mkstemp
17557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17558 if { (eval echo "$as_me:17558: \"$ac_link\"") >&5
17559 (eval $ac_link) 2>&5
17561 echo "$as_me:17561: \$? = $ac_status" >&5
17562 (exit "$ac_status"); } &&
17563 { ac_try='test -s "conftest$ac_exeext"'
17564 { (eval echo "$as_me:17564: \"$ac_try\"") >&5
17565 (eval $ac_try) 2>&5
17567 echo "$as_me:17567: \$? = $ac_status" >&5
17568 (exit "$ac_status"); }; }; then
17569 ac_cv_func_mkstemp=yes
17571 echo "$as_me: failed program was:" >&5
17572 cat "conftest.$ac_ext" >&5
17573 ac_cv_func_mkstemp=no
17575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17577 echo "$as_me:17577: result: $ac_cv_func_mkstemp" >&5
17578 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17581 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17583 cat >>confdefs.h <<\EOF
17584 #define HAVE_MKSTEMP 1
17589 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17590 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17591 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17595 if test "$cf_with_ada" != "no" ; then
17597 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17600 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17602 unset ac_cv_path_cf_TEMP_gnat
17604 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17605 set dummy $cf_prog_gnat; ac_word=$2
17606 echo "$as_me:17606: checking for $ac_word" >&5
17607 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17608 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17609 echo $ECHO_N "(cached) $ECHO_C" >&6
17611 case $cf_TEMP_gnat in
17613 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17616 ac_save_IFS=$IFS; IFS=$ac_path_separator
17618 for ac_dir in $ac_dummy; do
17620 test -z "$ac_dir" && ac_dir=.
17621 if $as_executable_p "$ac_dir/$ac_word"; then
17622 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17623 echo "$as_me:17623: found $ac_dir/$ac_word" >&5
17628 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17632 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17634 if test -n "$cf_TEMP_gnat"; then
17635 echo "$as_me:17635: result: $cf_TEMP_gnat" >&5
17636 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17638 echo "$as_me:17638: result: no" >&5
17639 echo "${ECHO_T}no" >&6
17642 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17644 if test "x$cf_TEMP_gnat" != xno; then
17645 unset cf_cv_gnat_version
17648 echo "$as_me:17648: checking for $cf_prog_gnat version" >&5
17649 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17650 if test "${cf_cv_gnat_version+set}" = set; then
17651 echo $ECHO_N "(cached) $ECHO_C" >&6
17654 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17655 grep '[0-9].[0-9][0-9]*' |\
17656 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17659 echo "$as_me:17659: result: $cf_cv_gnat_version" >&5
17660 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17661 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17662 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17665 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17668 unset cf_cv_gnat_version
17669 unset ac_cv_path_cf_TEMP_gnat
17672 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17674 cf_cv_prog_gnat_correct=no
17676 cf_ada_make=gnatmake
17677 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17678 # gprconfig is newer than gnatmake; we can continue...
17681 rm -rf ./conftest* ./*~conftest*
17682 if mkdir conftest.src
17686 for cf_gprconfig in Ada C
17688 echo "$as_me:17688: checking for gprconfig name for $cf_gprconfig" >&5
17689 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17690 if test "$cf_gprconfig" = C
17692 for cf_gprconfig_param in \
17693 "$cf_gprconfig,,,,GNATGCC" \
17694 "$cf_gprconfig,,,,GCC" \
17697 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17698 test -n "$cf_gprconfig_value" && break
17701 cf_gprconfig_param=$cf_gprconfig
17702 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17704 if test -n "$cf_gprconfig_value"
17706 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17707 echo "$as_me:17707: result: $cf_gprconfig_value" >&5
17708 echo "${ECHO_T}$cf_gprconfig_value" >&6
17710 echo "$as_me:17710: result: missing" >&5
17711 echo "${ECHO_T}missing" >&6
17717 rm -rf ./conftest* ./*~conftest*
17720 if test "x$cf_ada_config" != "x#"
17723 echo "$as_me:17723: checking for gnat version" >&5
17724 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17725 if test "${cf_cv_gnat_version+set}" = set; then
17726 echo $ECHO_N "(cached) $ECHO_C" >&6
17729 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17730 grep '[0-9].[0-9][0-9]*' |\
17731 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17734 echo "$as_me:17734: result: $cf_cv_gnat_version" >&5
17735 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17736 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17738 case "$cf_cv_gnat_version" in
17739 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17740 cf_cv_prog_gnat_correct=yes
17743 { echo "$as_me:17743: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17744 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17745 cf_cv_prog_gnat_correct=no
17749 # Extract the first word of "m4", so it can be a program name with args.
17750 set dummy m4; ac_word=$2
17751 echo "$as_me:17751: checking for $ac_word" >&5
17752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17753 if test "${ac_cv_prog_M4_exists+set}" = set; then
17754 echo $ECHO_N "(cached) $ECHO_C" >&6
17756 if test -n "$M4_exists"; then
17757 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17759 ac_save_IFS=$IFS; IFS=$ac_path_separator
17761 for ac_dir in $ac_dummy; do
17763 test -z "$ac_dir" && ac_dir=.
17764 $as_executable_p "$ac_dir/$ac_word" || continue
17765 ac_cv_prog_M4_exists="yes"
17766 echo "$as_me:17766: found $ac_dir/$ac_word" >&5
17770 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17773 M4_exists=$ac_cv_prog_M4_exists
17774 if test -n "$M4_exists"; then
17775 echo "$as_me:17775: result: $M4_exists" >&5
17776 echo "${ECHO_T}$M4_exists" >&6
17778 echo "$as_me:17778: result: no" >&5
17779 echo "${ECHO_T}no" >&6
17782 if test "$ac_cv_prog_M4_exists" = no; then
17783 cf_cv_prog_gnat_correct=no
17784 { echo "$as_me:17784: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17785 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17787 if test "$cf_cv_prog_gnat_correct" = yes; then
17788 echo "$as_me:17788: checking if GNAT works" >&5
17789 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17791 rm -rf ./conftest* ./*~conftest*
17792 cat >>conftest.ads <<CF_EOF
17793 procedure conftest;
17795 cat >>conftest.adb <<CF_EOF
17798 procedure conftest is
17800 Text_IO.Put ("Hello World");
17802 GNAT.OS_Lib.OS_Exit (0);
17805 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17806 if ( ./conftest 1>&5 2>&1 ) ; then
17807 cf_cv_prog_gnat_correct=yes
17809 cf_cv_prog_gnat_correct=no
17812 cf_cv_prog_gnat_correct=no
17814 rm -rf ./conftest* ./*~conftest*
17816 echo "$as_me:17816: result: $cf_cv_prog_gnat_correct" >&5
17817 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17820 cf_cv_prog_gnat_correct=no
17824 if test "$cf_cv_prog_gnat_correct" = yes; then
17826 echo "$as_me:17826: checking optimization options for ADAFLAGS" >&5
17827 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17831 ADAFLAGS="$ADAFLAGS -g"
17837 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17839 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17843 echo "$as_me:17843: result: $ADAFLAGS" >&5
17844 echo "${ECHO_T}$ADAFLAGS" >&6
17846 echo "$as_me:17846: checking if GNATPREP supports -T option" >&5
17847 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17848 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17849 echo $ECHO_N "(cached) $ECHO_C" >&6
17852 cf_cv_gnatprep_opt_t=no
17853 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17856 echo "$as_me:17856: result: $cf_cv_gnatprep_opt_t" >&5
17857 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17858 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17860 echo "$as_me:17860: checking if GNAT supports generics" >&5
17861 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17862 case "$cf_cv_gnat_version" in
17863 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17864 cf_gnat_generics=yes
17867 cf_gnat_generics=no
17870 echo "$as_me:17870: result: $cf_gnat_generics" >&5
17871 echo "${ECHO_T}$cf_gnat_generics" >&6
17873 if test "$cf_gnat_generics" = yes
17875 cf_compile_generics=generics
17876 cf_generic_objects="\${GENOBJS}"
17878 cf_compile_generics=
17879 cf_generic_objects=
17882 echo "$as_me:17882: checking if GNAT supports SIGINT" >&5
17883 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17884 if test "${cf_cv_gnat_sigint+set}" = set; then
17885 echo $ECHO_N "(cached) $ECHO_C" >&6
17888 rm -rf ./conftest* ./*~conftest*
17889 cat >>conftest.ads <<CF_EOF
17890 with Ada.Interrupts.Names;
17892 package ConfTest is
17894 pragma Warnings (Off); -- the next pragma exists since 3.11p
17895 pragma Unreserve_All_Interrupts;
17896 pragma Warnings (On);
17898 protected Process is
17900 function Continue return Boolean;
17901 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17903 Done : Boolean := False;
17908 cat >>conftest.adb <<CF_EOF
17909 package body ConfTest is
17910 protected body Process is
17915 function Continue return Boolean is
17922 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17923 cf_cv_gnat_sigint=yes
17925 cf_cv_gnat_sigint=no
17927 rm -rf ./conftest* ./*~conftest*
17930 echo "$as_me:17930: result: $cf_cv_gnat_sigint" >&5
17931 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17933 if test "$cf_cv_gnat_sigint" = yes ; then
17936 USE_GNAT_SIGINT="#"
17939 cf_gnat_libraries=no
17940 cf_gnat_projects=no
17942 if test "$enable_gnat_projects" != no ; then
17943 echo "$as_me:17943: checking if GNAT supports project files" >&5
17944 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17945 case "$cf_cv_gnat_version" in
17949 case "$cf_cv_system_name" in
17953 rm -rf ./conftest* ./*~conftest*
17954 if mkdir conftest.src conftest.bin conftest.lib
17957 rm -rf ./conftest* ./*~conftest*
17958 cat >>library.gpr <<CF_EOF
17960 Kind := External ("LIB_KIND");
17961 for Library_Name use "ConfTest";
17962 for Object_Dir use ".";
17963 for Library_ALI_Dir use External("LIBRARY_DIR");
17964 for Library_Version use External ("SONAME");
17965 for Library_Kind use Kind;
17966 for Library_Dir use External("BUILD_DIR");
17967 Source_Dir := External ("SOURCE_DIR");
17968 for Source_Dirs use (Source_Dir);
17971 cat >>confpackage.ads <<CF_EOF
17972 package ConfPackage is
17973 procedure conftest;
17976 cat >>confpackage.adb <<CF_EOF
17978 package body ConfPackage is
17979 procedure conftest is
17981 Text_IO.Put ("Hello World");
17986 if ( "$cf_ada_make" $ADAFLAGS \
17988 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17989 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17990 -XSOURCE_DIR="`pwd`" \
17991 -XSONAME=libConfTest.so.1 \
17992 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17993 cf_gnat_projects=yes
17997 if test -f conftest.lib/confpackage.ali
17999 cf_gnat_libraries=yes
18001 rm -rf ./conftest* ./*~conftest*
18006 echo "$as_me:18006: result: $cf_gnat_projects" >&5
18007 echo "${ECHO_T}$cf_gnat_projects" >&6
18008 fi # enable_gnat_projects
18010 if test "$cf_gnat_projects" = yes
18012 echo "$as_me:18012: checking if GNAT supports libraries" >&5
18013 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18014 echo "$as_me:18014: result: $cf_gnat_libraries" >&5
18015 echo "${ECHO_T}$cf_gnat_libraries" >&6
18018 USE_OLD_MAKERULES=""
18019 USE_GNAT_PROJECTS="#"
18020 USE_GNAT_MAKE_GPR="#"
18021 USE_GNAT_GPRBUILD="#"
18023 if test "$cf_gnat_projects" = yes
18025 USE_OLD_MAKERULES="#"
18026 USE_GNAT_PROJECTS=""
18027 if test "$cf_cv_VERSION_GPRBUILD" != no
18029 USE_GNAT_GPRBUILD=""
18030 elif test "$cf_cv_VERSION_GNATMAKE" != no
18032 USE_GNAT_MAKE_GPR=""
18034 { echo "$as_me:18034: WARNING: use old makefile rules since tools are missing" >&5
18035 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
18039 if test "$cf_gnat_libraries" = yes
18041 USE_GNAT_LIBRARIES=""
18043 USE_GNAT_LIBRARIES="#"
18046 echo "$as_me:18046: checking for ada-compiler" >&5
18047 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18049 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18050 if test "${with_ada_compiler+set}" = set; then
18051 withval="$with_ada_compiler"
18052 cf_ada_compiler=$withval
18054 cf_ada_compiler=gnatmake
18057 echo "$as_me:18057: result: $cf_ada_compiler" >&5
18058 echo "${ECHO_T}$cf_ada_compiler" >&6
18060 cf_ada_package=terminal_interface
18062 echo "$as_me:18062: checking for ada-include" >&5
18063 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18065 # Check whether --with-ada-include or --without-ada-include was given.
18066 if test "${with_ada_include+set}" = set; then
18067 withval="$with_ada_include"
18070 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18071 fi; if test -n "$prefix/share/ada/adainclude" ; then
18073 if test "x$prefix" != xNONE; then
18074 cf_path_syntax="$prefix"
18076 cf_path_syntax="$ac_default_prefix"
18079 case ".$withval" in
18080 (.\$\(*\)*|.\'*\'*)
18084 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18086 (.\$\{*prefix\}*|.\$\{*dir\}*)
18087 eval withval="$withval"
18088 case ".$withval" in
18090 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18095 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18098 { { echo "$as_me:18098: error: expected a pathname, not \"$withval\"" >&5
18099 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18100 { (exit 1); exit 1; }; }
18105 eval ADA_INCLUDE="$withval"
18107 echo "$as_me:18107: result: $ADA_INCLUDE" >&5
18108 echo "${ECHO_T}$ADA_INCLUDE" >&6
18110 echo "$as_me:18110: checking for ada-objects" >&5
18111 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18113 # Check whether --with-ada-objects or --without-ada-objects was given.
18114 if test "${with_ada_objects+set}" = set; then
18115 withval="$with_ada_objects"
18118 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18119 fi; if test -n "$prefix/lib/ada/adalib" ; then
18121 if test "x$prefix" != xNONE; then
18122 cf_path_syntax="$prefix"
18124 cf_path_syntax="$ac_default_prefix"
18127 case ".$withval" in
18128 (.\$\(*\)*|.\'*\'*)
18132 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
18134 (.\$\{*prefix\}*|.\$\{*dir\}*)
18135 eval withval="$withval"
18136 case ".$withval" in
18138 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18143 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
18146 { { echo "$as_me:18146: error: expected a pathname, not \"$withval\"" >&5
18147 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18148 { (exit 1); exit 1; }; }
18153 eval ADA_OBJECTS="$withval"
18155 echo "$as_me:18155: result: $ADA_OBJECTS" >&5
18156 echo "${ECHO_T}$ADA_OBJECTS" >&6
18158 echo "$as_me:18158: checking if an Ada95 shared-library should be built" >&5
18159 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18161 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18162 if test "${with_ada_sharedlib+set}" = set; then
18163 withval="$with_ada_sharedlib"
18164 with_ada_sharedlib=$withval
18166 with_ada_sharedlib=no
18168 echo "$as_me:18168: result: $with_ada_sharedlib" >&5
18169 echo "${ECHO_T}$with_ada_sharedlib" >&6
18171 if test "x$with_ada_sharedlib" != xno
18173 if test "x$cf_gnat_projects" != xyes
18175 { echo "$as_me:18175: WARNING: disabling shared-library since GNAT projects are not supported" >&5
18176 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
18177 with_ada_sharedlib=no
18181 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18182 MAKE_ADA_SHAREDLIB="#"
18184 if test "x$with_ada_sharedlib" != xno
18186 MAKE_ADA_SHAREDLIB=
18187 if test "x$with_ada_sharedlib" != xyes
18189 ADA_SHAREDLIB="$with_ada_sharedlib"
18193 # allow the Ada binding to be renamed
18195 echo "$as_me:18195: checking for ada-libname" >&5
18196 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
18198 # Check whether --with-ada-libname or --without-ada-libname was given.
18199 if test "${with_ada_libname+set}" = set; then
18200 withval="$with_ada_libname"
18201 ADA_LIBNAME=$withval
18203 ADA_LIBNAME=AdaCurses
18205 case "x$ADA_LIBNAME" in
18207 ADA_LIBNAME=AdaCurses
18211 echo "$as_me:18211: result: $ADA_LIBNAME" >&5
18212 echo "${ECHO_T}$ADA_LIBNAME" >&6
18215 { { echo "$as_me:18215: error: No usable Ada compiler found" >&5
18216 echo "$as_me: error: No usable Ada compiler found" >&2;}
18217 { (exit 1); exit 1; }; }
18220 { { echo "$as_me:18220: error: The Ada compiler is needed for this package" >&5
18221 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
18222 { (exit 1); exit 1; }; }
18225 ################################################################################
18232 ### Construct the list of include-directories to be generated
18234 if test "$srcdir" != "."; then
18235 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
18237 CPPFLAGS="-I../include $CPPFLAGS"
18238 if test "$srcdir" != "."; then
18239 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
18241 CPPFLAGS="-I. $CPPFLAGS"
18243 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18244 if test "$srcdir" != "."; then
18245 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18247 if test "$GCC" != yes; then
18248 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18249 elif test "$includedir" != "/usr/include"; then
18250 if test "$includedir" = '${prefix}/include' ; then
18251 if test x$prefix != x/usr ; then
18252 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18255 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18259 ### Build up pieces for makefile rules
18260 echo "$as_me:18260: checking default library suffix" >&5
18261 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18263 case $DFT_LWR_MODEL in
18264 (libtool) DFT_ARG_SUFFIX='' ;;
18265 (normal) DFT_ARG_SUFFIX='' ;;
18266 (debug) DFT_ARG_SUFFIX='_g' ;;
18267 (profile) DFT_ARG_SUFFIX='_p' ;;
18268 (shared) DFT_ARG_SUFFIX='' ;;
18270 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18271 echo "$as_me:18271: result: $DFT_ARG_SUFFIX" >&5
18272 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18274 echo "$as_me:18274: checking default library-dependency suffix" >&5
18275 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18277 case X$DFT_LWR_MODEL in
18279 DFT_LIB_SUFFIX='.la'
18280 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18283 case "$cf_cv_system_name" in
18285 DFT_LIB_SUFFIX='_g.lib'
18288 DFT_LIB_SUFFIX='_g.a'
18291 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18294 case "$cf_cv_system_name" in
18296 DFT_LIB_SUFFIX='_p.lib'
18299 DFT_LIB_SUFFIX='_p.a'
18302 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18305 case "$cf_cv_system_name" in
18307 DFT_LIB_SUFFIX='.so'
18308 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18311 DFT_LIB_SUFFIX='.dll'
18312 DFT_DEP_SUFFIX='.dll.lib'
18314 (cygwin*|msys*|mingw*)
18315 DFT_LIB_SUFFIX='.dll'
18316 DFT_DEP_SUFFIX='.dll.a'
18319 DFT_LIB_SUFFIX='.dylib'
18320 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18325 DFT_LIB_SUFFIX='.so'
18326 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18329 DFT_LIB_SUFFIX='.sl'
18330 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18335 DFT_LIB_SUFFIX='.so'
18336 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18343 DFT_LIB_SUFFIX='.lib'
18346 DFT_LIB_SUFFIX='.a'
18349 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18352 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
18354 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
18355 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
18357 echo "$as_me:18357: result: $DFT_DEP_SUFFIX" >&5
18358 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18360 echo "$as_me:18360: checking default object directory" >&5
18361 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18363 case $DFT_LWR_MODEL in
18364 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
18365 (normal) DFT_OBJ_SUBDIR='objects' ;;
18366 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
18367 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
18369 case "$cf_cv_system_name" in
18371 DFT_OBJ_SUBDIR='objects' ;;
18373 DFT_OBJ_SUBDIR='obj_s' ;;
18376 echo "$as_me:18376: result: $DFT_OBJ_SUBDIR" >&5
18377 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18379 ### Set up low-level terminfo dependencies for makefiles.
18381 if test "$DFT_LWR_MODEL" = shared ; then
18382 case $cf_cv_system_name in
18384 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18387 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
18392 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
18394 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
18396 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
18398 ### Construct the list of subdirectories for which we'll customize makefiles
18399 ### with the appropriate compile-rules.
18401 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
18403 cat >>confdefs.h <<EOF
18404 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18407 ################################################################################
18413 NCURSES_SHLIB2="sh -c"
18415 ADA_SUBDIRS="include gen src doc"
18416 if test "x$cf_with_tests" != "xno" ; then
18417 ADA_SUBDIRS="$ADA_SUBDIRS samples"
18419 for cf_dir in $ADA_SUBDIRS
18421 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18428 # match layout used by make-tar.sh
18429 ADAHTML_DIR=../doc/ada
18431 if test "x$cross_compiling" = xyes ; then
18432 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
18434 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
18437 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"
18438 ac_config_commands="$ac_config_commands default"
18439 cat >confcache <<\_ACEOF
18440 # This file is a shell script that caches the results of configure
18441 # tests run on this system so they can be shared between configure
18442 # scripts and configure runs, see configure's option --config-cache.
18443 # It is not useful on other systems. If it contains results you don't
18444 # want to keep, you may remove or edit it.
18446 # config.status only pays attention to the cache file if you give it
18447 # the --recheck option to rerun configure.
18449 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18450 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18451 # following values.
18455 # The following way of writing the cache mishandles newlines in values,
18456 # but we know of no workaround that is simple, portable, and efficient.
18457 # So, don't put newlines in cache variables' values.
18458 # Ultrix sh set writes to stderr and can't be redirected directly,
18459 # and sets the high bit in the cache file unless we assign to the vars.
18462 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18464 # `set' does not quote correctly, so add quotes (double-quote
18465 # substitution turns \\\\ into \\, and sed turns \\ into \).
18468 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18471 # `set' quotes correctly as required by POSIX, so do not add quotes.
18473 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18480 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18482 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18484 if cmp -s $cache_file confcache; then :; else
18485 if test -w $cache_file; then
18486 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18487 cat confcache >$cache_file
18489 echo "not updating unwritable cache $cache_file"
18494 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18495 # Let make expand exec_prefix.
18496 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18498 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18499 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18500 # trailing colons and then remove the whole line if VPATH becomes empty
18501 # (actually we leave an empty line to preserve line numbers).
18502 if test "x$srcdir" = x.; then
18503 ac_vpsub='/^[ ]*VPATH[ ]*=/{
18504 s/:*\$(srcdir):*/:/;
18505 s/:*\${srcdir}:*/:/;
18507 s/^\([^=]*=[ ]*\):*/\1/;
18513 DEFS=-DHAVE_CONFIG_H
18515 : "${CONFIG_STATUS=./config.status}"
18516 ac_clean_files_save=$ac_clean_files
18517 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18518 { echo "$as_me:18518: creating $CONFIG_STATUS" >&5
18519 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18520 cat >"$CONFIG_STATUS" <<_ACEOF
18522 # Generated automatically by configure.
18523 # Run this file to recreate the current configuration.
18524 # Compiler output produced by configure, useful for debugging
18525 # configure, is in config.log if it exists.
18527 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
18530 SHELL=\${CONFIG_SHELL-$SHELL}
18531 ac_cs_invocation="\$0 \$@"
18533 CLICOLOR_FORCE= GREP_OPTIONS=
18534 unset CLICOLOR_FORCE GREP_OPTIONS
18537 cat >>"$CONFIG_STATUS" <<\_ACEOF
18538 # Be Bourne compatible
18539 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18542 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18546 # Name of the executable.
18547 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18549 if expr a : '\(a\)' >/dev/null 2>&1; then
18555 rm -f conf$$ conf$$.exe conf$$.file
18557 if ln -s conf$$.file conf$$ 2>/dev/null; then
18558 # We could just check for DJGPP; but this test a) works b) is more generic
18559 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18560 if test -f conf$$.exe; then
18561 # Don't use ln at all; we don't have any links
18566 elif ln conf$$.file conf$$ 2>/dev/null; then
18571 rm -f conf$$ conf$$.exe conf$$.file
18573 as_executable_p="test -f"
18575 # Support unset when possible.
18576 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18583 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18584 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18585 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18586 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18587 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18588 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18589 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18590 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18593 # We need space, tab and new line, in precisely that order.
18599 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18605 # Files that config.status was made for.
18606 if test -n "$ac_config_files"; then
18607 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18610 if test -n "$ac_config_headers"; then
18611 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18614 if test -n "$ac_config_links"; then
18615 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18618 if test -n "$ac_config_commands"; then
18619 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18622 cat >>"$CONFIG_STATUS" <<\EOF
18625 \`$as_me' instantiates files from templates according to the
18626 current configuration.
18628 Usage: $0 [OPTIONS] [FILE]...
18630 -h, --help print this help, then exit
18631 -V, --version print version number, then exit
18632 -d, --debug don't remove temporary files
18633 --recheck update $as_me by reconfiguring in the same conditions
18634 --file=FILE[:TEMPLATE]
18635 instantiate the configuration file FILE
18636 --header=FILE[:TEMPLATE]
18637 instantiate the configuration header FILE
18639 Configuration files:
18642 Configuration headers:
18645 Configuration commands:
18648 Report bugs to <dickey@invisible-island.net>."
18651 cat >>"$CONFIG_STATUS" <<EOF
18654 configured by $0, generated by GNU Autoconf 2.52.20230903,
18655 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18657 Copyright 2003-2022,2023 Thomas E. Dickey
18658 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18659 Free Software Foundation, Inc.
18660 This config.status script is free software; the Free Software Foundation
18661 gives unlimited permission to copy, distribute and modify it."
18666 cat >>"$CONFIG_STATUS" <<\EOF
18667 # If no file are specified by the user, then we need to provide default
18668 # value. By we need to know if files were specified by the user.
18674 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18675 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18677 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18681 *) # This is not an option, so the user has probably given explicit
18683 ac_need_defaults=false;;
18687 # Handling of the options.
18689 cat >>"$CONFIG_STATUS" <<EOF
18690 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18691 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18692 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18694 cat >>"$CONFIG_STATUS" <<\EOF
18695 --version | --vers* | -V )
18696 echo "$ac_cs_version"; exit 0 ;;
18698 # Conflict between --help and --header
18699 { { echo "$as_me:18699: error: ambiguous option: $1
18700 Try \`$0 --help' for more information." >&5
18701 echo "$as_me: error: ambiguous option: $1
18702 Try \`$0 --help' for more information." >&2;}
18703 { (exit 1); exit 1; }; };;
18704 --help | --hel | -h )
18705 echo "$ac_cs_usage"; exit 0 ;;
18706 --debug | --d* | -d )
18708 --file | --fil | --fi | --f )
18710 CONFIG_FILES="$CONFIG_FILES $1"
18711 ac_need_defaults=false;;
18712 --header | --heade | --head | --hea )
18714 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18715 ac_need_defaults=false;;
18717 # This is an error.
18718 -*) { { echo "$as_me:18718: error: unrecognized option: $1
18719 Try \`$0 --help' for more information." >&5
18720 echo "$as_me: error: unrecognized option: $1
18721 Try \`$0 --help' for more information." >&2;}
18722 { (exit 1); exit 1; }; } ;;
18724 *) ac_config_targets="$ac_config_targets $1" ;;
18733 ## ----------------------- ##
18734 ## Running config.status. ##
18735 ## ----------------------- ##
18737 This file was extended by $as_me 2.52.20230903, executed with
18738 CONFIG_FILES = $CONFIG_FILES
18739 CONFIG_HEADERS = $CONFIG_HEADERS
18740 CONFIG_LINKS = $CONFIG_LINKS
18741 CONFIG_COMMANDS = $CONFIG_COMMANDS
18742 > "$ac_cs_invocation"
18743 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18748 cat >>"$CONFIG_STATUS" <<EOF
18750 # INIT-COMMANDS section.
18753 ### Special initialization commands, used to pass information from the
18754 ### configuration-run into config.status
18757 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18758 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18759 LIB_NAME="$LIB_NAME"
18760 LIB_PREFIX="$LIB_PREFIX"
18761 LIB_SUFFIX="$LIB_SUFFIX"
18763 NCURSES_MAJOR="$NCURSES_MAJOR"
18764 NCURSES_MINOR="$NCURSES_MINOR"
18765 NCURSES_PATCH="$NCURSES_PATCH"
18767 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18768 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18769 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18770 cf_cv_abi_version="$cf_cv_abi_version"
18771 cf_cv_rel_version="$cf_cv_rel_version"
18772 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18773 cf_cv_shared_soname='$cf_cv_shared_soname'
18774 cf_cv_shlib_version="$cf_cv_shlib_version"
18775 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18776 cf_cv_system_name="$cf_cv_system_name"
18782 cat >>"$CONFIG_STATUS" <<\EOF
18783 for ac_config_target in $ac_config_targets
18785 case "$ac_config_target" in
18786 # Handling of arguments.
18787 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18788 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18789 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18790 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18791 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18792 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18793 *) { { echo "$as_me:18793: error: invalid argument: $ac_config_target" >&5
18794 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18795 { (exit 1); exit 1; }; };;
18799 # If the user did not use the arguments to specify the items to instantiate,
18800 # then the envvar interface is used. Set only those that are not.
18801 # We use the long form for the default assignment because of an extremely
18802 # bizarre bug on SunOS 4.1.3.
18803 if "$ac_need_defaults"; then
18804 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18805 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18806 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18809 # Create a temporary directory, and hook for its removal unless debugging.
18812 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18813 trap '{ (exit 1); exit 1; }' 1 2 13 15
18816 # Create a (secure) tmp directory for tmp files.
18819 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18820 test -n "$tmp" && test -d "$tmp"
18823 tmp=$TMPDIR/cs$$-$RANDOM
18824 (umask 077 && mkdir "$tmp")
18827 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18828 { (exit 1); exit 1; }
18833 cat >>"$CONFIG_STATUS" <<EOF
18836 # CONFIG_FILES section.
18839 # No need to generate the scripts if there are no CONFIG_FILES.
18840 # This happens for instance when ./config.status config.h
18841 if test -n "\$CONFIG_FILES"; then
18842 # Protect against being on the right side of a sed subst in config.status.
18843 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18844 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
18845 s,@SHELL@,$SHELL,;t t
18846 s,@exec_prefix@,$exec_prefix,;t t
18847 s,@prefix@,$prefix,;t t
18848 s,@program_transform_name@,$program_transform_name,;t t
18849 s,@bindir@,$bindir,;t t
18850 s,@sbindir@,$sbindir,;t t
18851 s,@libexecdir@,$libexecdir,;t t
18852 s,@datarootdir@,$datarootdir,;t t
18853 s,@datadir@,$datadir,;t t
18854 s,@sysconfdir@,$sysconfdir,;t t
18855 s,@sharedstatedir@,$sharedstatedir,;t t
18856 s,@localstatedir@,$localstatedir,;t t
18857 s,@runstatedir@,$runstatedir,;t t
18858 s,@libdir@,$libdir,;t t
18859 s,@includedir@,$includedir,;t t
18860 s,@oldincludedir@,$oldincludedir,;t t
18861 s,@infodir@,$infodir,;t t
18862 s,@mandir@,$mandir,;t t
18863 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18864 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18865 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18866 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18867 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18868 s,@build_alias@,$build_alias,;t t
18869 s,@host_alias@,$host_alias,;t t
18870 s,@target_alias@,$target_alias,;t t
18871 s,@ECHO_C@,$ECHO_C,;t t
18872 s,@ECHO_N@,$ECHO_N,;t t
18873 s,@ECHO_T@,$ECHO_T,;t t
18874 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18875 s,@DEFS@,$DEFS,;t t
18876 s,@LIBS@,$LIBS,;t t
18877 s,@PACKAGE@,$PACKAGE,;t t
18878 s,@top_builddir@,$top_builddir,;t t
18879 s,@build@,$build,;t t
18880 s,@build_cpu@,$build_cpu,;t t
18881 s,@build_vendor@,$build_vendor,;t t
18882 s,@build_os@,$build_os,;t t
18883 s,@host@,$host,;t t
18884 s,@host_cpu@,$host_cpu,;t t
18885 s,@host_vendor@,$host_vendor,;t t
18886 s,@host_os@,$host_os,;t t
18887 s,@target@,$target,;t t
18888 s,@target_cpu@,$target_cpu,;t t
18889 s,@target_vendor@,$target_vendor,;t t
18890 s,@target_os@,$target_os,;t t
18891 s,@GREP@,$GREP,;t t
18892 s,@FGREP@,$FGREP,;t t
18894 s,@CFLAGS@,$CFLAGS,;t t
18895 s,@LDFLAGS@,$LDFLAGS,;t t
18896 s,@CPPFLAGS@,$CPPFLAGS,;t t
18897 s,@ac_ct_CC@,$ac_ct_CC,;t t
18898 s,@EXEEXT@,$EXEEXT,;t t
18899 s,@OBJEXT@,$OBJEXT,;t t
18900 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18902 s,@EGREP@,$EGREP,;t t
18904 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18905 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18906 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18907 s,@LN_S@,$LN_S,;t t
18908 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18909 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18910 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18911 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18912 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18913 s,@SET_MAKE@,$SET_MAKE,;t t
18914 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18915 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18916 s,@CTAGS@,$CTAGS,;t t
18917 s,@ETAGS@,$ETAGS,;t t
18918 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18919 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18920 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18921 s,@RANLIB@,$RANLIB,;t t
18922 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18924 s,@ac_ct_LD@,$ac_ct_LD,;t t
18926 s,@ac_ct_AR@,$ac_ct_AR,;t t
18927 s,@ARFLAGS@,$ARFLAGS,;t t
18928 s,@DESTDIR@,$DESTDIR,;t t
18929 s,@BUILD_CC@,$BUILD_CC,;t t
18930 s,@BUILD_CPP@,$BUILD_CPP,;t t
18931 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18932 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18933 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18934 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18935 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18936 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18937 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18938 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18939 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18940 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18941 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18942 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18943 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18944 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18945 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18946 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18947 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18948 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18949 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18950 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18951 s,@CC_G_OPT@,$CC_G_OPT,;t t
18952 s,@LD_MODEL@,$LD_MODEL,;t t
18953 s,@shlibdir@,$shlibdir,;t t
18954 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18955 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18956 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18957 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18958 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18959 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18960 s,@LINK_PROGS@,$LINK_PROGS,;t t
18961 s,@LINK_TESTS@,$LINK_TESTS,;t t
18962 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18963 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18964 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18965 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18966 s,@RPATH_LIST@,$RPATH_LIST,;t t
18967 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18968 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18969 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18970 s,@PTHREAD@,$PTHREAD,;t t
18971 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18972 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18973 s,@ECHO_LT@,$ECHO_LT,;t t
18974 s,@ECHO_LD@,$ECHO_LD,;t t
18975 s,@RULE_CC@,$RULE_CC,;t t
18976 s,@SHOW_CC@,$SHOW_CC,;t t
18977 s,@ECHO_CC@,$ECHO_CC,;t t
18978 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18979 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18980 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18981 s,@ADAFLAGS@,$ADAFLAGS,;t t
18982 s,@ADA_TRACE@,$ADA_TRACE,;t t
18983 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18984 s,@M4_exists@,$M4_exists,;t t
18985 s,@cf_ada_make@,$cf_ada_make,;t t
18986 s,@cf_ada_config@,$cf_ada_config,;t t
18987 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18988 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18989 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18990 s,@cf_compile_generics@,$cf_compile_generics,;t t
18991 s,@cf_generic_objects@,$cf_generic_objects,;t t
18992 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18993 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18994 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18995 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18996 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18997 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18998 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18999 s,@cf_ada_package@,$cf_ada_package,;t t
19000 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19001 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19002 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19003 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19004 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
19005 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
19006 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
19007 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19008 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19009 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19010 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19011 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
19012 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
19013 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
19014 s,@TEST_ARG2@,$TEST_ARG2,;t t
19015 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19016 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19017 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19018 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19019 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
19020 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
19021 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
19026 cat >>"$CONFIG_STATUS" <<\EOF
19027 # Split the substitutions into bite-sized pieces for seds with
19028 # small command number limits, like on Digital OSF/1 and HP-UX.
19029 ac_max_sed_lines=48
19030 ac_sed_frag=1 # Number of current file.
19031 ac_beg=1 # First line for current file.
19032 ac_end=$ac_max_sed_lines # Line after last line for current file.
19035 while "$ac_more_lines"; do
19036 if test "$ac_beg" -gt 1; then
19037 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19039 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
19041 if test ! -s "$tmp"/subs.frag; then
19042 ac_more_lines=false
19044 # The purpose of the label and of the branching condition is to
19045 # speed up the sed processing (if there are no `@' at all, there
19046 # is no need to browse any of the substitutions).
19047 # These are the two extra sed commands mentioned above.
19049 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
19050 # It is possible to make a multiline substitution using escaped newlines.
19051 # Ensure that we do not split the substitution between script fragments.
19053 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
19054 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
19055 if test -s "$tmp"/subs.next; then
19056 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
19057 if test ! -s "$tmp"/subs.edit; then
19058 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
19059 if test ! -s "$tmp"/subs.edit; then
19060 if test "$ac_beg" -gt 1; then
19061 ac_end=`expr "$ac_end" - 1`
19068 if test -z "$ac_sed_cmds"; then
19069 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19071 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
19073 ac_sed_frag=`expr "$ac_sed_frag" + 1`
19075 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
19078 if test -z "$ac_sed_cmds"; then
19081 fi # test -n "$CONFIG_FILES"
19084 cat >>"$CONFIG_STATUS" <<\EOF
19085 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19086 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19088 - | *:- | *:-:* ) # input from stdin
19090 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19091 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19092 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19093 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19094 * ) ac_file_in=$ac_file.in ;;
19097 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19098 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19099 X"$ac_file" : 'X\(//\)[^/]' \| \
19100 X"$ac_file" : 'X\(//\)$' \| \
19101 X"$ac_file" : 'X\(/\)' \| \
19102 . : '\(.\)' 2>/dev/null ||
19104 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19105 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19106 /^X\(\/\/\)$/{ s//\1/; q; }
19107 /^X\(\/\).*/{ s//\1/; q; }
19109 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19110 { case "$ac_dir" in
19111 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19115 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19116 case $as_mkdir_dir in
19117 # Skip DOS drivespec
19118 ?:) as_incr_dir=$as_mkdir_dir ;;
19120 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19121 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19126 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
19127 # A "../" for each directory in $ac_dir_suffix.
19128 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19130 ac_dir_suffix= ac_dots=
19135 if test -z "$ac_dots"; then
19138 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
19140 [\\/]* | ?:[\\/]* )
19141 ac_srcdir="$srcdir$ac_dir_suffix";
19142 ac_top_srcdir="$srcdir" ;;
19143 *) # Relative path.
19144 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
19145 ac_top_srcdir="$ac_dots$srcdir" ;;
19149 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19150 *) ac_INSTALL=$ac_dots$INSTALL ;;
19153 if test x"$ac_file" != x-; then
19154 { echo "$as_me:19154: creating $ac_file" >&5
19155 echo "$as_me: creating $ac_file" >&6;}
19158 # Let's still pretend it is `configure' which instantiates (i.e., don't
19159 # use $as_me), people would be surprised to read:
19160 # /* config.h. Generated automatically by config.status. */
19161 configure_input="Generated automatically from `echo $ac_file_in |
19162 sed 's,.*/,,'` by configure."
19164 # First look for the input files in the build tree, otherwise in the
19166 ac_file_inputs=`IFS=:
19167 for f in $ac_file_in; do
19169 -) echo "$tmp"/stdin ;;
19171 # Absolute (can't be DOS-style, as IFS=:)
19172 test -f "$f" || { { echo "$as_me:19172: error: cannot find input file: $f" >&5
19173 echo "$as_me: error: cannot find input file: $f" >&2;}
19174 { (exit 1); exit 1; }; }
19177 if test -f "$f"; then
19180 elif test -f "$srcdir/$f"; then
19185 { { echo "$as_me:19185: error: cannot find input file: $f" >&5
19186 echo "$as_me: error: cannot find input file: $f" >&2;}
19187 { (exit 1); exit 1; }; }
19190 done` || { (exit 1); exit 1; }
19192 cat >>"$CONFIG_STATUS" <<\EOF
19193 ac_warn_datarootdir=no
19194 if test x"$ac_file" != x-; then
19195 for ac_item in $ac_file_inputs
19197 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
19198 if test -n "$ac_seen"; then
19199 ac_used=`grep '@datarootdir@' "$ac_item"`
19200 if test -z "$ac_used"; then
19201 { echo "$as_me:19201: WARNING: datarootdir was used implicitly but not set:
19203 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
19205 ac_warn_datarootdir=yes
19208 ac_seen=`grep '${datarootdir}' "$ac_item"`
19209 if test -n "$ac_seen"; then
19210 { echo "$as_me:19210: WARNING: datarootdir was used explicitly but not set:
19212 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
19214 ac_warn_datarootdir=yes
19219 if test "x$ac_warn_datarootdir" = xyes; then
19220 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
19224 cat >>"$CONFIG_STATUS" <<EOF
19228 cat >>"$CONFIG_STATUS" <<\EOF
19230 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19231 s,@configure_input@,$configure_input,;t t
19232 s,@srcdir@,$ac_srcdir,;t t
19233 s,@top_srcdir@,$ac_top_srcdir,;t t
19234 s,@INSTALL@,$ac_INSTALL,;t t
19235 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
19238 test -n "${FGREP}" || FGREP="grep -F"
19239 test -n "${EGREP}" || EGREP="grep -E"
19240 cat >>"$CONFIG_STATUS" <<EOF
19241 test -n "\${FGREP}" || FGREP="$FGREP"
19242 test -n "\${EGREP}" || EGREP="$EGREP"
19244 cat >>"$CONFIG_STATUS" <<\EOF
19245 if test x"$ac_file" != x-; then
19246 cp "$tmp/out" "$ac_file"
19248 for ac_name in prefix exec_prefix datarootdir
19250 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
19251 if test -n "$ac_seen"; then
19252 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
19253 if test -z "$ac_init"; then
19254 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
19255 { echo "$as_me:19255: WARNING: Variable $ac_name is used but was not set:
19257 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
19262 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
19263 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
19264 if test -s "$tmp"/out; then
19265 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
19266 { echo "$as_me:19266: WARNING: Some variables may not be substituted:
19268 echo "$as_me: WARNING: Some variables may not be substituted:
19278 cat >>"$CONFIG_STATUS" <<\EOF
19281 # CONFIG_HEADER section.
19284 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19285 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19287 # ac_d sets the value in "#define NAME VALUE" lines.
19288 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19289 ac_dB='[ ].*$,\1#\2'
19292 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19293 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19294 ac_iB='\([ ]\),\1#\2define\3'
19297 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19298 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
19299 ac_uB='$,\1#\2define\3'
19303 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19304 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19306 - | *:- | *:-:* ) # input from stdin
19308 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19309 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19310 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19311 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19312 * ) ac_file_in=$ac_file.in ;;
19315 test x"$ac_file" != x- && { echo "$as_me:19315: creating $ac_file" >&5
19316 echo "$as_me: creating $ac_file" >&6;}
19318 # First look for the input files in the build tree, otherwise in the
19320 ac_file_inputs=`IFS=:
19321 for f in $ac_file_in; do
19323 -) echo "$tmp"/stdin ;;
19325 # Absolute (can't be DOS-style, as IFS=:)
19326 test -f "$f" || { { echo "$as_me:19326: error: cannot find input file: $f" >&5
19327 echo "$as_me: error: cannot find input file: $f" >&2;}
19328 { (exit 1); exit 1; }; }
19331 if test -f "$f"; then
19334 elif test -f "$srcdir/$f"; then
19339 { { echo "$as_me:19339: error: cannot find input file: $f" >&5
19340 echo "$as_me: error: cannot find input file: $f" >&2;}
19341 { (exit 1); exit 1; }; }
19344 done` || { (exit 1); exit 1; }
19345 # Remove the trailing spaces.
19346 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
19350 # Transform confdefs.h into a list of #define's. We won't use it as a sed
19351 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
19352 # be either 'cat' or 'sort'.
19353 cat confdefs.h | uniq >conftest.vals
19355 # Break up conftest.vals because some shells have a limit on
19356 # the size of here documents, and old seds have small limits too.
19358 rm -f conftest.tail
19359 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
19360 while grep . conftest.vals >/dev/null
19362 # Write chunks of a limited-size here document to conftest.frag.
19363 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
19364 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
19365 echo 'CEOF' >> "$CONFIG_STATUS"
19366 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
19367 rm -f conftest.vals
19368 mv conftest.tail conftest.vals
19370 rm -f conftest.vals
19372 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19374 echo ' cat >> conftest.edit <<CEOF
19375 /@DEFS@/r conftest.frag
19378 sed -f conftest.edit "$tmp"/in > "$tmp"/out
19380 mv "$tmp"/out "$tmp"/in
19381 rm -f conftest.edit conftest.frag
19382 ' >> "$CONFIG_STATUS"
19384 cat >>"$CONFIG_STATUS" <<\EOF
19385 # Let's still pretend it is `configure' which instantiates (i.e., don't
19386 # use $as_me), people would be surprised to read:
19387 # /* config.h. Generated automatically by config.status. */
19388 if test x"$ac_file" = x-; then
19389 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
19391 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
19393 cat "$tmp"/in >>"$tmp"/config.h
19395 if test x"$ac_file" != x-; then
19396 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
19397 { echo "$as_me:19397: $ac_file is unchanged" >&5
19398 echo "$as_me: $ac_file is unchanged" >&6;}
19400 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19401 X"$ac_file" : 'X\(//\)[^/]' \| \
19402 X"$ac_file" : 'X\(//\)$' \| \
19403 X"$ac_file" : 'X\(/\)' \| \
19404 . : '\(.\)' 2>/dev/null ||
19406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19407 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19408 /^X\(\/\/\)$/{ s//\1/; q; }
19409 /^X\(\/\).*/{ s//\1/; q; }
19411 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19412 { case "$ac_dir" in
19413 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19417 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19418 case $as_mkdir_dir in
19419 # Skip DOS drivespec
19420 ?:) as_incr_dir=$as_mkdir_dir ;;
19422 as_incr_dir=$as_incr_dir/$as_mkdir_dir
19423 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19430 mv "$tmp/config.h" "$ac_file"
19433 cat "$tmp"/config.h
19434 rm -f "$tmp"/config.h
19438 cat >>"$CONFIG_STATUS" <<\EOF
19440 # CONFIG_COMMANDS section.
19442 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19443 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19444 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19448 $AWK -v PACKAGE=$PACKAGE -f $srcdir/mk-pkg.awk </dev/null >> Makefile
19449 if test -z "$USE_OLD_MAKERULES" ; then
19450 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
19457 cat >>"$CONFIG_STATUS" <<\EOF
19459 { (exit 0); exit 0; }
19461 chmod +x "$CONFIG_STATUS"
19462 ac_clean_files=$ac_clean_files_save
19464 # configure is writing to config.log, and then calls config.status.
19465 # config.status does its own redirection, appending to config.log.
19466 # Unfortunately, on DOS this fails, as config.log is still kept open
19467 # by configure, so config.status won't be able to write to it; its
19468 # output is simply discarded. So we exec the FD to /dev/null,
19469 # effectively closing config.log, so it can be properly (re)opened and
19470 # appended to by config.status. When coming back to configure, we
19471 # need to make the FD available again.
19472 if test "$no_create" != yes; then
19475 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
19477 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19478 # would make configure fail if this is the last instruction.
19479 "$ac_cs_success" || { (exit 1); exit 1; }
19481 ${MAKE:-make} preinstall