2 # From configure.in Revision: 1.83 .
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 echo "$as_me:3459: checking for \".PHONY\" make-support" >&5
3460 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3461 if test "${cf_cv_make_PHONY+set}" = set; then
3462 echo $ECHO_N "(cached) $ECHO_C" >&6
3467 mkdir conftest || exit 1
3469 cat >makefile <<'CF_EOF'
3473 @echo "** making $@ $(DATA)"
3475 @echo "** making $@ $(DATA)"
3477 @echo "** making $@ $(DATA)"
3480 @echo "** making $@ $(DATA)"
3483 for cf_data in 1 2 3
3485 ${MAKE:-make} always DATA=$cf_data
3486 ${MAKE:-make} once DATA=$cf_data
3487 ${MAKE:-make} -t always once
3488 if test -f always ; then
3489 echo "no (case 1)" > ../conftest.tmp
3490 elif test ! -f always.out ; then
3491 echo "no (case 2)" > ../conftest.tmp
3492 elif test ! -f once.out ; then
3493 echo "no (case 3)" > ../conftest.tmp
3494 elif ! cmp -s always.out once.out ; then
3495 echo "no (case 4)" > ../conftest.tmp
3496 diff always.out once.out
3498 cf_check="`cat always.out`"
3499 if test "x$cf_check" != "x$cf_data" ; then
3500 echo "no (case 5)" > ../conftest.tmp
3502 echo yes > ../conftest.tmp
3510 cf_cv_make_PHONY="`cat conftest.tmp`"
3514 echo "$as_me:3514: result: $cf_cv_make_PHONY" >&5
3515 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3518 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3519 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3521 for ac_prog in exctags ctags
3523 # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_CTAGS+set}" = set; then
3528 echo $ECHO_N "(cached) $ECHO_C" >&6
3530 if test -n "$CTAGS"; then
3531 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3533 ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 for ac_dir in $ac_dummy; do
3537 test -z "$ac_dir" && ac_dir=.
3538 $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_CTAGS="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3546 CTAGS=$ac_cv_prog_CTAGS
3547 if test -n "$CTAGS"; then
3548 echo "$as_me:3548: result: $CTAGS" >&5
3549 echo "${ECHO_T}$CTAGS" >&6
3551 echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3555 test -n "$CTAGS" && break
3558 for ac_prog in exetags etags
3560 # Extract the first word of "$ac_prog", so it can be a program name with args.
3561 set dummy $ac_prog; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ETAGS+set}" = set; then
3565 echo $ECHO_N "(cached) $ECHO_C" >&6
3567 if test -n "$ETAGS"; then
3568 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3570 ac_save_IFS=$IFS; IFS=$ac_path_separator
3572 for ac_dir in $ac_dummy; do
3574 test -z "$ac_dir" && ac_dir=.
3575 $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ETAGS="$ac_prog"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3583 ETAGS=$ac_cv_prog_ETAGS
3584 if test -n "$ETAGS"; then
3585 echo "$as_me:3585: result: $ETAGS" >&5
3586 echo "${ECHO_T}$ETAGS" >&6
3588 echo "$as_me:3588: result: no" >&5
3589 echo "${ECHO_T}no" >&6
3592 test -n "$ETAGS" && break
3595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3596 set dummy ${CTAGS:-ctags}; ac_word=$2
3597 echo "$as_me:3597: checking for $ac_word" >&5
3598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3600 echo $ECHO_N "(cached) $ECHO_C" >&6
3602 if test -n "$MAKE_LOWER_TAGS"; then
3603 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3605 ac_save_IFS=$IFS; IFS=$ac_path_separator
3607 for ac_dir in $ac_dummy; do
3609 test -z "$ac_dir" && ac_dir=.
3610 $as_executable_p "$ac_dir/$ac_word" || continue
3611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3612 echo "$as_me:3612: found $ac_dir/$ac_word" >&5
3616 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3620 if test -n "$MAKE_LOWER_TAGS"; then
3621 echo "$as_me:3621: result: $MAKE_LOWER_TAGS" >&5
3622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3624 echo "$as_me:3624: result: no" >&5
3625 echo "${ECHO_T}no" >&6
3628 if test "$cf_cv_mixedcase" = yes ; then
3629 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3630 set dummy ${ETAGS:-etags}; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3634 echo $ECHO_N "(cached) $ECHO_C" >&6
3636 if test -n "$MAKE_UPPER_TAGS"; then
3637 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3639 ac_save_IFS=$IFS; IFS=$ac_path_separator
3641 for ac_dir in $ac_dummy; do
3643 test -z "$ac_dir" && ac_dir=.
3644 $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3650 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3654 if test -n "$MAKE_UPPER_TAGS"; then
3655 echo "$as_me:3655: result: $MAKE_UPPER_TAGS" >&5
3656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3658 echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3666 if test "$MAKE_UPPER_TAGS" = yes ; then
3672 if test "$MAKE_LOWER_TAGS" = yes ; then
3678 echo "$as_me:3678: checking for makeflags variable" >&5
3679 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3680 if test "${cf_cv_makeflags+set}" = set; then
3681 echo $ECHO_N "(cached) $ECHO_C" >&6
3685 for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3687 cat >cf_makeflags.tmp <<CF_EOF
3690 @ echo '.$cf_option'
3692 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ ]*$,,'`
3693 case "$cf_result" in
3695 cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3696 case "$cf_result" in
3697 (.*CC=*) cf_cv_makeflags=
3699 (*) cf_cv_makeflags=$cf_option
3708 echo "${as_me:-configure}:3708: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3713 rm -f cf_makeflags.tmp
3716 echo "$as_me:3716: result: $cf_cv_makeflags" >&5
3717 echo "${ECHO_T}$cf_cv_makeflags" >&6
3719 if test -n "$ac_tool_prefix"; then
3720 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3721 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3722 echo "$as_me:3722: checking for $ac_word" >&5
3723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3724 if test "${ac_cv_prog_RANLIB+set}" = set; then
3725 echo $ECHO_N "(cached) $ECHO_C" >&6
3727 if test -n "$RANLIB"; then
3728 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3730 ac_save_IFS=$IFS; IFS=$ac_path_separator
3732 for ac_dir in $ac_dummy; do
3734 test -z "$ac_dir" && ac_dir=.
3735 $as_executable_p "$ac_dir/$ac_word" || continue
3736 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3737 echo "$as_me:3737: found $ac_dir/$ac_word" >&5
3743 RANLIB=$ac_cv_prog_RANLIB
3744 if test -n "$RANLIB"; then
3745 echo "$as_me:3745: result: $RANLIB" >&5
3746 echo "${ECHO_T}$RANLIB" >&6
3748 echo "$as_me:3748: result: no" >&5
3749 echo "${ECHO_T}no" >&6
3753 if test -z "$ac_cv_prog_RANLIB"; then
3754 ac_ct_RANLIB=$RANLIB
3755 # Extract the first word of "ranlib", so it can be a program name with args.
3756 set dummy ranlib; ac_word=$2
3757 echo "$as_me:3757: checking for $ac_word" >&5
3758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3759 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3760 echo $ECHO_N "(cached) $ECHO_C" >&6
3762 if test -n "$ac_ct_RANLIB"; then
3763 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3765 ac_save_IFS=$IFS; IFS=$ac_path_separator
3767 for ac_dir in $ac_dummy; do
3769 test -z "$ac_dir" && ac_dir=.
3770 $as_executable_p "$ac_dir/$ac_word" || continue
3771 ac_cv_prog_ac_ct_RANLIB="ranlib"
3772 echo "$as_me:3772: found $ac_dir/$ac_word" >&5
3776 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3779 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3780 if test -n "$ac_ct_RANLIB"; then
3781 echo "$as_me:3781: result: $ac_ct_RANLIB" >&5
3782 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3784 echo "$as_me:3784: result: no" >&5
3785 echo "${ECHO_T}no" >&6
3788 RANLIB=$ac_ct_RANLIB
3790 RANLIB="$ac_cv_prog_RANLIB"
3793 if test -n "$ac_tool_prefix"; then
3794 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3795 set dummy ${ac_tool_prefix}ld; ac_word=$2
3796 echo "$as_me:3796: checking for $ac_word" >&5
3797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3798 if test "${ac_cv_prog_LD+set}" = set; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
3801 if test -n "$LD"; then
3802 ac_cv_prog_LD="$LD" # Let the user override the test.
3804 ac_save_IFS=$IFS; IFS=$ac_path_separator
3806 for ac_dir in $ac_dummy; do
3808 test -z "$ac_dir" && ac_dir=.
3809 $as_executable_p "$ac_dir/$ac_word" || continue
3810 ac_cv_prog_LD="${ac_tool_prefix}ld"
3811 echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3818 if test -n "$LD"; then
3819 echo "$as_me:3819: result: $LD" >&5
3820 echo "${ECHO_T}$LD" >&6
3822 echo "$as_me:3822: result: no" >&5
3823 echo "${ECHO_T}no" >&6
3827 if test -z "$ac_cv_prog_LD"; then
3829 # Extract the first word of "ld", so it can be a program name with args.
3830 set dummy ld; ac_word=$2
3831 echo "$as_me:3831: checking for $ac_word" >&5
3832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3833 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3834 echo $ECHO_N "(cached) $ECHO_C" >&6
3836 if test -n "$ac_ct_LD"; then
3837 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3839 ac_save_IFS=$IFS; IFS=$ac_path_separator
3841 for ac_dir in $ac_dummy; do
3843 test -z "$ac_dir" && ac_dir=.
3844 $as_executable_p "$ac_dir/$ac_word" || continue
3845 ac_cv_prog_ac_ct_LD="ld"
3846 echo "$as_me:3846: found $ac_dir/$ac_word" >&5
3850 test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3853 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3854 if test -n "$ac_ct_LD"; then
3855 echo "$as_me:3855: result: $ac_ct_LD" >&5
3856 echo "${ECHO_T}$ac_ct_LD" >&6
3858 echo "$as_me:3858: result: no" >&5
3859 echo "${ECHO_T}no" >&6
3867 if test -n "$ac_tool_prefix"; then
3868 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3869 set dummy ${ac_tool_prefix}ar; ac_word=$2
3870 echo "$as_me:3870: checking for $ac_word" >&5
3871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3872 if test "${ac_cv_prog_AR+set}" = set; then
3873 echo $ECHO_N "(cached) $ECHO_C" >&6
3875 if test -n "$AR"; then
3876 ac_cv_prog_AR="$AR" # Let the user override the test.
3878 ac_save_IFS=$IFS; IFS=$ac_path_separator
3880 for ac_dir in $ac_dummy; do
3882 test -z "$ac_dir" && ac_dir=.
3883 $as_executable_p "$ac_dir/$ac_word" || continue
3884 ac_cv_prog_AR="${ac_tool_prefix}ar"
3885 echo "$as_me:3885: found $ac_dir/$ac_word" >&5
3892 if test -n "$AR"; then
3893 echo "$as_me:3893: result: $AR" >&5
3894 echo "${ECHO_T}$AR" >&6
3896 echo "$as_me:3896: result: no" >&5
3897 echo "${ECHO_T}no" >&6
3901 if test -z "$ac_cv_prog_AR"; then
3903 # Extract the first word of "ar", so it can be a program name with args.
3904 set dummy ar; ac_word=$2
3905 echo "$as_me:3905: checking for $ac_word" >&5
3906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3907 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3908 echo $ECHO_N "(cached) $ECHO_C" >&6
3910 if test -n "$ac_ct_AR"; then
3911 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3913 ac_save_IFS=$IFS; IFS=$ac_path_separator
3915 for ac_dir in $ac_dummy; do
3917 test -z "$ac_dir" && ac_dir=.
3918 $as_executable_p "$ac_dir/$ac_word" || continue
3919 ac_cv_prog_ac_ct_AR="ar"
3920 echo "$as_me:3920: found $ac_dir/$ac_word" >&5
3924 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3927 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3928 if test -n "$ac_ct_AR"; then
3929 echo "$as_me:3929: result: $ac_ct_AR" >&5
3930 echo "${ECHO_T}$ac_ct_AR" >&6
3932 echo "$as_me:3932: result: no" >&5
3933 echo "${ECHO_T}no" >&6
3941 if test -n "$ac_tool_prefix"; then
3942 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3943 set dummy ${ac_tool_prefix}ar; ac_word=$2
3944 echo "$as_me:3944: checking for $ac_word" >&5
3945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3946 if test "${ac_cv_prog_AR+set}" = set; then
3947 echo $ECHO_N "(cached) $ECHO_C" >&6
3949 if test -n "$AR"; then
3950 ac_cv_prog_AR="$AR" # Let the user override the test.
3952 ac_save_IFS=$IFS; IFS=$ac_path_separator
3954 for ac_dir in $ac_dummy; do
3956 test -z "$ac_dir" && ac_dir=.
3957 $as_executable_p "$ac_dir/$ac_word" || continue
3958 ac_cv_prog_AR="${ac_tool_prefix}ar"
3959 echo "$as_me:3959: found $ac_dir/$ac_word" >&5
3966 if test -n "$AR"; then
3967 echo "$as_me:3967: result: $AR" >&5
3968 echo "${ECHO_T}$AR" >&6
3970 echo "$as_me:3970: result: no" >&5
3971 echo "${ECHO_T}no" >&6
3975 if test -z "$ac_cv_prog_AR"; then
3977 # Extract the first word of "ar", so it can be a program name with args.
3978 set dummy ar; ac_word=$2
3979 echo "$as_me:3979: checking for $ac_word" >&5
3980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3982 echo $ECHO_N "(cached) $ECHO_C" >&6
3984 if test -n "$ac_ct_AR"; then
3985 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3987 ac_save_IFS=$IFS; IFS=$ac_path_separator
3989 for ac_dir in $ac_dummy; do
3991 test -z "$ac_dir" && ac_dir=.
3992 $as_executable_p "$ac_dir/$ac_word" || continue
3993 ac_cv_prog_ac_ct_AR="ar"
3994 echo "$as_me:3994: found $ac_dir/$ac_word" >&5
3998 test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4001 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4002 if test -n "$ac_ct_AR"; then
4003 echo "$as_me:4003: result: $ac_ct_AR" >&5
4004 echo "${ECHO_T}$ac_ct_AR" >&6
4006 echo "$as_me:4006: result: no" >&5
4007 echo "${ECHO_T}no" >&6
4015 echo "$as_me:4015: checking for options to update archives" >&5
4016 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4017 if test "${cf_cv_ar_flags+set}" = set; then
4018 echo $ECHO_N "(cached) $ECHO_C" >&6
4021 case "$cf_cv_system_name" in
4024 cat >mk_static_lib.sh <<-EOF
4029 exec \$MSVC_BIN -out:"\$out" \$@
4031 chmod +x mk_static_lib.sh
4032 AR=`pwd`/mk_static_lib.sh
4035 cf_cv_ar_flags=unknown
4036 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4039 # check if $ARFLAGS already contains this choice
4040 if test "x$ARFLAGS" != "x" ; then
4041 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4042 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4048 rm -f "conftest.$ac_cv_objext"
4051 cat >"conftest.$ac_ext" <<EOF
4052 #line 4052 "configure"
4053 int testdata[3] = { 123, 456, 789 };
4055 if { (eval echo "$as_me:4055: \"$ac_compile\"") >&5
4056 (eval $ac_compile) 2>&5
4058 echo "$as_me:4058: \$? = $ac_status" >&5
4059 (exit "$ac_status"); } ; then
4060 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4061 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
4062 if test -f conftest.a ; then
4063 cf_cv_ar_flags="$cf_ar_flags"
4067 test -n "$verbose" && echo " cannot compile test-program" 1>&6
4069 echo "${as_me:-configure}:4069: testing cannot compile test-program ..." 1>&5
4074 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
4079 echo "$as_me:4079: result: $cf_cv_ar_flags" >&5
4080 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4082 if test -n "$ARFLAGS" ; then
4083 if test -n "$cf_cv_ar_flags" ; then
4084 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4087 ARFLAGS=$cf_cv_ar_flags
4090 echo "$as_me:4090: checking for PATH separator" >&5
4091 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4092 case "$cf_cv_system_name" in
4093 (os2*) PATH_SEPARATOR=';' ;;
4094 (*) ${PATH_SEPARATOR:=':'} ;;
4097 echo "$as_me:4097: result: $PATH_SEPARATOR" >&5
4098 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4100 echo "$as_me:4100: checking if you have specified an install-prefix" >&5
4101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4103 # Check whether --with-install-prefix or --without-install-prefix was given.
4104 if test "${with_install_prefix+set}" = set; then
4105 withval="$with_install_prefix"
4109 (*) DESTDIR="$withval"
4113 echo "$as_me:4113: result: $DESTDIR" >&5
4114 echo "${ECHO_T}$DESTDIR" >&6
4116 ###############################################################################
4118 # If we're cross-compiling, allow the user to override the tools and their
4119 # options. The configure script is oriented toward identifying the host
4120 # compiler, etc., but we need a build compiler to generate parts of the source.
4122 if test "$cross_compiling" = yes ; then
4124 # defaults that we might want to override
4125 : ${BUILD_CFLAGS:=''}
4126 : ${BUILD_CPPFLAGS:=''}
4127 : ${BUILD_LDFLAGS:=''}
4129 : ${BUILD_EXEEXT:='$x'}
4130 : ${BUILD_OBJEXT:='o'}
4132 # Check whether --with-build-cc or --without-build-cc was given.
4133 if test "${with_build_cc+set}" = set; then
4134 withval="$with_build_cc"
4137 for ac_prog in gcc clang c99 c89 cc cl
4139 # Extract the first word of "$ac_prog", so it can be a program name with args.
4140 set dummy $ac_prog; ac_word=$2
4141 echo "$as_me:4141: checking for $ac_word" >&5
4142 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4143 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4144 echo $ECHO_N "(cached) $ECHO_C" >&6
4146 if test -n "$BUILD_CC"; then
4147 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4149 ac_save_IFS=$IFS; IFS=$ac_path_separator
4151 for ac_dir in $ac_dummy; do
4153 test -z "$ac_dir" && ac_dir=.
4154 $as_executable_p "$ac_dir/$ac_word" || continue
4155 ac_cv_prog_BUILD_CC="$ac_prog"
4156 echo "$as_me:4156: found $ac_dir/$ac_word" >&5
4162 BUILD_CC=$ac_cv_prog_BUILD_CC
4163 if test -n "$BUILD_CC"; then
4164 echo "$as_me:4164: result: $BUILD_CC" >&5
4165 echo "${ECHO_T}$BUILD_CC" >&6
4167 echo "$as_me:4167: result: no" >&5
4168 echo "${ECHO_T}no" >&6
4171 test -n "$BUILD_CC" && break
4173 test -n "$BUILD_CC" || BUILD_CC="none"
4176 echo "$as_me:4176: checking for native build C compiler" >&5
4177 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4178 echo "$as_me:4178: result: $BUILD_CC" >&5
4179 echo "${ECHO_T}$BUILD_CC" >&6
4181 echo "$as_me:4181: checking for native build C preprocessor" >&5
4182 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4184 # Check whether --with-build-cpp or --without-build-cpp was given.
4185 if test "${with_build_cpp+set}" = set; then
4186 withval="$with_build_cpp"
4187 BUILD_CPP="$withval"
4189 BUILD_CPP='${BUILD_CC} -E'
4191 echo "$as_me:4191: result: $BUILD_CPP" >&5
4192 echo "${ECHO_T}$BUILD_CPP" >&6
4194 echo "$as_me:4194: checking for native build C flags" >&5
4195 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4197 # Check whether --with-build-cflags or --without-build-cflags was given.
4198 if test "${with_build_cflags+set}" = set; then
4199 withval="$with_build_cflags"
4200 BUILD_CFLAGS="$withval"
4202 echo "$as_me:4202: result: $BUILD_CFLAGS" >&5
4203 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4205 echo "$as_me:4205: checking for native build C preprocessor-flags" >&5
4206 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4208 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4209 if test "${with_build_cppflags+set}" = set; then
4210 withval="$with_build_cppflags"
4211 BUILD_CPPFLAGS="$withval"
4213 echo "$as_me:4213: result: $BUILD_CPPFLAGS" >&5
4214 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4216 echo "$as_me:4216: checking for native build linker-flags" >&5
4217 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4219 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4220 if test "${with_build_ldflags+set}" = set; then
4221 withval="$with_build_ldflags"
4222 BUILD_LDFLAGS="$withval"
4224 echo "$as_me:4224: result: $BUILD_LDFLAGS" >&5
4225 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4227 echo "$as_me:4227: checking for native build linker-libraries" >&5
4228 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4230 # Check whether --with-build-libs or --without-build-libs was given.
4231 if test "${with_build_libs+set}" = set; then
4232 withval="$with_build_libs"
4233 BUILD_LIBS="$withval"
4235 echo "$as_me:4235: result: $BUILD_LIBS" >&5
4236 echo "${ECHO_T}$BUILD_LIBS" >&6
4238 # this assumes we're on Unix.
4242 : ${BUILD_CC:='${CC}'}
4244 if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
4245 { { echo "$as_me:4245: error: Cross-build requires two compilers.
4246 Use --with-build-cc to specify the native compiler." >&5
4247 echo "$as_me: error: Cross-build requires two compilers.
4248 Use --with-build-cc to specify the native compiler." >&2;}
4249 { (exit 1); exit 1; }; }
4253 : ${BUILD_CC:='${CC}'}
4254 : ${BUILD_CPP:='${CPP}'}
4255 : ${BUILD_CFLAGS:='${CFLAGS}'}
4256 : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4257 : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4258 : ${BUILD_LIBS:='${LIBS}'}
4259 : ${BUILD_EXEEXT:='$x'}
4260 : ${BUILD_OBJEXT:='o'}
4263 ###############################################################################
4265 ### Options to allow the user to specify the set of libraries which are used.
4266 ### Use "--without-normal --with-shared" to allow the default model to be
4267 ### shared, for example.
4270 echo "$as_me:4270: checking if you want to build shared C-objects" >&5
4271 echo $ECHO_N "checking if you want to build shared C-objects... $ECHO_C" >&6
4273 # Check whether --with-shared or --without-shared was given.
4274 if test "${with_shared+set}" = set; then
4275 withval="$with_shared"
4276 with_shared=$withval
4280 echo "$as_me:4280: result: $with_shared" >&5
4281 echo "${ECHO_T}$with_shared" >&6
4282 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4284 echo "$as_me:4284: checking for specified models" >&5
4285 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4286 test -z "$cf_list_models" && cf_list_models=normal
4287 echo "$as_me:4287: result: $cf_list_models" >&5
4288 echo "${ECHO_T}$cf_list_models" >&6
4290 ### Use the first model as the default, and save its suffix for use in building
4291 ### up test-applications.
4292 echo "$as_me:4292: checking for default model" >&5
4293 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4294 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4295 echo "$as_me:4295: result: $DFT_LWR_MODEL" >&5
4296 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4298 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4300 echo "$as_me:4300: checking for specific curses-directory" >&5
4301 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4303 # Check whether --with-curses-dir or --without-curses-dir was given.
4304 if test "${with_curses_dir+set}" = set; then
4305 withval="$with_curses_dir"
4306 cf_cv_curses_dir=$withval
4310 echo "$as_me:4310: result: $cf_cv_curses_dir" >&5
4311 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4313 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
4316 if test "x$prefix" != xNONE; then
4317 cf_path_syntax="$prefix"
4319 cf_path_syntax="$ac_default_prefix"
4327 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4329 (.\$\{*prefix\}*|.\$\{*dir\}*)
4330 eval withval="$withval"
4333 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4338 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
4341 { { echo "$as_me:4341: error: expected a pathname, not \"$withval\"" >&5
4342 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
4343 { (exit 1); exit 1; }; }
4347 if test -d "$cf_cv_curses_dir"
4350 if test -n "$cf_cv_curses_dir/include" ; then
4351 for cf_add_incdir in $cf_cv_curses_dir/include
4353 while test "$cf_add_incdir" != /usr/include
4355 if test -d "$cf_add_incdir"
4358 if test -n "$CFLAGS$CPPFLAGS" ; then
4359 # a loop is needed to ensure we can add subdirs of existing dirs
4360 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4361 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4362 cf_have_incdir=yes; break
4367 if test "$cf_have_incdir" = no ; then
4368 if test "$cf_add_incdir" = /usr/local/include ; then
4369 if test "$GCC" = yes
4371 cf_save_CPPFLAGS=$CPPFLAGS
4373 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4374 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
4376 cat >"conftest.$ac_ext" <<_ACEOF
4377 #line 4377 "configure"
4378 #include "confdefs.h"
4388 rm -f "conftest.$ac_objext"
4389 if { (eval echo "$as_me:4389: \"$ac_compile\"") >&5
4390 (eval $ac_compile) 2>&5
4392 echo "$as_me:4392: \$? = $ac_status" >&5
4393 (exit "$ac_status"); } &&
4394 { ac_try='test -s "conftest.$ac_objext"'
4395 { (eval echo "$as_me:4395: \"$ac_try\"") >&5
4398 echo "$as_me:4398: \$? = $ac_status" >&5
4399 (exit "$ac_status"); }; }; then
4402 echo "$as_me: failed program was:" >&5
4403 cat "conftest.$ac_ext" >&5
4406 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4407 CPPFLAGS=$cf_save_CPPFLAGS
4412 if test "$cf_have_incdir" = no ; then
4413 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4415 echo "${as_me:-configure}:4415: testing adding $cf_add_incdir to include-path ..." 1>&5
4417 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4419 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
4420 test "$cf_top_incdir" = "$cf_add_incdir" && break
4421 cf_add_incdir="$cf_top_incdir"
4432 if test -n "$cf_cv_curses_dir/lib" ; then
4433 for cf_add_libdir in $cf_cv_curses_dir/lib
4435 if test "$cf_add_libdir" = /usr/lib ; then
4437 elif test -d "$cf_add_libdir"
4440 if test -n "$LDFLAGS$LIBS" ; then
4441 # a loop is needed to ensure we can add subdirs of existing dirs
4442 for cf_test_libdir in $LDFLAGS $LIBS ; do
4443 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4444 cf_have_libdir=yes; break
4448 if test "$cf_have_libdir" = no ; then
4449 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4451 echo "${as_me:-configure}:4451: testing adding $cf_add_libdir to library-path ..." 1>&5
4453 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4462 cf_ncuconfig_root=ncurses
4463 cf_have_ncuconfig=no
4465 if test "x${PKG_CONFIG:=none}" != xnone; then
4466 echo "$as_me:4466: checking pkg-config for $cf_ncuconfig_root" >&5
4467 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
4468 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
4469 echo "$as_me:4469: result: yes" >&5
4470 echo "${ECHO_T}yes" >&6
4472 echo "$as_me:4472: checking if the $cf_ncuconfig_root package files work" >&5
4473 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
4474 cf_have_ncuconfig=unknown
4476 cf_save_CFLAGS="$CFLAGS"
4477 cf_save_CPPFLAGS="$CPPFLAGS"
4478 cf_save_LIBS="$LIBS"
4480 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
4481 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
4483 # while -W for passing linker flags is prevalent, it is not "standard".
4484 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
4485 # incompatible _and_ non-standard -W option which gives an error. Work
4486 # around that pitfall.
4487 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
4493 cf_new_extra_cppflags=
4495 for cf_add_cflags in $cf_pkg_cflags
4497 case "$cf_fix_cppflags" in
4499 case "$cf_add_cflags" in
4500 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4501 case "$cf_add_cflags" in
4503 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4505 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4506 && test -z "${cf_tst_cflags}" \
4507 && cf_fix_cppflags=yes
4509 if test "$cf_fix_cppflags" = yes ; then
4511 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4512 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4515 elif test "${cf_tst_cflags}" = "\"'" ; then
4517 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4518 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4528 case "$cf_add_cflags" in
4530 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4532 CPPFLAGS=`echo "$CPPFLAGS" | \
4533 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4534 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4539 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4540 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4547 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4548 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4555 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4556 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4558 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4560 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4561 && test -z "${cf_tst_cflags}" \
4562 && cf_fix_cppflags=no
4567 if test -n "$cf_new_cflags" ; then
4569 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4570 CFLAGS="${CFLAGS}$cf_new_cflags"
4574 if test -n "$cf_new_cppflags" ; then
4576 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4577 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4581 if test -n "$cf_new_extra_cppflags" ; then
4583 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4584 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4591 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4593 for cf_add_1lib in $cf_add_0lib; do
4594 for cf_add_2lib in $cf_add_libs; do
4595 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4600 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4604 cat >"conftest.$ac_ext" <<_ACEOF
4605 #line 4605 "configure"
4606 #include "confdefs.h"
4607 #include <${cf_cv_ncurses_header:-curses.h}>
4611 initscr(); mousemask(0,0); tigetstr((char *)0);
4616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4617 if { (eval echo "$as_me:4617: \"$ac_link\"") >&5
4618 (eval $ac_link) 2>&5
4620 echo "$as_me:4620: \$? = $ac_status" >&5
4621 (exit "$ac_status"); } &&
4622 { ac_try='test -s "conftest$ac_exeext"'
4623 { (eval echo "$as_me:4623: \"$ac_try\"") >&5
4626 echo "$as_me:4626: \$? = $ac_status" >&5
4627 (exit "$ac_status"); }; }; then
4628 if test "$cross_compiling" = yes; then
4629 cf_test_ncuconfig=maybe
4631 cat >"conftest.$ac_ext" <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4634 #include <${cf_cv_ncurses_header:-curses.h}>
4636 { const char *xx = curses_version(); return (xx == 0); }
4638 rm -f "conftest$ac_exeext"
4639 if { (eval echo "$as_me:4639: \"$ac_link\"") >&5
4640 (eval $ac_link) 2>&5
4642 echo "$as_me:4642: \$? = $ac_status" >&5
4643 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4644 { (eval echo "$as_me:4644: \"$ac_try\"") >&5
4647 echo "$as_me:4647: \$? = $ac_status" >&5
4648 (exit "$ac_status"); }; }; then
4649 cf_test_ncuconfig=yes
4651 echo "$as_me: program exited with status $ac_status" >&5
4652 echo "$as_me: failed program was:" >&5
4653 cat "conftest.$ac_ext" >&5
4654 cf_test_ncuconfig=no
4656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4659 echo "$as_me: failed program was:" >&5
4660 cat "conftest.$ac_ext" >&5
4661 cf_test_ncuconfig=no
4663 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4665 CFLAGS="$cf_save_CFLAGS"
4666 CPPFLAGS="$cf_save_CPPFLAGS"
4667 LIBS="$cf_save_LIBS"
4669 if test "x$cf_test_ncuconfig" != xyes; then
4670 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4671 cf_pkg_cflags="$cf_temp"
4672 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
4673 cf_pkg_libs="$cf_temp"
4681 cf_new_extra_cppflags=
4683 for cf_add_cflags in $cf_pkg_cflags
4685 case "$cf_fix_cppflags" in
4687 case "$cf_add_cflags" in
4688 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4689 case "$cf_add_cflags" in
4691 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4693 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4694 && test -z "${cf_tst_cflags}" \
4695 && cf_fix_cppflags=yes
4697 if test "$cf_fix_cppflags" = yes ; then
4699 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4700 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4703 elif test "${cf_tst_cflags}" = "\"'" ; then
4705 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4706 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4716 case "$cf_add_cflags" in
4718 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4720 CPPFLAGS=`echo "$CPPFLAGS" | \
4721 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4722 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4727 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4728 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4735 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4736 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4743 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4744 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4746 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4748 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4749 && test -z "${cf_tst_cflags}" \
4750 && cf_fix_cppflags=no
4755 if test -n "$cf_new_cflags" ; then
4757 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4758 CFLAGS="${CFLAGS}$cf_new_cflags"
4762 if test -n "$cf_new_cppflags" ; then
4764 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4765 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4769 if test -n "$cf_new_extra_cppflags" ; then
4771 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4772 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4779 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
4781 for cf_add_1lib in $cf_add_0lib; do
4782 for cf_add_2lib in $cf_add_libs; do
4783 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
4788 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
4792 cat >"conftest.$ac_ext" <<_ACEOF
4793 #line 4793 "configure"
4794 #include "confdefs.h"
4795 #include <${cf_cv_ncurses_header:-curses.h}>
4799 initscr(); mousemask(0,0); tigetstr((char *)0);
4804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4805 if { (eval echo "$as_me:4805: \"$ac_link\"") >&5
4806 (eval $ac_link) 2>&5
4808 echo "$as_me:4808: \$? = $ac_status" >&5
4809 (exit "$ac_status"); } &&
4810 { ac_try='test -s "conftest$ac_exeext"'
4811 { (eval echo "$as_me:4811: \"$ac_try\"") >&5
4814 echo "$as_me:4814: \$? = $ac_status" >&5
4815 (exit "$ac_status"); }; }; then
4816 if test "$cross_compiling" = yes; then
4817 cf_have_ncuconfig=maybe
4819 cat >"conftest.$ac_ext" <<_ACEOF
4820 #line 4820 "configure"
4821 #include "confdefs.h"
4822 #include <${cf_cv_ncurses_header:-curses.h}>
4824 { const char *xx = curses_version(); return (xx == 0); }
4826 rm -f "conftest$ac_exeext"
4827 if { (eval echo "$as_me:4827: \"$ac_link\"") >&5
4828 (eval $ac_link) 2>&5
4830 echo "$as_me:4830: \$? = $ac_status" >&5
4831 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
4832 { (eval echo "$as_me:4832: \"$ac_try\"") >&5
4835 echo "$as_me:4835: \$? = $ac_status" >&5
4836 (exit "$ac_status"); }; }; then
4837 cf_have_ncuconfig=yes
4839 echo "$as_me: program exited with status $ac_status" >&5
4840 echo "$as_me: failed program was:" >&5
4841 cat "conftest.$ac_ext" >&5
4842 cf_have_ncuconfig=no
4844 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
4847 echo "$as_me: failed program was:" >&5
4848 cat "conftest.$ac_ext" >&5
4849 cf_have_ncuconfig=no
4851 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4852 echo "$as_me:4852: result: $cf_have_ncuconfig" >&5
4853 echo "${ECHO_T}$cf_have_ncuconfig" >&6
4854 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
4855 if test "$cf_have_ncuconfig" != "yes"
4857 CPPFLAGS="$cf_save_CPPFLAGS"
4858 LIBS="$cf_save_LIBS"
4859 NCURSES_CONFIG_PKG=none
4862 cat >>confdefs.h <<\EOF
4866 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
4868 echo "$as_me:4868: checking for terminfo header" >&5
4869 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
4870 if test "${cf_cv_term_header+set}" = set; then
4871 echo $ECHO_N "(cached) $ECHO_C" >&6
4874 case "${cf_cv_ncurses_header}" in
4875 (*/ncurses.h|*/ncursesw.h)
4876 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4879 cf_term_header=term.h
4883 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4885 cat >"conftest.$ac_ext" <<_ACEOF
4886 #line 4886 "configure"
4887 #include "confdefs.h"
4889 #include <${cf_cv_ncurses_header:-curses.h}>
4895 int x = auto_left_margin; (void)x
4900 rm -f "conftest.$ac_objext"
4901 if { (eval echo "$as_me:4901: \"$ac_compile\"") >&5
4902 (eval $ac_compile) 2>&5
4904 echo "$as_me:4904: \$? = $ac_status" >&5
4905 (exit "$ac_status"); } &&
4906 { ac_try='test -s "conftest.$ac_objext"'
4907 { (eval echo "$as_me:4907: \"$ac_try\"") >&5
4910 echo "$as_me:4910: \$? = $ac_status" >&5
4911 (exit "$ac_status"); }; }; then
4913 cf_cv_term_header="$cf_test"
4915 echo "$as_me: failed program was:" >&5
4916 cat "conftest.$ac_ext" >&5
4918 cf_cv_term_header=unknown
4921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4922 test "$cf_cv_term_header" != unknown && break
4926 echo "$as_me:4926: result: $cf_cv_term_header" >&5
4927 echo "${ECHO_T}$cf_cv_term_header" >&6
4929 # Set definitions to allow ifdef'ing to accommodate subdirectories
4931 case "$cf_cv_term_header" in
4934 cat >>confdefs.h <<\EOF
4935 #define HAVE_TERM_H 1
4941 case "$cf_cv_term_header" in
4944 cat >>confdefs.h <<\EOF
4945 #define HAVE_NCURSES_TERM_H 1
4951 cat >>confdefs.h <<\EOF
4952 #define HAVE_NCURSESW_TERM_H 1
4961 echo "$as_me:4961: result: no" >&5
4962 echo "${ECHO_T}no" >&6
4963 NCURSES_CONFIG_PKG=none
4966 NCURSES_CONFIG_PKG=none
4969 if test "x$cf_have_ncuconfig" = "xno"; then
4970 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
4972 if test -n "$ac_tool_prefix"; then
4973 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4975 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4976 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4977 echo "$as_me:4977: checking for $ac_word" >&5
4978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4979 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
4980 echo $ECHO_N "(cached) $ECHO_C" >&6
4982 if test -n "$NCURSES_CONFIG"; then
4983 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
4985 ac_save_IFS=$IFS; IFS=$ac_path_separator
4987 for ac_dir in $ac_dummy; do
4989 test -z "$ac_dir" && ac_dir=.
4990 $as_executable_p "$ac_dir/$ac_word" || continue
4991 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
4992 echo "$as_me:4992: found $ac_dir/$ac_word" >&5
4998 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
4999 if test -n "$NCURSES_CONFIG"; then
5000 echo "$as_me:5000: result: $NCURSES_CONFIG" >&5
5001 echo "${ECHO_T}$NCURSES_CONFIG" >&6
5003 echo "$as_me:5003: result: no" >&5
5004 echo "${ECHO_T}no" >&6
5007 test -n "$NCURSES_CONFIG" && break
5010 if test -z "$NCURSES_CONFIG"; then
5011 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
5012 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5014 # Extract the first word of "$ac_prog", so it can be a program name with args.
5015 set dummy $ac_prog; ac_word=$2
5016 echo "$as_me:5016: checking for $ac_word" >&5
5017 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5018 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5021 if test -n "$ac_ct_NCURSES_CONFIG"; then
5022 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
5024 ac_save_IFS=$IFS; IFS=$ac_path_separator
5026 for ac_dir in $ac_dummy; do
5028 test -z "$ac_dir" && ac_dir=.
5029 $as_executable_p "$ac_dir/$ac_word" || continue
5030 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
5031 echo "$as_me:5031: found $ac_dir/$ac_word" >&5
5037 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
5038 if test -n "$ac_ct_NCURSES_CONFIG"; then
5039 echo "$as_me:5039: result: $ac_ct_NCURSES_CONFIG" >&5
5040 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
5042 echo "$as_me:5042: result: no" >&5
5043 echo "${ECHO_T}no" >&6
5046 test -n "$ac_ct_NCURSES_CONFIG" && break
5048 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
5050 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
5053 if test "$NCURSES_CONFIG" != none ; then
5058 cf_new_extra_cppflags=
5060 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
5062 case "$cf_fix_cppflags" in
5064 case "$cf_add_cflags" in
5065 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5066 case "$cf_add_cflags" in
5068 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5070 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5071 && test -z "${cf_tst_cflags}" \
5072 && cf_fix_cppflags=yes
5074 if test "$cf_fix_cppflags" = yes ; then
5076 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5077 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5080 elif test "${cf_tst_cflags}" = "\"'" ; then
5082 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5083 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5093 case "$cf_add_cflags" in
5095 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5097 CPPFLAGS=`echo "$CPPFLAGS" | \
5098 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5099 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5104 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5105 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5112 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5113 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5120 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5121 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5123 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5125 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5126 && test -z "${cf_tst_cflags}" \
5127 && cf_fix_cppflags=no
5132 if test -n "$cf_new_cflags" ; then
5134 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5135 CFLAGS="${CFLAGS}$cf_new_cflags"
5139 if test -n "$cf_new_cppflags" ; then
5141 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5142 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5146 if test -n "$cf_new_extra_cppflags" ; then
5148 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5149 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5156 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5158 for cf_add_1lib in $cf_add_0lib; do
5159 for cf_add_2lib in $cf_add_libs; do
5160 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5165 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5169 # even with config script, some packages use no-override for curses.h
5171 echo "$as_me:5171: checking if we have identified curses headers" >&5
5172 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5173 if test "${cf_cv_ncurses_header+set}" = set; then
5174 echo $ECHO_N "(cached) $ECHO_C" >&6
5177 cf_cv_ncurses_header=none
5179 ncurses.h ncurses/ncurses.h \
5180 curses.h ncurses/curses.h
5182 cat >"conftest.$ac_ext" <<_ACEOF
5183 #line 5183 "configure"
5184 #include "confdefs.h"
5185 #include <${cf_header}>
5189 initscr(); tgoto("?", 0,0)
5194 rm -f "conftest.$ac_objext"
5195 if { (eval echo "$as_me:5195: \"$ac_compile\"") >&5
5196 (eval $ac_compile) 2>&5
5198 echo "$as_me:5198: \$? = $ac_status" >&5
5199 (exit "$ac_status"); } &&
5200 { ac_try='test -s "conftest.$ac_objext"'
5201 { (eval echo "$as_me:5201: \"$ac_try\"") >&5
5204 echo "$as_me:5204: \$? = $ac_status" >&5
5205 (exit "$ac_status"); }; }; then
5206 cf_cv_ncurses_header=$cf_header; break
5208 echo "$as_me: failed program was:" >&5
5209 cat "conftest.$ac_ext" >&5
5211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5215 echo "$as_me:5215: result: $cf_cv_ncurses_header" >&5
5216 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5218 if test "$cf_cv_ncurses_header" = none ; then
5219 { { echo "$as_me:5219: error: No curses header-files found" >&5
5220 echo "$as_me: error: No curses header-files found" >&2;}
5221 { (exit 1); exit 1; }; }
5224 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5226 for ac_header in $cf_cv_ncurses_header
5228 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5229 echo "$as_me:5229: checking for $ac_header" >&5
5230 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5231 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5232 echo $ECHO_N "(cached) $ECHO_C" >&6
5234 cat >"conftest.$ac_ext" <<_ACEOF
5235 #line 5235 "configure"
5236 #include "confdefs.h"
5237 #include <$ac_header>
5239 if { (eval echo "$as_me:5239: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5240 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5242 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5244 cat conftest.err >&5
5245 echo "$as_me:5245: \$? = $ac_status" >&5
5246 (exit "$ac_status"); } >/dev/null; then
5247 if test -s conftest.err; then
5248 ac_cpp_err=$ac_c_preproc_warn_flag
5255 if test -z "$ac_cpp_err"; then
5256 eval "$as_ac_Header=yes"
5258 echo "$as_me: failed program was:" >&5
5259 cat "conftest.$ac_ext" >&5
5260 eval "$as_ac_Header=no"
5262 rm -f conftest.err "conftest.$ac_ext"
5264 echo "$as_me:5264: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5265 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5266 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5267 cat >>confdefs.h <<EOF
5268 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5274 cat >>confdefs.h <<\EOF
5278 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5280 cat >>confdefs.h <<EOF
5281 #define $cf_nculib_ROOT 1
5284 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
5288 cf_ncuhdr_root=ncurses
5290 test -n "$cf_cv_curses_dir" && \
5291 test "$cf_cv_curses_dir" != "no" && { \
5293 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5294 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
5296 while test "$cf_add_incdir" != /usr/include
5298 if test -d "$cf_add_incdir"
5301 if test -n "$CFLAGS$CPPFLAGS" ; then
5302 # a loop is needed to ensure we can add subdirs of existing dirs
5303 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5304 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5305 cf_have_incdir=yes; break
5310 if test "$cf_have_incdir" = no ; then
5311 if test "$cf_add_incdir" = /usr/local/include ; then
5312 if test "$GCC" = yes
5314 cf_save_CPPFLAGS=$CPPFLAGS
5316 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5317 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5319 cat >"conftest.$ac_ext" <<_ACEOF
5320 #line 5320 "configure"
5321 #include "confdefs.h"
5331 rm -f "conftest.$ac_objext"
5332 if { (eval echo "$as_me:5332: \"$ac_compile\"") >&5
5333 (eval $ac_compile) 2>&5
5335 echo "$as_me:5335: \$? = $ac_status" >&5
5336 (exit "$ac_status"); } &&
5337 { ac_try='test -s "conftest.$ac_objext"'
5338 { (eval echo "$as_me:5338: \"$ac_try\"") >&5
5341 echo "$as_me:5341: \$? = $ac_status" >&5
5342 (exit "$ac_status"); }; }; then
5345 echo "$as_me: failed program was:" >&5
5346 cat "conftest.$ac_ext" >&5
5349 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5350 CPPFLAGS=$cf_save_CPPFLAGS
5355 if test "$cf_have_incdir" = no ; then
5356 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5358 echo "${as_me:-configure}:5358: testing adding $cf_add_incdir to include-path ..." 1>&5
5360 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5362 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5363 test "$cf_top_incdir" = "$cf_add_incdir" && break
5364 cf_add_incdir="$cf_top_incdir"
5377 echo "$as_me:5377: checking for $cf_ncuhdr_root header in include-path" >&5
5378 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
5379 if test "${cf_cv_ncurses_h+set}" = set; then
5380 echo $ECHO_N "(cached) $ECHO_C" >&6
5383 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5384 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
5385 for cf_header in $cf_header_list
5388 cat >"conftest.$ac_ext" <<_ACEOF
5389 #line 5389 "configure"
5390 #include "confdefs.h"
5392 #include <$cf_header>
5397 #ifdef NCURSES_VERSION
5399 printf("%s\\n", NCURSES_VERSION);
5412 rm -f "conftest.$ac_objext"
5413 if { (eval echo "$as_me:5413: \"$ac_compile\"") >&5
5414 (eval $ac_compile) 2>&5
5416 echo "$as_me:5416: \$? = $ac_status" >&5
5417 (exit "$ac_status"); } &&
5418 { ac_try='test -s "conftest.$ac_objext"'
5419 { (eval echo "$as_me:5419: \"$ac_try\"") >&5
5422 echo "$as_me:5422: \$? = $ac_status" >&5
5423 (exit "$ac_status"); }; }; then
5424 cf_cv_ncurses_h=$cf_header
5427 echo "$as_me: failed program was:" >&5
5428 cat "conftest.$ac_ext" >&5
5431 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5433 test "$cf_cv_ncurses_h" != no && break
5437 echo "$as_me:5437: result: $cf_cv_ncurses_h" >&5
5438 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
5440 if test "$cf_cv_ncurses_h" != no ; then
5441 cf_cv_ncurses_header=$cf_cv_ncurses_h
5444 echo "$as_me:5444: checking for $cf_ncuhdr_root include-path" >&5
5445 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
5446 if test "${cf_cv_ncurses_h2+set}" = set; then
5447 echo $ECHO_N "(cached) $ECHO_C" >&6
5450 test -n "$verbose" && echo
5454 # collect the current set of include-directories from compiler flags
5455 cf_header_path_list=""
5456 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5457 for cf_header_path in $CPPFLAGS $CFLAGS
5459 case "$cf_header_path" in
5461 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5463 test "x$cf_header_path" != "xNONE" && \
5464 test -d "$cf_header_path" && \
5466 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5467 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
5468 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5469 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5470 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5471 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"
5474 cf_header_path_list="$cf_header_path_list $cf_search"
5480 # add the variations for the package we are looking for
5484 test "x$prefix" != "xNONE" && \
5485 test -d "$prefix" && \
5487 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5488 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
5489 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5490 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5491 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5492 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5495 for cf_subdir_prefix in \
5504 test "x$cf_subdir_prefix" != "x$prefix" && \
5505 test -d "$cf_subdir_prefix" && \
5506 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
5507 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
5508 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
5509 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
5510 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
5511 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
5512 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"
5517 test "$includedir" != NONE && \
5518 test "$includedir" != "/usr/include" && \
5519 test -d "$includedir" && {
5520 test -d "$includedir" && cf_search="$cf_search $includedir"
5521 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5524 test "$oldincludedir" != NONE && \
5525 test "$oldincludedir" != "/usr/include" && \
5526 test -d "$oldincludedir" && {
5527 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
5528 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5531 cf_search="$cf_search $cf_header_path_list"
5533 test -n "$verbose" && echo "search path $cf_search"
5534 cf_save2_CPPFLAGS="$CPPFLAGS"
5535 for cf_incdir in $cf_search
5538 if test -n "$cf_incdir" ; then
5539 for cf_add_incdir in $cf_incdir
5541 while test "$cf_add_incdir" != /usr/include
5543 if test -d "$cf_add_incdir"
5546 if test -n "$CFLAGS$CPPFLAGS" ; then
5547 # a loop is needed to ensure we can add subdirs of existing dirs
5548 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5549 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5550 cf_have_incdir=yes; break
5555 if test "$cf_have_incdir" = no ; then
5556 if test "$cf_add_incdir" = /usr/local/include ; then
5557 if test "$GCC" = yes
5559 cf_save_CPPFLAGS=$CPPFLAGS
5561 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5562 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5564 cat >"conftest.$ac_ext" <<_ACEOF
5565 #line 5565 "configure"
5566 #include "confdefs.h"
5576 rm -f "conftest.$ac_objext"
5577 if { (eval echo "$as_me:5577: \"$ac_compile\"") >&5
5578 (eval $ac_compile) 2>&5
5580 echo "$as_me:5580: \$? = $ac_status" >&5
5581 (exit "$ac_status"); } &&
5582 { ac_try='test -s "conftest.$ac_objext"'
5583 { (eval echo "$as_me:5583: \"$ac_try\"") >&5
5586 echo "$as_me:5586: \$? = $ac_status" >&5
5587 (exit "$ac_status"); }; }; then
5590 echo "$as_me: failed program was:" >&5
5591 cat "conftest.$ac_ext" >&5
5594 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5595 CPPFLAGS=$cf_save_CPPFLAGS
5600 if test "$cf_have_incdir" = no ; then
5601 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5603 echo "${as_me:-configure}:5603: testing adding $cf_add_incdir to include-path ..." 1>&5
5605 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5607 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5608 test "$cf_top_incdir" = "$cf_add_incdir" && break
5609 cf_add_incdir="$cf_top_incdir"
5625 cat >"conftest.$ac_ext" <<_ACEOF
5626 #line 5626 "configure"
5627 #include "confdefs.h"
5629 #include <$cf_header>
5634 #ifdef NCURSES_VERSION
5636 printf("%s\\n", NCURSES_VERSION);
5649 rm -f "conftest.$ac_objext"
5650 if { (eval echo "$as_me:5650: \"$ac_compile\"") >&5
5651 (eval $ac_compile) 2>&5
5653 echo "$as_me:5653: \$? = $ac_status" >&5
5654 (exit "$ac_status"); } &&
5655 { ac_try='test -s "conftest.$ac_objext"'
5656 { (eval echo "$as_me:5656: \"$ac_try\"") >&5
5659 echo "$as_me:5659: \$? = $ac_status" >&5
5660 (exit "$ac_status"); }; }; then
5661 cf_cv_ncurses_h2=$cf_header
5664 echo "$as_me: failed program was:" >&5
5665 cat "conftest.$ac_ext" >&5
5668 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5670 if test "$cf_cv_ncurses_h2" != no ; then
5671 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5672 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
5675 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5677 CPPFLAGS="$cf_save2_CPPFLAGS"
5678 test "$cf_cv_ncurses_h2" != no && break
5680 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:5680: error: not found" >&5
5681 echo "$as_me: error: not found" >&2;}
5682 { (exit 1); exit 1; }; }
5685 echo "$as_me:5685: result: $cf_cv_ncurses_h2" >&5
5686 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
5688 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
5689 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
5690 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
5691 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
5694 if test -n "$cf_1st_incdir" ; then
5695 for cf_add_incdir in $cf_1st_incdir
5697 while test "$cf_add_incdir" != /usr/include
5699 if test -d "$cf_add_incdir"
5702 if test -n "$CFLAGS$CPPFLAGS" ; then
5703 # a loop is needed to ensure we can add subdirs of existing dirs
5704 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5705 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5706 cf_have_incdir=yes; break
5711 if test "$cf_have_incdir" = no ; then
5712 if test "$cf_add_incdir" = /usr/local/include ; then
5713 if test "$GCC" = yes
5715 cf_save_CPPFLAGS=$CPPFLAGS
5717 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5718 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
5720 cat >"conftest.$ac_ext" <<_ACEOF
5721 #line 5721 "configure"
5722 #include "confdefs.h"
5732 rm -f "conftest.$ac_objext"
5733 if { (eval echo "$as_me:5733: \"$ac_compile\"") >&5
5734 (eval $ac_compile) 2>&5
5736 echo "$as_me:5736: \$? = $ac_status" >&5
5737 (exit "$ac_status"); } &&
5738 { ac_try='test -s "conftest.$ac_objext"'
5739 { (eval echo "$as_me:5739: \"$ac_try\"") >&5
5742 echo "$as_me:5742: \$? = $ac_status" >&5
5743 (exit "$ac_status"); }; }; then
5746 echo "$as_me: failed program was:" >&5
5747 cat "conftest.$ac_ext" >&5
5750 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5751 CPPFLAGS=$cf_save_CPPFLAGS
5756 if test "$cf_have_incdir" = no ; then
5757 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5759 echo "${as_me:-configure}:5759: testing adding $cf_add_incdir to include-path ..." 1>&5
5761 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5763 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
5764 test "$cf_top_incdir" = "$cf_add_incdir" && break
5765 cf_add_incdir="$cf_top_incdir"
5778 # Set definitions to allow ifdef'ing for ncurses.h
5780 case "$cf_cv_ncurses_header" in
5783 cat >>confdefs.h <<\EOF
5784 #define HAVE_NCURSES_H 1
5790 case "$cf_cv_ncurses_header" in
5791 (ncurses/curses.h|ncurses/ncurses.h)
5793 cat >>confdefs.h <<\EOF
5794 #define HAVE_NCURSES_NCURSES_H 1
5798 (ncursesw/curses.h|ncursesw/ncurses.h)
5800 cat >>confdefs.h <<\EOF
5801 #define HAVE_NCURSESW_NCURSES_H 1
5807 echo "$as_me:5807: checking for terminfo header" >&5
5808 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5809 if test "${cf_cv_term_header+set}" = set; then
5810 echo $ECHO_N "(cached) $ECHO_C" >&6
5813 case "${cf_cv_ncurses_header}" in
5814 (*/ncurses.h|*/ncursesw.h)
5815 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5818 cf_term_header=term.h
5822 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5824 cat >"conftest.$ac_ext" <<_ACEOF
5825 #line 5825 "configure"
5826 #include "confdefs.h"
5828 #include <${cf_cv_ncurses_header:-curses.h}>
5834 int x = auto_left_margin; (void)x
5839 rm -f "conftest.$ac_objext"
5840 if { (eval echo "$as_me:5840: \"$ac_compile\"") >&5
5841 (eval $ac_compile) 2>&5
5843 echo "$as_me:5843: \$? = $ac_status" >&5
5844 (exit "$ac_status"); } &&
5845 { ac_try='test -s "conftest.$ac_objext"'
5846 { (eval echo "$as_me:5846: \"$ac_try\"") >&5
5849 echo "$as_me:5849: \$? = $ac_status" >&5
5850 (exit "$ac_status"); }; }; then
5852 cf_cv_term_header="$cf_test"
5854 echo "$as_me: failed program was:" >&5
5855 cat "conftest.$ac_ext" >&5
5857 cf_cv_term_header=unknown
5860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5861 test "$cf_cv_term_header" != unknown && break
5865 echo "$as_me:5865: result: $cf_cv_term_header" >&5
5866 echo "${ECHO_T}$cf_cv_term_header" >&6
5868 # Set definitions to allow ifdef'ing to accommodate subdirectories
5870 case "$cf_cv_term_header" in
5873 cat >>confdefs.h <<\EOF
5874 #define HAVE_TERM_H 1
5880 case "$cf_cv_term_header" in
5883 cat >>confdefs.h <<\EOF
5884 #define HAVE_NCURSES_TERM_H 1
5890 cat >>confdefs.h <<\EOF
5891 #define HAVE_NCURSESW_TERM_H 1
5897 # some applications need this, but should check for NCURSES_VERSION
5899 cat >>confdefs.h <<\EOF
5903 echo "$as_me:5903: checking for ncurses version" >&5
5904 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5905 if test "${cf_cv_ncurses_version+set}" = set; then
5906 echo $ECHO_N "(cached) $ECHO_C" >&6
5909 cf_cv_ncurses_version=no
5911 rm -f "$cf_tempfile"
5912 if test "$cross_compiling" = yes; then
5914 # This will not work if the preprocessor splits the line after the
5915 # Autoconf token. The 'unproto' program does that.
5916 cat > "conftest.$ac_ext" <<EOF
5917 #include <${cf_cv_ncurses_header:-curses.h}>
5919 #ifdef NCURSES_VERSION
5920 Autoconf NCURSES_VERSION
5928 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5929 { (eval echo "$as_me:5929: \"$cf_try\"") >&5
5932 echo "$as_me:5932: \$? = $ac_status" >&5
5933 (exit "$ac_status"); }
5934 if test -f conftest.out ; then
5935 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
5936 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5941 cat >"conftest.$ac_ext" <<_ACEOF
5942 #line 5942 "configure"
5943 #include "confdefs.h"
5945 #include <${cf_cv_ncurses_header:-curses.h}>
5949 FILE *fp = fopen("$cf_tempfile", "w");
5950 #ifdef NCURSES_VERSION
5951 # ifdef NCURSES_VERSION_PATCH
5952 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5954 fprintf(fp, "%s\\n", NCURSES_VERSION);
5958 fprintf(fp, "old\\n");
5963 ${cf_cv_main_return:-return}(0);
5966 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
5972 { (eval echo "$as_me:5972: \"$ac_try\"") >&5
5975 echo "$as_me:5975: \$? = $ac_status" >&5
5976 (exit "$ac_status"); }; }; then
5978 cf_cv_ncurses_version=`cat $cf_tempfile`
5980 echo "$as_me: program exited with status $ac_status" >&5
5981 echo "$as_me: failed program was:" >&5
5982 cat "conftest.$ac_ext" >&5
5984 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5986 rm -f "$cf_tempfile"
5989 echo "$as_me:5989: result: $cf_cv_ncurses_version" >&5
5990 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5991 test "$cf_cv_ncurses_version" = no ||
5992 cat >>confdefs.h <<\EOF
5996 cf_nculib_root=ncurses
5997 # This works, except for the special case where we find gpm, but
5998 # ncurses is in a nonstandard location via $LIBS, and we really want
6001 cf_ncurses_SAVE="$LIBS"
6002 echo "$as_me:6002: checking for Gpm_Open in -lgpm" >&5
6003 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6004 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6005 echo $ECHO_N "(cached) $ECHO_C" >&6
6007 ac_check_lib_save_LIBS=$LIBS
6009 cat >"conftest.$ac_ext" <<_ACEOF
6010 #line 6010 "configure"
6011 #include "confdefs.h"
6013 /* Override any gcc2 internal prototype to avoid an error. */
6017 /* We use char because int might match the return type of a gcc2
6018 builtin and then its argument prototype would still apply. */
6028 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6029 if { (eval echo "$as_me:6029: \"$ac_link\"") >&5
6030 (eval $ac_link) 2>&5
6032 echo "$as_me:6032: \$? = $ac_status" >&5
6033 (exit "$ac_status"); } &&
6034 { ac_try='test -s "conftest$ac_exeext"'
6035 { (eval echo "$as_me:6035: \"$ac_try\"") >&5
6038 echo "$as_me:6038: \$? = $ac_status" >&5
6039 (exit "$ac_status"); }; }; then
6040 ac_cv_lib_gpm_Gpm_Open=yes
6042 echo "$as_me: failed program was:" >&5
6043 cat "conftest.$ac_ext" >&5
6044 ac_cv_lib_gpm_Gpm_Open=no
6046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6047 LIBS=$ac_check_lib_save_LIBS
6049 echo "$as_me:6049: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6050 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6051 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
6052 echo "$as_me:6052: checking for initscr in -lgpm" >&5
6053 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
6054 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
6055 echo $ECHO_N "(cached) $ECHO_C" >&6
6057 ac_check_lib_save_LIBS=$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_gpm_initscr=yes
6092 echo "$as_me: failed program was:" >&5
6093 cat "conftest.$ac_ext" >&5
6094 ac_cv_lib_gpm_initscr=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_gpm_initscr" >&5
6100 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
6101 if test "$ac_cv_lib_gpm_initscr" = yes; then
6102 LIBS="$cf_ncurses_SAVE"
6104 cf_ncurses_LIBS="-lgpm"
6111 # This is only necessary if you are linking against an obsolete
6112 # version of ncurses (but it should do no harm, since it's static).
6113 if test "$cf_nculib_root" = ncurses ; then
6114 echo "$as_me:6114: checking for tgoto in -lmytinfo" >&5
6115 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
6116 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
6117 echo $ECHO_N "(cached) $ECHO_C" >&6
6119 ac_check_lib_save_LIBS=$LIBS
6120 LIBS="-lmytinfo $LIBS"
6121 cat >"conftest.$ac_ext" <<_ACEOF
6122 #line 6122 "configure"
6123 #include "confdefs.h"
6125 /* Override any gcc2 internal prototype to avoid an error. */
6129 /* We use char because int might match the return type of a gcc2
6130 builtin and then its argument prototype would still apply. */
6140 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6141 if { (eval echo "$as_me:6141: \"$ac_link\"") >&5
6142 (eval $ac_link) 2>&5
6144 echo "$as_me:6144: \$? = $ac_status" >&5
6145 (exit "$ac_status"); } &&
6146 { ac_try='test -s "conftest$ac_exeext"'
6147 { (eval echo "$as_me:6147: \"$ac_try\"") >&5
6150 echo "$as_me:6150: \$? = $ac_status" >&5
6151 (exit "$ac_status"); }; }; then
6152 ac_cv_lib_mytinfo_tgoto=yes
6154 echo "$as_me: failed program was:" >&5
6155 cat "conftest.$ac_ext" >&5
6156 ac_cv_lib_mytinfo_tgoto=no
6158 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6159 LIBS=$ac_check_lib_save_LIBS
6161 echo "$as_me:6161: result: $ac_cv_lib_mytinfo_tgoto" >&5
6162 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
6163 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
6164 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6174 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6176 for cf_add_1lib in $cf_add_0lib; do
6177 for cf_add_2lib in $cf_add_libs; do
6178 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6183 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6187 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6193 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6195 for cf_add_1lib in $cf_add_0lib; do
6196 for cf_add_2lib in $cf_add_libs; do
6197 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6202 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6208 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
6210 echo "$as_me:6210: checking for initscr" >&5
6211 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
6212 if test "${ac_cv_func_initscr+set}" = set; then
6213 echo $ECHO_N "(cached) $ECHO_C" >&6
6215 cat >"conftest.$ac_ext" <<_ACEOF
6216 #line 6216 "configure"
6217 #include "confdefs.h"
6218 #define initscr autoconf_temporary
6219 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
6226 /* We use char because int might match the return type of a gcc2
6227 builtin and then its argument prototype would still apply. */
6228 char initscr (void);
6234 /* The GNU C library defines stubs for functions which it implements
6235 to always fail with ENOSYS. Some functions are actually named
6236 something starting with __ and the normal name is an alias. */
6237 #if defined (__stub_initscr) || defined (__stub___initscr)
6238 #error found stub for initscr
6246 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6247 if { (eval echo "$as_me:6247: \"$ac_link\"") >&5
6248 (eval $ac_link) 2>&5
6250 echo "$as_me:6250: \$? = $ac_status" >&5
6251 (exit "$ac_status"); } &&
6252 { ac_try='test -s "conftest$ac_exeext"'
6253 { (eval echo "$as_me:6253: \"$ac_try\"") >&5
6256 echo "$as_me:6256: \$? = $ac_status" >&5
6257 (exit "$ac_status"); }; }; then
6258 ac_cv_func_initscr=yes
6260 echo "$as_me: failed program was:" >&5
6261 cat "conftest.$ac_ext" >&5
6262 ac_cv_func_initscr=no
6264 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6266 echo "$as_me:6266: result: $ac_cv_func_initscr" >&5
6267 echo "${ECHO_T}$ac_cv_func_initscr" >&6
6268 if test "$ac_cv_func_initscr" = yes; then
6269 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6272 cf_save_LIBS="$LIBS"
6273 echo "$as_me:6273: checking for initscr in -l$cf_nculib_root" >&5
6274 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
6275 LIBS="-l$cf_nculib_root $LIBS"
6276 cat >"conftest.$ac_ext" <<_ACEOF
6277 #line 6277 "configure"
6278 #include "confdefs.h"
6279 #include <${cf_cv_ncurses_header:-curses.h}>
6288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6289 if { (eval echo "$as_me:6289: \"$ac_link\"") >&5
6290 (eval $ac_link) 2>&5
6292 echo "$as_me:6292: \$? = $ac_status" >&5
6293 (exit "$ac_status"); } &&
6294 { ac_try='test -s "conftest$ac_exeext"'
6295 { (eval echo "$as_me:6295: \"$ac_try\"") >&5
6298 echo "$as_me:6298: \$? = $ac_status" >&5
6299 (exit "$ac_status"); }; }; then
6300 echo "$as_me:6300: result: yes" >&5
6301 echo "${ECHO_T}yes" >&6
6302 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6305 echo "$as_me: failed program was:" >&5
6306 cat "conftest.$ac_ext" >&5
6307 echo "$as_me:6307: result: no" >&5
6308 echo "${ECHO_T}no" >&6
6311 cf_library_path_list=""
6312 if test -n "${LDFLAGS}${LIBS}" ; then
6313 for cf_library_path in $LDFLAGS $LIBS
6315 case "$cf_library_path" in
6317 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6319 test "x$cf_library_path" != "xNONE" && \
6320 test -d "$cf_library_path" && \
6322 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6323 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6324 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6325 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6326 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6327 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"
6330 cf_library_path_list="$cf_library_path_list $cf_search"
6338 test "x$prefix" != "xNONE" && \
6339 test -d "$prefix" && \
6341 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6342 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6343 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6344 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6345 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6346 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6349 for cf_subdir_prefix in \
6358 test "x$cf_subdir_prefix" != "x$prefix" && \
6359 test -d "$cf_subdir_prefix" && \
6360 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6361 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6362 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6363 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
6364 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
6365 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
6366 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"
6371 cf_search="$cf_library_path_list $cf_search"
6373 for cf_libdir in $cf_search
6375 echo "$as_me:6375: checking for -l$cf_nculib_root in $cf_libdir" >&5
6376 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
6377 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6378 cat >"conftest.$ac_ext" <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #include <${cf_cv_ncurses_header:-curses.h}>
6390 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6391 if { (eval echo "$as_me:6391: \"$ac_link\"") >&5
6392 (eval $ac_link) 2>&5
6394 echo "$as_me:6394: \$? = $ac_status" >&5
6395 (exit "$ac_status"); } &&
6396 { ac_try='test -s "conftest$ac_exeext"'
6397 { (eval echo "$as_me:6397: \"$ac_try\"") >&5
6400 echo "$as_me:6400: \$? = $ac_status" >&5
6401 (exit "$ac_status"); }; }; then
6402 echo "$as_me:6402: result: yes" >&5
6403 echo "${ECHO_T}yes" >&6
6404 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
6407 echo "$as_me: failed program was:" >&5
6408 cat "conftest.$ac_ext" >&5
6409 echo "$as_me:6409: result: no" >&5
6410 echo "${ECHO_T}no" >&6
6411 LIBS="$cf_save_LIBS"
6413 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6417 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6421 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
6423 if test "$cf_found_library" = no ; then
6424 { { echo "$as_me:6424: error: Cannot link $cf_nculib_root library" >&5
6425 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
6426 { (exit 1); exit 1; }; }
6431 if test -n "$cf_ncurses_LIBS" ; then
6432 echo "$as_me:6432: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6433 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
6434 cf_ncurses_SAVE="$LIBS"
6435 for p in $cf_ncurses_LIBS ; do
6436 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
6437 if test "$q" != "$LIBS" ; then
6441 cat >"conftest.$ac_ext" <<_ACEOF
6442 #line 6442 "configure"
6443 #include "confdefs.h"
6444 #include <${cf_cv_ncurses_header:-curses.h}>
6448 initscr(); mousemask(0,0); tigetstr((char *)0);
6453 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6454 if { (eval echo "$as_me:6454: \"$ac_link\"") >&5
6455 (eval $ac_link) 2>&5
6457 echo "$as_me:6457: \$? = $ac_status" >&5
6458 (exit "$ac_status"); } &&
6459 { ac_try='test -s "conftest$ac_exeext"'
6460 { (eval echo "$as_me:6460: \"$ac_try\"") >&5
6463 echo "$as_me:6463: \$? = $ac_status" >&5
6464 (exit "$ac_status"); }; }; then
6465 echo "$as_me:6465: result: yes" >&5
6466 echo "${ECHO_T}yes" >&6
6468 echo "$as_me: failed program was:" >&5
6469 cat "conftest.$ac_ext" >&5
6470 echo "$as_me:6470: result: no" >&5
6471 echo "${ECHO_T}no" >&6
6472 LIBS="$cf_ncurses_SAVE"
6474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6477 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6479 cat >>confdefs.h <<EOF
6480 #define $cf_nculib_ROOT 1
6488 echo "$as_me:6488: checking if you want wide-character code" >&5
6489 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6491 # Check whether --enable-widec or --disable-widec was given.
6492 if test "${enable_widec+set}" = set; then
6493 enableval="$enable_widec"
6494 with_widec=$enableval
6498 echo "$as_me:6498: result: $with_widec" >&5
6499 echo "${ECHO_T}$with_widec" >&6
6500 if test "$with_widec" = yes ; then
6502 for ac_header in wchar.h
6504 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6505 echo "$as_me:6505: checking for $ac_header" >&5
6506 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6507 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6508 echo $ECHO_N "(cached) $ECHO_C" >&6
6510 cat >"conftest.$ac_ext" <<_ACEOF
6511 #line 6511 "configure"
6512 #include "confdefs.h"
6513 #include <$ac_header>
6515 if { (eval echo "$as_me:6515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6520 cat conftest.err >&5
6521 echo "$as_me:6521: \$? = $ac_status" >&5
6522 (exit "$ac_status"); } >/dev/null; then
6523 if test -s conftest.err; then
6524 ac_cpp_err=$ac_c_preproc_warn_flag
6531 if test -z "$ac_cpp_err"; then
6532 eval "$as_ac_Header=yes"
6534 echo "$as_me: failed program was:" >&5
6535 cat "conftest.$ac_ext" >&5
6536 eval "$as_ac_Header=no"
6538 rm -f conftest.err "conftest.$ac_ext"
6540 echo "$as_me:6540: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6541 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6542 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6543 cat >>confdefs.h <<EOF
6544 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6550 echo "$as_me:6550: checking for multibyte character support" >&5
6551 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
6552 if test "${cf_cv_utf8_lib+set}" = set; then
6553 echo $ECHO_N "(cached) $ECHO_C" >&6
6556 cf_save_LIBS="$LIBS"
6557 cat >"conftest.$ac_ext" <<_ACEOF
6558 #line 6558 "configure"
6559 #include "confdefs.h"
6575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6576 if { (eval echo "$as_me:6576: \"$ac_link\"") >&5
6577 (eval $ac_link) 2>&5
6579 echo "$as_me:6579: \$? = $ac_status" >&5
6580 (exit "$ac_status"); } &&
6581 { ac_try='test -s "conftest$ac_exeext"'
6582 { (eval echo "$as_me:6582: \"$ac_try\"") >&5
6585 echo "$as_me:6585: \$? = $ac_status" >&5
6586 (exit "$ac_status"); }; }; then
6589 echo "$as_me: failed program was:" >&5
6590 cat "conftest.$ac_ext" >&5
6592 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
6593 # will be set on completion of the AC_TRY_LINK below.
6594 cf_cv_header_path_utf8=
6595 cf_cv_library_path_utf8=
6597 echo "${as_me:-configure}:6597: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
6599 cf_save_LIBS="$LIBS"
6601 cat >"conftest.$ac_ext" <<_ACEOF
6602 #line 6602 "configure"
6603 #include "confdefs.h"
6605 #include <libutf8.h>
6614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6615 if { (eval echo "$as_me:6615: \"$ac_link\"") >&5
6616 (eval $ac_link) 2>&5
6618 echo "$as_me:6618: \$? = $ac_status" >&5
6619 (exit "$ac_status"); } &&
6620 { ac_try='test -s "conftest$ac_exeext"'
6621 { (eval echo "$as_me:6621: \"$ac_try\"") >&5
6624 echo "$as_me:6624: \$? = $ac_status" >&5
6625 (exit "$ac_status"); }; }; then
6627 cf_cv_find_linkage_utf8=yes
6628 cf_cv_header_path_utf8=/usr/include
6629 cf_cv_library_path_utf8=/usr/lib
6632 echo "$as_me: failed program was:" >&5
6633 cat "conftest.$ac_ext" >&5
6635 LIBS="-lutf8 $cf_save_LIBS"
6637 cat >"conftest.$ac_ext" <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6641 #include <libutf8.h>
6650 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6651 if { (eval echo "$as_me:6651: \"$ac_link\"") >&5
6652 (eval $ac_link) 2>&5
6654 echo "$as_me:6654: \$? = $ac_status" >&5
6655 (exit "$ac_status"); } &&
6656 { ac_try='test -s "conftest$ac_exeext"'
6657 { (eval echo "$as_me:6657: \"$ac_try\"") >&5
6660 echo "$as_me:6660: \$? = $ac_status" >&5
6661 (exit "$ac_status"); }; }; then
6663 cf_cv_find_linkage_utf8=yes
6664 cf_cv_header_path_utf8=/usr/include
6665 cf_cv_library_path_utf8=/usr/lib
6666 cf_cv_library_file_utf8="-lutf8"
6669 echo "$as_me: failed program was:" >&5
6670 cat "conftest.$ac_ext" >&5
6672 cf_cv_find_linkage_utf8=no
6673 LIBS="$cf_save_LIBS"
6675 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
6677 echo "${as_me:-configure}:6677: testing find linkage for utf8 library ..." 1>&5
6679 echo "${as_me:-configure}:6679: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
6681 cf_save_CPPFLAGS="$CPPFLAGS"
6682 cf_test_CPPFLAGS="$CPPFLAGS"
6686 # collect the current set of include-directories from compiler flags
6687 cf_header_path_list=""
6688 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6689 for cf_header_path in $CPPFLAGS $CFLAGS
6691 case "$cf_header_path" in
6693 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6695 test "x$cf_header_path" != "xNONE" && \
6696 test -d "$cf_header_path" && \
6698 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6699 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
6700 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
6701 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
6702 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
6703 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
6706 cf_header_path_list="$cf_header_path_list $cf_search"
6712 # add the variations for the package we are looking for
6716 test "x$prefix" != "xNONE" && \
6717 test -d "$prefix" && \
6719 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6720 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
6721 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
6722 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
6723 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
6724 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
6727 for cf_subdir_prefix in \
6736 test "x$cf_subdir_prefix" != "x$prefix" && \
6737 test -d "$cf_subdir_prefix" && \
6738 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6739 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
6740 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
6741 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
6742 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
6743 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
6744 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
6749 test "$includedir" != NONE && \
6750 test "$includedir" != "/usr/include" && \
6751 test -d "$includedir" && {
6752 test -d "$includedir" && cf_search="$cf_search $includedir"
6753 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
6756 test "$oldincludedir" != NONE && \
6757 test "$oldincludedir" != "/usr/include" && \
6758 test -d "$oldincludedir" && {
6759 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
6760 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
6763 cf_search="$cf_search $cf_header_path_list"
6765 for cf_cv_header_path_utf8 in $cf_search
6767 if test -d "$cf_cv_header_path_utf8" ; then
6768 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
6770 echo "${as_me:-configure}:6770: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
6772 CPPFLAGS="$cf_save_CPPFLAGS"
6774 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6775 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
6777 cat >"conftest.$ac_ext" <<_ACEOF
6778 #line 6778 "configure"
6779 #include "confdefs.h"
6781 #include <libutf8.h>
6790 rm -f "conftest.$ac_objext"
6791 if { (eval echo "$as_me:6791: \"$ac_compile\"") >&5
6792 (eval $ac_compile) 2>&5
6794 echo "$as_me:6794: \$? = $ac_status" >&5
6795 (exit "$ac_status"); } &&
6796 { ac_try='test -s "conftest.$ac_objext"'
6797 { (eval echo "$as_me:6797: \"$ac_try\"") >&5
6800 echo "$as_me:6800: \$? = $ac_status" >&5
6801 (exit "$ac_status"); }; }; then
6803 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
6805 echo "${as_me:-configure}:6805: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
6807 cf_cv_find_linkage_utf8=maybe
6808 cf_test_CPPFLAGS="$CPPFLAGS"
6811 echo "$as_me: failed program was:" >&5
6812 cat "conftest.$ac_ext" >&5
6814 CPPFLAGS="$cf_save_CPPFLAGS"
6817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6821 if test "$cf_cv_find_linkage_utf8" = maybe ; then
6823 echo "${as_me:-configure}:6823: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
6825 cf_save_LIBS="$LIBS"
6826 cf_save_LDFLAGS="$LDFLAGS"
6828 if test "$cf_cv_find_linkage_utf8" != yes ; then
6831 cf_library_path_list=""
6832 if test -n "${LDFLAGS}${LIBS}" ; then
6833 for cf_library_path in $LDFLAGS $LIBS
6835 case "$cf_library_path" in
6837 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6839 test "x$cf_library_path" != "xNONE" && \
6840 test -d "$cf_library_path" && \
6842 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6843 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
6844 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
6845 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
6846 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
6847 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
6850 cf_library_path_list="$cf_library_path_list $cf_search"
6858 test "x$prefix" != "xNONE" && \
6859 test -d "$prefix" && \
6861 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6862 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
6863 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
6864 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
6865 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
6866 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
6869 for cf_subdir_prefix in \
6878 test "x$cf_subdir_prefix" != "x$prefix" && \
6879 test -d "$cf_subdir_prefix" && \
6880 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
6881 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
6882 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
6883 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
6884 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
6885 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
6886 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
6891 cf_search="$cf_library_path_list $cf_search"
6893 for cf_cv_library_path_utf8 in $cf_search
6895 if test -d "$cf_cv_library_path_utf8" ; then
6896 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
6898 echo "${as_me:-configure}:6898: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
6900 CPPFLAGS="$cf_test_CPPFLAGS"
6901 LIBS="-lutf8 $cf_save_LIBS"
6902 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
6903 cat >"conftest.$ac_ext" <<_ACEOF
6904 #line 6904 "configure"
6905 #include "confdefs.h"
6907 #include <libutf8.h>
6916 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6917 if { (eval echo "$as_me:6917: \"$ac_link\"") >&5
6918 (eval $ac_link) 2>&5
6920 echo "$as_me:6920: \$? = $ac_status" >&5
6921 (exit "$ac_status"); } &&
6922 { ac_try='test -s "conftest$ac_exeext"'
6923 { (eval echo "$as_me:6923: \"$ac_try\"") >&5
6926 echo "$as_me:6926: \$? = $ac_status" >&5
6927 (exit "$ac_status"); }; }; then
6929 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
6931 echo "${as_me:-configure}:6931: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
6933 cf_cv_find_linkage_utf8=yes
6934 cf_cv_library_file_utf8="-lutf8"
6937 echo "$as_me: failed program was:" >&5
6938 cat "conftest.$ac_ext" >&5
6940 CPPFLAGS="$cf_save_CPPFLAGS"
6941 LIBS="$cf_save_LIBS"
6942 LDFLAGS="$cf_save_LDFLAGS"
6945 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6948 CPPFLAGS="$cf_save_CPPFLAGS"
6949 LDFLAGS="$cf_save_LDFLAGS"
6953 cf_cv_find_linkage_utf8=no
6957 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6960 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6962 LIBS="$cf_save_LIBS"
6964 if test "$cf_cv_find_linkage_utf8" = yes ; then
6965 cf_cv_utf8_lib=add-on
6971 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6973 echo "$as_me:6973: result: $cf_cv_utf8_lib" >&5
6974 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
6976 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
6978 if test "$cf_cv_utf8_lib" = "add-on" ; then
6980 cat >>confdefs.h <<\EOF
6981 #define HAVE_LIBUTF8_H 1
6984 if test -n "$cf_cv_header_path_utf8" ; then
6985 for cf_add_incdir in $cf_cv_header_path_utf8
6987 while test "$cf_add_incdir" != /usr/include
6989 if test -d "$cf_add_incdir"
6992 if test -n "$CFLAGS$CPPFLAGS" ; then
6993 # a loop is needed to ensure we can add subdirs of existing dirs
6994 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6995 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6996 cf_have_incdir=yes; break
7001 if test "$cf_have_incdir" = no ; then
7002 if test "$cf_add_incdir" = /usr/local/include ; then
7003 if test "$GCC" = yes
7005 cf_save_CPPFLAGS=$CPPFLAGS
7007 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7008 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7010 cat >"conftest.$ac_ext" <<_ACEOF
7011 #line 7011 "configure"
7012 #include "confdefs.h"
7022 rm -f "conftest.$ac_objext"
7023 if { (eval echo "$as_me:7023: \"$ac_compile\"") >&5
7024 (eval $ac_compile) 2>&5
7026 echo "$as_me:7026: \$? = $ac_status" >&5
7027 (exit "$ac_status"); } &&
7028 { ac_try='test -s "conftest.$ac_objext"'
7029 { (eval echo "$as_me:7029: \"$ac_try\"") >&5
7032 echo "$as_me:7032: \$? = $ac_status" >&5
7033 (exit "$ac_status"); }; }; then
7036 echo "$as_me: failed program was:" >&5
7037 cat "conftest.$ac_ext" >&5
7040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7041 CPPFLAGS=$cf_save_CPPFLAGS
7046 if test "$cf_have_incdir" = no ; then
7047 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7049 echo "${as_me:-configure}:7049: testing adding $cf_add_incdir to include-path ..." 1>&5
7051 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7053 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
7054 test "$cf_top_incdir" = "$cf_add_incdir" && break
7055 cf_add_incdir="$cf_top_incdir"
7066 if test -n "$cf_cv_library_path_utf8" ; then
7067 for cf_add_libdir in $cf_cv_library_path_utf8
7069 if test "$cf_add_libdir" = /usr/lib ; then
7071 elif test -d "$cf_add_libdir"
7074 if test -n "$LDFLAGS$LIBS" ; then
7075 # a loop is needed to ensure we can add subdirs of existing dirs
7076 for cf_test_libdir in $LDFLAGS $LIBS ; do
7077 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7078 cf_have_libdir=yes; break
7082 if test "$cf_have_libdir" = no ; then
7083 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7085 echo "${as_me:-configure}:7085: testing adding $cf_add_libdir to library-path ..." 1>&5
7087 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7096 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7098 for cf_add_1lib in $cf_add_0lib; do
7099 for cf_add_2lib in $cf_add_libs; do
7100 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7105 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7111 cf_ncuconfig_root=ncursesw
7112 cf_have_ncuconfig=no
7114 if test "x${PKG_CONFIG:=none}" != xnone; then
7115 echo "$as_me:7115: checking pkg-config for $cf_ncuconfig_root" >&5
7116 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
7117 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
7118 echo "$as_me:7118: result: yes" >&5
7119 echo "${ECHO_T}yes" >&6
7121 echo "$as_me:7121: checking if the $cf_ncuconfig_root package files work" >&5
7122 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
7123 cf_have_ncuconfig=unknown
7125 cf_save_CFLAGS="$CFLAGS"
7126 cf_save_CPPFLAGS="$CPPFLAGS"
7127 cf_save_LIBS="$LIBS"
7129 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
7130 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
7132 # while -W for passing linker flags is prevalent, it is not "standard".
7133 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
7134 # incompatible _and_ non-standard -W option which gives an error. Work
7135 # around that pitfall.
7136 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
7142 cf_new_extra_cppflags=
7144 for cf_add_cflags in $cf_pkg_cflags
7146 case "$cf_fix_cppflags" in
7148 case "$cf_add_cflags" in
7149 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7150 case "$cf_add_cflags" in
7152 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7154 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7155 && test -z "${cf_tst_cflags}" \
7156 && cf_fix_cppflags=yes
7158 if test "$cf_fix_cppflags" = yes ; then
7160 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7161 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7164 elif test "${cf_tst_cflags}" = "\"'" ; then
7166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7177 case "$cf_add_cflags" in
7179 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7181 CPPFLAGS=`echo "$CPPFLAGS" | \
7182 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7183 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7188 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7189 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7196 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7197 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7204 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7205 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7207 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7209 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7210 && test -z "${cf_tst_cflags}" \
7211 && cf_fix_cppflags=no
7216 if test -n "$cf_new_cflags" ; then
7218 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7219 CFLAGS="${CFLAGS}$cf_new_cflags"
7223 if test -n "$cf_new_cppflags" ; then
7225 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7226 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7230 if test -n "$cf_new_extra_cppflags" ; then
7232 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7233 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7240 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7242 for cf_add_1lib in $cf_add_0lib; do
7243 for cf_add_2lib in $cf_add_libs; do
7244 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7249 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7253 cat >"conftest.$ac_ext" <<_ACEOF
7254 #line 7254 "configure"
7255 #include "confdefs.h"
7256 #include <${cf_cv_ncurses_header:-curses.h}>
7260 initscr(); mousemask(0,0); tigetstr((char *)0);
7265 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7266 if { (eval echo "$as_me:7266: \"$ac_link\"") >&5
7267 (eval $ac_link) 2>&5
7269 echo "$as_me:7269: \$? = $ac_status" >&5
7270 (exit "$ac_status"); } &&
7271 { ac_try='test -s "conftest$ac_exeext"'
7272 { (eval echo "$as_me:7272: \"$ac_try\"") >&5
7275 echo "$as_me:7275: \$? = $ac_status" >&5
7276 (exit "$ac_status"); }; }; then
7277 if test "$cross_compiling" = yes; then
7278 cf_test_ncuconfig=maybe
7280 cat >"conftest.$ac_ext" <<_ACEOF
7281 #line 7281 "configure"
7282 #include "confdefs.h"
7283 #include <${cf_cv_ncurses_header:-curses.h}>
7285 { const char *xx = curses_version(); return (xx == 0); }
7287 rm -f "conftest$ac_exeext"
7288 if { (eval echo "$as_me:7288: \"$ac_link\"") >&5
7289 (eval $ac_link) 2>&5
7291 echo "$as_me:7291: \$? = $ac_status" >&5
7292 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7293 { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7296 echo "$as_me:7296: \$? = $ac_status" >&5
7297 (exit "$ac_status"); }; }; then
7298 cf_test_ncuconfig=yes
7300 echo "$as_me: program exited with status $ac_status" >&5
7301 echo "$as_me: failed program was:" >&5
7302 cat "conftest.$ac_ext" >&5
7303 cf_test_ncuconfig=no
7305 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7308 echo "$as_me: failed program was:" >&5
7309 cat "conftest.$ac_ext" >&5
7310 cf_test_ncuconfig=no
7312 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7314 CFLAGS="$cf_save_CFLAGS"
7315 CPPFLAGS="$cf_save_CPPFLAGS"
7316 LIBS="$cf_save_LIBS"
7318 if test "x$cf_test_ncuconfig" != xyes; then
7319 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7320 cf_pkg_cflags="$cf_temp"
7321 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
7322 cf_pkg_libs="$cf_temp"
7330 cf_new_extra_cppflags=
7332 for cf_add_cflags in $cf_pkg_cflags
7334 case "$cf_fix_cppflags" in
7336 case "$cf_add_cflags" in
7337 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7338 case "$cf_add_cflags" in
7340 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7342 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7343 && test -z "${cf_tst_cflags}" \
7344 && cf_fix_cppflags=yes
7346 if test "$cf_fix_cppflags" = yes ; then
7348 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7349 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7352 elif test "${cf_tst_cflags}" = "\"'" ; then
7354 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7355 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7365 case "$cf_add_cflags" in
7367 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7369 CPPFLAGS=`echo "$CPPFLAGS" | \
7370 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7371 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7376 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7377 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7384 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7385 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7392 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7393 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7395 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7397 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7398 && test -z "${cf_tst_cflags}" \
7399 && cf_fix_cppflags=no
7404 if test -n "$cf_new_cflags" ; then
7406 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7407 CFLAGS="${CFLAGS}$cf_new_cflags"
7411 if test -n "$cf_new_cppflags" ; then
7413 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7414 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7418 if test -n "$cf_new_extra_cppflags" ; then
7420 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7421 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7428 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7430 for cf_add_1lib in $cf_add_0lib; do
7431 for cf_add_2lib in $cf_add_libs; do
7432 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7437 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7441 cat >"conftest.$ac_ext" <<_ACEOF
7442 #line 7442 "configure"
7443 #include "confdefs.h"
7444 #include <${cf_cv_ncurses_header:-curses.h}>
7448 initscr(); mousemask(0,0); tigetstr((char *)0);
7453 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7454 if { (eval echo "$as_me:7454: \"$ac_link\"") >&5
7455 (eval $ac_link) 2>&5
7457 echo "$as_me:7457: \$? = $ac_status" >&5
7458 (exit "$ac_status"); } &&
7459 { ac_try='test -s "conftest$ac_exeext"'
7460 { (eval echo "$as_me:7460: \"$ac_try\"") >&5
7463 echo "$as_me:7463: \$? = $ac_status" >&5
7464 (exit "$ac_status"); }; }; then
7465 if test "$cross_compiling" = yes; then
7466 cf_have_ncuconfig=maybe
7468 cat >"conftest.$ac_ext" <<_ACEOF
7469 #line 7469 "configure"
7470 #include "confdefs.h"
7471 #include <${cf_cv_ncurses_header:-curses.h}>
7473 { const char *xx = curses_version(); return (xx == 0); }
7475 rm -f "conftest$ac_exeext"
7476 if { (eval echo "$as_me:7476: \"$ac_link\"") >&5
7477 (eval $ac_link) 2>&5
7479 echo "$as_me:7479: \$? = $ac_status" >&5
7480 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7481 { (eval echo "$as_me:7481: \"$ac_try\"") >&5
7484 echo "$as_me:7484: \$? = $ac_status" >&5
7485 (exit "$ac_status"); }; }; then
7486 cf_have_ncuconfig=yes
7488 echo "$as_me: program exited with status $ac_status" >&5
7489 echo "$as_me: failed program was:" >&5
7490 cat "conftest.$ac_ext" >&5
7491 cf_have_ncuconfig=no
7493 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7496 echo "$as_me: failed program was:" >&5
7497 cat "conftest.$ac_ext" >&5
7498 cf_have_ncuconfig=no
7500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7501 echo "$as_me:7501: result: $cf_have_ncuconfig" >&5
7502 echo "${ECHO_T}$cf_have_ncuconfig" >&6
7503 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
7504 if test "$cf_have_ncuconfig" != "yes"
7506 CPPFLAGS="$cf_save_CPPFLAGS"
7507 LIBS="$cf_save_LIBS"
7508 NCURSES_CONFIG_PKG=none
7511 cat >>confdefs.h <<\EOF
7515 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
7517 echo "$as_me:7517: checking for terminfo header" >&5
7518 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7519 if test "${cf_cv_term_header+set}" = set; then
7520 echo $ECHO_N "(cached) $ECHO_C" >&6
7523 case "${cf_cv_ncurses_header}" in
7524 (*/ncurses.h|*/ncursesw.h)
7525 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7528 cf_term_header=term.h
7532 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7534 cat >"conftest.$ac_ext" <<_ACEOF
7535 #line 7535 "configure"
7536 #include "confdefs.h"
7538 #include <${cf_cv_ncurses_header:-curses.h}>
7544 int x = auto_left_margin; (void)x
7549 rm -f "conftest.$ac_objext"
7550 if { (eval echo "$as_me:7550: \"$ac_compile\"") >&5
7551 (eval $ac_compile) 2>&5
7553 echo "$as_me:7553: \$? = $ac_status" >&5
7554 (exit "$ac_status"); } &&
7555 { ac_try='test -s "conftest.$ac_objext"'
7556 { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7559 echo "$as_me:7559: \$? = $ac_status" >&5
7560 (exit "$ac_status"); }; }; then
7562 cf_cv_term_header="$cf_test"
7564 echo "$as_me: failed program was:" >&5
7565 cat "conftest.$ac_ext" >&5
7567 cf_cv_term_header=unknown
7570 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7571 test "$cf_cv_term_header" != unknown && break
7575 echo "$as_me:7575: result: $cf_cv_term_header" >&5
7576 echo "${ECHO_T}$cf_cv_term_header" >&6
7578 # Set definitions to allow ifdef'ing to accommodate subdirectories
7580 case "$cf_cv_term_header" in
7583 cat >>confdefs.h <<\EOF
7584 #define HAVE_TERM_H 1
7590 case "$cf_cv_term_header" in
7593 cat >>confdefs.h <<\EOF
7594 #define HAVE_NCURSES_TERM_H 1
7600 cat >>confdefs.h <<\EOF
7601 #define HAVE_NCURSESW_TERM_H 1
7610 echo "$as_me:7610: result: no" >&5
7611 echo "${ECHO_T}no" >&6
7612 NCURSES_CONFIG_PKG=none
7615 NCURSES_CONFIG_PKG=none
7618 if test "x$cf_have_ncuconfig" = "xno"; then
7619 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
7621 if test -n "$ac_tool_prefix"; then
7622 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7624 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7625 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7626 echo "$as_me:7626: checking for $ac_word" >&5
7627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7628 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
7629 echo $ECHO_N "(cached) $ECHO_C" >&6
7631 if test -n "$NCURSES_CONFIG"; then
7632 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
7634 ac_save_IFS=$IFS; IFS=$ac_path_separator
7636 for ac_dir in $ac_dummy; do
7638 test -z "$ac_dir" && ac_dir=.
7639 $as_executable_p "$ac_dir/$ac_word" || continue
7640 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
7641 echo "$as_me:7641: found $ac_dir/$ac_word" >&5
7647 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
7648 if test -n "$NCURSES_CONFIG"; then
7649 echo "$as_me:7649: result: $NCURSES_CONFIG" >&5
7650 echo "${ECHO_T}$NCURSES_CONFIG" >&6
7652 echo "$as_me:7652: result: no" >&5
7653 echo "${ECHO_T}no" >&6
7656 test -n "$NCURSES_CONFIG" && break
7659 if test -z "$NCURSES_CONFIG"; then
7660 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
7661 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
7663 # Extract the first word of "$ac_prog", so it can be a program name with args.
7664 set dummy $ac_prog; ac_word=$2
7665 echo "$as_me:7665: checking for $ac_word" >&5
7666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7667 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
7668 echo $ECHO_N "(cached) $ECHO_C" >&6
7670 if test -n "$ac_ct_NCURSES_CONFIG"; then
7671 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
7673 ac_save_IFS=$IFS; IFS=$ac_path_separator
7675 for ac_dir in $ac_dummy; do
7677 test -z "$ac_dir" && ac_dir=.
7678 $as_executable_p "$ac_dir/$ac_word" || continue
7679 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
7680 echo "$as_me:7680: found $ac_dir/$ac_word" >&5
7686 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
7687 if test -n "$ac_ct_NCURSES_CONFIG"; then
7688 echo "$as_me:7688: result: $ac_ct_NCURSES_CONFIG" >&5
7689 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
7691 echo "$as_me:7691: result: no" >&5
7692 echo "${ECHO_T}no" >&6
7695 test -n "$ac_ct_NCURSES_CONFIG" && break
7697 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
7699 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
7702 if test "$NCURSES_CONFIG" != none ; then
7707 cf_new_extra_cppflags=
7709 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
7711 case "$cf_fix_cppflags" in
7713 case "$cf_add_cflags" in
7714 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7715 case "$cf_add_cflags" in
7717 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7719 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7720 && test -z "${cf_tst_cflags}" \
7721 && cf_fix_cppflags=yes
7723 if test "$cf_fix_cppflags" = yes ; then
7725 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7726 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7729 elif test "${cf_tst_cflags}" = "\"'" ; then
7731 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7732 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7742 case "$cf_add_cflags" in
7744 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7746 CPPFLAGS=`echo "$CPPFLAGS" | \
7747 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7748 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7753 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7754 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7761 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7762 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7769 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7770 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7772 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7774 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7775 && test -z "${cf_tst_cflags}" \
7776 && cf_fix_cppflags=no
7781 if test -n "$cf_new_cflags" ; then
7783 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7784 CFLAGS="${CFLAGS}$cf_new_cflags"
7788 if test -n "$cf_new_cppflags" ; then
7790 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7791 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7795 if test -n "$cf_new_extra_cppflags" ; then
7797 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7798 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7805 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7807 for cf_add_1lib in $cf_add_0lib; do
7808 for cf_add_2lib in $cf_add_libs; do
7809 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7814 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7818 # even with config script, some packages use no-override for curses.h
7820 echo "$as_me:7820: checking if we have identified curses headers" >&5
7821 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
7822 if test "${cf_cv_ncurses_header+set}" = set; then
7823 echo $ECHO_N "(cached) $ECHO_C" >&6
7826 cf_cv_ncurses_header=none
7828 ncurses.h ncursesw/ncurses.h \
7829 curses.h ncursesw/curses.h
7831 cat >"conftest.$ac_ext" <<_ACEOF
7832 #line 7832 "configure"
7833 #include "confdefs.h"
7834 #include <${cf_header}>
7838 initscr(); tgoto("?", 0,0)
7843 rm -f "conftest.$ac_objext"
7844 if { (eval echo "$as_me:7844: \"$ac_compile\"") >&5
7845 (eval $ac_compile) 2>&5
7847 echo "$as_me:7847: \$? = $ac_status" >&5
7848 (exit "$ac_status"); } &&
7849 { ac_try='test -s "conftest.$ac_objext"'
7850 { (eval echo "$as_me:7850: \"$ac_try\"") >&5
7853 echo "$as_me:7853: \$? = $ac_status" >&5
7854 (exit "$ac_status"); }; }; then
7855 cf_cv_ncurses_header=$cf_header; break
7857 echo "$as_me: failed program was:" >&5
7858 cat "conftest.$ac_ext" >&5
7860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7864 echo "$as_me:7864: result: $cf_cv_ncurses_header" >&5
7865 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
7867 if test "$cf_cv_ncurses_header" = none ; then
7868 { { echo "$as_me:7868: error: No curses header-files found" >&5
7869 echo "$as_me: error: No curses header-files found" >&2;}
7870 { (exit 1); exit 1; }; }
7873 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
7875 for ac_header in $cf_cv_ncurses_header
7877 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7878 echo "$as_me:7878: checking for $ac_header" >&5
7879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7881 echo $ECHO_N "(cached) $ECHO_C" >&6
7883 cat >"conftest.$ac_ext" <<_ACEOF
7884 #line 7884 "configure"
7885 #include "confdefs.h"
7886 #include <$ac_header>
7888 if { (eval echo "$as_me:7888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7889 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7891 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7893 cat conftest.err >&5
7894 echo "$as_me:7894: \$? = $ac_status" >&5
7895 (exit "$ac_status"); } >/dev/null; then
7896 if test -s conftest.err; then
7897 ac_cpp_err=$ac_c_preproc_warn_flag
7904 if test -z "$ac_cpp_err"; then
7905 eval "$as_ac_Header=yes"
7907 echo "$as_me: failed program was:" >&5
7908 cat "conftest.$ac_ext" >&5
7909 eval "$as_ac_Header=no"
7911 rm -f conftest.err "conftest.$ac_ext"
7913 echo "$as_me:7913: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7914 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7915 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7916 cat >>confdefs.h <<EOF
7917 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7923 cat >>confdefs.h <<\EOF
7927 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7929 cat >>confdefs.h <<EOF
7930 #define $cf_nculib_ROOT 1
7933 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
7937 cf_ncuhdr_root=ncursesw
7939 test -n "$cf_cv_curses_dir" && \
7940 test "$cf_cv_curses_dir" != "no" && { \
7942 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
7943 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
7945 while test "$cf_add_incdir" != /usr/include
7947 if test -d "$cf_add_incdir"
7950 if test -n "$CFLAGS$CPPFLAGS" ; then
7951 # a loop is needed to ensure we can add subdirs of existing dirs
7952 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7953 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7954 cf_have_incdir=yes; break
7959 if test "$cf_have_incdir" = no ; then
7960 if test "$cf_add_incdir" = /usr/local/include ; then
7961 if test "$GCC" = yes
7963 cf_save_CPPFLAGS=$CPPFLAGS
7965 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7966 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
7968 cat >"conftest.$ac_ext" <<_ACEOF
7969 #line 7969 "configure"
7970 #include "confdefs.h"
7980 rm -f "conftest.$ac_objext"
7981 if { (eval echo "$as_me:7981: \"$ac_compile\"") >&5
7982 (eval $ac_compile) 2>&5
7984 echo "$as_me:7984: \$? = $ac_status" >&5
7985 (exit "$ac_status"); } &&
7986 { ac_try='test -s "conftest.$ac_objext"'
7987 { (eval echo "$as_me:7987: \"$ac_try\"") >&5
7990 echo "$as_me:7990: \$? = $ac_status" >&5
7991 (exit "$ac_status"); }; }; then
7994 echo "$as_me: failed program was:" >&5
7995 cat "conftest.$ac_ext" >&5
7998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7999 CPPFLAGS=$cf_save_CPPFLAGS
8004 if test "$cf_have_incdir" = no ; then
8005 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8007 echo "${as_me:-configure}:8007: testing adding $cf_add_incdir to include-path ..." 1>&5
8009 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8011 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8012 test "$cf_top_incdir" = "$cf_add_incdir" && break
8013 cf_add_incdir="$cf_top_incdir"
8026 echo "$as_me:8026: checking for $cf_ncuhdr_root header in include-path" >&5
8027 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8028 if test "${cf_cv_ncurses_h+set}" = set; then
8029 echo $ECHO_N "(cached) $ECHO_C" >&6
8032 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8033 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
8034 for cf_header in $cf_header_list
8037 cat >"conftest.$ac_ext" <<_ACEOF
8038 #line 8038 "configure"
8039 #include "confdefs.h"
8041 #define _XOPEN_SOURCE_EXTENDED
8042 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8043 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8045 #include <$cf_header>
8050 #ifdef NCURSES_VERSION
8056 printf("%s\\n", NCURSES_VERSION);
8069 rm -f "conftest.$ac_objext"
8070 if { (eval echo "$as_me:8070: \"$ac_compile\"") >&5
8071 (eval $ac_compile) 2>&5
8073 echo "$as_me:8073: \$? = $ac_status" >&5
8074 (exit "$ac_status"); } &&
8075 { ac_try='test -s "conftest.$ac_objext"'
8076 { (eval echo "$as_me:8076: \"$ac_try\"") >&5
8079 echo "$as_me:8079: \$? = $ac_status" >&5
8080 (exit "$ac_status"); }; }; then
8081 cf_cv_ncurses_h=$cf_header
8084 echo "$as_me: failed program was:" >&5
8085 cat "conftest.$ac_ext" >&5
8088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8090 test "$cf_cv_ncurses_h" != no && break
8094 echo "$as_me:8094: result: $cf_cv_ncurses_h" >&5
8095 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8097 if test "$cf_cv_ncurses_h" != no ; then
8098 cf_cv_ncurses_header=$cf_cv_ncurses_h
8101 echo "$as_me:8101: checking for $cf_ncuhdr_root include-path" >&5
8102 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8103 if test "${cf_cv_ncurses_h2+set}" = set; then
8104 echo $ECHO_N "(cached) $ECHO_C" >&6
8107 test -n "$verbose" && echo
8111 # collect the current set of include-directories from compiler flags
8112 cf_header_path_list=""
8113 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8114 for cf_header_path in $CPPFLAGS $CFLAGS
8116 case "$cf_header_path" in
8118 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8120 test "x$cf_header_path" != "xNONE" && \
8121 test -d "$cf_header_path" && \
8123 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8124 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8125 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8126 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8127 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8128 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"
8131 cf_header_path_list="$cf_header_path_list $cf_search"
8137 # add the variations for the package we are looking for
8141 test "x$prefix" != "xNONE" && \
8142 test -d "$prefix" && \
8144 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8145 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8146 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8147 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8148 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8149 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8152 for cf_subdir_prefix in \
8161 test "x$cf_subdir_prefix" != "x$prefix" && \
8162 test -d "$cf_subdir_prefix" && \
8163 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8164 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8165 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8166 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
8167 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
8168 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
8169 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"
8174 test "$includedir" != NONE && \
8175 test "$includedir" != "/usr/include" && \
8176 test -d "$includedir" && {
8177 test -d "$includedir" && cf_search="$cf_search $includedir"
8178 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8181 test "$oldincludedir" != NONE && \
8182 test "$oldincludedir" != "/usr/include" && \
8183 test -d "$oldincludedir" && {
8184 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8185 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8188 cf_search="$cf_search $cf_header_path_list"
8190 test -n "$verbose" && echo "search path $cf_search"
8191 cf_save2_CPPFLAGS="$CPPFLAGS"
8192 for cf_incdir in $cf_search
8195 if test -n "$cf_incdir" ; then
8196 for cf_add_incdir in $cf_incdir
8198 while test "$cf_add_incdir" != /usr/include
8200 if test -d "$cf_add_incdir"
8203 if test -n "$CFLAGS$CPPFLAGS" ; then
8204 # a loop is needed to ensure we can add subdirs of existing dirs
8205 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8206 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8207 cf_have_incdir=yes; break
8212 if test "$cf_have_incdir" = no ; then
8213 if test "$cf_add_incdir" = /usr/local/include ; then
8214 if test "$GCC" = yes
8216 cf_save_CPPFLAGS=$CPPFLAGS
8218 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8219 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8221 cat >"conftest.$ac_ext" <<_ACEOF
8222 #line 8222 "configure"
8223 #include "confdefs.h"
8233 rm -f "conftest.$ac_objext"
8234 if { (eval echo "$as_me:8234: \"$ac_compile\"") >&5
8235 (eval $ac_compile) 2>&5
8237 echo "$as_me:8237: \$? = $ac_status" >&5
8238 (exit "$ac_status"); } &&
8239 { ac_try='test -s "conftest.$ac_objext"'
8240 { (eval echo "$as_me:8240: \"$ac_try\"") >&5
8243 echo "$as_me:8243: \$? = $ac_status" >&5
8244 (exit "$ac_status"); }; }; then
8247 echo "$as_me: failed program was:" >&5
8248 cat "conftest.$ac_ext" >&5
8251 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8252 CPPFLAGS=$cf_save_CPPFLAGS
8257 if test "$cf_have_incdir" = no ; then
8258 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8260 echo "${as_me:-configure}:8260: testing adding $cf_add_incdir to include-path ..." 1>&5
8262 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8264 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8265 test "$cf_top_incdir" = "$cf_add_incdir" && break
8266 cf_add_incdir="$cf_top_incdir"
8282 cat >"conftest.$ac_ext" <<_ACEOF
8283 #line 8283 "configure"
8284 #include "confdefs.h"
8286 #include <$cf_header>
8291 #ifdef NCURSES_VERSION
8293 printf("%s\\n", NCURSES_VERSION);
8306 rm -f "conftest.$ac_objext"
8307 if { (eval echo "$as_me:8307: \"$ac_compile\"") >&5
8308 (eval $ac_compile) 2>&5
8310 echo "$as_me:8310: \$? = $ac_status" >&5
8311 (exit "$ac_status"); } &&
8312 { ac_try='test -s "conftest.$ac_objext"'
8313 { (eval echo "$as_me:8313: \"$ac_try\"") >&5
8316 echo "$as_me:8316: \$? = $ac_status" >&5
8317 (exit "$ac_status"); }; }; then
8318 cf_cv_ncurses_h2=$cf_header
8321 echo "$as_me: failed program was:" >&5
8322 cat "conftest.$ac_ext" >&5
8325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8327 if test "$cf_cv_ncurses_h2" != no ; then
8328 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8329 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
8332 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8334 CPPFLAGS="$cf_save2_CPPFLAGS"
8335 test "$cf_cv_ncurses_h2" != no && break
8337 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8337: error: not found" >&5
8338 echo "$as_me: error: not found" >&2;}
8339 { (exit 1); exit 1; }; }
8342 echo "$as_me:8342: result: $cf_cv_ncurses_h2" >&5
8343 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8345 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
8346 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
8347 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
8348 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
8351 if test -n "$cf_1st_incdir" ; then
8352 for cf_add_incdir in $cf_1st_incdir
8354 while test "$cf_add_incdir" != /usr/include
8356 if test -d "$cf_add_incdir"
8359 if test -n "$CFLAGS$CPPFLAGS" ; then
8360 # a loop is needed to ensure we can add subdirs of existing dirs
8361 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8362 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8363 cf_have_incdir=yes; break
8368 if test "$cf_have_incdir" = no ; then
8369 if test "$cf_add_incdir" = /usr/local/include ; then
8370 if test "$GCC" = yes
8372 cf_save_CPPFLAGS=$CPPFLAGS
8374 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8375 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8377 cat >"conftest.$ac_ext" <<_ACEOF
8378 #line 8378 "configure"
8379 #include "confdefs.h"
8389 rm -f "conftest.$ac_objext"
8390 if { (eval echo "$as_me:8390: \"$ac_compile\"") >&5
8391 (eval $ac_compile) 2>&5
8393 echo "$as_me:8393: \$? = $ac_status" >&5
8394 (exit "$ac_status"); } &&
8395 { ac_try='test -s "conftest.$ac_objext"'
8396 { (eval echo "$as_me:8396: \"$ac_try\"") >&5
8399 echo "$as_me:8399: \$? = $ac_status" >&5
8400 (exit "$ac_status"); }; }; then
8403 echo "$as_me: failed program was:" >&5
8404 cat "conftest.$ac_ext" >&5
8407 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8408 CPPFLAGS=$cf_save_CPPFLAGS
8413 if test "$cf_have_incdir" = no ; then
8414 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8416 echo "${as_me:-configure}:8416: testing adding $cf_add_incdir to include-path ..." 1>&5
8418 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8420 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8421 test "$cf_top_incdir" = "$cf_add_incdir" && break
8422 cf_add_incdir="$cf_top_incdir"
8435 # Set definitions to allow ifdef'ing for ncurses.h
8437 case "$cf_cv_ncurses_header" in
8440 cat >>confdefs.h <<\EOF
8441 #define HAVE_NCURSES_H 1
8447 case "$cf_cv_ncurses_header" in
8448 (ncurses/curses.h|ncurses/ncurses.h)
8450 cat >>confdefs.h <<\EOF
8451 #define HAVE_NCURSES_NCURSES_H 1
8455 (ncursesw/curses.h|ncursesw/ncurses.h)
8457 cat >>confdefs.h <<\EOF
8458 #define HAVE_NCURSESW_NCURSES_H 1
8464 echo "$as_me:8464: checking for terminfo header" >&5
8465 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8466 if test "${cf_cv_term_header+set}" = set; then
8467 echo $ECHO_N "(cached) $ECHO_C" >&6
8470 case "${cf_cv_ncurses_header}" in
8471 (*/ncurses.h|*/ncursesw.h)
8472 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8475 cf_term_header=term.h
8479 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8481 cat >"conftest.$ac_ext" <<_ACEOF
8482 #line 8482 "configure"
8483 #include "confdefs.h"
8485 #include <${cf_cv_ncurses_header:-curses.h}>
8491 int x = auto_left_margin; (void)x
8496 rm -f "conftest.$ac_objext"
8497 if { (eval echo "$as_me:8497: \"$ac_compile\"") >&5
8498 (eval $ac_compile) 2>&5
8500 echo "$as_me:8500: \$? = $ac_status" >&5
8501 (exit "$ac_status"); } &&
8502 { ac_try='test -s "conftest.$ac_objext"'
8503 { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8506 echo "$as_me:8506: \$? = $ac_status" >&5
8507 (exit "$ac_status"); }; }; then
8509 cf_cv_term_header="$cf_test"
8511 echo "$as_me: failed program was:" >&5
8512 cat "conftest.$ac_ext" >&5
8514 cf_cv_term_header=unknown
8517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8518 test "$cf_cv_term_header" != unknown && break
8522 echo "$as_me:8522: result: $cf_cv_term_header" >&5
8523 echo "${ECHO_T}$cf_cv_term_header" >&6
8525 # Set definitions to allow ifdef'ing to accommodate subdirectories
8527 case "$cf_cv_term_header" in
8530 cat >>confdefs.h <<\EOF
8531 #define HAVE_TERM_H 1
8537 case "$cf_cv_term_header" in
8540 cat >>confdefs.h <<\EOF
8541 #define HAVE_NCURSES_TERM_H 1
8547 cat >>confdefs.h <<\EOF
8548 #define HAVE_NCURSESW_TERM_H 1
8554 # some applications need this, but should check for NCURSES_VERSION
8556 cat >>confdefs.h <<\EOF
8560 echo "$as_me:8560: checking for ncurses version" >&5
8561 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
8562 if test "${cf_cv_ncurses_version+set}" = set; then
8563 echo $ECHO_N "(cached) $ECHO_C" >&6
8566 cf_cv_ncurses_version=no
8568 rm -f "$cf_tempfile"
8569 if test "$cross_compiling" = yes; then
8571 # This will not work if the preprocessor splits the line after the
8572 # Autoconf token. The 'unproto' program does that.
8573 cat > "conftest.$ac_ext" <<EOF
8574 #include <${cf_cv_ncurses_header:-curses.h}>
8576 #ifdef NCURSES_VERSION
8577 Autoconf NCURSES_VERSION
8585 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
8586 { (eval echo "$as_me:8586: \"$cf_try\"") >&5
8589 echo "$as_me:8589: \$? = $ac_status" >&5
8590 (exit "$ac_status"); }
8591 if test -f conftest.out ; then
8592 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
8593 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
8598 cat >"conftest.$ac_ext" <<_ACEOF
8599 #line 8599 "configure"
8600 #include "confdefs.h"
8602 #include <${cf_cv_ncurses_header:-curses.h}>
8606 FILE *fp = fopen("$cf_tempfile", "w");
8607 #ifdef NCURSES_VERSION
8608 # ifdef NCURSES_VERSION_PATCH
8609 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
8611 fprintf(fp, "%s\\n", NCURSES_VERSION);
8615 fprintf(fp, "old\\n");
8620 ${cf_cv_main_return:-return}(0);
8623 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
8629 { (eval echo "$as_me:8629: \"$ac_try\"") >&5
8632 echo "$as_me:8632: \$? = $ac_status" >&5
8633 (exit "$ac_status"); }; }; then
8635 cf_cv_ncurses_version=`cat $cf_tempfile`
8637 echo "$as_me: program exited with status $ac_status" >&5
8638 echo "$as_me: failed program was:" >&5
8639 cat "conftest.$ac_ext" >&5
8641 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8643 rm -f "$cf_tempfile"
8646 echo "$as_me:8646: result: $cf_cv_ncurses_version" >&5
8647 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
8648 test "$cf_cv_ncurses_version" = no ||
8649 cat >>confdefs.h <<\EOF
8653 cf_nculib_root=ncursesw
8654 # This works, except for the special case where we find gpm, but
8655 # ncurses is in a nonstandard location via $LIBS, and we really want
8658 cf_ncurses_SAVE="$LIBS"
8659 echo "$as_me:8659: checking for Gpm_Open in -lgpm" >&5
8660 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
8661 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
8662 echo $ECHO_N "(cached) $ECHO_C" >&6
8664 ac_check_lib_save_LIBS=$LIBS
8666 cat >"conftest.$ac_ext" <<_ACEOF
8667 #line 8667 "configure"
8668 #include "confdefs.h"
8670 /* Override any gcc2 internal prototype to avoid an error. */
8674 /* We use char because int might match the return type of a gcc2
8675 builtin and then its argument prototype would still apply. */
8685 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8686 if { (eval echo "$as_me:8686: \"$ac_link\"") >&5
8687 (eval $ac_link) 2>&5
8689 echo "$as_me:8689: \$? = $ac_status" >&5
8690 (exit "$ac_status"); } &&
8691 { ac_try='test -s "conftest$ac_exeext"'
8692 { (eval echo "$as_me:8692: \"$ac_try\"") >&5
8695 echo "$as_me:8695: \$? = $ac_status" >&5
8696 (exit "$ac_status"); }; }; then
8697 ac_cv_lib_gpm_Gpm_Open=yes
8699 echo "$as_me: failed program was:" >&5
8700 cat "conftest.$ac_ext" >&5
8701 ac_cv_lib_gpm_Gpm_Open=no
8703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8704 LIBS=$ac_check_lib_save_LIBS
8706 echo "$as_me:8706: result: $ac_cv_lib_gpm_Gpm_Open" >&5
8707 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
8708 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
8709 echo "$as_me:8709: checking for initscr in -lgpm" >&5
8710 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
8711 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
8712 echo $ECHO_N "(cached) $ECHO_C" >&6
8714 ac_check_lib_save_LIBS=$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_gpm_initscr=yes
8749 echo "$as_me: failed program was:" >&5
8750 cat "conftest.$ac_ext" >&5
8751 ac_cv_lib_gpm_initscr=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_gpm_initscr" >&5
8757 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
8758 if test "$ac_cv_lib_gpm_initscr" = yes; then
8759 LIBS="$cf_ncurses_SAVE"
8761 cf_ncurses_LIBS="-lgpm"
8768 # This is only necessary if you are linking against an obsolete
8769 # version of ncurses (but it should do no harm, since it's static).
8770 if test "$cf_nculib_root" = ncurses ; then
8771 echo "$as_me:8771: checking for tgoto in -lmytinfo" >&5
8772 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
8773 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
8774 echo $ECHO_N "(cached) $ECHO_C" >&6
8776 ac_check_lib_save_LIBS=$LIBS
8777 LIBS="-lmytinfo $LIBS"
8778 cat >"conftest.$ac_ext" <<_ACEOF
8779 #line 8779 "configure"
8780 #include "confdefs.h"
8782 /* Override any gcc2 internal prototype to avoid an error. */
8786 /* We use char because int might match the return type of a gcc2
8787 builtin and then its argument prototype would still apply. */
8797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8798 if { (eval echo "$as_me:8798: \"$ac_link\"") >&5
8799 (eval $ac_link) 2>&5
8801 echo "$as_me:8801: \$? = $ac_status" >&5
8802 (exit "$ac_status"); } &&
8803 { ac_try='test -s "conftest$ac_exeext"'
8804 { (eval echo "$as_me:8804: \"$ac_try\"") >&5
8807 echo "$as_me:8807: \$? = $ac_status" >&5
8808 (exit "$ac_status"); }; }; then
8809 ac_cv_lib_mytinfo_tgoto=yes
8811 echo "$as_me: failed program was:" >&5
8812 cat "conftest.$ac_ext" >&5
8813 ac_cv_lib_mytinfo_tgoto=no
8815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8816 LIBS=$ac_check_lib_save_LIBS
8818 echo "$as_me:8818: result: $ac_cv_lib_mytinfo_tgoto" >&5
8819 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
8820 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
8821 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
8831 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8833 for cf_add_1lib in $cf_add_0lib; do
8834 for cf_add_2lib in $cf_add_libs; do
8835 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8840 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8844 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
8850 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8852 for cf_add_1lib in $cf_add_0lib; do
8853 for cf_add_2lib in $cf_add_libs; do
8854 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8859 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8865 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
8867 echo "$as_me:8867: checking for initscr" >&5
8868 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
8869 if test "${ac_cv_func_initscr+set}" = set; then
8870 echo $ECHO_N "(cached) $ECHO_C" >&6
8872 cat >"conftest.$ac_ext" <<_ACEOF
8873 #line 8873 "configure"
8874 #include "confdefs.h"
8875 #define initscr autoconf_temporary
8876 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
8883 /* We use char because int might match the return type of a gcc2
8884 builtin and then its argument prototype would still apply. */
8885 char initscr (void);
8891 /* The GNU C library defines stubs for functions which it implements
8892 to always fail with ENOSYS. Some functions are actually named
8893 something starting with __ and the normal name is an alias. */
8894 #if defined (__stub_initscr) || defined (__stub___initscr)
8895 #error found stub for initscr
8903 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8904 if { (eval echo "$as_me:8904: \"$ac_link\"") >&5
8905 (eval $ac_link) 2>&5
8907 echo "$as_me:8907: \$? = $ac_status" >&5
8908 (exit "$ac_status"); } &&
8909 { ac_try='test -s "conftest$ac_exeext"'
8910 { (eval echo "$as_me:8910: \"$ac_try\"") >&5
8913 echo "$as_me:8913: \$? = $ac_status" >&5
8914 (exit "$ac_status"); }; }; then
8915 ac_cv_func_initscr=yes
8917 echo "$as_me: failed program was:" >&5
8918 cat "conftest.$ac_ext" >&5
8919 ac_cv_func_initscr=no
8921 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8923 echo "$as_me:8923: result: $ac_cv_func_initscr" >&5
8924 echo "${ECHO_T}$ac_cv_func_initscr" >&6
8925 if test "$ac_cv_func_initscr" = yes; then
8926 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8929 cf_save_LIBS="$LIBS"
8930 echo "$as_me:8930: checking for initscr in -l$cf_nculib_root" >&5
8931 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
8932 LIBS="-l$cf_nculib_root $LIBS"
8933 cat >"conftest.$ac_ext" <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8936 #include <${cf_cv_ncurses_header:-curses.h}>
8945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8946 if { (eval echo "$as_me:8946: \"$ac_link\"") >&5
8947 (eval $ac_link) 2>&5
8949 echo "$as_me:8949: \$? = $ac_status" >&5
8950 (exit "$ac_status"); } &&
8951 { ac_try='test -s "conftest$ac_exeext"'
8952 { (eval echo "$as_me:8952: \"$ac_try\"") >&5
8955 echo "$as_me:8955: \$? = $ac_status" >&5
8956 (exit "$ac_status"); }; }; then
8957 echo "$as_me:8957: result: yes" >&5
8958 echo "${ECHO_T}yes" >&6
8959 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
8962 echo "$as_me: failed program was:" >&5
8963 cat "conftest.$ac_ext" >&5
8964 echo "$as_me:8964: result: no" >&5
8965 echo "${ECHO_T}no" >&6
8968 cf_library_path_list=""
8969 if test -n "${LDFLAGS}${LIBS}" ; then
8970 for cf_library_path in $LDFLAGS $LIBS
8972 case "$cf_library_path" in
8974 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8976 test "x$cf_library_path" != "xNONE" && \
8977 test -d "$cf_library_path" && \
8979 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8980 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8981 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
8982 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
8983 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
8984 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"
8987 cf_library_path_list="$cf_library_path_list $cf_search"
8995 test "x$prefix" != "xNONE" && \
8996 test -d "$prefix" && \
8998 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8999 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
9000 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9001 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9002 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9003 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9006 for cf_subdir_prefix in \
9015 test "x$cf_subdir_prefix" != "x$prefix" && \
9016 test -d "$cf_subdir_prefix" && \
9017 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9018 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
9019 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
9020 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
9021 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
9022 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
9023 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"
9028 cf_search="$cf_library_path_list $cf_search"
9030 for cf_libdir in $cf_search
9032 echo "$as_me:9032: checking for -l$cf_nculib_root in $cf_libdir" >&5
9033 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9034 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9035 cat >"conftest.$ac_ext" <<_ACEOF
9036 #line 9036 "configure"
9037 #include "confdefs.h"
9038 #include <${cf_cv_ncurses_header:-curses.h}>
9047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9048 if { (eval echo "$as_me:9048: \"$ac_link\"") >&5
9049 (eval $ac_link) 2>&5
9051 echo "$as_me:9051: \$? = $ac_status" >&5
9052 (exit "$ac_status"); } &&
9053 { ac_try='test -s "conftest$ac_exeext"'
9054 { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9057 echo "$as_me:9057: \$? = $ac_status" >&5
9058 (exit "$ac_status"); }; }; then
9059 echo "$as_me:9059: result: yes" >&5
9060 echo "${ECHO_T}yes" >&6
9061 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
9064 echo "$as_me: failed program was:" >&5
9065 cat "conftest.$ac_ext" >&5
9066 echo "$as_me:9066: result: no" >&5
9067 echo "${ECHO_T}no" >&6
9068 LIBS="$cf_save_LIBS"
9070 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9074 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9078 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
9080 if test "$cf_found_library" = no ; then
9081 { { echo "$as_me:9081: error: Cannot link $cf_nculib_root library" >&5
9082 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9083 { (exit 1); exit 1; }; }
9088 if test -n "$cf_ncurses_LIBS" ; then
9089 echo "$as_me:9089: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9090 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9091 cf_ncurses_SAVE="$LIBS"
9092 for p in $cf_ncurses_LIBS ; do
9093 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
9094 if test "$q" != "$LIBS" ; then
9098 cat >"conftest.$ac_ext" <<_ACEOF
9099 #line 9099 "configure"
9100 #include "confdefs.h"
9101 #include <${cf_cv_ncurses_header:-curses.h}>
9105 initscr(); mousemask(0,0); tigetstr((char *)0);
9110 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9111 if { (eval echo "$as_me:9111: \"$ac_link\"") >&5
9112 (eval $ac_link) 2>&5
9114 echo "$as_me:9114: \$? = $ac_status" >&5
9115 (exit "$ac_status"); } &&
9116 { ac_try='test -s "conftest$ac_exeext"'
9117 { (eval echo "$as_me:9117: \"$ac_try\"") >&5
9120 echo "$as_me:9120: \$? = $ac_status" >&5
9121 (exit "$ac_status"); }; }; then
9122 echo "$as_me:9122: result: yes" >&5
9123 echo "${ECHO_T}yes" >&6
9125 echo "$as_me: failed program was:" >&5
9126 cat "conftest.$ac_ext" >&5
9127 echo "$as_me:9127: result: no" >&5
9128 echo "${ECHO_T}no" >&6
9129 LIBS="$cf_ncurses_SAVE"
9131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9134 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9136 cat >>confdefs.h <<EOF
9137 #define $cf_nculib_ROOT 1
9147 cf_ncuconfig_root=ncurses
9148 cf_have_ncuconfig=no
9150 if test "x${PKG_CONFIG:=none}" != xnone; then
9151 echo "$as_me:9151: checking pkg-config for $cf_ncuconfig_root" >&5
9152 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
9153 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
9154 echo "$as_me:9154: result: yes" >&5
9155 echo "${ECHO_T}yes" >&6
9157 echo "$as_me:9157: checking if the $cf_ncuconfig_root package files work" >&5
9158 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
9159 cf_have_ncuconfig=unknown
9161 cf_save_CFLAGS="$CFLAGS"
9162 cf_save_CPPFLAGS="$CPPFLAGS"
9163 cf_save_LIBS="$LIBS"
9165 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
9166 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
9168 # while -W for passing linker flags is prevalent, it is not "standard".
9169 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
9170 # incompatible _and_ non-standard -W option which gives an error. Work
9171 # around that pitfall.
9172 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
9178 cf_new_extra_cppflags=
9180 for cf_add_cflags in $cf_pkg_cflags
9182 case "$cf_fix_cppflags" in
9184 case "$cf_add_cflags" in
9185 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9186 case "$cf_add_cflags" in
9188 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9190 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9191 && test -z "${cf_tst_cflags}" \
9192 && cf_fix_cppflags=yes
9194 if test "$cf_fix_cppflags" = yes ; then
9196 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9197 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9200 elif test "${cf_tst_cflags}" = "\"'" ; then
9202 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9203 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9213 case "$cf_add_cflags" in
9215 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9217 CPPFLAGS=`echo "$CPPFLAGS" | \
9218 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9219 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9224 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9225 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9232 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9233 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9240 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9241 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9243 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9245 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9246 && test -z "${cf_tst_cflags}" \
9247 && cf_fix_cppflags=no
9252 if test -n "$cf_new_cflags" ; then
9254 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9255 CFLAGS="${CFLAGS}$cf_new_cflags"
9259 if test -n "$cf_new_cppflags" ; then
9261 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9262 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9266 if test -n "$cf_new_extra_cppflags" ; then
9268 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9269 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9276 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9278 for cf_add_1lib in $cf_add_0lib; do
9279 for cf_add_2lib in $cf_add_libs; do
9280 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9285 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9289 cat >"conftest.$ac_ext" <<_ACEOF
9290 #line 9290 "configure"
9291 #include "confdefs.h"
9292 #include <${cf_cv_ncurses_header:-curses.h}>
9296 initscr(); mousemask(0,0); tigetstr((char *)0);
9301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9302 if { (eval echo "$as_me:9302: \"$ac_link\"") >&5
9303 (eval $ac_link) 2>&5
9305 echo "$as_me:9305: \$? = $ac_status" >&5
9306 (exit "$ac_status"); } &&
9307 { ac_try='test -s "conftest$ac_exeext"'
9308 { (eval echo "$as_me:9308: \"$ac_try\"") >&5
9311 echo "$as_me:9311: \$? = $ac_status" >&5
9312 (exit "$ac_status"); }; }; then
9313 if test "$cross_compiling" = yes; then
9314 cf_test_ncuconfig=maybe
9316 cat >"conftest.$ac_ext" <<_ACEOF
9317 #line 9317 "configure"
9318 #include "confdefs.h"
9319 #include <${cf_cv_ncurses_header:-curses.h}>
9321 { const char *xx = curses_version(); return (xx == 0); }
9323 rm -f "conftest$ac_exeext"
9324 if { (eval echo "$as_me:9324: \"$ac_link\"") >&5
9325 (eval $ac_link) 2>&5
9327 echo "$as_me:9327: \$? = $ac_status" >&5
9328 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9329 { (eval echo "$as_me:9329: \"$ac_try\"") >&5
9332 echo "$as_me:9332: \$? = $ac_status" >&5
9333 (exit "$ac_status"); }; }; then
9334 cf_test_ncuconfig=yes
9336 echo "$as_me: program exited with status $ac_status" >&5
9337 echo "$as_me: failed program was:" >&5
9338 cat "conftest.$ac_ext" >&5
9339 cf_test_ncuconfig=no
9341 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9344 echo "$as_me: failed program was:" >&5
9345 cat "conftest.$ac_ext" >&5
9346 cf_test_ncuconfig=no
9348 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9350 CFLAGS="$cf_save_CFLAGS"
9351 CPPFLAGS="$cf_save_CPPFLAGS"
9352 LIBS="$cf_save_LIBS"
9354 if test "x$cf_test_ncuconfig" != xyes; then
9355 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9356 cf_pkg_cflags="$cf_temp"
9357 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
9358 cf_pkg_libs="$cf_temp"
9366 cf_new_extra_cppflags=
9368 for cf_add_cflags in $cf_pkg_cflags
9370 case "$cf_fix_cppflags" in
9372 case "$cf_add_cflags" in
9373 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9374 case "$cf_add_cflags" in
9376 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9378 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9379 && test -z "${cf_tst_cflags}" \
9380 && cf_fix_cppflags=yes
9382 if test "$cf_fix_cppflags" = yes ; then
9384 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9385 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9388 elif test "${cf_tst_cflags}" = "\"'" ; then
9390 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9391 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9401 case "$cf_add_cflags" in
9403 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9405 CPPFLAGS=`echo "$CPPFLAGS" | \
9406 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9407 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9412 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9413 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9420 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9421 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9428 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9429 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9431 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9433 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9434 && test -z "${cf_tst_cflags}" \
9435 && cf_fix_cppflags=no
9440 if test -n "$cf_new_cflags" ; then
9442 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9443 CFLAGS="${CFLAGS}$cf_new_cflags"
9447 if test -n "$cf_new_cppflags" ; then
9449 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9450 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9454 if test -n "$cf_new_extra_cppflags" ; then
9456 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9457 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9464 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9466 for cf_add_1lib in $cf_add_0lib; do
9467 for cf_add_2lib in $cf_add_libs; do
9468 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9473 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9477 cat >"conftest.$ac_ext" <<_ACEOF
9478 #line 9478 "configure"
9479 #include "confdefs.h"
9480 #include <${cf_cv_ncurses_header:-curses.h}>
9484 initscr(); mousemask(0,0); tigetstr((char *)0);
9489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9490 if { (eval echo "$as_me:9490: \"$ac_link\"") >&5
9491 (eval $ac_link) 2>&5
9493 echo "$as_me:9493: \$? = $ac_status" >&5
9494 (exit "$ac_status"); } &&
9495 { ac_try='test -s "conftest$ac_exeext"'
9496 { (eval echo "$as_me:9496: \"$ac_try\"") >&5
9499 echo "$as_me:9499: \$? = $ac_status" >&5
9500 (exit "$ac_status"); }; }; then
9501 if test "$cross_compiling" = yes; then
9502 cf_have_ncuconfig=maybe
9504 cat >"conftest.$ac_ext" <<_ACEOF
9505 #line 9505 "configure"
9506 #include "confdefs.h"
9507 #include <${cf_cv_ncurses_header:-curses.h}>
9509 { const char *xx = curses_version(); return (xx == 0); }
9511 rm -f "conftest$ac_exeext"
9512 if { (eval echo "$as_me:9512: \"$ac_link\"") >&5
9513 (eval $ac_link) 2>&5
9515 echo "$as_me:9515: \$? = $ac_status" >&5
9516 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9517 { (eval echo "$as_me:9517: \"$ac_try\"") >&5
9520 echo "$as_me:9520: \$? = $ac_status" >&5
9521 (exit "$ac_status"); }; }; then
9522 cf_have_ncuconfig=yes
9524 echo "$as_me: program exited with status $ac_status" >&5
9525 echo "$as_me: failed program was:" >&5
9526 cat "conftest.$ac_ext" >&5
9527 cf_have_ncuconfig=no
9529 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9532 echo "$as_me: failed program was:" >&5
9533 cat "conftest.$ac_ext" >&5
9534 cf_have_ncuconfig=no
9536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9537 echo "$as_me:9537: result: $cf_have_ncuconfig" >&5
9538 echo "${ECHO_T}$cf_have_ncuconfig" >&6
9539 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
9540 if test "$cf_have_ncuconfig" != "yes"
9542 CPPFLAGS="$cf_save_CPPFLAGS"
9543 LIBS="$cf_save_LIBS"
9544 NCURSES_CONFIG_PKG=none
9547 cat >>confdefs.h <<\EOF
9551 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
9553 echo "$as_me:9553: checking for terminfo header" >&5
9554 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9555 if test "${cf_cv_term_header+set}" = set; then
9556 echo $ECHO_N "(cached) $ECHO_C" >&6
9559 case "${cf_cv_ncurses_header}" in
9560 (*/ncurses.h|*/ncursesw.h)
9561 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9564 cf_term_header=term.h
9568 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9570 cat >"conftest.$ac_ext" <<_ACEOF
9571 #line 9571 "configure"
9572 #include "confdefs.h"
9574 #include <${cf_cv_ncurses_header:-curses.h}>
9580 int x = auto_left_margin; (void)x
9585 rm -f "conftest.$ac_objext"
9586 if { (eval echo "$as_me:9586: \"$ac_compile\"") >&5
9587 (eval $ac_compile) 2>&5
9589 echo "$as_me:9589: \$? = $ac_status" >&5
9590 (exit "$ac_status"); } &&
9591 { ac_try='test -s "conftest.$ac_objext"'
9592 { (eval echo "$as_me:9592: \"$ac_try\"") >&5
9595 echo "$as_me:9595: \$? = $ac_status" >&5
9596 (exit "$ac_status"); }; }; then
9598 cf_cv_term_header="$cf_test"
9600 echo "$as_me: failed program was:" >&5
9601 cat "conftest.$ac_ext" >&5
9603 cf_cv_term_header=unknown
9606 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9607 test "$cf_cv_term_header" != unknown && break
9611 echo "$as_me:9611: result: $cf_cv_term_header" >&5
9612 echo "${ECHO_T}$cf_cv_term_header" >&6
9614 # Set definitions to allow ifdef'ing to accommodate subdirectories
9616 case "$cf_cv_term_header" in
9619 cat >>confdefs.h <<\EOF
9620 #define HAVE_TERM_H 1
9626 case "$cf_cv_term_header" in
9629 cat >>confdefs.h <<\EOF
9630 #define HAVE_NCURSES_TERM_H 1
9636 cat >>confdefs.h <<\EOF
9637 #define HAVE_NCURSESW_TERM_H 1
9646 echo "$as_me:9646: result: no" >&5
9647 echo "${ECHO_T}no" >&6
9648 NCURSES_CONFIG_PKG=none
9651 NCURSES_CONFIG_PKG=none
9654 if test "x$cf_have_ncuconfig" = "xno"; then
9655 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
9657 if test -n "$ac_tool_prefix"; then
9658 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9660 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
9661 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
9662 echo "$as_me:9662: checking for $ac_word" >&5
9663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9664 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9665 echo $ECHO_N "(cached) $ECHO_C" >&6
9667 if test -n "$NCURSES_CONFIG"; then
9668 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9670 ac_save_IFS=$IFS; IFS=$ac_path_separator
9672 for ac_dir in $ac_dummy; do
9674 test -z "$ac_dir" && ac_dir=.
9675 $as_executable_p "$ac_dir/$ac_word" || continue
9676 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9677 echo "$as_me:9677: found $ac_dir/$ac_word" >&5
9683 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9684 if test -n "$NCURSES_CONFIG"; then
9685 echo "$as_me:9685: result: $NCURSES_CONFIG" >&5
9686 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9688 echo "$as_me:9688: result: no" >&5
9689 echo "${ECHO_T}no" >&6
9692 test -n "$NCURSES_CONFIG" && break
9695 if test -z "$NCURSES_CONFIG"; then
9696 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9697 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9699 # Extract the first word of "$ac_prog", so it can be a program name with args.
9700 set dummy $ac_prog; ac_word=$2
9701 echo "$as_me:9701: checking for $ac_word" >&5
9702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9703 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9704 echo $ECHO_N "(cached) $ECHO_C" >&6
9706 if test -n "$ac_ct_NCURSES_CONFIG"; then
9707 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9709 ac_save_IFS=$IFS; IFS=$ac_path_separator
9711 for ac_dir in $ac_dummy; do
9713 test -z "$ac_dir" && ac_dir=.
9714 $as_executable_p "$ac_dir/$ac_word" || continue
9715 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9716 echo "$as_me:9716: found $ac_dir/$ac_word" >&5
9722 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9723 if test -n "$ac_ct_NCURSES_CONFIG"; then
9724 echo "$as_me:9724: result: $ac_ct_NCURSES_CONFIG" >&5
9725 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9727 echo "$as_me:9727: result: no" >&5
9728 echo "${ECHO_T}no" >&6
9731 test -n "$ac_ct_NCURSES_CONFIG" && break
9733 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9735 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9738 if test "$NCURSES_CONFIG" != none ; then
9743 cf_new_extra_cppflags=
9745 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9747 case "$cf_fix_cppflags" in
9749 case "$cf_add_cflags" in
9750 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9751 case "$cf_add_cflags" in
9753 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9755 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9756 && test -z "${cf_tst_cflags}" \
9757 && cf_fix_cppflags=yes
9759 if test "$cf_fix_cppflags" = yes ; then
9761 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9762 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9765 elif test "${cf_tst_cflags}" = "\"'" ; then
9767 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9768 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9778 case "$cf_add_cflags" in
9780 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9782 CPPFLAGS=`echo "$CPPFLAGS" | \
9783 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9784 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9789 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9790 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9797 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9798 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9805 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9806 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9808 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9810 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9811 && test -z "${cf_tst_cflags}" \
9812 && cf_fix_cppflags=no
9817 if test -n "$cf_new_cflags" ; then
9819 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9820 CFLAGS="${CFLAGS}$cf_new_cflags"
9824 if test -n "$cf_new_cppflags" ; then
9826 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9827 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9831 if test -n "$cf_new_extra_cppflags" ; then
9833 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9834 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9841 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9843 for cf_add_1lib in $cf_add_0lib; do
9844 for cf_add_2lib in $cf_add_libs; do
9845 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9850 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9854 # even with config script, some packages use no-override for curses.h
9856 echo "$as_me:9856: checking if we have identified curses headers" >&5
9857 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9858 if test "${cf_cv_ncurses_header+set}" = set; then
9859 echo $ECHO_N "(cached) $ECHO_C" >&6
9862 cf_cv_ncurses_header=none
9864 ncurses.h ncurses/ncurses.h \
9865 curses.h ncurses/curses.h
9867 cat >"conftest.$ac_ext" <<_ACEOF
9868 #line 9868 "configure"
9869 #include "confdefs.h"
9870 #include <${cf_header}>
9874 initscr(); tgoto("?", 0,0)
9879 rm -f "conftest.$ac_objext"
9880 if { (eval echo "$as_me:9880: \"$ac_compile\"") >&5
9881 (eval $ac_compile) 2>&5
9883 echo "$as_me:9883: \$? = $ac_status" >&5
9884 (exit "$ac_status"); } &&
9885 { ac_try='test -s "conftest.$ac_objext"'
9886 { (eval echo "$as_me:9886: \"$ac_try\"") >&5
9889 echo "$as_me:9889: \$? = $ac_status" >&5
9890 (exit "$ac_status"); }; }; then
9891 cf_cv_ncurses_header=$cf_header; break
9893 echo "$as_me: failed program was:" >&5
9894 cat "conftest.$ac_ext" >&5
9896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9900 echo "$as_me:9900: result: $cf_cv_ncurses_header" >&5
9901 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9903 if test "$cf_cv_ncurses_header" = none ; then
9904 { { echo "$as_me:9904: error: No curses header-files found" >&5
9905 echo "$as_me: error: No curses header-files found" >&2;}
9906 { (exit 1); exit 1; }; }
9909 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9911 for ac_header in $cf_cv_ncurses_header
9913 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9914 echo "$as_me:9914: checking for $ac_header" >&5
9915 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9917 echo $ECHO_N "(cached) $ECHO_C" >&6
9919 cat >"conftest.$ac_ext" <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9922 #include <$ac_header>
9924 if { (eval echo "$as_me:9924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9925 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9927 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9929 cat conftest.err >&5
9930 echo "$as_me:9930: \$? = $ac_status" >&5
9931 (exit "$ac_status"); } >/dev/null; then
9932 if test -s conftest.err; then
9933 ac_cpp_err=$ac_c_preproc_warn_flag
9940 if test -z "$ac_cpp_err"; then
9941 eval "$as_ac_Header=yes"
9943 echo "$as_me: failed program was:" >&5
9944 cat "conftest.$ac_ext" >&5
9945 eval "$as_ac_Header=no"
9947 rm -f conftest.err "conftest.$ac_ext"
9949 echo "$as_me:9949: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9950 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9951 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9952 cat >>confdefs.h <<EOF
9953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9959 cat >>confdefs.h <<\EOF
9963 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9965 cat >>confdefs.h <<EOF
9966 #define $cf_nculib_ROOT 1
9969 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9973 cf_ncuhdr_root=ncurses
9975 test -n "$cf_cv_curses_dir" && \
9976 test "$cf_cv_curses_dir" != "no" && { \
9978 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9979 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9981 while test "$cf_add_incdir" != /usr/include
9983 if test -d "$cf_add_incdir"
9986 if test -n "$CFLAGS$CPPFLAGS" ; then
9987 # a loop is needed to ensure we can add subdirs of existing dirs
9988 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9989 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9990 cf_have_incdir=yes; break
9995 if test "$cf_have_incdir" = no ; then
9996 if test "$cf_add_incdir" = /usr/local/include ; then
9997 if test "$GCC" = yes
9999 cf_save_CPPFLAGS=$CPPFLAGS
10001 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10002 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10004 cat >"conftest.$ac_ext" <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10016 rm -f "conftest.$ac_objext"
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018 (eval $ac_compile) 2>&5
10020 echo "$as_me:10020: \$? = $ac_status" >&5
10021 (exit "$ac_status"); } &&
10022 { ac_try='test -s "conftest.$ac_objext"'
10023 { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024 (eval $ac_try) 2>&5
10026 echo "$as_me:10026: \$? = $ac_status" >&5
10027 (exit "$ac_status"); }; }; then
10030 echo "$as_me: failed program was:" >&5
10031 cat "conftest.$ac_ext" >&5
10034 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10035 CPPFLAGS=$cf_save_CPPFLAGS
10040 if test "$cf_have_incdir" = no ; then
10041 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10043 echo "${as_me:-configure}:10043: testing adding $cf_add_incdir to include-path ..." 1>&5
10045 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10047 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10048 test "$cf_top_incdir" = "$cf_add_incdir" && break
10049 cf_add_incdir="$cf_top_incdir"
10062 echo "$as_me:10062: checking for $cf_ncuhdr_root header in include-path" >&5
10063 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
10064 if test "${cf_cv_ncurses_h+set}" = set; then
10065 echo $ECHO_N "(cached) $ECHO_C" >&6
10068 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
10069 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
10070 for cf_header in $cf_header_list
10073 cat >"conftest.$ac_ext" <<_ACEOF
10074 #line 10074 "configure"
10075 #include "confdefs.h"
10077 #include <$cf_header>
10082 #ifdef NCURSES_VERSION
10084 printf("%s\\n", NCURSES_VERSION);
10097 rm -f "conftest.$ac_objext"
10098 if { (eval echo "$as_me:10098: \"$ac_compile\"") >&5
10099 (eval $ac_compile) 2>&5
10101 echo "$as_me:10101: \$? = $ac_status" >&5
10102 (exit "$ac_status"); } &&
10103 { ac_try='test -s "conftest.$ac_objext"'
10104 { (eval echo "$as_me:10104: \"$ac_try\"") >&5
10105 (eval $ac_try) 2>&5
10107 echo "$as_me:10107: \$? = $ac_status" >&5
10108 (exit "$ac_status"); }; }; then
10109 cf_cv_ncurses_h=$cf_header
10112 echo "$as_me: failed program was:" >&5
10113 cat "conftest.$ac_ext" >&5
10116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10118 test "$cf_cv_ncurses_h" != no && break
10122 echo "$as_me:10122: result: $cf_cv_ncurses_h" >&5
10123 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
10125 if test "$cf_cv_ncurses_h" != no ; then
10126 cf_cv_ncurses_header=$cf_cv_ncurses_h
10129 echo "$as_me:10129: checking for $cf_ncuhdr_root include-path" >&5
10130 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
10131 if test "${cf_cv_ncurses_h2+set}" = set; then
10132 echo $ECHO_N "(cached) $ECHO_C" >&6
10135 test -n "$verbose" && echo
10139 # collect the current set of include-directories from compiler flags
10140 cf_header_path_list=""
10141 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10142 for cf_header_path in $CPPFLAGS $CFLAGS
10144 case "$cf_header_path" in
10146 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10148 test "x$cf_header_path" != "xNONE" && \
10149 test -d "$cf_header_path" && \
10151 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
10152 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
10153 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
10154 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
10155 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
10156 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"
10159 cf_header_path_list="$cf_header_path_list $cf_search"
10165 # add the variations for the package we are looking for
10169 test "x$prefix" != "xNONE" && \
10170 test -d "$prefix" && \
10172 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
10173 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
10174 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
10175 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
10176 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
10177 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
10180 for cf_subdir_prefix in \
10189 test "x$cf_subdir_prefix" != "x$prefix" && \
10190 test -d "$cf_subdir_prefix" && \
10191 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10192 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
10193 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
10194 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
10195 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
10196 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
10197 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"
10202 test "$includedir" != NONE && \
10203 test "$includedir" != "/usr/include" && \
10204 test -d "$includedir" && {
10205 test -d "$includedir" && cf_search="$cf_search $includedir"
10206 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
10209 test "$oldincludedir" != NONE && \
10210 test "$oldincludedir" != "/usr/include" && \
10211 test -d "$oldincludedir" && {
10212 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
10213 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
10216 cf_search="$cf_search $cf_header_path_list"
10218 test -n "$verbose" && echo "search path $cf_search"
10219 cf_save2_CPPFLAGS="$CPPFLAGS"
10220 for cf_incdir in $cf_search
10223 if test -n "$cf_incdir" ; then
10224 for cf_add_incdir in $cf_incdir
10226 while test "$cf_add_incdir" != /usr/include
10228 if test -d "$cf_add_incdir"
10231 if test -n "$CFLAGS$CPPFLAGS" ; then
10232 # a loop is needed to ensure we can add subdirs of existing dirs
10233 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10234 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10235 cf_have_incdir=yes; break
10240 if test "$cf_have_incdir" = no ; then
10241 if test "$cf_add_incdir" = /usr/local/include ; then
10242 if test "$GCC" = yes
10244 cf_save_CPPFLAGS=$CPPFLAGS
10246 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10247 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10249 cat >"conftest.$ac_ext" <<_ACEOF
10250 #line 10250 "configure"
10251 #include "confdefs.h"
10261 rm -f "conftest.$ac_objext"
10262 if { (eval echo "$as_me:10262: \"$ac_compile\"") >&5
10263 (eval $ac_compile) 2>&5
10265 echo "$as_me:10265: \$? = $ac_status" >&5
10266 (exit "$ac_status"); } &&
10267 { ac_try='test -s "conftest.$ac_objext"'
10268 { (eval echo "$as_me:10268: \"$ac_try\"") >&5
10269 (eval $ac_try) 2>&5
10271 echo "$as_me:10271: \$? = $ac_status" >&5
10272 (exit "$ac_status"); }; }; then
10275 echo "$as_me: failed program was:" >&5
10276 cat "conftest.$ac_ext" >&5
10279 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10280 CPPFLAGS=$cf_save_CPPFLAGS
10285 if test "$cf_have_incdir" = no ; then
10286 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10288 echo "${as_me:-configure}:10288: testing adding $cf_add_incdir to include-path ..." 1>&5
10290 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10292 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10293 test "$cf_top_incdir" = "$cf_add_incdir" && break
10294 cf_add_incdir="$cf_top_incdir"
10310 cat >"conftest.$ac_ext" <<_ACEOF
10311 #line 10311 "configure"
10312 #include "confdefs.h"
10314 #include <$cf_header>
10319 #ifdef NCURSES_VERSION
10321 printf("%s\\n", NCURSES_VERSION);
10334 rm -f "conftest.$ac_objext"
10335 if { (eval echo "$as_me:10335: \"$ac_compile\"") >&5
10336 (eval $ac_compile) 2>&5
10338 echo "$as_me:10338: \$? = $ac_status" >&5
10339 (exit "$ac_status"); } &&
10340 { ac_try='test -s "conftest.$ac_objext"'
10341 { (eval echo "$as_me:10341: \"$ac_try\"") >&5
10342 (eval $ac_try) 2>&5
10344 echo "$as_me:10344: \$? = $ac_status" >&5
10345 (exit "$ac_status"); }; }; then
10346 cf_cv_ncurses_h2=$cf_header
10349 echo "$as_me: failed program was:" >&5
10350 cat "conftest.$ac_ext" >&5
10351 cf_cv_ncurses_h2=no
10353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10355 if test "$cf_cv_ncurses_h2" != no ; then
10356 cf_cv_ncurses_h2=$cf_incdir/$cf_header
10357 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
10360 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
10362 CPPFLAGS="$cf_save2_CPPFLAGS"
10363 test "$cf_cv_ncurses_h2" != no && break
10365 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:10365: error: not found" >&5
10366 echo "$as_me: error: not found" >&2;}
10367 { (exit 1); exit 1; }; }
10370 echo "$as_me:10370: result: $cf_cv_ncurses_h2" >&5
10371 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
10373 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
10374 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
10375 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
10376 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
10379 if test -n "$cf_1st_incdir" ; then
10380 for cf_add_incdir in $cf_1st_incdir
10382 while test "$cf_add_incdir" != /usr/include
10384 if test -d "$cf_add_incdir"
10387 if test -n "$CFLAGS$CPPFLAGS" ; then
10388 # a loop is needed to ensure we can add subdirs of existing dirs
10389 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10390 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10391 cf_have_incdir=yes; break
10396 if test "$cf_have_incdir" = no ; then
10397 if test "$cf_add_incdir" = /usr/local/include ; then
10398 if test "$GCC" = yes
10400 cf_save_CPPFLAGS=$CPPFLAGS
10402 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10403 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10405 cat >"conftest.$ac_ext" <<_ACEOF
10406 #line 10406 "configure"
10407 #include "confdefs.h"
10417 rm -f "conftest.$ac_objext"
10418 if { (eval echo "$as_me:10418: \"$ac_compile\"") >&5
10419 (eval $ac_compile) 2>&5
10421 echo "$as_me:10421: \$? = $ac_status" >&5
10422 (exit "$ac_status"); } &&
10423 { ac_try='test -s "conftest.$ac_objext"'
10424 { (eval echo "$as_me:10424: \"$ac_try\"") >&5
10425 (eval $ac_try) 2>&5
10427 echo "$as_me:10427: \$? = $ac_status" >&5
10428 (exit "$ac_status"); }; }; then
10431 echo "$as_me: failed program was:" >&5
10432 cat "conftest.$ac_ext" >&5
10435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10436 CPPFLAGS=$cf_save_CPPFLAGS
10441 if test "$cf_have_incdir" = no ; then
10442 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
10444 echo "${as_me:-configure}:10444: testing adding $cf_add_incdir to include-path ..." 1>&5
10446 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10448 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10449 test "$cf_top_incdir" = "$cf_add_incdir" && break
10450 cf_add_incdir="$cf_top_incdir"
10463 # Set definitions to allow ifdef'ing for ncurses.h
10465 case "$cf_cv_ncurses_header" in
10468 cat >>confdefs.h <<\EOF
10469 #define HAVE_NCURSES_H 1
10475 case "$cf_cv_ncurses_header" in
10476 (ncurses/curses.h|ncurses/ncurses.h)
10478 cat >>confdefs.h <<\EOF
10479 #define HAVE_NCURSES_NCURSES_H 1
10483 (ncursesw/curses.h|ncursesw/ncurses.h)
10485 cat >>confdefs.h <<\EOF
10486 #define HAVE_NCURSESW_NCURSES_H 1
10492 echo "$as_me:10492: checking for terminfo header" >&5
10493 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10494 if test "${cf_cv_term_header+set}" = set; then
10495 echo $ECHO_N "(cached) $ECHO_C" >&6
10498 case "${cf_cv_ncurses_header}" in
10499 (*/ncurses.h|*/ncursesw.h)
10500 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10503 cf_term_header=term.h
10507 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10509 cat >"conftest.$ac_ext" <<_ACEOF
10510 #line 10510 "configure"
10511 #include "confdefs.h"
10513 #include <${cf_cv_ncurses_header:-curses.h}>
10514 #include <$cf_test>
10519 int x = auto_left_margin; (void)x
10524 rm -f "conftest.$ac_objext"
10525 if { (eval echo "$as_me:10525: \"$ac_compile\"") >&5
10526 (eval $ac_compile) 2>&5
10528 echo "$as_me:10528: \$? = $ac_status" >&5
10529 (exit "$ac_status"); } &&
10530 { ac_try='test -s "conftest.$ac_objext"'
10531 { (eval echo "$as_me:10531: \"$ac_try\"") >&5
10532 (eval $ac_try) 2>&5
10534 echo "$as_me:10534: \$? = $ac_status" >&5
10535 (exit "$ac_status"); }; }; then
10537 cf_cv_term_header="$cf_test"
10539 echo "$as_me: failed program was:" >&5
10540 cat "conftest.$ac_ext" >&5
10542 cf_cv_term_header=unknown
10545 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10546 test "$cf_cv_term_header" != unknown && break
10550 echo "$as_me:10550: result: $cf_cv_term_header" >&5
10551 echo "${ECHO_T}$cf_cv_term_header" >&6
10553 # Set definitions to allow ifdef'ing to accommodate subdirectories
10555 case "$cf_cv_term_header" in
10558 cat >>confdefs.h <<\EOF
10559 #define HAVE_TERM_H 1
10565 case "$cf_cv_term_header" in
10568 cat >>confdefs.h <<\EOF
10569 #define HAVE_NCURSES_TERM_H 1
10575 cat >>confdefs.h <<\EOF
10576 #define HAVE_NCURSESW_TERM_H 1
10582 # some applications need this, but should check for NCURSES_VERSION
10584 cat >>confdefs.h <<\EOF
10588 echo "$as_me:10588: checking for ncurses version" >&5
10589 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
10590 if test "${cf_cv_ncurses_version+set}" = set; then
10591 echo $ECHO_N "(cached) $ECHO_C" >&6
10594 cf_cv_ncurses_version=no
10596 rm -f "$cf_tempfile"
10597 if test "$cross_compiling" = yes; then
10599 # This will not work if the preprocessor splits the line after the
10600 # Autoconf token. The 'unproto' program does that.
10601 cat > "conftest.$ac_ext" <<EOF
10602 #include <${cf_cv_ncurses_header:-curses.h}>
10604 #ifdef NCURSES_VERSION
10605 Autoconf NCURSES_VERSION
10613 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
10614 { (eval echo "$as_me:10614: \"$cf_try\"") >&5
10615 (eval $cf_try) 2>&5
10617 echo "$as_me:10617: \$? = $ac_status" >&5
10618 (exit "$ac_status"); }
10619 if test -f conftest.out ; then
10620 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
10621 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
10626 cat >"conftest.$ac_ext" <<_ACEOF
10627 #line 10627 "configure"
10628 #include "confdefs.h"
10630 #include <${cf_cv_ncurses_header:-curses.h}>
10634 FILE *fp = fopen("$cf_tempfile", "w");
10635 #ifdef NCURSES_VERSION
10636 # ifdef NCURSES_VERSION_PATCH
10637 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10639 fprintf(fp, "%s\\n", NCURSES_VERSION);
10642 # ifdef __NCURSES_H
10643 fprintf(fp, "old\\n");
10648 ${cf_cv_main_return:-return}(0);
10651 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
10657 { (eval echo "$as_me:10657: \"$ac_try\"") >&5
10658 (eval $ac_try) 2>&5
10660 echo "$as_me:10660: \$? = $ac_status" >&5
10661 (exit "$ac_status"); }; }; then
10663 cf_cv_ncurses_version=`cat $cf_tempfile`
10665 echo "$as_me: program exited with status $ac_status" >&5
10666 echo "$as_me: failed program was:" >&5
10667 cat "conftest.$ac_ext" >&5
10669 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10671 rm -f "$cf_tempfile"
10674 echo "$as_me:10674: result: $cf_cv_ncurses_version" >&5
10675 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10676 test "$cf_cv_ncurses_version" = no ||
10677 cat >>confdefs.h <<\EOF
10681 cf_nculib_root=ncurses
10682 # This works, except for the special case where we find gpm, but
10683 # ncurses is in a nonstandard location via $LIBS, and we really want
10686 cf_ncurses_SAVE="$LIBS"
10687 echo "$as_me:10687: checking for Gpm_Open in -lgpm" >&5
10688 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10689 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10690 echo $ECHO_N "(cached) $ECHO_C" >&6
10692 ac_check_lib_save_LIBS=$LIBS
10694 cat >"conftest.$ac_ext" <<_ACEOF
10695 #line 10695 "configure"
10696 #include "confdefs.h"
10698 /* Override any gcc2 internal prototype to avoid an error. */
10702 /* We use char because int might match the return type of a gcc2
10703 builtin and then its argument prototype would still apply. */
10713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10714 if { (eval echo "$as_me:10714: \"$ac_link\"") >&5
10715 (eval $ac_link) 2>&5
10717 echo "$as_me:10717: \$? = $ac_status" >&5
10718 (exit "$ac_status"); } &&
10719 { ac_try='test -s "conftest$ac_exeext"'
10720 { (eval echo "$as_me:10720: \"$ac_try\"") >&5
10721 (eval $ac_try) 2>&5
10723 echo "$as_me:10723: \$? = $ac_status" >&5
10724 (exit "$ac_status"); }; }; then
10725 ac_cv_lib_gpm_Gpm_Open=yes
10727 echo "$as_me: failed program was:" >&5
10728 cat "conftest.$ac_ext" >&5
10729 ac_cv_lib_gpm_Gpm_Open=no
10731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10732 LIBS=$ac_check_lib_save_LIBS
10734 echo "$as_me:10734: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10735 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10736 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10737 echo "$as_me:10737: checking for initscr in -lgpm" >&5
10738 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10739 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10740 echo $ECHO_N "(cached) $ECHO_C" >&6
10742 ac_check_lib_save_LIBS=$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_gpm_initscr=yes
10777 echo "$as_me: failed program was:" >&5
10778 cat "conftest.$ac_ext" >&5
10779 ac_cv_lib_gpm_initscr=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_gpm_initscr" >&5
10785 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10786 if test "$ac_cv_lib_gpm_initscr" = yes; then
10787 LIBS="$cf_ncurses_SAVE"
10789 cf_ncurses_LIBS="-lgpm"
10796 # This is only necessary if you are linking against an obsolete
10797 # version of ncurses (but it should do no harm, since it's static).
10798 if test "$cf_nculib_root" = ncurses ; then
10799 echo "$as_me:10799: checking for tgoto in -lmytinfo" >&5
10800 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10801 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10802 echo $ECHO_N "(cached) $ECHO_C" >&6
10804 ac_check_lib_save_LIBS=$LIBS
10805 LIBS="-lmytinfo $LIBS"
10806 cat >"conftest.$ac_ext" <<_ACEOF
10807 #line 10807 "configure"
10808 #include "confdefs.h"
10810 /* Override any gcc2 internal prototype to avoid an error. */
10814 /* We use char because int might match the return type of a gcc2
10815 builtin and then its argument prototype would still apply. */
10825 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10826 if { (eval echo "$as_me:10826: \"$ac_link\"") >&5
10827 (eval $ac_link) 2>&5
10829 echo "$as_me:10829: \$? = $ac_status" >&5
10830 (exit "$ac_status"); } &&
10831 { ac_try='test -s "conftest$ac_exeext"'
10832 { (eval echo "$as_me:10832: \"$ac_try\"") >&5
10833 (eval $ac_try) 2>&5
10835 echo "$as_me:10835: \$? = $ac_status" >&5
10836 (exit "$ac_status"); }; }; then
10837 ac_cv_lib_mytinfo_tgoto=yes
10839 echo "$as_me: failed program was:" >&5
10840 cat "conftest.$ac_ext" >&5
10841 ac_cv_lib_mytinfo_tgoto=no
10843 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10844 LIBS=$ac_check_lib_save_LIBS
10846 echo "$as_me:10846: result: $ac_cv_lib_mytinfo_tgoto" >&5
10847 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10848 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10849 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10856 cf_add_libs="$LIBS"
10859 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10860 # filter duplicates
10861 for cf_add_1lib in $cf_add_0lib; do
10862 for cf_add_2lib in $cf_add_libs; do
10863 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10868 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10870 LIBS="$cf_add_libs"
10872 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10875 cf_add_libs="$LIBS"
10878 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10879 # filter duplicates
10880 for cf_add_1lib in $cf_add_0lib; do
10881 for cf_add_2lib in $cf_add_libs; do
10882 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10887 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10889 LIBS="$cf_add_libs"
10893 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10895 echo "$as_me:10895: checking for initscr" >&5
10896 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10897 if test "${ac_cv_func_initscr+set}" = set; then
10898 echo $ECHO_N "(cached) $ECHO_C" >&6
10900 cat >"conftest.$ac_ext" <<_ACEOF
10901 #line 10901 "configure"
10902 #include "confdefs.h"
10903 #define initscr autoconf_temporary
10904 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10911 /* We use char because int might match the return type of a gcc2
10912 builtin and then its argument prototype would still apply. */
10913 char initscr (void);
10919 /* The GNU C library defines stubs for functions which it implements
10920 to always fail with ENOSYS. Some functions are actually named
10921 something starting with __ and the normal name is an alias. */
10922 #if defined (__stub_initscr) || defined (__stub___initscr)
10923 #error found stub for initscr
10931 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10932 if { (eval echo "$as_me:10932: \"$ac_link\"") >&5
10933 (eval $ac_link) 2>&5
10935 echo "$as_me:10935: \$? = $ac_status" >&5
10936 (exit "$ac_status"); } &&
10937 { ac_try='test -s "conftest$ac_exeext"'
10938 { (eval echo "$as_me:10938: \"$ac_try\"") >&5
10939 (eval $ac_try) 2>&5
10941 echo "$as_me:10941: \$? = $ac_status" >&5
10942 (exit "$ac_status"); }; }; then
10943 ac_cv_func_initscr=yes
10945 echo "$as_me: failed program was:" >&5
10946 cat "conftest.$ac_ext" >&5
10947 ac_cv_func_initscr=no
10949 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10951 echo "$as_me:10951: result: $ac_cv_func_initscr" >&5
10952 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10953 if test "$ac_cv_func_initscr" = yes; then
10954 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10957 cf_save_LIBS="$LIBS"
10958 echo "$as_me:10958: checking for initscr in -l$cf_nculib_root" >&5
10959 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10960 LIBS="-l$cf_nculib_root $LIBS"
10961 cat >"conftest.$ac_ext" <<_ACEOF
10962 #line 10962 "configure"
10963 #include "confdefs.h"
10964 #include <${cf_cv_ncurses_header:-curses.h}>
10973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10974 if { (eval echo "$as_me:10974: \"$ac_link\"") >&5
10975 (eval $ac_link) 2>&5
10977 echo "$as_me:10977: \$? = $ac_status" >&5
10978 (exit "$ac_status"); } &&
10979 { ac_try='test -s "conftest$ac_exeext"'
10980 { (eval echo "$as_me:10980: \"$ac_try\"") >&5
10981 (eval $ac_try) 2>&5
10983 echo "$as_me:10983: \$? = $ac_status" >&5
10984 (exit "$ac_status"); }; }; then
10985 echo "$as_me:10985: result: yes" >&5
10986 echo "${ECHO_T}yes" >&6
10987 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10990 echo "$as_me: failed program was:" >&5
10991 cat "conftest.$ac_ext" >&5
10992 echo "$as_me:10992: result: no" >&5
10993 echo "${ECHO_T}no" >&6
10996 cf_library_path_list=""
10997 if test -n "${LDFLAGS}${LIBS}" ; then
10998 for cf_library_path in $LDFLAGS $LIBS
11000 case "$cf_library_path" in
11002 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11004 test "x$cf_library_path" != "xNONE" && \
11005 test -d "$cf_library_path" && \
11007 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
11008 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
11009 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
11010 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
11011 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
11012 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"
11015 cf_library_path_list="$cf_library_path_list $cf_search"
11023 test "x$prefix" != "xNONE" && \
11024 test -d "$prefix" && \
11026 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
11027 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
11028 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
11029 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
11030 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
11031 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
11034 for cf_subdir_prefix in \
11043 test "x$cf_subdir_prefix" != "x$prefix" && \
11044 test -d "$cf_subdir_prefix" && \
11045 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11046 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
11047 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
11048 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
11049 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
11050 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
11051 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"
11056 cf_search="$cf_library_path_list $cf_search"
11058 for cf_libdir in $cf_search
11060 echo "$as_me:11060: checking for -l$cf_nculib_root in $cf_libdir" >&5
11061 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
11062 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
11063 cat >"conftest.$ac_ext" <<_ACEOF
11064 #line 11064 "configure"
11065 #include "confdefs.h"
11066 #include <${cf_cv_ncurses_header:-curses.h}>
11075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11076 if { (eval echo "$as_me:11076: \"$ac_link\"") >&5
11077 (eval $ac_link) 2>&5
11079 echo "$as_me:11079: \$? = $ac_status" >&5
11080 (exit "$ac_status"); } &&
11081 { ac_try='test -s "conftest$ac_exeext"'
11082 { (eval echo "$as_me:11082: \"$ac_try\"") >&5
11083 (eval $ac_try) 2>&5
11085 echo "$as_me:11085: \$? = $ac_status" >&5
11086 (exit "$ac_status"); }; }; then
11087 echo "$as_me:11087: result: yes" >&5
11088 echo "${ECHO_T}yes" >&6
11089 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
11092 echo "$as_me: failed program was:" >&5
11093 cat "conftest.$ac_ext" >&5
11094 echo "$as_me:11094: result: no" >&5
11095 echo "${ECHO_T}no" >&6
11096 LIBS="$cf_save_LIBS"
11098 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11106 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
11108 if test "$cf_found_library" = no ; then
11109 { { echo "$as_me:11109: error: Cannot link $cf_nculib_root library" >&5
11110 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
11111 { (exit 1); exit 1; }; }
11116 if test -n "$cf_ncurses_LIBS" ; then
11117 echo "$as_me:11117: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
11118 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
11119 cf_ncurses_SAVE="$LIBS"
11120 for p in $cf_ncurses_LIBS ; do
11121 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
11122 if test "$q" != "$LIBS" ; then
11126 cat >"conftest.$ac_ext" <<_ACEOF
11127 #line 11127 "configure"
11128 #include "confdefs.h"
11129 #include <${cf_cv_ncurses_header:-curses.h}>
11133 initscr(); mousemask(0,0); tigetstr((char *)0);
11138 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11139 if { (eval echo "$as_me:11139: \"$ac_link\"") >&5
11140 (eval $ac_link) 2>&5
11142 echo "$as_me:11142: \$? = $ac_status" >&5
11143 (exit "$ac_status"); } &&
11144 { ac_try='test -s "conftest$ac_exeext"'
11145 { (eval echo "$as_me:11145: \"$ac_try\"") >&5
11146 (eval $ac_try) 2>&5
11148 echo "$as_me:11148: \$? = $ac_status" >&5
11149 (exit "$ac_status"); }; }; then
11150 echo "$as_me:11150: result: yes" >&5
11151 echo "${ECHO_T}yes" >&6
11153 echo "$as_me: failed program was:" >&5
11154 cat "conftest.$ac_ext" >&5
11155 echo "$as_me:11155: result: no" >&5
11156 echo "${ECHO_T}no" >&6
11157 LIBS="$cf_ncurses_SAVE"
11159 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11162 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11164 cat >>confdefs.h <<EOF
11165 #define $cf_nculib_ROOT 1
11170 NCURSES_CONFIG=none
11175 if test "$NCURSES_CONFIG_PKG" != none ; then
11176 cf_version=`$PKG_CONFIG --modversion $NCURSES_CONFIG_PKG 2>/dev/null`
11178 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11179 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11180 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11182 cf_cv_abi_version=`$PKG_CONFIG --variable=abi_version $NCURSES_CONFIG_PKG 2>/dev/null`
11183 if test -z "$cf_cv_abi_version"
11185 cf_cv_abi_version=`$PKG_CONFIG --variable=major_version $NCURSES_CONFIG_PKG 2>/dev/null`
11188 elif test "$NCURSES_CONFIG" != none ; then
11190 cf_version=`$NCURSES_CONFIG --version 2>/dev/null`
11192 NCURSES_MAJOR=`echo "$cf_version" | sed -e 's/\..*//'`
11193 NCURSES_MINOR=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.//' -e 's/\..*//'`
11194 NCURSES_PATCH=`echo "$cf_version" | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'`
11196 # ABI version is not available from headers
11197 cf_cv_abi_version=`$NCURSES_CONFIG --abi-version 2>/dev/null`
11201 for cf_name in MAJOR MINOR PATCH
11203 cat >conftest.$ac_ext <<CF_EOF
11204 #include <${cf_cv_ncurses_header:-curses.h}>
11205 AUTOCONF_$cf_name NCURSES_VERSION_$cf_name
11207 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | fgrep AUTOCONF_$cf_name >conftest.out"
11208 { (eval echo "$as_me:11208: \"$cf_try\"") >&5
11209 (eval $cf_try) 2>&5
11211 echo "$as_me:11211: \$? = $ac_status" >&5
11212 (exit "$ac_status"); }
11213 if test -f conftest.out ; then
11214 cf_result=`sed -e "s/^.*AUTOCONF_${cf_name}[ ][ ]*//" conftest.out`
11215 eval NCURSES_$cf_name=\"$cf_result\"
11216 # cat conftest.$ac_ext
11221 cf_cv_abi_version=${NCURSES_MAJOR}
11225 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
11227 cf_cv_timestamp=`date`
11229 echo "$as_me:11229: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
11230 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
11232 echo "$as_me:11232: checking if you want to have a library-prefix" >&5
11233 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
11235 # Check whether --with-lib-prefix or --without-lib-prefix was given.
11236 if test "${with_lib_prefix+set}" = set; then
11237 withval="$with_lib_prefix"
11238 with_lib_prefix=$withval
11240 with_lib_prefix=auto
11242 echo "$as_me:11242: result: $with_lib_prefix" >&5
11243 echo "${ECHO_T}$with_lib_prefix" >&6
11245 if test "$with_lib_prefix" = auto
11248 case "$cf_cv_system_name" in
11250 if test "$DFT_LWR_MODEL" = libtool; then
11259 (*) LIB_PREFIX='lib'
11262 cf_prefix=$LIB_PREFIX
11264 elif test "$with_lib_prefix" = no
11268 LIB_PREFIX=$with_lib_prefix
11273 ###############################################################################
11275 if test X"$CC_G_OPT" = X"" ; then
11277 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
11280 echo "$as_me:11280: checking for default loader flags" >&5
11281 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
11282 case $DFT_LWR_MODEL in
11283 (normal) LD_MODEL='' ;;
11284 (debug) LD_MODEL=$CC_G_OPT ;;
11285 (profile) LD_MODEL='-pg';;
11286 (shared) LD_MODEL='' ;;
11288 echo "$as_me:11288: result: $LD_MODEL" >&5
11289 echo "${ECHO_T}$LD_MODEL" >&6
11292 if test "x$cf_cv_enable_rpath" != xno
11294 echo "$as_me:11294: checking for an rpath option" >&5
11295 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
11296 case "$cf_cv_system_name" in
11298 if test "$GCC" = yes; then
11299 LD_RPATH_OPT="-Wl,-rpath,"
11301 LD_RPATH_OPT="-rpath "
11304 (linux*|gnu*|k*bsd*-gnu|freebsd*)
11305 LD_RPATH_OPT="-Wl,-rpath,"
11307 (openbsd[2-9].*|mirbsd*)
11308 LD_RPATH_OPT="-Wl,-rpath,"
11311 LD_RPATH_OPT="-rpath "
11314 LD_RPATH_OPT="-Wl,-rpath,"
11317 LD_RPATH_OPT="-rpath "
11325 echo "$as_me:11325: result: $LD_RPATH_OPT" >&5
11326 echo "${ECHO_T}$LD_RPATH_OPT" >&6
11328 case "x$LD_RPATH_OPT" in
11330 echo "$as_me:11330: checking if we need a space after rpath option" >&5
11331 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
11332 cf_save_LIBS="$LIBS"
11334 cf_add_libs="$LIBS"
11337 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11338 # filter duplicates
11339 for cf_add_1lib in $cf_add_0lib; do
11340 for cf_add_2lib in $cf_add_libs; do
11341 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11346 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11348 LIBS="$cf_add_libs"
11350 cat >"conftest.$ac_ext" <<_ACEOF
11351 #line 11351 "configure"
11352 #include "confdefs.h"
11362 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11363 if { (eval echo "$as_me:11363: \"$ac_link\"") >&5
11364 (eval $ac_link) 2>&5
11366 echo "$as_me:11366: \$? = $ac_status" >&5
11367 (exit "$ac_status"); } &&
11368 { ac_try='test -s "conftest$ac_exeext"'
11369 { (eval echo "$as_me:11369: \"$ac_try\"") >&5
11370 (eval $ac_try) 2>&5
11372 echo "$as_me:11372: \$? = $ac_status" >&5
11373 (exit "$ac_status"); }; }; then
11376 echo "$as_me: failed program was:" >&5
11377 cat "conftest.$ac_ext" >&5
11380 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11381 LIBS="$cf_save_LIBS"
11382 echo "$as_me:11382: result: $cf_rpath_space" >&5
11383 echo "${ECHO_T}$cf_rpath_space" >&6
11384 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
11393 INSTALL_LIB="-m 644"
11394 : ${rel_builddir:=.}
11400 cf_cv_do_symlinks=no
11402 test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
11404 echo "$as_me:11404: checking if release/abi version should be used for shared libs" >&5
11405 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
11407 # Check whether --with-shlib-version or --without-shlib-version was given.
11408 if test "${with_shlib_version+set}" = set; then
11409 withval="$with_shlib_version"
11410 test -z "$withval" && withval=auto
11413 cf_cv_shlib_version=auto
11416 cf_cv_shlib_version=$withval
11419 echo "$as_me:11419: result: $withval" >&5
11420 echo "${ECHO_T}$withval" >&6
11421 { { echo "$as_me:11421: error: option value must be one of: rel, abi, or auto" >&5
11422 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
11423 { (exit 1); exit 1; }; }
11428 cf_cv_shlib_version=auto
11430 echo "$as_me:11430: result: $cf_cv_shlib_version" >&5
11431 echo "${ECHO_T}$cf_cv_shlib_version" >&6
11433 cf_cv_rm_so_locs=no
11436 # Some less-capable ports of gcc support only -fpic
11440 if test "$GCC" = yes
11444 case "$cf_cv_system_name" in
11445 (*linux*) # e.g., PGI compiler
11451 if test "$cf_try_fPIC" = yes
11453 echo "$as_me:11453: checking which $CC option to use" >&5
11454 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
11455 cf_save_CFLAGS="$CFLAGS"
11456 for CC_SHARED_OPTS in -fPIC -fpic ''
11458 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
11459 cat >"conftest.$ac_ext" <<_ACEOF
11460 #line 11460 "configure"
11461 #include "confdefs.h"
11471 rm -f "conftest.$ac_objext"
11472 if { (eval echo "$as_me:11472: \"$ac_compile\"") >&5
11473 (eval $ac_compile) 2>&5
11475 echo "$as_me:11475: \$? = $ac_status" >&5
11476 (exit "$ac_status"); } &&
11477 { ac_try='test -s "conftest.$ac_objext"'
11478 { (eval echo "$as_me:11478: \"$ac_try\"") >&5
11479 (eval $ac_try) 2>&5
11481 echo "$as_me:11481: \$? = $ac_status" >&5
11482 (exit "$ac_status"); }; }; then
11485 echo "$as_me: failed program was:" >&5
11486 cat "conftest.$ac_ext" >&5
11488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11490 echo "$as_me:11490: result: $CC_SHARED_OPTS" >&5
11491 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
11492 CFLAGS="$cf_save_CFLAGS"
11495 cf_cv_shlib_version_infix=no
11497 case "$cf_cv_system_name" in
11498 (aix4.3-9*|aix[5-7]*)
11499 if test "$GCC" = yes; then
11500 CC_SHARED_OPTS='-Wl,-brtl'
11501 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11503 CC_SHARED_OPTS='-brtl'
11504 # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
11505 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
11509 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
11513 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11514 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11515 cf_cv_shlib_version=cygdll
11516 cf_cv_shlib_version_infix=cygdll
11519 cat >mk_shared_lib.sh <<-CF_EOF
11522 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11525 Linking shared library
11526 ** SHARED_LIB \$SHARED_LIB
11527 ** IMPORT_LIB \$IMPORT_LIB
11529 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11531 chmod +x mk_shared_lib.sh
11535 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11536 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11537 cf_cv_shlib_version=msysdll
11538 cf_cv_shlib_version_infix=msysdll
11541 cat >mk_shared_lib.sh <<-CF_EOF
11544 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
11547 Linking shared library
11548 ** SHARED_LIB \$SHARED_LIB
11549 ** IMPORT_LIB \$IMPORT_LIB
11551 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11553 chmod +x mk_shared_lib.sh
11556 cf_try_cflags="no-cpp-precomp"
11557 CC_SHARED_OPTS="-dynamic"
11558 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
11559 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
11560 cf_cv_shlib_version_infix=yes
11561 echo "$as_me:11561: checking if ld -search_paths_first works" >&5
11562 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
11563 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
11564 echo $ECHO_N "(cached) $ECHO_C" >&6
11567 cf_save_LDFLAGS=$LDFLAGS
11568 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11569 cat >"conftest.$ac_ext" <<_ACEOF
11570 #line 11570 "configure"
11571 #include "confdefs.h"
11581 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11582 if { (eval echo "$as_me:11582: \"$ac_link\"") >&5
11583 (eval $ac_link) 2>&5
11585 echo "$as_me:11585: \$? = $ac_status" >&5
11586 (exit "$ac_status"); } &&
11587 { ac_try='test -s "conftest$ac_exeext"'
11588 { (eval echo "$as_me:11588: \"$ac_try\"") >&5
11589 (eval $ac_try) 2>&5
11591 echo "$as_me:11591: \$? = $ac_status" >&5
11592 (exit "$ac_status"); }; }; then
11593 cf_cv_ldflags_search_paths_first=yes
11595 echo "$as_me: failed program was:" >&5
11596 cat "conftest.$ac_ext" >&5
11597 cf_cv_ldflags_search_paths_first=no
11599 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11600 LDFLAGS=$cf_save_LDFLAGS
11602 echo "$as_me:11602: result: $cf_cv_ldflags_search_paths_first" >&5
11603 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
11604 if test "$cf_cv_ldflags_search_paths_first" = yes; then
11605 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
11610 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11611 if test "$cf_cv_shlib_version" = rel; then
11612 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11614 cf_cv_shared_soname='`basename $@`'
11617 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11620 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
11621 if test "$GCC" != yes; then
11622 CC_SHARED_OPTS='+Z'
11624 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
11625 INSTALL_LIB="-m 555"
11628 # (tested with gcc 2.7.2 -- I don't have c89)
11629 if test "$GCC" = yes; then
11630 LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
11632 CC_SHARED_OPTS='+Z'
11633 LD_SHARED_OPTS='-Wl,+b,${libdir}'
11635 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
11636 # HP-UX shared libraries must be executable, and should be
11637 # readonly to exploit a quirk in the memory manager.
11638 INSTALL_LIB="-m 555"
11641 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11642 if test "$cf_cv_shlib_version" = rel; then
11643 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11645 cf_shared_soname='`basename $@`'
11648 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
11651 if test "$cf_cv_enable_rpath" = yes ; then
11652 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11654 # tested with IRIX 5.2 and 'cc'.
11655 if test "$GCC" != yes; then
11656 CC_SHARED_OPTS='-KPIC'
11657 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
11659 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
11661 cf_cv_rm_so_locs=yes
11663 (linux*|gnu*|k*bsd*-gnu)
11664 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11665 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11666 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11668 if test "$cf_cv_enable_rpath" = yes ; then
11669 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11672 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11673 if test "$cf_cv_shlib_version" = rel; then
11674 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11676 cf_cv_shared_soname='`basename $@`'
11679 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11682 cf_cv_shlib_version=msvcdll
11683 cf_cv_shlib_version_infix=msvcdll
11686 if test "$DFT_LWR_MODEL" = "shared" ; then
11687 LOCAL_LDFLAGS="-link -dll"
11688 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11689 EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
11692 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
11693 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
11694 cat >mk_shared_lib.sh <<-CF_EOF
11697 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
11702 Linking shared library
11703 ** SHARED LIB \$SHARED_LIB
11704 ** IMPORT_LIB \$IMPORT_LIB
11706 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
11707 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
11708 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
11710 chmod +x mk_shared_lib.sh
11711 cat >mk_prog.sh <<-CF_EOF
11714 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
11717 ldopts=("/subsystem:console")
11720 while test \$# -gt 0; do
11723 # ignore -link argument
11726 # ignore runtime-library option
11741 libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
11744 ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
11750 for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
11751 ldopts+=("\${linkarg}")
11759 ldopts+=("-out:\$1")
11768 if [ "\$isdll" -ne 0 ]; then
11769 for lib in \${libs[*]}; do
11770 ldopts+=("\$lib.dll.lib")
11773 for lib in \${libs[*]}; do
11774 ldopts+=("\$lib.lib")
11779 ** ld options: "\${ldopts[@]}"
11781 exec \$LD \${ldopts[@]}
11783 chmod +x mk_prog.sh
11784 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
11785 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
11788 cf_cv_shlib_version=mingw
11789 cf_cv_shlib_version_infix=mingw
11792 if test "$DFT_LWR_MODEL" = "shared" ; then
11793 LOCAL_LDFLAGS="-Wl,--enable-auto-import"
11794 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11795 EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
11798 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
11799 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
11800 cat >mk_shared_lib.sh <<-CF_EOF
11803 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
11806 Linking shared library
11807 ** SHARED_LIB \$SHARED_LIB
11808 ** IMPORT_LIB \$IMPORT_LIB
11810 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
11812 chmod +x mk_shared_lib.sh
11814 (openbsd[2-9].*|mirbsd*)
11815 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11816 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11817 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11819 if test "$cf_cv_enable_rpath" = yes ; then
11820 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11822 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11824 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11825 if test "$cf_cv_shlib_version" = rel; then
11826 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11828 cf_cv_shared_soname='`basename $@`'
11831 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11835 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
11839 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
11841 (nto-qnx*|openbsd*|freebsd[12].*)
11842 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11843 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
11844 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11846 (dragonfly*|freebsd*)
11847 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11848 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11849 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11850 LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
11851 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11854 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11855 if test "$cf_cv_shlib_version" = rel; then
11856 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11858 cf_cv_shared_soname='`basename $@`'
11861 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
11864 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
11865 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
11866 LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
11867 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11868 EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
11869 if test "$cf_cv_shlib_version" = auto; then
11870 if test -f /usr/libexec/ld.elf_so; then
11871 cf_cv_shlib_version=abi
11873 cf_cv_shlib_version=rel
11877 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11878 if test "$cf_cv_shlib_version" = rel; then
11879 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11881 cf_cv_shared_soname='`basename $@`'
11884 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
11886 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
11890 # tested with OSF/1 V3.2 and 'cc'
11891 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
11892 # link with shared libs).
11893 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
11896 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
11899 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
11900 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
11901 LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
11902 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11904 cf_cv_rm_so_locs=yes
11906 (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
11907 # tested with osr5.0.5
11908 if test "$GCC" != yes; then
11909 CC_SHARED_OPTS='-belf -KPIC'
11911 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
11912 if test "$cf_cv_enable_rpath" = yes ; then
11913 # only way is to set LD_RUN_PATH but no switch for it
11916 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11917 LINK_PROGS='LD_RUN_PATH=${libdir}'
11918 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
11921 # tested with SunOS 4.1.1 and gcc 2.7.0
11922 if test "$GCC" != yes; then
11923 CC_SHARED_OPTS='-KPIC'
11925 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
11926 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11929 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
11930 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
11931 if test "$DFT_LWR_MODEL" = "shared" ; then
11932 LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
11933 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
11935 if test "$cf_cv_enable_rpath" = yes ; then
11936 EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
11939 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
11940 if test "$cf_cv_shlib_version" = rel; then
11941 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
11943 cf_cv_shared_soname='`basename $@`'
11946 if test "$GCC" != yes; then
11947 cf_save_CFLAGS="$CFLAGS"
11948 for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
11950 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
11951 cat >"conftest.$ac_ext" <<_ACEOF
11952 #line 11952 "configure"
11953 #include "confdefs.h"
11958 printf("Hello\\n");
11963 rm -f "conftest.$ac_objext"
11964 if { (eval echo "$as_me:11964: \"$ac_compile\"") >&5
11965 (eval $ac_compile) 2>&5
11967 echo "$as_me:11967: \$? = $ac_status" >&5
11968 (exit "$ac_status"); } &&
11969 { ac_try='test -s "conftest.$ac_objext"'
11970 { (eval echo "$as_me:11970: \"$ac_try\"") >&5
11971 (eval $ac_try) 2>&5
11973 echo "$as_me:11973: \$? = $ac_status" >&5
11974 (exit "$ac_status"); }; }; then
11977 echo "$as_me: failed program was:" >&5
11978 cat "conftest.$ac_ext" >&5
11980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11982 CFLAGS="$cf_save_CFLAGS"
11983 CC_SHARED_OPTS=$cf_shared_opts
11984 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
11986 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
11989 (sysv5uw7*|unix_sv*)
11990 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
11991 if test "$GCC" != yes; then
11992 CC_SHARED_OPTS='-KPIC'
11994 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
11997 CC_SHARED_OPTS='unknown'
11998 MK_SHARED_LIB='echo unknown'
12002 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
12003 case "$cf_cv_shlib_version" in
12005 case "$MK_SHARED_LIB" in
12007 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
12010 { echo "$as_me:12010: WARNING: ignored --with-shlib-version" >&5
12011 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
12017 if test -n "$cf_try_cflags"
12019 cat > conftest.$ac_ext <<EOF
12020 #line 12020 "${as_me:-configure}"
12022 int main(int argc, char *argv[])
12024 printf("hello\\n");
12025 return (argv[argc-1] == 0) ;
12028 cf_save_CFLAGS="$CFLAGS"
12029 for cf_opt in $cf_try_cflags
12031 CFLAGS="$cf_save_CFLAGS -$cf_opt"
12032 echo "$as_me:12032: checking if CFLAGS option -$cf_opt works" >&5
12033 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
12034 if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
12035 (eval $ac_compile) 2>&5
12037 echo "$as_me:12037: \$? = $ac_status" >&5
12038 (exit "$ac_status"); }; then
12039 echo "$as_me:12039: result: yes" >&5
12040 echo "${ECHO_T}yes" >&6
12041 cf_save_CFLAGS="$CFLAGS"
12043 echo "$as_me:12043: result: no" >&5
12044 echo "${ECHO_T}no" >&6
12047 CFLAGS="$cf_save_CFLAGS"
12050 # RPATH_LIST is a colon-separated list of directories
12051 test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
12052 test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
12054 test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
12056 test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
12058 echo "${as_me:-configure}:12058: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
12060 test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
12062 echo "${as_me:-configure}:12062: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
12064 # The test/sample programs in the original tree link using rpath option.
12065 # Make it optional for packagers.
12066 if test -n "$LOCAL_LDFLAGS"
12068 echo "$as_me:12068: checking if you want to link sample programs with rpath option" >&5
12069 echo $ECHO_N "checking if you want to link sample programs with rpath option... $ECHO_C" >&6
12071 # Check whether --enable-rpath-link or --disable-rpath-link was given.
12072 if test "${enable_rpath_link+set}" = set; then
12073 enableval="$enable_rpath_link"
12074 with_rpath_link=$enableval
12076 with_rpath_link=yes
12078 echo "$as_me:12078: result: $with_rpath_link" >&5
12079 echo "${ECHO_T}$with_rpath_link" >&6
12080 if test "$with_rpath_link" = no
12087 ###############################################################################
12089 ### use option --enable-broken-linker to force on use of broken-linker support
12091 echo "$as_me:12091: checking if you want broken-linker support code" >&5
12092 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
12094 # Check whether --enable-broken_linker or --disable-broken_linker was given.
12095 if test "${enable_broken_linker+set}" = set; then
12096 enableval="$enable_broken_linker"
12097 with_broken_linker=$enableval
12099 with_broken_linker=no
12101 echo "$as_me:12101: result: $with_broken_linker" >&5
12102 echo "${ECHO_T}$with_broken_linker" >&6
12104 : "${BROKEN_LINKER:=0}"
12105 if test "x$with_broken_linker" = xyes ; then
12107 cat >>confdefs.h <<\EOF
12108 #define BROKEN_LINKER 1
12114 # Check to define _XOPEN_SOURCE "automatically"
12116 echo "$as_me:12116: checking if the POSIX test-macros are already defined" >&5
12117 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
12118 if test "${cf_cv_posix_visible+set}" = set; then
12119 echo $ECHO_N "(cached) $ECHO_C" >&6
12122 cat >"conftest.$ac_ext" <<_ACEOF
12123 #line 12123 "configure"
12124 #include "confdefs.h"
12130 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
12131 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
12132 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
12133 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
12134 #error conflicting symbols found
12141 rm -f "conftest.$ac_objext"
12142 if { (eval echo "$as_me:12142: \"$ac_compile\"") >&5
12143 (eval $ac_compile) 2>&5
12145 echo "$as_me:12145: \$? = $ac_status" >&5
12146 (exit "$ac_status"); } &&
12147 { ac_try='test -s "conftest.$ac_objext"'
12148 { (eval echo "$as_me:12148: \"$ac_try\"") >&5
12149 (eval $ac_try) 2>&5
12151 echo "$as_me:12151: \$? = $ac_status" >&5
12152 (exit "$ac_status"); }; }; then
12153 cf_cv_posix_visible=no
12155 echo "$as_me: failed program was:" >&5
12156 cat "conftest.$ac_ext" >&5
12157 cf_cv_posix_visible=yes
12159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12162 echo "$as_me:12162: result: $cf_cv_posix_visible" >&5
12163 echo "${ECHO_T}$cf_cv_posix_visible" >&6
12165 if test "$cf_cv_posix_visible" = no; then
12167 cf_XOPEN_SOURCE=600
12168 cf_POSIX_C_SOURCE=199506L
12173 cf_xopen_source="-D_ALL_SOURCE"
12176 cf_XOPEN_SOURCE=600
12179 cf_xopen_source="-D_APPLE_C_SOURCE"
12182 cf_xopen_source="-D_DARWIN_C_SOURCE"
12185 (freebsd*|dragonfly*|midnightbsd*)
12186 # 5.x headers associate
12187 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
12188 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
12189 cf_POSIX_C_SOURCE=200112L
12190 cf_XOPEN_SOURCE=600
12191 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12194 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
12197 cf_xopen_source="-D_HPUX_SOURCE"
12200 cf_xopen_source="-D_SGI_SOURCE"
12203 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
12205 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
12207 echo "$as_me:12207: checking if this is the GNU C library" >&5
12208 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
12209 if test "${cf_cv_gnu_library+set}" = set; then
12210 echo $ECHO_N "(cached) $ECHO_C" >&6
12213 cat >"conftest.$ac_ext" <<_ACEOF
12214 #line 12214 "configure"
12215 #include "confdefs.h"
12216 #include <sys/types.h>
12221 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
12223 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
12226 # error not GNU C library
12232 rm -f "conftest.$ac_objext"
12233 if { (eval echo "$as_me:12233: \"$ac_compile\"") >&5
12234 (eval $ac_compile) 2>&5
12236 echo "$as_me:12236: \$? = $ac_status" >&5
12237 (exit "$ac_status"); } &&
12238 { ac_try='test -s "conftest.$ac_objext"'
12239 { (eval echo "$as_me:12239: \"$ac_try\"") >&5
12240 (eval $ac_try) 2>&5
12242 echo "$as_me:12242: \$? = $ac_status" >&5
12243 (exit "$ac_status"); }; }; then
12244 cf_cv_gnu_library=yes
12246 echo "$as_me: failed program was:" >&5
12247 cat "conftest.$ac_ext" >&5
12248 cf_cv_gnu_library=no
12250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12253 echo "$as_me:12253: result: $cf_cv_gnu_library" >&5
12254 echo "${ECHO_T}$cf_cv_gnu_library" >&6
12256 if test x$cf_cv_gnu_library = xyes; then
12258 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
12259 # was changed to help a little. newlib incorporated the change about 4
12261 echo "$as_me:12261: checking if _DEFAULT_SOURCE can be used as a basis" >&5
12262 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
12263 if test "${cf_cv_gnu_library_219+set}" = set; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6
12267 cf_save="$CPPFLAGS"
12269 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12270 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12272 cat >"conftest.$ac_ext" <<_ACEOF
12273 #line 12273 "configure"
12274 #include "confdefs.h"
12275 #include <sys/types.h>
12280 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
12282 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
12285 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
12291 rm -f "conftest.$ac_objext"
12292 if { (eval echo "$as_me:12292: \"$ac_compile\"") >&5
12293 (eval $ac_compile) 2>&5
12295 echo "$as_me:12295: \$? = $ac_status" >&5
12296 (exit "$ac_status"); } &&
12297 { ac_try='test -s "conftest.$ac_objext"'
12298 { (eval echo "$as_me:12298: \"$ac_try\"") >&5
12299 (eval $ac_try) 2>&5
12301 echo "$as_me:12301: \$? = $ac_status" >&5
12302 (exit "$ac_status"); }; }; then
12303 cf_cv_gnu_library_219=yes
12305 echo "$as_me: failed program was:" >&5
12306 cat "conftest.$ac_ext" >&5
12307 cf_cv_gnu_library_219=no
12309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12310 CPPFLAGS="$cf_save"
12313 echo "$as_me:12313: result: $cf_cv_gnu_library_219" >&5
12314 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
12316 if test "x$cf_cv_gnu_library_219" = xyes; then
12317 cf_save="$CPPFLAGS"
12318 echo "$as_me:12318: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
12319 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
12320 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
12321 echo $ECHO_N "(cached) $ECHO_C" >&6
12327 cf_new_extra_cppflags=
12329 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
12331 case "$cf_fix_cppflags" in
12333 case "$cf_add_cflags" in
12334 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12335 case "$cf_add_cflags" in
12337 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12339 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12340 && test -z "${cf_tst_cflags}" \
12341 && cf_fix_cppflags=yes
12343 if test "$cf_fix_cppflags" = yes ; then
12345 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12346 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12349 elif test "${cf_tst_cflags}" = "\"'" ; then
12351 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12352 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12358 case "$CPPFLAGS" in
12362 case "$cf_add_cflags" in
12364 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12366 CPPFLAGS=`echo "$CPPFLAGS" | \
12367 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12368 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12373 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12374 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12381 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12382 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12389 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12390 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12392 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12394 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12395 && test -z "${cf_tst_cflags}" \
12396 && cf_fix_cppflags=no
12401 if test -n "$cf_new_cflags" ; then
12403 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12404 CFLAGS="${CFLAGS}$cf_new_cflags"
12408 if test -n "$cf_new_cppflags" ; then
12410 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12411 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12415 if test -n "$cf_new_extra_cppflags" ; then
12417 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12418 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12422 cat >"conftest.$ac_ext" <<_ACEOF
12423 #line 12423 "configure"
12424 #include "confdefs.h"
12426 #include <limits.h>
12427 #include <sys/types.h>
12433 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
12436 # error GNU C library is too old
12442 rm -f "conftest.$ac_objext"
12443 if { (eval echo "$as_me:12443: \"$ac_compile\"") >&5
12444 (eval $ac_compile) 2>&5
12446 echo "$as_me:12446: \$? = $ac_status" >&5
12447 (exit "$ac_status"); } &&
12448 { ac_try='test -s "conftest.$ac_objext"'
12449 { (eval echo "$as_me:12449: \"$ac_try\"") >&5
12450 (eval $ac_try) 2>&5
12452 echo "$as_me:12452: \$? = $ac_status" >&5
12453 (exit "$ac_status"); }; }; then
12454 cf_cv_gnu_dftsrc_219=yes
12456 echo "$as_me: failed program was:" >&5
12457 cat "conftest.$ac_ext" >&5
12458 cf_cv_gnu_dftsrc_219=no
12460 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12463 echo "$as_me:12463: result: $cf_cv_gnu_dftsrc_219" >&5
12464 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
12465 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
12467 cf_cv_gnu_dftsrc_219=maybe
12470 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
12472 echo "$as_me:12472: checking if we must define _GNU_SOURCE" >&5
12473 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
12474 if test "${cf_cv_gnu_source+set}" = set; then
12475 echo $ECHO_N "(cached) $ECHO_C" >&6
12478 cat >"conftest.$ac_ext" <<_ACEOF
12479 #line 12479 "configure"
12480 #include "confdefs.h"
12481 #include <sys/types.h>
12486 #ifndef _XOPEN_SOURCE
12487 #error expected _XOPEN_SOURCE to be defined
12493 rm -f "conftest.$ac_objext"
12494 if { (eval echo "$as_me:12494: \"$ac_compile\"") >&5
12495 (eval $ac_compile) 2>&5
12497 echo "$as_me:12497: \$? = $ac_status" >&5
12498 (exit "$ac_status"); } &&
12499 { ac_try='test -s "conftest.$ac_objext"'
12500 { (eval echo "$as_me:12500: \"$ac_try\"") >&5
12501 (eval $ac_try) 2>&5
12503 echo "$as_me:12503: \$? = $ac_status" >&5
12504 (exit "$ac_status"); }; }; then
12505 cf_cv_gnu_source=no
12507 echo "$as_me: failed program was:" >&5
12508 cat "conftest.$ac_ext" >&5
12509 cf_save="$CPPFLAGS"
12514 cf_new_extra_cppflags=
12516 for cf_add_cflags in -D_GNU_SOURCE
12518 case "$cf_fix_cppflags" in
12520 case "$cf_add_cflags" in
12521 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12522 case "$cf_add_cflags" in
12524 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12526 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12527 && test -z "${cf_tst_cflags}" \
12528 && cf_fix_cppflags=yes
12530 if test "$cf_fix_cppflags" = yes ; then
12532 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12533 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12536 elif test "${cf_tst_cflags}" = "\"'" ; then
12538 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12539 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12545 case "$CPPFLAGS" in
12549 case "$cf_add_cflags" in
12551 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12553 CPPFLAGS=`echo "$CPPFLAGS" | \
12554 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12555 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12560 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12561 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12568 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12569 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12576 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12577 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12579 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12581 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12582 && test -z "${cf_tst_cflags}" \
12583 && cf_fix_cppflags=no
12588 if test -n "$cf_new_cflags" ; then
12590 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12591 CFLAGS="${CFLAGS}$cf_new_cflags"
12595 if test -n "$cf_new_cppflags" ; then
12597 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12598 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12602 if test -n "$cf_new_extra_cppflags" ; then
12604 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12605 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12609 cat >"conftest.$ac_ext" <<_ACEOF
12610 #line 12610 "configure"
12611 #include "confdefs.h"
12612 #include <sys/types.h>
12617 #ifdef _XOPEN_SOURCE
12618 #error expected _XOPEN_SOURCE to be undefined
12624 rm -f "conftest.$ac_objext"
12625 if { (eval echo "$as_me:12625: \"$ac_compile\"") >&5
12626 (eval $ac_compile) 2>&5
12628 echo "$as_me:12628: \$? = $ac_status" >&5
12629 (exit "$ac_status"); } &&
12630 { ac_try='test -s "conftest.$ac_objext"'
12631 { (eval echo "$as_me:12631: \"$ac_try\"") >&5
12632 (eval $ac_try) 2>&5
12634 echo "$as_me:12634: \$? = $ac_status" >&5
12635 (exit "$ac_status"); }; }; then
12636 cf_cv_gnu_source=no
12638 echo "$as_me: failed program was:" >&5
12639 cat "conftest.$ac_ext" >&5
12640 cf_cv_gnu_source=yes
12642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12643 CPPFLAGS="$cf_save"
12646 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12649 echo "$as_me:12649: result: $cf_cv_gnu_source" >&5
12650 echo "${ECHO_T}$cf_cv_gnu_source" >&6
12652 if test "$cf_cv_gnu_source" = yes
12654 echo "$as_me:12654: checking if we should also define _DEFAULT_SOURCE" >&5
12655 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
12656 if test "${cf_cv_default_source+set}" = set; then
12657 echo $ECHO_N "(cached) $ECHO_C" >&6
12660 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12661 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
12663 cat >"conftest.$ac_ext" <<_ACEOF
12664 #line 12664 "configure"
12665 #include "confdefs.h"
12666 #include <sys/types.h>
12671 #ifdef _DEFAULT_SOURCE
12672 #error expected _DEFAULT_SOURCE to be undefined
12678 rm -f "conftest.$ac_objext"
12679 if { (eval echo "$as_me:12679: \"$ac_compile\"") >&5
12680 (eval $ac_compile) 2>&5
12682 echo "$as_me:12682: \$? = $ac_status" >&5
12683 (exit "$ac_status"); } &&
12684 { ac_try='test -s "conftest.$ac_objext"'
12685 { (eval echo "$as_me:12685: \"$ac_try\"") >&5
12686 (eval $ac_try) 2>&5
12688 echo "$as_me:12688: \$? = $ac_status" >&5
12689 (exit "$ac_status"); }; }; then
12690 cf_cv_default_source=no
12692 echo "$as_me: failed program was:" >&5
12693 cat "conftest.$ac_ext" >&5
12694 cf_cv_default_source=yes
12696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12699 echo "$as_me:12699: result: $cf_cv_default_source" >&5
12700 echo "${ECHO_T}$cf_cv_default_source" >&6
12701 if test "$cf_cv_default_source" = yes
12704 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12705 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
12715 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
12718 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
12721 if test "$cf_cv_posix_visible" = no; then
12723 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12725 cf_save_CFLAGS="$CFLAGS"
12726 cf_save_CPPFLAGS="$CPPFLAGS"
12728 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12729 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12730 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12732 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12733 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
12734 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
12736 echo "$as_me:12736: checking if we should define _POSIX_C_SOURCE" >&5
12737 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12738 if test "${cf_cv_posix_c_source+set}" = set; then
12739 echo $ECHO_N "(cached) $ECHO_C" >&6
12742 echo "${as_me:-configure}:12742: testing if the symbol is already defined go no further ..." 1>&5
12744 cat >"conftest.$ac_ext" <<_ACEOF
12745 #line 12745 "configure"
12746 #include "confdefs.h"
12747 #include <sys/types.h>
12752 #ifndef _POSIX_C_SOURCE
12759 rm -f "conftest.$ac_objext"
12760 if { (eval echo "$as_me:12760: \"$ac_compile\"") >&5
12761 (eval $ac_compile) 2>&5
12763 echo "$as_me:12763: \$? = $ac_status" >&5
12764 (exit "$ac_status"); } &&
12765 { ac_try='test -s "conftest.$ac_objext"'
12766 { (eval echo "$as_me:12766: \"$ac_try\"") >&5
12767 (eval $ac_try) 2>&5
12769 echo "$as_me:12769: \$? = $ac_status" >&5
12770 (exit "$ac_status"); }; }; then
12771 cf_cv_posix_c_source=no
12773 echo "$as_me: failed program was:" >&5
12774 cat "conftest.$ac_ext" >&5
12775 cf_want_posix_source=no
12776 case .$cf_POSIX_C_SOURCE in
12778 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12781 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12782 cf_want_posix_source=yes
12785 cf_want_posix_source=yes
12788 if test "$cf_want_posix_source" = yes ; then
12789 cat >"conftest.$ac_ext" <<_ACEOF
12790 #line 12790 "configure"
12791 #include "confdefs.h"
12792 #include <sys/types.h>
12797 #ifdef _POSIX_SOURCE
12804 rm -f "conftest.$ac_objext"
12805 if { (eval echo "$as_me:12805: \"$ac_compile\"") >&5
12806 (eval $ac_compile) 2>&5
12808 echo "$as_me:12808: \$? = $ac_status" >&5
12809 (exit "$ac_status"); } &&
12810 { ac_try='test -s "conftest.$ac_objext"'
12811 { (eval echo "$as_me:12811: \"$ac_try\"") >&5
12812 (eval $ac_try) 2>&5
12814 echo "$as_me:12814: \$? = $ac_status" >&5
12815 (exit "$ac_status"); }; }; then
12818 echo "$as_me: failed program was:" >&5
12819 cat "conftest.$ac_ext" >&5
12820 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12822 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12825 echo "${as_me:-configure}:12825: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12827 CFLAGS="$cf_trim_CFLAGS"
12828 CPPFLAGS="$cf_trim_CPPFLAGS"
12830 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12831 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12833 echo "${as_me:-configure}:12833: testing if the second compile does not leave our definition intact error ..." 1>&5
12835 cat >"conftest.$ac_ext" <<_ACEOF
12836 #line 12836 "configure"
12837 #include "confdefs.h"
12838 #include <sys/types.h>
12843 #ifndef _POSIX_C_SOURCE
12850 rm -f "conftest.$ac_objext"
12851 if { (eval echo "$as_me:12851: \"$ac_compile\"") >&5
12852 (eval $ac_compile) 2>&5
12854 echo "$as_me:12854: \$? = $ac_status" >&5
12855 (exit "$ac_status"); } &&
12856 { ac_try='test -s "conftest.$ac_objext"'
12857 { (eval echo "$as_me:12857: \"$ac_try\"") >&5
12858 (eval $ac_try) 2>&5
12860 echo "$as_me:12860: \$? = $ac_status" >&5
12861 (exit "$ac_status"); }; }; then
12864 echo "$as_me: failed program was:" >&5
12865 cat "conftest.$ac_ext" >&5
12866 cf_cv_posix_c_source=no
12868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12869 CFLAGS="$cf_save_CFLAGS"
12870 CPPFLAGS="$cf_save_CPPFLAGS"
12873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12876 echo "$as_me:12876: result: $cf_cv_posix_c_source" >&5
12877 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12879 if test "$cf_cv_posix_c_source" != no ; then
12880 CFLAGS="$cf_trim_CFLAGS"
12881 CPPFLAGS="$cf_trim_CPPFLAGS"
12886 cf_new_extra_cppflags=
12888 for cf_add_cflags in $cf_cv_posix_c_source
12890 case "$cf_fix_cppflags" in
12892 case "$cf_add_cflags" in
12893 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12894 case "$cf_add_cflags" in
12896 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12898 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12899 && test -z "${cf_tst_cflags}" \
12900 && cf_fix_cppflags=yes
12902 if test "$cf_fix_cppflags" = yes ; then
12904 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12905 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12908 elif test "${cf_tst_cflags}" = "\"'" ; then
12910 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12911 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12917 case "$CPPFLAGS" in
12921 case "$cf_add_cflags" in
12923 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12925 CPPFLAGS=`echo "$CPPFLAGS" | \
12926 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12927 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12932 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12933 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12940 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12941 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12948 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12949 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12951 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12953 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12954 && test -z "${cf_tst_cflags}" \
12955 && cf_fix_cppflags=no
12960 if test -n "$cf_new_cflags" ; then
12962 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12963 CFLAGS="${CFLAGS}$cf_new_cflags"
12967 if test -n "$cf_new_cppflags" ; then
12969 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12970 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12974 if test -n "$cf_new_extra_cppflags" ; then
12976 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12977 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12983 fi # cf_cv_posix_visible
12987 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12990 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
12991 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
12992 # Abusing the conformance level is a workaround.
12993 { echo "$as_me:12993: WARNING: this system does not provide usable locale support" >&5
12994 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
12995 cf_xopen_source="-D_BSD_SOURCE"
12996 cf_XOPEN_SOURCE=700
12999 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
13000 cf_xopen_source="-D_BSD_SOURCE"
13001 cf_XOPEN_SOURCE=600
13004 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
13007 cf_xopen_source="-D_OSF_SOURCE"
13010 cf_xopen_source="-D_QNX_SOURCE"
13013 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
13016 cf_xopen_source="-D__EXTENSIONS__"
13017 cf_cv_xopen_source=broken
13019 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
13025 echo "$as_me:13025: checking if we should define _XOPEN_SOURCE" >&5
13026 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13027 if test "${cf_cv_xopen_source+set}" = set; then
13028 echo $ECHO_N "(cached) $ECHO_C" >&6
13031 cat >"conftest.$ac_ext" <<_ACEOF
13032 #line 13032 "configure"
13033 #include "confdefs.h"
13035 #include <stdlib.h>
13036 #include <string.h>
13037 #include <sys/types.h>
13043 #ifndef _XOPEN_SOURCE
13050 rm -f "conftest.$ac_objext"
13051 if { (eval echo "$as_me:13051: \"$ac_compile\"") >&5
13052 (eval $ac_compile) 2>&5
13054 echo "$as_me:13054: \$? = $ac_status" >&5
13055 (exit "$ac_status"); } &&
13056 { ac_try='test -s "conftest.$ac_objext"'
13057 { (eval echo "$as_me:13057: \"$ac_try\"") >&5
13058 (eval $ac_try) 2>&5
13060 echo "$as_me:13060: \$? = $ac_status" >&5
13061 (exit "$ac_status"); }; }; then
13062 cf_cv_xopen_source=no
13064 echo "$as_me: failed program was:" >&5
13065 cat "conftest.$ac_ext" >&5
13066 cf_save="$CPPFLAGS"
13068 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13069 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13071 cat >"conftest.$ac_ext" <<_ACEOF
13072 #line 13072 "configure"
13073 #include "confdefs.h"
13075 #include <stdlib.h>
13076 #include <string.h>
13077 #include <sys/types.h>
13083 #ifdef _XOPEN_SOURCE
13090 rm -f "conftest.$ac_objext"
13091 if { (eval echo "$as_me:13091: \"$ac_compile\"") >&5
13092 (eval $ac_compile) 2>&5
13094 echo "$as_me:13094: \$? = $ac_status" >&5
13095 (exit "$ac_status"); } &&
13096 { ac_try='test -s "conftest.$ac_objext"'
13097 { (eval echo "$as_me:13097: \"$ac_try\"") >&5
13098 (eval $ac_try) 2>&5
13100 echo "$as_me:13100: \$? = $ac_status" >&5
13101 (exit "$ac_status"); }; }; then
13102 cf_cv_xopen_source=no
13104 echo "$as_me: failed program was:" >&5
13105 cat "conftest.$ac_ext" >&5
13106 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13109 CPPFLAGS="$cf_save"
13112 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13115 echo "$as_me:13115: result: $cf_cv_xopen_source" >&5
13116 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13118 if test "$cf_cv_xopen_source" != no ; then
13120 CFLAGS=`echo "$CFLAGS" | \
13121 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13122 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13124 CPPFLAGS=`echo "$CPPFLAGS" | \
13125 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13126 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13128 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13133 cf_new_extra_cppflags=
13135 for cf_add_cflags in $cf_temp_xopen_source
13137 case "$cf_fix_cppflags" in
13139 case "$cf_add_cflags" in
13140 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13141 case "$cf_add_cflags" in
13143 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13145 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13146 && test -z "${cf_tst_cflags}" \
13147 && cf_fix_cppflags=yes
13149 if test "$cf_fix_cppflags" = yes ; then
13151 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13152 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13155 elif test "${cf_tst_cflags}" = "\"'" ; then
13157 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13158 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13164 case "$CPPFLAGS" in
13168 case "$cf_add_cflags" in
13170 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13172 CPPFLAGS=`echo "$CPPFLAGS" | \
13173 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13174 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13179 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13180 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13187 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13188 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13195 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13196 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13198 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13200 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13201 && test -z "${cf_tst_cflags}" \
13202 && cf_fix_cppflags=no
13207 if test -n "$cf_new_cflags" ; then
13209 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13210 CFLAGS="${CFLAGS}$cf_new_cflags"
13214 if test -n "$cf_new_cppflags" ; then
13216 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13217 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13221 if test -n "$cf_new_extra_cppflags" ; then
13223 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13224 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13230 if test "$cf_cv_posix_visible" = no; then
13232 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
13234 cf_save_CFLAGS="$CFLAGS"
13235 cf_save_CPPFLAGS="$CPPFLAGS"
13237 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
13238 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13239 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13241 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
13242 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13243 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
13245 echo "$as_me:13245: checking if we should define _POSIX_C_SOURCE" >&5
13246 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
13247 if test "${cf_cv_posix_c_source+set}" = set; then
13248 echo $ECHO_N "(cached) $ECHO_C" >&6
13251 echo "${as_me:-configure}:13251: testing if the symbol is already defined go no further ..." 1>&5
13253 cat >"conftest.$ac_ext" <<_ACEOF
13254 #line 13254 "configure"
13255 #include "confdefs.h"
13256 #include <sys/types.h>
13261 #ifndef _POSIX_C_SOURCE
13268 rm -f "conftest.$ac_objext"
13269 if { (eval echo "$as_me:13269: \"$ac_compile\"") >&5
13270 (eval $ac_compile) 2>&5
13272 echo "$as_me:13272: \$? = $ac_status" >&5
13273 (exit "$ac_status"); } &&
13274 { ac_try='test -s "conftest.$ac_objext"'
13275 { (eval echo "$as_me:13275: \"$ac_try\"") >&5
13276 (eval $ac_try) 2>&5
13278 echo "$as_me:13278: \$? = $ac_status" >&5
13279 (exit "$ac_status"); }; }; then
13280 cf_cv_posix_c_source=no
13282 echo "$as_me: failed program was:" >&5
13283 cat "conftest.$ac_ext" >&5
13284 cf_want_posix_source=no
13285 case .$cf_POSIX_C_SOURCE in
13287 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13290 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
13291 cf_want_posix_source=yes
13294 cf_want_posix_source=yes
13297 if test "$cf_want_posix_source" = yes ; then
13298 cat >"conftest.$ac_ext" <<_ACEOF
13299 #line 13299 "configure"
13300 #include "confdefs.h"
13301 #include <sys/types.h>
13306 #ifdef _POSIX_SOURCE
13313 rm -f "conftest.$ac_objext"
13314 if { (eval echo "$as_me:13314: \"$ac_compile\"") >&5
13315 (eval $ac_compile) 2>&5
13317 echo "$as_me:13317: \$? = $ac_status" >&5
13318 (exit "$ac_status"); } &&
13319 { ac_try='test -s "conftest.$ac_objext"'
13320 { (eval echo "$as_me:13320: \"$ac_try\"") >&5
13321 (eval $ac_try) 2>&5
13323 echo "$as_me:13323: \$? = $ac_status" >&5
13324 (exit "$ac_status"); }; }; then
13327 echo "$as_me: failed program was:" >&5
13328 cat "conftest.$ac_ext" >&5
13329 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
13331 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13334 echo "${as_me:-configure}:13334: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
13336 CFLAGS="$cf_trim_CFLAGS"
13337 CPPFLAGS="$cf_trim_CPPFLAGS"
13339 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13340 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
13342 echo "${as_me:-configure}:13342: testing if the second compile does not leave our definition intact error ..." 1>&5
13344 cat >"conftest.$ac_ext" <<_ACEOF
13345 #line 13345 "configure"
13346 #include "confdefs.h"
13347 #include <sys/types.h>
13352 #ifndef _POSIX_C_SOURCE
13359 rm -f "conftest.$ac_objext"
13360 if { (eval echo "$as_me:13360: \"$ac_compile\"") >&5
13361 (eval $ac_compile) 2>&5
13363 echo "$as_me:13363: \$? = $ac_status" >&5
13364 (exit "$ac_status"); } &&
13365 { ac_try='test -s "conftest.$ac_objext"'
13366 { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367 (eval $ac_try) 2>&5
13369 echo "$as_me:13369: \$? = $ac_status" >&5
13370 (exit "$ac_status"); }; }; then
13373 echo "$as_me: failed program was:" >&5
13374 cat "conftest.$ac_ext" >&5
13375 cf_cv_posix_c_source=no
13377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13378 CFLAGS="$cf_save_CFLAGS"
13379 CPPFLAGS="$cf_save_CPPFLAGS"
13382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13385 echo "$as_me:13385: result: $cf_cv_posix_c_source" >&5
13386 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
13388 if test "$cf_cv_posix_c_source" != no ; then
13389 CFLAGS="$cf_trim_CFLAGS"
13390 CPPFLAGS="$cf_trim_CPPFLAGS"
13395 cf_new_extra_cppflags=
13397 for cf_add_cflags in $cf_cv_posix_c_source
13399 case "$cf_fix_cppflags" in
13401 case "$cf_add_cflags" in
13402 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13403 case "$cf_add_cflags" in
13405 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13407 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13408 && test -z "${cf_tst_cflags}" \
13409 && cf_fix_cppflags=yes
13411 if test "$cf_fix_cppflags" = yes ; then
13413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13417 elif test "${cf_tst_cflags}" = "\"'" ; then
13419 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13420 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13426 case "$CPPFLAGS" in
13430 case "$cf_add_cflags" in
13432 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13434 CPPFLAGS=`echo "$CPPFLAGS" | \
13435 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13436 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13441 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13442 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13449 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13450 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13457 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13458 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13460 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13462 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13463 && test -z "${cf_tst_cflags}" \
13464 && cf_fix_cppflags=no
13469 if test -n "$cf_new_cflags" ; then
13471 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13472 CFLAGS="${CFLAGS}$cf_new_cflags"
13476 if test -n "$cf_new_cppflags" ; then
13478 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13479 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13483 if test -n "$cf_new_extra_cppflags" ; then
13485 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13486 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13492 fi # cf_cv_posix_visible
13497 if test -n "$cf_xopen_source" ; then
13502 cf_new_extra_cppflags=
13504 for cf_add_cflags in $cf_xopen_source
13506 case "$cf_fix_cppflags" in
13508 case "$cf_add_cflags" in
13509 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13510 case "$cf_add_cflags" in
13512 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13514 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13515 && test -z "${cf_tst_cflags}" \
13516 && cf_fix_cppflags=yes
13518 if test "$cf_fix_cppflags" = yes ; then
13520 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13521 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13524 elif test "${cf_tst_cflags}" = "\"'" ; then
13526 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13527 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13533 case "$CPPFLAGS" in
13537 case "$cf_add_cflags" in
13539 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13541 CPPFLAGS=`echo "$CPPFLAGS" | \
13542 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13543 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13548 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13549 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13556 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13557 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13564 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13565 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13567 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13569 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13570 && test -z "${cf_tst_cflags}" \
13571 && cf_fix_cppflags=no
13576 if test -n "$cf_new_cflags" ; then
13577 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
13579 echo "${as_me:-configure}:13579: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13581 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13582 CFLAGS="${CFLAGS}$cf_new_cflags"
13586 if test -n "$cf_new_cppflags" ; then
13587 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13589 echo "${as_me:-configure}:13589: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13591 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13592 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13596 if test -n "$cf_new_extra_cppflags" ; then
13597 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13599 echo "${as_me:-configure}:13599: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13601 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13602 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13608 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
13609 echo "$as_me:13609: checking if _XOPEN_SOURCE really is set" >&5
13610 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
13611 cat >"conftest.$ac_ext" <<_ACEOF
13612 #line 13612 "configure"
13613 #include "confdefs.h"
13614 #include <stdlib.h>
13619 #ifndef _XOPEN_SOURCE
13626 rm -f "conftest.$ac_objext"
13627 if { (eval echo "$as_me:13627: \"$ac_compile\"") >&5
13628 (eval $ac_compile) 2>&5
13630 echo "$as_me:13630: \$? = $ac_status" >&5
13631 (exit "$ac_status"); } &&
13632 { ac_try='test -s "conftest.$ac_objext"'
13633 { (eval echo "$as_me:13633: \"$ac_try\"") >&5
13634 (eval $ac_try) 2>&5
13636 echo "$as_me:13636: \$? = $ac_status" >&5
13637 (exit "$ac_status"); }; }; then
13638 cf_XOPEN_SOURCE_set=yes
13640 echo "$as_me: failed program was:" >&5
13641 cat "conftest.$ac_ext" >&5
13642 cf_XOPEN_SOURCE_set=no
13644 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13645 echo "$as_me:13645: result: $cf_XOPEN_SOURCE_set" >&5
13646 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
13647 if test "$cf_XOPEN_SOURCE_set" = yes
13649 cat >"conftest.$ac_ext" <<_ACEOF
13650 #line 13650 "configure"
13651 #include "confdefs.h"
13652 #include <stdlib.h>
13657 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
13664 rm -f "conftest.$ac_objext"
13665 if { (eval echo "$as_me:13665: \"$ac_compile\"") >&5
13666 (eval $ac_compile) 2>&5
13668 echo "$as_me:13668: \$? = $ac_status" >&5
13669 (exit "$ac_status"); } &&
13670 { ac_try='test -s "conftest.$ac_objext"'
13671 { (eval echo "$as_me:13671: \"$ac_try\"") >&5
13672 (eval $ac_try) 2>&5
13674 echo "$as_me:13674: \$? = $ac_status" >&5
13675 (exit "$ac_status"); }; }; then
13676 cf_XOPEN_SOURCE_set_ok=yes
13678 echo "$as_me: failed program was:" >&5
13679 cat "conftest.$ac_ext" >&5
13680 cf_XOPEN_SOURCE_set_ok=no
13682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13683 if test "$cf_XOPEN_SOURCE_set_ok" = no
13685 { echo "$as_me:13685: WARNING: _XOPEN_SOURCE is lower than requested" >&5
13686 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
13690 echo "$as_me:13690: checking if we should define _XOPEN_SOURCE" >&5
13691 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
13692 if test "${cf_cv_xopen_source+set}" = set; then
13693 echo $ECHO_N "(cached) $ECHO_C" >&6
13696 cat >"conftest.$ac_ext" <<_ACEOF
13697 #line 13697 "configure"
13698 #include "confdefs.h"
13700 #include <stdlib.h>
13701 #include <string.h>
13702 #include <sys/types.h>
13708 #ifndef _XOPEN_SOURCE
13715 rm -f "conftest.$ac_objext"
13716 if { (eval echo "$as_me:13716: \"$ac_compile\"") >&5
13717 (eval $ac_compile) 2>&5
13719 echo "$as_me:13719: \$? = $ac_status" >&5
13720 (exit "$ac_status"); } &&
13721 { ac_try='test -s "conftest.$ac_objext"'
13722 { (eval echo "$as_me:13722: \"$ac_try\"") >&5
13723 (eval $ac_try) 2>&5
13725 echo "$as_me:13725: \$? = $ac_status" >&5
13726 (exit "$ac_status"); }; }; then
13727 cf_cv_xopen_source=no
13729 echo "$as_me: failed program was:" >&5
13730 cat "conftest.$ac_ext" >&5
13731 cf_save="$CPPFLAGS"
13733 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13734 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
13736 cat >"conftest.$ac_ext" <<_ACEOF
13737 #line 13737 "configure"
13738 #include "confdefs.h"
13740 #include <stdlib.h>
13741 #include <string.h>
13742 #include <sys/types.h>
13748 #ifdef _XOPEN_SOURCE
13755 rm -f "conftest.$ac_objext"
13756 if { (eval echo "$as_me:13756: \"$ac_compile\"") >&5
13757 (eval $ac_compile) 2>&5
13759 echo "$as_me:13759: \$? = $ac_status" >&5
13760 (exit "$ac_status"); } &&
13761 { ac_try='test -s "conftest.$ac_objext"'
13762 { (eval echo "$as_me:13762: \"$ac_try\"") >&5
13763 (eval $ac_try) 2>&5
13765 echo "$as_me:13765: \$? = $ac_status" >&5
13766 (exit "$ac_status"); }; }; then
13767 cf_cv_xopen_source=no
13769 echo "$as_me: failed program was:" >&5
13770 cat "conftest.$ac_ext" >&5
13771 cf_cv_xopen_source=$cf_XOPEN_SOURCE
13773 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13774 CPPFLAGS="$cf_save"
13777 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13780 echo "$as_me:13780: result: $cf_cv_xopen_source" >&5
13781 echo "${ECHO_T}$cf_cv_xopen_source" >&6
13783 if test "$cf_cv_xopen_source" != no ; then
13785 CFLAGS=`echo "$CFLAGS" | \
13786 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13787 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13789 CPPFLAGS=`echo "$CPPFLAGS" | \
13790 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
13791 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
13793 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13798 cf_new_extra_cppflags=
13800 for cf_add_cflags in $cf_temp_xopen_source
13802 case "$cf_fix_cppflags" in
13804 case "$cf_add_cflags" in
13805 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13806 case "$cf_add_cflags" in
13808 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13810 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13811 && test -z "${cf_tst_cflags}" \
13812 && cf_fix_cppflags=yes
13814 if test "$cf_fix_cppflags" = yes ; then
13816 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13817 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13820 elif test "${cf_tst_cflags}" = "\"'" ; then
13822 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13823 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13829 case "$CPPFLAGS" in
13833 case "$cf_add_cflags" in
13835 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13837 CPPFLAGS=`echo "$CPPFLAGS" | \
13838 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13839 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13844 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13845 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13852 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13853 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13860 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13861 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13863 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13865 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13866 && test -z "${cf_tst_cflags}" \
13867 && cf_fix_cppflags=no
13872 if test -n "$cf_new_cflags" ; then
13874 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13875 CFLAGS="${CFLAGS}$cf_new_cflags"
13879 if test -n "$cf_new_cppflags" ; then
13881 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13882 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13886 if test -n "$cf_new_extra_cppflags" ; then
13888 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13889 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13897 fi # cf_cv_posix_visible
13899 # Check whether --enable-largefile or --disable-largefile was given.
13900 if test "${enable_largefile+set}" = set; then
13901 enableval="$enable_largefile"
13904 if test "$enable_largefile" != no; then
13906 echo "$as_me:13906: checking for special C compiler options needed for large files" >&5
13907 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13908 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13909 echo $ECHO_N "(cached) $ECHO_C" >&6
13911 ac_cv_sys_largefile_CC=no
13912 if test "$GCC" != yes; then
13915 # IRIX 6.2 and later do not support large files by default,
13916 # so use the C compiler's -n32 option if that helps.
13917 cat >"conftest.$ac_ext" <<_ACEOF
13918 #line 13918 "configure"
13919 #include "confdefs.h"
13920 #include <sys/types.h>
13921 /* Check that off_t can represent 2**63 - 1 correctly.
13922 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13923 since some C++ compilers masquerading as C compilers
13924 incorrectly reject 9223372036854775807. */
13925 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13926 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13927 && LARGE_OFF_T % 2147483647 == 1)
13937 rm -f "conftest.$ac_objext"
13938 if { (eval echo "$as_me:13938: \"$ac_compile\"") >&5
13939 (eval $ac_compile) 2>&5
13941 echo "$as_me:13941: \$? = $ac_status" >&5
13942 (exit "$ac_status"); } &&
13943 { ac_try='test -s "conftest.$ac_objext"'
13944 { (eval echo "$as_me:13944: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13947 echo "$as_me:13947: \$? = $ac_status" >&5
13948 (exit "$ac_status"); }; }; then
13951 echo "$as_me: failed program was:" >&5
13952 cat "conftest.$ac_ext" >&5
13954 rm -f "conftest.$ac_objext"
13956 rm -f "conftest.$ac_objext"
13957 if { (eval echo "$as_me:13957: \"$ac_compile\"") >&5
13958 (eval $ac_compile) 2>&5
13960 echo "$as_me:13960: \$? = $ac_status" >&5
13961 (exit "$ac_status"); } &&
13962 { ac_try='test -s "conftest.$ac_objext"'
13963 { (eval echo "$as_me:13963: \"$ac_try\"") >&5
13964 (eval $ac_try) 2>&5
13966 echo "$as_me:13966: \$? = $ac_status" >&5
13967 (exit "$ac_status"); }; }; then
13968 ac_cv_sys_largefile_CC=' -n32'; break
13970 echo "$as_me: failed program was:" >&5
13971 cat "conftest.$ac_ext" >&5
13973 rm -f "conftest.$ac_objext"
13977 rm -f "conftest.$ac_ext"
13980 echo "$as_me:13980: result: $ac_cv_sys_largefile_CC" >&5
13981 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13982 if test "$ac_cv_sys_largefile_CC" != no; then
13983 CC=$CC$ac_cv_sys_largefile_CC
13986 echo "$as_me:13986: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13987 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13988 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13989 echo $ECHO_N "(cached) $ECHO_C" >&6
13992 ac_cv_sys_file_offset_bits=no
13993 cat >"conftest.$ac_ext" <<_ACEOF
13994 #line 13994 "configure"
13995 #include "confdefs.h"
13996 #include <sys/types.h>
13997 /* Check that off_t can represent 2**63 - 1 correctly.
13998 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13999 since some C++ compilers masquerading as C compilers
14000 incorrectly reject 9223372036854775807. */
14001 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14002 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14003 && LARGE_OFF_T % 2147483647 == 1)
14013 rm -f "conftest.$ac_objext"
14014 if { (eval echo "$as_me:14014: \"$ac_compile\"") >&5
14015 (eval $ac_compile) 2>&5
14017 echo "$as_me:14017: \$? = $ac_status" >&5
14018 (exit "$ac_status"); } &&
14019 { ac_try='test -s "conftest.$ac_objext"'
14020 { (eval echo "$as_me:14020: \"$ac_try\"") >&5
14021 (eval $ac_try) 2>&5
14023 echo "$as_me:14023: \$? = $ac_status" >&5
14024 (exit "$ac_status"); }; }; then
14027 echo "$as_me: failed program was:" >&5
14028 cat "conftest.$ac_ext" >&5
14030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14031 cat >"conftest.$ac_ext" <<_ACEOF
14032 #line 14032 "configure"
14033 #include "confdefs.h"
14034 #define _FILE_OFFSET_BITS 64
14035 #include <sys/types.h>
14036 /* Check that off_t can represent 2**63 - 1 correctly.
14037 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14038 since some C++ compilers masquerading as C compilers
14039 incorrectly reject 9223372036854775807. */
14040 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14041 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14042 && LARGE_OFF_T % 2147483647 == 1)
14052 rm -f "conftest.$ac_objext"
14053 if { (eval echo "$as_me:14053: \"$ac_compile\"") >&5
14054 (eval $ac_compile) 2>&5
14056 echo "$as_me:14056: \$? = $ac_status" >&5
14057 (exit "$ac_status"); } &&
14058 { ac_try='test -s "conftest.$ac_objext"'
14059 { (eval echo "$as_me:14059: \"$ac_try\"") >&5
14060 (eval $ac_try) 2>&5
14062 echo "$as_me:14062: \$? = $ac_status" >&5
14063 (exit "$ac_status"); }; }; then
14064 ac_cv_sys_file_offset_bits=64; break
14066 echo "$as_me: failed program was:" >&5
14067 cat "conftest.$ac_ext" >&5
14069 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14073 echo "$as_me:14073: result: $ac_cv_sys_file_offset_bits" >&5
14074 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14075 if test "$ac_cv_sys_file_offset_bits" != no; then
14077 cat >>confdefs.h <<EOF
14078 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14083 echo "$as_me:14083: checking for _LARGE_FILES value needed for large files" >&5
14084 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14085 if test "${ac_cv_sys_large_files+set}" = set; then
14086 echo $ECHO_N "(cached) $ECHO_C" >&6
14089 ac_cv_sys_large_files=no
14090 cat >"conftest.$ac_ext" <<_ACEOF
14091 #line 14091 "configure"
14092 #include "confdefs.h"
14093 #include <sys/types.h>
14094 /* Check that off_t can represent 2**63 - 1 correctly.
14095 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14096 since some C++ compilers masquerading as C compilers
14097 incorrectly reject 9223372036854775807. */
14098 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14099 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14100 && LARGE_OFF_T % 2147483647 == 1)
14110 rm -f "conftest.$ac_objext"
14111 if { (eval echo "$as_me:14111: \"$ac_compile\"") >&5
14112 (eval $ac_compile) 2>&5
14114 echo "$as_me:14114: \$? = $ac_status" >&5
14115 (exit "$ac_status"); } &&
14116 { ac_try='test -s "conftest.$ac_objext"'
14117 { (eval echo "$as_me:14117: \"$ac_try\"") >&5
14118 (eval $ac_try) 2>&5
14120 echo "$as_me:14120: \$? = $ac_status" >&5
14121 (exit "$ac_status"); }; }; then
14124 echo "$as_me: failed program was:" >&5
14125 cat "conftest.$ac_ext" >&5
14127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14128 cat >"conftest.$ac_ext" <<_ACEOF
14129 #line 14129 "configure"
14130 #include "confdefs.h"
14131 #define _LARGE_FILES 1
14132 #include <sys/types.h>
14133 /* Check that off_t can represent 2**63 - 1 correctly.
14134 We can't simply define LARGE_OFF_T to be 9223372036854775807,
14135 since some C++ compilers masquerading as C compilers
14136 incorrectly reject 9223372036854775807. */
14137 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14138 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14139 && LARGE_OFF_T % 2147483647 == 1)
14149 rm -f "conftest.$ac_objext"
14150 if { (eval echo "$as_me:14150: \"$ac_compile\"") >&5
14151 (eval $ac_compile) 2>&5
14153 echo "$as_me:14153: \$? = $ac_status" >&5
14154 (exit "$ac_status"); } &&
14155 { ac_try='test -s "conftest.$ac_objext"'
14156 { (eval echo "$as_me:14156: \"$ac_try\"") >&5
14157 (eval $ac_try) 2>&5
14159 echo "$as_me:14159: \$? = $ac_status" >&5
14160 (exit "$ac_status"); }; }; then
14161 ac_cv_sys_large_files=1; break
14163 echo "$as_me: failed program was:" >&5
14164 cat "conftest.$ac_ext" >&5
14166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14170 echo "$as_me:14170: result: $ac_cv_sys_large_files" >&5
14171 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14172 if test "$ac_cv_sys_large_files" != no; then
14174 cat >>confdefs.h <<EOF
14175 #define _LARGE_FILES $ac_cv_sys_large_files
14182 if test "$enable_largefile" != no ; then
14183 echo "$as_me:14183: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14184 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14185 if test "${ac_cv_sys_largefile_source+set}" = set; then
14186 echo $ECHO_N "(cached) $ECHO_C" >&6
14189 ac_cv_sys_largefile_source=no
14190 cat >"conftest.$ac_ext" <<_ACEOF
14191 #line 14191 "configure"
14192 #include "confdefs.h"
14202 rm -f "conftest.$ac_objext"
14203 if { (eval echo "$as_me:14203: \"$ac_compile\"") >&5
14204 (eval $ac_compile) 2>&5
14206 echo "$as_me:14206: \$? = $ac_status" >&5
14207 (exit "$ac_status"); } &&
14208 { ac_try='test -s "conftest.$ac_objext"'
14209 { (eval echo "$as_me:14209: \"$ac_try\"") >&5
14210 (eval $ac_try) 2>&5
14212 echo "$as_me:14212: \$? = $ac_status" >&5
14213 (exit "$ac_status"); }; }; then
14216 echo "$as_me: failed program was:" >&5
14217 cat "conftest.$ac_ext" >&5
14219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14220 cat >"conftest.$ac_ext" <<_ACEOF
14221 #line 14221 "configure"
14222 #include "confdefs.h"
14223 #define _LARGEFILE_SOURCE 1
14233 rm -f "conftest.$ac_objext"
14234 if { (eval echo "$as_me:14234: \"$ac_compile\"") >&5
14235 (eval $ac_compile) 2>&5
14237 echo "$as_me:14237: \$? = $ac_status" >&5
14238 (exit "$ac_status"); } &&
14239 { ac_try='test -s "conftest.$ac_objext"'
14240 { (eval echo "$as_me:14240: \"$ac_try\"") >&5
14241 (eval $ac_try) 2>&5
14243 echo "$as_me:14243: \$? = $ac_status" >&5
14244 (exit "$ac_status"); }; }; then
14245 ac_cv_sys_largefile_source=1; break
14247 echo "$as_me: failed program was:" >&5
14248 cat "conftest.$ac_ext" >&5
14250 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14254 echo "$as_me:14254: result: $ac_cv_sys_largefile_source" >&5
14255 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14256 if test "$ac_cv_sys_largefile_source" != no; then
14258 cat >>confdefs.h <<EOF
14259 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14265 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14266 # in glibc 2.1.3, but that breaks too many other things.
14267 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14268 echo "$as_me:14268: checking for fseeko" >&5
14269 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14270 if test "${ac_cv_func_fseeko+set}" = set; then
14271 echo $ECHO_N "(cached) $ECHO_C" >&6
14273 cat >"conftest.$ac_ext" <<_ACEOF
14274 #line 14274 "configure"
14275 #include "confdefs.h"
14280 return fseeko && fseeko (stdin, 0, 0);
14285 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14286 if { (eval echo "$as_me:14286: \"$ac_link\"") >&5
14287 (eval $ac_link) 2>&5
14289 echo "$as_me:14289: \$? = $ac_status" >&5
14290 (exit "$ac_status"); } &&
14291 { ac_try='test -s "conftest$ac_exeext"'
14292 { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293 (eval $ac_try) 2>&5
14295 echo "$as_me:14295: \$? = $ac_status" >&5
14296 (exit "$ac_status"); }; }; then
14297 ac_cv_func_fseeko=yes
14299 echo "$as_me: failed program was:" >&5
14300 cat "conftest.$ac_ext" >&5
14301 ac_cv_func_fseeko=no
14303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14305 echo "$as_me:14305: result: $ac_cv_func_fseeko" >&5
14306 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14307 if test $ac_cv_func_fseeko = yes; then
14309 cat >>confdefs.h <<\EOF
14310 #define HAVE_FSEEKO 1
14315 # Normally we would collect these definitions in the config.h,
14316 # but (like _XOPEN_SOURCE), some environments rely on having these
14317 # defined before any of the system headers are included. Another
14318 # case comes up with C++, e.g., on AIX the compiler compiles the
14319 # header files by themselves before looking at the body files it is
14320 # told to compile. For ncurses, those header files do not include
14322 if test "$ac_cv_sys_large_files" != no
14325 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14326 CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14329 if test "$ac_cv_sys_largefile_source" != no
14332 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14333 CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14336 if test "$ac_cv_sys_file_offset_bits" != no
14339 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14340 CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14344 echo "$as_me:14344: checking whether to use struct dirent64" >&5
14345 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14346 if test "${cf_cv_struct_dirent64+set}" = set; then
14347 echo $ECHO_N "(cached) $ECHO_C" >&6
14350 cat >"conftest.$ac_ext" <<_ACEOF
14351 #line 14351 "configure"
14352 #include "confdefs.h"
14354 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14355 #include <sys/types.h>
14356 #include <dirent.h>
14362 /* if transitional largefile support is setup, this is true */
14363 extern struct dirent64 * readdir(DIR *);
14364 struct dirent64 *x = readdir((DIR *)0);
14365 struct dirent *y = readdir((DIR *)0);
14373 rm -f "conftest.$ac_objext"
14374 if { (eval echo "$as_me:14374: \"$ac_compile\"") >&5
14375 (eval $ac_compile) 2>&5
14377 echo "$as_me:14377: \$? = $ac_status" >&5
14378 (exit "$ac_status"); } &&
14379 { ac_try='test -s "conftest.$ac_objext"'
14380 { (eval echo "$as_me:14380: \"$ac_try\"") >&5
14381 (eval $ac_try) 2>&5
14383 echo "$as_me:14383: \$? = $ac_status" >&5
14384 (exit "$ac_status"); }; }; then
14385 cf_cv_struct_dirent64=yes
14387 echo "$as_me: failed program was:" >&5
14388 cat "conftest.$ac_ext" >&5
14389 cf_cv_struct_dirent64=no
14391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14394 echo "$as_me:14394: result: $cf_cv_struct_dirent64" >&5
14395 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14396 test "$cf_cv_struct_dirent64" = yes &&
14397 cat >>confdefs.h <<\EOF
14398 #define HAVE_STRUCT_DIRENT64 1
14403 ### Enable compiling-in rcs id's
14404 echo "$as_me:14404: checking if RCS identifiers should be compiled-in" >&5
14405 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14407 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14408 if test "${with_rcs_ids+set}" = set; then
14409 withval="$with_rcs_ids"
14410 with_rcs_ids=$withval
14414 echo "$as_me:14414: result: $with_rcs_ids" >&5
14415 echo "${ECHO_T}$with_rcs_ids" >&6
14416 test "$with_rcs_ids" = yes &&
14417 cat >>confdefs.h <<\EOF
14418 #define USE_RCS_IDS 1
14421 ###############################################################################
14423 ### Note that some functions (such as const) are normally disabled anyway.
14424 echo "$as_me:14424: checking if you want to build with function extensions" >&5
14425 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14427 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14428 if test "${enable_ext_funcs+set}" = set; then
14429 enableval="$enable_ext_funcs"
14430 with_ext_funcs=$enableval
14434 echo "$as_me:14434: result: $with_ext_funcs" >&5
14435 echo "${ECHO_T}$with_ext_funcs" >&6
14436 if test "$with_ext_funcs" = yes ; then
14437 NCURSES_EXT_FUNCS=1
14439 cat >>confdefs.h <<\EOF
14440 #define HAVE_USE_DEFAULT_COLORS 1
14443 cat >>confdefs.h <<\EOF
14444 #define NCURSES_EXT_FUNCS 1
14448 NCURSES_EXT_FUNCS=0
14451 ### use option --enable-const to turn on use of const beyond that in XSI.
14452 echo "$as_me:14452: checking for extended use of const keyword" >&5
14453 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14455 # Check whether --enable-const or --disable-const was given.
14456 if test "${enable_const+set}" = set; then
14457 enableval="$enable_const"
14458 with_ext_const=$enableval
14462 echo "$as_me:14462: result: $with_ext_const" >&5
14463 echo "${ECHO_T}$with_ext_const" >&6
14464 NCURSES_CONST='/*nothing*/'
14465 if test "$with_ext_const" = yes ; then
14466 NCURSES_CONST=const
14469 ###############################################################################
14470 # These options are relatively safe to experiment with.
14472 echo "$as_me:14472: checking if you want all development code" >&5
14473 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14475 # Check whether --with-develop or --without-develop was given.
14476 if test "${with_develop+set}" = set; then
14477 withval="$with_develop"
14478 with_develop=$withval
14482 echo "$as_me:14482: result: $with_develop" >&5
14483 echo "${ECHO_T}$with_develop" >&6
14485 ###############################################################################
14486 # These are just experimental, probably should not be in a package:
14488 # This is still experimental (20080329), but should ultimately be moved to
14489 # the script-block --with-normal, etc.
14491 echo "$as_me:14491: checking if you want to link with the pthread library" >&5
14492 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14494 # Check whether --with-pthread or --without-pthread was given.
14495 if test "${with_pthread+set}" = set; then
14496 withval="$with_pthread"
14497 with_pthread=$withval
14501 echo "$as_me:14501: result: $with_pthread" >&5
14502 echo "${ECHO_T}$with_pthread" >&6
14504 if test "$with_pthread" != no ; then
14505 echo "$as_me:14505: checking for pthread.h" >&5
14506 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14507 if test "${ac_cv_header_pthread_h+set}" = set; then
14508 echo $ECHO_N "(cached) $ECHO_C" >&6
14510 cat >"conftest.$ac_ext" <<_ACEOF
14511 #line 14511 "configure"
14512 #include "confdefs.h"
14513 #include <pthread.h>
14515 if { (eval echo "$as_me:14515: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14516 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14518 $EGREP -v '^ *\+' conftest.er1 >conftest.err
14520 cat conftest.err >&5
14521 echo "$as_me:14521: \$? = $ac_status" >&5
14522 (exit "$ac_status"); } >/dev/null; then
14523 if test -s conftest.err; then
14524 ac_cpp_err=$ac_c_preproc_warn_flag
14531 if test -z "$ac_cpp_err"; then
14532 ac_cv_header_pthread_h=yes
14534 echo "$as_me: failed program was:" >&5
14535 cat "conftest.$ac_ext" >&5
14536 ac_cv_header_pthread_h=no
14538 rm -f conftest.err "conftest.$ac_ext"
14540 echo "$as_me:14540: result: $ac_cv_header_pthread_h" >&5
14541 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14542 if test "$ac_cv_header_pthread_h" = yes; then
14544 cat >>confdefs.h <<\EOF
14545 #define HAVE_PTHREADS_H 1
14548 for cf_lib_pthread in pthread c_r
14550 echo "$as_me:14550: checking if we can link with the $cf_lib_pthread library" >&5
14551 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14552 cf_save_LIBS="$LIBS"
14554 cf_add_libs="$LIBS"
14557 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14558 # filter duplicates
14559 for cf_add_1lib in $cf_add_0lib; do
14560 for cf_add_2lib in $cf_add_libs; do
14561 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14566 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14568 LIBS="$cf_add_libs"
14570 cat >"conftest.$ac_ext" <<_ACEOF
14571 #line 14571 "configure"
14572 #include "confdefs.h"
14574 #include <pthread.h>
14580 int rc = pthread_create(0,0,0,0);
14581 int r2 = pthread_mutexattr_settype(0, 0);
14587 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14588 if { (eval echo "$as_me:14588: \"$ac_link\"") >&5
14589 (eval $ac_link) 2>&5
14591 echo "$as_me:14591: \$? = $ac_status" >&5
14592 (exit "$ac_status"); } &&
14593 { ac_try='test -s "conftest$ac_exeext"'
14594 { (eval echo "$as_me:14594: \"$ac_try\"") >&5
14595 (eval $ac_try) 2>&5
14597 echo "$as_me:14597: \$? = $ac_status" >&5
14598 (exit "$ac_status"); }; }; then
14601 echo "$as_me: failed program was:" >&5
14602 cat "conftest.$ac_ext" >&5
14605 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14606 LIBS="$cf_save_LIBS"
14607 echo "$as_me:14607: result: $with_pthread" >&5
14608 echo "${ECHO_T}$with_pthread" >&6
14609 test "$with_pthread" = yes && break
14612 if test "$with_pthread" = yes ; then
14614 cf_add_libs="$LIBS"
14617 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14618 # filter duplicates
14619 for cf_add_1lib in $cf_add_0lib; do
14620 for cf_add_2lib in $cf_add_libs; do
14621 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14626 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14628 LIBS="$cf_add_libs"
14630 cat >>confdefs.h <<\EOF
14631 #define HAVE_LIBPTHREADS 1
14635 { { echo "$as_me:14635: error: Cannot link with pthread library" >&5
14636 echo "$as_me: error: Cannot link with pthread library" >&2;}
14637 { (exit 1); exit 1; }; }
14644 echo "$as_me:14644: checking if you want to use weak-symbols for pthreads" >&5
14645 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14647 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14648 if test "${enable_weak_symbols+set}" = set; then
14649 enableval="$enable_weak_symbols"
14650 use_weak_symbols=$withval
14652 use_weak_symbols=no
14654 echo "$as_me:14654: result: $use_weak_symbols" >&5
14655 echo "${ECHO_T}$use_weak_symbols" >&6
14656 if test "$use_weak_symbols" = yes ; then
14658 echo "$as_me:14658: checking if $CC supports weak symbols" >&5
14659 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14660 if test "${cf_cv_weak_symbols+set}" = set; then
14661 echo $ECHO_N "(cached) $ECHO_C" >&6
14664 cat >"conftest.$ac_ext" <<_ACEOF
14665 #line 14665 "configure"
14666 #include "confdefs.h"
14673 #if defined(__GNUC__)
14674 # if defined __USE_ISOC99
14675 # define _cat_pragma(exp) _Pragma(#exp)
14676 # define _weak_pragma(exp) _cat_pragma(weak name)
14678 # define _weak_pragma(exp)
14680 # define _declare(name) __extension__ extern __typeof__(name) name
14681 # define weak_symbol(name) _weak_pragma(name) _declare(name) __attribute__((weak))
14684 weak_symbol(fopen);
14690 rm -f "conftest.$ac_objext"
14691 if { (eval echo "$as_me:14691: \"$ac_compile\"") >&5
14692 (eval $ac_compile) 2>&5
14694 echo "$as_me:14694: \$? = $ac_status" >&5
14695 (exit "$ac_status"); } &&
14696 { ac_try='test -s "conftest.$ac_objext"'
14697 { (eval echo "$as_me:14697: \"$ac_try\"") >&5
14698 (eval $ac_try) 2>&5
14700 echo "$as_me:14700: \$? = $ac_status" >&5
14701 (exit "$ac_status"); }; }; then
14702 cf_cv_weak_symbols=yes
14704 echo "$as_me: failed program was:" >&5
14705 cat "conftest.$ac_ext" >&5
14706 cf_cv_weak_symbols=no
14708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14711 echo "$as_me:14711: result: $cf_cv_weak_symbols" >&5
14712 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14715 cf_cv_weak_symbols=no
14718 if test $cf_cv_weak_symbols = yes ; then
14720 cat >>confdefs.h <<\EOF
14721 #define USE_WEAK_SYMBOLS 1
14727 if test "$with_pthread" = "yes" ; then
14729 cat >>confdefs.h <<\EOF
14730 #define USE_PTHREADS 1
14733 enable_reentrant=yes
14734 if test $cf_cv_weak_symbols = yes ; then
14739 # OpenSUSE is installing ncurses6, using reentrant option.
14740 echo "$as_me:14740: checking for _nc_TABSIZE" >&5
14741 echo $ECHO_N "checking for _nc_TABSIZE... $ECHO_C" >&6
14742 if test "${ac_cv_func__nc_TABSIZE+set}" = set; then
14743 echo $ECHO_N "(cached) $ECHO_C" >&6
14745 cat >"conftest.$ac_ext" <<_ACEOF
14746 #line 14746 "configure"
14747 #include "confdefs.h"
14748 #define _nc_TABSIZE autoconf_temporary
14749 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
14756 /* We use char because int might match the return type of a gcc2
14757 builtin and then its argument prototype would still apply. */
14758 char _nc_TABSIZE (void);
14764 /* The GNU C library defines stubs for functions which it implements
14765 to always fail with ENOSYS. Some functions are actually named
14766 something starting with __ and the normal name is an alias. */
14767 #if defined (__stub__nc_TABSIZE) || defined (__stub____nc_TABSIZE)
14768 #error found stub for _nc_TABSIZE
14771 return _nc_TABSIZE ();
14776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14777 if { (eval echo "$as_me:14777: \"$ac_link\"") >&5
14778 (eval $ac_link) 2>&5
14780 echo "$as_me:14780: \$? = $ac_status" >&5
14781 (exit "$ac_status"); } &&
14782 { ac_try='test -s "conftest$ac_exeext"'
14783 { (eval echo "$as_me:14783: \"$ac_try\"") >&5
14784 (eval $ac_try) 2>&5
14786 echo "$as_me:14786: \$? = $ac_status" >&5
14787 (exit "$ac_status"); }; }; then
14788 ac_cv_func__nc_TABSIZE=yes
14790 echo "$as_me: failed program was:" >&5
14791 cat "conftest.$ac_ext" >&5
14792 ac_cv_func__nc_TABSIZE=no
14794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14796 echo "$as_me:14796: result: $ac_cv_func__nc_TABSIZE" >&5
14797 echo "${ECHO_T}$ac_cv_func__nc_TABSIZE" >&6
14798 if test "$ac_cv_func__nc_TABSIZE" = yes; then
14799 assume_reentrant=yes
14801 assume_reentrant=no
14804 # Reentrant code has to be opaque; there's little advantage to making ncurses
14805 # opaque outside of that, so there is no --enable-opaque option. We can use
14806 # this option without --with-pthreads, but this will be always set for
14808 echo "$as_me:14808: checking if you want experimental reentrant code" >&5
14809 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
14811 # Check whether --enable-reentrant or --disable-reentrant was given.
14812 if test "${enable_reentrant+set}" = set; then
14813 enableval="$enable_reentrant"
14814 with_reentrant=$enableval
14816 with_reentrant=$assume_reentrant
14818 echo "$as_me:14818: result: $with_reentrant" >&5
14819 echo "${ECHO_T}$with_reentrant" >&6
14820 if test "$with_reentrant" = yes ; then
14821 cf_cv_enable_reentrant=1
14822 if test $cf_cv_weak_symbols = yes ; then
14824 # remove pthread library from $LIBS
14825 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[ ]//g' -e 's/-lpthread$//'`
14827 elif test "$assume_reentrant" = no ; then
14828 LIB_SUFFIX="t${LIB_SUFFIX}"
14831 cat >>confdefs.h <<\EOF
14832 #define USE_REENTRANT 1
14836 cf_cv_enable_reentrant=0
14839 ### Allow using a different wrap-prefix
14840 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14841 echo "$as_me:14841: checking for prefix used to wrap public variables" >&5
14842 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14844 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14845 if test "${with_wrap_prefix+set}" = set; then
14846 withval="$with_wrap_prefix"
14847 NCURSES_WRAP_PREFIX=$withval
14849 NCURSES_WRAP_PREFIX=_nc_
14851 echo "$as_me:14851: result: $NCURSES_WRAP_PREFIX" >&5
14852 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14854 NCURSES_WRAP_PREFIX=_nc_
14857 cat >>confdefs.h <<EOF
14858 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14861 ###############################################################################
14863 ### use option --disable-echo to suppress full display compiling commands
14865 echo "$as_me:14865: checking if you want to see long compiling messages" >&5
14866 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14868 # Check whether --enable-echo or --disable-echo was given.
14869 if test "${enable_echo+set}" = set; then
14870 enableval="$enable_echo"
14871 test "$enableval" != no && enableval=yes
14872 if test "$enableval" != "yes" ; then
14875 ECHO_LD='@echo linking $@;'
14876 RULE_CC='@echo compiling $<'
14877 SHOW_CC='@echo compiling $@'
14899 echo "$as_me:14899: result: $enableval" >&5
14900 echo "${ECHO_T}$enableval" >&6
14902 echo "$as_me:14902: checking if you want to use C11 _Noreturn feature" >&5
14903 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
14905 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
14906 if test "${enable_stdnoreturn+set}" = set; then
14907 enableval="$enable_stdnoreturn"
14908 test "$enableval" != yes && enableval=no
14909 if test "$enableval" != "no" ; then
14910 enable_stdnoreturn=yes
14912 enable_stdnoreturn=no
14916 enable_stdnoreturn=no
14919 echo "$as_me:14919: result: $enable_stdnoreturn" >&5
14920 echo "${ECHO_T}$enable_stdnoreturn" >&6
14922 if test $enable_stdnoreturn = yes; then
14923 echo "$as_me:14923: checking for C11 _Noreturn feature" >&5
14924 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
14925 if test "${cf_cv_c11_noreturn+set}" = set; then
14926 echo $ECHO_N "(cached) $ECHO_C" >&6
14928 cat >"conftest.$ac_ext" <<_ACEOF
14929 #line 14929 "configure"
14930 #include "confdefs.h"
14933 #include <stdlib.h>
14934 #include <stdnoreturn.h>
14935 static _Noreturn void giveup(void) { exit(0); }
14940 if (feof(stdin)) giveup()
14945 rm -f "conftest.$ac_objext"
14946 if { (eval echo "$as_me:14946: \"$ac_compile\"") >&5
14947 (eval $ac_compile) 2>&5
14949 echo "$as_me:14949: \$? = $ac_status" >&5
14950 (exit "$ac_status"); } &&
14951 { ac_try='test -s "conftest.$ac_objext"'
14952 { (eval echo "$as_me:14952: \"$ac_try\"") >&5
14953 (eval $ac_try) 2>&5
14955 echo "$as_me:14955: \$? = $ac_status" >&5
14956 (exit "$ac_status"); }; }; then
14957 cf_cv_c11_noreturn=yes
14959 echo "$as_me: failed program was:" >&5
14960 cat "conftest.$ac_ext" >&5
14961 cf_cv_c11_noreturn=no
14963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14966 echo "$as_me:14966: result: $cf_cv_c11_noreturn" >&5
14967 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
14969 cf_cv_c11_noreturn=no,
14972 if test "$cf_cv_c11_noreturn" = yes; then
14974 cat >>confdefs.h <<\EOF
14975 #define HAVE_STDNORETURN_H 1
14978 cat >>confdefs.h <<EOF
14979 #define STDC_NORETURN _Noreturn
14982 HAVE_STDNORETURN_H=1
14984 HAVE_STDNORETURN_H=0
14987 if test "$GCC" = yes || test "$GXX" = yes
14990 if test "$GCC" = yes || test "$GXX" = yes
14994 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
14996 echo "${as_me:-configure}:14996: testing repairing CFLAGS: $CFLAGS ..." 1>&5
14999 for cf_temp_scan in $CFLAGS
15001 case "x$cf_temp_scan" in
15004 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15005 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15010 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15011 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15016 CFLAGS="$cf_temp_flags"
15017 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
15019 echo "${as_me:-configure}:15019: testing ... fixed $CFLAGS ..." 1>&5
15021 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15023 echo "${as_me:-configure}:15023: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15029 if test "$GCC" = yes || test "$GXX" = yes
15033 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
15035 echo "${as_me:-configure}:15035: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
15038 for cf_temp_scan in $CPPFLAGS
15040 case "x$cf_temp_scan" in
15043 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15044 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15049 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15050 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15055 CPPFLAGS="$cf_temp_flags"
15056 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
15058 echo "${as_me:-configure}:15058: testing ... fixed $CPPFLAGS ..." 1>&5
15060 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15062 echo "${as_me:-configure}:15062: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15068 if test "$GCC" = yes || test "$GXX" = yes
15072 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
15074 echo "${as_me:-configure}:15074: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
15077 for cf_temp_scan in $LDFLAGS
15079 case "x$cf_temp_scan" in
15082 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
15083 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
15088 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
15089 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
15094 LDFLAGS="$cf_temp_flags"
15095 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
15097 echo "${as_me:-configure}:15097: testing ... fixed $LDFLAGS ..." 1>&5
15099 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
15101 echo "${as_me:-configure}:15101: testing ... extra $EXTRA_CFLAGS ..." 1>&5
15107 echo "$as_me:15107: checking if you want to turn on gcc warnings" >&5
15108 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
15110 # Check whether --enable-warnings or --disable-warnings was given.
15111 if test "${enable_warnings+set}" = set; then
15112 enableval="$enable_warnings"
15113 test "$enableval" != yes && enableval=no
15114 if test "$enableval" != "no" ; then
15115 enable_warnings=yes
15124 echo "$as_me:15124: result: $enable_warnings" >&5
15125 echo "${ECHO_T}$enable_warnings" >&6
15126 if test "$enable_warnings" = "yes"
15129 if test "x$have_x" = xyes; then
15131 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15132 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15133 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15134 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15135 for cf_X_CFLAGS in $X_CFLAGS
15137 case "x$cf_X_CFLAGS" in
15139 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15142 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15147 cat >"conftest.$ac_ext" <<_ACEOF
15148 #line 15148 "configure"
15149 #include "confdefs.h"
15151 #include <stdlib.h>
15152 #include <X11/Intrinsic.h>
15157 String foo = malloc(1); free((void*)foo)
15162 rm -f "conftest.$ac_objext"
15163 if { (eval echo "$as_me:15163: \"$ac_compile\"") >&5
15164 (eval $ac_compile) 2>&5
15166 echo "$as_me:15166: \$? = $ac_status" >&5
15167 (exit "$ac_status"); } &&
15168 { ac_try='test -s "conftest.$ac_objext"'
15169 { (eval echo "$as_me:15169: \"$ac_try\"") >&5
15170 (eval $ac_try) 2>&5
15172 echo "$as_me:15172: \$? = $ac_status" >&5
15173 (exit "$ac_status"); }; }; then
15175 echo "$as_me:15175: checking for X11/Xt const-feature" >&5
15176 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15177 if test "${cf_cv_const_x_string+set}" = set; then
15178 echo $ECHO_N "(cached) $ECHO_C" >&6
15181 cat >"conftest.$ac_ext" <<_ACEOF
15182 #line 15182 "configure"
15183 #include "confdefs.h"
15185 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
15186 #undef XTSTRINGDEFINES /* X11R5 and later */
15187 #include <stdlib.h>
15188 #include <X11/Intrinsic.h>
15193 String foo = malloc(1); *foo = 0
15198 rm -f "conftest.$ac_objext"
15199 if { (eval echo "$as_me:15199: \"$ac_compile\"") >&5
15200 (eval $ac_compile) 2>&5
15202 echo "$as_me:15202: \$? = $ac_status" >&5
15203 (exit "$ac_status"); } &&
15204 { ac_try='test -s "conftest.$ac_objext"'
15205 { (eval echo "$as_me:15205: \"$ac_try\"") >&5
15206 (eval $ac_try) 2>&5
15208 echo "$as_me:15208: \$? = $ac_status" >&5
15209 (exit "$ac_status"); }; }; then
15211 cf_cv_const_x_string=no
15214 echo "$as_me: failed program was:" >&5
15215 cat "conftest.$ac_ext" >&5
15217 cf_cv_const_x_string=yes
15220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15223 echo "$as_me:15223: result: $cf_cv_const_x_string" >&5
15224 echo "${ECHO_T}$cf_cv_const_x_string" >&6
15226 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
15227 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
15228 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
15230 case "$cf_cv_const_x_string" in
15233 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15234 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15239 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15240 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
15246 echo "$as_me: failed program was:" >&5
15247 cat "conftest.$ac_ext" >&5
15249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15251 cat > "conftest.$ac_ext" <<EOF
15252 #line 15252 "${as_me:-configure}"
15253 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15255 if test "$INTEL_COMPILER" = yes
15257 # The "-wdXXX" options suppress warnings:
15258 # remark #1419: external declaration in primary source file
15259 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15260 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15261 # remark #193: zero used for undefined preprocessing identifier
15262 # remark #593: variable "curs_sb_left_arrow" was set but never used
15263 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15264 # remark #869: parameter "tw" was never referenced
15265 # remark #981: operands are evaluated in unspecified order
15266 # warning #279: controlling expression is constant
15268 { echo "$as_me:15268: checking for $CC warning options..." >&5
15269 echo "$as_me: checking for $CC warning options..." >&6;}
15270 cf_save_CFLAGS="$CFLAGS"
15271 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
15283 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15284 if { (eval echo "$as_me:15284: \"$ac_compile\"") >&5
15285 (eval $ac_compile) 2>&5
15287 echo "$as_me:15287: \$? = $ac_status" >&5
15288 (exit "$ac_status"); }; then
15289 test -n "$verbose" && echo "$as_me:15289: result: ... -$cf_opt" >&5
15290 echo "${ECHO_T}... -$cf_opt" >&6
15291 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15294 CFLAGS="$cf_save_CFLAGS"
15295 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
15297 { echo "$as_me:15297: checking for $CC warning options..." >&5
15298 echo "$as_me: checking for $CC warning options..." >&6;}
15299 cf_save_CFLAGS="$CFLAGS"
15301 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15302 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15303 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15304 for cf_opt in W Wall \
15305 Wbad-function-cast \
15308 Wdeclaration-after-statement \
15311 Wmissing-declarations \
15312 Wmissing-prototypes \
15316 Wstrict-prototypes \
15317 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15319 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15320 if { (eval echo "$as_me:15320: \"$ac_compile\"") >&5
15321 (eval $ac_compile) 2>&5
15323 echo "$as_me:15323: \$? = $ac_status" >&5
15324 (exit "$ac_status"); }; then
15325 test -n "$verbose" && echo "$as_me:15325: result: ... -$cf_opt" >&5
15326 echo "${ECHO_T}... -$cf_opt" >&6
15329 case "$GCC_VERSION" in
15331 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15333 echo "${as_me:-configure}:15333: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15339 case "$GCC_VERSION" in
15341 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
15343 echo "${as_me:-configure}:15343: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15349 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15352 CFLAGS="$cf_save_CFLAGS"
15358 if test "$GCC" = yes || test "$GXX" = yes
15360 cat > conftest.i <<EOF
15362 #define GCC_PRINTF 0
15365 #define GCC_SCANF 0
15367 #ifndef GCC_NORETURN
15368 #define GCC_NORETURN /* nothing */
15371 #define GCC_UNUSED /* nothing */
15374 if test "$GCC" = yes
15376 { echo "$as_me:15376: checking for $CC __attribute__ directives..." >&5
15377 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15378 cat > "conftest.$ac_ext" <<EOF
15379 #line 15379 "${as_me:-configure}"
15380 #include "confdefs.h"
15381 #include "conftest.h"
15382 #include "conftest.i"
15384 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15386 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15389 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
15391 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
15393 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15394 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
15395 extern GCC_NORETURN void foo(void);
15396 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
15398 cf_printf_attribute=no
15399 cf_scanf_attribute=no
15400 for cf_attribute in scanf printf unused noreturn
15403 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15405 cf_directive="__attribute__(($cf_attribute))"
15406 echo "checking for $CC $cf_directive" 1>&5
15408 case "$cf_attribute" in
15410 cf_printf_attribute=yes
15411 cat >conftest.h <<EOF
15412 #define GCC_$cf_ATTRIBUTE 1
15416 cf_scanf_attribute=yes
15417 cat >conftest.h <<EOF
15418 #define GCC_$cf_ATTRIBUTE 1
15422 cat >conftest.h <<EOF
15423 #define GCC_$cf_ATTRIBUTE $cf_directive
15428 if { (eval echo "$as_me:15428: \"$ac_compile\"") >&5
15429 (eval $ac_compile) 2>&5
15431 echo "$as_me:15431: \$? = $ac_status" >&5
15432 (exit "$ac_status"); }; then
15433 test -n "$verbose" && echo "$as_me:15433: result: ... $cf_attribute" >&5
15434 echo "${ECHO_T}... $cf_attribute" >&6
15435 cat conftest.h >>confdefs.h
15436 case "$cf_attribute" in
15439 cat >>confdefs.h <<EOF
15440 #define GCC_NORETURN $cf_directive
15445 cf_value='/* nothing */'
15446 if test "$cf_printf_attribute" != no ; then
15447 cf_value='__attribute__((format(printf,fmt,var)))'
15449 cat >>confdefs.h <<\EOF
15450 #define GCC_PRINTF 1
15455 cat >>confdefs.h <<EOF
15456 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15461 cf_value='/* nothing */'
15462 if test "$cf_scanf_attribute" != no ; then
15463 cf_value='__attribute__((format(scanf,fmt,var)))'
15465 cat >>confdefs.h <<\EOF
15466 #define GCC_SCANF 1
15471 cat >>confdefs.h <<EOF
15472 #define GCC_SCANFLIKE(fmt,var) $cf_value
15478 cat >>confdefs.h <<EOF
15479 #define GCC_UNUSED $cf_directive
15487 ${FGREP-fgrep} define conftest.i >>confdefs.h
15494 if test "x$enable_warnings" = "xyes"; then
15496 ADAFLAGS="$ADAFLAGS -gnatg"
15500 ### use option --enable-assertions to turn on generation of assertion code
15501 echo "$as_me:15501: checking if you want to enable runtime assertions" >&5
15502 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15504 # Check whether --enable-assertions or --disable-assertions was given.
15505 if test "${enable_assertions+set}" = set; then
15506 enableval="$enable_assertions"
15507 with_assertions=$enableval
15511 echo "$as_me:15511: result: $with_assertions" >&5
15512 echo "${ECHO_T}$with_assertions" >&6
15515 if test "$with_assertions" = no
15517 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15520 ADAFLAGS="$ADAFLAGS -gnata"
15525 ### use option --disable-leaks to suppress "permanent" leaks, for testing
15527 cat >>confdefs.h <<\EOF
15528 #define HAVE_NC_ALLOC_H 1
15531 ### use option --enable-expanded to generate certain macros as functions
15533 # Check whether --enable-expanded or --disable-expanded was given.
15534 if test "${enable_expanded+set}" = set; then
15535 enableval="$enable_expanded"
15536 test "$enableval" = yes &&
15537 cat >>confdefs.h <<\EOF
15538 #define NCURSES_EXPANDED 1
15543 ### use option --disable-macros to suppress macros in favor of functions
15545 # Check whether --enable-macros or --disable-macros was given.
15546 if test "${enable_macros+set}" = set; then
15547 enableval="$enable_macros"
15548 test "$enableval" = no &&
15549 cat >>confdefs.h <<\EOF
15550 #define NCURSES_NOMACROS 1
15555 # Normally we only add trace() to the debug-library. Allow this to be
15556 # extended to all models of the ncurses library:
15558 case "$CFLAGS $CPPFLAGS" in
15564 echo "$as_me:15564: checking whether to add trace feature to all models" >&5
15565 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15567 # Check whether --with-trace or --without-trace was given.
15568 if test "${with_trace+set}" = set; then
15569 withval="$with_trace"
15570 cf_with_trace=$withval
15572 cf_with_trace=$cf_all_traces
15574 echo "$as_me:15574: result: $cf_with_trace" >&5
15575 echo "${ECHO_T}$cf_with_trace" >&6
15577 if test "$cf_with_trace" = yes ; then
15583 cf_new_extra_cppflags=
15585 for cf_add_cflags in -DTRACE
15587 case "$cf_fix_cppflags" in
15589 case "$cf_add_cflags" in
15590 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15591 case "$cf_add_cflags" in
15593 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15595 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15596 && test -z "${cf_tst_cflags}" \
15597 && cf_fix_cppflags=yes
15599 if test "$cf_fix_cppflags" = yes ; then
15601 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15602 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15605 elif test "${cf_tst_cflags}" = "\"'" ; then
15607 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15608 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15614 case "$CPPFLAGS" in
15618 case "$cf_add_cflags" in
15620 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15622 CPPFLAGS=`echo "$CPPFLAGS" | \
15623 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15624 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15629 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15630 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15637 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15638 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15645 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15646 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15648 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15650 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15651 && test -z "${cf_tst_cflags}" \
15652 && cf_fix_cppflags=no
15657 if test -n "$cf_new_cflags" ; then
15659 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15660 CFLAGS="${CFLAGS}$cf_new_cflags"
15664 if test -n "$cf_new_cppflags" ; then
15666 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15667 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15671 if test -n "$cf_new_extra_cppflags" ; then
15673 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15674 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15682 echo "$as_me:15682: checking if we want to use GNAT projects" >&5
15683 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15685 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15686 if test "${enable_gnat_projects+set}" = set; then
15687 enableval="$enable_gnat_projects"
15688 test "$enableval" != no && enableval=yes
15689 if test "$enableval" != "yes" ; then
15690 enable_gnat_projects=no
15692 enable_gnat_projects=yes
15696 enable_gnat_projects=yes
15699 echo "$as_me:15699: result: $enable_gnat_projects" >&5
15700 echo "${ECHO_T}$enable_gnat_projects" >&6
15702 ### Checks for libraries.
15703 case $cf_cv_system_name in
15707 echo "$as_me:15707: checking for gettimeofday" >&5
15708 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15709 if test "${ac_cv_func_gettimeofday+set}" = set; then
15710 echo $ECHO_N "(cached) $ECHO_C" >&6
15712 cat >"conftest.$ac_ext" <<_ACEOF
15713 #line 15713 "configure"
15714 #include "confdefs.h"
15715 #define gettimeofday autoconf_temporary
15716 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15717 #undef gettimeofday
15723 /* We use char because int might match the return type of a gcc2
15724 builtin and then its argument prototype would still apply. */
15725 char gettimeofday (void);
15731 /* The GNU C library defines stubs for functions which it implements
15732 to always fail with ENOSYS. Some functions are actually named
15733 something starting with __ and the normal name is an alias. */
15734 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15735 #error found stub for gettimeofday
15738 return gettimeofday ();
15743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15744 if { (eval echo "$as_me:15744: \"$ac_link\"") >&5
15745 (eval $ac_link) 2>&5
15747 echo "$as_me:15747: \$? = $ac_status" >&5
15748 (exit "$ac_status"); } &&
15749 { ac_try='test -s "conftest$ac_exeext"'
15750 { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751 (eval $ac_try) 2>&5
15753 echo "$as_me:15753: \$? = $ac_status" >&5
15754 (exit "$ac_status"); }; }; then
15755 ac_cv_func_gettimeofday=yes
15757 echo "$as_me: failed program was:" >&5
15758 cat "conftest.$ac_ext" >&5
15759 ac_cv_func_gettimeofday=no
15761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15763 echo "$as_me:15763: result: $ac_cv_func_gettimeofday" >&5
15764 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15765 if test "$ac_cv_func_gettimeofday" = yes; then
15766 cat >>confdefs.h <<\EOF
15767 #define HAVE_GETTIMEOFDAY 1
15772 echo "$as_me:15772: checking for gettimeofday in -lbsd" >&5
15773 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15774 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15775 echo $ECHO_N "(cached) $ECHO_C" >&6
15777 ac_check_lib_save_LIBS=$LIBS
15779 cat >"conftest.$ac_ext" <<_ACEOF
15780 #line 15780 "configure"
15781 #include "confdefs.h"
15783 /* Override any gcc2 internal prototype to avoid an error. */
15787 /* We use char because int might match the return type of a gcc2
15788 builtin and then its argument prototype would still apply. */
15789 char gettimeofday ();
15798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15799 if { (eval echo "$as_me:15799: \"$ac_link\"") >&5
15800 (eval $ac_link) 2>&5
15802 echo "$as_me:15802: \$? = $ac_status" >&5
15803 (exit "$ac_status"); } &&
15804 { ac_try='test -s "conftest$ac_exeext"'
15805 { (eval echo "$as_me:15805: \"$ac_try\"") >&5
15806 (eval $ac_try) 2>&5
15808 echo "$as_me:15808: \$? = $ac_status" >&5
15809 (exit "$ac_status"); }; }; then
15810 ac_cv_lib_bsd_gettimeofday=yes
15812 echo "$as_me: failed program was:" >&5
15813 cat "conftest.$ac_ext" >&5
15814 ac_cv_lib_bsd_gettimeofday=no
15816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15817 LIBS=$ac_check_lib_save_LIBS
15819 echo "$as_me:15819: result: $ac_cv_lib_bsd_gettimeofday" >&5
15820 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15821 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
15823 cat >>confdefs.h <<\EOF
15824 #define HAVE_GETTIMEOFDAY 1
15834 ### Checks for header files.
15835 echo "$as_me:15835: checking for ANSI C header files" >&5
15836 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15837 if test "${ac_cv_header_stdc+set}" = set; then
15838 echo $ECHO_N "(cached) $ECHO_C" >&6
15840 cat >"conftest.$ac_ext" <<_ACEOF
15841 #line 15841 "configure"
15842 #include "confdefs.h"
15843 #include <stdlib.h>
15844 #include <stdarg.h>
15845 #include <string.h>
15849 if { (eval echo "$as_me:15849: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15850 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15852 $EGREP -v '^ *\+' conftest.er1 >conftest.err
15854 cat conftest.err >&5
15855 echo "$as_me:15855: \$? = $ac_status" >&5
15856 (exit "$ac_status"); } >/dev/null; then
15857 if test -s conftest.err; then
15858 ac_cpp_err=$ac_c_preproc_warn_flag
15865 if test -z "$ac_cpp_err"; then
15866 ac_cv_header_stdc=yes
15868 echo "$as_me: failed program was:" >&5
15869 cat "conftest.$ac_ext" >&5
15870 ac_cv_header_stdc=no
15872 rm -f conftest.err "conftest.$ac_ext"
15874 if test $ac_cv_header_stdc = yes; then
15875 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15876 cat >"conftest.$ac_ext" <<_ACEOF
15877 #line 15877 "configure"
15878 #include "confdefs.h"
15879 #include <string.h>
15882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15883 $EGREP "memchr" >/dev/null 2>&1; then
15886 ac_cv_header_stdc=no
15892 if test $ac_cv_header_stdc = yes; then
15893 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15894 cat >"conftest.$ac_ext" <<_ACEOF
15895 #line 15895 "configure"
15896 #include "confdefs.h"
15897 #include <stdlib.h>
15900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15901 $EGREP "free" >/dev/null 2>&1; then
15904 ac_cv_header_stdc=no
15910 if test $ac_cv_header_stdc = yes; then
15911 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15912 if test "$cross_compiling" = yes; then
15915 cat >"conftest.$ac_ext" <<_ACEOF
15916 #line 15916 "configure"
15917 #include "confdefs.h"
15919 #if ((' ' & 0x0FF) == 0x020)
15920 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15921 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15923 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15924 || ('j' <= (c) && (c) <= 'r') \
15925 || ('s' <= (c) && (c) <= 'z'))
15926 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15929 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15934 for (i = 0; i < 256; i++)
15935 if (XOR (islower (i), ISLOWER (i))
15936 || toupper (i) != TOUPPER (i))
15937 $ac_main_return(2);
15938 $ac_main_return (0);
15941 rm -f "conftest$ac_exeext"
15942 if { (eval echo "$as_me:15942: \"$ac_link\"") >&5
15943 (eval $ac_link) 2>&5
15945 echo "$as_me:15945: \$? = $ac_status" >&5
15946 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15947 { (eval echo "$as_me:15947: \"$ac_try\"") >&5
15948 (eval $ac_try) 2>&5
15950 echo "$as_me:15950: \$? = $ac_status" >&5
15951 (exit "$ac_status"); }; }; then
15954 echo "$as_me: program exited with status $ac_status" >&5
15955 echo "$as_me: failed program was:" >&5
15956 cat "conftest.$ac_ext" >&5
15957 ac_cv_header_stdc=no
15959 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15963 echo "$as_me:15963: result: $ac_cv_header_stdc" >&5
15964 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15965 if test $ac_cv_header_stdc = yes; then
15967 cat >>confdefs.h <<\EOF
15968 #define STDC_HEADERS 1
15973 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
15975 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
15976 inttypes.h stdint.h unistd.h
15978 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15979 echo "$as_me:15979: checking for $ac_header" >&5
15980 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15981 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15982 echo $ECHO_N "(cached) $ECHO_C" >&6
15984 cat >"conftest.$ac_ext" <<_ACEOF
15985 #line 15985 "configure"
15986 #include "confdefs.h"
15987 $ac_includes_default
15988 #include <$ac_header>
15990 rm -f "conftest.$ac_objext"
15991 if { (eval echo "$as_me:15991: \"$ac_compile\"") >&5
15992 (eval $ac_compile) 2>&5
15994 echo "$as_me:15994: \$? = $ac_status" >&5
15995 (exit "$ac_status"); } &&
15996 { ac_try='test -s "conftest.$ac_objext"'
15997 { (eval echo "$as_me:15997: \"$ac_try\"") >&5
15998 (eval $ac_try) 2>&5
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit "$ac_status"); }; }; then
16002 eval "$as_ac_Header=yes"
16004 echo "$as_me: failed program was:" >&5
16005 cat "conftest.$ac_ext" >&5
16006 eval "$as_ac_Header=no"
16008 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16010 echo "$as_me:16010: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16011 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16012 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16013 cat >>confdefs.h <<EOF
16014 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16020 echo "$as_me:16020: checking for signed char" >&5
16021 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
16022 if test "${ac_cv_type_signed_char+set}" = set; then
16023 echo $ECHO_N "(cached) $ECHO_C" >&6
16025 cat >"conftest.$ac_ext" <<_ACEOF
16026 #line 16026 "configure"
16027 #include "confdefs.h"
16028 $ac_includes_default
16032 if ((signed char *) 0)
16034 if (sizeof (signed char))
16040 rm -f "conftest.$ac_objext"
16041 if { (eval echo "$as_me:16041: \"$ac_compile\"") >&5
16042 (eval $ac_compile) 2>&5
16044 echo "$as_me:16044: \$? = $ac_status" >&5
16045 (exit "$ac_status"); } &&
16046 { ac_try='test -s "conftest.$ac_objext"'
16047 { (eval echo "$as_me:16047: \"$ac_try\"") >&5
16048 (eval $ac_try) 2>&5
16050 echo "$as_me:16050: \$? = $ac_status" >&5
16051 (exit "$ac_status"); }; }; then
16052 ac_cv_type_signed_char=yes
16054 echo "$as_me: failed program was:" >&5
16055 cat "conftest.$ac_ext" >&5
16056 ac_cv_type_signed_char=no
16058 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16060 echo "$as_me:16060: result: $ac_cv_type_signed_char" >&5
16061 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
16063 echo "$as_me:16063: checking size of signed char" >&5
16064 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
16065 if test "${ac_cv_sizeof_signed_char+set}" = set; then
16066 echo $ECHO_N "(cached) $ECHO_C" >&6
16068 if test "$ac_cv_type_signed_char" = yes; then
16069 if test "$cross_compiling" = yes; then
16070 # Depending upon the size, compute the lo and hi bounds.
16071 cat >"conftest.$ac_ext" <<_ACEOF
16072 #line 16072 "configure"
16073 #include "confdefs.h"
16074 $ac_includes_default
16078 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
16083 rm -f "conftest.$ac_objext"
16084 if { (eval echo "$as_me:16084: \"$ac_compile\"") >&5
16085 (eval $ac_compile) 2>&5
16087 echo "$as_me:16087: \$? = $ac_status" >&5
16088 (exit "$ac_status"); } &&
16089 { ac_try='test -s "conftest.$ac_objext"'
16090 { (eval echo "$as_me:16090: \"$ac_try\"") >&5
16091 (eval $ac_try) 2>&5
16093 echo "$as_me:16093: \$? = $ac_status" >&5
16094 (exit "$ac_status"); }; }; then
16097 cat >"conftest.$ac_ext" <<_ACEOF
16098 #line 16098 "configure"
16099 #include "confdefs.h"
16100 $ac_includes_default
16104 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16109 rm -f "conftest.$ac_objext"
16110 if { (eval echo "$as_me:16110: \"$ac_compile\"") >&5
16111 (eval $ac_compile) 2>&5
16113 echo "$as_me:16113: \$? = $ac_status" >&5
16114 (exit "$ac_status"); } &&
16115 { ac_try='test -s "conftest.$ac_objext"'
16116 { (eval echo "$as_me:16116: \"$ac_try\"") >&5
16117 (eval $ac_try) 2>&5
16119 echo "$as_me:16119: \$? = $ac_status" >&5
16120 (exit "$ac_status"); }; }; then
16121 ac_hi=$ac_mid; break
16123 echo "$as_me: failed program was:" >&5
16124 cat "conftest.$ac_ext" >&5
16125 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
16127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16130 echo "$as_me: failed program was:" >&5
16131 cat "conftest.$ac_ext" >&5
16134 cat >"conftest.$ac_ext" <<_ACEOF
16135 #line 16135 "configure"
16136 #include "confdefs.h"
16137 $ac_includes_default
16141 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
16146 rm -f "conftest.$ac_objext"
16147 if { (eval echo "$as_me:16147: \"$ac_compile\"") >&5
16148 (eval $ac_compile) 2>&5
16150 echo "$as_me:16150: \$? = $ac_status" >&5
16151 (exit "$ac_status"); } &&
16152 { ac_try='test -s "conftest.$ac_objext"'
16153 { (eval echo "$as_me:16153: \"$ac_try\"") >&5
16154 (eval $ac_try) 2>&5
16156 echo "$as_me:16156: \$? = $ac_status" >&5
16157 (exit "$ac_status"); }; }; then
16158 ac_lo=$ac_mid; break
16160 echo "$as_me: failed program was:" >&5
16161 cat "conftest.$ac_ext" >&5
16162 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
16164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16168 # Binary search between lo and hi bounds.
16169 while test "x$ac_lo" != "x$ac_hi"; do
16170 ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
16171 cat >"conftest.$ac_ext" <<_ACEOF
16172 #line 16172 "configure"
16173 #include "confdefs.h"
16174 $ac_includes_default
16178 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
16183 rm -f "conftest.$ac_objext"
16184 if { (eval echo "$as_me:16184: \"$ac_compile\"") >&5
16185 (eval $ac_compile) 2>&5
16187 echo "$as_me:16187: \$? = $ac_status" >&5
16188 (exit "$ac_status"); } &&
16189 { ac_try='test -s "conftest.$ac_objext"'
16190 { (eval echo "$as_me:16190: \"$ac_try\"") >&5
16191 (eval $ac_try) 2>&5
16193 echo "$as_me:16193: \$? = $ac_status" >&5
16194 (exit "$ac_status"); }; }; then
16197 echo "$as_me: failed program was:" >&5
16198 cat "conftest.$ac_ext" >&5
16199 ac_lo=`expr "$ac_mid" + 1`
16201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16203 ac_cv_sizeof_signed_char=$ac_lo
16205 if test "$cross_compiling" = yes; then
16206 { { echo "$as_me:16206: error: cannot run test program while cross compiling" >&5
16207 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16208 { (exit 1); exit 1; }; }
16210 cat >"conftest.$ac_ext" <<_ACEOF
16211 #line 16211 "configure"
16212 #include "confdefs.h"
16213 $ac_includes_default
16217 FILE *f = fopen ("conftest.val", "w");
16219 $ac_main_return (1);
16220 fprintf (f, "%ld", (long)(sizeof (signed char)));
16226 rm -f "conftest$ac_exeext"
16227 if { (eval echo "$as_me:16227: \"$ac_link\"") >&5
16228 (eval $ac_link) 2>&5
16230 echo "$as_me:16230: \$? = $ac_status" >&5
16231 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16232 { (eval echo "$as_me:16232: \"$ac_try\"") >&5
16233 (eval $ac_try) 2>&5
16235 echo "$as_me:16235: \$? = $ac_status" >&5
16236 (exit "$ac_status"); }; }; then
16237 ac_cv_sizeof_signed_char=`cat conftest.val`
16239 echo "$as_me: program exited with status $ac_status" >&5
16240 echo "$as_me: failed program was:" >&5
16241 cat "conftest.$ac_ext" >&5
16243 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16248 ac_cv_sizeof_signed_char=0
16251 echo "$as_me:16251: result: $ac_cv_sizeof_signed_char" >&5
16252 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
16253 cat >>confdefs.h <<EOF
16254 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
16257 echo "$as_me:16257: checking for ANSI C header files" >&5
16258 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16259 if test "${ac_cv_header_stdc+set}" = set; then
16260 echo $ECHO_N "(cached) $ECHO_C" >&6
16262 cat >"conftest.$ac_ext" <<_ACEOF
16263 #line 16263 "configure"
16264 #include "confdefs.h"
16265 #include <stdlib.h>
16266 #include <stdarg.h>
16267 #include <string.h>
16271 if { (eval echo "$as_me:16271: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16272 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16274 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16276 cat conftest.err >&5
16277 echo "$as_me:16277: \$? = $ac_status" >&5
16278 (exit "$ac_status"); } >/dev/null; then
16279 if test -s conftest.err; then
16280 ac_cpp_err=$ac_c_preproc_warn_flag
16287 if test -z "$ac_cpp_err"; then
16288 ac_cv_header_stdc=yes
16290 echo "$as_me: failed program was:" >&5
16291 cat "conftest.$ac_ext" >&5
16292 ac_cv_header_stdc=no
16294 rm -f conftest.err "conftest.$ac_ext"
16296 if test $ac_cv_header_stdc = yes; then
16297 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16298 cat >"conftest.$ac_ext" <<_ACEOF
16299 #line 16299 "configure"
16300 #include "confdefs.h"
16301 #include <string.h>
16304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16305 $EGREP "memchr" >/dev/null 2>&1; then
16308 ac_cv_header_stdc=no
16314 if test $ac_cv_header_stdc = yes; then
16315 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16316 cat >"conftest.$ac_ext" <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16319 #include <stdlib.h>
16322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16323 $EGREP "free" >/dev/null 2>&1; then
16326 ac_cv_header_stdc=no
16332 if test $ac_cv_header_stdc = yes; then
16333 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16334 if test "$cross_compiling" = yes; then
16337 cat >"conftest.$ac_ext" <<_ACEOF
16338 #line 16338 "configure"
16339 #include "confdefs.h"
16341 #if ((' ' & 0x0FF) == 0x020)
16342 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16343 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16345 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16346 || ('j' <= (c) && (c) <= 'r') \
16347 || ('s' <= (c) && (c) <= 'z'))
16348 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16351 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16356 for (i = 0; i < 256; i++)
16357 if (XOR (islower (i), ISLOWER (i))
16358 || toupper (i) != TOUPPER (i))
16359 $ac_main_return(2);
16360 $ac_main_return (0);
16363 rm -f "conftest$ac_exeext"
16364 if { (eval echo "$as_me:16364: \"$ac_link\"") >&5
16365 (eval $ac_link) 2>&5
16367 echo "$as_me:16367: \$? = $ac_status" >&5
16368 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16369 { (eval echo "$as_me:16369: \"$ac_try\"") >&5
16370 (eval $ac_try) 2>&5
16372 echo "$as_me:16372: \$? = $ac_status" >&5
16373 (exit "$ac_status"); }; }; then
16376 echo "$as_me: program exited with status $ac_status" >&5
16377 echo "$as_me: failed program was:" >&5
16378 cat "conftest.$ac_ext" >&5
16379 ac_cv_header_stdc=no
16381 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16385 echo "$as_me:16385: result: $ac_cv_header_stdc" >&5
16386 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16387 if test $ac_cv_header_stdc = yes; then
16389 cat >>confdefs.h <<\EOF
16390 #define STDC_HEADERS 1
16395 ac_header_dirent=no
16396 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16397 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16398 echo "$as_me:16398: checking for $ac_hdr that defines DIR" >&5
16399 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16401 echo $ECHO_N "(cached) $ECHO_C" >&6
16403 cat >"conftest.$ac_ext" <<_ACEOF
16404 #line 16404 "configure"
16405 #include "confdefs.h"
16406 #include <sys/types.h>
16418 rm -f "conftest.$ac_objext"
16419 if { (eval echo "$as_me:16419: \"$ac_compile\"") >&5
16420 (eval $ac_compile) 2>&5
16422 echo "$as_me:16422: \$? = $ac_status" >&5
16423 (exit "$ac_status"); } &&
16424 { ac_try='test -s "conftest.$ac_objext"'
16425 { (eval echo "$as_me:16425: \"$ac_try\"") >&5
16426 (eval $ac_try) 2>&5
16428 echo "$as_me:16428: \$? = $ac_status" >&5
16429 (exit "$ac_status"); }; }; then
16430 eval "$as_ac_Header=yes"
16432 echo "$as_me: failed program was:" >&5
16433 cat "conftest.$ac_ext" >&5
16434 eval "$as_ac_Header=no"
16436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16438 echo "$as_me:16438: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16439 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16440 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16441 cat >>confdefs.h <<EOF
16442 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16445 ac_header_dirent=$ac_hdr; break
16449 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16450 if test $ac_header_dirent = dirent.h; then
16451 echo "$as_me:16451: checking for opendir in -ldir" >&5
16452 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16453 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16454 echo $ECHO_N "(cached) $ECHO_C" >&6
16456 ac_check_lib_save_LIBS=$LIBS
16458 cat >"conftest.$ac_ext" <<_ACEOF
16459 #line 16459 "configure"
16460 #include "confdefs.h"
16462 /* Override any gcc2 internal prototype to avoid an error. */
16466 /* We use char because int might match the return type of a gcc2
16467 builtin and then its argument prototype would still apply. */
16477 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16478 if { (eval echo "$as_me:16478: \"$ac_link\"") >&5
16479 (eval $ac_link) 2>&5
16481 echo "$as_me:16481: \$? = $ac_status" >&5
16482 (exit "$ac_status"); } &&
16483 { ac_try='test -s "conftest$ac_exeext"'
16484 { (eval echo "$as_me:16484: \"$ac_try\"") >&5
16485 (eval $ac_try) 2>&5
16487 echo "$as_me:16487: \$? = $ac_status" >&5
16488 (exit "$ac_status"); }; }; then
16489 ac_cv_lib_dir_opendir=yes
16491 echo "$as_me: failed program was:" >&5
16492 cat "conftest.$ac_ext" >&5
16493 ac_cv_lib_dir_opendir=no
16495 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16496 LIBS=$ac_check_lib_save_LIBS
16498 echo "$as_me:16498: result: $ac_cv_lib_dir_opendir" >&5
16499 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16500 if test "$ac_cv_lib_dir_opendir" = yes; then
16505 echo "$as_me:16505: checking for opendir in -lx" >&5
16506 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16507 if test "${ac_cv_lib_x_opendir+set}" = set; then
16508 echo $ECHO_N "(cached) $ECHO_C" >&6
16510 ac_check_lib_save_LIBS=$LIBS
16512 cat >"conftest.$ac_ext" <<_ACEOF
16513 #line 16513 "configure"
16514 #include "confdefs.h"
16516 /* Override any gcc2 internal prototype to avoid an error. */
16520 /* We use char because int might match the return type of a gcc2
16521 builtin and then its argument prototype would still apply. */
16531 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16532 if { (eval echo "$as_me:16532: \"$ac_link\"") >&5
16533 (eval $ac_link) 2>&5
16535 echo "$as_me:16535: \$? = $ac_status" >&5
16536 (exit "$ac_status"); } &&
16537 { ac_try='test -s "conftest$ac_exeext"'
16538 { (eval echo "$as_me:16538: \"$ac_try\"") >&5
16539 (eval $ac_try) 2>&5
16541 echo "$as_me:16541: \$? = $ac_status" >&5
16542 (exit "$ac_status"); }; }; then
16543 ac_cv_lib_x_opendir=yes
16545 echo "$as_me: failed program was:" >&5
16546 cat "conftest.$ac_ext" >&5
16547 ac_cv_lib_x_opendir=no
16549 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16550 LIBS=$ac_check_lib_save_LIBS
16552 echo "$as_me:16552: result: $ac_cv_lib_x_opendir" >&5
16553 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16554 if test "$ac_cv_lib_x_opendir" = yes; then
16560 echo "$as_me:16560: checking whether time.h and sys/time.h may both be included" >&5
16561 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16562 if test "${ac_cv_header_time+set}" = set; then
16563 echo $ECHO_N "(cached) $ECHO_C" >&6
16565 cat >"conftest.$ac_ext" <<_ACEOF
16566 #line 16566 "configure"
16567 #include "confdefs.h"
16568 #include <sys/types.h>
16569 #include <sys/time.h>
16575 if ((struct tm *) 0)
16581 rm -f "conftest.$ac_objext"
16582 if { (eval echo "$as_me:16582: \"$ac_compile\"") >&5
16583 (eval $ac_compile) 2>&5
16585 echo "$as_me:16585: \$? = $ac_status" >&5
16586 (exit "$ac_status"); } &&
16587 { ac_try='test -s "conftest.$ac_objext"'
16588 { (eval echo "$as_me:16588: \"$ac_try\"") >&5
16589 (eval $ac_try) 2>&5
16591 echo "$as_me:16591: \$? = $ac_status" >&5
16592 (exit "$ac_status"); }; }; then
16593 ac_cv_header_time=yes
16595 echo "$as_me: failed program was:" >&5
16596 cat "conftest.$ac_ext" >&5
16597 ac_cv_header_time=no
16599 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16601 echo "$as_me:16601: result: $ac_cv_header_time" >&5
16602 echo "${ECHO_T}$ac_cv_header_time" >&6
16603 if test $ac_cv_header_time = yes; then
16605 cat >>confdefs.h <<\EOF
16606 #define TIME_WITH_SYS_TIME 1
16611 ### checks for compiler characteristics
16613 ac_cpp='$CPP $CPPFLAGS'
16614 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16615 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16616 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16617 ac_main_return="return"
16619 echo "$as_me:16619: checking for an ANSI C-conforming const" >&5
16620 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16621 if test "${ac_cv_c_const+set}" = set; then
16622 echo $ECHO_N "(cached) $ECHO_C" >&6
16624 cat >"conftest.$ac_ext" <<_ACEOF
16625 #line 16625 "configure"
16626 #include "confdefs.h"
16631 /* FIXME: Include the comments suggested by Paul. */
16632 #ifndef __cplusplus
16633 /* Ultrix mips cc rejects this. */
16634 typedef int charset[2];
16636 /* SunOS 4.1.1 cc rejects this. */
16637 char const *const *ccp;
16639 /* NEC SVR4.0.2 mips cc rejects this. */
16640 struct point {int x, y;};
16641 static struct point const zero = {0,0};
16642 /* AIX XL C 1.02.0.0 rejects this.
16643 It does not let you subtract one const X* pointer from another in
16644 an arm of an if-expression whose if-part is not a constant
16646 const char *g = "string";
16647 ccp = &g + (g ? g-g : 0);
16648 /* HPUX 7.0 cc rejects these. */
16651 ccp = (char const *const *) p;
16652 { /* SCO 3.2v4 cc rejects this. */
16654 char const *s = 0 ? (char *) 0 : (char const *) 0;
16658 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16659 int x[] = {25, 17};
16660 const int *foo = &x[0];
16663 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16664 typedef const int *iptr;
16668 { /* AIX XL C 1.02.0.0 rejects this saying
16669 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16670 struct s { int j; const int *ap[3]; };
16671 struct s *b; b->j = 5;
16673 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16674 const int foo = 10;
16682 rm -f "conftest.$ac_objext"
16683 if { (eval echo "$as_me:16683: \"$ac_compile\"") >&5
16684 (eval $ac_compile) 2>&5
16686 echo "$as_me:16686: \$? = $ac_status" >&5
16687 (exit "$ac_status"); } &&
16688 { ac_try='test -s "conftest.$ac_objext"'
16689 { (eval echo "$as_me:16689: \"$ac_try\"") >&5
16690 (eval $ac_try) 2>&5
16692 echo "$as_me:16692: \$? = $ac_status" >&5
16693 (exit "$ac_status"); }; }; then
16696 echo "$as_me: failed program was:" >&5
16697 cat "conftest.$ac_ext" >&5
16700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16702 echo "$as_me:16702: result: $ac_cv_c_const" >&5
16703 echo "${ECHO_T}$ac_cv_c_const" >&6
16704 if test $ac_cv_c_const = no; then
16706 cat >>confdefs.h <<\EOF
16712 ### Checks for external-data
16714 echo "$as_me:16714: checking if data-only library module links" >&5
16715 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16716 if test "${cf_cv_link_dataonly+set}" = set; then
16717 echo $ECHO_N "(cached) $ECHO_C" >&6
16721 cat >conftest.$ac_ext <<EOF
16722 #line 16722 "configure"
16723 int testdata[3] = { 123, 456, 789 };
16725 if { (eval echo "$as_me:16725: \"$ac_compile\"") >&5
16726 (eval $ac_compile) 2>&5
16728 echo "$as_me:16728: \$? = $ac_status" >&5
16729 (exit "$ac_status"); } ; then
16730 mv conftest.o data.o && \
16731 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16733 rm -f conftest.$ac_ext data.o
16734 cat >conftest.$ac_ext <<EOF
16735 #line 16735 "configure"
16739 ${cf_cv_main_return:-return}(1); /* I'm told this linker is broken */
16741 extern int testdata[3];
16742 return testdata[0] == 123
16743 && testdata[1] == 456
16744 && testdata[2] == 789;
16748 if { (eval echo "$as_me:16748: \"$ac_compile\"") >&5
16749 (eval $ac_compile) 2>&5
16751 echo "$as_me:16751: \$? = $ac_status" >&5
16752 (exit "$ac_status"); }; then
16753 mv conftest.o func.o && \
16754 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16756 rm -f conftest.$ac_ext func.o
16757 ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16758 cf_saveLIBS="$LIBS"
16759 LIBS="conftest.a $LIBS"
16760 if test "$cross_compiling" = yes; then
16761 cf_cv_link_dataonly=unknown
16763 cat >"conftest.$ac_ext" <<_ACEOF
16764 #line 16764 "configure"
16765 #include "confdefs.h"
16769 extern int testfunc();
16770 ${cf_cv_main_return:-return} (!testfunc());
16774 rm -f "conftest$ac_exeext"
16775 if { (eval echo "$as_me:16775: \"$ac_link\"") >&5
16776 (eval $ac_link) 2>&5
16778 echo "$as_me:16778: \$? = $ac_status" >&5
16779 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16780 { (eval echo "$as_me:16780: \"$ac_try\"") >&5
16781 (eval $ac_try) 2>&5
16783 echo "$as_me:16783: \$? = $ac_status" >&5
16784 (exit "$ac_status"); }; }; then
16785 cf_cv_link_dataonly=yes
16787 echo "$as_me: program exited with status $ac_status" >&5
16788 echo "$as_me: failed program was:" >&5
16789 cat "conftest.$ac_ext" >&5
16790 cf_cv_link_dataonly=no
16792 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16794 LIBS="$cf_saveLIBS"
16798 echo "$as_me:16798: result: $cf_cv_link_dataonly" >&5
16799 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16801 if test "$cf_cv_link_dataonly" = no ; then
16803 cat >>confdefs.h <<\EOF
16804 #define BROKEN_LINKER 1
16810 ### Checks for library functions.
16816 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16817 echo "$as_me:16817: checking for $ac_header" >&5
16818 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16819 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16820 echo $ECHO_N "(cached) $ECHO_C" >&6
16822 cat >"conftest.$ac_ext" <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16825 #include <$ac_header>
16827 if { (eval echo "$as_me:16827: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16828 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16830 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16832 cat conftest.err >&5
16833 echo "$as_me:16833: \$? = $ac_status" >&5
16834 (exit "$ac_status"); } >/dev/null; then
16835 if test -s conftest.err; then
16836 ac_cpp_err=$ac_c_preproc_warn_flag
16843 if test -z "$ac_cpp_err"; then
16844 eval "$as_ac_Header=yes"
16846 echo "$as_me: failed program was:" >&5
16847 cat "conftest.$ac_ext" >&5
16848 eval "$as_ac_Header=no"
16850 rm -f conftest.err "conftest.$ac_ext"
16852 echo "$as_me:16852: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16853 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16854 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16855 cat >>confdefs.h <<EOF
16856 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16862 echo "$as_me:16862: checking for working mkstemp" >&5
16863 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16864 if test "${cf_cv_func_mkstemp+set}" = set; then
16865 echo $ECHO_N "(cached) $ECHO_C" >&6
16869 if test "$cross_compiling" = yes; then
16870 cf_cv_func_mkstemp=maybe
16872 cat >"conftest.$ac_ext" <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16876 #include <sys/types.h>
16877 #ifdef HAVE_UNISTD_H
16878 #include <unistd.h>
16880 #include <stdlib.h>
16882 #include <string.h>
16883 #include <sys/stat.h>
16886 char *tmpl = "conftestXXXXXX";
16894 for (n = 0; n < 2; ++n) {
16895 strcpy(name[n], tmpl);
16896 if ((fd = mkstemp(name[n])) >= 0) {
16897 if (!strcmp(name[n], tmpl)
16898 || stat(name[n], &sb) != 0
16899 || (sb.st_mode & S_IFMT) != S_IFREG
16900 || (sb.st_mode & 077) != 0) {
16907 && !strcmp(name[0], name[1]))
16909 ${cf_cv_main_return:-return}(result);
16913 rm -f "conftest$ac_exeext"
16914 if { (eval echo "$as_me:16914: \"$ac_link\"") >&5
16915 (eval $ac_link) 2>&5
16917 echo "$as_me:16917: \$? = $ac_status" >&5
16918 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16919 { (eval echo "$as_me:16919: \"$ac_try\"") >&5
16920 (eval $ac_try) 2>&5
16922 echo "$as_me:16922: \$? = $ac_status" >&5
16923 (exit "$ac_status"); }; }; then
16924 cf_cv_func_mkstemp=yes
16927 echo "$as_me: program exited with status $ac_status" >&5
16928 echo "$as_me: failed program was:" >&5
16929 cat "conftest.$ac_ext" >&5
16930 cf_cv_func_mkstemp=no
16933 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16937 echo "$as_me:16937: result: $cf_cv_func_mkstemp" >&5
16938 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16939 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16940 echo "$as_me:16940: checking for mkstemp" >&5
16941 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16942 if test "${ac_cv_func_mkstemp+set}" = set; then
16943 echo $ECHO_N "(cached) $ECHO_C" >&6
16945 cat >"conftest.$ac_ext" <<_ACEOF
16946 #line 16946 "configure"
16947 #include "confdefs.h"
16948 #define mkstemp autoconf_temporary
16949 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
16956 /* We use char because int might match the return type of a gcc2
16957 builtin and then its argument prototype would still apply. */
16958 char mkstemp (void);
16964 /* The GNU C library defines stubs for functions which it implements
16965 to always fail with ENOSYS. Some functions are actually named
16966 something starting with __ and the normal name is an alias. */
16967 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16968 #error found stub for mkstemp
16976 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16977 if { (eval echo "$as_me:16977: \"$ac_link\"") >&5
16978 (eval $ac_link) 2>&5
16980 echo "$as_me:16980: \$? = $ac_status" >&5
16981 (exit "$ac_status"); } &&
16982 { ac_try='test -s "conftest$ac_exeext"'
16983 { (eval echo "$as_me:16983: \"$ac_try\"") >&5
16984 (eval $ac_try) 2>&5
16986 echo "$as_me:16986: \$? = $ac_status" >&5
16987 (exit "$ac_status"); }; }; then
16988 ac_cv_func_mkstemp=yes
16990 echo "$as_me: failed program was:" >&5
16991 cat "conftest.$ac_ext" >&5
16992 ac_cv_func_mkstemp=no
16994 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16996 echo "$as_me:16996: result: $ac_cv_func_mkstemp" >&5
16997 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17000 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17002 cat >>confdefs.h <<\EOF
17003 #define HAVE_MKSTEMP 1
17008 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17009 CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17010 CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[ ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
17014 if test "$cf_with_ada" != "no" ; then
17016 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
17019 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17021 unset ac_cv_path_cf_TEMP_gnat
17023 # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
17024 set dummy $cf_prog_gnat; ac_word=$2
17025 echo "$as_me:17025: checking for $ac_word" >&5
17026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17027 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
17028 echo $ECHO_N "(cached) $ECHO_C" >&6
17030 case $cf_TEMP_gnat in
17032 ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
17035 ac_save_IFS=$IFS; IFS=$ac_path_separator
17037 for ac_dir in $ac_dummy; do
17039 test -z "$ac_dir" && ac_dir=.
17040 if $as_executable_p "$ac_dir/$ac_word"; then
17041 ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
17042 echo "$as_me:17042: found $ac_dir/$ac_word" >&5
17047 test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
17051 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
17053 if test -n "$cf_TEMP_gnat"; then
17054 echo "$as_me:17054: result: $cf_TEMP_gnat" >&5
17055 echo "${ECHO_T}$cf_TEMP_gnat" >&6
17057 echo "$as_me:17057: result: no" >&5
17058 echo "${ECHO_T}no" >&6
17061 eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
17063 if test "x$cf_TEMP_gnat" != xno; then
17064 unset cf_cv_gnat_version
17067 echo "$as_me:17067: checking for $cf_prog_gnat version" >&5
17068 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
17069 if test "${cf_cv_gnat_version+set}" = set; then
17070 echo $ECHO_N "(cached) $ECHO_C" >&6
17073 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
17074 grep '[0-9].[0-9][0-9]*' |\
17075 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17078 echo "$as_me:17078: result: $cf_cv_gnat_version" >&5
17079 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17080 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17081 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
17084 eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
17087 unset cf_cv_gnat_version
17088 unset ac_cv_path_cf_TEMP_gnat
17091 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
17093 cf_cv_prog_gnat_correct=no
17095 cf_ada_make=gnatmake
17096 if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
17097 # gprconfig is newer than gnatmake; we can continue...
17100 rm -rf ./conftest* ./*~conftest*
17101 if mkdir conftest.src
17105 for cf_gprconfig in Ada C
17107 echo "$as_me:17107: checking for gprconfig name for $cf_gprconfig" >&5
17108 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
17109 if test "$cf_gprconfig" = C
17111 for cf_gprconfig_param in \
17112 "$cf_gprconfig,,,,GNATGCC" \
17113 "$cf_gprconfig,,,,GCC" \
17116 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17117 test -n "$cf_gprconfig_value" && break
17120 cf_gprconfig_param=$cf_gprconfig
17121 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
17123 if test -n "$cf_gprconfig_value"
17125 eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
17126 echo "$as_me:17126: result: $cf_gprconfig_value" >&5
17127 echo "${ECHO_T}$cf_gprconfig_value" >&6
17129 echo "$as_me:17129: result: missing" >&5
17130 echo "${ECHO_T}missing" >&6
17136 rm -rf ./conftest* ./*~conftest*
17139 if test "x$cf_ada_config" != "x#"
17142 echo "$as_me:17142: checking for gnat version" >&5
17143 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17144 if test "${cf_cv_gnat_version+set}" = set; then
17145 echo $ECHO_N "(cached) $ECHO_C" >&6
17148 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
17149 grep '[0-9].[0-9][0-9]*' |\
17150 sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17153 echo "$as_me:17153: result: $cf_cv_gnat_version" >&5
17154 echo "${ECHO_T}$cf_cv_gnat_version" >&6
17155 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
17157 case "$cf_cv_gnat_version" in
17158 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17159 cf_cv_prog_gnat_correct=yes
17162 { echo "$as_me:17162: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
17163 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
17164 cf_cv_prog_gnat_correct=no
17168 # Extract the first word of "m4", so it can be a program name with args.
17169 set dummy m4; ac_word=$2
17170 echo "$as_me:17170: checking for $ac_word" >&5
17171 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17172 if test "${ac_cv_prog_M4_exists+set}" = set; then
17173 echo $ECHO_N "(cached) $ECHO_C" >&6
17175 if test -n "$M4_exists"; then
17176 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17178 ac_save_IFS=$IFS; IFS=$ac_path_separator
17180 for ac_dir in $ac_dummy; do
17182 test -z "$ac_dir" && ac_dir=.
17183 $as_executable_p "$ac_dir/$ac_word" || continue
17184 ac_cv_prog_M4_exists="yes"
17185 echo "$as_me:17185: found $ac_dir/$ac_word" >&5
17189 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17192 M4_exists=$ac_cv_prog_M4_exists
17193 if test -n "$M4_exists"; then
17194 echo "$as_me:17194: result: $M4_exists" >&5
17195 echo "${ECHO_T}$M4_exists" >&6
17197 echo "$as_me:17197: result: no" >&5
17198 echo "${ECHO_T}no" >&6
17201 if test "$ac_cv_prog_M4_exists" = no; then
17202 cf_cv_prog_gnat_correct=no
17203 { echo "$as_me:17203: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
17204 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
17206 if test "$cf_cv_prog_gnat_correct" = yes; then
17207 echo "$as_me:17207: checking if GNAT works" >&5
17208 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17210 rm -rf ./conftest* ./*~conftest*
17211 cat >>conftest.ads <<CF_EOF
17212 procedure conftest;
17214 cat >>conftest.adb <<CF_EOF
17217 procedure conftest is
17219 Text_IO.Put ("Hello World");
17221 GNAT.OS_Lib.OS_Exit (0);
17224 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17225 if ( ./conftest 1>&5 2>&1 ) ; then
17226 cf_cv_prog_gnat_correct=yes
17228 cf_cv_prog_gnat_correct=no
17231 cf_cv_prog_gnat_correct=no
17233 rm -rf ./conftest* ./*~conftest*
17235 echo "$as_me:17235: result: $cf_cv_prog_gnat_correct" >&5
17236 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17239 cf_cv_prog_gnat_correct=no
17243 if test "$cf_cv_prog_gnat_correct" = yes; then
17245 echo "$as_me:17245: checking optimization options for ADAFLAGS" >&5
17246 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
17250 ADAFLAGS="$ADAFLAGS -g"
17256 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[ ].*//'`
17258 ADAFLAGS="$ADAFLAGS $cf_O_flag"
17262 echo "$as_me:17262: result: $ADAFLAGS" >&5
17263 echo "${ECHO_T}$ADAFLAGS" >&6
17265 echo "$as_me:17265: checking if GNATPREP supports -T option" >&5
17266 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
17267 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
17268 echo $ECHO_N "(cached) $ECHO_C" >&6
17271 cf_cv_gnatprep_opt_t=no
17272 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
17275 echo "$as_me:17275: result: $cf_cv_gnatprep_opt_t" >&5
17276 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
17277 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
17279 echo "$as_me:17279: checking if GNAT supports generics" >&5
17280 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
17281 case "$cf_cv_gnat_version" in
17282 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
17283 cf_gnat_generics=yes
17286 cf_gnat_generics=no
17289 echo "$as_me:17289: result: $cf_gnat_generics" >&5
17290 echo "${ECHO_T}$cf_gnat_generics" >&6
17292 if test "$cf_gnat_generics" = yes
17294 cf_compile_generics=generics
17295 cf_generic_objects="\${GENOBJS}"
17297 cf_compile_generics=
17298 cf_generic_objects=
17301 echo "$as_me:17301: checking if GNAT supports SIGINT" >&5
17302 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
17303 if test "${cf_cv_gnat_sigint+set}" = set; then
17304 echo $ECHO_N "(cached) $ECHO_C" >&6
17307 rm -rf ./conftest* ./*~conftest*
17308 cat >>conftest.ads <<CF_EOF
17309 with Ada.Interrupts.Names;
17311 package ConfTest is
17313 pragma Warnings (Off); -- the next pragma exists since 3.11p
17314 pragma Unreserve_All_Interrupts;
17315 pragma Warnings (On);
17317 protected Process is
17319 function Continue return Boolean;
17320 pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
17322 Done : Boolean := False;
17327 cat >>conftest.adb <<CF_EOF
17328 package body ConfTest is
17329 protected body Process is
17334 function Continue return Boolean is
17341 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17342 cf_cv_gnat_sigint=yes
17344 cf_cv_gnat_sigint=no
17346 rm -rf ./conftest* ./*~conftest*
17349 echo "$as_me:17349: result: $cf_cv_gnat_sigint" >&5
17350 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
17352 if test "$cf_cv_gnat_sigint" = yes ; then
17355 USE_GNAT_SIGINT="#"
17358 cf_gnat_libraries=no
17359 cf_gnat_projects=no
17361 if test "$enable_gnat_projects" != no ; then
17362 echo "$as_me:17362: checking if GNAT supports project files" >&5
17363 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
17364 case "$cf_cv_gnat_version" in
17368 case "$cf_cv_system_name" in
17372 rm -rf ./conftest* ./*~conftest*
17373 if mkdir conftest.src conftest.bin conftest.lib
17376 rm -rf ./conftest* ./*~conftest*
17377 cat >>library.gpr <<CF_EOF
17379 Kind := External ("LIB_KIND");
17380 for Library_Name use "ConfTest";
17381 for Object_Dir use ".";
17382 for Library_ALI_Dir use External("LIBRARY_DIR");
17383 for Library_Version use External ("SONAME");
17384 for Library_Kind use Kind;
17385 for Library_Dir use External("BUILD_DIR");
17386 Source_Dir := External ("SOURCE_DIR");
17387 for Source_Dirs use (Source_Dir);
17390 cat >>confpackage.ads <<CF_EOF
17391 package ConfPackage is
17392 procedure conftest;
17395 cat >>confpackage.adb <<CF_EOF
17397 package body ConfPackage is
17398 procedure conftest is
17400 Text_IO.Put ("Hello World");
17405 if ( "$cf_ada_make" $ADAFLAGS \
17407 -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
17408 -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
17409 -XSOURCE_DIR="`pwd`" \
17410 -XSONAME=libConfTest.so.1 \
17411 -XLIB_KIND=static 1>&5 2>&1 ) ; then
17412 cf_gnat_projects=yes
17416 if test -f conftest.lib/confpackage.ali
17418 cf_gnat_libraries=yes
17420 rm -rf ./conftest* ./*~conftest*
17425 echo "$as_me:17425: result: $cf_gnat_projects" >&5
17426 echo "${ECHO_T}$cf_gnat_projects" >&6
17427 fi # enable_gnat_projects
17429 if test "$cf_gnat_projects" = yes
17431 echo "$as_me:17431: checking if GNAT supports libraries" >&5
17432 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
17433 echo "$as_me:17433: result: $cf_gnat_libraries" >&5
17434 echo "${ECHO_T}$cf_gnat_libraries" >&6
17437 USE_OLD_MAKERULES=""
17438 USE_GNAT_PROJECTS="#"
17439 USE_GNAT_MAKE_GPR="#"
17440 USE_GNAT_GPRBUILD="#"
17442 if test "$cf_gnat_projects" = yes
17444 USE_OLD_MAKERULES="#"
17445 USE_GNAT_PROJECTS=""
17446 if test "$cf_cv_VERSION_GPRBUILD" != no
17448 USE_GNAT_GPRBUILD=""
17449 elif test "$cf_cv_VERSION_GNATMAKE" != no
17451 USE_GNAT_MAKE_GPR=""
17453 { echo "$as_me:17453: WARNING: use old makefile rules since tools are missing" >&5
17454 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
17458 if test "$cf_gnat_libraries" = yes
17460 USE_GNAT_LIBRARIES=""
17462 USE_GNAT_LIBRARIES="#"
17465 echo "$as_me:17465: checking for ada-compiler" >&5
17466 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
17468 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17469 if test "${with_ada_compiler+set}" = set; then
17470 withval="$with_ada_compiler"
17471 cf_ada_compiler=$withval
17473 cf_ada_compiler=gnatmake
17476 echo "$as_me:17476: result: $cf_ada_compiler" >&5
17477 echo "${ECHO_T}$cf_ada_compiler" >&6
17479 cf_ada_package=terminal_interface
17481 echo "$as_me:17481: checking for ada-include" >&5
17482 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
17484 # Check whether --with-ada-include or --without-ada-include was given.
17485 if test "${with_ada_include+set}" = set; then
17486 withval="$with_ada_include"
17489 withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
17490 fi; if test -n "$prefix/share/ada/adainclude" ; then
17492 if test "x$prefix" != xNONE; then
17493 cf_path_syntax="$prefix"
17495 cf_path_syntax="$ac_default_prefix"
17498 case ".$withval" in
17499 (.\$\(*\)*|.\'*\'*)
17503 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17505 (.\$\{*prefix\}*|.\$\{*dir\}*)
17506 eval withval="$withval"
17507 case ".$withval" in
17509 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17514 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17517 { { echo "$as_me:17517: error: expected a pathname, not \"$withval\"" >&5
17518 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17519 { (exit 1); exit 1; }; }
17524 eval ADA_INCLUDE="$withval"
17526 echo "$as_me:17526: result: $ADA_INCLUDE" >&5
17527 echo "${ECHO_T}$ADA_INCLUDE" >&6
17529 echo "$as_me:17529: checking for ada-objects" >&5
17530 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
17532 # Check whether --with-ada-objects or --without-ada-objects was given.
17533 if test "${with_ada_objects+set}" = set; then
17534 withval="$with_ada_objects"
17537 withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
17538 fi; if test -n "$prefix/lib/ada/adalib" ; then
17540 if test "x$prefix" != xNONE; then
17541 cf_path_syntax="$prefix"
17543 cf_path_syntax="$ac_default_prefix"
17546 case ".$withval" in
17547 (.\$\(*\)*|.\'*\'*)
17551 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17553 (.\$\{*prefix\}*|.\$\{*dir\}*)
17554 eval withval="$withval"
17555 case ".$withval" in
17557 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17562 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
17565 { { echo "$as_me:17565: error: expected a pathname, not \"$withval\"" >&5
17566 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17567 { (exit 1); exit 1; }; }
17572 eval ADA_OBJECTS="$withval"
17574 echo "$as_me:17574: result: $ADA_OBJECTS" >&5
17575 echo "${ECHO_T}$ADA_OBJECTS" >&6
17577 echo "$as_me:17577: checking if an Ada95 shared-library should be built" >&5
17578 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
17580 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
17581 if test "${with_ada_sharedlib+set}" = set; then
17582 withval="$with_ada_sharedlib"
17583 with_ada_sharedlib=$withval
17585 with_ada_sharedlib=no
17587 echo "$as_me:17587: result: $with_ada_sharedlib" >&5
17588 echo "${ECHO_T}$with_ada_sharedlib" >&6
17590 if test "x$with_ada_sharedlib" != xno
17592 if test "x$cf_gnat_projects" != xyes
17594 { echo "$as_me:17594: WARNING: disabling shared-library since GNAT projects are not supported" >&5
17595 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
17596 with_ada_sharedlib=no
17600 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
17601 MAKE_ADA_SHAREDLIB="#"
17603 if test "x$with_ada_sharedlib" != xno
17605 MAKE_ADA_SHAREDLIB=
17606 if test "x$with_ada_sharedlib" != xyes
17608 ADA_SHAREDLIB="$with_ada_sharedlib"
17612 # allow the Ada binding to be renamed
17614 echo "$as_me:17614: checking for ada-libname" >&5
17615 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
17617 # Check whether --with-ada-libname or --without-ada-libname was given.
17618 if test "${with_ada_libname+set}" = set; then
17619 withval="$with_ada_libname"
17620 ADA_LIBNAME=$withval
17622 ADA_LIBNAME=AdaCurses
17624 case "x$ADA_LIBNAME" in
17626 ADA_LIBNAME=AdaCurses
17630 echo "$as_me:17630: result: $ADA_LIBNAME" >&5
17631 echo "${ECHO_T}$ADA_LIBNAME" >&6
17634 { { echo "$as_me:17634: error: No usable Ada compiler found" >&5
17635 echo "$as_me: error: No usable Ada compiler found" >&2;}
17636 { (exit 1); exit 1; }; }
17639 { { echo "$as_me:17639: error: The Ada compiler is needed for this package" >&5
17640 echo "$as_me: error: The Ada compiler is needed for this package" >&2;}
17641 { (exit 1); exit 1; }; }
17644 ################################################################################
17651 ### Construct the list of include-directories to be generated
17653 if test "$srcdir" != "."; then
17654 CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
17656 CPPFLAGS="-I../include $CPPFLAGS"
17657 if test "$srcdir" != "."; then
17658 CPPFLAGS="-I\${srcdir} $CPPFLAGS"
17660 CPPFLAGS="-I. $CPPFLAGS"
17662 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17663 if test "$srcdir" != "."; then
17664 ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17666 if test "$GCC" != yes; then
17667 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17668 elif test "$includedir" != "/usr/include"; then
17669 if test "$includedir" = '${prefix}/include' ; then
17670 if test x$prefix != x/usr ; then
17671 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17674 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17678 ### Build up pieces for makefile rules
17679 echo "$as_me:17679: checking default library suffix" >&5
17680 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17682 case $DFT_LWR_MODEL in
17683 (libtool) DFT_ARG_SUFFIX='' ;;
17684 (normal) DFT_ARG_SUFFIX='' ;;
17685 (debug) DFT_ARG_SUFFIX='_g' ;;
17686 (profile) DFT_ARG_SUFFIX='_p' ;;
17687 (shared) DFT_ARG_SUFFIX='' ;;
17689 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17690 echo "$as_me:17690: result: $DFT_ARG_SUFFIX" >&5
17691 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17693 echo "$as_me:17693: checking default library-dependency suffix" >&5
17694 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17696 case X$DFT_LWR_MODEL in
17698 DFT_LIB_SUFFIX='.la'
17699 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17702 case "$cf_cv_system_name" in
17704 DFT_LIB_SUFFIX='_g.lib'
17707 DFT_LIB_SUFFIX='_g.a'
17710 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17713 case "$cf_cv_system_name" in
17715 DFT_LIB_SUFFIX='_p.lib'
17718 DFT_LIB_SUFFIX='_p.a'
17721 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17724 case "$cf_cv_system_name" in
17726 DFT_LIB_SUFFIX='.so'
17727 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17730 DFT_LIB_SUFFIX='.dll'
17731 DFT_DEP_SUFFIX='.dll.lib'
17733 (cygwin*|msys*|mingw*)
17734 DFT_LIB_SUFFIX='.dll'
17735 DFT_DEP_SUFFIX='.dll.a'
17738 DFT_LIB_SUFFIX='.dylib'
17739 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17744 DFT_LIB_SUFFIX='.so'
17745 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17748 DFT_LIB_SUFFIX='.sl'
17749 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17754 DFT_LIB_SUFFIX='.so'
17755 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17762 DFT_LIB_SUFFIX='.lib'
17765 DFT_LIB_SUFFIX='.a'
17768 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17771 if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
17773 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
17774 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
17776 echo "$as_me:17776: result: $DFT_DEP_SUFFIX" >&5
17777 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17779 echo "$as_me:17779: checking default object directory" >&5
17780 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17782 case $DFT_LWR_MODEL in
17783 (libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
17784 (normal) DFT_OBJ_SUBDIR='objects' ;;
17785 (debug) DFT_OBJ_SUBDIR='obj_g' ;;
17786 (profile) DFT_OBJ_SUBDIR='obj_p' ;;
17788 case "$cf_cv_system_name" in
17790 DFT_OBJ_SUBDIR='objects' ;;
17792 DFT_OBJ_SUBDIR='obj_s' ;;
17795 echo "$as_me:17795: result: $DFT_OBJ_SUBDIR" >&5
17796 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17798 ### Set up low-level terminfo dependencies for makefiles.
17800 if test "$DFT_LWR_MODEL" = shared ; then
17801 case $cf_cv_system_name in
17803 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17806 # "lib" files have ".dll.a" suffix, "msys-" files have ".dll"
17811 USE_ARG_SUFFIX=${DFT_ARG_SUFFIX}
17813 USE_LIB_SUFFIX=${DFT_ARG_SUFFIX}
17815 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}
17817 ### Construct the list of subdirectories for which we'll customize makefiles
17818 ### with the appropriate compile-rules.
17820 SUB_MAKEFILES="gen/adacurses${USE_ARG_SUFFIX}-config:gen/adacurses-config.in"
17822 cat >>confdefs.h <<EOF
17823 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17826 ################################################################################
17832 NCURSES_SHLIB2="sh -c"
17834 ADA_SUBDIRS="include gen src doc"
17835 if test "x$cf_with_tests" != "xno" ; then
17836 ADA_SUBDIRS="$ADA_SUBDIRS samples"
17838 for cf_dir in $ADA_SUBDIRS
17840 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17847 # match layout used by make-tar.sh
17848 ADAHTML_DIR=../doc/ada
17850 if test "x$cross_compiling" = xyes ; then
17851 ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
17853 ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
17856 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"
17857 ac_config_commands="$ac_config_commands default"
17858 cat >confcache <<\_ACEOF
17859 # This file is a shell script that caches the results of configure
17860 # tests run on this system so they can be shared between configure
17861 # scripts and configure runs, see configure's option --config-cache.
17862 # It is not useful on other systems. If it contains results you don't
17863 # want to keep, you may remove or edit it.
17865 # config.status only pays attention to the cache file if you give it
17866 # the --recheck option to rerun configure.
17868 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17869 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17870 # following values.
17874 # The following way of writing the cache mishandles newlines in values,
17875 # but we know of no workaround that is simple, portable, and efficient.
17876 # So, don't put newlines in cache variables' values.
17877 # Ultrix sh set writes to stderr and can't be redirected directly,
17878 # and sets the high bit in the cache file unless we assign to the vars.
17881 case `(ac_space=' '; set | grep ac_space) 2>&1` in
17883 # `set' does not quote correctly, so add quotes (double-quote
17884 # substitution turns \\\\ into \\, and sed turns \\ into \).
17887 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17890 # `set' quotes correctly as required by POSIX, so do not add quotes.
17892 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17899 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17901 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17903 if cmp -s $cache_file confcache; then :; else
17904 if test -w $cache_file; then
17905 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17906 cat confcache >$cache_file
17908 echo "not updating unwritable cache $cache_file"
17913 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17914 # Let make expand exec_prefix.
17915 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17917 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17918 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17919 # trailing colons and then remove the whole line if VPATH becomes empty
17920 # (actually we leave an empty line to preserve line numbers).
17921 if test "x$srcdir" = x.; then
17922 ac_vpsub='/^[ ]*VPATH[ ]*=/{
17923 s/:*\$(srcdir):*/:/;
17924 s/:*\${srcdir}:*/:/;
17926 s/^\([^=]*=[ ]*\):*/\1/;
17932 DEFS=-DHAVE_CONFIG_H
17934 : "${CONFIG_STATUS=./config.status}"
17935 ac_clean_files_save=$ac_clean_files
17936 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17937 { echo "$as_me:17937: creating $CONFIG_STATUS" >&5
17938 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17939 cat >"$CONFIG_STATUS" <<_ACEOF
17941 # Generated automatically by configure.
17942 # Run this file to recreate the current configuration.
17943 # Compiler output produced by configure, useful for debugging
17944 # configure, is in config.log if it exists.
17947 SHELL=\${CONFIG_SHELL-$SHELL}
17948 ac_cs_invocation="\$0 \$@"
17950 CLICOLOR_FORCE= GREP_OPTIONS=
17951 unset CLICOLOR_FORCE GREP_OPTIONS
17954 cat >>"$CONFIG_STATUS" <<\_ACEOF
17955 # Be Bourne compatible
17956 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17959 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17963 # Name of the executable.
17964 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17966 if expr a : '\(a\)' >/dev/null 2>&1; then
17972 rm -f conf$$ conf$$.exe conf$$.file
17974 if ln -s conf$$.file conf$$ 2>/dev/null; then
17975 # We could just check for DJGPP; but this test a) works b) is more generic
17976 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17977 if test -f conf$$.exe; then
17978 # Don't use ln at all; we don't have any links
17983 elif ln conf$$.file conf$$ 2>/dev/null; then
17988 rm -f conf$$ conf$$.exe conf$$.file
17990 as_executable_p="test -f"
17992 # Support unset when possible.
17993 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18000 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18001 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18002 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18003 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18004 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18005 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18006 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18007 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18010 # We need space, tab and new line, in precisely that order.
18016 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18022 # Files that config.status was made for.
18023 if test -n "$ac_config_files"; then
18024 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
18027 if test -n "$ac_config_headers"; then
18028 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
18031 if test -n "$ac_config_links"; then
18032 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
18035 if test -n "$ac_config_commands"; then
18036 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
18039 cat >>"$CONFIG_STATUS" <<\EOF
18042 \`$as_me' instantiates files from templates according to the
18043 current configuration.
18045 Usage: $0 [OPTIONS] [FILE]...
18047 -h, --help print this help, then exit
18048 -V, --version print version number, then exit
18049 -d, --debug don't remove temporary files
18050 --recheck update $as_me by reconfiguring in the same conditions
18051 --file=FILE[:TEMPLATE]
18052 instantiate the configuration file FILE
18053 --header=FILE[:TEMPLATE]
18054 instantiate the configuration header FILE
18056 Configuration files:
18059 Configuration headers:
18062 Configuration commands:
18065 Report bugs to <dickey@invisible-island.net>."
18068 cat >>"$CONFIG_STATUS" <<EOF
18071 configured by $0, generated by GNU Autoconf 2.52.20210509,
18072 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18074 Copyright 2003-2020,2021 Thomas E. Dickey
18075 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18076 Free Software Foundation, Inc.
18077 This config.status script is free software; the Free Software Foundation
18078 gives unlimited permission to copy, distribute and modify it."
18083 cat >>"$CONFIG_STATUS" <<\EOF
18084 # If no file are specified by the user, then we need to provide default
18085 # value. By we need to know if files were specified by the user.
18091 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18092 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18094 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18098 *) # This is not an option, so the user has probably given explicit
18100 ac_need_defaults=false;;
18104 # Handling of the options.
18106 cat >>"$CONFIG_STATUS" <<EOF
18107 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18108 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18109 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18111 cat >>"$CONFIG_STATUS" <<\EOF
18112 --version | --vers* | -V )
18113 echo "$ac_cs_version"; exit 0 ;;
18115 # Conflict between --help and --header
18116 { { echo "$as_me:18116: error: ambiguous option: $1
18117 Try \`$0 --help' for more information." >&5
18118 echo "$as_me: error: ambiguous option: $1
18119 Try \`$0 --help' for more information." >&2;}
18120 { (exit 1); exit 1; }; };;
18121 --help | --hel | -h )
18122 echo "$ac_cs_usage"; exit 0 ;;
18123 --debug | --d* | -d )
18125 --file | --fil | --fi | --f )
18127 CONFIG_FILES="$CONFIG_FILES $1"
18128 ac_need_defaults=false;;
18129 --header | --heade | --head | --hea )
18131 CONFIG_HEADERS="$CONFIG_HEADERS $1"
18132 ac_need_defaults=false;;
18134 # This is an error.
18135 -*) { { echo "$as_me:18135: error: unrecognized option: $1
18136 Try \`$0 --help' for more information." >&5
18137 echo "$as_me: error: unrecognized option: $1
18138 Try \`$0 --help' for more information." >&2;}
18139 { (exit 1); exit 1; }; } ;;
18141 *) ac_config_targets="$ac_config_targets $1" ;;
18150 ## ----------------------- ##
18151 ## Running config.status. ##
18152 ## ----------------------- ##
18154 This file was extended by $as_me 2.52.20210509, executed with
18155 CONFIG_FILES = $CONFIG_FILES
18156 CONFIG_HEADERS = $CONFIG_HEADERS
18157 CONFIG_LINKS = $CONFIG_LINKS
18158 CONFIG_COMMANDS = $CONFIG_COMMANDS
18159 > "$ac_cs_invocation"
18160 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18165 cat >>"$CONFIG_STATUS" <<EOF
18167 # INIT-COMMANDS section.
18170 ### Special initialization commands, used to pass information from the
18171 ### configuration-run into config.status
18174 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18175 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18176 LIB_NAME="$LIB_NAME"
18177 LIB_PREFIX="$LIB_PREFIX"
18178 LIB_SUFFIX="$LIB_SUFFIX"
18180 NCURSES_MAJOR="$NCURSES_MAJOR"
18181 NCURSES_MINOR="$NCURSES_MINOR"
18182 NCURSES_PATCH="$NCURSES_PATCH"
18183 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
18184 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
18185 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
18186 cf_cv_abi_version="$cf_cv_abi_version"
18187 cf_cv_rel_version="$cf_cv_rel_version"
18188 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18189 cf_cv_shared_soname='$cf_cv_shared_soname'
18190 cf_cv_shlib_version="$cf_cv_shlib_version"
18191 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18192 cf_cv_system_name="$cf_cv_system_name"
18198 cat >>"$CONFIG_STATUS" <<\EOF
18199 for ac_config_target in $ac_config_targets
18201 case "$ac_config_target" in
18202 # Handling of arguments.
18203 "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18204 "src/library.gpr" ) CONFIG_FILES="$CONFIG_FILES src/library.gpr:src/library.gpr.in" ;;
18205 "doc/adacurses${DFT_ARG_SUFFIX}-config.1" ) CONFIG_FILES="$CONFIG_FILES doc/adacurses${DFT_ARG_SUFFIX}-config.1:doc/MKada_config.in" ;;
18206 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18207 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18208 "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18209 *) { { echo "$as_me:18209: error: invalid argument: $ac_config_target" >&5
18210 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18211 { (exit 1); exit 1; }; };;
18215 # If the user did not use the arguments to specify the items to instantiate,
18216 # then the envvar interface is used. Set only those that are not.
18217 # We use the long form for the default assignment because of an extremely
18218 # bizarre bug on SunOS 4.1.3.
18219 if "$ac_need_defaults"; then
18220 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18221 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18222 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18225 # Create a temporary directory, and hook for its removal unless debugging.
18228 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18229 trap '{ (exit 1); exit 1; }' 1 2 13 15
18232 # Create a (secure) tmp directory for tmp files.
18235 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18236 test -n "$tmp" && test -d "$tmp"
18239 tmp=$TMPDIR/cs$$-$RANDOM
18240 (umask 077 && mkdir $tmp)
18243 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18244 { (exit 1); exit 1; }
18249 cat >>"$CONFIG_STATUS" <<EOF
18252 # CONFIG_FILES section.
18255 # No need to generate the scripts if there are no CONFIG_FILES.
18256 # This happens for instance when ./config.status config.h
18257 if test -n "\$CONFIG_FILES"; then
18258 # Protect against being on the right side of a sed subst in config.status.
18259 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18260 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18261 s,@SHELL@,$SHELL,;t t
18262 s,@exec_prefix@,$exec_prefix,;t t
18263 s,@prefix@,$prefix,;t t
18264 s,@program_transform_name@,$program_transform_name,;t t
18265 s,@bindir@,$bindir,;t t
18266 s,@sbindir@,$sbindir,;t t
18267 s,@libexecdir@,$libexecdir,;t t
18268 s,@datarootdir@,$datarootdir,;t t
18269 s,@datadir@,$datadir,;t t
18270 s,@sysconfdir@,$sysconfdir,;t t
18271 s,@sharedstatedir@,$sharedstatedir,;t t
18272 s,@localstatedir@,$localstatedir,;t t
18273 s,@runstatedir@,$runstatedir,;t t
18274 s,@libdir@,$libdir,;t t
18275 s,@includedir@,$includedir,;t t
18276 s,@oldincludedir@,$oldincludedir,;t t
18277 s,@infodir@,$infodir,;t t
18278 s,@mandir@,$mandir,;t t
18279 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18280 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18281 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18282 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18283 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18284 s,@build_alias@,$build_alias,;t t
18285 s,@host_alias@,$host_alias,;t t
18286 s,@target_alias@,$target_alias,;t t
18287 s,@ECHO_C@,$ECHO_C,;t t
18288 s,@ECHO_N@,$ECHO_N,;t t
18289 s,@ECHO_T@,$ECHO_T,;t t
18290 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18291 s,@DEFS@,$DEFS,;t t
18292 s,@LIBS@,$LIBS,;t t
18293 s,@top_builddir@,$top_builddir,;t t
18294 s,@build@,$build,;t t
18295 s,@build_cpu@,$build_cpu,;t t
18296 s,@build_vendor@,$build_vendor,;t t
18297 s,@build_os@,$build_os,;t t
18298 s,@host@,$host,;t t
18299 s,@host_cpu@,$host_cpu,;t t
18300 s,@host_vendor@,$host_vendor,;t t
18301 s,@host_os@,$host_os,;t t
18302 s,@target@,$target,;t t
18303 s,@target_cpu@,$target_cpu,;t t
18304 s,@target_vendor@,$target_vendor,;t t
18305 s,@target_os@,$target_os,;t t
18306 s,@GREP@,$GREP,;t t
18307 s,@FGREP@,$FGREP,;t t
18309 s,@CFLAGS@,$CFLAGS,;t t
18310 s,@LDFLAGS@,$LDFLAGS,;t t
18311 s,@CPPFLAGS@,$CPPFLAGS,;t t
18312 s,@ac_ct_CC@,$ac_ct_CC,;t t
18313 s,@EXEEXT@,$EXEEXT,;t t
18314 s,@OBJEXT@,$OBJEXT,;t t
18315 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18317 s,@EGREP@,$EGREP,;t t
18319 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18320 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18321 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18322 s,@LN_S@,$LN_S,;t t
18323 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
18324 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
18325 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18326 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
18327 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18328 s,@SET_MAKE@,$SET_MAKE,;t t
18329 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
18330 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
18331 s,@CTAGS@,$CTAGS,;t t
18332 s,@ETAGS@,$ETAGS,;t t
18333 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18334 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18335 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18336 s,@RANLIB@,$RANLIB,;t t
18337 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18339 s,@ac_ct_LD@,$ac_ct_LD,;t t
18341 s,@ac_ct_AR@,$ac_ct_AR,;t t
18342 s,@ARFLAGS@,$ARFLAGS,;t t
18343 s,@DESTDIR@,$DESTDIR,;t t
18344 s,@BUILD_CC@,$BUILD_CC,;t t
18345 s,@BUILD_CPP@,$BUILD_CPP,;t t
18346 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18347 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18348 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18349 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18350 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18351 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18352 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18353 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18354 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
18355 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
18356 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18357 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18358 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18359 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18360 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18361 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18362 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18363 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18364 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18365 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18366 s,@CC_G_OPT@,$CC_G_OPT,;t t
18367 s,@LD_MODEL@,$LD_MODEL,;t t
18368 s,@shlibdir@,$shlibdir,;t t
18369 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
18370 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18371 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18372 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18373 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18374 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
18375 s,@LINK_PROGS@,$LINK_PROGS,;t t
18376 s,@LINK_TESTS@,$LINK_TESTS,;t t
18377 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18378 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18379 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18380 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18381 s,@RPATH_LIST@,$RPATH_LIST,;t t
18382 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18383 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18384 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18385 s,@PTHREAD@,$PTHREAD,;t t
18386 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18387 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18388 s,@ECHO_LT@,$ECHO_LT,;t t
18389 s,@ECHO_LD@,$ECHO_LD,;t t
18390 s,@RULE_CC@,$RULE_CC,;t t
18391 s,@SHOW_CC@,$SHOW_CC,;t t
18392 s,@ECHO_CC@,$ECHO_CC,;t t
18393 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18394 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
18395 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
18396 s,@ADAFLAGS@,$ADAFLAGS,;t t
18397 s,@ADA_TRACE@,$ADA_TRACE,;t t
18398 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
18399 s,@M4_exists@,$M4_exists,;t t
18400 s,@cf_ada_make@,$cf_ada_make,;t t
18401 s,@cf_ada_config@,$cf_ada_config,;t t
18402 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
18403 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
18404 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
18405 s,@cf_compile_generics@,$cf_compile_generics,;t t
18406 s,@cf_generic_objects@,$cf_generic_objects,;t t
18407 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
18408 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
18409 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
18410 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
18411 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
18412 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
18413 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18414 s,@cf_ada_package@,$cf_ada_package,;t t
18415 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18416 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18417 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
18418 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
18419 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
18420 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
18421 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
18422 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18423 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18424 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18425 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18426 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
18427 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
18428 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
18429 s,@TEST_ARG2@,$TEST_ARG2,;t t
18430 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
18431 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
18432 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18433 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18434 s,@EXTERNAL_TREE@,$EXTERNAL_TREE,;t t
18435 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
18436 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
18441 cat >>"$CONFIG_STATUS" <<\EOF
18442 # Split the substitutions into bite-sized pieces for seds with
18443 # small command number limits, like on Digital OSF/1 and HP-UX.
18444 ac_max_sed_lines=48
18445 ac_sed_frag=1 # Number of current file.
18446 ac_beg=1 # First line for current file.
18447 ac_end=$ac_max_sed_lines # Line after last line for current file.
18450 while "$ac_more_lines"; do
18451 if test "$ac_beg" -gt 1; then
18452 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18454 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18456 if test ! -s $tmp/subs.frag; then
18457 ac_more_lines=false
18459 # The purpose of the label and of the branching condition is to
18460 # speed up the sed processing (if there are no `@' at all, there
18461 # is no need to browse any of the substitutions).
18462 # These are the two extra sed commands mentioned above.
18464 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18465 # It is possible to make a multiline substitution using escaped newlines.
18466 # Ensure that we do not split the substitution between script fragments.
18468 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
18469 sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
18470 if test -s $tmp/subs.next; then
18471 grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
18472 if test ! -s $tmp/subs.edit; then
18473 grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
18474 if test ! -s $tmp/subs.edit; then
18475 if test "$ac_beg" -gt 1; then
18476 ac_end=`expr "$ac_end" - 1`
18483 if test -z "$ac_sed_cmds"; then
18484 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18486 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18488 ac_sed_frag=`expr "$ac_sed_frag" + 1`
18490 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
18493 if test -z "$ac_sed_cmds"; then
18496 fi # test -n "$CONFIG_FILES"
18499 cat >>"$CONFIG_STATUS" <<\EOF
18500 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18501 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18503 - | *:- | *:-:* ) # input from stdin
18505 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18506 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18507 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18508 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18509 * ) ac_file_in=$ac_file.in ;;
18512 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18513 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18514 X"$ac_file" : 'X\(//\)[^/]' \| \
18515 X"$ac_file" : 'X\(//\)$' \| \
18516 X"$ac_file" : 'X\(/\)' \| \
18517 . : '\(.\)' 2>/dev/null ||
18519 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18520 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18521 /^X\(\/\/\)$/{ s//\1/; q; }
18522 /^X\(\/\).*/{ s//\1/; q; }
18524 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18525 { case "$ac_dir" in
18526 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18530 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18531 case $as_mkdir_dir in
18532 # Skip DOS drivespec
18533 ?:) as_incr_dir=$as_mkdir_dir ;;
18535 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18536 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18541 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18542 # A "../" for each directory in $ac_dir_suffix.
18543 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18545 ac_dir_suffix= ac_dots=
18550 if test -z "$ac_dots"; then
18553 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
18555 [\\/]* | ?:[\\/]* )
18556 ac_srcdir="$srcdir$ac_dir_suffix";
18557 ac_top_srcdir="$srcdir" ;;
18558 *) # Relative path.
18559 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
18560 ac_top_srcdir="$ac_dots$srcdir" ;;
18564 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18565 *) ac_INSTALL=$ac_dots$INSTALL ;;
18568 if test x"$ac_file" != x-; then
18569 { echo "$as_me:18569: creating $ac_file" >&5
18570 echo "$as_me: creating $ac_file" >&6;}
18573 # Let's still pretend it is `configure' which instantiates (i.e., don't
18574 # use $as_me), people would be surprised to read:
18575 # /* config.h. Generated automatically by config.status. */
18576 configure_input="Generated automatically from `echo $ac_file_in |
18577 sed 's,.*/,,'` by configure."
18579 # First look for the input files in the build tree, otherwise in the
18581 ac_file_inputs=`IFS=:
18582 for f in $ac_file_in; do
18584 -) echo $tmp/stdin ;;
18586 # Absolute (can't be DOS-style, as IFS=:)
18587 test -f "$f" || { { echo "$as_me:18587: error: cannot find input file: $f" >&5
18588 echo "$as_me: error: cannot find input file: $f" >&2;}
18589 { (exit 1); exit 1; }; }
18592 if test -f "$f"; then
18595 elif test -f "$srcdir/$f"; then
18600 { { echo "$as_me:18600: error: cannot find input file: $f" >&5
18601 echo "$as_me: error: cannot find input file: $f" >&2;}
18602 { (exit 1); exit 1; }; }
18605 done` || { (exit 1); exit 1; }
18607 cat >>"$CONFIG_STATUS" <<\EOF
18608 ac_warn_datarootdir=no
18609 if test x"$ac_file" != x-; then
18610 for ac_item in $ac_file_inputs
18612 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
18613 if test -n "$ac_seen"; then
18614 ac_used=`grep '@datarootdir@' "$ac_item"`
18615 if test -z "$ac_used"; then
18616 { echo "$as_me:18616: WARNING: datarootdir was used implicitly but not set:
18618 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
18620 ac_warn_datarootdir=yes
18623 ac_seen=`grep '${datarootdir}' "$ac_item"`
18624 if test -n "$ac_seen"; then
18625 { echo "$as_me:18625: WARNING: datarootdir was used explicitly but not set:
18627 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
18629 ac_warn_datarootdir=yes
18634 if test "x$ac_warn_datarootdir" = xyes; then
18635 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
18639 cat >>"$CONFIG_STATUS" <<EOF
18643 cat >>"$CONFIG_STATUS" <<\EOF
18645 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18646 s,@configure_input@,$configure_input,;t t
18647 s,@srcdir@,$ac_srcdir,;t t
18648 s,@top_srcdir@,$ac_top_srcdir,;t t
18649 s,@INSTALL@,$ac_INSTALL,;t t
18650 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18652 if test x"$ac_file" != x-; then
18653 cp "$tmp/out" "$ac_file"
18655 for ac_name in prefix exec_prefix datarootdir
18657 ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
18658 if test -n "$ac_seen"; then
18659 ac_init=`${EGREP-egrep} '[ ]*'$ac_name'[ ]*=' "$ac_file"`
18660 if test -z "$ac_init"; then
18661 ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
18662 { echo "$as_me:18662: WARNING: Variable $ac_name is used but was not set:
18664 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
18669 ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
18670 ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
18671 if test -s $tmp/out; then
18672 ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
18673 { echo "$as_me:18673: WARNING: Some variables may not be substituted:
18675 echo "$as_me: WARNING: Some variables may not be substituted:
18685 cat >>"$CONFIG_STATUS" <<\EOF
18688 # CONFIG_HEADER section.
18691 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18692 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18694 # ac_d sets the value in "#define NAME VALUE" lines.
18695 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
18696 ac_dB='[ ].*$,\1#\2'
18699 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18700 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18701 ac_iB='\([ ]\),\1#\2define\3'
18704 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18705 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
18706 ac_uB='$,\1#\2define\3'
18710 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18711 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18713 - | *:- | *:-:* ) # input from stdin
18715 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18716 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18717 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18718 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18719 * ) ac_file_in=$ac_file.in ;;
18722 test x"$ac_file" != x- && { echo "$as_me:18722: creating $ac_file" >&5
18723 echo "$as_me: creating $ac_file" >&6;}
18725 # First look for the input files in the build tree, otherwise in the
18727 ac_file_inputs=`IFS=:
18728 for f in $ac_file_in; do
18730 -) echo $tmp/stdin ;;
18732 # Absolute (can't be DOS-style, as IFS=:)
18733 test -f "$f" || { { echo "$as_me:18733: error: cannot find input file: $f" >&5
18734 echo "$as_me: error: cannot find input file: $f" >&2;}
18735 { (exit 1); exit 1; }; }
18738 if test -f "$f"; then
18741 elif test -f "$srcdir/$f"; then
18746 { { echo "$as_me:18746: error: cannot find input file: $f" >&5
18747 echo "$as_me: error: cannot find input file: $f" >&2;}
18748 { (exit 1); exit 1; }; }
18751 done` || { (exit 1); exit 1; }
18752 # Remove the trailing spaces.
18753 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
18757 # Transform confdefs.h into a list of #define's. We won't use it as a sed
18758 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
18759 # be either 'cat' or 'sort'.
18760 cat confdefs.h | uniq >conftest.vals
18762 # Break up conftest.vals because some shells have a limit on
18763 # the size of here documents, and old seds have small limits too.
18765 rm -f conftest.tail
18766 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
18767 while grep . conftest.vals >/dev/null
18769 # Write chunks of a limited-size here document to conftest.frag.
18770 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
18771 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
18772 echo 'CEOF' >> "$CONFIG_STATUS"
18773 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
18774 rm -f conftest.vals
18775 mv conftest.tail conftest.vals
18777 rm -f conftest.vals
18779 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18781 echo ' cat >> conftest.edit <<CEOF
18782 /@DEFS@/r conftest.frag
18785 sed -f conftest.edit $tmp/in > $tmp/out
18787 mv $tmp/out $tmp/in
18788 rm -f conftest.edit conftest.frag
18789 ' >> "$CONFIG_STATUS"
18791 cat >>"$CONFIG_STATUS" <<\EOF
18792 # Let's still pretend it is `configure' which instantiates (i.e., don't
18793 # use $as_me), people would be surprised to read:
18794 # /* config.h. Generated automatically by config.status. */
18795 if test x"$ac_file" = x-; then
18796 echo "/* Generated automatically by configure. */" >$tmp/config.h
18798 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
18800 cat $tmp/in >>$tmp/config.h
18802 if test x"$ac_file" != x-; then
18803 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
18804 { echo "$as_me:18804: $ac_file is unchanged" >&5
18805 echo "$as_me: $ac_file is unchanged" >&6;}
18807 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18808 X"$ac_file" : 'X\(//\)[^/]' \| \
18809 X"$ac_file" : 'X\(//\)$' \| \
18810 X"$ac_file" : 'X\(/\)' \| \
18811 . : '\(.\)' 2>/dev/null ||
18813 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18814 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18815 /^X\(\/\/\)$/{ s//\1/; q; }
18816 /^X\(\/\).*/{ s//\1/; q; }
18818 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18819 { case "$ac_dir" in
18820 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18824 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18825 case $as_mkdir_dir in
18826 # Skip DOS drivespec
18827 ?:) as_incr_dir=$as_mkdir_dir ;;
18829 as_incr_dir=$as_incr_dir/$as_mkdir_dir
18830 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18837 mv "$tmp/config.h" "$ac_file"
18841 rm -f $tmp/config.h
18845 cat >>"$CONFIG_STATUS" <<\EOF
18847 # CONFIG_COMMANDS section.
18849 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18850 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18851 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18855 if test -z "$USE_OLD_MAKERULES" ; then
18856 $AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
18863 cat >>"$CONFIG_STATUS" <<\EOF
18865 { (exit 0); exit 0; }
18867 chmod +x "$CONFIG_STATUS"
18868 ac_clean_files=$ac_clean_files_save
18870 # configure is writing to config.log, and then calls config.status.
18871 # config.status does its own redirection, appending to config.log.
18872 # Unfortunately, on DOS this fails, as config.log is still kept open
18873 # by configure, so config.status won't be able to write to it; its
18874 # output is simply discarded. So we exec the FD to /dev/null,
18875 # effectively closing config.log, so it can be properly (re)opened and
18876 # appended to by config.status. When coming back to configure, we
18877 # need to make the FD available again.
18878 if test "$no_create" != yes; then
18881 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
18883 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18884 # would make configure fail if this is the last instruction.
18885 "$ac_cs_success" || { (exit 1); exit 1; }
18887 ${MAKE:-make} preinstall