2 # From configure.in Revision: 1.82 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
6 # Copyright 2003-2020,2021 Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
36 if expr a : '\(a\)' >/dev/null 2>&1; then
42 rm -f conf$$ conf$$.exe conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45 # We could just check for DJGPP; but this test a) works b) is more generic
46 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47 if test -f conf$$.exe; then
48 # Don't use ln at all; we don't have any links
53 elif ln conf$$.file conf$$ 2>/dev/null; then
58 rm -f conf$$ conf$$.exe conf$$.file
60 as_executable_p="test -f"
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
80 # We need space, tab and new line, in precisely that order.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
98 ac_default_prefix=/usr/local
103 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete. It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
110 ac_unique_file="gen/gen.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
115 # include <sys/types.h>
118 # include <sys/stat.h>
129 # if !STDC_HEADERS && HAVE_MEMORY_H
135 # include <strings.h>
138 # include <inttypes.h>
148 # Initialize some variables set by options.
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
160 program_transform_name=s,x,x,
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
188 # Identity of this package.
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
205 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207 # Accept the important Cygnus configure options, so we can diagnose typos.
211 -bindir | --bindir | --bindi | --bind | --bin | --bi)
213 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
216 -build | --build | --buil | --bui | --bu)
217 ac_prev=build_alias ;;
218 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219 build_alias=$ac_optarg ;;
221 -cache-file | --cache-file | --cache-fil | --cache-fi \
222 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223 ac_prev=cache_file ;;
224 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226 cache_file=$ac_optarg ;;
229 cache_file=config.cache ;;
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235 datadir=$ac_optarg ;;
237 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238 | --dataroo | --dataro | --datar)
239 ac_prev=datarootdir ;;
240 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242 datarootdir=$ac_optarg ;;
244 -disable-* | --disable-*)
245 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246 # Reject names that are not valid shell variable names.
247 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249 { (exit 1); exit 1; }; }
250 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251 eval "enable_$ac_feature=no" ;;
253 -enable-* | --enable-*)
254 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255 # Reject names that are not valid shell variable names.
256 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258 { (exit 1); exit 1; }; }
259 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
264 eval "enable_$ac_feature='$ac_optarg'" ;;
266 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268 | --exec | --exe | --ex)
269 ac_prev=exec_prefix ;;
270 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272 | --exec=* | --exe=* | --ex=*)
273 exec_prefix=$ac_optarg ;;
275 -gas | --gas | --ga | --g)
276 # Obsolete; use --with-gas.
279 -help | --help | --hel | --he | -h)
281 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282 ac_init_help=recursive ;;
283 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284 ac_init_help=short ;;
286 -host | --host | --hos | --ho)
287 ac_prev=host_alias ;;
288 -host=* | --host=* | --hos=* | --ho=*)
289 host_alias=$ac_optarg ;;
291 -includedir | --includedir | --includedi | --included | --include \
292 | --includ | --inclu | --incl | --inc)
293 ac_prev=includedir ;;
294 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295 | --includ=* | --inclu=* | --incl=* | --inc=*)
296 includedir=$ac_optarg ;;
298 -infodir | --infodir | --infodi | --infod | --info | --inf)
300 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301 infodir=$ac_optarg ;;
303 -libdir | --libdir | --libdi | --libd)
305 -libdir=* | --libdir=* | --libdi=* | --libd=*)
308 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309 | --libexe | --libex | --libe)
310 ac_prev=libexecdir ;;
311 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312 | --libexe=* | --libex=* | --libe=*)
313 libexecdir=$ac_optarg ;;
315 -localstatedir | --localstatedir | --localstatedi | --localstated \
316 | --localstate | --localstat | --localsta | --localst \
317 | --locals | --local | --loca | --loc | --lo)
318 ac_prev=localstatedir ;;
319 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322 localstatedir=$ac_optarg ;;
324 -runstatedir | --runstatedir | --runstatedi | --runstated \
325 | --runstate | --runstat | --runsta | --runst \
326 | --runs | --run | --ru)
327 ac_prev=runstatedir ;;
328 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330 | --runs=* | --run=* | --ru=*)
331 runstatedir=$ac_optarg ;;
333 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
339 # Obsolete; use --without-fp.
342 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
346 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352 | --oldin | --oldi | --old | --ol | --o)
353 ac_prev=oldincludedir ;;
354 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357 oldincludedir=$ac_optarg ;;
359 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 -program-prefix | --program-prefix | --program-prefi | --program-pref \
365 | --program-pre | --program-pr | --program-p)
366 ac_prev=program_prefix ;;
367 -program-prefix=* | --program-prefix=* | --program-prefi=* \
368 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369 program_prefix=$ac_optarg ;;
371 -program-suffix | --program-suffix | --program-suffi | --program-suff \
372 | --program-suf | --program-su | --program-s)
373 ac_prev=program_suffix ;;
374 -program-suffix=* | --program-suffix=* | --program-suffi=* \
375 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376 program_suffix=$ac_optarg ;;
378 -program-transform-name | --program-transform-name \
379 | --program-transform-nam | --program-transform-na \
380 | --program-transform-n | --program-transform- \
381 | --program-transform | --program-transfor \
382 | --program-transfo | --program-transf \
383 | --program-trans | --program-tran \
384 | --progr-tra | --program-tr | --program-t)
385 ac_prev=program_transform_name ;;
386 -program-transform-name=* | --program-transform-name=* \
387 | --program-transform-nam=* | --program-transform-na=* \
388 | --program-transform-n=* | --program-transform-=* \
389 | --program-transform=* | --program-transfor=* \
390 | --program-transfo=* | --program-transf=* \
391 | --program-trans=* | --program-tran=* \
392 | --progr-tra=* | --program-tr=* | --program-t=*)
393 program_transform_name=$ac_optarg ;;
395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396 | -silent | --silent | --silen | --sile | --sil)
399 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403 sbindir=$ac_optarg ;;
405 -sharedstatedir | --sharedstatedir | --sharedstatedi \
406 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407 | --sharedst | --shareds | --shared | --share | --shar \
409 ac_prev=sharedstatedir ;;
410 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414 sharedstatedir=$ac_optarg ;;
416 -site | --site | --sit)
418 -site=* | --site=* | --sit=*)
421 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427 | --syscon | --sysco | --sysc | --sys | --sy)
428 ac_prev=sysconfdir ;;
429 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431 sysconfdir=$ac_optarg ;;
433 -target | --target | --targe | --targ | --tar | --ta | --t)
434 ac_prev=target_alias ;;
435 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436 target_alias=$ac_optarg ;;
438 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 -version | --version | --versio | --versi | --vers | -V)
445 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446 # Reject names that are not valid shell variable names.
447 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448 { echo "$as_me: error: invalid package name: $ac_package" >&2
449 { (exit 1); exit 1; }; }
450 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
455 eval "with_$ac_package='$ac_optarg'" ;;
457 -without-* | --without-*)
458 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459 # Reject names that are not valid shell variable names.
460 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461 { echo "$as_me: error: invalid package name: $ac_package" >&2
462 { (exit 1); exit 1; }; }
463 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464 eval "with_$ac_package=no" ;;
467 # Obsolete; use --with-x.
470 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471 | --x-incl | --x-inc | --x-in | --x-i)
472 ac_prev=x_includes ;;
473 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475 x_includes=$ac_optarg ;;
477 -x-libraries | --x-libraries | --x-librarie | --x-librari \
478 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479 ac_prev=x_libraries ;;
480 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482 x_libraries=$ac_optarg ;;
484 -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486 { (exit 1); exit 1; }; }
490 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491 # Reject names that are not valid shell variable names.
492 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494 { (exit 1); exit 1; }; }
495 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496 eval "$ac_envvar='$ac_optarg'"
497 export "$ac_envvar" ;;
500 # FIXME: should be removed in autoconf 3.0.
501 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
510 if test -n "$ac_prev"; then
511 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512 { echo "$as_me: error: missing argument to $ac_option" >&2
513 { (exit 1); exit 1; }; }
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
519 eval ac_val=$`echo "$ac_var"`
521 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523 { (exit 1); exit 1; }; };;
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529 localstatedir libdir includedir oldincludedir infodir mandir
531 eval ac_val=$`echo "$ac_var"`
533 [\\/$]* | ?:[\\/]* ) ;;
534 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535 { (exit 1); exit 1; }; };;
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547 if test "x$build_alias" = x; then
548 cross_compiling=maybe
549 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550 If a cross compiler is detected then cross compile mode will be used." >&2
551 elif test "x$build_alias" != "x$host_alias"; then
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
559 test "$silent" = yes && exec 6>/dev/null
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563 ac_srcdir_defaulted=yes
564 # Try the directory containing this script, then its parent.
566 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569 if test ! -r "$srcdir/$ac_unique_file"; then
573 ac_srcdir_defaulted=no
575 if test ! -r "$srcdir/$ac_unique_file"; then
576 if test "$ac_srcdir_defaulted" = yes; then
577 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578 { (exit 1); exit 1; }; }
580 { echo "$as_me: error: cannot find sources in $srcdir" >&2
581 { (exit 1); exit 1; }; }
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
619 # Report the --help message.
621 if test "$ac_init_help" = "long"; then
622 # Omit some internal or obsolete options to make the list less imposing.
623 # This message is too long to be a string in the A/UX 3.1 sh.
625 \`configure' configures this package to adapt to many kinds of systems.
627 Usage: $0 [OPTION]... [VAR=VALUE]...
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE. See below for descriptions of some of the useful variables.
632 Defaults for the options are specified in brackets.
635 -h, --help display this help and exit
636 --help=short display options specific to this package
637 --help=recursive display the short help of all the included packages
638 -V, --version display version information and exit
639 -q, --quiet, --silent do not print \`checking...' messages
640 --cache-file=FILE cache test results in FILE [disabled]
641 -C, --config-cache alias for \`--cache-file=config.cache'
642 -n, --no-create do not create output files
643 --srcdir=DIR find the sources in DIR [configure dir or \`..']
648 Installation directories:
649 --prefix=PREFIX install architecture-independent files in PREFIX
651 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
659 For better control, use the options below.
661 Fine tuning of the installation directories:
662 --bindir=DIR user executables [EPREFIX/bin]
663 --sbindir=DIR system admin executables [EPREFIX/sbin]
664 --libexecdir=DIR program executables [EPREFIX/libexec]
665 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
666 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
667 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
668 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
669 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
670 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
671 --libdir=DIR object code libraries [EPREFIX/lib]
672 --includedir=DIR C header files [PREFIX/include]
673 --oldincludedir=DIR C header files for non-gcc [/usr/include]
674 --infodir=DIR info documentation [DATAROOTDIR/info]
675 --mandir=DIR man documentation [DATAROOTDIR/man]
681 --program-prefix=PREFIX prepend PREFIX to installed program names
682 --program-suffix=SUFFIX append SUFFIX to installed program names
683 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
686 --build=BUILD configure for building on BUILD [guessed]
687 --host=HOST build programs to run on HOST [BUILD]
688 --target=TARGET configure for building compilers for TARGET [HOST]
692 if test -n "$ac_init_help"; then
697 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
698 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
701 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
702 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
705 --with-system-type=XXX test: override derived host system-type
706 --disable-stripping do not strip (debug info) installed executables
707 --with-pkg-config{=path} enable/disable use of pkg-config
708 --with-pkg-config-libdir=XXX use given directory for installing pc-files
709 --without-tests suppress build with test-programs
710 --enable-mixed-case tic should assume mixed-case filenames
711 --with-install-prefix prefixes actual install-location ($DESTDIR)
712 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
713 --with-build-cc=XXX the build C compiler ($BUILD_CC)
714 --with-build-cpp=XXX the build C preprocessor ($BUILD_CPP)
715 --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
716 --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
717 --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
718 --with-build-libs=XXX the build libraries (${BUILD_LIBS})
719 Options to Specify the Libraries Built/Used:
720 --with-shared generate shared C-objects (needed for --with-ada-sharedlib)
721 --with-curses-dir=DIR directory in which (n)curses is installed
722 --enable-widec compile with wide-char/UTF-8 code
723 --with-lib-prefix override library-prefix
724 --with-shlib-version=X Specify rel or abi version for shared libs
725 --enable-rpath-link link sample programs with rpath option
726 Fine-Tuning Your Configuration:
727 --enable-broken_linker compile with broken-linker support code
728 --disable-largefile omit support for large files
729 --with-rcs-ids compile-in RCS identifiers
731 --disable-ext-funcs disable function-extensions
732 --enable-const compile with extra/non-standard const
734 --without-develop disable development options
736 --with-pthread use POSIX thread library
737 --enable-weak-symbols enable weak-symbols for pthreads
738 --enable-reentrant compile with experimental reentrant code
739 --with-wrap-prefix=XXX override prefix used for public variables
740 Testing/development Options:
741 --disable-echo do not display "compiling" commands
742 --enable-warnings test: turn on gcc compiler warnings
743 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
744 --enable-assertions test: turn on generation of assertion code
745 --enable-expanded test: generate functions for certain macros
746 --disable-macros test: use functions rather than macros
747 --with-trace test: add trace() function to all models of ncurses
748 --disable-gnat-projects test: disable GNAT projects even if usable
749 Ada95 Binding Options:
750 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
751 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
752 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
753 --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
754 --with-ada-libname=XXX override default Ada library-name
756 Some influential environment variables:
757 CC C compiler command
758 CFLAGS C compiler flags
759 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
760 nonstandard directory <lib dir>
761 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
762 headers in a nonstandard directory <include dir>
765 Use these variables to override the choices made by `configure' or to help
766 it to find libraries and programs with nonstandard names/locations.
771 if test "$ac_init_help" = "recursive"; then
772 # If there are subdirs, report their specific --help.
774 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
776 # A "../" for each directory in /$ac_subdir.
777 ac_dots=`echo "$ac_subdir" |
778 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
781 .) # No --srcdir option. We are building in place.
782 ac_sub_srcdir="$srcdir" ;;
783 [\\/]* | ?:[\\/]* ) # Absolute path.
784 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
786 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
789 # Check for guested configure; otherwise get Cygnus style configure.
790 if test -f "$ac_sub_srcdir/configure.gnu"; then
792 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
793 elif test -f "$ac_sub_srcdir/configure"; then
795 $SHELL "$ac_sub_srcdir/configure" --help=recursive
796 elif test -f "$ac_sub_srcdir/configure.ac" ||
797 test -f "$ac_sub_srcdir/configure.in"; then
799 "$ac_configure" --help
801 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
807 test -n "$ac_init_help" && exit 0
808 if "$ac_init_version"; then
811 Copyright 2003-2020,2021 Thomas E. Dickey
812 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
813 Free Software Foundation, Inc.
814 This configure script is free software; the Free Software Foundation
815 gives unlimited permission to copy, distribute and modify it.
821 This file contains any messages produced by compilers while
822 running configure, to aid debugging if configure makes a mistake.
824 It was created by $as_me, which was
825 generated by GNU Autoconf 2.52.20210509. Invocation command line was
836 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
837 uname -m = `(uname -m) 2>/dev/null || echo unknown`
838 uname -r = `(uname -r) 2>/dev/null || echo unknown`
839 uname -s = `(uname -s) 2>/dev/null || echo unknown`
840 uname -v = `(uname -v) 2>/dev/null || echo unknown`
842 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
843 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
845 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
846 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
847 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
848 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
849 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
850 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
851 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
865 # Keep a trace of the command line.
866 # Strip out --no-create and --no-recursion so they do not pile up.
867 # Also quote any args containing shell meta-characters.
873 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
874 | --no-cr | --no-c) ;;
875 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
876 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
877 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
878 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
879 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
881 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
884 # Get rid of the leading space.
887 # When interrupted or exit'd, cleanup temporary files, and complete
888 # config.log. We remove comments because anyway the quotes in there
889 # would cause problems or look ugly.
891 # Save into config.log some information that might help in debugging.
893 echo "## ----------------- ##" >&5
894 echo "## Cache variables. ##" >&5
895 echo "## ----------------- ##" >&5
897 # The following way of writing the cache mishandles newlines in values,
900 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
903 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
904 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
908 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
912 sed "/^$/d" confdefs.h >conftest.log
913 if test -s conftest.log; then
915 echo "## ------------ ##" >&5
916 echo "## confdefs.h. ##" >&5
917 echo "## ------------ ##" >&5
922 test "$ac_signal" != 0 &&
923 echo "$as_me: caught signal $ac_signal" >&5
924 echo "$as_me: exit $exit_status" >&5
925 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
928 for ac_signal in 1 2 13 15; do
929 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
933 # confdefs.h avoids OS command line length limits that DEFS can exceed.
934 rm -rf conftest* confdefs.h
935 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
938 # Let the site file select an alternate cache file if it wants to.
939 # Prefer explicitly selected file to automatically selected ones.
940 if test -z "$CONFIG_SITE"; then
941 if test "x$prefix" != xNONE; then
942 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
944 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
947 for ac_site_file in $CONFIG_SITE; do
948 if test -r "$ac_site_file"; then
949 { echo "$as_me:949: loading site script $ac_site_file" >&5
950 echo "$as_me: loading site script $ac_site_file" >&6;}
951 cat "$ac_site_file" >&5
956 if test -r "$cache_file"; then
957 # Some versions of bash will fail to source /dev/null (special
958 # files actually), so we avoid doing that.
959 if test -f "$cache_file"; then
960 { echo "$as_me:960: loading cache $cache_file" >&5
961 echo "$as_me: loading cache $cache_file" >&6;}
963 [\\/]* | ?:[\\/]* ) . $cache_file;;
968 { echo "$as_me:968: creating cache $cache_file" >&5
969 echo "$as_me: creating cache $cache_file" >&6;}
973 # Check that the precious variables saved in the cache have kept the same
975 ac_cache_corrupted=false
976 for ac_var in `(set) 2>&1 |
977 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
978 eval ac_old_set=\$ac_cv_env_${ac_var}_set
979 eval ac_new_set=\$ac_env_${ac_var}_set
980 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
981 eval ac_new_val="\$ac_env_${ac_var}_value"
982 case "$ac_old_set,$ac_new_set" in
984 { echo "$as_me:984: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
985 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
986 ac_cache_corrupted=: ;;
988 { echo "$as_me:988: error: \`$ac_var' was not set in the previous run" >&5
989 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
990 ac_cache_corrupted=: ;;
993 if test "x$ac_old_val" != "x$ac_new_val"; then
994 { echo "$as_me:994: error: \`$ac_var' has changed since the previous run:" >&5
995 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
996 { echo "$as_me:996: former value: $ac_old_val" >&5
997 echo "$as_me: former value: $ac_old_val" >&2;}
998 { echo "$as_me:998: current value: $ac_new_val" >&5
999 echo "$as_me: current value: $ac_new_val" >&2;}
1000 ac_cache_corrupted=:
1003 # Pass precious variables to config.status. It doesn't matter if
1004 # we pass some twice (in addition to the command line arguments).
1005 if test "$ac_new_set" = set; then
1006 case "$ac_new_val" in
1007 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1008 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1009 ac_configure_args="$ac_configure_args '$ac_arg'"
1011 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1016 if "$ac_cache_corrupted"; then
1017 { echo "$as_me:1017: error: changes in the environment can compromise the build" >&5
1018 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1019 { { echo "$as_me:1019: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1020 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1021 { (exit 1); exit 1; }; }
1025 ac_cpp='$CPP $CPPFLAGS'
1026 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1027 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1029 ac_main_return="return"
1031 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1033 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1045 echo "#! $SHELL" >conftest.sh
1046 echo "exit 0" >>conftest.sh
1047 chmod +x conftest.sh
1048 if { (echo "$as_me:1048: PATH=\".;.\"; conftest.sh") >&5
1049 (PATH=".;."; conftest.sh) 2>&5
1051 echo "$as_me:1051: \$? = $ac_status" >&5
1052 (exit "$ac_status"); }; then
1053 ac_path_separator=';'
1057 PATH_SEPARATOR="$ac_path_separator"
1060 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1065 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1066 if test -f "$ac_dir/install-sh"; then
1068 ac_install_sh="$ac_aux_dir/install-sh -c"
1070 elif test -f "$ac_dir/install.sh"; then
1072 ac_install_sh="$ac_aux_dir/install.sh -c"
1074 elif test -f "$ac_dir/shtool"; then
1076 ac_install_sh="$ac_aux_dir/shtool install -c"
1080 if test -z "$ac_aux_dir"; then
1081 { { echo "$as_me:1081: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1082 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1083 { (exit 1); exit 1; }; }
1085 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1086 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1087 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1089 # Make sure we can run config.sub.
1090 $ac_config_sub sun4 >/dev/null 2>&1 ||
1091 { { echo "$as_me:1091: error: cannot run $ac_config_sub" >&5
1092 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1093 { (exit 1); exit 1; }; }
1095 echo "$as_me:1095: checking build system type" >&5
1096 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1097 if test "${ac_cv_build+set}" = set; then
1098 echo $ECHO_N "(cached) $ECHO_C" >&6
1100 ac_cv_build_alias=$build_alias
1101 test -z "$ac_cv_build_alias" &&
1102 ac_cv_build_alias=`$ac_config_guess`
1103 test -z "$ac_cv_build_alias" &&
1104 { { echo "$as_me:1104: error: cannot guess build type; you must specify one" >&5
1105 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1106 { (exit 1); exit 1; }; }
1107 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1108 { { echo "$as_me:1108: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1109 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1110 { (exit 1); exit 1; }; }
1113 echo "$as_me:1113: result: $ac_cv_build" >&5
1114 echo "${ECHO_T}$ac_cv_build" >&6
1116 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1120 echo "$as_me:1120: checking host system type" >&5
1121 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1122 if test "${ac_cv_host+set}" = set; then
1123 echo $ECHO_N "(cached) $ECHO_C" >&6
1125 ac_cv_host_alias=$host_alias
1126 test -z "$ac_cv_host_alias" &&
1127 ac_cv_host_alias=$ac_cv_build_alias
1128 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1129 { { echo "$as_me:1129: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1130 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1131 { (exit 1); exit 1; }; }
1134 echo "$as_me:1134: result: $ac_cv_host" >&5
1135 echo "${ECHO_T}$ac_cv_host" >&6
1137 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1138 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1139 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1142 echo "$as_me:1142: checking target system type" >&5
1143 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1144 if test "${ac_cv_target+set}" = set; then
1145 echo $ECHO_N "(cached) $ECHO_C" >&6
1147 ac_cv_target_alias=$target_alias
1148 test "x$ac_cv_target_alias" = "x" &&
1149 ac_cv_target_alias=$ac_cv_host_alias
1150 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1151 { { echo "$as_me:1151: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1152 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1153 { (exit 1); exit 1; }; }
1156 echo "$as_me:1156: result: $ac_cv_target" >&5
1157 echo "${ECHO_T}$ac_cv_target" >&6
1158 target=$ac_cv_target
1159 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 # The aliases save the names the user supplied, while $host etc.
1164 # will get canonicalized.
1165 test -n "$target_alias" &&
1166 test "$program_prefix$program_suffix$program_transform_name" = \
1168 program_prefix=${target_alias}-
1169 system_name="$host_os"
1171 system_name="`(uname -s -r) 2>/dev/null`"
1172 if test -z "$system_name" ; then
1173 system_name="`(hostname) 2>/dev/null`"
1176 test -n "$system_name" &&
1177 cat >>confdefs.h <<EOF
1178 #define SYSTEM_NAME "$system_name"
1181 if test "${cf_cv_system_name+set}" = set; then
1182 echo $ECHO_N "(cached) $ECHO_C" >&6
1184 cf_cv_system_name="$system_name"
1187 test -z "$system_name" && system_name="$cf_cv_system_name"
1188 test -n "$cf_cv_system_name" && echo "$as_me:1188: result: Configuring for $cf_cv_system_name" >&5
1189 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1191 if test ".$system_name" != ".$cf_cv_system_name" ; then
1192 echo "$as_me:1192: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1193 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1194 { { echo "$as_me:1194: error: \"Please remove config.cache and try again.\"" >&5
1195 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1196 { (exit 1); exit 1; }; }
1199 # Check whether --with-system-type or --without-system-type was given.
1200 if test "${with_system_type+set}" = set; then
1201 withval="$with_system_type"
1202 { echo "$as_me:1202: WARNING: overriding system type to $withval" >&5
1203 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1204 cf_cv_system_name=$withval
1209 ### Save the given $CFLAGS to allow user-override.
1210 cf_user_CFLAGS="$CFLAGS"
1212 ### Default install-location
1213 for ac_prog in ggrep grep
1215 # Extract the first word of "$ac_prog", so it can be a program name with args.
1216 set dummy $ac_prog; ac_word=$2
1217 echo "$as_me:1217: checking for $ac_word" >&5
1218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1219 if test "${ac_cv_prog_GREP+set}" = set; then
1220 echo $ECHO_N "(cached) $ECHO_C" >&6
1222 if test -n "$GREP"; then
1223 ac_cv_prog_GREP="$GREP" # Let the user override the test.
1225 ac_save_IFS=$IFS; IFS=$ac_path_separator
1227 for ac_dir in $ac_dummy; do
1229 test -z "$ac_dir" && ac_dir=.
1230 $as_executable_p "$ac_dir/$ac_word" || continue
1231 ac_cv_prog_GREP="$ac_prog"
1232 echo "$as_me:1232: found $ac_dir/$ac_word" >&5
1238 GREP=$ac_cv_prog_GREP
1239 if test -n "$GREP"; then
1240 echo "$as_me:1240: result: $GREP" >&5
1241 echo "${ECHO_T}$GREP" >&6
1243 echo "$as_me:1243: result: no" >&5
1244 echo "${ECHO_T}no" >&6
1247 test -n "$GREP" && break
1249 test -n "$GREP" || GREP=": "
1251 echo "$as_me:1251: checking for fgrep" >&5
1252 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1253 if test "${ac_cv_path_FGREP+set}" = set; then
1254 echo $ECHO_N "(cached) $ECHO_C" >&6
1256 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1257 then ac_cv_path_FGREP="$GREP -F"
1259 for ac_prog in gfgrep fgrep
1261 # Extract the first word of "$ac_prog", so it can be a program name with args.
1262 set dummy $ac_prog; ac_word=$2
1263 echo "$as_me:1263: checking for $ac_word" >&5
1264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1265 if test "${ac_cv_path_FGREP+set}" = set; then
1266 echo $ECHO_N "(cached) $ECHO_C" >&6
1270 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1273 ac_save_IFS=$IFS; IFS=$ac_path_separator
1275 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if $as_executable_p "$ac_dir/$ac_word"; then
1279 ac_cv_path_FGREP="$ac_dir/$ac_word"
1280 echo "$as_me:1280: found $ac_dir/$ac_word" >&5
1288 FGREP=$ac_cv_path_FGREP
1290 if test -n "$FGREP"; then
1291 echo "$as_me:1291: result: $FGREP" >&5
1292 echo "${ECHO_T}$FGREP" >&6
1294 echo "$as_me:1294: result: no" >&5
1295 echo "${ECHO_T}no" >&6
1298 test -n "$FGREP" && break
1300 test -n "$FGREP" || FGREP=": "
1302 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1302: error: cannot find workable fgrep" >&5
1303 echo "$as_me: error: cannot find workable fgrep" >&2;}
1304 { (exit 1); exit 1; }; }
1307 echo "$as_me:1307: result: $ac_cv_path_FGREP" >&5
1308 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1309 FGREP="$ac_cv_path_FGREP"
1311 echo "$as_me:1311: checking for prefix" >&5
1312 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1313 if test "x$prefix" = "xNONE" ; then
1314 case "$cf_cv_system_name" in
1315 # non-vendor systems don't have a conflict
1316 (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1319 (*) prefix=$ac_default_prefix
1323 echo "$as_me:1323: result: $prefix" >&5
1324 echo "${ECHO_T}$prefix" >&6
1326 if test "x$prefix" = "xNONE" ; then
1327 echo "$as_me:1327: checking for default include-directory" >&5
1328 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1329 test -n "$verbose" && echo 1>&6
1332 "$includedir/ncurses" \
1334 "$prefix/include/ncurses" \
1335 /usr/local/include \
1336 /usr/local/include/ncurses \
1338 /usr/include/ncurses
1340 cf_dir=`eval echo "$cf_symbol"`
1341 if test -f "$cf_dir/curses.h" ; then
1342 if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1343 includedir="$cf_symbol"
1344 test -n "$verbose" && echo $ECHO_N " found " 1>&6
1348 test -n "$verbose" && echo " tested $cf_dir" 1>&6
1350 echo "$as_me:1350: result: $includedir" >&5
1351 echo "${ECHO_T}$includedir" >&6
1354 ### Checks for programs.
1357 ac_cpp='$CPP $CPPFLAGS'
1358 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1359 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1361 ac_main_return="return"
1362 if test -n "$ac_tool_prefix"; then
1363 for ac_prog in gnatgcc gcc cc
1365 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1366 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1367 echo "$as_me:1367: checking for $ac_word" >&5
1368 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1369 if test "${ac_cv_prog_CC+set}" = set; then
1370 echo $ECHO_N "(cached) $ECHO_C" >&6
1372 if test -n "$CC"; then
1373 ac_cv_prog_CC="$CC" # Let the user override the test.
1375 ac_save_IFS=$IFS; IFS=$ac_path_separator
1377 for ac_dir in $ac_dummy; do
1379 test -z "$ac_dir" && ac_dir=.
1380 $as_executable_p "$ac_dir/$ac_word" || continue
1381 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1382 echo "$as_me:1382: found $ac_dir/$ac_word" >&5
1389 if test -n "$CC"; then
1390 echo "$as_me:1390: result: $CC" >&5
1391 echo "${ECHO_T}$CC" >&6
1393 echo "$as_me:1393: result: no" >&5
1394 echo "${ECHO_T}no" >&6
1397 test -n "$CC" && break
1400 if test -z "$CC"; then
1402 for ac_prog in gnatgcc gcc cc
1404 # Extract the first word of "$ac_prog", so it can be a program name with args.
1405 set dummy $ac_prog; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1409 echo $ECHO_N "(cached) $ECHO_C" >&6
1411 if test -n "$ac_ct_CC"; then
1412 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1414 ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 for ac_dir in $ac_dummy; do
1418 test -z "$ac_dir" && ac_dir=.
1419 $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_ac_ct_CC="$ac_prog"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1428 if test -n "$ac_ct_CC"; then
1429 echo "$as_me:1429: result: $ac_ct_CC" >&5
1430 echo "${ECHO_T}$ac_ct_CC" >&6
1432 echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1436 test -n "$ac_ct_CC" && break
1442 test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
1443 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1444 { (exit 1); exit 1; }; }
1446 # Provide some information about the compiler.
1447 echo "$as_me:1447:" \
1448 "checking for C compiler version" >&5
1449 ac_compiler=`set X $ac_compile; echo "$2"`
1450 { (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
1451 (eval $ac_compiler --version </dev/null >&5) 2>&5
1453 echo "$as_me:1453: \$? = $ac_status" >&5
1454 (exit "$ac_status"); }
1455 { (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
1456 (eval $ac_compiler -v </dev/null >&5) 2>&5
1458 echo "$as_me:1458: \$? = $ac_status" >&5
1459 (exit "$ac_status"); }
1460 { (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
1461 (eval $ac_compiler -V </dev/null >&5) 2>&5
1463 echo "$as_me:1463: \$? = $ac_status" >&5
1464 (exit "$ac_status"); }
1466 cat >"conftest.$ac_ext" <<_ACEOF
1467 #line 1467 "configure"
1468 #include "confdefs.h"
1478 ac_clean_files_save=$ac_clean_files
1479 ac_clean_files="$ac_clean_files a.out a.exe"
1480 # Try to create an executable without -o first, disregard a.out.
1481 # It will help us diagnose broken compilers, and finding out an intuition
1483 echo "$as_me:1483: checking for C compiler default output" >&5
1484 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1485 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1486 if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
1487 (eval $ac_link_default) 2>&5
1489 echo "$as_me:1489: \$? = $ac_status" >&5
1490 (exit "$ac_status"); }; then
1491 # Find the output, starting from the most likely. This scheme is
1492 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1494 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1495 ls a.out conftest 2>/dev/null;
1496 ls a.* conftest.* 2>/dev/null`; do
1498 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1499 a.out ) # We found the default executable, but exeext='' is most
1502 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1503 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1510 echo "$as_me: failed program was:" >&5
1511 cat "conftest.$ac_ext" >&5
1512 { { echo "$as_me:1512: error: C compiler cannot create executables" >&5
1513 echo "$as_me: error: C compiler cannot create executables" >&2;}
1514 { (exit 77); exit 77; }; }
1517 ac_exeext=$ac_cv_exeext
1518 echo "$as_me:1518: result: $ac_file" >&5
1519 echo "${ECHO_T}$ac_file" >&6
1521 # Check the compiler produces executables we can run. If not, either
1522 # the compiler is broken, or we cross compile.
1523 echo "$as_me:1523: checking whether the C compiler works" >&5
1524 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1525 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1526 # If not cross compiling, check that we can run a simple program.
1527 if test "$cross_compiling" != yes; then
1528 if { ac_try='./$ac_file'
1529 { (eval echo "$as_me:1529: \"$ac_try\"") >&5
1532 echo "$as_me:1532: \$? = $ac_status" >&5
1533 (exit "$ac_status"); }; }; then
1536 if test "$cross_compiling" = maybe; then
1539 { { echo "$as_me:1539: error: cannot run C compiled programs.
1540 If you meant to cross compile, use \`--host'." >&5
1541 echo "$as_me: error: cannot run C compiled programs.
1542 If you meant to cross compile, use \`--host'." >&2;}
1543 { (exit 1); exit 1; }; }
1547 echo "$as_me:1547: result: yes" >&5
1548 echo "${ECHO_T}yes" >&6
1550 rm -f a.out a.exe "conftest$ac_cv_exeext"
1551 ac_clean_files=$ac_clean_files_save
1552 # Check the compiler produces executables we can run. If not, either
1553 # the compiler is broken, or we cross compile.
1554 echo "$as_me:1554: checking whether we are cross compiling" >&5
1555 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1556 echo "$as_me:1556: result: $cross_compiling" >&5
1557 echo "${ECHO_T}$cross_compiling" >&6
1559 echo "$as_me:1559: checking for executable suffix" >&5
1560 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1561 if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
1562 (eval $ac_link) 2>&5
1564 echo "$as_me:1564: \$? = $ac_status" >&5
1565 (exit "$ac_status"); }; then
1566 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1567 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1568 # work properly (i.e., refer to `conftest.exe'), while it won't with
1570 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1572 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1573 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1580 { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
1581 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1582 { (exit 1); exit 1; }; }
1585 rm -f "conftest$ac_cv_exeext"
1586 echo "$as_me:1586: result: $ac_cv_exeext" >&5
1587 echo "${ECHO_T}$ac_cv_exeext" >&6
1589 rm -f "conftest.$ac_ext"
1590 EXEEXT=$ac_cv_exeext
1592 echo "$as_me:1592: checking for object suffix" >&5
1593 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1594 if test "${ac_cv_objext+set}" = set; then
1595 echo $ECHO_N "(cached) $ECHO_C" >&6
1597 cat >"conftest.$ac_ext" <<_ACEOF
1598 #line 1598 "configure"
1599 #include "confdefs.h"
1609 rm -f conftest.o conftest.obj
1610 if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
1611 (eval $ac_compile) 2>&5
1613 echo "$as_me:1613: \$? = $ac_status" >&5
1614 (exit "$ac_status"); }; then
1615 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1617 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1618 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1623 echo "$as_me: failed program was:" >&5
1624 cat "conftest.$ac_ext" >&5
1625 { { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
1626 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1627 { (exit 1); exit 1; }; }
1630 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1632 echo "$as_me:1632: result: $ac_cv_objext" >&5
1633 echo "${ECHO_T}$ac_cv_objext" >&6
1634 OBJEXT=$ac_cv_objext
1636 echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
1637 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1638 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1639 echo $ECHO_N "(cached) $ECHO_C" >&6
1641 cat >"conftest.$ac_ext" <<_ACEOF
1642 #line 1642 "configure"
1643 #include "confdefs.h"
1656 rm -f "conftest.$ac_objext"
1657 if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
1658 (eval $ac_compile) 2>&5
1660 echo "$as_me:1660: \$? = $ac_status" >&5
1661 (exit "$ac_status"); } &&
1662 { ac_try='test -s "conftest.$ac_objext"'
1663 { (eval echo "$as_me:1663: \"$ac_try\"") >&5
1666 echo "$as_me:1666: \$? = $ac_status" >&5
1667 (exit "$ac_status"); }; }; then
1670 echo "$as_me: failed program was:" >&5
1671 cat "conftest.$ac_ext" >&5
1674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1675 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1678 echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
1679 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1680 GCC=`test $ac_compiler_gnu = yes && echo yes`
1681 ac_test_CFLAGS=${CFLAGS+set}
1682 ac_save_CFLAGS=$CFLAGS
1684 echo "$as_me:1684: checking whether $CC accepts -g" >&5
1685 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1686 if test "${ac_cv_prog_cc_g+set}" = set; then
1687 echo $ECHO_N "(cached) $ECHO_C" >&6
1689 cat >"conftest.$ac_ext" <<_ACEOF
1690 #line 1690 "configure"
1691 #include "confdefs.h"
1701 rm -f "conftest.$ac_objext"
1702 if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
1703 (eval $ac_compile) 2>&5
1705 echo "$as_me:1705: \$? = $ac_status" >&5
1706 (exit "$ac_status"); } &&
1707 { ac_try='test -s "conftest.$ac_objext"'
1708 { (eval echo "$as_me:1708: \"$ac_try\"") >&5
1711 echo "$as_me:1711: \$? = $ac_status" >&5
1712 (exit "$ac_status"); }; }; then
1715 echo "$as_me: failed program was:" >&5
1716 cat "conftest.$ac_ext" >&5
1719 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1721 echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
1722 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1723 if test "$ac_test_CFLAGS" = set; then
1724 CFLAGS=$ac_save_CFLAGS
1725 elif test $ac_cv_prog_cc_g = yes; then
1726 if test "$GCC" = yes; then
1732 if test "$GCC" = yes; then
1738 # Some people use a C++ compiler to compile C. Since we use `exit',
1739 # in C++ we need to declare it. In case someone uses the same compiler
1740 # for both compiling C and C++ we need to have the C++ compiler decide
1741 # the declaration of exit, since it's the most demanding environment.
1742 cat >"conftest.$ac_ext" <<_ACEOF
1747 rm -f "conftest.$ac_objext"
1748 if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
1749 (eval $ac_compile) 2>&5
1751 echo "$as_me:1751: \$? = $ac_status" >&5
1752 (exit "$ac_status"); } &&
1753 { ac_try='test -s "conftest.$ac_objext"'
1754 { (eval echo "$as_me:1754: \"$ac_try\"") >&5
1757 echo "$as_me:1757: \$? = $ac_status" >&5
1758 (exit "$ac_status"); }; }; then
1759 for ac_declaration in \
1761 '#include <stdlib.h>' \
1762 'extern "C" void std::exit (int) throw (); using std::exit;' \
1763 'extern "C" void std::exit (int); using std::exit;' \
1764 'extern "C" void exit (int) throw ();' \
1765 'extern "C" void exit (int);' \
1768 cat >"conftest.$ac_ext" <<_ACEOF
1769 #line 1769 "configure"
1770 #include "confdefs.h"
1781 rm -f "conftest.$ac_objext"
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783 (eval $ac_compile) 2>&5
1785 echo "$as_me:1785: \$? = $ac_status" >&5
1786 (exit "$ac_status"); } &&
1787 { ac_try='test -s "conftest.$ac_objext"'
1788 { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1791 echo "$as_me:1791: \$? = $ac_status" >&5
1792 (exit "$ac_status"); }; }; then
1795 echo "$as_me: failed program was:" >&5
1796 cat "conftest.$ac_ext" >&5
1799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1800 cat >"conftest.$ac_ext" <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1812 rm -f "conftest.$ac_objext"
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814 (eval $ac_compile) 2>&5
1816 echo "$as_me:1816: \$? = $ac_status" >&5
1817 (exit "$ac_status"); } &&
1818 { ac_try='test -s "conftest.$ac_objext"'
1819 { (eval echo "$as_me:1819: \"$ac_try\"") >&5
1822 echo "$as_me:1822: \$? = $ac_status" >&5
1823 (exit "$ac_status"); }; }; then
1826 echo "$as_me: failed program was:" >&5
1827 cat "conftest.$ac_ext" >&5
1829 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1832 if test -n "$ac_declaration"; then
1833 echo '#ifdef __cplusplus' >>confdefs.h
1834 echo "$ac_declaration" >>confdefs.h
1835 echo '#endif' >>confdefs.h
1839 echo "$as_me: failed program was:" >&5
1840 cat "conftest.$ac_ext" >&5
1842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1844 ac_cpp='$CPP $CPPFLAGS'
1845 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1846 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1847 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848 ac_main_return="return"
1851 if test "$GCC" = yes ; then
1852 echo "$as_me:1852: checking version of $CC" >&5
1853 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1854 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1855 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1856 echo "$as_me:1856: result: $GCC_VERSION" >&5
1857 echo "${ECHO_T}$GCC_VERSION" >&6
1862 if test "$GCC" = yes ; then
1865 echo "$as_me:1865: checking if this is really Intel C compiler" >&5
1866 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1867 cf_save_CFLAGS="$CFLAGS"
1868 CFLAGS="$CFLAGS -no-gcc"
1869 cat >"conftest.$ac_ext" <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1877 #ifdef __INTEL_COMPILER
1886 rm -f "conftest.$ac_objext"
1887 if { (eval echo "$as_me:1887: \"$ac_compile\"") >&5
1888 (eval $ac_compile) 2>&5
1890 echo "$as_me:1890: \$? = $ac_status" >&5
1891 (exit "$ac_status"); } &&
1892 { ac_try='test -s "conftest.$ac_objext"'
1893 { (eval echo "$as_me:1893: \"$ac_try\"") >&5
1896 echo "$as_me:1896: \$? = $ac_status" >&5
1897 (exit "$ac_status"); }; }; then
1899 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1902 echo "$as_me: failed program was:" >&5
1903 cat "conftest.$ac_ext" >&5
1905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1906 CFLAGS="$cf_save_CFLAGS"
1907 echo "$as_me:1907: result: $INTEL_COMPILER" >&5
1908 echo "${ECHO_T}$INTEL_COMPILER" >&6
1915 if test "$GCC" = yes ; then
1916 echo "$as_me:1916: checking if this is really Clang C compiler" >&5
1917 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1918 cf_save_CFLAGS="$CFLAGS"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1951 echo "$as_me: failed program was:" >&5
1952 cat "conftest.$ac_ext" >&5
1954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1955 CFLAGS="$cf_save_CFLAGS"
1956 echo "$as_me:1956: result: $CLANG_COMPILER" >&5
1957 echo "${ECHO_T}$CLANG_COMPILER" >&6
1962 if test "x$CLANG_COMPILER" = "xyes" ; then
1964 (c[1-9][0-9]|*/c[1-9][0-9])
1965 { echo "$as_me:1965: WARNING: replacing broken compiler alias $CC" >&5
1966 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
1967 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
1972 echo "$as_me:1972: checking version of $CC" >&5
1973 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1974 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.].*//'`"
1975 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
1976 echo "$as_me:1976: result: $CLANG_VERSION" >&5
1977 echo "${ECHO_T}$CLANG_VERSION" >&6
1979 for cf_clang_opt in \
1980 -Qunused-arguments \
1981 -Wno-error=implicit-function-declaration
1983 echo "$as_me:1983: checking if option $cf_clang_opt works" >&5
1984 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
1985 cf_save_CFLAGS="$CFLAGS"
1986 CFLAGS="$CFLAGS $cf_clang_opt"
1987 cat >"conftest.$ac_ext" <<_ACEOF
1988 #line 1988 "configure"
1989 #include "confdefs.h"
1996 printf("hello!\\n");
2001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2002 if { (eval echo "$as_me:2002: \"$ac_link\"") >&5
2003 (eval $ac_link) 2>&5
2005 echo "$as_me:2005: \$? = $ac_status" >&5
2006 (exit "$ac_status"); } &&
2007 { ac_try='test -s "conftest$ac_exeext"'
2008 { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2011 echo "$as_me:2011: \$? = $ac_status" >&5
2012 (exit "$ac_status"); }; }; then
2016 echo "$as_me: failed program was:" >&5
2017 cat "conftest.$ac_ext" >&5
2021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2022 echo "$as_me:2022: result: $cf_clang_optok" >&5
2023 echo "${ECHO_T}$cf_clang_optok" >&6
2024 CFLAGS="$cf_save_CFLAGS"
2025 if test "$cf_clang_optok" = yes; then
2026 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2028 echo "${as_me:-configure}:2028: testing adding option $cf_clang_opt ..." 1>&5
2030 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2031 CFLAGS="${CFLAGS}$cf_clang_opt"
2037 echo "$as_me:2037: checking for $CC option to accept ANSI C" >&5
2038 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2039 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2040 echo $ECHO_N "(cached) $ECHO_C" >&6
2042 ac_cv_prog_cc_stdc=no
2044 cat >"conftest.$ac_ext" <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2049 #include <sys/types.h>
2050 #include <sys/stat.h>
2051 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2052 struct buf { int x; };
2053 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2054 static char *e (p, i)
2060 static char *f (char * (*g) (char **, int), char **p, ...)
2065 s = g (p, va_arg (v,int));
2069 int test (int i, double x);
2070 struct s1 {int (*f) (int a);};
2071 struct s2 {int (*f) (double a);};
2072 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2078 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2083 # Don't try gcc -ansi; that turns off useful extensions and
2084 # breaks some systems' header files.
2085 # AIX -qlanglvl=ansi
2086 # Ultrix and OSF/1 -std1
2087 # HP-UX 10.20 and later -Ae
2088 # HP-UX older versions -Aa -D_HPUX_SOURCE
2089 # SVR4 -Xc -D__EXTENSIONS__
2090 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2092 CC="$ac_save_CC $ac_arg"
2093 rm -f "conftest.$ac_objext"
2094 if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095 (eval $ac_compile) 2>&5
2097 echo "$as_me:2097: \$? = $ac_status" >&5
2098 (exit "$ac_status"); } &&
2099 { ac_try='test -s "conftest.$ac_objext"'
2100 { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2103 echo "$as_me:2103: \$? = $ac_status" >&5
2104 (exit "$ac_status"); }; }; then
2105 ac_cv_prog_cc_stdc=$ac_arg
2108 echo "$as_me: failed program was:" >&5
2109 cat "conftest.$ac_ext" >&5
2111 rm -f "conftest.$ac_objext"
2113 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2118 case "x$ac_cv_prog_cc_stdc" in
2120 echo "$as_me:2120: result: none needed" >&5
2121 echo "${ECHO_T}none needed" >&6 ;;
2123 echo "$as_me:2123: result: $ac_cv_prog_cc_stdc" >&5
2124 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2125 CC="$CC $ac_cv_prog_cc_stdc" ;;
2128 # This should have been defined by AC_PROG_CC
2131 echo "$as_me:2131: checking \$CFLAGS variable" >&5
2132 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2135 echo "$as_me:2135: result: broken" >&5
2136 echo "${ECHO_T}broken" >&6
2137 { echo "$as_me:2137: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2138 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2141 for cf_arg in $cf_flags
2147 cf_new_extra_cppflags=
2149 for cf_add_cflags in $cf_arg
2151 case "$cf_fix_cppflags" in
2153 case "$cf_add_cflags" in
2154 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2155 case "$cf_add_cflags" in
2157 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2159 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2160 && test -z "${cf_tst_cflags}" \
2161 && cf_fix_cppflags=yes
2163 if test "$cf_fix_cppflags" = yes ; then
2165 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2166 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2169 elif test "${cf_tst_cflags}" = "\"'" ; then
2171 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2172 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2182 case "$cf_add_cflags" in
2184 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2186 CPPFLAGS=`echo "$CPPFLAGS" | \
2187 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2188 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2193 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2194 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2201 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2202 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215 && test -z "${cf_tst_cflags}" \
2216 && cf_fix_cppflags=no
2221 if test -n "$cf_new_cflags" ; then
2223 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2224 CFLAGS="${CFLAGS}$cf_new_cflags"
2228 if test -n "$cf_new_cppflags" ; then
2230 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2231 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2235 if test -n "$cf_new_extra_cppflags" ; then
2237 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2238 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2245 echo "$as_me:2245: result: ok" >&5
2246 echo "${ECHO_T}ok" >&6
2250 echo "$as_me:2250: checking \$CC variable" >&5
2251 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2254 echo "$as_me:2254: result: broken" >&5
2255 echo "${ECHO_T}broken" >&6
2256 { echo "$as_me:2256: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2257 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2259 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2260 cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2262 for cf_arg in $cf_flags
2270 cf_new_extra_cppflags=
2272 for cf_add_cflags in $cf_arg
2274 case "$cf_fix_cppflags" in
2276 case "$cf_add_cflags" in
2277 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2278 case "$cf_add_cflags" in
2280 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2282 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2283 && test -z "${cf_tst_cflags}" \
2284 && cf_fix_cppflags=yes
2286 if test "$cf_fix_cppflags" = yes ; then
2288 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2289 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2292 elif test "${cf_tst_cflags}" = "\"'" ; then
2294 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2295 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2305 case "$cf_add_cflags" in
2307 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2309 CPPFLAGS=`echo "$CPPFLAGS" | \
2310 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2311 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2316 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2317 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2324 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2325 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2332 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2333 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2335 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2337 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2338 && test -z "${cf_tst_cflags}" \
2339 && cf_fix_cppflags=no
2344 if test -n "$cf_new_cflags" ; then
2346 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2347 CFLAGS="${CFLAGS}$cf_new_cflags"
2351 if test -n "$cf_new_cppflags" ; then
2353 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2354 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2358 if test -n "$cf_new_extra_cppflags" ; then
2360 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2361 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2371 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2373 echo "${as_me:-configure}:2373: testing resulting CC: '$CC' ..." 1>&5
2375 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2377 echo "${as_me:-configure}:2377: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2379 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2381 echo "${as_me:-configure}:2381: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2385 echo "$as_me:2385: result: ok" >&5
2386 echo "${ECHO_T}ok" >&6
2390 echo "$as_me:2390: checking for egrep" >&5
2391 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2392 if test "${ac_cv_path_EGREP+set}" = set; then
2393 echo $ECHO_N "(cached) $ECHO_C" >&6
2395 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2396 then ac_cv_path_EGREP="$GREP -E"
2398 for ac_prog in gegrep egrep
2400 # Extract the first word of "$ac_prog", so it can be a program name with args.
2401 set dummy $ac_prog; ac_word=$2
2402 echo "$as_me:2402: checking for $ac_word" >&5
2403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2404 if test "${ac_cv_path_EGREP+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2409 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2412 ac_save_IFS=$IFS; IFS=$ac_path_separator
2414 for ac_dir in $ac_dummy; do
2416 test -z "$ac_dir" && ac_dir=.
2417 if $as_executable_p "$ac_dir/$ac_word"; then
2418 ac_cv_path_EGREP="$ac_dir/$ac_word"
2419 echo "$as_me:2419: found $ac_dir/$ac_word" >&5
2427 EGREP=$ac_cv_path_EGREP
2429 if test -n "$EGREP"; then
2430 echo "$as_me:2430: result: $EGREP" >&5
2431 echo "${ECHO_T}$EGREP" >&6
2433 echo "$as_me:2433: result: no" >&5
2434 echo "${ECHO_T}no" >&6
2437 test -n "$EGREP" && break
2439 test -n "$EGREP" || EGREP=": "
2441 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2441: error: cannot find workable egrep" >&5
2442 echo "$as_me: error: cannot find workable egrep" >&2;}
2443 { (exit 1); exit 1; }; }
2446 echo "$as_me:2446: result: $ac_cv_path_EGREP" >&5
2447 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2448 EGREP="$ac_cv_path_EGREP"
2451 ac_cpp='$CPP $CPPFLAGS'
2452 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2453 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2454 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2455 ac_main_return="return"
2456 echo "$as_me:2456: checking how to run the C preprocessor" >&5
2457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2458 # On Suns, sometimes $CPP names a directory.
2459 if test -n "$CPP" && test -d "$CPP"; then
2462 if test -z "$CPP"; then
2463 if test "${ac_cv_prog_CPP+set}" = set; then
2464 echo $ECHO_N "(cached) $ECHO_C" >&6
2466 # Double quotes because CPP needs to be expanded
2467 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2470 for ac_c_preproc_warn_flag in '' yes
2472 # Use a header file that comes with gcc, so configuring glibc
2473 # with a fresh cross-compiler works.
2474 # On the NeXT, cc -E runs the code through the compiler's parser,
2475 # not just through cpp. "Syntax error" is here to catch this case.
2476 cat >"conftest.$ac_ext" <<_ACEOF
2477 #line 2477 "configure"
2478 #include "confdefs.h"
2482 if { (eval echo "$as_me:2482: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2483 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2485 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2487 cat conftest.err >&5
2488 echo "$as_me:2488: \$? = $ac_status" >&5
2489 (exit "$ac_status"); } >/dev/null; then
2490 if test -s conftest.err; then
2491 ac_cpp_err=$ac_c_preproc_warn_flag
2498 if test -z "$ac_cpp_err"; then
2501 echo "$as_me: failed program was:" >&5
2502 cat "conftest.$ac_ext" >&5
2503 # Broken: fails on valid input.
2506 rm -f conftest.err "conftest.$ac_ext"
2508 # OK, works on sane cases. Now check whether non-existent headers
2509 # can be detected and how.
2510 cat >"conftest.$ac_ext" <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513 #include <ac_nonexistent.h>
2515 if { (eval echo "$as_me:2515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2520 cat conftest.err >&5
2521 echo "$as_me:2521: \$? = $ac_status" >&5
2522 (exit "$ac_status"); } >/dev/null; then
2523 if test -s conftest.err; then
2524 ac_cpp_err=$ac_c_preproc_warn_flag
2531 if test -z "$ac_cpp_err"; then
2532 # Broken: success on invalid input.
2535 echo "$as_me: failed program was:" >&5
2536 cat "conftest.$ac_ext" >&5
2537 # Passes both tests.
2541 rm -f conftest.err "conftest.$ac_ext"
2544 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2545 rm -f conftest.err "conftest.$ac_ext"
2546 if $ac_preproc_ok; then
2558 echo "$as_me:2558: result: $CPP" >&5
2559 echo "${ECHO_T}$CPP" >&6
2561 for ac_c_preproc_warn_flag in '' yes
2563 # Use a header file that comes with gcc, so configuring glibc
2564 # with a fresh cross-compiler works.
2565 # On the NeXT, cc -E runs the code through the compiler's parser,
2566 # not just through cpp. "Syntax error" is here to catch this case.
2567 cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2573 if { (eval echo "$as_me:2573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2574 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2576 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2578 cat conftest.err >&5
2579 echo "$as_me:2579: \$? = $ac_status" >&5
2580 (exit "$ac_status"); } >/dev/null; then
2581 if test -s conftest.err; then
2582 ac_cpp_err=$ac_c_preproc_warn_flag
2589 if test -z "$ac_cpp_err"; then
2592 echo "$as_me: failed program was:" >&5
2593 cat "conftest.$ac_ext" >&5
2594 # Broken: fails on valid input.
2597 rm -f conftest.err "conftest.$ac_ext"
2599 # OK, works on sane cases. Now check whether non-existent headers
2600 # can be detected and how.
2601 cat >"conftest.$ac_ext" <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <ac_nonexistent.h>
2606 if { (eval echo "$as_me:2606: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2607 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2609 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2611 cat conftest.err >&5
2612 echo "$as_me:2612: \$? = $ac_status" >&5
2613 (exit "$ac_status"); } >/dev/null; then
2614 if test -s conftest.err; then
2615 ac_cpp_err=$ac_c_preproc_warn_flag
2622 if test -z "$ac_cpp_err"; then
2623 # Broken: success on invalid input.
2626 echo "$as_me: failed program was:" >&5
2627 cat "conftest.$ac_ext" >&5
2628 # Passes both tests.
2632 rm -f conftest.err "conftest.$ac_ext"
2635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2636 rm -f conftest.err "conftest.$ac_ext"
2637 if $ac_preproc_ok; then
2640 { { echo "$as_me:2640: error: C preprocessor \"$CPP\" fails sanity check" >&5
2641 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2642 { (exit 1); exit 1; }; }
2646 ac_cpp='$CPP $CPPFLAGS'
2647 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2648 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2650 ac_main_return="return"
2652 if test $ac_cv_c_compiler_gnu = yes; then
2653 echo "$as_me:2653: checking whether $CC needs -traditional" >&5
2654 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2655 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2656 echo $ECHO_N "(cached) $ECHO_C" >&6
2658 ac_pattern="Autoconf.*'x'"
2659 cat >"conftest.$ac_ext" <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2663 int Autoconf = TIOCGETP;
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2667 ac_cv_prog_gcc_traditional=yes
2669 ac_cv_prog_gcc_traditional=no
2673 if test $ac_cv_prog_gcc_traditional = no; then
2674 cat >"conftest.$ac_ext" <<_ACEOF
2675 #line 2675 "configure"
2676 #include "confdefs.h"
2678 int Autoconf = TCGETA;
2680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2681 $EGREP "$ac_pattern" >/dev/null 2>&1; then
2682 ac_cv_prog_gcc_traditional=yes
2688 echo "$as_me:2688: result: $ac_cv_prog_gcc_traditional" >&5
2689 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2690 if test $ac_cv_prog_gcc_traditional = yes; then
2691 CC="$CC -traditional"
2695 echo "$as_me:2695: checking whether $CC understands -c and -o together" >&5
2696 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2697 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2698 echo $ECHO_N "(cached) $ECHO_C" >&6
2701 cat > conftest.$ac_ext <<CF_EOF
2704 ${cf_cv_main_return:-return}(0);
2707 # We do the test twice because some compilers refuse to overwrite an
2708 # existing .o file with -o, though they will create one.
2709 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2710 if { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2713 echo "$as_me:2713: \$? = $ac_status" >&5
2714 (exit "$ac_status"); } &&
2715 test -f conftest2.$ac_objext && { (eval echo "$as_me:2715: \"$ac_try\"") >&5
2718 echo "$as_me:2718: \$? = $ac_status" >&5
2719 (exit "$ac_status"); };
2721 eval cf_cv_prog_CC_c_o=yes
2723 eval cf_cv_prog_CC_c_o=no
2728 if test "$cf_cv_prog_CC_c_o" = yes; then
2729 echo "$as_me:2729: result: yes" >&5
2730 echo "${ECHO_T}yes" >&6
2732 echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2736 test "$program_prefix" != NONE &&
2737 program_transform_name="s,^,$program_prefix,;$program_transform_name"
2738 # Use a double $ so make ignores it.
2739 test "$program_suffix" != NONE &&
2740 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2741 # Double any \ or $. echo might interpret backslashes.
2742 # By default was `s,x,x', remove it if useless.
2743 cat <<\_ACEOF >conftest.sed
2744 s/[\\$]/&&/g;s/;s,x,x,$//
2746 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2749 for ac_prog in mawk gawk nawk awk
2751 # Extract the first word of "$ac_prog", so it can be a program name with args.
2752 set dummy $ac_prog; ac_word=$2
2753 echo "$as_me:2753: checking for $ac_word" >&5
2754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2755 if test "${ac_cv_prog_AWK+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
2758 if test -n "$AWK"; then
2759 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2761 ac_save_IFS=$IFS; IFS=$ac_path_separator
2763 for ac_dir in $ac_dummy; do
2765 test -z "$ac_dir" && ac_dir=.
2766 $as_executable_p "$ac_dir/$ac_word" || continue
2767 ac_cv_prog_AWK="$ac_prog"
2768 echo "$as_me:2768: found $ac_dir/$ac_word" >&5
2775 if test -n "$AWK"; then
2776 echo "$as_me:2776: result: $AWK" >&5
2777 echo "${ECHO_T}$AWK" >&6
2779 echo "$as_me:2779: result: no" >&5
2780 echo "${ECHO_T}no" >&6
2783 test -n "$AWK" && break
2786 test -z "$AWK" && { { echo "$as_me:2786: error: No awk program found" >&5
2787 echo "$as_me: error: No awk program found" >&2;}
2788 { (exit 1); exit 1; }; }
2790 echo "$as_me:2790: checking for egrep" >&5
2791 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2792 if test "${ac_cv_prog_egrep+set}" = set; then
2793 echo $ECHO_N "(cached) $ECHO_C" >&6
2795 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2796 then ac_cv_prog_egrep='grep -E'
2797 else ac_cv_prog_egrep='egrep'
2800 echo "$as_me:2800: result: $ac_cv_prog_egrep" >&5
2801 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2802 EGREP=$ac_cv_prog_egrep
2804 test -z "$EGREP" && { { echo "$as_me:2804: error: No egrep program found" >&5
2805 echo "$as_me: error: No egrep program found" >&2;}
2806 { (exit 1); exit 1; }; }
2808 # Find a good install program. We prefer a C program (faster),
2809 # so one script is as good as another. But avoid the broken or
2810 # incompatible versions:
2811 # SysV /etc/install, /usr/sbin/install
2812 # SunOS /usr/etc/install
2813 # IRIX /sbin/install
2815 # AmigaOS /C/install, which installs bootblocks on floppy discs
2816 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2817 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2818 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2819 # ./install, which can be erroneously created by make from ./install.sh.
2820 echo "$as_me:2820: checking for a BSD compatible install" >&5
2821 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2822 if test -z "$INSTALL"; then
2823 if test "${ac_cv_path_install+set}" = set; then
2824 echo $ECHO_N "(cached) $ECHO_C" >&6
2826 ac_save_IFS=$IFS; IFS=$ac_path_separator
2827 for ac_dir in $PATH; do
2829 # Account for people who put trailing slashes in PATH elements.
2831 / | ./ | .// | /cC/* \
2832 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2835 # OSF1 and SCO ODT 3.0 have their own names for install.
2836 # Don't use installbsd from OSF since it installs stuff as root
2838 for ac_prog in ginstall scoinst install; do
2839 if $as_executable_p "$ac_dir/$ac_prog"; then
2840 if test $ac_prog = install &&
2841 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2842 # AIX install. It has an incompatible calling convention.
2844 elif test $ac_prog = install &&
2845 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2846 # program-specific install script used by HP pwplus--don't use.
2849 ac_cv_path_install="$ac_dir/$ac_prog -c"
2859 if test "${ac_cv_path_install+set}" = set; then
2860 INSTALL=$ac_cv_path_install
2862 # As a last resort, use the slow shell script. We don't cache a
2863 # path for INSTALL within a source directory, because that will
2864 # break other packages using the cache if that directory is
2865 # removed, or if the path is relative.
2866 INSTALL=$ac_install_sh
2869 echo "$as_me:2869: result: $INSTALL" >&5
2870 echo "${ECHO_T}$INSTALL" >&6
2872 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2873 # It thinks the first close brace ends the variable substitution.
2874 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2876 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2880 echo "$as_me:2880: checking whether ln -s works" >&5
2881 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2883 if test "$LN_S" = "ln -s"; then
2884 echo "$as_me:2884: result: yes" >&5
2885 echo "${ECHO_T}yes" >&6
2887 echo "$as_me:2887: result: no, using $LN_S" >&5
2888 echo "${ECHO_T}no, using $LN_S" >&6
2891 echo "$as_me:2891: checking if $LN_S -f options work" >&5
2892 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
2894 rm -f conf$$.src conf$$dst
2896 echo first >conf$$.src
2897 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
2902 rm -f conf$$.dst conf$$src
2903 echo "$as_me:2903: result: $cf_prog_ln_sf" >&5
2904 echo "${ECHO_T}$cf_prog_ln_sf" >&6
2906 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
2908 # Find a good install program. We prefer a C program (faster),
2909 # so one script is as good as another. But avoid the broken or
2910 # incompatible versions:
2911 # SysV /etc/install, /usr/sbin/install
2912 # SunOS /usr/etc/install
2913 # IRIX /sbin/install
2915 # AmigaOS /C/install, which installs bootblocks on floppy discs
2916 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2917 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2918 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2919 # ./install, which can be erroneously created by make from ./install.sh.
2920 echo "$as_me:2920: checking for a BSD compatible install" >&5
2921 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2922 if test -z "$INSTALL"; then
2923 if test "${ac_cv_path_install+set}" = set; then
2924 echo $ECHO_N "(cached) $ECHO_C" >&6
2926 ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 for ac_dir in $PATH; do
2929 # Account for people who put trailing slashes in PATH elements.
2931 / | ./ | .// | /cC/* \
2932 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2938 for ac_prog in ginstall scoinst install; do
2939 if $as_executable_p "$ac_dir/$ac_prog"; then
2940 if test $ac_prog = install &&
2941 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2944 elif test $ac_prog = install &&
2945 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2946 # program-specific install script used by HP pwplus--don't use.
2949 ac_cv_path_install="$ac_dir/$ac_prog -c"
2959 if test "${ac_cv_path_install+set}" = set; then
2960 INSTALL=$ac_cv_path_install
2962 # As a last resort, use the slow shell script. We don't cache a
2963 # path for INSTALL within a source directory, because that will
2964 # break other packages using the cache if that directory is
2965 # removed, or if the path is relative.
2966 INSTALL=$ac_install_sh
2969 echo "$as_me:2969: result: $INSTALL" >&5
2970 echo "${ECHO_T}$INSTALL" >&6
2972 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2973 # It thinks the first close brace ends the variable substitution.
2974 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2976 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2978 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2984 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2985 test -z "$cf_dir" && cf_dir=.
2986 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2990 echo "$as_me:2990: checking if you want to install stripped executables" >&5
2991 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2993 # Check whether --enable-stripping or --disable-stripping was given.
2994 if test "${enable_stripping+set}" = set; then
2995 enableval="$enable_stripping"
2996 test "$enableval" != no && enableval=yes
2997 if test "$enableval" != "yes" ; then
3000 enable_stripping=yes
3004 enable_stripping=yes
3007 echo "$as_me:3007: result: $enable_stripping" >&5
3008 echo "${ECHO_T}$enable_stripping" >&6
3010 if test "$enable_stripping" = yes
3017 : "${INSTALL:=install}"
3018 echo "$as_me:3018: checking if install accepts -p option" >&5
3019 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
3020 if test "${cf_cv_install_p+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
3028 if $INSTALL -p conftest.in conftest.out 2>/dev/null
3030 if test -f conftest.out/conftest.in
3032 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
3033 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
3034 if test -s conftest.err
3049 echo "$as_me:3049: result: $cf_cv_install_p" >&5
3050 echo "${ECHO_T}$cf_cv_install_p" >&6
3052 echo "$as_me:3052: checking if install needs to be told about ownership" >&5
3053 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
3054 case `$ac_config_guess` in
3063 echo "$as_me:3063: result: $with_install_o" >&5
3064 echo "${ECHO_T}$with_install_o" >&6
3065 if test "x$with_install_o" = xyes
3067 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
3072 echo "$as_me:3072: checking for long file names" >&5
3073 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3074 if test "${ac_cv_sys_long_file_names+set}" = set; then
3075 echo $ECHO_N "(cached) $ECHO_C" >&6
3077 ac_cv_sys_long_file_names=yes
3078 # Test for long file names in all the places we know might matter:
3079 # . the current directory, where building will happen
3080 # $prefix/lib where we will be installing things
3081 # $exec_prefix/lib likewise
3082 # eval it to expand exec_prefix.
3083 # $TMPDIR if set, where it might want to write temporary files
3084 # if $TMPDIR is not set:
3085 # /tmp where it might want to write temporary files
3088 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3091 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3093 for ac_dir in . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3094 test -d "$ac_dir" || continue
3095 test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3096 ac_xdir=$ac_dir/cf$$
3097 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3098 ac_tf1=$ac_xdir/conftest9012345
3099 ac_tf2=$ac_xdir/conftest9012346
3100 (echo 1 >"$ac_tf1") 2>/dev/null
3101 (echo 2 >"$ac_tf2") 2>/dev/null
3102 ac_val=`cat "$ac_tf1" 2>/dev/null`
3103 if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3104 ac_cv_sys_long_file_names=no
3105 rm -rf "$ac_xdir" 2>/dev/null
3108 rm -rf "$ac_xdir" 2>/dev/null
3111 echo "$as_me:3111: result: $ac_cv_sys_long_file_names" >&5
3112 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3113 if test "$ac_cv_sys_long_file_names" = yes; then
3115 cat >>confdefs.h <<\EOF
3116 #define HAVE_LONG_FILE_NAMES 1
3121 # if we find pkg-config, check if we should install the ".pc" files.
3123 echo "$as_me:3123: checking if you want to use pkg-config" >&5
3124 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3126 # Check whether --with-pkg-config or --without-pkg-config was given.
3127 if test "${with_pkg_config+set}" = set; then
3128 withval="$with_pkg_config"
3129 cf_pkg_config=$withval
3133 echo "$as_me:3133: result: $cf_pkg_config" >&5
3134 echo "${ECHO_T}$cf_pkg_config" >&6
3136 case "$cf_pkg_config" in
3142 if test -n "$ac_tool_prefix"; then
3143 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3144 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3145 echo "$as_me:3145: checking for $ac_word" >&5
3146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3147 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3148 echo $ECHO_N "(cached) $ECHO_C" >&6
3152 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3155 ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 for ac_dir in $ac_dummy; do
3159 test -z "$ac_dir" && ac_dir=.
3160 if $as_executable_p "$ac_dir/$ac_word"; then
3161 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3162 echo "$as_me:3162: found $ac_dir/$ac_word" >&5
3170 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3172 if test -n "$PKG_CONFIG"; then
3173 echo "$as_me:3173: result: $PKG_CONFIG" >&5
3174 echo "${ECHO_T}$PKG_CONFIG" >&6
3176 echo "$as_me:3176: result: no" >&5
3177 echo "${ECHO_T}no" >&6
3181 if test -z "$ac_cv_path_PKG_CONFIG"; then
3182 ac_pt_PKG_CONFIG=$PKG_CONFIG
3183 # Extract the first word of "pkg-config", so it can be a program name with args.
3184 set dummy pkg-config; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3188 echo $ECHO_N "(cached) $ECHO_C" >&6
3190 case $ac_pt_PKG_CONFIG in
3192 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3195 ac_save_IFS=$IFS; IFS=$ac_path_separator
3197 for ac_dir in $ac_dummy; do
3199 test -z "$ac_dir" && ac_dir=.
3200 if $as_executable_p "$ac_dir/$ac_word"; then
3201 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3202 echo "$as_me:3202: found $ac_dir/$ac_word" >&5
3207 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3213 if test -n "$ac_pt_PKG_CONFIG"; then
3214 echo "$as_me:3214: result: $ac_pt_PKG_CONFIG" >&5
3215 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3217 echo "$as_me:3217: result: no" >&5
3218 echo "${ECHO_T}no" >&6
3221 PKG_CONFIG=$ac_pt_PKG_CONFIG
3223 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3232 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3233 if test "$PKG_CONFIG" != none ; then
3235 if test "x$prefix" != xNONE; then
3236 cf_path_syntax="$prefix"
3238 cf_path_syntax="$ac_default_prefix"
3241 case ".$PKG_CONFIG" in
3246 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3248 (.\$\{*prefix\}*|.\$\{*dir\}*)
3249 eval PKG_CONFIG="$PKG_CONFIG"
3250 case ".$PKG_CONFIG" in
3252 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3257 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
3260 { { echo "$as_me:3260: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3261 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3262 { (exit 1); exit 1; }; }
3266 elif test "x$cf_pkg_config" != xno ; then
3267 { echo "$as_me:3267: WARNING: pkg-config is not installed" >&5
3268 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3271 case "$PKG_CONFIG" in
3273 echo "$as_me:3273: checking for pkg-config library directory" >&5
3274 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3277 echo "$as_me:3277: checking for $PKG_CONFIG library directory" >&5
3278 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3282 PKG_CONFIG_LIBDIR=no
3284 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3285 if test "${with_pkg_config_libdir+set}" = set; then
3286 withval="$with_pkg_config_libdir"
3287 PKG_CONFIG_LIBDIR=$withval
3289 test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3292 case x$PKG_CONFIG_LIBDIR in
3296 # Look for the library directory using the same prefix as the executable
3297 if test "x$PKG_CONFIG" = xnone
3301 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3304 # If you don't like using the default architecture, you have to specify the
3305 # intended library directory and corresponding compiler/linker options.
3307 # This case allows for Debian's 2014-flavor of multiarch, along with the
3308 # most common variations before that point. Some other variants spell the
3309 # directory differently, e.g., "pkg-config", and put it in unusual places.
3310 # pkg-config has always been poorly standardized, which is ironic...
3311 case x`(arch) 2>/dev/null` in
3314 $cf_path/lib/*64-linux-gnu \
3322 $cf_path/lib/*-linux-gnu \
3330 test -n "$verbose" && echo " list..." 1>&6
3332 echo "${as_me:-configure}:3332: testing list... ..." 1>&5
3334 for cf_config in $cf_search_path
3336 test -n "$verbose" && echo " checking $cf_config/pkgconfig" 1>&6
3338 echo "${as_me:-configure}:3338: testing checking $cf_config/pkgconfig ..." 1>&5
3340 if test -d "$cf_config/pkgconfig"
3342 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3343 echo "$as_me:3343: checking done" >&5
3344 echo $ECHO_N "checking done... $ECHO_C" >&6
3353 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3354 echo "$as_me:3354: result: $PKG_CONFIG_LIBDIR" >&5
3355 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3358 echo "$as_me:3358: checking if you want to build test-programs" >&5
3359 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3361 # Check whether --with-tests or --without-tests was given.
3362 if test "${with_tests+set}" = set; then
3363 withval="$with_tests"
3364 cf_with_tests=$withval
3368 echo "$as_me:3368: result: $cf_with_tests" >&5
3369 echo "${ECHO_T}$cf_with_tests" >&6
3371 echo "$as_me:3371: checking if we should assume mixed-case filenames" >&5
3372 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3374 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3375 if test "${enable_mixed_case+set}" = set; then
3376 enableval="$enable_mixed_case"
3377 enable_mixedcase=$enableval
3379 enable_mixedcase=auto
3381 echo "$as_me:3381: result: $enable_mixedcase" >&5
3382 echo "${ECHO_T}$enable_mixedcase" >&6
3383 if test "$enable_mixedcase" = "auto" ; then
3385 echo "$as_me:3385: checking if filesystem supports mixed-case filenames" >&5
3386 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3387 if test "${cf_cv_mixedcase+set}" = set; then
3388 echo $ECHO_N "(cached) $ECHO_C" >&6
3391 if test "$cross_compiling" = yes ; then
3392 case "$target_alias" in
3393 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3401 rm -f conftest CONFTEST
3403 if test -f CONFTEST ; then
3408 rm -f conftest CONFTEST
3412 echo "$as_me:3412: result: $cf_cv_mixedcase" >&5
3413 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3414 test "$cf_cv_mixedcase" = yes &&
3415 cat >>confdefs.h <<\EOF
3416 #define MIXEDCASE_FILENAMES 1
3420 cf_cv_mixedcase=$enable_mixedcase
3421 if test "$enable_mixedcase" = "yes" ; then
3422 cat >>confdefs.h <<\EOF
3423 #define MIXEDCASE_FILENAMES 1
3429 # do this after mixed-case option (tags/TAGS is not as important as tic).
3430 echo "$as_me:3430: checking whether ${MAKE-make} sets \${MAKE}" >&5
3431 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3432 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3433 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3434 echo $ECHO_N "(cached) $ECHO_C" >&6
3436 cat >conftest.make <<\EOF
3438 @echo 'ac_maketemp="${MAKE}"'
3440 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3441 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3442 if test -n "$ac_maketemp"; then
3443 eval ac_cv_prog_make_${ac_make}_set=yes
3445 eval ac_cv_prog_make_${ac_make}_set=no
3449 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3450 echo "$as_me:3450: result: yes" >&5
3451 echo "${ECHO_T}yes" >&6
3454 echo "$as_me:3454: result: no" >&5
3455 echo "${ECHO_T}no" >&6
3456 SET_MAKE="MAKE=${MAKE-make}"
3459 for ac_prog in exctags ctags
3461 # Extract the first word of "$ac_prog", so it can be a program name with args.
3462 set dummy $ac_prog; ac_word=$2
3463 echo "$as_me:3463: checking for $ac_word" >&5
3464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3465 if test "${ac_cv_prog_CTAGS+set}" = set; then
3466 echo $ECHO_N "(cached) $ECHO_C" >&6
3468 if test -n "$CTAGS"; then
3469 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3471 ac_save_IFS=$IFS; IFS=$ac_path_separator
3473 for ac_dir in $ac_dummy; do
3475 test -z "$ac_dir" && ac_dir=.
3476 $as_executable_p "$ac_dir/$ac_word" || continue
3477 ac_cv_prog_CTAGS="$ac_prog"
3478 echo "$as_me:3478: found $ac_dir/$ac_word" >&5
3484 CTAGS=$ac_cv_prog_CTAGS
3485 if test -n "$CTAGS"; then
3486 echo "$as_me:3486: result: $CTAGS" >&5
3487 echo "${ECHO_T}$CTAGS" >&6
3489 echo "$as_me:3489: result: no" >&5
3490 echo "${ECHO_T}no" >&6
3493 test -n "$CTAGS" && break
3496 for ac_prog in exetags etags
3498 # Extract the first word of "$ac_prog", so it can be a program name with args.
3499 set dummy $ac_prog; ac_word=$2
3500 echo "$as_me:3500: checking for $ac_word" >&5
3501 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3502 if test "${ac_cv_prog_ETAGS+set}" = set; then
3503 echo $ECHO_N "(cached) $ECHO_C" >&6
3505 if test -n "$ETAGS"; then
3506 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3508 ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 for ac_dir in $ac_dummy; do
3512 test -z "$ac_dir" && ac_dir=.
3513 $as_executable_p "$ac_dir/$ac_word" || continue
3514 ac_cv_prog_ETAGS="$ac_prog"
3515 echo "$as_me:3515: found $ac_dir/$ac_word" >&5
3521 ETAGS=$ac_cv_prog_ETAGS
3522 if test -n "$ETAGS"; then
3523 echo "$as_me:3523: result: $ETAGS" >&5
3524 echo "${ECHO_T}$ETAGS" >&6
3526 echo "$as_me:3526: result: no" >&5
3527 echo "${ECHO_T}no" >&6
3530 test -n "$ETAGS" && break
3533 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3534 set dummy ${CTAGS:-ctags}; ac_word=$2
3535 echo "$as_me:3535: checking for $ac_word" >&5
3536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3537 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3540 if test -n "$MAKE_LOWER_TAGS"; then
3541 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3543 ac_save_IFS=$IFS; IFS=$ac_path_separator
3545 for ac_dir in $ac_dummy; do
3547 test -z "$ac_dir" && ac_dir=.
3548 $as_executable_p "$ac_dir/$ac_word" || continue
3549 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3550 echo "$as_me:3550: found $ac_dir/$ac_word" >&5
3554 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3557 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3558 if test -n "$MAKE_LOWER_TAGS"; then
3559 echo "$as_me:3559: result: $MAKE_LOWER_TAGS" >&5
3560 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3562 echo "$as_me:3562: result: no" >&5
3563 echo "${ECHO_T}no" >&6
3566 if test "$cf_cv_mixedcase" = yes ; then
3567 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3568 set dummy ${ETAGS:-etags}; ac_word=$2
3569 echo "$as_me:3569: checking for $ac_word" >&5
3570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3571 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3572 echo $ECHO_N "(cached) $ECHO_C" >&6
3574 if test -n "$MAKE_UPPER_TAGS"; then
3575 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3577 ac_save_IFS=$IFS; IFS=$ac_path_separator
3579 for ac_dir in $ac_dummy; do
3581 test -z "$ac_dir" && ac_dir=.
3582 $as_executable_p "$ac_dir/$ac_word" || continue
3583 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3584 echo "$as_me:3584: found $ac_dir/$ac_word" >&5
3588 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3591 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3592 if test -n "$MAKE_UPPER_TAGS"; then
3593 echo "$as_me:3593: result: $MAKE_UPPER_TAGS" >&5
3594 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3596 echo "$as_me:3596: result: no" >&5
3597 echo "${ECHO_T}no" >&6
3604 if test "$MAKE_UPPER_TAGS" = yes ; then
3610 if test "$MAKE_LOWER_TAGS" = yes ; then
3616 echo "$as_me:3616: checking for makeflags variable" >&5
3617 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3618 if test "${cf_cv_makeflags+set}" = set; then
3619 echo $ECHO_N "(cached) $ECHO_C" >&6
3623 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3625 cat >cf_makeflags.tmp <<CF_EOF
3628 @ echo '.$cf_option'
3630 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3631 case "$cf_result" in
3633 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3634 case "$cf_result" in
3635 (.*CC=*) cf_cv_makeflags=
3637 (*) cf_cv_makeflags=$cf_option
3646 echo "${as_me:-configure}:3646: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3651 rm -f cf_makeflags.tmp
3654 echo "$as_me:3654: result: $cf_cv_makeflags" >&5
3655 echo "${ECHO_T}$cf_cv_makeflags" >&6
3657 if test -n "$ac_tool_prefix"; then
3658 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3659 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3660 echo "$as_me:3660: checking for $ac_word" >&5
3661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3662 if test "${ac_cv_prog_RANLIB+set}" = set; then
3663 echo $ECHO_N "(cached) $ECHO_C" >&6
3665 if test -n "$RANLIB"; then
3666 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3668 ac_save_IFS=$IFS; IFS=$ac_path_separator
3670 for ac_dir in $ac_dummy; do
3672 test -z "$ac_dir" && ac_dir=.
3673 $as_executable_p "$ac_dir/$ac_word" || continue
3674 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3675 echo "$as_me:3675: found $ac_dir/$ac_word" >&5
3681 RANLIB=$ac_cv_prog_RANLIB
3682 if test -n "$RANLIB"; then
3683 echo "$as_me:3683: result: $RANLIB" >&5
3684 echo "${ECHO_T}$RANLIB" >&6
3686 echo "$as_me:3686: result: no" >&5
3687 echo "${ECHO_T}no" >&6
3691 if test -z "$ac_cv_prog_RANLIB"; then
3692 ac_ct_RANLIB=$RANLIB
3693 # Extract the first word of "ranlib", so it can be a program name with args.
3694 set dummy ranlib; ac_word=$2
3695 echo "$as_me:3695: checking for $ac_word" >&5
3696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3697 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3698 echo $ECHO_N "(cached) $ECHO_C" >&6
3700 if test -n "$ac_ct_RANLIB"; then
3701 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3703 ac_save_IFS=$IFS; IFS=$ac_path_separator
3705 for ac_dir in $ac_dummy; do
3707 test -z "$ac_dir" && ac_dir=.
3708 $as_executable_p "$ac_dir/$ac_word" || continue
3709 ac_cv_prog_ac_ct_RANLIB="ranlib"
3710 echo "$as_me:3710: found $ac_dir/$ac_word" >&5
3714 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3717 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3718 if test -n "$ac_ct_RANLIB"; then
3719 echo "$as_me:3719: result: $ac_ct_RANLIB" >&5
3720 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3722 echo "$as_me:3722: result: no" >&5
3723 echo "${ECHO_T}no" >&6
3726 RANLIB=$ac_ct_RANLIB
3728 RANLIB="$ac_cv_prog_RANLIB"
3731 if test -n "$ac_tool_prefix"; then
3732 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3733 set dummy ${ac_tool_prefix}ld; ac_word=$2
3734 echo "$as_me:3734: checking for $ac_word" >&5
3735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3736 if test "${ac_cv_prog_LD+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3739 if test -n "$LD"; then
3740 ac_cv_prog_LD="$LD" # Let the user override the test.
3742 ac_save_IFS=$IFS; IFS=$ac_path_separator
3744 for ac_dir in $ac_dummy; do
3746 test -z "$ac_dir" && ac_dir=.
3747 $as_executable_p "$ac_dir/$ac_word" || continue
3748 ac_cv_prog_LD="${ac_tool_prefix}ld"
3749 echo "$as_me:3749: found $ac_dir/$ac_word" >&5
3756 if test -n "$LD"; then
3757 echo "$as_me:3757: result: $LD" >&5
3758 echo "${ECHO_T}$LD" >&6
3760 echo "$as_me:3760: result: no" >&5
3761 echo "${ECHO_T}no" >&6
3765 if test -z "$ac_cv_prog_LD"; then
3767 # Extract the first word of "ld", so it can be a program name with args.
3768 set dummy ld; ac_word=$2
3769 echo "$as_me:3769: checking for $ac_word" >&5
3770 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3771 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3772 echo $ECHO_N "(cached) $ECHO_C" >&6
3774 if test -n "$ac_ct_LD"; then
3775 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3777 ac_save_IFS=$IFS; IFS=$ac_path_separator
3779 for ac_dir in $ac_dummy; do
3781 test -z "$ac_dir" && ac_dir=.
3782 $as_executable_p "$ac_dir/$ac_word" || continue
3783 ac_cv_prog_ac_ct_LD="ld"
3784 echo "$as_me:3784: found $ac_dir/$ac_word" >&5
3788 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3791 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3792 if test -n "$ac_ct_LD"; then
3793 echo "$as_me:3793: result: $ac_ct_LD" >&5
3794 echo "${ECHO_T}$ac_ct_LD" >&6
3796 echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3805 if test -n "$ac_tool_prefix"; then
3806 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3807 set dummy ${ac_tool_prefix}ar; ac_word=$2
3808 echo "$as_me:3808: checking for $ac_word" >&5
3809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3810 if test "${ac_cv_prog_AR+set}" = set; then
3811 echo $ECHO_N "(cached) $ECHO_C" >&6
3813 if test -n "$AR"; then
3814 ac_cv_prog_AR="$AR" # Let the user override the test.
3816 ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 for ac_dir in $ac_dummy; do
3820 test -z "$ac_dir" && ac_dir=.
3821 $as_executable_p "$ac_dir/$ac_word" || continue
3822 ac_cv_prog_AR="${ac_tool_prefix}ar"
3823 echo "$as_me:3823: found $ac_dir/$ac_word" >&5
3830 if test -n "$AR"; then
3831 echo "$as_me:3831: result: $AR" >&5
3832 echo "${ECHO_T}$AR" >&6
3834 echo "$as_me:3834: result: no" >&5
3835 echo "${ECHO_T}no" >&6
3839 if test -z "$ac_cv_prog_AR"; then
3841 # Extract the first word of "ar", so it can be a program name with args.
3842 set dummy ar; 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_ac_ct_AR+set}" = set; then
3846 echo $ECHO_N "(cached) $ECHO_C" >&6
3848 if test -n "$ac_ct_AR"; then
3849 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
3858 echo "$as_me:3858: found $ac_dir/$ac_word" >&5
3862 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3865 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3866 if test -n "$ac_ct_AR"; then
3867 echo "$as_me:3867: result: $ac_ct_AR" >&5
3868 echo "${ECHO_T}$ac_ct_AR" >&6
3870 echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3879 if test -n "$ac_tool_prefix"; then
3880 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3881 set dummy ${ac_tool_prefix}ar; ac_word=$2
3882 echo "$as_me:3882: checking for $ac_word" >&5
3883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3884 if test "${ac_cv_prog_AR+set}" = set; then
3885 echo $ECHO_N "(cached) $ECHO_C" >&6
3887 if test -n "$AR"; then
3888 ac_cv_prog_AR="$AR" # Let the user override the test.
3890 ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 for ac_dir in $ac_dummy; do
3894 test -z "$ac_dir" && ac_dir=.
3895 $as_executable_p "$ac_dir/$ac_word" || continue
3896 ac_cv_prog_AR="${ac_tool_prefix}ar"
3897 echo "$as_me:3897: found $ac_dir/$ac_word" >&5
3904 if test -n "$AR"; then
3905 echo "$as_me:3905: result: $AR" >&5
3906 echo "${ECHO_T}$AR" >&6
3908 echo "$as_me:3908: result: no" >&5
3909 echo "${ECHO_T}no" >&6
3913 if test -z "$ac_cv_prog_AR"; then
3915 # Extract the first word of "ar", so it can be a program name with args.
3916 set dummy ar; 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_ac_ct_AR+set}" = set; then
3920 echo $ECHO_N "(cached) $ECHO_C" >&6
3922 if test -n "$ac_ct_AR"; then
3923 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
3932 echo "$as_me:3932: found $ac_dir/$ac_word" >&5
3936 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3939 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3940 if test -n "$ac_ct_AR"; then
3941 echo "$as_me:3941: result: $ac_ct_AR" >&5
3942 echo "${ECHO_T}$ac_ct_AR" >&6
3944 echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3953 echo "$as_me:3953: checking for options to update archives" >&5
3954 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3955 if test "${cf_cv_ar_flags+set}" = set; then
3956 echo $ECHO_N "(cached) $ECHO_C" >&6
3959 case "$cf_cv_system_name" in
3962 cat >mk_static_lib.sh <<-EOF
3967 exec \$MSVC_BIN -out:"\$out" \$@
3969 chmod +x mk_static_lib.sh
3970 AR=`pwd`/mk_static_lib.sh
3973 cf_cv_ar_flags=unknown
3974 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3977 # check if $ARFLAGS already contains this choice
3978 if test "x$ARFLAGS" != "x" ; then
3979 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3980 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3986 rm -f "conftest.$ac_cv_objext"
3989 cat >"conftest.$ac_ext" <<EOF
3990 #line 3990 "configure"
3991 int testdata[3] = { 123, 456, 789 };
3993 if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
3994 (eval $ac_compile) 2>&5
3996 echo "$as_me:3996: \$? = $ac_status" >&5
3997 (exit "$ac_status"); } ; then
3998 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3999 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4000 if test -f conftest.a ; then
4001 cf_cv_ar_flags="$cf_ar_flags"
4005 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4007 echo "${as_me:-configure}:4007: testing cannot compile test-program ..." 1>&5
4012 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4017 echo "$as_me:4017: result: $cf_cv_ar_flags" >&5
4018 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4020 if test -n "$ARFLAGS" ; then
4021 if test -n "$cf_cv_ar_flags" ; then
4022 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4025 ARFLAGS=$cf_cv_ar_flags
4028 echo "$as_me:4028: checking for PATH separator" >&5
4029 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4030 case "$cf_cv_system_name" in
4031 (os2*) PATH_SEPARATOR=';' ;;
4032 (*) ${PATH_SEPARATOR:=':'} ;;
4035 echo "$as_me:4035: result: $PATH_SEPARATOR" >&5
4036 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4038 echo "$as_me:4038: checking if you have specified an install-prefix" >&5
4039 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4041 # Check whether --with-install-prefix or --without-install-prefix was given.
4042 if test "${with_install_prefix+set}" = set; then
4043 withval="$with_install_prefix"
4047 (*) DESTDIR="$withval"
4051 echo "$as_me:4051: result: $DESTDIR" >&5
4052 echo "${ECHO_T}$DESTDIR" >&6
4054 ###############################################################################
4056 # If we're cross-compiling, allow the user to override the tools and their
4057 # options. The configure script is oriented toward identifying the host
4058 # compiler, etc., but we need a build compiler to generate parts of the source.
4060 if test "$cross_compiling" = yes ; then
4062 # defaults that we might want to override
4063 : ${BUILD_CFLAGS:=''}
4064 : ${BUILD_CPPFLAGS:=''}
4065 : ${BUILD_LDFLAGS:=''}
4067 : ${BUILD_EXEEXT:='$x'}
4068 : ${BUILD_OBJEXT:='o'}
4070 # Check whether --with-build-cc or --without-build-cc was given.
4071 if test "${with_build_cc+set}" = set; then
4072 withval="$with_build_cc"
4075 for ac_prog in gcc clang c99 c89 cc cl
4077 # Extract the first word of "$ac_prog", so it can be a program name with args.
4078 set dummy $ac_prog; ac_word=$2
4079 echo "$as_me:4079: checking for $ac_word" >&5
4080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4081 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4082 echo $ECHO_N "(cached) $ECHO_C" >&6
4084 if test -n "$BUILD_CC"; then
4085 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4087 ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 for ac_dir in $ac_dummy; do
4091 test -z "$ac_dir" && ac_dir=.
4092 $as_executable_p "$ac_dir/$ac_word" || continue
4093 ac_cv_prog_BUILD_CC="$ac_prog"
4094 echo "$as_me:4094: found $ac_dir/$ac_word" >&5
4100 BUILD_CC=$ac_cv_prog_BUILD_CC
4101 if test -n "$BUILD_CC"; then
4102 echo "$as_me:4102: result: $BUILD_CC" >&5
4103 echo "${ECHO_T}$BUILD_CC" >&6
4105 echo "$as_me:4105: result: no" >&5
4106 echo "${ECHO_T}no" >&6
4109 test -n "$BUILD_CC" && break
4111 test -n "$BUILD_CC" || BUILD_CC="none"
4114 echo "$as_me:4114: checking for native build C compiler" >&5
4115 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4116 echo "$as_me:4116: result: $BUILD_CC" >&5
4117 echo "${ECHO_T}$BUILD_CC" >&6
4119 echo "$as_me:4119: checking for native build C preprocessor" >&5
4120 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4122 # Check whether --with-build-cpp or --without-build-cpp was given.
4123 if test "${with_build_cpp+set}" = set; then
4124 withval="$with_build_cpp"
4125 BUILD_CPP="$withval"
4127 BUILD_CPP='${BUILD_CC} -E'
4129 echo "$as_me:4129: result: $BUILD_CPP" >&5
4130 echo "${ECHO_T}$BUILD_CPP" >&6
4132 echo "$as_me:4132: checking for native build C flags" >&5
4133 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4135 # Check whether --with-build-cflags or --without-build-cflags was given.
4136 if test "${with_build_cflags+set}" = set; then
4137 withval="$with_build_cflags"
4138 BUILD_CFLAGS="$withval"
4140 echo "$as_me:4140: result: $BUILD_CFLAGS" >&5
4141 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4143 echo "$as_me:4143: checking for native build C preprocessor-flags" >&5
4144 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4146 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4147 if test "${with_build_cppflags+set}" = set; then
4148 withval="$with_build_cppflags"
4149 BUILD_CPPFLAGS="$withval"
4151 echo "$as_me:4151: result: $BUILD_CPPFLAGS" >&5
4152 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4154 echo "$as_me:4154: checking for native build linker-flags" >&5
4155 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4157 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4158 if test "${with_build_ldflags+set}" = set; then
4159 withval="$with_build_ldflags"
4160 BUILD_LDFLAGS="$withval"
4162 echo "$as_me:4162: result: $BUILD_LDFLAGS" >&5
4163 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4165 echo "$as_me:4165: checking for native build linker-libraries" >&5
4166 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4168 # Check whether --with-build-libs or --without-build-libs was given.
4169 if test "${with_build_libs+set}" = set; then
4170 withval="$with_build_libs"
4171 BUILD_LIBS="$withval"
4173 echo "$as_me:4173: result: $BUILD_LIBS" >&5
4174 echo "${ECHO_T}$BUILD_LIBS" >&6
4176 # this assumes we're on Unix.
4180 : ${BUILD_CC:='${CC}'}
4182 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4183 { { echo "$as_me:4183: error: Cross-build requires two compilers.
4184 Use --with-build-cc to specify the native compiler." >&5
4185 echo "$as_me: error: Cross-build requires two compilers.
4186 Use --with-build-cc to specify the native compiler." >&2;}
4187 { (exit 1); exit 1; }; }
4191 : ${BUILD_CC:='${CC}'}
4192 : ${BUILD_CPP:='${CPP}'}
4193 : ${BUILD_CFLAGS:='${CFLAGS}'}
4194 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4195 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4196 : ${BUILD_LIBS:='${LIBS}'}
4197 : ${BUILD_EXEEXT:='$x'}
4198 : ${BUILD_OBJEXT:='o'}
4201 ###############################################################################
4203 ### Options to allow the user to specify the set of libraries which are used.
4204 ### Use "--without-normal --with-shared" to allow the default model to be
4205 ### shared, for example.
4208 echo "$as_me:4208: checking if you want to build shared C-objects" >&5
4209 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4211 # Check whether --with-shared or --without-shared was given.
4212 if test "${with_shared+set}" = set; then
4213 withval="$with_shared"
4214 with_shared=$withval
4218 echo "$as_me:4218: result: $with_shared" >&5
4219 echo "${ECHO_T}$with_shared" >&6
4220 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4222 echo "$as_me:4222: checking for specified models" >&5
4223 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4224 test -z "$cf_list_models" && cf_list_models=normal
4225 echo "$as_me:4225: result: $cf_list_models" >&5
4226 echo "${ECHO_T}$cf_list_models" >&6
4228 ### Use the first model as the default, and save its suffix for use in building
4229 ### up test-applications.
4230 echo "$as_me:4230: checking for default model" >&5
4231 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4232 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4233 echo "$as_me:4233: result: $DFT_LWR_MODEL" >&5
4234 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4236 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4238 echo "$as_me:4238: checking for specific curses-directory" >&5
4239 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4241 # Check whether --with-curses-dir or --without-curses-dir was given.
4242 if test "${with_curses_dir+set}" = set; then
4243 withval="$with_curses_dir"
4244 cf_cv_curses_dir=$withval
4248 echo "$as_me:4248: result: $cf_cv_curses_dir" >&5
4249 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4251 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4254 if test "x$prefix" != xNONE; then
4255 cf_path_syntax="$prefix"
4257 cf_path_syntax="$ac_default_prefix"
4265 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4267 (.\$\{*prefix\}*|.\$\{*dir\}*)
4268 eval withval="$withval"
4271 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4276 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4279 { { echo "$as_me:4279: error: expected a pathname, not \"$withval\"" >&5
4280 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4281 { (exit 1); exit 1; }; }
4285 if test -d "$cf_cv_curses_dir"
4288 if test -n "$cf_cv_curses_dir/include" ; then
4289 for cf_add_incdir in $cf_cv_curses_dir/include
4291 while test "$cf_add_incdir" != /usr/include
4293 if test -d "$cf_add_incdir"
4296 if test -n "$CFLAGS$CPPFLAGS" ; then
4297 # a loop is needed to ensure we can add subdirs of existing dirs
4298 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4299 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4300 cf_have_incdir=yes; break
4305 if test "$cf_have_incdir" = no ; then
4306 if test "$cf_add_incdir" = /usr/local/include ; then
4307 if test "$GCC" = yes
4309 cf_save_CPPFLAGS=$CPPFLAGS
4311 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4312 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4314 cat >"conftest.$ac_ext" <<_ACEOF
4315 #line 4315 "configure"
4316 #include "confdefs.h"
4326 rm -f "conftest.$ac_objext"
4327 if { (eval echo "$as_me:4327: \"$ac_compile\"") >&5
4328 (eval $ac_compile) 2>&5
4330 echo "$as_me:4330: \$? = $ac_status" >&5
4331 (exit "$ac_status"); } &&
4332 { ac_try='test -s "conftest.$ac_objext"'
4333 { (eval echo "$as_me:4333: \"$ac_try\"") >&5
4336 echo "$as_me:4336: \$? = $ac_status" >&5
4337 (exit "$ac_status"); }; }; then
4340 echo "$as_me: failed program was:" >&5
4341 cat "conftest.$ac_ext" >&5
4344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4345 CPPFLAGS=$cf_save_CPPFLAGS
4350 if test "$cf_have_incdir" = no ; then
4351 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4353 echo "${as_me:-configure}:4353: testing adding $cf_add_incdir to include-path ..." 1>&5
4355 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4357 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4358 test "$cf_top_incdir" = "$cf_add_incdir" && break
4359 cf_add_incdir="$cf_top_incdir"
4370 if test -n "$cf_cv_curses_dir/lib" ; then
4371 for cf_add_libdir in $cf_cv_curses_dir/lib
4373 if test "$cf_add_libdir" = /usr/lib ; then
4375 elif test -d "$cf_add_libdir"
4378 if test -n "$LDFLAGS$LIBS" ; then
4379 # a loop is needed to ensure we can add subdirs of existing dirs
4380 for cf_test_libdir in $LDFLAGS $LIBS ; do
4381 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4382 cf_have_libdir=yes; break
4386 if test "$cf_have_libdir" = no ; then
4387 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4389 echo "${as_me:-configure}:4389: testing adding $cf_add_libdir to library-path ..." 1>&5
4391 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4400 cf_ncuconfig_root=ncurses
4401 cf_have_ncuconfig=no
4403 if test "x${PKG_CONFIG:=none}" != xnone; then
4404 echo "$as_me:4404: checking pkg-config for $cf_ncuconfig_root" >&5
4405 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4406 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4407 echo "$as_me:4407: result: yes" >&5
4408 echo "${ECHO_T}yes" >&6
4410 echo "$as_me:4410: checking if the $cf_ncuconfig_root package files work" >&5
4411 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4412 cf_have_ncuconfig=unknown
4414 cf_save_CFLAGS="$CFLAGS"
4415 cf_save_CPPFLAGS="$CPPFLAGS"
4416 cf_save_LIBS="$LIBS"
4418 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4419 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4421 # while -W for passing linker flags is prevalent, it is not "standard".
4422 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4423 # incompatible _and_ non-standard -W option which gives an error. Work
4424 # around that pitfall.
4425 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4431 cf_new_extra_cppflags=
4433 for cf_add_cflags in $cf_pkg_cflags
4435 case "$cf_fix_cppflags" in
4437 case "$cf_add_cflags" in
4438 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4439 case "$cf_add_cflags" in
4441 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4443 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4444 && test -z "${cf_tst_cflags}" \
4445 && cf_fix_cppflags=yes
4447 if test "$cf_fix_cppflags" = yes ; then
4449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4453 elif test "${cf_tst_cflags}" = "\"'" ; then
4455 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4456 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4466 case "$cf_add_cflags" in
4468 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4470 CPPFLAGS=`echo "$CPPFLAGS" | \
4471 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4472 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4477 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4478 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4485 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4486 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4493 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4494 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4496 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4498 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4499 && test -z "${cf_tst_cflags}" \
4500 && cf_fix_cppflags=no
4505 if test -n "$cf_new_cflags" ; then
4507 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4508 CFLAGS="${CFLAGS}$cf_new_cflags"
4512 if test -n "$cf_new_cppflags" ; then
4514 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4515 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4519 if test -n "$cf_new_extra_cppflags" ; then
4521 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4522 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4529 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4531 for cf_add_1lib in $cf_add_0lib; do
4532 for cf_add_2lib in $cf_add_libs; do
4533 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4538 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4542 cat >"conftest.$ac_ext" <<_ACEOF
4543 #line 4543 "configure"
4544 #include "confdefs.h"
4545 #include <${cf_cv_ncurses_header:-curses.h}>
4549 initscr(); mousemask(0,0); tigetstr((char *)0);
4554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4555 if { (eval echo "$as_me:4555: \"$ac_link\"") >&5
4556 (eval $ac_link) 2>&5
4558 echo "$as_me:4558: \$? = $ac_status" >&5
4559 (exit "$ac_status"); } &&
4560 { ac_try='test -s "conftest$ac_exeext"'
4561 { (eval echo "$as_me:4561: \"$ac_try\"") >&5
4564 echo "$as_me:4564: \$? = $ac_status" >&5
4565 (exit "$ac_status"); }; }; then
4566 if test "$cross_compiling" = yes; then
4567 cf_test_ncuconfig=maybe
4569 cat >"conftest.$ac_ext" <<_ACEOF
4570 #line 4570 "configure"
4571 #include "confdefs.h"
4572 #include <${cf_cv_ncurses_header:-curses.h}>
4574 { const char *xx = curses_version(); return (xx == 0); }
4576 rm -f "conftest$ac_exeext"
4577 if { (eval echo "$as_me:4577: \"$ac_link\"") >&5
4578 (eval $ac_link) 2>&5
4580 echo "$as_me:4580: \$? = $ac_status" >&5
4581 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4582 { (eval echo "$as_me:4582: \"$ac_try\"") >&5
4585 echo "$as_me:4585: \$? = $ac_status" >&5
4586 (exit "$ac_status"); }; }; then
4587 cf_test_ncuconfig=yes
4589 echo "$as_me: program exited with status $ac_status" >&5
4590 echo "$as_me: failed program was:" >&5
4591 cat "conftest.$ac_ext" >&5
4592 cf_test_ncuconfig=no
4594 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4597 echo "$as_me: failed program was:" >&5
4598 cat "conftest.$ac_ext" >&5
4599 cf_test_ncuconfig=no
4601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4603 CFLAGS="$cf_save_CFLAGS"
4604 CPPFLAGS="$cf_save_CPPFLAGS"
4605 LIBS="$cf_save_LIBS"
4607 if test "x$cf_test_ncuconfig" != xyes; then
4608 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4609 cf_pkg_cflags="$cf_temp"
4610 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4611 cf_pkg_libs="$cf_temp"
4619 cf_new_extra_cppflags=
4621 for cf_add_cflags in $cf_pkg_cflags
4623 case "$cf_fix_cppflags" in
4625 case "$cf_add_cflags" in
4626 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4627 case "$cf_add_cflags" in
4629 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4631 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4632 && test -z "${cf_tst_cflags}" \
4633 && cf_fix_cppflags=yes
4635 if test "$cf_fix_cppflags" = yes ; then
4637 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4638 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4641 elif test "${cf_tst_cflags}" = "\"'" ; then
4643 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4644 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4654 case "$cf_add_cflags" in
4656 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4658 CPPFLAGS=`echo "$CPPFLAGS" | \
4659 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4660 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4665 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4666 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4673 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4674 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4681 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4682 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4684 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4686 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4687 && test -z "${cf_tst_cflags}" \
4688 && cf_fix_cppflags=no
4693 if test -n "$cf_new_cflags" ; then
4695 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4696 CFLAGS="${CFLAGS}$cf_new_cflags"
4700 if test -n "$cf_new_cppflags" ; then
4702 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4703 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4707 if test -n "$cf_new_extra_cppflags" ; then
4709 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4710 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4717 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4719 for cf_add_1lib in $cf_add_0lib; do
4720 for cf_add_2lib in $cf_add_libs; do
4721 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4726 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4730 cat >"conftest.$ac_ext" <<_ACEOF
4731 #line 4731 "configure"
4732 #include "confdefs.h"
4733 #include <${cf_cv_ncurses_header:-curses.h}>
4737 initscr(); mousemask(0,0); tigetstr((char *)0);
4742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4743 if { (eval echo "$as_me:4743: \"$ac_link\"") >&5
4744 (eval $ac_link) 2>&5
4746 echo "$as_me:4746: \$? = $ac_status" >&5
4747 (exit "$ac_status"); } &&
4748 { ac_try='test -s "conftest$ac_exeext"'
4749 { (eval echo "$as_me:4749: \"$ac_try\"") >&5
4752 echo "$as_me:4752: \$? = $ac_status" >&5
4753 (exit "$ac_status"); }; }; then
4754 if test "$cross_compiling" = yes; then
4755 cf_have_ncuconfig=maybe
4757 cat >"conftest.$ac_ext" <<_ACEOF
4758 #line 4758 "configure"
4759 #include "confdefs.h"
4760 #include <${cf_cv_ncurses_header:-curses.h}>
4762 { const char *xx = curses_version(); return (xx == 0); }
4764 rm -f "conftest$ac_exeext"
4765 if { (eval echo "$as_me:4765: \"$ac_link\"") >&5
4766 (eval $ac_link) 2>&5
4768 echo "$as_me:4768: \$? = $ac_status" >&5
4769 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4770 { (eval echo "$as_me:4770: \"$ac_try\"") >&5
4773 echo "$as_me:4773: \$? = $ac_status" >&5
4774 (exit "$ac_status"); }; }; then
4775 cf_have_ncuconfig=yes
4777 echo "$as_me: program exited with status $ac_status" >&5
4778 echo "$as_me: failed program was:" >&5
4779 cat "conftest.$ac_ext" >&5
4780 cf_have_ncuconfig=no
4782 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4785 echo "$as_me: failed program was:" >&5
4786 cat "conftest.$ac_ext" >&5
4787 cf_have_ncuconfig=no
4789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4790 echo "$as_me:4790: result: $cf_have_ncuconfig" >&5
4791 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4792 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4793 if test "$cf_have_ncuconfig" != "yes"
4795 CPPFLAGS="$cf_save_CPPFLAGS"
4796 LIBS="$cf_save_LIBS"
4797 NCURSES_CONFIG_PKG=none
4800 cat >>confdefs.h <<\EOF
4804 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4806 echo "$as_me:4806: checking for terminfo header" >&5
4807 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4808 if test "${cf_cv_term_header+set}" = set; then
4809 echo $ECHO_N "(cached) $ECHO_C" >&6
4812 case "${cf_cv_ncurses_header}" in
4813 (*/ncurses.h|*/ncursesw.h)
4814 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4817 cf_term_header=term.h
4821 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4823 cat >"conftest.$ac_ext" <<_ACEOF
4824 #line 4824 "configure"
4825 #include "confdefs.h"
4827 #include <${cf_cv_ncurses_header:-curses.h}>
4833 int x = auto_left_margin; (void)x
4838 rm -f "conftest.$ac_objext"
4839 if { (eval echo "$as_me:4839: \"$ac_compile\"") >&5
4840 (eval $ac_compile) 2>&5
4842 echo "$as_me:4842: \$? = $ac_status" >&5
4843 (exit "$ac_status"); } &&
4844 { ac_try='test -s "conftest.$ac_objext"'
4845 { (eval echo "$as_me:4845: \"$ac_try\"") >&5
4848 echo "$as_me:4848: \$? = $ac_status" >&5
4849 (exit "$ac_status"); }; }; then
4851 cf_cv_term_header="$cf_test"
4853 echo "$as_me: failed program was:" >&5
4854 cat "conftest.$ac_ext" >&5
4856 cf_cv_term_header=unknown
4859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4860 test "$cf_cv_term_header" != unknown && break
4864 echo "$as_me:4864: result: $cf_cv_term_header" >&5
4865 echo "${ECHO_T}$cf_cv_term_header" >&6
4867 # Set definitions to allow ifdef'ing to accommodate subdirectories
4869 case "$cf_cv_term_header" in
4872 cat >>confdefs.h <<\EOF
4873 #define HAVE_TERM_H 1
4879 case "$cf_cv_term_header" in
4882 cat >>confdefs.h <<\EOF
4883 #define HAVE_NCURSES_TERM_H 1
4889 cat >>confdefs.h <<\EOF
4890 #define HAVE_NCURSESW_TERM_H 1
4899 echo "$as_me:4899: result: no" >&5
4900 echo "${ECHO_T}no" >&6
4901 NCURSES_CONFIG_PKG=none
4904 NCURSES_CONFIG_PKG=none
4907 if test "x$cf_have_ncuconfig" = "xno"; then
4908 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4910 if test -n "$ac_tool_prefix"; then
4911 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4913 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4914 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4915 echo "$as_me:4915: checking for $ac_word" >&5
4916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4917 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4918 echo $ECHO_N "(cached) $ECHO_C" >&6
4920 if test -n "$NCURSES_CONFIG"; then
4921 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4923 ac_save_IFS=$IFS; IFS=$ac_path_separator
4925 for ac_dir in $ac_dummy; do
4927 test -z "$ac_dir" && ac_dir=.
4928 $as_executable_p "$ac_dir/$ac_word" || continue
4929 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4930 echo "$as_me:4930: found $ac_dir/$ac_word" >&5
4936 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4937 if test -n "$NCURSES_CONFIG"; then
4938 echo "$as_me:4938: result: $NCURSES_CONFIG" >&5
4939 echo "${ECHO_T}$NCURSES_CONFIG" >&6
4941 echo "$as_me:4941: result: no" >&5
4942 echo "${ECHO_T}no" >&6
4945 test -n "$NCURSES_CONFIG" && break
4948 if test -z "$NCURSES_CONFIG"; then
4949 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
4950 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4952 # Extract the first word of "$ac_prog", so it can be a program name with args.
4953 set dummy $ac_prog; ac_word=$2
4954 echo "$as_me:4954: checking for $ac_word" >&5
4955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4956 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
4957 echo $ECHO_N "(cached) $ECHO_C" >&6
4959 if test -n "$ac_ct_NCURSES_CONFIG"; then
4960 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
4962 ac_save_IFS=$IFS; IFS=$ac_path_separator
4964 for ac_dir in $ac_dummy; do
4966 test -z "$ac_dir" && ac_dir=.
4967 $as_executable_p "$ac_dir/$ac_word" || continue
4968 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
4969 echo "$as_me:4969: found $ac_dir/$ac_word" >&5
4975 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
4976 if test -n "$ac_ct_NCURSES_CONFIG"; then
4977 echo "$as_me:4977: result: $ac_ct_NCURSES_CONFIG" >&5
4978 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
4980 echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4984 test -n "$ac_ct_NCURSES_CONFIG" && break
4986 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
4988 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
4991 if test "$NCURSES_CONFIG" != none ; then
4996 cf_new_extra_cppflags=
4998 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5000 case "$cf_fix_cppflags" in
5002 case "$cf_add_cflags" in
5003 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5004 case "$cf_add_cflags" in
5006 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5008 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5009 && test -z "${cf_tst_cflags}" \
5010 && cf_fix_cppflags=yes
5012 if test "$cf_fix_cppflags" = yes ; then
5014 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5015 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5018 elif test "${cf_tst_cflags}" = "\"'" ; then
5020 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5021 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5031 case "$cf_add_cflags" in
5033 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5035 CPPFLAGS=`echo "$CPPFLAGS" | \
5036 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5037 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5042 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5043 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5050 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5051 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5058 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5059 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5061 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5063 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5064 && test -z "${cf_tst_cflags}" \
5065 && cf_fix_cppflags=no
5070 if test -n "$cf_new_cflags" ; then
5072 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5073 CFLAGS="${CFLAGS}$cf_new_cflags"
5077 if test -n "$cf_new_cppflags" ; then
5079 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5080 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5084 if test -n "$cf_new_extra_cppflags" ; then
5086 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5087 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5094 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5096 for cf_add_1lib in $cf_add_0lib; do
5097 for cf_add_2lib in $cf_add_libs; do
5098 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5103 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5107 # even with config script, some packages use no-override for curses.h
5109 echo "$as_me:5109: checking if we have identified curses headers" >&5
5110 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5111 if test "${cf_cv_ncurses_header+set}" = set; then
5112 echo $ECHO_N "(cached) $ECHO_C" >&6
5115 cf_cv_ncurses_header=none
5117 ncurses.h ncurses/ncurses.h \
5118 curses.h ncurses/curses.h
5120 cat >"conftest.$ac_ext" <<_ACEOF
5121 #line 5121 "configure"
5122 #include "confdefs.h"
5123 #include <${cf_header}>
5127 initscr(); tgoto("?", 0,0)
5132 rm -f "conftest.$ac_objext"
5133 if { (eval echo "$as_me:5133: \"$ac_compile\"") >&5
5134 (eval $ac_compile) 2>&5
5136 echo "$as_me:5136: \$? = $ac_status" >&5
5137 (exit "$ac_status"); } &&
5138 { ac_try='test -s "conftest.$ac_objext"'
5139 { (eval echo "$as_me:5139: \"$ac_try\"") >&5
5142 echo "$as_me:5142: \$? = $ac_status" >&5
5143 (exit "$ac_status"); }; }; then
5144 cf_cv_ncurses_header=$cf_header; break
5146 echo "$as_me: failed program was:" >&5
5147 cat "conftest.$ac_ext" >&5
5149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5153 echo "$as_me:5153: result: $cf_cv_ncurses_header" >&5
5154 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5156 if test "$cf_cv_ncurses_header" = none ; then
5157 { { echo "$as_me:5157: error: No curses header-files found" >&5
5158 echo "$as_me: error: No curses header-files found" >&2;}
5159 { (exit 1); exit 1; }; }
5162 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5164 for ac_header in $cf_cv_ncurses_header
5166 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5167 echo "$as_me:5167: checking for $ac_header" >&5
5168 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5169 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5170 echo $ECHO_N "(cached) $ECHO_C" >&6
5172 cat >"conftest.$ac_ext" <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175 #include <$ac_header>
5177 if { (eval echo "$as_me:5177: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5178 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5180 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5182 cat conftest.err >&5
5183 echo "$as_me:5183: \$? = $ac_status" >&5
5184 (exit "$ac_status"); } >/dev/null; then
5185 if test -s conftest.err; then
5186 ac_cpp_err=$ac_c_preproc_warn_flag
5193 if test -z "$ac_cpp_err"; then
5194 eval "$as_ac_Header=yes"
5196 echo "$as_me: failed program was:" >&5
5197 cat "conftest.$ac_ext" >&5
5198 eval "$as_ac_Header=no"
5200 rm -f conftest.err "conftest.$ac_ext"
5202 echo "$as_me:5202: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5203 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5204 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5205 cat >>confdefs.h <<EOF
5206 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5212 cat >>confdefs.h <<\EOF
5216 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5218 cat >>confdefs.h <<EOF
5219 #define $cf_nculib_ROOT 1
5222 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5226 cf_ncuhdr_root=ncurses
5228 test -n "$cf_cv_curses_dir" && \
5229 test "$cf_cv_curses_dir" != "no" && { \
5231 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5232 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5234 while test "$cf_add_incdir" != /usr/include
5236 if test -d "$cf_add_incdir"
5239 if test -n "$CFLAGS$CPPFLAGS" ; then
5240 # a loop is needed to ensure we can add subdirs of existing dirs
5241 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5242 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5243 cf_have_incdir=yes; break
5248 if test "$cf_have_incdir" = no ; then
5249 if test "$cf_add_incdir" = /usr/local/include ; then
5250 if test "$GCC" = yes
5252 cf_save_CPPFLAGS=$CPPFLAGS
5254 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5255 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5257 cat >"conftest.$ac_ext" <<_ACEOF
5258 #line 5258 "configure"
5259 #include "confdefs.h"
5269 rm -f "conftest.$ac_objext"
5270 if { (eval echo "$as_me:5270: \"$ac_compile\"") >&5
5271 (eval $ac_compile) 2>&5
5273 echo "$as_me:5273: \$? = $ac_status" >&5
5274 (exit "$ac_status"); } &&
5275 { ac_try='test -s "conftest.$ac_objext"'
5276 { (eval echo "$as_me:5276: \"$ac_try\"") >&5
5279 echo "$as_me:5279: \$? = $ac_status" >&5
5280 (exit "$ac_status"); }; }; then
5283 echo "$as_me: failed program was:" >&5
5284 cat "conftest.$ac_ext" >&5
5287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5288 CPPFLAGS=$cf_save_CPPFLAGS
5293 if test "$cf_have_incdir" = no ; then
5294 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5296 echo "${as_me:-configure}:5296: testing adding $cf_add_incdir to include-path ..." 1>&5
5298 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5300 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5301 test "$cf_top_incdir" = "$cf_add_incdir" && break
5302 cf_add_incdir="$cf_top_incdir"
5315 echo "$as_me:5315: checking for $cf_ncuhdr_root header in include-path" >&5
5316 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5317 if test "${cf_cv_ncurses_h+set}" = set; then
5318 echo $ECHO_N "(cached) $ECHO_C" >&6
5321 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5322 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5323 for cf_header in $cf_header_list
5326 cat >"conftest.$ac_ext" <<_ACEOF
5327 #line 5327 "configure"
5328 #include "confdefs.h"
5330 #include <$cf_header>
5335 #ifdef NCURSES_VERSION
5337 printf("%s\\n", NCURSES_VERSION);
5350 rm -f "conftest.$ac_objext"
5351 if { (eval echo "$as_me:5351: \"$ac_compile\"") >&5
5352 (eval $ac_compile) 2>&5
5354 echo "$as_me:5354: \$? = $ac_status" >&5
5355 (exit "$ac_status"); } &&
5356 { ac_try='test -s "conftest.$ac_objext"'
5357 { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5360 echo "$as_me:5360: \$? = $ac_status" >&5
5361 (exit "$ac_status"); }; }; then
5362 cf_cv_ncurses_h=$cf_header
5365 echo "$as_me: failed program was:" >&5
5366 cat "conftest.$ac_ext" >&5
5369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5371 test "$cf_cv_ncurses_h" != no && break
5375 echo "$as_me:5375: result: $cf_cv_ncurses_h" >&5
5376 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5378 if test "$cf_cv_ncurses_h" != no ; then
5379 cf_cv_ncurses_header=$cf_cv_ncurses_h
5382 echo "$as_me:5382: checking for $cf_ncuhdr_root include-path" >&5
5383 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5384 if test "${cf_cv_ncurses_h2+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5388 test -n "$verbose" && echo
5392 # collect the current set of include-directories from compiler flags
5393 cf_header_path_list=""
5394 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5395 for cf_header_path in $CPPFLAGS $CFLAGS
5397 case "$cf_header_path" in
5399 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5401 test "x$cf_header_path" != "xNONE" && \
5402 test -d "$cf_header_path" && \
5404 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5405 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5406 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5407 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5408 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5409 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"
5412 cf_header_path_list="$cf_header_path_list $cf_search"
5418 # add the variations for the package we are looking for
5422 test "x$prefix" != "xNONE" && \
5423 test -d "$prefix" && \
5425 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5426 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5427 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5428 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5429 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5430 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5433 for cf_subdir_prefix in \
5442 test "x$cf_subdir_prefix" != "x$prefix" && \
5443 test -d "$cf_subdir_prefix" && \
5444 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5445 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5446 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5447 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5448 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5449 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5450 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"
5455 test "$includedir" != NONE && \
5456 test "$includedir" != "/usr/include" && \
5457 test -d "$includedir" && {
5458 test -d "$includedir" && cf_search="$cf_search $includedir"
5459 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5462 test "$oldincludedir" != NONE && \
5463 test "$oldincludedir" != "/usr/include" && \
5464 test -d "$oldincludedir" && {
5465 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5466 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5469 cf_search="$cf_search $cf_header_path_list"
5471 test -n "$verbose" && echo "search path $cf_search"
5472 cf_save2_CPPFLAGS="$CPPFLAGS"
5473 for cf_incdir in $cf_search
5476 if test -n "$cf_incdir" ; then
5477 for cf_add_incdir in $cf_incdir
5479 while test "$cf_add_incdir" != /usr/include
5481 if test -d "$cf_add_incdir"
5484 if test -n "$CFLAGS$CPPFLAGS" ; then
5485 # a loop is needed to ensure we can add subdirs of existing dirs
5486 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5487 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5488 cf_have_incdir=yes; break
5493 if test "$cf_have_incdir" = no ; then
5494 if test "$cf_add_incdir" = /usr/local/include ; then
5495 if test "$GCC" = yes
5497 cf_save_CPPFLAGS=$CPPFLAGS
5499 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5500 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5502 cat >"conftest.$ac_ext" <<_ACEOF
5503 #line 5503 "configure"
5504 #include "confdefs.h"
5514 rm -f "conftest.$ac_objext"
5515 if { (eval echo "$as_me:5515: \"$ac_compile\"") >&5
5516 (eval $ac_compile) 2>&5
5518 echo "$as_me:5518: \$? = $ac_status" >&5
5519 (exit "$ac_status"); } &&
5520 { ac_try='test -s "conftest.$ac_objext"'
5521 { (eval echo "$as_me:5521: \"$ac_try\"") >&5
5524 echo "$as_me:5524: \$? = $ac_status" >&5
5525 (exit "$ac_status"); }; }; then
5528 echo "$as_me: failed program was:" >&5
5529 cat "conftest.$ac_ext" >&5
5532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5533 CPPFLAGS=$cf_save_CPPFLAGS
5538 if test "$cf_have_incdir" = no ; then
5539 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5541 echo "${as_me:-configure}:5541: testing adding $cf_add_incdir to include-path ..." 1>&5
5543 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5545 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5546 test "$cf_top_incdir" = "$cf_add_incdir" && break
5547 cf_add_incdir="$cf_top_incdir"
5563 cat >"conftest.$ac_ext" <<_ACEOF
5564 #line 5564 "configure"
5565 #include "confdefs.h"
5567 #include <$cf_header>
5572 #ifdef NCURSES_VERSION
5574 printf("%s\\n", NCURSES_VERSION);
5587 rm -f "conftest.$ac_objext"
5588 if { (eval echo "$as_me:5588: \"$ac_compile\"") >&5
5589 (eval $ac_compile) 2>&5
5591 echo "$as_me:5591: \$? = $ac_status" >&5
5592 (exit "$ac_status"); } &&
5593 { ac_try='test -s "conftest.$ac_objext"'
5594 { (eval echo "$as_me:5594: \"$ac_try\"") >&5
5597 echo "$as_me:5597: \$? = $ac_status" >&5
5598 (exit "$ac_status"); }; }; then
5599 cf_cv_ncurses_h2=$cf_header
5602 echo "$as_me: failed program was:" >&5
5603 cat "conftest.$ac_ext" >&5
5606 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5608 if test "$cf_cv_ncurses_h2" != no ; then
5609 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5610 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5613 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5615 CPPFLAGS="$cf_save2_CPPFLAGS"
5616 test "$cf_cv_ncurses_h2" != no && break
5618 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5618: error: not found" >&5
5619 echo "$as_me: error: not found" >&2;}
5620 { (exit 1); exit 1; }; }
5623 echo "$as_me:5623: result: $cf_cv_ncurses_h2" >&5
5624 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5626 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5627 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5628 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5629 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5632 if test -n "$cf_1st_incdir" ; then
5633 for cf_add_incdir in $cf_1st_incdir
5635 while test "$cf_add_incdir" != /usr/include
5637 if test -d "$cf_add_incdir"
5640 if test -n "$CFLAGS$CPPFLAGS" ; then
5641 # a loop is needed to ensure we can add subdirs of existing dirs
5642 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5643 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5644 cf_have_incdir=yes; break
5649 if test "$cf_have_incdir" = no ; then
5650 if test "$cf_add_incdir" = /usr/local/include ; then
5651 if test "$GCC" = yes
5653 cf_save_CPPFLAGS=$CPPFLAGS
5655 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5656 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5658 cat >"conftest.$ac_ext" <<_ACEOF
5659 #line 5659 "configure"
5660 #include "confdefs.h"
5670 rm -f "conftest.$ac_objext"
5671 if { (eval echo "$as_me:5671: \"$ac_compile\"") >&5
5672 (eval $ac_compile) 2>&5
5674 echo "$as_me:5674: \$? = $ac_status" >&5
5675 (exit "$ac_status"); } &&
5676 { ac_try='test -s "conftest.$ac_objext"'
5677 { (eval echo "$as_me:5677: \"$ac_try\"") >&5
5680 echo "$as_me:5680: \$? = $ac_status" >&5
5681 (exit "$ac_status"); }; }; then
5684 echo "$as_me: failed program was:" >&5
5685 cat "conftest.$ac_ext" >&5
5688 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5689 CPPFLAGS=$cf_save_CPPFLAGS
5694 if test "$cf_have_incdir" = no ; then
5695 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5697 echo "${as_me:-configure}:5697: testing adding $cf_add_incdir to include-path ..." 1>&5
5699 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5701 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5702 test "$cf_top_incdir" = "$cf_add_incdir" && break
5703 cf_add_incdir="$cf_top_incdir"
5716 # Set definitions to allow ifdef'ing for ncurses.h
5718 case "$cf_cv_ncurses_header" in
5721 cat >>confdefs.h <<\EOF
5722 #define HAVE_NCURSES_H 1
5728 case "$cf_cv_ncurses_header" in
5729 (ncurses/curses.h|ncurses/ncurses.h)
5731 cat >>confdefs.h <<\EOF
5732 #define HAVE_NCURSES_NCURSES_H 1
5736 (ncursesw/curses.h|ncursesw/ncurses.h)
5738 cat >>confdefs.h <<\EOF
5739 #define HAVE_NCURSESW_NCURSES_H 1
5745 echo "$as_me:5745: checking for terminfo header" >&5
5746 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5747 if test "${cf_cv_term_header+set}" = set; then
5748 echo $ECHO_N "(cached) $ECHO_C" >&6
5751 case "${cf_cv_ncurses_header}" in
5752 (*/ncurses.h|*/ncursesw.h)
5753 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5756 cf_term_header=term.h
5760 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5762 cat >"conftest.$ac_ext" <<_ACEOF
5763 #line 5763 "configure"
5764 #include "confdefs.h"
5766 #include <${cf_cv_ncurses_header:-curses.h}>
5772 int x = auto_left_margin; (void)x
5777 rm -f "conftest.$ac_objext"
5778 if { (eval echo "$as_me:5778: \"$ac_compile\"") >&5
5779 (eval $ac_compile) 2>&5
5781 echo "$as_me:5781: \$? = $ac_status" >&5
5782 (exit "$ac_status"); } &&
5783 { ac_try='test -s "conftest.$ac_objext"'
5784 { (eval echo "$as_me:5784: \"$ac_try\"") >&5
5787 echo "$as_me:5787: \$? = $ac_status" >&5
5788 (exit "$ac_status"); }; }; then
5790 cf_cv_term_header="$cf_test"
5792 echo "$as_me: failed program was:" >&5
5793 cat "conftest.$ac_ext" >&5
5795 cf_cv_term_header=unknown
5798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5799 test "$cf_cv_term_header" != unknown && break
5803 echo "$as_me:5803: result: $cf_cv_term_header" >&5
5804 echo "${ECHO_T}$cf_cv_term_header" >&6
5806 # Set definitions to allow ifdef'ing to accommodate subdirectories
5808 case "$cf_cv_term_header" in
5811 cat >>confdefs.h <<\EOF
5812 #define HAVE_TERM_H 1
5818 case "$cf_cv_term_header" in
5821 cat >>confdefs.h <<\EOF
5822 #define HAVE_NCURSES_TERM_H 1
5828 cat >>confdefs.h <<\EOF
5829 #define HAVE_NCURSESW_TERM_H 1
5835 # some applications need this, but should check for NCURSES_VERSION
5837 cat >>confdefs.h <<\EOF
5841 echo "$as_me:5841: checking for ncurses version" >&5
5842 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5843 if test "${cf_cv_ncurses_version+set}" = set; then
5844 echo $ECHO_N "(cached) $ECHO_C" >&6
5847 cf_cv_ncurses_version=no
5849 rm -f "$cf_tempfile"
5850 if test "$cross_compiling" = yes; then
5852 # This will not work if the preprocessor splits the line after the
5853 # Autoconf token. The 'unproto' program does that.
5854 cat > "conftest.$ac_ext" <<EOF
5855 #include <${cf_cv_ncurses_header:-curses.h}>
5857 #ifdef NCURSES_VERSION
5858 Autoconf NCURSES_VERSION
5866 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5867 { (eval echo "$as_me:5867: \"$cf_try\"") >&5
5870 echo "$as_me:5870: \$? = $ac_status" >&5
5871 (exit "$ac_status"); }
5872 if test -f conftest.out ; then
5873 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
5874 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5879 cat >"conftest.$ac_ext" <<_ACEOF
5880 #line 5880 "configure"
5881 #include "confdefs.h"
5883 #include <${cf_cv_ncurses_header:-curses.h}>
5887 FILE *fp = fopen("$cf_tempfile", "w");
5888 #ifdef NCURSES_VERSION
5889 # ifdef NCURSES_VERSION_PATCH
5890 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5892 fprintf(fp, "%s\\n", NCURSES_VERSION);
5896 fprintf(fp, "old\\n");
5901 ${cf_cv_main_return:-return}(0);
5904 rm -f "conftest$ac_exeext"
5905 if { (eval echo "$as_me:5905: \"$ac_link\"") >&5
5906 (eval $ac_link) 2>&5
5908 echo "$as_me:5908: \$? = $ac_status" >&5
5909 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5910 { (eval echo "$as_me:5910: \"$ac_try\"") >&5
5913 echo "$as_me:5913: \$? = $ac_status" >&5
5914 (exit "$ac_status"); }; }; then
5916 cf_cv_ncurses_version=`cat $cf_tempfile`
5918 echo "$as_me: program exited with status $ac_status" >&5
5919 echo "$as_me: failed program was:" >&5
5920 cat "conftest.$ac_ext" >&5
5922 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5924 rm -f "$cf_tempfile"
5927 echo "$as_me:5927: result: $cf_cv_ncurses_version" >&5
5928 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5929 test "$cf_cv_ncurses_version" = no ||
5930 cat >>confdefs.h <<\EOF
5934 cf_nculib_root=ncurses
5935 # This works, except for the special case where we find gpm, but
5936 # ncurses is in a nonstandard location via $LIBS, and we really want
5939 cf_ncurses_SAVE="$LIBS"
5940 echo "$as_me:5940: checking for Gpm_Open in -lgpm" >&5
5941 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5942 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5943 echo $ECHO_N "(cached) $ECHO_C" >&6
5945 ac_check_lib_save_LIBS=$LIBS
5947 cat >"conftest.$ac_ext" <<_ACEOF
5948 #line 5948 "configure"
5949 #include "confdefs.h"
5951 /* Override any gcc2 internal prototype to avoid an error. */
5955 /* We use char because int might match the return type of a gcc2
5956 builtin and then its argument prototype would still apply. */
5966 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5967 if { (eval echo "$as_me:5967: \"$ac_link\"") >&5
5968 (eval $ac_link) 2>&5
5970 echo "$as_me:5970: \$? = $ac_status" >&5
5971 (exit "$ac_status"); } &&
5972 { ac_try='test -s "conftest$ac_exeext"'
5973 { (eval echo "$as_me:5973: \"$ac_try\"") >&5
5976 echo "$as_me:5976: \$? = $ac_status" >&5
5977 (exit "$ac_status"); }; }; then
5978 ac_cv_lib_gpm_Gpm_Open=yes
5980 echo "$as_me: failed program was:" >&5
5981 cat "conftest.$ac_ext" >&5
5982 ac_cv_lib_gpm_Gpm_Open=no
5984 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5985 LIBS=$ac_check_lib_save_LIBS
5987 echo "$as_me:5987: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5988 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5989 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
5990 echo "$as_me:5990: checking for initscr in -lgpm" >&5
5991 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
5992 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
5993 echo $ECHO_N "(cached) $ECHO_C" >&6
5995 ac_check_lib_save_LIBS=$LIBS
5997 cat >"conftest.$ac_ext" <<_ACEOF
5998 #line 5998 "configure"
5999 #include "confdefs.h"
6001 /* Override any gcc2 internal prototype to avoid an error. */
6005 /* We use char because int might match the return type of a gcc2
6006 builtin and then its argument prototype would still apply. */
6016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6017 if { (eval echo "$as_me:6017: \"$ac_link\"") >&5
6018 (eval $ac_link) 2>&5
6020 echo "$as_me:6020: \$? = $ac_status" >&5
6021 (exit "$ac_status"); } &&
6022 { ac_try='test -s "conftest$ac_exeext"'
6023 { (eval echo "$as_me:6023: \"$ac_try\"") >&5
6026 echo "$as_me:6026: \$? = $ac_status" >&5
6027 (exit "$ac_status"); }; }; then
6028 ac_cv_lib_gpm_initscr=yes
6030 echo "$as_me: failed program was:" >&5
6031 cat "conftest.$ac_ext" >&5
6032 ac_cv_lib_gpm_initscr=no
6034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6035 LIBS=$ac_check_lib_save_LIBS
6037 echo "$as_me:6037: result: $ac_cv_lib_gpm_initscr" >&5
6038 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6039 if test "$ac_cv_lib_gpm_initscr" = yes; then
6040 LIBS="$cf_ncurses_SAVE"
6042 cf_ncurses_LIBS="-lgpm"
6049 # This is only necessary if you are linking against an obsolete
6050 # version of ncurses (but it should do no harm, since it's static).
6051 if test "$cf_nculib_root" = ncurses ; then
6052 echo "$as_me:6052: checking for tgoto in -lmytinfo" >&5
6053 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6054 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6055 echo $ECHO_N "(cached) $ECHO_C" >&6
6057 ac_check_lib_save_LIBS=$LIBS
6058 LIBS="-lmytinfo $LIBS"
6059 cat >"conftest.$ac_ext" <<_ACEOF
6060 #line 6060 "configure"
6061 #include "confdefs.h"
6063 /* Override any gcc2 internal prototype to avoid an error. */
6067 /* We use char because int might match the return type of a gcc2
6068 builtin and then its argument prototype would still apply. */
6078 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6079 if { (eval echo "$as_me:6079: \"$ac_link\"") >&5
6080 (eval $ac_link) 2>&5
6082 echo "$as_me:6082: \$? = $ac_status" >&5
6083 (exit "$ac_status"); } &&
6084 { ac_try='test -s "conftest$ac_exeext"'
6085 { (eval echo "$as_me:6085: \"$ac_try\"") >&5
6088 echo "$as_me:6088: \$? = $ac_status" >&5
6089 (exit "$ac_status"); }; }; then
6090 ac_cv_lib_mytinfo_tgoto=yes
6092 echo "$as_me: failed program was:" >&5
6093 cat "conftest.$ac_ext" >&5
6094 ac_cv_lib_mytinfo_tgoto=no
6096 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6097 LIBS=$ac_check_lib_save_LIBS
6099 echo "$as_me:6099: result: $ac_cv_lib_mytinfo_tgoto" >&5
6100 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6101 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6102 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6112 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6114 for cf_add_1lib in $cf_add_0lib; do
6115 for cf_add_2lib in $cf_add_libs; do
6116 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6121 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6125 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6131 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6133 for cf_add_1lib in $cf_add_0lib; do
6134 for cf_add_2lib in $cf_add_libs; do
6135 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6140 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6146 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6148 echo "$as_me:6148: checking for initscr" >&5
6149 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6150 if test "${ac_cv_func_initscr+set}" = set; then
6151 echo $ECHO_N "(cached) $ECHO_C" >&6
6153 cat >"conftest.$ac_ext" <<_ACEOF
6154 #line 6154 "configure"
6155 #include "confdefs.h"
6156 #define initscr autoconf_temporary
6157 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6164 /* We use char because int might match the return type of a gcc2
6165 builtin and then its argument prototype would still apply. */
6166 char initscr (void);
6172 /* The GNU C library defines stubs for functions which it implements
6173 to always fail with ENOSYS. Some functions are actually named
6174 something starting with __ and the normal name is an alias. */
6175 #if defined (__stub_initscr) || defined (__stub___initscr)
6176 #error found stub for initscr
6184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6185 if { (eval echo "$as_me:6185: \"$ac_link\"") >&5
6186 (eval $ac_link) 2>&5
6188 echo "$as_me:6188: \$? = $ac_status" >&5
6189 (exit "$ac_status"); } &&
6190 { ac_try='test -s "conftest$ac_exeext"'
6191 { (eval echo "$as_me:6191: \"$ac_try\"") >&5
6194 echo "$as_me:6194: \$? = $ac_status" >&5
6195 (exit "$ac_status"); }; }; then
6196 ac_cv_func_initscr=yes
6198 echo "$as_me: failed program was:" >&5
6199 cat "conftest.$ac_ext" >&5
6200 ac_cv_func_initscr=no
6202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6204 echo "$as_me:6204: result: $ac_cv_func_initscr" >&5
6205 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6206 if test "$ac_cv_func_initscr" = yes; then
6207 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6210 cf_save_LIBS="$LIBS"
6211 echo "$as_me:6211: checking for initscr in -l$cf_nculib_root" >&5
6212 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6213 LIBS="-l$cf_nculib_root $LIBS"
6214 cat >"conftest.$ac_ext" <<_ACEOF
6215 #line 6215 "configure"
6216 #include "confdefs.h"
6217 #include <${cf_cv_ncurses_header:-curses.h}>
6226 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6227 if { (eval echo "$as_me:6227: \"$ac_link\"") >&5
6228 (eval $ac_link) 2>&5
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit "$ac_status"); } &&
6232 { ac_try='test -s "conftest$ac_exeext"'
6233 { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6236 echo "$as_me:6236: \$? = $ac_status" >&5
6237 (exit "$ac_status"); }; }; then
6238 echo "$as_me:6238: result: yes" >&5
6239 echo "${ECHO_T}yes" >&6
6240 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6243 echo "$as_me: failed program was:" >&5
6244 cat "conftest.$ac_ext" >&5
6245 echo "$as_me:6245: result: no" >&5
6246 echo "${ECHO_T}no" >&6
6249 cf_library_path_list=""
6250 if test -n "${LDFLAGS}${LIBS}" ; then
6251 for cf_library_path in $LDFLAGS $LIBS
6253 case "$cf_library_path" in
6255 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6257 test "x$cf_library_path" != "xNONE" && \
6258 test -d "$cf_library_path" && \
6260 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6261 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6262 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6263 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6264 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6265 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"
6268 cf_library_path_list="$cf_library_path_list $cf_search"
6276 test "x$prefix" != "xNONE" && \
6277 test -d "$prefix" && \
6279 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6280 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6281 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6282 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6283 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6284 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6287 for cf_subdir_prefix in \
6296 test "x$cf_subdir_prefix" != "x$prefix" && \
6297 test -d "$cf_subdir_prefix" && \
6298 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6299 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6300 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6301 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6302 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6303 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6304 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"
6309 cf_search="$cf_library_path_list $cf_search"
6311 for cf_libdir in $cf_search
6313 echo "$as_me:6313: checking for -l$cf_nculib_root in $cf_libdir" >&5
6314 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6315 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6316 cat >"conftest.$ac_ext" <<_ACEOF
6317 #line 6317 "configure"
6318 #include "confdefs.h"
6319 #include <${cf_cv_ncurses_header:-curses.h}>
6328 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6329 if { (eval echo "$as_me:6329: \"$ac_link\"") >&5
6330 (eval $ac_link) 2>&5
6332 echo "$as_me:6332: \$? = $ac_status" >&5
6333 (exit "$ac_status"); } &&
6334 { ac_try='test -s "conftest$ac_exeext"'
6335 { (eval echo "$as_me:6335: \"$ac_try\"") >&5
6338 echo "$as_me:6338: \$? = $ac_status" >&5
6339 (exit "$ac_status"); }; }; then
6340 echo "$as_me:6340: result: yes" >&5
6341 echo "${ECHO_T}yes" >&6
6342 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6345 echo "$as_me: failed program was:" >&5
6346 cat "conftest.$ac_ext" >&5
6347 echo "$as_me:6347: result: no" >&5
6348 echo "${ECHO_T}no" >&6
6349 LIBS="$cf_save_LIBS"
6351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6359 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6361 if test "$cf_found_library" = no ; then
6362 { { echo "$as_me:6362: error: Cannot link $cf_nculib_root library" >&5
6363 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6364 { (exit 1); exit 1; }; }
6369 if test -n "$cf_ncurses_LIBS" ; then
6370 echo "$as_me:6370: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6371 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6372 cf_ncurses_SAVE="$LIBS"
6373 for p in $cf_ncurses_LIBS ; do
6374 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6375 if test "$q" != "$LIBS" ; then
6379 cat >"conftest.$ac_ext" <<_ACEOF
6380 #line 6380 "configure"
6381 #include "confdefs.h"
6382 #include <${cf_cv_ncurses_header:-curses.h}>
6386 initscr(); mousemask(0,0); tigetstr((char *)0);
6391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6392 if { (eval echo "$as_me:6392: \"$ac_link\"") >&5
6393 (eval $ac_link) 2>&5
6395 echo "$as_me:6395: \$? = $ac_status" >&5
6396 (exit "$ac_status"); } &&
6397 { ac_try='test -s "conftest$ac_exeext"'
6398 { (eval echo "$as_me:6398: \"$ac_try\"") >&5
6401 echo "$as_me:6401: \$? = $ac_status" >&5
6402 (exit "$ac_status"); }; }; then
6403 echo "$as_me:6403: result: yes" >&5
6404 echo "${ECHO_T}yes" >&6
6406 echo "$as_me: failed program was:" >&5
6407 cat "conftest.$ac_ext" >&5
6408 echo "$as_me:6408: result: no" >&5
6409 echo "${ECHO_T}no" >&6
6410 LIBS="$cf_ncurses_SAVE"
6412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6415 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6417 cat >>confdefs.h <<EOF
6418 #define $cf_nculib_ROOT 1
6426 echo "$as_me:6426: checking if you want wide-character code" >&5
6427 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6429 # Check whether --enable-widec or --disable-widec was given.
6430 if test "${enable_widec+set}" = set; then
6431 enableval="$enable_widec"
6432 with_widec=$enableval
6436 echo "$as_me:6436: result: $with_widec" >&5
6437 echo "${ECHO_T}$with_widec" >&6
6438 if test "$with_widec" = yes ; then
6440 for ac_header in wchar.h
6442 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6443 echo "$as_me:6443: checking for $ac_header" >&5
6444 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6445 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6446 echo $ECHO_N "(cached) $ECHO_C" >&6
6448 cat >"conftest.$ac_ext" <<_ACEOF
6449 #line 6449 "configure"
6450 #include "confdefs.h"
6451 #include <$ac_header>
6453 if { (eval echo "$as_me:6453: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6454 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6456 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6458 cat conftest.err >&5
6459 echo "$as_me:6459: \$? = $ac_status" >&5
6460 (exit "$ac_status"); } >/dev/null; then
6461 if test -s conftest.err; then
6462 ac_cpp_err=$ac_c_preproc_warn_flag
6469 if test -z "$ac_cpp_err"; then
6470 eval "$as_ac_Header=yes"
6472 echo "$as_me: failed program was:" >&5
6473 cat "conftest.$ac_ext" >&5
6474 eval "$as_ac_Header=no"
6476 rm -f conftest.err "conftest.$ac_ext"
6478 echo "$as_me:6478: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6479 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6480 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6481 cat >>confdefs.h <<EOF
6482 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6488 echo "$as_me:6488: checking for multibyte character support" >&5
6489 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6490 if test "${cf_cv_utf8_lib+set}" = set; then
6491 echo $ECHO_N "(cached) $ECHO_C" >&6
6494 cf_save_LIBS="$LIBS"
6495 cat >"conftest.$ac_ext" <<_ACEOF
6496 #line 6496 "configure"
6497 #include "confdefs.h"
6513 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6514 if { (eval echo "$as_me:6514: \"$ac_link\"") >&5
6515 (eval $ac_link) 2>&5
6517 echo "$as_me:6517: \$? = $ac_status" >&5
6518 (exit "$ac_status"); } &&
6519 { ac_try='test -s "conftest$ac_exeext"'
6520 { (eval echo "$as_me:6520: \"$ac_try\"") >&5
6523 echo "$as_me:6523: \$? = $ac_status" >&5
6524 (exit "$ac_status"); }; }; then
6527 echo "$as_me: failed program was:" >&5
6528 cat "conftest.$ac_ext" >&5
6530 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6531 # will be set on completion of the AC_TRY_LINK below.
6532 cf_cv_header_path_utf8=
6533 cf_cv_library_path_utf8=
6535 echo "${as_me:-configure}:6535: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6537 cf_save_LIBS="$LIBS"
6539 cat >"conftest.$ac_ext" <<_ACEOF
6540 #line 6540 "configure"
6541 #include "confdefs.h"
6543 #include <libutf8.h>
6552 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6553 if { (eval echo "$as_me:6553: \"$ac_link\"") >&5
6554 (eval $ac_link) 2>&5
6556 echo "$as_me:6556: \$? = $ac_status" >&5
6557 (exit "$ac_status"); } &&
6558 { ac_try='test -s "conftest$ac_exeext"'
6559 { (eval echo "$as_me:6559: \"$ac_try\"") >&5
6562 echo "$as_me:6562: \$? = $ac_status" >&5
6563 (exit "$ac_status"); }; }; then
6565 cf_cv_find_linkage_utf8=yes
6566 cf_cv_header_path_utf8=/usr/include
6567 cf_cv_library_path_utf8=/usr/lib
6570 echo "$as_me: failed program was:" >&5
6571 cat "conftest.$ac_ext" >&5
6573 LIBS="-lutf8 $cf_save_LIBS"
6575 cat >"conftest.$ac_ext" <<_ACEOF
6576 #line 6576 "configure"
6577 #include "confdefs.h"
6579 #include <libutf8.h>
6588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6589 if { (eval echo "$as_me:6589: \"$ac_link\"") >&5
6590 (eval $ac_link) 2>&5
6592 echo "$as_me:6592: \$? = $ac_status" >&5
6593 (exit "$ac_status"); } &&
6594 { ac_try='test -s "conftest$ac_exeext"'
6595 { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6598 echo "$as_me:6598: \$? = $ac_status" >&5
6599 (exit "$ac_status"); }; }; then
6601 cf_cv_find_linkage_utf8=yes
6602 cf_cv_header_path_utf8=/usr/include
6603 cf_cv_library_path_utf8=/usr/lib
6604 cf_cv_library_file_utf8="-lutf8"
6607 echo "$as_me: failed program was:" >&5
6608 cat "conftest.$ac_ext" >&5
6610 cf_cv_find_linkage_utf8=no
6611 LIBS="$cf_save_LIBS"
6613 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6615 echo "${as_me:-configure}:6615: testing find linkage for utf8 library ..." 1>&5
6617 echo "${as_me:-configure}:6617: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6619 cf_save_CPPFLAGS="$CPPFLAGS"
6620 cf_test_CPPFLAGS="$CPPFLAGS"
6624 # collect the current set of include-directories from compiler flags
6625 cf_header_path_list=""
6626 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6627 for cf_header_path in $CPPFLAGS $CFLAGS
6629 case "$cf_header_path" in
6631 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6633 test "x$cf_header_path" != "xNONE" && \
6634 test -d "$cf_header_path" && \
6636 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6637 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6638 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6639 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6640 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6641 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6644 cf_header_path_list="$cf_header_path_list $cf_search"
6650 # add the variations for the package we are looking for
6654 test "x$prefix" != "xNONE" && \
6655 test -d "$prefix" && \
6657 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6658 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6659 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6660 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6661 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6662 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6665 for cf_subdir_prefix in \
6674 test "x$cf_subdir_prefix" != "x$prefix" && \
6675 test -d "$cf_subdir_prefix" && \
6676 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6677 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6678 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6679 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6680 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6681 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6682 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6687 test "$includedir" != NONE && \
6688 test "$includedir" != "/usr/include" && \
6689 test -d "$includedir" && {
6690 test -d "$includedir" && cf_search="$cf_search $includedir"
6691 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6694 test "$oldincludedir" != NONE && \
6695 test "$oldincludedir" != "/usr/include" && \
6696 test -d "$oldincludedir" && {
6697 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6698 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6701 cf_search="$cf_search $cf_header_path_list"
6703 for cf_cv_header_path_utf8 in $cf_search
6705 if test -d "$cf_cv_header_path_utf8" ; then
6706 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6708 echo "${as_me:-configure}:6708: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6710 CPPFLAGS="$cf_save_CPPFLAGS"
6712 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6713 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6715 cat >"conftest.$ac_ext" <<_ACEOF
6716 #line 6716 "configure"
6717 #include "confdefs.h"
6719 #include <libutf8.h>
6728 rm -f "conftest.$ac_objext"
6729 if { (eval echo "$as_me:6729: \"$ac_compile\"") >&5
6730 (eval $ac_compile) 2>&5
6732 echo "$as_me:6732: \$? = $ac_status" >&5
6733 (exit "$ac_status"); } &&
6734 { ac_try='test -s "conftest.$ac_objext"'
6735 { (eval echo "$as_me:6735: \"$ac_try\"") >&5
6738 echo "$as_me:6738: \$? = $ac_status" >&5
6739 (exit "$ac_status"); }; }; then
6741 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6743 echo "${as_me:-configure}:6743: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6745 cf_cv_find_linkage_utf8=maybe
6746 cf_test_CPPFLAGS="$CPPFLAGS"
6749 echo "$as_me: failed program was:" >&5
6750 cat "conftest.$ac_ext" >&5
6752 CPPFLAGS="$cf_save_CPPFLAGS"
6755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6759 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6761 echo "${as_me:-configure}:6761: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6763 cf_save_LIBS="$LIBS"
6764 cf_save_LDFLAGS="$LDFLAGS"
6766 if test "$cf_cv_find_linkage_utf8" != yes ; then
6769 cf_library_path_list=""
6770 if test -n "${LDFLAGS}${LIBS}" ; then
6771 for cf_library_path in $LDFLAGS $LIBS
6773 case "$cf_library_path" in
6775 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6777 test "x$cf_library_path" != "xNONE" && \
6778 test -d "$cf_library_path" && \
6780 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6781 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6782 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6783 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6784 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6785 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6788 cf_library_path_list="$cf_library_path_list $cf_search"
6796 test "x$prefix" != "xNONE" && \
6797 test -d "$prefix" && \
6799 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6800 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6801 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6802 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6803 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6804 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6807 for cf_subdir_prefix in \
6816 test "x$cf_subdir_prefix" != "x$prefix" && \
6817 test -d "$cf_subdir_prefix" && \
6818 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6819 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6820 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6821 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6822 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6823 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6824 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6829 cf_search="$cf_library_path_list $cf_search"
6831 for cf_cv_library_path_utf8 in $cf_search
6833 if test -d "$cf_cv_library_path_utf8" ; then
6834 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6836 echo "${as_me:-configure}:6836: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6838 CPPFLAGS="$cf_test_CPPFLAGS"
6839 LIBS="-lutf8 $cf_save_LIBS"
6840 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6841 cat >"conftest.$ac_ext" <<_ACEOF
6842 #line 6842 "configure"
6843 #include "confdefs.h"
6845 #include <libutf8.h>
6854 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6855 if { (eval echo "$as_me:6855: \"$ac_link\"") >&5
6856 (eval $ac_link) 2>&5
6858 echo "$as_me:6858: \$? = $ac_status" >&5
6859 (exit "$ac_status"); } &&
6860 { ac_try='test -s "conftest$ac_exeext"'
6861 { (eval echo "$as_me:6861: \"$ac_try\"") >&5
6864 echo "$as_me:6864: \$? = $ac_status" >&5
6865 (exit "$ac_status"); }; }; then
6867 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6869 echo "${as_me:-configure}:6869: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6871 cf_cv_find_linkage_utf8=yes
6872 cf_cv_library_file_utf8="-lutf8"
6875 echo "$as_me: failed program was:" >&5
6876 cat "conftest.$ac_ext" >&5
6878 CPPFLAGS="$cf_save_CPPFLAGS"
6879 LIBS="$cf_save_LIBS"
6880 LDFLAGS="$cf_save_LDFLAGS"
6883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6886 CPPFLAGS="$cf_save_CPPFLAGS"
6887 LDFLAGS="$cf_save_LDFLAGS"
6891 cf_cv_find_linkage_utf8=no
6895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6898 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6900 LIBS="$cf_save_LIBS"
6902 if test "$cf_cv_find_linkage_utf8" = yes ; then
6903 cf_cv_utf8_lib=add-on
6909 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6911 echo "$as_me:6911: result: $cf_cv_utf8_lib" >&5
6912 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6914 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6916 if test "$cf_cv_utf8_lib" = "add-on" ; then
6918 cat >>confdefs.h <<\EOF
6919 #define HAVE_LIBUTF8_H 1
6922 if test -n "$cf_cv_header_path_utf8" ; then
6923 for cf_add_incdir in $cf_cv_header_path_utf8
6925 while test "$cf_add_incdir" != /usr/include
6927 if test -d "$cf_add_incdir"
6930 if test -n "$CFLAGS$CPPFLAGS" ; then
6931 # a loop is needed to ensure we can add subdirs of existing dirs
6932 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6933 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6934 cf_have_incdir=yes; break
6939 if test "$cf_have_incdir" = no ; then
6940 if test "$cf_add_incdir" = /usr/local/include ; then
6941 if test "$GCC" = yes
6943 cf_save_CPPFLAGS=$CPPFLAGS
6945 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6946 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6948 cat >"conftest.$ac_ext" <<_ACEOF
6949 #line 6949 "configure"
6950 #include "confdefs.h"
6960 rm -f "conftest.$ac_objext"
6961 if { (eval echo "$as_me:6961: \"$ac_compile\"") >&5
6962 (eval $ac_compile) 2>&5
6964 echo "$as_me:6964: \$? = $ac_status" >&5
6965 (exit "$ac_status"); } &&
6966 { ac_try='test -s "conftest.$ac_objext"'
6967 { (eval echo "$as_me:6967: \"$ac_try\"") >&5
6970 echo "$as_me:6970: \$? = $ac_status" >&5
6971 (exit "$ac_status"); }; }; then
6974 echo "$as_me: failed program was:" >&5
6975 cat "conftest.$ac_ext" >&5
6978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6979 CPPFLAGS=$cf_save_CPPFLAGS
6984 if test "$cf_have_incdir" = no ; then
6985 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6987 echo "${as_me:-configure}:6987: testing adding $cf_add_incdir to include-path ..." 1>&5
6989 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6991 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6992 test "$cf_top_incdir" = "$cf_add_incdir" && break
6993 cf_add_incdir="$cf_top_incdir"
7004 if test -n "$cf_cv_library_path_utf8" ; then
7005 for cf_add_libdir in $cf_cv_library_path_utf8
7007 if test "$cf_add_libdir" = /usr/lib ; then
7009 elif test -d "$cf_add_libdir"
7012 if test -n "$LDFLAGS$LIBS" ; then
7013 # a loop is needed to ensure we can add subdirs of existing dirs
7014 for cf_test_libdir in $LDFLAGS $LIBS ; do
7015 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7016 cf_have_libdir=yes; break
7020 if test "$cf_have_libdir" = no ; then
7021 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7023 echo "${as_me:-configure}:7023: testing adding $cf_add_libdir to library-path ..." 1>&5
7025 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7034 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7036 for cf_add_1lib in $cf_add_0lib; do
7037 for cf_add_2lib in $cf_add_libs; do
7038 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7043 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7049 cf_ncuconfig_root=ncursesw
7050 cf_have_ncuconfig=no
7052 if test "x${PKG_CONFIG:=none}" != xnone; then
7053 echo "$as_me:7053: checking pkg-config for $cf_ncuconfig_root" >&5
7054 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7055 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7056 echo "$as_me:7056: result: yes" >&5
7057 echo "${ECHO_T}yes" >&6
7059 echo "$as_me:7059: checking if the $cf_ncuconfig_root package files work" >&5
7060 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7061 cf_have_ncuconfig=unknown
7063 cf_save_CFLAGS="$CFLAGS"
7064 cf_save_CPPFLAGS="$CPPFLAGS"
7065 cf_save_LIBS="$LIBS"
7067 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7068 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7070 # while -W for passing linker flags is prevalent, it is not "standard".
7071 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7072 # incompatible _and_ non-standard -W option which gives an error. Work
7073 # around that pitfall.
7074 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7080 cf_new_extra_cppflags=
7082 for cf_add_cflags in $cf_pkg_cflags
7084 case "$cf_fix_cppflags" in
7086 case "$cf_add_cflags" in
7087 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7088 case "$cf_add_cflags" in
7090 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7092 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7093 && test -z "${cf_tst_cflags}" \
7094 && cf_fix_cppflags=yes
7096 if test "$cf_fix_cppflags" = yes ; then
7098 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7099 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7102 elif test "${cf_tst_cflags}" = "\"'" ; then
7104 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7105 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7115 case "$cf_add_cflags" in
7117 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7119 CPPFLAGS=`echo "$CPPFLAGS" | \
7120 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7121 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7126 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7127 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7134 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7135 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7142 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7143 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7145 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7147 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7148 && test -z "${cf_tst_cflags}" \
7149 && cf_fix_cppflags=no
7154 if test -n "$cf_new_cflags" ; then
7156 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7157 CFLAGS="${CFLAGS}$cf_new_cflags"
7161 if test -n "$cf_new_cppflags" ; then
7163 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7164 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7168 if test -n "$cf_new_extra_cppflags" ; then
7170 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7171 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7178 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7180 for cf_add_1lib in $cf_add_0lib; do
7181 for cf_add_2lib in $cf_add_libs; do
7182 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7187 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7191 cat >"conftest.$ac_ext" <<_ACEOF
7192 #line 7192 "configure"
7193 #include "confdefs.h"
7194 #include <${cf_cv_ncurses_header:-curses.h}>
7198 initscr(); mousemask(0,0); tigetstr((char *)0);
7203 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7204 if { (eval echo "$as_me:7204: \"$ac_link\"") >&5
7205 (eval $ac_link) 2>&5
7207 echo "$as_me:7207: \$? = $ac_status" >&5
7208 (exit "$ac_status"); } &&
7209 { ac_try='test -s "conftest$ac_exeext"'
7210 { (eval echo "$as_me:7210: \"$ac_try\"") >&5
7213 echo "$as_me:7213: \$? = $ac_status" >&5
7214 (exit "$ac_status"); }; }; then
7215 if test "$cross_compiling" = yes; then
7216 cf_test_ncuconfig=maybe
7218 cat >"conftest.$ac_ext" <<_ACEOF
7219 #line 7219 "configure"
7220 #include "confdefs.h"
7221 #include <${cf_cv_ncurses_header:-curses.h}>
7223 { const char *xx = curses_version(); return (xx == 0); }
7225 rm -f "conftest$ac_exeext"
7226 if { (eval echo "$as_me:7226: \"$ac_link\"") >&5
7227 (eval $ac_link) 2>&5
7229 echo "$as_me:7229: \$? = $ac_status" >&5
7230 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7231 { (eval echo "$as_me:7231: \"$ac_try\"") >&5
7234 echo "$as_me:7234: \$? = $ac_status" >&5
7235 (exit "$ac_status"); }; }; then
7236 cf_test_ncuconfig=yes
7238 echo "$as_me: program exited with status $ac_status" >&5
7239 echo "$as_me: failed program was:" >&5
7240 cat "conftest.$ac_ext" >&5
7241 cf_test_ncuconfig=no
7243 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7246 echo "$as_me: failed program was:" >&5
7247 cat "conftest.$ac_ext" >&5
7248 cf_test_ncuconfig=no
7250 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7252 CFLAGS="$cf_save_CFLAGS"
7253 CPPFLAGS="$cf_save_CPPFLAGS"
7254 LIBS="$cf_save_LIBS"
7256 if test "x$cf_test_ncuconfig" != xyes; then
7257 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7258 cf_pkg_cflags="$cf_temp"
7259 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7260 cf_pkg_libs="$cf_temp"
7268 cf_new_extra_cppflags=
7270 for cf_add_cflags in $cf_pkg_cflags
7272 case "$cf_fix_cppflags" in
7274 case "$cf_add_cflags" in
7275 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7276 case "$cf_add_cflags" in
7278 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7280 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7281 && test -z "${cf_tst_cflags}" \
7282 && cf_fix_cppflags=yes
7284 if test "$cf_fix_cppflags" = yes ; then
7286 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7287 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7290 elif test "${cf_tst_cflags}" = "\"'" ; then
7292 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7293 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7303 case "$cf_add_cflags" in
7305 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7307 CPPFLAGS=`echo "$CPPFLAGS" | \
7308 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7309 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7314 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7315 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7322 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7323 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7330 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7331 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7333 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7335 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7336 && test -z "${cf_tst_cflags}" \
7337 && cf_fix_cppflags=no
7342 if test -n "$cf_new_cflags" ; then
7344 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7345 CFLAGS="${CFLAGS}$cf_new_cflags"
7349 if test -n "$cf_new_cppflags" ; then
7351 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7352 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7356 if test -n "$cf_new_extra_cppflags" ; then
7358 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7359 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7366 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7368 for cf_add_1lib in $cf_add_0lib; do
7369 for cf_add_2lib in $cf_add_libs; do
7370 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7375 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7379 cat >"conftest.$ac_ext" <<_ACEOF
7380 #line 7380 "configure"
7381 #include "confdefs.h"
7382 #include <${cf_cv_ncurses_header:-curses.h}>
7386 initscr(); mousemask(0,0); tigetstr((char *)0);
7391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7392 if { (eval echo "$as_me:7392: \"$ac_link\"") >&5
7393 (eval $ac_link) 2>&5
7395 echo "$as_me:7395: \$? = $ac_status" >&5
7396 (exit "$ac_status"); } &&
7397 { ac_try='test -s "conftest$ac_exeext"'
7398 { (eval echo "$as_me:7398: \"$ac_try\"") >&5
7401 echo "$as_me:7401: \$? = $ac_status" >&5
7402 (exit "$ac_status"); }; }; then
7403 if test "$cross_compiling" = yes; then
7404 cf_have_ncuconfig=maybe
7406 cat >"conftest.$ac_ext" <<_ACEOF
7407 #line 7407 "configure"
7408 #include "confdefs.h"
7409 #include <${cf_cv_ncurses_header:-curses.h}>
7411 { const char *xx = curses_version(); return (xx == 0); }
7413 rm -f "conftest$ac_exeext"
7414 if { (eval echo "$as_me:7414: \"$ac_link\"") >&5
7415 (eval $ac_link) 2>&5
7417 echo "$as_me:7417: \$? = $ac_status" >&5
7418 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7419 { (eval echo "$as_me:7419: \"$ac_try\"") >&5
7422 echo "$as_me:7422: \$? = $ac_status" >&5
7423 (exit "$ac_status"); }; }; then
7424 cf_have_ncuconfig=yes
7426 echo "$as_me: program exited with status $ac_status" >&5
7427 echo "$as_me: failed program was:" >&5
7428 cat "conftest.$ac_ext" >&5
7429 cf_have_ncuconfig=no
7431 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7434 echo "$as_me: failed program was:" >&5
7435 cat "conftest.$ac_ext" >&5
7436 cf_have_ncuconfig=no
7438 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7439 echo "$as_me:7439: result: $cf_have_ncuconfig" >&5
7440 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7441 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7442 if test "$cf_have_ncuconfig" != "yes"
7444 CPPFLAGS="$cf_save_CPPFLAGS"
7445 LIBS="$cf_save_LIBS"
7446 NCURSES_CONFIG_PKG=none
7449 cat >>confdefs.h <<\EOF
7453 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7455 echo "$as_me:7455: checking for terminfo header" >&5
7456 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7457 if test "${cf_cv_term_header+set}" = set; then
7458 echo $ECHO_N "(cached) $ECHO_C" >&6
7461 case "${cf_cv_ncurses_header}" in
7462 (*/ncurses.h|*/ncursesw.h)
7463 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7466 cf_term_header=term.h
7470 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7472 cat >"conftest.$ac_ext" <<_ACEOF
7473 #line 7473 "configure"
7474 #include "confdefs.h"
7476 #include <${cf_cv_ncurses_header:-curses.h}>
7482 int x = auto_left_margin; (void)x
7487 rm -f "conftest.$ac_objext"
7488 if { (eval echo "$as_me:7488: \"$ac_compile\"") >&5
7489 (eval $ac_compile) 2>&5
7491 echo "$as_me:7491: \$? = $ac_status" >&5
7492 (exit "$ac_status"); } &&
7493 { ac_try='test -s "conftest.$ac_objext"'
7494 { (eval echo "$as_me:7494: \"$ac_try\"") >&5
7497 echo "$as_me:7497: \$? = $ac_status" >&5
7498 (exit "$ac_status"); }; }; then
7500 cf_cv_term_header="$cf_test"
7502 echo "$as_me: failed program was:" >&5
7503 cat "conftest.$ac_ext" >&5
7505 cf_cv_term_header=unknown
7508 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7509 test "$cf_cv_term_header" != unknown && break
7513 echo "$as_me:7513: result: $cf_cv_term_header" >&5
7514 echo "${ECHO_T}$cf_cv_term_header" >&6
7516 # Set definitions to allow ifdef'ing to accommodate subdirectories
7518 case "$cf_cv_term_header" in
7521 cat >>confdefs.h <<\EOF
7522 #define HAVE_TERM_H 1
7528 case "$cf_cv_term_header" in
7531 cat >>confdefs.h <<\EOF
7532 #define HAVE_NCURSES_TERM_H 1
7538 cat >>confdefs.h <<\EOF
7539 #define HAVE_NCURSESW_TERM_H 1
7548 echo "$as_me:7548: result: no" >&5
7549 echo "${ECHO_T}no" >&6
7550 NCURSES_CONFIG_PKG=none
7553 NCURSES_CONFIG_PKG=none
7556 if test "x$cf_have_ncuconfig" = "xno"; then
7557 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7559 if test -n "$ac_tool_prefix"; then
7560 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7562 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7563 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7564 echo "$as_me:7564: checking for $ac_word" >&5
7565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7566 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7567 echo $ECHO_N "(cached) $ECHO_C" >&6
7569 if test -n "$NCURSES_CONFIG"; then
7570 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7572 ac_save_IFS=$IFS; IFS=$ac_path_separator
7574 for ac_dir in $ac_dummy; do
7576 test -z "$ac_dir" && ac_dir=.
7577 $as_executable_p "$ac_dir/$ac_word" || continue
7578 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7579 echo "$as_me:7579: found $ac_dir/$ac_word" >&5
7585 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7586 if test -n "$NCURSES_CONFIG"; then
7587 echo "$as_me:7587: result: $NCURSES_CONFIG" >&5
7588 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7590 echo "$as_me:7590: result: no" >&5
7591 echo "${ECHO_T}no" >&6
7594 test -n "$NCURSES_CONFIG" && break
7597 if test -z "$NCURSES_CONFIG"; then
7598 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7599 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7601 # Extract the first word of "$ac_prog", so it can be a program name with args.
7602 set dummy $ac_prog; ac_word=$2
7603 echo "$as_me:7603: checking for $ac_word" >&5
7604 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7605 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7606 echo $ECHO_N "(cached) $ECHO_C" >&6
7608 if test -n "$ac_ct_NCURSES_CONFIG"; then
7609 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7611 ac_save_IFS=$IFS; IFS=$ac_path_separator
7613 for ac_dir in $ac_dummy; do
7615 test -z "$ac_dir" && ac_dir=.
7616 $as_executable_p "$ac_dir/$ac_word" || continue
7617 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7618 echo "$as_me:7618: found $ac_dir/$ac_word" >&5
7624 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7625 if test -n "$ac_ct_NCURSES_CONFIG"; then
7626 echo "$as_me:7626: result: $ac_ct_NCURSES_CONFIG" >&5
7627 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7629 echo "$as_me:7629: result: no" >&5
7630 echo "${ECHO_T}no" >&6
7633 test -n "$ac_ct_NCURSES_CONFIG" && break
7635 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7637 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7640 if test "$NCURSES_CONFIG" != none ; then
7645 cf_new_extra_cppflags=
7647 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7649 case "$cf_fix_cppflags" in
7651 case "$cf_add_cflags" in
7652 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7653 case "$cf_add_cflags" in
7655 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7657 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7658 && test -z "${cf_tst_cflags}" \
7659 && cf_fix_cppflags=yes
7661 if test "$cf_fix_cppflags" = yes ; then
7663 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7664 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7667 elif test "${cf_tst_cflags}" = "\"'" ; then
7669 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7670 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7680 case "$cf_add_cflags" in
7682 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7684 CPPFLAGS=`echo "$CPPFLAGS" | \
7685 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7686 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7691 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7692 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7699 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7700 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7707 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7708 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7710 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7712 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7713 && test -z "${cf_tst_cflags}" \
7714 && cf_fix_cppflags=no
7719 if test -n "$cf_new_cflags" ; then
7721 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7722 CFLAGS="${CFLAGS}$cf_new_cflags"
7726 if test -n "$cf_new_cppflags" ; then
7728 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7729 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7733 if test -n "$cf_new_extra_cppflags" ; then
7735 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7736 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7743 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7745 for cf_add_1lib in $cf_add_0lib; do
7746 for cf_add_2lib in $cf_add_libs; do
7747 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7752 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7756 # even with config script, some packages use no-override for curses.h
7758 echo "$as_me:7758: checking if we have identified curses headers" >&5
7759 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7760 if test "${cf_cv_ncurses_header+set}" = set; then
7761 echo $ECHO_N "(cached) $ECHO_C" >&6
7764 cf_cv_ncurses_header=none
7766 ncurses.h ncursesw/ncurses.h \
7767 curses.h ncursesw/curses.h
7769 cat >"conftest.$ac_ext" <<_ACEOF
7770 #line 7770 "configure"
7771 #include "confdefs.h"
7772 #include <${cf_header}>
7776 initscr(); tgoto("?", 0,0)
7781 rm -f "conftest.$ac_objext"
7782 if { (eval echo "$as_me:7782: \"$ac_compile\"") >&5
7783 (eval $ac_compile) 2>&5
7785 echo "$as_me:7785: \$? = $ac_status" >&5
7786 (exit "$ac_status"); } &&
7787 { ac_try='test -s "conftest.$ac_objext"'
7788 { (eval echo "$as_me:7788: \"$ac_try\"") >&5
7791 echo "$as_me:7791: \$? = $ac_status" >&5
7792 (exit "$ac_status"); }; }; then
7793 cf_cv_ncurses_header=$cf_header; break
7795 echo "$as_me: failed program was:" >&5
7796 cat "conftest.$ac_ext" >&5
7798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7802 echo "$as_me:7802: result: $cf_cv_ncurses_header" >&5
7803 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7805 if test "$cf_cv_ncurses_header" = none ; then
7806 { { echo "$as_me:7806: error: No curses header-files found" >&5
7807 echo "$as_me: error: No curses header-files found" >&2;}
7808 { (exit 1); exit 1; }; }
7811 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7813 for ac_header in $cf_cv_ncurses_header
7815 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7816 echo "$as_me:7816: checking for $ac_header" >&5
7817 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7818 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7819 echo $ECHO_N "(cached) $ECHO_C" >&6
7821 cat >"conftest.$ac_ext" <<_ACEOF
7822 #line 7822 "configure"
7823 #include "confdefs.h"
7824 #include <$ac_header>
7826 if { (eval echo "$as_me:7826: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7827 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7829 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7831 cat conftest.err >&5
7832 echo "$as_me:7832: \$? = $ac_status" >&5
7833 (exit "$ac_status"); } >/dev/null; then
7834 if test -s conftest.err; then
7835 ac_cpp_err=$ac_c_preproc_warn_flag
7842 if test -z "$ac_cpp_err"; then
7843 eval "$as_ac_Header=yes"
7845 echo "$as_me: failed program was:" >&5
7846 cat "conftest.$ac_ext" >&5
7847 eval "$as_ac_Header=no"
7849 rm -f conftest.err "conftest.$ac_ext"
7851 echo "$as_me:7851: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7852 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7853 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7854 cat >>confdefs.h <<EOF
7855 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7861 cat >>confdefs.h <<\EOF
7865 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7867 cat >>confdefs.h <<EOF
7868 #define $cf_nculib_ROOT 1
7871 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
7875 cf_ncuhdr_root=ncursesw
7877 test -n "$cf_cv_curses_dir" && \
7878 test "$cf_cv_curses_dir" != "no" && { \
7880 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7881 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7883 while test "$cf_add_incdir" != /usr/include
7885 if test -d "$cf_add_incdir"
7888 if test -n "$CFLAGS$CPPFLAGS" ; then
7889 # a loop is needed to ensure we can add subdirs of existing dirs
7890 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7891 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7892 cf_have_incdir=yes; break
7897 if test "$cf_have_incdir" = no ; then
7898 if test "$cf_add_incdir" = /usr/local/include ; then
7899 if test "$GCC" = yes
7901 cf_save_CPPFLAGS=$CPPFLAGS
7903 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7904 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7906 cat >"conftest.$ac_ext" <<_ACEOF
7907 #line 7907 "configure"
7908 #include "confdefs.h"
7918 rm -f "conftest.$ac_objext"
7919 if { (eval echo "$as_me:7919: \"$ac_compile\"") >&5
7920 (eval $ac_compile) 2>&5
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit "$ac_status"); } &&
7924 { ac_try='test -s "conftest.$ac_objext"'
7925 { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7928 echo "$as_me:7928: \$? = $ac_status" >&5
7929 (exit "$ac_status"); }; }; then
7932 echo "$as_me: failed program was:" >&5
7933 cat "conftest.$ac_ext" >&5
7936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7937 CPPFLAGS=$cf_save_CPPFLAGS
7942 if test "$cf_have_incdir" = no ; then
7943 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7945 echo "${as_me:-configure}:7945: testing adding $cf_add_incdir to include-path ..." 1>&5
7947 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7949 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7950 test "$cf_top_incdir" = "$cf_add_incdir" && break
7951 cf_add_incdir="$cf_top_incdir"
7964 echo "$as_me:7964: checking for $cf_ncuhdr_root header in include-path" >&5
7965 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
7966 if test "${cf_cv_ncurses_h+set}" = set; then
7967 echo $ECHO_N "(cached) $ECHO_C" >&6
7970 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
7971 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
7972 for cf_header in $cf_header_list
7975 cat >"conftest.$ac_ext" <<_ACEOF
7976 #line 7976 "configure"
7977 #include "confdefs.h"
7979 #define _XOPEN_SOURCE_EXTENDED
7980 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
7981 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
7983 #include <$cf_header>
7988 #ifdef NCURSES_VERSION
7994 printf("%s\\n", NCURSES_VERSION);
8007 rm -f "conftest.$ac_objext"
8008 if { (eval echo "$as_me:8008: \"$ac_compile\"") >&5
8009 (eval $ac_compile) 2>&5
8011 echo "$as_me:8011: \$? = $ac_status" >&5
8012 (exit "$ac_status"); } &&
8013 { ac_try='test -s "conftest.$ac_objext"'
8014 { (eval echo "$as_me:8014: \"$ac_try\"") >&5
8017 echo "$as_me:8017: \$? = $ac_status" >&5
8018 (exit "$ac_status"); }; }; then
8019 cf_cv_ncurses_h=$cf_header
8022 echo "$as_me: failed program was:" >&5
8023 cat "conftest.$ac_ext" >&5
8026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8028 test "$cf_cv_ncurses_h" != no && break
8032 echo "$as_me:8032: result: $cf_cv_ncurses_h" >&5
8033 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8035 if test "$cf_cv_ncurses_h" != no ; then
8036 cf_cv_ncurses_header=$cf_cv_ncurses_h
8039 echo "$as_me:8039: checking for $cf_ncuhdr_root include-path" >&5
8040 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8041 if test "${cf_cv_ncurses_h2+set}" = set; then
8042 echo $ECHO_N "(cached) $ECHO_C" >&6
8045 test -n "$verbose" && echo
8049 # collect the current set of include-directories from compiler flags
8050 cf_header_path_list=""
8051 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8052 for cf_header_path in $CPPFLAGS $CFLAGS
8054 case "$cf_header_path" in
8056 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8058 test "x$cf_header_path" != "xNONE" && \
8059 test -d "$cf_header_path" && \
8061 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8062 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8063 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8064 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8065 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8066 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"
8069 cf_header_path_list="$cf_header_path_list $cf_search"
8075 # add the variations for the package we are looking for
8079 test "x$prefix" != "xNONE" && \
8080 test -d "$prefix" && \
8082 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8083 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8084 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8085 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8086 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8087 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8090 for cf_subdir_prefix in \
8099 test "x$cf_subdir_prefix" != "x$prefix" && \
8100 test -d "$cf_subdir_prefix" && \
8101 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8102 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8103 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8104 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8105 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8106 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8107 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"
8112 test "$includedir" != NONE && \
8113 test "$includedir" != "/usr/include" && \
8114 test -d "$includedir" && {
8115 test -d "$includedir" && cf_search="$cf_search $includedir"
8116 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8119 test "$oldincludedir" != NONE && \
8120 test "$oldincludedir" != "/usr/include" && \
8121 test -d "$oldincludedir" && {
8122 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8123 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8126 cf_search="$cf_search $cf_header_path_list"
8128 test -n "$verbose" && echo "search path $cf_search"
8129 cf_save2_CPPFLAGS="$CPPFLAGS"
8130 for cf_incdir in $cf_search
8133 if test -n "$cf_incdir" ; then
8134 for cf_add_incdir in $cf_incdir
8136 while test "$cf_add_incdir" != /usr/include
8138 if test -d "$cf_add_incdir"
8141 if test -n "$CFLAGS$CPPFLAGS" ; then
8142 # a loop is needed to ensure we can add subdirs of existing dirs
8143 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8144 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8145 cf_have_incdir=yes; break
8150 if test "$cf_have_incdir" = no ; then
8151 if test "$cf_add_incdir" = /usr/local/include ; then
8152 if test "$GCC" = yes
8154 cf_save_CPPFLAGS=$CPPFLAGS
8156 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8157 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8159 cat >"conftest.$ac_ext" <<_ACEOF
8160 #line 8160 "configure"
8161 #include "confdefs.h"
8171 rm -f "conftest.$ac_objext"
8172 if { (eval echo "$as_me:8172: \"$ac_compile\"") >&5
8173 (eval $ac_compile) 2>&5
8175 echo "$as_me:8175: \$? = $ac_status" >&5
8176 (exit "$ac_status"); } &&
8177 { ac_try='test -s "conftest.$ac_objext"'
8178 { (eval echo "$as_me:8178: \"$ac_try\"") >&5
8181 echo "$as_me:8181: \$? = $ac_status" >&5
8182 (exit "$ac_status"); }; }; then
8185 echo "$as_me: failed program was:" >&5
8186 cat "conftest.$ac_ext" >&5
8189 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8190 CPPFLAGS=$cf_save_CPPFLAGS
8195 if test "$cf_have_incdir" = no ; then
8196 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8198 echo "${as_me:-configure}:8198: testing adding $cf_add_incdir to include-path ..." 1>&5
8200 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8202 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8203 test "$cf_top_incdir" = "$cf_add_incdir" && break
8204 cf_add_incdir="$cf_top_incdir"
8220 cat >"conftest.$ac_ext" <<_ACEOF
8221 #line 8221 "configure"
8222 #include "confdefs.h"
8224 #include <$cf_header>
8229 #ifdef NCURSES_VERSION
8231 printf("%s\\n", NCURSES_VERSION);
8244 rm -f "conftest.$ac_objext"
8245 if { (eval echo "$as_me:8245: \"$ac_compile\"") >&5
8246 (eval $ac_compile) 2>&5
8248 echo "$as_me:8248: \$? = $ac_status" >&5
8249 (exit "$ac_status"); } &&
8250 { ac_try='test -s "conftest.$ac_objext"'
8251 { (eval echo "$as_me:8251: \"$ac_try\"") >&5
8254 echo "$as_me:8254: \$? = $ac_status" >&5
8255 (exit "$ac_status"); }; }; then
8256 cf_cv_ncurses_h2=$cf_header
8259 echo "$as_me: failed program was:" >&5
8260 cat "conftest.$ac_ext" >&5
8263 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8265 if test "$cf_cv_ncurses_h2" != no ; then
8266 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8267 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8270 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8272 CPPFLAGS="$cf_save2_CPPFLAGS"
8273 test "$cf_cv_ncurses_h2" != no && break
8275 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8275: error: not found" >&5
8276 echo "$as_me: error: not found" >&2;}
8277 { (exit 1); exit 1; }; }
8280 echo "$as_me:8280: result: $cf_cv_ncurses_h2" >&5
8281 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8283 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8284 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8285 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8286 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8289 if test -n "$cf_1st_incdir" ; then
8290 for cf_add_incdir in $cf_1st_incdir
8292 while test "$cf_add_incdir" != /usr/include
8294 if test -d "$cf_add_incdir"
8297 if test -n "$CFLAGS$CPPFLAGS" ; then
8298 # a loop is needed to ensure we can add subdirs of existing dirs
8299 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8300 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8301 cf_have_incdir=yes; break
8306 if test "$cf_have_incdir" = no ; then
8307 if test "$cf_add_incdir" = /usr/local/include ; then
8308 if test "$GCC" = yes
8310 cf_save_CPPFLAGS=$CPPFLAGS
8312 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8313 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8315 cat >"conftest.$ac_ext" <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8327 rm -f "conftest.$ac_objext"
8328 if { (eval echo "$as_me:8328: \"$ac_compile\"") >&5
8329 (eval $ac_compile) 2>&5
8331 echo "$as_me:8331: \$? = $ac_status" >&5
8332 (exit "$ac_status"); } &&
8333 { ac_try='test -s "conftest.$ac_objext"'
8334 { (eval echo "$as_me:8334: \"$ac_try\"") >&5
8337 echo "$as_me:8337: \$? = $ac_status" >&5
8338 (exit "$ac_status"); }; }; then
8341 echo "$as_me: failed program was:" >&5
8342 cat "conftest.$ac_ext" >&5
8345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8346 CPPFLAGS=$cf_save_CPPFLAGS
8351 if test "$cf_have_incdir" = no ; then
8352 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8354 echo "${as_me:-configure}:8354: testing adding $cf_add_incdir to include-path ..." 1>&5
8356 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8358 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8359 test "$cf_top_incdir" = "$cf_add_incdir" && break
8360 cf_add_incdir="$cf_top_incdir"
8373 # Set definitions to allow ifdef'ing for ncurses.h
8375 case "$cf_cv_ncurses_header" in
8378 cat >>confdefs.h <<\EOF
8379 #define HAVE_NCURSES_H 1
8385 case "$cf_cv_ncurses_header" in
8386 (ncurses/curses.h|ncurses/ncurses.h)
8388 cat >>confdefs.h <<\EOF
8389 #define HAVE_NCURSES_NCURSES_H 1
8393 (ncursesw/curses.h|ncursesw/ncurses.h)
8395 cat >>confdefs.h <<\EOF
8396 #define HAVE_NCURSESW_NCURSES_H 1
8402 echo "$as_me:8402: checking for terminfo header" >&5
8403 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8404 if test "${cf_cv_term_header+set}" = set; then
8405 echo $ECHO_N "(cached) $ECHO_C" >&6
8408 case "${cf_cv_ncurses_header}" in
8409 (*/ncurses.h|*/ncursesw.h)
8410 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8413 cf_term_header=term.h
8417 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8419 cat >"conftest.$ac_ext" <<_ACEOF
8420 #line 8420 "configure"
8421 #include "confdefs.h"
8423 #include <${cf_cv_ncurses_header:-curses.h}>
8429 int x = auto_left_margin; (void)x
8434 rm -f "conftest.$ac_objext"
8435 if { (eval echo "$as_me:8435: \"$ac_compile\"") >&5
8436 (eval $ac_compile) 2>&5
8438 echo "$as_me:8438: \$? = $ac_status" >&5
8439 (exit "$ac_status"); } &&
8440 { ac_try='test -s "conftest.$ac_objext"'
8441 { (eval echo "$as_me:8441: \"$ac_try\"") >&5
8444 echo "$as_me:8444: \$? = $ac_status" >&5
8445 (exit "$ac_status"); }; }; then
8447 cf_cv_term_header="$cf_test"
8449 echo "$as_me: failed program was:" >&5
8450 cat "conftest.$ac_ext" >&5
8452 cf_cv_term_header=unknown
8455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8456 test "$cf_cv_term_header" != unknown && break
8460 echo "$as_me:8460: result: $cf_cv_term_header" >&5
8461 echo "${ECHO_T}$cf_cv_term_header" >&6
8463 # Set definitions to allow ifdef'ing to accommodate subdirectories
8465 case "$cf_cv_term_header" in
8468 cat >>confdefs.h <<\EOF
8469 #define HAVE_TERM_H 1
8475 case "$cf_cv_term_header" in
8478 cat >>confdefs.h <<\EOF
8479 #define HAVE_NCURSES_TERM_H 1
8485 cat >>confdefs.h <<\EOF
8486 #define HAVE_NCURSESW_TERM_H 1
8492 # some applications need this, but should check for NCURSES_VERSION
8494 cat >>confdefs.h <<\EOF
8498 echo "$as_me:8498: checking for ncurses version" >&5
8499 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8500 if test "${cf_cv_ncurses_version+set}" = set; then
8501 echo $ECHO_N "(cached) $ECHO_C" >&6
8504 cf_cv_ncurses_version=no
8506 rm -f "$cf_tempfile"
8507 if test "$cross_compiling" = yes; then
8509 # This will not work if the preprocessor splits the line after the
8510 # Autoconf token. The 'unproto' program does that.
8511 cat > "conftest.$ac_ext" <<EOF
8512 #include <${cf_cv_ncurses_header:-curses.h}>
8514 #ifdef NCURSES_VERSION
8515 Autoconf NCURSES_VERSION
8523 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8524 { (eval echo "$as_me:8524: \"$cf_try\"") >&5
8527 echo "$as_me:8527: \$? = $ac_status" >&5
8528 (exit "$ac_status"); }
8529 if test -f conftest.out ; then
8530 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8531 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8536 cat >"conftest.$ac_ext" <<_ACEOF
8537 #line 8537 "configure"
8538 #include "confdefs.h"
8540 #include <${cf_cv_ncurses_header:-curses.h}>
8544 FILE *fp = fopen("$cf_tempfile", "w");
8545 #ifdef NCURSES_VERSION
8546 # ifdef NCURSES_VERSION_PATCH
8547 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8549 fprintf(fp, "%s\\n", NCURSES_VERSION);
8553 fprintf(fp, "old\\n");
8558 ${cf_cv_main_return:-return}(0);
8561 rm -f "conftest$ac_exeext"
8562 if { (eval echo "$as_me:8562: \"$ac_link\"") >&5
8563 (eval $ac_link) 2>&5
8565 echo "$as_me:8565: \$? = $ac_status" >&5
8566 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8567 { (eval echo "$as_me:8567: \"$ac_try\"") >&5
8570 echo "$as_me:8570: \$? = $ac_status" >&5
8571 (exit "$ac_status"); }; }; then
8573 cf_cv_ncurses_version=`cat $cf_tempfile`
8575 echo "$as_me: program exited with status $ac_status" >&5
8576 echo "$as_me: failed program was:" >&5
8577 cat "conftest.$ac_ext" >&5
8579 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8581 rm -f "$cf_tempfile"
8584 echo "$as_me:8584: result: $cf_cv_ncurses_version" >&5
8585 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8586 test "$cf_cv_ncurses_version" = no ||
8587 cat >>confdefs.h <<\EOF
8591 cf_nculib_root=ncursesw
8592 # This works, except for the special case where we find gpm, but
8593 # ncurses is in a nonstandard location via $LIBS, and we really want
8596 cf_ncurses_SAVE="$LIBS"
8597 echo "$as_me:8597: checking for Gpm_Open in -lgpm" >&5
8598 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8599 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8600 echo $ECHO_N "(cached) $ECHO_C" >&6
8602 ac_check_lib_save_LIBS=$LIBS
8604 cat >"conftest.$ac_ext" <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8608 /* Override any gcc2 internal prototype to avoid an error. */
8612 /* We use char because int might match the return type of a gcc2
8613 builtin and then its argument prototype would still apply. */
8623 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8624 if { (eval echo "$as_me:8624: \"$ac_link\"") >&5
8625 (eval $ac_link) 2>&5
8627 echo "$as_me:8627: \$? = $ac_status" >&5
8628 (exit "$ac_status"); } &&
8629 { ac_try='test -s "conftest$ac_exeext"'
8630 { (eval echo "$as_me:8630: \"$ac_try\"") >&5
8633 echo "$as_me:8633: \$? = $ac_status" >&5
8634 (exit "$ac_status"); }; }; then
8635 ac_cv_lib_gpm_Gpm_Open=yes
8637 echo "$as_me: failed program was:" >&5
8638 cat "conftest.$ac_ext" >&5
8639 ac_cv_lib_gpm_Gpm_Open=no
8641 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8642 LIBS=$ac_check_lib_save_LIBS
8644 echo "$as_me:8644: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8645 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8646 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8647 echo "$as_me:8647: checking for initscr in -lgpm" >&5
8648 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8649 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8650 echo $ECHO_N "(cached) $ECHO_C" >&6
8652 ac_check_lib_save_LIBS=$LIBS
8654 cat >"conftest.$ac_ext" <<_ACEOF
8655 #line 8655 "configure"
8656 #include "confdefs.h"
8658 /* Override any gcc2 internal prototype to avoid an error. */
8662 /* We use char because int might match the return type of a gcc2
8663 builtin and then its argument prototype would still apply. */
8673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8674 if { (eval echo "$as_me:8674: \"$ac_link\"") >&5
8675 (eval $ac_link) 2>&5
8677 echo "$as_me:8677: \$? = $ac_status" >&5
8678 (exit "$ac_status"); } &&
8679 { ac_try='test -s "conftest$ac_exeext"'
8680 { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8683 echo "$as_me:8683: \$? = $ac_status" >&5
8684 (exit "$ac_status"); }; }; then
8685 ac_cv_lib_gpm_initscr=yes
8687 echo "$as_me: failed program was:" >&5
8688 cat "conftest.$ac_ext" >&5
8689 ac_cv_lib_gpm_initscr=no
8691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8692 LIBS=$ac_check_lib_save_LIBS
8694 echo "$as_me:8694: result: $ac_cv_lib_gpm_initscr" >&5
8695 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8696 if test "$ac_cv_lib_gpm_initscr" = yes; then
8697 LIBS="$cf_ncurses_SAVE"
8699 cf_ncurses_LIBS="-lgpm"
8706 # This is only necessary if you are linking against an obsolete
8707 # version of ncurses (but it should do no harm, since it's static).
8708 if test "$cf_nculib_root" = ncurses ; then
8709 echo "$as_me:8709: checking for tgoto in -lmytinfo" >&5
8710 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8711 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8712 echo $ECHO_N "(cached) $ECHO_C" >&6
8714 ac_check_lib_save_LIBS=$LIBS
8715 LIBS="-lmytinfo $LIBS"
8716 cat >"conftest.$ac_ext" <<_ACEOF
8717 #line 8717 "configure"
8718 #include "confdefs.h"
8720 /* Override any gcc2 internal prototype to avoid an error. */
8724 /* We use char because int might match the return type of a gcc2
8725 builtin and then its argument prototype would still apply. */
8735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8736 if { (eval echo "$as_me:8736: \"$ac_link\"") >&5
8737 (eval $ac_link) 2>&5
8739 echo "$as_me:8739: \$? = $ac_status" >&5
8740 (exit "$ac_status"); } &&
8741 { ac_try='test -s "conftest$ac_exeext"'
8742 { (eval echo "$as_me:8742: \"$ac_try\"") >&5
8745 echo "$as_me:8745: \$? = $ac_status" >&5
8746 (exit "$ac_status"); }; }; then
8747 ac_cv_lib_mytinfo_tgoto=yes
8749 echo "$as_me: failed program was:" >&5
8750 cat "conftest.$ac_ext" >&5
8751 ac_cv_lib_mytinfo_tgoto=no
8753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8754 LIBS=$ac_check_lib_save_LIBS
8756 echo "$as_me:8756: result: $ac_cv_lib_mytinfo_tgoto" >&5
8757 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8758 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8759 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8769 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8771 for cf_add_1lib in $cf_add_0lib; do
8772 for cf_add_2lib in $cf_add_libs; do
8773 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8778 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8782 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8788 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8790 for cf_add_1lib in $cf_add_0lib; do
8791 for cf_add_2lib in $cf_add_libs; do
8792 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8797 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8803 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
8805 echo "$as_me:8805: checking for initscr" >&5
8806 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8807 if test "${ac_cv_func_initscr+set}" = set; then
8808 echo $ECHO_N "(cached) $ECHO_C" >&6
8810 cat >"conftest.$ac_ext" <<_ACEOF
8811 #line 8811 "configure"
8812 #include "confdefs.h"
8813 #define initscr autoconf_temporary
8814 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8821 /* We use char because int might match the return type of a gcc2
8822 builtin and then its argument prototype would still apply. */
8823 char initscr (void);
8829 /* The GNU C library defines stubs for functions which it implements
8830 to always fail with ENOSYS. Some functions are actually named
8831 something starting with __ and the normal name is an alias. */
8832 #if defined (__stub_initscr) || defined (__stub___initscr)
8833 #error found stub for initscr
8841 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8842 if { (eval echo "$as_me:8842: \"$ac_link\"") >&5
8843 (eval $ac_link) 2>&5
8845 echo "$as_me:8845: \$? = $ac_status" >&5
8846 (exit "$ac_status"); } &&
8847 { ac_try='test -s "conftest$ac_exeext"'
8848 { (eval echo "$as_me:8848: \"$ac_try\"") >&5
8851 echo "$as_me:8851: \$? = $ac_status" >&5
8852 (exit "$ac_status"); }; }; then
8853 ac_cv_func_initscr=yes
8855 echo "$as_me: failed program was:" >&5
8856 cat "conftest.$ac_ext" >&5
8857 ac_cv_func_initscr=no
8859 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8861 echo "$as_me:8861: result: $ac_cv_func_initscr" >&5
8862 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8863 if test "$ac_cv_func_initscr" = yes; then
8864 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8867 cf_save_LIBS="$LIBS"
8868 echo "$as_me:8868: checking for initscr in -l$cf_nculib_root" >&5
8869 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8870 LIBS="-l$cf_nculib_root $LIBS"
8871 cat >"conftest.$ac_ext" <<_ACEOF
8872 #line 8872 "configure"
8873 #include "confdefs.h"
8874 #include <${cf_cv_ncurses_header:-curses.h}>
8883 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8884 if { (eval echo "$as_me:8884: \"$ac_link\"") >&5
8885 (eval $ac_link) 2>&5
8887 echo "$as_me:8887: \$? = $ac_status" >&5
8888 (exit "$ac_status"); } &&
8889 { ac_try='test -s "conftest$ac_exeext"'
8890 { (eval echo "$as_me:8890: \"$ac_try\"") >&5
8893 echo "$as_me:8893: \$? = $ac_status" >&5
8894 (exit "$ac_status"); }; }; then
8895 echo "$as_me:8895: result: yes" >&5
8896 echo "${ECHO_T}yes" >&6
8897 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8900 echo "$as_me: failed program was:" >&5
8901 cat "conftest.$ac_ext" >&5
8902 echo "$as_me:8902: result: no" >&5
8903 echo "${ECHO_T}no" >&6
8906 cf_library_path_list=""
8907 if test -n "${LDFLAGS}${LIBS}" ; then
8908 for cf_library_path in $LDFLAGS $LIBS
8910 case "$cf_library_path" in
8912 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8914 test "x$cf_library_path" != "xNONE" && \
8915 test -d "$cf_library_path" && \
8917 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8918 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8919 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8920 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8921 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8922 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"
8925 cf_library_path_list="$cf_library_path_list $cf_search"
8933 test "x$prefix" != "xNONE" && \
8934 test -d "$prefix" && \
8936 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8937 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8938 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
8939 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
8940 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
8941 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
8944 for cf_subdir_prefix in \
8953 test "x$cf_subdir_prefix" != "x$prefix" && \
8954 test -d "$cf_subdir_prefix" && \
8955 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8956 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8957 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8958 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
8959 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
8960 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
8961 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"
8966 cf_search="$cf_library_path_list $cf_search"
8968 for cf_libdir in $cf_search
8970 echo "$as_me:8970: checking for -l$cf_nculib_root in $cf_libdir" >&5
8971 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
8972 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
8973 cat >"conftest.$ac_ext" <<_ACEOF
8974 #line 8974 "configure"
8975 #include "confdefs.h"
8976 #include <${cf_cv_ncurses_header:-curses.h}>
8985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8986 if { (eval echo "$as_me:8986: \"$ac_link\"") >&5
8987 (eval $ac_link) 2>&5
8989 echo "$as_me:8989: \$? = $ac_status" >&5
8990 (exit "$ac_status"); } &&
8991 { ac_try='test -s "conftest$ac_exeext"'
8992 { (eval echo "$as_me:8992: \"$ac_try\"") >&5
8995 echo "$as_me:8995: \$? = $ac_status" >&5
8996 (exit "$ac_status"); }; }; then
8997 echo "$as_me:8997: result: yes" >&5
8998 echo "${ECHO_T}yes" >&6
8999 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9002 echo "$as_me: failed program was:" >&5
9003 cat "conftest.$ac_ext" >&5
9004 echo "$as_me:9004: result: no" >&5
9005 echo "${ECHO_T}no" >&6
9006 LIBS="$cf_save_LIBS"
9008 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9012 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9016 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9018 if test "$cf_found_library" = no ; then
9019 { { echo "$as_me:9019: error: Cannot link $cf_nculib_root library" >&5
9020 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9021 { (exit 1); exit 1; }; }
9026 if test -n "$cf_ncurses_LIBS" ; then
9027 echo "$as_me:9027: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9028 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9029 cf_ncurses_SAVE="$LIBS"
9030 for p in $cf_ncurses_LIBS ; do
9031 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9032 if test "$q" != "$LIBS" ; then
9036 cat >"conftest.$ac_ext" <<_ACEOF
9037 #line 9037 "configure"
9038 #include "confdefs.h"
9039 #include <${cf_cv_ncurses_header:-curses.h}>
9043 initscr(); mousemask(0,0); tigetstr((char *)0);
9048 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9049 if { (eval echo "$as_me:9049: \"$ac_link\"") >&5
9050 (eval $ac_link) 2>&5
9052 echo "$as_me:9052: \$? = $ac_status" >&5
9053 (exit "$ac_status"); } &&
9054 { ac_try='test -s "conftest$ac_exeext"'
9055 { (eval echo "$as_me:9055: \"$ac_try\"") >&5
9058 echo "$as_me:9058: \$? = $ac_status" >&5
9059 (exit "$ac_status"); }; }; then
9060 echo "$as_me:9060: result: yes" >&5
9061 echo "${ECHO_T}yes" >&6
9063 echo "$as_me: failed program was:" >&5
9064 cat "conftest.$ac_ext" >&5
9065 echo "$as_me:9065: result: no" >&5
9066 echo "${ECHO_T}no" >&6
9067 LIBS="$cf_ncurses_SAVE"
9069 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9072 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9074 cat >>confdefs.h <<EOF
9075 #define $cf_nculib_ROOT 1
9085 cf_ncuconfig_root=ncurses
9086 cf_have_ncuconfig=no
9088 if test "x${PKG_CONFIG:=none}" != xnone; then
9089 echo "$as_me:9089: checking pkg-config for $cf_ncuconfig_root" >&5
9090 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9091 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9092 echo "$as_me:9092: result: yes" >&5
9093 echo "${ECHO_T}yes" >&6
9095 echo "$as_me:9095: checking if the $cf_ncuconfig_root package files work" >&5
9096 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9097 cf_have_ncuconfig=unknown
9099 cf_save_CFLAGS="$CFLAGS"
9100 cf_save_CPPFLAGS="$CPPFLAGS"
9101 cf_save_LIBS="$LIBS"
9103 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9104 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9106 # while -W for passing linker flags is prevalent, it is not "standard".
9107 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9108 # incompatible _and_ non-standard -W option which gives an error. Work
9109 # around that pitfall.
9110 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9116 cf_new_extra_cppflags=
9118 for cf_add_cflags in $cf_pkg_cflags
9120 case "$cf_fix_cppflags" in
9122 case "$cf_add_cflags" in
9123 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9124 case "$cf_add_cflags" in
9126 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9128 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9129 && test -z "${cf_tst_cflags}" \
9130 && cf_fix_cppflags=yes
9132 if test "$cf_fix_cppflags" = yes ; then
9134 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9135 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9138 elif test "${cf_tst_cflags}" = "\"'" ; then
9140 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9141 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9151 case "$cf_add_cflags" in
9153 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9155 CPPFLAGS=`echo "$CPPFLAGS" | \
9156 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9157 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9162 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9163 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9170 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9171 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9178 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9179 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9181 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9183 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9184 && test -z "${cf_tst_cflags}" \
9185 && cf_fix_cppflags=no
9190 if test -n "$cf_new_cflags" ; then
9192 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9193 CFLAGS="${CFLAGS}$cf_new_cflags"
9197 if test -n "$cf_new_cppflags" ; then
9199 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9200 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9204 if test -n "$cf_new_extra_cppflags" ; then
9206 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9207 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9214 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9216 for cf_add_1lib in $cf_add_0lib; do
9217 for cf_add_2lib in $cf_add_libs; do
9218 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9223 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9227 cat >"conftest.$ac_ext" <<_ACEOF
9228 #line 9228 "configure"
9229 #include "confdefs.h"
9230 #include <${cf_cv_ncurses_header:-curses.h}>
9234 initscr(); mousemask(0,0); tigetstr((char *)0);
9239 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9240 if { (eval echo "$as_me:9240: \"$ac_link\"") >&5
9241 (eval $ac_link) 2>&5
9243 echo "$as_me:9243: \$? = $ac_status" >&5
9244 (exit "$ac_status"); } &&
9245 { ac_try='test -s "conftest$ac_exeext"'
9246 { (eval echo "$as_me:9246: \"$ac_try\"") >&5
9249 echo "$as_me:9249: \$? = $ac_status" >&5
9250 (exit "$ac_status"); }; }; then
9251 if test "$cross_compiling" = yes; then
9252 cf_test_ncuconfig=maybe
9254 cat >"conftest.$ac_ext" <<_ACEOF
9255 #line 9255 "configure"
9256 #include "confdefs.h"
9257 #include <${cf_cv_ncurses_header:-curses.h}>
9259 { const char *xx = curses_version(); return (xx == 0); }
9261 rm -f "conftest$ac_exeext"
9262 if { (eval echo "$as_me:9262: \"$ac_link\"") >&5
9263 (eval $ac_link) 2>&5
9265 echo "$as_me:9265: \$? = $ac_status" >&5
9266 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9267 { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9270 echo "$as_me:9270: \$? = $ac_status" >&5
9271 (exit "$ac_status"); }; }; then
9272 cf_test_ncuconfig=yes
9274 echo "$as_me: program exited with status $ac_status" >&5
9275 echo "$as_me: failed program was:" >&5
9276 cat "conftest.$ac_ext" >&5
9277 cf_test_ncuconfig=no
9279 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9282 echo "$as_me: failed program was:" >&5
9283 cat "conftest.$ac_ext" >&5
9284 cf_test_ncuconfig=no
9286 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9288 CFLAGS="$cf_save_CFLAGS"
9289 CPPFLAGS="$cf_save_CPPFLAGS"
9290 LIBS="$cf_save_LIBS"
9292 if test "x$cf_test_ncuconfig" != xyes; then
9293 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9294 cf_pkg_cflags="$cf_temp"
9295 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9296 cf_pkg_libs="$cf_temp"
9304 cf_new_extra_cppflags=
9306 for cf_add_cflags in $cf_pkg_cflags
9308 case "$cf_fix_cppflags" in
9310 case "$cf_add_cflags" in
9311 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9312 case "$cf_add_cflags" in
9314 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9316 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9317 && test -z "${cf_tst_cflags}" \
9318 && cf_fix_cppflags=yes
9320 if test "$cf_fix_cppflags" = yes ; then
9322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9326 elif test "${cf_tst_cflags}" = "\"'" ; then
9328 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9329 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9339 case "$cf_add_cflags" in
9341 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9343 CPPFLAGS=`echo "$CPPFLAGS" | \
9344 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9345 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9350 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9351 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9358 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9359 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9366 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9367 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9369 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9371 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9372 && test -z "${cf_tst_cflags}" \
9373 && cf_fix_cppflags=no
9378 if test -n "$cf_new_cflags" ; then
9380 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9381 CFLAGS="${CFLAGS}$cf_new_cflags"
9385 if test -n "$cf_new_cppflags" ; then
9387 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9388 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9392 if test -n "$cf_new_extra_cppflags" ; then
9394 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9395 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9402 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9404 for cf_add_1lib in $cf_add_0lib; do
9405 for cf_add_2lib in $cf_add_libs; do
9406 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9411 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9415 cat >"conftest.$ac_ext" <<_ACEOF
9416 #line 9416 "configure"
9417 #include "confdefs.h"
9418 #include <${cf_cv_ncurses_header:-curses.h}>
9422 initscr(); mousemask(0,0); tigetstr((char *)0);
9427 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9428 if { (eval echo "$as_me:9428: \"$ac_link\"") >&5
9429 (eval $ac_link) 2>&5
9431 echo "$as_me:9431: \$? = $ac_status" >&5
9432 (exit "$ac_status"); } &&
9433 { ac_try='test -s "conftest$ac_exeext"'
9434 { (eval echo "$as_me:9434: \"$ac_try\"") >&5
9437 echo "$as_me:9437: \$? = $ac_status" >&5
9438 (exit "$ac_status"); }; }; then
9439 if test "$cross_compiling" = yes; then
9440 cf_have_ncuconfig=maybe
9442 cat >"conftest.$ac_ext" <<_ACEOF
9443 #line 9443 "configure"
9444 #include "confdefs.h"
9445 #include <${cf_cv_ncurses_header:-curses.h}>
9447 { const char *xx = curses_version(); return (xx == 0); }
9449 rm -f "conftest$ac_exeext"
9450 if { (eval echo "$as_me:9450: \"$ac_link\"") >&5
9451 (eval $ac_link) 2>&5
9453 echo "$as_me:9453: \$? = $ac_status" >&5
9454 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9455 { (eval echo "$as_me:9455: \"$ac_try\"") >&5
9458 echo "$as_me:9458: \$? = $ac_status" >&5
9459 (exit "$ac_status"); }; }; then
9460 cf_have_ncuconfig=yes
9462 echo "$as_me: program exited with status $ac_status" >&5
9463 echo "$as_me: failed program was:" >&5
9464 cat "conftest.$ac_ext" >&5
9465 cf_have_ncuconfig=no
9467 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9470 echo "$as_me: failed program was:" >&5
9471 cat "conftest.$ac_ext" >&5
9472 cf_have_ncuconfig=no
9474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9475 echo "$as_me:9475: result: $cf_have_ncuconfig" >&5
9476 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9477 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9478 if test "$cf_have_ncuconfig" != "yes"
9480 CPPFLAGS="$cf_save_CPPFLAGS"
9481 LIBS="$cf_save_LIBS"
9482 NCURSES_CONFIG_PKG=none
9485 cat >>confdefs.h <<\EOF
9489 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9491 echo "$as_me:9491: checking for terminfo header" >&5
9492 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9493 if test "${cf_cv_term_header+set}" = set; then
9494 echo $ECHO_N "(cached) $ECHO_C" >&6
9497 case "${cf_cv_ncurses_header}" in
9498 (*/ncurses.h|*/ncursesw.h)
9499 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9502 cf_term_header=term.h
9506 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9508 cat >"conftest.$ac_ext" <<_ACEOF
9509 #line 9509 "configure"
9510 #include "confdefs.h"
9512 #include <${cf_cv_ncurses_header:-curses.h}>
9518 int x = auto_left_margin; (void)x
9523 rm -f "conftest.$ac_objext"
9524 if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5
9525 (eval $ac_compile) 2>&5
9527 echo "$as_me:9527: \$? = $ac_status" >&5
9528 (exit "$ac_status"); } &&
9529 { ac_try='test -s "conftest.$ac_objext"'
9530 { (eval echo "$as_me:9530: \"$ac_try\"") >&5
9533 echo "$as_me:9533: \$? = $ac_status" >&5
9534 (exit "$ac_status"); }; }; then
9536 cf_cv_term_header="$cf_test"
9538 echo "$as_me: failed program was:" >&5
9539 cat "conftest.$ac_ext" >&5
9541 cf_cv_term_header=unknown
9544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9545 test "$cf_cv_term_header" != unknown && break
9549 echo "$as_me:9549: result: $cf_cv_term_header" >&5
9550 echo "${ECHO_T}$cf_cv_term_header" >&6
9552 # Set definitions to allow ifdef'ing to accommodate subdirectories
9554 case "$cf_cv_term_header" in
9557 cat >>confdefs.h <<\EOF
9558 #define HAVE_TERM_H 1
9564 case "$cf_cv_term_header" in
9567 cat >>confdefs.h <<\EOF
9568 #define HAVE_NCURSES_TERM_H 1
9574 cat >>confdefs.h <<\EOF
9575 #define HAVE_NCURSESW_TERM_H 1
9584 echo "$as_me:9584: result: no" >&5
9585 echo "${ECHO_T}no" >&6
9586 NCURSES_CONFIG_PKG=none
9589 NCURSES_CONFIG_PKG=none
9592 if test "x$cf_have_ncuconfig" = "xno"; then
9593 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9595 if test -n "$ac_tool_prefix"; then
9596 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9598 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9599 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9600 echo "$as_me:9600: checking for $ac_word" >&5
9601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9602 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9603 echo $ECHO_N "(cached) $ECHO_C" >&6
9605 if test -n "$NCURSES_CONFIG"; then
9606 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9608 ac_save_IFS=$IFS; IFS=$ac_path_separator
9610 for ac_dir in $ac_dummy; do
9612 test -z "$ac_dir" && ac_dir=.
9613 $as_executable_p "$ac_dir/$ac_word" || continue
9614 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9615 echo "$as_me:9615: found $ac_dir/$ac_word" >&5
9621 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9622 if test -n "$NCURSES_CONFIG"; then
9623 echo "$as_me:9623: result: $NCURSES_CONFIG" >&5
9624 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9626 echo "$as_me:9626: result: no" >&5
9627 echo "${ECHO_T}no" >&6
9630 test -n "$NCURSES_CONFIG" && break
9633 if test -z "$NCURSES_CONFIG"; then
9634 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9635 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9637 # Extract the first word of "$ac_prog", so it can be a program name with args.
9638 set dummy $ac_prog; ac_word=$2
9639 echo "$as_me:9639: checking for $ac_word" >&5
9640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9641 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9642 echo $ECHO_N "(cached) $ECHO_C" >&6
9644 if test -n "$ac_ct_NCURSES_CONFIG"; then
9645 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9647 ac_save_IFS=$IFS; IFS=$ac_path_separator
9649 for ac_dir in $ac_dummy; do
9651 test -z "$ac_dir" && ac_dir=.
9652 $as_executable_p "$ac_dir/$ac_word" || continue
9653 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9654 echo "$as_me:9654: found $ac_dir/$ac_word" >&5
9660 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9661 if test -n "$ac_ct_NCURSES_CONFIG"; then
9662 echo "$as_me:9662: result: $ac_ct_NCURSES_CONFIG" >&5
9663 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9665 echo "$as_me:9665: result: no" >&5
9666 echo "${ECHO_T}no" >&6
9669 test -n "$ac_ct_NCURSES_CONFIG" && break
9671 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9673 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9676 if test "$NCURSES_CONFIG" != none ; then
9681 cf_new_extra_cppflags=
9683 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9685 case "$cf_fix_cppflags" in
9687 case "$cf_add_cflags" in
9688 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9689 case "$cf_add_cflags" in
9691 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9693 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9694 && test -z "${cf_tst_cflags}" \
9695 && cf_fix_cppflags=yes
9697 if test "$cf_fix_cppflags" = yes ; then
9699 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9700 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9703 elif test "${cf_tst_cflags}" = "\"'" ; then
9705 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9706 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9716 case "$cf_add_cflags" in
9718 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9720 CPPFLAGS=`echo "$CPPFLAGS" | \
9721 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9722 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9727 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9728 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9735 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9736 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9743 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9744 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9746 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9748 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9749 && test -z "${cf_tst_cflags}" \
9750 && cf_fix_cppflags=no
9755 if test -n "$cf_new_cflags" ; then
9757 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9758 CFLAGS="${CFLAGS}$cf_new_cflags"
9762 if test -n "$cf_new_cppflags" ; then
9764 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9765 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9769 if test -n "$cf_new_extra_cppflags" ; then
9771 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9772 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9779 for cf_add_1lib in `$NCURSES_CONFIG --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 # even with config script, some packages use no-override for curses.h
9794 echo "$as_me:9794: checking if we have identified curses headers" >&5
9795 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9796 if test "${cf_cv_ncurses_header+set}" = set; then
9797 echo $ECHO_N "(cached) $ECHO_C" >&6
9800 cf_cv_ncurses_header=none
9802 ncurses.h ncurses/ncurses.h \
9803 curses.h ncurses/curses.h
9805 cat >"conftest.$ac_ext" <<_ACEOF
9806 #line 9806 "configure"
9807 #include "confdefs.h"
9808 #include <${cf_header}>
9812 initscr(); tgoto("?", 0,0)
9817 rm -f "conftest.$ac_objext"
9818 if { (eval echo "$as_me:9818: \"$ac_compile\"") >&5
9819 (eval $ac_compile) 2>&5
9821 echo "$as_me:9821: \$? = $ac_status" >&5
9822 (exit "$ac_status"); } &&
9823 { ac_try='test -s "conftest.$ac_objext"'
9824 { (eval echo "$as_me:9824: \"$ac_try\"") >&5
9827 echo "$as_me:9827: \$? = $ac_status" >&5
9828 (exit "$ac_status"); }; }; then
9829 cf_cv_ncurses_header=$cf_header; break
9831 echo "$as_me: failed program was:" >&5
9832 cat "conftest.$ac_ext" >&5
9834 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9838 echo "$as_me:9838: result: $cf_cv_ncurses_header" >&5
9839 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9841 if test "$cf_cv_ncurses_header" = none ; then
9842 { { echo "$as_me:9842: error: No curses header-files found" >&5
9843 echo "$as_me: error: No curses header-files found" >&2;}
9844 { (exit 1); exit 1; }; }
9847 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9849 for ac_header in $cf_cv_ncurses_header
9851 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9852 echo "$as_me:9852: checking for $ac_header" >&5
9853 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9854 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9855 echo $ECHO_N "(cached) $ECHO_C" >&6
9857 cat >"conftest.$ac_ext" <<_ACEOF
9858 #line 9858 "configure"
9859 #include "confdefs.h"
9860 #include <$ac_header>
9862 if { (eval echo "$as_me:9862: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9863 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9865 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9867 cat conftest.err >&5
9868 echo "$as_me:9868: \$? = $ac_status" >&5
9869 (exit "$ac_status"); } >/dev/null; then
9870 if test -s conftest.err; then
9871 ac_cpp_err=$ac_c_preproc_warn_flag
9878 if test -z "$ac_cpp_err"; then
9879 eval "$as_ac_Header=yes"
9881 echo "$as_me: failed program was:" >&5
9882 cat "conftest.$ac_ext" >&5
9883 eval "$as_ac_Header=no"
9885 rm -f conftest.err "conftest.$ac_ext"
9887 echo "$as_me:9887: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9888 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9889 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9890 cat >>confdefs.h <<EOF
9891 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9897 cat >>confdefs.h <<\EOF
9901 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9903 cat >>confdefs.h <<EOF
9904 #define $cf_nculib_ROOT 1
9907 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9911 cf_ncuhdr_root=ncurses
9913 test -n "$cf_cv_curses_dir" && \
9914 test "$cf_cv_curses_dir" != "no" && { \
9916 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9917 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9919 while test "$cf_add_incdir" != /usr/include
9921 if test -d "$cf_add_incdir"
9924 if test -n "$CFLAGS$CPPFLAGS" ; then
9925 # a loop is needed to ensure we can add subdirs of existing dirs
9926 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9927 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9928 cf_have_incdir=yes; break
9933 if test "$cf_have_incdir" = no ; then
9934 if test "$cf_add_incdir" = /usr/local/include ; then
9935 if test "$GCC" = yes
9937 cf_save_CPPFLAGS=$CPPFLAGS
9939 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9940 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9942 cat >"conftest.$ac_ext" <<_ACEOF
9943 #line 9943 "configure"
9944 #include "confdefs.h"
9954 rm -f "conftest.$ac_objext"
9955 if { (eval echo "$as_me:9955: \"$ac_compile\"") >&5
9956 (eval $ac_compile) 2>&5
9958 echo "$as_me:9958: \$? = $ac_status" >&5
9959 (exit "$ac_status"); } &&
9960 { ac_try='test -s "conftest.$ac_objext"'
9961 { (eval echo "$as_me:9961: \"$ac_try\"") >&5
9964 echo "$as_me:9964: \$? = $ac_status" >&5
9965 (exit "$ac_status"); }; }; then
9968 echo "$as_me: failed program was:" >&5
9969 cat "conftest.$ac_ext" >&5
9972 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9973 CPPFLAGS=$cf_save_CPPFLAGS
9978 if test "$cf_have_incdir" = no ; then
9979 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9981 echo "${as_me:-configure}:9981: testing adding $cf_add_incdir to include-path ..." 1>&5
9983 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9985 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9986 test "$cf_top_incdir" = "$cf_add_incdir" && break
9987 cf_add_incdir="$cf_top_incdir"
10000 echo "$as_me:10000: checking for $cf_ncuhdr_root header in include-path" >&5
10001 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10002 if test "${cf_cv_ncurses_h+set}" = set; then
10003 echo $ECHO_N "(cached) $ECHO_C" >&6
10006 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10007 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10008 for cf_header in $cf_header_list
10011 cat >"conftest.$ac_ext" <<_ACEOF
10012 #line 10012 "configure"
10013 #include "confdefs.h"
10015 #include <$cf_header>
10020 #ifdef NCURSES_VERSION
10022 printf("%s\\n", NCURSES_VERSION);
10035 rm -f "conftest.$ac_objext"
10036 if { (eval echo "$as_me:10036: \"$ac_compile\"") >&5
10037 (eval $ac_compile) 2>&5
10039 echo "$as_me:10039: \$? = $ac_status" >&5
10040 (exit "$ac_status"); } &&
10041 { ac_try='test -s "conftest.$ac_objext"'
10042 { (eval echo "$as_me:10042: \"$ac_try\"") >&5
10043 (eval $ac_try) 2>&5
10045 echo "$as_me:10045: \$? = $ac_status" >&5
10046 (exit "$ac_status"); }; }; then
10047 cf_cv_ncurses_h=$cf_header
10050 echo "$as_me: failed program was:" >&5
10051 cat "conftest.$ac_ext" >&5
10054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10056 test "$cf_cv_ncurses_h" != no && break
10060 echo "$as_me:10060: result: $cf_cv_ncurses_h" >&5
10061 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10063 if test "$cf_cv_ncurses_h" != no ; then
10064 cf_cv_ncurses_header=$cf_cv_ncurses_h
10067 echo "$as_me:10067: checking for $cf_ncuhdr_root include-path" >&5
10068 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10069 if test "${cf_cv_ncurses_h2+set}" = set; then
10070 echo $ECHO_N "(cached) $ECHO_C" >&6
10073 test -n "$verbose" && echo
10077 # collect the current set of include-directories from compiler flags
10078 cf_header_path_list=""
10079 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10080 for cf_header_path in $CPPFLAGS $CFLAGS
10082 case "$cf_header_path" in
10084 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10086 test "x$cf_header_path" != "xNONE" && \
10087 test -d "$cf_header_path" && \
10089 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10090 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10091 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10092 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10093 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10094 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"
10097 cf_header_path_list="$cf_header_path_list $cf_search"
10103 # add the variations for the package we are looking for
10107 test "x$prefix" != "xNONE" && \
10108 test -d "$prefix" && \
10110 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10111 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10112 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10113 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10114 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10115 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10118 for cf_subdir_prefix in \
10127 test "x$cf_subdir_prefix" != "x$prefix" && \
10128 test -d "$cf_subdir_prefix" && \
10129 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10130 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10131 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10132 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10133 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10134 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10135 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"
10140 test "$includedir" != NONE && \
10141 test "$includedir" != "/usr/include" && \
10142 test -d "$includedir" && {
10143 test -d "$includedir" && cf_search="$cf_search $includedir"
10144 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10147 test "$oldincludedir" != NONE && \
10148 test "$oldincludedir" != "/usr/include" && \
10149 test -d "$oldincludedir" && {
10150 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10151 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10154 cf_search="$cf_search $cf_header_path_list"
10156 test -n "$verbose" && echo "search path $cf_search"
10157 cf_save2_CPPFLAGS="$CPPFLAGS"
10158 for cf_incdir in $cf_search
10161 if test -n "$cf_incdir" ; then
10162 for cf_add_incdir in $cf_incdir
10164 while test "$cf_add_incdir" != /usr/include
10166 if test -d "$cf_add_incdir"
10169 if test -n "$CFLAGS$CPPFLAGS" ; then
10170 # a loop is needed to ensure we can add subdirs of existing dirs
10171 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10172 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10173 cf_have_incdir=yes; break
10178 if test "$cf_have_incdir" = no ; then
10179 if test "$cf_add_incdir" = /usr/local/include ; then
10180 if test "$GCC" = yes
10182 cf_save_CPPFLAGS=$CPPFLAGS
10184 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10185 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10187 cat >"conftest.$ac_ext" <<_ACEOF
10188 #line 10188 "configure"
10189 #include "confdefs.h"
10199 rm -f "conftest.$ac_objext"
10200 if { (eval echo "$as_me:10200: \"$ac_compile\"") >&5
10201 (eval $ac_compile) 2>&5
10203 echo "$as_me:10203: \$? = $ac_status" >&5
10204 (exit "$ac_status"); } &&
10205 { ac_try='test -s "conftest.$ac_objext"'
10206 { (eval echo "$as_me:10206: \"$ac_try\"") >&5
10207 (eval $ac_try) 2>&5
10209 echo "$as_me:10209: \$? = $ac_status" >&5
10210 (exit "$ac_status"); }; }; then
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10217 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10218 CPPFLAGS=$cf_save_CPPFLAGS
10223 if test "$cf_have_incdir" = no ; then
10224 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10226 echo "${as_me:-configure}:10226: testing adding $cf_add_incdir to include-path ..." 1>&5
10228 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10230 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10231 test "$cf_top_incdir" = "$cf_add_incdir" && break
10232 cf_add_incdir="$cf_top_incdir"
10248 cat >"conftest.$ac_ext" <<_ACEOF
10249 #line 10249 "configure"
10250 #include "confdefs.h"
10252 #include <$cf_header>
10257 #ifdef NCURSES_VERSION
10259 printf("%s\\n", NCURSES_VERSION);
10272 rm -f "conftest.$ac_objext"
10273 if { (eval echo "$as_me:10273: \"$ac_compile\"") >&5
10274 (eval $ac_compile) 2>&5
10276 echo "$as_me:10276: \$? = $ac_status" >&5
10277 (exit "$ac_status"); } &&
10278 { ac_try='test -s "conftest.$ac_objext"'
10279 { (eval echo "$as_me:10279: \"$ac_try\"") >&5
10280 (eval $ac_try) 2>&5
10282 echo "$as_me:10282: \$? = $ac_status" >&5
10283 (exit "$ac_status"); }; }; then
10284 cf_cv_ncurses_h2=$cf_header
10287 echo "$as_me: failed program was:" >&5
10288 cat "conftest.$ac_ext" >&5
10289 cf_cv_ncurses_h2=no
10291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10293 if test "$cf_cv_ncurses_h2" != no ; then
10294 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10295 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10298 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10300 CPPFLAGS="$cf_save2_CPPFLAGS"
10301 test "$cf_cv_ncurses_h2" != no && break
10303 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10303: error: not found" >&5
10304 echo "$as_me: error: not found" >&2;}
10305 { (exit 1); exit 1; }; }
10308 echo "$as_me:10308: result: $cf_cv_ncurses_h2" >&5
10309 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10311 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10312 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10313 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10314 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10317 if test -n "$cf_1st_incdir" ; then
10318 for cf_add_incdir in $cf_1st_incdir
10320 while test "$cf_add_incdir" != /usr/include
10322 if test -d "$cf_add_incdir"
10325 if test -n "$CFLAGS$CPPFLAGS" ; then
10326 # a loop is needed to ensure we can add subdirs of existing dirs
10327 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10328 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10329 cf_have_incdir=yes; break
10334 if test "$cf_have_incdir" = no ; then
10335 if test "$cf_add_incdir" = /usr/local/include ; then
10336 if test "$GCC" = yes
10338 cf_save_CPPFLAGS=$CPPFLAGS
10340 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10341 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10343 cat >"conftest.$ac_ext" <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10355 rm -f "conftest.$ac_objext"
10356 if { (eval echo "$as_me:10356: \"$ac_compile\"") >&5
10357 (eval $ac_compile) 2>&5
10359 echo "$as_me:10359: \$? = $ac_status" >&5
10360 (exit "$ac_status"); } &&
10361 { ac_try='test -s "conftest.$ac_objext"'
10362 { (eval echo "$as_me:10362: \"$ac_try\"") >&5
10363 (eval $ac_try) 2>&5
10365 echo "$as_me:10365: \$? = $ac_status" >&5
10366 (exit "$ac_status"); }; }; then
10369 echo "$as_me: failed program was:" >&5
10370 cat "conftest.$ac_ext" >&5
10373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10374 CPPFLAGS=$cf_save_CPPFLAGS
10379 if test "$cf_have_incdir" = no ; then
10380 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10382 echo "${as_me:-configure}:10382: testing adding $cf_add_incdir to include-path ..." 1>&5
10384 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10386 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10387 test "$cf_top_incdir" = "$cf_add_incdir" && break
10388 cf_add_incdir="$cf_top_incdir"
10401 # Set definitions to allow ifdef'ing for ncurses.h
10403 case "$cf_cv_ncurses_header" in
10406 cat >>confdefs.h <<\EOF
10407 #define HAVE_NCURSES_H 1
10413 case "$cf_cv_ncurses_header" in
10414 (ncurses/curses.h|ncurses/ncurses.h)
10416 cat >>confdefs.h <<\EOF
10417 #define HAVE_NCURSES_NCURSES_H 1
10421 (ncursesw/curses.h|ncursesw/ncurses.h)
10423 cat >>confdefs.h <<\EOF
10424 #define HAVE_NCURSESW_NCURSES_H 1
10430 echo "$as_me:10430: checking for terminfo header" >&5
10431 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10432 if test "${cf_cv_term_header+set}" = set; then
10433 echo $ECHO_N "(cached) $ECHO_C" >&6
10436 case "${cf_cv_ncurses_header}" in
10437 (*/ncurses.h|*/ncursesw.h)
10438 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10441 cf_term_header=term.h
10445 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10447 cat >"conftest.$ac_ext" <<_ACEOF
10448 #line 10448 "configure"
10449 #include "confdefs.h"
10451 #include <${cf_cv_ncurses_header:-curses.h}>
10452 #include <$cf_test>
10457 int x = auto_left_margin; (void)x
10462 rm -f "conftest.$ac_objext"
10463 if { (eval echo "$as_me:10463: \"$ac_compile\"") >&5
10464 (eval $ac_compile) 2>&5
10466 echo "$as_me:10466: \$? = $ac_status" >&5
10467 (exit "$ac_status"); } &&
10468 { ac_try='test -s "conftest.$ac_objext"'
10469 { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470 (eval $ac_try) 2>&5
10472 echo "$as_me:10472: \$? = $ac_status" >&5
10473 (exit "$ac_status"); }; }; then
10475 cf_cv_term_header="$cf_test"
10477 echo "$as_me: failed program was:" >&5
10478 cat "conftest.$ac_ext" >&5
10480 cf_cv_term_header=unknown
10483 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10484 test "$cf_cv_term_header" != unknown && break
10488 echo "$as_me:10488: result: $cf_cv_term_header" >&5
10489 echo "${ECHO_T}$cf_cv_term_header" >&6
10491 # Set definitions to allow ifdef'ing to accommodate subdirectories
10493 case "$cf_cv_term_header" in
10496 cat >>confdefs.h <<\EOF
10497 #define HAVE_TERM_H 1
10503 case "$cf_cv_term_header" in
10506 cat >>confdefs.h <<\EOF
10507 #define HAVE_NCURSES_TERM_H 1
10513 cat >>confdefs.h <<\EOF
10514 #define HAVE_NCURSESW_TERM_H 1
10520 # some applications need this, but should check for NCURSES_VERSION
10522 cat >>confdefs.h <<\EOF
10526 echo "$as_me:10526: checking for ncurses version" >&5
10527 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10528 if test "${cf_cv_ncurses_version+set}" = set; then
10529 echo $ECHO_N "(cached) $ECHO_C" >&6
10532 cf_cv_ncurses_version=no
10534 rm -f "$cf_tempfile"
10535 if test "$cross_compiling" = yes; then
10537 # This will not work if the preprocessor splits the line after the
10538 # Autoconf token. The 'unproto' program does that.
10539 cat > "conftest.$ac_ext" <<EOF
10540 #include <${cf_cv_ncurses_header:-curses.h}>
10542 #ifdef NCURSES_VERSION
10543 Autoconf NCURSES_VERSION
10551 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10552 { (eval echo "$as_me:10552: \"$cf_try\"") >&5
10553 (eval $cf_try) 2>&5
10555 echo "$as_me:10555: \$? = $ac_status" >&5
10556 (exit "$ac_status"); }
10557 if test -f conftest.out ; then
10558 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10559 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10564 cat >"conftest.$ac_ext" <<_ACEOF
10565 #line 10565 "configure"
10566 #include "confdefs.h"
10568 #include <${cf_cv_ncurses_header:-curses.h}>
10572 FILE *fp = fopen("$cf_tempfile", "w");
10573 #ifdef NCURSES_VERSION
10574 # ifdef NCURSES_VERSION_PATCH
10575 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10577 fprintf(fp, "%s\\n", NCURSES_VERSION);
10580 # ifdef __NCURSES_H
10581 fprintf(fp, "old\\n");
10586 ${cf_cv_main_return:-return}(0);
10589 rm -f "conftest$ac_exeext"
10590 if { (eval echo "$as_me:10590: \"$ac_link\"") >&5
10591 (eval $ac_link) 2>&5
10593 echo "$as_me:10593: \$? = $ac_status" >&5
10594 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10595 { (eval echo "$as_me:10595: \"$ac_try\"") >&5
10596 (eval $ac_try) 2>&5
10598 echo "$as_me:10598: \$? = $ac_status" >&5
10599 (exit "$ac_status"); }; }; then
10601 cf_cv_ncurses_version=`cat $cf_tempfile`
10603 echo "$as_me: program exited with status $ac_status" >&5
10604 echo "$as_me: failed program was:" >&5
10605 cat "conftest.$ac_ext" >&5
10607 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10609 rm -f "$cf_tempfile"
10612 echo "$as_me:10612: result: $cf_cv_ncurses_version" >&5
10613 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10614 test "$cf_cv_ncurses_version" = no ||
10615 cat >>confdefs.h <<\EOF
10619 cf_nculib_root=ncurses
10620 # This works, except for the special case where we find gpm, but
10621 # ncurses is in a nonstandard location via $LIBS, and we really want
10624 cf_ncurses_SAVE="$LIBS"
10625 echo "$as_me:10625: checking for Gpm_Open in -lgpm" >&5
10626 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10627 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10628 echo $ECHO_N "(cached) $ECHO_C" >&6
10630 ac_check_lib_save_LIBS=$LIBS
10632 cat >"conftest.$ac_ext" <<_ACEOF
10633 #line 10633 "configure"
10634 #include "confdefs.h"
10636 /* Override any gcc2 internal prototype to avoid an error. */
10640 /* We use char because int might match the return type of a gcc2
10641 builtin and then its argument prototype would still apply. */
10651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10652 if { (eval echo "$as_me:10652: \"$ac_link\"") >&5
10653 (eval $ac_link) 2>&5
10655 echo "$as_me:10655: \$? = $ac_status" >&5
10656 (exit "$ac_status"); } &&
10657 { ac_try='test -s "conftest$ac_exeext"'
10658 { (eval echo "$as_me:10658: \"$ac_try\"") >&5
10659 (eval $ac_try) 2>&5
10661 echo "$as_me:10661: \$? = $ac_status" >&5
10662 (exit "$ac_status"); }; }; then
10663 ac_cv_lib_gpm_Gpm_Open=yes
10665 echo "$as_me: failed program was:" >&5
10666 cat "conftest.$ac_ext" >&5
10667 ac_cv_lib_gpm_Gpm_Open=no
10669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10670 LIBS=$ac_check_lib_save_LIBS
10672 echo "$as_me:10672: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10673 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10674 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10675 echo "$as_me:10675: checking for initscr in -lgpm" >&5
10676 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10677 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10678 echo $ECHO_N "(cached) $ECHO_C" >&6
10680 ac_check_lib_save_LIBS=$LIBS
10682 cat >"conftest.$ac_ext" <<_ACEOF
10683 #line 10683 "configure"
10684 #include "confdefs.h"
10686 /* Override any gcc2 internal prototype to avoid an error. */
10690 /* We use char because int might match the return type of a gcc2
10691 builtin and then its argument prototype would still apply. */
10701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10702 if { (eval echo "$as_me:10702: \"$ac_link\"") >&5
10703 (eval $ac_link) 2>&5
10705 echo "$as_me:10705: \$? = $ac_status" >&5
10706 (exit "$ac_status"); } &&
10707 { ac_try='test -s "conftest$ac_exeext"'
10708 { (eval echo "$as_me:10708: \"$ac_try\"") >&5
10709 (eval $ac_try) 2>&5
10711 echo "$as_me:10711: \$? = $ac_status" >&5
10712 (exit "$ac_status"); }; }; then
10713 ac_cv_lib_gpm_initscr=yes
10715 echo "$as_me: failed program was:" >&5
10716 cat "conftest.$ac_ext" >&5
10717 ac_cv_lib_gpm_initscr=no
10719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10720 LIBS=$ac_check_lib_save_LIBS
10722 echo "$as_me:10722: result: $ac_cv_lib_gpm_initscr" >&5
10723 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10724 if test "$ac_cv_lib_gpm_initscr" = yes; then
10725 LIBS="$cf_ncurses_SAVE"
10727 cf_ncurses_LIBS="-lgpm"
10734 # This is only necessary if you are linking against an obsolete
10735 # version of ncurses (but it should do no harm, since it's static).
10736 if test "$cf_nculib_root" = ncurses ; then
10737 echo "$as_me:10737: checking for tgoto in -lmytinfo" >&5
10738 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10739 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10740 echo $ECHO_N "(cached) $ECHO_C" >&6
10742 ac_check_lib_save_LIBS=$LIBS
10743 LIBS="-lmytinfo $LIBS"
10744 cat >"conftest.$ac_ext" <<_ACEOF
10745 #line 10745 "configure"
10746 #include "confdefs.h"
10748 /* Override any gcc2 internal prototype to avoid an error. */
10752 /* We use char because int might match the return type of a gcc2
10753 builtin and then its argument prototype would still apply. */
10763 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10764 if { (eval echo "$as_me:10764: \"$ac_link\"") >&5
10765 (eval $ac_link) 2>&5
10767 echo "$as_me:10767: \$? = $ac_status" >&5
10768 (exit "$ac_status"); } &&
10769 { ac_try='test -s "conftest$ac_exeext"'
10770 { (eval echo "$as_me:10770: \"$ac_try\"") >&5
10771 (eval $ac_try) 2>&5
10773 echo "$as_me:10773: \$? = $ac_status" >&5
10774 (exit "$ac_status"); }; }; then
10775 ac_cv_lib_mytinfo_tgoto=yes
10777 echo "$as_me: failed program was:" >&5
10778 cat "conftest.$ac_ext" >&5
10779 ac_cv_lib_mytinfo_tgoto=no
10781 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10782 LIBS=$ac_check_lib_save_LIBS
10784 echo "$as_me:10784: result: $ac_cv_lib_mytinfo_tgoto" >&5
10785 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10786 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10787 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10794 cf_add_libs="$LIBS"
10797 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10798 # filter duplicates
10799 for cf_add_1lib in $cf_add_0lib; do
10800 for cf_add_2lib in $cf_add_libs; do
10801 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10806 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10808 LIBS="$cf_add_libs"
10810 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10813 cf_add_libs="$LIBS"
10816 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10817 # filter duplicates
10818 for cf_add_1lib in $cf_add_0lib; do
10819 for cf_add_2lib in $cf_add_libs; do
10820 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10825 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10827 LIBS="$cf_add_libs"
10831 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10833 echo "$as_me:10833: checking for initscr" >&5
10834 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10835 if test "${ac_cv_func_initscr+set}" = set; then
10836 echo $ECHO_N "(cached) $ECHO_C" >&6
10838 cat >"conftest.$ac_ext" <<_ACEOF
10839 #line 10839 "configure"
10840 #include "confdefs.h"
10841 #define initscr autoconf_temporary
10842 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10849 /* We use char because int might match the return type of a gcc2
10850 builtin and then its argument prototype would still apply. */
10851 char initscr (void);
10857 /* The GNU C library defines stubs for functions which it implements
10858 to always fail with ENOSYS. Some functions are actually named
10859 something starting with __ and the normal name is an alias. */
10860 #if defined (__stub_initscr) || defined (__stub___initscr)
10861 #error found stub for initscr
10869 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10870 if { (eval echo "$as_me:10870: \"$ac_link\"") >&5
10871 (eval $ac_link) 2>&5
10873 echo "$as_me:10873: \$? = $ac_status" >&5
10874 (exit "$ac_status"); } &&
10875 { ac_try='test -s "conftest$ac_exeext"'
10876 { (eval echo "$as_me:10876: \"$ac_try\"") >&5
10877 (eval $ac_try) 2>&5
10879 echo "$as_me:10879: \$? = $ac_status" >&5
10880 (exit "$ac_status"); }; }; then
10881 ac_cv_func_initscr=yes
10883 echo "$as_me: failed program was:" >&5
10884 cat "conftest.$ac_ext" >&5
10885 ac_cv_func_initscr=no
10887 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10889 echo "$as_me:10889: result: $ac_cv_func_initscr" >&5
10890 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10891 if test "$ac_cv_func_initscr" = yes; then
10892 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10895 cf_save_LIBS="$LIBS"
10896 echo "$as_me:10896: checking for initscr in -l$cf_nculib_root" >&5
10897 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10898 LIBS="-l$cf_nculib_root $LIBS"
10899 cat >"conftest.$ac_ext" <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10902 #include <${cf_cv_ncurses_header:-curses.h}>
10911 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10912 if { (eval echo "$as_me:10912: \"$ac_link\"") >&5
10913 (eval $ac_link) 2>&5
10915 echo "$as_me:10915: \$? = $ac_status" >&5
10916 (exit "$ac_status"); } &&
10917 { ac_try='test -s "conftest$ac_exeext"'
10918 { (eval echo "$as_me:10918: \"$ac_try\"") >&5
10919 (eval $ac_try) 2>&5
10921 echo "$as_me:10921: \$? = $ac_status" >&5
10922 (exit "$ac_status"); }; }; then
10923 echo "$as_me:10923: result: yes" >&5
10924 echo "${ECHO_T}yes" >&6
10925 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10928 echo "$as_me: failed program was:" >&5
10929 cat "conftest.$ac_ext" >&5
10930 echo "$as_me:10930: result: no" >&5
10931 echo "${ECHO_T}no" >&6
10934 cf_library_path_list=""
10935 if test -n "${LDFLAGS}${LIBS}" ; then
10936 for cf_library_path in $LDFLAGS $LIBS
10938 case "$cf_library_path" in
10940 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10942 test "x$cf_library_path" != "xNONE" && \
10943 test -d "$cf_library_path" && \
10945 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10946 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10947 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10948 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10949 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10950 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"
10953 cf_library_path_list="$cf_library_path_list $cf_search"
10961 test "x$prefix" != "xNONE" && \
10962 test -d "$prefix" && \
10964 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10965 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10966 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10967 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10968 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10969 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10972 for cf_subdir_prefix in \
10981 test "x$cf_subdir_prefix" != "x$prefix" && \
10982 test -d "$cf_subdir_prefix" && \
10983 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10984 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10985 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10986 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10987 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10988 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10989 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"
10994 cf_search="$cf_library_path_list $cf_search"
10996 for cf_libdir in $cf_search
10998 echo "$as_me:10998: checking for -l$cf_nculib_root in $cf_libdir" >&5
10999 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11000 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11001 cat >"conftest.$ac_ext" <<_ACEOF
11002 #line 11002 "configure"
11003 #include "confdefs.h"
11004 #include <${cf_cv_ncurses_header:-curses.h}>
11013 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11014 if { (eval echo "$as_me:11014: \"$ac_link\"") >&5
11015 (eval $ac_link) 2>&5
11017 echo "$as_me:11017: \$? = $ac_status" >&5
11018 (exit "$ac_status"); } &&
11019 { ac_try='test -s "conftest$ac_exeext"'
11020 { (eval echo "$as_me:11020: \"$ac_try\"") >&5
11021 (eval $ac_try) 2>&5
11023 echo "$as_me:11023: \$? = $ac_status" >&5
11024 (exit "$ac_status"); }; }; then
11025 echo "$as_me:11025: result: yes" >&5
11026 echo "${ECHO_T}yes" >&6
11027 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11030 echo "$as_me: failed program was:" >&5
11031 cat "conftest.$ac_ext" >&5
11032 echo "$as_me:11032: result: no" >&5
11033 echo "${ECHO_T}no" >&6
11034 LIBS="$cf_save_LIBS"
11036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11040 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11044 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11046 if test "$cf_found_library" = no ; then
11047 { { echo "$as_me:11047: error: Cannot link $cf_nculib_root library" >&5
11048 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11049 { (exit 1); exit 1; }; }
11054 if test -n "$cf_ncurses_LIBS" ; then
11055 echo "$as_me:11055: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11056 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11057 cf_ncurses_SAVE="$LIBS"
11058 for p in $cf_ncurses_LIBS ; do
11059 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11060 if test "$q" != "$LIBS" ; then
11064 cat >"conftest.$ac_ext" <<_ACEOF
11065 #line 11065 "configure"
11066 #include "confdefs.h"
11067 #include <${cf_cv_ncurses_header:-curses.h}>
11071 initscr(); mousemask(0,0); tigetstr((char *)0);
11076 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11077 if { (eval echo "$as_me:11077: \"$ac_link\"") >&5
11078 (eval $ac_link) 2>&5
11080 echo "$as_me:11080: \$? = $ac_status" >&5
11081 (exit "$ac_status"); } &&
11082 { ac_try='test -s "conftest$ac_exeext"'
11083 { (eval echo "$as_me:11083: \"$ac_try\"") >&5
11084 (eval $ac_try) 2>&5
11086 echo "$as_me:11086: \$? = $ac_status" >&5
11087 (exit "$ac_status"); }; }; then
11088 echo "$as_me:11088: result: yes" >&5
11089 echo "${ECHO_T}yes" >&6
11091 echo "$as_me: failed program was:" >&5
11092 cat "conftest.$ac_ext" >&5
11093 echo "$as_me:11093: result: no" >&5
11094 echo "${ECHO_T}no" >&6
11095 LIBS="$cf_ncurses_SAVE"
11097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11100 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11102 cat >>confdefs.h <<EOF
11103 #define $cf_nculib_ROOT 1
11108 NCURSES_CONFIG=none
11113 if test "$NCURSES_CONFIG_PKG" != none ; then
11114 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11116 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11117 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11118 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11120 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11121 if test -z "$cf_cv_abi_version"
11123 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11126 elif test "$NCURSES_CONFIG" != none ; then
11128 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11130 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11131 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11132 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11134 # ABI version is not available from headers
11135 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11139 for cf_name in MAJOR MINOR PATCH
11141 cat >conftest.$ac_ext <<CF_EOF
11142 #include <${cf_cv_ncurses_header:-curses.h}>
11143 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11145 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11146 { (eval echo "$as_me:11146: \"$cf_try\"") >&5
11147 (eval $cf_try) 2>&5
11149 echo "$as_me:11149: \$? = $ac_status" >&5
11150 (exit "$ac_status"); }
11151 if test -f conftest.out ; then
11152 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11153 eval NCURSES_$cf_name=\"$cf_result\"
11154 # cat conftest.$ac_ext
11159 cf_cv_abi_version=${NCURSES_MAJOR}
11163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11165 cf_cv_timestamp=`date`
11167 echo "$as_me:11167: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11168 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11170 echo "$as_me:11170: checking if you want to have a library-prefix" >&5
11171 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11173 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11174 if test "${with_lib_prefix+set}" = set; then
11175 withval="$with_lib_prefix"
11176 with_lib_prefix=$withval
11178 with_lib_prefix=auto
11180 echo "$as_me:11180: result: $with_lib_prefix" >&5
11181 echo "${ECHO_T}$with_lib_prefix" >&6
11183 if test "$with_lib_prefix" = auto
11186 case "$cf_cv_system_name" in
11188 if test "$DFT_LWR_MODEL" = libtool; then
11197 (*) LIB_PREFIX='lib'
11200 cf_prefix=$LIB_PREFIX
11202 elif test "$with_lib_prefix" = no
11206 LIB_PREFIX=$with_lib_prefix
11211 ###############################################################################
11213 if test X"$CC_G_OPT" = X"" ; then
11215 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11218 echo "$as_me:11218: checking for default loader flags" >&5
11219 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11220 case $DFT_LWR_MODEL in
11221 (normal) LD_MODEL='' ;;
11222 (debug) LD_MODEL=$CC_G_OPT ;;
11223 (profile) LD_MODEL='-pg';;
11224 (shared) LD_MODEL='' ;;
11226 echo "$as_me:11226: result: $LD_MODEL" >&5
11227 echo "${ECHO_T}$LD_MODEL" >&6
11230 if test "x$cf_cv_enable_rpath" != xno
11232 echo "$as_me:11232: checking for an rpath option" >&5
11233 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11234 case "$cf_cv_system_name" in
11236 if test "$GCC" = yes; then
11237 LD_RPATH_OPT="-Wl,-rpath,"
11239 LD_RPATH_OPT="-rpath "
11242 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11243 LD_RPATH_OPT="-Wl,-rpath,"
11245 (openbsd[2-9].*|mirbsd*)
11246 LD_RPATH_OPT="-Wl,-rpath,"
11249 LD_RPATH_OPT="-rpath "
11252 LD_RPATH_OPT="-Wl,-rpath,"
11255 LD_RPATH_OPT="-rpath "
11263 echo "$as_me:11263: result: $LD_RPATH_OPT" >&5
11264 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11266 case "x$LD_RPATH_OPT" in
11268 echo "$as_me:11268: checking if we need a space after rpath option" >&5
11269 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11270 cf_save_LIBS="$LIBS"
11272 cf_add_libs="$LIBS"
11275 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11276 # filter duplicates
11277 for cf_add_1lib in $cf_add_0lib; do
11278 for cf_add_2lib in $cf_add_libs; do
11279 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11284 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11286 LIBS="$cf_add_libs"
11288 cat >"conftest.$ac_ext" <<_ACEOF
11289 #line 11289 "configure"
11290 #include "confdefs.h"
11300 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11301 if { (eval echo "$as_me:11301: \"$ac_link\"") >&5
11302 (eval $ac_link) 2>&5
11304 echo "$as_me:11304: \$? = $ac_status" >&5
11305 (exit "$ac_status"); } &&
11306 { ac_try='test -s "conftest$ac_exeext"'
11307 { (eval echo "$as_me:11307: \"$ac_try\"") >&5
11308 (eval $ac_try) 2>&5
11310 echo "$as_me:11310: \$? = $ac_status" >&5
11311 (exit "$ac_status"); }; }; then
11314 echo "$as_me: failed program was:" >&5
11315 cat "conftest.$ac_ext" >&5
11318 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11319 LIBS="$cf_save_LIBS"
11320 echo "$as_me:11320: result: $cf_rpath_space" >&5
11321 echo "${ECHO_T}$cf_rpath_space" >&6
11322 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11331 INSTALL_LIB="-m 644"
11332 : ${rel_builddir:=.}
11338 cf_cv_do_symlinks=no
11340 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11342 echo "$as_me:11342: checking if release/abi version should be used for shared libs" >&5
11343 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11345 # Check whether --with-shlib-version or --without-shlib-version was given.
11346 if test "${with_shlib_version+set}" = set; then
11347 withval="$with_shlib_version"
11348 test -z "$withval" && withval=auto
11351 cf_cv_shlib_version=auto
11354 cf_cv_shlib_version=$withval
11357 echo "$as_me:11357: result: $withval" >&5
11358 echo "${ECHO_T}$withval" >&6
11359 { { echo "$as_me:11359: error: option value must be one of: rel, abi, or auto" >&5
11360 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11361 { (exit 1); exit 1; }; }
11366 cf_cv_shlib_version=auto
11368 echo "$as_me:11368: result: $cf_cv_shlib_version" >&5
11369 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11371 cf_cv_rm_so_locs=no
11374 # Some less-capable ports of gcc support only -fpic
11378 if test "$GCC" = yes
11382 case "$cf_cv_system_name" in
11383 (*linux*) # e.g., PGI compiler
11389 if test "$cf_try_fPIC" = yes
11391 echo "$as_me:11391: checking which $CC option to use" >&5
11392 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11393 cf_save_CFLAGS="$CFLAGS"
11394 for CC_SHARED_OPTS in -fPIC -fpic ''
11396 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11397 cat >"conftest.$ac_ext" <<_ACEOF
11398 #line 11398 "configure"
11399 #include "confdefs.h"
11409 rm -f "conftest.$ac_objext"
11410 if { (eval echo "$as_me:11410: \"$ac_compile\"") >&5
11411 (eval $ac_compile) 2>&5
11413 echo "$as_me:11413: \$? = $ac_status" >&5
11414 (exit "$ac_status"); } &&
11415 { ac_try='test -s "conftest.$ac_objext"'
11416 { (eval echo "$as_me:11416: \"$ac_try\"") >&5
11417 (eval $ac_try) 2>&5
11419 echo "$as_me:11419: \$? = $ac_status" >&5
11420 (exit "$ac_status"); }; }; then
11423 echo "$as_me: failed program was:" >&5
11424 cat "conftest.$ac_ext" >&5
11426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11428 echo "$as_me:11428: result: $CC_SHARED_OPTS" >&5
11429 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11430 CFLAGS="$cf_save_CFLAGS"
11433 cf_cv_shlib_version_infix=no
11435 case "$cf_cv_system_name" in
11436 (aix4.3-9*|aix[5-7]*)
11437 if test "$GCC" = yes; then
11438 CC_SHARED_OPTS='-Wl,-brtl'
11439 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11441 CC_SHARED_OPTS='-brtl'
11442 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11443 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11447 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11451 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11452 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11453 cf_cv_shlib_version=cygdll
11454 cf_cv_shlib_version_infix=cygdll
11457 cat >mk_shared_lib.sh <<-CF_EOF
11460 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11463 Linking shared library
11464 ** SHARED_LIB \$SHARED_LIB
11465 ** IMPORT_LIB \$IMPORT_LIB
11467 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11469 chmod +x mk_shared_lib.sh
11473 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11474 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11475 cf_cv_shlib_version=msysdll
11476 cf_cv_shlib_version_infix=msysdll
11479 cat >mk_shared_lib.sh <<-CF_EOF
11482 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11485 Linking shared library
11486 ** SHARED_LIB \$SHARED_LIB
11487 ** IMPORT_LIB \$IMPORT_LIB
11489 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11491 chmod +x mk_shared_lib.sh
11494 cf_try_cflags="no-cpp-precomp"
11495 CC_SHARED_OPTS="-dynamic"
11496 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11497 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11498 cf_cv_shlib_version_infix=yes
11499 echo "$as_me:11499: checking if ld -search_paths_first works" >&5
11500 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11501 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11502 echo $ECHO_N "(cached) $ECHO_C" >&6
11505 cf_save_LDFLAGS=$LDFLAGS
11506 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11507 cat >"conftest.$ac_ext" <<_ACEOF
11508 #line 11508 "configure"
11509 #include "confdefs.h"
11519 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11520 if { (eval echo "$as_me:11520: \"$ac_link\"") >&5
11521 (eval $ac_link) 2>&5
11523 echo "$as_me:11523: \$? = $ac_status" >&5
11524 (exit "$ac_status"); } &&
11525 { ac_try='test -s "conftest$ac_exeext"'
11526 { (eval echo "$as_me:11526: \"$ac_try\"") >&5
11527 (eval $ac_try) 2>&5
11529 echo "$as_me:11529: \$? = $ac_status" >&5
11530 (exit "$ac_status"); }; }; then
11531 cf_cv_ldflags_search_paths_first=yes
11533 echo "$as_me: failed program was:" >&5
11534 cat "conftest.$ac_ext" >&5
11535 cf_cv_ldflags_search_paths_first=no
11537 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11538 LDFLAGS=$cf_save_LDFLAGS
11540 echo "$as_me:11540: result: $cf_cv_ldflags_search_paths_first" >&5
11541 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11542 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11543 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11547 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11548 if test "$GCC" != yes; then
11549 CC_SHARED_OPTS='+Z'
11551 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11552 INSTALL_LIB="-m 555"
11555 # (tested with gcc 2.7.2 -- I don't have c89)
11556 if test "$GCC" = yes; then
11557 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11559 CC_SHARED_OPTS='+Z'
11560 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11562 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11563 # HP-UX shared libraries must be executable, and should be
11564 # readonly to exploit a quirk in the memory manager.
11565 INSTALL_LIB="-m 555"
11568 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11569 if test "$cf_cv_shlib_version" = rel; then
11570 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11572 cf_shared_soname='`basename $@`'
11575 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11578 if test "$cf_cv_enable_rpath" = yes ; then
11579 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11581 # tested with IRIX 5.2 and 'cc'.
11582 if test "$GCC" != yes; then
11583 CC_SHARED_OPTS='-KPIC'
11584 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11586 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11588 cf_cv_rm_so_locs=yes
11590 (linux*|gnu*|k*bsd*-gnu)
11591 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11592 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11593 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11595 if test "$cf_cv_enable_rpath" = yes ; then
11596 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11599 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11600 if test "$cf_cv_shlib_version" = rel; then
11601 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11603 cf_cv_shared_soname='`basename $@`'
11606 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11609 cf_cv_shlib_version=msvcdll
11610 cf_cv_shlib_version_infix=msvcdll
11613 if test "$DFT_LWR_MODEL" = "shared" ; then
11614 LOCAL_LDFLAGS="-link -dll"
11615 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11616 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11619 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11620 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11621 cat >mk_shared_lib.sh <<-CF_EOF
11624 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11629 Linking shared library
11630 ** SHARED LIB \$SHARED_LIB
11631 ** IMPORT_LIB \$IMPORT_LIB
11633 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11634 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11635 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11637 chmod +x mk_shared_lib.sh
11638 cat >mk_prog.sh <<-CF_EOF
11641 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11644 ldopts=("/subsystem:console")
11647 while test \$# -gt 0; do
11650 # ignore -link argument
11653 # ignore runtime-library option
11668 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11671 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11677 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11678 ldopts+=("\${linkarg}")
11686 ldopts+=("-out:\$1")
11695 if [ "\$isdll" -ne 0 ]; then
11696 for lib in \${libs[*]}; do
11697 ldopts+=("\$lib.dll.lib")
11700 for lib in \${libs[*]}; do
11701 ldopts+=("\$lib.lib")
11706 ** ld options: "\${ldopts[@]}"
11708 exec \$LD \${ldopts[@]}
11710 chmod +x mk_prog.sh
11711 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11712 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11715 cf_cv_shlib_version=mingw
11716 cf_cv_shlib_version_infix=mingw
11719 if test "$DFT_LWR_MODEL" = "shared" ; then
11720 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11721 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11722 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11725 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11726 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11727 cat >mk_shared_lib.sh <<-CF_EOF
11730 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11733 Linking shared library
11734 ** SHARED_LIB \$SHARED_LIB
11735 ** IMPORT_LIB \$IMPORT_LIB
11737 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11739 chmod +x mk_shared_lib.sh
11741 (openbsd[2-9].*|mirbsd*)
11742 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11743 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11744 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11746 if test "$cf_cv_enable_rpath" = yes ; then
11747 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11749 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11751 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11752 if test "$cf_cv_shlib_version" = rel; then
11753 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11755 cf_cv_shared_soname='`basename $@`'
11758 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11762 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11766 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11768 (nto-qnx*|openbsd*|freebsd[12].*)
11769 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11770 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11771 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11773 (dragonfly*|freebsd*)
11774 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11775 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11776 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11777 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11778 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11781 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11782 if test "$cf_cv_shlib_version" = rel; then
11783 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11785 cf_cv_shared_soname='`basename $@`'
11788 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11791 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11792 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11793 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11794 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11795 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11796 if test "$cf_cv_shlib_version" = auto; then
11797 if test -f /usr/libexec/ld.elf_so; then
11798 cf_cv_shlib_version=abi
11800 cf_cv_shlib_version=rel
11804 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11805 if test "$cf_cv_shlib_version" = rel; then
11806 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11808 cf_cv_shared_soname='`basename $@`'
11811 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11813 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11817 # tested with OSF/1 V3.2 and 'cc'
11818 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11819 # link with shared libs).
11820 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11823 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11826 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11827 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11828 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11829 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11831 cf_cv_rm_so_locs=yes
11833 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11834 # tested with osr5.0.5
11835 if test "$GCC" != yes; then
11836 CC_SHARED_OPTS='-belf -KPIC'
11838 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11839 if test "$cf_cv_enable_rpath" = yes ; then
11840 # only way is to set LD_RUN_PATH but no switch for it
11843 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11844 LINK_PROGS='LD_RUN_PATH=${libdir}'
11845 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11848 # tested with SunOS 4.1.1 and gcc 2.7.0
11849 if test "$GCC" != yes; then
11850 CC_SHARED_OPTS='-KPIC'
11852 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11853 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11856 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11857 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11858 if test "$DFT_LWR_MODEL" = "shared" ; then
11859 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11860 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11862 if test "$cf_cv_enable_rpath" = yes ; then
11863 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11866 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11867 if test "$cf_cv_shlib_version" = rel; then
11868 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11870 cf_cv_shared_soname='`basename $@`'
11873 if test "$GCC" != yes; then
11874 cf_save_CFLAGS="$CFLAGS"
11875 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11877 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11878 cat >"conftest.$ac_ext" <<_ACEOF
11879 #line 11879 "configure"
11880 #include "confdefs.h"
11885 printf("Hello\\n");
11890 rm -f "conftest.$ac_objext"
11891 if { (eval echo "$as_me:11891: \"$ac_compile\"") >&5
11892 (eval $ac_compile) 2>&5
11894 echo "$as_me:11894: \$? = $ac_status" >&5
11895 (exit "$ac_status"); } &&
11896 { ac_try='test -s "conftest.$ac_objext"'
11897 { (eval echo "$as_me:11897: \"$ac_try\"") >&5
11898 (eval $ac_try) 2>&5
11900 echo "$as_me:11900: \$? = $ac_status" >&5
11901 (exit "$ac_status"); }; }; then
11904 echo "$as_me: failed program was:" >&5
11905 cat "conftest.$ac_ext" >&5
11907 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11909 CFLAGS="$cf_save_CFLAGS"
11910 CC_SHARED_OPTS=$cf_shared_opts
11911 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11913 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11916 (sysv5uw7*|unix_sv*)
11917 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11918 if test "$GCC" != yes; then
11919 CC_SHARED_OPTS='-KPIC'
11921 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11924 CC_SHARED_OPTS='unknown'
11925 MK_SHARED_LIB='echo unknown'
11929 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
11930 case "$cf_cv_shlib_version" in
11932 case "$MK_SHARED_LIB" in
11934 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
11937 { echo "$as_me:11937: WARNING: ignored --with-shlib-version" >&5
11938 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
11944 if test -n "$cf_try_cflags"
11946 cat > conftest.$ac_ext <<EOF
11947 #line 11947 "${as_me:-configure}"
11949 int main(int argc, char *argv[])
11951 printf("hello\\n");
11952 return (argv[argc-1] == 0) ;
11955 cf_save_CFLAGS="$CFLAGS"
11956 for cf_opt in $cf_try_cflags
11958 CFLAGS="$cf_save_CFLAGS -$cf_opt"
11959 echo "$as_me:11959: checking if CFLAGS option -$cf_opt works" >&5
11960 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
11961 if { (eval echo "$as_me:11961: \"$ac_compile\"") >&5
11962 (eval $ac_compile) 2>&5
11964 echo "$as_me:11964: \$? = $ac_status" >&5
11965 (exit "$ac_status"); }; then
11966 echo "$as_me:11966: result: yes" >&5
11967 echo "${ECHO_T}yes" >&6
11968 cf_save_CFLAGS="$CFLAGS"
11970 echo "$as_me:11970: result: no" >&5
11971 echo "${ECHO_T}no" >&6
11974 CFLAGS="$cf_save_CFLAGS"
11977 # RPATH_LIST is a colon-separated list of directories
11978 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
11979 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
11981 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
11983 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
11985 echo "${as_me:-configure}:11985: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
11987 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
11989 echo "${as_me:-configure}:11989: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
11991 # The test/sample programs in the original tree link using rpath option.
11992 # Make it optional for packagers.
11993 if test -n "$LOCAL_LDFLAGS"
11995 echo "$as_me:11995: checking if you want to link sample programs with rpath option" >&5
11996 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
11998 # Check whether --enable-rpath-link or --disable-rpath-link was given.
11999 if test "${enable_rpath_link+set}" = set; then
12000 enableval="$enable_rpath_link"
12001 with_rpath_link=$enableval
12003 with_rpath_link=yes
12005 echo "$as_me:12005: result: $with_rpath_link" >&5
12006 echo "${ECHO_T}$with_rpath_link" >&6
12007 if test "$with_rpath_link" = no
12014 ###############################################################################
12016 ### use option --enable-broken-linker to force on use of broken-linker support
12018 echo "$as_me:12018: checking if you want broken-linker support code" >&5
12019 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12021 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12022 if test "${enable_broken_linker+set}" = set; then
12023 enableval="$enable_broken_linker"
12024 with_broken_linker=$enableval
12026 with_broken_linker=no
12028 echo "$as_me:12028: result: $with_broken_linker" >&5
12029 echo "${ECHO_T}$with_broken_linker" >&6
12031 : "${BROKEN_LINKER:=0}"
12032 if test "x$with_broken_linker" = xyes ; then
12034 cat >>confdefs.h <<\EOF
12035 #define BROKEN_LINKER 1
12041 # Check to define _XOPEN_SOURCE "automatically"
12043 echo "$as_me:12043: checking if the POSIX test-macros are already defined" >&5
12044 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12045 if test "${cf_cv_posix_visible+set}" = set; then
12046 echo $ECHO_N "(cached) $ECHO_C" >&6
12049 cat >"conftest.$ac_ext" <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12057 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12058 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12059 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12060 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12061 #error conflicting symbols found
12068 rm -f "conftest.$ac_objext"
12069 if { (eval echo "$as_me:12069: \"$ac_compile\"") >&5
12070 (eval $ac_compile) 2>&5
12072 echo "$as_me:12072: \$? = $ac_status" >&5
12073 (exit "$ac_status"); } &&
12074 { ac_try='test -s "conftest.$ac_objext"'
12075 { (eval echo "$as_me:12075: \"$ac_try\"") >&5
12076 (eval $ac_try) 2>&5
12078 echo "$as_me:12078: \$? = $ac_status" >&5
12079 (exit "$ac_status"); }; }; then
12080 cf_cv_posix_visible=no
12082 echo "$as_me: failed program was:" >&5
12083 cat "conftest.$ac_ext" >&5
12084 cf_cv_posix_visible=yes
12086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12089 echo "$as_me:12089: result: $cf_cv_posix_visible" >&5
12090 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12092 if test "$cf_cv_posix_visible" = no; then
12094 cf_XOPEN_SOURCE=600
12095 cf_POSIX_C_SOURCE=199506L
12100 cf_xopen_source="-D_ALL_SOURCE"
12103 cf_XOPEN_SOURCE=600
12106 cf_xopen_source="-D_APPLE_C_SOURCE"
12109 cf_xopen_source="-D_DARWIN_C_SOURCE"
12112 (freebsd*|dragonfly*|midnightbsd*)
12113 # 5.x headers associate
12114 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12115 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12116 cf_POSIX_C_SOURCE=200112L
12117 cf_XOPEN_SOURCE=600
12118 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12121 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12124 cf_xopen_source="-D_HPUX_SOURCE"
12127 cf_xopen_source="-D_SGI_SOURCE"
12130 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12132 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12134 echo "$as_me:12134: checking if this is the GNU C library" >&5
12135 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12136 if test "${cf_cv_gnu_library+set}" = set; then
12137 echo $ECHO_N "(cached) $ECHO_C" >&6
12140 cat >"conftest.$ac_ext" <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143 #include <sys/types.h>
12148 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12150 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12153 # error not GNU C library
12159 rm -f "conftest.$ac_objext"
12160 if { (eval echo "$as_me:12160: \"$ac_compile\"") >&5
12161 (eval $ac_compile) 2>&5
12163 echo "$as_me:12163: \$? = $ac_status" >&5
12164 (exit "$ac_status"); } &&
12165 { ac_try='test -s "conftest.$ac_objext"'
12166 { (eval echo "$as_me:12166: \"$ac_try\"") >&5
12167 (eval $ac_try) 2>&5
12169 echo "$as_me:12169: \$? = $ac_status" >&5
12170 (exit "$ac_status"); }; }; then
12171 cf_cv_gnu_library=yes
12173 echo "$as_me: failed program was:" >&5
12174 cat "conftest.$ac_ext" >&5
12175 cf_cv_gnu_library=no
12177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12180 echo "$as_me:12180: result: $cf_cv_gnu_library" >&5
12181 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12183 if test x$cf_cv_gnu_library = xyes; then
12185 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12186 # was changed to help a little. newlib incorporated the change about 4
12188 echo "$as_me:12188: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12189 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12190 if test "${cf_cv_gnu_library_219+set}" = set; then
12191 echo $ECHO_N "(cached) $ECHO_C" >&6
12194 cf_save="$CPPFLAGS"
12196 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12197 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12199 cat >"conftest.$ac_ext" <<_ACEOF
12200 #line 12200 "configure"
12201 #include "confdefs.h"
12202 #include <sys/types.h>
12207 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12209 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12212 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12218 rm -f "conftest.$ac_objext"
12219 if { (eval echo "$as_me:12219: \"$ac_compile\"") >&5
12220 (eval $ac_compile) 2>&5
12222 echo "$as_me:12222: \$? = $ac_status" >&5
12223 (exit "$ac_status"); } &&
12224 { ac_try='test -s "conftest.$ac_objext"'
12225 { (eval echo "$as_me:12225: \"$ac_try\"") >&5
12226 (eval $ac_try) 2>&5
12228 echo "$as_me:12228: \$? = $ac_status" >&5
12229 (exit "$ac_status"); }; }; then
12230 cf_cv_gnu_library_219=yes
12232 echo "$as_me: failed program was:" >&5
12233 cat "conftest.$ac_ext" >&5
12234 cf_cv_gnu_library_219=no
12236 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12237 CPPFLAGS="$cf_save"
12240 echo "$as_me:12240: result: $cf_cv_gnu_library_219" >&5
12241 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12243 if test "x$cf_cv_gnu_library_219" = xyes; then
12244 cf_save="$CPPFLAGS"
12245 echo "$as_me:12245: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12246 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12247 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12248 echo $ECHO_N "(cached) $ECHO_C" >&6
12254 cf_new_extra_cppflags=
12256 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12258 case "$cf_fix_cppflags" in
12260 case "$cf_add_cflags" in
12261 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12262 case "$cf_add_cflags" in
12264 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12266 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12267 && test -z "${cf_tst_cflags}" \
12268 && cf_fix_cppflags=yes
12270 if test "$cf_fix_cppflags" = yes ; then
12272 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12273 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12276 elif test "${cf_tst_cflags}" = "\"'" ; then
12278 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12279 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12285 case "$CPPFLAGS" in
12289 case "$cf_add_cflags" in
12291 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12293 CPPFLAGS=`echo "$CPPFLAGS" | \
12294 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12295 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12300 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12301 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12308 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12309 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12316 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12317 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12319 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12321 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12322 && test -z "${cf_tst_cflags}" \
12323 && cf_fix_cppflags=no
12328 if test -n "$cf_new_cflags" ; then
12330 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12331 CFLAGS="${CFLAGS}$cf_new_cflags"
12335 if test -n "$cf_new_cppflags" ; then
12337 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12338 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12342 if test -n "$cf_new_extra_cppflags" ; then
12344 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12345 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12349 cat >"conftest.$ac_ext" <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12353 #include <limits.h>
12354 #include <sys/types.h>
12360 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12363 # error GNU C library is too old
12369 rm -f "conftest.$ac_objext"
12370 if { (eval echo "$as_me:12370: \"$ac_compile\"") >&5
12371 (eval $ac_compile) 2>&5
12373 echo "$as_me:12373: \$? = $ac_status" >&5
12374 (exit "$ac_status"); } &&
12375 { ac_try='test -s "conftest.$ac_objext"'
12376 { (eval echo "$as_me:12376: \"$ac_try\"") >&5
12377 (eval $ac_try) 2>&5
12379 echo "$as_me:12379: \$? = $ac_status" >&5
12380 (exit "$ac_status"); }; }; then
12381 cf_cv_gnu_dftsrc_219=yes
12383 echo "$as_me: failed program was:" >&5
12384 cat "conftest.$ac_ext" >&5
12385 cf_cv_gnu_dftsrc_219=no
12387 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12390 echo "$as_me:12390: result: $cf_cv_gnu_dftsrc_219" >&5
12391 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12392 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12394 cf_cv_gnu_dftsrc_219=maybe
12397 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12399 echo "$as_me:12399: checking if we must define _GNU_SOURCE" >&5
12400 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12401 if test "${cf_cv_gnu_source+set}" = set; then
12402 echo $ECHO_N "(cached) $ECHO_C" >&6
12405 cat >"conftest.$ac_ext" <<_ACEOF
12406 #line 12406 "configure"
12407 #include "confdefs.h"
12408 #include <sys/types.h>
12413 #ifndef _XOPEN_SOURCE
12414 #error expected _XOPEN_SOURCE to be defined
12420 rm -f "conftest.$ac_objext"
12421 if { (eval echo "$as_me:12421: \"$ac_compile\"") >&5
12422 (eval $ac_compile) 2>&5
12424 echo "$as_me:12424: \$? = $ac_status" >&5
12425 (exit "$ac_status"); } &&
12426 { ac_try='test -s "conftest.$ac_objext"'
12427 { (eval echo "$as_me:12427: \"$ac_try\"") >&5
12428 (eval $ac_try) 2>&5
12430 echo "$as_me:12430: \$? = $ac_status" >&5
12431 (exit "$ac_status"); }; }; then
12432 cf_cv_gnu_source=no
12434 echo "$as_me: failed program was:" >&5
12435 cat "conftest.$ac_ext" >&5
12436 cf_save="$CPPFLAGS"
12441 cf_new_extra_cppflags=
12443 for cf_add_cflags in -D_GNU_SOURCE
12445 case "$cf_fix_cppflags" in
12447 case "$cf_add_cflags" in
12448 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12449 case "$cf_add_cflags" in
12451 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12453 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12454 && test -z "${cf_tst_cflags}" \
12455 && cf_fix_cppflags=yes
12457 if test "$cf_fix_cppflags" = yes ; then
12459 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12460 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12463 elif test "${cf_tst_cflags}" = "\"'" ; then
12465 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12466 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12472 case "$CPPFLAGS" in
12476 case "$cf_add_cflags" in
12478 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12480 CPPFLAGS=`echo "$CPPFLAGS" | \
12481 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12482 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12487 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12488 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12495 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12496 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12503 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12504 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12506 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12508 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12509 && test -z "${cf_tst_cflags}" \
12510 && cf_fix_cppflags=no
12515 if test -n "$cf_new_cflags" ; then
12517 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12518 CFLAGS="${CFLAGS}$cf_new_cflags"
12522 if test -n "$cf_new_cppflags" ; then
12524 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12525 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12529 if test -n "$cf_new_extra_cppflags" ; then
12531 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12532 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12536 cat >"conftest.$ac_ext" <<_ACEOF
12537 #line 12537 "configure"
12538 #include "confdefs.h"
12539 #include <sys/types.h>
12544 #ifdef _XOPEN_SOURCE
12545 #error expected _XOPEN_SOURCE to be undefined
12551 rm -f "conftest.$ac_objext"
12552 if { (eval echo "$as_me:12552: \"$ac_compile\"") >&5
12553 (eval $ac_compile) 2>&5
12555 echo "$as_me:12555: \$? = $ac_status" >&5
12556 (exit "$ac_status"); } &&
12557 { ac_try='test -s "conftest.$ac_objext"'
12558 { (eval echo "$as_me:12558: \"$ac_try\"") >&5
12559 (eval $ac_try) 2>&5
12561 echo "$as_me:12561: \$? = $ac_status" >&5
12562 (exit "$ac_status"); }; }; then
12563 cf_cv_gnu_source=no
12565 echo "$as_me: failed program was:" >&5
12566 cat "conftest.$ac_ext" >&5
12567 cf_cv_gnu_source=yes
12569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12570 CPPFLAGS="$cf_save"
12573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12576 echo "$as_me:12576: result: $cf_cv_gnu_source" >&5
12577 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12579 if test "$cf_cv_gnu_source" = yes
12581 echo "$as_me:12581: checking if we should also define _DEFAULT_SOURCE" >&5
12582 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12583 if test "${cf_cv_default_source+set}" = set; then
12584 echo $ECHO_N "(cached) $ECHO_C" >&6
12587 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12588 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12590 cat >"conftest.$ac_ext" <<_ACEOF
12591 #line 12591 "configure"
12592 #include "confdefs.h"
12593 #include <sys/types.h>
12598 #ifdef _DEFAULT_SOURCE
12599 #error expected _DEFAULT_SOURCE to be undefined
12605 rm -f "conftest.$ac_objext"
12606 if { (eval echo "$as_me:12606: \"$ac_compile\"") >&5
12607 (eval $ac_compile) 2>&5
12609 echo "$as_me:12609: \$? = $ac_status" >&5
12610 (exit "$ac_status"); } &&
12611 { ac_try='test -s "conftest.$ac_objext"'
12612 { (eval echo "$as_me:12612: \"$ac_try\"") >&5
12613 (eval $ac_try) 2>&5
12615 echo "$as_me:12615: \$? = $ac_status" >&5
12616 (exit "$ac_status"); }; }; then
12617 cf_cv_default_source=no
12619 echo "$as_me: failed program was:" >&5
12620 cat "conftest.$ac_ext" >&5
12621 cf_cv_default_source=yes
12623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12626 echo "$as_me:12626: result: $cf_cv_default_source" >&5
12627 echo "${ECHO_T}$cf_cv_default_source" >&6
12628 if test "$cf_cv_default_source" = yes
12631 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12632 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12642 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12645 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12648 if test "$cf_cv_posix_visible" = no; then
12650 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12652 cf_save_CFLAGS="$CFLAGS"
12653 cf_save_CPPFLAGS="$CPPFLAGS"
12655 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12656 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12657 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12659 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12660 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12661 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12663 echo "$as_me:12663: checking if we should define _POSIX_C_SOURCE" >&5
12664 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12665 if test "${cf_cv_posix_c_source+set}" = set; then
12666 echo $ECHO_N "(cached) $ECHO_C" >&6
12669 echo "${as_me:-configure}:12669: testing if the symbol is already defined go no further ..." 1>&5
12671 cat >"conftest.$ac_ext" <<_ACEOF
12672 #line 12672 "configure"
12673 #include "confdefs.h"
12674 #include <sys/types.h>
12679 #ifndef _POSIX_C_SOURCE
12686 rm -f "conftest.$ac_objext"
12687 if { (eval echo "$as_me:12687: \"$ac_compile\"") >&5
12688 (eval $ac_compile) 2>&5
12690 echo "$as_me:12690: \$? = $ac_status" >&5
12691 (exit "$ac_status"); } &&
12692 { ac_try='test -s "conftest.$ac_objext"'
12693 { (eval echo "$as_me:12693: \"$ac_try\"") >&5
12694 (eval $ac_try) 2>&5
12696 echo "$as_me:12696: \$? = $ac_status" >&5
12697 (exit "$ac_status"); }; }; then
12698 cf_cv_posix_c_source=no
12700 echo "$as_me: failed program was:" >&5
12701 cat "conftest.$ac_ext" >&5
12702 cf_want_posix_source=no
12703 case .$cf_POSIX_C_SOURCE in
12705 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12708 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12709 cf_want_posix_source=yes
12712 cf_want_posix_source=yes
12715 if test "$cf_want_posix_source" = yes ; then
12716 cat >"conftest.$ac_ext" <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719 #include <sys/types.h>
12724 #ifdef _POSIX_SOURCE
12731 rm -f "conftest.$ac_objext"
12732 if { (eval echo "$as_me:12732: \"$ac_compile\"") >&5
12733 (eval $ac_compile) 2>&5
12735 echo "$as_me:12735: \$? = $ac_status" >&5
12736 (exit "$ac_status"); } &&
12737 { ac_try='test -s "conftest.$ac_objext"'
12738 { (eval echo "$as_me:12738: \"$ac_try\"") >&5
12739 (eval $ac_try) 2>&5
12741 echo "$as_me:12741: \$? = $ac_status" >&5
12742 (exit "$ac_status"); }; }; then
12745 echo "$as_me: failed program was:" >&5
12746 cat "conftest.$ac_ext" >&5
12747 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12752 echo "${as_me:-configure}:12752: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12754 CFLAGS="$cf_trim_CFLAGS"
12755 CPPFLAGS="$cf_trim_CPPFLAGS"
12757 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12758 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12760 echo "${as_me:-configure}:12760: testing if the second compile does not leave our definition intact error ..." 1>&5
12762 cat >"conftest.$ac_ext" <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765 #include <sys/types.h>
12770 #ifndef _POSIX_C_SOURCE
12777 rm -f "conftest.$ac_objext"
12778 if { (eval echo "$as_me:12778: \"$ac_compile\"") >&5
12779 (eval $ac_compile) 2>&5
12781 echo "$as_me:12781: \$? = $ac_status" >&5
12782 (exit "$ac_status"); } &&
12783 { ac_try='test -s "conftest.$ac_objext"'
12784 { (eval echo "$as_me:12784: \"$ac_try\"") >&5
12785 (eval $ac_try) 2>&5
12787 echo "$as_me:12787: \$? = $ac_status" >&5
12788 (exit "$ac_status"); }; }; then
12791 echo "$as_me: failed program was:" >&5
12792 cat "conftest.$ac_ext" >&5
12793 cf_cv_posix_c_source=no
12795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12796 CFLAGS="$cf_save_CFLAGS"
12797 CPPFLAGS="$cf_save_CPPFLAGS"
12800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12803 echo "$as_me:12803: result: $cf_cv_posix_c_source" >&5
12804 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12806 if test "$cf_cv_posix_c_source" != no ; then
12807 CFLAGS="$cf_trim_CFLAGS"
12808 CPPFLAGS="$cf_trim_CPPFLAGS"
12813 cf_new_extra_cppflags=
12815 for cf_add_cflags in $cf_cv_posix_c_source
12817 case "$cf_fix_cppflags" in
12819 case "$cf_add_cflags" in
12820 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12821 case "$cf_add_cflags" in
12823 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12825 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12826 && test -z "${cf_tst_cflags}" \
12827 && cf_fix_cppflags=yes
12829 if test "$cf_fix_cppflags" = yes ; then
12831 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12832 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12835 elif test "${cf_tst_cflags}" = "\"'" ; then
12837 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12838 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12844 case "$CPPFLAGS" in
12848 case "$cf_add_cflags" in
12850 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12852 CPPFLAGS=`echo "$CPPFLAGS" | \
12853 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12854 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12859 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12860 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12867 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12868 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12875 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12876 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12878 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12880 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12881 && test -z "${cf_tst_cflags}" \
12882 && cf_fix_cppflags=no
12887 if test -n "$cf_new_cflags" ; then
12889 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12890 CFLAGS="${CFLAGS}$cf_new_cflags"
12894 if test -n "$cf_new_cppflags" ; then
12896 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12897 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12901 if test -n "$cf_new_extra_cppflags" ; then
12903 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12904 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12910 fi # cf_cv_posix_visible
12914 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12917 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
12918 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
12919 # Abusing the conformance level is a workaround.
12920 { echo "$as_me:12920: WARNING: this system does not provide usable locale support" >&5
12921 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
12922 cf_xopen_source="-D_BSD_SOURCE"
12923 cf_XOPEN_SOURCE=700
12926 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12927 cf_xopen_source="-D_BSD_SOURCE"
12928 cf_XOPEN_SOURCE=600
12931 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12934 cf_xopen_source="-D_OSF_SOURCE"
12937 cf_xopen_source="-D_QNX_SOURCE"
12940 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12943 cf_xopen_source="-D__EXTENSIONS__"
12944 cf_cv_xopen_source=broken
12946 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12952 echo "$as_me:12952: checking if we should define _XOPEN_SOURCE" >&5
12953 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12954 if test "${cf_cv_xopen_source+set}" = set; then
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12958 cat >"conftest.$ac_ext" <<_ACEOF
12959 #line 12959 "configure"
12960 #include "confdefs.h"
12962 #include <stdlib.h>
12963 #include <string.h>
12964 #include <sys/types.h>
12970 #ifndef _XOPEN_SOURCE
12977 rm -f "conftest.$ac_objext"
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979 (eval $ac_compile) 2>&5
12981 echo "$as_me:12981: \$? = $ac_status" >&5
12982 (exit "$ac_status"); } &&
12983 { ac_try='test -s "conftest.$ac_objext"'
12984 { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985 (eval $ac_try) 2>&5
12987 echo "$as_me:12987: \$? = $ac_status" >&5
12988 (exit "$ac_status"); }; }; then
12989 cf_cv_xopen_source=no
12991 echo "$as_me: failed program was:" >&5
12992 cat "conftest.$ac_ext" >&5
12993 cf_save="$CPPFLAGS"
12995 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12996 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12998 cat >"conftest.$ac_ext" <<_ACEOF
12999 #line 12999 "configure"
13000 #include "confdefs.h"
13002 #include <stdlib.h>
13003 #include <string.h>
13004 #include <sys/types.h>
13010 #ifdef _XOPEN_SOURCE
13017 rm -f "conftest.$ac_objext"
13018 if { (eval echo "$as_me:13018: \"$ac_compile\"") >&5
13019 (eval $ac_compile) 2>&5
13021 echo "$as_me:13021: \$? = $ac_status" >&5
13022 (exit "$ac_status"); } &&
13023 { ac_try='test -s "conftest.$ac_objext"'
13024 { (eval echo "$as_me:13024: \"$ac_try\"") >&5
13025 (eval $ac_try) 2>&5
13027 echo "$as_me:13027: \$? = $ac_status" >&5
13028 (exit "$ac_status"); }; }; then
13029 cf_cv_xopen_source=no
13031 echo "$as_me: failed program was:" >&5
13032 cat "conftest.$ac_ext" >&5
13033 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13036 CPPFLAGS="$cf_save"
13039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13042 echo "$as_me:13042: result: $cf_cv_xopen_source" >&5
13043 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13045 if test "$cf_cv_xopen_source" != no ; then
13047 CFLAGS=`echo "$CFLAGS" | \
13048 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13049 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13051 CPPFLAGS=`echo "$CPPFLAGS" | \
13052 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13053 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13055 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13060 cf_new_extra_cppflags=
13062 for cf_add_cflags in $cf_temp_xopen_source
13064 case "$cf_fix_cppflags" in
13066 case "$cf_add_cflags" in
13067 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13068 case "$cf_add_cflags" in
13070 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13072 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13073 && test -z "${cf_tst_cflags}" \
13074 && cf_fix_cppflags=yes
13076 if test "$cf_fix_cppflags" = yes ; then
13078 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13079 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13082 elif test "${cf_tst_cflags}" = "\"'" ; then
13084 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13085 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13091 case "$CPPFLAGS" in
13095 case "$cf_add_cflags" in
13097 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13099 CPPFLAGS=`echo "$CPPFLAGS" | \
13100 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13101 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13106 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13107 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13114 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13115 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13125 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13127 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13128 && test -z "${cf_tst_cflags}" \
13129 && cf_fix_cppflags=no
13134 if test -n "$cf_new_cflags" ; then
13136 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13137 CFLAGS="${CFLAGS}$cf_new_cflags"
13141 if test -n "$cf_new_cppflags" ; then
13143 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13144 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13148 if test -n "$cf_new_extra_cppflags" ; then
13150 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13151 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13157 if test "$cf_cv_posix_visible" = no; then
13159 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13161 cf_save_CFLAGS="$CFLAGS"
13162 cf_save_CPPFLAGS="$CPPFLAGS"
13164 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13165 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13166 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13168 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13169 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13170 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13172 echo "$as_me:13172: checking if we should define _POSIX_C_SOURCE" >&5
13173 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13174 if test "${cf_cv_posix_c_source+set}" = set; then
13175 echo $ECHO_N "(cached) $ECHO_C" >&6
13178 echo "${as_me:-configure}:13178: testing if the symbol is already defined go no further ..." 1>&5
13180 cat >"conftest.$ac_ext" <<_ACEOF
13181 #line 13181 "configure"
13182 #include "confdefs.h"
13183 #include <sys/types.h>
13188 #ifndef _POSIX_C_SOURCE
13195 rm -f "conftest.$ac_objext"
13196 if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13197 (eval $ac_compile) 2>&5
13199 echo "$as_me:13199: \$? = $ac_status" >&5
13200 (exit "$ac_status"); } &&
13201 { ac_try='test -s "conftest.$ac_objext"'
13202 { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13203 (eval $ac_try) 2>&5
13205 echo "$as_me:13205: \$? = $ac_status" >&5
13206 (exit "$ac_status"); }; }; then
13207 cf_cv_posix_c_source=no
13209 echo "$as_me: failed program was:" >&5
13210 cat "conftest.$ac_ext" >&5
13211 cf_want_posix_source=no
13212 case .$cf_POSIX_C_SOURCE in
13214 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13217 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13218 cf_want_posix_source=yes
13221 cf_want_posix_source=yes
13224 if test "$cf_want_posix_source" = yes ; then
13225 cat >"conftest.$ac_ext" <<_ACEOF
13226 #line 13226 "configure"
13227 #include "confdefs.h"
13228 #include <sys/types.h>
13233 #ifdef _POSIX_SOURCE
13240 rm -f "conftest.$ac_objext"
13241 if { (eval echo "$as_me:13241: \"$ac_compile\"") >&5
13242 (eval $ac_compile) 2>&5
13244 echo "$as_me:13244: \$? = $ac_status" >&5
13245 (exit "$ac_status"); } &&
13246 { ac_try='test -s "conftest.$ac_objext"'
13247 { (eval echo "$as_me:13247: \"$ac_try\"") >&5
13248 (eval $ac_try) 2>&5
13250 echo "$as_me:13250: \$? = $ac_status" >&5
13251 (exit "$ac_status"); }; }; then
13254 echo "$as_me: failed program was:" >&5
13255 cat "conftest.$ac_ext" >&5
13256 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13261 echo "${as_me:-configure}:13261: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13263 CFLAGS="$cf_trim_CFLAGS"
13264 CPPFLAGS="$cf_trim_CPPFLAGS"
13266 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13267 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13269 echo "${as_me:-configure}:13269: testing if the second compile does not leave our definition intact error ..." 1>&5
13271 cat >"conftest.$ac_ext" <<_ACEOF
13272 #line 13272 "configure"
13273 #include "confdefs.h"
13274 #include <sys/types.h>
13279 #ifndef _POSIX_C_SOURCE
13286 rm -f "conftest.$ac_objext"
13287 if { (eval echo "$as_me:13287: \"$ac_compile\"") >&5
13288 (eval $ac_compile) 2>&5
13290 echo "$as_me:13290: \$? = $ac_status" >&5
13291 (exit "$ac_status"); } &&
13292 { ac_try='test -s "conftest.$ac_objext"'
13293 { (eval echo "$as_me:13293: \"$ac_try\"") >&5
13294 (eval $ac_try) 2>&5
13296 echo "$as_me:13296: \$? = $ac_status" >&5
13297 (exit "$ac_status"); }; }; then
13300 echo "$as_me: failed program was:" >&5
13301 cat "conftest.$ac_ext" >&5
13302 cf_cv_posix_c_source=no
13304 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13305 CFLAGS="$cf_save_CFLAGS"
13306 CPPFLAGS="$cf_save_CPPFLAGS"
13309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13312 echo "$as_me:13312: result: $cf_cv_posix_c_source" >&5
13313 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13315 if test "$cf_cv_posix_c_source" != no ; then
13316 CFLAGS="$cf_trim_CFLAGS"
13317 CPPFLAGS="$cf_trim_CPPFLAGS"
13322 cf_new_extra_cppflags=
13324 for cf_add_cflags in $cf_cv_posix_c_source
13326 case "$cf_fix_cppflags" in
13328 case "$cf_add_cflags" in
13329 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13330 case "$cf_add_cflags" in
13332 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13334 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13335 && test -z "${cf_tst_cflags}" \
13336 && cf_fix_cppflags=yes
13338 if test "$cf_fix_cppflags" = yes ; then
13340 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13341 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13344 elif test "${cf_tst_cflags}" = "\"'" ; then
13346 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13347 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13353 case "$CPPFLAGS" in
13357 case "$cf_add_cflags" in
13359 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13361 CPPFLAGS=`echo "$CPPFLAGS" | \
13362 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13363 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13368 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13369 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13376 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13377 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13387 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13389 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13390 && test -z "${cf_tst_cflags}" \
13391 && cf_fix_cppflags=no
13396 if test -n "$cf_new_cflags" ; then
13398 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13399 CFLAGS="${CFLAGS}$cf_new_cflags"
13403 if test -n "$cf_new_cppflags" ; then
13405 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13406 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13410 if test -n "$cf_new_extra_cppflags" ; then
13412 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13413 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13419 fi # cf_cv_posix_visible
13424 if test -n "$cf_xopen_source" ; then
13429 cf_new_extra_cppflags=
13431 for cf_add_cflags in $cf_xopen_source
13433 case "$cf_fix_cppflags" in
13435 case "$cf_add_cflags" in
13436 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13437 case "$cf_add_cflags" in
13439 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13441 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13442 && test -z "${cf_tst_cflags}" \
13443 && cf_fix_cppflags=yes
13445 if test "$cf_fix_cppflags" = yes ; then
13447 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13448 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13451 elif test "${cf_tst_cflags}" = "\"'" ; then
13453 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13454 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13460 case "$CPPFLAGS" in
13464 case "$cf_add_cflags" in
13466 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13468 CPPFLAGS=`echo "$CPPFLAGS" | \
13469 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13470 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13475 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13476 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13483 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13484 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13491 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13492 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13494 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13496 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13497 && test -z "${cf_tst_cflags}" \
13498 && cf_fix_cppflags=no
13503 if test -n "$cf_new_cflags" ; then
13504 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13506 echo "${as_me:-configure}:13506: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13508 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13509 CFLAGS="${CFLAGS}$cf_new_cflags"
13513 if test -n "$cf_new_cppflags" ; then
13514 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13516 echo "${as_me:-configure}:13516: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13518 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13519 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13523 if test -n "$cf_new_extra_cppflags" ; then
13524 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13526 echo "${as_me:-configure}:13526: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13528 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13529 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13535 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13536 echo "$as_me:13536: checking if _XOPEN_SOURCE really is set" >&5
13537 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13538 cat >"conftest.$ac_ext" <<_ACEOF
13539 #line 13539 "configure"
13540 #include "confdefs.h"
13541 #include <stdlib.h>
13546 #ifndef _XOPEN_SOURCE
13553 rm -f "conftest.$ac_objext"
13554 if { (eval echo "$as_me:13554: \"$ac_compile\"") >&5
13555 (eval $ac_compile) 2>&5
13557 echo "$as_me:13557: \$? = $ac_status" >&5
13558 (exit "$ac_status"); } &&
13559 { ac_try='test -s "conftest.$ac_objext"'
13560 { (eval echo "$as_me:13560: \"$ac_try\"") >&5
13561 (eval $ac_try) 2>&5
13563 echo "$as_me:13563: \$? = $ac_status" >&5
13564 (exit "$ac_status"); }; }; then
13565 cf_XOPEN_SOURCE_set=yes
13567 echo "$as_me: failed program was:" >&5
13568 cat "conftest.$ac_ext" >&5
13569 cf_XOPEN_SOURCE_set=no
13571 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13572 echo "$as_me:13572: result: $cf_XOPEN_SOURCE_set" >&5
13573 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13574 if test "$cf_XOPEN_SOURCE_set" = yes
13576 cat >"conftest.$ac_ext" <<_ACEOF
13577 #line 13577 "configure"
13578 #include "confdefs.h"
13579 #include <stdlib.h>
13584 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13591 rm -f "conftest.$ac_objext"
13592 if { (eval echo "$as_me:13592: \"$ac_compile\"") >&5
13593 (eval $ac_compile) 2>&5
13595 echo "$as_me:13595: \$? = $ac_status" >&5
13596 (exit "$ac_status"); } &&
13597 { ac_try='test -s "conftest.$ac_objext"'
13598 { (eval echo "$as_me:13598: \"$ac_try\"") >&5
13599 (eval $ac_try) 2>&5
13601 echo "$as_me:13601: \$? = $ac_status" >&5
13602 (exit "$ac_status"); }; }; then
13603 cf_XOPEN_SOURCE_set_ok=yes
13605 echo "$as_me: failed program was:" >&5
13606 cat "conftest.$ac_ext" >&5
13607 cf_XOPEN_SOURCE_set_ok=no
13609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13610 if test "$cf_XOPEN_SOURCE_set_ok" = no
13612 { echo "$as_me:13612: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13613 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13617 echo "$as_me:13617: checking if we should define _XOPEN_SOURCE" >&5
13618 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13619 if test "${cf_cv_xopen_source+set}" = set; then
13620 echo $ECHO_N "(cached) $ECHO_C" >&6
13623 cat >"conftest.$ac_ext" <<_ACEOF
13624 #line 13624 "configure"
13625 #include "confdefs.h"
13627 #include <stdlib.h>
13628 #include <string.h>
13629 #include <sys/types.h>
13635 #ifndef _XOPEN_SOURCE
13642 rm -f "conftest.$ac_objext"
13643 if { (eval echo "$as_me:13643: \"$ac_compile\"") >&5
13644 (eval $ac_compile) 2>&5
13646 echo "$as_me:13646: \$? = $ac_status" >&5
13647 (exit "$ac_status"); } &&
13648 { ac_try='test -s "conftest.$ac_objext"'
13649 { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650 (eval $ac_try) 2>&5
13652 echo "$as_me:13652: \$? = $ac_status" >&5
13653 (exit "$ac_status"); }; }; then
13654 cf_cv_xopen_source=no
13656 echo "$as_me: failed program was:" >&5
13657 cat "conftest.$ac_ext" >&5
13658 cf_save="$CPPFLAGS"
13660 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13661 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13663 cat >"conftest.$ac_ext" <<_ACEOF
13664 #line 13664 "configure"
13665 #include "confdefs.h"
13667 #include <stdlib.h>
13668 #include <string.h>
13669 #include <sys/types.h>
13675 #ifdef _XOPEN_SOURCE
13682 rm -f "conftest.$ac_objext"
13683 if { (eval echo "$as_me:13683: \"$ac_compile\"") >&5
13684 (eval $ac_compile) 2>&5
13686 echo "$as_me:13686: \$? = $ac_status" >&5
13687 (exit "$ac_status"); } &&
13688 { ac_try='test -s "conftest.$ac_objext"'
13689 { (eval echo "$as_me:13689: \"$ac_try\"") >&5
13690 (eval $ac_try) 2>&5
13692 echo "$as_me:13692: \$? = $ac_status" >&5
13693 (exit "$ac_status"); }; }; then
13694 cf_cv_xopen_source=no
13696 echo "$as_me: failed program was:" >&5
13697 cat "conftest.$ac_ext" >&5
13698 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13701 CPPFLAGS="$cf_save"
13704 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13707 echo "$as_me:13707: result: $cf_cv_xopen_source" >&5
13708 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13710 if test "$cf_cv_xopen_source" != no ; then
13712 CFLAGS=`echo "$CFLAGS" | \
13713 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13714 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13716 CPPFLAGS=`echo "$CPPFLAGS" | \
13717 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13718 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13720 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13725 cf_new_extra_cppflags=
13727 for cf_add_cflags in $cf_temp_xopen_source
13729 case "$cf_fix_cppflags" in
13731 case "$cf_add_cflags" in
13732 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13733 case "$cf_add_cflags" in
13735 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13737 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13738 && test -z "${cf_tst_cflags}" \
13739 && cf_fix_cppflags=yes
13741 if test "$cf_fix_cppflags" = yes ; then
13743 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13744 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13747 elif test "${cf_tst_cflags}" = "\"'" ; then
13749 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13750 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13756 case "$CPPFLAGS" in
13760 case "$cf_add_cflags" in
13762 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13764 CPPFLAGS=`echo "$CPPFLAGS" | \
13765 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13766 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13771 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13772 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13779 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13780 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13787 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13788 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13790 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13792 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13793 && test -z "${cf_tst_cflags}" \
13794 && cf_fix_cppflags=no
13799 if test -n "$cf_new_cflags" ; then
13801 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13802 CFLAGS="${CFLAGS}$cf_new_cflags"
13806 if test -n "$cf_new_cppflags" ; then
13808 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13809 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13813 if test -n "$cf_new_extra_cppflags" ; then
13815 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13816 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13824 fi # cf_cv_posix_visible
13826 # Check whether --enable-largefile or --disable-largefile was given.
13827 if test "${enable_largefile+set}" = set; then
13828 enableval="$enable_largefile"
13831 if test "$enable_largefile" != no; then
13833 echo "$as_me:13833: checking for special C compiler options needed for large files" >&5
13834 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13835 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13836 echo $ECHO_N "(cached) $ECHO_C" >&6
13838 ac_cv_sys_largefile_CC=no
13839 if test "$GCC" != yes; then
13842 # IRIX 6.2 and later do not support large files by default,
13843 # so use the C compiler's -n32 option if that helps.
13844 cat >"conftest.$ac_ext" <<_ACEOF
13845 #line 13845 "configure"
13846 #include "confdefs.h"
13847 #include <sys/types.h>
13848 /* Check that off_t can represent 2**63 - 1 correctly.
13849 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13850 since some C++ compilers masquerading as C compilers
13851 incorrectly reject 9223372036854775807. */
13852 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13853 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13854 && LARGE_OFF_T % 2147483647 == 1)
13864 rm -f "conftest.$ac_objext"
13865 if { (eval echo "$as_me:13865: \"$ac_compile\"") >&5
13866 (eval $ac_compile) 2>&5
13868 echo "$as_me:13868: \$? = $ac_status" >&5
13869 (exit "$ac_status"); } &&
13870 { ac_try='test -s "conftest.$ac_objext"'
13871 { (eval echo "$as_me:13871: \"$ac_try\"") >&5
13872 (eval $ac_try) 2>&5
13874 echo "$as_me:13874: \$? = $ac_status" >&5
13875 (exit "$ac_status"); }; }; then
13878 echo "$as_me: failed program was:" >&5
13879 cat "conftest.$ac_ext" >&5
13881 rm -f "conftest.$ac_objext"
13883 rm -f "conftest.$ac_objext"
13884 if { (eval echo "$as_me:13884: \"$ac_compile\"") >&5
13885 (eval $ac_compile) 2>&5
13887 echo "$as_me:13887: \$? = $ac_status" >&5
13888 (exit "$ac_status"); } &&
13889 { ac_try='test -s "conftest.$ac_objext"'
13890 { (eval echo "$as_me:13890: \"$ac_try\"") >&5
13891 (eval $ac_try) 2>&5
13893 echo "$as_me:13893: \$? = $ac_status" >&5
13894 (exit "$ac_status"); }; }; then
13895 ac_cv_sys_largefile_CC=' -n32'; break
13897 echo "$as_me: failed program was:" >&5
13898 cat "conftest.$ac_ext" >&5
13900 rm -f "conftest.$ac_objext"
13904 rm -f "conftest.$ac_ext"
13907 echo "$as_me:13907: result: $ac_cv_sys_largefile_CC" >&5
13908 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13909 if test "$ac_cv_sys_largefile_CC" != no; then
13910 CC=$CC$ac_cv_sys_largefile_CC
13913 echo "$as_me:13913: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13914 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13915 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13916 echo $ECHO_N "(cached) $ECHO_C" >&6
13919 ac_cv_sys_file_offset_bits=no
13920 cat >"conftest.$ac_ext" <<_ACEOF
13921 #line 13921 "configure"
13922 #include "confdefs.h"
13923 #include <sys/types.h>
13924 /* Check that off_t can represent 2**63 - 1 correctly.
13925 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13926 since some C++ compilers masquerading as C compilers
13927 incorrectly reject 9223372036854775807. */
13928 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13929 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13930 && LARGE_OFF_T % 2147483647 == 1)
13940 rm -f "conftest.$ac_objext"
13941 if { (eval echo "$as_me:13941: \"$ac_compile\"") >&5
13942 (eval $ac_compile) 2>&5
13944 echo "$as_me:13944: \$? = $ac_status" >&5
13945 (exit "$ac_status"); } &&
13946 { ac_try='test -s "conftest.$ac_objext"'
13947 { (eval echo "$as_me:13947: \"$ac_try\"") >&5
13948 (eval $ac_try) 2>&5
13950 echo "$as_me:13950: \$? = $ac_status" >&5
13951 (exit "$ac_status"); }; }; then
13954 echo "$as_me: failed program was:" >&5
13955 cat "conftest.$ac_ext" >&5
13957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13958 cat >"conftest.$ac_ext" <<_ACEOF
13959 #line 13959 "configure"
13960 #include "confdefs.h"
13961 #define _FILE_OFFSET_BITS 64
13962 #include <sys/types.h>
13963 /* Check that off_t can represent 2**63 - 1 correctly.
13964 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13965 since some C++ compilers masquerading as C compilers
13966 incorrectly reject 9223372036854775807. */
13967 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13968 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13969 && LARGE_OFF_T % 2147483647 == 1)
13979 rm -f "conftest.$ac_objext"
13980 if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
13981 (eval $ac_compile) 2>&5
13983 echo "$as_me:13983: \$? = $ac_status" >&5
13984 (exit "$ac_status"); } &&
13985 { ac_try='test -s "conftest.$ac_objext"'
13986 { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987 (eval $ac_try) 2>&5
13989 echo "$as_me:13989: \$? = $ac_status" >&5
13990 (exit "$ac_status"); }; }; then
13991 ac_cv_sys_file_offset_bits=64; break
13993 echo "$as_me: failed program was:" >&5
13994 cat "conftest.$ac_ext" >&5
13996 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14000 echo "$as_me:14000: result: $ac_cv_sys_file_offset_bits" >&5
14001 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14002 if test "$ac_cv_sys_file_offset_bits" != no; then
14004 cat >>confdefs.h <<EOF
14005 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14010 echo "$as_me:14010: checking for _LARGE_FILES value needed for large files" >&5
14011 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14012 if test "${ac_cv_sys_large_files+set}" = set; then
14013 echo $ECHO_N "(cached) $ECHO_C" >&6
14016 ac_cv_sys_large_files=no
14017 cat >"conftest.$ac_ext" <<_ACEOF
14018 #line 14018 "configure"
14019 #include "confdefs.h"
14020 #include <sys/types.h>
14021 /* Check that off_t can represent 2**63 - 1 correctly.
14022 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14023 since some C++ compilers masquerading as C compilers
14024 incorrectly reject 9223372036854775807. */
14025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14026 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14027 && LARGE_OFF_T % 2147483647 == 1)
14037 rm -f "conftest.$ac_objext"
14038 if { (eval echo "$as_me:14038: \"$ac_compile\"") >&5
14039 (eval $ac_compile) 2>&5
14041 echo "$as_me:14041: \$? = $ac_status" >&5
14042 (exit "$ac_status"); } &&
14043 { ac_try='test -s "conftest.$ac_objext"'
14044 { (eval echo "$as_me:14044: \"$ac_try\"") >&5
14045 (eval $ac_try) 2>&5
14047 echo "$as_me:14047: \$? = $ac_status" >&5
14048 (exit "$ac_status"); }; }; then
14051 echo "$as_me: failed program was:" >&5
14052 cat "conftest.$ac_ext" >&5
14054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14055 cat >"conftest.$ac_ext" <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14058 #define _LARGE_FILES 1
14059 #include <sys/types.h>
14060 /* Check that off_t can represent 2**63 - 1 correctly.
14061 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14062 since some C++ compilers masquerading as C compilers
14063 incorrectly reject 9223372036854775807. */
14064 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14065 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14066 && LARGE_OFF_T % 2147483647 == 1)
14076 rm -f "conftest.$ac_objext"
14077 if { (eval echo "$as_me:14077: \"$ac_compile\"") >&5
14078 (eval $ac_compile) 2>&5
14080 echo "$as_me:14080: \$? = $ac_status" >&5
14081 (exit "$ac_status"); } &&
14082 { ac_try='test -s "conftest.$ac_objext"'
14083 { (eval echo "$as_me:14083: \"$ac_try\"") >&5
14084 (eval $ac_try) 2>&5
14086 echo "$as_me:14086: \$? = $ac_status" >&5
14087 (exit "$ac_status"); }; }; then
14088 ac_cv_sys_large_files=1; break
14090 echo "$as_me: failed program was:" >&5
14091 cat "conftest.$ac_ext" >&5
14093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14097 echo "$as_me:14097: result: $ac_cv_sys_large_files" >&5
14098 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14099 if test "$ac_cv_sys_large_files" != no; then
14101 cat >>confdefs.h <<EOF
14102 #define _LARGE_FILES $ac_cv_sys_large_files
14109 if test "$enable_largefile" != no ; then
14110 echo "$as_me:14110: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14111 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14112 if test "${ac_cv_sys_largefile_source+set}" = set; then
14113 echo $ECHO_N "(cached) $ECHO_C" >&6
14116 ac_cv_sys_largefile_source=no
14117 cat >"conftest.$ac_ext" <<_ACEOF
14118 #line 14118 "configure"
14119 #include "confdefs.h"
14129 rm -f "conftest.$ac_objext"
14130 if { (eval echo "$as_me:14130: \"$ac_compile\"") >&5
14131 (eval $ac_compile) 2>&5
14133 echo "$as_me:14133: \$? = $ac_status" >&5
14134 (exit "$ac_status"); } &&
14135 { ac_try='test -s "conftest.$ac_objext"'
14136 { (eval echo "$as_me:14136: \"$ac_try\"") >&5
14137 (eval $ac_try) 2>&5
14139 echo "$as_me:14139: \$? = $ac_status" >&5
14140 (exit "$ac_status"); }; }; then
14143 echo "$as_me: failed program was:" >&5
14144 cat "conftest.$ac_ext" >&5
14146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14147 cat >"conftest.$ac_ext" <<_ACEOF
14148 #line 14148 "configure"
14149 #include "confdefs.h"
14150 #define _LARGEFILE_SOURCE 1
14160 rm -f "conftest.$ac_objext"
14161 if { (eval echo "$as_me:14161: \"$ac_compile\"") >&5
14162 (eval $ac_compile) 2>&5
14164 echo "$as_me:14164: \$? = $ac_status" >&5
14165 (exit "$ac_status"); } &&
14166 { ac_try='test -s "conftest.$ac_objext"'
14167 { (eval echo "$as_me:14167: \"$ac_try\"") >&5
14168 (eval $ac_try) 2>&5
14170 echo "$as_me:14170: \$? = $ac_status" >&5
14171 (exit "$ac_status"); }; }; then
14172 ac_cv_sys_largefile_source=1; break
14174 echo "$as_me: failed program was:" >&5
14175 cat "conftest.$ac_ext" >&5
14177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14181 echo "$as_me:14181: result: $ac_cv_sys_largefile_source" >&5
14182 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14183 if test "$ac_cv_sys_largefile_source" != no; then
14185 cat >>confdefs.h <<EOF
14186 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14192 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14193 # in glibc 2.1.3, but that breaks too many other things.
14194 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14195 echo "$as_me:14195: checking for fseeko" >&5
14196 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14197 if test "${ac_cv_func_fseeko+set}" = set; then
14198 echo $ECHO_N "(cached) $ECHO_C" >&6
14200 cat >"conftest.$ac_ext" <<_ACEOF
14201 #line 14201 "configure"
14202 #include "confdefs.h"
14207 return fseeko && fseeko (stdin, 0, 0);
14212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14213 if { (eval echo "$as_me:14213: \"$ac_link\"") >&5
14214 (eval $ac_link) 2>&5
14216 echo "$as_me:14216: \$? = $ac_status" >&5
14217 (exit "$ac_status"); } &&
14218 { ac_try='test -s "conftest$ac_exeext"'
14219 { (eval echo "$as_me:14219: \"$ac_try\"") >&5
14220 (eval $ac_try) 2>&5
14222 echo "$as_me:14222: \$? = $ac_status" >&5
14223 (exit "$ac_status"); }; }; then
14224 ac_cv_func_fseeko=yes
14226 echo "$as_me: failed program was:" >&5
14227 cat "conftest.$ac_ext" >&5
14228 ac_cv_func_fseeko=no
14230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14232 echo "$as_me:14232: result: $ac_cv_func_fseeko" >&5
14233 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14234 if test $ac_cv_func_fseeko = yes; then
14236 cat >>confdefs.h <<\EOF
14237 #define HAVE_FSEEKO 1
14242 # Normally we would collect these definitions in the config.h,
14243 # but (like _XOPEN_SOURCE), some environments rely on having these
14244 # defined before any of the system headers are included. Another
14245 # case comes up with C++, e.g., on AIX the compiler compiles the
14246 # header files by themselves before looking at the body files it is
14247 # told to compile. For ncurses, those header files do not include
14249 if test "$ac_cv_sys_large_files" != no
14252 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14253 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14256 if test "$ac_cv_sys_largefile_source" != no
14259 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14260 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14263 if test "$ac_cv_sys_file_offset_bits" != no
14266 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14267 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14271 echo "$as_me:14271: checking whether to use struct dirent64" >&5
14272 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14273 if test "${cf_cv_struct_dirent64+set}" = set; then
14274 echo $ECHO_N "(cached) $ECHO_C" >&6
14277 cat >"conftest.$ac_ext" <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14281 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14282 #include <sys/types.h>
14283 #include <dirent.h>
14289 /* if transitional largefile support is setup, this is true */
14290 extern struct dirent64 * readdir(DIR *);
14291 struct dirent64 *x = readdir((DIR *)0);
14292 struct dirent *y = readdir((DIR *)0);
14300 rm -f "conftest.$ac_objext"
14301 if { (eval echo "$as_me:14301: \"$ac_compile\"") >&5
14302 (eval $ac_compile) 2>&5
14304 echo "$as_me:14304: \$? = $ac_status" >&5
14305 (exit "$ac_status"); } &&
14306 { ac_try='test -s "conftest.$ac_objext"'
14307 { (eval echo "$as_me:14307: \"$ac_try\"") >&5
14308 (eval $ac_try) 2>&5
14310 echo "$as_me:14310: \$? = $ac_status" >&5
14311 (exit "$ac_status"); }; }; then
14312 cf_cv_struct_dirent64=yes
14314 echo "$as_me: failed program was:" >&5
14315 cat "conftest.$ac_ext" >&5
14316 cf_cv_struct_dirent64=no
14318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14321 echo "$as_me:14321: result: $cf_cv_struct_dirent64" >&5
14322 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14323 test "$cf_cv_struct_dirent64" = yes &&
14324 cat >>confdefs.h <<\EOF
14325 #define HAVE_STRUCT_DIRENT64 1
14330 ### Enable compiling-in rcs id's
14331 echo "$as_me:14331: checking if RCS identifiers should be compiled-in" >&5
14332 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14334 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14335 if test "${with_rcs_ids+set}" = set; then
14336 withval="$with_rcs_ids"
14337 with_rcs_ids=$withval
14341 echo "$as_me:14341: result: $with_rcs_ids" >&5
14342 echo "${ECHO_T}$with_rcs_ids" >&6
14343 test "$with_rcs_ids" = yes &&
14344 cat >>confdefs.h <<\EOF
14345 #define USE_RCS_IDS 1
14348 ###############################################################################
14350 ### Note that some functions (such as const) are normally disabled anyway.
14351 echo "$as_me:14351: checking if you want to build with function extensions" >&5
14352 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14354 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14355 if test "${enable_ext_funcs+set}" = set; then
14356 enableval="$enable_ext_funcs"
14357 with_ext_funcs=$enableval
14361 echo "$as_me:14361: result: $with_ext_funcs" >&5
14362 echo "${ECHO_T}$with_ext_funcs" >&6
14363 if test "$with_ext_funcs" = yes ; then
14364 NCURSES_EXT_FUNCS=1
14366 cat >>confdefs.h <<\EOF
14367 #define HAVE_USE_DEFAULT_COLORS 1
14370 cat >>confdefs.h <<\EOF
14371 #define NCURSES_EXT_FUNCS 1
14375 NCURSES_EXT_FUNCS=0
14378 ### use option --enable-const to turn on use of const beyond that in XSI.
14379 echo "$as_me:14379: checking for extended use of const keyword" >&5
14380 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14382 # Check whether --enable-const or --disable-const was given.
14383 if test "${enable_const+set}" = set; then
14384 enableval="$enable_const"
14385 with_ext_const=$enableval
14389 echo "$as_me:14389: result: $with_ext_const" >&5
14390 echo "${ECHO_T}$with_ext_const" >&6
14391 NCURSES_CONST='/*nothing*/'
14392 if test "$with_ext_const" = yes ; then
14393 NCURSES_CONST=const
14396 ###############################################################################
14397 # These options are relatively safe to experiment with.
14399 echo "$as_me:14399: checking if you want all development code" >&5
14400 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14402 # Check whether --with-develop or --without-develop was given.
14403 if test "${with_develop+set}" = set; then
14404 withval="$with_develop"
14405 with_develop=$withval
14409 echo "$as_me:14409: result: $with_develop" >&5
14410 echo "${ECHO_T}$with_develop" >&6
14412 ###############################################################################
14413 # These are just experimental, probably should not be in a package:
14415 # This is still experimental (20080329), but should ultimately be moved to
14416 # the script-block --with-normal, etc.
14418 echo "$as_me:14418: checking if you want to link with the pthread library" >&5
14419 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14421 # Check whether --with-pthread or --without-pthread was given.
14422 if test "${with_pthread+set}" = set; then
14423 withval="$with_pthread"
14424 with_pthread=$withval
14428 echo "$as_me:14428: result: $with_pthread" >&5
14429 echo "${ECHO_T}$with_pthread" >&6
14431 if test "$with_pthread" != no ; then
14432 echo "$as_me:14432: checking for pthread.h" >&5
14433 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14434 if test "${ac_cv_header_pthread_h+set}" = set; then
14435 echo $ECHO_N "(cached) $ECHO_C" >&6
14437 cat >"conftest.$ac_ext" <<_ACEOF
14438 #line 14438 "configure"
14439 #include "confdefs.h"
14440 #include <pthread.h>
14442 if { (eval echo "$as_me:14442: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14443 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14445 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14447 cat conftest.err >&5
14448 echo "$as_me:14448: \$? = $ac_status" >&5
14449 (exit "$ac_status"); } >/dev/null; then
14450 if test -s conftest.err; then
14451 ac_cpp_err=$ac_c_preproc_warn_flag
14458 if test -z "$ac_cpp_err"; then
14459 ac_cv_header_pthread_h=yes
14461 echo "$as_me: failed program was:" >&5
14462 cat "conftest.$ac_ext" >&5
14463 ac_cv_header_pthread_h=no
14465 rm -f conftest.err "conftest.$ac_ext"
14467 echo "$as_me:14467: result: $ac_cv_header_pthread_h" >&5
14468 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14469 if test "$ac_cv_header_pthread_h" = yes; then
14471 cat >>confdefs.h <<\EOF
14472 #define HAVE_PTHREADS_H 1
14475 for cf_lib_pthread in pthread c_r
14477 echo "$as_me:14477: checking if we can link with the $cf_lib_pthread library" >&5
14478 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14479 cf_save_LIBS="$LIBS"
14481 cf_add_libs="$LIBS"
14484 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14485 # filter duplicates
14486 for cf_add_1lib in $cf_add_0lib; do
14487 for cf_add_2lib in $cf_add_libs; do
14488 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14493 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14495 LIBS="$cf_add_libs"
14497 cat >"conftest.$ac_ext" <<_ACEOF
14498 #line 14498 "configure"
14499 #include "confdefs.h"
14501 #include <pthread.h>
14507 int rc = pthread_create(0,0,0,0);
14508 int r2 = pthread_mutexattr_settype(0, 0);
14514 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14515 if { (eval echo "$as_me:14515: \"$ac_link\"") >&5
14516 (eval $ac_link) 2>&5
14518 echo "$as_me:14518: \$? = $ac_status" >&5
14519 (exit "$ac_status"); } &&
14520 { ac_try='test -s "conftest$ac_exeext"'
14521 { (eval echo "$as_me:14521: \"$ac_try\"") >&5
14522 (eval $ac_try) 2>&5
14524 echo "$as_me:14524: \$? = $ac_status" >&5
14525 (exit "$ac_status"); }; }; then
14528 echo "$as_me: failed program was:" >&5
14529 cat "conftest.$ac_ext" >&5
14532 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14533 LIBS="$cf_save_LIBS"
14534 echo "$as_me:14534: result: $with_pthread" >&5
14535 echo "${ECHO_T}$with_pthread" >&6
14536 test "$with_pthread" = yes && break
14539 if test "$with_pthread" = yes ; then
14541 cf_add_libs="$LIBS"
14544 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14545 # filter duplicates
14546 for cf_add_1lib in $cf_add_0lib; do
14547 for cf_add_2lib in $cf_add_libs; do
14548 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14553 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14555 LIBS="$cf_add_libs"
14557 cat >>confdefs.h <<\EOF
14558 #define HAVE_LIBPTHREADS 1
14562 { { echo "$as_me:14562: error: Cannot link with pthread library" >&5
14563 echo "$as_me: error: Cannot link with pthread library" >&2;}
14564 { (exit 1); exit 1; }; }
14571 echo "$as_me:14571: checking if you want to use weak-symbols for pthreads" >&5
14572 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14574 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14575 if test "${enable_weak_symbols+set}" = set; then
14576 enableval="$enable_weak_symbols"
14577 use_weak_symbols=$withval
14579 use_weak_symbols=no
14581 echo "$as_me:14581: result: $use_weak_symbols" >&5
14582 echo "${ECHO_T}$use_weak_symbols" >&6
14583 if test "$use_weak_symbols" = yes ; then
14585 echo "$as_me:14585: checking if $CC supports weak symbols" >&5
14586 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14587 if test "${cf_cv_weak_symbols+set}" = set; then
14588 echo $ECHO_N "(cached) $ECHO_C" >&6
14591 cat >"conftest.$ac_ext" <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14600 #if defined(__GNUC__)
14601 # if defined __USE_ISOC99
14602 # define _cat_pragma(exp) _Pragma(#exp)
14603 # define _weak_pragma(exp) _cat_pragma(weak name)
14605 # define _weak_pragma(exp)
14607 # define _declare(name) __extension__ extern __typeof__(name) name
14608 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14611 weak_symbol(fopen);
14617 rm -f "conftest.$ac_objext"
14618 if { (eval echo "$as_me:14618: \"$ac_compile\"") >&5
14619 (eval $ac_compile) 2>&5
14621 echo "$as_me:14621: \$? = $ac_status" >&5
14622 (exit "$ac_status"); } &&
14623 { ac_try='test -s "conftest.$ac_objext"'
14624 { (eval echo "$as_me:14624: \"$ac_try\"") >&5
14625 (eval $ac_try) 2>&5
14627 echo "$as_me:14627: \$? = $ac_status" >&5
14628 (exit "$ac_status"); }; }; then
14629 cf_cv_weak_symbols=yes
14631 echo "$as_me: failed program was:" >&5
14632 cat "conftest.$ac_ext" >&5
14633 cf_cv_weak_symbols=no
14635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14638 echo "$as_me:14638: result: $cf_cv_weak_symbols" >&5
14639 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14642 cf_cv_weak_symbols=no
14645 if test $cf_cv_weak_symbols = yes ; then
14647 cat >>confdefs.h <<\EOF
14648 #define USE_WEAK_SYMBOLS 1
14654 if test "$with_pthread" = "yes" ; then
14656 cat >>confdefs.h <<\EOF
14657 #define USE_PTHREADS 1
14660 enable_reentrant=yes
14661 if test $cf_cv_weak_symbols = yes ; then
14666 # OpenSUSE is installing ncurses6, using reentrant option.
14667 echo "$as_me:14667: checking for _nc_TABSIZE" >&5
14668 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14669 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14670 echo $ECHO_N "(cached) $ECHO_C" >&6
14672 cat >"conftest.$ac_ext" <<_ACEOF
14673 #line 14673 "configure"
14674 #include "confdefs.h"
14675 #define _nc_TABSIZE autoconf_temporary
14676 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14683 /* We use char because int might match the return type of a gcc2
14684 builtin and then its argument prototype would still apply. */
14685 char _nc_TABSIZE (void);
14691 /* The GNU C library defines stubs for functions which it implements
14692 to always fail with ENOSYS. Some functions are actually named
14693 something starting with __ and the normal name is an alias. */
14694 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14695 #error found stub for _nc_TABSIZE
14698 return _nc_TABSIZE ();
14703 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14704 if { (eval echo "$as_me:14704: \"$ac_link\"") >&5
14705 (eval $ac_link) 2>&5
14707 echo "$as_me:14707: \$? = $ac_status" >&5
14708 (exit "$ac_status"); } &&
14709 { ac_try='test -s "conftest$ac_exeext"'
14710 { (eval echo "$as_me:14710: \"$ac_try\"") >&5
14711 (eval $ac_try) 2>&5
14713 echo "$as_me:14713: \$? = $ac_status" >&5
14714 (exit "$ac_status"); }; }; then
14715 ac_cv_func__nc_TABSIZE=yes
14717 echo "$as_me: failed program was:" >&5
14718 cat "conftest.$ac_ext" >&5
14719 ac_cv_func__nc_TABSIZE=no
14721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14723 echo "$as_me:14723: result: $ac_cv_func__nc_TABSIZE" >&5
14724 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14725 if test "$ac_cv_func__nc_TABSIZE" = yes; then
14726 assume_reentrant=yes
14728 assume_reentrant=no
14731 # Reentrant code has to be opaque; there's little advantage to making ncurses
14732 # opaque outside of that, so there is no --enable-opaque option. We can use
14733 # this option without --with-pthreads, but this will be always set for
14735 echo "$as_me:14735: checking if you want experimental reentrant code" >&5
14736 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14738 # Check whether --enable-reentrant or --disable-reentrant was given.
14739 if test "${enable_reentrant+set}" = set; then
14740 enableval="$enable_reentrant"
14741 with_reentrant=$enableval
14743 with_reentrant=$assume_reentrant
14745 echo "$as_me:14745: result: $with_reentrant" >&5
14746 echo "${ECHO_T}$with_reentrant" >&6
14747 if test "$with_reentrant" = yes ; then
14748 cf_cv_enable_reentrant=1
14749 if test $cf_cv_weak_symbols = yes ; then
14751 # remove pthread library from $LIBS
14752 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14754 elif test "$assume_reentrant" = no ; then
14755 LIB_SUFFIX="t${LIB_SUFFIX}"
14758 cat >>confdefs.h <<\EOF
14759 #define USE_REENTRANT 1
14763 cf_cv_enable_reentrant=0
14766 ### Allow using a different wrap-prefix
14767 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14768 echo "$as_me:14768: checking for prefix used to wrap public variables" >&5
14769 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14771 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14772 if test "${with_wrap_prefix+set}" = set; then
14773 withval="$with_wrap_prefix"
14774 NCURSES_WRAP_PREFIX=$withval
14776 NCURSES_WRAP_PREFIX=_nc_
14778 echo "$as_me:14778: result: $NCURSES_WRAP_PREFIX" >&5
14779 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14781 NCURSES_WRAP_PREFIX=_nc_
14784 cat >>confdefs.h <<EOF
14785 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14788 ###############################################################################
14790 ### use option --disable-echo to suppress full display compiling commands
14792 echo "$as_me:14792: checking if you want to see long compiling messages" >&5
14793 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14795 # Check whether --enable-echo or --disable-echo was given.
14796 if test "${enable_echo+set}" = set; then
14797 enableval="$enable_echo"
14798 test "$enableval" != no && enableval=yes
14799 if test "$enableval" != "yes" ; then
14802 ECHO_LD='@echo linking $@;'
14803 RULE_CC='@echo compiling $<'
14804 SHOW_CC='@echo compiling $@'
14826 echo "$as_me:14826: result: $enableval" >&5
14827 echo "${ECHO_T}$enableval" >&6
14829 echo "$as_me:14829: checking if you want to use C11 _Noreturn feature" >&5
14830 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
14832 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
14833 if test "${enable_stdnoreturn+set}" = set; then
14834 enableval="$enable_stdnoreturn"
14835 test "$enableval" != yes && enableval=no
14836 if test "$enableval" != "no" ; then
14837 enable_stdnoreturn=yes
14839 enable_stdnoreturn=no
14843 enable_stdnoreturn=no
14846 echo "$as_me:14846: result: $enable_stdnoreturn" >&5
14847 echo "${ECHO_T}$enable_stdnoreturn" >&6
14849 if test $enable_stdnoreturn = yes; then
14850 echo "$as_me:14850: checking for C11 _Noreturn feature" >&5
14851 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
14852 if test "${cf_cv_c11_noreturn+set}" = set; then
14853 echo $ECHO_N "(cached) $ECHO_C" >&6
14855 cat >"conftest.$ac_ext" <<_ACEOF
14856 #line 14856 "configure"
14857 #include "confdefs.h"
14860 #include <stdlib.h>
14861 #include <stdnoreturn.h>
14862 static _Noreturn void giveup(void) { exit(0); }
14867 if (feof(stdin)) giveup()
14872 rm -f "conftest.$ac_objext"
14873 if { (eval echo "$as_me:14873: \"$ac_compile\"") >&5
14874 (eval $ac_compile) 2>&5
14876 echo "$as_me:14876: \$? = $ac_status" >&5
14877 (exit "$ac_status"); } &&
14878 { ac_try='test -s "conftest.$ac_objext"'
14879 { (eval echo "$as_me:14879: \"$ac_try\"") >&5
14880 (eval $ac_try) 2>&5
14882 echo "$as_me:14882: \$? = $ac_status" >&5
14883 (exit "$ac_status"); }; }; then
14884 cf_cv_c11_noreturn=yes
14886 echo "$as_me: failed program was:" >&5
14887 cat "conftest.$ac_ext" >&5
14888 cf_cv_c11_noreturn=no
14890 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14893 echo "$as_me:14893: result: $cf_cv_c11_noreturn" >&5
14894 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
14896 cf_cv_c11_noreturn=no,
14899 if test "$cf_cv_c11_noreturn" = yes; then
14901 cat >>confdefs.h <<\EOF
14902 #define HAVE_STDNORETURN_H 1
14905 cat >>confdefs.h <<EOF
14906 #define STDC_NORETURN _Noreturn
14909 HAVE_STDNORETURN_H=1
14911 HAVE_STDNORETURN_H=0
14914 if test "$GCC" = yes || test "$GXX" = yes
14917 if test "$GCC" = yes || test "$GXX" = yes
14921 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14923 echo "${as_me:-configure}:14923: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14926 for cf_temp_scan in $CFLAGS
14928 case "x$cf_temp_scan" in
14931 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14932 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14937 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14938 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14943 CFLAGS="$cf_temp_flags"
14944 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
14946 echo "${as_me:-configure}:14946: testing ... fixed $CFLAGS ..." 1>&5
14948 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14950 echo "${as_me:-configure}:14950: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14956 if test "$GCC" = yes || test "$GXX" = yes
14960 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
14962 echo "${as_me:-configure}:14962: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
14965 for cf_temp_scan in $CPPFLAGS
14967 case "x$cf_temp_scan" in
14970 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
14971 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
14976 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
14977 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
14982 CPPFLAGS="$cf_temp_flags"
14983 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
14985 echo "${as_me:-configure}:14985: testing ... fixed $CPPFLAGS ..." 1>&5
14987 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
14989 echo "${as_me:-configure}:14989: testing ... extra $EXTRA_CFLAGS ..." 1>&5
14995 if test "$GCC" = yes || test "$GXX" = yes
14999 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15001 echo "${as_me:-configure}:15001: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15004 for cf_temp_scan in $LDFLAGS
15006 case "x$cf_temp_scan" in
15009 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15010 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15015 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15016 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15021 LDFLAGS="$cf_temp_flags"
15022 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15024 echo "${as_me:-configure}:15024: testing ... fixed $LDFLAGS ..." 1>&5
15026 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15028 echo "${as_me:-configure}:15028: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15034 echo "$as_me:15034: checking if you want to turn on gcc warnings" >&5
15035 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15037 # Check whether --enable-warnings or --disable-warnings was given.
15038 if test "${enable_warnings+set}" = set; then
15039 enableval="$enable_warnings"
15040 test "$enableval" != yes && enableval=no
15041 if test "$enableval" != "no" ; then
15042 enable_warnings=yes
15051 echo "$as_me:15051: result: $enable_warnings" >&5
15052 echo "${ECHO_T}$enable_warnings" >&6
15053 if test "$enable_warnings" = "yes"
15056 if test "x$have_x" = xyes; then
15058 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15059 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15060 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15061 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15062 for cf_X_CFLAGS in $X_CFLAGS
15064 case "x$cf_X_CFLAGS" in
15066 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15069 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15074 cat >"conftest.$ac_ext" <<_ACEOF
15075 #line 15075 "configure"
15076 #include "confdefs.h"
15078 #include <stdlib.h>
15079 #include <X11/Intrinsic.h>
15084 String foo = malloc(1); (void)foo
15089 rm -f "conftest.$ac_objext"
15090 if { (eval echo "$as_me:15090: \"$ac_compile\"") >&5
15091 (eval $ac_compile) 2>&5
15093 echo "$as_me:15093: \$? = $ac_status" >&5
15094 (exit "$ac_status"); } &&
15095 { ac_try='test -s "conftest.$ac_objext"'
15096 { (eval echo "$as_me:15096: \"$ac_try\"") >&5
15097 (eval $ac_try) 2>&5
15099 echo "$as_me:15099: \$? = $ac_status" >&5
15100 (exit "$ac_status"); }; }; then
15102 echo "$as_me:15102: checking for X11/Xt const-feature" >&5
15103 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15104 if test "${cf_cv_const_x_string+set}" = set; then
15105 echo $ECHO_N "(cached) $ECHO_C" >&6
15108 cat >"conftest.$ac_ext" <<_ACEOF
15109 #line 15109 "configure"
15110 #include "confdefs.h"
15112 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15113 #undef XTSTRINGDEFINES /* X11R5 and later */
15114 #include <stdlib.h>
15115 #include <X11/Intrinsic.h>
15120 String foo = malloc(1); *foo = 0
15125 rm -f "conftest.$ac_objext"
15126 if { (eval echo "$as_me:15126: \"$ac_compile\"") >&5
15127 (eval $ac_compile) 2>&5
15129 echo "$as_me:15129: \$? = $ac_status" >&5
15130 (exit "$ac_status"); } &&
15131 { ac_try='test -s "conftest.$ac_objext"'
15132 { (eval echo "$as_me:15132: \"$ac_try\"") >&5
15133 (eval $ac_try) 2>&5
15135 echo "$as_me:15135: \$? = $ac_status" >&5
15136 (exit "$ac_status"); }; }; then
15138 cf_cv_const_x_string=no
15141 echo "$as_me: failed program was:" >&5
15142 cat "conftest.$ac_ext" >&5
15144 cf_cv_const_x_string=yes
15147 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15150 echo "$as_me:15150: result: $cf_cv_const_x_string" >&5
15151 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15153 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15154 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15155 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15157 case "$cf_cv_const_x_string" in
15160 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15161 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15166 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15167 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15173 echo "$as_me: failed program was:" >&5
15174 cat "conftest.$ac_ext" >&5
15176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15178 cat > "conftest.$ac_ext" <<EOF
15179 #line 15179 "${as_me:-configure}"
15180 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15182 if test "$INTEL_COMPILER" = yes
15184 # The "-wdXXX" options suppress warnings:
15185 # remark #1419: external declaration in primary source file
15186 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15187 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15188 # remark #193: zero used for undefined preprocessing identifier
15189 # remark #593: variable "curs_sb_left_arrow" was set but never used
15190 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15191 # remark #869: parameter "tw" was never referenced
15192 # remark #981: operands are evaluated in unspecified order
15193 # warning #279: controlling expression is constant
15195 { echo "$as_me:15195: checking for $CC warning options..." >&5
15196 echo "$as_me: checking for $CC warning options..." >&6;}
15197 cf_save_CFLAGS="$CFLAGS"
15198 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15210 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15211 if { (eval echo "$as_me:15211: \"$ac_compile\"") >&5
15212 (eval $ac_compile) 2>&5
15214 echo "$as_me:15214: \$? = $ac_status" >&5
15215 (exit "$ac_status"); }; then
15216 test -n "$verbose" && echo "$as_me:15216: result: ... -$cf_opt" >&5
15217 echo "${ECHO_T}... -$cf_opt" >&6
15218 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15221 CFLAGS="$cf_save_CFLAGS"
15222 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15224 { echo "$as_me:15224: checking for $CC warning options..." >&5
15225 echo "$as_me: checking for $CC warning options..." >&6;}
15226 cf_save_CFLAGS="$CFLAGS"
15228 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15229 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15230 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15231 for cf_opt in W Wall \
15232 Wbad-function-cast \
15235 Wdeclaration-after-statement \
15238 Wmissing-declarations \
15239 Wmissing-prototypes \
15243 Wstrict-prototypes \
15244 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15246 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15247 if { (eval echo "$as_me:15247: \"$ac_compile\"") >&5
15248 (eval $ac_compile) 2>&5
15250 echo "$as_me:15250: \$? = $ac_status" >&5
15251 (exit "$ac_status"); }; then
15252 test -n "$verbose" && echo "$as_me:15252: result: ... -$cf_opt" >&5
15253 echo "${ECHO_T}... -$cf_opt" >&6
15256 case "$GCC_VERSION" in
15258 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15260 echo "${as_me:-configure}:15260: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15266 case "$GCC_VERSION" in
15268 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15270 echo "${as_me:-configure}:15270: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15276 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15279 CFLAGS="$cf_save_CFLAGS"
15285 if test "$GCC" = yes || test "$GXX" = yes
15287 cat > conftest.i <<EOF
15289 #define GCC_PRINTF 0
15292 #define GCC_SCANF 0
15294 #ifndef GCC_NORETURN
15295 #define GCC_NORETURN /* nothing */
15298 #define GCC_UNUSED /* nothing */
15301 if test "$GCC" = yes
15303 { echo "$as_me:15303: checking for $CC __attribute__ directives..." >&5
15304 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15305 cat > "conftest.$ac_ext" <<EOF
15306 #line 15306 "${as_me:-configure}"
15307 #include "confdefs.h"
15308 #include "conftest.h"
15309 #include "conftest.i"
15311 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15313 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15316 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15318 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15320 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15321 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15322 extern GCC_NORETURN void foo(void);
15323 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15325 cf_printf_attribute=no
15326 cf_scanf_attribute=no
15327 for cf_attribute in scanf printf unused noreturn
15330 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15332 cf_directive="__attribute__(($cf_attribute))"
15333 echo "checking for $CC $cf_directive" 1>&5
15335 case "$cf_attribute" in
15337 cf_printf_attribute=yes
15338 cat >conftest.h <<EOF
15339 #define GCC_$cf_ATTRIBUTE 1
15343 cf_scanf_attribute=yes
15344 cat >conftest.h <<EOF
15345 #define GCC_$cf_ATTRIBUTE 1
15349 cat >conftest.h <<EOF
15350 #define GCC_$cf_ATTRIBUTE $cf_directive
15355 if { (eval echo "$as_me:15355: \"$ac_compile\"") >&5
15356 (eval $ac_compile) 2>&5
15358 echo "$as_me:15358: \$? = $ac_status" >&5
15359 (exit "$ac_status"); }; then
15360 test -n "$verbose" && echo "$as_me:15360: result: ... $cf_attribute" >&5
15361 echo "${ECHO_T}... $cf_attribute" >&6
15362 cat conftest.h >>confdefs.h
15363 case "$cf_attribute" in
15366 cat >>confdefs.h <<EOF
15367 #define GCC_NORETURN $cf_directive
15372 cf_value='/* nothing */'
15373 if test "$cf_printf_attribute" != no ; then
15374 cf_value='__attribute__((format(printf,fmt,var)))'
15376 cat >>confdefs.h <<\EOF
15377 #define GCC_PRINTF 1
15382 cat >>confdefs.h <<EOF
15383 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15388 cf_value='/* nothing */'
15389 if test "$cf_scanf_attribute" != no ; then
15390 cf_value='__attribute__((format(scanf,fmt,var)))'
15392 cat >>confdefs.h <<\EOF
15393 #define GCC_SCANF 1
15398 cat >>confdefs.h <<EOF
15399 #define GCC_SCANFLIKE(fmt,var) $cf_value
15405 cat >>confdefs.h <<EOF
15406 #define GCC_UNUSED $cf_directive
15414 ${FGREP-fgrep} define conftest.i >>confdefs.h
15421 if test "x$enable_warnings" = "xyes"; then
15423 ADAFLAGS="$ADAFLAGS -gnatg"
15427 ### use option --enable-assertions to turn on generation of assertion code
15428 echo "$as_me:15428: checking if you want to enable runtime assertions" >&5
15429 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15431 # Check whether --enable-assertions or --disable-assertions was given.
15432 if test "${enable_assertions+set}" = set; then
15433 enableval="$enable_assertions"
15434 with_assertions=$enableval
15438 echo "$as_me:15438: result: $with_assertions" >&5
15439 echo "${ECHO_T}$with_assertions" >&6
15442 if test "$with_assertions" = no
15444 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15447 ADAFLAGS="$ADAFLAGS -gnata"
15452 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15454 cat >>confdefs.h <<\EOF
15455 #define HAVE_NC_ALLOC_H 1
15458 ### use option --enable-expanded to generate certain macros as functions
15460 # Check whether --enable-expanded or --disable-expanded was given.
15461 if test "${enable_expanded+set}" = set; then
15462 enableval="$enable_expanded"
15463 test "$enableval" = yes &&
15464 cat >>confdefs.h <<\EOF
15465 #define NCURSES_EXPANDED 1
15470 ### use option --disable-macros to suppress macros in favor of functions
15472 # Check whether --enable-macros or --disable-macros was given.
15473 if test "${enable_macros+set}" = set; then
15474 enableval="$enable_macros"
15475 test "$enableval" = no &&
15476 cat >>confdefs.h <<\EOF
15477 #define NCURSES_NOMACROS 1
15482 # Normally we only add trace() to the debug-library. Allow this to be
15483 # extended to all models of the ncurses library:
15485 case "$CFLAGS $CPPFLAGS" in
15491 echo "$as_me:15491: checking whether to add trace feature to all models" >&5
15492 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15494 # Check whether --with-trace or --without-trace was given.
15495 if test "${with_trace+set}" = set; then
15496 withval="$with_trace"
15497 cf_with_trace=$withval
15499 cf_with_trace=$cf_all_traces
15501 echo "$as_me:15501: result: $cf_with_trace" >&5
15502 echo "${ECHO_T}$cf_with_trace" >&6
15504 if test "$cf_with_trace" = yes ; then
15510 cf_new_extra_cppflags=
15512 for cf_add_cflags in -DTRACE
15514 case "$cf_fix_cppflags" in
15516 case "$cf_add_cflags" in
15517 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15518 case "$cf_add_cflags" in
15520 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15522 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15523 && test -z "${cf_tst_cflags}" \
15524 && cf_fix_cppflags=yes
15526 if test "$cf_fix_cppflags" = yes ; then
15528 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15529 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15532 elif test "${cf_tst_cflags}" = "\"'" ; then
15534 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15535 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15541 case "$CPPFLAGS" in
15545 case "$cf_add_cflags" in
15547 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15549 CPPFLAGS=`echo "$CPPFLAGS" | \
15550 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15551 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15556 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15557 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15564 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15565 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15572 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15573 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15575 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15577 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15578 && test -z "${cf_tst_cflags}" \
15579 && cf_fix_cppflags=no
15584 if test -n "$cf_new_cflags" ; then
15586 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15587 CFLAGS="${CFLAGS}$cf_new_cflags"
15591 if test -n "$cf_new_cppflags" ; then
15593 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15594 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15598 if test -n "$cf_new_extra_cppflags" ; then
15600 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15601 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15609 echo "$as_me:15609: checking if we want to use GNAT projects" >&5
15610 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15612 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15613 if test "${enable_gnat_projects+set}" = set; then
15614 enableval="$enable_gnat_projects"
15615 test "$enableval" != no && enableval=yes
15616 if test "$enableval" != "yes" ; then
15617 enable_gnat_projects=no
15619 enable_gnat_projects=yes
15623 enable_gnat_projects=yes
15626 echo "$as_me:15626: result: $enable_gnat_projects" >&5
15627 echo "${ECHO_T}$enable_gnat_projects" >&6
15629 ### Checks for libraries.
15630 case $cf_cv_system_name in
15634 echo "$as_me:15634: checking for gettimeofday" >&5
15635 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15636 if test "${ac_cv_func_gettimeofday+set}" = set; then
15637 echo $ECHO_N "(cached) $ECHO_C" >&6
15639 cat >"conftest.$ac_ext" <<_ACEOF
15640 #line 15640 "configure"
15641 #include "confdefs.h"
15642 #define gettimeofday autoconf_temporary
15643 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15644 #undef gettimeofday
15650 /* We use char because int might match the return type of a gcc2
15651 builtin and then its argument prototype would still apply. */
15652 char gettimeofday (void);
15658 /* The GNU C library defines stubs for functions which it implements
15659 to always fail with ENOSYS. Some functions are actually named
15660 something starting with __ and the normal name is an alias. */
15661 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15662 #error found stub for gettimeofday
15665 return gettimeofday ();
15670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15671 if { (eval echo "$as_me:15671: \"$ac_link\"") >&5
15672 (eval $ac_link) 2>&5
15674 echo "$as_me:15674: \$? = $ac_status" >&5
15675 (exit "$ac_status"); } &&
15676 { ac_try='test -s "conftest$ac_exeext"'
15677 { (eval echo "$as_me:15677: \"$ac_try\"") >&5
15678 (eval $ac_try) 2>&5
15680 echo "$as_me:15680: \$? = $ac_status" >&5
15681 (exit "$ac_status"); }; }; then
15682 ac_cv_func_gettimeofday=yes
15684 echo "$as_me: failed program was:" >&5
15685 cat "conftest.$ac_ext" >&5
15686 ac_cv_func_gettimeofday=no
15688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15690 echo "$as_me:15690: result: $ac_cv_func_gettimeofday" >&5
15691 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15692 if test "$ac_cv_func_gettimeofday" = yes; then
15693 cat >>confdefs.h <<\EOF
15694 #define HAVE_GETTIMEOFDAY 1
15699 echo "$as_me:15699: checking for gettimeofday in -lbsd" >&5
15700 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15701 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15702 echo $ECHO_N "(cached) $ECHO_C" >&6
15704 ac_check_lib_save_LIBS=$LIBS
15706 cat >"conftest.$ac_ext" <<_ACEOF
15707 #line 15707 "configure"
15708 #include "confdefs.h"
15710 /* Override any gcc2 internal prototype to avoid an error. */
15714 /* We use char because int might match the return type of a gcc2
15715 builtin and then its argument prototype would still apply. */
15716 char gettimeofday ();
15725 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15726 if { (eval echo "$as_me:15726: \"$ac_link\"") >&5
15727 (eval $ac_link) 2>&5
15729 echo "$as_me:15729: \$? = $ac_status" >&5
15730 (exit "$ac_status"); } &&
15731 { ac_try='test -s "conftest$ac_exeext"'
15732 { (eval echo "$as_me:15732: \"$ac_try\"") >&5
15733 (eval $ac_try) 2>&5
15735 echo "$as_me:15735: \$? = $ac_status" >&5
15736 (exit "$ac_status"); }; }; then
15737 ac_cv_lib_bsd_gettimeofday=yes
15739 echo "$as_me: failed program was:" >&5
15740 cat "conftest.$ac_ext" >&5
15741 ac_cv_lib_bsd_gettimeofday=no
15743 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15744 LIBS=$ac_check_lib_save_LIBS
15746 echo "$as_me:15746: result: $ac_cv_lib_bsd_gettimeofday" >&5
15747 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15748 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
15750 cat >>confdefs.h <<\EOF
15751 #define HAVE_GETTIMEOFDAY 1
15761 ### Checks for header files.
15762 echo "$as_me:15762: checking for ANSI C header files" >&5
15763 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15764 if test "${ac_cv_header_stdc+set}" = set; then
15765 echo $ECHO_N "(cached) $ECHO_C" >&6
15767 cat >"conftest.$ac_ext" <<_ACEOF
15768 #line 15768 "configure"
15769 #include "confdefs.h"
15770 #include <stdlib.h>
15771 #include <stdarg.h>
15772 #include <string.h>
15776 if { (eval echo "$as_me:15776: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15777 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15779 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15781 cat conftest.err >&5
15782 echo "$as_me:15782: \$? = $ac_status" >&5
15783 (exit "$ac_status"); } >/dev/null; then
15784 if test -s conftest.err; then
15785 ac_cpp_err=$ac_c_preproc_warn_flag
15792 if test -z "$ac_cpp_err"; then
15793 ac_cv_header_stdc=yes
15795 echo "$as_me: failed program was:" >&5
15796 cat "conftest.$ac_ext" >&5
15797 ac_cv_header_stdc=no
15799 rm -f conftest.err "conftest.$ac_ext"
15801 if test $ac_cv_header_stdc = yes; then
15802 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15803 cat >"conftest.$ac_ext" <<_ACEOF
15804 #line 15804 "configure"
15805 #include "confdefs.h"
15806 #include <string.h>
15809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15810 $EGREP "memchr" >/dev/null 2>&1; then
15813 ac_cv_header_stdc=no
15819 if test $ac_cv_header_stdc = yes; then
15820 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15821 cat >"conftest.$ac_ext" <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824 #include <stdlib.h>
15827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15828 $EGREP "free" >/dev/null 2>&1; then
15831 ac_cv_header_stdc=no
15837 if test $ac_cv_header_stdc = yes; then
15838 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15839 if test "$cross_compiling" = yes; then
15842 cat >"conftest.$ac_ext" <<_ACEOF
15843 #line 15843 "configure"
15844 #include "confdefs.h"
15846 #if ((' ' & 0x0FF) == 0x020)
15847 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15848 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15850 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15851 || ('j' <= (c) && (c) <= 'r') \
15852 || ('s' <= (c) && (c) <= 'z'))
15853 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15856 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15861 for (i = 0; i < 256; i++)
15862 if (XOR (islower (i), ISLOWER (i))
15863 || toupper (i) != TOUPPER (i))
15864 $ac_main_return(2);
15865 $ac_main_return (0);
15868 rm -f "conftest$ac_exeext"
15869 if { (eval echo "$as_me:15869: \"$ac_link\"") >&5
15870 (eval $ac_link) 2>&5
15872 echo "$as_me:15872: \$? = $ac_status" >&5
15873 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15874 { (eval echo "$as_me:15874: \"$ac_try\"") >&5
15875 (eval $ac_try) 2>&5
15877 echo "$as_me:15877: \$? = $ac_status" >&5
15878 (exit "$ac_status"); }; }; then
15881 echo "$as_me: program exited with status $ac_status" >&5
15882 echo "$as_me: failed program was:" >&5
15883 cat "conftest.$ac_ext" >&5
15884 ac_cv_header_stdc=no
15886 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15890 echo "$as_me:15890: result: $ac_cv_header_stdc" >&5
15891 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15892 if test $ac_cv_header_stdc = yes; then
15894 cat >>confdefs.h <<\EOF
15895 #define STDC_HEADERS 1
15900 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15902 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15903 inttypes.h stdint.h unistd.h
15905 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15906 echo "$as_me:15906: checking for $ac_header" >&5
15907 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15908 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15909 echo $ECHO_N "(cached) $ECHO_C" >&6
15911 cat >"conftest.$ac_ext" <<_ACEOF
15912 #line 15912 "configure"
15913 #include "confdefs.h"
15914 $ac_includes_default
15915 #include <$ac_header>
15917 rm -f "conftest.$ac_objext"
15918 if { (eval echo "$as_me:15918: \"$ac_compile\"") >&5
15919 (eval $ac_compile) 2>&5
15921 echo "$as_me:15921: \$? = $ac_status" >&5
15922 (exit "$ac_status"); } &&
15923 { ac_try='test -s "conftest.$ac_objext"'
15924 { (eval echo "$as_me:15924: \"$ac_try\"") >&5
15925 (eval $ac_try) 2>&5
15927 echo "$as_me:15927: \$? = $ac_status" >&5
15928 (exit "$ac_status"); }; }; then
15929 eval "$as_ac_Header=yes"
15931 echo "$as_me: failed program was:" >&5
15932 cat "conftest.$ac_ext" >&5
15933 eval "$as_ac_Header=no"
15935 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15937 echo "$as_me:15937: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15938 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15939 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15940 cat >>confdefs.h <<EOF
15941 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15947 echo "$as_me:15947: checking for signed char" >&5
15948 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
15949 if test "${ac_cv_type_signed_char+set}" = set; then
15950 echo $ECHO_N "(cached) $ECHO_C" >&6
15952 cat >"conftest.$ac_ext" <<_ACEOF
15953 #line 15953 "configure"
15954 #include "confdefs.h"
15955 $ac_includes_default
15959 if ((signed char *) 0)
15961 if (sizeof (signed char))
15967 rm -f "conftest.$ac_objext"
15968 if { (eval echo "$as_me:15968: \"$ac_compile\"") >&5
15969 (eval $ac_compile) 2>&5
15971 echo "$as_me:15971: \$? = $ac_status" >&5
15972 (exit "$ac_status"); } &&
15973 { ac_try='test -s "conftest.$ac_objext"'
15974 { (eval echo "$as_me:15974: \"$ac_try\"") >&5
15975 (eval $ac_try) 2>&5
15977 echo "$as_me:15977: \$? = $ac_status" >&5
15978 (exit "$ac_status"); }; }; then
15979 ac_cv_type_signed_char=yes
15981 echo "$as_me: failed program was:" >&5
15982 cat "conftest.$ac_ext" >&5
15983 ac_cv_type_signed_char=no
15985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15987 echo "$as_me:15987: result: $ac_cv_type_signed_char" >&5
15988 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
15990 echo "$as_me:15990: checking size of signed char" >&5
15991 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
15992 if test "${ac_cv_sizeof_signed_char+set}" = set; then
15993 echo $ECHO_N "(cached) $ECHO_C" >&6
15995 if test "$ac_cv_type_signed_char" = yes; then
15996 if test "$cross_compiling" = yes; then
15997 # Depending upon the size, compute the lo and hi bounds.
15998 cat >"conftest.$ac_ext" <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001 $ac_includes_default
16005 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16010 rm -f "conftest.$ac_objext"
16011 if { (eval echo "$as_me:16011: \"$ac_compile\"") >&5
16012 (eval $ac_compile) 2>&5
16014 echo "$as_me:16014: \$? = $ac_status" >&5
16015 (exit "$ac_status"); } &&
16016 { ac_try='test -s "conftest.$ac_objext"'
16017 { (eval echo "$as_me:16017: \"$ac_try\"") >&5
16018 (eval $ac_try) 2>&5
16020 echo "$as_me:16020: \$? = $ac_status" >&5
16021 (exit "$ac_status"); }; }; then
16024 cat >"conftest.$ac_ext" <<_ACEOF
16025 #line 16025 "configure"
16026 #include "confdefs.h"
16027 $ac_includes_default
16031 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16036 rm -f "conftest.$ac_objext"
16037 if { (eval echo "$as_me:16037: \"$ac_compile\"") >&5
16038 (eval $ac_compile) 2>&5
16040 echo "$as_me:16040: \$? = $ac_status" >&5
16041 (exit "$ac_status"); } &&
16042 { ac_try='test -s "conftest.$ac_objext"'
16043 { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044 (eval $ac_try) 2>&5
16046 echo "$as_me:16046: \$? = $ac_status" >&5
16047 (exit "$ac_status"); }; }; then
16048 ac_hi=$ac_mid; break
16050 echo "$as_me: failed program was:" >&5
16051 cat "conftest.$ac_ext" >&5
16052 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16054 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16057 echo "$as_me: failed program was:" >&5
16058 cat "conftest.$ac_ext" >&5
16061 cat >"conftest.$ac_ext" <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16064 $ac_includes_default
16068 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16073 rm -f "conftest.$ac_objext"
16074 if { (eval echo "$as_me:16074: \"$ac_compile\"") >&5
16075 (eval $ac_compile) 2>&5
16077 echo "$as_me:16077: \$? = $ac_status" >&5
16078 (exit "$ac_status"); } &&
16079 { ac_try='test -s "conftest.$ac_objext"'
16080 { (eval echo "$as_me:16080: \"$ac_try\"") >&5
16081 (eval $ac_try) 2>&5
16083 echo "$as_me:16083: \$? = $ac_status" >&5
16084 (exit "$ac_status"); }; }; then
16085 ac_lo=$ac_mid; break
16087 echo "$as_me: failed program was:" >&5
16088 cat "conftest.$ac_ext" >&5
16089 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16095 # Binary search between lo and hi bounds.
16096 while test "x$ac_lo" != "x$ac_hi"; do
16097 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16098 cat >"conftest.$ac_ext" <<_ACEOF
16099 #line 16099 "configure"
16100 #include "confdefs.h"
16101 $ac_includes_default
16105 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16110 rm -f "conftest.$ac_objext"
16111 if { (eval echo "$as_me:16111: \"$ac_compile\"") >&5
16112 (eval $ac_compile) 2>&5
16114 echo "$as_me:16114: \$? = $ac_status" >&5
16115 (exit "$ac_status"); } &&
16116 { ac_try='test -s "conftest.$ac_objext"'
16117 { (eval echo "$as_me:16117: \"$ac_try\"") >&5
16118 (eval $ac_try) 2>&5
16120 echo "$as_me:16120: \$? = $ac_status" >&5
16121 (exit "$ac_status"); }; }; then
16124 echo "$as_me: failed program was:" >&5
16125 cat "conftest.$ac_ext" >&5
16126 ac_lo=`expr "$ac_mid" + 1`
16128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16130 ac_cv_sizeof_signed_char=$ac_lo
16132 if test "$cross_compiling" = yes; then
16133 { { echo "$as_me:16133: error: cannot run test program while cross compiling" >&5
16134 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16135 { (exit 1); exit 1; }; }
16137 cat >"conftest.$ac_ext" <<_ACEOF
16138 #line 16138 "configure"
16139 #include "confdefs.h"
16140 $ac_includes_default
16144 FILE *f = fopen ("conftest.val", "w");
16146 $ac_main_return (1);
16147 fprintf (f, "%ld", (long)(sizeof (signed char)));
16153 rm -f "conftest$ac_exeext"
16154 if { (eval echo "$as_me:16154: \"$ac_link\"") >&5
16155 (eval $ac_link) 2>&5
16157 echo "$as_me:16157: \$? = $ac_status" >&5
16158 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16159 { (eval echo "$as_me:16159: \"$ac_try\"") >&5
16160 (eval $ac_try) 2>&5
16162 echo "$as_me:16162: \$? = $ac_status" >&5
16163 (exit "$ac_status"); }; }; then
16164 ac_cv_sizeof_signed_char=`cat conftest.val`
16166 echo "$as_me: program exited with status $ac_status" >&5
16167 echo "$as_me: failed program was:" >&5
16168 cat "conftest.$ac_ext" >&5
16170 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16175 ac_cv_sizeof_signed_char=0
16178 echo "$as_me:16178: result: $ac_cv_sizeof_signed_char" >&5
16179 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16180 cat >>confdefs.h <<EOF
16181 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16184 echo "$as_me:16184: checking for ANSI C header files" >&5
16185 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16186 if test "${ac_cv_header_stdc+set}" = set; then
16187 echo $ECHO_N "(cached) $ECHO_C" >&6
16189 cat >"conftest.$ac_ext" <<_ACEOF
16190 #line 16190 "configure"
16191 #include "confdefs.h"
16192 #include <stdlib.h>
16193 #include <stdarg.h>
16194 #include <string.h>
16198 if { (eval echo "$as_me:16198: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16199 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16201 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16203 cat conftest.err >&5
16204 echo "$as_me:16204: \$? = $ac_status" >&5
16205 (exit "$ac_status"); } >/dev/null; then
16206 if test -s conftest.err; then
16207 ac_cpp_err=$ac_c_preproc_warn_flag
16214 if test -z "$ac_cpp_err"; then
16215 ac_cv_header_stdc=yes
16217 echo "$as_me: failed program was:" >&5
16218 cat "conftest.$ac_ext" >&5
16219 ac_cv_header_stdc=no
16221 rm -f conftest.err "conftest.$ac_ext"
16223 if test $ac_cv_header_stdc = yes; then
16224 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16225 cat >"conftest.$ac_ext" <<_ACEOF
16226 #line 16226 "configure"
16227 #include "confdefs.h"
16228 #include <string.h>
16231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16232 $EGREP "memchr" >/dev/null 2>&1; then
16235 ac_cv_header_stdc=no
16241 if test $ac_cv_header_stdc = yes; then
16242 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16243 cat >"conftest.$ac_ext" <<_ACEOF
16244 #line 16244 "configure"
16245 #include "confdefs.h"
16246 #include <stdlib.h>
16249 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16250 $EGREP "free" >/dev/null 2>&1; then
16253 ac_cv_header_stdc=no
16259 if test $ac_cv_header_stdc = yes; then
16260 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16261 if test "$cross_compiling" = yes; then
16264 cat >"conftest.$ac_ext" <<_ACEOF
16265 #line 16265 "configure"
16266 #include "confdefs.h"
16268 #if ((' ' & 0x0FF) == 0x020)
16269 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16270 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16272 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16273 || ('j' <= (c) && (c) <= 'r') \
16274 || ('s' <= (c) && (c) <= 'z'))
16275 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16278 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16283 for (i = 0; i < 256; i++)
16284 if (XOR (islower (i), ISLOWER (i))
16285 || toupper (i) != TOUPPER (i))
16286 $ac_main_return(2);
16287 $ac_main_return (0);
16290 rm -f "conftest$ac_exeext"
16291 if { (eval echo "$as_me:16291: \"$ac_link\"") >&5
16292 (eval $ac_link) 2>&5
16294 echo "$as_me:16294: \$? = $ac_status" >&5
16295 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16296 { (eval echo "$as_me:16296: \"$ac_try\"") >&5
16297 (eval $ac_try) 2>&5
16299 echo "$as_me:16299: \$? = $ac_status" >&5
16300 (exit "$ac_status"); }; }; then
16303 echo "$as_me: program exited with status $ac_status" >&5
16304 echo "$as_me: failed program was:" >&5
16305 cat "conftest.$ac_ext" >&5
16306 ac_cv_header_stdc=no
16308 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16312 echo "$as_me:16312: result: $ac_cv_header_stdc" >&5
16313 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16314 if test $ac_cv_header_stdc = yes; then
16316 cat >>confdefs.h <<\EOF
16317 #define STDC_HEADERS 1
16322 ac_header_dirent=no
16323 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16324 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16325 echo "$as_me:16325: checking for $ac_hdr that defines DIR" >&5
16326 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16328 echo $ECHO_N "(cached) $ECHO_C" >&6
16330 cat >"conftest.$ac_ext" <<_ACEOF
16331 #line 16331 "configure"
16332 #include "confdefs.h"
16333 #include <sys/types.h>
16345 rm -f "conftest.$ac_objext"
16346 if { (eval echo "$as_me:16346: \"$ac_compile\"") >&5
16347 (eval $ac_compile) 2>&5
16349 echo "$as_me:16349: \$? = $ac_status" >&5
16350 (exit "$ac_status"); } &&
16351 { ac_try='test -s "conftest.$ac_objext"'
16352 { (eval echo "$as_me:16352: \"$ac_try\"") >&5
16353 (eval $ac_try) 2>&5
16355 echo "$as_me:16355: \$? = $ac_status" >&5
16356 (exit "$ac_status"); }; }; then
16357 eval "$as_ac_Header=yes"
16359 echo "$as_me: failed program was:" >&5
16360 cat "conftest.$ac_ext" >&5
16361 eval "$as_ac_Header=no"
16363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16365 echo "$as_me:16365: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16366 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16367 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16368 cat >>confdefs.h <<EOF
16369 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16372 ac_header_dirent=$ac_hdr; break
16376 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16377 if test $ac_header_dirent = dirent.h; then
16378 echo "$as_me:16378: checking for opendir in -ldir" >&5
16379 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16380 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16381 echo $ECHO_N "(cached) $ECHO_C" >&6
16383 ac_check_lib_save_LIBS=$LIBS
16385 cat >"conftest.$ac_ext" <<_ACEOF
16386 #line 16386 "configure"
16387 #include "confdefs.h"
16389 /* Override any gcc2 internal prototype to avoid an error. */
16393 /* We use char because int might match the return type of a gcc2
16394 builtin and then its argument prototype would still apply. */
16404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16405 if { (eval echo "$as_me:16405: \"$ac_link\"") >&5
16406 (eval $ac_link) 2>&5
16408 echo "$as_me:16408: \$? = $ac_status" >&5
16409 (exit "$ac_status"); } &&
16410 { ac_try='test -s "conftest$ac_exeext"'
16411 { (eval echo "$as_me:16411: \"$ac_try\"") >&5
16412 (eval $ac_try) 2>&5
16414 echo "$as_me:16414: \$? = $ac_status" >&5
16415 (exit "$ac_status"); }; }; then
16416 ac_cv_lib_dir_opendir=yes
16418 echo "$as_me: failed program was:" >&5
16419 cat "conftest.$ac_ext" >&5
16420 ac_cv_lib_dir_opendir=no
16422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16423 LIBS=$ac_check_lib_save_LIBS
16425 echo "$as_me:16425: result: $ac_cv_lib_dir_opendir" >&5
16426 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16427 if test "$ac_cv_lib_dir_opendir" = yes; then
16432 echo "$as_me:16432: checking for opendir in -lx" >&5
16433 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16434 if test "${ac_cv_lib_x_opendir+set}" = set; then
16435 echo $ECHO_N "(cached) $ECHO_C" >&6
16437 ac_check_lib_save_LIBS=$LIBS
16439 cat >"conftest.$ac_ext" <<_ACEOF
16440 #line 16440 "configure"
16441 #include "confdefs.h"
16443 /* Override any gcc2 internal prototype to avoid an error. */
16447 /* We use char because int might match the return type of a gcc2
16448 builtin and then its argument prototype would still apply. */
16458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16459 if { (eval echo "$as_me:16459: \"$ac_link\"") >&5
16460 (eval $ac_link) 2>&5
16462 echo "$as_me:16462: \$? = $ac_status" >&5
16463 (exit "$ac_status"); } &&
16464 { ac_try='test -s "conftest$ac_exeext"'
16465 { (eval echo "$as_me:16465: \"$ac_try\"") >&5
16466 (eval $ac_try) 2>&5
16468 echo "$as_me:16468: \$? = $ac_status" >&5
16469 (exit "$ac_status"); }; }; then
16470 ac_cv_lib_x_opendir=yes
16472 echo "$as_me: failed program was:" >&5
16473 cat "conftest.$ac_ext" >&5
16474 ac_cv_lib_x_opendir=no
16476 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16477 LIBS=$ac_check_lib_save_LIBS
16479 echo "$as_me:16479: result: $ac_cv_lib_x_opendir" >&5
16480 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16481 if test "$ac_cv_lib_x_opendir" = yes; then
16487 echo "$as_me:16487: checking whether time.h and sys/time.h may both be included" >&5
16488 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16489 if test "${ac_cv_header_time+set}" = set; then
16490 echo $ECHO_N "(cached) $ECHO_C" >&6
16492 cat >"conftest.$ac_ext" <<_ACEOF
16493 #line 16493 "configure"
16494 #include "confdefs.h"
16495 #include <sys/types.h>
16496 #include <sys/time.h>
16502 if ((struct tm *) 0)
16508 rm -f "conftest.$ac_objext"
16509 if { (eval echo "$as_me:16509: \"$ac_compile\"") >&5
16510 (eval $ac_compile) 2>&5
16512 echo "$as_me:16512: \$? = $ac_status" >&5
16513 (exit "$ac_status"); } &&
16514 { ac_try='test -s "conftest.$ac_objext"'
16515 { (eval echo "$as_me:16515: \"$ac_try\"") >&5
16516 (eval $ac_try) 2>&5
16518 echo "$as_me:16518: \$? = $ac_status" >&5
16519 (exit "$ac_status"); }; }; then
16520 ac_cv_header_time=yes
16522 echo "$as_me: failed program was:" >&5
16523 cat "conftest.$ac_ext" >&5
16524 ac_cv_header_time=no
16526 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16528 echo "$as_me:16528: result: $ac_cv_header_time" >&5
16529 echo "${ECHO_T}$ac_cv_header_time" >&6
16530 if test $ac_cv_header_time = yes; then
16532 cat >>confdefs.h <<\EOF
16533 #define TIME_WITH_SYS_TIME 1
16538 ### checks for compiler characteristics
16540 ac_cpp='$CPP $CPPFLAGS'
16541 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16542 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16543 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16544 ac_main_return="return"
16546 echo "$as_me:16546: checking for an ANSI C-conforming const" >&5
16547 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16548 if test "${ac_cv_c_const+set}" = set; then
16549 echo $ECHO_N "(cached) $ECHO_C" >&6
16551 cat >"conftest.$ac_ext" <<_ACEOF
16552 #line 16552 "configure"
16553 #include "confdefs.h"
16558 /* FIXME: Include the comments suggested by Paul. */
16559 #ifndef __cplusplus
16560 /* Ultrix mips cc rejects this. */
16561 typedef int charset[2];
16563 /* SunOS 4.1.1 cc rejects this. */
16564 char const *const *ccp;
16566 /* NEC SVR4.0.2 mips cc rejects this. */
16567 struct point {int x, y;};
16568 static struct point const zero = {0,0};
16569 /* AIX XL C 1.02.0.0 rejects this.
16570 It does not let you subtract one const X* pointer from another in
16571 an arm of an if-expression whose if-part is not a constant
16573 const char *g = "string";
16574 ccp = &g + (g ? g-g : 0);
16575 /* HPUX 7.0 cc rejects these. */
16578 ccp = (char const *const *) p;
16579 { /* SCO 3.2v4 cc rejects this. */
16581 char const *s = 0 ? (char *) 0 : (char const *) 0;
16585 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16586 int x[] = {25, 17};
16587 const int *foo = &x[0];
16590 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16591 typedef const int *iptr;
16595 { /* AIX XL C 1.02.0.0 rejects this saying
16596 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16597 struct s { int j; const int *ap[3]; };
16598 struct s *b; b->j = 5;
16600 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16601 const int foo = 10;
16609 rm -f "conftest.$ac_objext"
16610 if { (eval echo "$as_me:16610: \"$ac_compile\"") >&5
16611 (eval $ac_compile) 2>&5
16613 echo "$as_me:16613: \$? = $ac_status" >&5
16614 (exit "$ac_status"); } &&
16615 { ac_try='test -s "conftest.$ac_objext"'
16616 { (eval echo "$as_me:16616: \"$ac_try\"") >&5
16617 (eval $ac_try) 2>&5
16619 echo "$as_me:16619: \$? = $ac_status" >&5
16620 (exit "$ac_status"); }; }; then
16623 echo "$as_me: failed program was:" >&5
16624 cat "conftest.$ac_ext" >&5
16627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16629 echo "$as_me:16629: result: $ac_cv_c_const" >&5
16630 echo "${ECHO_T}$ac_cv_c_const" >&6
16631 if test $ac_cv_c_const = no; then
16633 cat >>confdefs.h <<\EOF
16639 ### Checks for external-data
16641 echo "$as_me:16641: checking if data-only library module links" >&5
16642 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16643 if test "${cf_cv_link_dataonly+set}" = set; then
16644 echo $ECHO_N "(cached) $ECHO_C" >&6
16648 cat >conftest.$ac_ext <<EOF
16649 #line 16649 "configure"
16650 int testdata[3] = { 123, 456, 789 };
16652 if { (eval echo "$as_me:16652: \"$ac_compile\"") >&5
16653 (eval $ac_compile) 2>&5
16655 echo "$as_me:16655: \$? = $ac_status" >&5
16656 (exit "$ac_status"); } ; then
16657 mv conftest.o data.o && \
16658 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16660 rm -f conftest.$ac_ext data.o
16661 cat >conftest.$ac_ext <<EOF
16662 #line 16662 "configure"
16666 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16668 extern int testdata[3];
16669 return testdata[0] == 123
16670 && testdata[1] == 456
16671 && testdata[2] == 789;
16675 if { (eval echo "$as_me:16675: \"$ac_compile\"") >&5
16676 (eval $ac_compile) 2>&5
16678 echo "$as_me:16678: \$? = $ac_status" >&5
16679 (exit "$ac_status"); }; then
16680 mv conftest.o func.o && \
16681 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16683 rm -f conftest.$ac_ext func.o
16684 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16685 cf_saveLIBS="$LIBS"
16686 LIBS="conftest.a $LIBS"
16687 if test "$cross_compiling" = yes; then
16688 cf_cv_link_dataonly=unknown
16690 cat >"conftest.$ac_ext" <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16696 extern int testfunc();
16697 ${cf_cv_main_return:-return} (!testfunc());
16701 rm -f "conftest$ac_exeext"
16702 if { (eval echo "$as_me:16702: \"$ac_link\"") >&5
16703 (eval $ac_link) 2>&5
16705 echo "$as_me:16705: \$? = $ac_status" >&5
16706 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16707 { (eval echo "$as_me:16707: \"$ac_try\"") >&5
16708 (eval $ac_try) 2>&5
16710 echo "$as_me:16710: \$? = $ac_status" >&5
16711 (exit "$ac_status"); }; }; then
16712 cf_cv_link_dataonly=yes
16714 echo "$as_me: program exited with status $ac_status" >&5
16715 echo "$as_me: failed program was:" >&5
16716 cat "conftest.$ac_ext" >&5
16717 cf_cv_link_dataonly=no
16719 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16721 LIBS="$cf_saveLIBS"
16725 echo "$as_me:16725: result: $cf_cv_link_dataonly" >&5
16726 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16728 if test "$cf_cv_link_dataonly" = no ; then
16730 cat >>confdefs.h <<\EOF
16731 #define BROKEN_LINKER 1
16737 ### Checks for library functions.
16743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16744 echo "$as_me:16744: checking for $ac_header" >&5
16745 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16747 echo $ECHO_N "(cached) $ECHO_C" >&6
16749 cat >"conftest.$ac_ext" <<_ACEOF
16750 #line 16750 "configure"
16751 #include "confdefs.h"
16752 #include <$ac_header>
16754 if { (eval echo "$as_me:16754: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16755 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16757 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16759 cat conftest.err >&5
16760 echo "$as_me:16760: \$? = $ac_status" >&5
16761 (exit "$ac_status"); } >/dev/null; then
16762 if test -s conftest.err; then
16763 ac_cpp_err=$ac_c_preproc_warn_flag
16770 if test -z "$ac_cpp_err"; then
16771 eval "$as_ac_Header=yes"
16773 echo "$as_me: failed program was:" >&5
16774 cat "conftest.$ac_ext" >&5
16775 eval "$as_ac_Header=no"
16777 rm -f conftest.err "conftest.$ac_ext"
16779 echo "$as_me:16779: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16780 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16781 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16782 cat >>confdefs.h <<EOF
16783 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16789 echo "$as_me:16789: checking for working mkstemp" >&5
16790 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16791 if test "${cf_cv_func_mkstemp+set}" = set; then
16792 echo $ECHO_N "(cached) $ECHO_C" >&6
16796 if test "$cross_compiling" = yes; then
16797 cf_cv_func_mkstemp=maybe
16799 cat >"conftest.$ac_ext" <<_ACEOF
16800 #line 16800 "configure"
16801 #include "confdefs.h"
16803 #include <sys/types.h>
16804 #ifdef HAVE_UNISTD_H
16805 #include <unistd.h>
16807 #include <stdlib.h>
16809 #include <string.h>
16810 #include <sys/stat.h>
16813 char *tmpl = "conftestXXXXXX";
16821 for (n = 0; n < 2; ++n) {
16822 strcpy(name[n], tmpl);
16823 if ((fd = mkstemp(name[n])) >= 0) {
16824 if (!strcmp(name[n], tmpl)
16825 || stat(name[n], &sb) != 0
16826 || (sb.st_mode & S_IFMT) != S_IFREG
16827 || (sb.st_mode & 077) != 0) {
16834 && !strcmp(name[0], name[1]))
16836 ${cf_cv_main_return:-return}(result);
16840 rm -f "conftest$ac_exeext"
16841 if { (eval echo "$as_me:16841: \"$ac_link\"") >&5
16842 (eval $ac_link) 2>&5
16844 echo "$as_me:16844: \$? = $ac_status" >&5
16845 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16846 { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847 (eval $ac_try) 2>&5
16849 echo "$as_me:16849: \$? = $ac_status" >&5
16850 (exit "$ac_status"); }; }; then
16851 cf_cv_func_mkstemp=yes
16854 echo "$as_me: program exited with status $ac_status" >&5
16855 echo "$as_me: failed program was:" >&5
16856 cat "conftest.$ac_ext" >&5
16857 cf_cv_func_mkstemp=no
16860 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16864 echo "$as_me:16864: result: $cf_cv_func_mkstemp" >&5
16865 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16866 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16867 echo "$as_me:16867: checking for mkstemp" >&5
16868 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16869 if test "${ac_cv_func_mkstemp+set}" = set; then
16870 echo $ECHO_N "(cached) $ECHO_C" >&6
16872 cat >"conftest.$ac_ext" <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875 #define mkstemp autoconf_temporary
16876 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16883 /* We use char because int might match the return type of a gcc2
16884 builtin and then its argument prototype would still apply. */
16885 char mkstemp (void);
16891 /* The GNU C library defines stubs for functions which it implements
16892 to always fail with ENOSYS. Some functions are actually named
16893 something starting with __ and the normal name is an alias. */
16894 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16895 #error found stub for mkstemp
16903 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16904 if { (eval echo "$as_me:16904: \"$ac_link\"") >&5
16905 (eval $ac_link) 2>&5
16907 echo "$as_me:16907: \$? = $ac_status" >&5
16908 (exit "$ac_status"); } &&
16909 { ac_try='test -s "conftest$ac_exeext"'
16910 { (eval echo "$as_me:16910: \"$ac_try\"") >&5
16911 (eval $ac_try) 2>&5
16913 echo "$as_me:16913: \$? = $ac_status" >&5
16914 (exit "$ac_status"); }; }; then
16915 ac_cv_func_mkstemp=yes
16917 echo "$as_me: failed program was:" >&5
16918 cat "conftest.$ac_ext" >&5
16919 ac_cv_func_mkstemp=no
16921 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16923 echo "$as_me:16923: result: $ac_cv_func_mkstemp" >&5
16924 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16927 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16929 cat >>confdefs.h <<\EOF
16930 #define HAVE_MKSTEMP 1
16935 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16936 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
16937 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
16941 if test "$cf_with_ada" != "no" ; then
16943 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
16946 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16948 unset ac_cv_path_cf_TEMP_gnat
16950 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
16951 set dummy $cf_prog_gnat; ac_word=$2
16952 echo "$as_me:16952: checking for $ac_word" >&5
16953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16954 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
16955 echo $ECHO_N "(cached) $ECHO_C" >&6
16957 case $cf_TEMP_gnat in
16959 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
16962 ac_save_IFS=$IFS; IFS=$ac_path_separator
16964 for ac_dir in $ac_dummy; do
16966 test -z "$ac_dir" && ac_dir=.
16967 if $as_executable_p "$ac_dir/$ac_word"; then
16968 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
16969 echo "$as_me:16969: found $ac_dir/$ac_word" >&5
16974 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
16978 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
16980 if test -n "$cf_TEMP_gnat"; then
16981 echo "$as_me:16981: result: $cf_TEMP_gnat" >&5
16982 echo "${ECHO_T}$cf_TEMP_gnat" >&6
16984 echo "$as_me:16984: result: no" >&5
16985 echo "${ECHO_T}no" >&6
16988 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
16990 if test "x$cf_TEMP_gnat" != xno; then
16991 unset cf_cv_gnat_version
16994 echo "$as_me:16994: checking for $cf_prog_gnat version" >&5
16995 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
16996 if test "${cf_cv_gnat_version+set}" = set; then
16997 echo $ECHO_N "(cached) $ECHO_C" >&6
17000 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17001 grep '[0-9].[0-9][0-9]*' |\
17002 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17005 echo "$as_me:17005: result: $cf_cv_gnat_version" >&5
17006 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17007 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17008 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17011 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17014 unset cf_cv_gnat_version
17015 unset ac_cv_path_cf_TEMP_gnat
17018 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17020 cf_cv_prog_gnat_correct=no
17022 cf_ada_make=gnatmake
17023 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17024 # gprconfig is newer than gnatmake; we can continue...
17027 rm -rf ./conftest* ./*~conftest*
17028 if mkdir conftest.src
17032 for cf_gprconfig in Ada C
17034 echo "$as_me:17034: checking for gprconfig name for $cf_gprconfig" >&5
17035 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17036 if test "$cf_gprconfig" = C
17038 for cf_gprconfig_param in \
17039 "$cf_gprconfig,,,,GNATGCC" \
17040 "$cf_gprconfig,,,,GCC" \
17043 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17044 test -n "$cf_gprconfig_value" && break
17047 cf_gprconfig_param=$cf_gprconfig
17048 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17050 if test -n "$cf_gprconfig_value"
17052 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17053 echo "$as_me:17053: result: $cf_gprconfig_value" >&5
17054 echo "${ECHO_T}$cf_gprconfig_value" >&6
17056 echo "$as_me:17056: result: missing" >&5
17057 echo "${ECHO_T}missing" >&6
17063 rm -rf ./conftest* ./*~conftest*
17066 if test "x$cf_ada_config" != "x#"
17069 echo "$as_me:17069: checking for gnat version" >&5
17070 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17071 if test "${cf_cv_gnat_version+set}" = set; then
17072 echo $ECHO_N "(cached) $ECHO_C" >&6
17075 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17076 grep '[0-9].[0-9][0-9]*' |\
17077 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17080 echo "$as_me:17080: result: $cf_cv_gnat_version" >&5
17081 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17082 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17084 case "$cf_cv_gnat_version" in
17085 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17086 cf_cv_prog_gnat_correct=yes
17089 { echo "$as_me:17089: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17090 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17091 cf_cv_prog_gnat_correct=no
17095 # Extract the first word of "m4", so it can be a program name with args.
17096 set dummy m4; ac_word=$2
17097 echo "$as_me:17097: checking for $ac_word" >&5
17098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17099 if test "${ac_cv_prog_M4_exists+set}" = set; then
17100 echo $ECHO_N "(cached) $ECHO_C" >&6
17102 if test -n "$M4_exists"; then
17103 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17105 ac_save_IFS=$IFS; IFS=$ac_path_separator
17107 for ac_dir in $ac_dummy; do
17109 test -z "$ac_dir" && ac_dir=.
17110 $as_executable_p "$ac_dir/$ac_word" || continue
17111 ac_cv_prog_M4_exists="yes"
17112 echo "$as_me:17112: found $ac_dir/$ac_word" >&5
17116 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17119 M4_exists=$ac_cv_prog_M4_exists
17120 if test -n "$M4_exists"; then
17121 echo "$as_me:17121: result: $M4_exists" >&5
17122 echo "${ECHO_T}$M4_exists" >&6
17124 echo "$as_me:17124: result: no" >&5
17125 echo "${ECHO_T}no" >&6
17128 if test "$ac_cv_prog_M4_exists" = no; then
17129 cf_cv_prog_gnat_correct=no
17130 { echo "$as_me:17130: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17131 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17133 if test "$cf_cv_prog_gnat_correct" = yes; then
17134 echo "$as_me:17134: checking if GNAT works" >&5
17135 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17137 rm -rf ./conftest* ./*~conftest*
17138 cat >>conftest.ads <<CF_EOF
17139 procedure conftest;
17141 cat >>conftest.adb <<CF_EOF
17144 procedure conftest is
17146 Text_IO.Put ("Hello World");
17148 GNAT.OS_Lib.OS_Exit (0);
17151 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17152 if ( ./conftest 1>&5 2>&1 ) ; then
17153 cf_cv_prog_gnat_correct=yes
17155 cf_cv_prog_gnat_correct=no
17158 cf_cv_prog_gnat_correct=no
17160 rm -rf ./conftest* ./*~conftest*
17162 echo "$as_me:17162: result: $cf_cv_prog_gnat_correct" >&5
17163 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17166 cf_cv_prog_gnat_correct=no
17170 if test "$cf_cv_prog_gnat_correct" = yes; then
17172 echo "$as_me:17172: checking optimization options for ADAFLAGS" >&5
17173 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17177 ADAFLAGS="$ADAFLAGS -g"
17183 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17185 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17189 echo "$as_me:17189: result: $ADAFLAGS" >&5
17190 echo "${ECHO_T}$ADAFLAGS" >&6
17192 echo "$as_me:17192: checking if GNATPREP supports -T option" >&5
17193 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17194 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17195 echo $ECHO_N "(cached) $ECHO_C" >&6
17198 cf_cv_gnatprep_opt_t=no
17199 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17202 echo "$as_me:17202: result: $cf_cv_gnatprep_opt_t" >&5
17203 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17204 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17206 echo "$as_me:17206: checking if GNAT supports generics" >&5
17207 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17208 case "$cf_cv_gnat_version" in
17209 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17210 cf_gnat_generics=yes
17213 cf_gnat_generics=no
17216 echo "$as_me:17216: result: $cf_gnat_generics" >&5
17217 echo "${ECHO_T}$cf_gnat_generics" >&6
17219 if test "$cf_gnat_generics" = yes
17221 cf_compile_generics=generics
17222 cf_generic_objects="\${GENOBJS}"
17224 cf_compile_generics=
17225 cf_generic_objects=
17228 echo "$as_me:17228: checking if GNAT supports SIGINT" >&5
17229 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17230 if test "${cf_cv_gnat_sigint+set}" = set; then
17231 echo $ECHO_N "(cached) $ECHO_C" >&6
17234 rm -rf ./conftest* ./*~conftest*
17235 cat >>conftest.ads <<CF_EOF
17236 with Ada.Interrupts.Names;
17238 package ConfTest is
17240 pragma Warnings (Off); -- the next pragma exists since 3.11p
17241 pragma Unreserve_All_Interrupts;
17242 pragma Warnings (On);
17244 protected Process is
17246 function Continue return Boolean;
17247 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17249 Done : Boolean := False;
17254 cat >>conftest.adb <<CF_EOF
17255 package body ConfTest is
17256 protected body Process is
17261 function Continue return Boolean is
17268 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17269 cf_cv_gnat_sigint=yes
17271 cf_cv_gnat_sigint=no
17273 rm -rf ./conftest* ./*~conftest*
17276 echo "$as_me:17276: result: $cf_cv_gnat_sigint" >&5
17277 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17279 if test "$cf_cv_gnat_sigint" = yes ; then
17282 USE_GNAT_SIGINT="#"
17285 cf_gnat_libraries=no
17286 cf_gnat_projects=no
17288 if test "$enable_gnat_projects" != no ; then
17289 echo "$as_me:17289: checking if GNAT supports project files" >&5
17290 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17291 case "$cf_cv_gnat_version" in
17295 case "$cf_cv_system_name" in
17299 rm -rf ./conftest* ./*~conftest*
17300 if mkdir conftest.src conftest.bin conftest.lib
17303 rm -rf ./conftest* ./*~conftest*
17304 cat >>library.gpr <<CF_EOF
17306 Kind := External ("LIB_KIND");
17307 for Library_Name use "ConfTest";
17308 for Object_Dir use ".";
17309 for Library_ALI_Dir use External("LIBRARY_DIR");
17310 for Library_Version use External ("SONAME");
17311 for Library_Kind use Kind;
17312 for Library_Dir use External("BUILD_DIR");
17313 Source_Dir := External ("SOURCE_DIR");
17314 for Source_Dirs use (Source_Dir);
17317 cat >>confpackage.ads <<CF_EOF
17318 package ConfPackage is
17319 procedure conftest;
17322 cat >>confpackage.adb <<CF_EOF
17324 package body ConfPackage is
17325 procedure conftest is
17327 Text_IO.Put ("Hello World");
17332 if ( "$cf_ada_make" $ADAFLAGS \
17334 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17335 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17336 -XSOURCE_DIR="`pwd`" \
17337 -XSONAME=libConfTest.so.1 \
17338 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17339 cf_gnat_projects=yes
17343 if test -f conftest.lib/confpackage.ali
17345 cf_gnat_libraries=yes
17347 rm -rf ./conftest* ./*~conftest*
17352 echo "$as_me:17352: result: $cf_gnat_projects" >&5
17353 echo "${ECHO_T}$cf_gnat_projects" >&6
17354 fi # enable_gnat_projects
17356 if test "$cf_gnat_projects" = yes
17358 echo "$as_me:17358: checking if GNAT supports libraries" >&5
17359 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17360 echo "$as_me:17360: result: $cf_gnat_libraries" >&5
17361 echo "${ECHO_T}$cf_gnat_libraries" >&6
17364 USE_OLD_MAKERULES=""
17365 USE_GNAT_PROJECTS="#"
17366 USE_GNAT_MAKE_GPR="#"
17367 USE_GNAT_GPRBUILD="#"
17369 if test "$cf_gnat_projects" = yes
17371 USE_OLD_MAKERULES="#"
17372 USE_GNAT_PROJECTS=""
17373 if test "$cf_cv_VERSION_GPRBUILD" != no
17375 USE_GNAT_GPRBUILD=""
17376 elif test "$cf_cv_VERSION_GNATMAKE" != no
17378 USE_GNAT_MAKE_GPR=""
17380 { echo "$as_me:17380: WARNING: use old makefile rules since tools are missing" >&5
17381 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17385 if test "$cf_gnat_libraries" = yes
17387 USE_GNAT_LIBRARIES=""
17389 USE_GNAT_LIBRARIES="#"
17392 echo "$as_me:17392: checking for ada-compiler" >&5
17393 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17395 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17396 if test "${with_ada_compiler+set}" = set; then
17397 withval="$with_ada_compiler"
17398 cf_ada_compiler=$withval
17400 cf_ada_compiler=gnatmake
17403 echo "$as_me:17403: result: $cf_ada_compiler" >&5
17404 echo "${ECHO_T}$cf_ada_compiler" >&6
17406 cf_ada_package=terminal_interface
17408 echo "$as_me:17408: checking for ada-include" >&5
17409 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17411 # Check whether --with-ada-include or --without-ada-include was given.
17412 if test "${with_ada_include+set}" = set; then
17413 withval="$with_ada_include"
17416 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17417 fi; if test -n "$prefix/share/ada/adainclude" ; then
17419 if test "x$prefix" != xNONE; then
17420 cf_path_syntax="$prefix"
17422 cf_path_syntax="$ac_default_prefix"
17425 case ".$withval" in
17426 (.\$\(*\)*|.\'*\'*)
17430 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17432 (.\$\{*prefix\}*|.\$\{*dir\}*)
17433 eval withval="$withval"
17434 case ".$withval" in
17436 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17441 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17444 { { echo "$as_me:17444: error: expected a pathname, not \"$withval\"" >&5
17445 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17446 { (exit 1); exit 1; }; }
17451 eval ADA_INCLUDE="$withval"
17453 echo "$as_me:17453: result: $ADA_INCLUDE" >&5
17454 echo "${ECHO_T}$ADA_INCLUDE" >&6
17456 echo "$as_me:17456: checking for ada-objects" >&5
17457 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17459 # Check whether --with-ada-objects or --without-ada-objects was given.
17460 if test "${with_ada_objects+set}" = set; then
17461 withval="$with_ada_objects"
17464 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17465 fi; if test -n "$prefix/lib/ada/adalib" ; then
17467 if test "x$prefix" != xNONE; then
17468 cf_path_syntax="$prefix"
17470 cf_path_syntax="$ac_default_prefix"
17473 case ".$withval" in
17474 (.\$\(*\)*|.\'*\'*)
17478 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17480 (.\$\{*prefix\}*|.\$\{*dir\}*)
17481 eval withval="$withval"
17482 case ".$withval" in
17484 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17489 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17492 { { echo "$as_me:17492: error: expected a pathname, not \"$withval\"" >&5
17493 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17494 { (exit 1); exit 1; }; }
17499 eval ADA_OBJECTS="$withval"
17501 echo "$as_me:17501: result: $ADA_OBJECTS" >&5
17502 echo "${ECHO_T}$ADA_OBJECTS" >&6
17504 echo "$as_me:17504: checking if an Ada95 shared-library should be built" >&5
17505 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17507 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17508 if test "${with_ada_sharedlib+set}" = set; then
17509 withval="$with_ada_sharedlib"
17510 with_ada_sharedlib=$withval
17512 with_ada_sharedlib=no
17514 echo "$as_me:17514: result: $with_ada_sharedlib" >&5
17515 echo "${ECHO_T}$with_ada_sharedlib" >&6
17517 if test "x$with_ada_sharedlib" != xno
17519 if test "x$cf_gnat_projects" != xyes
17521 { echo "$as_me:17521: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17522 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17523 with_ada_sharedlib=no
17527 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17528 MAKE_ADA_SHAREDLIB="#"
17530 if test "x$with_ada_sharedlib" != xno
17532 MAKE_ADA_SHAREDLIB=
17533 if test "x$with_ada_sharedlib" != xyes
17535 ADA_SHAREDLIB="$with_ada_sharedlib"
17539 # allow the Ada binding to be renamed
17541 echo "$as_me:17541: checking for ada-libname" >&5
17542 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17544 # Check whether --with-ada-libname or --without-ada-libname was given.
17545 if test "${with_ada_libname+set}" = set; then
17546 withval="$with_ada_libname"
17547 ADA_LIBNAME=$withval
17549 ADA_LIBNAME=AdaCurses
17551 case "x$ADA_LIBNAME" in
17553 ADA_LIBNAME=AdaCurses
17557 echo "$as_me:17557: result: $ADA_LIBNAME" >&5
17558 echo "${ECHO_T}$ADA_LIBNAME" >&6
17561 { { echo "$as_me:17561: error: No usable Ada compiler found" >&5
17562 echo "$as_me: error: No usable Ada compiler found" >&2;}
17563 { (exit 1); exit 1; }; }
17566 { { echo "$as_me:17566: error: The Ada compiler is needed for this package" >&5
17567 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17568 { (exit 1); exit 1; }; }
17571 ################################################################################
17578 ### Construct the list of include-directories to be generated
17580 if test "$srcdir" != "."; then
17581 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17583 CPPFLAGS="-I../include $CPPFLAGS"
17584 if test "$srcdir" != "."; then
17585 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17587 CPPFLAGS="-I. $CPPFLAGS"
17589 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17590 if test "$srcdir" != "."; then
17591 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17593 if test "$GCC" != yes; then
17594 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17595 elif test "$includedir" != "/usr/include"; then
17596 if test "$includedir" = '${prefix}/include' ; then
17597 if test x$prefix != x/usr ; then
17598 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17601 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17605 ### Build up pieces for makefile rules
17606 echo "$as_me:17606: checking default library suffix" >&5
17607 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17609 case $DFT_LWR_MODEL in
17610 (libtool) DFT_ARG_SUFFIX='' ;;
17611 (normal) DFT_ARG_SUFFIX='' ;;
17612 (debug) DFT_ARG_SUFFIX='_g' ;;
17613 (profile) DFT_ARG_SUFFIX='_p' ;;
17614 (shared) DFT_ARG_SUFFIX='' ;;
17616 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17617 echo "$as_me:17617: result: $DFT_ARG_SUFFIX" >&5
17618 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17620 echo "$as_me:17620: checking default library-dependency suffix" >&5
17621 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17623 case X$DFT_LWR_MODEL in
17625 DFT_LIB_SUFFIX='.la'
17626 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17629 case "$cf_cv_system_name" in
17631 DFT_LIB_SUFFIX='_g.lib'
17634 DFT_LIB_SUFFIX='_g.a'
17637 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17640 case "$cf_cv_system_name" in
17642 DFT_LIB_SUFFIX='_p.lib'
17645 DFT_LIB_SUFFIX='_p.a'
17648 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17651 case "$cf_cv_system_name" in
17653 DFT_LIB_SUFFIX='.so'
17654 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17657 DFT_LIB_SUFFIX='.dll'
17658 DFT_DEP_SUFFIX='.dll.lib'
17660 (cygwin*|msys*|mingw*)
17661 DFT_LIB_SUFFIX='.dll'
17662 DFT_DEP_SUFFIX='.dll.a'
17665 DFT_LIB_SUFFIX='.dylib'
17666 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17671 DFT_LIB_SUFFIX='.so'
17672 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17675 DFT_LIB_SUFFIX='.sl'
17676 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17681 DFT_LIB_SUFFIX='.so'
17682 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17689 DFT_LIB_SUFFIX='.lib'
17692 DFT_LIB_SUFFIX='.a'
17695 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17698 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17700 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17701 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17703 echo "$as_me:17703: result: $DFT_DEP_SUFFIX" >&5
17704 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17706 echo "$as_me:17706: checking default object directory" >&5
17707 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17709 case $DFT_LWR_MODEL in
17710 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17711 (normal) DFT_OBJ_SUBDIR='objects' ;;
17712 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17713 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17715 case "$cf_cv_system_name" in
17717 DFT_OBJ_SUBDIR='objects' ;;
17719 DFT_OBJ_SUBDIR='obj_s' ;;
17722 echo "$as_me:17722: result: $DFT_OBJ_SUBDIR" >&5
17723 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17725 ### Set up low-level terminfo dependencies for makefiles.
17727 if test "$DFT_LWR_MODEL" = shared ; then
17728 case $cf_cv_system_name in
17730 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17733 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17738 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17740 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17742 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17744 ### Construct the list of subdirectories for which we'll customize makefiles
17745 ### with the appropriate compile-rules.
17747 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17749 cat >>confdefs.h <<EOF
17750 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17753 ################################################################################
17759 NCURSES_SHLIB2="sh -c"
17761 ADA_SUBDIRS="include gen src doc"
17762 if test "x$cf_with_tests" != "xno" ; then
17763 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17765 for cf_dir in $ADA_SUBDIRS
17767 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17774 # match layout used by make-tar.sh
17775 ADAHTML_DIR=../doc/ada
17777 if test "x$cross_compiling" = xyes ; then
17778 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17780 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17783 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"
17784 ac_config_commands="$ac_config_commands default"
17785 cat >confcache <<\_ACEOF
17786 # This file is a shell script that caches the results of configure
17787 # tests run on this system so they can be shared between configure
17788 # scripts and configure runs, see configure's option --config-cache.
17789 # It is not useful on other systems. If it contains results you don't
17790 # want to keep, you may remove or edit it.
17792 # config.status only pays attention to the cache file if you give it
17793 # the --recheck option to rerun configure.
17795 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17796 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17797 # following values.
17801 # The following way of writing the cache mishandles newlines in values,
17802 # but we know of no workaround that is simple, portable, and efficient.
17803 # So, don't put newlines in cache variables' values.
17804 # Ultrix sh set writes to stderr and can't be redirected directly,
17805 # and sets the high bit in the cache file unless we assign to the vars.
17808 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17810 # `set' does not quote correctly, so add quotes (double-quote
17811 # substitution turns \\\\ into \\, and sed turns \\ into \).
17814 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17817 # `set' quotes correctly as required by POSIX, so do not add quotes.
17819 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17826 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17828 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17830 if cmp -s $cache_file confcache; then :; else
17831 if test -w $cache_file; then
17832 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17833 cat confcache >$cache_file
17835 echo "not updating unwritable cache $cache_file"
17840 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17841 # Let make expand exec_prefix.
17842 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17844 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17845 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17846 # trailing colons and then remove the whole line if VPATH becomes empty
17847 # (actually we leave an empty line to preserve line numbers).
17848 if test "x$srcdir" = x.; then
17849 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17850 s/:*\$(srcdir):*/:/;
17851 s/:*\${srcdir}:*/:/;
17853 s/^\([^=]*=[ ]*\):*/\1/;
17859 DEFS=-DHAVE_CONFIG_H
17861 : "${CONFIG_STATUS=./config.status}"
17862 ac_clean_files_save=$ac_clean_files
17863 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17864 { echo "$as_me:17864: creating $CONFIG_STATUS" >&5
17865 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17866 cat >"$CONFIG_STATUS" <<_ACEOF
17868 # Generated automatically by configure.
17869 # Run this file to recreate the current configuration.
17870 # Compiler output produced by configure, useful for debugging
17871 # configure, is in config.log if it exists.
17874 SHELL=\${CONFIG_SHELL-$SHELL}
17875 ac_cs_invocation="\$0 \$@"
17877 CLICOLOR_FORCE= GREP_OPTIONS=
17878 unset CLICOLOR_FORCE GREP_OPTIONS
17881 cat >>"$CONFIG_STATUS" <<\_ACEOF
17882 # Be Bourne compatible
17883 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17886 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17890 # Name of the executable.
17891 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17893 if expr a : '\(a\)' >/dev/null 2>&1; then
17899 rm -f conf$$ conf$$.exe conf$$.file
17901 if ln -s conf$$.file conf$$ 2>/dev/null; then
17902 # We could just check for DJGPP; but this test a) works b) is more generic
17903 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17904 if test -f conf$$.exe; then
17905 # Don't use ln at all; we don't have any links
17910 elif ln conf$$.file conf$$ 2>/dev/null; then
17915 rm -f conf$$ conf$$.exe conf$$.file
17917 as_executable_p="test -f"
17919 # Support unset when possible.
17920 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17927 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17928 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17929 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17930 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17931 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17932 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17933 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17934 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17937 # We need space, tab and new line, in precisely that order.
17943 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17949 # Files that config.status was made for.
17950 if test -n "$ac_config_files"; then
17951 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
17954 if test -n "$ac_config_headers"; then
17955 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
17958 if test -n "$ac_config_links"; then
17959 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
17962 if test -n "$ac_config_commands"; then
17963 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
17966 cat >>"$CONFIG_STATUS" <<\EOF
17969 \`$as_me' instantiates files from templates according to the
17970 current configuration.
17972 Usage: $0 [OPTIONS] [FILE]...
17974 -h, --help print this help, then exit
17975 -V, --version print version number, then exit
17976 -d, --debug don't remove temporary files
17977 --recheck update $as_me by reconfiguring in the same conditions
17978 --file=FILE[:TEMPLATE]
17979 instantiate the configuration file FILE
17980 --header=FILE[:TEMPLATE]
17981 instantiate the configuration header FILE
17983 Configuration files:
17986 Configuration headers:
17989 Configuration commands:
17992 Report bugs to <dickey@invisible-island.net>."
17995 cat >>"$CONFIG_STATUS" <<EOF
17998 configured by $0, generated by GNU Autoconf 2.52.20210509,
17999 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18001 Copyright 2003-2020,2021 Thomas E. Dickey
18002 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18003 Free Software Foundation, Inc.
18004 This config.status script is free software; the Free Software Foundation
18005 gives unlimited permission to copy, distribute and modify it."
18010 cat >>"$CONFIG_STATUS" <<\EOF
18011 # If no file are specified by the user, then we need to provide default
18012 # value. By we need to know if files were specified by the user.
18018 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18019 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18021 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18025 *) # This is not an option, so the user has probably given explicit
18027 ac_need_defaults=false;;
18031 # Handling of the options.
18033 cat >>"$CONFIG_STATUS" <<EOF
18034 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18035 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18036 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18038 cat >>"$CONFIG_STATUS" <<\EOF
18039 --version | --vers* | -V )
18040 echo "$ac_cs_version"; exit 0 ;;
18042 # Conflict between --help and --header
18043 { { echo "$as_me:18043: error: ambiguous option: $1
18044 Try \`$0 --help' for more information." >&5
18045 echo "$as_me: error: ambiguous option: $1
18046 Try \`$0 --help' for more information." >&2;}
18047 { (exit 1); exit 1; }; };;
18048 --help | --hel | -h )
18049 echo "$ac_cs_usage"; exit 0 ;;
18050 --debug | --d* | -d )
18052 --file | --fil | --fi | --f )
18054 CONFIG_FILES="$CONFIG_FILES $1"
18055 ac_need_defaults=false;;
18056 --header | --heade | --head | --hea )
18058 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18059 ac_need_defaults=false;;
18061 # This is an error.
18062 -*) { { echo "$as_me:18062: error: unrecognized option: $1
18063 Try \`$0 --help' for more information." >&5
18064 echo "$as_me: error: unrecognized option: $1
18065 Try \`$0 --help' for more information." >&2;}
18066 { (exit 1); exit 1; }; } ;;
18068 *) ac_config_targets="$ac_config_targets $1" ;;
18077 ## ----------------------- ##
18078 ## Running config.status. ##
18079 ## ----------------------- ##
18081 This file was extended by $as_me 2.52.20210509, executed with
18082 CONFIG_FILES = $CONFIG_FILES
18083 CONFIG_HEADERS = $CONFIG_HEADERS
18084 CONFIG_LINKS = $CONFIG_LINKS
18085 CONFIG_COMMANDS = $CONFIG_COMMANDS
18086 > "$ac_cs_invocation"
18087 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18092 cat >>"$CONFIG_STATUS" <<EOF
18094 # INIT-COMMANDS section.
18097 ### Special initialization commands, used to pass information from the
18098 ### configuration-run into config.status
18101 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18102 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18103 LIB_NAME="$LIB_NAME"
18104 LIB_PREFIX="$LIB_PREFIX"
18105 LIB_SUFFIX="$LIB_SUFFIX"
18107 NCURSES_MAJOR="$NCURSES_MAJOR"
18108 NCURSES_MINOR="$NCURSES_MINOR"
18109 NCURSES_PATCH="$NCURSES_PATCH"
18110 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18111 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18112 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18113 cf_cv_abi_version="$cf_cv_abi_version"
18114 cf_cv_rel_version="$cf_cv_rel_version"
18115 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18116 cf_cv_shared_soname='$cf_cv_shared_soname'
18117 cf_cv_shlib_version="$cf_cv_shlib_version"
18118 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18119 cf_cv_system_name="$cf_cv_system_name"
18125 cat >>"$CONFIG_STATUS" <<\EOF
18126 for ac_config_target in $ac_config_targets
18128 case "$ac_config_target" in
18129 # Handling of arguments.
18130 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18131 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18132 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18133 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18134 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18135 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18136 *) { { echo "$as_me:18136: error: invalid argument: $ac_config_target" >&5
18137 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18138 { (exit 1); exit 1; }; };;
18142 # If the user did not use the arguments to specify the items to instantiate,
18143 # then the envvar interface is used. Set only those that are not.
18144 # We use the long form for the default assignment because of an extremely
18145 # bizarre bug on SunOS 4.1.3.
18146 if "$ac_need_defaults"; then
18147 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18148 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18149 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18152 # Create a temporary directory, and hook for its removal unless debugging.
18155 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18156 trap '{ (exit 1); exit 1; }' 1 2 13 15
18159 # Create a (secure) tmp directory for tmp files.
18162 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18163 test -n "$tmp" && test -d "$tmp"
18166 tmp=$TMPDIR/cs$$-$RANDOM
18167 (umask 077 && mkdir $tmp)
18170 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18171 { (exit 1); exit 1; }
18176 cat >>"$CONFIG_STATUS" <<EOF
18179 # CONFIG_FILES section.
18182 # No need to generate the scripts if there are no CONFIG_FILES.
18183 # This happens for instance when ./config.status config.h
18184 if test -n "\$CONFIG_FILES"; then
18185 # Protect against being on the right side of a sed subst in config.status.
18186 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18187 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18188 s,@SHELL@,$SHELL,;t t
18189 s,@exec_prefix@,$exec_prefix,;t t
18190 s,@prefix@,$prefix,;t t
18191 s,@program_transform_name@,$program_transform_name,;t t
18192 s,@bindir@,$bindir,;t t
18193 s,@sbindir@,$sbindir,;t t
18194 s,@libexecdir@,$libexecdir,;t t
18195 s,@datarootdir@,$datarootdir,;t t
18196 s,@datadir@,$datadir,;t t
18197 s,@sysconfdir@,$sysconfdir,;t t
18198 s,@sharedstatedir@,$sharedstatedir,;t t
18199 s,@localstatedir@,$localstatedir,;t t
18200 s,@runstatedir@,$runstatedir,;t t
18201 s,@libdir@,$libdir,;t t
18202 s,@includedir@,$includedir,;t t
18203 s,@oldincludedir@,$oldincludedir,;t t
18204 s,@infodir@,$infodir,;t t
18205 s,@mandir@,$mandir,;t t
18206 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18207 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18208 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18209 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18210 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18211 s,@build_alias@,$build_alias,;t t
18212 s,@host_alias@,$host_alias,;t t
18213 s,@target_alias@,$target_alias,;t t
18214 s,@ECHO_C@,$ECHO_C,;t t
18215 s,@ECHO_N@,$ECHO_N,;t t
18216 s,@ECHO_T@,$ECHO_T,;t t
18217 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18218 s,@DEFS@,$DEFS,;t t
18219 s,@LIBS@,$LIBS,;t t
18220 s,@top_builddir@,$top_builddir,;t t
18221 s,@build@,$build,;t t
18222 s,@build_cpu@,$build_cpu,;t t
18223 s,@build_vendor@,$build_vendor,;t t
18224 s,@build_os@,$build_os,;t t
18225 s,@host@,$host,;t t
18226 s,@host_cpu@,$host_cpu,;t t
18227 s,@host_vendor@,$host_vendor,;t t
18228 s,@host_os@,$host_os,;t t
18229 s,@target@,$target,;t t
18230 s,@target_cpu@,$target_cpu,;t t
18231 s,@target_vendor@,$target_vendor,;t t
18232 s,@target_os@,$target_os,;t t
18233 s,@GREP@,$GREP,;t t
18234 s,@FGREP@,$FGREP,;t t
18236 s,@CFLAGS@,$CFLAGS,;t t
18237 s,@LDFLAGS@,$LDFLAGS,;t t
18238 s,@CPPFLAGS@,$CPPFLAGS,;t t
18239 s,@ac_ct_CC@,$ac_ct_CC,;t t
18240 s,@EXEEXT@,$EXEEXT,;t t
18241 s,@OBJEXT@,$OBJEXT,;t t
18242 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18244 s,@EGREP@,$EGREP,;t t
18246 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18247 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18248 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18249 s,@LN_S@,$LN_S,;t t
18250 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18251 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18252 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18253 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18254 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18255 s,@SET_MAKE@,$SET_MAKE,;t t
18256 s,@CTAGS@,$CTAGS,;t t
18257 s,@ETAGS@,$ETAGS,;t t
18258 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18259 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18260 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18261 s,@RANLIB@,$RANLIB,;t t
18262 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18264 s,@ac_ct_LD@,$ac_ct_LD,;t t
18266 s,@ac_ct_AR@,$ac_ct_AR,;t t
18267 s,@ARFLAGS@,$ARFLAGS,;t t
18268 s,@DESTDIR@,$DESTDIR,;t t
18269 s,@BUILD_CC@,$BUILD_CC,;t t
18270 s,@BUILD_CPP@,$BUILD_CPP,;t t
18271 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18272 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18273 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18274 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18275 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18276 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18277 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18278 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18279 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18280 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18281 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18282 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18283 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18284 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18285 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18286 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18287 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18288 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18289 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18290 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18291 s,@CC_G_OPT@,$CC_G_OPT,;t t
18292 s,@LD_MODEL@,$LD_MODEL,;t t
18293 s,@shlibdir@,$shlibdir,;t t
18294 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18295 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18296 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18297 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18298 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18299 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18300 s,@LINK_PROGS@,$LINK_PROGS,;t t
18301 s,@LINK_TESTS@,$LINK_TESTS,;t t
18302 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18303 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18304 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18305 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18306 s,@RPATH_LIST@,$RPATH_LIST,;t t
18307 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18308 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18309 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18310 s,@PTHREAD@,$PTHREAD,;t t
18311 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18312 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18313 s,@ECHO_LT@,$ECHO_LT,;t t
18314 s,@ECHO_LD@,$ECHO_LD,;t t
18315 s,@RULE_CC@,$RULE_CC,;t t
18316 s,@SHOW_CC@,$SHOW_CC,;t t
18317 s,@ECHO_CC@,$ECHO_CC,;t t
18318 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18319 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18320 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18321 s,@ADAFLAGS@,$ADAFLAGS,;t t
18322 s,@ADA_TRACE@,$ADA_TRACE,;t t
18323 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18324 s,@M4_exists@,$M4_exists,;t t
18325 s,@cf_ada_make@,$cf_ada_make,;t t
18326 s,@cf_ada_config@,$cf_ada_config,;t t
18327 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18328 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18329 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18330 s,@cf_compile_generics@,$cf_compile_generics,;t t
18331 s,@cf_generic_objects@,$cf_generic_objects,;t t
18332 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18333 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18334 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18335 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18336 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18337 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18338 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18339 s,@cf_ada_package@,$cf_ada_package,;t t
18340 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18341 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18342 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18343 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18344 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18345 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18346 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18347 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18348 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18349 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18350 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18351 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18352 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18353 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18354 s,@TEST_ARG2@,$TEST_ARG2,;t t
18355 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18356 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18357 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18358 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18359 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18360 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18361 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18366 cat >>"$CONFIG_STATUS" <<\EOF
18367 # Split the substitutions into bite-sized pieces for seds with
18368 # small command number limits, like on Digital OSF/1 and HP-UX.
18369 ac_max_sed_lines=48
18370 ac_sed_frag=1 # Number of current file.
18371 ac_beg=1 # First line for current file.
18372 ac_end=$ac_max_sed_lines # Line after last line for current file.
18375 while "$ac_more_lines"; do
18376 if test "$ac_beg" -gt 1; then
18377 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18379 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18381 if test ! -s $tmp/subs.frag; then
18382 ac_more_lines=false
18384 # The purpose of the label and of the branching condition is to
18385 # speed up the sed processing (if there are no `@' at all, there
18386 # is no need to browse any of the substitutions).
18387 # These are the two extra sed commands mentioned above.
18389 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18390 # It is possible to make a multiline substitution using escaped newlines.
18391 # Ensure that we do not split the substitution between script fragments.
18393 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18394 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18395 if test -s $tmp/subs.next; then
18396 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18397 if test ! -s $tmp/subs.edit; then
18398 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18399 if test ! -s $tmp/subs.edit; then
18400 if test "$ac_beg" -gt 1; then
18401 ac_end=`expr "$ac_end" - 1`
18408 if test -z "$ac_sed_cmds"; then
18409 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18411 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18413 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18415 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18418 if test -z "$ac_sed_cmds"; then
18421 fi # test -n "$CONFIG_FILES"
18424 cat >>"$CONFIG_STATUS" <<\EOF
18425 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18426 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18428 - | *:- | *:-:* ) # input from stdin
18430 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18431 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18432 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18433 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18434 * ) ac_file_in=$ac_file.in ;;
18437 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18438 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18439 X"$ac_file" : 'X\(//\)[^/]' \| \
18440 X"$ac_file" : 'X\(//\)$' \| \
18441 X"$ac_file" : 'X\(/\)' \| \
18442 . : '\(.\)' 2>/dev/null ||
18444 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18445 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18446 /^X\(\/\/\)$/{ s//\1/; q; }
18447 /^X\(\/\).*/{ s//\1/; q; }
18449 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18450 { case "$ac_dir" in
18451 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18455 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18456 case $as_mkdir_dir in
18457 # Skip DOS drivespec
18458 ?:) as_incr_dir=$as_mkdir_dir ;;
18460 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18461 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18466 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18467 # A "../" for each directory in $ac_dir_suffix.
18468 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18470 ac_dir_suffix= ac_dots=
18475 if test -z "$ac_dots"; then
18478 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18480 [\\/]* | ?:[\\/]* )
18481 ac_srcdir="$srcdir$ac_dir_suffix";
18482 ac_top_srcdir="$srcdir" ;;
18483 *) # Relative path.
18484 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18485 ac_top_srcdir="$ac_dots$srcdir" ;;
18489 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18490 *) ac_INSTALL=$ac_dots$INSTALL ;;
18493 if test x"$ac_file" != x-; then
18494 { echo "$as_me:18494: creating $ac_file" >&5
18495 echo "$as_me: creating $ac_file" >&6;}
18498 # Let's still pretend it is `configure' which instantiates (i.e., don't
18499 # use $as_me), people would be surprised to read:
18500 # /* config.h. Generated automatically by config.status. */
18501 configure_input="Generated automatically from `echo $ac_file_in |
18502 sed 's,.*/,,'` by configure."
18504 # First look for the input files in the build tree, otherwise in the
18506 ac_file_inputs=`IFS=:
18507 for f in $ac_file_in; do
18509 -) echo $tmp/stdin ;;
18511 # Absolute (can't be DOS-style, as IFS=:)
18512 test -f "$f" || { { echo "$as_me:18512: error: cannot find input file: $f" >&5
18513 echo "$as_me: error: cannot find input file: $f" >&2;}
18514 { (exit 1); exit 1; }; }
18517 if test -f "$f"; then
18520 elif test -f "$srcdir/$f"; then
18525 { { echo "$as_me:18525: error: cannot find input file: $f" >&5
18526 echo "$as_me: error: cannot find input file: $f" >&2;}
18527 { (exit 1); exit 1; }; }
18530 done` || { (exit 1); exit 1; }
18532 cat >>"$CONFIG_STATUS" <<\EOF
18533 ac_warn_datarootdir=no
18534 if test x"$ac_file" != x-; then
18535 for ac_item in $ac_file_inputs
18537 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
18538 if test -n "$ac_seen"; then
18539 ac_used=`grep '@datarootdir@' "$ac_item"`
18540 if test -z "$ac_used"; then
18541 { echo "$as_me:18541: WARNING: datarootdir was used implicitly but not set:
18543 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18545 ac_warn_datarootdir=yes
18548 ac_seen=`grep '${datarootdir}' "$ac_item"`
18549 if test -n "$ac_seen"; then
18550 { echo "$as_me:18550: WARNING: datarootdir was used explicitly but not set:
18552 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18554 ac_warn_datarootdir=yes
18559 if test "x$ac_warn_datarootdir" = xyes; then
18560 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18564 cat >>"$CONFIG_STATUS" <<EOF
18568 cat >>"$CONFIG_STATUS" <<\EOF
18570 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18571 s,@configure_input@,$configure_input,;t t
18572 s,@srcdir@,$ac_srcdir,;t t
18573 s,@top_srcdir@,$ac_top_srcdir,;t t
18574 s,@INSTALL@,$ac_INSTALL,;t t
18575 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18577 if test x"$ac_file" != x-; then
18578 cp "$tmp/out" "$ac_file"
18580 for ac_name in prefix exec_prefix datarootdir
18582 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
18583 if test -n "$ac_seen"; then
18584 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
18585 if test -z "$ac_init"; then
18586 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18587 { echo "$as_me:18587: WARNING: Variable $ac_name is used but was not set:
18589 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18594 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
18595 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
18596 if test -s $tmp/out; then
18597 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18598 { echo "$as_me:18598: WARNING: Some variables may not be substituted:
18600 echo "$as_me: WARNING: Some variables may not be substituted:
18610 cat >>"$CONFIG_STATUS" <<\EOF
18613 # CONFIG_HEADER section.
18616 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18617 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18619 # ac_d sets the value in "#define NAME VALUE" lines.
18620 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18621 ac_dB='[ ].*$,\1#\2'
18624 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18625 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18626 ac_iB='\([ ]\),\1#\2define\3'
18629 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18630 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18631 ac_uB='$,\1#\2define\3'
18635 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18636 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18638 - | *:- | *:-:* ) # input from stdin
18640 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18641 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18642 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18643 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18644 * ) ac_file_in=$ac_file.in ;;
18647 test x"$ac_file" != x- && { echo "$as_me:18647: creating $ac_file" >&5
18648 echo "$as_me: creating $ac_file" >&6;}
18650 # First look for the input files in the build tree, otherwise in the
18652 ac_file_inputs=`IFS=:
18653 for f in $ac_file_in; do
18655 -) echo $tmp/stdin ;;
18657 # Absolute (can't be DOS-style, as IFS=:)
18658 test -f "$f" || { { echo "$as_me:18658: error: cannot find input file: $f" >&5
18659 echo "$as_me: error: cannot find input file: $f" >&2;}
18660 { (exit 1); exit 1; }; }
18663 if test -f "$f"; then
18666 elif test -f "$srcdir/$f"; then
18671 { { echo "$as_me:18671: error: cannot find input file: $f" >&5
18672 echo "$as_me: error: cannot find input file: $f" >&2;}
18673 { (exit 1); exit 1; }; }
18676 done` || { (exit 1); exit 1; }
18677 # Remove the trailing spaces.
18678 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18682 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18683 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18684 # be either 'cat' or 'sort'.
18685 cat confdefs.h | uniq >conftest.vals
18687 # Break up conftest.vals because some shells have a limit on
18688 # the size of here documents, and old seds have small limits too.
18690 rm -f conftest.tail
18691 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
18692 while grep . conftest.vals >/dev/null
18694 # Write chunks of a limited-size here document to conftest.frag.
18695 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
18696 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
18697 echo 'CEOF' >> "$CONFIG_STATUS"
18698 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
18699 rm -f conftest.vals
18700 mv conftest.tail conftest.vals
18702 rm -f conftest.vals
18704 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18706 echo ' cat >> conftest.edit <<CEOF
18707 /@DEFS@/r conftest.frag
18710 sed -f conftest.edit $tmp/in > $tmp/out
18712 mv $tmp/out $tmp/in
18713 rm -f conftest.edit conftest.frag
18714 ' >> "$CONFIG_STATUS"
18716 cat >>"$CONFIG_STATUS" <<\EOF
18717 # Let's still pretend it is `configure' which instantiates (i.e., don't
18718 # use $as_me), people would be surprised to read:
18719 # /* config.h. Generated automatically by config.status. */
18720 if test x"$ac_file" = x-; then
18721 echo "/* Generated automatically by configure. */" >$tmp/config.h
18723 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18725 cat $tmp/in >>$tmp/config.h
18727 if test x"$ac_file" != x-; then
18728 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
18729 { echo "$as_me:18729: $ac_file is unchanged" >&5
18730 echo "$as_me: $ac_file is unchanged" >&6;}
18732 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18733 X"$ac_file" : 'X\(//\)[^/]' \| \
18734 X"$ac_file" : 'X\(//\)$' \| \
18735 X"$ac_file" : 'X\(/\)' \| \
18736 . : '\(.\)' 2>/dev/null ||
18738 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18739 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18740 /^X\(\/\/\)$/{ s//\1/; q; }
18741 /^X\(\/\).*/{ s//\1/; q; }
18743 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18744 { case "$ac_dir" in
18745 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18749 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18750 case $as_mkdir_dir in
18751 # Skip DOS drivespec
18752 ?:) as_incr_dir=$as_mkdir_dir ;;
18754 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18755 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18762 mv "$tmp/config.h" "$ac_file"
18766 rm -f $tmp/config.h
18770 cat >>"$CONFIG_STATUS" <<\EOF
18772 # CONFIG_COMMANDS section.
18774 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18775 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18776 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18780 if test -z "$USE_OLD_MAKERULES" ; then
18781 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18788 cat >>"$CONFIG_STATUS" <<\EOF
18790 { (exit 0); exit 0; }
18792 chmod +x "$CONFIG_STATUS"
18793 ac_clean_files=$ac_clean_files_save
18795 # configure is writing to config.log, and then calls config.status.
18796 # config.status does its own redirection, appending to config.log.
18797 # Unfortunately, on DOS this fails, as config.log is still kept open
18798 # by configure, so config.status won't be able to write to it; its
18799 # output is simply discarded. So we exec the FD to /dev/null,
18800 # effectively closing config.log, so it can be properly (re)opened and
18801 # appended to by config.status. When coming back to configure, we
18802 # need to make the FD available again.
18803 if test "$no_create" != yes; then
18806 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
18808 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18809 # would make configure fail if this is the last instruction.
18810 "$ac_cs_success" || { (exit 1); exit 1; }
18812 ${MAKE:-make} preinstall